<!-- Webdav URL-->
<NcAppSettingsSection id="webdav" :title="t('files', 'Webdav')">
- <NcInputField type="text" readonly="readonly" :value="webdavUrl" />
+ <NcInputField id="webdav-url-input"
+ :show-trailing-button="true"
+ :success="webdavUrlCopied"
+ :trailing-button-label="t('files', 'Copy to clipboard')"
+ :value="webdavUrl"
+ readonly="readonly"
+ type="url"
+ @focus="$event.target.select()"
+ @trailing-button-click="copyCloudId">
+ <template #trailing-button-icon>
+ <Clipboard :size="20" />
+ </template>
+ </NcInputField>
<em>
<a :href="webdavDocs" target="_blank" rel="noreferrer noopener">
{{ t('files', 'Use this address to access your Files via WebDAV') }} ↗
import NcAppSettingsDialog from '@nextcloud/vue/dist/Components/NcAppSettingsDialog.js'
import NcAppSettingsSection from '@nextcloud/vue/dist/Components/NcAppSettingsSection.js'
import NcCheckboxRadioSwitch from '@nextcloud/vue/dist/Components/NcCheckboxRadioSwitch.js'
+import Clipboard from 'vue-material-design-icons/Clipboard.vue'
import NcInputField from '@nextcloud/vue/dist/Components/NcInputField'
import Setting from '../components/Setting.vue'
+import { emit } from '@nextcloud/event-bus'
import { generateRemoteUrl, generateUrl } from '@nextcloud/router'
import { getCurrentUser } from '@nextcloud/auth'
import { loadState } from '@nextcloud/initial-state'
-import { emit } from '@nextcloud/event-bus'
-import axios from '@nextcloud/axios'
+import { showError, showSuccess } from '@nextcloud/dialogs'
import { translate } from '@nextcloud/l10n'
+import axios from '@nextcloud/axios'
const userConfig = loadState('files', 'config', {
show_hidden: false,
export default {
name: 'Settings',
components: {
+ Clipboard,
NcAppSettingsDialog,
NcAppSettingsSection,
NcCheckboxRadioSwitch,
// Webdav infos
webdavUrl: generateRemoteUrl('dav/files/' + encodeURIComponent(getCurrentUser()?.uid)),
webdavDocs: 'https://docs.nextcloud.com/server/stable/go.php?to=user-webdav',
+ webdavUrlCopied: false,
}
},
})
},
+ async copyCloudId() {
+ document.querySelector('input#webdav-url-input').select()
+
+ if (!navigator.clipboard) {
+ // Clipboard API not available
+ showError(t('files', 'Clipboard is not available'))
+ return
+ }
+
+ await navigator.clipboard.writeText(this.webdavUrl)
+ this.webdavUrlCopied = true
+ showSuccess(t('files', 'Webdav URL copied to clipboard'))
+ setTimeout(() => {
+ this.webdavUrlCopied = false
+ }, 5000)
+ },
+
t: translate,
},
}
/*! For license information please see files-main.js.LICENSE.txt */
-!function(){"use strict";var e,n={71925:function(e,n,i){var r=i(17499),o=i(79954),a=i(9944),l=i(79753),s=i(45994),c=function(){var e,t,n,i,r=(null===(e=OCA)||void 0===e||null===(t=e.Files)||void 0===t||null===(n=t.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),p=i(20144),d=i(62520),f=i(26932),m=i(93455),v=i.n(m),g=i(70110),h=i.n(g);function A(e,t,n,i,r,o,a){try{var l=e[o](a),s=l.value}catch(e){return void n(e)}l.done?t(s):Promise.resolve(s).then(i,r)}function y(e){return function(){var t=this,n=arguments;return new Promise((function(i,r){var o=e.apply(t,n);function a(e){A(o,i,r,a,l,"next",e)}function l(e){A(o,i,r,a,l,"throw",e)}a(void 0)}))}}var b=function(){var e=y(regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,u.default.get((0,l.generateOcsUrl)("apps/files/api/v1/templates"));case 2:return t=e.sent,e.abrupt("return",t.data.ocs.data);case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),w=function(){var e=y(regeneratorRuntime.mark((function e(t,n,i){var r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,u.default.post((0,l.generateOcsUrl)("apps/files/api/v1/templates/create"),{filePath:t,templatePath:n,templateType:i});case 2:return r=e.sent,e.abrupt("return",r.data.ocs.data);case 4:case"end":return e.stop()}}),e)})));return function(t,n,i){return e.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,s.ts)()?(0,l.generateUrl)("/core/preview?fileId=".concat(this.fileid,"&x=").concat(C,"&y=").concat(C,"&a=1")):(0,l.generateUrl)("/apps/files_sharing/publicpreview/".concat(document.getElementById("sharingToken")&&document.getElementById("sharingToken").value,"?fileId=").concat(this.fileid,"&file=").concat(function(e){var t=(e.startsWith("/")?e:"/".concat(e)).split("/"),n="";return t.forEach((function(e){""!==e&&(n+="/"+encodeURIComponent(e))})),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}}},k=_,O=i(93379),S=i.n(O),x=i(7795),P=i.n(x),j=i(90569),E=i.n(j),N=i(3565),F=i.n(N),T=i(19216),D=i.n(T),I=i(44589),B=i.n(I),U=i(87027),V={};V.styleTagTransform=B(),V.setAttributes=F(),V.insert=E().bind(null,"head"),V.domAPI=P(),V.insertStyleElement=D(),S()(U.Z,V),U.Z&&U.Z.locals&&U.Z.locals;var Z=i(51900),M=(0,Z.Z)(k,(function(){var e=this,t=e._self._c;return t("li",{staticClass:"template-picker__item"},[t("input",{staticClass:"radio",attrs:{id:e.id,type:"radio",name:"template-picker"},domProps:{checked:e.checked},on:{change:e.onCheck}}),e._v(" "),t("label",{staticClass:"template-picker__label",attrs:{for:e.id}},[t("div",{staticClass:"template-picker__preview",class:e.failedPreview?"template-picker__preview--failed":""},[t("img",{staticClass:"template-picker__image",attrs:{src:e.realPreviewUrl,alt:"",draggable:"false"},on:{error:e.onFailure}})]),e._v(" "),t("span",{staticClass:"template-picker__title"},[e._v("\n\t\t\t"+e._s(e.nameWithoutExt)+"\n\t\t")])])])}),[],!1,null,"440aea22",null).exports;function q(e,t,n,i,r,o,a){try{var l=e[o](a),s=l.value}catch(e){return void n(e)}l.done?t(s):Promise.resolve(s).then(i,r)}function R(e){return function(){var t=this,n=arguments;return new Promise((function(i,r){var o=e.apply(t,n);function a(e){q(o,i,r,a,l,"next",e)}function l(e){q(o,i,r,a,l,"throw",e)}a(void 0)}))}}var L={name:"TemplatePicker",components:{NcEmptyContent:v(),NcModal:h(),TemplatePreview:M},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 e=this;return this.provider.templates.find((function(t){return t.fileid===e.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(e,t){var n=this;return R(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=e,n.provider=t,i.next=5,b();case 5:if(r=i.sent,null!==(o=r.find((function(e){return e.app===t.app&&e.label===t.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(e){this.checked=e},onSubmit:function(){var e=this;return R(regeneratorRuntime.mark((function t(){var n,i,r,o,a,l,s,u,p,m,v,g,h;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e.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,e.nameWithoutExt===e.name&&(e.logger.debug("Fixed invalid filename",{name:e.name,extension:null===(l=e.provider)||void 0===l?void 0:l.extension}),e.name=e.name+(null===(s=e.provider)||void 0===s?void 0:s.extension)),t.prev=4,t.next=7,w((0,d.normalize)("".concat(o,"/").concat(e.name)),null===(u=e.selectedTemplate)||void 0===u?void 0:u.filename,null===(p=e.selectedTemplate)||void 0===p?void 0:p.templateType);case 7:return m=t.sent,e.logger.debug("Created new file",m),t.next=11,null==a?void 0:a.addAndFetchFileInfo(e.name).then((function(e,t){return t}));case 11:v=t.sent,g=new OCA.Files.FileInfoModel(v,{filesClient:null==a?void 0:a.filesClient}),(h=OCA.Files.fileActions.getDefaultFileAction(m.mime,"file",OC.PERMISSION_ALL))&&h.action(m.basename,{$file:null==a?void 0:a.findFileEl(e.name),dir:o,fileList:a,fileActions:null==a?void 0:a.fileActions,fileInfoModel:g}),e.close(),t.next=23;break;case 18:t.prev=18,t.t0=t.catch(4),e.logger.error("Error while creating the new file from template"),console.error(t.t0),(0,f.x2)(e.t("files","Unable to create new file from template"));case 23:return t.prev=23,e.loading=!1,t.finish(23);case 26:case"end":return t.stop()}}),t,null,[[4,18,23,26]])})))()}}},W=L,Q=i(74502),$={};$.styleTagTransform=B(),$.setAttributes=F(),$.insert=E().bind(null,"head"),$.domAPI=P(),$.insertStyleElement=D(),S()(Q.Z,$),Q.Z&&Q.Z.locals&&Q.Z.locals;var z=(0,Z.Z)(W,(function(){var e=this,t=e._self._c;return e.opened?t("NcModal",{staticClass:"templates-picker",attrs:{"clear-view-delay":-1,size:"normal"},on:{close:e.close}},[t("form",{staticClass:"templates-picker__form",style:e.style,on:{submit:function(t){return t.preventDefault(),t.stopPropagation(),e.onSubmit.apply(null,arguments)}}},[t("h2",[e._v(e._s(e.t("files","Pick a template for {name}",{name:e.nameWithoutExt})))]),e._v(" "),t("ul",{staticClass:"templates-picker__list"},[t("TemplatePreview",e._b({attrs:{checked:e.checked===e.emptyTemplate.fileid},on:{check:e.onCheck}},"TemplatePreview",e.emptyTemplate,!1)),e._v(" "),e._l(e.provider.templates,(function(n){return t("TemplatePreview",e._b({key:n.fileid,attrs:{checked:e.checked===n.fileid,ratio:e.provider.ratio},on:{check:e.onCheck}},"TemplatePreview",n,!1))}))],2),e._v(" "),t("div",{staticClass:"templates-picker__buttons"},[t("button",{on:{click:e.close}},[e._v("\n\t\t\t\t"+e._s(e.t("files","Cancel"))+"\n\t\t\t")]),e._v(" "),t("input",{staticClass:"primary",attrs:{type:"submit","aria-label":e.t("files","Create a new file with the selected template")},domProps:{value:e.t("files","Create")}})])]),e._v(" "),e.loading?t("NcEmptyContent",{staticClass:"templates-picker__loading",attrs:{icon:"icon-loading"}},[e._v("\n\t\t"+e._s(e.t("files","Creating file"))+"\n\t")]):e._e()],1):e._e()}),[],!1,null,"55dd9121",null),G=z.exports;function Y(e,t,n,i,r,o,a){try{var l=e[o](a),s=l.value}catch(e){return void n(e)}l.done?t(s):Promise.resolve(s).then(i,r)}var H=(0,r.IY)().setApp("files").detectUser().build();p.ZP.mixin({methods:{t:a.translate,n:a.translatePlural}});var K=document.createElement("div");K.id="template-picker",document.body.appendChild(K);var J=(0,o.j)("files","templates",[]),X=(0,o.j)("files","templates_path",!1);H.debug("Templates providers",J),H.debug("Templates folder",{templatesPath:X});var ee=new(p.ZP.extend(G))({name:"TemplatePicker",propsData:{logger:H}});ee.$mount("#template-picker"),window.addEventListener("DOMContentLoaded",(function(){if(!X){H.debug("Templates folder not initialized");var e={attach:function(e){e.addMenuEntry({id:"template-init",displayName:(0,a.translate)("files","Set up templates folder"),templateName:(0,a.translate)("files","Templates"),iconClass:"icon-template-add",fileType:"file",actionHandler:function(t){ne(t),e.removeMenuEntry("template-init")}})}};OC.Plugins.register("OCA.Files.NewFileMenu",e)}})),J.forEach((function(e,t){var n={attach:function(n){var i=n.fileList;"files"!==i.id&&"files.public"!==i.id||n.addMenuEntry({id:"template-new-".concat(e.app,"-").concat(t),displayName:e.label,templateName:e.label+e.extension,iconClass:e.iconClass||"icon-file",fileType:"file",actionHandler:function(t){ee.open(t,e)}})}};OC.Plugins.register("OCA.Files.NewFileMenu",n)}));var te,ne=function(){var e,t=(e=regeneratorRuntime.mark((function e(t){var n,i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=(c()+"/".concat(t)).replace("//","/"),e.prev=1,H.debug("Initializing the templates directory",{templatePath:n}),e.next=5,u.default.post((0,l.generateOcsUrl)("apps/files/api/v1/templates/path"),{templatePath:n,copySystemTemplates:!0});case 5:i=e.sent,OCA.Files.App.currentFileList.changeDirectory(n,!0,!0),J=i.data.ocs.data.templates,X=i.data.ocs.data.template_path,e.next=15;break;case 11:e.prev=11,e.t0=e.catch(1),H.error("Unable to initialize the templates directory"),(0,f.x2)((0,a.translate)("files","Unable to initialize the templates directory"));case 15:case"end":return e.stop()}}),e,null,[[1,11]])})),function(){var t=this,n=arguments;return new Promise((function(i,r){var o=e.apply(t,n);function a(e){Y(o,i,r,a,l,"next",e)}function l(e){Y(o,i,r,a,l,"throw",e)}a(void 0)}))});return function(e){return t.apply(this,arguments)}}(),ie=i(78595);te={attach:function(e){var t=this;(0,ie.Ld)("nextcloud:unified-search.search",(function(t){var n=t.query;e.setFilter(n)})),(0,ie.Ld)("nextcloud:unified-search.reset",(function(){t.query=null,e.setFilter("")}))}},window.OC.Plugins.register("OCA.Files.FileList",te);var re=(0,r.IY)().setApp("files").detectUser().build();function oe(e){return oe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},oe(e)}function ae(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function le(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ae(Object(n),!0).forEach((function(t){se(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ae(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function se(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==oe(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t);if("object"!==oe(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"===oe(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ce=function(e){var t=e.id,n=e.name,i=e.order,r=e.icon,o=e.parent,a=e.classes,l=void 0===a?"":a,s=e.expanded,c=e.params;OCP.Files.Navigation.register({id:t,name:n,order:i,params:c,parent:o,expanded:!0===s,iconClass:r?"icon-".concat(r):"nav-icon-"+t,legacy:!0,sticky:l.includes("pinned")})},ue=i(41487),pe=i.n(ue);function de(e){return de="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},de(e)}function fe(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,ve(i.key),i)}}function me(e,t,n){return(t=ve(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ve(e){var t=function(e,t){if("object"!==de(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t);if("object"!==de(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"===de(t)?t:String(t)}var ge=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),me(this,"_views",[]),me(this,"_currentView",null),re.debug("Navigation service initialized")}var t,n;return t=e,(n=[{key:"register",value:function(e){try{Ae(e),he(e,this._views)}catch(t){throw t instanceof Error&&re.error(t.message,{view:e}),t}e.legacy&&re.warn("Legacy view detected, please migrate to Vue"),e.iconClass&&(e.legacy=!0),this._views.push(e)}},{key:"views",get:function(){return this._views}},{key:"setActive",value:function(e){this._currentView=e}},{key:"active",get:function(){return this._currentView}}])&&fe(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}(),he=function(e,t){if(t.find((function(t){return t.id===e.id})))throw new Error("Navigation id ".concat(e.id," is already registered"));return!0},Ae=function(e){if(!e.id||"string"!=typeof e.id)throw new Error("Navigation id is required and must be a string");if(!e.name||"string"!=typeof e.name)throw new Error("Navigation name is required and must be a string");if(!e.legacy){if(!e.getFiles||"function"!=typeof e.getFiles)throw new Error("Navigation getFiles is required and must be a function");if(!e.icon||"string"!=typeof e.icon||!pe()(e.icon))throw new Error("Navigation icon is required and must be a valid svg string")}if(!("order"in e)||"number"!=typeof e.order)throw new Error("Navigation order is required and must be a number");if(e.columns&&e.columns.forEach(ye),e.emptyView&&"function"!=typeof e.emptyView)throw new Error("Navigation emptyView must be a function");if(e.parent&&"string"!=typeof e.parent)throw new Error("Navigation parent must be a string");if("sticky"in e&&"boolean"!=typeof e.sticky)throw new Error("Navigation sticky must be a boolean");if("expanded"in e&&"boolean"!=typeof e.expanded)throw new Error("Navigation expanded must be a boolean");return!0},ye=function(e){if(!e.id||"string"!=typeof e.id)throw new Error("Column id is required");if(!e.title||"string"!=typeof e.title)throw new Error("Column title is required");if(!e.property||"string"!=typeof e.property)throw new Error("Column property is required");if(e.sortFunction&&"function"!=typeof e.sortFunction)throw new Error("Column sortFunction must be a function");if(e.summary&&"function"!=typeof e.summary)throw new Error("Column summary must be a function");return!0},be=i(57638),we=i(55209),Ce=i.n(we),_e=i(14032),ke=i.n(_e),Oe=i(68988),Se=i.n(Oe),xe=i(16809),Pe=i.n(xe),je=i(20571),Ee=i.n(je),Ne=i(36029),Fe=i.n(Ne),Te={name:"Setting",props:{el:{type:Function,required:!0}},mounted:function(){this.$el.appendChild(this.el())}},De=(0,Z.Z)(Te,(function(){return(0,this._self._c)("div")}),[],!1,null,null,null).exports;function Ie(e){return Ie="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ie(e)}function Be(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function Ue(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Be(Object(n),!0).forEach((function(t){Ve(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Be(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ve(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==Ie(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t);if("object"!==Ie(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"===Ie(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Ze=(0,o.j)("files","config",{show_hidden:!1,crop_image_previews:!0}),Me={name:"Settings",components:{NcAppSettingsDialog:Se(),NcAppSettingsSection:Pe(),NcCheckboxRadioSwitch:Ee(),NcInputField:Fe(),Setting:De},props:{open:{type:Boolean,default:!1}},data:function(){var e,t,n,i;return Ue(Ue({},Ze),{},{settings:(null===(e=window.OCA)||void 0===e||null===(t=e.Files)||void 0===t||null===(n=t.Settings)||void 0===n?void 0:n.settings)||[],webdavUrl:(0,l.generateRemoteUrl)("dav/files/"+encodeURIComponent(null===(i=(0,s.ts)())||void 0===i?void 0:i.uid)),webdavDocs:"https://docs.nextcloud.com/server/stable/go.php?to=user-webdav"})},beforeMount:function(){this.settings.forEach((function(e){return e.open()}))},beforeDestroy:function(){this.settings.forEach((function(e){return e.close()}))},methods:{onClose:function(){this.$emit("close")},setConfig:function(e,t){(0,ie.j8)("files:config:updated",{key:e,value:t}),u.default.post((0,l.generateUrl)("/apps/files/api/v1/config/"+e),{value:t})},t:a.translate}},qe=Me,Re=(0,Z.Z)(qe,(function(){var e=this,t=e._self._c;return t("NcAppSettingsDialog",{attrs:{open:e.open,"show-navigation":!0,title:e.t("files","Files settings")},on:{"update:open":e.onClose}},[t("NcAppSettingsSection",{attrs:{id:"settings",title:e.t("files","Files settings")}},[t("NcCheckboxRadioSwitch",{attrs:{checked:e.show_hidden},on:{"update:checked":[function(t){e.show_hidden=t},function(t){return e.setConfig("show_hidden",t)}]}},[e._v("\n\t\t\t"+e._s(e.t("files","Show hidden files"))+"\n\t\t")]),e._v(" "),t("NcCheckboxRadioSwitch",{attrs:{checked:e.crop_image_previews},on:{"update:checked":[function(t){e.crop_image_previews=t},function(t){return e.setConfig("crop_image_previews",t)}]}},[e._v("\n\t\t\t"+e._s(e.t("files","Crop image previews"))+"\n\t\t")])],1),e._v(" "),0!==e.settings.length?t("NcAppSettingsSection",{attrs:{id:"more-settings",title:e.t("files","Additional settings")}},[e._l(e.settings,(function(e){return[t("Setting",{key:e.name,attrs:{el:e.el}})]}))],2):e._e(),e._v(" "),t("NcAppSettingsSection",{attrs:{id:"webdav",title:e.t("files","Webdav")}},[t("NcInputField",{attrs:{type:"text",readonly:"readonly",value:e.webdavUrl}}),e._v(" "),t("em",[t("a",{attrs:{href:e.webdavDocs,target:"_blank",rel:"noreferrer noopener"}},[e._v("\n\t\t\t\t"+e._s(e.t("files","Use this address to access your Files via WebDAV"))+" ↗\n\t\t\t")])])],1)],1)}),[],!1,null,"1f10b559",null).exports;function Le(e){return Le="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Le(e)}function We(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function Qe(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?We(Object(n),!0).forEach((function(t){$e(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):We(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function $e(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==Le(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t);if("object"!==Le(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"===Le(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ze(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}var Ge={name:"Navigation",components:{Cog:be.default,NcAppNavigation:Ce(),NcAppNavigationItem:ke(),SettingsModal:Re},props:{Navigation:{type:ge,required:!0}},data:function(){return{settingsOpened:!1}},computed:{currentViewId:function(){var e,t;return(null===(e=this.$route)||void 0===e||null===(t=e.params)||void 0===t?void 0:t.view)||"files"},currentView:function(){var e=this;return this.views.find((function(t){return t.id===e.currentViewId}))},views:function(){return this.Navigation.views},parentViews:function(){return this.views.filter((function(e){return!e.parent})).sort((function(e,t){return e.order-t.order}))},childViews:function(){return this.views.filter((function(e){return!!e.parent})).reduce((function(e,t){return e[t.parent]=[].concat(function(e){if(Array.isArray(e))return ze(e)}(n=e[t.parent]||[])||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(n)||function(e,t){if(e){if("string"==typeof e)return ze(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ze(e,t):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.")}(),[t]),e[t.parent].sort((function(e,t){return e.order-t.order})),e;var n}),{})}},watch:{currentView:function(e,t){re.debug("View changed",{id:e.id,view:e}),this.showView(e,t)}},beforeMount:function(){this.currentView&&(re.debug("Navigation mounted. Showing requested view",{view:this.currentView}),this.showView(this.currentView)),(0,ie.Ld)("files:legacy-navigation:changed",this.onLegacyNavigationChanged)},methods:{showView:function(e,t){var n,i,r,o,a;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),e.legacy){var l=document.querySelector("#app-content #app-content-"+this.currentView.id+".viewcontainer");document.querySelectorAll("#app-content .viewcontainer").forEach((function(e){e.classList.add("hidden")})),l.classList.remove("hidden");var s=OC.Util.History.parseUrlQuery().dir,c=void 0===s?"/":s,u={itemId:e.id,dir:c};re.debug("Triggering legacy navigation event",u),window.jQuery(l).trigger(new window.jQuery.Event("show",u)),window.jQuery(l).trigger(new window.jQuery.Event("urlChanged",u))}this.Navigation.setActive(e),(0,ie.j8)("files:navigation:changed",e)},onLegacyNavigationChanged:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{id:"files"},t=e.id,n=this.Navigation.views.find((function(e){return e.id===t}));n&&n.legacy&&n.id!==this.currentView.id&&(this.$router.replace(Qe(Qe({},this.$route),{},{params:{view:n.id}})),this.Navigation.setActive(n),this.showView(n))},onToggleExpand:function(e){e.expanded=!e.expanded,u.default.post((0,l.generateUrl)("/apps/files/api/v1/toggleShowFolder/".concat(e.id)),{show:e.expanded})},generateToNavigation:function(e){if(e.params){var t=e.params,n=t.dir,i=t.fileid;return{name:"filelist",params:e.params,query:{dir:n,fileid:i}}}return{name:"filelist",params:{view:e.id}}},openSettings:function(){this.settingsOpened=!0},onSettingsClose:function(){this.settingsOpened=!1},t:a.translate}},Ye=Ge,He=i(97702),Ke={};Ke.styleTagTransform=B(),Ke.setAttributes=F(),Ke.insert=E().bind(null,"head"),Ke.domAPI=P(),Ke.insertStyleElement=D(),S()(He.Z,Ke),He.Z&&He.Z.locals&&He.Z.locals;var Je=(0,Z.Z)(Ye,(function(){var e=this,t=e._self._c;return t("NcAppNavigation",{attrs:{"data-cy-files-navigation":""},scopedSlots:e._u([{key:"list",fn:function(){return e._l(e.parentViews,(function(n){return t("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:e.generateToNavigation(n)},on:{"update:open":function(t){return e.onToggleExpand(t,n)}}},e._l(e.childViews[n.id],(function(n){return t("NcAppNavigationItem",{key:n.id,attrs:{"data-cy-files-navigation-item":n.id,exact:!0,icon:n.iconClass,title:n.name,to:e.generateToNavigation(n)}})})),1)}))},proxy:!0},{key:"footer",fn:function(){return[t("ul",{staticClass:"app-navigation-entry__settings"},[t("NcAppNavigationItem",{attrs:{"aria-label":e.t("files","Open the files app settings"),title:e.t("files","Files settings"),"data-cy-files-navigation-settings-button":""},on:{click:function(t){return t.preventDefault(),t.stopPropagation(),e.openSettings.apply(null,arguments)}}},[t("Cog",{attrs:{slot:"icon",size:20},slot:"icon"})],1)],1)]},proxy:!0}])},[e._v(" "),e._v(" "),t("SettingsModal",{attrs:{open:e.settingsOpened,"data-cy-files-navigation-settings":""},on:{close:e.onSettingsClose}})],1)}),[],!1,null,"527f6b74",null),Xe=Je.exports;function et(e){return et="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},et(e)}function tt(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,nt(i.key),i)}}function nt(e){var t=function(e,t){if("object"!==et(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t);if("object"!==et(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"===et(t)?t:String(t)}var it=function(){function e(){var t,n,i;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t=this,i=void 0,(n=nt(n="_settings"))in t?Object.defineProperty(t,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[n]=i,this._settings=[],console.debug("OCA.Files.Settings initialized")}var t,n;return t=e,(n=[{key:"register",value:function(e){return this._settings.filter((function(t){return t.name===e.name})).length>0?(console.error("A setting with the same name is already registered"),!1):(this._settings.push(e),!0)}},{key:"settings",get:function(){return this._settings}}])&&tt(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function rt(e){return rt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},rt(e)}function ot(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,lt(i.key),i)}}function at(e,t,n){return(t=lt(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function lt(e){var t=function(e,t){if("object"!==rt(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t);if("object"!==rt(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"===rt(t)?t:String(t)}var st=function(){function e(t,n){var i=n.el,r=n.open,o=n.close;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),at(this,"_close",void 0),at(this,"_el",void 0),at(this,"_name",void 0),at(this,"_open",void 0),this._name=t,this._el=i,this._open=r,this._close=o,"function"!=typeof this._open&&(this._open=function(){}),"function"!=typeof this._close&&(this._close=function(){})}var t,n;return t=e,(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}}])&&ot(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}(),ct=i(78345),ut=i(17563);p.ZP.use(ct.Z);var pt,dt,ft=new ct.Z({mode:"history",base:(0,l.generateUrl)("/apps/files",""),linkActiveClass:"active",routes:[{path:"/",alias:"/files"},{path:"/:view/:fileid?",name:"filelist",props:!0}],stringifyQuery:function(e){var t=(0,ut.stringify)(e).replace(/%2F/gim,"/");return t?"?"+t:""}});window.OCA.Files=null!==(pt=window.OCA.Files)&&void 0!==pt?pt:{},window.OCP.Files=null!==(dt=window.OCP.Files)&&void 0!==dt?dt:{};var mt=new ge;Object.assign(window.OCP.Files,{Navigation:mt});var vt,gt=new it;Object.assign(window.OCA.Files,{Settings:gt}),Object.assign(window.OCA.Files.Settings,{Setting:st}),new(p.ZP.extend(Xe))({name:"FilesNavigationRoot",propsData:{Navigation:mt},router:ft}).$mount("#app-navigation-files"),(vt=Object.values((0,o.j)("files","navigation",{}))).length>0&&(re.debug("Legacy files views detected. Processing...",vt),vt.forEach((function(e){ce(e),e.sublist&&e.sublist.forEach((function(t){return ce(le(le({},t),{},{parent:e.id}))}))})))},87027:function(e,t,n){var i=n(87537),r=n.n(i),o=n(23645),a=n.n(o)()(r());a.push([e.id,".template-picker__item[data-v-440aea22]{display:flex}.template-picker__label[data-v-440aea22]{display:flex;align-items:center;flex:1 1;flex-direction:column}.template-picker__label[data-v-440aea22],.template-picker__label *[data-v-440aea22]{cursor:pointer;user-select:none}.template-picker__label[data-v-440aea22]::before{display:none !important}.template-picker__preview[data-v-440aea22]{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-440aea22]{border-color:var(--color-primary)}.template-picker__preview--failed[data-v-440aea22]{display:flex}.template-picker__image[data-v-440aea22]{max-width:100%;background-color:var(--color-main-background);object-fit:cover}.template-picker__preview--failed .template-picker__image[data-v-440aea22]{width:calc(var(--margin)*8);margin:auto;background-color:rgba(0,0,0,0) !important;object-fit:initial}.template-picker__title[data-v-440aea22]{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:""}]),t.Z=a},97702:function(e,t,n){var i=n(87537),r=n.n(i),o=n(23645),a=n.n(o)()(r());a.push([e.id,".app-navigation[data-v-527f6b74] .app-navigation-entry-icon{background-repeat:no-repeat;background-position:center}.app-navigation>ul.app-navigation__list[data-v-527f6b74]{padding-bottom:var(--default-grid-baseline, 4px)}.app-navigation-entry__settings[data-v-527f6b74]{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:""}]),t.Z=a},74502:function(e,t,n){var i=n(87537),r=n.n(i),o=n(23645),a=n.n(o)()(r());a.push([e.id,".templates-picker__form[data-v-55dd9121]{padding:calc(var(--margin)*2);padding-bottom:0}.templates-picker__form h2[data-v-55dd9121]{text-align:center;font-weight:bold;margin:var(--margin) 0 calc(var(--margin)*2)}.templates-picker__list[data-v-55dd9121]{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-55dd9121]{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-55dd9121],.templates-picker__buttons input[type=submit][data-v-55dd9121]{height:44px}.templates-picker[data-v-55dd9121] .modal-container{position:relative}.templates-picker__loading[data-v-55dd9121]{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:""}]),t.Z=a}},i={};function r(e){var t=i[e];if(void 0!==t)return t.exports;var o=i[e]={id:e,loaded:!1,exports:{}};return n[e].call(o.exports,o,o.exports,r),o.loaded=!0,o.exports}r.m=n,r.amdD=function(){throw new Error("define cannot be used indirect")},r.amdO={},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 l=!0,s=0;s<n.length;s++)(!1&o||a>=o)&&Object.keys(r.O).every((function(e){return r.O[e](n[s])}))?n.splice(s--,1):(l=!1,o<a&&(a=o));if(l){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(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,{a:t}),t},r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.nmd=function(e){return e.paths=[],e.children||(e.children=[]),e},r.j=2181,function(){r.b=document.baseURI||self.location.href;var e={2181:0};r.O.j=function(t){return 0===e[t]};var t=function(t,n){var i,o,a=n[0],l=n[1],s=n[2],c=0;if(a.some((function(t){return 0!==e[t]}))){for(i in l)r.o(l,i)&&(r.m[i]=l[i]);if(s)var u=s(r)}for(t&&t(n);c<a.length;c++)o=a[c],r.o(e,o)&&e[o]&&e[o][0](),e[o]=0;return r.O(u)},n=self.webpackChunknextcloud=self.webpackChunknextcloud||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))}(),r.nc=void 0;var o=r.O(void 0,[7874],(function(){return r(71925)}));o=r.O(o)}();
-//# sourceMappingURL=files-main.js.map?v=024e81d0e065896d0b30
\ No newline at end of file
+!function(){"use strict";var e,n={86203:function(e,n,i){var r=i(17499),o=i(79954),a=i(9944),l=i(79753),s=i(45994),c=function(){var e,t,n,i,r=(null===(e=OCA)||void 0===e||null===(t=e.Files)||void 0===t||null===(n=t.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),p=i(20144),d=i(62520),f=i(26932),m=i(93455),v=i.n(m),g=i(70110),h=i.n(g);function A(e,t,n,i,r,o,a){try{var l=e[o](a),s=l.value}catch(e){return void n(e)}l.done?t(s):Promise.resolve(s).then(i,r)}function b(e){return function(){var t=this,n=arguments;return new Promise((function(i,r){var o=e.apply(t,n);function a(e){A(o,i,r,a,l,"next",e)}function l(e){A(o,i,r,a,l,"throw",e)}a(void 0)}))}}var y=function(){var e=b(regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,u.default.get((0,l.generateOcsUrl)("apps/files/api/v1/templates"));case 2:return t=e.sent,e.abrupt("return",t.data.ocs.data);case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),w=function(){var e=b(regeneratorRuntime.mark((function e(t,n,i){var r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,u.default.post((0,l.generateOcsUrl)("apps/files/api/v1/templates/create"),{filePath:t,templatePath:n,templateType:i});case 2:return r=e.sent,e.abrupt("return",r.data.ocs.data);case 4:case"end":return e.stop()}}),e)})));return function(t,n,i){return e.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,s.ts)()?(0,l.generateUrl)("/core/preview?fileId=".concat(this.fileid,"&x=").concat(C,"&y=").concat(C,"&a=1")):(0,l.generateUrl)("/apps/files_sharing/publicpreview/".concat(document.getElementById("sharingToken")&&document.getElementById("sharingToken").value,"?fileId=").concat(this.fileid,"&file=").concat(function(e){var t=(e.startsWith("/")?e:"/".concat(e)).split("/"),n="";return t.forEach((function(e){""!==e&&(n+="/"+encodeURIComponent(e))})),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}}},k=_,O=i(93379),x=i.n(O),S=i(7795),P=i.n(S),j=i(90569),E=i.n(j),N=i(3565),F=i.n(N),T=i(19216),D=i.n(T),I=i(44589),B=i.n(I),U=i(87027),Z={};Z.styleTagTransform=B(),Z.setAttributes=F(),Z.insert=E().bind(null,"head"),Z.domAPI=P(),Z.insertStyleElement=D(),x()(U.Z,Z),U.Z&&U.Z.locals&&U.Z.locals;var V=i(51900),q=(0,V.Z)(k,(function(){var e=this,t=e._self._c;return t("li",{staticClass:"template-picker__item"},[t("input",{staticClass:"radio",attrs:{id:e.id,type:"radio",name:"template-picker"},domProps:{checked:e.checked},on:{change:e.onCheck}}),e._v(" "),t("label",{staticClass:"template-picker__label",attrs:{for:e.id}},[t("div",{staticClass:"template-picker__preview",class:e.failedPreview?"template-picker__preview--failed":""},[t("img",{staticClass:"template-picker__image",attrs:{src:e.realPreviewUrl,alt:"",draggable:"false"},on:{error:e.onFailure}})]),e._v(" "),t("span",{staticClass:"template-picker__title"},[e._v("\n\t\t\t"+e._s(e.nameWithoutExt)+"\n\t\t")])])])}),[],!1,null,"440aea22",null).exports;function M(e,t,n,i,r,o,a){try{var l=e[o](a),s=l.value}catch(e){return void n(e)}l.done?t(s):Promise.resolve(s).then(i,r)}function R(e){return function(){var t=this,n=arguments;return new Promise((function(i,r){var o=e.apply(t,n);function a(e){M(o,i,r,a,l,"next",e)}function l(e){M(o,i,r,a,l,"throw",e)}a(void 0)}))}}var L={name:"TemplatePicker",components:{NcEmptyContent:v(),NcModal:h(),TemplatePreview:q},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 e=this;return this.provider.templates.find((function(t){return t.fileid===e.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(e,t){var n=this;return R(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=e,n.provider=t,i.next=5,y();case 5:if(r=i.sent,null!==(o=r.find((function(e){return e.app===t.app&&e.label===t.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(e){this.checked=e},onSubmit:function(){var e=this;return R(regeneratorRuntime.mark((function t(){var n,i,r,o,a,l,s,u,p,m,v,g,h;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e.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,e.nameWithoutExt===e.name&&(e.logger.debug("Fixed invalid filename",{name:e.name,extension:null===(l=e.provider)||void 0===l?void 0:l.extension}),e.name=e.name+(null===(s=e.provider)||void 0===s?void 0:s.extension)),t.prev=4,t.next=7,w((0,d.normalize)("".concat(o,"/").concat(e.name)),null===(u=e.selectedTemplate)||void 0===u?void 0:u.filename,null===(p=e.selectedTemplate)||void 0===p?void 0:p.templateType);case 7:return m=t.sent,e.logger.debug("Created new file",m),t.next=11,null==a?void 0:a.addAndFetchFileInfo(e.name).then((function(e,t){return t}));case 11:v=t.sent,g=new OCA.Files.FileInfoModel(v,{filesClient:null==a?void 0:a.filesClient}),(h=OCA.Files.fileActions.getDefaultFileAction(m.mime,"file",OC.PERMISSION_ALL))&&h.action(m.basename,{$file:null==a?void 0:a.findFileEl(e.name),dir:o,fileList:a,fileActions:null==a?void 0:a.fileActions,fileInfoModel:g}),e.close(),t.next=23;break;case 18:t.prev=18,t.t0=t.catch(4),e.logger.error("Error while creating the new file from template"),console.error(t.t0),(0,f.x2)(e.t("files","Unable to create new file from template"));case 23:return t.prev=23,e.loading=!1,t.finish(23);case 26:case"end":return t.stop()}}),t,null,[[4,18,23,26]])})))()}}},W=L,$=i(74502),z={};z.styleTagTransform=B(),z.setAttributes=F(),z.insert=E().bind(null,"head"),z.domAPI=P(),z.insertStyleElement=D(),x()($.Z,z),$.Z&&$.Z.locals&&$.Z.locals;var Q=(0,V.Z)(W,(function(){var e=this,t=e._self._c;return e.opened?t("NcModal",{staticClass:"templates-picker",attrs:{"clear-view-delay":-1,size:"normal"},on:{close:e.close}},[t("form",{staticClass:"templates-picker__form",style:e.style,on:{submit:function(t){return t.preventDefault(),t.stopPropagation(),e.onSubmit.apply(null,arguments)}}},[t("h2",[e._v(e._s(e.t("files","Pick a template for {name}",{name:e.nameWithoutExt})))]),e._v(" "),t("ul",{staticClass:"templates-picker__list"},[t("TemplatePreview",e._b({attrs:{checked:e.checked===e.emptyTemplate.fileid},on:{check:e.onCheck}},"TemplatePreview",e.emptyTemplate,!1)),e._v(" "),e._l(e.provider.templates,(function(n){return t("TemplatePreview",e._b({key:n.fileid,attrs:{checked:e.checked===n.fileid,ratio:e.provider.ratio},on:{check:e.onCheck}},"TemplatePreview",n,!1))}))],2),e._v(" "),t("div",{staticClass:"templates-picker__buttons"},[t("button",{on:{click:e.close}},[e._v("\n\t\t\t\t"+e._s(e.t("files","Cancel"))+"\n\t\t\t")]),e._v(" "),t("input",{staticClass:"primary",attrs:{type:"submit","aria-label":e.t("files","Create a new file with the selected template")},domProps:{value:e.t("files","Create")}})])]),e._v(" "),e.loading?t("NcEmptyContent",{staticClass:"templates-picker__loading",attrs:{icon:"icon-loading"}},[e._v("\n\t\t"+e._s(e.t("files","Creating file"))+"\n\t")]):e._e()],1):e._e()}),[],!1,null,"55dd9121",null),G=Q.exports;function Y(e,t,n,i,r,o,a){try{var l=e[o](a),s=l.value}catch(e){return void n(e)}l.done?t(s):Promise.resolve(s).then(i,r)}var H=(0,r.IY)().setApp("files").detectUser().build();p.ZP.mixin({methods:{t:a.translate,n:a.translatePlural}});var K=document.createElement("div");K.id="template-picker",document.body.appendChild(K);var J=(0,o.j)("files","templates",[]),X=(0,o.j)("files","templates_path",!1);H.debug("Templates providers",J),H.debug("Templates folder",{templatesPath:X});var ee=new(p.ZP.extend(G))({name:"TemplatePicker",propsData:{logger:H}});ee.$mount("#template-picker"),window.addEventListener("DOMContentLoaded",(function(){if(!X){H.debug("Templates folder not initialized");var e={attach:function(e){e.addMenuEntry({id:"template-init",displayName:(0,a.translate)("files","Set up templates folder"),templateName:(0,a.translate)("files","Templates"),iconClass:"icon-template-add",fileType:"file",actionHandler:function(t){ne(t),e.removeMenuEntry("template-init")}})}};OC.Plugins.register("OCA.Files.NewFileMenu",e)}})),J.forEach((function(e,t){var n={attach:function(n){var i=n.fileList;"files"!==i.id&&"files.public"!==i.id||n.addMenuEntry({id:"template-new-".concat(e.app,"-").concat(t),displayName:e.label,templateName:e.label+e.extension,iconClass:e.iconClass||"icon-file",fileType:"file",actionHandler:function(t){ee.open(t,e)}})}};OC.Plugins.register("OCA.Files.NewFileMenu",n)}));var te,ne=function(){var e,t=(e=regeneratorRuntime.mark((function e(t){var n,i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=(c()+"/".concat(t)).replace("//","/"),e.prev=1,H.debug("Initializing the templates directory",{templatePath:n}),e.next=5,u.default.post((0,l.generateOcsUrl)("apps/files/api/v1/templates/path"),{templatePath:n,copySystemTemplates:!0});case 5:i=e.sent,OCA.Files.App.currentFileList.changeDirectory(n,!0,!0),J=i.data.ocs.data.templates,X=i.data.ocs.data.template_path,e.next=15;break;case 11:e.prev=11,e.t0=e.catch(1),H.error("Unable to initialize the templates directory"),(0,f.x2)((0,a.translate)("files","Unable to initialize the templates directory"));case 15:case"end":return e.stop()}}),e,null,[[1,11]])})),function(){var t=this,n=arguments;return new Promise((function(i,r){var o=e.apply(t,n);function a(e){Y(o,i,r,a,l,"next",e)}function l(e){Y(o,i,r,a,l,"throw",e)}a(void 0)}))});return function(e){return t.apply(this,arguments)}}(),ie=i(78595);te={attach:function(e){var t=this;(0,ie.Ld)("nextcloud:unified-search.search",(function(t){var n=t.query;e.setFilter(n)})),(0,ie.Ld)("nextcloud:unified-search.reset",(function(){t.query=null,e.setFilter("")}))}},window.OC.Plugins.register("OCA.Files.FileList",te);var re=(0,r.IY)().setApp("files").detectUser().build();function oe(e){return oe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},oe(e)}function ae(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function le(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ae(Object(n),!0).forEach((function(t){se(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ae(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function se(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==oe(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t);if("object"!==oe(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"===oe(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ce=function(e){var t=e.id,n=e.name,i=e.order,r=e.icon,o=e.parent,a=e.classes,l=void 0===a?"":a,s=e.expanded,c=e.params;OCP.Files.Navigation.register({id:t,name:n,order:i,params:c,parent:o,expanded:!0===s,iconClass:r?"icon-".concat(r):"nav-icon-"+t,legacy:!0,sticky:l.includes("pinned")})},ue=i(41487),pe=i.n(ue);function de(e){return de="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},de(e)}function fe(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,ve(i.key),i)}}function me(e,t,n){return(t=ve(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ve(e){var t=function(e,t){if("object"!==de(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t);if("object"!==de(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"===de(t)?t:String(t)}var ge=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),me(this,"_views",[]),me(this,"_currentView",null),re.debug("Navigation service initialized")}var t,n;return t=e,(n=[{key:"register",value:function(e){try{Ae(e),he(e,this._views)}catch(t){throw t instanceof Error&&re.error(t.message,{view:e}),t}e.legacy&&re.warn("Legacy view detected, please migrate to Vue"),e.iconClass&&(e.legacy=!0),this._views.push(e)}},{key:"views",get:function(){return this._views}},{key:"setActive",value:function(e){this._currentView=e}},{key:"active",get:function(){return this._currentView}}])&&fe(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}(),he=function(e,t){if(t.find((function(t){return t.id===e.id})))throw new Error("Navigation id ".concat(e.id," is already registered"));return!0},Ae=function(e){if(!e.id||"string"!=typeof e.id)throw new Error("Navigation id is required and must be a string");if(!e.name||"string"!=typeof e.name)throw new Error("Navigation name is required and must be a string");if(!e.legacy){if(!e.getFiles||"function"!=typeof e.getFiles)throw new Error("Navigation getFiles is required and must be a function");if(!e.icon||"string"!=typeof e.icon||!pe()(e.icon))throw new Error("Navigation icon is required and must be a valid svg string")}if(!("order"in e)||"number"!=typeof e.order)throw new Error("Navigation order is required and must be a number");if(e.columns&&e.columns.forEach(be),e.emptyView&&"function"!=typeof e.emptyView)throw new Error("Navigation emptyView must be a function");if(e.parent&&"string"!=typeof e.parent)throw new Error("Navigation parent must be a string");if("sticky"in e&&"boolean"!=typeof e.sticky)throw new Error("Navigation sticky must be a boolean");if("expanded"in e&&"boolean"!=typeof e.expanded)throw new Error("Navigation expanded must be a boolean");return!0},be=function(e){if(!e.id||"string"!=typeof e.id)throw new Error("Column id is required");if(!e.title||"string"!=typeof e.title)throw new Error("Column title is required");if(!e.property||"string"!=typeof e.property)throw new Error("Column property is required");if(e.sortFunction&&"function"!=typeof e.sortFunction)throw new Error("Column sortFunction must be a function");if(e.summary&&"function"!=typeof e.summary)throw new Error("Column summary must be a function");return!0},ye=i(57638),we=i(55209),Ce=i.n(we),_e=i(14032),ke=i.n(_e),Oe=i(68988),xe=i.n(Oe),Se=i(16809),Pe=i.n(Se),je=i(20571),Ee=i.n(je),Ne=i(70386),Fe=i(36029),Te=i.n(Fe),De={name:"Setting",props:{el:{type:Function,required:!0}},mounted:function(){this.$el.appendChild(this.el())}},Ie=(0,V.Z)(De,(function(){return(0,this._self._c)("div")}),[],!1,null,null,null).exports;function Be(e){return Be="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Be(e)}function Ue(e,t,n,i,r,o,a){try{var l=e[o](a),s=l.value}catch(e){return void n(e)}l.done?t(s):Promise.resolve(s).then(i,r)}function Ze(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function Ve(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ze(Object(n),!0).forEach((function(t){qe(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ze(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function qe(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==Be(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t);if("object"!==Be(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"===Be(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Me=(0,o.j)("files","config",{show_hidden:!1,crop_image_previews:!0}),Re={name:"Settings",components:{Clipboard:Ne.Z,NcAppSettingsDialog:xe(),NcAppSettingsSection:Pe(),NcCheckboxRadioSwitch:Ee(),NcInputField:Te(),Setting:Ie},props:{open:{type:Boolean,default:!1}},data:function(){var e,t,n,i;return Ve(Ve({},Me),{},{settings:(null===(e=window.OCA)||void 0===e||null===(t=e.Files)||void 0===t||null===(n=t.Settings)||void 0===n?void 0:n.settings)||[],webdavUrl:(0,l.generateRemoteUrl)("dav/files/"+encodeURIComponent(null===(i=(0,s.ts)())||void 0===i?void 0:i.uid)),webdavDocs:"https://docs.nextcloud.com/server/stable/go.php?to=user-webdav",webdavUrlCopied:!1})},beforeMount:function(){this.settings.forEach((function(e){return e.open()}))},beforeDestroy:function(){this.settings.forEach((function(e){return e.close()}))},methods:{onClose:function(){this.$emit("close")},setConfig:function(e,t){(0,ie.j8)("files:config:updated",{key:e,value:t}),u.default.post((0,l.generateUrl)("/apps/files/api/v1/config/"+e),{value:t})},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,f.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,f.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(e){Ue(o,i,r,a,l,"next",e)}function l(e){Ue(o,i,r,a,l,"throw",e)}a(void 0)}))})()},t:a.translate}},Le=Re,We=(0,V.Z)(Le,(function(){var e=this,t=e._self._c;return t("NcAppSettingsDialog",{attrs:{open:e.open,"show-navigation":!0,title:e.t("files","Files settings")},on:{"update:open":e.onClose}},[t("NcAppSettingsSection",{attrs:{id:"settings",title:e.t("files","Files settings")}},[t("NcCheckboxRadioSwitch",{attrs:{checked:e.show_hidden},on:{"update:checked":[function(t){e.show_hidden=t},function(t){return e.setConfig("show_hidden",t)}]}},[e._v("\n\t\t\t"+e._s(e.t("files","Show hidden files"))+"\n\t\t")]),e._v(" "),t("NcCheckboxRadioSwitch",{attrs:{checked:e.crop_image_previews},on:{"update:checked":[function(t){e.crop_image_previews=t},function(t){return e.setConfig("crop_image_previews",t)}]}},[e._v("\n\t\t\t"+e._s(e.t("files","Crop image previews"))+"\n\t\t")])],1),e._v(" "),0!==e.settings.length?t("NcAppSettingsSection",{attrs:{id:"more-settings",title:e.t("files","Additional settings")}},[e._l(e.settings,(function(e){return[t("Setting",{key:e.name,attrs:{el:e.el}})]}))],2):e._e(),e._v(" "),t("NcAppSettingsSection",{attrs:{id:"webdav",title:e.t("files","Webdav")}},[t("NcInputField",{attrs:{id:"webdav-url-input","show-trailing-button":!0,success:e.webdavUrlCopied,"trailing-button-label":e.t("files","Copy to clipboard"),value:e.webdavUrl,readonly:"readonly",type:"url"},on:{focus:function(e){return e.target.select()},"trailing-button-click":e.copyCloudId},scopedSlots:e._u([{key:"trailing-button-icon",fn:function(){return[t("Clipboard",{attrs:{size:20}})]},proxy:!0}])}),e._v(" "),t("em",[t("a",{attrs:{href:e.webdavDocs,target:"_blank",rel:"noreferrer noopener"}},[e._v("\n\t\t\t\t"+e._s(e.t("files","Use this address to access your Files via WebDAV"))+" ↗\n\t\t\t")])])],1)],1)}),[],!1,null,"5313d0ff",null).exports;function $e(e){return $e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},$e(e)}function ze(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function Qe(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ze(Object(n),!0).forEach((function(t){Ge(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ze(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ge(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==$e(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t);if("object"!==$e(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"===$e(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ye(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}var He={name:"Navigation",components:{Cog:ye.default,NcAppNavigation:Ce(),NcAppNavigationItem:ke(),SettingsModal:We},props:{Navigation:{type:ge,required:!0}},data:function(){return{settingsOpened:!1}},computed:{currentViewId:function(){var e,t;return(null===(e=this.$route)||void 0===e||null===(t=e.params)||void 0===t?void 0:t.view)||"files"},currentView:function(){var e=this;return this.views.find((function(t){return t.id===e.currentViewId}))},views:function(){return this.Navigation.views},parentViews:function(){return this.views.filter((function(e){return!e.parent})).sort((function(e,t){return e.order-t.order}))},childViews:function(){return this.views.filter((function(e){return!!e.parent})).reduce((function(e,t){return e[t.parent]=[].concat(function(e){if(Array.isArray(e))return Ye(e)}(n=e[t.parent]||[])||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(n)||function(e,t){if(e){if("string"==typeof e)return Ye(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ye(e,t):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.")}(),[t]),e[t.parent].sort((function(e,t){return e.order-t.order})),e;var n}),{})}},watch:{currentView:function(e,t){re.debug("View changed",{id:e.id,view:e}),this.showView(e,t)}},beforeMount:function(){this.currentView&&(re.debug("Navigation mounted. Showing requested view",{view:this.currentView}),this.showView(this.currentView)),(0,ie.Ld)("files:legacy-navigation:changed",this.onLegacyNavigationChanged)},methods:{showView:function(e,t){var n,i,r,o,a;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),e.legacy){var l=document.querySelector("#app-content #app-content-"+this.currentView.id+".viewcontainer");document.querySelectorAll("#app-content .viewcontainer").forEach((function(e){e.classList.add("hidden")})),l.classList.remove("hidden");var s=OC.Util.History.parseUrlQuery().dir,c=void 0===s?"/":s,u={itemId:e.id,dir:c};re.debug("Triggering legacy navigation event",u),window.jQuery(l).trigger(new window.jQuery.Event("show",u)),window.jQuery(l).trigger(new window.jQuery.Event("urlChanged",u))}this.Navigation.setActive(e),(0,ie.j8)("files:navigation:changed",e)},onLegacyNavigationChanged:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{id:"files"},t=e.id,n=this.Navigation.views.find((function(e){return e.id===t}));n&&n.legacy&&n.id!==this.currentView.id&&(this.$router.replace(Qe(Qe({},this.$route),{},{params:{view:n.id}})),this.Navigation.setActive(n),this.showView(n))},onToggleExpand:function(e){e.expanded=!e.expanded,u.default.post((0,l.generateUrl)("/apps/files/api/v1/toggleShowFolder/".concat(e.id)),{show:e.expanded})},generateToNavigation:function(e){if(e.params){var t=e.params,n=t.dir,i=t.fileid;return{name:"filelist",params:e.params,query:{dir:n,fileid:i}}}return{name:"filelist",params:{view:e.id}}},openSettings:function(){this.settingsOpened=!0},onSettingsClose:function(){this.settingsOpened=!1},t:a.translate}},Ke=He,Je=i(32345),Xe={};Xe.styleTagTransform=B(),Xe.setAttributes=F(),Xe.insert=E().bind(null,"head"),Xe.domAPI=P(),Xe.insertStyleElement=D(),x()(Je.Z,Xe),Je.Z&&Je.Z.locals&&Je.Z.locals;var et=(0,V.Z)(Ke,(function(){var e=this,t=e._self._c;return t("NcAppNavigation",{attrs:{"data-cy-files-navigation":""},scopedSlots:e._u([{key:"list",fn:function(){return e._l(e.parentViews,(function(n){return t("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:e.generateToNavigation(n)},on:{"update:open":function(t){return e.onToggleExpand(n)}}},e._l(e.childViews[n.id],(function(n){return t("NcAppNavigationItem",{key:n.id,attrs:{"data-cy-files-navigation-item":n.id,exact:!0,icon:n.iconClass,title:n.name,to:e.generateToNavigation(n)}})})),1)}))},proxy:!0},{key:"footer",fn:function(){return[t("ul",{staticClass:"app-navigation-entry__settings"},[t("NcAppNavigationItem",{attrs:{"aria-label":e.t("files","Open the files app settings"),title:e.t("files","Files settings"),"data-cy-files-navigation-settings-button":""},on:{click:function(t){return t.preventDefault(),t.stopPropagation(),e.openSettings.apply(null,arguments)}}},[t("Cog",{attrs:{slot:"icon",size:20},slot:"icon"})],1)],1)]},proxy:!0}])},[e._v(" "),e._v(" "),t("SettingsModal",{attrs:{open:e.settingsOpened,"data-cy-files-navigation-settings":""},on:{close:e.onSettingsClose}})],1)}),[],!1,null,"0a069b20",null),tt=et.exports;function nt(e){return nt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},nt(e)}function it(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,rt(i.key),i)}}function rt(e){var t=function(e,t){if("object"!==nt(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t);if("object"!==nt(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"===nt(t)?t:String(t)}var ot=function(){function e(){var t,n,i;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t=this,i=void 0,(n=rt(n="_settings"))in t?Object.defineProperty(t,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[n]=i,this._settings=[],console.debug("OCA.Files.Settings initialized")}var t,n;return t=e,(n=[{key:"register",value:function(e){return this._settings.filter((function(t){return t.name===e.name})).length>0?(console.error("A setting with the same name is already registered"),!1):(this._settings.push(e),!0)}},{key:"settings",get:function(){return this._settings}}])&&it(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function at(e){return at="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},at(e)}function lt(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,ct(i.key),i)}}function st(e,t,n){return(t=ct(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ct(e){var t=function(e,t){if("object"!==at(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t);if("object"!==at(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"===at(t)?t:String(t)}var ut=function(){function e(t,n){var i=n.el,r=n.open,o=n.close;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),st(this,"_close",void 0),st(this,"_el",void 0),st(this,"_name",void 0),st(this,"_open",void 0),this._name=t,this._el=i,this._open=r,this._close=o,"function"!=typeof this._open&&(this._open=function(){}),"function"!=typeof this._close&&(this._close=function(){})}var t,n;return t=e,(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}}])&<(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}(),pt=i(78345),dt=i(17563);p.ZP.use(pt.Z);var ft,mt,vt=new pt.Z({mode:"history",base:(0,l.generateUrl)("/apps/files",""),linkActiveClass:"active",routes:[{path:"/",alias:"/files"},{path:"/:view/:fileid?",name:"filelist",props:!0}],stringifyQuery:function(e){var t=(0,dt.stringify)(e).replace(/%2F/gim,"/");return t?"?"+t:""}});window.OCA.Files=null!==(ft=window.OCA.Files)&&void 0!==ft?ft:{},window.OCP.Files=null!==(mt=window.OCP.Files)&&void 0!==mt?mt:{};var gt=new ge;Object.assign(window.OCP.Files,{Navigation:gt});var ht,At=new ot;Object.assign(window.OCA.Files,{Settings:At}),Object.assign(window.OCA.Files.Settings,{Setting:ut}),new(p.ZP.extend(tt))({name:"FilesNavigationRoot",propsData:{Navigation:gt},router:vt}).$mount("#app-navigation-files"),(ht=Object.values((0,o.j)("files","navigation",{}))).length>0&&(re.debug("Legacy files views detected. Processing...",ht),ht.forEach((function(e){ce(e),e.sublist&&e.sublist.forEach((function(t){return ce(le(le({},t),{},{parent:e.id}))}))})))},87027:function(e,t,n){var i=n(87537),r=n.n(i),o=n(23645),a=n.n(o)()(r());a.push([e.id,".template-picker__item[data-v-440aea22]{display:flex}.template-picker__label[data-v-440aea22]{display:flex;align-items:center;flex:1 1;flex-direction:column}.template-picker__label[data-v-440aea22],.template-picker__label *[data-v-440aea22]{cursor:pointer;user-select:none}.template-picker__label[data-v-440aea22]::before{display:none !important}.template-picker__preview[data-v-440aea22]{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-440aea22]{border-color:var(--color-primary)}.template-picker__preview--failed[data-v-440aea22]{display:flex}.template-picker__image[data-v-440aea22]{max-width:100%;background-color:var(--color-main-background);object-fit:cover}.template-picker__preview--failed .template-picker__image[data-v-440aea22]{width:calc(var(--margin)*8);margin:auto;background-color:rgba(0,0,0,0) !important;object-fit:initial}.template-picker__title[data-v-440aea22]{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:""}]),t.Z=a},32345:function(e,t,n){var i=n(87537),r=n.n(i),o=n(23645),a=n.n(o)()(r());a.push([e.id,".app-navigation[data-v-0a069b20] .app-navigation-entry-icon{background-repeat:no-repeat;background-position:center}.app-navigation>ul.app-navigation__list[data-v-0a069b20]{padding-bottom:var(--default-grid-baseline, 4px)}.app-navigation-entry__settings[data-v-0a069b20]{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:""}]),t.Z=a},74502:function(e,t,n){var i=n(87537),r=n.n(i),o=n(23645),a=n.n(o)()(r());a.push([e.id,".templates-picker__form[data-v-55dd9121]{padding:calc(var(--margin)*2);padding-bottom:0}.templates-picker__form h2[data-v-55dd9121]{text-align:center;font-weight:bold;margin:var(--margin) 0 calc(var(--margin)*2)}.templates-picker__list[data-v-55dd9121]{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-55dd9121]{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-55dd9121],.templates-picker__buttons input[type=submit][data-v-55dd9121]{height:44px}.templates-picker[data-v-55dd9121] .modal-container{position:relative}.templates-picker__loading[data-v-55dd9121]{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:""}]),t.Z=a}},i={};function r(e){var t=i[e];if(void 0!==t)return t.exports;var o=i[e]={id:e,loaded:!1,exports:{}};return n[e].call(o.exports,o,o.exports,r),o.loaded=!0,o.exports}r.m=n,r.amdD=function(){throw new Error("define cannot be used indirect")},r.amdO={},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 l=!0,s=0;s<n.length;s++)(!1&o||a>=o)&&Object.keys(r.O).every((function(e){return r.O[e](n[s])}))?n.splice(s--,1):(l=!1,o<a&&(a=o));if(l){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(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,{a:t}),t},r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.nmd=function(e){return e.paths=[],e.children||(e.children=[]),e},r.j=2181,function(){r.b=document.baseURI||self.location.href;var e={2181:0};r.O.j=function(t){return 0===e[t]};var t=function(t,n){var i,o,a=n[0],l=n[1],s=n[2],c=0;if(a.some((function(t){return 0!==e[t]}))){for(i in l)r.o(l,i)&&(r.m[i]=l[i]);if(s)var u=s(r)}for(t&&t(n);c<a.length;c++)o=a[c],r.o(e,o)&&e[o]&&e[o][0](),e[o]=0;return r.O(u)},n=self.webpackChunknextcloud=self.webpackChunknextcloud||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))}(),r.nc=void 0;var o=r.O(void 0,[7874],(function(){return r(86203)}));o=r.O(o)}();
+//# sourceMappingURL=files-main.js.map?v=88e77c81a85acad351a0
\ No newline at end of file
-{"version":3,"file":"files-main.js?v=024e81d0e065896d0b30","mappings":";6BAAIA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K,KAAMD,EAAmBtJ,KAAKuJ,KAAKD,OClDvFxD,EAAoB0D,QAAKvD,ECGzB,IAAIwD,EAAsB3D,EAAoBW,OAAER,EAAW,CAAC,OAAO,WAAa,OAAOH,EAAoB,MAAQ,IACnH2D,EAAsB3D,EAAoBW,EAAEgD","sources":["webpack:///nextcloud/webpack/runtime/chunk loaded","webpack:///nextcloud/apps/files/src/utils/davUtils.js","webpack:///nextcloud/apps/files/src/services/Templates.js","webpack:///nextcloud/apps/files/src/components/TemplatePreview.vue","webpack:///nextcloud/apps/files/src/utils/fileUtils.js","webpack:///nextcloud/apps/files/src/components/TemplatePreview.vue?vue&type=script&lang=js&","webpack://nextcloud/./apps/files/src/components/TemplatePreview.vue?c067","webpack://nextcloud/./apps/files/src/components/TemplatePreview.vue?81db","webpack://nextcloud/./apps/files/src/components/TemplatePreview.vue?c414","webpack:///nextcloud/apps/files/src/views/TemplatePicker.vue","webpack:///nextcloud/apps/files/src/views/TemplatePicker.vue?vue&type=script&lang=js&","webpack://nextcloud/./apps/files/src/views/TemplatePicker.vue?023e","webpack://nextcloud/./apps/files/src/views/TemplatePicker.vue?afd8","webpack://nextcloud/./apps/files/src/views/TemplatePicker.vue?1f7b","webpack:///nextcloud/apps/files/src/templates.js","webpack:///nextcloud/apps/files/src/legacy/filelistSearch.js","webpack:///nextcloud/apps/files/src/logger.js","webpack:///nextcloud/apps/files/src/legacy/navigationMapper.js","webpack:///nextcloud/apps/files/src/services/Navigation.ts","webpack:///nextcloud/apps/files/src/components/Setting.vue?vue&type=script&lang=js&","webpack:///nextcloud/apps/files/src/components/Setting.vue","webpack://nextcloud/./apps/files/src/components/Setting.vue?98ea","webpack://nextcloud/./apps/files/src/components/Setting.vue?8d57","webpack:///nextcloud/apps/files/src/views/Settings.vue","webpack:///nextcloud/apps/files/src/views/Settings.vue?vue&type=script&lang=js&","webpack://nextcloud/./apps/files/src/views/Settings.vue?b81b","webpack://nextcloud/./apps/files/src/views/Settings.vue?84f7","webpack:///nextcloud/apps/files/src/views/Navigation.vue","webpack:///nextcloud/apps/files/src/views/Navigation.vue?vue&type=script&lang=js&","webpack://nextcloud/./apps/files/src/views/Navigation.vue?232a","webpack://nextcloud/./apps/files/src/views/Navigation.vue?74b9","webpack://nextcloud/./apps/files/src/views/Navigation.vue?8122","webpack:///nextcloud/apps/files/src/services/Settings.js","webpack:///nextcloud/apps/files/src/models/Setting.js","webpack:///nextcloud/apps/files/src/router/router.js","webpack:///nextcloud/apps/files/src/main.js","webpack:///nextcloud/apps/files/src/components/TemplatePreview.vue?vue&type=style&index=0&id=440aea22&prod&lang=scss&scoped=true&","webpack:///nextcloud/apps/files/src/views/Navigation.vue?vue&type=style&index=0&id=527f6b74&prod&scoped=true&lang=scss&","webpack:///nextcloud/apps/files/src/views/TemplatePicker.vue?vue&type=style&index=0&id=55dd9121&prod&lang=scss&scoped=true&","webpack:///nextcloud/webpack/bootstrap","webpack:///nextcloud/webpack/runtime/amd define","webpack:///nextcloud/webpack/runtime/amd options","webpack:///nextcloud/webpack/runtime/compat get default export","webpack:///nextcloud/webpack/runtime/define property getters","webpack:///nextcloud/webpack/runtime/global","webpack:///nextcloud/webpack/runtime/hasOwnProperty shorthand","webpack:///nextcloud/webpack/runtime/make namespace object","webpack:///nextcloud/webpack/runtime/node module decorator","webpack:///nextcloud/webpack/runtime/runtimeId","webpack:///nextcloud/webpack/runtime/jsonp chunk loading","webpack:///nextcloud/webpack/runtime/nonce","webpack:///nextcloud/webpack/startup"],"sourcesContent":["var deferred = [];\n__webpack_require__.O = function(result, chunkIds, fn, priority) {\n\tif(chunkIds) {\n\t\tpriority = priority || 0;\n\t\tfor(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];\n\t\tdeferred[i] = [chunkIds, fn, priority];\n\t\treturn;\n\t}\n\tvar notFulfilled = Infinity;\n\tfor (var i = 0; i < deferred.length; i++) {\n\t\tvar chunkIds = deferred[i][0];\n\t\tvar fn = deferred[i][1];\n\t\tvar priority = deferred[i][2];\n\t\tvar fulfilled = true;\n\t\tfor (var j = 0; j < chunkIds.length; j++) {\n\t\t\tif ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every(function(key) { return __webpack_require__.O[key](chunkIds[j]); })) {\n\t\t\t\tchunkIds.splice(j--, 1);\n\t\t\t} else {\n\t\t\t\tfulfilled = false;\n\t\t\t\tif(priority < notFulfilled) notFulfilled = priority;\n\t\t\t}\n\t\t}\n\t\tif(fulfilled) {\n\t\t\tdeferred.splice(i--, 1)\n\t\t\tvar r = fn();\n\t\t\tif (r !== undefined) result = r;\n\t\t}\n\t}\n\treturn result;\n};","/**\n * @copyright Copyright (c) 2019 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\nimport { generateRemoteUrl } from '@nextcloud/router'\nimport { getCurrentUser } from '@nextcloud/auth'\n\nexport const getRootPath = function() {\n\tif (getCurrentUser()) {\n\t\treturn generateRemoteUrl(`dav/files/${getCurrentUser().uid}`)\n\t} else {\n\t\treturn generateRemoteUrl('webdav').replace('/remote.php', '/public.php')\n\t}\n}\n\nexport const isPublic = function() {\n\treturn !getCurrentUser()\n}\n\nexport const getToken = function() {\n\treturn document.getElementById('sharingToken') && document.getElementById('sharingToken').value\n}\n\n/**\n * Return the current directory, fallback to root\n *\n * @return {string}\n */\nexport const getCurrentDirectory = function() {\n\tconst currentDirInfo = OCA?.Files?.App?.currentFileList?.dirInfo\n\t\t|| { path: '/', name: '' }\n\n\t// Make sure we don't have double slashes\n\treturn `${currentDirInfo.path}/${currentDirInfo.name}`.replace(/\\/\\//gi, '/')\n}\n","/**\n * @copyright Copyright (c) 2021 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\nimport { generateOcsUrl } from '@nextcloud/router'\nimport axios from '@nextcloud/axios'\n\nexport const getTemplates = async function() {\n\tconst response = await axios.get(generateOcsUrl('apps/files/api/v1/templates'))\n\treturn response.data.ocs.data\n}\n\n/**\n * Create a new file from a specified template\n *\n * @param {string} filePath The new file destination path\n * @param {string} templatePath The template source path\n * @param {string} templateType The template type e.g 'user'\n */\nexport const createFromTemplate = async function(filePath, templatePath, templateType) {\n\tconst response = await axios.post(generateOcsUrl('apps/files/api/v1/templates/create'), {\n\t\tfilePath,\n\t\ttemplatePath,\n\t\ttemplateType,\n\t})\n\treturn response.data.ocs.data\n}\n","<!--\n - @copyright Copyright (c) 2020 John Molakvoæ <skjnldsv@protonmail.com>\n -\n - @author John Molakvoæ <skjnldsv@protonmail.com>\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 -->\n\n<template>\n\t<li class=\"template-picker__item\">\n\t\t<input :id=\"id\"\n\t\t\t:checked=\"checked\"\n\t\t\ttype=\"radio\"\n\t\t\tclass=\"radio\"\n\t\t\tname=\"template-picker\"\n\t\t\t@change=\"onCheck\">\n\n\t\t<label :for=\"id\" class=\"template-picker__label\">\n\t\t\t<div class=\"template-picker__preview\"\n\t\t\t\t:class=\"failedPreview ? 'template-picker__preview--failed' : ''\">\n\t\t\t\t<img class=\"template-picker__image\"\n\t\t\t\t\t:src=\"realPreviewUrl\"\n\t\t\t\t\talt=\"\"\n\t\t\t\t\tdraggable=\"false\"\n\t\t\t\t\t@error=\"onFailure\">\n\t\t\t</div>\n\n\t\t\t<span class=\"template-picker__title\">\n\t\t\t\t{{ nameWithoutExt }}\n\t\t\t</span>\n\t\t</label>\n\t</li>\n</template>\n\n<script>\nimport { generateUrl } from '@nextcloud/router'\nimport { encodeFilePath } from '../utils/fileUtils'\nimport { getToken, isPublic } from '../utils/davUtils'\n\n// preview width generation\nconst previewWidth = 256\n\nexport default {\n\tname: 'TemplatePreview',\n\tinheritAttrs: false,\n\n\tprops: {\n\t\tbasename: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\t\tchecked: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t\tfileid: {\n\t\t\ttype: [String, Number],\n\t\t\trequired: true,\n\t\t},\n\t\tfilename: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\t\tpreviewUrl: {\n\t\t\ttype: String,\n\t\t\tdefault: null,\n\t\t},\n\t\thasPreview: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\t\tmime: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\t\tratio: {\n\t\t\ttype: Number,\n\t\t\tdefault: null,\n\t\t},\n\t},\n\n\tdata() {\n\t\treturn {\n\t\t\tfailedPreview: false,\n\t\t}\n\t},\n\n\tcomputed: {\n\t\t/**\n\t\t * Strip away extension from name\n\t\t *\n\t\t * @return {string}\n\t\t */\n\t\tnameWithoutExt() {\n\t\t\treturn this.basename.indexOf('.') > -1 ? this.basename.split('.').slice(0, -1).join('.') : this.basename\n\t\t},\n\n\t\tid() {\n\t\t\treturn `template-picker-${this.fileid}`\n\t\t},\n\n\t\trealPreviewUrl() {\n\t\t\t// If original preview failed, fallback to mime icon\n\t\t\tif (this.failedPreview && this.mimeIcon) {\n\t\t\t\treturn this.mimeIcon\n\t\t\t}\n\n\t\t\tif (this.previewUrl) {\n\t\t\t\treturn this.previewUrl\n\t\t\t}\n\t\t\t// TODO: find a nicer standard way of doing this?\n\t\t\tif (isPublic()) {\n\t\t\t\treturn generateUrl(`/apps/files_sharing/publicpreview/${getToken()}?fileId=${this.fileid}&file=${encodeFilePath(this.filename)}&x=${previewWidth}&y=${previewWidth}&a=1`)\n\t\t\t}\n\t\t\treturn generateUrl(`/core/preview?fileId=${this.fileid}&x=${previewWidth}&y=${previewWidth}&a=1`)\n\t\t},\n\n\t\tmimeIcon() {\n\t\t\treturn OC.MimeType.getIconUrl(this.mime)\n\t\t},\n\t},\n\n\tmethods: {\n\t\tonCheck() {\n\t\t\tthis.$emit('check', this.fileid)\n\t\t},\n\t\tonFailure() {\n\t\t\tthis.failedPreview = true\n\t\t},\n\t},\n}\n</script>\n\n<style lang=\"scss\" scoped>\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</style>\n","/**\n * @copyright Copyright (c) 2021 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\nconst encodeFilePath = function(path) {\n\tconst pathSections = (path.startsWith('/') ? path : `/${path}`).split('/')\n\tlet relativePath = ''\n\tpathSections.forEach((section) => {\n\t\tif (section !== '') {\n\t\t\trelativePath += '/' + encodeURIComponent(section)\n\t\t}\n\t})\n\treturn relativePath\n}\n\n/**\n * Extract dir and name from file path\n *\n * @param {string} path the full path\n * @return {string[]} [dirPath, fileName]\n */\nconst extractFilePaths = function(path) {\n\tconst pathSections = path.split('/')\n\tconst fileName = pathSections[pathSections.length - 1]\n\tconst dirPath = pathSections.slice(0, pathSections.length - 1).join('/')\n\treturn [dirPath, fileName]\n}\n\nexport { encodeFilePath, extractFilePaths }\n","import mod from \"-!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TemplatePreview.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TemplatePreview.vue?vue&type=script&lang=js&\"","\n import API from \"!../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/sass-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TemplatePreview.vue?vue&type=style&index=0&id=440aea22&prod&lang=scss&scoped=true&\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\n\n options.insert = insertFn.bind(null, \"head\");\n \noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/sass-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TemplatePreview.vue?vue&type=style&index=0&id=440aea22&prod&lang=scss&scoped=true&\";\n export default content && content.locals ? content.locals : undefined;\n","import { render, staticRenderFns } from \"./TemplatePreview.vue?vue&type=template&id=440aea22&scoped=true&\"\nimport script from \"./TemplatePreview.vue?vue&type=script&lang=js&\"\nexport * from \"./TemplatePreview.vue?vue&type=script&lang=js&\"\nimport style0 from \"./TemplatePreview.vue?vue&type=style&index=0&id=440aea22&prod&lang=scss&scoped=true&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"440aea22\",\n null\n \n)\n\nexport default component.exports","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('li',{staticClass:\"template-picker__item\"},[_c('input',{staticClass:\"radio\",attrs:{\"id\":_vm.id,\"type\":\"radio\",\"name\":\"template-picker\"},domProps:{\"checked\":_vm.checked},on:{\"change\":_vm.onCheck}}),_vm._v(\" \"),_c('label',{staticClass:\"template-picker__label\",attrs:{\"for\":_vm.id}},[_c('div',{staticClass:\"template-picker__preview\",class:_vm.failedPreview ? 'template-picker__preview--failed' : ''},[_c('img',{staticClass:\"template-picker__image\",attrs:{\"src\":_vm.realPreviewUrl,\"alt\":\"\",\"draggable\":\"false\"},on:{\"error\":_vm.onFailure}})]),_vm._v(\" \"),_c('span',{staticClass:\"template-picker__title\"},[_vm._v(\"\\n\\t\\t\\t\"+_vm._s(_vm.nameWithoutExt)+\"\\n\\t\\t\")])])])\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<!--\n - @copyright Copyright (c) 2020 John Molakvoæ <skjnldsv@protonmail.com>\n -\n - @author John Molakvoæ <skjnldsv@protonmail.com>\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 -->\n\n<template>\n\t<NcModal v-if=\"opened\"\n\t\t:clear-view-delay=\"-1\"\n\t\tclass=\"templates-picker\"\n\t\tsize=\"normal\"\n\t\t@close=\"close\">\n\t\t<form class=\"templates-picker__form\"\n\t\t\t:style=\"style\"\n\t\t\t@submit.prevent.stop=\"onSubmit\">\n\t\t\t<h2>{{ t('files', 'Pick a template for {name}', { name: nameWithoutExt }) }}</h2>\n\n\t\t\t<!-- Templates list -->\n\t\t\t<ul class=\"templates-picker__list\">\n\t\t\t\t<TemplatePreview v-bind=\"emptyTemplate\"\n\t\t\t\t\t:checked=\"checked === emptyTemplate.fileid\"\n\t\t\t\t\t@check=\"onCheck\" />\n\n\t\t\t\t<TemplatePreview v-for=\"template in provider.templates\"\n\t\t\t\t\t:key=\"template.fileid\"\n\t\t\t\t\tv-bind=\"template\"\n\t\t\t\t\t:checked=\"checked === template.fileid\"\n\t\t\t\t\t:ratio=\"provider.ratio\"\n\t\t\t\t\t@check=\"onCheck\" />\n\t\t\t</ul>\n\n\t\t\t<!-- Cancel and submit -->\n\t\t\t<div class=\"templates-picker__buttons\">\n\t\t\t\t<button @click=\"close\">\n\t\t\t\t\t{{ t('files', 'Cancel') }}\n\t\t\t\t</button>\n\t\t\t\t<input type=\"submit\"\n\t\t\t\t\tclass=\"primary\"\n\t\t\t\t\t:value=\"t('files', 'Create')\"\n\t\t\t\t\t:aria-label=\"t('files', 'Create a new file with the selected template')\">\n\t\t\t</div>\n\t\t</form>\n\n\t\t<NcEmptyContent v-if=\"loading\" class=\"templates-picker__loading\" icon=\"icon-loading\">\n\t\t\t{{ t('files', 'Creating file') }}\n\t\t</NcEmptyContent>\n\t</NcModal>\n</template>\n\n<script>\nimport { normalize } from 'path'\nimport { showError } from '@nextcloud/dialogs'\nimport NcEmptyContent from '@nextcloud/vue/dist/Components/NcEmptyContent'\nimport NcModal from '@nextcloud/vue/dist/Components/NcModal'\n\nimport { getCurrentDirectory } from '../utils/davUtils'\nimport { createFromTemplate, getTemplates } from '../services/Templates'\nimport TemplatePreview from '../components/TemplatePreview'\n\nconst border = 2\nconst margin = 8\nconst width = margin * 20\n\nexport default {\n\tname: 'TemplatePicker',\n\n\tcomponents: {\n\t\tNcEmptyContent,\n\t\tNcModal,\n\t\tTemplatePreview,\n\t},\n\n\tprops: {\n\t\tlogger: {\n\t\t\ttype: Object,\n\t\t\trequired: true,\n\t\t},\n\t},\n\n\tdata() {\n\t\treturn {\n\t\t\t// Check empty template by default\n\t\t\tchecked: -1,\n\t\t\tloading: false,\n\t\t\tname: null,\n\t\t\topened: false,\n\t\t\tprovider: null,\n\t\t}\n\t},\n\n\tcomputed: {\n\t\t/**\n\t\t * Strip away extension from name\n\t\t *\n\t\t * @return {string}\n\t\t */\n\t\tnameWithoutExt() {\n\t\t\treturn this.name.indexOf('.') > -1\n\t\t\t\t? this.name.split('.').slice(0, -1).join('.')\n\t\t\t\t: this.name\n\t\t},\n\n\t\temptyTemplate() {\n\t\t\treturn {\n\t\t\t\tbasename: t('files', 'Blank'),\n\t\t\t\tfileid: -1,\n\t\t\t\tfilename: this.t('files', 'Blank'),\n\t\t\t\thasPreview: false,\n\t\t\t\tmime: this.provider?.mimetypes[0] || this.provider?.mimetypes,\n\t\t\t}\n\t\t},\n\n\t\tselectedTemplate() {\n\t\t\treturn this.provider.templates.find(template => template.fileid === this.checked)\n\t\t},\n\n\t\t/**\n\t\t * Style css vars bin,d\n\t\t *\n\t\t * @return {object}\n\t\t */\n\t\tstyle() {\n\t\t\treturn {\n\t\t\t\t'--margin': margin + 'px',\n\t\t\t\t'--width': width + 'px',\n\t\t\t\t'--border': border + 'px',\n\t\t\t\t'--fullwidth': width + 2 * margin + 2 * border + 'px',\n\t\t\t\t'--height': this.provider.ratio ? Math.round(width / this.provider.ratio) + 'px' : null,\n\t\t\t}\n\t\t},\n\t},\n\n\tmethods: {\n\t\t/**\n\t\t * Open the picker\n\t\t *\n\t\t * @param {string} name the file name to create\n\t\t * @param {object} provider the template provider picked\n\t\t */\n\t\tasync open(name, provider) {\n\n\t\t\tthis.checked = this.emptyTemplate.fileid\n\t\t\tthis.name = name\n\t\t\tthis.provider = provider\n\n\t\t\tconst templates = await getTemplates()\n\t\t\tconst fetchedProvider = templates.find((fetchedProvider) => fetchedProvider.app === provider.app && fetchedProvider.label === provider.label)\n\t\t\tif (fetchedProvider === null) {\n\t\t\t\tthrow new Error('Failed to match provider in results')\n\t\t\t}\n\t\t\tthis.provider = fetchedProvider\n\n\t\t\t// If there is no templates available, just create an empty file\n\t\t\tif (fetchedProvider.templates.length === 0) {\n\t\t\t\tthis.onSubmit()\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\t// Else, open the picker\n\t\t\tthis.opened = true\n\t\t},\n\n\t\t/**\n\t\t * Close the picker and reset variables\n\t\t */\n\t\tclose() {\n\t\t\tthis.checked = this.emptyTemplate.fileid\n\t\t\tthis.loading = false\n\t\t\tthis.name = null\n\t\t\tthis.opened = false\n\t\t\tthis.provider = null\n\t\t},\n\n\t\t/**\n\t\t * Manages the radio template picker change\n\t\t *\n\t\t * @param {number} fileid the selected template file id\n\t\t */\n\t\tonCheck(fileid) {\n\t\t\tthis.checked = fileid\n\t\t},\n\n\t\tasync onSubmit() {\n\t\t\tthis.loading = true\n\t\t\tconst currentDirectory = getCurrentDirectory()\n\t\t\tconst fileList = OCA?.Files?.App?.currentFileList\n\n\t\t\t// If the file doesn't have an extension, add the default one\n\t\t\tif (this.nameWithoutExt === this.name) {\n\t\t\t\tthis.logger.debug('Fixed invalid filename', { name: this.name, extension: this.provider?.extension })\n\t\t\t\tthis.name = this.name + this.provider?.extension\n\t\t\t}\n\n\t\t\ttry {\n\t\t\t\tconst fileInfo = await createFromTemplate(\n\t\t\t\t\tnormalize(`${currentDirectory}/${this.name}`),\n\t\t\t\t\tthis.selectedTemplate?.filename,\n\t\t\t\t\tthis.selectedTemplate?.templateType,\n\t\t\t\t)\n\t\t\t\tthis.logger.debug('Created new file', fileInfo)\n\n\t\t\t\t// Fetch FileInfo and model\n\t\t\t\tconst data = await fileList?.addAndFetchFileInfo(this.name).then((status, data) => data)\n\t\t\t\tconst model = new OCA.Files.FileInfoModel(data, {\n\t\t\t\t\tfilesClient: fileList?.filesClient,\n\t\t\t\t})\n\n\t\t\t\t// Run default action\n\t\t\t\tconst fileAction = OCA.Files.fileActions.getDefaultFileAction(fileInfo.mime, 'file', OC.PERMISSION_ALL)\n\t\t\t\tif (fileAction) {\n\t\t\t\t\tfileAction.action(fileInfo.basename, {\n\t\t\t\t\t\t$file: fileList?.findFileEl(this.name),\n\t\t\t\t\t\tdir: currentDirectory,\n\t\t\t\t\t\tfileList,\n\t\t\t\t\t\tfileActions: fileList?.fileActions,\n\t\t\t\t\t\tfileInfoModel: model,\n\t\t\t\t\t})\n\t\t\t\t}\n\n\t\t\t\tthis.close()\n\t\t\t} catch (error) {\n\t\t\t\tthis.logger.error('Error while creating the new file from template')\n\t\t\t\tconsole.error(error)\n\t\t\t\tshowError(this.t('files', 'Unable to create new file from template'))\n\t\t\t} finally {\n\t\t\t\tthis.loading = false\n\t\t\t}\n\t\t},\n\t},\n}\n</script>\n\n<style lang=\"scss\" scoped>\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</style>\n","import mod from \"-!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TemplatePicker.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TemplatePicker.vue?vue&type=script&lang=js&\"","\n import API from \"!../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/sass-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TemplatePicker.vue?vue&type=style&index=0&id=55dd9121&prod&lang=scss&scoped=true&\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\n\n options.insert = insertFn.bind(null, \"head\");\n \noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/sass-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TemplatePicker.vue?vue&type=style&index=0&id=55dd9121&prod&lang=scss&scoped=true&\";\n export default content && content.locals ? content.locals : undefined;\n","import { render, staticRenderFns } from \"./TemplatePicker.vue?vue&type=template&id=55dd9121&scoped=true&\"\nimport script from \"./TemplatePicker.vue?vue&type=script&lang=js&\"\nexport * from \"./TemplatePicker.vue?vue&type=script&lang=js&\"\nimport style0 from \"./TemplatePicker.vue?vue&type=style&index=0&id=55dd9121&prod&lang=scss&scoped=true&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"55dd9121\",\n null\n \n)\n\nexport default component.exports","var render = function render(){var _vm=this,_c=_vm._self._c;return (_vm.opened)?_c('NcModal',{staticClass:\"templates-picker\",attrs:{\"clear-view-delay\":-1,\"size\":\"normal\"},on:{\"close\":_vm.close}},[_c('form',{staticClass:\"templates-picker__form\",style:(_vm.style),on:{\"submit\":function($event){$event.preventDefault();$event.stopPropagation();return _vm.onSubmit.apply(null, arguments)}}},[_c('h2',[_vm._v(_vm._s(_vm.t('files', 'Pick a template for {name}', { name: _vm.nameWithoutExt })))]),_vm._v(\" \"),_c('ul',{staticClass:\"templates-picker__list\"},[_c('TemplatePreview',_vm._b({attrs:{\"checked\":_vm.checked === _vm.emptyTemplate.fileid},on:{\"check\":_vm.onCheck}},'TemplatePreview',_vm.emptyTemplate,false)),_vm._v(\" \"),_vm._l((_vm.provider.templates),function(template){return _c('TemplatePreview',_vm._b({key:template.fileid,attrs:{\"checked\":_vm.checked === template.fileid,\"ratio\":_vm.provider.ratio},on:{\"check\":_vm.onCheck}},'TemplatePreview',template,false))})],2),_vm._v(\" \"),_c('div',{staticClass:\"templates-picker__buttons\"},[_c('button',{on:{\"click\":_vm.close}},[_vm._v(\"\\n\\t\\t\\t\\t\"+_vm._s(_vm.t('files', 'Cancel'))+\"\\n\\t\\t\\t\")]),_vm._v(\" \"),_c('input',{staticClass:\"primary\",attrs:{\"type\":\"submit\",\"aria-label\":_vm.t('files', 'Create a new file with the selected template')},domProps:{\"value\":_vm.t('files', 'Create')}})])]),_vm._v(\" \"),(_vm.loading)?_c('NcEmptyContent',{staticClass:\"templates-picker__loading\",attrs:{\"icon\":\"icon-loading\"}},[_vm._v(\"\\n\\t\\t\"+_vm._s(_vm.t('files', 'Creating file'))+\"\\n\\t\")]):_vm._e()],1):_vm._e()\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","/**\n * @copyright Copyright (c) 2020 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n * @author Julius Härtl <jus@bitgrid.net>\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\nimport { getLoggerBuilder } from '@nextcloud/logger'\nimport { loadState } from '@nextcloud/initial-state'\nimport { translate as t, translatePlural as n } from '@nextcloud/l10n'\nimport { generateOcsUrl } from '@nextcloud/router'\nimport { getCurrentDirectory } from './utils/davUtils'\nimport axios from '@nextcloud/axios'\nimport Vue from 'vue'\n\nimport TemplatePickerView from './views/TemplatePicker'\nimport { showError } from '@nextcloud/dialogs'\n\n// Set up logger\nconst logger = getLoggerBuilder()\n\t.setApp('files')\n\t.detectUser()\n\t.build()\n\n// Add translates functions\nVue.mixin({\n\tmethods: {\n\t\tt,\n\t\tn,\n\t},\n})\n\n// Create document root\nconst TemplatePickerRoot = document.createElement('div')\nTemplatePickerRoot.id = 'template-picker'\ndocument.body.appendChild(TemplatePickerRoot)\n\n// Retrieve and init templates\nlet templates = loadState('files', 'templates', [])\nlet templatesPath = loadState('files', 'templates_path', false)\nlogger.debug('Templates providers', templates)\nlogger.debug('Templates folder', { templatesPath })\n\n// Init vue app\nconst View = Vue.extend(TemplatePickerView)\nconst TemplatePicker = new View({\n\tname: 'TemplatePicker',\n\tpropsData: {\n\t\tlogger,\n\t},\n})\nTemplatePicker.$mount('#template-picker')\n\n// Init template engine after load to make sure it's the last injected entry\nwindow.addEventListener('DOMContentLoaded', function() {\n\tif (!templatesPath) {\n\t\tlogger.debug('Templates folder not initialized')\n\t\tconst initTemplatesPlugin = {\n\t\t\tattach(menu) {\n\t\t\t\t// register the new menu entry\n\t\t\t\tmenu.addMenuEntry({\n\t\t\t\t\tid: 'template-init',\n\t\t\t\t\tdisplayName: t('files', 'Set up templates folder'),\n\t\t\t\t\ttemplateName: t('files', 'Templates'),\n\t\t\t\t\ticonClass: 'icon-template-add',\n\t\t\t\t\tfileType: 'file',\n\t\t\t\t\tactionHandler(name) {\n\t\t\t\t\t\tinitTemplatesFolder(name)\n\t\t\t\t\t\tmenu.removeMenuEntry('template-init')\n\t\t\t\t\t},\n\t\t\t\t})\n\t\t\t},\n\t\t}\n\t\tOC.Plugins.register('OCA.Files.NewFileMenu', initTemplatesPlugin)\n\t}\n})\n\n// Init template files menu\ntemplates.forEach((provider, index) => {\n\tconst newTemplatePlugin = {\n\t\tattach(menu) {\n\t\t\tconst fileList = menu.fileList\n\n\t\t\t// only attach to main file list, public view is not supported yet\n\t\t\tif (fileList.id !== 'files' && fileList.id !== 'files.public') {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\t// register the new menu entry\n\t\t\tmenu.addMenuEntry({\n\t\t\t\tid: `template-new-${provider.app}-${index}`,\n\t\t\t\tdisplayName: provider.label,\n\t\t\t\ttemplateName: provider.label + provider.extension,\n\t\t\t\ticonClass: provider.iconClass || 'icon-file',\n\t\t\t\tfileType: 'file',\n\t\t\t\tactionHandler(name) {\n\t\t\t\t\tTemplatePicker.open(name, provider)\n\t\t\t\t},\n\t\t\t})\n\t\t},\n\t}\n\tOC.Plugins.register('OCA.Files.NewFileMenu', newTemplatePlugin)\n})\n\n/**\n * Init the template directory\n *\n * @param {string} name the templates folder name\n */\nconst initTemplatesFolder = async function(name) {\n\tconst templatePath = (getCurrentDirectory() + `/${name}`).replace('//', '/')\n\ttry {\n\t\tlogger.debug('Initializing the templates directory', { templatePath })\n\t\tconst response = await axios.post(generateOcsUrl('apps/files/api/v1/templates/path'), {\n\t\t\ttemplatePath,\n\t\t\tcopySystemTemplates: true,\n\t\t})\n\n\t\t// Go to template directory\n\t\tOCA.Files.App.currentFileList.changeDirectory(templatePath, true, true)\n\n\t\ttemplates = response.data.ocs.data.templates\n\t\ttemplatesPath = response.data.ocs.data.template_path\n\t} catch (error) {\n\t\tlogger.error('Unable to initialize the templates directory')\n\t\tshowError(t('files', 'Unable to initialize the templates directory'))\n\t}\n}\n","/*\n * @copyright Copyright (c) 2021 Julius Härtl <jus@bitgrid.net>\n *\n * @author Julius Härtl <jus@bitgrid.net>\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\nimport { subscribe } from '@nextcloud/event-bus'\n\n(function() {\n\n\tconst FilesPlugin = {\n\t\tattach(fileList) {\n\t\t\tsubscribe('nextcloud:unified-search.search', ({ query }) => {\n\t\t\t\tfileList.setFilter(query)\n\t\t\t})\n\t\t\tsubscribe('nextcloud:unified-search.reset', () => {\n\t\t\t\tthis.query = null\n\t\t\t\tfileList.setFilter('')\n\t\t\t})\n\n\t\t},\n\t}\n\n\twindow.OC.Plugins.register('OCA.Files.FileList', FilesPlugin)\n\n})()\n","/**\n * @copyright Copyright (c) 2022 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 */\nimport { getLoggerBuilder } from '@nextcloud/logger'\n\nexport default getLoggerBuilder()\n\t.setApp('files')\n\t.detectUser()\n\t.build()\n","/**\n * @copyright Copyright (c) 2022 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\nimport { loadState } from '@nextcloud/initial-state'\nimport logger from '../logger.js'\n\n/**\n * Fetch and register the legacy files views\n */\nexport default function() {\n\tconst legacyViews = Object.values(loadState('files', 'navigation', {}))\n\n\tif (legacyViews.length > 0) {\n\t\tlogger.debug('Legacy files views detected. Processing...', legacyViews)\n\t\tlegacyViews.forEach(view => {\n\t\t\tregisterLegacyView(view)\n\t\t\tif (view.sublist) {\n\t\t\t\tview.sublist.forEach(subview => registerLegacyView({ ...subview, parent: view.id }))\n\t\t\t}\n\t\t})\n\t}\n}\n\nconst registerLegacyView = function({ id, name, order, icon, parent, classes = '', expanded, params }) {\n\tOCP.Files.Navigation.register({\n\t\tid,\n\t\tname,\n\t\torder,\n\t\tparams,\n\t\tparent,\n\t\texpanded: expanded === true,\n\t\ticonClass: icon ? `icon-${icon}` : 'nav-icon-' + id,\n\t\tlegacy: true,\n\t\tsticky: classes.includes('pinned'),\n\t})\n}\n","/**\n * @copyright Copyright (c) 2022 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 */\nimport type Node from '@nextcloud/files/dist/files/node'\nimport isSvg from 'is-svg'\n\nimport logger from '../logger'\n\nexport interface Column {\n\t/** Unique column ID */\n\tid: string\n\t/** Translated column title */\n\ttitle: string\n\t/** Property key from Node main or additional attributes.\n\tWill be used if no custom sort function is provided.\n\tSorting will be done by localCompare */\n\tproperty: string\n\t/** Special function used to sort Nodes between them */\n\tsortFunction?: (nodeA: Node, nodeB: Node) => number;\n\t/** Custom summary of the column to display at the end of the list.\n\t Will not be displayed if nothing is provided */\n\tsummary?: (node: Node[]) => string\n}\n\nexport interface Navigation {\n\t/** Unique view ID */\n\tid: string\n\t/** Translated view name */\n\tname: string\n\t/** Method return the content of the provided path */\n\tgetFiles: (path: string) => Node[]\n\t/** The view icon as an inline svg */\n\ticon: string\n\t/** The view order */\n\torder: number\n\t/** This view column(s). Name and actions are\n\tby default always included */\n\tcolumns?: Column[]\n\t/** The empty view element to render your empty content into */\n\temptyView?: (div: HTMLDivElement) => void\n\t/** The parent unique ID */\n\tparent?: string\n\t/** This view is sticky (sent at the bottom) */\n\tsticky?: boolean\n\t/** This view has children and is expanded or not */\n\texpanded?: boolean\n\n\t/**\n\t * This view is sticky a legacy view.\n\t * Here until all the views are migrated to Vue.\n\t * @deprecated It will be removed in a near future\n\t */\n\tlegacy?: boolean\n\t/**\n\t * An icon class. \n\t * @deprecated It will be removed in a near future\n\t */\n\ticonClass?: string\n}\n\nexport default class {\n\n\tprivate _views: Navigation[] = []\n\tprivate _currentView: Navigation | null = null\n\n\tconstructor() {\n\t\tlogger.debug('Navigation service initialized')\n\t}\n\n\tregister(view: Navigation) {\n\t\ttry {\n\t\t\tisValidNavigation(view)\n\t\t\tisUniqueNavigation(view, this._views)\n\t\t} catch (e) {\n\t\t\tif (e instanceof Error) {\n\t\t\t\tlogger.error(e.message, { view })\n\t\t\t}\n\t\t\tthrow e\n\t\t}\n\n\t\tif (view.legacy) {\n\t\t\tlogger.warn('Legacy view detected, please migrate to Vue')\n\t\t}\n\n\t\tif (view.iconClass) {\n\t\t\tview.legacy = true\n\t\t}\n\n\t\tthis._views.push(view)\n\t}\n\n\tget views(): Navigation[] {\n\t\treturn this._views\n\t}\n\n\tsetActive(view: Navigation | null) {\n\t\tthis._currentView = view\n\t}\n\n\tget active(): Navigation | null {\n\t\treturn this._currentView\n\t}\n\n}\n\n/**\n * Make sure the given view is unique\n * and not already registered.\n */\nconst isUniqueNavigation = function(view: Navigation, views: Navigation[]): boolean {\n\tif (views.find(search => search.id === view.id)) {\n\t\tthrow new Error(`Navigation id ${view.id} is already registered`)\n\t}\n\treturn true\n}\n\n/**\n * Typescript cannot validate an interface.\n * Please keep in sync with the Navigation interface requirements.\n */\nconst isValidNavigation = function(view: Navigation): boolean {\n\tif (!view.id || typeof view.id !== 'string') {\n\t\tthrow new Error('Navigation id is required and must be a string')\n\t}\n\n\tif (!view.name || typeof view.name !== 'string') {\n\t\tthrow new Error('Navigation name is required and must be a string')\n\t}\n\n\t/**\n\t * Legacy handle their content and icon differently\n\t * TODO: remove when support for legacy views is removed\n\t */\n\tif (!view.legacy) {\n\t\tif (!view.getFiles || typeof view.getFiles !== 'function') {\n\t\t\tthrow new Error('Navigation getFiles is required and must be a function')\n\t\t}\n\n\t\tif (!view.icon || typeof view.icon !== 'string' || !isSvg(view.icon)) {\n\t\t\tthrow new Error('Navigation icon is required and must be a valid svg string')\n\t\t}\n\t}\n\n\tif (!('order' in view) || typeof view.order !== 'number') {\n\t\tthrow new Error('Navigation order is required and must be a number')\n\t}\n\n\t// Optional properties\n\tif (view.columns) {\n\t\tview.columns.forEach(isValidColumn)\n\t}\n\n\tif (view.emptyView && typeof view.emptyView !== 'function') {\n\t\tthrow new Error('Navigation emptyView must be a function')\n\t}\n\n\tif (view.parent && typeof view.parent !== 'string') {\n\t\tthrow new Error('Navigation parent must be a string')\n\t}\n\n\tif ('sticky' in view && typeof view.sticky !== 'boolean') {\n\t\tthrow new Error('Navigation sticky must be a boolean')\n\t}\n\n\tif ('expanded' in view && typeof view.expanded !== 'boolean') {\n\t\tthrow new Error('Navigation expanded must be a boolean')\n\t}\n\n\treturn true\n}\n\n/**\n * Typescript cannot validate an interface.\n * Please keep in sync with the Column interface requirements.\n */\nconst isValidColumn = function(column: Column): boolean {\n\tif (!column.id || typeof column.id !== 'string') {\n\t\tthrow new Error('Column id is required')\n\t}\n\n\tif (!column.title || typeof column.title !== 'string') {\n\t\tthrow new Error('Column title is required')\n\t}\n\n\tif (!column.property || typeof column.property !== 'string') {\n\t\tthrow new Error('Column property is required')\n\t}\n\n\t// Optional properties\n\tif (column.sortFunction && typeof column.sortFunction !== 'function') {\n\t\tthrow new Error('Column sortFunction must be a function')\n\t}\n\n\tif (column.summary && typeof column.summary !== 'function') {\n\t\tthrow new Error('Column summary must be a function')\n\t}\n\n\treturn true\n}\n","import mod from \"-!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Setting.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Setting.vue?vue&type=script&lang=js&\"","<!--\n - @copyright Copyright (c) 2020 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 -->\n\n<template>\n\t<div />\n</template>\n<script>\nexport default {\n\tname: 'Setting',\n\tprops: {\n\t\tel: {\n\t\t\ttype: Function,\n\t\t\trequired: true,\n\t\t},\n\t},\n\tmounted() {\n\t\tthis.$el.appendChild(this.el())\n\t},\n}\n</script>\n","import { render, staticRenderFns } from \"./Setting.vue?vue&type=template&id=03406edc&\"\nimport script from \"./Setting.vue?vue&type=script&lang=js&\"\nexport * from \"./Setting.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('div')\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<!--\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 -->\n<template>\n\t<NcAppSettingsDialog :open=\"open\"\n\t\t:show-navigation=\"true\"\n\t\t:title=\"t('files', 'Files settings')\"\n\t\t@update:open=\"onClose\">\n\t\t<!-- Settings API-->\n\t\t<NcAppSettingsSection id=\"settings\" :title=\"t('files', 'Files settings')\">\n\t\t\t<NcCheckboxRadioSwitch :checked.sync=\"show_hidden\"\n\t\t\t\t@update:checked=\"setConfig('show_hidden', $event)\">\n\t\t\t\t{{ t('files', 'Show hidden files') }}\n\t\t\t</NcCheckboxRadioSwitch>\n\t\t\t<NcCheckboxRadioSwitch :checked.sync=\"crop_image_previews\"\n\t\t\t\t@update:checked=\"setConfig('crop_image_previews', $event)\">\n\t\t\t\t{{ t('files', 'Crop image previews') }}\n\t\t\t</NcCheckboxRadioSwitch>\n\t\t</NcAppSettingsSection>\n\n\t\t<!-- Settings API-->\n\t\t<NcAppSettingsSection v-if=\"settings.length !== 0\"\n\t\t\tid=\"more-settings\"\n\t\t\t:title=\"t('files', 'Additional settings')\">\n\t\t\t<template v-for=\"setting in settings\">\n\t\t\t\t<Setting :key=\"setting.name\" :el=\"setting.el\" />\n\t\t\t</template>\n\t\t</NcAppSettingsSection>\n\n\t\t<!-- Webdav URL-->\n\t\t<NcAppSettingsSection id=\"webdav\" :title=\"t('files', 'Webdav')\">\n\t\t\t<NcInputField type=\"text\" readonly=\"readonly\" :value=\"webdavUrl\" />\n\t\t\t<em>\n\t\t\t\t<a :href=\"webdavDocs\" target=\"_blank\" rel=\"noreferrer noopener\">\n\t\t\t\t\t{{ t('files', 'Use this address to access your Files via WebDAV') }} ↗\n\t\t\t\t</a>\n\t\t\t</em>\n\t\t</NcAppSettingsSection>\n\t</NcAppSettingsDialog>\n</template>\n\n<script>\nimport NcAppSettingsDialog from '@nextcloud/vue/dist/Components/NcAppSettingsDialog.js'\nimport NcAppSettingsSection from '@nextcloud/vue/dist/Components/NcAppSettingsSection.js'\nimport NcCheckboxRadioSwitch from '@nextcloud/vue/dist/Components/NcCheckboxRadioSwitch.js'\nimport NcInputField from '@nextcloud/vue/dist/Components/NcInputField'\nimport Setting from '../components/Setting.vue'\n\nimport { generateRemoteUrl, generateUrl } from '@nextcloud/router'\nimport { getCurrentUser } from '@nextcloud/auth'\nimport { loadState } from '@nextcloud/initial-state'\nimport { emit } from '@nextcloud/event-bus'\nimport axios from '@nextcloud/axios'\nimport { translate } from '@nextcloud/l10n'\n\nconst userConfig = loadState('files', 'config', {\n\tshow_hidden: false,\n\tcrop_image_previews: true,\n})\n\nexport default {\n\tname: 'Settings',\n\tcomponents: {\n\t\tNcAppSettingsDialog,\n\t\tNcAppSettingsSection,\n\t\tNcCheckboxRadioSwitch,\n\t\tNcInputField,\n\t\tSetting,\n\t},\n\n\tprops: {\n\t\topen: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t},\n\n\tdata() {\n\t\treturn {\n\n\t\t\t...userConfig,\n\n\t\t\t// Settings API\n\t\t\tsettings: window.OCA?.Files?.Settings?.settings || [],\n\n\t\t\t// Webdav infos\n\t\t\twebdavUrl: generateRemoteUrl('dav/files/' + encodeURIComponent(getCurrentUser()?.uid)),\n\t\t\twebdavDocs: 'https://docs.nextcloud.com/server/stable/go.php?to=user-webdav',\n\t\t}\n\t},\n\n\tbeforeMount() {\n\t\t// Update the settings API entries state\n\t\tthis.settings.forEach(setting => setting.open())\n\t},\n\n\tbeforeDestroy() {\n\t\t// Update the settings API entries state\n\t\tthis.settings.forEach(setting => setting.close())\n\t},\n\n\tmethods: {\n\t\tonClose() {\n\t\t\tthis.$emit('close')\n\t\t},\n\n\t\tsetConfig(key, value) {\n\t\t\temit('files:config:updated', { key, value })\n\t\t\taxios.post(generateUrl('/apps/files/api/v1/config/' + key), {\n\t\t\t\tvalue,\n\t\t\t})\n\t\t},\n\n\t\tt: translate,\n\t},\n}\n</script>\n\n<style lang=\"scss\" scoped>\n\n</style>\n","import mod from \"-!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Settings.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Settings.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./Settings.vue?vue&type=template&id=1f10b559&scoped=true&\"\nimport script from \"./Settings.vue?vue&type=script&lang=js&\"\nexport * from \"./Settings.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"1f10b559\",\n null\n \n)\n\nexport default component.exports","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('NcAppSettingsDialog',{attrs:{\"open\":_vm.open,\"show-navigation\":true,\"title\":_vm.t('files', 'Files settings')},on:{\"update:open\":_vm.onClose}},[_c('NcAppSettingsSection',{attrs:{\"id\":\"settings\",\"title\":_vm.t('files', 'Files settings')}},[_c('NcCheckboxRadioSwitch',{attrs:{\"checked\":_vm.show_hidden},on:{\"update:checked\":[function($event){_vm.show_hidden=$event},function($event){return _vm.setConfig('show_hidden', $event)}]}},[_vm._v(\"\\n\\t\\t\\t\"+_vm._s(_vm.t('files', 'Show hidden files'))+\"\\n\\t\\t\")]),_vm._v(\" \"),_c('NcCheckboxRadioSwitch',{attrs:{\"checked\":_vm.crop_image_previews},on:{\"update:checked\":[function($event){_vm.crop_image_previews=$event},function($event){return _vm.setConfig('crop_image_previews', $event)}]}},[_vm._v(\"\\n\\t\\t\\t\"+_vm._s(_vm.t('files', 'Crop image previews'))+\"\\n\\t\\t\")])],1),_vm._v(\" \"),(_vm.settings.length !== 0)?_c('NcAppSettingsSection',{attrs:{\"id\":\"more-settings\",\"title\":_vm.t('files', 'Additional settings')}},[_vm._l((_vm.settings),function(setting){return [_c('Setting',{key:setting.name,attrs:{\"el\":setting.el}})]})],2):_vm._e(),_vm._v(\" \"),_c('NcAppSettingsSection',{attrs:{\"id\":\"webdav\",\"title\":_vm.t('files', 'Webdav')}},[_c('NcInputField',{attrs:{\"type\":\"text\",\"readonly\":\"readonly\",\"value\":_vm.webdavUrl}}),_vm._v(\" \"),_c('em',[_c('a',{attrs:{\"href\":_vm.webdavDocs,\"target\":\"_blank\",\"rel\":\"noreferrer noopener\"}},[_vm._v(\"\\n\\t\\t\\t\\t\"+_vm._s(_vm.t('files', 'Use this address to access your Files via WebDAV'))+\" ↗\\n\\t\\t\\t\")])])],1)],1)\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<!--\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 -->\n<template>\n\t<NcAppNavigation data-cy-files-navigation>\n\t\t<template #list>\n\t\t\t<NcAppNavigationItem v-for=\"view in parentViews\"\n\t\t\t\t:key=\"view.id\"\n\t\t\t\t:allow-collapse=\"true\"\n\t\t\t\t:data-cy-files-navigation-item=\"view.id\"\n\t\t\t\t:icon=\"view.iconClass\"\n\t\t\t\t:open=\"view.expanded\"\n\t\t\t\t:pinned=\"view.sticky\"\n\t\t\t\t:title=\"view.name\"\n\t\t\t\t:to=\"generateToNavigation(view)\"\n\t\t\t\t@update:open=\"onToggleExpand($event, view)\">\n\t\t\t\t<NcAppNavigationItem v-for=\"child in childViews[view.id]\"\n\t\t\t\t\t:key=\"child.id\"\n\t\t\t\t\t:data-cy-files-navigation-item=\"child.id\"\n\t\t\t\t\t:exact=\"true\"\n\t\t\t\t\t:icon=\"child.iconClass\"\n\t\t\t\t\t:title=\"child.name\"\n\t\t\t\t\t:to=\"generateToNavigation(child)\" />\n\t\t\t</NcAppNavigationItem>\n\t\t</template>\n\n\t\t<!-- Settings toggle -->\n\t\t<template #footer>\n\t\t\t<ul class=\"app-navigation-entry__settings\">\n\t\t\t\t<NcAppNavigationItem :aria-label=\"t('files', 'Open the files app settings')\"\n\t\t\t\t\t:title=\"t('files', 'Files settings')\"\n\t\t\t\t\tdata-cy-files-navigation-settings-button\n\t\t\t\t\t@click.prevent.stop=\"openSettings\">\n\t\t\t\t\t<Cog slot=\"icon\" :size=\"20\" />\n\t\t\t\t</NcAppNavigationItem>\n\t\t\t</ul>\n\t\t</template>\n\n\t\t<!-- Settings modal-->\n\t\t<SettingsModal :open=\"settingsOpened\"\n\t\t\tdata-cy-files-navigation-settings\n\t\t\t@close=\"onSettingsClose\" />\n\t</NcAppNavigation>\n</template>\n\n<script>\nimport { emit, subscribe } from '@nextcloud/event-bus'\nimport { generateUrl } from '@nextcloud/router'\nimport axios from '@nextcloud/axios'\nimport Cog from 'vue-material-design-icons/Cog.vue'\nimport NcAppNavigation from '@nextcloud/vue/dist/Components/NcAppNavigation.js'\nimport NcAppNavigationItem from '@nextcloud/vue/dist/Components/NcAppNavigationItem.js'\n\nimport logger from '../logger.js'\nimport Navigation from '../services/Navigation.ts'\nimport SettingsModal from './Settings.vue'\n\nimport { translate } from '@nextcloud/l10n'\n\nexport default {\n\tname: 'Navigation',\n\n\tcomponents: {\n\t\tCog,\n\t\tNcAppNavigation,\n\t\tNcAppNavigationItem,\n\t\tSettingsModal,\n\t},\n\n\tprops: {\n\t\t// eslint-disable-next-line vue/prop-name-casing\n\t\tNavigation: {\n\t\t\ttype: Navigation,\n\t\t\trequired: true,\n\t\t},\n\t},\n\n\tdata() {\n\t\treturn {\n\t\t\tsettingsOpened: false,\n\t\t}\n\t},\n\n\tcomputed: {\n\t\tcurrentViewId() {\n\t\t\treturn this.$route?.params?.view || 'files'\n\t\t},\n\t\tcurrentView() {\n\t\t\treturn this.views.find(view => view.id === this.currentViewId)\n\t\t},\n\n\t\t/** @return {Navigation[]} */\n\t\tviews() {\n\t\t\treturn this.Navigation.views\n\t\t},\n\t\tparentViews() {\n\t\t\treturn this.views\n\t\t\t\t// filter child views\n\t\t\t\t.filter(view => !view.parent)\n\t\t\t\t// sort views by order\n\t\t\t\t.sort((a, b) => {\n\t\t\t\t\treturn a.order - b.order\n\t\t\t\t})\n\t\t},\n\t\tchildViews() {\n\t\t\treturn this.views\n\t\t\t\t// filter parent views\n\t\t\t\t.filter(view => !!view.parent)\n\t\t\t\t// create a map of parents and their children\n\t\t\t\t.reduce((list, view) => {\n\t\t\t\t\tlist[view.parent] = [...(list[view.parent] || []), view]\n\t\t\t\t\t// Sort children by order\n\t\t\t\t\tlist[view.parent].sort((a, b) => {\n\t\t\t\t\t\treturn a.order - b.order\n\t\t\t\t\t})\n\t\t\t\t\treturn list\n\t\t\t\t}, {})\n\t\t},\n\t},\n\n\twatch: {\n\t\tcurrentView(view, oldView) {\n\t\t\tlogger.debug('View changed', { id: view.id, view })\n\t\t\tthis.showView(view, oldView)\n\t\t},\n\t},\n\n\tbeforeMount() {\n\t\tif (this.currentView) {\n\t\t\tlogger.debug('Navigation mounted. Showing requested view', { view: this.currentView })\n\t\t\tthis.showView(this.currentView)\n\t\t}\n\n\t\tsubscribe('files:legacy-navigation:changed', this.onLegacyNavigationChanged)\n\t},\n\n\tmethods: {\n\t\t/**\n\t\t * @param {Navigation} view the new active view\n\t\t * @param {Navigation} oldView the old active view\n\t\t */\n\t\tshowView(view, oldView) {\n\t\t\t// Closing any opened sidebar\n\t\t\twindow?.OCA?.Files?.Sidebar?.close?.()\n\n\t\t\tif (view.legacy) {\n\t\t\t\tconst newAppContent = document.querySelector('#app-content #app-content-' + this.currentView.id + '.viewcontainer')\n\t\t\t\tdocument.querySelectorAll('#app-content .viewcontainer').forEach(el => {\n\t\t\t\t\tel.classList.add('hidden')\n\t\t\t\t})\n\t\t\t\tnewAppContent.classList.remove('hidden')\n\n\t\t\t\t// Triggering legacy navigation events\n\t\t\t\tconst { dir = '/' } = OC.Util.History.parseUrlQuery()\n\t\t\t\tconst params = { itemId: view.id, dir }\n\n\t\t\t\tlogger.debug('Triggering legacy navigation event', params)\n\t\t\t\twindow.jQuery(newAppContent).trigger(new window.jQuery.Event('show', params))\n\t\t\t\twindow.jQuery(newAppContent).trigger(new window.jQuery.Event('urlChanged', params))\n\n\t\t\t}\n\n\t\t\tthis.Navigation.setActive(view)\n\t\t\temit('files:navigation:changed', view)\n\t\t},\n\n\t\t/**\n\t\t * Coming from the legacy files app.\n\t\t * TODO: remove when all views are migrated.\n\t\t *\n\t\t * @param {Navigation} view the new active view\n\t\t */\n\t\tonLegacyNavigationChanged({ id } = { id: 'files' }) {\n\t\t\tconst view = this.Navigation.views.find(view => view.id === id)\n\t\t\tif (view && view.legacy && view.id !== this.currentView.id) {\n\t\t\t\t// Force update the current route as the request comes\n\t\t\t\t// from the legacy files app router\n\t\t\t\tthis.$router.replace({ ...this.$route, params: { view: view.id } })\n\t\t\t\tthis.Navigation.setActive(view)\n\t\t\t\tthis.showView(view)\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Expand/collapse a a view with children and permanently\n\t\t * save this setting in the server.\n\t\t *\n\t\t * @param {Navigation} view the view to toggle\n\t\t */\n\t\tonToggleExpand(view) {\n\t\t\t// Invert state\n\t\t\tview.expanded = !view.expanded\n\t\t\taxios.post(generateUrl(`/apps/files/api/v1/toggleShowFolder/${view.id}`), { show: view.expanded })\n\t\t},\n\n\t\t/**\n\t\t * Generate the route to a view\n\t\t * @param {Navigation} view the view to toggle\n\t\t */\n\t\tgenerateToNavigation(view) {\n\t\t\tif (view.params) {\n\t\t\t\tconst { dir, fileid } = view.params\n\t\t\t\treturn { name: 'filelist', params: view.params, query: { dir, fileid } }\n\t\t\t}\n\t\t\treturn { name: 'filelist', params: { view: view.id } }\n\t\t},\n\n\t\t/**\n\t\t * Open the settings modal\n\t\t */\n\t\topenSettings() {\n\t\t\tthis.settingsOpened = true\n\t\t},\n\n\t\t/**\n\t\t * Close the settings modal\n\t\t */\n\t\tonSettingsClose() {\n\t\t\tthis.settingsOpened = false\n\t\t},\n\n\t\tt: translate,\n\t},\n}\n</script>\n\n<style scoped lang=\"scss\">\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</style>\n","import mod from \"-!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Navigation.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Navigation.vue?vue&type=script&lang=js&\"","\n import API from \"!../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/sass-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Navigation.vue?vue&type=style&index=0&id=527f6b74&prod&scoped=true&lang=scss&\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\n\n options.insert = insertFn.bind(null, \"head\");\n \noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/sass-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Navigation.vue?vue&type=style&index=0&id=527f6b74&prod&scoped=true&lang=scss&\";\n export default content && content.locals ? content.locals : undefined;\n","import { render, staticRenderFns } from \"./Navigation.vue?vue&type=template&id=527f6b74&scoped=true&\"\nimport script from \"./Navigation.vue?vue&type=script&lang=js&\"\nexport * from \"./Navigation.vue?vue&type=script&lang=js&\"\nimport style0 from \"./Navigation.vue?vue&type=style&index=0&id=527f6b74&prod&scoped=true&lang=scss&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"527f6b74\",\n null\n \n)\n\nexport default component.exports","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('NcAppNavigation',{attrs:{\"data-cy-files-navigation\":\"\"},scopedSlots:_vm._u([{key:\"list\",fn:function(){return _vm._l((_vm.parentViews),function(view){return _c('NcAppNavigationItem',{key:view.id,attrs:{\"allow-collapse\":true,\"data-cy-files-navigation-item\":view.id,\"icon\":view.iconClass,\"open\":view.expanded,\"pinned\":view.sticky,\"title\":view.name,\"to\":_vm.generateToNavigation(view)},on:{\"update:open\":function($event){return _vm.onToggleExpand($event, view)}}},_vm._l((_vm.childViews[view.id]),function(child){return _c('NcAppNavigationItem',{key:child.id,attrs:{\"data-cy-files-navigation-item\":child.id,\"exact\":true,\"icon\":child.iconClass,\"title\":child.name,\"to\":_vm.generateToNavigation(child)}})}),1)})},proxy:true},{key:\"footer\",fn:function(){return [_c('ul',{staticClass:\"app-navigation-entry__settings\"},[_c('NcAppNavigationItem',{attrs:{\"aria-label\":_vm.t('files', 'Open the files app settings'),\"title\":_vm.t('files', 'Files settings'),\"data-cy-files-navigation-settings-button\":\"\"},on:{\"click\":function($event){$event.preventDefault();$event.stopPropagation();return _vm.openSettings.apply(null, arguments)}}},[_c('Cog',{attrs:{\"slot\":\"icon\",\"size\":20},slot:\"icon\"})],1)],1)]},proxy:true}])},[_vm._v(\" \"),_vm._v(\" \"),_c('SettingsModal',{attrs:{\"open\":_vm.settingsOpened,\"data-cy-files-navigation-settings\":\"\"},on:{\"close\":_vm.onSettingsClose}})],1)\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","/**\n * @copyright Copyright (c) 2019 Gary Kim <gary@garykim.dev>\n *\n * @author Gary Kim <gary@garykim.dev>\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\nexport default class Settings {\n\n\t_settings\n\n\tconstructor() {\n\t\tthis._settings = []\n\t\tconsole.debug('OCA.Files.Settings initialized')\n\t}\n\n\t/**\n\t * Register a new setting\n\t *\n\t * @since 19.0.0\n\t * @param {OCA.Files.Settings.Setting} view element to add to settings\n\t * @return {boolean} whether registering was successful\n\t */\n\tregister(view) {\n\t\tif (this._settings.filter(e => e.name === view.name).length > 0) {\n\t\t\tconsole.error('A setting with the same name is already registered')\n\t\t\treturn false\n\t\t}\n\t\tthis._settings.push(view)\n\t\treturn true\n\t}\n\n\t/**\n\t * All settings elements\n\t *\n\t * @return {OCA.Files.Settings.Setting[]} All currently registered settings\n\t */\n\tget settings() {\n\t\treturn this._settings\n\t}\n\n}\n","/**\n * @copyright Copyright (c) 2019 Gary Kim <gary@garykim.dev>\n * @copyright Copyright (c) 2019 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author Gary Kim <gary@garykim.dev>\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\nexport default class Setting {\n\n\t_close\n\t_el\n\t_name\n\t_open\n\n\t/**\n\t * Create a new files app setting\n\t *\n\t * @since 19.0.0\n\t * @param {string} name the name of this setting\n\t * @param {object} component the component\n\t * @param {Function} component.el function that returns an unmounted dom element to be added\n\t * @param {Function} [component.open] callback for when setting is added\n\t * @param {Function} [component.close] callback for when setting is closed\n\t */\n\tconstructor(name, { el, open, close }) {\n\t\tthis._name = name\n\t\tthis._el = el\n\t\tthis._open = open\n\t\tthis._close = close\n\n\t\tif (typeof this._open !== 'function') {\n\t\t\tthis._open = () => {}\n\t\t}\n\n\t\tif (typeof this._close !== 'function') {\n\t\t\tthis._close = () => {}\n\t\t}\n\t}\n\n\tget name() {\n\t\treturn this._name\n\t}\n\n\tget el() {\n\t\treturn this._el\n\t}\n\n\tget open() {\n\t\treturn this._open\n\t}\n\n\tget close() {\n\t\treturn this._close\n\t}\n\n}\n","/**\n * @copyright Copyright (c) 2022 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 */\nimport Vue from 'vue'\nimport Router from 'vue-router'\nimport { generateUrl } from '@nextcloud/router'\nimport { stringify } from 'query-string'\n\nVue.use(Router)\n\nconst router = new Router({\n\tmode: 'history',\n\n\t// if index.php is in the url AND we got this far, then it's working:\n\t// let's keep using index.php in the url\n\tbase: generateUrl('/apps/files', ''),\n\tlinkActiveClass: 'active',\n\n\troutes: [\n\t\t{\n\t\t\tpath: '/',\n\t\t\t// Pretending we're using the default view\n\t\t\talias: '/files',\n\t\t},\n\t\t{\n\t\t\tpath: '/:view/:fileid?',\n\t\t\tname: 'filelist',\n\t\t\tprops: true,\n\t\t},\n\t],\n\n\t// Custom stringifyQuery to prevent encoding of slashes in the url\n\tstringifyQuery(query) {\n\t\tconst result = stringify(query).replace(/%2F/gmi, '/')\n\t\treturn result ? ('?' + result) : ''\n\t},\n})\n\nexport default router\n","import './templates.js'\nimport './legacy/filelistSearch.js'\nimport processLegacyFilesViews from './legacy/navigationMapper.js'\n\nimport Vue from 'vue'\nimport NavigationService from './services/Navigation.ts'\nimport NavigationView from './views/Navigation.vue'\n\nimport SettingsService from './services/Settings.js'\nimport SettingsModel from './models/Setting.js'\n\nimport router from './router/router.js'\n\n// Init private and public Files namespace\nwindow.OCA.Files = window.OCA.Files ?? {}\nwindow.OCP.Files = window.OCP.Files ?? {}\n\n// Init Navigation Service\nconst Navigation = new NavigationService()\nObject.assign(window.OCP.Files, { Navigation })\n\n// Init Files App Settings Service\nconst Settings = new SettingsService()\nObject.assign(window.OCA.Files, { Settings })\nObject.assign(window.OCA.Files.Settings, { Setting: SettingsModel })\n\n// Init Navigation View\nconst View = Vue.extend(NavigationView)\nconst FilesNavigationRoot = new View({\n\tname: 'FilesNavigationRoot',\n\tpropsData: {\n\t\tNavigation,\n\t},\n\trouter,\n})\nFilesNavigationRoot.$mount('#app-navigation-files')\n\n// Init legacy files views\nprocessLegacyFilesViews()\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".template-picker__item[data-v-440aea22]{display:flex}.template-picker__label[data-v-440aea22]{display:flex;align-items:center;flex:1 1;flex-direction:column}.template-picker__label[data-v-440aea22],.template-picker__label *[data-v-440aea22]{cursor:pointer;user-select:none}.template-picker__label[data-v-440aea22]::before{display:none !important}.template-picker__preview[data-v-440aea22]{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-440aea22]{border-color:var(--color-primary)}.template-picker__preview--failed[data-v-440aea22]{display:flex}.template-picker__image[data-v-440aea22]{max-width:100%;background-color:var(--color-main-background);object-fit:cover}.template-picker__preview--failed .template-picker__image[data-v-440aea22]{width:calc(var(--margin)*8);margin:auto;background-color:rgba(0,0,0,0) !important;object-fit:initial}.template-picker__title[data-v-440aea22]{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\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".app-navigation[data-v-527f6b74] .app-navigation-entry-icon{background-repeat:no-repeat;background-position:center}.app-navigation>ul.app-navigation__list[data-v-527f6b74]{padding-bottom:var(--default-grid-baseline, 4px)}.app-navigation-entry__settings[data-v-527f6b74]{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\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".templates-picker__form[data-v-55dd9121]{padding:calc(var(--margin)*2);padding-bottom:0}.templates-picker__form h2[data-v-55dd9121]{text-align:center;font-weight:bold;margin:var(--margin) 0 calc(var(--margin)*2)}.templates-picker__list[data-v-55dd9121]{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-55dd9121]{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-55dd9121],.templates-picker__buttons input[type=submit][data-v-55dd9121]{height:44px}.templates-picker[data-v-55dd9121] .modal-container{position:relative}.templates-picker__loading[data-v-55dd9121]{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\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","__webpack_require__.amdD = function () {\n\tthrow new Error('define cannot be used indirect');\n};","__webpack_require__.amdO = {};","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = function(module) {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","__webpack_require__.j = 2181;","__webpack_require__.b = document.baseURI || self.location.href;\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t2181: 0\n};\n\n// no chunk on demand loading\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n__webpack_require__.O.j = function(chunkId) { return installedChunks[chunkId] === 0; };\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = function(parentChunkLoadingFunction, data) {\n\tvar chunkIds = data[0];\n\tvar moreModules = data[1];\n\tvar runtime = data[2];\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some(function(id) { return installedChunks[id] !== 0; })) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\treturn __webpack_require__.O(result);\n}\n\nvar chunkLoadingGlobal = self[\"webpackChunknextcloud\"] = self[\"webpackChunknextcloud\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","__webpack_require__.nc = undefined;","// startup\n// Load entry module and return exports\n// This entry module depends on other loaded chunks and execution need to be delayed\nvar __webpack_exports__ = __webpack_require__.O(undefined, [7874], function() { return __webpack_require__(71925); })\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n"],"names":["deferred","getCurrentDirectory","currentDirInfo","OCA","Files","App","currentFileList","dirInfo","path","name","replace","getTemplates","axios","generateOcsUrl","response","data","ocs","createFromTemplate","filePath","templatePath","templateType","inheritAttrs","props","basename","type","required","checked","default","fileid","filename","previewUrl","hasPreview","mime","ratio","failedPreview","computed","nameWithoutExt","id","realPreviewUrl","getCurrentUser","document","getElementById","value","pathSections","startsWith","split","relativePath","forEach","section","encodeURIComponent","mimeIcon","methods","onCheck","onFailure","options","styleTagTransform","setAttributes","insert","domAPI","insertStyleElement","_vm","this","_c","_self","staticClass","attrs","domProps","on","_v","class","_s","components","NcEmptyContent","NcModal","TemplatePreview","logger","loading","opened","provider","emptyTemplate","selectedTemplate","style","open","templates","fetchedProvider","close","onSubmit","currentDirectory","fileList","extension","normalize","fileInfo","model","filesClient","fileAction","$file","dir","fileActions","fileInfoModel","console","showError","$event","preventDefault","stopPropagation","apply","arguments","t","_b","_l","template","key","_e","getLoggerBuilder","setApp","detectUser","build","Vue","n","TemplatePickerRoot","createElement","body","appendChild","loadState","templatesPath","debug","TemplatePicker","TemplatePickerView","propsData","$mount","window","addEventListener","initTemplatesPlugin","attach","menu","addMenuEntry","displayName","templateName","iconClass","fileType","actionHandler","initTemplatesFolder","removeMenuEntry","OC","Plugins","register","index","newTemplatePlugin","app","label","FilesPlugin","copySystemTemplates","changeDirectory","template_path","error","subscribe","query","setFilter","registerLegacyView","order","icon","parent","classes","expanded","params","OCP","Navigation","legacy","sticky","includes","view","isValidNavigation","isUniqueNavigation","_views","e","Error","message","push","_currentView","views","find","search","getFiles","isSvg","columns","isValidColumn","emptyView","column","title","property","sortFunction","summary","el","mounted","show_hidden","crop_image_previews","NcAppSettingsDialog","NcAppSettingsSection","NcCheckboxRadioSwitch","NcInputField","Setting","userConfig","settings","webdavUrl","webdavDocs","beforeMount","beforeDestroy","onClose","setConfig","emit","length","setting","Cog","NcAppNavigation","NcAppNavigationItem","SettingsModal","settingsOpened","currentViewId","currentView","parentViews","filter","sort","childViews","reduce","list","watch","showView","newAppContent","itemId","onLegacyNavigationChanged","onToggleExpand","show","generateToNavigation","openSettings","onSettingsClose","scopedSlots","_u","fn","child","proxy","slot","Settings","_settings","_name","_el","_open","_close","Router","mode","base","generateUrl","linkActiveClass","routes","alias","stringifyQuery","result","stringify","NavigationService","Object","assign","legacyViews","SettingsService","SettingsModel","NavigationView","router","values","sublist","subview","___CSS_LOADER_EXPORT___","module","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","exports","loaded","__webpack_modules__","call","m","amdD","amdO","O","chunkIds","priority","notFulfilled","Infinity","i","fulfilled","j","keys","every","splice","r","getter","__esModule","d","a","definition","o","defineProperty","enumerable","get","g","globalThis","Function","obj","prop","prototype","hasOwnProperty","Symbol","toStringTag","nmd","paths","children","b","baseURI","self","location","href","installedChunks","chunkId","webpackJsonpCallback","parentChunkLoadingFunction","moreModules","runtime","some","chunkLoadingGlobal","bind","nc","__webpack_exports__"],"sourceRoot":""}
\ No newline at end of file
+{"version":3,"file":"files-main.js?v=88e77c81a85acad351a0","mappings":";6BAAIA,qFC8CSC,EAAsB,WAAW,YACvCC,GAAoB,QAAH,EAAAC,WAAG,OAAO,QAAP,EAAH,EAAKC,aAAK,OAAK,QAAL,EAAV,EAAYC,WAAG,OAAiB,QAAjB,EAAf,EAAiBC,uBAAe,WAA7B,EAAH,EAAkCC,UACrD,CAAEC,KAAM,IAAKC,KAAM,IAGvB,MAAO,UAAGP,EAAeM,KAAI,YAAIN,EAAeO,MAAOC,QAAQ,SAAU,IAC1E,iZC3BO,IAAMC,EAAY,4CAAG,mHACJC,EAAAA,QAAAA,KAAUC,EAAAA,EAAAA,gBAAe,gCAA+B,OAAjE,OAARC,EAAW,EAAH,uBACPA,EAASC,KAAKC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rED,EAAgBC,GAAS,KAE1BD,EAAgBC,GAAW,EAE5B,OAAOlD,EAAoBW,EAAE3B,EAC9B,EAEIwE,EAAqBV,KAA4B,sBAAIA,KAA4B,uBAAK,GAC1FU,EAAmB/R,QAAQ0R,EAAqBM,KAAK,KAAM,IAC3DD,EAAmB9J,KAAOyJ,EAAqBM,KAAK,KAAMD,EAAmB9J,KAAK+J,KAAKD,OClDvFxD,EAAoB0D,QAAKvD,ECGzB,IAAIwD,EAAsB3D,EAAoBW,OAAER,EAAW,CAAC,OAAO,WAAa,OAAOH,EAAoB,MAAQ,IACnH2D,EAAsB3D,EAAoBW,EAAEgD","sources":["webpack:///nextcloud/webpack/runtime/chunk loaded","webpack:///nextcloud/apps/files/src/utils/davUtils.js","webpack:///nextcloud/apps/files/src/services/Templates.js","webpack:///nextcloud/apps/files/src/components/TemplatePreview.vue","webpack:///nextcloud/apps/files/src/utils/fileUtils.js","webpack:///nextcloud/apps/files/src/components/TemplatePreview.vue?vue&type=script&lang=js&","webpack://nextcloud/./apps/files/src/components/TemplatePreview.vue?c067","webpack://nextcloud/./apps/files/src/components/TemplatePreview.vue?81db","webpack://nextcloud/./apps/files/src/components/TemplatePreview.vue?c414","webpack:///nextcloud/apps/files/src/views/TemplatePicker.vue","webpack:///nextcloud/apps/files/src/views/TemplatePicker.vue?vue&type=script&lang=js&","webpack://nextcloud/./apps/files/src/views/TemplatePicker.vue?023e","webpack://nextcloud/./apps/files/src/views/TemplatePicker.vue?afd8","webpack://nextcloud/./apps/files/src/views/TemplatePicker.vue?1f7b","webpack:///nextcloud/apps/files/src/templates.js","webpack:///nextcloud/apps/files/src/legacy/filelistSearch.js","webpack:///nextcloud/apps/files/src/logger.js","webpack:///nextcloud/apps/files/src/legacy/navigationMapper.js","webpack:///nextcloud/apps/files/src/services/Navigation.ts","webpack:///nextcloud/apps/files/src/components/Setting.vue?vue&type=script&lang=js&","webpack:///nextcloud/apps/files/src/components/Setting.vue","webpack://nextcloud/./apps/files/src/components/Setting.vue?98ea","webpack://nextcloud/./apps/files/src/components/Setting.vue?8d57","webpack:///nextcloud/apps/files/src/views/Settings.vue","webpack:///nextcloud/apps/files/src/views/Settings.vue?vue&type=script&lang=js&","webpack://nextcloud/./apps/files/src/views/Settings.vue?b81b","webpack://nextcloud/./apps/files/src/views/Settings.vue?84f7","webpack:///nextcloud/apps/files/src/views/Navigation.vue","webpack:///nextcloud/apps/files/src/views/Navigation.vue?vue&type=script&lang=js&","webpack://nextcloud/./apps/files/src/views/Navigation.vue?e91d","webpack://nextcloud/./apps/files/src/views/Navigation.vue?74b9","webpack://nextcloud/./apps/files/src/views/Navigation.vue?8122","webpack:///nextcloud/apps/files/src/services/Settings.js","webpack:///nextcloud/apps/files/src/models/Setting.js","webpack:///nextcloud/apps/files/src/router/router.js","webpack:///nextcloud/apps/files/src/main.js","webpack:///nextcloud/apps/files/src/components/TemplatePreview.vue?vue&type=style&index=0&id=440aea22&prod&lang=scss&scoped=true&","webpack:///nextcloud/apps/files/src/views/Navigation.vue?vue&type=style&index=0&id=0a069b20&prod&scoped=true&lang=scss&","webpack:///nextcloud/apps/files/src/views/TemplatePicker.vue?vue&type=style&index=0&id=55dd9121&prod&lang=scss&scoped=true&","webpack:///nextcloud/webpack/bootstrap","webpack:///nextcloud/webpack/runtime/amd define","webpack:///nextcloud/webpack/runtime/amd options","webpack:///nextcloud/webpack/runtime/compat get default export","webpack:///nextcloud/webpack/runtime/define property getters","webpack:///nextcloud/webpack/runtime/global","webpack:///nextcloud/webpack/runtime/hasOwnProperty shorthand","webpack:///nextcloud/webpack/runtime/make namespace object","webpack:///nextcloud/webpack/runtime/node module decorator","webpack:///nextcloud/webpack/runtime/runtimeId","webpack:///nextcloud/webpack/runtime/jsonp chunk loading","webpack:///nextcloud/webpack/runtime/nonce","webpack:///nextcloud/webpack/startup"],"sourcesContent":["var deferred = [];\n__webpack_require__.O = function(result, chunkIds, fn, priority) {\n\tif(chunkIds) {\n\t\tpriority = priority || 0;\n\t\tfor(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];\n\t\tdeferred[i] = [chunkIds, fn, priority];\n\t\treturn;\n\t}\n\tvar notFulfilled = Infinity;\n\tfor (var i = 0; i < deferred.length; i++) {\n\t\tvar chunkIds = deferred[i][0];\n\t\tvar fn = deferred[i][1];\n\t\tvar priority = deferred[i][2];\n\t\tvar fulfilled = true;\n\t\tfor (var j = 0; j < chunkIds.length; j++) {\n\t\t\tif ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every(function(key) { return __webpack_require__.O[key](chunkIds[j]); })) {\n\t\t\t\tchunkIds.splice(j--, 1);\n\t\t\t} else {\n\t\t\t\tfulfilled = false;\n\t\t\t\tif(priority < notFulfilled) notFulfilled = priority;\n\t\t\t}\n\t\t}\n\t\tif(fulfilled) {\n\t\t\tdeferred.splice(i--, 1)\n\t\t\tvar r = fn();\n\t\t\tif (r !== undefined) result = r;\n\t\t}\n\t}\n\treturn result;\n};","/**\n * @copyright Copyright (c) 2019 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\nimport { generateRemoteUrl } from '@nextcloud/router'\nimport { getCurrentUser } from '@nextcloud/auth'\n\nexport const getRootPath = function() {\n\tif (getCurrentUser()) {\n\t\treturn generateRemoteUrl(`dav/files/${getCurrentUser().uid}`)\n\t} else {\n\t\treturn generateRemoteUrl('webdav').replace('/remote.php', '/public.php')\n\t}\n}\n\nexport const isPublic = function() {\n\treturn !getCurrentUser()\n}\n\nexport const getToken = function() {\n\treturn document.getElementById('sharingToken') && document.getElementById('sharingToken').value\n}\n\n/**\n * Return the current directory, fallback to root\n *\n * @return {string}\n */\nexport const getCurrentDirectory = function() {\n\tconst currentDirInfo = OCA?.Files?.App?.currentFileList?.dirInfo\n\t\t|| { path: '/', name: '' }\n\n\t// Make sure we don't have double slashes\n\treturn `${currentDirInfo.path}/${currentDirInfo.name}`.replace(/\\/\\//gi, '/')\n}\n","/**\n * @copyright Copyright (c) 2021 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\nimport { generateOcsUrl } from '@nextcloud/router'\nimport axios from '@nextcloud/axios'\n\nexport const getTemplates = async function() {\n\tconst response = await axios.get(generateOcsUrl('apps/files/api/v1/templates'))\n\treturn response.data.ocs.data\n}\n\n/**\n * Create a new file from a specified template\n *\n * @param {string} filePath The new file destination path\n * @param {string} templatePath The template source path\n * @param {string} templateType The template type e.g 'user'\n */\nexport const createFromTemplate = async function(filePath, templatePath, templateType) {\n\tconst response = await axios.post(generateOcsUrl('apps/files/api/v1/templates/create'), {\n\t\tfilePath,\n\t\ttemplatePath,\n\t\ttemplateType,\n\t})\n\treturn response.data.ocs.data\n}\n","<!--\n - @copyright Copyright (c) 2020 John Molakvoæ <skjnldsv@protonmail.com>\n -\n - @author John Molakvoæ <skjnldsv@protonmail.com>\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 -->\n\n<template>\n\t<li class=\"template-picker__item\">\n\t\t<input :id=\"id\"\n\t\t\t:checked=\"checked\"\n\t\t\ttype=\"radio\"\n\t\t\tclass=\"radio\"\n\t\t\tname=\"template-picker\"\n\t\t\t@change=\"onCheck\">\n\n\t\t<label :for=\"id\" class=\"template-picker__label\">\n\t\t\t<div class=\"template-picker__preview\"\n\t\t\t\t:class=\"failedPreview ? 'template-picker__preview--failed' : ''\">\n\t\t\t\t<img class=\"template-picker__image\"\n\t\t\t\t\t:src=\"realPreviewUrl\"\n\t\t\t\t\talt=\"\"\n\t\t\t\t\tdraggable=\"false\"\n\t\t\t\t\t@error=\"onFailure\">\n\t\t\t</div>\n\n\t\t\t<span class=\"template-picker__title\">\n\t\t\t\t{{ nameWithoutExt }}\n\t\t\t</span>\n\t\t</label>\n\t</li>\n</template>\n\n<script>\nimport { generateUrl } from '@nextcloud/router'\nimport { encodeFilePath } from '../utils/fileUtils'\nimport { getToken, isPublic } from '../utils/davUtils'\n\n// preview width generation\nconst previewWidth = 256\n\nexport default {\n\tname: 'TemplatePreview',\n\tinheritAttrs: false,\n\n\tprops: {\n\t\tbasename: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\t\tchecked: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t\tfileid: {\n\t\t\ttype: [String, Number],\n\t\t\trequired: true,\n\t\t},\n\t\tfilename: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\t\tpreviewUrl: {\n\t\t\ttype: String,\n\t\t\tdefault: null,\n\t\t},\n\t\thasPreview: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\t\tmime: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\t\tratio: {\n\t\t\ttype: Number,\n\t\t\tdefault: null,\n\t\t},\n\t},\n\n\tdata() {\n\t\treturn {\n\t\t\tfailedPreview: false,\n\t\t}\n\t},\n\n\tcomputed: {\n\t\t/**\n\t\t * Strip away extension from name\n\t\t *\n\t\t * @return {string}\n\t\t */\n\t\tnameWithoutExt() {\n\t\t\treturn this.basename.indexOf('.') > -1 ? this.basename.split('.').slice(0, -1).join('.') : this.basename\n\t\t},\n\n\t\tid() {\n\t\t\treturn `template-picker-${this.fileid}`\n\t\t},\n\n\t\trealPreviewUrl() {\n\t\t\t// If original preview failed, fallback to mime icon\n\t\t\tif (this.failedPreview && this.mimeIcon) {\n\t\t\t\treturn this.mimeIcon\n\t\t\t}\n\n\t\t\tif (this.previewUrl) {\n\t\t\t\treturn this.previewUrl\n\t\t\t}\n\t\t\t// TODO: find a nicer standard way of doing this?\n\t\t\tif (isPublic()) {\n\t\t\t\treturn generateUrl(`/apps/files_sharing/publicpreview/${getToken()}?fileId=${this.fileid}&file=${encodeFilePath(this.filename)}&x=${previewWidth}&y=${previewWidth}&a=1`)\n\t\t\t}\n\t\t\treturn generateUrl(`/core/preview?fileId=${this.fileid}&x=${previewWidth}&y=${previewWidth}&a=1`)\n\t\t},\n\n\t\tmimeIcon() {\n\t\t\treturn OC.MimeType.getIconUrl(this.mime)\n\t\t},\n\t},\n\n\tmethods: {\n\t\tonCheck() {\n\t\t\tthis.$emit('check', this.fileid)\n\t\t},\n\t\tonFailure() {\n\t\t\tthis.failedPreview = true\n\t\t},\n\t},\n}\n</script>\n\n<style lang=\"scss\" scoped>\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</style>\n","/**\n * @copyright Copyright (c) 2021 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\nconst encodeFilePath = function(path) {\n\tconst pathSections = (path.startsWith('/') ? path : `/${path}`).split('/')\n\tlet relativePath = ''\n\tpathSections.forEach((section) => {\n\t\tif (section !== '') {\n\t\t\trelativePath += '/' + encodeURIComponent(section)\n\t\t}\n\t})\n\treturn relativePath\n}\n\n/**\n * Extract dir and name from file path\n *\n * @param {string} path the full path\n * @return {string[]} [dirPath, fileName]\n */\nconst extractFilePaths = function(path) {\n\tconst pathSections = path.split('/')\n\tconst fileName = pathSections[pathSections.length - 1]\n\tconst dirPath = pathSections.slice(0, pathSections.length - 1).join('/')\n\treturn [dirPath, fileName]\n}\n\nexport { encodeFilePath, extractFilePaths }\n","import mod from \"-!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TemplatePreview.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TemplatePreview.vue?vue&type=script&lang=js&\"","\n import API from \"!../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/sass-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TemplatePreview.vue?vue&type=style&index=0&id=440aea22&prod&lang=scss&scoped=true&\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\n\n options.insert = insertFn.bind(null, \"head\");\n \noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/sass-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TemplatePreview.vue?vue&type=style&index=0&id=440aea22&prod&lang=scss&scoped=true&\";\n export default content && content.locals ? content.locals : undefined;\n","import { render, staticRenderFns } from \"./TemplatePreview.vue?vue&type=template&id=440aea22&scoped=true&\"\nimport script from \"./TemplatePreview.vue?vue&type=script&lang=js&\"\nexport * from \"./TemplatePreview.vue?vue&type=script&lang=js&\"\nimport style0 from \"./TemplatePreview.vue?vue&type=style&index=0&id=440aea22&prod&lang=scss&scoped=true&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"440aea22\",\n null\n \n)\n\nexport default component.exports","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('li',{staticClass:\"template-picker__item\"},[_c('input',{staticClass:\"radio\",attrs:{\"id\":_vm.id,\"type\":\"radio\",\"name\":\"template-picker\"},domProps:{\"checked\":_vm.checked},on:{\"change\":_vm.onCheck}}),_vm._v(\" \"),_c('label',{staticClass:\"template-picker__label\",attrs:{\"for\":_vm.id}},[_c('div',{staticClass:\"template-picker__preview\",class:_vm.failedPreview ? 'template-picker__preview--failed' : ''},[_c('img',{staticClass:\"template-picker__image\",attrs:{\"src\":_vm.realPreviewUrl,\"alt\":\"\",\"draggable\":\"false\"},on:{\"error\":_vm.onFailure}})]),_vm._v(\" \"),_c('span',{staticClass:\"template-picker__title\"},[_vm._v(\"\\n\\t\\t\\t\"+_vm._s(_vm.nameWithoutExt)+\"\\n\\t\\t\")])])])\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<!--\n - @copyright Copyright (c) 2020 John Molakvoæ <skjnldsv@protonmail.com>\n -\n - @author John Molakvoæ <skjnldsv@protonmail.com>\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 -->\n\n<template>\n\t<NcModal v-if=\"opened\"\n\t\t:clear-view-delay=\"-1\"\n\t\tclass=\"templates-picker\"\n\t\tsize=\"normal\"\n\t\t@close=\"close\">\n\t\t<form class=\"templates-picker__form\"\n\t\t\t:style=\"style\"\n\t\t\t@submit.prevent.stop=\"onSubmit\">\n\t\t\t<h2>{{ t('files', 'Pick a template for {name}', { name: nameWithoutExt }) }}</h2>\n\n\t\t\t<!-- Templates list -->\n\t\t\t<ul class=\"templates-picker__list\">\n\t\t\t\t<TemplatePreview v-bind=\"emptyTemplate\"\n\t\t\t\t\t:checked=\"checked === emptyTemplate.fileid\"\n\t\t\t\t\t@check=\"onCheck\" />\n\n\t\t\t\t<TemplatePreview v-for=\"template in provider.templates\"\n\t\t\t\t\t:key=\"template.fileid\"\n\t\t\t\t\tv-bind=\"template\"\n\t\t\t\t\t:checked=\"checked === template.fileid\"\n\t\t\t\t\t:ratio=\"provider.ratio\"\n\t\t\t\t\t@check=\"onCheck\" />\n\t\t\t</ul>\n\n\t\t\t<!-- Cancel and submit -->\n\t\t\t<div class=\"templates-picker__buttons\">\n\t\t\t\t<button @click=\"close\">\n\t\t\t\t\t{{ t('files', 'Cancel') }}\n\t\t\t\t</button>\n\t\t\t\t<input type=\"submit\"\n\t\t\t\t\tclass=\"primary\"\n\t\t\t\t\t:value=\"t('files', 'Create')\"\n\t\t\t\t\t:aria-label=\"t('files', 'Create a new file with the selected template')\">\n\t\t\t</div>\n\t\t</form>\n\n\t\t<NcEmptyContent v-if=\"loading\" class=\"templates-picker__loading\" icon=\"icon-loading\">\n\t\t\t{{ t('files', 'Creating file') }}\n\t\t</NcEmptyContent>\n\t</NcModal>\n</template>\n\n<script>\nimport { normalize } from 'path'\nimport { showError } from '@nextcloud/dialogs'\nimport NcEmptyContent from '@nextcloud/vue/dist/Components/NcEmptyContent'\nimport NcModal from '@nextcloud/vue/dist/Components/NcModal'\n\nimport { getCurrentDirectory } from '../utils/davUtils'\nimport { createFromTemplate, getTemplates } from '../services/Templates'\nimport TemplatePreview from '../components/TemplatePreview'\n\nconst border = 2\nconst margin = 8\nconst width = margin * 20\n\nexport default {\n\tname: 'TemplatePicker',\n\n\tcomponents: {\n\t\tNcEmptyContent,\n\t\tNcModal,\n\t\tTemplatePreview,\n\t},\n\n\tprops: {\n\t\tlogger: {\n\t\t\ttype: Object,\n\t\t\trequired: true,\n\t\t},\n\t},\n\n\tdata() {\n\t\treturn {\n\t\t\t// Check empty template by default\n\t\t\tchecked: -1,\n\t\t\tloading: false,\n\t\t\tname: null,\n\t\t\topened: false,\n\t\t\tprovider: null,\n\t\t}\n\t},\n\n\tcomputed: {\n\t\t/**\n\t\t * Strip away extension from name\n\t\t *\n\t\t * @return {string}\n\t\t */\n\t\tnameWithoutExt() {\n\t\t\treturn this.name.indexOf('.') > -1\n\t\t\t\t? this.name.split('.').slice(0, -1).join('.')\n\t\t\t\t: this.name\n\t\t},\n\n\t\temptyTemplate() {\n\t\t\treturn {\n\t\t\t\tbasename: t('files', 'Blank'),\n\t\t\t\tfileid: -1,\n\t\t\t\tfilename: this.t('files', 'Blank'),\n\t\t\t\thasPreview: false,\n\t\t\t\tmime: this.provider?.mimetypes[0] || this.provider?.mimetypes,\n\t\t\t}\n\t\t},\n\n\t\tselectedTemplate() {\n\t\t\treturn this.provider.templates.find(template => template.fileid === this.checked)\n\t\t},\n\n\t\t/**\n\t\t * Style css vars bin,d\n\t\t *\n\t\t * @return {object}\n\t\t */\n\t\tstyle() {\n\t\t\treturn {\n\t\t\t\t'--margin': margin + 'px',\n\t\t\t\t'--width': width + 'px',\n\t\t\t\t'--border': border + 'px',\n\t\t\t\t'--fullwidth': width + 2 * margin + 2 * border + 'px',\n\t\t\t\t'--height': this.provider.ratio ? Math.round(width / this.provider.ratio) + 'px' : null,\n\t\t\t}\n\t\t},\n\t},\n\n\tmethods: {\n\t\t/**\n\t\t * Open the picker\n\t\t *\n\t\t * @param {string} name the file name to create\n\t\t * @param {object} provider the template provider picked\n\t\t */\n\t\tasync open(name, provider) {\n\n\t\t\tthis.checked = this.emptyTemplate.fileid\n\t\t\tthis.name = name\n\t\t\tthis.provider = provider\n\n\t\t\tconst templates = await getTemplates()\n\t\t\tconst fetchedProvider = templates.find((fetchedProvider) => fetchedProvider.app === provider.app && fetchedProvider.label === provider.label)\n\t\t\tif (fetchedProvider === null) {\n\t\t\t\tthrow new Error('Failed to match provider in results')\n\t\t\t}\n\t\t\tthis.provider = fetchedProvider\n\n\t\t\t// If there is no templates available, just create an empty file\n\t\t\tif (fetchedProvider.templates.length === 0) {\n\t\t\t\tthis.onSubmit()\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\t// Else, open the picker\n\t\t\tthis.opened = true\n\t\t},\n\n\t\t/**\n\t\t * Close the picker and reset variables\n\t\t */\n\t\tclose() {\n\t\t\tthis.checked = this.emptyTemplate.fileid\n\t\t\tthis.loading = false\n\t\t\tthis.name = null\n\t\t\tthis.opened = false\n\t\t\tthis.provider = null\n\t\t},\n\n\t\t/**\n\t\t * Manages the radio template picker change\n\t\t *\n\t\t * @param {number} fileid the selected template file id\n\t\t */\n\t\tonCheck(fileid) {\n\t\t\tthis.checked = fileid\n\t\t},\n\n\t\tasync onSubmit() {\n\t\t\tthis.loading = true\n\t\t\tconst currentDirectory = getCurrentDirectory()\n\t\t\tconst fileList = OCA?.Files?.App?.currentFileList\n\n\t\t\t// If the file doesn't have an extension, add the default one\n\t\t\tif (this.nameWithoutExt === this.name) {\n\t\t\t\tthis.logger.debug('Fixed invalid filename', { name: this.name, extension: this.provider?.extension })\n\t\t\t\tthis.name = this.name + this.provider?.extension\n\t\t\t}\n\n\t\t\ttry {\n\t\t\t\tconst fileInfo = await createFromTemplate(\n\t\t\t\t\tnormalize(`${currentDirectory}/${this.name}`),\n\t\t\t\t\tthis.selectedTemplate?.filename,\n\t\t\t\t\tthis.selectedTemplate?.templateType,\n\t\t\t\t)\n\t\t\t\tthis.logger.debug('Created new file', fileInfo)\n\n\t\t\t\t// Fetch FileInfo and model\n\t\t\t\tconst data = await fileList?.addAndFetchFileInfo(this.name).then((status, data) => data)\n\t\t\t\tconst model = new OCA.Files.FileInfoModel(data, {\n\t\t\t\t\tfilesClient: fileList?.filesClient,\n\t\t\t\t})\n\n\t\t\t\t// Run default action\n\t\t\t\tconst fileAction = OCA.Files.fileActions.getDefaultFileAction(fileInfo.mime, 'file', OC.PERMISSION_ALL)\n\t\t\t\tif (fileAction) {\n\t\t\t\t\tfileAction.action(fileInfo.basename, {\n\t\t\t\t\t\t$file: fileList?.findFileEl(this.name),\n\t\t\t\t\t\tdir: currentDirectory,\n\t\t\t\t\t\tfileList,\n\t\t\t\t\t\tfileActions: fileList?.fileActions,\n\t\t\t\t\t\tfileInfoModel: model,\n\t\t\t\t\t})\n\t\t\t\t}\n\n\t\t\t\tthis.close()\n\t\t\t} catch (error) {\n\t\t\t\tthis.logger.error('Error while creating the new file from template')\n\t\t\t\tconsole.error(error)\n\t\t\t\tshowError(this.t('files', 'Unable to create new file from template'))\n\t\t\t} finally {\n\t\t\t\tthis.loading = false\n\t\t\t}\n\t\t},\n\t},\n}\n</script>\n\n<style lang=\"scss\" scoped>\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</style>\n","import mod from \"-!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TemplatePicker.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TemplatePicker.vue?vue&type=script&lang=js&\"","\n import API from \"!../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/sass-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TemplatePicker.vue?vue&type=style&index=0&id=55dd9121&prod&lang=scss&scoped=true&\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\n\n options.insert = insertFn.bind(null, \"head\");\n \noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/sass-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TemplatePicker.vue?vue&type=style&index=0&id=55dd9121&prod&lang=scss&scoped=true&\";\n export default content && content.locals ? content.locals : undefined;\n","import { render, staticRenderFns } from \"./TemplatePicker.vue?vue&type=template&id=55dd9121&scoped=true&\"\nimport script from \"./TemplatePicker.vue?vue&type=script&lang=js&\"\nexport * from \"./TemplatePicker.vue?vue&type=script&lang=js&\"\nimport style0 from \"./TemplatePicker.vue?vue&type=style&index=0&id=55dd9121&prod&lang=scss&scoped=true&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"55dd9121\",\n null\n \n)\n\nexport default component.exports","var render = function render(){var _vm=this,_c=_vm._self._c;return (_vm.opened)?_c('NcModal',{staticClass:\"templates-picker\",attrs:{\"clear-view-delay\":-1,\"size\":\"normal\"},on:{\"close\":_vm.close}},[_c('form',{staticClass:\"templates-picker__form\",style:(_vm.style),on:{\"submit\":function($event){$event.preventDefault();$event.stopPropagation();return _vm.onSubmit.apply(null, arguments)}}},[_c('h2',[_vm._v(_vm._s(_vm.t('files', 'Pick a template for {name}', { name: _vm.nameWithoutExt })))]),_vm._v(\" \"),_c('ul',{staticClass:\"templates-picker__list\"},[_c('TemplatePreview',_vm._b({attrs:{\"checked\":_vm.checked === _vm.emptyTemplate.fileid},on:{\"check\":_vm.onCheck}},'TemplatePreview',_vm.emptyTemplate,false)),_vm._v(\" \"),_vm._l((_vm.provider.templates),function(template){return _c('TemplatePreview',_vm._b({key:template.fileid,attrs:{\"checked\":_vm.checked === template.fileid,\"ratio\":_vm.provider.ratio},on:{\"check\":_vm.onCheck}},'TemplatePreview',template,false))})],2),_vm._v(\" \"),_c('div',{staticClass:\"templates-picker__buttons\"},[_c('button',{on:{\"click\":_vm.close}},[_vm._v(\"\\n\\t\\t\\t\\t\"+_vm._s(_vm.t('files', 'Cancel'))+\"\\n\\t\\t\\t\")]),_vm._v(\" \"),_c('input',{staticClass:\"primary\",attrs:{\"type\":\"submit\",\"aria-label\":_vm.t('files', 'Create a new file with the selected template')},domProps:{\"value\":_vm.t('files', 'Create')}})])]),_vm._v(\" \"),(_vm.loading)?_c('NcEmptyContent',{staticClass:\"templates-picker__loading\",attrs:{\"icon\":\"icon-loading\"}},[_vm._v(\"\\n\\t\\t\"+_vm._s(_vm.t('files', 'Creating file'))+\"\\n\\t\")]):_vm._e()],1):_vm._e()\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","/**\n * @copyright Copyright (c) 2020 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n * @author Julius Härtl <jus@bitgrid.net>\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\nimport { getLoggerBuilder } from '@nextcloud/logger'\nimport { loadState } from '@nextcloud/initial-state'\nimport { translate as t, translatePlural as n } from '@nextcloud/l10n'\nimport { generateOcsUrl } from '@nextcloud/router'\nimport { getCurrentDirectory } from './utils/davUtils'\nimport axios from '@nextcloud/axios'\nimport Vue from 'vue'\n\nimport TemplatePickerView from './views/TemplatePicker'\nimport { showError } from '@nextcloud/dialogs'\n\n// Set up logger\nconst logger = getLoggerBuilder()\n\t.setApp('files')\n\t.detectUser()\n\t.build()\n\n// Add translates functions\nVue.mixin({\n\tmethods: {\n\t\tt,\n\t\tn,\n\t},\n})\n\n// Create document root\nconst TemplatePickerRoot = document.createElement('div')\nTemplatePickerRoot.id = 'template-picker'\ndocument.body.appendChild(TemplatePickerRoot)\n\n// Retrieve and init templates\nlet templates = loadState('files', 'templates', [])\nlet templatesPath = loadState('files', 'templates_path', false)\nlogger.debug('Templates providers', templates)\nlogger.debug('Templates folder', { templatesPath })\n\n// Init vue app\nconst View = Vue.extend(TemplatePickerView)\nconst TemplatePicker = new View({\n\tname: 'TemplatePicker',\n\tpropsData: {\n\t\tlogger,\n\t},\n})\nTemplatePicker.$mount('#template-picker')\n\n// Init template engine after load to make sure it's the last injected entry\nwindow.addEventListener('DOMContentLoaded', function() {\n\tif (!templatesPath) {\n\t\tlogger.debug('Templates folder not initialized')\n\t\tconst initTemplatesPlugin = {\n\t\t\tattach(menu) {\n\t\t\t\t// register the new menu entry\n\t\t\t\tmenu.addMenuEntry({\n\t\t\t\t\tid: 'template-init',\n\t\t\t\t\tdisplayName: t('files', 'Set up templates folder'),\n\t\t\t\t\ttemplateName: t('files', 'Templates'),\n\t\t\t\t\ticonClass: 'icon-template-add',\n\t\t\t\t\tfileType: 'file',\n\t\t\t\t\tactionHandler(name) {\n\t\t\t\t\t\tinitTemplatesFolder(name)\n\t\t\t\t\t\tmenu.removeMenuEntry('template-init')\n\t\t\t\t\t},\n\t\t\t\t})\n\t\t\t},\n\t\t}\n\t\tOC.Plugins.register('OCA.Files.NewFileMenu', initTemplatesPlugin)\n\t}\n})\n\n// Init template files menu\ntemplates.forEach((provider, index) => {\n\tconst newTemplatePlugin = {\n\t\tattach(menu) {\n\t\t\tconst fileList = menu.fileList\n\n\t\t\t// only attach to main file list, public view is not supported yet\n\t\t\tif (fileList.id !== 'files' && fileList.id !== 'files.public') {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\t// register the new menu entry\n\t\t\tmenu.addMenuEntry({\n\t\t\t\tid: `template-new-${provider.app}-${index}`,\n\t\t\t\tdisplayName: provider.label,\n\t\t\t\ttemplateName: provider.label + provider.extension,\n\t\t\t\ticonClass: provider.iconClass || 'icon-file',\n\t\t\t\tfileType: 'file',\n\t\t\t\tactionHandler(name) {\n\t\t\t\t\tTemplatePicker.open(name, provider)\n\t\t\t\t},\n\t\t\t})\n\t\t},\n\t}\n\tOC.Plugins.register('OCA.Files.NewFileMenu', newTemplatePlugin)\n})\n\n/**\n * Init the template directory\n *\n * @param {string} name the templates folder name\n */\nconst initTemplatesFolder = async function(name) {\n\tconst templatePath = (getCurrentDirectory() + `/${name}`).replace('//', '/')\n\ttry {\n\t\tlogger.debug('Initializing the templates directory', { templatePath })\n\t\tconst response = await axios.post(generateOcsUrl('apps/files/api/v1/templates/path'), {\n\t\t\ttemplatePath,\n\t\t\tcopySystemTemplates: true,\n\t\t})\n\n\t\t// Go to template directory\n\t\tOCA.Files.App.currentFileList.changeDirectory(templatePath, true, true)\n\n\t\ttemplates = response.data.ocs.data.templates\n\t\ttemplatesPath = response.data.ocs.data.template_path\n\t} catch (error) {\n\t\tlogger.error('Unable to initialize the templates directory')\n\t\tshowError(t('files', 'Unable to initialize the templates directory'))\n\t}\n}\n","/*\n * @copyright Copyright (c) 2021 Julius Härtl <jus@bitgrid.net>\n *\n * @author Julius Härtl <jus@bitgrid.net>\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\nimport { subscribe } from '@nextcloud/event-bus'\n\n(function() {\n\n\tconst FilesPlugin = {\n\t\tattach(fileList) {\n\t\t\tsubscribe('nextcloud:unified-search.search', ({ query }) => {\n\t\t\t\tfileList.setFilter(query)\n\t\t\t})\n\t\t\tsubscribe('nextcloud:unified-search.reset', () => {\n\t\t\t\tthis.query = null\n\t\t\t\tfileList.setFilter('')\n\t\t\t})\n\n\t\t},\n\t}\n\n\twindow.OC.Plugins.register('OCA.Files.FileList', FilesPlugin)\n\n})()\n","/**\n * @copyright Copyright (c) 2022 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 */\nimport { getLoggerBuilder } from '@nextcloud/logger'\n\nexport default getLoggerBuilder()\n\t.setApp('files')\n\t.detectUser()\n\t.build()\n","/**\n * @copyright Copyright (c) 2022 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\nimport { loadState } from '@nextcloud/initial-state'\nimport logger from '../logger.js'\n\n/**\n * Fetch and register the legacy files views\n */\nexport default function() {\n\tconst legacyViews = Object.values(loadState('files', 'navigation', {}))\n\n\tif (legacyViews.length > 0) {\n\t\tlogger.debug('Legacy files views detected. Processing...', legacyViews)\n\t\tlegacyViews.forEach(view => {\n\t\t\tregisterLegacyView(view)\n\t\t\tif (view.sublist) {\n\t\t\t\tview.sublist.forEach(subview => registerLegacyView({ ...subview, parent: view.id }))\n\t\t\t}\n\t\t})\n\t}\n}\n\nconst registerLegacyView = function({ id, name, order, icon, parent, classes = '', expanded, params }) {\n\tOCP.Files.Navigation.register({\n\t\tid,\n\t\tname,\n\t\torder,\n\t\tparams,\n\t\tparent,\n\t\texpanded: expanded === true,\n\t\ticonClass: icon ? `icon-${icon}` : 'nav-icon-' + id,\n\t\tlegacy: true,\n\t\tsticky: classes.includes('pinned'),\n\t})\n}\n","/**\n * @copyright Copyright (c) 2022 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 */\nimport type Node from '@nextcloud/files/dist/files/node'\nimport isSvg from 'is-svg'\n\nimport logger from '../logger'\n\nexport interface Column {\n\t/** Unique column ID */\n\tid: string\n\t/** Translated column title */\n\ttitle: string\n\t/** Property key from Node main or additional attributes.\n\tWill be used if no custom sort function is provided.\n\tSorting will be done by localCompare */\n\tproperty: string\n\t/** Special function used to sort Nodes between them */\n\tsortFunction?: (nodeA: Node, nodeB: Node) => number;\n\t/** Custom summary of the column to display at the end of the list.\n\t Will not be displayed if nothing is provided */\n\tsummary?: (node: Node[]) => string\n}\n\nexport interface Navigation {\n\t/** Unique view ID */\n\tid: string\n\t/** Translated view name */\n\tname: string\n\t/** Method return the content of the provided path */\n\tgetFiles: (path: string) => Node[]\n\t/** The view icon as an inline svg */\n\ticon: string\n\t/** The view order */\n\torder: number\n\t/** This view column(s). Name and actions are\n\tby default always included */\n\tcolumns?: Column[]\n\t/** The empty view element to render your empty content into */\n\temptyView?: (div: HTMLDivElement) => void\n\t/** The parent unique ID */\n\tparent?: string\n\t/** This view is sticky (sent at the bottom) */\n\tsticky?: boolean\n\t/** This view has children and is expanded or not */\n\texpanded?: boolean\n\n\t/**\n\t * This view is sticky a legacy view.\n\t * Here until all the views are migrated to Vue.\n\t * @deprecated It will be removed in a near future\n\t */\n\tlegacy?: boolean\n\t/**\n\t * An icon class. \n\t * @deprecated It will be removed in a near future\n\t */\n\ticonClass?: string\n}\n\nexport default class {\n\n\tprivate _views: Navigation[] = []\n\tprivate _currentView: Navigation | null = null\n\n\tconstructor() {\n\t\tlogger.debug('Navigation service initialized')\n\t}\n\n\tregister(view: Navigation) {\n\t\ttry {\n\t\t\tisValidNavigation(view)\n\t\t\tisUniqueNavigation(view, this._views)\n\t\t} catch (e) {\n\t\t\tif (e instanceof Error) {\n\t\t\t\tlogger.error(e.message, { view })\n\t\t\t}\n\t\t\tthrow e\n\t\t}\n\n\t\tif (view.legacy) {\n\t\t\tlogger.warn('Legacy view detected, please migrate to Vue')\n\t\t}\n\n\t\tif (view.iconClass) {\n\t\t\tview.legacy = true\n\t\t}\n\n\t\tthis._views.push(view)\n\t}\n\n\tget views(): Navigation[] {\n\t\treturn this._views\n\t}\n\n\tsetActive(view: Navigation | null) {\n\t\tthis._currentView = view\n\t}\n\n\tget active(): Navigation | null {\n\t\treturn this._currentView\n\t}\n\n}\n\n/**\n * Make sure the given view is unique\n * and not already registered.\n */\nconst isUniqueNavigation = function(view: Navigation, views: Navigation[]): boolean {\n\tif (views.find(search => search.id === view.id)) {\n\t\tthrow new Error(`Navigation id ${view.id} is already registered`)\n\t}\n\treturn true\n}\n\n/**\n * Typescript cannot validate an interface.\n * Please keep in sync with the Navigation interface requirements.\n */\nconst isValidNavigation = function(view: Navigation): boolean {\n\tif (!view.id || typeof view.id !== 'string') {\n\t\tthrow new Error('Navigation id is required and must be a string')\n\t}\n\n\tif (!view.name || typeof view.name !== 'string') {\n\t\tthrow new Error('Navigation name is required and must be a string')\n\t}\n\n\t/**\n\t * Legacy handle their content and icon differently\n\t * TODO: remove when support for legacy views is removed\n\t */\n\tif (!view.legacy) {\n\t\tif (!view.getFiles || typeof view.getFiles !== 'function') {\n\t\t\tthrow new Error('Navigation getFiles is required and must be a function')\n\t\t}\n\n\t\tif (!view.icon || typeof view.icon !== 'string' || !isSvg(view.icon)) {\n\t\t\tthrow new Error('Navigation icon is required and must be a valid svg string')\n\t\t}\n\t}\n\n\tif (!('order' in view) || typeof view.order !== 'number') {\n\t\tthrow new Error('Navigation order is required and must be a number')\n\t}\n\n\t// Optional properties\n\tif (view.columns) {\n\t\tview.columns.forEach(isValidColumn)\n\t}\n\n\tif (view.emptyView && typeof view.emptyView !== 'function') {\n\t\tthrow new Error('Navigation emptyView must be a function')\n\t}\n\n\tif (view.parent && typeof view.parent !== 'string') {\n\t\tthrow new Error('Navigation parent must be a string')\n\t}\n\n\tif ('sticky' in view && typeof view.sticky !== 'boolean') {\n\t\tthrow new Error('Navigation sticky must be a boolean')\n\t}\n\n\tif ('expanded' in view && typeof view.expanded !== 'boolean') {\n\t\tthrow new Error('Navigation expanded must be a boolean')\n\t}\n\n\treturn true\n}\n\n/**\n * Typescript cannot validate an interface.\n * Please keep in sync with the Column interface requirements.\n */\nconst isValidColumn = function(column: Column): boolean {\n\tif (!column.id || typeof column.id !== 'string') {\n\t\tthrow new Error('Column id is required')\n\t}\n\n\tif (!column.title || typeof column.title !== 'string') {\n\t\tthrow new Error('Column title is required')\n\t}\n\n\tif (!column.property || typeof column.property !== 'string') {\n\t\tthrow new Error('Column property is required')\n\t}\n\n\t// Optional properties\n\tif (column.sortFunction && typeof column.sortFunction !== 'function') {\n\t\tthrow new Error('Column sortFunction must be a function')\n\t}\n\n\tif (column.summary && typeof column.summary !== 'function') {\n\t\tthrow new Error('Column summary must be a function')\n\t}\n\n\treturn true\n}\n","import mod from \"-!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Setting.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Setting.vue?vue&type=script&lang=js&\"","<!--\n - @copyright Copyright (c) 2020 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 -->\n\n<template>\n\t<div />\n</template>\n<script>\nexport default {\n\tname: 'Setting',\n\tprops: {\n\t\tel: {\n\t\t\ttype: Function,\n\t\t\trequired: true,\n\t\t},\n\t},\n\tmounted() {\n\t\tthis.$el.appendChild(this.el())\n\t},\n}\n</script>\n","import { render, staticRenderFns } from \"./Setting.vue?vue&type=template&id=03406edc&\"\nimport script from \"./Setting.vue?vue&type=script&lang=js&\"\nexport * from \"./Setting.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('div')\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<!--\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 -->\n<template>\n\t<NcAppSettingsDialog :open=\"open\"\n\t\t:show-navigation=\"true\"\n\t\t:title=\"t('files', 'Files settings')\"\n\t\t@update:open=\"onClose\">\n\t\t<!-- Settings API-->\n\t\t<NcAppSettingsSection id=\"settings\" :title=\"t('files', 'Files settings')\">\n\t\t\t<NcCheckboxRadioSwitch :checked.sync=\"show_hidden\"\n\t\t\t\t@update:checked=\"setConfig('show_hidden', $event)\">\n\t\t\t\t{{ t('files', 'Show hidden files') }}\n\t\t\t</NcCheckboxRadioSwitch>\n\t\t\t<NcCheckboxRadioSwitch :checked.sync=\"crop_image_previews\"\n\t\t\t\t@update:checked=\"setConfig('crop_image_previews', $event)\">\n\t\t\t\t{{ t('files', 'Crop image previews') }}\n\t\t\t</NcCheckboxRadioSwitch>\n\t\t</NcAppSettingsSection>\n\n\t\t<!-- Settings API-->\n\t\t<NcAppSettingsSection v-if=\"settings.length !== 0\"\n\t\t\tid=\"more-settings\"\n\t\t\t:title=\"t('files', 'Additional settings')\">\n\t\t\t<template v-for=\"setting in settings\">\n\t\t\t\t<Setting :key=\"setting.name\" :el=\"setting.el\" />\n\t\t\t</template>\n\t\t</NcAppSettingsSection>\n\n\t\t<!-- Webdav URL-->\n\t\t<NcAppSettingsSection id=\"webdav\" :title=\"t('files', 'Webdav')\">\n\t\t\t<NcInputField id=\"webdav-url-input\"\n\t\t\t\t:show-trailing-button=\"true\"\n\t\t\t\t:success=\"webdavUrlCopied\"\n\t\t\t\t:trailing-button-label=\"t('files', 'Copy to clipboard')\"\n\t\t\t\t:value=\"webdavUrl\"\n\t\t\t\treadonly=\"readonly\"\n\t\t\t\ttype=\"url\"\n\t\t\t\t@focus=\"$event.target.select()\"\n\t\t\t\t@trailing-button-click=\"copyCloudId\">\n\t\t\t\t<template #trailing-button-icon>\n\t\t\t\t\t<Clipboard :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t</NcInputField>\n\t\t\t<em>\n\t\t\t\t<a :href=\"webdavDocs\" target=\"_blank\" rel=\"noreferrer noopener\">\n\t\t\t\t\t{{ t('files', 'Use this address to access your Files via WebDAV') }} ↗\n\t\t\t\t</a>\n\t\t\t</em>\n\t\t</NcAppSettingsSection>\n\t</NcAppSettingsDialog>\n</template>\n\n<script>\nimport NcAppSettingsDialog from '@nextcloud/vue/dist/Components/NcAppSettingsDialog.js'\nimport NcAppSettingsSection from '@nextcloud/vue/dist/Components/NcAppSettingsSection.js'\nimport NcCheckboxRadioSwitch from '@nextcloud/vue/dist/Components/NcCheckboxRadioSwitch.js'\nimport Clipboard from 'vue-material-design-icons/Clipboard.vue'\nimport NcInputField from '@nextcloud/vue/dist/Components/NcInputField'\nimport Setting from '../components/Setting.vue'\n\nimport { emit } from '@nextcloud/event-bus'\nimport { generateRemoteUrl, generateUrl } from '@nextcloud/router'\nimport { getCurrentUser } from '@nextcloud/auth'\nimport { loadState } from '@nextcloud/initial-state'\nimport { showError, showSuccess } from '@nextcloud/dialogs'\nimport { translate } from '@nextcloud/l10n'\nimport axios from '@nextcloud/axios'\n\nconst userConfig = loadState('files', 'config', {\n\tshow_hidden: false,\n\tcrop_image_previews: true,\n})\n\nexport default {\n\tname: 'Settings',\n\tcomponents: {\n\t\tClipboard,\n\t\tNcAppSettingsDialog,\n\t\tNcAppSettingsSection,\n\t\tNcCheckboxRadioSwitch,\n\t\tNcInputField,\n\t\tSetting,\n\t},\n\n\tprops: {\n\t\topen: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t},\n\n\tdata() {\n\t\treturn {\n\n\t\t\t...userConfig,\n\n\t\t\t// Settings API\n\t\t\tsettings: window.OCA?.Files?.Settings?.settings || [],\n\n\t\t\t// Webdav infos\n\t\t\twebdavUrl: generateRemoteUrl('dav/files/' + encodeURIComponent(getCurrentUser()?.uid)),\n\t\t\twebdavDocs: 'https://docs.nextcloud.com/server/stable/go.php?to=user-webdav',\n\t\t\twebdavUrlCopied: false,\n\t\t}\n\t},\n\n\tbeforeMount() {\n\t\t// Update the settings API entries state\n\t\tthis.settings.forEach(setting => setting.open())\n\t},\n\n\tbeforeDestroy() {\n\t\t// Update the settings API entries state\n\t\tthis.settings.forEach(setting => setting.close())\n\t},\n\n\tmethods: {\n\t\tonClose() {\n\t\t\tthis.$emit('close')\n\t\t},\n\n\t\tsetConfig(key, value) {\n\t\t\temit('files:config:updated', { key, value })\n\t\t\taxios.post(generateUrl('/apps/files/api/v1/config/' + key), {\n\t\t\t\tvalue,\n\t\t\t})\n\t\t},\n\n\t\tasync copyCloudId() {\n\t\t\tdocument.querySelector('input#webdav-url-input').select()\n\n\t\t\tif (!navigator.clipboard) {\n\t\t\t\t// Clipboard API not available\n\t\t\t\tshowError(t('files', 'Clipboard is not available'))\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tawait navigator.clipboard.writeText(this.webdavUrl)\n\t\t\tthis.webdavUrlCopied = true\n\t\t\tshowSuccess(t('files', 'Webdav URL copied to clipboard'))\n\t\t\tsetTimeout(() => {\n\t\t\t\tthis.webdavUrlCopied = false\n\t\t\t}, 5000)\n\t\t},\n\n\t\tt: translate,\n\t},\n}\n</script>\n\n<style lang=\"scss\" scoped>\n\n</style>\n","import mod from \"-!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Settings.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Settings.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./Settings.vue?vue&type=template&id=5313d0ff&scoped=true&\"\nimport script from \"./Settings.vue?vue&type=script&lang=js&\"\nexport * from \"./Settings.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"5313d0ff\",\n null\n \n)\n\nexport default component.exports","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('NcAppSettingsDialog',{attrs:{\"open\":_vm.open,\"show-navigation\":true,\"title\":_vm.t('files', 'Files settings')},on:{\"update:open\":_vm.onClose}},[_c('NcAppSettingsSection',{attrs:{\"id\":\"settings\",\"title\":_vm.t('files', 'Files settings')}},[_c('NcCheckboxRadioSwitch',{attrs:{\"checked\":_vm.show_hidden},on:{\"update:checked\":[function($event){_vm.show_hidden=$event},function($event){return _vm.setConfig('show_hidden', $event)}]}},[_vm._v(\"\\n\\t\\t\\t\"+_vm._s(_vm.t('files', 'Show hidden files'))+\"\\n\\t\\t\")]),_vm._v(\" \"),_c('NcCheckboxRadioSwitch',{attrs:{\"checked\":_vm.crop_image_previews},on:{\"update:checked\":[function($event){_vm.crop_image_previews=$event},function($event){return _vm.setConfig('crop_image_previews', $event)}]}},[_vm._v(\"\\n\\t\\t\\t\"+_vm._s(_vm.t('files', 'Crop image previews'))+\"\\n\\t\\t\")])],1),_vm._v(\" \"),(_vm.settings.length !== 0)?_c('NcAppSettingsSection',{attrs:{\"id\":\"more-settings\",\"title\":_vm.t('files', 'Additional settings')}},[_vm._l((_vm.settings),function(setting){return [_c('Setting',{key:setting.name,attrs:{\"el\":setting.el}})]})],2):_vm._e(),_vm._v(\" \"),_c('NcAppSettingsSection',{attrs:{\"id\":\"webdav\",\"title\":_vm.t('files', 'Webdav')}},[_c('NcInputField',{attrs:{\"id\":\"webdav-url-input\",\"show-trailing-button\":true,\"success\":_vm.webdavUrlCopied,\"trailing-button-label\":_vm.t('files', 'Copy to clipboard'),\"value\":_vm.webdavUrl,\"readonly\":\"readonly\",\"type\":\"url\"},on:{\"focus\":function($event){return $event.target.select()},\"trailing-button-click\":_vm.copyCloudId},scopedSlots:_vm._u([{key:\"trailing-button-icon\",fn:function(){return [_c('Clipboard',{attrs:{\"size\":20}})]},proxy:true}])}),_vm._v(\" \"),_c('em',[_c('a',{attrs:{\"href\":_vm.webdavDocs,\"target\":\"_blank\",\"rel\":\"noreferrer noopener\"}},[_vm._v(\"\\n\\t\\t\\t\\t\"+_vm._s(_vm.t('files', 'Use this address to access your Files via WebDAV'))+\" ↗\\n\\t\\t\\t\")])])],1)],1)\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<!--\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 -->\n<template>\n\t<NcAppNavigation data-cy-files-navigation>\n\t\t<template #list>\n\t\t\t<NcAppNavigationItem v-for=\"view in parentViews\"\n\t\t\t\t:key=\"view.id\"\n\t\t\t\t:allow-collapse=\"true\"\n\t\t\t\t:data-cy-files-navigation-item=\"view.id\"\n\t\t\t\t:icon=\"view.iconClass\"\n\t\t\t\t:open=\"view.expanded\"\n\t\t\t\t:pinned=\"view.sticky\"\n\t\t\t\t:title=\"view.name\"\n\t\t\t\t:to=\"generateToNavigation(view)\"\n\t\t\t\t@update:open=\"onToggleExpand(view)\">\n\t\t\t\t<NcAppNavigationItem v-for=\"child in childViews[view.id]\"\n\t\t\t\t\t:key=\"child.id\"\n\t\t\t\t\t:data-cy-files-navigation-item=\"child.id\"\n\t\t\t\t\t:exact=\"true\"\n\t\t\t\t\t:icon=\"child.iconClass\"\n\t\t\t\t\t:title=\"child.name\"\n\t\t\t\t\t:to=\"generateToNavigation(child)\" />\n\t\t\t</NcAppNavigationItem>\n\t\t</template>\n\n\t\t<!-- Settings toggle -->\n\t\t<template #footer>\n\t\t\t<ul class=\"app-navigation-entry__settings\">\n\t\t\t\t<NcAppNavigationItem :aria-label=\"t('files', 'Open the files app settings')\"\n\t\t\t\t\t:title=\"t('files', 'Files settings')\"\n\t\t\t\t\tdata-cy-files-navigation-settings-button\n\t\t\t\t\t@click.prevent.stop=\"openSettings\">\n\t\t\t\t\t<Cog slot=\"icon\" :size=\"20\" />\n\t\t\t\t</NcAppNavigationItem>\n\t\t\t</ul>\n\t\t</template>\n\n\t\t<!-- Settings modal-->\n\t\t<SettingsModal :open=\"settingsOpened\"\n\t\t\tdata-cy-files-navigation-settings\n\t\t\t@close=\"onSettingsClose\" />\n\t</NcAppNavigation>\n</template>\n\n<script>\nimport { emit, subscribe } from '@nextcloud/event-bus'\nimport { generateUrl } from '@nextcloud/router'\nimport axios from '@nextcloud/axios'\nimport Cog from 'vue-material-design-icons/Cog.vue'\nimport NcAppNavigation from '@nextcloud/vue/dist/Components/NcAppNavigation.js'\nimport NcAppNavigationItem from '@nextcloud/vue/dist/Components/NcAppNavigationItem.js'\n\nimport logger from '../logger.js'\nimport Navigation from '../services/Navigation.ts'\nimport SettingsModal from './Settings.vue'\n\nimport { translate } from '@nextcloud/l10n'\n\nexport default {\n\tname: 'Navigation',\n\n\tcomponents: {\n\t\tCog,\n\t\tNcAppNavigation,\n\t\tNcAppNavigationItem,\n\t\tSettingsModal,\n\t},\n\n\tprops: {\n\t\t// eslint-disable-next-line vue/prop-name-casing\n\t\tNavigation: {\n\t\t\ttype: Navigation,\n\t\t\trequired: true,\n\t\t},\n\t},\n\n\tdata() {\n\t\treturn {\n\t\t\tsettingsOpened: false,\n\t\t}\n\t},\n\n\tcomputed: {\n\t\tcurrentViewId() {\n\t\t\treturn this.$route?.params?.view || 'files'\n\t\t},\n\t\tcurrentView() {\n\t\t\treturn this.views.find(view => view.id === this.currentViewId)\n\t\t},\n\n\t\t/** @return {Navigation[]} */\n\t\tviews() {\n\t\t\treturn this.Navigation.views\n\t\t},\n\t\tparentViews() {\n\t\t\treturn this.views\n\t\t\t\t// filter child views\n\t\t\t\t.filter(view => !view.parent)\n\t\t\t\t// sort views by order\n\t\t\t\t.sort((a, b) => {\n\t\t\t\t\treturn a.order - b.order\n\t\t\t\t})\n\t\t},\n\t\tchildViews() {\n\t\t\treturn this.views\n\t\t\t\t// filter parent views\n\t\t\t\t.filter(view => !!view.parent)\n\t\t\t\t// create a map of parents and their children\n\t\t\t\t.reduce((list, view) => {\n\t\t\t\t\tlist[view.parent] = [...(list[view.parent] || []), view]\n\t\t\t\t\t// Sort children by order\n\t\t\t\t\tlist[view.parent].sort((a, b) => {\n\t\t\t\t\t\treturn a.order - b.order\n\t\t\t\t\t})\n\t\t\t\t\treturn list\n\t\t\t\t}, {})\n\t\t},\n\t},\n\n\twatch: {\n\t\tcurrentView(view, oldView) {\n\t\t\tlogger.debug('View changed', { id: view.id, view })\n\t\t\tthis.showView(view, oldView)\n\t\t},\n\t},\n\n\tbeforeMount() {\n\t\tif (this.currentView) {\n\t\t\tlogger.debug('Navigation mounted. Showing requested view', { view: this.currentView })\n\t\t\tthis.showView(this.currentView)\n\t\t}\n\n\t\tsubscribe('files:legacy-navigation:changed', this.onLegacyNavigationChanged)\n\t},\n\n\tmethods: {\n\t\t/**\n\t\t * @param {Navigation} view the new active view\n\t\t * @param {Navigation} oldView the old active view\n\t\t */\n\t\tshowView(view, oldView) {\n\t\t\t// Closing any opened sidebar\n\t\t\twindow?.OCA?.Files?.Sidebar?.close?.()\n\n\t\t\tif (view.legacy) {\n\t\t\t\tconst newAppContent = document.querySelector('#app-content #app-content-' + this.currentView.id + '.viewcontainer')\n\t\t\t\tdocument.querySelectorAll('#app-content .viewcontainer').forEach(el => {\n\t\t\t\t\tel.classList.add('hidden')\n\t\t\t\t})\n\t\t\t\tnewAppContent.classList.remove('hidden')\n\n\t\t\t\t// Triggering legacy navigation events\n\t\t\t\tconst { dir = '/' } = OC.Util.History.parseUrlQuery()\n\t\t\t\tconst params = { itemId: view.id, dir }\n\n\t\t\t\tlogger.debug('Triggering legacy navigation event', params)\n\t\t\t\twindow.jQuery(newAppContent).trigger(new window.jQuery.Event('show', params))\n\t\t\t\twindow.jQuery(newAppContent).trigger(new window.jQuery.Event('urlChanged', params))\n\n\t\t\t}\n\n\t\t\tthis.Navigation.setActive(view)\n\t\t\temit('files:navigation:changed', view)\n\t\t},\n\n\t\t/**\n\t\t * Coming from the legacy files app.\n\t\t * TODO: remove when all views are migrated.\n\t\t *\n\t\t * @param {Navigation} view the new active view\n\t\t */\n\t\tonLegacyNavigationChanged({ id } = { id: 'files' }) {\n\t\t\tconst view = this.Navigation.views.find(view => view.id === id)\n\t\t\tif (view && view.legacy && view.id !== this.currentView.id) {\n\t\t\t\t// Force update the current route as the request comes\n\t\t\t\t// from the legacy files app router\n\t\t\t\tthis.$router.replace({ ...this.$route, params: { view: view.id } })\n\t\t\t\tthis.Navigation.setActive(view)\n\t\t\t\tthis.showView(view)\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Expand/collapse a a view with children and permanently\n\t\t * save this setting in the server.\n\t\t *\n\t\t * @param {Navigation} view the view to toggle\n\t\t */\n\t\tonToggleExpand(view) {\n\t\t\t// Invert state\n\t\t\tview.expanded = !view.expanded\n\t\t\taxios.post(generateUrl(`/apps/files/api/v1/toggleShowFolder/${view.id}`), { show: view.expanded })\n\t\t},\n\n\t\t/**\n\t\t * Generate the route to a view\n\t\t * @param {Navigation} view the view to toggle\n\t\t */\n\t\tgenerateToNavigation(view) {\n\t\t\tif (view.params) {\n\t\t\t\tconst { dir, fileid } = view.params\n\t\t\t\treturn { name: 'filelist', params: view.params, query: { dir, fileid } }\n\t\t\t}\n\t\t\treturn { name: 'filelist', params: { view: view.id } }\n\t\t},\n\n\t\t/**\n\t\t * Open the settings modal\n\t\t */\n\t\topenSettings() {\n\t\t\tthis.settingsOpened = true\n\t\t},\n\n\t\t/**\n\t\t * Close the settings modal\n\t\t */\n\t\tonSettingsClose() {\n\t\t\tthis.settingsOpened = false\n\t\t},\n\n\t\tt: translate,\n\t},\n}\n</script>\n\n<style scoped lang=\"scss\">\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</style>\n","import mod from \"-!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Navigation.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Navigation.vue?vue&type=script&lang=js&\"","\n import API from \"!../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/sass-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Navigation.vue?vue&type=style&index=0&id=0a069b20&prod&scoped=true&lang=scss&\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\n\n options.insert = insertFn.bind(null, \"head\");\n \noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/sass-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Navigation.vue?vue&type=style&index=0&id=0a069b20&prod&scoped=true&lang=scss&\";\n export default content && content.locals ? content.locals : undefined;\n","import { render, staticRenderFns } from \"./Navigation.vue?vue&type=template&id=0a069b20&scoped=true&\"\nimport script from \"./Navigation.vue?vue&type=script&lang=js&\"\nexport * from \"./Navigation.vue?vue&type=script&lang=js&\"\nimport style0 from \"./Navigation.vue?vue&type=style&index=0&id=0a069b20&prod&scoped=true&lang=scss&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"0a069b20\",\n null\n \n)\n\nexport default component.exports","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('NcAppNavigation',{attrs:{\"data-cy-files-navigation\":\"\"},scopedSlots:_vm._u([{key:\"list\",fn:function(){return _vm._l((_vm.parentViews),function(view){return _c('NcAppNavigationItem',{key:view.id,attrs:{\"allow-collapse\":true,\"data-cy-files-navigation-item\":view.id,\"icon\":view.iconClass,\"open\":view.expanded,\"pinned\":view.sticky,\"title\":view.name,\"to\":_vm.generateToNavigation(view)},on:{\"update:open\":function($event){return _vm.onToggleExpand(view)}}},_vm._l((_vm.childViews[view.id]),function(child){return _c('NcAppNavigationItem',{key:child.id,attrs:{\"data-cy-files-navigation-item\":child.id,\"exact\":true,\"icon\":child.iconClass,\"title\":child.name,\"to\":_vm.generateToNavigation(child)}})}),1)})},proxy:true},{key:\"footer\",fn:function(){return [_c('ul',{staticClass:\"app-navigation-entry__settings\"},[_c('NcAppNavigationItem',{attrs:{\"aria-label\":_vm.t('files', 'Open the files app settings'),\"title\":_vm.t('files', 'Files settings'),\"data-cy-files-navigation-settings-button\":\"\"},on:{\"click\":function($event){$event.preventDefault();$event.stopPropagation();return _vm.openSettings.apply(null, arguments)}}},[_c('Cog',{attrs:{\"slot\":\"icon\",\"size\":20},slot:\"icon\"})],1)],1)]},proxy:true}])},[_vm._v(\" \"),_vm._v(\" \"),_c('SettingsModal',{attrs:{\"open\":_vm.settingsOpened,\"data-cy-files-navigation-settings\":\"\"},on:{\"close\":_vm.onSettingsClose}})],1)\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","/**\n * @copyright Copyright (c) 2019 Gary Kim <gary@garykim.dev>\n *\n * @author Gary Kim <gary@garykim.dev>\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\nexport default class Settings {\n\n\t_settings\n\n\tconstructor() {\n\t\tthis._settings = []\n\t\tconsole.debug('OCA.Files.Settings initialized')\n\t}\n\n\t/**\n\t * Register a new setting\n\t *\n\t * @since 19.0.0\n\t * @param {OCA.Files.Settings.Setting} view element to add to settings\n\t * @return {boolean} whether registering was successful\n\t */\n\tregister(view) {\n\t\tif (this._settings.filter(e => e.name === view.name).length > 0) {\n\t\t\tconsole.error('A setting with the same name is already registered')\n\t\t\treturn false\n\t\t}\n\t\tthis._settings.push(view)\n\t\treturn true\n\t}\n\n\t/**\n\t * All settings elements\n\t *\n\t * @return {OCA.Files.Settings.Setting[]} All currently registered settings\n\t */\n\tget settings() {\n\t\treturn this._settings\n\t}\n\n}\n","/**\n * @copyright Copyright (c) 2019 Gary Kim <gary@garykim.dev>\n * @copyright Copyright (c) 2019 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author Gary Kim <gary@garykim.dev>\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\nexport default class Setting {\n\n\t_close\n\t_el\n\t_name\n\t_open\n\n\t/**\n\t * Create a new files app setting\n\t *\n\t * @since 19.0.0\n\t * @param {string} name the name of this setting\n\t * @param {object} component the component\n\t * @param {Function} component.el function that returns an unmounted dom element to be added\n\t * @param {Function} [component.open] callback for when setting is added\n\t * @param {Function} [component.close] callback for when setting is closed\n\t */\n\tconstructor(name, { el, open, close }) {\n\t\tthis._name = name\n\t\tthis._el = el\n\t\tthis._open = open\n\t\tthis._close = close\n\n\t\tif (typeof this._open !== 'function') {\n\t\t\tthis._open = () => {}\n\t\t}\n\n\t\tif (typeof this._close !== 'function') {\n\t\t\tthis._close = () => {}\n\t\t}\n\t}\n\n\tget name() {\n\t\treturn this._name\n\t}\n\n\tget el() {\n\t\treturn this._el\n\t}\n\n\tget open() {\n\t\treturn this._open\n\t}\n\n\tget close() {\n\t\treturn this._close\n\t}\n\n}\n","/**\n * @copyright Copyright (c) 2022 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 */\nimport Vue from 'vue'\nimport Router from 'vue-router'\nimport { generateUrl } from '@nextcloud/router'\nimport { stringify } from 'query-string'\n\nVue.use(Router)\n\nconst router = new Router({\n\tmode: 'history',\n\n\t// if index.php is in the url AND we got this far, then it's working:\n\t// let's keep using index.php in the url\n\tbase: generateUrl('/apps/files', ''),\n\tlinkActiveClass: 'active',\n\n\troutes: [\n\t\t{\n\t\t\tpath: '/',\n\t\t\t// Pretending we're using the default view\n\t\t\talias: '/files',\n\t\t},\n\t\t{\n\t\t\tpath: '/:view/:fileid?',\n\t\t\tname: 'filelist',\n\t\t\tprops: true,\n\t\t},\n\t],\n\n\t// Custom stringifyQuery to prevent encoding of slashes in the url\n\tstringifyQuery(query) {\n\t\tconst result = stringify(query).replace(/%2F/gmi, '/')\n\t\treturn result ? ('?' + result) : ''\n\t},\n})\n\nexport default router\n","import './templates.js'\nimport './legacy/filelistSearch.js'\nimport processLegacyFilesViews from './legacy/navigationMapper.js'\n\nimport Vue from 'vue'\nimport NavigationService from './services/Navigation.ts'\nimport NavigationView from './views/Navigation.vue'\n\nimport SettingsService from './services/Settings.js'\nimport SettingsModel from './models/Setting.js'\n\nimport router from './router/router.js'\n\n// Init private and public Files namespace\nwindow.OCA.Files = window.OCA.Files ?? {}\nwindow.OCP.Files = window.OCP.Files ?? {}\n\n// Init Navigation Service\nconst Navigation = new NavigationService()\nObject.assign(window.OCP.Files, { Navigation })\n\n// Init Files App Settings Service\nconst Settings = new SettingsService()\nObject.assign(window.OCA.Files, { Settings })\nObject.assign(window.OCA.Files.Settings, { Setting: SettingsModel })\n\n// Init Navigation View\nconst View = Vue.extend(NavigationView)\nconst FilesNavigationRoot = new View({\n\tname: 'FilesNavigationRoot',\n\tpropsData: {\n\t\tNavigation,\n\t},\n\trouter,\n})\nFilesNavigationRoot.$mount('#app-navigation-files')\n\n// Init legacy files views\nprocessLegacyFilesViews()\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".template-picker__item[data-v-440aea22]{display:flex}.template-picker__label[data-v-440aea22]{display:flex;align-items:center;flex:1 1;flex-direction:column}.template-picker__label[data-v-440aea22],.template-picker__label *[data-v-440aea22]{cursor:pointer;user-select:none}.template-picker__label[data-v-440aea22]::before{display:none !important}.template-picker__preview[data-v-440aea22]{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-440aea22]{border-color:var(--color-primary)}.template-picker__preview--failed[data-v-440aea22]{display:flex}.template-picker__image[data-v-440aea22]{max-width:100%;background-color:var(--color-main-background);object-fit:cover}.template-picker__preview--failed .template-picker__image[data-v-440aea22]{width:calc(var(--margin)*8);margin:auto;background-color:rgba(0,0,0,0) !important;object-fit:initial}.template-picker__title[data-v-440aea22]{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\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".app-navigation[data-v-0a069b20] .app-navigation-entry-icon{background-repeat:no-repeat;background-position:center}.app-navigation>ul.app-navigation__list[data-v-0a069b20]{padding-bottom:var(--default-grid-baseline, 4px)}.app-navigation-entry__settings[data-v-0a069b20]{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\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".templates-picker__form[data-v-55dd9121]{padding:calc(var(--margin)*2);padding-bottom:0}.templates-picker__form h2[data-v-55dd9121]{text-align:center;font-weight:bold;margin:var(--margin) 0 calc(var(--margin)*2)}.templates-picker__list[data-v-55dd9121]{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-55dd9121]{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-55dd9121],.templates-picker__buttons input[type=submit][data-v-55dd9121]{height:44px}.templates-picker[data-v-55dd9121] .modal-container{position:relative}.templates-picker__loading[data-v-55dd9121]{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\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","__webpack_require__.amdD = function () {\n\tthrow new Error('define cannot be used indirect');\n};","__webpack_require__.amdO = {};","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = function(module) {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","__webpack_require__.j = 2181;","__webpack_require__.b = document.baseURI || self.location.href;\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t2181: 0\n};\n\n// no chunk on demand loading\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n__webpack_require__.O.j = function(chunkId) { return installedChunks[chunkId] === 0; };\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = function(parentChunkLoadingFunction, data) {\n\tvar chunkIds = data[0];\n\tvar moreModules = data[1];\n\tvar runtime = data[2];\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some(function(id) { return installedChunks[id] !== 0; })) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\treturn __webpack_require__.O(result);\n}\n\nvar chunkLoadingGlobal = self[\"webpackChunknextcloud\"] = self[\"webpackChunknextcloud\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","__webpack_require__.nc = undefined;","// startup\n// Load entry module and return exports\n// This entry module depends on other loaded chunks and execution need to be delayed\nvar __webpack_exports__ = __webpack_require__.O(undefined, [7874], function() { return __webpack_require__(86203); })\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n"],"names":["deferred","getCurrentDirectory","currentDirInfo","OCA","Files","App","currentFileList","dirInfo","path","name","replace","getTemplates","axios","generateOcsUrl","response","data","ocs","createFromTemplate","filePath","templatePath","templateType","inheritAttrs","props","basename","type","required","checked","default","fileid","filename","previewUrl","hasPreview","mime","ratio","failedPreview","computed","nameWithoutExt","id","realPreviewUrl","getCurrentUser","document","getElementById","value","pathSections","startsWith","split","relativePath","forEach","section","encodeURIComponent","mimeIcon","methods","onCheck","onFailure","options","styleTagTransform","setAttributes","insert","domAPI","insertStyleElement","_vm","this","_c","_self","staticClass","attrs","domProps","on","_v","class","_s","components","NcEmptyContent","NcModal","TemplatePreview","logger","loading","opened","provider","emptyTemplate","selectedTemplate","style","open","templates","fetchedProvider","close","onSubmit","currentDirectory","fileList","extension","normalize","fileInfo","model","filesClient","fileAction","$file","dir","fileActions","fileInfoModel","console","showError","$event","preventDefault","stopPropagation","apply","arguments","t","_b","_l","template","key","_e","getLoggerBuilder","setApp","detectUser","build","Vue","n","TemplatePickerRoot","createElement","body","appendChild","loadState","templatesPath","debug","TemplatePicker","TemplatePickerView","propsData","$mount","window","addEventListener","initTemplatesPlugin","attach","menu","addMenuEntry","displayName","templateName","iconClass","fileType","actionHandler","initTemplatesFolder","removeMenuEntry","OC","Plugins","register","index","newTemplatePlugin","app","label","FilesPlugin","copySystemTemplates","changeDirectory","template_path","error","subscribe","query","setFilter","registerLegacyView","order","icon","parent","classes","expanded","params","OCP","Navigation","legacy","sticky","includes","view","isValidNavigation","isUniqueNavigation","_views","e","Error","message","push","_currentView","views","find","search","getFiles","isSvg","columns","isValidColumn","emptyView","column","title","property","sortFunction","summary","el","mounted","show_hidden","crop_image_previews","Clipboard","NcAppSettingsDialog","NcAppSettingsSection","NcCheckboxRadioSwitch","NcInputField","Setting","userConfig","settings","webdavUrl","webdavDocs","webdavUrlCopied","beforeMount","beforeDestroy","onClose","setConfig","emit","copyCloudId","navigator","showSuccess","setTimeout","length","setting","target","select","scopedSlots","_u","fn","proxy","Cog","NcAppNavigation","NcAppNavigationItem","SettingsModal","settingsOpened","currentViewId","currentView","parentViews","filter","sort","childViews","reduce","list","watch","showView","newAppContent","itemId","onLegacyNavigationChanged","onToggleExpand","show","generateToNavigation","openSettings","onSettingsClose","child","slot","Settings","_settings","_name","_el","_open","_close","Router","mode","base","generateUrl","linkActiveClass","routes","alias","stringifyQuery","result","stringify","NavigationService","Object","assign","legacyViews","SettingsService","SettingsModel","NavigationView","router","values","sublist","subview","___CSS_LOADER_EXPORT___","module","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","exports","loaded","__webpack_modules__","call","m","amdD","amdO","O","chunkIds","priority","notFulfilled","Infinity","i","fulfilled","j","keys","every","splice","r","getter","__esModule","d","a","definition","o","defineProperty","enumerable","get","g","globalThis","Function","obj","prop","prototype","hasOwnProperty","Symbol","toStringTag","nmd","paths","children","b","baseURI","self","location","href","installedChunks","chunkId","webpackJsonpCallback","parentChunkLoadingFunction","moreModules","runtime","some","chunkLoadingGlobal","bind","nc","__webpack_exports__"],"sourceRoot":""}
\ No newline at end of file
/*! For license information please see files-sidebar.js.LICENSE.txt */
-!function(){var e,n={47252:function(e,n,i){"use strict";var r=i(20144),o=i(9944),s=i(65358),a=i(19755),c=i.n(a),l=i(4820),u=i(78595),f=i(80351),d=i.n(f),p=i(41922),h=i(10250),m=i.n(h),v=i(45400),b=i.n(v),y=i(93455),g=i.n(y);function j(t,e,n,i,r,o,s){try{var a=t[o](s),c=a.value}catch(t){return void n(t)}a.done?e(c):Promise.resolve(c).then(i,r)}function w(t){return function(){var e=this,n=arguments;return new Promise((function(i,r){var o=t.apply(e,n);function s(t){j(o,i,r,s,a,"next",t)}function a(t){j(o,i,r,s,a,"throw",t)}s(void 0)}))}}function A(t){return S.apply(this,arguments)}function S(){return(S=w(regeneratorRuntime.mark((function t(e){var n,i,r;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,l.default)({method:"PROPFIND",url:e,data:'<?xml version="1.0"?>\n\t\t\t<d:propfind xmlns:d="DAV:"\n\t\t\t\txmlns:oc="http://owncloud.org/ns"\n\t\t\t\txmlns:nc="http://nextcloud.org/ns"\n\t\t\t\txmlns:ocs="http://open-collaboration-services.org/ns">\n\t\t\t<d:prop>\n\t\t\t\t<d:getlastmodified />\n\t\t\t\t<d:getetag />\n\t\t\t\t<d:getcontenttype />\n\t\t\t\t<d:resourcetype />\n\t\t\t\t<oc:fileid />\n\t\t\t\t<oc:permissions />\n\t\t\t\t<oc:size />\n\t\t\t\t<d:getcontentlength />\n\t\t\t\t<nc:has-preview />\n\t\t\t\t<nc:mount-type />\n\t\t\t\t<nc:is-encrypted />\n\t\t\t\t<ocs:share-permissions />\n\t\t\t\t<nc:share-attributes />\n\t\t\t\t<oc:tags />\n\t\t\t\t<oc:favorite />\n\t\t\t\t<oc:comments-unread />\n\t\t\t\t<oc:owner-id />\n\t\t\t\t<oc:owner-display-name />\n\t\t\t\t<oc:share-types />\n\t\t\t</d:prop>\n\t\t\t</d:propfind>'});case 2:return n=t.sent,i=OCA.Files.App.fileList.filesClient._client.parseMultiStatus(n.data),(r=OCA.Files.App.fileList.filesClient._parseFileInfo(i[0])).get=function(t){return r[t]},r.isDirectory=function(){return"httpd/unix-directory"===r.mimetype},t.abrupt("return",r);case 8:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var C=i(62574);function _(t,e,n,i,r,o,s){try{var a=t[o](s),c=a.value}catch(t){return void n(t)}a.done?e(c):Promise.resolve(c).then(i,r)}function O(t){return function(){var e=this,n=arguments;return new Promise((function(i,r){var o=t.apply(e,n);function s(t){_(o,i,r,s,a,"next",t)}function a(t){_(o,i,r,s,a,"throw",t)}s(void 0)}))}}var k={name:"SidebarTab",components:{NcAppSidebarTab:i.n(C)(),NcEmptyContent:g()},props:{fileInfo:{type:Object,default:function(){},required:!0},id:{type:String,required:!0},name:{type:String,required:!0},icon:{type:String,required:!1},onMount:{type:Function,required:!0},onUpdate:{type:Function,required:!0},onDestroy:{type:Function,required:!0},onScrollBottomReached:{type:Function,default:function(){}}},data:function(){return{loading:!0}},computed:{activeTab:function(){return this.$parent.activeTab}},watch:{fileInfo:function(t,e){var n=this;return O(regeneratorRuntime.mark((function i(){return regeneratorRuntime.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:if(t.id===e.id){i.next=5;break}return n.loading=!0,i.next=4,n.onUpdate(n.fileInfo);case 4:n.loading=!1;case 5:case"end":return i.stop()}}),i)})))()}},mounted:function(){var t=this;return O(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.loading=!0,e.next=3,t.onMount(t.$refs.mount,t.fileInfo,t.$refs.tab);case 3:t.loading=!1;case 4:case"end":return e.stop()}}),e)})))()},beforeDestroy:function(){var t=this;return O(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.onDestroy();case 2:case"end":return e.stop()}}),e)})))()}},T=i(51900),x=(0,T.Z)(k,(function(){var t=this,e=t._self._c;return e("NcAppSidebarTab",{ref:"tab",attrs:{id:t.id,name:t.name,icon:t.icon},on:{bottomReached:t.onScrollBottomReached},scopedSlots:t._u([{key:"icon",fn:function(){return[t._t("icon")]},proxy:!0}],null,!0)},[t._v(" "),t.loading?e("NcEmptyContent",{attrs:{icon:"icon-loading"}}):t._e(),t._v(" "),e("div",{ref:"mount"})],1)}),[],!1,null,null,null).exports,I={name:"LegacyView",props:{component:{type:Object,required:!0},fileInfo:{type:Object,default:function(){},required:!0}},watch:{fileInfo:function(t){this.setFileInfo(t)}},mounted:function(){this.component.$el.replaceAll(this.$el),this.setFileInfo(this.fileInfo)},methods:{setFileInfo:function(t){this.component.setFileInfo(new OCA.Files.FileInfoModel(t))}}},F=(0,T.Z)(I,(function(){return(0,this._self._c)("div")}),[],!1,null,null,null).exports;function P(t,e,n,i,r,o,s){try{var a=t[o](s),c=a.value}catch(t){return void n(t)}a.done?e(c):Promise.resolve(c).then(i,r)}function z(t){return function(){var e=this,n=arguments;return new Promise((function(i,r){var o=t.apply(e,n);function s(t){P(o,i,r,s,a,"next",t)}function a(t){P(o,i,r,s,a,"throw",t)}s(void 0)}))}}var E={name:"Sidebar",components:{NcActionButton:b(),NcAppSidebar:m(),NcEmptyContent:g(),LegacyView:F,SidebarTab:x},data:function(){return{Sidebar:OCA.Files.Sidebar.state,error:null,loading:!0,fileInfo:null,starLoading:!1,isFullScreen:!1}},computed:{file:function(){return this.Sidebar.file},tabs:function(){return this.Sidebar.tabs},views:function(){return this.Sidebar.views},davPath:function(){var t=OC.getCurrentUser().uid;return OC.linkToRemote("dav/files/".concat(t).concat((0,s.Ec)(this.file)))},activeTab:function(){return this.Sidebar.activeTab},subtitle:function(){return"".concat(this.size,", ").concat(this.time)},time:function(){return OC.Util.relativeModifiedDate(this.fileInfo.mtime)},fullTime:function(){return d()(this.fileInfo.mtime).format("LLL")},size:function(){return OC.Util.humanFileSize(this.fileInfo.size)},background:function(){return this.getPreviewIfAny(this.fileInfo)},appSidebar:function(){return this.fileInfo?{"data-mimetype":this.fileInfo.mimetype,"star-loading":this.starLoading,active:this.activeTab,background:this.background,class:{"app-sidebar--has-preview":this.fileInfo.hasPreview&&!this.isFullScreen,"app-sidebar--full":this.isFullScreen},compact:!this.fileInfo.hasPreview||this.isFullScreen,loading:this.loading,starred:this.fileInfo.isFavourited,subtitle:this.subtitle,subtitleTooltip:this.fullTime,title:this.fileInfo.name,titleTooltip:this.fileInfo.name}:this.error?{key:"error",subtitle:"",title:""}:{loading:this.loading,subtitle:"",title:""}},defaultAction:function(){return this.fileInfo&&OCA.Files&&OCA.Files.App&&OCA.Files.App.fileList&&OCA.Files.App.fileList.fileActions&&OCA.Files.App.fileList.fileActions.getDefaultFileAction&&OCA.Files.App.fileList.fileActions.getDefaultFileAction(this.fileInfo.mimetype,this.fileInfo.type,OC.PERMISSION_READ)},defaultActionListener:function(){return this.defaultAction?"figure-click":null},isSystemTagsEnabled:function(){return OCA&&"SystemTags"in OCA}},methods:{canDisplay:function(t){return t.enabled(this.fileInfo)},resetData:function(){var t=this;this.error=null,this.fileInfo=null,this.$nextTick((function(){t.$refs.tabs&&t.$refs.tabs.updateTabs()}))},getPreviewIfAny:function(t){return t.hasPreview&&!this.isFullScreen?OC.generateUrl("/core/preview?fileId=".concat(t.id,"&x=").concat(screen.width,"&y=").concat(screen.height,"&a=true")):this.getIconUrl(t)},getIconUrl:function(t){var e=t.mimetype||"application/octet-stream";return"httpd/unix-directory"===e?"shared"===t.mountType||"shared-root"===t.mountType?OC.MimeType.getIconUrl("dir-shared"):"external-root"===t.mountType?OC.MimeType.getIconUrl("dir-external"):void 0!==t.mountType&&""!==t.mountType?OC.MimeType.getIconUrl("dir-"+t.mountType):t.shareTypes&&(t.shareTypes.indexOf(p.D.SHARE_TYPE_LINK)>-1||t.shareTypes.indexOf(p.D.SHARE_TYPE_EMAIL)>-1)?OC.MimeType.getIconUrl("dir-public"):t.shareTypes&&t.shareTypes.length>0?OC.MimeType.getIconUrl("dir-shared"):OC.MimeType.getIconUrl("dir"):OC.MimeType.getIconUrl(e)},setActiveTab:function(t){OCA.Files.Sidebar.setActiveTab(t)},toggleStarred:function(e){var n=this;return z(regeneratorRuntime.mark((function i(){return regeneratorRuntime.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return i.prev=0,n.starLoading=!0,i.next=4,(0,l.default)({method:"PROPPATCH",url:n.davPath,data:'<?xml version="1.0"?>\n\t\t\t\t\t\t<d:propertyupdate xmlns:d="DAV:" xmlns:oc="http://owncloud.org/ns">\n\t\t\t\t\t\t'.concat(e?"<d:set>":"<d:remove>","\n\t\t\t\t\t\t\t<d:prop>\n\t\t\t\t\t\t\t\t<oc:favorite>1</oc:favorite>\n\t\t\t\t\t\t\t</d:prop>\n\t\t\t\t\t\t").concat(e?"</d:set>":"</d:remove>","\n\t\t\t\t\t\t</d:propertyupdate>")});case 4:OCA.Files&&OCA.Files.App&&OCA.Files.App.fileList&&OCA.Files.App.fileList.fileActions&&OCA.Files.App.fileList.fileActions.triggerAction("Favorite",OCA.Files.App.fileList.getModelForFile(n.fileInfo.name),OCA.Files.App.fileList),i.next=11;break;case 7:i.prev=7,i.t0=i.catch(0),OC.Notification.showTemporary(t("files","Unable to change the favourite state of the file")),console.error("Unable to change favourite state",i.t0);case 11:n.starLoading=!1;case 12:case"end":return i.stop()}}),i,null,[[0,7]])})))()},onDefaultAction:function(){this.defaultAction&&this.defaultAction.action(this.fileInfo.name,{fileInfo:this.fileInfo,dir:this.fileInfo.dir,fileList:OCA.Files.App.fileList,$file:c()("body")})},toggleTags:function(){OCA.SystemTags&&OCA.SystemTags.View&&OCA.SystemTags.View.toggle()},open:function(e){var n=this;return z(regeneratorRuntime.mark((function i(){return regeneratorRuntime.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:if(n.Sidebar.file=e,!e||""===e.trim()){i.next=21;break}return n.error=null,n.loading=!0,i.prev=4,i.next=7,A(n.davPath);case 7:n.fileInfo=i.sent,n.fileInfo.dir=n.file.split("/").slice(0,-1).join("/"),n.views.forEach((function(t){t.setFileInfo(n.fileInfo)})),n.$nextTick((function(){n.$refs.tabs&&n.$refs.tabs.updateTabs()})),i.next=18;break;case 13:throw i.prev=13,i.t0=i.catch(4),n.error=t("files","Error while loading the file data"),console.error("Error while loading the file data",i.t0),new Error(i.t0);case 18:return i.prev=18,n.loading=!1,i.finish(18);case 21:case"end":return i.stop()}}),i,null,[[4,13,18,21]])})))()},close:function(){this.Sidebar.file="",this.resetData()},setFullScreenMode:function(t){var e,n,i,r;this.isFullScreen=t,t?(null===(e=document.querySelector("#content"))||void 0===e?void 0:e.classList.add("with-sidebar--full"))||null===(n=document.querySelector("#content-vue"))||void 0===n||n.classList.add("with-sidebar--full"):(null===(i=document.querySelector("#content"))||void 0===i?void 0:i.classList.remove("with-sidebar--full"))||null===(r=document.querySelector("#content-vue"))||void 0===r||r.classList.remove("with-sidebar--full")},handleOpening:function(){(0,u.j8)("files:sidebar:opening")},handleOpened:function(){(0,u.j8)("files:sidebar:opened")},handleClosing:function(){(0,u.j8)("files:sidebar:closing")},handleClosed:function(){(0,u.j8)("files:sidebar:closed")}}},L=i(93379),R=i.n(L),M=i(7795),D=i.n(M),U=i(90569),B=i.n(U),q=i(3565),N=i.n(q),$=i(19216),Z=i.n($),V=i(44589),H=i.n(V),K=i(99102),Y={};Y.styleTagTransform=H(),Y.setAttributes=N(),Y.insert=B().bind(null,"head"),Y.domAPI=D(),Y.insertStyleElement=Z(),R()(K.Z,Y),K.Z&&K.Z.locals&&K.Z.locals;var G=(0,T.Z)(E,(function(){var t=this,e=t._self._c;return t.file?e("NcAppSidebar",t._b({ref:"sidebar",attrs:{"force-menu":!0,tabindex:"0"},on:t._d({close:t.close,"update:active":t.setActiveTab,"update:starred":t.toggleStarred,opening:t.handleOpening,opened:t.handleOpened,closing:t.handleClosing,closed:t.handleClosed},[t.defaultActionListener,function(e){return e.stopPropagation(),e.preventDefault(),t.onDefaultAction.apply(null,arguments)}]),scopedSlots:t._u([t.fileInfo?{key:"description",fn:function(){return t._l(t.views,(function(n){return e("LegacyView",{key:n.cid,attrs:{component:n,"file-info":t.fileInfo}})}))},proxy:!0}:null,t.fileInfo?{key:"secondary-actions",fn:function(){return[t.isSystemTagsEnabled?e("NcActionButton",{attrs:{"close-after-click":!0,icon:"icon-tag"},on:{click:t.toggleTags}},[t._v("\n\t\t\t"+t._s(t.t("files","Tags"))+"\n\t\t")]):t._e()]},proxy:!0}:null],null,!0)},"NcAppSidebar",t.appSidebar,!1),[t._v(" "),t._v(" "),t.error?e("NcEmptyContent",{attrs:{icon:"icon-error"}},[t._v("\n\t\t"+t._s(t.error)+"\n\t")]):t.fileInfo?t._l(t.tabs,(function(n){return[n.enabled(t.fileInfo)?e("SidebarTab",{directives:[{name:"show",rawName:"v-show",value:!t.loading,expression:"!loading"}],key:n.id,attrs:{id:n.id,name:n.name,icon:n.icon,"on-mount":n.mount,"on-update":n.update,"on-destroy":n.destroy,"on-scroll-bottom-reached":n.scrollBottomReached,"file-info":t.fileInfo},scopedSlots:t._u([void 0!==n.iconSvg?{key:"icon",fn:function(){return[e("span",{staticClass:"svg-icon",domProps:{innerHTML:t._s(n.iconSvg)}})]},proxy:!0}:null],null,!0)}):t._e()]})):t._e()],2):t._e()}),[],!1,null,"4afc9c22",null),W=G.exports;function J(t){return J="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},J(t)}function Q(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,X(i.key),i)}}function X(t){var e=function(t,e){if("object"!==J(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e);if("object"!==J(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"===J(e)?e:String(e)}var tt=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=X(n="_state"))in e?Object.defineProperty(e,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[n]=i,this._state={},this._state.tabs=[],this._state.views=[],this._state.file="",this._state.activeTab="",console.debug("OCA.Files.Sidebar initialized")}var e,n;return e=t,(n=[{key:"state",get:function(){return this._state}},{key:"registerTab",value:function(t){return this._state.tabs.findIndex((function(e){return e.id===t.id}))>-1?(console.error("An tab with the same id ".concat(t.id," already exists"),t),!1):(this._state.tabs.push(t),!0)}},{key:"registerSecondaryView",value:function(t){return this._state.views.findIndex((function(e){return e.id===t.id}))>-1?(console.error("A similar view already exists",t),!1):(this._state.views.push(t),!0)}},{key:"file",get:function(){return this._state.file}},{key:"setActiveTab",value:function(t){this._state.activeTab=t}}])&&Q(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}(),et=i(57005);function nt(t){return nt="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},nt(t)}function it(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function rt(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,st(i.key),i)}}function ot(t,e,n){return(e=st(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function st(t){var e=function(t,e){if("object"!==nt(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e);if("object"!==nt(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"===nt(e)?e:String(e)}var at=function(){function t(){var e=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=n.id,r=n.name,o=n.icon,s=n.iconSvg,a=n.mount,c=n.update,l=n.destroy,u=n.enabled,f=n.scrollBottomReached;if(it(this,t),ot(this,"_id",void 0),ot(this,"_name",void 0),ot(this,"_icon",void 0),ot(this,"_iconSvgSanitized",void 0),ot(this,"_mount",void 0),ot(this,"_update",void 0),ot(this,"_destroy",void 0),ot(this,"_enabled",void 0),ot(this,"_scrollBottomReached",void 0),void 0===u&&(u=function(){return!0}),void 0===f&&(f=function(){}),"string"!=typeof i||""===i.trim())throw new Error("The id argument is not a valid string");if("string"!=typeof r||""===r.trim())throw new Error("The name argument is not a valid string");if(("string"!=typeof o||""===o.trim())&&"string"!=typeof s)throw new Error("Missing valid string for icon or iconSvg argument");if("function"!=typeof a)throw new Error("The mount argument should be a function");if("function"!=typeof c)throw new Error("The update argument should be a function");if("function"!=typeof l)throw new Error("The destroy argument should be a function");if("function"!=typeof u)throw new Error("The enabled argument should be a function");if("function"!=typeof f)throw new Error("The scrollBottomReached argument should be a function");this._id=i,this._name=r,this._icon=o,this._mount=a,this._update=c,this._destroy=l,this._enabled=u,this._scrollBottomReached=f,"string"==typeof s&&(0,et.t)(s).then((function(t){e._iconSvgSanitized=t}))}var e,n;return e=t,(n=[{key:"id",get:function(){return this._id}},{key:"name",get:function(){return this._name}},{key:"icon",get:function(){return this._icon}},{key:"iconSvg",get:function(){return this._iconSvgSanitized}},{key:"mount",get:function(){return this._mount}},{key:"update",get:function(){return this._update}},{key:"destroy",get:function(){return this._destroy}},{key:"enabled",get:function(){return this._enabled}},{key:"scrollBottomReached",get:function(){return this._scrollBottomReached}}])&&rt(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();r.ZP.prototype.t=o.translate,window.OCA.Files||(window.OCA.Files={}),Object.assign(window.OCA.Files,{Sidebar:new tt}),Object.assign(window.OCA.Files.Sidebar,{Tab:at}),console.debug("OCA.Files.Sidebar initialized"),window.addEventListener("DOMContentLoaded",(function(){var t=document.querySelector("body > .content")||document.querySelector("body > #content");if(t&&!document.getElementById("app-sidebar")){var e=document.createElement("div");e.id="app-sidebar",t.appendChild(e)}var n=new(r.ZP.extend(W))({name:"SidebarRoot"});n.$mount("#app-sidebar"),window.OCA.Files.Sidebar.open=n.open,window.OCA.Files.Sidebar.close=n.close,window.OCA.Files.Sidebar.setFullScreenMode=n.setFullScreenMode}))},99102:function(t,e,n){"use strict";var i=n(87537),r=n.n(i),o=n(23645),s=n.n(o)()(r());s.push([t.id,'.app-sidebar--has-preview[data-v-4afc9c22] .app-sidebar-header__figure{background-size:cover}.app-sidebar--has-preview[data-v-4afc9c22][data-mimetype="text/plain"] .app-sidebar-header__figure,.app-sidebar--has-preview[data-v-4afc9c22][data-mimetype="text/markdown"] .app-sidebar-header__figure{background-size:contain}.app-sidebar--full[data-v-4afc9c22]{position:fixed !important;z-index:2025 !important;top:0 !important;height:100% !important}.app-sidebar .svg-icon[data-v-4afc9c22] svg{width:20px;height:20px;fill:currentColor}',"",{version:3,sources:["webpack://./apps/files/src/views/Sidebar.vue"],names:[],mappings:"AAGE,uEACC,qBAAA,CAKA,yMACC,uBAAA,CAKH,oCACC,yBAAA,CACA,uBAAA,CACA,gBAAA,CACA,sBAAA,CAIA,4CACC,UAAA,CACA,WAAA,CACA,iBAAA",sourcesContent:['\n.app-sidebar {\n\t&--has-preview::v-deep {\n\t\t.app-sidebar-header__figure {\n\t\t\tbackground-size: cover;\n\t\t}\n\n\t\t&[data-mimetype="text/plain"],\n\t\t&[data-mimetype="text/markdown"] {\n\t\t\t.app-sidebar-header__figure {\n\t\t\t\tbackground-size: contain;\n\t\t\t}\n\t\t}\n\t}\n\n\t&--full {\n\t\tposition: fixed !important;\n\t\tz-index: 2025 !important;\n\t\ttop: 0 !important;\n\t\theight: 100% !important;\n\t}\n\n\t.svg-icon {\n\t\t::v-deep svg {\n\t\t\twidth: 20px;\n\t\t\theight: 20px;\n\t\t\tfill: currentColor;\n\t\t}\n\t}\n}\n'],sourceRoot:""}]),e.Z=s},46700:function(t,e,n){var i={"./af":42786,"./af.js":42786,"./ar":30867,"./ar-dz":14130,"./ar-dz.js":14130,"./ar-kw":96135,"./ar-kw.js":96135,"./ar-ly":56440,"./ar-ly.js":56440,"./ar-ma":47702,"./ar-ma.js":47702,"./ar-sa":16040,"./ar-sa.js":16040,"./ar-tn":37100,"./ar-tn.js":37100,"./ar.js":30867,"./az":31083,"./az.js":31083,"./be":9808,"./be.js":9808,"./bg":68338,"./bg.js":68338,"./bm":67438,"./bm.js":67438,"./bn":8905,"./bn-bd":76225,"./bn-bd.js":76225,"./bn.js":8905,"./bo":11560,"./bo.js":11560,"./br":1278,"./br.js":1278,"./bs":80622,"./bs.js":80622,"./ca":2468,"./ca.js":2468,"./cs":5822,"./cs.js":5822,"./cv":50877,"./cv.js":50877,"./cy":47373,"./cy.js":47373,"./da":24780,"./da.js":24780,"./de":59740,"./de-at":60217,"./de-at.js":60217,"./de-ch":60894,"./de-ch.js":60894,"./de.js":59740,"./dv":5300,"./dv.js":5300,"./el":50837,"./el.js":50837,"./en-au":78348,"./en-au.js":78348,"./en-ca":77925,"./en-ca.js":77925,"./en-gb":22243,"./en-gb.js":22243,"./en-ie":46436,"./en-ie.js":46436,"./en-il":47207,"./en-il.js":47207,"./en-in":44175,"./en-in.js":44175,"./en-nz":76319,"./en-nz.js":76319,"./en-sg":31662,"./en-sg.js":31662,"./eo":92915,"./eo.js":92915,"./es":55655,"./es-do":55251,"./es-do.js":55251,"./es-mx":96112,"./es-mx.js":96112,"./es-us":71146,"./es-us.js":71146,"./es.js":55655,"./et":5603,"./et.js":5603,"./eu":77763,"./eu.js":77763,"./fa":76959,"./fa.js":76959,"./fi":11897,"./fi.js":11897,"./fil":42549,"./fil.js":42549,"./fo":94694,"./fo.js":94694,"./fr":94470,"./fr-ca":63049,"./fr-ca.js":63049,"./fr-ch":52330,"./fr-ch.js":52330,"./fr.js":94470,"./fy":5044,"./fy.js":5044,"./ga":29295,"./ga.js":29295,"./gd":2101,"./gd.js":2101,"./gl":38794,"./gl.js":38794,"./gom-deva":27884,"./gom-deva.js":27884,"./gom-latn":23168,"./gom-latn.js":23168,"./gu":95349,"./gu.js":95349,"./he":24206,"./he.js":24206,"./hi":30094,"./hi.js":30094,"./hr":30316,"./hr.js":30316,"./hu":22138,"./hu.js":22138,"./hy-am":11423,"./hy-am.js":11423,"./id":29218,"./id.js":29218,"./is":90135,"./is.js":90135,"./it":90626,"./it-ch":10150,"./it-ch.js":10150,"./it.js":90626,"./ja":39183,"./ja.js":39183,"./jv":24286,"./jv.js":24286,"./ka":12105,"./ka.js":12105,"./kk":47772,"./kk.js":47772,"./km":18758,"./km.js":18758,"./kn":79282,"./kn.js":79282,"./ko":33730,"./ko.js":33730,"./ku":1408,"./ku.js":1408,"./ky":33291,"./ky.js":33291,"./lb":36841,"./lb.js":36841,"./lo":55466,"./lo.js":55466,"./lt":57010,"./lt.js":57010,"./lv":37595,"./lv.js":37595,"./me":39861,"./me.js":39861,"./mi":35493,"./mi.js":35493,"./mk":95966,"./mk.js":95966,"./ml":87341,"./ml.js":87341,"./mn":5115,"./mn.js":5115,"./mr":10370,"./mr.js":10370,"./ms":9847,"./ms-my":41237,"./ms-my.js":41237,"./ms.js":9847,"./mt":72126,"./mt.js":72126,"./my":56165,"./my.js":56165,"./nb":64924,"./nb.js":64924,"./ne":16744,"./ne.js":16744,"./nl":93901,"./nl-be":59814,"./nl-be.js":59814,"./nl.js":93901,"./nn":83877,"./nn.js":83877,"./oc-lnc":92135,"./oc-lnc.js":92135,"./pa-in":15858,"./pa-in.js":15858,"./pl":64495,"./pl.js":64495,"./pt":89520,"./pt-br":57971,"./pt-br.js":57971,"./pt.js":89520,"./ro":96459,"./ro.js":96459,"./ru":21793,"./ru.js":21793,"./sd":40950,"./sd.js":40950,"./se":10490,"./se.js":10490,"./si":90124,"./si.js":90124,"./sk":64249,"./sk.js":64249,"./sl":14985,"./sl.js":14985,"./sq":51104,"./sq.js":51104,"./sr":49131,"./sr-cyrl":79915,"./sr-cyrl.js":79915,"./sr.js":49131,"./ss":85893,"./ss.js":85893,"./sv":98760,"./sv.js":98760,"./sw":91172,"./sw.js":91172,"./ta":27333,"./ta.js":27333,"./te":23110,"./te.js":23110,"./tet":52095,"./tet.js":52095,"./tg":27321,"./tg.js":27321,"./th":9041,"./th.js":9041,"./tk":19005,"./tk.js":19005,"./tl-ph":75768,"./tl-ph.js":75768,"./tlh":89444,"./tlh.js":89444,"./tr":72397,"./tr.js":72397,"./tzl":28254,"./tzl.js":28254,"./tzm":51106,"./tzm-latn":30699,"./tzm-latn.js":30699,"./tzm.js":51106,"./ug-cn":9288,"./ug-cn.js":9288,"./uk":67691,"./uk.js":67691,"./ur":13795,"./ur.js":13795,"./uz":6791,"./uz-latn":60588,"./uz-latn.js":60588,"./uz.js":6791,"./vi":65666,"./vi.js":65666,"./x-pseudo":14378,"./x-pseudo.js":14378,"./yo":75805,"./yo.js":75805,"./zh-cn":83839,"./zh-cn.js":83839,"./zh-hk":55726,"./zh-hk.js":55726,"./zh-mo":99807,"./zh-mo.js":99807,"./zh-tw":74152,"./zh-tw.js":74152};function r(t){var e=o(t);return n(e)}function o(t){if(!n.o(i,t)){var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e}return i[t]}r.keys=function(){return Object.keys(i)},r.resolve=o,t.exports=r,r.id=46700}},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,r.amdD=function(){throw new Error("define cannot be used indirect")},r.amdO={},e=[],r.O=function(t,n,i,o){if(!n){var s=1/0;for(u=0;u<e.length;u++){n=e[u][0],i=e[u][1],o=e[u][2];for(var a=!0,c=0;c<n.length;c++)(!1&o||s>=o)&&Object.keys(r.O).every((function(t){return r.O[t](n[c])}))?n.splice(c--,1):(a=!1,o<s&&(s=o));if(a){e.splice(u--,1);var l=i();void 0!==l&&(t=l)}}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=4092,function(){r.b=document.baseURI||self.location.href;var t={4092:0};r.O.j=function(e){return 0===t[e]};var e=function(e,n){var i,o,s=n[0],a=n[1],c=n[2],l=0;if(s.some((function(e){return 0!==t[e]}))){for(i in a)r.o(a,i)&&(r.m[i]=a[i]);if(c)var u=c(r)}for(e&&e(n);l<s.length;l++)o=s[l],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(47252)}));o=r.O(o)}();
-//# sourceMappingURL=files-sidebar.js.map?v=70d59b47cb2f8e262720
\ No newline at end of file
+!function(){var e,n={69391:function(e,n,i){"use strict";var r=i(20144),o=i(9944),s=i(65358),a=i(19755),c=i.n(a),l=i(4820),u=i(78595),d=i(80351),f=i.n(d),p=i(41922),h=i(10250),m=i.n(h),v=i(45400),b=i.n(v),g=i(93455),y=i.n(g);function j(t,e,n,i,r,o,s){try{var a=t[o](s),c=a.value}catch(t){return void n(t)}a.done?e(c):Promise.resolve(c).then(i,r)}function w(t){return function(){var e=this,n=arguments;return new Promise((function(i,r){var o=t.apply(e,n);function s(t){j(o,i,r,s,a,"next",t)}function a(t){j(o,i,r,s,a,"throw",t)}s(void 0)}))}}function A(t){return S.apply(this,arguments)}function S(){return(S=w(regeneratorRuntime.mark((function t(e){var n,i,r;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,l.default)({method:"PROPFIND",url:e,data:'<?xml version="1.0"?>\n\t\t\t<d:propfind xmlns:d="DAV:"\n\t\t\t\txmlns:oc="http://owncloud.org/ns"\n\t\t\t\txmlns:nc="http://nextcloud.org/ns"\n\t\t\t\txmlns:ocs="http://open-collaboration-services.org/ns">\n\t\t\t<d:prop>\n\t\t\t\t<d:getlastmodified />\n\t\t\t\t<d:getetag />\n\t\t\t\t<d:getcontenttype />\n\t\t\t\t<d:resourcetype />\n\t\t\t\t<oc:fileid />\n\t\t\t\t<oc:permissions />\n\t\t\t\t<oc:size />\n\t\t\t\t<d:getcontentlength />\n\t\t\t\t<nc:has-preview />\n\t\t\t\t<nc:mount-type />\n\t\t\t\t<nc:is-encrypted />\n\t\t\t\t<ocs:share-permissions />\n\t\t\t\t<nc:share-attributes />\n\t\t\t\t<oc:tags />\n\t\t\t\t<oc:favorite />\n\t\t\t\t<oc:comments-unread />\n\t\t\t\t<oc:owner-id />\n\t\t\t\t<oc:owner-display-name />\n\t\t\t\t<oc:share-types />\n\t\t\t</d:prop>\n\t\t\t</d:propfind>'});case 2:return n=t.sent,i=OCA.Files.App.fileList.filesClient._client.parseMultiStatus(n.data),(r=OCA.Files.App.fileList.filesClient._parseFileInfo(i[0])).get=function(t){return r[t]},r.isDirectory=function(){return"httpd/unix-directory"===r.mimetype},t.abrupt("return",r);case 8:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var C=i(62574);function _(t,e,n,i,r,o,s){try{var a=t[o](s),c=a.value}catch(t){return void n(t)}a.done?e(c):Promise.resolve(c).then(i,r)}function O(t){return function(){var e=this,n=arguments;return new Promise((function(i,r){var o=t.apply(e,n);function s(t){_(o,i,r,s,a,"next",t)}function a(t){_(o,i,r,s,a,"throw",t)}s(void 0)}))}}var k={name:"SidebarTab",components:{NcAppSidebarTab:i.n(C)(),NcEmptyContent:y()},props:{fileInfo:{type:Object,default:function(){},required:!0},id:{type:String,required:!0},name:{type:String,required:!0},icon:{type:String,required:!1},onMount:{type:Function,required:!0},onUpdate:{type:Function,required:!0},onDestroy:{type:Function,required:!0},onScrollBottomReached:{type:Function,default:function(){}}},data:function(){return{loading:!0}},computed:{activeTab:function(){return this.$parent.activeTab}},watch:{fileInfo:function(t,e){var n=this;return O(regeneratorRuntime.mark((function i(){return regeneratorRuntime.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:if(t.id===e.id){i.next=5;break}return n.loading=!0,i.next=4,n.onUpdate(n.fileInfo);case 4:n.loading=!1;case 5:case"end":return i.stop()}}),i)})))()}},mounted:function(){var t=this;return O(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.loading=!0,e.next=3,t.onMount(t.$refs.mount,t.fileInfo,t.$refs.tab);case 3:t.loading=!1;case 4:case"end":return e.stop()}}),e)})))()},beforeDestroy:function(){var t=this;return O(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.onDestroy();case 2:case"end":return e.stop()}}),e)})))()}},T=i(51900),x=(0,T.Z)(k,(function(){var t=this,e=t._self._c;return e("NcAppSidebarTab",{ref:"tab",attrs:{id:t.id,name:t.name,icon:t.icon},on:{bottomReached:t.onScrollBottomReached},scopedSlots:t._u([{key:"icon",fn:function(){return[t._t("icon")]},proxy:!0}],null,!0)},[t._v(" "),t.loading?e("NcEmptyContent",{attrs:{icon:"icon-loading"}}):t._e(),t._v(" "),e("div",{ref:"mount"})],1)}),[],!1,null,null,null).exports,I={name:"LegacyView",props:{component:{type:Object,required:!0},fileInfo:{type:Object,default:function(){},required:!0}},watch:{fileInfo:function(t){this.setFileInfo(t)}},mounted:function(){this.component.$el.replaceAll(this.$el),this.setFileInfo(this.fileInfo)},methods:{setFileInfo:function(t){this.component.setFileInfo(new OCA.Files.FileInfoModel(t))}}},F=(0,T.Z)(I,(function(){return(0,this._self._c)("div")}),[],!1,null,null,null).exports;function z(t,e,n,i,r,o,s){try{var a=t[o](s),c=a.value}catch(t){return void n(t)}a.done?e(c):Promise.resolve(c).then(i,r)}function E(t){return function(){var e=this,n=arguments;return new Promise((function(i,r){var o=t.apply(e,n);function s(t){z(o,i,r,s,a,"next",t)}function a(t){z(o,i,r,s,a,"throw",t)}s(void 0)}))}}var P={name:"Sidebar",components:{NcActionButton:b(),NcAppSidebar:m(),NcEmptyContent:y(),LegacyView:F,SidebarTab:x},data:function(){return{Sidebar:OCA.Files.Sidebar.state,error:null,loading:!0,fileInfo:null,starLoading:!1,isFullScreen:!1,hasLowHeight:!1}},computed:{file:function(){return this.Sidebar.file},tabs:function(){return this.Sidebar.tabs},views:function(){return this.Sidebar.views},davPath:function(){var t=OC.getCurrentUser().uid;return OC.linkToRemote("dav/files/".concat(t).concat((0,s.Ec)(this.file)))},activeTab:function(){return this.Sidebar.activeTab},subtitle:function(){return"".concat(this.size,", ").concat(this.time)},time:function(){return OC.Util.relativeModifiedDate(this.fileInfo.mtime)},fullTime:function(){return f()(this.fileInfo.mtime).format("LLL")},size:function(){return OC.Util.humanFileSize(this.fileInfo.size)},background:function(){return this.getPreviewIfAny(this.fileInfo)},appSidebar:function(){return this.fileInfo?{"data-mimetype":this.fileInfo.mimetype,"star-loading":this.starLoading,active:this.activeTab,background:this.background,class:{"app-sidebar--has-preview":this.fileInfo.hasPreview&&!this.isFullScreen,"app-sidebar--full":this.isFullScreen},compact:this.hasLowHeight||!this.fileInfo.hasPreview||this.isFullScreen,loading:this.loading,starred:this.fileInfo.isFavourited,subtitle:this.subtitle,subtitleTooltip:this.fullTime,title:this.fileInfo.name,titleTooltip:this.fileInfo.name}:this.error?{key:"error",subtitle:"",title:""}:{loading:this.loading,subtitle:"",title:""}},defaultAction:function(){return this.fileInfo&&OCA.Files&&OCA.Files.App&&OCA.Files.App.fileList&&OCA.Files.App.fileList.fileActions&&OCA.Files.App.fileList.fileActions.getDefaultFileAction&&OCA.Files.App.fileList.fileActions.getDefaultFileAction(this.fileInfo.mimetype,this.fileInfo.type,OC.PERMISSION_READ)},defaultActionListener:function(){return this.defaultAction?"figure-click":null},isSystemTagsEnabled:function(){return OCA&&"SystemTags"in OCA}},methods:{canDisplay:function(t){return t.enabled(this.fileInfo)},resetData:function(){var t=this;this.error=null,this.fileInfo=null,this.$nextTick((function(){t.$refs.tabs&&t.$refs.tabs.updateTabs()}))},getPreviewIfAny:function(t){return t.hasPreview&&!this.isFullScreen?OC.generateUrl("/core/preview?fileId=".concat(t.id,"&x=").concat(screen.width,"&y=").concat(screen.height,"&a=true")):this.getIconUrl(t)},getIconUrl:function(t){var e=t.mimetype||"application/octet-stream";return"httpd/unix-directory"===e?"shared"===t.mountType||"shared-root"===t.mountType?OC.MimeType.getIconUrl("dir-shared"):"external-root"===t.mountType?OC.MimeType.getIconUrl("dir-external"):void 0!==t.mountType&&""!==t.mountType?OC.MimeType.getIconUrl("dir-"+t.mountType):t.shareTypes&&(t.shareTypes.indexOf(p.D.SHARE_TYPE_LINK)>-1||t.shareTypes.indexOf(p.D.SHARE_TYPE_EMAIL)>-1)?OC.MimeType.getIconUrl("dir-public"):t.shareTypes&&t.shareTypes.length>0?OC.MimeType.getIconUrl("dir-shared"):OC.MimeType.getIconUrl("dir"):OC.MimeType.getIconUrl(e)},setActiveTab:function(t){OCA.Files.Sidebar.setActiveTab(t)},toggleStarred:function(e){var n=this;return E(regeneratorRuntime.mark((function i(){return regeneratorRuntime.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return i.prev=0,n.starLoading=!0,i.next=4,(0,l.default)({method:"PROPPATCH",url:n.davPath,data:'<?xml version="1.0"?>\n\t\t\t\t\t\t<d:propertyupdate xmlns:d="DAV:" xmlns:oc="http://owncloud.org/ns">\n\t\t\t\t\t\t'.concat(e?"<d:set>":"<d:remove>","\n\t\t\t\t\t\t\t<d:prop>\n\t\t\t\t\t\t\t\t<oc:favorite>1</oc:favorite>\n\t\t\t\t\t\t\t</d:prop>\n\t\t\t\t\t\t").concat(e?"</d:set>":"</d:remove>","\n\t\t\t\t\t\t</d:propertyupdate>")});case 4:OCA.Files&&OCA.Files.App&&OCA.Files.App.fileList&&OCA.Files.App.fileList.fileActions&&OCA.Files.App.fileList.fileActions.triggerAction("Favorite",OCA.Files.App.fileList.getModelForFile(n.fileInfo.name),OCA.Files.App.fileList),i.next=11;break;case 7:i.prev=7,i.t0=i.catch(0),OC.Notification.showTemporary(t("files","Unable to change the favourite state of the file")),console.error("Unable to change favourite state",i.t0);case 11:n.starLoading=!1;case 12:case"end":return i.stop()}}),i,null,[[0,7]])})))()},onDefaultAction:function(){this.defaultAction&&this.defaultAction.action(this.fileInfo.name,{fileInfo:this.fileInfo,dir:this.fileInfo.dir,fileList:OCA.Files.App.fileList,$file:c()("body")})},toggleTags:function(){OCA.SystemTags&&OCA.SystemTags.View&&OCA.SystemTags.View.toggle()},open:function(e){var n=this;return E(regeneratorRuntime.mark((function i(){return regeneratorRuntime.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:if(n.Sidebar.file=e,!e||""===e.trim()){i.next=21;break}return n.error=null,n.loading=!0,i.prev=4,i.next=7,A(n.davPath);case 7:n.fileInfo=i.sent,n.fileInfo.dir=n.file.split("/").slice(0,-1).join("/"),n.views.forEach((function(t){t.setFileInfo(n.fileInfo)})),n.$nextTick((function(){n.$refs.tabs&&n.$refs.tabs.updateTabs()})),i.next=18;break;case 13:throw i.prev=13,i.t0=i.catch(4),n.error=t("files","Error while loading the file data"),console.error("Error while loading the file data",i.t0),new Error(i.t0);case 18:return i.prev=18,n.loading=!1,i.finish(18);case 21:case"end":return i.stop()}}),i,null,[[4,13,18,21]])})))()},close:function(){this.Sidebar.file="",this.resetData()},setFullScreenMode:function(t){var e,n,i,r;this.isFullScreen=t,t?(null===(e=document.querySelector("#content"))||void 0===e?void 0:e.classList.add("with-sidebar--full"))||null===(n=document.querySelector("#content-vue"))||void 0===n||n.classList.add("with-sidebar--full"):(null===(i=document.querySelector("#content"))||void 0===i?void 0:i.classList.remove("with-sidebar--full"))||null===(r=document.querySelector("#content-vue"))||void 0===r||r.classList.remove("with-sidebar--full")},handleOpening:function(){(0,u.j8)("files:sidebar:opening")},handleOpened:function(){(0,u.j8)("files:sidebar:opened")},handleClosing:function(){(0,u.j8)("files:sidebar:closing")},handleClosed:function(){(0,u.j8)("files:sidebar:closed")},handleWindowResize:function(){this.hasLowHeight=document.documentElement.clientHeight<1024}},created:function(){window.addEventListener("resize",this.handleWindowResize),this.handleWindowResize()},beforeDestroy:function(){window.removeEventListener("resize",this.handleWindowResize)}},L=i(93379),R=i.n(L),M=i(7795),D=i.n(M),U=i(90569),B=i.n(U),q=i(3565),N=i.n(q),$=i(19216),Z=i.n($),H=i(44589),V=i.n(H),W=i(18674),K={};K.styleTagTransform=V(),K.setAttributes=N(),K.insert=B().bind(null,"head"),K.domAPI=D(),K.insertStyleElement=Z(),R()(W.Z,K),W.Z&&W.Z.locals&&W.Z.locals;var Y=(0,T.Z)(P,(function(){var t=this,e=t._self._c;return t.file?e("NcAppSidebar",t._b({ref:"sidebar",attrs:{"force-menu":!0,tabindex:"0"},on:t._d({close:t.close,"update:active":t.setActiveTab,"update:starred":t.toggleStarred,opening:t.handleOpening,opened:t.handleOpened,closing:t.handleClosing,closed:t.handleClosed},[t.defaultActionListener,function(e){return e.stopPropagation(),e.preventDefault(),t.onDefaultAction.apply(null,arguments)}]),scopedSlots:t._u([t.fileInfo?{key:"description",fn:function(){return t._l(t.views,(function(n){return e("LegacyView",{key:n.cid,attrs:{component:n,"file-info":t.fileInfo}})}))},proxy:!0}:null,t.fileInfo?{key:"secondary-actions",fn:function(){return[t.isSystemTagsEnabled?e("NcActionButton",{attrs:{"close-after-click":!0,icon:"icon-tag"},on:{click:t.toggleTags}},[t._v("\n\t\t\t"+t._s(t.t("files","Tags"))+"\n\t\t")]):t._e()]},proxy:!0}:null],null,!0)},"NcAppSidebar",t.appSidebar,!1),[t._v(" "),t._v(" "),t.error?e("NcEmptyContent",{attrs:{icon:"icon-error"}},[t._v("\n\t\t"+t._s(t.error)+"\n\t")]):t.fileInfo?t._l(t.tabs,(function(n){return[n.enabled(t.fileInfo)?e("SidebarTab",{directives:[{name:"show",rawName:"v-show",value:!t.loading,expression:"!loading"}],key:n.id,attrs:{id:n.id,name:n.name,icon:n.icon,"on-mount":n.mount,"on-update":n.update,"on-destroy":n.destroy,"on-scroll-bottom-reached":n.scrollBottomReached,"file-info":t.fileInfo},scopedSlots:t._u([void 0!==n.iconSvg?{key:"icon",fn:function(){return[e("span",{staticClass:"svg-icon",domProps:{innerHTML:t._s(n.iconSvg)}})]},proxy:!0}:null],null,!0)}):t._e()]})):t._e()],2):t._e()}),[],!1,null,"ed4cc070",null),G=Y.exports;function J(t){return J="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},J(t)}function Q(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,X(i.key),i)}}function X(t){var e=function(t,e){if("object"!==J(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e);if("object"!==J(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"===J(e)?e:String(e)}var tt=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=X(n="_state"))in e?Object.defineProperty(e,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[n]=i,this._state={},this._state.tabs=[],this._state.views=[],this._state.file="",this._state.activeTab="",console.debug("OCA.Files.Sidebar initialized")}var e,n;return e=t,(n=[{key:"state",get:function(){return this._state}},{key:"registerTab",value:function(t){return this._state.tabs.findIndex((function(e){return e.id===t.id}))>-1?(console.error("An tab with the same id ".concat(t.id," already exists"),t),!1):(this._state.tabs.push(t),!0)}},{key:"registerSecondaryView",value:function(t){return this._state.views.findIndex((function(e){return e.id===t.id}))>-1?(console.error("A similar view already exists",t),!1):(this._state.views.push(t),!0)}},{key:"file",get:function(){return this._state.file}},{key:"setActiveTab",value:function(t){this._state.activeTab=t}}])&&Q(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}(),et=i(57005);function nt(t){return nt="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},nt(t)}function it(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function rt(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,st(i.key),i)}}function ot(t,e,n){return(e=st(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function st(t){var e=function(t,e){if("object"!==nt(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e);if("object"!==nt(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"===nt(e)?e:String(e)}var at=function(){function t(){var e=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=n.id,r=n.name,o=n.icon,s=n.iconSvg,a=n.mount,c=n.update,l=n.destroy,u=n.enabled,d=n.scrollBottomReached;if(it(this,t),ot(this,"_id",void 0),ot(this,"_name",void 0),ot(this,"_icon",void 0),ot(this,"_iconSvgSanitized",void 0),ot(this,"_mount",void 0),ot(this,"_update",void 0),ot(this,"_destroy",void 0),ot(this,"_enabled",void 0),ot(this,"_scrollBottomReached",void 0),void 0===u&&(u=function(){return!0}),void 0===d&&(d=function(){}),"string"!=typeof i||""===i.trim())throw new Error("The id argument is not a valid string");if("string"!=typeof r||""===r.trim())throw new Error("The name argument is not a valid string");if(("string"!=typeof o||""===o.trim())&&"string"!=typeof s)throw new Error("Missing valid string for icon or iconSvg argument");if("function"!=typeof a)throw new Error("The mount argument should be a function");if("function"!=typeof c)throw new Error("The update argument should be a function");if("function"!=typeof l)throw new Error("The destroy argument should be a function");if("function"!=typeof u)throw new Error("The enabled argument should be a function");if("function"!=typeof d)throw new Error("The scrollBottomReached argument should be a function");this._id=i,this._name=r,this._icon=o,this._mount=a,this._update=c,this._destroy=l,this._enabled=u,this._scrollBottomReached=d,"string"==typeof s&&(0,et.t)(s).then((function(t){e._iconSvgSanitized=t}))}var e,n;return e=t,(n=[{key:"id",get:function(){return this._id}},{key:"name",get:function(){return this._name}},{key:"icon",get:function(){return this._icon}},{key:"iconSvg",get:function(){return this._iconSvgSanitized}},{key:"mount",get:function(){return this._mount}},{key:"update",get:function(){return this._update}},{key:"destroy",get:function(){return this._destroy}},{key:"enabled",get:function(){return this._enabled}},{key:"scrollBottomReached",get:function(){return this._scrollBottomReached}}])&&rt(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();r.ZP.prototype.t=o.translate,window.OCA.Files||(window.OCA.Files={}),Object.assign(window.OCA.Files,{Sidebar:new tt}),Object.assign(window.OCA.Files.Sidebar,{Tab:at}),console.debug("OCA.Files.Sidebar initialized"),window.addEventListener("DOMContentLoaded",(function(){var t=document.querySelector("body > .content")||document.querySelector("body > #content");if(t&&!document.getElementById("app-sidebar")){var e=document.createElement("div");e.id="app-sidebar",t.appendChild(e)}var n=new(r.ZP.extend(G))({name:"SidebarRoot"});n.$mount("#app-sidebar"),window.OCA.Files.Sidebar.open=n.open,window.OCA.Files.Sidebar.close=n.close,window.OCA.Files.Sidebar.setFullScreenMode=n.setFullScreenMode}))},18674:function(t,e,n){"use strict";var i=n(87537),r=n.n(i),o=n(23645),s=n.n(o)()(r());s.push([t.id,'.app-sidebar--has-preview[data-v-ed4cc070] .app-sidebar-header__figure{background-size:cover}.app-sidebar--has-preview[data-v-ed4cc070][data-mimetype="text/plain"] .app-sidebar-header__figure,.app-sidebar--has-preview[data-v-ed4cc070][data-mimetype="text/markdown"] .app-sidebar-header__figure{background-size:contain}.app-sidebar--full[data-v-ed4cc070]{position:fixed !important;z-index:2025 !important;top:0 !important;height:100% !important}.app-sidebar .svg-icon[data-v-ed4cc070] svg{width:20px;height:20px;fill:currentColor}',"",{version:3,sources:["webpack://./apps/files/src/views/Sidebar.vue"],names:[],mappings:"AAGE,uEACC,qBAAA,CAKA,yMACC,uBAAA,CAKH,oCACC,yBAAA,CACA,uBAAA,CACA,gBAAA,CACA,sBAAA,CAIA,4CACC,UAAA,CACA,WAAA,CACA,iBAAA",sourcesContent:['\n.app-sidebar {\n\t&--has-preview::v-deep {\n\t\t.app-sidebar-header__figure {\n\t\t\tbackground-size: cover;\n\t\t}\n\n\t\t&[data-mimetype="text/plain"],\n\t\t&[data-mimetype="text/markdown"] {\n\t\t\t.app-sidebar-header__figure {\n\t\t\t\tbackground-size: contain;\n\t\t\t}\n\t\t}\n\t}\n\n\t&--full {\n\t\tposition: fixed !important;\n\t\tz-index: 2025 !important;\n\t\ttop: 0 !important;\n\t\theight: 100% !important;\n\t}\n\n\t.svg-icon {\n\t\t::v-deep svg {\n\t\t\twidth: 20px;\n\t\t\theight: 20px;\n\t\t\tfill: currentColor;\n\t\t}\n\t}\n}\n'],sourceRoot:""}]),e.Z=s},46700:function(t,e,n){var i={"./af":42786,"./af.js":42786,"./ar":30867,"./ar-dz":14130,"./ar-dz.js":14130,"./ar-kw":96135,"./ar-kw.js":96135,"./ar-ly":56440,"./ar-ly.js":56440,"./ar-ma":47702,"./ar-ma.js":47702,"./ar-sa":16040,"./ar-sa.js":16040,"./ar-tn":37100,"./ar-tn.js":37100,"./ar.js":30867,"./az":31083,"./az.js":31083,"./be":9808,"./be.js":9808,"./bg":68338,"./bg.js":68338,"./bm":67438,"./bm.js":67438,"./bn":8905,"./bn-bd":76225,"./bn-bd.js":76225,"./bn.js":8905,"./bo":11560,"./bo.js":11560,"./br":1278,"./br.js":1278,"./bs":80622,"./bs.js":80622,"./ca":2468,"./ca.js":2468,"./cs":5822,"./cs.js":5822,"./cv":50877,"./cv.js":50877,"./cy":47373,"./cy.js":47373,"./da":24780,"./da.js":24780,"./de":59740,"./de-at":60217,"./de-at.js":60217,"./de-ch":60894,"./de-ch.js":60894,"./de.js":59740,"./dv":5300,"./dv.js":5300,"./el":50837,"./el.js":50837,"./en-au":78348,"./en-au.js":78348,"./en-ca":77925,"./en-ca.js":77925,"./en-gb":22243,"./en-gb.js":22243,"./en-ie":46436,"./en-ie.js":46436,"./en-il":47207,"./en-il.js":47207,"./en-in":44175,"./en-in.js":44175,"./en-nz":76319,"./en-nz.js":76319,"./en-sg":31662,"./en-sg.js":31662,"./eo":92915,"./eo.js":92915,"./es":55655,"./es-do":55251,"./es-do.js":55251,"./es-mx":96112,"./es-mx.js":96112,"./es-us":71146,"./es-us.js":71146,"./es.js":55655,"./et":5603,"./et.js":5603,"./eu":77763,"./eu.js":77763,"./fa":76959,"./fa.js":76959,"./fi":11897,"./fi.js":11897,"./fil":42549,"./fil.js":42549,"./fo":94694,"./fo.js":94694,"./fr":94470,"./fr-ca":63049,"./fr-ca.js":63049,"./fr-ch":52330,"./fr-ch.js":52330,"./fr.js":94470,"./fy":5044,"./fy.js":5044,"./ga":29295,"./ga.js":29295,"./gd":2101,"./gd.js":2101,"./gl":38794,"./gl.js":38794,"./gom-deva":27884,"./gom-deva.js":27884,"./gom-latn":23168,"./gom-latn.js":23168,"./gu":95349,"./gu.js":95349,"./he":24206,"./he.js":24206,"./hi":30094,"./hi.js":30094,"./hr":30316,"./hr.js":30316,"./hu":22138,"./hu.js":22138,"./hy-am":11423,"./hy-am.js":11423,"./id":29218,"./id.js":29218,"./is":90135,"./is.js":90135,"./it":90626,"./it-ch":10150,"./it-ch.js":10150,"./it.js":90626,"./ja":39183,"./ja.js":39183,"./jv":24286,"./jv.js":24286,"./ka":12105,"./ka.js":12105,"./kk":47772,"./kk.js":47772,"./km":18758,"./km.js":18758,"./kn":79282,"./kn.js":79282,"./ko":33730,"./ko.js":33730,"./ku":1408,"./ku.js":1408,"./ky":33291,"./ky.js":33291,"./lb":36841,"./lb.js":36841,"./lo":55466,"./lo.js":55466,"./lt":57010,"./lt.js":57010,"./lv":37595,"./lv.js":37595,"./me":39861,"./me.js":39861,"./mi":35493,"./mi.js":35493,"./mk":95966,"./mk.js":95966,"./ml":87341,"./ml.js":87341,"./mn":5115,"./mn.js":5115,"./mr":10370,"./mr.js":10370,"./ms":9847,"./ms-my":41237,"./ms-my.js":41237,"./ms.js":9847,"./mt":72126,"./mt.js":72126,"./my":56165,"./my.js":56165,"./nb":64924,"./nb.js":64924,"./ne":16744,"./ne.js":16744,"./nl":93901,"./nl-be":59814,"./nl-be.js":59814,"./nl.js":93901,"./nn":83877,"./nn.js":83877,"./oc-lnc":92135,"./oc-lnc.js":92135,"./pa-in":15858,"./pa-in.js":15858,"./pl":64495,"./pl.js":64495,"./pt":89520,"./pt-br":57971,"./pt-br.js":57971,"./pt.js":89520,"./ro":96459,"./ro.js":96459,"./ru":21793,"./ru.js":21793,"./sd":40950,"./sd.js":40950,"./se":10490,"./se.js":10490,"./si":90124,"./si.js":90124,"./sk":64249,"./sk.js":64249,"./sl":14985,"./sl.js":14985,"./sq":51104,"./sq.js":51104,"./sr":49131,"./sr-cyrl":79915,"./sr-cyrl.js":79915,"./sr.js":49131,"./ss":85893,"./ss.js":85893,"./sv":98760,"./sv.js":98760,"./sw":91172,"./sw.js":91172,"./ta":27333,"./ta.js":27333,"./te":23110,"./te.js":23110,"./tet":52095,"./tet.js":52095,"./tg":27321,"./tg.js":27321,"./th":9041,"./th.js":9041,"./tk":19005,"./tk.js":19005,"./tl-ph":75768,"./tl-ph.js":75768,"./tlh":89444,"./tlh.js":89444,"./tr":72397,"./tr.js":72397,"./tzl":28254,"./tzl.js":28254,"./tzm":51106,"./tzm-latn":30699,"./tzm-latn.js":30699,"./tzm.js":51106,"./ug-cn":9288,"./ug-cn.js":9288,"./uk":67691,"./uk.js":67691,"./ur":13795,"./ur.js":13795,"./uz":6791,"./uz-latn":60588,"./uz-latn.js":60588,"./uz.js":6791,"./vi":65666,"./vi.js":65666,"./x-pseudo":14378,"./x-pseudo.js":14378,"./yo":75805,"./yo.js":75805,"./zh-cn":83839,"./zh-cn.js":83839,"./zh-hk":55726,"./zh-hk.js":55726,"./zh-mo":99807,"./zh-mo.js":99807,"./zh-tw":74152,"./zh-tw.js":74152};function r(t){var e=o(t);return n(e)}function o(t){if(!n.o(i,t)){var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e}return i[t]}r.keys=function(){return Object.keys(i)},r.resolve=o,t.exports=r,r.id=46700}},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,r.amdD=function(){throw new Error("define cannot be used indirect")},r.amdO={},e=[],r.O=function(t,n,i,o){if(!n){var s=1/0;for(u=0;u<e.length;u++){n=e[u][0],i=e[u][1],o=e[u][2];for(var a=!0,c=0;c<n.length;c++)(!1&o||s>=o)&&Object.keys(r.O).every((function(t){return r.O[t](n[c])}))?n.splice(c--,1):(a=!1,o<s&&(s=o));if(a){e.splice(u--,1);var l=i();void 0!==l&&(t=l)}}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=4092,function(){r.b=document.baseURI||self.location.href;var t={4092:0};r.O.j=function(e){return 0===t[e]};var e=function(e,n){var i,o,s=n[0],a=n[1],c=n[2],l=0;if(s.some((function(e){return 0!==t[e]}))){for(i in a)r.o(a,i)&&(r.m[i]=a[i]);if(c)var u=c(r)}for(e&&e(n);l<s.length;l++)o=s[l],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(69391)}));o=r.O(o)}();
+//# sourceMappingURL=files-sidebar.js.map?v=9e644b6c7e887befa707
\ No newline at end of file
-{"version":3,"file":"files-sidebar.js?v=70d59b47cb2f8e262720","mappings":";gBAAIA,4gBC2BW,cAAf,+BA2CC,iDA3Cc,WAAeC,GAAG,2GACTC,EAAAA,EAAAA,SAAM,CAC5BC,OAAQ,WACRF,IAAAA,EACAG,KAAM,gyBA2BL,OASuE,OAvCnEC,EAAW,EAAH,KAiCRC,EAAOC,IAAIC,MAAMC,IAAIC,SAASC,YAAYC,QAAQC,iBAAiBR,EAASD,OAE5EU,EAAWP,IAAIC,MAAMC,IAAIC,SAASC,YAAYI,eAAeT,EAAK,KAG/DU,IAAM,SAACC,GAAG,OAAKH,EAASG,EAAI,EACrCH,EAASI,YAAc,iBAA4B,yBAAtBJ,EAASK,QAAmC,oBAElEL,GAAQ,4CACf,sBCtED,2UC4CA,IC5CuL,ED4CvL,CACAM,KAAAA,aAEAC,WAAAA,CACAC,sBAAAA,GACAC,eAAAA,KAGAC,MAAAA,CACAV,SAAAA,CACAW,KAAAA,OACAC,QAAAA,WAAAA,EACAC,UAAAA,GAEAC,GAAAA,CACAH,KAAAA,OACAE,UAAAA,GAEAP,KAAAA,CACAK,KAAAA,OACAE,UAAAA,GAEAE,KAAAA,CACAJ,KAAAA,OACAE,UAAAA,GAQAG,QAAAA,CACAL,KAAAA,SACAE,UAAAA,GAEAI,SAAAA,CACAN,KAAAA,SACAE,UAAAA,GAEAK,UAAAA,CACAP,KAAAA,SACAE,UAAAA,GAEAM,sBAAAA,CACAR,KAAAA,SACAC,QAAAA,WAAAA,IAIAtB,KAAAA,WACA,OACA8B,SAAAA,EAEA,EAEAC,SAAAA,CAEAC,UAAAA,WACA,6BACA,GAGAC,MAAAA,CACAvB,SAAAA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EAAoBa,EAAEL,GAAYkD,EAAYlD,IAGhD,GAAGmD,EAAS,IAAI1C,EAAS0C,EAAQ3D,EAClC,CAEA,IADGyD,GAA4BA,EAA2B3O,GACrDwM,EAAIJ,EAASK,OAAQD,IACzBiC,EAAUrC,EAASI,GAChBtB,EAAoBC,EAAEqD,EAAiBC,IAAYD,EAAgBC,IACrED,EAAgBC,GAAS,KAE1BD,EAAgBC,GAAW,EAE5B,OAAOvD,EAAoBgB,EAAEC,EAC9B,EAEI4C,EAAqBV,KAA4B,sBAAIA,KAA4B,uBAAK,GAC1FU,EAAmBC,QAAQN,EAAqBO,KAAK,KAAM,IAC3DF,EAAmBjG,KAAO4F,EAAqBO,KAAK,KAAMF,EAAmBjG,KAAKmG,KAAKF,OClDvF7D,EAAoBgE,QAAK5G,ECGzB,IAAI6G,EAAsBjE,EAAoBgB,OAAE5D,EAAW,CAAC,OAAO,WAAa,OAAO4C,EAAoB,MAAQ,IACnHiE,EAAsBjE,EAAoBgB,EAAEiD","sources":["webpack:///nextcloud/webpack/runtime/chunk loaded","webpack:///nextcloud/apps/files/src/services/FileInfo.js","webpack://nextcloud/./apps/files/src/components/SidebarTab.vue?eddf","webpack:///nextcloud/apps/files/src/components/SidebarTab.vue","webpack:///nextcloud/apps/files/src/components/SidebarTab.vue?vue&type=script&lang=js&","webpack://nextcloud/./apps/files/src/components/SidebarTab.vue?7aea","webpack:///nextcloud/apps/files/src/components/LegacyView.vue?vue&type=script&lang=js&","webpack:///nextcloud/apps/files/src/components/LegacyView.vue","webpack://nextcloud/./apps/files/src/components/LegacyView.vue?a2e2","webpack://nextcloud/./apps/files/src/components/LegacyView.vue?fb5f","webpack:///nextcloud/apps/files/src/views/Sidebar.vue","webpack:///nextcloud/apps/files/src/views/Sidebar.vue?vue&type=script&lang=js&","webpack://nextcloud/./apps/files/src/views/Sidebar.vue?10b3","webpack://nextcloud/./apps/files/src/views/Sidebar.vue?0b21","webpack://nextcloud/./apps/files/src/views/Sidebar.vue?589a","webpack:///nextcloud/apps/files/src/services/Sidebar.js","webpack:///nextcloud/apps/files/src/models/Tab.js","webpack:///nextcloud/apps/files/src/sidebar.js","webpack:///nextcloud/apps/files/src/views/Sidebar.vue?vue&type=style&index=0&id=4afc9c22&prod&lang=scss&scoped=true&","webpack:///nextcloud/node_modules/moment/locale|sync|/^\\.\\/.*$","webpack:///nextcloud/webpack/bootstrap","webpack:///nextcloud/webpack/runtime/amd define","webpack:///nextcloud/webpack/runtime/amd options","webpack:///nextcloud/webpack/runtime/compat get default export","webpack:///nextcloud/webpack/runtime/define property getters","webpack:///nextcloud/webpack/runtime/global","webpack:///nextcloud/webpack/runtime/hasOwnProperty shorthand","webpack:///nextcloud/webpack/runtime/make namespace object","webpack:///nextcloud/webpack/runtime/node module decorator","webpack:///nextcloud/webpack/runtime/runtimeId","webpack:///nextcloud/webpack/runtime/jsonp chunk loading","webpack:///nextcloud/webpack/runtime/nonce","webpack:///nextcloud/webpack/startup"],"sourcesContent":["var deferred = [];\n__webpack_require__.O = function(result, chunkIds, fn, priority) {\n\tif(chunkIds) {\n\t\tpriority = priority || 0;\n\t\tfor(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];\n\t\tdeferred[i] = [chunkIds, fn, priority];\n\t\treturn;\n\t}\n\tvar notFulfilled = Infinity;\n\tfor (var i = 0; i < deferred.length; i++) {\n\t\tvar chunkIds = deferred[i][0];\n\t\tvar fn = deferred[i][1];\n\t\tvar priority = deferred[i][2];\n\t\tvar fulfilled = true;\n\t\tfor (var j = 0; j < chunkIds.length; j++) {\n\t\t\tif ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every(function(key) { return __webpack_require__.O[key](chunkIds[j]); })) {\n\t\t\t\tchunkIds.splice(j--, 1);\n\t\t\t} else {\n\t\t\t\tfulfilled = false;\n\t\t\t\tif(priority < notFulfilled) notFulfilled = priority;\n\t\t\t}\n\t\t}\n\t\tif(fulfilled) {\n\t\t\tdeferred.splice(i--, 1)\n\t\t\tvar r = fn();\n\t\t\tif (r !== undefined) result = r;\n\t\t}\n\t}\n\treturn result;\n};","/**\n * @copyright Copyright (c) 2019 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\nimport axios from '@nextcloud/axios'\n\n/**\n * @param {any} url -\n */\nexport default async function(url) {\n\tconst response = await axios({\n\t\tmethod: 'PROPFIND',\n\t\turl,\n\t\tdata: `<?xml version=\"1.0\"?>\n\t\t\t<d:propfind xmlns:d=\"DAV:\"\n\t\t\t\txmlns:oc=\"http://owncloud.org/ns\"\n\t\t\t\txmlns:nc=\"http://nextcloud.org/ns\"\n\t\t\t\txmlns:ocs=\"http://open-collaboration-services.org/ns\">\n\t\t\t<d:prop>\n\t\t\t\t<d:getlastmodified />\n\t\t\t\t<d:getetag />\n\t\t\t\t<d:getcontenttype />\n\t\t\t\t<d:resourcetype />\n\t\t\t\t<oc:fileid />\n\t\t\t\t<oc:permissions />\n\t\t\t\t<oc:size />\n\t\t\t\t<d:getcontentlength />\n\t\t\t\t<nc:has-preview />\n\t\t\t\t<nc:mount-type />\n\t\t\t\t<nc:is-encrypted />\n\t\t\t\t<ocs:share-permissions />\n\t\t\t\t<nc:share-attributes />\n\t\t\t\t<oc:tags />\n\t\t\t\t<oc:favorite />\n\t\t\t\t<oc:comments-unread />\n\t\t\t\t<oc:owner-id />\n\t\t\t\t<oc:owner-display-name />\n\t\t\t\t<oc:share-types />\n\t\t\t</d:prop>\n\t\t\t</d:propfind>`,\n\t})\n\n\t// TODO: create new parser or use cdav-lib when available\n\tconst file = OCA.Files.App.fileList.filesClient._client.parseMultiStatus(response.data)\n\t// TODO: create new parser or use cdav-lib when available\n\tconst fileInfo = OCA.Files.App.fileList.filesClient._parseFileInfo(file[0])\n\n\t// TODO remove when no more legacy backbone is used\n\tfileInfo.get = (key) => fileInfo[key]\n\tfileInfo.isDirectory = () => fileInfo.mimetype === 'httpd/unix-directory'\n\n\treturn fileInfo\n}\n","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('NcAppSidebarTab',{ref:\"tab\",attrs:{\"id\":_vm.id,\"name\":_vm.name,\"icon\":_vm.icon},on:{\"bottomReached\":_vm.onScrollBottomReached},scopedSlots:_vm._u([{key:\"icon\",fn:function(){return [_vm._t(\"icon\")]},proxy:true}],null,true)},[_vm._v(\" \"),(_vm.loading)?_c('NcEmptyContent',{attrs:{\"icon\":\"icon-loading\"}}):_vm._e(),_vm._v(\" \"),_c('div',{ref:\"mount\"})],1)\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n<!--\n - @copyright Copyright (c) 2019 John Molakvoæ <skjnldsv@protonmail.com>\n -\n - @author John Molakvoæ <skjnldsv@protonmail.com>\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 -->\n<template>\n\t<NcAppSidebarTab :id=\"id\"\n\t\tref=\"tab\"\n\t\t:name=\"name\"\n\t\t:icon=\"icon\"\n\t\t@bottomReached=\"onScrollBottomReached\">\n\t\t<template #icon>\n\t\t\t<slot name=\"icon\" />\n\t\t</template>\n\t\t<!-- Fallback loading -->\n\t\t<NcEmptyContent v-if=\"loading\" icon=\"icon-loading\" />\n\n\t\t<!-- Using a dummy div as Vue mount replace the element directly\n\t\t\tIt does NOT append to the content -->\n\t\t<div ref=\"mount\" />\n\t</NcAppSidebarTab>\n</template>\n\n<script>\nimport NcAppSidebarTab from '@nextcloud/vue/dist/Components/NcAppSidebarTab'\nimport NcEmptyContent from '@nextcloud/vue/dist/Components/NcEmptyContent'\n\nexport default {\n\tname: 'SidebarTab',\n\n\tcomponents: {\n\t\tNcAppSidebarTab,\n\t\tNcEmptyContent,\n\t},\n\n\tprops: {\n\t\tfileInfo: {\n\t\t\ttype: Object,\n\t\t\tdefault: () => {},\n\t\t\trequired: true,\n\t\t},\n\t\tid: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\t\tname: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\t\ticon: {\n\t\t\ttype: String,\n\t\t\trequired: false,\n\t\t},\n\n\t\t/**\n\t\t * Lifecycle methods.\n\t\t * They are prefixed with `on` to avoid conflict with Vue\n\t\t * methods like this.destroy\n\t\t */\n\t\tonMount: {\n\t\t\ttype: Function,\n\t\t\trequired: true,\n\t\t},\n\t\tonUpdate: {\n\t\t\ttype: Function,\n\t\t\trequired: true,\n\t\t},\n\t\tonDestroy: {\n\t\t\ttype: Function,\n\t\t\trequired: true,\n\t\t},\n\t\tonScrollBottomReached: {\n\t\t\ttype: Function,\n\t\t\tdefault: () => {},\n\t\t},\n\t},\n\n\tdata() {\n\t\treturn {\n\t\t\tloading: true,\n\t\t}\n\t},\n\n\tcomputed: {\n\t\t// TODO: implement a better way to force pass a prop from Sidebar\n\t\tactiveTab() {\n\t\t\treturn this.$parent.activeTab\n\t\t},\n\t},\n\n\twatch: {\n\t\tasync fileInfo(newFile, oldFile) {\n\t\t\t// Update fileInfo on change\n\t\t\tif (newFile.id !== oldFile.id) {\n\t\t\t\tthis.loading = true\n\t\t\t\tawait this.onUpdate(this.fileInfo)\n\t\t\t\tthis.loading = false\n\t\t\t}\n\t\t},\n\t},\n\n\tasync mounted() {\n\t\tthis.loading = true\n\t\t// Mount the tab: mounting point, fileInfo, vue context\n\t\tawait this.onMount(this.$refs.mount, this.fileInfo, this.$refs.tab)\n\t\tthis.loading = false\n\t},\n\n\tasync beforeDestroy() {\n\t\t// unmount the tab\n\t\tawait this.onDestroy()\n\t},\n}\n</script>\n","import mod from \"-!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./SidebarTab.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./SidebarTab.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./SidebarTab.vue?vue&type=template&id=b700b2ea&\"\nimport script from \"./SidebarTab.vue?vue&type=script&lang=js&\"\nexport * from \"./SidebarTab.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","import mod from \"-!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./LegacyView.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./LegacyView.vue?vue&type=script&lang=js&\"","<!--\n - @copyright Copyright (c) 2019 John Molakvoæ <skjnldsv@protonmail.com>\n -\n - @author John Molakvoæ <skjnldsv@protonmail.com>\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 -->\n\n<template>\n\t<div />\n</template>\n<script>\nexport default {\n\tname: 'LegacyView',\n\tprops: {\n\t\tcomponent: {\n\t\t\ttype: Object,\n\t\t\trequired: true,\n\t\t},\n\t\tfileInfo: {\n\t\t\ttype: Object,\n\t\t\tdefault: () => {},\n\t\t\trequired: true,\n\t\t},\n\t},\n\twatch: {\n\t\tfileInfo(fileInfo) {\n\t\t\t// update the backbone model FileInfo\n\t\t\tthis.setFileInfo(fileInfo)\n\t\t},\n\t},\n\tmounted() {\n\t\t// append the backbone element and set the FileInfo\n\t\tthis.component.$el.replaceAll(this.$el)\n\t\tthis.setFileInfo(this.fileInfo)\n\t},\n\tmethods: {\n\t\tsetFileInfo(fileInfo) {\n\t\t\tthis.component.setFileInfo(new OCA.Files.FileInfoModel(fileInfo))\n\t\t},\n\t},\n}\n</script>\n<style>\n</style>\n","import { render, staticRenderFns } from \"./LegacyView.vue?vue&type=template&id=2245cbe7&\"\nimport script from \"./LegacyView.vue?vue&type=script&lang=js&\"\nexport * from \"./LegacyView.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('div')\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<!--\n - @copyright Copyright (c) 2019 John Molakvoæ <skjnldsv@protonmail.com>\n -\n - @author John Molakvoæ <skjnldsv@protonmail.com>\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 -->\n\n<template>\n\t<NcAppSidebar v-if=\"file\"\n\t\tref=\"sidebar\"\n\t\tv-bind=\"appSidebar\"\n\t\t:force-menu=\"true\"\n\t\ttabindex=\"0\"\n\t\t@close=\"close\"\n\t\t@update:active=\"setActiveTab\"\n\t\t@update:starred=\"toggleStarred\"\n\t\t@[defaultActionListener].stop.prevent=\"onDefaultAction\"\n\t\t@opening=\"handleOpening\"\n\t\t@opened=\"handleOpened\"\n\t\t@closing=\"handleClosing\"\n\t\t@closed=\"handleClosed\">\n\t\t<!-- TODO: create a standard to allow multiple elements here? -->\n\t\t<template v-if=\"fileInfo\" #description>\n\t\t\t<LegacyView v-for=\"view in views\"\n\t\t\t\t:key=\"view.cid\"\n\t\t\t\t:component=\"view\"\n\t\t\t\t:file-info=\"fileInfo\" />\n\t\t</template>\n\n\t\t<!-- Actions menu -->\n\t\t<template v-if=\"fileInfo\" #secondary-actions>\n\t\t\t<!-- TODO: create proper api for apps to register actions\n\t\t\tAnd inject themselves here. -->\n\t\t\t<NcActionButton v-if=\"isSystemTagsEnabled\"\n\t\t\t\t:close-after-click=\"true\"\n\t\t\t\ticon=\"icon-tag\"\n\t\t\t\t@click=\"toggleTags\">\n\t\t\t\t{{ t('files', 'Tags') }}\n\t\t\t</NcActionButton>\n\t\t</template>\n\n\t\t<!-- Error display -->\n\t\t<NcEmptyContent v-if=\"error\" icon=\"icon-error\">\n\t\t\t{{ error }}\n\t\t</NcEmptyContent>\n\n\t\t<!-- If fileInfo fetch is complete, render tabs -->\n\t\t<template v-for=\"tab in tabs\" v-else-if=\"fileInfo\">\n\t\t\t<!-- Hide them if we're loading another file but keep them mounted -->\n\t\t\t<SidebarTab v-if=\"tab.enabled(fileInfo)\"\n\t\t\t\tv-show=\"!loading\"\n\t\t\t\t:id=\"tab.id\"\n\t\t\t\t:key=\"tab.id\"\n\t\t\t\t:name=\"tab.name\"\n\t\t\t\t:icon=\"tab.icon\"\n\t\t\t\t:on-mount=\"tab.mount\"\n\t\t\t\t:on-update=\"tab.update\"\n\t\t\t\t:on-destroy=\"tab.destroy\"\n\t\t\t\t:on-scroll-bottom-reached=\"tab.scrollBottomReached\"\n\t\t\t\t:file-info=\"fileInfo\">\n\t\t\t\t<template v-if=\"tab.iconSvg !== undefined\" #icon>\n\t\t\t\t\t<!-- eslint-disable-next-line vue/no-v-html -->\n\t\t\t\t\t<span class=\"svg-icon\" v-html=\"tab.iconSvg\" />\n\t\t\t\t</template>\n\t\t\t</SidebarTab>\n\t\t</template>\n\t</NcAppSidebar>\n</template>\n<script>\nimport { encodePath } from '@nextcloud/paths'\nimport $ from 'jquery'\nimport axios from '@nextcloud/axios'\nimport { emit } from '@nextcloud/event-bus'\nimport moment from '@nextcloud/moment'\nimport { Type as ShareTypes } from '@nextcloud/sharing'\n\nimport NcAppSidebar from '@nextcloud/vue/dist/Components/NcAppSidebar'\nimport NcActionButton from '@nextcloud/vue/dist/Components/NcActionButton'\nimport NcEmptyContent from '@nextcloud/vue/dist/Components/NcEmptyContent'\n\nimport FileInfo from '../services/FileInfo'\nimport SidebarTab from '../components/SidebarTab'\nimport LegacyView from '../components/LegacyView'\n\nexport default {\n\tname: 'Sidebar',\n\n\tcomponents: {\n\t\tNcActionButton,\n\t\tNcAppSidebar,\n\t\tNcEmptyContent,\n\t\tLegacyView,\n\t\tSidebarTab,\n\t},\n\n\tdata() {\n\t\treturn {\n\t\t\t// reactive state\n\t\t\tSidebar: OCA.Files.Sidebar.state,\n\t\t\terror: null,\n\t\t\tloading: true,\n\t\t\tfileInfo: null,\n\t\t\tstarLoading: false,\n\t\t\tisFullScreen: false,\n\t\t}\n\t},\n\n\tcomputed: {\n\t\t/**\n\t\t * Current filename\n\t\t * This is bound to the Sidebar service and\n\t\t * is used to load a new file\n\t\t *\n\t\t * @return {string}\n\t\t */\n\t\tfile() {\n\t\t\treturn this.Sidebar.file\n\t\t},\n\n\t\t/**\n\t\t * List of all the registered tabs\n\t\t *\n\t\t * @return {Array}\n\t\t */\n\t\ttabs() {\n\t\t\treturn this.Sidebar.tabs\n\t\t},\n\n\t\t/**\n\t\t * List of all the registered views\n\t\t *\n\t\t * @return {Array}\n\t\t */\n\t\tviews() {\n\t\t\treturn this.Sidebar.views\n\t\t},\n\n\t\t/**\n\t\t * Current user dav root path\n\t\t *\n\t\t * @return {string}\n\t\t */\n\t\tdavPath() {\n\t\t\tconst user = OC.getCurrentUser().uid\n\t\t\treturn OC.linkToRemote(`dav/files/${user}${encodePath(this.file)}`)\n\t\t},\n\n\t\t/**\n\t\t * Current active tab handler\n\t\t *\n\t\t * @param {string} id the tab id to set as active\n\t\t * @return {string} the current active tab\n\t\t */\n\t\tactiveTab() {\n\t\t\treturn this.Sidebar.activeTab\n\t\t},\n\n\t\t/**\n\t\t * Sidebar subtitle\n\t\t *\n\t\t * @return {string}\n\t\t */\n\t\tsubtitle() {\n\t\t\treturn `${this.size}, ${this.time}`\n\t\t},\n\n\t\t/**\n\t\t * File last modified formatted string\n\t\t *\n\t\t * @return {string}\n\t\t */\n\t\ttime() {\n\t\t\treturn OC.Util.relativeModifiedDate(this.fileInfo.mtime)\n\t\t},\n\n\t\t/**\n\t\t * File last modified full string\n\t\t *\n\t\t * @return {string}\n\t\t */\n\t\tfullTime() {\n\t\t\treturn moment(this.fileInfo.mtime).format('LLL')\n\t\t},\n\n\t\t/**\n\t\t * File size formatted string\n\t\t *\n\t\t * @return {string}\n\t\t */\n\t\tsize() {\n\t\t\treturn OC.Util.humanFileSize(this.fileInfo.size)\n\t\t},\n\n\t\t/**\n\t\t * File background/figure to illustrate the sidebar header\n\t\t *\n\t\t * @return {string}\n\t\t */\n\t\tbackground() {\n\t\t\treturn this.getPreviewIfAny(this.fileInfo)\n\t\t},\n\n\t\t/**\n\t\t * App sidebar v-binding object\n\t\t *\n\t\t * @return {object}\n\t\t */\n\t\tappSidebar() {\n\t\t\tif (this.fileInfo) {\n\t\t\t\treturn {\n\t\t\t\t\t'data-mimetype': this.fileInfo.mimetype,\n\t\t\t\t\t'star-loading': this.starLoading,\n\t\t\t\t\tactive: this.activeTab,\n\t\t\t\t\tbackground: this.background,\n\t\t\t\t\tclass: {\n\t\t\t\t\t\t'app-sidebar--has-preview': this.fileInfo.hasPreview && !this.isFullScreen,\n\t\t\t\t\t\t'app-sidebar--full': this.isFullScreen,\n\t\t\t\t\t},\n\t\t\t\t\tcompact: !this.fileInfo.hasPreview || this.isFullScreen,\n\t\t\t\t\tloading: this.loading,\n\t\t\t\t\tstarred: this.fileInfo.isFavourited,\n\t\t\t\t\tsubtitle: this.subtitle,\n\t\t\t\t\tsubtitleTooltip: this.fullTime,\n\t\t\t\t\ttitle: this.fileInfo.name,\n\t\t\t\t\ttitleTooltip: this.fileInfo.name,\n\t\t\t\t}\n\t\t\t} else if (this.error) {\n\t\t\t\treturn {\n\t\t\t\t\tkey: 'error', // force key to re-render\n\t\t\t\t\tsubtitle: '',\n\t\t\t\t\ttitle: '',\n\t\t\t\t}\n\t\t\t}\n\t\t\t// no fileInfo yet, showing empty data\n\t\t\treturn {\n\t\t\t\tloading: this.loading,\n\t\t\t\tsubtitle: '',\n\t\t\t\ttitle: '',\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Default action object for the current file\n\t\t *\n\t\t * @return {object}\n\t\t */\n\t\tdefaultAction() {\n\t\t\treturn this.fileInfo\n\t\t\t\t&& OCA.Files && OCA.Files.App && OCA.Files.App.fileList\n\t\t\t\t&& OCA.Files.App.fileList.fileActions\n\t\t\t\t&& OCA.Files.App.fileList.fileActions.getDefaultFileAction\n\t\t\t\t&& OCA.Files.App.fileList\n\t\t\t\t\t.fileActions.getDefaultFileAction(this.fileInfo.mimetype, this.fileInfo.type, OC.PERMISSION_READ)\n\n\t\t},\n\n\t\t/**\n\t\t * Dynamic header click listener to ensure\n\t\t * nothing is listening for a click if there\n\t\t * is no default action\n\t\t *\n\t\t * @return {string|null}\n\t\t */\n\t\tdefaultActionListener() {\n\t\t\treturn this.defaultAction ? 'figure-click' : null\n\t\t},\n\n\t\tisSystemTagsEnabled() {\n\t\t\treturn OCA && 'SystemTags' in OCA\n\t\t},\n\t},\n\n\tmethods: {\n\t\t/**\n\t\t * Can this tab be displayed ?\n\t\t *\n\t\t * @param {object} tab a registered tab\n\t\t * @return {boolean}\n\t\t */\n\t\tcanDisplay(tab) {\n\t\t\treturn tab.enabled(this.fileInfo)\n\t\t},\n\t\tresetData() {\n\t\t\tthis.error = null\n\t\t\tthis.fileInfo = null\n\t\t\tthis.$nextTick(() => {\n\t\t\t\tif (this.$refs.tabs) {\n\t\t\t\t\tthis.$refs.tabs.updateTabs()\n\t\t\t\t}\n\t\t\t})\n\t\t},\n\n\t\tgetPreviewIfAny(fileInfo) {\n\t\t\tif (fileInfo.hasPreview && !this.isFullScreen) {\n\t\t\t\treturn OC.generateUrl(`/core/preview?fileId=${fileInfo.id}&x=${screen.width}&y=${screen.height}&a=true`)\n\t\t\t}\n\t\t\treturn this.getIconUrl(fileInfo)\n\t\t},\n\n\t\t/**\n\t\t * Copied from https://github.com/nextcloud/server/blob/16e0887ec63591113ee3f476e0c5129e20180cde/apps/files/js/filelist.js#L1377\n\t\t * TODO: We also need this as a standalone library\n\t\t *\n\t\t * @param {object} fileInfo the fileinfo\n\t\t * @return {string} Url to the icon for mimeType\n\t\t */\n\t\tgetIconUrl(fileInfo) {\n\t\t\tconst mimeType = fileInfo.mimetype || 'application/octet-stream'\n\t\t\tif (mimeType === 'httpd/unix-directory') {\n\t\t\t\t// use default folder icon\n\t\t\t\tif (fileInfo.mountType === 'shared' || fileInfo.mountType === 'shared-root') {\n\t\t\t\t\treturn OC.MimeType.getIconUrl('dir-shared')\n\t\t\t\t} else if (fileInfo.mountType === 'external-root') {\n\t\t\t\t\treturn OC.MimeType.getIconUrl('dir-external')\n\t\t\t\t} else if (fileInfo.mountType !== undefined && fileInfo.mountType !== '') {\n\t\t\t\t\treturn OC.MimeType.getIconUrl('dir-' + fileInfo.mountType)\n\t\t\t\t} else if (fileInfo.shareTypes && (\n\t\t\t\t\tfileInfo.shareTypes.indexOf(ShareTypes.SHARE_TYPE_LINK) > -1\n\t\t\t\t\t|| fileInfo.shareTypes.indexOf(ShareTypes.SHARE_TYPE_EMAIL) > -1)\n\t\t\t\t) {\n\t\t\t\t\treturn OC.MimeType.getIconUrl('dir-public')\n\t\t\t\t} else if (fileInfo.shareTypes && fileInfo.shareTypes.length > 0) {\n\t\t\t\t\treturn OC.MimeType.getIconUrl('dir-shared')\n\t\t\t\t}\n\t\t\t\treturn OC.MimeType.getIconUrl('dir')\n\t\t\t}\n\t\t\treturn OC.MimeType.getIconUrl(mimeType)\n\t\t},\n\n\t\t/**\n\t\t * Set current active tab\n\t\t *\n\t\t * @param {string} id tab unique id\n\t\t */\n\t\tsetActiveTab(id) {\n\t\t\tOCA.Files.Sidebar.setActiveTab(id)\n\t\t},\n\n\t\t/**\n\t\t * Toggle favourite state\n\t\t * TODO: better implementation\n\t\t *\n\t\t * @param {boolean} state favourited or not\n\t\t */\n\t\tasync toggleStarred(state) {\n\t\t\ttry {\n\t\t\t\tthis.starLoading = true\n\t\t\t\tawait axios({\n\t\t\t\t\tmethod: 'PROPPATCH',\n\t\t\t\t\turl: this.davPath,\n\t\t\t\t\tdata: `<?xml version=\"1.0\"?>\n\t\t\t\t\t\t<d:propertyupdate xmlns:d=\"DAV:\" xmlns:oc=\"http://owncloud.org/ns\">\n\t\t\t\t\t\t${state ? '<d:set>' : '<d:remove>'}\n\t\t\t\t\t\t\t<d:prop>\n\t\t\t\t\t\t\t\t<oc:favorite>1</oc:favorite>\n\t\t\t\t\t\t\t</d:prop>\n\t\t\t\t\t\t${state ? '</d:set>' : '</d:remove>'}\n\t\t\t\t\t\t</d:propertyupdate>`,\n\t\t\t\t})\n\n\t\t\t\t// TODO: Obliterate as soon as possible and use events with new files app\n\t\t\t\t// Terrible fallback for legacy files: toggle filelist as well\n\t\t\t\tif (OCA.Files && OCA.Files.App && OCA.Files.App.fileList && OCA.Files.App.fileList.fileActions) {\n\t\t\t\t\tOCA.Files.App.fileList.fileActions.triggerAction('Favorite', OCA.Files.App.fileList.getModelForFile(this.fileInfo.name), OCA.Files.App.fileList)\n\t\t\t\t}\n\n\t\t\t} catch (error) {\n\t\t\t\tOC.Notification.showTemporary(t('files', 'Unable to change the favourite state of the file'))\n\t\t\t\tconsole.error('Unable to change favourite state', error)\n\t\t\t}\n\t\t\tthis.starLoading = false\n\t\t},\n\n\t\tonDefaultAction() {\n\t\t\tif (this.defaultAction) {\n\t\t\t\t// generate fake context\n\t\t\t\tthis.defaultAction.action(this.fileInfo.name, {\n\t\t\t\t\tfileInfo: this.fileInfo,\n\t\t\t\t\tdir: this.fileInfo.dir,\n\t\t\t\t\tfileList: OCA.Files.App.fileList,\n\t\t\t\t\t$file: $('body'),\n\t\t\t\t})\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Toggle the tags selector\n\t\t */\n\t\ttoggleTags() {\n\t\t\tif (OCA.SystemTags && OCA.SystemTags.View) {\n\t\t\t\tOCA.SystemTags.View.toggle()\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Open the sidebar for the given file\n\t\t *\n\t\t * @param {string} path the file path to load\n\t\t * @return {Promise}\n\t\t * @throws {Error} loading failure\n\t\t */\n\t\tasync open(path) {\n\t\t\t// update current opened file\n\t\t\tthis.Sidebar.file = path\n\n\t\t\tif (path && path.trim() !== '') {\n\t\t\t\t// reset data, keep old fileInfo to not reload all tabs and just hide them\n\t\t\t\tthis.error = null\n\t\t\t\tthis.loading = true\n\n\t\t\t\ttry {\n\t\t\t\t\tthis.fileInfo = await FileInfo(this.davPath)\n\t\t\t\t\t// adding this as fallback because other apps expect it\n\t\t\t\t\tthis.fileInfo.dir = this.file.split('/').slice(0, -1).join('/')\n\n\t\t\t\t\t// DEPRECATED legacy views\n\t\t\t\t\t// TODO: remove\n\t\t\t\t\tthis.views.forEach(view => {\n\t\t\t\t\t\tview.setFileInfo(this.fileInfo)\n\t\t\t\t\t})\n\n\t\t\t\t\tthis.$nextTick(() => {\n\t\t\t\t\t\tif (this.$refs.tabs) {\n\t\t\t\t\t\t\tthis.$refs.tabs.updateTabs()\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\t\t\t\t} catch (error) {\n\t\t\t\t\tthis.error = t('files', 'Error while loading the file data')\n\t\t\t\t\tconsole.error('Error while loading the file data', error)\n\n\t\t\t\t\tthrow new Error(error)\n\t\t\t\t} finally {\n\t\t\t\t\tthis.loading = false\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Close the sidebar\n\t\t */\n\t\tclose() {\n\t\t\tthis.Sidebar.file = ''\n\t\t\tthis.resetData()\n\t\t},\n\n\t\t/**\n\t\t * Allow to set the Sidebar as fullscreen from OCA.Files.Sidebar\n\t\t *\n\t\t * @param {boolean} isFullScreen - Whether or not to render the Sidebar in fullscreen.\n\t\t */\n\t\tsetFullScreenMode(isFullScreen) {\n\t\t\tthis.isFullScreen = isFullScreen\n\t\t\tif (isFullScreen) {\n\t\t\t\tdocument.querySelector('#content')?.classList.add('with-sidebar--full')\n\t\t\t\t\t|| document.querySelector('#content-vue')?.classList.add('with-sidebar--full')\n\t\t\t} else {\n\t\t\t\tdocument.querySelector('#content')?.classList.remove('with-sidebar--full')\n\t\t\t\t\t|| document.querySelector('#content-vue')?.classList.remove('with-sidebar--full')\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Emit SideBar events.\n\t\t */\n\t\thandleOpening() {\n\t\t\temit('files:sidebar:opening')\n\t\t},\n\t\thandleOpened() {\n\t\t\temit('files:sidebar:opened')\n\t\t},\n\t\thandleClosing() {\n\t\t\temit('files:sidebar:closing')\n\t\t},\n\t\thandleClosed() {\n\t\t\temit('files:sidebar:closed')\n\t\t},\n\t},\n}\n</script>\n<style lang=\"scss\" scoped>\n.app-sidebar {\n\t&--has-preview::v-deep {\n\t\t.app-sidebar-header__figure {\n\t\t\tbackground-size: cover;\n\t\t}\n\n\t\t&[data-mimetype=\"text/plain\"],\n\t\t&[data-mimetype=\"text/markdown\"] {\n\t\t\t.app-sidebar-header__figure {\n\t\t\t\tbackground-size: contain;\n\t\t\t}\n\t\t}\n\t}\n\n\t&--full {\n\t\tposition: fixed !important;\n\t\tz-index: 2025 !important;\n\t\ttop: 0 !important;\n\t\theight: 100% !important;\n\t}\n\n\t.svg-icon {\n\t\t::v-deep svg {\n\t\t\twidth: 20px;\n\t\t\theight: 20px;\n\t\t\tfill: currentColor;\n\t\t}\n\t}\n}\n</style>\n","import mod from \"-!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Sidebar.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Sidebar.vue?vue&type=script&lang=js&\"","\n import API from \"!../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/sass-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Sidebar.vue?vue&type=style&index=0&id=4afc9c22&prod&lang=scss&scoped=true&\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\n\n options.insert = insertFn.bind(null, \"head\");\n \noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/sass-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Sidebar.vue?vue&type=style&index=0&id=4afc9c22&prod&lang=scss&scoped=true&\";\n export default content && content.locals ? content.locals : undefined;\n","import { render, staticRenderFns } from \"./Sidebar.vue?vue&type=template&id=4afc9c22&scoped=true&\"\nimport script from \"./Sidebar.vue?vue&type=script&lang=js&\"\nexport * from \"./Sidebar.vue?vue&type=script&lang=js&\"\nimport style0 from \"./Sidebar.vue?vue&type=style&index=0&id=4afc9c22&prod&lang=scss&scoped=true&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"4afc9c22\",\n null\n \n)\n\nexport default component.exports","var render = function render(){var _vm=this,_c=_vm._self._c;return (_vm.file)?_c('NcAppSidebar',_vm._b({ref:\"sidebar\",attrs:{\"force-menu\":true,\"tabindex\":\"0\"},on:_vm._d({\"close\":_vm.close,\"update:active\":_vm.setActiveTab,\"update:starred\":_vm.toggleStarred,\"opening\":_vm.handleOpening,\"opened\":_vm.handleOpened,\"closing\":_vm.handleClosing,\"closed\":_vm.handleClosed},[_vm.defaultActionListener,function($event){$event.stopPropagation();$event.preventDefault();return _vm.onDefaultAction.apply(null, arguments)}]),scopedSlots:_vm._u([(_vm.fileInfo)?{key:\"description\",fn:function(){return _vm._l((_vm.views),function(view){return _c('LegacyView',{key:view.cid,attrs:{\"component\":view,\"file-info\":_vm.fileInfo}})})},proxy:true}:null,(_vm.fileInfo)?{key:\"secondary-actions\",fn:function(){return [(_vm.isSystemTagsEnabled)?_c('NcActionButton',{attrs:{\"close-after-click\":true,\"icon\":\"icon-tag\"},on:{\"click\":_vm.toggleTags}},[_vm._v(\"\\n\\t\\t\\t\"+_vm._s(_vm.t('files', 'Tags'))+\"\\n\\t\\t\")]):_vm._e()]},proxy:true}:null],null,true)},'NcAppSidebar',_vm.appSidebar,false),[_vm._v(\" \"),_vm._v(\" \"),(_vm.error)?_c('NcEmptyContent',{attrs:{\"icon\":\"icon-error\"}},[_vm._v(\"\\n\\t\\t\"+_vm._s(_vm.error)+\"\\n\\t\")]):(_vm.fileInfo)?_vm._l((_vm.tabs),function(tab){return [(tab.enabled(_vm.fileInfo))?_c('SidebarTab',{directives:[{name:\"show\",rawName:\"v-show\",value:(!_vm.loading),expression:\"!loading\"}],key:tab.id,attrs:{\"id\":tab.id,\"name\":tab.name,\"icon\":tab.icon,\"on-mount\":tab.mount,\"on-update\":tab.update,\"on-destroy\":tab.destroy,\"on-scroll-bottom-reached\":tab.scrollBottomReached,\"file-info\":_vm.fileInfo},scopedSlots:_vm._u([(tab.iconSvg !== undefined)?{key:\"icon\",fn:function(){return [_c('span',{staticClass:\"svg-icon\",domProps:{\"innerHTML\":_vm._s(tab.iconSvg)}})]},proxy:true}:null],null,true)}):_vm._e()]}):_vm._e()],2):_vm._e()\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","/**\n * @copyright Copyright (c) 2019 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\nexport default class Sidebar {\n\n\t_state\n\n\tconstructor() {\n\t\t// init empty state\n\t\tthis._state = {}\n\n\t\t// init default values\n\t\tthis._state.tabs = []\n\t\tthis._state.views = []\n\t\tthis._state.file = ''\n\t\tthis._state.activeTab = ''\n\t\tconsole.debug('OCA.Files.Sidebar initialized')\n\t}\n\n\t/**\n\t * Get the sidebar state\n\t *\n\t * @readonly\n\t * @memberof Sidebar\n\t * @return {object} the data state\n\t */\n\tget state() {\n\t\treturn this._state\n\t}\n\n\t/**\n\t * Register a new tab view\n\t *\n\t * @memberof Sidebar\n\t * @param {object} tab a new unregistered tab\n\t * @return {boolean}\n\t */\n\tregisterTab(tab) {\n\t\tconst hasDuplicate = this._state.tabs.findIndex(check => check.id === tab.id) > -1\n\t\tif (!hasDuplicate) {\n\t\t\tthis._state.tabs.push(tab)\n\t\t\treturn true\n\t\t}\n\t\tconsole.error(`An tab with the same id ${tab.id} already exists`, tab)\n\t\treturn false\n\t}\n\n\tregisterSecondaryView(view) {\n\t\tconst hasDuplicate = this._state.views.findIndex(check => check.id === view.id) > -1\n\t\tif (!hasDuplicate) {\n\t\t\tthis._state.views.push(view)\n\t\t\treturn true\n\t\t}\n\t\tconsole.error('A similar view already exists', view)\n\t\treturn false\n\t}\n\n\t/**\n\t * Return current opened file\n\t *\n\t * @memberof Sidebar\n\t * @return {string} the current opened file\n\t */\n\tget file() {\n\t\treturn this._state.file\n\t}\n\n\t/**\n\t * Set the current visible sidebar tab\n\t *\n\t * @memberof Sidebar\n\t * @param {string} id the tab unique id\n\t */\n\tsetActiveTab(id) {\n\t\tthis._state.activeTab = id\n\t}\n\n}\n","/**\n * @copyright Copyright (c) 2019 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 */\nimport { sanitizeSVG } from '@skjnldsv/sanitize-svg'\n\nexport default class Tab {\n\n\t_id\n\t_name\n\t_icon\n\t_iconSvgSanitized\n\t_mount\n\t_update\n\t_destroy\n\t_enabled\n\t_scrollBottomReached\n\n\t/**\n\t * Create a new tab instance\n\t *\n\t * @param {object} options destructuring object\n\t * @param {string} options.id the unique id of this tab\n\t * @param {string} options.name the translated tab name\n\t * @param {?string} options.icon the icon css class\n\t * @param {?string} options.iconSvg the icon in svg format\n\t * @param {Function} options.mount function to mount the tab\n\t * @param {Function} options.update function to update the tab\n\t * @param {Function} options.destroy function to destroy the tab\n\t * @param {Function} [options.enabled] define conditions whether this tab is active. Must returns a boolean\n\t * @param {Function} [options.scrollBottomReached] executed when the tab is scrolled to the bottom\n\t */\n\tconstructor({ id, name, icon, iconSvg, mount, update, destroy, enabled, scrollBottomReached } = {}) {\n\t\tif (enabled === undefined) {\n\t\t\tenabled = () => true\n\t\t}\n\t\tif (scrollBottomReached === undefined) {\n\t\t\tscrollBottomReached = () => { }\n\t\t}\n\n\t\t// Sanity checks\n\t\tif (typeof id !== 'string' || id.trim() === '') {\n\t\t\tthrow new Error('The id argument is not a valid string')\n\t\t}\n\t\tif (typeof name !== 'string' || name.trim() === '') {\n\t\t\tthrow new Error('The name argument is not a valid string')\n\t\t}\n\t\tif ((typeof icon !== 'string' || icon.trim() === '') && typeof iconSvg !== 'string') {\n\t\t\tthrow new Error('Missing valid string for icon or iconSvg argument')\n\t\t}\n\t\tif (typeof mount !== 'function') {\n\t\t\tthrow new Error('The mount argument should be a function')\n\t\t}\n\t\tif (typeof update !== 'function') {\n\t\t\tthrow new Error('The update argument should be a function')\n\t\t}\n\t\tif (typeof destroy !== 'function') {\n\t\t\tthrow new Error('The destroy argument should be a function')\n\t\t}\n\t\tif (typeof enabled !== 'function') {\n\t\t\tthrow new Error('The enabled argument should be a function')\n\t\t}\n\t\tif (typeof scrollBottomReached !== 'function') {\n\t\t\tthrow new Error('The scrollBottomReached argument should be a function')\n\t\t}\n\n\t\tthis._id = id\n\t\tthis._name = name\n\t\tthis._icon = icon\n\t\tthis._mount = mount\n\t\tthis._update = update\n\t\tthis._destroy = destroy\n\t\tthis._enabled = enabled\n\t\tthis._scrollBottomReached = scrollBottomReached\n\n\t\tif (typeof iconSvg === 'string') {\n\t\t\tsanitizeSVG(iconSvg)\n\t\t\t\t.then(sanitizedSvg => {\n\t\t\t\t\tthis._iconSvgSanitized = sanitizedSvg\n\t\t\t\t})\n\t\t}\n\n\t}\n\n\tget id() {\n\t\treturn this._id\n\t}\n\n\tget name() {\n\t\treturn this._name\n\t}\n\n\tget icon() {\n\t\treturn this._icon\n\t}\n\n\tget iconSvg() {\n\t\treturn this._iconSvgSanitized\n\t}\n\n\tget mount() {\n\t\treturn this._mount\n\t}\n\n\tget update() {\n\t\treturn this._update\n\t}\n\n\tget destroy() {\n\t\treturn this._destroy\n\t}\n\n\tget enabled() {\n\t\treturn this._enabled\n\t}\n\n\tget scrollBottomReached() {\n\t\treturn this._scrollBottomReached\n\t}\n\n}\n","/**\n * @copyright Copyright (c) 2019 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\nimport Vue from 'vue'\nimport { translate as t } from '@nextcloud/l10n'\n\nimport SidebarView from './views/Sidebar.vue'\nimport Sidebar from './services/Sidebar'\nimport Tab from './models/Tab'\n\nVue.prototype.t = t\n\n// Init Sidebar Service\nif (!window.OCA.Files) {\n\twindow.OCA.Files = {}\n}\nObject.assign(window.OCA.Files, { Sidebar: new Sidebar() })\nObject.assign(window.OCA.Files.Sidebar, { Tab })\n\nconsole.debug('OCA.Files.Sidebar initialized')\n\nwindow.addEventListener('DOMContentLoaded', function() {\n\tconst contentElement = document.querySelector('body > .content')\n\t\t|| document.querySelector('body > #content')\n\n\t// Make sure we have a proper layout\n\tif (contentElement) {\n\t\t// Make sure we have a mountpoint\n\t\tif (!document.getElementById('app-sidebar')) {\n\t\t\tconst sidebarElement = document.createElement('div')\n\t\t\tsidebarElement.id = 'app-sidebar'\n\t\t\tcontentElement.appendChild(sidebarElement)\n\t\t}\n\t}\n\n\t// Init vue app\n\tconst View = Vue.extend(SidebarView)\n\tconst AppSidebar = new View({\n\t\tname: 'SidebarRoot',\n\t})\n\tAppSidebar.$mount('#app-sidebar')\n\twindow.OCA.Files.Sidebar.open = AppSidebar.open\n\twindow.OCA.Files.Sidebar.close = AppSidebar.close\n\twindow.OCA.Files.Sidebar.setFullScreenMode = AppSidebar.setFullScreenMode\n})\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".app-sidebar--has-preview[data-v-4afc9c22] .app-sidebar-header__figure{background-size:cover}.app-sidebar--has-preview[data-v-4afc9c22][data-mimetype=\\\"text/plain\\\"] .app-sidebar-header__figure,.app-sidebar--has-preview[data-v-4afc9c22][data-mimetype=\\\"text/markdown\\\"] .app-sidebar-header__figure{background-size:contain}.app-sidebar--full[data-v-4afc9c22]{position:fixed !important;z-index:2025 !important;top:0 !important;height:100% !important}.app-sidebar .svg-icon[data-v-4afc9c22] svg{width:20px;height:20px;fill:currentColor}\", \"\",{\"version\":3,\"sources\":[\"webpack://./apps/files/src/views/Sidebar.vue\"],\"names\":[],\"mappings\":\"AAGE,uEACC,qBAAA,CAKA,yMACC,uBAAA,CAKH,oCACC,yBAAA,CACA,uBAAA,CACA,gBAAA,CACA,sBAAA,CAIA,4CACC,UAAA,CACA,WAAA,CACA,iBAAA\",\"sourcesContent\":[\"\\n.app-sidebar {\\n\\t&--has-preview::v-deep {\\n\\t\\t.app-sidebar-header__figure {\\n\\t\\t\\tbackground-size: cover;\\n\\t\\t}\\n\\n\\t\\t&[data-mimetype=\\\"text/plain\\\"],\\n\\t\\t&[data-mimetype=\\\"text/markdown\\\"] {\\n\\t\\t\\t.app-sidebar-header__figure {\\n\\t\\t\\t\\tbackground-size: contain;\\n\\t\\t\\t}\\n\\t\\t}\\n\\t}\\n\\n\\t&--full {\\n\\t\\tposition: fixed !important;\\n\\t\\tz-index: 2025 !important;\\n\\t\\ttop: 0 !important;\\n\\t\\theight: 100% !important;\\n\\t}\\n\\n\\t.svg-icon {\\n\\t\\t::v-deep svg {\\n\\t\\t\\twidth: 20px;\\n\\t\\t\\theight: 20px;\\n\\t\\t\\tfill: currentColor;\\n\\t\\t}\\n\\t}\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","var map = {\n\t\"./af\": 42786,\n\t\"./af.js\": 42786,\n\t\"./ar\": 30867,\n\t\"./ar-dz\": 14130,\n\t\"./ar-dz.js\": 14130,\n\t\"./ar-kw\": 96135,\n\t\"./ar-kw.js\": 96135,\n\t\"./ar-ly\": 56440,\n\t\"./ar-ly.js\": 56440,\n\t\"./ar-ma\": 47702,\n\t\"./ar-ma.js\": 47702,\n\t\"./ar-sa\": 16040,\n\t\"./ar-sa.js\": 16040,\n\t\"./ar-tn\": 37100,\n\t\"./ar-tn.js\": 37100,\n\t\"./ar.js\": 30867,\n\t\"./az\": 31083,\n\t\"./az.js\": 31083,\n\t\"./be\": 9808,\n\t\"./be.js\": 9808,\n\t\"./bg\": 68338,\n\t\"./bg.js\": 68338,\n\t\"./bm\": 67438,\n\t\"./bm.js\": 67438,\n\t\"./bn\": 8905,\n\t\"./bn-bd\": 76225,\n\t\"./bn-bd.js\": 76225,\n\t\"./bn.js\": 8905,\n\t\"./bo\": 11560,\n\t\"./bo.js\": 11560,\n\t\"./br\": 1278,\n\t\"./br.js\": 1278,\n\t\"./bs\": 80622,\n\t\"./bs.js\": 80622,\n\t\"./ca\": 2468,\n\t\"./ca.js\": 2468,\n\t\"./cs\": 5822,\n\t\"./cs.js\": 5822,\n\t\"./cv\": 50877,\n\t\"./cv.js\": 50877,\n\t\"./cy\": 47373,\n\t\"./cy.js\": 47373,\n\t\"./da\": 24780,\n\t\"./da.js\": 24780,\n\t\"./de\": 59740,\n\t\"./de-at\": 60217,\n\t\"./de-at.js\": 60217,\n\t\"./de-ch\": 60894,\n\t\"./de-ch.js\": 60894,\n\t\"./de.js\": 59740,\n\t\"./dv\": 5300,\n\t\"./dv.js\": 5300,\n\t\"./el\": 50837,\n\t\"./el.js\": 50837,\n\t\"./en-au\": 78348,\n\t\"./en-au.js\": 78348,\n\t\"./en-ca\": 77925,\n\t\"./en-ca.js\": 77925,\n\t\"./en-gb\": 22243,\n\t\"./en-gb.js\": 22243,\n\t\"./en-ie\": 46436,\n\t\"./en-ie.js\": 46436,\n\t\"./en-il\": 47207,\n\t\"./en-il.js\": 47207,\n\t\"./en-in\": 44175,\n\t\"./en-in.js\": 44175,\n\t\"./en-nz\": 76319,\n\t\"./en-nz.js\": 76319,\n\t\"./en-sg\": 31662,\n\t\"./en-sg.js\": 31662,\n\t\"./eo\": 92915,\n\t\"./eo.js\": 92915,\n\t\"./es\": 55655,\n\t\"./es-do\": 55251,\n\t\"./es-do.js\": 55251,\n\t\"./es-mx\": 96112,\n\t\"./es-mx.js\": 96112,\n\t\"./es-us\": 71146,\n\t\"./es-us.js\": 71146,\n\t\"./es.js\": 55655,\n\t\"./et\": 5603,\n\t\"./et.js\": 5603,\n\t\"./eu\": 77763,\n\t\"./eu.js\": 77763,\n\t\"./fa\": 76959,\n\t\"./fa.js\": 76959,\n\t\"./fi\": 11897,\n\t\"./fi.js\": 11897,\n\t\"./fil\": 42549,\n\t\"./fil.js\": 42549,\n\t\"./fo\": 94694,\n\t\"./fo.js\": 94694,\n\t\"./fr\": 94470,\n\t\"./fr-ca\": 63049,\n\t\"./fr-ca.js\": 63049,\n\t\"./fr-ch\": 52330,\n\t\"./fr-ch.js\": 52330,\n\t\"./fr.js\": 94470,\n\t\"./fy\": 5044,\n\t\"./fy.js\": 5044,\n\t\"./ga\": 29295,\n\t\"./ga.js\": 29295,\n\t\"./gd\": 2101,\n\t\"./gd.js\": 2101,\n\t\"./gl\": 38794,\n\t\"./gl.js\": 38794,\n\t\"./gom-deva\": 27884,\n\t\"./gom-deva.js\": 27884,\n\t\"./gom-latn\": 23168,\n\t\"./gom-latn.js\": 23168,\n\t\"./gu\": 95349,\n\t\"./gu.js\": 95349,\n\t\"./he\": 24206,\n\t\"./he.js\": 24206,\n\t\"./hi\": 30094,\n\t\"./hi.js\": 30094,\n\t\"./hr\": 30316,\n\t\"./hr.js\": 30316,\n\t\"./hu\": 22138,\n\t\"./hu.js\": 22138,\n\t\"./hy-am\": 11423,\n\t\"./hy-am.js\": 11423,\n\t\"./id\": 29218,\n\t\"./id.js\": 29218,\n\t\"./is\": 90135,\n\t\"./is.js\": 90135,\n\t\"./it\": 90626,\n\t\"./it-ch\": 10150,\n\t\"./it-ch.js\": 10150,\n\t\"./it.js\": 90626,\n\t\"./ja\": 39183,\n\t\"./ja.js\": 39183,\n\t\"./jv\": 24286,\n\t\"./jv.js\": 24286,\n\t\"./ka\": 12105,\n\t\"./ka.js\": 12105,\n\t\"./kk\": 47772,\n\t\"./kk.js\": 47772,\n\t\"./km\": 18758,\n\t\"./km.js\": 18758,\n\t\"./kn\": 79282,\n\t\"./kn.js\": 79282,\n\t\"./ko\": 33730,\n\t\"./ko.js\": 33730,\n\t\"./ku\": 1408,\n\t\"./ku.js\": 1408,\n\t\"./ky\": 33291,\n\t\"./ky.js\": 33291,\n\t\"./lb\": 36841,\n\t\"./lb.js\": 36841,\n\t\"./lo\": 55466,\n\t\"./lo.js\": 55466,\n\t\"./lt\": 57010,\n\t\"./lt.js\": 57010,\n\t\"./lv\": 37595,\n\t\"./lv.js\": 37595,\n\t\"./me\": 39861,\n\t\"./me.js\": 39861,\n\t\"./mi\": 35493,\n\t\"./mi.js\": 35493,\n\t\"./mk\": 95966,\n\t\"./mk.js\": 95966,\n\t\"./ml\": 87341,\n\t\"./ml.js\": 87341,\n\t\"./mn\": 5115,\n\t\"./mn.js\": 5115,\n\t\"./mr\": 10370,\n\t\"./mr.js\": 10370,\n\t\"./ms\": 9847,\n\t\"./ms-my\": 41237,\n\t\"./ms-my.js\": 41237,\n\t\"./ms.js\": 9847,\n\t\"./mt\": 72126,\n\t\"./mt.js\": 72126,\n\t\"./my\": 56165,\n\t\"./my.js\": 56165,\n\t\"./nb\": 64924,\n\t\"./nb.js\": 64924,\n\t\"./ne\": 16744,\n\t\"./ne.js\": 16744,\n\t\"./nl\": 93901,\n\t\"./nl-be\": 59814,\n\t\"./nl-be.js\": 59814,\n\t\"./nl.js\": 93901,\n\t\"./nn\": 83877,\n\t\"./nn.js\": 83877,\n\t\"./oc-lnc\": 92135,\n\t\"./oc-lnc.js\": 92135,\n\t\"./pa-in\": 15858,\n\t\"./pa-in.js\": 15858,\n\t\"./pl\": 64495,\n\t\"./pl.js\": 64495,\n\t\"./pt\": 89520,\n\t\"./pt-br\": 57971,\n\t\"./pt-br.js\": 57971,\n\t\"./pt.js\": 89520,\n\t\"./ro\": 96459,\n\t\"./ro.js\": 96459,\n\t\"./ru\": 21793,\n\t\"./ru.js\": 21793,\n\t\"./sd\": 40950,\n\t\"./sd.js\": 40950,\n\t\"./se\": 10490,\n\t\"./se.js\": 10490,\n\t\"./si\": 90124,\n\t\"./si.js\": 90124,\n\t\"./sk\": 64249,\n\t\"./sk.js\": 64249,\n\t\"./sl\": 14985,\n\t\"./sl.js\": 14985,\n\t\"./sq\": 51104,\n\t\"./sq.js\": 51104,\n\t\"./sr\": 49131,\n\t\"./sr-cyrl\": 79915,\n\t\"./sr-cyrl.js\": 79915,\n\t\"./sr.js\": 49131,\n\t\"./ss\": 85893,\n\t\"./ss.js\": 85893,\n\t\"./sv\": 98760,\n\t\"./sv.js\": 98760,\n\t\"./sw\": 91172,\n\t\"./sw.js\": 91172,\n\t\"./ta\": 27333,\n\t\"./ta.js\": 27333,\n\t\"./te\": 23110,\n\t\"./te.js\": 23110,\n\t\"./tet\": 52095,\n\t\"./tet.js\": 52095,\n\t\"./tg\": 27321,\n\t\"./tg.js\": 27321,\n\t\"./th\": 9041,\n\t\"./th.js\": 9041,\n\t\"./tk\": 19005,\n\t\"./tk.js\": 19005,\n\t\"./tl-ph\": 75768,\n\t\"./tl-ph.js\": 75768,\n\t\"./tlh\": 89444,\n\t\"./tlh.js\": 89444,\n\t\"./tr\": 72397,\n\t\"./tr.js\": 72397,\n\t\"./tzl\": 28254,\n\t\"./tzl.js\": 28254,\n\t\"./tzm\": 51106,\n\t\"./tzm-latn\": 30699,\n\t\"./tzm-latn.js\": 30699,\n\t\"./tzm.js\": 51106,\n\t\"./ug-cn\": 9288,\n\t\"./ug-cn.js\": 9288,\n\t\"./uk\": 67691,\n\t\"./uk.js\": 67691,\n\t\"./ur\": 13795,\n\t\"./ur.js\": 13795,\n\t\"./uz\": 6791,\n\t\"./uz-latn\": 60588,\n\t\"./uz-latn.js\": 60588,\n\t\"./uz.js\": 6791,\n\t\"./vi\": 65666,\n\t\"./vi.js\": 65666,\n\t\"./x-pseudo\": 14378,\n\t\"./x-pseudo.js\": 14378,\n\t\"./yo\": 75805,\n\t\"./yo.js\": 75805,\n\t\"./zh-cn\": 83839,\n\t\"./zh-cn.js\": 83839,\n\t\"./zh-hk\": 55726,\n\t\"./zh-hk.js\": 55726,\n\t\"./zh-mo\": 99807,\n\t\"./zh-mo.js\": 99807,\n\t\"./zh-tw\": 74152,\n\t\"./zh-tw.js\": 74152\n};\n\n\nfunction webpackContext(req) {\n\tvar id = webpackContextResolve(req);\n\treturn __webpack_require__(id);\n}\nfunction webpackContextResolve(req) {\n\tif(!__webpack_require__.o(map, req)) {\n\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\te.code = 'MODULE_NOT_FOUND';\n\t\tthrow e;\n\t}\n\treturn map[req];\n}\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = 46700;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","__webpack_require__.amdD = function () {\n\tthrow new Error('define cannot be used indirect');\n};","__webpack_require__.amdO = {};","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = function(module) {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","__webpack_require__.j = 4092;","__webpack_require__.b = document.baseURI || self.location.href;\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t4092: 0\n};\n\n// no chunk on demand loading\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n__webpack_require__.O.j = function(chunkId) { return installedChunks[chunkId] === 0; };\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = function(parentChunkLoadingFunction, data) {\n\tvar chunkIds = data[0];\n\tvar moreModules = data[1];\n\tvar runtime = data[2];\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some(function(id) { return installedChunks[id] !== 0; })) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\treturn __webpack_require__.O(result);\n}\n\nvar chunkLoadingGlobal = self[\"webpackChunknextcloud\"] = self[\"webpackChunknextcloud\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","__webpack_require__.nc = undefined;","// startup\n// Load entry module and return exports\n// This entry module depends on other loaded chunks and execution need to be delayed\nvar __webpack_exports__ = __webpack_require__.O(undefined, [7874], function() { return __webpack_require__(47252); })\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n"],"names":["deferred","url","axios","method","data","response","file","OCA","Files","App","fileList","filesClient","_client","parseMultiStatus","fileInfo","_parseFileInfo","get","key","isDirectory","mimetype","name","components","NcAppSidebarTab","NcEmptyContent","props","type","default","required","id","icon","onMount","onUpdate","onDestroy","onScrollBottomReached","loading","computed","activeTab","watch","newFile","mounted","beforeDestroy","_vm","this","_c","_self","ref","attrs","on","scopedSlots","_u","fn","_t","proxy","_v","_e","component","methods","setFileInfo","NcActionButton","NcAppSidebar","LegacyView","SidebarTab","Sidebar","error","starLoading","isFullScreen","tabs","views","davPath","subtitle","time","fullTime","size","background","appSidebar","active","class","compact","starred","subtitleTooltip","title","titleTooltip","defaultAction","fileActions","defaultActionListener","isSystemTagsEnabled","canDisplay","resetData","getPreviewIfAny","getIconUrl","setActiveTab","toggleStarred","state","OC","console","onDefaultAction","dir","$file","toggleTags","open","path","FileInfo","view","close","setFullScreenMode","document","handleOpening","emit","handleOpened","handleClosing","handleClosed","options","styleTagTransform","setAttributes","insert","domAPI","insertStyleElement","_b","_d","$event","stopPropagation","preventDefault","apply","arguments","_l","cid","_s","t","tab","enabled","directives","rawName","value","expression","mount","update","destroy","scrollBottomReached","undefined","iconSvg","staticClass","domProps","_state","debug","findIndex","check","push","Tab","trim","Error","_id","_name","_icon","_mount","_update","_destroy","_enabled","_scrollBottomReached","sanitizeSVG","then","sanitizedSvg","_iconSvgSanitized","Vue","window","Object","assign","addEventListener","contentElement","querySelector","getElementById","sidebarElement","createElement","appendChild","AppSidebar","SidebarView","$mount","___CSS_LOADER_EXPORT___","module","map","webpackContext","req","webpackContextResolve","__webpack_require__","o","e","code","keys","resolve","exports","__webpack_module_cache__","moduleId","cachedModule","loaded","__webpack_modules__","call","m","amdD","amdO","O","result","chunkIds","priority","notFulfilled","Infinity","i","length","fulfilled","j","every","splice","r","n","getter","__esModule","d","a","definition","defineProperty","enumerable","g","globalThis","Function","obj","prop","prototype","hasOwnProperty","Symbol","toStringTag","nmd","paths","children","b","baseURI","self","location","href","installedChunks","chunkId","webpackJsonpCallback","parentChunkLoadingFunction","moreModules","runtime","some","chunkLoadingGlobal","forEach","bind","nc","__webpack_exports__"],"sourceRoot":""}
\ No newline at end of file
+{"version":3,"file":"files-sidebar.js?v=9e644b6c7e887befa707","mappings":";gBAAIA,4gBC2BW,cAAf,+BA2CC,iDA3Cc,WAAeC,GAAG,2GACTC,EAAAA,EAAAA,SAAM,CAC5BC,OAAQ,WACRF,IAAAA,EACAG,KAAM,gyBA2BL,OASuE,OAvCnEC,EAAW,EAAH,KAiCRC,EAAOC,IAAIC,MAAMC,IAAIC,SAASC,YAAYC,QAAQC,iBAAiBR,EAASD,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I4C,EAAqBV,KAA4B,sBAAIA,KAA4B,uBAAK,GAC1FU,EAAmBC,QAAQN,EAAqBO,KAAK,KAAM,IAC3DF,EAAmBhG,KAAO2F,EAAqBO,KAAK,KAAMF,EAAmBhG,KAAKkG,KAAKF,OClDvF7D,EAAoBgE,QAAK3G,ECGzB,IAAI4G,EAAsBjE,EAAoBgB,OAAE3D,EAAW,CAAC,OAAO,WAAa,OAAO2C,EAAoB,MAAQ,IACnHiE,EAAsBjE,EAAoBgB,EAAEiD","sources":["webpack:///nextcloud/webpack/runtime/chunk loaded","webpack:///nextcloud/apps/files/src/services/FileInfo.js","webpack://nextcloud/./apps/files/src/components/SidebarTab.vue?eddf","webpack:///nextcloud/apps/files/src/components/SidebarTab.vue","webpack:///nextcloud/apps/files/src/components/SidebarTab.vue?vue&type=script&lang=js&","webpack://nextcloud/./apps/files/src/components/SidebarTab.vue?7aea","webpack:///nextcloud/apps/files/src/components/LegacyView.vue?vue&type=script&lang=js&","webpack:///nextcloud/apps/files/src/components/LegacyView.vue","webpack://nextcloud/./apps/files/src/components/LegacyView.vue?a2e2","webpack://nextcloud/./apps/files/src/components/LegacyView.vue?fb5f","webpack:///nextcloud/apps/files/src/views/Sidebar.vue","webpack:///nextcloud/apps/files/src/views/Sidebar.vue?vue&type=script&lang=js&","webpack://nextcloud/./apps/files/src/views/Sidebar.vue?6f16","webpack://nextcloud/./apps/files/src/views/Sidebar.vue?0b21","webpack://nextcloud/./apps/files/src/views/Sidebar.vue?589a","webpack:///nextcloud/apps/files/src/services/Sidebar.js","webpack:///nextcloud/apps/files/src/models/Tab.js","webpack:///nextcloud/apps/files/src/sidebar.js","webpack:///nextcloud/apps/files/src/views/Sidebar.vue?vue&type=style&index=0&id=ed4cc070&prod&lang=scss&scoped=true&","webpack:///nextcloud/node_modules/moment/locale|sync|/^\\.\\/.*$","webpack:///nextcloud/webpack/bootstrap","webpack:///nextcloud/webpack/runtime/amd define","webpack:///nextcloud/webpack/runtime/amd options","webpack:///nextcloud/webpack/runtime/compat get default export","webpack:///nextcloud/webpack/runtime/define property getters","webpack:///nextcloud/webpack/runtime/global","webpack:///nextcloud/webpack/runtime/hasOwnProperty shorthand","webpack:///nextcloud/webpack/runtime/make namespace object","webpack:///nextcloud/webpack/runtime/node module decorator","webpack:///nextcloud/webpack/runtime/runtimeId","webpack:///nextcloud/webpack/runtime/jsonp chunk loading","webpack:///nextcloud/webpack/runtime/nonce","webpack:///nextcloud/webpack/startup"],"sourcesContent":["var deferred = [];\n__webpack_require__.O = function(result, chunkIds, fn, priority) {\n\tif(chunkIds) {\n\t\tpriority = priority || 0;\n\t\tfor(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];\n\t\tdeferred[i] = [chunkIds, fn, priority];\n\t\treturn;\n\t}\n\tvar notFulfilled = Infinity;\n\tfor (var i = 0; i < deferred.length; i++) {\n\t\tvar chunkIds = deferred[i][0];\n\t\tvar fn = deferred[i][1];\n\t\tvar priority = deferred[i][2];\n\t\tvar fulfilled = true;\n\t\tfor (var j = 0; j < chunkIds.length; j++) {\n\t\t\tif ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every(function(key) { return __webpack_require__.O[key](chunkIds[j]); })) {\n\t\t\t\tchunkIds.splice(j--, 1);\n\t\t\t} else {\n\t\t\t\tfulfilled = false;\n\t\t\t\tif(priority < notFulfilled) notFulfilled = priority;\n\t\t\t}\n\t\t}\n\t\tif(fulfilled) {\n\t\t\tdeferred.splice(i--, 1)\n\t\t\tvar r = fn();\n\t\t\tif (r !== undefined) result = r;\n\t\t}\n\t}\n\treturn result;\n};","/**\n * @copyright Copyright (c) 2019 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\nimport axios from '@nextcloud/axios'\n\n/**\n * @param {any} url -\n */\nexport default async function(url) {\n\tconst response = await axios({\n\t\tmethod: 'PROPFIND',\n\t\turl,\n\t\tdata: `<?xml version=\"1.0\"?>\n\t\t\t<d:propfind xmlns:d=\"DAV:\"\n\t\t\t\txmlns:oc=\"http://owncloud.org/ns\"\n\t\t\t\txmlns:nc=\"http://nextcloud.org/ns\"\n\t\t\t\txmlns:ocs=\"http://open-collaboration-services.org/ns\">\n\t\t\t<d:prop>\n\t\t\t\t<d:getlastmodified />\n\t\t\t\t<d:getetag />\n\t\t\t\t<d:getcontenttype />\n\t\t\t\t<d:resourcetype />\n\t\t\t\t<oc:fileid />\n\t\t\t\t<oc:permissions />\n\t\t\t\t<oc:size />\n\t\t\t\t<d:getcontentlength />\n\t\t\t\t<nc:has-preview />\n\t\t\t\t<nc:mount-type />\n\t\t\t\t<nc:is-encrypted />\n\t\t\t\t<ocs:share-permissions />\n\t\t\t\t<nc:share-attributes />\n\t\t\t\t<oc:tags />\n\t\t\t\t<oc:favorite />\n\t\t\t\t<oc:comments-unread />\n\t\t\t\t<oc:owner-id />\n\t\t\t\t<oc:owner-display-name />\n\t\t\t\t<oc:share-types />\n\t\t\t</d:prop>\n\t\t\t</d:propfind>`,\n\t})\n\n\t// TODO: create new parser or use cdav-lib when available\n\tconst file = OCA.Files.App.fileList.filesClient._client.parseMultiStatus(response.data)\n\t// TODO: create new parser or use cdav-lib when available\n\tconst fileInfo = OCA.Files.App.fileList.filesClient._parseFileInfo(file[0])\n\n\t// TODO remove when no more legacy backbone is used\n\tfileInfo.get = (key) => fileInfo[key]\n\tfileInfo.isDirectory = () => fileInfo.mimetype === 'httpd/unix-directory'\n\n\treturn fileInfo\n}\n","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('NcAppSidebarTab',{ref:\"tab\",attrs:{\"id\":_vm.id,\"name\":_vm.name,\"icon\":_vm.icon},on:{\"bottomReached\":_vm.onScrollBottomReached},scopedSlots:_vm._u([{key:\"icon\",fn:function(){return [_vm._t(\"icon\")]},proxy:true}],null,true)},[_vm._v(\" \"),(_vm.loading)?_c('NcEmptyContent',{attrs:{\"icon\":\"icon-loading\"}}):_vm._e(),_vm._v(\" \"),_c('div',{ref:\"mount\"})],1)\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n<!--\n - @copyright Copyright (c) 2019 John Molakvoæ <skjnldsv@protonmail.com>\n -\n - @author John Molakvoæ <skjnldsv@protonmail.com>\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 -->\n<template>\n\t<NcAppSidebarTab :id=\"id\"\n\t\tref=\"tab\"\n\t\t:name=\"name\"\n\t\t:icon=\"icon\"\n\t\t@bottomReached=\"onScrollBottomReached\">\n\t\t<template #icon>\n\t\t\t<slot name=\"icon\" />\n\t\t</template>\n\t\t<!-- Fallback loading -->\n\t\t<NcEmptyContent v-if=\"loading\" icon=\"icon-loading\" />\n\n\t\t<!-- Using a dummy div as Vue mount replace the element directly\n\t\t\tIt does NOT append to the content -->\n\t\t<div ref=\"mount\" />\n\t</NcAppSidebarTab>\n</template>\n\n<script>\nimport NcAppSidebarTab from '@nextcloud/vue/dist/Components/NcAppSidebarTab'\nimport NcEmptyContent from '@nextcloud/vue/dist/Components/NcEmptyContent'\n\nexport default {\n\tname: 'SidebarTab',\n\n\tcomponents: {\n\t\tNcAppSidebarTab,\n\t\tNcEmptyContent,\n\t},\n\n\tprops: {\n\t\tfileInfo: {\n\t\t\ttype: Object,\n\t\t\tdefault: () => {},\n\t\t\trequired: true,\n\t\t},\n\t\tid: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\t\tname: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\t\ticon: {\n\t\t\ttype: String,\n\t\t\trequired: false,\n\t\t},\n\n\t\t/**\n\t\t * Lifecycle methods.\n\t\t * They are prefixed with `on` to avoid conflict with Vue\n\t\t * methods like this.destroy\n\t\t */\n\t\tonMount: {\n\t\t\ttype: Function,\n\t\t\trequired: true,\n\t\t},\n\t\tonUpdate: {\n\t\t\ttype: Function,\n\t\t\trequired: true,\n\t\t},\n\t\tonDestroy: {\n\t\t\ttype: Function,\n\t\t\trequired: true,\n\t\t},\n\t\tonScrollBottomReached: {\n\t\t\ttype: Function,\n\t\t\tdefault: () => {},\n\t\t},\n\t},\n\n\tdata() {\n\t\treturn {\n\t\t\tloading: true,\n\t\t}\n\t},\n\n\tcomputed: {\n\t\t// TODO: implement a better way to force pass a prop from Sidebar\n\t\tactiveTab() {\n\t\t\treturn this.$parent.activeTab\n\t\t},\n\t},\n\n\twatch: {\n\t\tasync fileInfo(newFile, oldFile) {\n\t\t\t// Update fileInfo on change\n\t\t\tif (newFile.id !== oldFile.id) {\n\t\t\t\tthis.loading = true\n\t\t\t\tawait this.onUpdate(this.fileInfo)\n\t\t\t\tthis.loading = false\n\t\t\t}\n\t\t},\n\t},\n\n\tasync mounted() {\n\t\tthis.loading = true\n\t\t// Mount the tab: mounting point, fileInfo, vue context\n\t\tawait this.onMount(this.$refs.mount, this.fileInfo, this.$refs.tab)\n\t\tthis.loading = false\n\t},\n\n\tasync beforeDestroy() {\n\t\t// unmount the tab\n\t\tawait this.onDestroy()\n\t},\n}\n</script>\n","import mod from \"-!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./SidebarTab.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./SidebarTab.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./SidebarTab.vue?vue&type=template&id=b700b2ea&\"\nimport script from \"./SidebarTab.vue?vue&type=script&lang=js&\"\nexport * from \"./SidebarTab.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","import mod from \"-!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./LegacyView.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./LegacyView.vue?vue&type=script&lang=js&\"","<!--\n - @copyright Copyright (c) 2019 John Molakvoæ <skjnldsv@protonmail.com>\n -\n - @author John Molakvoæ <skjnldsv@protonmail.com>\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 -->\n\n<template>\n\t<div />\n</template>\n<script>\nexport default {\n\tname: 'LegacyView',\n\tprops: {\n\t\tcomponent: {\n\t\t\ttype: Object,\n\t\t\trequired: true,\n\t\t},\n\t\tfileInfo: {\n\t\t\ttype: Object,\n\t\t\tdefault: () => {},\n\t\t\trequired: true,\n\t\t},\n\t},\n\twatch: {\n\t\tfileInfo(fileInfo) {\n\t\t\t// update the backbone model FileInfo\n\t\t\tthis.setFileInfo(fileInfo)\n\t\t},\n\t},\n\tmounted() {\n\t\t// append the backbone element and set the FileInfo\n\t\tthis.component.$el.replaceAll(this.$el)\n\t\tthis.setFileInfo(this.fileInfo)\n\t},\n\tmethods: {\n\t\tsetFileInfo(fileInfo) {\n\t\t\tthis.component.setFileInfo(new OCA.Files.FileInfoModel(fileInfo))\n\t\t},\n\t},\n}\n</script>\n<style>\n</style>\n","import { render, staticRenderFns } from \"./LegacyView.vue?vue&type=template&id=2245cbe7&\"\nimport script from \"./LegacyView.vue?vue&type=script&lang=js&\"\nexport * from \"./LegacyView.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('div')\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<!--\n - @copyright Copyright (c) 2019 John Molakvoæ <skjnldsv@protonmail.com>\n -\n - @author John Molakvoæ <skjnldsv@protonmail.com>\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 -->\n\n<template>\n\t<NcAppSidebar v-if=\"file\"\n\t\tref=\"sidebar\"\n\t\tv-bind=\"appSidebar\"\n\t\t:force-menu=\"true\"\n\t\ttabindex=\"0\"\n\t\t@close=\"close\"\n\t\t@update:active=\"setActiveTab\"\n\t\t@update:starred=\"toggleStarred\"\n\t\t@[defaultActionListener].stop.prevent=\"onDefaultAction\"\n\t\t@opening=\"handleOpening\"\n\t\t@opened=\"handleOpened\"\n\t\t@closing=\"handleClosing\"\n\t\t@closed=\"handleClosed\">\n\t\t<!-- TODO: create a standard to allow multiple elements here? -->\n\t\t<template v-if=\"fileInfo\" #description>\n\t\t\t<LegacyView v-for=\"view in views\"\n\t\t\t\t:key=\"view.cid\"\n\t\t\t\t:component=\"view\"\n\t\t\t\t:file-info=\"fileInfo\" />\n\t\t</template>\n\n\t\t<!-- Actions menu -->\n\t\t<template v-if=\"fileInfo\" #secondary-actions>\n\t\t\t<!-- TODO: create proper api for apps to register actions\n\t\t\tAnd inject themselves here. -->\n\t\t\t<NcActionButton v-if=\"isSystemTagsEnabled\"\n\t\t\t\t:close-after-click=\"true\"\n\t\t\t\ticon=\"icon-tag\"\n\t\t\t\t@click=\"toggleTags\">\n\t\t\t\t{{ t('files', 'Tags') }}\n\t\t\t</NcActionButton>\n\t\t</template>\n\n\t\t<!-- Error display -->\n\t\t<NcEmptyContent v-if=\"error\" icon=\"icon-error\">\n\t\t\t{{ error }}\n\t\t</NcEmptyContent>\n\n\t\t<!-- If fileInfo fetch is complete, render tabs -->\n\t\t<template v-for=\"tab in tabs\" v-else-if=\"fileInfo\">\n\t\t\t<!-- Hide them if we're loading another file but keep them mounted -->\n\t\t\t<SidebarTab v-if=\"tab.enabled(fileInfo)\"\n\t\t\t\tv-show=\"!loading\"\n\t\t\t\t:id=\"tab.id\"\n\t\t\t\t:key=\"tab.id\"\n\t\t\t\t:name=\"tab.name\"\n\t\t\t\t:icon=\"tab.icon\"\n\t\t\t\t:on-mount=\"tab.mount\"\n\t\t\t\t:on-update=\"tab.update\"\n\t\t\t\t:on-destroy=\"tab.destroy\"\n\t\t\t\t:on-scroll-bottom-reached=\"tab.scrollBottomReached\"\n\t\t\t\t:file-info=\"fileInfo\">\n\t\t\t\t<template v-if=\"tab.iconSvg !== undefined\" #icon>\n\t\t\t\t\t<!-- eslint-disable-next-line vue/no-v-html -->\n\t\t\t\t\t<span class=\"svg-icon\" v-html=\"tab.iconSvg\" />\n\t\t\t\t</template>\n\t\t\t</SidebarTab>\n\t\t</template>\n\t</NcAppSidebar>\n</template>\n<script>\nimport { encodePath } from '@nextcloud/paths'\nimport $ from 'jquery'\nimport axios from '@nextcloud/axios'\nimport { emit } from '@nextcloud/event-bus'\nimport moment from '@nextcloud/moment'\nimport { Type as ShareTypes } from '@nextcloud/sharing'\n\nimport NcAppSidebar from '@nextcloud/vue/dist/Components/NcAppSidebar'\nimport NcActionButton from '@nextcloud/vue/dist/Components/NcActionButton'\nimport NcEmptyContent from '@nextcloud/vue/dist/Components/NcEmptyContent'\n\nimport FileInfo from '../services/FileInfo'\nimport SidebarTab from '../components/SidebarTab'\nimport LegacyView from '../components/LegacyView'\n\nexport default {\n\tname: 'Sidebar',\n\n\tcomponents: {\n\t\tNcActionButton,\n\t\tNcAppSidebar,\n\t\tNcEmptyContent,\n\t\tLegacyView,\n\t\tSidebarTab,\n\t},\n\n\tdata() {\n\t\treturn {\n\t\t\t// reactive state\n\t\t\tSidebar: OCA.Files.Sidebar.state,\n\t\t\terror: null,\n\t\t\tloading: true,\n\t\t\tfileInfo: null,\n\t\t\tstarLoading: false,\n\t\t\tisFullScreen: false,\n\t\t\thasLowHeight: false,\n\t\t}\n\t},\n\n\tcomputed: {\n\t\t/**\n\t\t * Current filename\n\t\t * This is bound to the Sidebar service and\n\t\t * is used to load a new file\n\t\t *\n\t\t * @return {string}\n\t\t */\n\t\tfile() {\n\t\t\treturn this.Sidebar.file\n\t\t},\n\n\t\t/**\n\t\t * List of all the registered tabs\n\t\t *\n\t\t * @return {Array}\n\t\t */\n\t\ttabs() {\n\t\t\treturn this.Sidebar.tabs\n\t\t},\n\n\t\t/**\n\t\t * List of all the registered views\n\t\t *\n\t\t * @return {Array}\n\t\t */\n\t\tviews() {\n\t\t\treturn this.Sidebar.views\n\t\t},\n\n\t\t/**\n\t\t * Current user dav root path\n\t\t *\n\t\t * @return {string}\n\t\t */\n\t\tdavPath() {\n\t\t\tconst user = OC.getCurrentUser().uid\n\t\t\treturn OC.linkToRemote(`dav/files/${user}${encodePath(this.file)}`)\n\t\t},\n\n\t\t/**\n\t\t * Current active tab handler\n\t\t *\n\t\t * @param {string} id the tab id to set as active\n\t\t * @return {string} the current active tab\n\t\t */\n\t\tactiveTab() {\n\t\t\treturn this.Sidebar.activeTab\n\t\t},\n\n\t\t/**\n\t\t * Sidebar subtitle\n\t\t *\n\t\t * @return {string}\n\t\t */\n\t\tsubtitle() {\n\t\t\treturn `${this.size}, ${this.time}`\n\t\t},\n\n\t\t/**\n\t\t * File last modified formatted string\n\t\t *\n\t\t * @return {string}\n\t\t */\n\t\ttime() {\n\t\t\treturn OC.Util.relativeModifiedDate(this.fileInfo.mtime)\n\t\t},\n\n\t\t/**\n\t\t * File last modified full string\n\t\t *\n\t\t * @return {string}\n\t\t */\n\t\tfullTime() {\n\t\t\treturn moment(this.fileInfo.mtime).format('LLL')\n\t\t},\n\n\t\t/**\n\t\t * File size formatted string\n\t\t *\n\t\t * @return {string}\n\t\t */\n\t\tsize() {\n\t\t\treturn OC.Util.humanFileSize(this.fileInfo.size)\n\t\t},\n\n\t\t/**\n\t\t * File background/figure to illustrate the sidebar header\n\t\t *\n\t\t * @return {string}\n\t\t */\n\t\tbackground() {\n\t\t\treturn this.getPreviewIfAny(this.fileInfo)\n\t\t},\n\n\t\t/**\n\t\t * App sidebar v-binding object\n\t\t *\n\t\t * @return {object}\n\t\t */\n\t\tappSidebar() {\n\t\t\tif (this.fileInfo) {\n\t\t\t\treturn {\n\t\t\t\t\t'data-mimetype': this.fileInfo.mimetype,\n\t\t\t\t\t'star-loading': this.starLoading,\n\t\t\t\t\tactive: this.activeTab,\n\t\t\t\t\tbackground: this.background,\n\t\t\t\t\tclass: {\n\t\t\t\t\t\t'app-sidebar--has-preview': this.fileInfo.hasPreview && !this.isFullScreen,\n\t\t\t\t\t\t'app-sidebar--full': this.isFullScreen,\n\t\t\t\t\t},\n\t\t\t\t\tcompact: this.hasLowHeight || !this.fileInfo.hasPreview || this.isFullScreen,\n\t\t\t\t\tloading: this.loading,\n\t\t\t\t\tstarred: this.fileInfo.isFavourited,\n\t\t\t\t\tsubtitle: this.subtitle,\n\t\t\t\t\tsubtitleTooltip: this.fullTime,\n\t\t\t\t\ttitle: this.fileInfo.name,\n\t\t\t\t\ttitleTooltip: this.fileInfo.name,\n\t\t\t\t}\n\t\t\t} else if (this.error) {\n\t\t\t\treturn {\n\t\t\t\t\tkey: 'error', // force key to re-render\n\t\t\t\t\tsubtitle: '',\n\t\t\t\t\ttitle: '',\n\t\t\t\t}\n\t\t\t}\n\t\t\t// no fileInfo yet, showing empty data\n\t\t\treturn {\n\t\t\t\tloading: this.loading,\n\t\t\t\tsubtitle: '',\n\t\t\t\ttitle: '',\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Default action object for the current file\n\t\t *\n\t\t * @return {object}\n\t\t */\n\t\tdefaultAction() {\n\t\t\treturn this.fileInfo\n\t\t\t\t&& OCA.Files && OCA.Files.App && OCA.Files.App.fileList\n\t\t\t\t&& OCA.Files.App.fileList.fileActions\n\t\t\t\t&& OCA.Files.App.fileList.fileActions.getDefaultFileAction\n\t\t\t\t&& OCA.Files.App.fileList\n\t\t\t\t\t.fileActions.getDefaultFileAction(this.fileInfo.mimetype, this.fileInfo.type, OC.PERMISSION_READ)\n\n\t\t},\n\n\t\t/**\n\t\t * Dynamic header click listener to ensure\n\t\t * nothing is listening for a click if there\n\t\t * is no default action\n\t\t *\n\t\t * @return {string|null}\n\t\t */\n\t\tdefaultActionListener() {\n\t\t\treturn this.defaultAction ? 'figure-click' : null\n\t\t},\n\n\t\tisSystemTagsEnabled() {\n\t\t\treturn OCA && 'SystemTags' in OCA\n\t\t},\n\t},\n\n\tmethods: {\n\t\t/**\n\t\t * Can this tab be displayed ?\n\t\t *\n\t\t * @param {object} tab a registered tab\n\t\t * @return {boolean}\n\t\t */\n\t\tcanDisplay(tab) {\n\t\t\treturn tab.enabled(this.fileInfo)\n\t\t},\n\t\tresetData() {\n\t\t\tthis.error = null\n\t\t\tthis.fileInfo = null\n\t\t\tthis.$nextTick(() => {\n\t\t\t\tif (this.$refs.tabs) {\n\t\t\t\t\tthis.$refs.tabs.updateTabs()\n\t\t\t\t}\n\t\t\t})\n\t\t},\n\n\t\tgetPreviewIfAny(fileInfo) {\n\t\t\tif (fileInfo.hasPreview && !this.isFullScreen) {\n\t\t\t\treturn OC.generateUrl(`/core/preview?fileId=${fileInfo.id}&x=${screen.width}&y=${screen.height}&a=true`)\n\t\t\t}\n\t\t\treturn this.getIconUrl(fileInfo)\n\t\t},\n\n\t\t/**\n\t\t * Copied from https://github.com/nextcloud/server/blob/16e0887ec63591113ee3f476e0c5129e20180cde/apps/files/js/filelist.js#L1377\n\t\t * TODO: We also need this as a standalone library\n\t\t *\n\t\t * @param {object} fileInfo the fileinfo\n\t\t * @return {string} Url to the icon for mimeType\n\t\t */\n\t\tgetIconUrl(fileInfo) {\n\t\t\tconst mimeType = fileInfo.mimetype || 'application/octet-stream'\n\t\t\tif (mimeType === 'httpd/unix-directory') {\n\t\t\t\t// use default folder icon\n\t\t\t\tif (fileInfo.mountType === 'shared' || fileInfo.mountType === 'shared-root') {\n\t\t\t\t\treturn OC.MimeType.getIconUrl('dir-shared')\n\t\t\t\t} else if (fileInfo.mountType === 'external-root') {\n\t\t\t\t\treturn OC.MimeType.getIconUrl('dir-external')\n\t\t\t\t} else if (fileInfo.mountType !== undefined && fileInfo.mountType !== '') {\n\t\t\t\t\treturn OC.MimeType.getIconUrl('dir-' + fileInfo.mountType)\n\t\t\t\t} else if (fileInfo.shareTypes && (\n\t\t\t\t\tfileInfo.shareTypes.indexOf(ShareTypes.SHARE_TYPE_LINK) > -1\n\t\t\t\t\t|| fileInfo.shareTypes.indexOf(ShareTypes.SHARE_TYPE_EMAIL) > -1)\n\t\t\t\t) {\n\t\t\t\t\treturn OC.MimeType.getIconUrl('dir-public')\n\t\t\t\t} else if (fileInfo.shareTypes && fileInfo.shareTypes.length > 0) {\n\t\t\t\t\treturn OC.MimeType.getIconUrl('dir-shared')\n\t\t\t\t}\n\t\t\t\treturn OC.MimeType.getIconUrl('dir')\n\t\t\t}\n\t\t\treturn OC.MimeType.getIconUrl(mimeType)\n\t\t},\n\n\t\t/**\n\t\t * Set current active tab\n\t\t *\n\t\t * @param {string} id tab unique id\n\t\t */\n\t\tsetActiveTab(id) {\n\t\t\tOCA.Files.Sidebar.setActiveTab(id)\n\t\t},\n\n\t\t/**\n\t\t * Toggle favourite state\n\t\t * TODO: better implementation\n\t\t *\n\t\t * @param {boolean} state favourited or not\n\t\t */\n\t\tasync toggleStarred(state) {\n\t\t\ttry {\n\t\t\t\tthis.starLoading = true\n\t\t\t\tawait axios({\n\t\t\t\t\tmethod: 'PROPPATCH',\n\t\t\t\t\turl: this.davPath,\n\t\t\t\t\tdata: `<?xml version=\"1.0\"?>\n\t\t\t\t\t\t<d:propertyupdate xmlns:d=\"DAV:\" xmlns:oc=\"http://owncloud.org/ns\">\n\t\t\t\t\t\t${state ? '<d:set>' : '<d:remove>'}\n\t\t\t\t\t\t\t<d:prop>\n\t\t\t\t\t\t\t\t<oc:favorite>1</oc:favorite>\n\t\t\t\t\t\t\t</d:prop>\n\t\t\t\t\t\t${state ? '</d:set>' : '</d:remove>'}\n\t\t\t\t\t\t</d:propertyupdate>`,\n\t\t\t\t})\n\n\t\t\t\t// TODO: Obliterate as soon as possible and use events with new files app\n\t\t\t\t// Terrible fallback for legacy files: toggle filelist as well\n\t\t\t\tif (OCA.Files && OCA.Files.App && OCA.Files.App.fileList && OCA.Files.App.fileList.fileActions) {\n\t\t\t\t\tOCA.Files.App.fileList.fileActions.triggerAction('Favorite', OCA.Files.App.fileList.getModelForFile(this.fileInfo.name), OCA.Files.App.fileList)\n\t\t\t\t}\n\n\t\t\t} catch (error) {\n\t\t\t\tOC.Notification.showTemporary(t('files', 'Unable to change the favourite state of the file'))\n\t\t\t\tconsole.error('Unable to change favourite state', error)\n\t\t\t}\n\t\t\tthis.starLoading = false\n\t\t},\n\n\t\tonDefaultAction() {\n\t\t\tif (this.defaultAction) {\n\t\t\t\t// generate fake context\n\t\t\t\tthis.defaultAction.action(this.fileInfo.name, {\n\t\t\t\t\tfileInfo: this.fileInfo,\n\t\t\t\t\tdir: this.fileInfo.dir,\n\t\t\t\t\tfileList: OCA.Files.App.fileList,\n\t\t\t\t\t$file: $('body'),\n\t\t\t\t})\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Toggle the tags selector\n\t\t */\n\t\ttoggleTags() {\n\t\t\tif (OCA.SystemTags && OCA.SystemTags.View) {\n\t\t\t\tOCA.SystemTags.View.toggle()\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Open the sidebar for the given file\n\t\t *\n\t\t * @param {string} path the file path to load\n\t\t * @return {Promise}\n\t\t * @throws {Error} loading failure\n\t\t */\n\t\tasync open(path) {\n\t\t\t// update current opened file\n\t\t\tthis.Sidebar.file = path\n\n\t\t\tif (path && path.trim() !== '') {\n\t\t\t\t// reset data, keep old fileInfo to not reload all tabs and just hide them\n\t\t\t\tthis.error = null\n\t\t\t\tthis.loading = true\n\n\t\t\t\ttry {\n\t\t\t\t\tthis.fileInfo = await FileInfo(this.davPath)\n\t\t\t\t\t// adding this as fallback because other apps expect it\n\t\t\t\t\tthis.fileInfo.dir = this.file.split('/').slice(0, -1).join('/')\n\n\t\t\t\t\t// DEPRECATED legacy views\n\t\t\t\t\t// TODO: remove\n\t\t\t\t\tthis.views.forEach(view => {\n\t\t\t\t\t\tview.setFileInfo(this.fileInfo)\n\t\t\t\t\t})\n\n\t\t\t\t\tthis.$nextTick(() => {\n\t\t\t\t\t\tif (this.$refs.tabs) {\n\t\t\t\t\t\t\tthis.$refs.tabs.updateTabs()\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\t\t\t\t} catch (error) {\n\t\t\t\t\tthis.error = t('files', 'Error while loading the file data')\n\t\t\t\t\tconsole.error('Error while loading the file data', error)\n\n\t\t\t\t\tthrow new Error(error)\n\t\t\t\t} finally {\n\t\t\t\t\tthis.loading = false\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Close the sidebar\n\t\t */\n\t\tclose() {\n\t\t\tthis.Sidebar.file = ''\n\t\t\tthis.resetData()\n\t\t},\n\n\t\t/**\n\t\t * Allow to set the Sidebar as fullscreen from OCA.Files.Sidebar\n\t\t *\n\t\t * @param {boolean} isFullScreen - Whether or not to render the Sidebar in fullscreen.\n\t\t */\n\t\tsetFullScreenMode(isFullScreen) {\n\t\t\tthis.isFullScreen = isFullScreen\n\t\t\tif (isFullScreen) {\n\t\t\t\tdocument.querySelector('#content')?.classList.add('with-sidebar--full')\n\t\t\t\t\t|| document.querySelector('#content-vue')?.classList.add('with-sidebar--full')\n\t\t\t} else {\n\t\t\t\tdocument.querySelector('#content')?.classList.remove('with-sidebar--full')\n\t\t\t\t\t|| document.querySelector('#content-vue')?.classList.remove('with-sidebar--full')\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Emit SideBar events.\n\t\t */\n\t\thandleOpening() {\n\t\t\temit('files:sidebar:opening')\n\t\t},\n\t\thandleOpened() {\n\t\t\temit('files:sidebar:opened')\n\t\t},\n\t\thandleClosing() {\n\t\t\temit('files:sidebar:closing')\n\t\t},\n\t\thandleClosed() {\n\t\t\temit('files:sidebar:closed')\n\t\t},\n\t\thandleWindowResize() {\n\t\t\tthis.hasLowHeight = document.documentElement.clientHeight < 1024\n\t\t},\n\t},\n\tcreated() {\n\t\twindow.addEventListener('resize', this.handleWindowResize)\n\t\tthis.handleWindowResize()\n\t},\n\tbeforeDestroy() {\n\t\twindow.removeEventListener('resize', this.handleWindowResize)\n\t},\n}\n</script>\n<style lang=\"scss\" scoped>\n.app-sidebar {\n\t&--has-preview::v-deep {\n\t\t.app-sidebar-header__figure {\n\t\t\tbackground-size: cover;\n\t\t}\n\n\t\t&[data-mimetype=\"text/plain\"],\n\t\t&[data-mimetype=\"text/markdown\"] {\n\t\t\t.app-sidebar-header__figure {\n\t\t\t\tbackground-size: contain;\n\t\t\t}\n\t\t}\n\t}\n\n\t&--full {\n\t\tposition: fixed !important;\n\t\tz-index: 2025 !important;\n\t\ttop: 0 !important;\n\t\theight: 100% !important;\n\t}\n\n\t.svg-icon {\n\t\t::v-deep svg {\n\t\t\twidth: 20px;\n\t\t\theight: 20px;\n\t\t\tfill: currentColor;\n\t\t}\n\t}\n}\n</style>\n","import mod from \"-!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Sidebar.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Sidebar.vue?vue&type=script&lang=js&\"","\n import API from \"!../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/sass-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Sidebar.vue?vue&type=style&index=0&id=ed4cc070&prod&lang=scss&scoped=true&\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\n\n options.insert = insertFn.bind(null, \"head\");\n \noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/sass-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Sidebar.vue?vue&type=style&index=0&id=ed4cc070&prod&lang=scss&scoped=true&\";\n export default content && content.locals ? content.locals : undefined;\n","import { render, staticRenderFns } from \"./Sidebar.vue?vue&type=template&id=ed4cc070&scoped=true&\"\nimport script from \"./Sidebar.vue?vue&type=script&lang=js&\"\nexport * from \"./Sidebar.vue?vue&type=script&lang=js&\"\nimport style0 from \"./Sidebar.vue?vue&type=style&index=0&id=ed4cc070&prod&lang=scss&scoped=true&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"ed4cc070\",\n null\n \n)\n\nexport default component.exports","var render = function render(){var _vm=this,_c=_vm._self._c;return (_vm.file)?_c('NcAppSidebar',_vm._b({ref:\"sidebar\",attrs:{\"force-menu\":true,\"tabindex\":\"0\"},on:_vm._d({\"close\":_vm.close,\"update:active\":_vm.setActiveTab,\"update:starred\":_vm.toggleStarred,\"opening\":_vm.handleOpening,\"opened\":_vm.handleOpened,\"closing\":_vm.handleClosing,\"closed\":_vm.handleClosed},[_vm.defaultActionListener,function($event){$event.stopPropagation();$event.preventDefault();return _vm.onDefaultAction.apply(null, arguments)}]),scopedSlots:_vm._u([(_vm.fileInfo)?{key:\"description\",fn:function(){return _vm._l((_vm.views),function(view){return _c('LegacyView',{key:view.cid,attrs:{\"component\":view,\"file-info\":_vm.fileInfo}})})},proxy:true}:null,(_vm.fileInfo)?{key:\"secondary-actions\",fn:function(){return [(_vm.isSystemTagsEnabled)?_c('NcActionButton',{attrs:{\"close-after-click\":true,\"icon\":\"icon-tag\"},on:{\"click\":_vm.toggleTags}},[_vm._v(\"\\n\\t\\t\\t\"+_vm._s(_vm.t('files', 'Tags'))+\"\\n\\t\\t\")]):_vm._e()]},proxy:true}:null],null,true)},'NcAppSidebar',_vm.appSidebar,false),[_vm._v(\" \"),_vm._v(\" \"),(_vm.error)?_c('NcEmptyContent',{attrs:{\"icon\":\"icon-error\"}},[_vm._v(\"\\n\\t\\t\"+_vm._s(_vm.error)+\"\\n\\t\")]):(_vm.fileInfo)?_vm._l((_vm.tabs),function(tab){return [(tab.enabled(_vm.fileInfo))?_c('SidebarTab',{directives:[{name:\"show\",rawName:\"v-show\",value:(!_vm.loading),expression:\"!loading\"}],key:tab.id,attrs:{\"id\":tab.id,\"name\":tab.name,\"icon\":tab.icon,\"on-mount\":tab.mount,\"on-update\":tab.update,\"on-destroy\":tab.destroy,\"on-scroll-bottom-reached\":tab.scrollBottomReached,\"file-info\":_vm.fileInfo},scopedSlots:_vm._u([(tab.iconSvg !== undefined)?{key:\"icon\",fn:function(){return [_c('span',{staticClass:\"svg-icon\",domProps:{\"innerHTML\":_vm._s(tab.iconSvg)}})]},proxy:true}:null],null,true)}):_vm._e()]}):_vm._e()],2):_vm._e()\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","/**\n * @copyright Copyright (c) 2019 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\nexport default class Sidebar {\n\n\t_state\n\n\tconstructor() {\n\t\t// init empty state\n\t\tthis._state = {}\n\n\t\t// init default values\n\t\tthis._state.tabs = []\n\t\tthis._state.views = []\n\t\tthis._state.file = ''\n\t\tthis._state.activeTab = ''\n\t\tconsole.debug('OCA.Files.Sidebar initialized')\n\t}\n\n\t/**\n\t * Get the sidebar state\n\t *\n\t * @readonly\n\t * @memberof Sidebar\n\t * @return {object} the data state\n\t */\n\tget state() {\n\t\treturn this._state\n\t}\n\n\t/**\n\t * Register a new tab view\n\t *\n\t * @memberof Sidebar\n\t * @param {object} tab a new unregistered tab\n\t * @return {boolean}\n\t */\n\tregisterTab(tab) {\n\t\tconst hasDuplicate = this._state.tabs.findIndex(check => check.id === tab.id) > -1\n\t\tif (!hasDuplicate) {\n\t\t\tthis._state.tabs.push(tab)\n\t\t\treturn true\n\t\t}\n\t\tconsole.error(`An tab with the same id ${tab.id} already exists`, tab)\n\t\treturn false\n\t}\n\n\tregisterSecondaryView(view) {\n\t\tconst hasDuplicate = this._state.views.findIndex(check => check.id === view.id) > -1\n\t\tif (!hasDuplicate) {\n\t\t\tthis._state.views.push(view)\n\t\t\treturn true\n\t\t}\n\t\tconsole.error('A similar view already exists', view)\n\t\treturn false\n\t}\n\n\t/**\n\t * Return current opened file\n\t *\n\t * @memberof Sidebar\n\t * @return {string} the current opened file\n\t */\n\tget file() {\n\t\treturn this._state.file\n\t}\n\n\t/**\n\t * Set the current visible sidebar tab\n\t *\n\t * @memberof Sidebar\n\t * @param {string} id the tab unique id\n\t */\n\tsetActiveTab(id) {\n\t\tthis._state.activeTab = id\n\t}\n\n}\n","/**\n * @copyright Copyright (c) 2019 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 */\nimport { sanitizeSVG } from '@skjnldsv/sanitize-svg'\n\nexport default class Tab {\n\n\t_id\n\t_name\n\t_icon\n\t_iconSvgSanitized\n\t_mount\n\t_update\n\t_destroy\n\t_enabled\n\t_scrollBottomReached\n\n\t/**\n\t * Create a new tab instance\n\t *\n\t * @param {object} options destructuring object\n\t * @param {string} options.id the unique id of this tab\n\t * @param {string} options.name the translated tab name\n\t * @param {?string} options.icon the icon css class\n\t * @param {?string} options.iconSvg the icon in svg format\n\t * @param {Function} options.mount function to mount the tab\n\t * @param {Function} options.update function to update the tab\n\t * @param {Function} options.destroy function to destroy the tab\n\t * @param {Function} [options.enabled] define conditions whether this tab is active. Must returns a boolean\n\t * @param {Function} [options.scrollBottomReached] executed when the tab is scrolled to the bottom\n\t */\n\tconstructor({ id, name, icon, iconSvg, mount, update, destroy, enabled, scrollBottomReached } = {}) {\n\t\tif (enabled === undefined) {\n\t\t\tenabled = () => true\n\t\t}\n\t\tif (scrollBottomReached === undefined) {\n\t\t\tscrollBottomReached = () => { }\n\t\t}\n\n\t\t// Sanity checks\n\t\tif (typeof id !== 'string' || id.trim() === '') {\n\t\t\tthrow new Error('The id argument is not a valid string')\n\t\t}\n\t\tif (typeof name !== 'string' || name.trim() === '') {\n\t\t\tthrow new Error('The name argument is not a valid string')\n\t\t}\n\t\tif ((typeof icon !== 'string' || icon.trim() === '') && typeof iconSvg !== 'string') {\n\t\t\tthrow new Error('Missing valid string for icon or iconSvg argument')\n\t\t}\n\t\tif (typeof mount !== 'function') {\n\t\t\tthrow new Error('The mount argument should be a function')\n\t\t}\n\t\tif (typeof update !== 'function') {\n\t\t\tthrow new Error('The update argument should be a function')\n\t\t}\n\t\tif (typeof destroy !== 'function') {\n\t\t\tthrow new Error('The destroy argument should be a function')\n\t\t}\n\t\tif (typeof enabled !== 'function') {\n\t\t\tthrow new Error('The enabled argument should be a function')\n\t\t}\n\t\tif (typeof scrollBottomReached !== 'function') {\n\t\t\tthrow new Error('The scrollBottomReached argument should be a function')\n\t\t}\n\n\t\tthis._id = id\n\t\tthis._name = name\n\t\tthis._icon = icon\n\t\tthis._mount = mount\n\t\tthis._update = update\n\t\tthis._destroy = destroy\n\t\tthis._enabled = enabled\n\t\tthis._scrollBottomReached = scrollBottomReached\n\n\t\tif (typeof iconSvg === 'string') {\n\t\t\tsanitizeSVG(iconSvg)\n\t\t\t\t.then(sanitizedSvg => {\n\t\t\t\t\tthis._iconSvgSanitized = sanitizedSvg\n\t\t\t\t})\n\t\t}\n\n\t}\n\n\tget id() {\n\t\treturn this._id\n\t}\n\n\tget name() {\n\t\treturn this._name\n\t}\n\n\tget icon() {\n\t\treturn this._icon\n\t}\n\n\tget iconSvg() {\n\t\treturn this._iconSvgSanitized\n\t}\n\n\tget mount() {\n\t\treturn this._mount\n\t}\n\n\tget update() {\n\t\treturn this._update\n\t}\n\n\tget destroy() {\n\t\treturn this._destroy\n\t}\n\n\tget enabled() {\n\t\treturn this._enabled\n\t}\n\n\tget scrollBottomReached() {\n\t\treturn this._scrollBottomReached\n\t}\n\n}\n","/**\n * @copyright Copyright (c) 2019 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\nimport Vue from 'vue'\nimport { translate as t } from '@nextcloud/l10n'\n\nimport SidebarView from './views/Sidebar.vue'\nimport Sidebar from './services/Sidebar'\nimport Tab from './models/Tab'\n\nVue.prototype.t = t\n\n// Init Sidebar Service\nif (!window.OCA.Files) {\n\twindow.OCA.Files = {}\n}\nObject.assign(window.OCA.Files, { Sidebar: new Sidebar() })\nObject.assign(window.OCA.Files.Sidebar, { Tab })\n\nconsole.debug('OCA.Files.Sidebar initialized')\n\nwindow.addEventListener('DOMContentLoaded', function() {\n\tconst contentElement = document.querySelector('body > .content')\n\t\t|| document.querySelector('body > #content')\n\n\t// Make sure we have a proper layout\n\tif (contentElement) {\n\t\t// Make sure we have a mountpoint\n\t\tif (!document.getElementById('app-sidebar')) {\n\t\t\tconst sidebarElement = document.createElement('div')\n\t\t\tsidebarElement.id = 'app-sidebar'\n\t\t\tcontentElement.appendChild(sidebarElement)\n\t\t}\n\t}\n\n\t// Init vue app\n\tconst View = Vue.extend(SidebarView)\n\tconst AppSidebar = new View({\n\t\tname: 'SidebarRoot',\n\t})\n\tAppSidebar.$mount('#app-sidebar')\n\twindow.OCA.Files.Sidebar.open = AppSidebar.open\n\twindow.OCA.Files.Sidebar.close = AppSidebar.close\n\twindow.OCA.Files.Sidebar.setFullScreenMode = AppSidebar.setFullScreenMode\n})\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".app-sidebar--has-preview[data-v-ed4cc070] .app-sidebar-header__figure{background-size:cover}.app-sidebar--has-preview[data-v-ed4cc070][data-mimetype=\\\"text/plain\\\"] .app-sidebar-header__figure,.app-sidebar--has-preview[data-v-ed4cc070][data-mimetype=\\\"text/markdown\\\"] .app-sidebar-header__figure{background-size:contain}.app-sidebar--full[data-v-ed4cc070]{position:fixed !important;z-index:2025 !important;top:0 !important;height:100% !important}.app-sidebar .svg-icon[data-v-ed4cc070] svg{width:20px;height:20px;fill:currentColor}\", \"\",{\"version\":3,\"sources\":[\"webpack://./apps/files/src/views/Sidebar.vue\"],\"names\":[],\"mappings\":\"AAGE,uEACC,qBAAA,CAKA,yMACC,uBAAA,CAKH,oCACC,yBAAA,CACA,uBAAA,CACA,gBAAA,CACA,sBAAA,CAIA,4CACC,UAAA,CACA,WAAA,CACA,iBAAA\",\"sourcesContent\":[\"\\n.app-sidebar {\\n\\t&--has-preview::v-deep {\\n\\t\\t.app-sidebar-header__figure {\\n\\t\\t\\tbackground-size: cover;\\n\\t\\t}\\n\\n\\t\\t&[data-mimetype=\\\"text/plain\\\"],\\n\\t\\t&[data-mimetype=\\\"text/markdown\\\"] {\\n\\t\\t\\t.app-sidebar-header__figure {\\n\\t\\t\\t\\tbackground-size: contain;\\n\\t\\t\\t}\\n\\t\\t}\\n\\t}\\n\\n\\t&--full {\\n\\t\\tposition: fixed !important;\\n\\t\\tz-index: 2025 !important;\\n\\t\\ttop: 0 !important;\\n\\t\\theight: 100% !important;\\n\\t}\\n\\n\\t.svg-icon {\\n\\t\\t::v-deep svg {\\n\\t\\t\\twidth: 20px;\\n\\t\\t\\theight: 20px;\\n\\t\\t\\tfill: currentColor;\\n\\t\\t}\\n\\t}\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","var map = {\n\t\"./af\": 42786,\n\t\"./af.js\": 42786,\n\t\"./ar\": 30867,\n\t\"./ar-dz\": 14130,\n\t\"./ar-dz.js\": 14130,\n\t\"./ar-kw\": 96135,\n\t\"./ar-kw.js\": 96135,\n\t\"./ar-ly\": 56440,\n\t\"./ar-ly.js\": 56440,\n\t\"./ar-ma\": 47702,\n\t\"./ar-ma.js\": 47702,\n\t\"./ar-sa\": 16040,\n\t\"./ar-sa.js\": 16040,\n\t\"./ar-tn\": 37100,\n\t\"./ar-tn.js\": 37100,\n\t\"./ar.js\": 30867,\n\t\"./az\": 31083,\n\t\"./az.js\": 31083,\n\t\"./be\": 9808,\n\t\"./be.js\": 9808,\n\t\"./bg\": 68338,\n\t\"./bg.js\": 68338,\n\t\"./bm\": 67438,\n\t\"./bm.js\": 67438,\n\t\"./bn\": 8905,\n\t\"./bn-bd\": 76225,\n\t\"./bn-bd.js\": 76225,\n\t\"./bn.js\": 8905,\n\t\"./bo\": 11560,\n\t\"./bo.js\": 11560,\n\t\"./br\": 1278,\n\t\"./br.js\": 1278,\n\t\"./bs\": 80622,\n\t\"./bs.js\": 80622,\n\t\"./ca\": 2468,\n\t\"./ca.js\": 2468,\n\t\"./cs\": 5822,\n\t\"./cs.js\": 5822,\n\t\"./cv\": 50877,\n\t\"./cv.js\": 50877,\n\t\"./cy\": 47373,\n\t\"./cy.js\": 47373,\n\t\"./da\": 24780,\n\t\"./da.js\": 24780,\n\t\"./de\": 59740,\n\t\"./de-at\": 60217,\n\t\"./de-at.js\": 60217,\n\t\"./de-ch\": 60894,\n\t\"./de-ch.js\": 60894,\n\t\"./de.js\": 59740,\n\t\"./dv\": 5300,\n\t\"./dv.js\": 5300,\n\t\"./el\": 50837,\n\t\"./el.js\": 50837,\n\t\"./en-au\": 78348,\n\t\"./en-au.js\": 78348,\n\t\"./en-ca\": 77925,\n\t\"./en-ca.js\": 77925,\n\t\"./en-gb\": 22243,\n\t\"./en-gb.js\": 22243,\n\t\"./en-ie\": 46436,\n\t\"./en-ie.js\": 46436,\n\t\"./en-il\": 47207,\n\t\"./en-il.js\": 47207,\n\t\"./en-in\": 44175,\n\t\"./en-in.js\": 44175,\n\t\"./en-nz\": 76319,\n\t\"./en-nz.js\": 76319,\n\t\"./en-sg\": 31662,\n\t\"./en-sg.js\": 31662,\n\t\"./eo\": 92915,\n\t\"./eo.js\": 92915,\n\t\"./es\": 55655,\n\t\"./es-do\": 55251,\n\t\"./es-do.js\": 55251,\n\t\"./es-mx\": 96112,\n\t\"./es-mx.js\": 96112,\n\t\"./es-us\": 71146,\n\t\"./es-us.js\": 71146,\n\t\"./es.js\": 55655,\n\t\"./et\": 5603,\n\t\"./et.js\": 5603,\n\t\"./eu\": 77763,\n\t\"./eu.js\": 77763,\n\t\"./fa\": 76959,\n\t\"./fa.js\": 76959,\n\t\"./fi\": 11897,\n\t\"./fi.js\": 11897,\n\t\"./fil\": 42549,\n\t\"./fil.js\": 42549,\n\t\"./fo\": 94694,\n\t\"./fo.js\": 94694,\n\t\"./fr\": 94470,\n\t\"./fr-ca\": 63049,\n\t\"./fr-ca.js\": 63049,\n\t\"./fr-ch\": 52330,\n\t\"./fr-ch.js\": 52330,\n\t\"./fr.js\": 94470,\n\t\"./fy\": 5044,\n\t\"./fy.js\": 5044,\n\t\"./ga\": 29295,\n\t\"./ga.js\": 29295,\n\t\"./gd\": 2101,\n\t\"./gd.js\": 2101,\n\t\"./gl\": 38794,\n\t\"./gl.js\": 38794,\n\t\"./gom-deva\": 27884,\n\t\"./gom-deva.js\": 27884,\n\t\"./gom-latn\": 23168,\n\t\"./gom-latn.js\": 23168,\n\t\"./gu\": 95349,\n\t\"./gu.js\": 95349,\n\t\"./he\": 24206,\n\t\"./he.js\": 24206,\n\t\"./hi\": 30094,\n\t\"./hi.js\": 30094,\n\t\"./hr\": 30316,\n\t\"./hr.js\": 30316,\n\t\"./hu\": 22138,\n\t\"./hu.js\": 22138,\n\t\"./hy-am\": 11423,\n\t\"./hy-am.js\": 11423,\n\t\"./id\": 29218,\n\t\"./id.js\": 29218,\n\t\"./is\": 90135,\n\t\"./is.js\": 90135,\n\t\"./it\": 90626,\n\t\"./it-ch\": 10150,\n\t\"./it-ch.js\": 10150,\n\t\"./it.js\": 90626,\n\t\"./ja\": 39183,\n\t\"./ja.js\": 39183,\n\t\"./jv\": 24286,\n\t\"./jv.js\": 24286,\n\t\"./ka\": 12105,\n\t\"./ka.js\": 12105,\n\t\"./kk\": 47772,\n\t\"./kk.js\": 47772,\n\t\"./km\": 18758,\n\t\"./km.js\": 18758,\n\t\"./kn\": 79282,\n\t\"./kn.js\": 79282,\n\t\"./ko\": 33730,\n\t\"./ko.js\": 33730,\n\t\"./ku\": 1408,\n\t\"./ku.js\": 1408,\n\t\"./ky\": 33291,\n\t\"./ky.js\": 33291,\n\t\"./lb\": 36841,\n\t\"./lb.js\": 36841,\n\t\"./lo\": 55466,\n\t\"./lo.js\": 55466,\n\t\"./lt\": 57010,\n\t\"./lt.js\": 57010,\n\t\"./lv\": 37595,\n\t\"./lv.js\": 37595,\n\t\"./me\": 39861,\n\t\"./me.js\": 39861,\n\t\"./mi\": 35493,\n\t\"./mi.js\": 35493,\n\t\"./mk\": 95966,\n\t\"./mk.js\": 95966,\n\t\"./ml\": 87341,\n\t\"./ml.js\": 87341,\n\t\"./mn\": 5115,\n\t\"./mn.js\": 5115,\n\t\"./mr\": 10370,\n\t\"./mr.js\": 10370,\n\t\"./ms\": 9847,\n\t\"./ms-my\": 41237,\n\t\"./ms-my.js\": 41237,\n\t\"./ms.js\": 9847,\n\t\"./mt\": 72126,\n\t\"./mt.js\": 72126,\n\t\"./my\": 56165,\n\t\"./my.js\": 56165,\n\t\"./nb\": 64924,\n\t\"./nb.js\": 64924,\n\t\"./ne\": 16744,\n\t\"./ne.js\": 16744,\n\t\"./nl\": 93901,\n\t\"./nl-be\": 59814,\n\t\"./nl-be.js\": 59814,\n\t\"./nl.js\": 93901,\n\t\"./nn\": 83877,\n\t\"./nn.js\": 83877,\n\t\"./oc-lnc\": 92135,\n\t\"./oc-lnc.js\": 92135,\n\t\"./pa-in\": 15858,\n\t\"./pa-in.js\": 15858,\n\t\"./pl\": 64495,\n\t\"./pl.js\": 64495,\n\t\"./pt\": 89520,\n\t\"./pt-br\": 57971,\n\t\"./pt-br.js\": 57971,\n\t\"./pt.js\": 89520,\n\t\"./ro\": 96459,\n\t\"./ro.js\": 96459,\n\t\"./ru\": 21793,\n\t\"./ru.js\": 21793,\n\t\"./sd\": 40950,\n\t\"./sd.js\": 40950,\n\t\"./se\": 10490,\n\t\"./se.js\": 10490,\n\t\"./si\": 90124,\n\t\"./si.js\": 90124,\n\t\"./sk\": 64249,\n\t\"./sk.js\": 64249,\n\t\"./sl\": 14985,\n\t\"./sl.js\": 14985,\n\t\"./sq\": 51104,\n\t\"./sq.js\": 51104,\n\t\"./sr\": 49131,\n\t\"./sr-cyrl\": 79915,\n\t\"./sr-cyrl.js\": 79915,\n\t\"./sr.js\": 49131,\n\t\"./ss\": 85893,\n\t\"./ss.js\": 85893,\n\t\"./sv\": 98760,\n\t\"./sv.js\": 98760,\n\t\"./sw\": 91172,\n\t\"./sw.js\": 91172,\n\t\"./ta\": 27333,\n\t\"./ta.js\": 27333,\n\t\"./te\": 23110,\n\t\"./te.js\": 23110,\n\t\"./tet\": 52095,\n\t\"./tet.js\": 52095,\n\t\"./tg\": 27321,\n\t\"./tg.js\": 27321,\n\t\"./th\": 9041,\n\t\"./th.js\": 9041,\n\t\"./tk\": 19005,\n\t\"./tk.js\": 19005,\n\t\"./tl-ph\": 75768,\n\t\"./tl-ph.js\": 75768,\n\t\"./tlh\": 89444,\n\t\"./tlh.js\": 89444,\n\t\"./tr\": 72397,\n\t\"./tr.js\": 72397,\n\t\"./tzl\": 28254,\n\t\"./tzl.js\": 28254,\n\t\"./tzm\": 51106,\n\t\"./tzm-latn\": 30699,\n\t\"./tzm-latn.js\": 30699,\n\t\"./tzm.js\": 51106,\n\t\"./ug-cn\": 9288,\n\t\"./ug-cn.js\": 9288,\n\t\"./uk\": 67691,\n\t\"./uk.js\": 67691,\n\t\"./ur\": 13795,\n\t\"./ur.js\": 13795,\n\t\"./uz\": 6791,\n\t\"./uz-latn\": 60588,\n\t\"./uz-latn.js\": 60588,\n\t\"./uz.js\": 6791,\n\t\"./vi\": 65666,\n\t\"./vi.js\": 65666,\n\t\"./x-pseudo\": 14378,\n\t\"./x-pseudo.js\": 14378,\n\t\"./yo\": 75805,\n\t\"./yo.js\": 75805,\n\t\"./zh-cn\": 83839,\n\t\"./zh-cn.js\": 83839,\n\t\"./zh-hk\": 55726,\n\t\"./zh-hk.js\": 55726,\n\t\"./zh-mo\": 99807,\n\t\"./zh-mo.js\": 99807,\n\t\"./zh-tw\": 74152,\n\t\"./zh-tw.js\": 74152\n};\n\n\nfunction webpackContext(req) {\n\tvar id = webpackContextResolve(req);\n\treturn __webpack_require__(id);\n}\nfunction webpackContextResolve(req) {\n\tif(!__webpack_require__.o(map, req)) {\n\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\te.code = 'MODULE_NOT_FOUND';\n\t\tthrow e;\n\t}\n\treturn map[req];\n}\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = 46700;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","__webpack_require__.amdD = function () {\n\tthrow new Error('define cannot be used indirect');\n};","__webpack_require__.amdO = {};","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = function(module) {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","__webpack_require__.j = 4092;","__webpack_require__.b = document.baseURI || self.location.href;\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t4092: 0\n};\n\n// no chunk on demand loading\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n__webpack_require__.O.j = function(chunkId) { return installedChunks[chunkId] === 0; };\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = function(parentChunkLoadingFunction, data) {\n\tvar chunkIds = data[0];\n\tvar moreModules = data[1];\n\tvar runtime = data[2];\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some(function(id) { return installedChunks[id] !== 0; })) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\treturn __webpack_require__.O(result);\n}\n\nvar chunkLoadingGlobal = self[\"webpackChunknextcloud\"] = self[\"webpackChunknextcloud\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","__webpack_require__.nc = undefined;","// startup\n// Load entry module and return exports\n// This entry module depends on other loaded chunks and execution need to be delayed\nvar __webpack_exports__ = __webpack_require__.O(undefined, [7874], function() { return __webpack_require__(69391); })\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n"],"names":["deferred","url","axios","method","data","response","file","OCA","Files","App","fileList","filesClient","_client","parseMultiStatus","fileInfo","_parseFileInfo","get","key","isDirectory","mimetype","name","components","NcAppSidebarTab","NcEmptyContent","props","type","default","required","id","icon","onMount","onUpdate","onDestroy","onScrollBottomReached","loading","computed","activeTab","watch","newFile","mounted","beforeDestroy","_vm","this","_c","_self","ref","attrs","on","scopedSlots","_u","fn","_t","proxy","_v","_e","component","methods","setFileInfo","NcActionButton","NcAppSidebar","LegacyView","SidebarTab","Sidebar","error","starLoading","isFullScreen","hasLowHeight","tabs","views","davPath","subtitle","time","fullTime","size","background","appSidebar","active","class","compact","starred","subtitleTooltip","title","titleTooltip","defaultAction","fileActions","defaultActionListener","isSystemTagsEnabled","canDisplay","resetData","getPreviewIfAny","getIconUrl","setActiveTab","toggleStarred","state","OC","console","onDefaultAction","dir","$file","toggleTags","open","path","FileInfo","view","close","setFullScreenMode","document","handleOpening","emit","handleOpened","handleClosing","handleClosed","handleWindowResize","created","window","options","styleTagTransform","setAttributes","insert","domAPI","insertStyleElement","_b","_d","$event","stopPropagation","preventDefault","apply","arguments","_l","cid","_s","t","tab","enabled","directives","rawName","value","expression","mount","update","destroy","scrollBottomReached","undefined","iconSvg","staticClass","domProps","_state","debug","findIndex","check","push","Tab","trim","Error","_id","_name","_icon","_mount","_update","_destroy","_enabled","_scrollBottomReached","sanitizeSVG","then","sanitizedSvg","_iconSvgSanitized","Vue","Object","assign","addEventListener","contentElement","querySelector","getElementById","sidebarElement","createElement","appendChild","AppSidebar","SidebarView","$mount","___CSS_LOADER_EXPORT___","module","map","webpackContext","req","webpackContextResolve","__webpack_require__","o","e","code","keys","resolve","exports","__webpack_module_cache__","moduleId","cachedModule","loaded","__webpack_modules__","call","m","amdD","amdO","O","result","chunkIds","priority","notFulfilled","Infinity","i","length","fulfilled","j","every","splice","r","n","getter","__esModule","d","a","definition","defineProperty","enumerable","g","globalThis","Function","obj","prop","prototype","hasOwnProperty","Symbol","toStringTag","nmd","paths","children","b","baseURI","self","location","href","installedChunks","chunkId","webpackJsonpCallback","parentChunkLoadingFunction","moreModules","runtime","some","chunkLoadingGlobal","forEach","bind","nc","__webpack_exports__"],"sourceRoot":""}
\ No newline at end of file