files_versions-files_versions.js 56 KB

12
  1. (()=>{var e,i,n,s={21678:(e,i,n)=>{"use strict";var s=n(85471),r=n(53334),o=n(43627),a=n.n(o),l=n(85168),c=n(16406),d=n(61338),u=n(21777),p=n(84237),h=n(71650),f=n(63814),m=n(71225),v=n(19231),A=n(63623);const E=(0,f.dC)("dav"),g=(0,A.UU)(E),b=t=>{g.setHeaders({"X-Requested-With":"XMLHttpRequest",requesttoken:null!=t?t:""})};(0,u.zo)(b),b((0,u.do)());const _=g,w=(0,n(35947).YK)().setApp("files_version").detectUser().build();const y={name:"BackupRestoreIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var N=n(14486);const C=(0,N.A)(y,(function(){var t=this,e=t._self._c;return e("span",t._b({staticClass:"material-design-icon backup-restore-icon",attrs:{"aria-hidden":!t.title||null,"aria-label":t.title,role:"img"},on:{click:function(e){return t.$emit("click",e)}}},"span",t.$attrs,!1),[e("svg",{staticClass:"material-design-icon__svg",attrs:{fill:t.fillColor,width:t.size,height:t.size,viewBox:"0 0 24 24"}},[e("path",{attrs:{d:"M12,3A9,9 0 0,0 3,12H0L4,16L8,12H5A7,7 0 0,1 12,5A7,7 0 0,1 19,12A7,7 0 0,1 12,19C10.5,19 9.09,18.5 7.94,17.7L6.5,19.14C8.04,20.3 9.94,21 12,21A9,9 0 0,0 21,12A9,9 0 0,0 12,3M14,12A2,2 0 0,0 12,10A2,2 0 0,0 10,12A2,2 0 0,0 12,14A2,2 0 0,0 14,12Z"}},[t.title?e("title",[t._v(t._s(t.title))]):t._e()])])])}),[],!1,null,null,null).exports;var I=n(11037);const L={name:"DownloadIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},x=(0,N.A)(L,(function(){var t=this,e=t._self._c;return e("span",t._b({staticClass:"material-design-icon download-icon",attrs:{"aria-hidden":!t.title||null,"aria-label":t.title,role:"img"},on:{click:function(e){return t.$emit("click",e)}}},"span",t.$attrs,!1),[e("svg",{staticClass:"material-design-icon__svg",attrs:{fill:t.fillColor,width:t.size,height:t.size,viewBox:"0 0 24 24"}},[e("path",{attrs:{d:"M5,20H19V18H5M19,9H15V3H9V9H5L12,16L19,9Z"}},[t.title?e("title",[t._v(t._s(t.title))]):t._e()])])])}),[],!1,null,null,null).exports,R={name:"FileCompareIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},O=(0,N.A)(R,(function(){var t=this,e=t._self._c;return e("span",t._b({staticClass:"material-design-icon file-compare-icon",attrs:{"aria-hidden":!t.title||null,"aria-label":t.title,role:"img"},on:{click:function(e){return t.$emit("click",e)}}},"span",t.$attrs,!1),[e("svg",{staticClass:"material-design-icon__svg",attrs:{fill:t.fillColor,width:t.size,height:t.size,viewBox:"0 0 24 24"}},[e("path",{attrs:{d:"M10,18H6V16H10V18M10,14H6V12H10V14M10,1V2H6C4.89,2 4,2.89 4,4V20A2,2 0 0,0 6,22H10V23H12V1H10M20,8V20C20,21.11 19.11,22 18,22H14V20H18V11H14V9H18.5L14,4.5V2L20,8M16,14H14V12H16V14M16,18H14V16H16V18Z"}},[t.title?e("title",[t._v(t._s(t.title))]):t._e()])])])}),[],!1,null,null,null).exports,T={name:"ImageOffOutlineIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},S=(0,N.A)(T,(function(){var t=this,e=t._self._c;return e("span",t._b({staticClass:"material-design-icon image-off-outline-icon",attrs:{"aria-hidden":!t.title||null,"aria-label":t.title,role:"img"},on:{click:function(e){return t.$emit("click",e)}}},"span",t.$attrs,!1),[e("svg",{staticClass:"material-design-icon__svg",attrs:{fill:t.fillColor,width:t.size,height:t.size,viewBox:"0 0 24 24"}},[e("path",{attrs:{d:"M22 20.7L3.3 2L2 3.3L3 4.3V19C3 20.1 3.9 21 5 21H19.7L20.7 22L22 20.7M5 19V6.3L12.6 13.9L11.1 15.8L9 13.1L6 17H15.7L17.7 19H5M8.8 5L6.8 3H19C20.1 3 21 3.9 21 5V17.2L19 15.2V5H8.8"}},[t.title?e("title",[t._v(t._s(t.title))]):t._e()])])])}),[],!1,null,null,null).exports;var $=n(93919),D=n(89257),V=n(73267),P=n(41944),F=n(4604),k=n(12231),M=n(18300),B=n(32981),H=n(35810),U=n(65043);const G=(t,e)=>0!=(t&e),j=(0,s.pM)({name:"Version",components:{NcActionLink:V.A,NcActionButton:D.A,NcAvatar:P.A,NcDateTime:F.A,NcListItem:k.N,BackupRestore:C,Download:x,FileCompare:O,Pencil:$.A,Delete:I.A,ImageOffOutline:S},directives:{tooltip:M.A},props:{version:{type:Object,required:!0},fileInfo:{type:Object,required:!0},isCurrent:{type:Boolean,default:!1},isFirstVersion:{type:Boolean,default:!1},loadPreview:{type:Boolean,default:!1},canView:{type:Boolean,default:!1},canCompare:{type:Boolean,default:!1}},emits:["click","compare","restore","delete","label-update-request"],data:()=>({previewLoaded:!1,previewErrored:!1,capabilities:(0,B.C)("core","capabilities",{files:{version_labeling:!1,version_deletion:!1}}),versionAuthor:""}),computed:{humanReadableSize(){return(0,H.v7)(this.version.size)},versionLabel(){var t;const e=null!==(t=this.version.label)&&void 0!==t?t:"";return this.isCurrent?""===e?(0,r.Tl)("files_versions","Current version"):"".concat(e," (").concat((0,r.Tl)("files_versions","Current version"),")"):this.isFirstVersion&&""===e?(0,r.Tl)("files_versions","Initial version"):e},downloadURL(){return this.isCurrent?(0,f.aU)()+(0,m.HS)("/remote.php/webdav",this.fileInfo.path,this.fileInfo.name):(0,f.aU)()+this.version.url},enableLabeling(){return!0===this.capabilities.files.version_labeling},enableDeletion(){return!0===this.capabilities.files.version_deletion},hasDeletePermissions(){return G(this.fileInfo.permissions,H.aX.DELETE)},hasUpdatePermissions(){return G(this.fileInfo.permissions,H.aX.UPDATE)},isDownloadable(){if(0==(this.fileInfo.permissions&H.aX.READ))return!1;if("shared"===this.fileInfo.mountType){const t=this.fileInfo.shareAttributes.find((t=>"permissions"===t.scope&&"download"===t.key))||{};if(!1===(null==t?void 0:t.value))return!1}return!0}},created(){this.fetchDisplayName()},methods:{labelUpdate(){this.$emit("label-update-request")},restoreVersion(){this.$emit("restore",this.version)},async deleteVersion(){await this.$nextTick(),await this.$nextTick(),this.$emit("delete",this.version)},async fetchDisplayName(){if(this.version.author)try{const{data:t}=await U.Ay.get((0,f.KT)("/cloud/users/".concat(this.version.author)));this.versionAuthor=t.ocs.data.displayname}catch(t){this.versionAuthor=null}},click(){this.canView?this.$emit("click",{version:this.version}):window.location=this.downloadURL},compareVersion(){if(!this.canView)throw new Error("Cannot compare version of this file");this.$emit("compare",{version:this.version})},t:r.Tl}});var z=n(85072),X=n.n(z),q=n(97825),W=n.n(q),K=n(77659),Y=n.n(K),Z=n(55056),Q=n.n(Z),J=n(10540),tt=n.n(J),et=n(41113),it=n.n(et),nt=n(91974),st={};st.styleTagTransform=it(),st.setAttributes=Q(),st.insert=Y().bind(null,"head"),st.domAPI=W(),st.insertStyleElement=tt(),X()(nt.A,st),nt.A&&nt.A.locals&&nt.A.locals;const rt=(0,N.A)(j,(function(){var t=this,e=t._self._c;return t._self._setupProxy,e("NcListItem",{staticClass:"version",attrs:{"force-display-actions":!0,"data-files-versions-version":t.version.fileVersion},on:{click:t.click},scopedSlots:t._u([{key:"icon",fn:function(){return[t.loadPreview||t.previewLoaded?!t.isCurrent&&!t.version.hasPreview||t.previewErrored?e("div",{staticClass:"version__image"},[e("ImageOffOutline",{attrs:{size:20}})],1):e("img",{staticClass:"version__image",attrs:{src:t.version.previewUrl,alt:"",decoding:"async",fetchpriority:"low",loading:"lazy"},on:{load:function(e){t.previewLoaded=!0},error:function(e){t.previewErrored=!0}}}):e("div",{staticClass:"version__image"})]},proxy:!0},{key:"name",fn:function(){return[e("div",{staticClass:"version__info"},[t.versionLabel?e("div",{staticClass:"version__info__label",attrs:{title:t.versionLabel}},[t._v("\n\t\t\t\t"+t._s(t.versionLabel)+"\n\t\t\t")]):t._e(),t._v(" "),t.versionAuthor?e("div",{staticClass:"version__info"},[t.versionLabel?e("span",[t._v("•")]):t._e(),t._v(" "),e("NcAvatar",{staticClass:"avatar",attrs:{user:t.version.author,size:16,"disable-menu":!0,"disable-tooltip":!0,"show-user-status":!1}}),t._v(" "),e("div",[t._v(t._s(t.versionAuthor))])],1):t._e()])]},proxy:!0},{key:"subname",fn:function(){return[e("div",{staticClass:"version__info version__info__subline"},[e("NcDateTime",{staticClass:"version__info__date",attrs:{"relative-time":"short",timestamp:t.version.mtime}}),t._v(" "),e("span",[t._v("•")]),t._v(" "),e("span",[t._v(t._s(t.humanReadableSize))])],1)]},proxy:!0},{key:"actions",fn:function(){return[t.enableLabeling&&t.hasUpdatePermissions?e("NcActionButton",{attrs:{"data-cy-files-versions-version-action":"label","close-after-click":!0},on:{click:t.labelUpdate},scopedSlots:t._u([{key:"icon",fn:function(){return[e("Pencil",{attrs:{size:22}})]},proxy:!0}],null,!1,3072546167)},[t._v("\n\t\t\t"+t._s(""===t.version.label?t.t("files_versions","Name this version"):t.t("files_versions","Edit version name"))+"\n\t\t")]):t._e(),t._v(" "),!t.isCurrent&&t.canView&&t.canCompare?e("NcActionButton",{attrs:{"data-cy-files-versions-version-action":"compare","close-after-click":!0},on:{click:t.compareVersion},scopedSlots:t._u([{key:"icon",fn:function(){return[e("FileCompare",{attrs:{size:22}})]},proxy:!0}],null,!1,1958207595)},[t._v("\n\t\t\t"+t._s(t.t("files_versions","Compare to current version"))+"\n\t\t")]):t._e(),t._v(" "),!t.isCurrent&&t.hasUpdatePermissions?e("NcActionButton",{attrs:{"data-cy-files-versions-version-action":"restore","close-after-click":!0},on:{click:t.restoreVersion},scopedSlots:t._u([{key:"icon",fn:function(){return[e("BackupRestore",{attrs:{size:22}})]},proxy:!0}],null,!1,2239038444)},[t._v("\n\t\t\t"+t._s(t.t("files_versions","Restore version"))+"\n\t\t")]):t._e(),t._v(" "),t.isDownloadable?e("NcActionLink",{attrs:{"data-cy-files-versions-version-action":"download",href:t.downloadURL,"close-after-click":!0,download:t.downloadURL},scopedSlots:t._u([{key:"icon",fn:function(){return[e("Download",{attrs:{size:22}})]},proxy:!0}],null,!1,927269758)},[t._v("\n\t\t\t"+t._s(t.t("files_versions","Download version"))+"\n\t\t")]):t._e(),t._v(" "),!t.isCurrent&&t.enableDeletion&&t.hasDeletePermissions?e("NcActionButton",{attrs:{"data-cy-files-versions-version-action":"delete","close-after-click":!0},on:{click:t.deleteVersion},scopedSlots:t._u([{key:"icon",fn:function(){return[e("Delete",{attrs:{size:22}})]},proxy:!0}],null,!1,2429175571)},[t._v("\n\t\t\t"+t._s(t.t("files_versions","Delete version"))+"\n\t\t")]):t._e()]},proxy:!0}])})}),[],!1,null,"a0fb4a78",null).exports,ot=(0,s.pM)({name:"VirtualScrolling",props:{sections:{type:Array,required:!0},containerElement:{type:HTMLElement,default:null},useWindow:{type:Boolean,default:!1},headerHeight:{type:Number,default:75},renderDistance:{type:Number,default:.5},bottomBufferRatio:{type:Number,default:2},scrollToKey:{type:String,default:""}},data:()=>({scrollPosition:0,containerHeight:0,rowsContainerHeight:0,resizeObserver:null}),computed:{visibleSections(){w.debug("[VirtualScrolling] Computing visible section",{sections:this.sections});const t=this.containerHeight,e=this.scrollPosition,i=e+t;let n=0,s=0;const r=this.sections.map((r=>(s+=this.headerHeight,{...r,rows:r.rows.reduce(((r,o)=>{n=s,s+=o.height;let a=0;return s<e?a=(e-s)/t:n>i&&(a=(n-i)/t),a>this.renderDistance?r:[...r,{...o,distance:a}]}),[])}))).filter((t=>t.rows.length>0)),o=r.flatMap((t=>{let{rows:e}=t;return e})).flatMap((t=>{let{items:e}=t;return e})),a=this._rowIdToKeyMap;o.forEach((t=>t.key=a[t.id]));const l=o.map((t=>{let{key:e}=t;return e})).filter((t=>void 0!==t)),c=Object.values(a).filter((t=>!l.includes(t)));return o.filter((t=>{let{key:e}=t;return void 0===e})).forEach((t=>{var e;return t.key=null!==(e=c.pop())&&void 0!==e?e:Math.random().toString(36).substr(2)})),this._rowIdToKeyMap=o.reduce(((t,e)=>{let{id:i,key:n}=e;return{...t,["".concat(i)]:n}}),{}),r},totalHeight(){return this.sections.map((t=>this.headerHeight+t.height)).reduce(((t,e)=>t+e),0)+0},paddingTop(){if(0===this.visibleSections.length)return 0;let t=0;for(const e of this.sections)if(e.key===this.visibleSections[0].rows[0].sectionKey){for(const i of e.rows){if(i.key===this.visibleSections[0].rows[0].key)return t;t+=i.height}t+=this.headerHeight}else t+=this.headerHeight+e.height;return t},rowsContainerStyle(){return{height:"".concat(this.totalHeight,"px"),paddingTop:"".concat(this.paddingTop,"px")}},isNearBottom(){const t=this.containerHeight*this.bottomBufferRatio;return this.scrollPosition+this.containerHeight>=this.totalHeight-t},container(){return w.debug("[VirtualScrolling] Computing container"),null!==this.containerElement?this.containerElement:this.useWindow?window:this.$refs.container}},watch:{isNearBottom(t){w.debug("[VirtualScrolling] isNearBottom changed",{value:t}),t&&this.$emit("need-content")},visibleSections(){this.isNearBottom&&this.$emit("need-content")},scrollToKey(t){let e=0;for(const i of this.sections){if(i.key===t)break;e+=this.headerHeight+i.height}w.debug("[VirtualScrolling] Scrolling to",{currentRowTopDistanceFromTop:e}),this.container.scrollTo({top:e,behavior:"smooth"})}},beforeCreate(){this._rowIdToKeyMap={}},mounted(){this.resizeObserver=new ResizeObserver((t=>{for(const e of t){const t=e.contentRect;e.target===this.container&&(this.containerHeight=t.height),e.target.classList.contains("vs-rows-container")&&(this.rowsContainerHeight=t.height)}})),this.useWindow?(window.addEventListener("resize",this.updateContainerSize,{passive:!0}),this.containerHeight=window.innerHeight):this.resizeObserver.observe(this.container),this.resizeObserver.observe(this.$refs.rowsContainer),this.container.addEventListener("scroll",this.updateScrollPosition,{passive:!0})},beforeDestroy(){var t;this.useWindow&&window.removeEventListener("resize",this.updateContainerSize),null===(t=this.resizeObserver)||void 0===t||t.disconnect(),this.container.removeEventListener("scroll",this.updateScrollPosition)},methods:{updateScrollPosition(){var t;null!==(t=this._onScrollHandle)&&void 0!==t||(this._onScrollHandle=requestAnimationFrame((()=>{this._onScrollHandle=null,this.useWindow?this.scrollPosition=this.container.scrollY:this.scrollPosition=this.container.scrollTop})))},updateContainerSize(){this.containerHeight=window.innerHeight}}});var at=n(26201),lt={};lt.styleTagTransform=it(),lt.setAttributes=Q(),lt.insert=Y().bind(null,"head"),lt.domAPI=W(),lt.insertStyleElement=tt(),X()(at.A,lt),at.A&&at.A.locals&&at.A.locals;const ct=(0,N.A)(ot,(function(){var t=this,e=t._self._c;return t._self._setupProxy,t.useWindow||null!==t.containerElement?e("div",{ref:"rowsContainer",staticClass:"vs-rows-container",style:t.rowsContainerStyle},[t._t("default",null,{visibleSections:t.visibleSections}),t._v(" "),t._t("loader")],2):e("div",{ref:"container",staticClass:"vs-container"},[e("div",{ref:"rowsContainer",staticClass:"vs-rows-container",style:t.rowsContainerStyle},[t._t("default",null,{visibleSections:t.visibleSections}),t._v(" "),t._t("loader")],2)])}),[],!1,null,"49a1883f",null).exports;var dt=n(85338),ut=n(54332),pt=n(82182);const ht=(0,s.pM)({name:"VersionLabelForm",components:{NcButton:ut.A,NcTextField:pt.A,Check:dt.A},props:{versionLabel:{type:String,default:""}},data(){return{innerVersionLabel:this.versionLabel}},mounted(){this.$nextTick((()=>{this.$refs.labelInput.$el.getElementsByTagName("input")[0].focus()}))},methods:{setVersionLabel(t){this.$emit("label-update",t)},t:r.Tl}});var ft=n(81122),mt={};mt.styleTagTransform=it(),mt.setAttributes=Q(),mt.insert=Y().bind(null,"head"),mt.domAPI=W(),mt.insertStyleElement=tt(),X()(ft.A,mt),ft.A&&ft.A.locals&&ft.A.locals;const vt={name:"VersionTab",components:{Version:rt,VirtualScrolling:ct,VersionLabelForm:(0,N.A)(ht,(function(){var t=this,e=t._self._c;return t._self._setupProxy,e("form",{staticClass:"version-label-modal",on:{submit:function(e){return e.preventDefault(),t.setVersionLabel(t.innerVersionLabel)}}},[e("label",[e("div",{staticClass:"version-label-modal__title"},[t._v(t._s(t.t("files_versions","Version name")))]),t._v(" "),e("NcTextField",{ref:"labelInput",attrs:{value:t.innerVersionLabel,placeholder:t.t("files_versions","Version name"),"label-outside":!0},on:{"update:value":function(e){t.innerVersionLabel=e}}})],1),t._v(" "),e("div",{staticClass:"version-label-modal__info"},[t._v("\n\t\t"+t._s(t.t("files_versions","Named versions are persisted, and excluded from automatic cleanups when your storage quota is full."))+"\n\t")]),t._v(" "),e("div",{staticClass:"version-label-modal__actions"},[e("NcButton",{attrs:{disabled:0===t.innerVersionLabel.trim().length},on:{click:function(e){return t.setVersionLabel("")}}},[t._v("\n\t\t\t"+t._s(t.t("files_versions","Remove version name"))+"\n\t\t")]),t._v(" "),e("NcButton",{attrs:{type:"primary","native-type":"submit"},scopedSlots:t._u([{key:"icon",fn:function(){return[e("Check")]},proxy:!0}])},[t._v("\n\t\t\t"+t._s(t.t("files_versions","Save version name"))+"\n\t\t")])],1)])}),[],!1,null,"20b51aac",null).exports,NcLoadingIcon:p.A,NcModal:h.A},mixins:[c.A],data:()=>({fileInfo:null,isActive:!1,versions:[],loading:!1,showVersionLabelForm:!1}),computed:{sections(){return[{key:"versions",rows:this.orderedVersions.map((t=>({key:t.mtime,height:68,sectionKey:"versions",items:[t]}))),height:68*this.orderedVersions.length}]},orderedVersions(){return[...this.versions].sort(((t,e)=>t.mtime===this.fileInfo.mtime?-1:e.mtime===this.fileInfo.mtime?1:e.mtime-t.mtime))},initialVersionMtime(){return this.versions.map((t=>t.mtime)).reduce(((t,e)=>Math.min(t,e)))},viewerFileInfo(){let t="";return 1&this.fileInfo.permissions&&(t+="R"),2&this.fileInfo.permissions&&(t+="W"),8&this.fileInfo.permissions&&(t+="D"),{...this.fileInfo,mime:this.fileInfo.mimetype,basename:this.fileInfo.name,filename:this.fileInfo.path+"/"+this.fileInfo.name,permissions:t,fileid:this.fileInfo.id}},canView(){var t;return null===(t=window.OCA.Viewer)||void 0===t||null===(t=t.mimetypesCompare)||void 0===t?void 0:t.includes(this.fileInfo.mimetype)},canCompare(){return!this.isMobile}},mounted(){(0,d.B1)("files_versions:restore:restored",this.fetchVersions)},beforeUnmount(){(0,d.al)("files_versions:restore:restored",this.fetchVersions)},methods:{async update(t){this.fileInfo=t,this.resetState(),this.fetchVersions()},async setIsActive(t){this.isActive=t},async fetchVersions(){try{this.loading=!0,this.versions=await async function(t){var e;const i="/versions/".concat(null===(e=(0,u.HW)())||void 0===e?void 0:e.uid,"/versions/").concat(t.id);try{return(await _.getDirectoryContents(i,{data:'<?xml version="1.0"?>\n<d:propfind xmlns:d="DAV:"\n\txmlns:oc="http://owncloud.org/ns"\n\txmlns:nc="http://nextcloud.org/ns"\n\txmlns:ocs="http://open-collaboration-services.org/ns">\n\t<d:prop>\n\t\t<d:getcontentlength />\n\t\t<d:getcontenttype />\n\t\t<d:getlastmodified />\n\t\t<d:getetag />\n\t\t<nc:version-label />\n\t\t<nc:version-author />\n\t\t<nc:has-preview />\n\t</d:prop>\n</d:propfind>',details:!0})).data.filter((t=>{let{mime:e}=t;return""!==e})).map((e=>function(t,e){var i;const n=1e3*(0,v.A)(t.lastmod).unix();let s="";return s=n===e.mtime?(0,f.Jv)("/core/preview?fileId={fileId}&c={fileEtag}&x=250&y=250&forceIcon=0&a=0",{fileId:e.id,fileEtag:e.etag}):(0,f.Jv)("/apps/files_versions/preview?file={file}&version={fileVersion}",{file:(0,m.HS)(e.path,e.name),fileVersion:t.basename}),{fileId:e.id,label:t.props["version-label"]&&String(t.props["version-label"]),author:null!==(i=t.props["version-author"])&&void 0!==i?i:null,filename:t.filename,basename:(0,v.A)(n).format("LLL"),mime:t.mime,etag:"".concat(t.props.getetag),size:t.size,type:t.type,mtime:n,permissions:"R",hasPreview:1===t.props["has-preview"],previewUrl:s,url:(0,m.HS)("/remote.php/dav",t.filename),source:(0,f.dC)("dav")+(0,m.O0)(t.filename),fileVersion:t.basename}}(e,t)))}catch(t){throw w.error("Could not fetch version",{exception:t}),t}}(this.fileInfo)}finally{this.loading=!1}},async handleRestore(e){const i=this.fileInfo;this.fileInfo={...this.fileInfo,size:e.size,mtime:e.mtime};const n={preventDefault:!1,fileInfo:this.fileInfo,version:e};if((0,d.Ic)("files_versions:restore:requested",n),!n.preventDefault)try{await async function(t){try{var e,i;w.debug("Restoring version",{url:t.url}),await _.moveFile("/versions/".concat(null===(e=(0,u.HW)())||void 0===e?void 0:e.uid,"/versions/").concat(t.fileId,"/").concat(t.fileVersion),"/versions/".concat(null===(i=(0,u.HW)())||void 0===i?void 0:i.uid,"/restore/target"))}catch(t){throw w.error("Could not restore version",{exception:t}),t}}(e),""!==e.label?(0,l.Te)(t("files_versions","".concat(e.label," restored"))):e.mtime===this.initialVersionMtime?(0,l.Te)(t("files_versions","Initial version restored")):(0,l.Te)(t("files_versions","Version restored")),(0,d.Ic)("files_versions:restore:restored",e)}catch(n){this.fileInfo=i,(0,l.Qg)(t("files_versions","Could not restore version")),(0,d.Ic)("files_versions:restore:failed",e)}},handleLabelUpdateRequest(t){this.showVersionLabelForm=!0,this.editedVersion=t},async handleLabelUpdate(t){const e=this.editedVersion.label;this.editedVersion.label=t,this.showVersionLabelForm=!1;try{await async function(t,e){return await _.customRequest(t.filename,{method:"PROPPATCH",data:'<?xml version="1.0"?>\n\t\t\t\t\t<d:propertyupdate xmlns:d="DAV:"\n\t\t\t\t\t\txmlns:oc="http://owncloud.org/ns"\n\t\t\t\t\t\txmlns:nc="http://nextcloud.org/ns"\n\t\t\t\t\t\txmlns:ocs="http://open-collaboration-services.org/ns">\n\t\t\t\t\t<d:set>\n\t\t\t\t\t\t<d:prop>\n\t\t\t\t\t\t\t<nc:version-label>'.concat(e,"</nc:version-label>\n\t\t\t\t\t\t</d:prop>\n\t\t\t\t\t</d:set>\n\t\t\t\t\t</d:propertyupdate>")})}(this.editedVersion,t),this.editedVersion=null}catch(t){this.editedVersion.label=e,(0,l.Qg)(this.t("files_versions","Could not set version label")),logger.error("Could not set version label",{exception:t})}},async handleDelete(e){const i=this.versions.indexOf(e);this.versions.splice(i,1);try{await async function(t){await _.deleteFile(t.filename)}(e)}catch(i){this.versions.push(e),(0,l.Qg)(t("files_versions","Could not delete version"))}},resetState(){this.$set(this,"versions",[])},openVersion(t){let{version:e}=t;if(e.mtime===this.fileInfo.mtime)return void OCA.Viewer.open({fileInfo:this.viewerFileInfo});const i=this.versions.map((t=>{var e,i;return{...t,filename:t.mtime===this.fileInfo.mtime?a().join("files",null!==(e=null===(i=(0,u.HW)())||void 0===i?void 0:i.uid)&&void 0!==e?e:"",this.fileInfo.path,this.fileInfo.name):t.filename,hasPreview:!1,previewUrl:void 0}}));OCA.Viewer.open({fileInfo:i.find((t=>t.source===e.source)),enableSidebar:!1})},compareVersion(t){let{version:e}=t;const i=this.versions.map((t=>({...t,hasPreview:!1,previewUrl:void 0})));OCA.Viewer.compare(this.viewerFileInfo,i.find((t=>t.source===e.source)))}}};var At=n(34808),Et={};Et.styleTagTransform=it(),Et.setAttributes=Q(),Et.insert=Y().bind(null,"head"),Et.domAPI=W(),Et.insertStyleElement=tt(),X()(At.A,Et),At.A&&At.A.locals&&At.A.locals;const gt=(0,N.A)(vt,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"versions-tab__container"},[e("VirtualScrolling",{attrs:{sections:t.sections,"header-height":0},scopedSlots:t._u([{key:"default",fn:function(i){let{visibleSections:n}=i;return[e("ul",{attrs:{"data-files-versions-versions-list":""}},[1===n.length?t._l(n[0].rows,(function(i){return e("Version",{key:i.items[0].mtime,attrs:{"can-view":t.canView,"can-compare":t.canCompare,"load-preview":t.isActive,version:i.items[0],"file-info":t.fileInfo,"is-current":i.items[0].mtime===t.fileInfo.mtime,"is-first-version":i.items[0].mtime===t.initialVersionMtime},on:{click:t.openVersion,compare:t.compareVersion,restore:t.handleRestore,"label-update-request":function(e){return t.handleLabelUpdateRequest(i.items[0])},delete:t.handleDelete}})})):t._e()],2)]}}])},[t._v(" "),t.loading?e("NcLoadingIcon",{staticClass:"files-list-viewer__loader",attrs:{slot:"loader"},slot:"loader"}):t._e()],1),t._v(" "),t.showVersionLabelForm?e("NcModal",{attrs:{title:t.t("files_versions","Name this version")},on:{close:function(e){t.showVersionLabelForm=!1}}},[e("VersionLabelForm",{attrs:{"version-label":t.editedVersion.label},on:{"label-update":t.handleLabelUpdate}})],1):t._e()],1)}),[],!1,null,null,null).exports;var bt=n(80284);s.Ay.prototype.t=r.Tl,s.Ay.prototype.n=r.zw,s.Ay.use(bt.Ay);const _t=s.Ay.extend(gt);let wt=null;window.addEventListener("DOMContentLoaded",(function(){var t;void 0!==(null===(t=OCA.Files)||void 0===t?void 0:t.Sidebar)&&OCA.Files.Sidebar.registerTab(new OCA.Files.Sidebar.Tab({id:"version_vue",name:(0,r.Tl)("files_versions","Versions"),iconSvg:'<svg xmlns="http://www.w3.org/2000/svg" id="mdi-backup-restore" viewBox="0 0 24 24"><path d="M12,3A9,9 0 0,0 3,12H0L4,16L8,12H5A7,7 0 0,1 12,5A7,7 0 0,1 19,12A7,7 0 0,1 12,19C10.5,19 9.09,18.5 7.94,17.7L6.5,19.14C8.04,20.3 9.94,21 12,21A9,9 0 0,0 21,12A9,9 0 0,0 12,3M14,12A2,2 0 0,0 12,10A2,2 0 0,0 10,12A2,2 0 0,0 12,14A2,2 0 0,0 14,12Z" /></svg>',async mount(t,e,i){wt&&wt.$destroy(),wt=new _t({parent:i}),await wt.update(e),wt.$mount(t)},update(t){wt.update(t)},setIsActive(t){wt&&wt.setIsActive(t)},destroy(){wt.$destroy(),wt=null},enabled(t){var e;return!(null===(e=null==t?void 0:t.isDirectory())||void 0===e||e)}}))}))},91974:(t,e,i)=>{"use strict";i.d(e,{A:()=>a});var n=i(71354),s=i.n(n),r=i(76314),o=i.n(r)()(s());o.push([t.id,".version[data-v-a0fb4a78]{display:flex;flex-direction:row}.version__info[data-v-a0fb4a78]{display:flex;flex-direction:row;align-items:center;gap:.5rem;color:var(--color-main-text);font-weight:500}.version__info__label[data-v-a0fb4a78]{font-weight:700;overflow:hidden;text-overflow:ellipsis}.version__info__date[data-v-a0fb4a78]{overflow:hidden;text-overflow:ellipsis}.version__info__subline[data-v-a0fb4a78]{color:var(--color-text-maxcontrast)}.version__image[data-v-a0fb4a78]{width:3rem;height:3rem;border:1px solid var(--color-border);border-radius:var(--border-radius-large);display:flex;justify-content:center;color:var(--color-text-light)}","",{version:3,sources:["webpack://./apps/files_versions/src/components/Version.vue"],names:[],mappings:"AACA,0BACC,YAAA,CACA,kBAAA,CAEA,gCACC,YAAA,CACA,kBAAA,CACA,kBAAA,CACA,SAAA,CACA,4BAAA,CACA,eAAA,CAEA,uCACC,eAAA,CAEA,eAAA,CACA,sBAAA,CAGD,sCAEC,eAAA,CACA,sBAAA,CAGD,yCACC,mCAAA,CAIF,iCACC,UAAA,CACA,WAAA,CACA,oCAAA,CACA,wCAAA,CAGA,YAAA,CACA,sBAAA,CACA,6BAAA",sourcesContent:["\n.version {\n\tdisplay: flex;\n\tflex-direction: row;\n\n\t&__info {\n\t\tdisplay: flex;\n\t\tflex-direction: row;\n\t\talign-items: center;\n\t\tgap: 0.5rem;\n\t\tcolor: var(--color-main-text);\n\t\tfont-weight: 500;\n\n\t\t&__label {\n\t\t\tfont-weight: 700;\n\t\t\t// Fix overflow on narrow screens\n\t\t\toverflow: hidden;\n\t\t\ttext-overflow: ellipsis;\n\t\t}\n\n\t\t&__date {\n\t\t\t// Fix overflow on narrow screens\n\t\t\toverflow: hidden;\n\t\t\ttext-overflow: ellipsis;\n\t\t}\n\n\t\t&__subline {\n\t\t\tcolor: var(--color-text-maxcontrast)\n\t\t}\n\t}\n\n\t&__image {\n\t\twidth: 3rem;\n\t\theight: 3rem;\n\t\tborder: 1px solid var(--color-border);\n\t\tborder-radius: var(--border-radius-large);\n\n\t\t// Useful to display no preview icon.\n\t\tdisplay: flex;\n\t\tjustify-content: center;\n\t\tcolor: var(--color-text-light);\n\t}\n}\n"],sourceRoot:""}]);const a=o},81122:(t,e,i)=>{"use strict";i.d(e,{A:()=>a});var n=i(71354),s=i.n(n),r=i(76314),o=i.n(r)()(s());o.push([t.id,".version-label-modal[data-v-20b51aac]{display:flex;justify-content:space-between;flex-direction:column;height:250px;padding:16px}.version-label-modal__title[data-v-20b51aac]{margin-bottom:12px;font-weight:600}.version-label-modal__info[data-v-20b51aac]{margin-top:12px;color:var(--color-text-maxcontrast)}.version-label-modal__actions[data-v-20b51aac]{display:flex;justify-content:space-between;margin-top:64px}","",{version:3,sources:["webpack://./apps/files_versions/src/components/VersionLabelForm.vue"],names:[],mappings:"AACA,sCACC,YAAA,CACA,6BAAA,CACA,qBAAA,CACA,YAAA,CACA,YAAA,CAEA,6CACC,kBAAA,CACA,eAAA,CAGD,4CACC,eAAA,CACA,mCAAA,CAGD,+CACC,YAAA,CACA,6BAAA,CACA,eAAA",sourcesContent:["\n.version-label-modal {\n\tdisplay: flex;\n\tjustify-content: space-between;\n\tflex-direction: column;\n\theight: 250px;\n\tpadding: 16px;\n\n\t&__title {\n\t\tmargin-bottom: 12px;\n\t\tfont-weight: 600;\n\t}\n\n\t&__info {\n\t\tmargin-top: 12px;\n\t\tcolor: var(--color-text-maxcontrast);\n\t}\n\n\t&__actions {\n\t\tdisplay: flex;\n\t\tjustify-content: space-between;\n\t\tmargin-top: 64px;\n\t}\n}\n"],sourceRoot:""}]);const a=o},26201:(t,e,i)=>{"use strict";i.d(e,{A:()=>a});var n=i(71354),s=i.n(n),r=i(76314),o=i.n(r)()(s());o.push([t.id,".vs-container[data-v-49a1883f]{overflow-y:scroll;height:100%}.vs-rows-container[data-v-49a1883f]{box-sizing:border-box;will-change:scroll-position,padding;contain:layout paint style}","",{version:3,sources:["webpack://./apps/files_versions/src/components/VirtualScrolling.vue"],names:[],mappings:"AACA,+BACC,iBAAA,CACA,WAAA,CAGD,oCACC,qBAAA,CACA,mCAAA,CACA,0BAAA",sourcesContent:["\n.vs-container {\n\toverflow-y: scroll;\n\theight: 100%;\n}\n\n.vs-rows-container {\n\tbox-sizing: border-box;\n\twill-change: scroll-position, padding;\n\tcontain: layout paint style;\n}\n"],sourceRoot:""}]);const a=o},34808:(t,e,i)=>{"use strict";i.d(e,{A:()=>a});var n=i(71354),s=i.n(n),r=i(76314),o=i.n(r)()(s());o.push([t.id,".versions-tab__container{height:100%}","",{version:3,sources:["webpack://./apps/files_versions/src/views/VersionTab.vue"],names:[],mappings:"AACA,yBACC,WAAA",sourcesContent:["\n.versions-tab__container {\n\theight: 100%;\n}\n"],sourceRoot:""}]);const a=o},42634:()=>{},15340:()=>{},79838:()=>{},35810:(t,e,i)=>{"use strict";i.d(e,{Al:()=>D,H4:()=>S,Q$:()=>$,R3:()=>w,VL:()=>_,aX:()=>v,lJ:()=>O,pt:()=>y,ur:()=>M,v7:()=>F});var n=i(35947),s=i(21777),r=i(43627),o=i(71225),a=i(63814),l=i(36117),c=i(44719),d=i(82680),u=(i(87485),i(53334)),p=i(380),h=i(65606),f=i(96763);const m=(0,n.YK)().setApp("@nextcloud/files").detectUser().build();var v=(t=>(t[t.NONE=0]="NONE",t[t.CREATE=4]="CREATE",t[t.READ=1]="READ",t[t.UPDATE=2]="UPDATE",t[t.DELETE=8]="DELETE",t[t.SHARE=16]="SHARE",t[t.ALL=31]="ALL",t))(v||{});const A=["d:getcontentlength","d:getcontenttype","d:getetag","d:getlastmodified","d:creationdate","d:displayname","d:quota-available-bytes","d:resourcetype","nc:has-preview","nc:is-encrypted","nc:mount-type","oc:comments-unread","oc:favorite","oc:fileid","oc:owner-display-name","oc:owner-id","oc:permissions","oc:size"],E={d:"DAV:",nc:"http://nextcloud.org/ns",oc:"http://owncloud.org/ns",ocs:"http://open-collaboration-services.org/ns"},g=function(){return void 0===window._nc_dav_properties&&(window._nc_dav_properties=[...A]),window._nc_dav_properties.map((t=>`<${t} />`)).join(" ")},b=function(){return void 0===window._nc_dav_namespaces&&(window._nc_dav_namespaces={...E}),Object.keys(window._nc_dav_namespaces).map((t=>`xmlns:${t}="${window._nc_dav_namespaces?.[t]}"`)).join(" ")},_=function(){return`<?xml version="1.0"?>\n\t\t<d:propfind ${b()}>\n\t\t\t<d:prop>\n\t\t\t\t${g()}\n\t\t\t</d:prop>\n\t\t</d:propfind>`},w=function(t){return`<?xml version="1.0" encoding="UTF-8"?>\n<d:searchrequest ${b()}\n\txmlns:ns="https://github.com/icewind1991/SearchDAV/ns">\n\t<d:basicsearch>\n\t\t<d:select>\n\t\t\t<d:prop>\n\t\t\t\t${g()}\n\t\t\t</d:prop>\n\t\t</d:select>\n\t\t<d:from>\n\t\t\t<d:scope>\n\t\t\t\t<d:href>/files/${(0,s.HW)()?.uid}/</d:href>\n\t\t\t\t<d:depth>infinity</d:depth>\n\t\t\t</d:scope>\n\t\t</d:from>\n\t\t<d:where>\n\t\t\t<d:and>\n\t\t\t\t<d:or>\n\t\t\t\t\t<d:not>\n\t\t\t\t\t\t<d:eq>\n\t\t\t\t\t\t\t<d:prop>\n\t\t\t\t\t\t\t\t<d:getcontenttype/>\n\t\t\t\t\t\t\t</d:prop>\n\t\t\t\t\t\t\t<d:literal>httpd/unix-directory</d:literal>\n\t\t\t\t\t\t</d:eq>\n\t\t\t\t\t</d:not>\n\t\t\t\t\t<d:eq>\n\t\t\t\t\t\t<d:prop>\n\t\t\t\t\t\t\t<oc:size/>\n\t\t\t\t\t\t</d:prop>\n\t\t\t\t\t\t<d:literal>0</d:literal>\n\t\t\t\t\t</d:eq>\n\t\t\t\t</d:or>\n\t\t\t\t<d:gt>\n\t\t\t\t\t<d:prop>\n\t\t\t\t\t\t<d:getlastmodified/>\n\t\t\t\t\t</d:prop>\n\t\t\t\t\t<d:literal>${t}</d:literal>\n\t\t\t\t</d:gt>\n\t\t\t</d:and>\n\t\t</d:where>\n\t\t<d:orderby>\n\t\t\t<d:order>\n\t\t\t\t<d:prop>\n\t\t\t\t\t<d:getlastmodified/>\n\t\t\t\t</d:prop>\n\t\t\t\t<d:descending/>\n\t\t\t</d:order>\n\t\t</d:orderby>\n\t\t<d:limit>\n\t\t\t<d:nresults>100</d:nresults>\n\t\t\t<ns:firstresult>0</ns:firstresult>\n\t\t</d:limit>\n\t</d:basicsearch>\n</d:searchrequest>`};var y=(t=>(t.Folder="folder",t.File="file",t))(y||{});const N=function(t,e){return null!==t.match(e)},C=(t,e)=>{if(t.id&&"number"!=typeof t.id)throw new Error("Invalid id type of value");if(!t.source)throw new Error("Missing mandatory source");try{new URL(t.source)}catch(t){throw new Error("Invalid source format, source must be a valid URL")}if(!t.source.startsWith("http"))throw new Error("Invalid source format, only http(s) is supported");if(t.displayname&&"string"!=typeof t.displayname)throw new Error("Invalid displayname type");if(t.mtime&&!(t.mtime instanceof Date))throw new Error("Invalid mtime type");if(t.crtime&&!(t.crtime instanceof Date))throw new Error("Invalid crtime type");if(!t.mime||"string"!=typeof t.mime||!t.mime.match(/^[-\w.]+\/[-+\w.]+$/gi))throw new Error("Missing or invalid mandatory mime");if("size"in t&&"number"!=typeof t.size&&void 0!==t.size)throw new Error("Invalid size type");if("permissions"in t&&void 0!==t.permissions&&!("number"==typeof t.permissions&&t.permissions>=v.NONE&&t.permissions<=v.ALL))throw new Error("Invalid permissions");if(t.owner&&null!==t.owner&&"string"!=typeof t.owner)throw new Error("Invalid owner type");if(t.attributes&&"object"!=typeof t.attributes)throw new Error("Invalid attributes type");if(t.root&&"string"!=typeof t.root)throw new Error("Invalid root type");if(t.root&&!t.root.startsWith("/"))throw new Error("Root must start with a leading slash");if(t.root&&!t.source.includes(t.root))throw new Error("Root must be part of the source");if(t.root&&N(t.source,e)){const i=t.source.match(e)[0];if(!t.source.includes((0,r.join)(i,t.root)))throw new Error("The root must be relative to the service. e.g /files/emma")}if(t.status&&!Object.values(I).includes(t.status))throw new Error("Status must be a valid NodeStatus")};var I=(t=>(t.NEW="new",t.FAILED="failed",t.LOADING="loading",t.LOCKED="locked",t))(I||{});class L{_data;_attributes;_knownDavService=/(remote|public)\.php\/(web)?dav/i;readonlyAttributes=Object.entries(Object.getOwnPropertyDescriptors(L.prototype)).filter((t=>"function"==typeof t[1].get&&"__proto__"!==t[0])).map((t=>t[0]));handler={set:(t,e,i)=>!this.readonlyAttributes.includes(e)&&Reflect.set(t,e,i),deleteProperty:(t,e)=>!this.readonlyAttributes.includes(e)&&Reflect.deleteProperty(t,e),get:(t,e,i)=>this.readonlyAttributes.includes(e)?(m.warn(`Accessing "Node.attributes.${e}" is deprecated, access it directly on the Node instance.`),Reflect.get(this,e)):Reflect.get(t,e,i)};constructor(t,e){C(t,e||this._knownDavService),this._data={displayname:t.attributes?.displayname,...t,attributes:{}},this._attributes=new Proxy(this._data.attributes,this.handler),this.update(t.attributes??{}),e&&(this._knownDavService=e)}get source(){return this._data.source.replace(/\/$/i,"")}get encodedSource(){const{origin:t}=new URL(this.source);return t+(0,o.O0)(this.source.slice(t.length))}get basename(){return(0,r.basename)(this.source)}get displayname(){return this._data.displayname||this.basename}set displayname(t){this._data.displayname=t}get extension(){return(0,r.extname)(this.source)}get dirname(){if(this.root){let t=this.source;this.isDavRessource&&(t=t.split(this._knownDavService).pop());const e=t.indexOf(this.root),i=this.root.replace(/\/$/,"");return(0,r.dirname)(t.slice(e+i.length)||"/")}const t=new URL(this.source);return(0,r.dirname)(t.pathname)}get mime(){return this._data.mime}get mtime(){return this._data.mtime}set mtime(t){this._data.mtime=t}get crtime(){return this._data.crtime}get size(){return this._data.size}set size(t){this.updateMtime(),this._data.size=t}get attributes(){return this._attributes}get permissions(){return null!==this.owner||this.isDavRessource?void 0!==this._data.permissions?this._data.permissions:v.NONE:v.READ}set permissions(t){this.updateMtime(),this._data.permissions=t}get owner(){return this.isDavRessource?this._data.owner:null}get isDavRessource(){return N(this.source,this._knownDavService)}get root(){return this._data.root?this._data.root.replace(/^(.+)\/$/,"$1"):this.isDavRessource&&(0,r.dirname)(this.source).split(this._knownDavService).pop()||null}get path(){if(this.root){let t=this.source;this.isDavRessource&&(t=t.split(this._knownDavService).pop());const e=t.indexOf(this.root),i=this.root.replace(/\/$/,"");return t.slice(e+i.length)||"/"}return(this.dirname+"/"+this.basename).replace(/\/\//g,"/")}get fileid(){return this._data?.id}get status(){return this._data?.status}set status(t){this._data.status=t}move(t){C({...this._data,source:t},this._knownDavService);const e=this.basename;this._data.source=t,this.displayname===e&&this.basename!==e&&(this.displayname=this.basename),this.updateMtime()}rename(t){if(t.includes("/"))throw new Error("Invalid basename");this.move((0,r.dirname)(this.source)+"/"+t)}updateMtime(){this._data.mtime&&(this._data.mtime=new Date)}update(t){for(const[e,i]of Object.entries(t))try{void 0===i?delete this.attributes[e]:this.attributes[e]=i}catch(t){if(t instanceof TypeError)continue;throw t}}}class x extends L{get type(){return y.File}}class R extends L{constructor(t){super({...t,mime:"httpd/unix-directory"})}get type(){return y.Folder}get extension(){return null}get mime(){return"httpd/unix-directory"}}const O=(0,d.f)()?`/files/${(0,d.G)()}`:`/files/${(0,s.HW)()?.uid}`,T=function(){const t=(0,a.dC)("dav");return(0,d.f)()?t.replace("remote.php","public.php"):t}(),S=function(t=T,e={}){const i=(0,c.UU)(t,{headers:e});function n(t){i.setHeaders({...e,"X-Requested-With":"XMLHttpRequest",requesttoken:t??""})}return(0,s.zo)(n),n((0,s.do)()),(0,c.Gu)().patch("fetch",((t,e)=>{const i=e.headers;return i?.method&&(e.method=i.method,delete i.method),fetch(t,e)})),i},$=(t,e="/",i=O)=>{const n=new AbortController;return new l.CancelablePromise((async(s,r,o)=>{o((()=>n.abort()));try{s((await t.getDirectoryContents(`${i}${e}`,{signal:n.signal,details:!0,data:`<?xml version="1.0"?>\n\t\t<oc:filter-files ${b()}>\n\t\t\t<d:prop>\n\t\t\t\t${g()}\n\t\t\t</d:prop>\n\t\t\t<oc:filter-rules>\n\t\t\t\t<oc:favorite>1</oc:favorite>\n\t\t\t</oc:filter-rules>\n\t\t</oc:filter-files>`,headers:{method:"REPORT"},includeSelf:!0})).data.filter((t=>t.filename!==e)).map((t=>D(t,i))))}catch(t){r(t)}}))},D=function(t,e=O,i=T){let n=(0,s.HW)()?.uid;if((0,d.f)())n=n??"anonymous";else if(!n)throw new Error("No user id found");const r=t.props,o=function(t=""){let e=v.NONE;return t?((t.includes("C")||t.includes("K"))&&(e|=v.CREATE),t.includes("G")&&(e|=v.READ),(t.includes("W")||t.includes("N")||t.includes("V"))&&(e|=v.UPDATE),t.includes("D")&&(e|=v.DELETE),t.includes("R")&&(e|=v.SHARE),e):e}(r?.permissions),a=String(r?.["owner-id"]||n),l=r.fileid||0,c={id:l,source:`${i}${t.filename}`,mtime:new Date(Date.parse(t.lastmod)),mime:t.mime||"application/octet-stream",displayname:void 0!==r.displayname?String(r.displayname):void 0,size:r?.size||Number.parseInt(r.getcontentlength||"0"),status:l<0?I.FAILED:void 0,permissions:o,owner:a,root:e,attributes:{...t,...r,hasPreview:r?.["has-preview"]}};return delete c.attributes?.props,"file"===t.type?new x(c):new R(c)};Error;const V=["B","KB","MB","GB","TB","PB"],P=["B","KiB","MiB","GiB","TiB","PiB"];function F(t,e=!1,i=!1,n=!1){i=i&&!n,"string"==typeof t&&(t=Number(t));let s=t>0?Math.floor(Math.log(t)/Math.log(n?1e3:1024)):0;s=Math.min((i?P.length:V.length)-1,s);const r=i?P[s]:V[s];let o=(t/Math.pow(n?1e3:1024,s)).toFixed(1);return!0===e&&0===s?("0.0"!==o?"< 1 ":"0 ")+(i?P[1]:V[1]):(o=s<2?parseFloat(o).toFixed(0):parseFloat(o).toLocaleString((0,u.lO)()),o+" "+r)}function k(t){return t instanceof Date?t.toISOString():String(t)}function M(t,e={}){const i={sortingMode:"basename",sortingOrder:"asc",...e};return function(t,e,i){i=i??[];const n=(e=e??[t=>t]).map(((t,e)=>"asc"===(i[e]??"asc")?1:-1)),s=Intl.Collator([(0,u.Z0)(),(0,u.lO)()],{numeric:!0,usage:"sort"});return[...t].sort(((t,i)=>{for(const[r,o]of e.entries()){const e=s.compare(k(o(t)),k(o(i)));if(0!==e)return e*n[r]}return 0}))}(t,[...i.sortFavoritesFirst?[t=>1!==t.attributes?.favorite]:[],...i.sortFoldersFirst?[t=>"folder"!==t.type]:[],..."basename"!==i.sortingMode?[t=>t[i.sortingMode]]:[],t=>{return(e=t.attributes?.displayname||t.basename).lastIndexOf(".")>0?e.slice(0,e.lastIndexOf(".")):e;var e},t=>t.basename],[...i.sortFavoritesFirst?["asc"]:[],...i.sortFoldersFirst?["asc"]:[],..."mtime"===i.sortingMode?["asc"===i.sortingOrder?"desc":"asc"]:[],..."mtime"!==i.sortingMode&&"basename"!==i.sortingMode?[i.sortingOrder]:[],i.sortingOrder,i.sortingOrder])}var B={};!function(t){const e=":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",i="["+e+"]["+e+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*",n=new RegExp("^"+i+"$");t.isExist=function(t){return void 0!==t},t.isEmptyObject=function(t){return 0===Object.keys(t).length},t.merge=function(t,e,i){if(e){const n=Object.keys(e),s=n.length;for(let r=0;r<s;r++)t[n[r]]="strict"===i?[e[n[r]]]:e[n[r]]}},t.getValue=function(e){return t.isExist(e)?e:""},t.isName=function(t){return!(null==n.exec(t))},t.getAllMatches=function(t,e){const i=[];let n=e.exec(t);for(;n;){const s=[];s.startIndex=e.lastIndex-n[0].length;const r=n.length;for(let t=0;t<r;t++)s.push(n[t]);i.push(s),n=e.exec(t)}return i},t.nameRegexp=i}(B);new RegExp("(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['\"])(([\\s\\S])*?)\\5)?","g");var H={};const U={preserveOrder:!1,attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0,eNotation:!0},tagValueProcessor:function(t,e){return e},attributeValueProcessor:function(t,e){return e},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(t,e,i){return t}};H.buildOptions=function(t){return Object.assign({},U,t)},H.defaultOptions=U,!Number.parseInt&&window.parseInt&&(Number.parseInt=window.parseInt),!Number.parseFloat&&window.parseFloat&&(Number.parseFloat=window.parseFloat),new RegExp("([^\\s=]+)\\s*(=\\s*(['\"])([\\s\\S]*?)\\3)?","gm");var G={};function j(t,e,i){let n;const s={};for(let r=0;r<t.length;r++){const o=t[r],a=z(o);let l="";if(l=void 0===i?a:i+"."+a,a===e.textNodeName)void 0===n?n=o[a]:n+=""+o[a];else{if(void 0===a)continue;if(o[a]){let t=j(o[a],e,l);const i=q(t,e);o[":@"]?X(t,o[":@"],l,e):1!==Object.keys(t).length||void 0===t[e.textNodeName]||e.alwaysCreateTextNode?0===Object.keys(t).length&&(e.alwaysCreateTextNode?t[e.textNodeName]="":t=""):t=t[e.textNodeName],void 0!==s[a]&&s.hasOwnProperty(a)?(Array.isArray(s[a])||(s[a]=[s[a]]),s[a].push(t)):e.isArray(a,l,i)?s[a]=[t]:s[a]=t}}}return"string"==typeof n?n.length>0&&(s[e.textNodeName]=n):void 0!==n&&(s[e.textNodeName]=n),s}function z(t){const e=Object.keys(t);for(let t=0;t<e.length;t++){const i=e[t];if(":@"!==i)return i}}function X(t,e,i,n){if(e){const s=Object.keys(e),r=s.length;for(let o=0;o<r;o++){const r=s[o];n.isArray(r,i+"."+r,!0,!0)?t[r]=[e[r]]:t[r]=e[r]}}}function q(t,e){const{textNodeName:i}=e,n=Object.keys(t).length;return 0===n||!(1!==n||!t[i]&&"boolean"!=typeof t[i]&&0!==t[i])}G.prettify=function(t,e){return j(t,e)};const{buildOptions:W}=H,{prettify:K}=G;function Y(t,e,i,n){let s="",r=!1;for(let o=0;o<t.length;o++){const a=t[o],l=Z(a);if(void 0===l)continue;let c="";if(c=0===i.length?l:`${i}.${l}`,l===e.textNodeName){let t=a[l];J(c,e)||(t=e.tagValueProcessor(l,t),t=tt(t,e)),r&&(s+=n),s+=t,r=!1;continue}if(l===e.cdataPropName){r&&(s+=n),s+=`<![CDATA[${a[l][0][e.textNodeName]}]]>`,r=!1;continue}if(l===e.commentPropName){s+=n+`\x3c!--${a[l][0][e.textNodeName]}--\x3e`,r=!0;continue}if("?"===l[0]){const t=Q(a[":@"],e),i="?xml"===l?"":n;let o=a[l][0][e.textNodeName];o=0!==o.length?" "+o:"",s+=i+`<${l}${o}${t}?>`,r=!0;continue}let d=n;""!==d&&(d+=e.indentBy);const u=n+`<${l}${Q(a[":@"],e)}`,p=Y(a[l],e,c,d);-1!==e.unpairedTags.indexOf(l)?e.suppressUnpairedNode?s+=u+">":s+=u+"/>":p&&0!==p.length||!e.suppressEmptyNode?p&&p.endsWith(">")?s+=u+`>${p}${n}</${l}>`:(s+=u+">",p&&""!==n&&(p.includes("/>")||p.includes("</"))?s+=n+e.indentBy+p+n:s+=p,s+=`</${l}>`):s+=u+"/>",r=!0}return s}function Z(t){const e=Object.keys(t);for(let i=0;i<e.length;i++){const n=e[i];if(t.hasOwnProperty(n)&&":@"!==n)return n}}function Q(t,e){let i="";if(t&&!e.ignoreAttributes)for(let n in t){if(!t.hasOwnProperty(n))continue;let s=e.attributeValueProcessor(n,t[n]);s=tt(s,e),!0===s&&e.suppressBooleanAttributes?i+=` ${n.substr(e.attributeNamePrefix.length)}`:i+=` ${n.substr(e.attributeNamePrefix.length)}="${s}"`}return i}function J(t,e){let i=(t=t.substr(0,t.length-e.textNodeName.length-1)).substr(t.lastIndexOf(".")+1);for(let n in e.stopNodes)if(e.stopNodes[n]===t||e.stopNodes[n]==="*."+i)return!0;return!1}function tt(t,e){if(t&&t.length>0&&e.processEntities)for(let i=0;i<e.entities.length;i++){const n=e.entities[i];t=t.replace(n.regex,n.val)}return t}const et=function(t,e){let i="";return e.format&&e.indentBy.length>0&&(i="\n"),Y(t,e,"",i)},it={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(t,e){return e},attributeValueProcessor:function(t,e){return e},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:new RegExp("&","g"),val:"&amp;"},{regex:new RegExp(">","g"),val:"&gt;"},{regex:new RegExp("<","g"),val:"&lt;"},{regex:new RegExp("'","g"),val:"&apos;"},{regex:new RegExp('"',"g"),val:"&quot;"}],processEntities:!0,stopNodes:[],oneListGroup:!1};function nt(t){this.options=Object.assign({},it,t),this.options.ignoreAttributes||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=ot),this.processTextOrObjNode=st,this.options.format?(this.indentate=rt,this.tagEndChar=">\n",this.newLine="\n"):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}function st(t,e,i){const n=this.j2x(t,i+1);return void 0!==t[this.options.textNodeName]&&1===Object.keys(t).length?this.buildTextValNode(t[this.options.textNodeName],e,n.attrStr,i):this.buildObjectNode(n.val,e,n.attrStr,i)}function rt(t){return this.options.indentBy.repeat(t)}function ot(t){return!(!t.startsWith(this.options.attributeNamePrefix)||t===this.options.textNodeName)&&t.substr(this.attrPrefixLen)}nt.prototype.build=function(t){return this.options.preserveOrder?et(t,this.options):(Array.isArray(t)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(t={[this.options.arrayNodeName]:t}),this.j2x(t,0).val)},nt.prototype.j2x=function(t,e){let i="",n="";for(let s in t)if(Object.prototype.hasOwnProperty.call(t,s))if(void 0===t[s])this.isAttribute(s)&&(n+="");else if(null===t[s])this.isAttribute(s)?n+="":"?"===s[0]?n+=this.indentate(e)+"<"+s+"?"+this.tagEndChar:n+=this.indentate(e)+"<"+s+"/"+this.tagEndChar;else if(t[s]instanceof Date)n+=this.buildTextValNode(t[s],s,"",e);else if("object"!=typeof t[s]){const r=this.isAttribute(s);if(r)i+=this.buildAttrPairStr(r,""+t[s]);else if(s===this.options.textNodeName){let e=this.options.tagValueProcessor(s,""+t[s]);n+=this.replaceEntitiesValue(e)}else n+=this.buildTextValNode(t[s],s,"",e)}else if(Array.isArray(t[s])){const i=t[s].length;let r="";for(let o=0;o<i;o++){const i=t[s][o];void 0===i||(null===i?"?"===s[0]?n+=this.indentate(e)+"<"+s+"?"+this.tagEndChar:n+=this.indentate(e)+"<"+s+"/"+this.tagEndChar:"object"==typeof i?this.options.oneListGroup?r+=this.j2x(i,e+1).val:r+=this.processTextOrObjNode(i,s,e):r+=this.buildTextValNode(i,s,"",e))}this.options.oneListGroup&&(r=this.buildObjectNode(r,s,"",e)),n+=r}else if(this.options.attributesGroupName&&s===this.options.attributesGroupName){const e=Object.keys(t[s]),n=e.length;for(let r=0;r<n;r++)i+=this.buildAttrPairStr(e[r],""+t[s][e[r]])}else n+=this.processTextOrObjNode(t[s],s,e);return{attrStr:i,val:n}},nt.prototype.buildAttrPairStr=function(t,e){return e=this.options.attributeValueProcessor(t,""+e),e=this.replaceEntitiesValue(e),this.options.suppressBooleanAttributes&&"true"===e?" "+t:" "+t+'="'+e+'"'},nt.prototype.buildObjectNode=function(t,e,i,n){if(""===t)return"?"===e[0]?this.indentate(n)+"<"+e+i+"?"+this.tagEndChar:this.indentate(n)+"<"+e+i+this.closeTag(e)+this.tagEndChar;{let s="</"+e+this.tagEndChar,r="";return"?"===e[0]&&(r="?",s=""),!i&&""!==i||-1!==t.indexOf("<")?!1!==this.options.commentPropName&&e===this.options.commentPropName&&0===r.length?this.indentate(n)+`\x3c!--${t}--\x3e`+this.newLine:this.indentate(n)+"<"+e+i+r+this.tagEndChar+t+this.indentate(n)+s:this.indentate(n)+"<"+e+i+r+">"+t+s}},nt.prototype.closeTag=function(t){let e="";return-1!==this.options.unpairedTags.indexOf(t)?this.options.suppressUnpairedNode||(e="/"):e=this.options.suppressEmptyNode?"/":`></${t}`,e},nt.prototype.buildTextValNode=function(t,e,i,n){if(!1!==this.options.cdataPropName&&e===this.options.cdataPropName)return this.indentate(n)+`<![CDATA[${t}]]>`+this.newLine;if(!1!==this.options.commentPropName&&e===this.options.commentPropName)return this.indentate(n)+`\x3c!--${t}--\x3e`+this.newLine;if("?"===e[0])return this.indentate(n)+"<"+e+i+"?"+this.tagEndChar;{let s=this.options.tagValueProcessor(e,t);return s=this.replaceEntitiesValue(s),""===s?this.indentate(n)+"<"+e+i+this.closeTag(e)+this.tagEndChar:this.indentate(n)+"<"+e+i+">"+s+"</"+e+this.tagEndChar}},nt.prototype.replaceEntitiesValue=function(t){if(t&&t.length>0&&this.options.processEntities)for(let e=0;e<this.options.entities.length;e++){const i=this.options.entities[e];t=t.replace(i.regex,i.val)}return t};var at="object"==typeof h&&h.env&&h.env.NODE_DEBUG&&/\bsemver\b/i.test(h.env.NODE_DEBUG)?(...t)=>f.error("SEMVER",...t):()=>{},lt={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER||9007199254740991,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2},ct={exports:{}};!function(t,e){const{MAX_SAFE_COMPONENT_LENGTH:i,MAX_SAFE_BUILD_LENGTH:n,MAX_LENGTH:s}=lt,r=at,o=(e=t.exports={}).re=[],a=e.safeRe=[],l=e.src=[],c=e.t={};let d=0;const u="[a-zA-Z0-9-]",p=[["\\s",1],["\\d",s],[u,n]],h=(t,e,i)=>{const n=(t=>{for(const[e,i]of p)t=t.split(`${e}*`).join(`${e}{0,${i}}`).split(`${e}+`).join(`${e}{1,${i}}`);return t})(e),s=d++;r(t,s,e),c[t]=s,l[s]=e,o[s]=new RegExp(e,i?"g":void 0),a[s]=new RegExp(n,i?"g":void 0)};h("NUMERICIDENTIFIER","0|[1-9]\\d*"),h("NUMERICIDENTIFIERLOOSE","\\d+"),h("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${u}*`),h("MAINVERSION",`(${l[c.NUMERICIDENTIFIER]})\\.(${l[c.NUMERICIDENTIFIER]})\\.(${l[c.NUMERICIDENTIFIER]})`),h("MAINVERSIONLOOSE",`(${l[c.NUMERICIDENTIFIERLOOSE]})\\.(${l[c.NUMERICIDENTIFIERLOOSE]})\\.(${l[c.NUMERICIDENTIFIERLOOSE]})`),h("PRERELEASEIDENTIFIER",`(?:${l[c.NUMERICIDENTIFIER]}|${l[c.NONNUMERICIDENTIFIER]})`),h("PRERELEASEIDENTIFIERLOOSE",`(?:${l[c.NUMERICIDENTIFIERLOOSE]}|${l[c.NONNUMERICIDENTIFIER]})`),h("PRERELEASE",`(?:-(${l[c.PRERELEASEIDENTIFIER]}(?:\\.${l[c.PRERELEASEIDENTIFIER]})*))`),h("PRERELEASELOOSE",`(?:-?(${l[c.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${l[c.PRERELEASEIDENTIFIERLOOSE]})*))`),h("BUILDIDENTIFIER",`${u}+`),h("BUILD",`(?:\\+(${l[c.BUILDIDENTIFIER]}(?:\\.${l[c.BUILDIDENTIFIER]})*))`),h("FULLPLAIN",`v?${l[c.MAINVERSION]}${l[c.PRERELEASE]}?${l[c.BUILD]}?`),h("FULL",`^${l[c.FULLPLAIN]}$`),h("LOOSEPLAIN",`[v=\\s]*${l[c.MAINVERSIONLOOSE]}${l[c.PRERELEASELOOSE]}?${l[c.BUILD]}?`),h("LOOSE",`^${l[c.LOOSEPLAIN]}$`),h("GTLT","((?:<|>)?=?)"),h("XRANGEIDENTIFIERLOOSE",`${l[c.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),h("XRANGEIDENTIFIER",`${l[c.NUMERICIDENTIFIER]}|x|X|\\*`),h("XRANGEPLAIN",`[v=\\s]*(${l[c.XRANGEIDENTIFIER]})(?:\\.(${l[c.XRANGEIDENTIFIER]})(?:\\.(${l[c.XRANGEIDENTIFIER]})(?:${l[c.PRERELEASE]})?${l[c.BUILD]}?)?)?`),h("XRANGEPLAINLOOSE",`[v=\\s]*(${l[c.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[c.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[c.XRANGEIDENTIFIERLOOSE]})(?:${l[c.PRERELEASELOOSE]})?${l[c.BUILD]}?)?)?`),h("XRANGE",`^${l[c.GTLT]}\\s*${l[c.XRANGEPLAIN]}$`),h("XRANGELOOSE",`^${l[c.GTLT]}\\s*${l[c.XRANGEPLAINLOOSE]}$`),h("COERCEPLAIN",`(^|[^\\d])(\\d{1,${i}})(?:\\.(\\d{1,${i}}))?(?:\\.(\\d{1,${i}}))?`),h("COERCE",`${l[c.COERCEPLAIN]}(?:$|[^\\d])`),h("COERCEFULL",l[c.COERCEPLAIN]+`(?:${l[c.PRERELEASE]})?(?:${l[c.BUILD]})?(?:$|[^\\d])`),h("COERCERTL",l[c.COERCE],!0),h("COERCERTLFULL",l[c.COERCEFULL],!0),h("LONETILDE","(?:~>?)"),h("TILDETRIM",`(\\s*)${l[c.LONETILDE]}\\s+`,!0),e.tildeTrimReplace="$1~",h("TILDE",`^${l[c.LONETILDE]}${l[c.XRANGEPLAIN]}$`),h("TILDELOOSE",`^${l[c.LONETILDE]}${l[c.XRANGEPLAINLOOSE]}$`),h("LONECARET","(?:\\^)"),h("CARETTRIM",`(\\s*)${l[c.LONECARET]}\\s+`,!0),e.caretTrimReplace="$1^",h("CARET",`^${l[c.LONECARET]}${l[c.XRANGEPLAIN]}$`),h("CARETLOOSE",`^${l[c.LONECARET]}${l[c.XRANGEPLAINLOOSE]}$`),h("COMPARATORLOOSE",`^${l[c.GTLT]}\\s*(${l[c.LOOSEPLAIN]})$|^$`),h("COMPARATOR",`^${l[c.GTLT]}\\s*(${l[c.FULLPLAIN]})$|^$`),h("COMPARATORTRIM",`(\\s*)${l[c.GTLT]}\\s*(${l[c.LOOSEPLAIN]}|${l[c.XRANGEPLAIN]})`,!0),e.comparatorTrimReplace="$1$2$3",h("HYPHENRANGE",`^\\s*(${l[c.XRANGEPLAIN]})\\s+-\\s+(${l[c.XRANGEPLAIN]})\\s*$`),h("HYPHENRANGELOOSE",`^\\s*(${l[c.XRANGEPLAINLOOSE]})\\s+-\\s+(${l[c.XRANGEPLAINLOOSE]})\\s*$`),h("STAR","(<|>)?=?\\s*\\*"),h("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),h("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")}(ct,ct.exports);var dt=ct.exports;Object.freeze({loose:!0}),Object.freeze({});const ut=/^[0-9]+$/,pt=(t,e)=>{const i=ut.test(t),n=ut.test(e);return i&&n&&(t=+t,e=+e),t===e?0:i&&!n?-1:n&&!i?1:t<e?-1:1};var ht={compareIdentifiers:pt,rcompareIdentifiers:(t,e)=>pt(e,t)};const{MAX_LENGTH:ft,MAX_SAFE_INTEGER:mt}=lt,{safeRe:vt,t:At}=dt,{compareIdentifiers:Et}=ht;p.m}},r={};function o(t){var e=r[t];if(void 0!==e)return e.exports;var i=r[t]={id:t,loaded:!1,exports:{}};return s[t].call(i.exports,i,i.exports,o),i.loaded=!0,i.exports}o.m=s,e=[],o.O=(t,i,n,s)=>{if(!i){var r=1/0;for(d=0;d<e.length;d++){i=e[d][0],n=e[d][1],s=e[d][2];for(var a=!0,l=0;l<i.length;l++)(!1&s||r>=s)&&Object.keys(o.O).every((t=>o.O[t](i[l])))?i.splice(l--,1):(a=!1,s<r&&(r=s));if(a){e.splice(d--,1);var c=n();void 0!==c&&(t=c)}}return t}s=s||0;for(var d=e.length;d>0&&e[d-1][2]>s;d--)e[d]=e[d-1];e[d]=[i,n,s]},o.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return o.d(e,{a:e}),e},o.d=(t,e)=>{for(var i in e)o.o(e,i)&&!o.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},o.f={},o.e=t=>Promise.all(Object.keys(o.f).reduce(((e,i)=>(o.f[i](t,e),e)),[])),o.u=t=>t+"-"+t+".js?v="+{4254:"5c2324570f66dff0c8a1",9480:"2fb23485ae3a8860e96b"}[t],o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),o.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),i={},n="nextcloud:",o.l=(t,e,s,r)=>{if(i[t])i[t].push(e);else{var a,l;if(void 0!==s)for(var c=document.getElementsByTagName("script"),d=0;d<c.length;d++){var u=c[d];if(u.getAttribute("src")==t||u.getAttribute("data-webpack")==n+s){a=u;break}}a||(l=!0,(a=document.createElement("script")).charset="utf-8",a.timeout=120,o.nc&&a.setAttribute("nonce",o.nc),a.setAttribute("data-webpack",n+s),a.src=t),i[t]=[e];var p=(e,n)=>{a.onerror=a.onload=null,clearTimeout(h);var s=i[t];if(delete i[t],a.parentNode&&a.parentNode.removeChild(a),s&&s.forEach((t=>t(n))),e)return e(n)},h=setTimeout(p.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=p.bind(null,a.onerror),a.onload=p.bind(null,a.onload),l&&document.head.appendChild(a)}},o.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},o.nmd=t=>(t.paths=[],t.children||(t.children=[]),t),o.j=2250,(()=>{var t;o.g.importScripts&&(t=o.g.location+"");var e=o.g.document;if(!t&&e&&(e.currentScript&&(t=e.currentScript.src),!t)){var i=e.getElementsByTagName("script");if(i.length)for(var n=i.length-1;n>-1&&(!t||!/^http(s?):/.test(t));)t=i[n--].src}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),o.p=t})(),(()=>{o.b=document.baseURI||self.location.href;var t={2250:0};o.f.j=(e,i)=>{var n=o.o(t,e)?t[e]:void 0;if(0!==n)if(n)i.push(n[2]);else{var s=new Promise(((i,s)=>n=t[e]=[i,s]));i.push(n[2]=s);var r=o.p+o.u(e),a=new Error;o.l(r,(i=>{if(o.o(t,e)&&(0!==(n=t[e])&&(t[e]=void 0),n)){var s=i&&("load"===i.type?"missing":i.type),r=i&&i.target&&i.target.src;a.message="Loading chunk "+e+" failed.\n("+s+": "+r+")",a.name="ChunkLoadError",a.type=s,a.request=r,n[1](a)}}),"chunk-"+e,e)}},o.O.j=e=>0===t[e];var e=(e,i)=>{var n,s,r=i[0],a=i[1],l=i[2],c=0;if(r.some((e=>0!==t[e]))){for(n in a)o.o(a,n)&&(o.m[n]=a[n]);if(l)var d=l(o)}for(e&&e(i);c<r.length;c++)s=r[c],o.o(t,s)&&t[s]&&t[s][0](),t[s]=0;return o.O(d)},i=self.webpackChunknextcloud=self.webpackChunknextcloud||[];i.forEach(e.bind(null,0)),i.push=e.bind(null,i.push.bind(i))})(),o.nc=void 0;var a=o.O(void 0,[4208],(()=>o(21678)));a=o.O(a)})();
  2. //# sourceMappingURL=files_versions-files_versions.js.map?v=2f94dea54acdc182d490