/*! For license information please see files-personal-settings.js.LICENSE.txt */ !function(){"use strict";var e,r={84649:function(e,r,n){var s=n(20144),i=n(45994),o=n(4820),a=n(20296),l=n.n(a),u=n(79753),c=n(64024),f=n(98266),d=n.n(f),p=n(10861),h=n.n(p),g=(0,n(17499).IY)().setApp("files").detectUser().build();function v(e,t,r,n,s,i,o){try{var a=e[i](o),l=a.value}catch(e){return void r(e)}a.done?t(l):Promise.resolve(l).then(n,s)}var m=(0,c.fn)(t("files","Choose a file or folder to transfer")).setMultiSelect(!1).setModal(!0).setType(1).allowDirectories().build(),b={name:"TransferOwnershipDialogue",components:{NcMultiselect:d(),NcButton:h()},data:function(){return{directory:void 0,directoryPickerError:void 0,submitError:void 0,loadingUsers:!1,selectedUser:null,userSuggestions:{},config:{minSearchStringLength:parseInt(OC.config["sharing.minSearchStringLength"],10)||0}}},computed:{canSubmit:function(){return!!this.directory&&!!this.selectedUser},formatedUserSuggestions:function(){var e=this;return Object.keys(this.userSuggestions).map((function(t){var r=e.userSuggestions[t];return{user:r.uid,displayName:r.displayName,icon:"icon-user"}}))},submitButtonText:function(){if(!this.canSubmit)return t("files","Transfer");var e=this.readableDirectory.split("/");return t("files","Transfer {path} to {userid}",{path:e[e.length-1],userid:this.selectedUser.displayName})},readableDirectory:function(){return this.directory?this.directory.substring(1):""}},created:function(){this.findUserDebounced=l()(this.findUser,300),this.findUser("")},methods:{start:function(){var e=this;this.directoryPickerError=void 0,m.pick().then((function(e){return""===e?"/":e})).then((function(r){if(g.debug("path ".concat(r," selected for transferring ownership")),!r.startsWith("/"))throw new Error(t("files","Invalid path selected"));e.directory=r})).catch((function(r){g.error("Selecting object for transfer aborted: ".concat(r.message||"Unknown error"),{error:r}),e.directoryPickerError=r.message||t("files","Unknown error")}))},findUser:function(e){var t,r=this;return(t=regeneratorRuntime.mark((function t(){var n;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r.query=e.trim(),!(e.length=i)&&Object.keys(s.O).every((function(e){return s.O[e](r[l])}))?r.splice(l--,1):(a=!1,i0&&e[c-1][2]>i;c--)e[c]=e[c-1];e[c]=[r,n,i]},s.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return s.d(t,{a:t}),t},s.d=function(e,t){for(var r in t)s.o(t,r)&&!s.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},s.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),s.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},s.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},s.nmd=function(e){return e.paths=[],e.children||(e.children=[]),e},s.j=1623,function(){s.b=document.baseURI||self.location.href;var e={1623:0};s.O.j=function(t){return 0===e[t]};var t=function(t,r){var n,i,o=r[0],a=r[1],l=r[2],u=0;if(o.some((function(t){return 0!==e[t]}))){for(n in a)s.o(a,n)&&(s.m[n]=a[n]);if(l)var c=l(s)}for(t&&t(r);u