From: Richard Steinmetz Date: Wed, 9 Nov 2022 21:49:25 +0000 (+0100) Subject: Fix top margin in empty versions list X-Git-Tag: v26.0.0beta1~443^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=e122a50920f6c57f7ec28bef52cfc81b5e70ce08;p=nextcloud-server.git Fix top margin in empty versions list Signed-off-by: Richard Steinmetz --- diff --git a/apps/files_versions/src/css/versions.css b/apps/files_versions/src/css/versions.css index fb8877f7f3f..8a32b143f03 100644 --- a/apps/files_versions/src/css/versions.css +++ b/apps/files_versions/src/css/versions.css @@ -68,3 +68,7 @@ float: right; margin-right: -10px; } + +.versionsTabView .emptycontent { + margin-top: 50px !important; +} diff --git a/dist/files_versions-files_versions.js b/dist/files_versions-files_versions.js index 1049d123732..379dc000a91 100644 --- a/dist/files_versions-files_versions.js +++ b/dist/files_versions-files_versions.js @@ -1,3 +1,3 @@ /*! For license information please see files_versions-files_versions.js.LICENSE.txt */ -!function(){var e,i={22420:function(e,i,o){"use strict";o(29088),o(47673);var l=o(94702),s=o.n(l),r=o(97834),a=o.n(r);!function(){if(OCA.Files.DetailTabView){var e=OCA.Files.DetailTabView.extend({id:"versionsTabView",className:"tab versionsTabView",_template:null,$versionsContainer:null,events:{"click .revertVersion":"_onClickRevertVersion"},initialize:function(){OCA.Files.DetailTabView.prototype.initialize.apply(this,arguments),this.collection=new OCA.Versions.VersionCollection,this.collection.on("request",this._onRequest,this),this.collection.on("sync",this._onEndRequest,this),this.collection.on("update",this._onUpdate,this),this.collection.on("error",this._onError,this),this.collection.on("add",this._onAddModel,this)},getLabel:function(){return t("files_versions","Versions")},getIcon:function(){return"icon-history"},nextPage:function(){this._loading||this.collection.getFileInfo()&&this.collection.getFileInfo().isDirectory()||this.collection.fetch()},_onClickRevertVersion:function(e){var n=this,i=$(e.target),o=this.collection.getFileInfo();i.is("li")||(i=i.closest("li")),e.preventDefault();var l=i.attr("data-revision"),s=this.collection.get(l);s.revert({success:function(){n.$versionsContainer.empty(),n.collection.setFileInfo(o),n.collection.reset([],{silent:!0}),n.collection.fetch(),n.$el.find(".versions").removeClass("hidden"),o.trigger("busy",o,!1),o.set({size:s.get("size"),mtime:1e3*s.get("timestamp"),etag:s.get("id")+s.get("timestamp")})},error:function(){o.trigger("busy",o,!1),n.$el.find(".versions").removeClass("hidden"),n._toggleLoading(!1),OC.Notification.show(t("files_version","Failed to revert {file} to revision {timestamp}.",{file:s.getFullPath(),timestamp:OC.Util.formatDate(1e3*s.get("timestamp"))}),{type:"error"})}}),this._toggleLoading(!0),o.trigger("busy",o,!0)},_toggleLoading:function(e){this._loading=e,this.$el.find(".loading").toggleClass("hidden",!e)},_onRequest:function(){this._toggleLoading(!0)},_onEndRequest:function(){this._toggleLoading(!1),this.$el.find(".empty").toggleClass("hidden",!!this.collection.length)},_onAddModel:function(e){var n=$(this.itemTemplate(this._formatItem(e)));this.$versionsContainer.append(n),n.find(".has-tooltip").tooltip()},template:function(e){return a()(e)},itemTemplate:function(e){return s()(e)},setFileInfo:function(e){e?(this.render(),this.collection.setFileInfo(e),this.collection.reset([],{silent:!0}),this.nextPage()):(this.render(),this.collection.reset())},_formatItem:function(e){var i=1e3*e.get("timestamp"),o=e.has("size")?e.get("size"):0,l=OC.MimeType.getIconUrl(e.get("mimetype")),s=new Image;return s.onload=function(){$("li[data-revision="+e.get("id")+"] .preview").attr("src",e.getPreviewUrl())},s.src=e.getPreviewUrl(),_.extend({versionId:e.get("id"),formattedTimestamp:OC.Util.formatDate(i),relativeTimestamp:OC.Util.relativeModifiedDate(i),millisecondsTimestamp:i,humanReadableSize:OC.Util.humanFileSize(o,!0),altSize:n("files","%n byte","%n bytes",o),hasDetails:e.has("size"),downloadUrl:e.getDownloadUrl(),downloadIconUrl:OC.imagePath("core","actions/download"),downloadName:e.get("name"),revertIconUrl:OC.imagePath("core","actions/history"),previewUrl:l,revertLabel:t("files_versions","Restore"),canRevert:0!=(this.collection.getFileInfo().get("permissions")&OC.PERMISSION_UPDATE)},e.attributes)},render:function(){this.$el.html(this.template({emptyResultLabel:t("files_versions","No other versions available")})),this.$el.find(".has-tooltip").tooltip(),this.$versionsContainer=this.$el.find("ul.versions"),this.delegateEvents()},canDisplay:function(e){return!!e&&!e.isDirectory()}});OCA.Versions=OCA.Versions||{},OCA.Versions.VersionsTabView=e}}(),o(29020);var c=o(93379),u=o.n(c),d=o(7795),p=o.n(d),m=o(90569),v=o.n(m),h=o(3565),f=o.n(h),A=o(19216),g=o.n(A),C=o(44589),b=o.n(C),w=o(42028),y={};y.styleTagTransform=b(),y.setAttributes=f(),y.insert=v().bind(null,"head"),y.domAPI=p(),y.insertStyleElement=g(),u()(w.Z,y),w.Z&&w.Z.locals&&w.Z.locals,window.OCA.Versions=OCA.Versions},29020:function(){OCA.Versions=OCA.Versions||{},OCA.Versions.Util={attach:function(e){"trashbin"!==e.id&&"files.public"!==e.id&&e.registerTabView(new OCA.Versions.VersionsTabView("versionsTabView",{order:-10}))}},OC.Plugins.register("OCA.Files.FileList",OCA.Versions.Util)},47673:function(){var e;e=OC.Backbone.Collection.extend({model:OCA.Versions.VersionModel,sync:OC.Backbone.davSync,_fileInfo:null,_currentUser:null,_client:null,setFileInfo:function(e){this._fileInfo=e},getFileInfo:function(){return this._fileInfo},setCurrentUser:function(e){this._currentUser=e},getCurrentUser:function(){return this._currentUser||OC.getCurrentUser().uid},setClient:function(e){this._client=e},getClient:function(){return this._client||new OC.Files.Client({host:OC.getHost(),root:OC.linkToRemoteBase("dav")+"/versions/"+this.getCurrentUser(),useHTTPS:"https"===OC.getProtocol()})},url:function(){return OC.linkToRemoteBase("dav")+"/versions/"+this.getCurrentUser()+"/versions/"+this._fileInfo.get("id")},parse:function(e){var n=this._fileInfo.getFullPath(),t=this._fileInfo.get("id"),i=this._fileInfo.get("name"),o=this.getCurrentUser(),l=this.getClient();return _.map(e,(function(e){return e.fullPath=n,e.fileId=t,e.name=i,e.timestamp=parseInt(moment(new Date(e.timestamp)).format("X"),10),e.id=OC.basename(e.href),e.size=parseInt(e.size,10),e.user=o,e.client=l,e}))}}),OCA.Versions=OCA.Versions||{},OCA.Versions.VersionCollection=e},29088:function(){var e;e=OC.Backbone.Model.extend({sync:OC.Backbone.davSync,davProperties:{size:"{DAV:}getcontentlength",mimetype:"{DAV:}getcontenttype",timestamp:"{DAV:}getlastmodified"},revert:function(e){e=e?_.clone(e):{};var n=this;return this.get("client").move("/versions/"+this.get("fileId")+"/"+this.get("id"),"/restore/target",!0).done((function(){e.success&&e.success.call(e.context,n,{},e),n.trigger("revert",n,e)})).fail((function(){e.error&&e.error.call(e.context,n,{},e),n.trigger("error",n,{},e)}))},getFullPath:function(){return this.get("fullPath")},getPreviewUrl:function(){var e=OC.generateUrl("/apps/files_versions/preview"),n={file:this.get("fullPath"),version:this.get("id")};return e+"?"+OC.buildQueryString(n)},getDownloadUrl:function(){return OC.linkToRemoteBase("dav")+"/versions/"+this.get("user")+"/versions/"+this.get("fileId")+"/"+this.get("id")}}),OCA.Versions=OCA.Versions||{},OCA.Versions.VersionModel=e},42028:function(e,n,t){"use strict";var i=t(87537),o=t.n(i),l=t(23645),s=t.n(l)()(o());s.push([e.id,".versionsTabView .clear-float {\n\tclear: both;\n}\n\n.versionsTabView li {\n\twidth: 100%;\n\tcursor: default;\n\theight: 56px;\n\tfloat: left;\n\tborder-bottom: 1px solid rgba(100,100,100,.1);\n}\n.versionsTabView li:last-child {\n\tborder-bottom: none;\n}\n\n.versionsTabView a,\n.versionsTabView div > span {\n\tvertical-align: middle;\n\topacity: .5;\n}\n\n.versionsTabView li a{\n\tpadding: 15px 10px 11px;\n}\n\n.versionsTabView a:hover,\n.versionsTabView a:focus {\n\topacity: 1;\n}\n\n.versionsTabView .preview-container {\n\tdisplay: inline-block;\n vertical-align: top;\n}\n\n.versionsTabView .version-container img, .revertVersion img {\n\tfilter: var(--background-invert-if-dark);\n}\n\n.versionsTabView img {\n\tcursor: pointer;\n\tpadding-right: 4px;\n}\n\n.versionsTabView img.preview {\n\tcursor: default;\n}\n\n.versionsTabView .version-container {\n\tdisplay: inline-block;\n}\n\n.versionsTabView .versiondate {\n\tmin-width: 100px;\n\tvertical-align: super;\n}\n\n.versionsTabView .version-details {\n\ttext-align: left;\n}\n\n.versionsTabView .version-details > span {\n\tpadding: 0 10px;\n}\n\n.versionsTabView .revertVersion {\n\tcursor: pointer;\n\tfloat: right;\n\tmargin-right: -10px;\n}\n","",{version:3,sources:["webpack://./apps/files_versions/src/css/versions.css"],names:[],mappings:"AAAA;CACC,WAAW;AACZ;;AAEA;CACC,WAAW;CACX,eAAe;CACf,YAAY;CACZ,WAAW;CACX,6CAA6C;AAC9C;AACA;CACC,mBAAmB;AACpB;;AAEA;;CAEC,sBAAsB;CACtB,WAAW;AACZ;;AAEA;CACC,uBAAuB;AACxB;;AAEA;;CAEC,UAAU;AACX;;AAEA;CACC,qBAAqB;EACpB,mBAAmB;AACrB;;AAEA;CACC,wCAAwC;AACzC;;AAEA;CACC,eAAe;CACf,kBAAkB;AACnB;;AAEA;CACC,eAAe;AAChB;;AAEA;CACC,qBAAqB;AACtB;;AAEA;CACC,gBAAgB;CAChB,qBAAqB;AACtB;;AAEA;CACC,gBAAgB;AACjB;;AAEA;CACC,eAAe;AAChB;;AAEA;CACC,eAAe;CACf,YAAY;CACZ,mBAAmB;AACpB",sourcesContent:[".versionsTabView .clear-float {\n\tclear: both;\n}\n\n.versionsTabView li {\n\twidth: 100%;\n\tcursor: default;\n\theight: 56px;\n\tfloat: left;\n\tborder-bottom: 1px solid rgba(100,100,100,.1);\n}\n.versionsTabView li:last-child {\n\tborder-bottom: none;\n}\n\n.versionsTabView a,\n.versionsTabView div > span {\n\tvertical-align: middle;\n\topacity: .5;\n}\n\n.versionsTabView li a{\n\tpadding: 15px 10px 11px;\n}\n\n.versionsTabView a:hover,\n.versionsTabView a:focus {\n\topacity: 1;\n}\n\n.versionsTabView .preview-container {\n\tdisplay: inline-block;\n vertical-align: top;\n}\n\n.versionsTabView .version-container img, .revertVersion img {\n\tfilter: var(--background-invert-if-dark);\n}\n\n.versionsTabView img {\n\tcursor: pointer;\n\tpadding-right: 4px;\n}\n\n.versionsTabView img.preview {\n\tcursor: default;\n}\n\n.versionsTabView .version-container {\n\tdisplay: inline-block;\n}\n\n.versionsTabView .versiondate {\n\tmin-width: 100px;\n\tvertical-align: super;\n}\n\n.versionsTabView .version-details {\n\ttext-align: left;\n}\n\n.versionsTabView .version-details > span {\n\tpadding: 0 10px;\n}\n\n.versionsTabView .revertVersion {\n\tcursor: pointer;\n\tfloat: right;\n\tmargin-right: -10px;\n}\n"],sourceRoot:""}]),n.Z=s},94702:function(e,n,t){var i=t(40202);e.exports=(i.default||i).template({1:function(e,n,t,i,o){var l,s=null!=n?n:e.nullContext||{},r=e.hooks.helperMissing,a="function",c=e.escapeExpression,u=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return'\t\t\t\t
\n\t\t\t\t\t'+c(typeof(l=null!=(l=u(t,"humanReadableSize")||(null!=n?u(n,"humanReadableSize"):n))?l:r)===a?l.call(s,{name:"humanReadableSize",hash:{},data:o,loc:{start:{line:14,column:56},end:{line:14,column:77}}}):l)+"\n\t\t\t\t
\n"},3:function(e,n,t,i,o){var l,s=null!=n?n:e.nullContext||{},r=e.hooks.helperMissing,a="function",c=e.escapeExpression,u=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return'\t\t\t\n'},compiler:[8,">= 4.3.0"],main:function(e,n,t,i,o){var l,s,r,a=null!=n?n:e.nullContext||{},c=e.hooks.helperMissing,u="function",d=e.escapeExpression,p=e.hooks.blockHelperMissing,m=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]},v='
  • \n\t
    \n\t\t
    \n\t\t\t\n\t\t
    \n\t\t
    \n\t\t\t\n";return s=null!=(s=m(t,"hasDetails")||(null!=n?m(n,"hasDetails"):n))?s:c,r={name:"hasDetails",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o,loc:{start:{line:12,column:3},end:{line:16,column:18}}},l=typeof s===u?s.call(a,r):s,m(t,"hasDetails")||(l=p.call(n,l,r)),null!=l&&(v+=l),v+="\t\t
    \n",s=null!=(s=m(t,"canRevert")||(null!=n?m(n,"canRevert"):n))?s:c,r={name:"canRevert",hash:{},fn:e.program(3,o,0),inverse:e.noop,data:o,loc:{start:{line:18,column:2},end:{line:20,column:16}}},l=typeof s===u?s.call(a,r):s,m(t,"canRevert")||(l=p.call(n,l,r)),null!=l&&(v+=l),v+"\t
    \n
  • \n"},useData:!0})},97834:function(e,n,t){var i=t(40202);e.exports=(i.default||i).template({compiler:[8,">= 4.3.0"],main:function(e,n,t,i,o){var l,s=null!=n?n:e.nullContext||{},r=e.hooks.helperMissing,a="function",c=e.escapeExpression,u=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return'\n
    \n\n\n\n'},useData:!0})}},o={};function l(e){var n=o[e];if(void 0!==n)return n.exports;var t=o[e]={id:e,loaded:!1,exports:{}};return i[e].call(t.exports,t,t.exports,l),t.loaded=!0,t.exports}l.m=i,l.amdD=function(){throw new Error("define cannot be used indirect")},l.amdO={},e=[],l.O=function(n,t,i,o){if(!t){var s=1/0;for(u=0;u=o)&&Object.keys(l.O).every((function(e){return l.O[e](t[a])}))?t.splice(a--,1):(r=!1,o0&&e[u-1][2]>o;u--)e[u]=e[u-1];e[u]=[t,i,o]},l.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return l.d(n,{a:n}),n},l.d=function(e,n){for(var t in n)l.o(n,t)&&!l.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:n[t]})},l.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),l.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},l.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},l.nmd=function(e){return e.paths=[],e.children||(e.children=[]),e},l.j=1358,function(){l.b=document.baseURI||self.location.href;var e={1358:0};l.O.j=function(n){return 0===e[n]};var n=function(n,t){var i,o,s=t[0],r=t[1],a=t[2],c=0;if(s.some((function(n){return 0!==e[n]}))){for(i in r)l.o(r,i)&&(l.m[i]=r[i]);if(a)var u=a(l)}for(n&&n(t);c span {\n\tvertical-align: middle;\n\topacity: .5;\n}\n\n.versionsTabView li a{\n\tpadding: 15px 10px 11px;\n}\n\n.versionsTabView a:hover,\n.versionsTabView a:focus {\n\topacity: 1;\n}\n\n.versionsTabView .preview-container {\n\tdisplay: inline-block;\n vertical-align: top;\n}\n\n.versionsTabView .version-container img, .revertVersion img {\n\tfilter: var(--background-invert-if-dark);\n}\n\n.versionsTabView img {\n\tcursor: pointer;\n\tpadding-right: 4px;\n}\n\n.versionsTabView img.preview {\n\tcursor: default;\n}\n\n.versionsTabView .version-container {\n\tdisplay: inline-block;\n}\n\n.versionsTabView .versiondate {\n\tmin-width: 100px;\n\tvertical-align: super;\n}\n\n.versionsTabView .version-details {\n\ttext-align: left;\n}\n\n.versionsTabView .version-details > span {\n\tpadding: 0 10px;\n}\n\n.versionsTabView .revertVersion {\n\tcursor: pointer;\n\tfloat: right;\n\tmargin-right: -10px;\n}\n\n.versionsTabView .emptycontent {\n\tmargin-top: 50px !important;\n}\n","",{version:3,sources:["webpack://./apps/files_versions/src/css/versions.css"],names:[],mappings:"AAAA;CACC,WAAW;AACZ;;AAEA;CACC,WAAW;CACX,eAAe;CACf,YAAY;CACZ,WAAW;CACX,6CAA6C;AAC9C;AACA;CACC,mBAAmB;AACpB;;AAEA;;CAEC,sBAAsB;CACtB,WAAW;AACZ;;AAEA;CACC,uBAAuB;AACxB;;AAEA;;CAEC,UAAU;AACX;;AAEA;CACC,qBAAqB;EACpB,mBAAmB;AACrB;;AAEA;CACC,wCAAwC;AACzC;;AAEA;CACC,eAAe;CACf,kBAAkB;AACnB;;AAEA;CACC,eAAe;AAChB;;AAEA;CACC,qBAAqB;AACtB;;AAEA;CACC,gBAAgB;CAChB,qBAAqB;AACtB;;AAEA;CACC,gBAAgB;AACjB;;AAEA;CACC,eAAe;AAChB;;AAEA;CACC,eAAe;CACf,YAAY;CACZ,mBAAmB;AACpB;;AAEA;CACC,2BAA2B;AAC5B",sourcesContent:[".versionsTabView .clear-float {\n\tclear: both;\n}\n\n.versionsTabView li {\n\twidth: 100%;\n\tcursor: default;\n\theight: 56px;\n\tfloat: left;\n\tborder-bottom: 1px solid rgba(100,100,100,.1);\n}\n.versionsTabView li:last-child {\n\tborder-bottom: none;\n}\n\n.versionsTabView a,\n.versionsTabView div > span {\n\tvertical-align: middle;\n\topacity: .5;\n}\n\n.versionsTabView li a{\n\tpadding: 15px 10px 11px;\n}\n\n.versionsTabView a:hover,\n.versionsTabView a:focus {\n\topacity: 1;\n}\n\n.versionsTabView .preview-container {\n\tdisplay: inline-block;\n vertical-align: top;\n}\n\n.versionsTabView .version-container img, .revertVersion img {\n\tfilter: var(--background-invert-if-dark);\n}\n\n.versionsTabView img {\n\tcursor: pointer;\n\tpadding-right: 4px;\n}\n\n.versionsTabView img.preview {\n\tcursor: default;\n}\n\n.versionsTabView .version-container {\n\tdisplay: inline-block;\n}\n\n.versionsTabView .versiondate {\n\tmin-width: 100px;\n\tvertical-align: super;\n}\n\n.versionsTabView .version-details {\n\ttext-align: left;\n}\n\n.versionsTabView .version-details > span {\n\tpadding: 0 10px;\n}\n\n.versionsTabView .revertVersion {\n\tcursor: pointer;\n\tfloat: right;\n\tmargin-right: -10px;\n}\n\n.versionsTabView .emptycontent {\n\tmargin-top: 50px !important;\n}\n"],sourceRoot:""}]),n.Z=r},94702:function(e,n,t){var i=t(40202);e.exports=(i.default||i).template({1:function(e,n,t,i,o){var l,r=null!=n?n:e.nullContext||{},s=e.hooks.helperMissing,a="function",c=e.escapeExpression,u=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return'\t\t\t\t
    \n\t\t\t\t\t'+c(typeof(l=null!=(l=u(t,"humanReadableSize")||(null!=n?u(n,"humanReadableSize"):n))?l:s)===a?l.call(r,{name:"humanReadableSize",hash:{},data:o,loc:{start:{line:14,column:56},end:{line:14,column:77}}}):l)+"\n\t\t\t\t
    \n"},3:function(e,n,t,i,o){var l,r=null!=n?n:e.nullContext||{},s=e.hooks.helperMissing,a="function",c=e.escapeExpression,u=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return'\t\t\t\n'},compiler:[8,">= 4.3.0"],main:function(e,n,t,i,o){var l,r,s,a=null!=n?n:e.nullContext||{},c=e.hooks.helperMissing,u="function",d=e.escapeExpression,p=e.hooks.blockHelperMissing,m=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]},v='
  • \n\t
    \n\t\t
    \n\t\t\t\n\t\t
    \n\t\t
    \n\t\t\t\n";return r=null!=(r=m(t,"hasDetails")||(null!=n?m(n,"hasDetails"):n))?r:c,s={name:"hasDetails",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o,loc:{start:{line:12,column:3},end:{line:16,column:18}}},l=typeof r===u?r.call(a,s):r,m(t,"hasDetails")||(l=p.call(n,l,s)),null!=l&&(v+=l),v+="\t\t
    \n",r=null!=(r=m(t,"canRevert")||(null!=n?m(n,"canRevert"):n))?r:c,s={name:"canRevert",hash:{},fn:e.program(3,o,0),inverse:e.noop,data:o,loc:{start:{line:18,column:2},end:{line:20,column:16}}},l=typeof r===u?r.call(a,s):r,m(t,"canRevert")||(l=p.call(n,l,s)),null!=l&&(v+=l),v+"\t
    \n
  • \n"},useData:!0})},97834:function(e,n,t){var i=t(40202);e.exports=(i.default||i).template({compiler:[8,">= 4.3.0"],main:function(e,n,t,i,o){var l,r=null!=n?n:e.nullContext||{},s=e.hooks.helperMissing,a="function",c=e.escapeExpression,u=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return'
      \n
      \n\n\n\n'},useData:!0})}},o={};function l(e){var n=o[e];if(void 0!==n)return n.exports;var t=o[e]={id:e,loaded:!1,exports:{}};return i[e].call(t.exports,t,t.exports,l),t.loaded=!0,t.exports}l.m=i,l.amdD=function(){throw new Error("define cannot be used indirect")},l.amdO={},e=[],l.O=function(n,t,i,o){if(!t){var r=1/0;for(u=0;u=o)&&Object.keys(l.O).every((function(e){return l.O[e](t[a])}))?t.splice(a--,1):(s=!1,o0&&e[u-1][2]>o;u--)e[u]=e[u-1];e[u]=[t,i,o]},l.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return l.d(n,{a:n}),n},l.d=function(e,n){for(var t in n)l.o(n,t)&&!l.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:n[t]})},l.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),l.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},l.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},l.nmd=function(e){return e.paths=[],e.children||(e.children=[]),e},l.j=1358,function(){l.b=document.baseURI||self.location.href;var e={1358:0};l.O.j=function(n){return 0===e[n]};var n=function(n,t){var i,o,r=t[0],s=t[1],a=t[2],c=0;if(r.some((function(n){return 0!==e[n]}))){for(i in s)l.o(s,i)&&(l.m[i]=s[i]);if(a)var u=a(l)}for(n&&n(t);c 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 (c) 2015\n *\n * @author Jan-Christoph Borchardt \n * @author John Molakvoæ \n * @author Julius Härtl \n * @author Michael Jobst \n * @author noveens \n * @author Robin Appelman \n * @author Vincent Petry \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 .\n *\n */\n\nimport ItemTemplate from './templates/item.handlebars'\nimport Template from './templates/template.handlebars';\n\n(function() {\n\tif (!OCA.Files.DetailTabView) {\n\t\t// Only register the versions tab within the files app\n\t\treturn\n\t}\n\t/**\n\t * @memberof OCA.Versions\n\t */\n\tconst VersionsTabView = OCA.Files.DetailTabView.extend(/** @lends OCA.Versions.VersionsTabView.prototype */{\n\t\tid: 'versionsTabView',\n\t\tclassName: 'tab versionsTabView',\n\n\t\t_template: null,\n\n\t\t$versionsContainer: null,\n\n\t\tevents: {\n\t\t\t'click .revertVersion': '_onClickRevertVersion',\n\t\t},\n\n\t\tinitialize() {\n\t\t\tOCA.Files.DetailTabView.prototype.initialize.apply(this, arguments)\n\t\t\tthis.collection = new OCA.Versions.VersionCollection()\n\t\t\tthis.collection.on('request', this._onRequest, this)\n\t\t\tthis.collection.on('sync', this._onEndRequest, this)\n\t\t\tthis.collection.on('update', this._onUpdate, this)\n\t\t\tthis.collection.on('error', this._onError, this)\n\t\t\tthis.collection.on('add', this._onAddModel, this)\n\t\t},\n\n\t\tgetLabel() {\n\t\t\treturn t('files_versions', 'Versions')\n\t\t},\n\n\t\tgetIcon() {\n\t\t\treturn 'icon-history'\n\t\t},\n\n\t\tnextPage() {\n\t\t\tif (this._loading) {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tif (this.collection.getFileInfo() && this.collection.getFileInfo().isDirectory()) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tthis.collection.fetch()\n\t\t},\n\n\t\t_onClickRevertVersion(ev) {\n\t\t\tconst self = this\n\t\t\tlet $target = $(ev.target)\n\t\t\tconst fileInfoModel = this.collection.getFileInfo()\n\t\t\tif (!$target.is('li')) {\n\t\t\t\t$target = $target.closest('li')\n\t\t\t}\n\n\t\t\tev.preventDefault()\n\t\t\tconst revision = $target.attr('data-revision')\n\n\t\t\tconst versionModel = this.collection.get(revision)\n\t\t\tversionModel.revert({\n\t\t\t\tsuccess() {\n\t\t\t\t\t// reset and re-fetch the updated collection\n\t\t\t\t\tself.$versionsContainer.empty()\n\t\t\t\t\tself.collection.setFileInfo(fileInfoModel)\n\t\t\t\t\tself.collection.reset([], { silent: true })\n\t\t\t\t\tself.collection.fetch()\n\n\t\t\t\t\tself.$el.find('.versions').removeClass('hidden')\n\n\t\t\t\t\t// update original model\n\t\t\t\t\tfileInfoModel.trigger('busy', fileInfoModel, false)\n\t\t\t\t\tfileInfoModel.set({\n\t\t\t\t\t\tsize: versionModel.get('size'),\n\t\t\t\t\t\tmtime: versionModel.get('timestamp') * 1000,\n\t\t\t\t\t\t// temp dummy, until we can do a PROPFIND\n\t\t\t\t\t\tetag: versionModel.get('id') + versionModel.get('timestamp'),\n\t\t\t\t\t})\n\t\t\t\t},\n\n\t\t\t\terror() {\n\t\t\t\t\tfileInfoModel.trigger('busy', fileInfoModel, false)\n\t\t\t\t\tself.$el.find('.versions').removeClass('hidden')\n\t\t\t\t\tself._toggleLoading(false)\n\t\t\t\t\tOC.Notification.show(t('files_version', 'Failed to revert {file} to revision {timestamp}.',\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tfile: versionModel.getFullPath(),\n\t\t\t\t\t\t\ttimestamp: OC.Util.formatDate(versionModel.get('timestamp') * 1000),\n\t\t\t\t\t\t}),\n\t\t\t\t\t{\n\t\t\t\t\t\ttype: 'error',\n\t\t\t\t\t}\n\t\t\t\t\t)\n\t\t\t\t},\n\t\t\t})\n\n\t\t\t// spinner\n\t\t\tthis._toggleLoading(true)\n\t\t\tfileInfoModel.trigger('busy', fileInfoModel, true)\n\t\t},\n\n\t\t_toggleLoading(state) {\n\t\t\tthis._loading = state\n\t\t\tthis.$el.find('.loading').toggleClass('hidden', !state)\n\t\t},\n\n\t\t_onRequest() {\n\t\t\tthis._toggleLoading(true)\n\t\t},\n\n\t\t_onEndRequest() {\n\t\t\tthis._toggleLoading(false)\n\t\t\tthis.$el.find('.empty').toggleClass('hidden', !!this.collection.length)\n\t\t},\n\n\t\t_onAddModel(model) {\n\t\t\tconst $el = $(this.itemTemplate(this._formatItem(model)))\n\t\t\tthis.$versionsContainer.append($el)\n\t\t\t$el.find('.has-tooltip').tooltip()\n\t\t},\n\n\t\ttemplate(data) {\n\t\t\treturn Template(data)\n\t\t},\n\n\t\titemTemplate(data) {\n\t\t\treturn ItemTemplate(data)\n\t\t},\n\n\t\tsetFileInfo(fileInfo) {\n\t\t\tif (fileInfo) {\n\t\t\t\tthis.render()\n\t\t\t\tthis.collection.setFileInfo(fileInfo)\n\t\t\t\tthis.collection.reset([], { silent: true })\n\t\t\t\tthis.nextPage()\n\t\t\t} else {\n\t\t\t\tthis.render()\n\t\t\t\tthis.collection.reset()\n\t\t\t}\n\t\t},\n\n\t\t_formatItem(version) {\n\t\t\tconst timestamp = version.get('timestamp') * 1000\n\t\t\tconst size = version.has('size') ? version.get('size') : 0\n\t\t\tconst preview = OC.MimeType.getIconUrl(version.get('mimetype'))\n\t\t\tconst img = new Image()\n\t\t\timg.onload = function() {\n\t\t\t\t$('li[data-revision=' + version.get('id') + '] .preview').attr('src', version.getPreviewUrl())\n\t\t\t}\n\t\t\timg.src = version.getPreviewUrl()\n\n\t\t\treturn _.extend({\n\t\t\t\tversionId: version.get('id'),\n\t\t\t\tformattedTimestamp: OC.Util.formatDate(timestamp),\n\t\t\t\trelativeTimestamp: OC.Util.relativeModifiedDate(timestamp),\n\t\t\t\tmillisecondsTimestamp: timestamp,\n\t\t\t\thumanReadableSize: OC.Util.humanFileSize(size, true),\n\t\t\t\taltSize: n('files', '%n byte', '%n bytes', size),\n\t\t\t\thasDetails: version.has('size'),\n\t\t\t\tdownloadUrl: version.getDownloadUrl(),\n\t\t\t\tdownloadIconUrl: OC.imagePath('core', 'actions/download'),\n\t\t\t\tdownloadName: version.get('name'),\n\t\t\t\trevertIconUrl: OC.imagePath('core', 'actions/history'),\n\t\t\t\tpreviewUrl: preview,\n\t\t\t\trevertLabel: t('files_versions', 'Restore'),\n\t\t\t\tcanRevert: (this.collection.getFileInfo().get('permissions') & OC.PERMISSION_UPDATE) !== 0,\n\t\t\t}, version.attributes)\n\t\t},\n\n\t\t/**\n\t\t * Renders this details view\n\t\t */\n\t\trender() {\n\t\t\tthis.$el.html(this.template({\n\t\t\t\temptyResultLabel: t('files_versions', 'No other versions available'),\n\t\t\t}))\n\t\t\tthis.$el.find('.has-tooltip').tooltip()\n\t\t\tthis.$versionsContainer = this.$el.find('ul.versions')\n\t\t\tthis.delegateEvents()\n\t\t},\n\n\t\t/**\n\t\t * Returns true for files, false for folders.\n\t\t *\n\t\t * @param {FileInfo} fileInfo fileInfo\n\t\t * @return {boolean} true for files, false for folders\n\t\t */\n\t\tcanDisplay(fileInfo) {\n\t\t\tif (!fileInfo) {\n\t\t\t\treturn false\n\t\t\t}\n\t\t\treturn !fileInfo.isDirectory()\n\t\t},\n\t})\n\n\tOCA.Versions = OCA.Versions || {}\n\n\tOCA.Versions.VersionsTabView = VersionsTabView\n})()\n","\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!./versions.css\";\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!./versions.css\";\n export default content && content.locals ? content.locals : undefined;\n","/**\n * @copyright Copyright (c) 2016 Roeland Jago Douma \n *\n * @author Roeland Jago Douma \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 .\n *\n */\n\nimport './versionmodel'\nimport './versioncollection'\nimport './versionstabview'\nimport './filesplugin'\nimport './css/versions.css'\n\nwindow.OCA.Versions = OCA.Versions\n","/**\n * Copyright (c) 2015\n *\n * @author John Molakvoæ \n * @author Vincent Petry \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 .\n *\n */\n\n(function() {\n\tOCA.Versions = OCA.Versions || {}\n\n\t/**\n\t * @namespace\n\t */\n\tOCA.Versions.Util = {\n\t\t/**\n\t\t * Initialize the versions plugin.\n\t\t *\n\t\t * @param {OCA.Files.FileList} fileList file list to be extended\n\t\t */\n\t\tattach(fileList) {\n\t\t\tif (fileList.id === 'trashbin' || fileList.id === 'files.public') {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tfileList.registerTabView(new OCA.Versions.VersionsTabView('versionsTabView', { order: -10 }))\n\t\t},\n\t}\n})()\n\nOC.Plugins.register('OCA.Files.FileList', OCA.Versions.Util)\n","/**\n * Copyright (c) 2015\n *\n * @author John Molakvoæ \n * @author Robin Appelman \n * @author Vincent Petry \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 .\n *\n */\n\n(function() {\n\t/**\n\t * @memberof OCA.Versions\n\t */\n\tconst VersionCollection = OC.Backbone.Collection.extend({\n\t\tmodel: OCA.Versions.VersionModel,\n\t\tsync: OC.Backbone.davSync,\n\n\t\t/**\n\t\t * @member OCA.Files.FileInfoModel\n\t\t */\n\t\t_fileInfo: null,\n\n\t\t_currentUser: null,\n\n\t\t_client: null,\n\n\t\tsetFileInfo(fileInfo) {\n\t\t\tthis._fileInfo = fileInfo\n\t\t},\n\n\t\tgetFileInfo() {\n\t\t\treturn this._fileInfo\n\t\t},\n\n\t\tsetCurrentUser(user) {\n\t\t\tthis._currentUser = user\n\t\t},\n\n\t\tgetCurrentUser() {\n\t\t\treturn this._currentUser || OC.getCurrentUser().uid\n\t\t},\n\n\t\tsetClient(client) {\n\t\t\tthis._client = client\n\t\t},\n\n\t\tgetClient() {\n\t\t\treturn this._client || new OC.Files.Client({\n\t\t\t\thost: OC.getHost(),\n\t\t\t\troot: OC.linkToRemoteBase('dav') + '/versions/' + this.getCurrentUser(),\n\t\t\t\tuseHTTPS: OC.getProtocol() === 'https',\n\t\t\t})\n\t\t},\n\n\t\turl() {\n\t\t\treturn OC.linkToRemoteBase('dav') + '/versions/' + this.getCurrentUser() + '/versions/' + this._fileInfo.get('id')\n\t\t},\n\n\t\tparse(result) {\n\t\t\tconst fullPath = this._fileInfo.getFullPath()\n\t\t\tconst fileId = this._fileInfo.get('id')\n\t\t\tconst name = this._fileInfo.get('name')\n\t\t\tconst user = this.getCurrentUser()\n\t\t\tconst client = this.getClient()\n\t\t\treturn _.map(result, function(version) {\n\t\t\t\tversion.fullPath = fullPath\n\t\t\t\tversion.fileId = fileId\n\t\t\t\tversion.name = name\n\t\t\t\tversion.timestamp = parseInt(moment(new Date(version.timestamp)).format('X'), 10)\n\t\t\t\tversion.id = OC.basename(version.href)\n\t\t\t\tversion.size = parseInt(version.size, 10)\n\t\t\t\tversion.user = user\n\t\t\t\tversion.client = client\n\t\t\t\treturn version\n\t\t\t})\n\t\t},\n\t})\n\n\tOCA.Versions = OCA.Versions || {}\n\n\tOCA.Versions.VersionCollection = VersionCollection\n})()\n","/**\n * Copyright (c) 2015\n *\n * @author John Molakvoæ \n * @author Robin Appelman \n * @author Vincent Petry \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 .\n *\n */\n\n(function() {\n\t/**\n\t * @memberof OCA.Versions\n\t */\n\tconst VersionModel = OC.Backbone.Model.extend({\n\t\tsync: OC.Backbone.davSync,\n\n\t\tdavProperties: {\n\t\t\tsize: '{DAV:}getcontentlength',\n\t\t\tmimetype: '{DAV:}getcontenttype',\n\t\t\ttimestamp: '{DAV:}getlastmodified',\n\t\t},\n\n\t\t/**\n\t\t * Restores the original file to this revision\n\t\t *\n\t\t * @param {object} [options] options\n\t\t * @return {Promise}\n\t\t */\n\t\trevert(options) {\n\t\t\toptions = options ? _.clone(options) : {}\n\t\t\tconst model = this\n\n\t\t\tconst client = this.get('client')\n\n\t\t\treturn client.move('/versions/' + this.get('fileId') + '/' + this.get('id'), '/restore/target', true)\n\t\t\t\t.done(function() {\n\t\t\t\t\tif (options.success) {\n\t\t\t\t\t\toptions.success.call(options.context, model, {}, options)\n\t\t\t\t\t}\n\t\t\t\t\tmodel.trigger('revert', model, options)\n\t\t\t\t})\n\t\t\t\t.fail(function() {\n\t\t\t\t\tif (options.error) {\n\t\t\t\t\t\toptions.error.call(options.context, model, {}, options)\n\t\t\t\t\t}\n\t\t\t\t\tmodel.trigger('error', model, {}, options)\n\t\t\t\t})\n\t\t},\n\n\t\tgetFullPath() {\n\t\t\treturn this.get('fullPath')\n\t\t},\n\n\t\tgetPreviewUrl() {\n\t\t\tconst url = OC.generateUrl('/apps/files_versions/preview')\n\t\t\tconst params = {\n\t\t\t\tfile: this.get('fullPath'),\n\t\t\t\tversion: this.get('id'),\n\t\t\t}\n\t\t\treturn url + '?' + OC.buildQueryString(params)\n\t\t},\n\n\t\tgetDownloadUrl() {\n\t\t\treturn OC.linkToRemoteBase('dav') + '/versions/' + this.get('user') + '/versions/' + this.get('fileId') + '/' + this.get('id')\n\t\t},\n\t})\n\n\tOCA.Versions = OCA.Versions || {}\n\n\tOCA.Versions.VersionModel = VersionModel\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, \".versionsTabView .clear-float {\\n\\tclear: both;\\n}\\n\\n.versionsTabView li {\\n\\twidth: 100%;\\n\\tcursor: default;\\n\\theight: 56px;\\n\\tfloat: left;\\n\\tborder-bottom: 1px solid rgba(100,100,100,.1);\\n}\\n.versionsTabView li:last-child {\\n\\tborder-bottom: none;\\n}\\n\\n.versionsTabView a,\\n.versionsTabView div > span {\\n\\tvertical-align: middle;\\n\\topacity: .5;\\n}\\n\\n.versionsTabView li a{\\n\\tpadding: 15px 10px 11px;\\n}\\n\\n.versionsTabView a:hover,\\n.versionsTabView a:focus {\\n\\topacity: 1;\\n}\\n\\n.versionsTabView .preview-container {\\n\\tdisplay: inline-block;\\n vertical-align: top;\\n}\\n\\n.versionsTabView .version-container img, .revertVersion img {\\n\\tfilter: var(--background-invert-if-dark);\\n}\\n\\n.versionsTabView img {\\n\\tcursor: pointer;\\n\\tpadding-right: 4px;\\n}\\n\\n.versionsTabView img.preview {\\n\\tcursor: default;\\n}\\n\\n.versionsTabView .version-container {\\n\\tdisplay: inline-block;\\n}\\n\\n.versionsTabView .versiondate {\\n\\tmin-width: 100px;\\n\\tvertical-align: super;\\n}\\n\\n.versionsTabView .version-details {\\n\\ttext-align: left;\\n}\\n\\n.versionsTabView .version-details > span {\\n\\tpadding: 0 10px;\\n}\\n\\n.versionsTabView .revertVersion {\\n\\tcursor: pointer;\\n\\tfloat: right;\\n\\tmargin-right: -10px;\\n}\\n\", \"\",{\"version\":3,\"sources\":[\"webpack://./apps/files_versions/src/css/versions.css\"],\"names\":[],\"mappings\":\"AAAA;CACC,WAAW;AACZ;;AAEA;CACC,WAAW;CACX,eAAe;CACf,YAAY;CACZ,WAAW;CACX,6CAA6C;AAC9C;AACA;CACC,mBAAmB;AACpB;;AAEA;;CAEC,sBAAsB;CACtB,WAAW;AACZ;;AAEA;CACC,uBAAuB;AACxB;;AAEA;;CAEC,UAAU;AACX;;AAEA;CACC,qBAAqB;EACpB,mBAAmB;AACrB;;AAEA;CACC,wCAAwC;AACzC;;AAEA;CACC,eAAe;CACf,kBAAkB;AACnB;;AAEA;CACC,eAAe;AAChB;;AAEA;CACC,qBAAqB;AACtB;;AAEA;CACC,gBAAgB;CAChB,qBAAqB;AACtB;;AAEA;CACC,gBAAgB;AACjB;;AAEA;CACC,eAAe;AAChB;;AAEA;CACC,eAAe;CACf,YAAY;CACZ,mBAAmB;AACpB\",\"sourcesContent\":[\".versionsTabView .clear-float {\\n\\tclear: both;\\n}\\n\\n.versionsTabView li {\\n\\twidth: 100%;\\n\\tcursor: default;\\n\\theight: 56px;\\n\\tfloat: left;\\n\\tborder-bottom: 1px solid rgba(100,100,100,.1);\\n}\\n.versionsTabView li:last-child {\\n\\tborder-bottom: none;\\n}\\n\\n.versionsTabView a,\\n.versionsTabView div > span {\\n\\tvertical-align: middle;\\n\\topacity: .5;\\n}\\n\\n.versionsTabView li a{\\n\\tpadding: 15px 10px 11px;\\n}\\n\\n.versionsTabView a:hover,\\n.versionsTabView a:focus {\\n\\topacity: 1;\\n}\\n\\n.versionsTabView .preview-container {\\n\\tdisplay: inline-block;\\n vertical-align: top;\\n}\\n\\n.versionsTabView .version-container img, .revertVersion img {\\n\\tfilter: var(--background-invert-if-dark);\\n}\\n\\n.versionsTabView img {\\n\\tcursor: pointer;\\n\\tpadding-right: 4px;\\n}\\n\\n.versionsTabView img.preview {\\n\\tcursor: default;\\n}\\n\\n.versionsTabView .version-container {\\n\\tdisplay: inline-block;\\n}\\n\\n.versionsTabView .versiondate {\\n\\tmin-width: 100px;\\n\\tvertical-align: super;\\n}\\n\\n.versionsTabView .version-details {\\n\\ttext-align: left;\\n}\\n\\n.versionsTabView .version-details > span {\\n\\tpadding: 0 10px;\\n}\\n\\n.versionsTabView .revertVersion {\\n\\tcursor: pointer;\\n\\tfloat: right;\\n\\tmargin-right: -10px;\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","var Handlebars = require(\"../../../../node_modules/handlebars/runtime.js\");\nfunction __default(obj) { return obj && (obj.__esModule ? obj[\"default\"] : obj); }\nmodule.exports = (Handlebars[\"default\"] || Handlebars).template({\"1\":function(container,depth0,helpers,partials,data) {\n var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.hooks.helperMissing, alias3=\"function\", alias4=container.escapeExpression, lookupProperty = container.lookupProperty || function(parent, propertyName) {\n if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {\n return parent[propertyName];\n }\n return undefined\n };\n\n return \"\t\t\t\t
      \\n\t\t\t\t\t\"\n + alias4(((helper = (helper = lookupProperty(helpers,\"humanReadableSize\") || (depth0 != null ? lookupProperty(depth0,\"humanReadableSize\") : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"humanReadableSize\",\"hash\":{},\"data\":data,\"loc\":{\"start\":{\"line\":14,\"column\":56},\"end\":{\"line\":14,\"column\":77}}}) : helper)))\n + \"\\n\t\t\t\t
      \\n\";\n},\"3\":function(container,depth0,helpers,partials,data) {\n var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.hooks.helperMissing, alias3=\"function\", alias4=container.escapeExpression, lookupProperty = container.lookupProperty || function(parent, propertyName) {\n if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {\n return parent[propertyName];\n }\n return undefined\n };\n\n return \"\t\t\t\\n\";\n},\"compiler\":[8,\">= 4.3.0\"],\"main\":function(container,depth0,helpers,partials,data) {\n var stack1, helper, options, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.hooks.helperMissing, alias3=\"function\", alias4=container.escapeExpression, alias5=container.hooks.blockHelperMissing, lookupProperty = container.lookupProperty || function(parent, propertyName) {\n if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {\n return parent[propertyName];\n }\n return undefined\n }, buffer = \n \"
    • \\n\t
      \\n\t\t
      \\n\t\t\t\\n\t\t
      \\n\t\t
      \\n\t\t\t\\n\";\n stack1 = ((helper = (helper = lookupProperty(helpers,\"hasDetails\") || (depth0 != null ? lookupProperty(depth0,\"hasDetails\") : depth0)) != null ? helper : alias2),(options={\"name\":\"hasDetails\",\"hash\":{},\"fn\":container.program(1, data, 0),\"inverse\":container.noop,\"data\":data,\"loc\":{\"start\":{\"line\":12,\"column\":3},\"end\":{\"line\":16,\"column\":18}}}),(typeof helper === alias3 ? helper.call(alias1,options) : helper));\n if (!lookupProperty(helpers,\"hasDetails\")) { stack1 = alias5.call(depth0,stack1,options)}\n if (stack1 != null) { buffer += stack1; }\n buffer += \"\t\t
      \\n\";\n stack1 = ((helper = (helper = lookupProperty(helpers,\"canRevert\") || (depth0 != null ? lookupProperty(depth0,\"canRevert\") : depth0)) != null ? helper : alias2),(options={\"name\":\"canRevert\",\"hash\":{},\"fn\":container.program(3, data, 0),\"inverse\":container.noop,\"data\":data,\"loc\":{\"start\":{\"line\":18,\"column\":2},\"end\":{\"line\":20,\"column\":16}}}),(typeof helper === alias3 ? helper.call(alias1,options) : helper));\n if (!lookupProperty(helpers,\"canRevert\")) { stack1 = alias5.call(depth0,stack1,options)}\n if (stack1 != null) { buffer += stack1; }\n return buffer + \"\t
      \\n
    • \\n\";\n},\"useData\":true});","var Handlebars = require(\"../../../../node_modules/handlebars/runtime.js\");\nfunction __default(obj) { return obj && (obj.__esModule ? obj[\"default\"] : obj); }\nmodule.exports = (Handlebars[\"default\"] || Handlebars).template({\"compiler\":[8,\">= 4.3.0\"],\"main\":function(container,depth0,helpers,partials,data) {\n var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.hooks.helperMissing, alias3=\"function\", alias4=container.escapeExpression, lookupProperty = container.lookupProperty || function(parent, propertyName) {\n if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {\n return parent[propertyName];\n }\n return undefined\n };\n\n return \"
        \\n
        \\n
        \\n\t
        \\n\t\t
        \\n\t\t

        \"\n + alias4(((helper = (helper = lookupProperty(helpers,\"emptyResultLabel\") || (depth0 != null ? lookupProperty(depth0,\"emptyResultLabel\") : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"emptyResultLabel\",\"hash\":{},\"data\":data,\"loc\":{\"start\":{\"line\":6,\"column\":5},\"end\":{\"line\":6,\"column\":25}}}) : helper)))\n + \"

        \\n\t
        \\n
        \\n\\n
        \\n\";\n},\"useData\":true});","// 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 = 1358;","__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\t1358: 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__(22420); })\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n"],"names":["deferred","OCA","Files","DetailTabView","VersionsTabView","extend","id","className","_template","$versionsContainer","events","initialize","prototype","apply","this","arguments","collection","Versions","VersionCollection","on","_onRequest","_onEndRequest","_onUpdate","_onError","_onAddModel","getLabel","t","getIcon","nextPage","_loading","getFileInfo","isDirectory","fetch","_onClickRevertVersion","ev","self","$target","$","target","fileInfoModel","is","closest","preventDefault","revision","attr","versionModel","get","revert","success","empty","setFileInfo","reset","silent","$el","find","removeClass","trigger","set","size","mtime","etag","error","_toggleLoading","OC","Notification","show","file","getFullPath","timestamp","Util","formatDate","type","state","toggleClass","length","model","itemTemplate","_formatItem","append","tooltip","template","data","Template","ItemTemplate","fileInfo","render","version","has","preview","MimeType","getIconUrl","img","Image","onload","getPreviewUrl","src","_","versionId","formattedTimestamp","relativeTimestamp","relativeModifiedDate","millisecondsTimestamp","humanReadableSize","humanFileSize","altSize","n","hasDetails","downloadUrl","getDownloadUrl","downloadIconUrl","imagePath","downloadName","revertIconUrl","previewUrl","revertLabel","canRevert","PERMISSION_UPDATE","attributes","html","emptyResultLabel","delegateEvents","canDisplay","options","styleTagTransform","setAttributes","insert","domAPI","insertStyleElement","window","attach","fileList","registerTabView","order","Plugins","register","Backbone","Collection","VersionModel","sync","davSync","_fileInfo","_currentUser","_client","setCurrentUser","user","getCurrentUser","uid","setClient","client","getClient","Client","host","getHost","root","linkToRemoteBase","useHTTPS","getProtocol","url","parse","result","fullPath","fileId","name","map","parseInt","moment","Date","format","basename","href","Model","davProperties","mimetype","clone","move","done","call","context","fail","generateUrl","params","buildQueryString","___CSS_LOADER_EXPORT___","push","module","Handlebars","exports","container","depth0","helpers","partials","helper","alias1","nullContext","alias2","hooks","helperMissing","alias3","alias4","escapeExpression","lookupProperty","parent","propertyName","Object","hasOwnProperty","stack1","alias5","blockHelperMissing","buffer","program","noop","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","loaded","__webpack_modules__","m","amdD","Error","amdO","O","chunkIds","fn","priority","notFulfilled","Infinity","i","fulfilled","j","keys","every","key","splice","r","getter","__esModule","d","a","definition","o","defineProperty","enumerable","g","globalThis","Function","e","obj","prop","Symbol","toStringTag","value","nmd","paths","children","b","document","baseURI","location","installedChunks","chunkId","webpackJsonpCallback","parentChunkLoadingFunction","moreModules","runtime","some","chunkLoadingGlobal","forEach","bind","nc","__webpack_exports__"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"files_versions-files_versions.js?v=984b1da8ab17d399e190","mappings":";gBAAIA,uGC+BJ,WACC,GAAKC,IAAIC,MAAMC,cAAf,CAOA,IAAMC,EAAkBH,IAAIC,MAAMC,cAAcE,OAA2D,CAC1GC,GAAI,kBACJC,UAAW,sBAEXC,UAAW,KAEXC,mBAAoB,KAEpBC,OAAQ,CACP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C,EAAuB,SAASC,EAA4BtL,GAC/D,IAKIoI,EAAUgD,EALVtC,EAAW9I,EAAK,GAChBuL,EAAcvL,EAAK,GACnBwL,EAAUxL,EAAK,GAGImJ,EAAI,EAC3B,GAAGL,EAAS2C,MAAK,SAASpQ,GAAM,OAA+B,IAAxB8P,EAAgB9P,EAAW,IAAI,CACrE,IAAI+M,KAAYmD,EACZpD,EAAoB6B,EAAEuB,EAAanD,KACrCD,EAAoBM,EAAEL,GAAYmD,EAAYnD,IAGhD,GAAGoD,EAAS,IAAI1G,EAAS0G,EAAQrD,EAClC,CAEA,IADGmD,GAA4BA,EAA2BtL,GACrDmJ,EAAIL,EAASrJ,OAAQ0J,IACzBiC,EAAUtC,EAASK,GAChBhB,EAAoB6B,EAAEmB,EAAiBC,IAAYD,EAAgBC,IACrED,EAAgBC,GAAS,KAE1BD,EAAgBC,GAAW,EAE5B,OAAOjD,EAAoBU,EAAE/D,EAC9B,EAEI4G,EAAqBxO,KAA4B,sBAAIA,KAA4B,uBAAK,GAC1FwO,EAAmBC,QAAQN,EAAqBO,KAAK,KAAM,IAC3DF,EAAmBpF,KAAO+E,EAAqBO,KAAK,KAAMF,EAAmBpF,KAAKsF,KAAKF,OClDvFvD,EAAoB0D,QAAKvD,ECGzB,IAAIwD,EAAsB3D,EAAoBU,OAAEP,EAAW,CAAC,OAAO,WAAa,OAAOH,EAAoB,MAAQ,IACnH2D,EAAsB3D,EAAoBU,EAAEiD","sources":["webpack:///nextcloud/webpack/runtime/chunk loaded","webpack:///nextcloud/apps/files_versions/src/versionstabview.js","webpack://nextcloud/./apps/files_versions/src/css/versions.css?1aef","webpack:///nextcloud/apps/files_versions/src/files_versions.js","webpack:///nextcloud/apps/files_versions/src/filesplugin.js","webpack:///nextcloud/apps/files_versions/src/versioncollection.js","webpack:///nextcloud/apps/files_versions/src/versionmodel.js","webpack:///nextcloud/apps/files_versions/src/css/versions.css","webpack:///nextcloud/apps/files_versions/src/templates/item.handlebars","webpack:///nextcloud/apps/files_versions/src/templates/template.handlebars","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 (c) 2015\n *\n * @author Jan-Christoph Borchardt \n * @author John Molakvoæ \n * @author Julius Härtl \n * @author Michael Jobst \n * @author noveens \n * @author Robin Appelman \n * @author Vincent Petry \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 .\n *\n */\n\nimport ItemTemplate from './templates/item.handlebars'\nimport Template from './templates/template.handlebars';\n\n(function() {\n\tif (!OCA.Files.DetailTabView) {\n\t\t// Only register the versions tab within the files app\n\t\treturn\n\t}\n\t/**\n\t * @memberof OCA.Versions\n\t */\n\tconst VersionsTabView = OCA.Files.DetailTabView.extend(/** @lends OCA.Versions.VersionsTabView.prototype */{\n\t\tid: 'versionsTabView',\n\t\tclassName: 'tab versionsTabView',\n\n\t\t_template: null,\n\n\t\t$versionsContainer: null,\n\n\t\tevents: {\n\t\t\t'click .revertVersion': '_onClickRevertVersion',\n\t\t},\n\n\t\tinitialize() {\n\t\t\tOCA.Files.DetailTabView.prototype.initialize.apply(this, arguments)\n\t\t\tthis.collection = new OCA.Versions.VersionCollection()\n\t\t\tthis.collection.on('request', this._onRequest, this)\n\t\t\tthis.collection.on('sync', this._onEndRequest, this)\n\t\t\tthis.collection.on('update', this._onUpdate, this)\n\t\t\tthis.collection.on('error', this._onError, this)\n\t\t\tthis.collection.on('add', this._onAddModel, this)\n\t\t},\n\n\t\tgetLabel() {\n\t\t\treturn t('files_versions', 'Versions')\n\t\t},\n\n\t\tgetIcon() {\n\t\t\treturn 'icon-history'\n\t\t},\n\n\t\tnextPage() {\n\t\t\tif (this._loading) {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tif (this.collection.getFileInfo() && this.collection.getFileInfo().isDirectory()) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tthis.collection.fetch()\n\t\t},\n\n\t\t_onClickRevertVersion(ev) {\n\t\t\tconst self = this\n\t\t\tlet $target = $(ev.target)\n\t\t\tconst fileInfoModel = this.collection.getFileInfo()\n\t\t\tif (!$target.is('li')) {\n\t\t\t\t$target = $target.closest('li')\n\t\t\t}\n\n\t\t\tev.preventDefault()\n\t\t\tconst revision = $target.attr('data-revision')\n\n\t\t\tconst versionModel = this.collection.get(revision)\n\t\t\tversionModel.revert({\n\t\t\t\tsuccess() {\n\t\t\t\t\t// reset and re-fetch the updated collection\n\t\t\t\t\tself.$versionsContainer.empty()\n\t\t\t\t\tself.collection.setFileInfo(fileInfoModel)\n\t\t\t\t\tself.collection.reset([], { silent: true })\n\t\t\t\t\tself.collection.fetch()\n\n\t\t\t\t\tself.$el.find('.versions').removeClass('hidden')\n\n\t\t\t\t\t// update original model\n\t\t\t\t\tfileInfoModel.trigger('busy', fileInfoModel, false)\n\t\t\t\t\tfileInfoModel.set({\n\t\t\t\t\t\tsize: versionModel.get('size'),\n\t\t\t\t\t\tmtime: versionModel.get('timestamp') * 1000,\n\t\t\t\t\t\t// temp dummy, until we can do a PROPFIND\n\t\t\t\t\t\tetag: versionModel.get('id') + versionModel.get('timestamp'),\n\t\t\t\t\t})\n\t\t\t\t},\n\n\t\t\t\terror() {\n\t\t\t\t\tfileInfoModel.trigger('busy', fileInfoModel, false)\n\t\t\t\t\tself.$el.find('.versions').removeClass('hidden')\n\t\t\t\t\tself._toggleLoading(false)\n\t\t\t\t\tOC.Notification.show(t('files_version', 'Failed to revert {file} to revision {timestamp}.',\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tfile: versionModel.getFullPath(),\n\t\t\t\t\t\t\ttimestamp: OC.Util.formatDate(versionModel.get('timestamp') * 1000),\n\t\t\t\t\t\t}),\n\t\t\t\t\t{\n\t\t\t\t\t\ttype: 'error',\n\t\t\t\t\t}\n\t\t\t\t\t)\n\t\t\t\t},\n\t\t\t})\n\n\t\t\t// spinner\n\t\t\tthis._toggleLoading(true)\n\t\t\tfileInfoModel.trigger('busy', fileInfoModel, true)\n\t\t},\n\n\t\t_toggleLoading(state) {\n\t\t\tthis._loading = state\n\t\t\tthis.$el.find('.loading').toggleClass('hidden', !state)\n\t\t},\n\n\t\t_onRequest() {\n\t\t\tthis._toggleLoading(true)\n\t\t},\n\n\t\t_onEndRequest() {\n\t\t\tthis._toggleLoading(false)\n\t\t\tthis.$el.find('.empty').toggleClass('hidden', !!this.collection.length)\n\t\t},\n\n\t\t_onAddModel(model) {\n\t\t\tconst $el = $(this.itemTemplate(this._formatItem(model)))\n\t\t\tthis.$versionsContainer.append($el)\n\t\t\t$el.find('.has-tooltip').tooltip()\n\t\t},\n\n\t\ttemplate(data) {\n\t\t\treturn Template(data)\n\t\t},\n\n\t\titemTemplate(data) {\n\t\t\treturn ItemTemplate(data)\n\t\t},\n\n\t\tsetFileInfo(fileInfo) {\n\t\t\tif (fileInfo) {\n\t\t\t\tthis.render()\n\t\t\t\tthis.collection.setFileInfo(fileInfo)\n\t\t\t\tthis.collection.reset([], { silent: true })\n\t\t\t\tthis.nextPage()\n\t\t\t} else {\n\t\t\t\tthis.render()\n\t\t\t\tthis.collection.reset()\n\t\t\t}\n\t\t},\n\n\t\t_formatItem(version) {\n\t\t\tconst timestamp = version.get('timestamp') * 1000\n\t\t\tconst size = version.has('size') ? version.get('size') : 0\n\t\t\tconst preview = OC.MimeType.getIconUrl(version.get('mimetype'))\n\t\t\tconst img = new Image()\n\t\t\timg.onload = function() {\n\t\t\t\t$('li[data-revision=' + version.get('id') + '] .preview').attr('src', version.getPreviewUrl())\n\t\t\t}\n\t\t\timg.src = version.getPreviewUrl()\n\n\t\t\treturn _.extend({\n\t\t\t\tversionId: version.get('id'),\n\t\t\t\tformattedTimestamp: OC.Util.formatDate(timestamp),\n\t\t\t\trelativeTimestamp: OC.Util.relativeModifiedDate(timestamp),\n\t\t\t\tmillisecondsTimestamp: timestamp,\n\t\t\t\thumanReadableSize: OC.Util.humanFileSize(size, true),\n\t\t\t\taltSize: n('files', '%n byte', '%n bytes', size),\n\t\t\t\thasDetails: version.has('size'),\n\t\t\t\tdownloadUrl: version.getDownloadUrl(),\n\t\t\t\tdownloadIconUrl: OC.imagePath('core', 'actions/download'),\n\t\t\t\tdownloadName: version.get('name'),\n\t\t\t\trevertIconUrl: OC.imagePath('core', 'actions/history'),\n\t\t\t\tpreviewUrl: preview,\n\t\t\t\trevertLabel: t('files_versions', 'Restore'),\n\t\t\t\tcanRevert: (this.collection.getFileInfo().get('permissions') & OC.PERMISSION_UPDATE) !== 0,\n\t\t\t}, version.attributes)\n\t\t},\n\n\t\t/**\n\t\t * Renders this details view\n\t\t */\n\t\trender() {\n\t\t\tthis.$el.html(this.template({\n\t\t\t\temptyResultLabel: t('files_versions', 'No other versions available'),\n\t\t\t}))\n\t\t\tthis.$el.find('.has-tooltip').tooltip()\n\t\t\tthis.$versionsContainer = this.$el.find('ul.versions')\n\t\t\tthis.delegateEvents()\n\t\t},\n\n\t\t/**\n\t\t * Returns true for files, false for folders.\n\t\t *\n\t\t * @param {FileInfo} fileInfo fileInfo\n\t\t * @return {boolean} true for files, false for folders\n\t\t */\n\t\tcanDisplay(fileInfo) {\n\t\t\tif (!fileInfo) {\n\t\t\t\treturn false\n\t\t\t}\n\t\t\treturn !fileInfo.isDirectory()\n\t\t},\n\t})\n\n\tOCA.Versions = OCA.Versions || {}\n\n\tOCA.Versions.VersionsTabView = VersionsTabView\n})()\n","\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!./versions.css\";\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!./versions.css\";\n export default content && content.locals ? content.locals : undefined;\n","/**\n * @copyright Copyright (c) 2016 Roeland Jago Douma \n *\n * @author Roeland Jago Douma \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 .\n *\n */\n\nimport './versionmodel'\nimport './versioncollection'\nimport './versionstabview'\nimport './filesplugin'\nimport './css/versions.css'\n\nwindow.OCA.Versions = OCA.Versions\n","/**\n * Copyright (c) 2015\n *\n * @author John Molakvoæ \n * @author Vincent Petry \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 .\n *\n */\n\n(function() {\n\tOCA.Versions = OCA.Versions || {}\n\n\t/**\n\t * @namespace\n\t */\n\tOCA.Versions.Util = {\n\t\t/**\n\t\t * Initialize the versions plugin.\n\t\t *\n\t\t * @param {OCA.Files.FileList} fileList file list to be extended\n\t\t */\n\t\tattach(fileList) {\n\t\t\tif (fileList.id === 'trashbin' || fileList.id === 'files.public') {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tfileList.registerTabView(new OCA.Versions.VersionsTabView('versionsTabView', { order: -10 }))\n\t\t},\n\t}\n})()\n\nOC.Plugins.register('OCA.Files.FileList', OCA.Versions.Util)\n","/**\n * Copyright (c) 2015\n *\n * @author John Molakvoæ \n * @author Robin Appelman \n * @author Vincent Petry \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 .\n *\n */\n\n(function() {\n\t/**\n\t * @memberof OCA.Versions\n\t */\n\tconst VersionCollection = OC.Backbone.Collection.extend({\n\t\tmodel: OCA.Versions.VersionModel,\n\t\tsync: OC.Backbone.davSync,\n\n\t\t/**\n\t\t * @member OCA.Files.FileInfoModel\n\t\t */\n\t\t_fileInfo: null,\n\n\t\t_currentUser: null,\n\n\t\t_client: null,\n\n\t\tsetFileInfo(fileInfo) {\n\t\t\tthis._fileInfo = fileInfo\n\t\t},\n\n\t\tgetFileInfo() {\n\t\t\treturn this._fileInfo\n\t\t},\n\n\t\tsetCurrentUser(user) {\n\t\t\tthis._currentUser = user\n\t\t},\n\n\t\tgetCurrentUser() {\n\t\t\treturn this._currentUser || OC.getCurrentUser().uid\n\t\t},\n\n\t\tsetClient(client) {\n\t\t\tthis._client = client\n\t\t},\n\n\t\tgetClient() {\n\t\t\treturn this._client || new OC.Files.Client({\n\t\t\t\thost: OC.getHost(),\n\t\t\t\troot: OC.linkToRemoteBase('dav') + '/versions/' + this.getCurrentUser(),\n\t\t\t\tuseHTTPS: OC.getProtocol() === 'https',\n\t\t\t})\n\t\t},\n\n\t\turl() {\n\t\t\treturn OC.linkToRemoteBase('dav') + '/versions/' + this.getCurrentUser() + '/versions/' + this._fileInfo.get('id')\n\t\t},\n\n\t\tparse(result) {\n\t\t\tconst fullPath = this._fileInfo.getFullPath()\n\t\t\tconst fileId = this._fileInfo.get('id')\n\t\t\tconst name = this._fileInfo.get('name')\n\t\t\tconst user = this.getCurrentUser()\n\t\t\tconst client = this.getClient()\n\t\t\treturn _.map(result, function(version) {\n\t\t\t\tversion.fullPath = fullPath\n\t\t\t\tversion.fileId = fileId\n\t\t\t\tversion.name = name\n\t\t\t\tversion.timestamp = parseInt(moment(new Date(version.timestamp)).format('X'), 10)\n\t\t\t\tversion.id = OC.basename(version.href)\n\t\t\t\tversion.size = parseInt(version.size, 10)\n\t\t\t\tversion.user = user\n\t\t\t\tversion.client = client\n\t\t\t\treturn version\n\t\t\t})\n\t\t},\n\t})\n\n\tOCA.Versions = OCA.Versions || {}\n\n\tOCA.Versions.VersionCollection = VersionCollection\n})()\n","/**\n * Copyright (c) 2015\n *\n * @author John Molakvoæ \n * @author Robin Appelman \n * @author Vincent Petry \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 .\n *\n */\n\n(function() {\n\t/**\n\t * @memberof OCA.Versions\n\t */\n\tconst VersionModel = OC.Backbone.Model.extend({\n\t\tsync: OC.Backbone.davSync,\n\n\t\tdavProperties: {\n\t\t\tsize: '{DAV:}getcontentlength',\n\t\t\tmimetype: '{DAV:}getcontenttype',\n\t\t\ttimestamp: '{DAV:}getlastmodified',\n\t\t},\n\n\t\t/**\n\t\t * Restores the original file to this revision\n\t\t *\n\t\t * @param {object} [options] options\n\t\t * @return {Promise}\n\t\t */\n\t\trevert(options) {\n\t\t\toptions = options ? _.clone(options) : {}\n\t\t\tconst model = this\n\n\t\t\tconst client = this.get('client')\n\n\t\t\treturn client.move('/versions/' + this.get('fileId') + '/' + this.get('id'), '/restore/target', true)\n\t\t\t\t.done(function() {\n\t\t\t\t\tif (options.success) {\n\t\t\t\t\t\toptions.success.call(options.context, model, {}, options)\n\t\t\t\t\t}\n\t\t\t\t\tmodel.trigger('revert', model, options)\n\t\t\t\t})\n\t\t\t\t.fail(function() {\n\t\t\t\t\tif (options.error) {\n\t\t\t\t\t\toptions.error.call(options.context, model, {}, options)\n\t\t\t\t\t}\n\t\t\t\t\tmodel.trigger('error', model, {}, options)\n\t\t\t\t})\n\t\t},\n\n\t\tgetFullPath() {\n\t\t\treturn this.get('fullPath')\n\t\t},\n\n\t\tgetPreviewUrl() {\n\t\t\tconst url = OC.generateUrl('/apps/files_versions/preview')\n\t\t\tconst params = {\n\t\t\t\tfile: this.get('fullPath'),\n\t\t\t\tversion: this.get('id'),\n\t\t\t}\n\t\t\treturn url + '?' + OC.buildQueryString(params)\n\t\t},\n\n\t\tgetDownloadUrl() {\n\t\t\treturn OC.linkToRemoteBase('dav') + '/versions/' + this.get('user') + '/versions/' + this.get('fileId') + '/' + this.get('id')\n\t\t},\n\t})\n\n\tOCA.Versions = OCA.Versions || {}\n\n\tOCA.Versions.VersionModel = VersionModel\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, \".versionsTabView .clear-float {\\n\\tclear: both;\\n}\\n\\n.versionsTabView li {\\n\\twidth: 100%;\\n\\tcursor: default;\\n\\theight: 56px;\\n\\tfloat: left;\\n\\tborder-bottom: 1px solid rgba(100,100,100,.1);\\n}\\n.versionsTabView li:last-child {\\n\\tborder-bottom: none;\\n}\\n\\n.versionsTabView a,\\n.versionsTabView div > span {\\n\\tvertical-align: middle;\\n\\topacity: .5;\\n}\\n\\n.versionsTabView li a{\\n\\tpadding: 15px 10px 11px;\\n}\\n\\n.versionsTabView a:hover,\\n.versionsTabView a:focus {\\n\\topacity: 1;\\n}\\n\\n.versionsTabView .preview-container {\\n\\tdisplay: inline-block;\\n vertical-align: top;\\n}\\n\\n.versionsTabView .version-container img, .revertVersion img {\\n\\tfilter: var(--background-invert-if-dark);\\n}\\n\\n.versionsTabView img {\\n\\tcursor: pointer;\\n\\tpadding-right: 4px;\\n}\\n\\n.versionsTabView img.preview {\\n\\tcursor: default;\\n}\\n\\n.versionsTabView .version-container {\\n\\tdisplay: inline-block;\\n}\\n\\n.versionsTabView .versiondate {\\n\\tmin-width: 100px;\\n\\tvertical-align: super;\\n}\\n\\n.versionsTabView .version-details {\\n\\ttext-align: left;\\n}\\n\\n.versionsTabView .version-details > span {\\n\\tpadding: 0 10px;\\n}\\n\\n.versionsTabView .revertVersion {\\n\\tcursor: pointer;\\n\\tfloat: right;\\n\\tmargin-right: -10px;\\n}\\n\\n.versionsTabView .emptycontent {\\n\\tmargin-top: 50px !important;\\n}\\n\", \"\",{\"version\":3,\"sources\":[\"webpack://./apps/files_versions/src/css/versions.css\"],\"names\":[],\"mappings\":\"AAAA;CACC,WAAW;AACZ;;AAEA;CACC,WAAW;CACX,eAAe;CACf,YAAY;CACZ,WAAW;CACX,6CAA6C;AAC9C;AACA;CACC,mBAAmB;AACpB;;AAEA;;CAEC,sBAAsB;CACtB,WAAW;AACZ;;AAEA;CACC,uBAAuB;AACxB;;AAEA;;CAEC,UAAU;AACX;;AAEA;CACC,qBAAqB;EACpB,mBAAmB;AACrB;;AAEA;CACC,wCAAwC;AACzC;;AAEA;CACC,eAAe;CACf,kBAAkB;AACnB;;AAEA;CACC,eAAe;AAChB;;AAEA;CACC,qBAAqB;AACtB;;AAEA;CACC,gBAAgB;CAChB,qBAAqB;AACtB;;AAEA;CACC,gBAAgB;AACjB;;AAEA;CACC,eAAe;AAChB;;AAEA;CACC,eAAe;CACf,YAAY;CACZ,mBAAmB;AACpB;;AAEA;CACC,2BAA2B;AAC5B\",\"sourcesContent\":[\".versionsTabView .clear-float {\\n\\tclear: both;\\n}\\n\\n.versionsTabView li {\\n\\twidth: 100%;\\n\\tcursor: default;\\n\\theight: 56px;\\n\\tfloat: left;\\n\\tborder-bottom: 1px solid rgba(100,100,100,.1);\\n}\\n.versionsTabView li:last-child {\\n\\tborder-bottom: none;\\n}\\n\\n.versionsTabView a,\\n.versionsTabView div > span {\\n\\tvertical-align: middle;\\n\\topacity: .5;\\n}\\n\\n.versionsTabView li a{\\n\\tpadding: 15px 10px 11px;\\n}\\n\\n.versionsTabView a:hover,\\n.versionsTabView a:focus {\\n\\topacity: 1;\\n}\\n\\n.versionsTabView .preview-container {\\n\\tdisplay: inline-block;\\n vertical-align: top;\\n}\\n\\n.versionsTabView .version-container img, .revertVersion img {\\n\\tfilter: var(--background-invert-if-dark);\\n}\\n\\n.versionsTabView img {\\n\\tcursor: pointer;\\n\\tpadding-right: 4px;\\n}\\n\\n.versionsTabView img.preview {\\n\\tcursor: default;\\n}\\n\\n.versionsTabView .version-container {\\n\\tdisplay: inline-block;\\n}\\n\\n.versionsTabView .versiondate {\\n\\tmin-width: 100px;\\n\\tvertical-align: super;\\n}\\n\\n.versionsTabView .version-details {\\n\\ttext-align: left;\\n}\\n\\n.versionsTabView .version-details > span {\\n\\tpadding: 0 10px;\\n}\\n\\n.versionsTabView .revertVersion {\\n\\tcursor: pointer;\\n\\tfloat: right;\\n\\tmargin-right: -10px;\\n}\\n\\n.versionsTabView .emptycontent {\\n\\tmargin-top: 50px !important;\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","var Handlebars = require(\"../../../../node_modules/handlebars/runtime.js\");\nfunction __default(obj) { return obj && (obj.__esModule ? obj[\"default\"] : obj); }\nmodule.exports = (Handlebars[\"default\"] || Handlebars).template({\"1\":function(container,depth0,helpers,partials,data) {\n var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.hooks.helperMissing, alias3=\"function\", alias4=container.escapeExpression, lookupProperty = container.lookupProperty || function(parent, propertyName) {\n if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {\n return parent[propertyName];\n }\n return undefined\n };\n\n return \"\t\t\t\t
        \\n\t\t\t\t\t\"\n + alias4(((helper = (helper = lookupProperty(helpers,\"humanReadableSize\") || (depth0 != null ? lookupProperty(depth0,\"humanReadableSize\") : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"humanReadableSize\",\"hash\":{},\"data\":data,\"loc\":{\"start\":{\"line\":14,\"column\":56},\"end\":{\"line\":14,\"column\":77}}}) : helper)))\n + \"\\n\t\t\t\t
        \\n\";\n},\"3\":function(container,depth0,helpers,partials,data) {\n var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.hooks.helperMissing, alias3=\"function\", alias4=container.escapeExpression, lookupProperty = container.lookupProperty || function(parent, propertyName) {\n if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {\n return parent[propertyName];\n }\n return undefined\n };\n\n return \"\t\t\t\\n\";\n},\"compiler\":[8,\">= 4.3.0\"],\"main\":function(container,depth0,helpers,partials,data) {\n var stack1, helper, options, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.hooks.helperMissing, alias3=\"function\", alias4=container.escapeExpression, alias5=container.hooks.blockHelperMissing, lookupProperty = container.lookupProperty || function(parent, propertyName) {\n if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {\n return parent[propertyName];\n }\n return undefined\n }, buffer = \n \"
      • \\n\t
        \\n\t\t
        \\n\t\t\t\\n\t\t
        \\n\t\t
        \\n\t\t\t\\n\";\n stack1 = ((helper = (helper = lookupProperty(helpers,\"hasDetails\") || (depth0 != null ? lookupProperty(depth0,\"hasDetails\") : depth0)) != null ? helper : alias2),(options={\"name\":\"hasDetails\",\"hash\":{},\"fn\":container.program(1, data, 0),\"inverse\":container.noop,\"data\":data,\"loc\":{\"start\":{\"line\":12,\"column\":3},\"end\":{\"line\":16,\"column\":18}}}),(typeof helper === alias3 ? helper.call(alias1,options) : helper));\n if (!lookupProperty(helpers,\"hasDetails\")) { stack1 = alias5.call(depth0,stack1,options)}\n if (stack1 != null) { buffer += stack1; }\n buffer += \"\t\t
        \\n\";\n stack1 = ((helper = (helper = lookupProperty(helpers,\"canRevert\") || (depth0 != null ? lookupProperty(depth0,\"canRevert\") : depth0)) != null ? helper : alias2),(options={\"name\":\"canRevert\",\"hash\":{},\"fn\":container.program(3, data, 0),\"inverse\":container.noop,\"data\":data,\"loc\":{\"start\":{\"line\":18,\"column\":2},\"end\":{\"line\":20,\"column\":16}}}),(typeof helper === alias3 ? helper.call(alias1,options) : helper));\n if (!lookupProperty(helpers,\"canRevert\")) { stack1 = alias5.call(depth0,stack1,options)}\n if (stack1 != null) { buffer += stack1; }\n return buffer + \"\t
        \\n
      • \\n\";\n},\"useData\":true});","var Handlebars = require(\"../../../../node_modules/handlebars/runtime.js\");\nfunction __default(obj) { return obj && (obj.__esModule ? obj[\"default\"] : obj); }\nmodule.exports = (Handlebars[\"default\"] || Handlebars).template({\"compiler\":[8,\">= 4.3.0\"],\"main\":function(container,depth0,helpers,partials,data) {\n var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.hooks.helperMissing, alias3=\"function\", alias4=container.escapeExpression, lookupProperty = container.lookupProperty || function(parent, propertyName) {\n if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {\n return parent[propertyName];\n }\n return undefined\n };\n\n return \"
          \\n
          \\n
          \\n\t
          \\n\t\t
          \\n\t\t

          \"\n + alias4(((helper = (helper = lookupProperty(helpers,\"emptyResultLabel\") || (depth0 != null ? lookupProperty(depth0,\"emptyResultLabel\") : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"emptyResultLabel\",\"hash\":{},\"data\":data,\"loc\":{\"start\":{\"line\":6,\"column\":5},\"end\":{\"line\":6,\"column\":25}}}) : helper)))\n + \"

          \\n\t
          \\n
          \\n\\n
          \\n\";\n},\"useData\":true});","// 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 = 1358;","__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\t1358: 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__(22420); })\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n"],"names":["deferred","OCA","Files","DetailTabView","VersionsTabView","extend","id","className","_template","$versionsContainer","events","initialize","prototype","apply","this","arguments","collection","Versions","VersionCollection","on","_onRequest","_onEndRequest","_onUpdate","_onError","_onAddModel","getLabel","t","getIcon","nextPage","_loading","getFileInfo","isDirectory","fetch","_onClickRevertVersion","ev","self","$target","$","target","fileInfoModel","is","closest","preventDefault","revision","attr","versionModel","get","revert","success","empty","setFileInfo","reset","silent","$el","find","removeClass","trigger","set","size","mtime","etag","error","_toggleLoading","OC","Notification","show","file","getFullPath","timestamp","Util","formatDate","type","state","toggleClass","length","model","itemTemplate","_formatItem","append","tooltip","template","data","Template","ItemTemplate","fileInfo","render","version","has","preview","MimeType","getIconUrl","img","Image","onload","getPreviewUrl","src","_","versionId","formattedTimestamp","relativeTimestamp","relativeModifiedDate","millisecondsTimestamp","humanReadableSize","humanFileSize","altSize","n","hasDetails","downloadUrl","getDownloadUrl","downloadIconUrl","imagePath","downloadName","revertIconUrl","previewUrl","revertLabel","canRevert","PERMISSION_UPDATE","attributes","html","emptyResultLabel","delegateEvents","canDisplay","options","styleTagTransform","setAttributes","insert","domAPI","insertStyleElement","window","attach","fileList","registerTabView","order","Plugins","register","Backbone","Collection","VersionModel","sync","davSync","_fileInfo","_currentUser","_client","setCurrentUser","user","getCurrentUser","uid","setClient","client","getClient","Client","host","getHost","root","linkToRemoteBase","useHTTPS","getProtocol","url","parse","result","fullPath","fileId","name","map","parseInt","moment","Date","format","basename","href","Model","davProperties","mimetype","clone","move","done","call","context","fail","generateUrl","params","buildQueryString","___CSS_LOADER_EXPORT___","push","module","Handlebars","exports","container","depth0","helpers","partials","helper","alias1","nullContext","alias2","hooks","helperMissing","alias3","alias4","escapeExpression","lookupProperty","parent","propertyName","Object","hasOwnProperty","stack1","alias5","blockHelperMissing","buffer","program","noop","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","loaded","__webpack_modules__","m","amdD","Error","amdO","O","chunkIds","fn","priority","notFulfilled","Infinity","i","fulfilled","j","keys","every","key","splice","r","getter","__esModule","d","a","definition","o","defineProperty","enumerable","g","globalThis","Function","e","obj","prop","Symbol","toStringTag","value","nmd","paths","children","b","document","baseURI","location","installedChunks","chunkId","webpackJsonpCallback","parentChunkLoadingFunction","moreModules","runtime","some","chunkLoadingGlobal","forEach","bind","nc","__webpack_exports__"],"sourceRoot":""} \ No newline at end of file