/*! For license information please see settings-vue-settings-apps-users-management.js.LICENSE.txt */ (()=>{var e,r,o,i={92973:(t,e,r)=>{"use strict";r.d(e,{l:()=>o});var n=r(53334);const o=Object.freeze({installed:(0,n.Tl)("settings","Your apps"),enabled:(0,n.Tl)("settings","Active apps"),disabled:(0,n.Tl)("settings","Disabled apps"),updates:(0,n.Tl)("settings","Updates"),"app-bundles":(0,n.Tl)("settings","App bundles"),featured:(0,n.Tl)("settings","Featured apps"),supported:(0,n.Tl)("settings","Supported apps")})},58692:(t,e,r)=>{"use strict";r.d(e,{A:()=>n});const n=(0,r(53529).YK)().setApp("settings").detectUser().build()},32843:(e,r,o)=>{"use strict";var i=o(85471),s=o(80284),a=o(58723);const u={name:"App",beforeMount(){null!==document.getElementById("serverData")&&this.$store.commit("setServerData",JSON.parse(document.getElementById("serverData").dataset.server))}},c=(0,o(14486).A)(u,(function(){return(0,this._self._c)("router-view")}),[],!1,null,null,null).exports;var p=o(96763);function d(t,e){for(var r in e)t[r]=e[r];return t}var l=/[!'()*]/g,h=function(t){return"%"+t.charCodeAt(0).toString(16)},f=/%2C/g,m=function(t){return encodeURIComponent(t).replace(l,h).replace(f,",")};function g(t){try{return decodeURIComponent(t)}catch(t){}return t}var y=function(t){return null==t||"object"==typeof t?t:String(t)};function v(t){var e={};return(t=t.trim().replace(/^(\?|#|&)/,""))?(t.split("&").forEach((function(t){var r=t.replace(/\+/g," ").split("="),n=g(r.shift()),o=r.length>0?g(r.join("=")):null;void 0===e[n]?e[n]=o:Array.isArray(e[n])?e[n].push(o):e[n]=[e[n],o]})),e):e}function b(t){var e=t?Object.keys(t).map((function(e){var r=t[e];if(void 0===r)return"";if(null===r)return m(e);if(Array.isArray(r)){var n=[];return r.forEach((function(t){void 0!==t&&(null===t?n.push(m(e)):n.push(m(e)+"="+m(t)))})),n.join("&")}return m(e)+"="+m(r)})).filter((function(t){return t.length>0})).join("&"):null;return e?"?"+e:""}var w=/\/?$/;function A(t,e,r,n){var o=n&&n.options.stringifyQuery,i=e.query||{};try{i=E(i)}catch(t){}var s={name:e.name||t&&t.name,meta:t&&t.meta||{},path:e.path||"/",hash:e.hash||"",query:i,params:e.params||{},fullPath:P(e,o),matched:t?_(t):[]};return r&&(s.redirectedFrom=P(r,o)),Object.freeze(s)}function E(t){if(Array.isArray(t))return t.map(E);if(t&&"object"==typeof t){var e={};for(var r in t)e[r]=E(t[r]);return e}return t}var x=A(null,{path:"/"});function _(t){for(var e=[];t;)e.unshift(t),t=t.parent;return e}function P(t,e){var r=t.path,n=t.query;void 0===n&&(n={});var o=t.hash;return void 0===o&&(o=""),(r||"/")+(e||b)(n)+o}function I(t,e,r){return e===x?t===e:!!e&&(t.path&&e.path?t.path.replace(w,"")===e.path.replace(w,"")&&(r||t.hash===e.hash&&C(t.query,e.query)):!(!t.name||!e.name)&&t.name===e.name&&(r||t.hash===e.hash&&C(t.query,e.query)&&C(t.params,e.params)))}function C(t,e){if(void 0===t&&(t={}),void 0===e&&(e={}),!t||!e)return t===e;var r=Object.keys(t).sort(),n=Object.keys(e).sort();return r.length===n.length&&r.every((function(r,o){var i=t[r];if(n[o]!==r)return!1;var s=e[r];return null==i||null==s?i===s:"object"==typeof i&&"object"==typeof s?C(i,s):String(i)===String(s)}))}function L(t){for(var e=0;e=0&&(e=t.slice(n),t=t.slice(0,n));var o=t.indexOf("?");return o>=0&&(r=t.slice(o+1),t=t.slice(0,o)),{path:t,query:r,hash:e}}(o.path||""),c=e&&e.path||"/",p=u.path?N(u.path,c,r||o.append):c,l=function(t,e,r){void 0===e&&(e={});var n,o=r||v;try{n=o(t||"")}catch(t){n={}}for(var i in e){var s=e[i];n[i]=Array.isArray(s)?s.map(y):y(s)}return n}(u.query,o.query,n&&n.options.parseQuery),h=o.hash||u.hash;return h&&"#"!==h.charAt(0)&&(h="#"+h),{_normalized:!0,path:p,query:l,hash:h}}var Y,Q=function(){},X={name:"RouterLink",props:{to:{type:[String,Object],required:!0},tag:{type:String,default:"a"},custom:Boolean,exact:Boolean,exactPath:Boolean,append:Boolean,replace:Boolean,activeClass:String,exactActiveClass:String,ariaCurrentValue:{type:String,default:"page"},event:{type:[String,Array],default:"click"}},render:function(t){var e=this,r=this.$router,n=this.$route,o=r.resolve(this.to,n,this.append),i=o.location,s=o.route,a=o.href,u={},c=r.options.linkActiveClass,p=r.options.linkExactActiveClass,l=null==c?"router-link-active":c,h=null==p?"router-link-exact-active":p,f=null==this.activeClass?l:this.activeClass,m=null==this.exactActiveClass?h:this.exactActiveClass,g=s.redirectedFrom?A(null,W(s.redirectedFrom),null,r):s;u[m]=I(n,g,this.exactPath),u[f]=this.exact||this.exactPath?u[m]:function(t,e){return 0===t.path.replace(w,"/").indexOf(e.path.replace(w,"/"))&&(!e.hash||t.hash===e.hash)&&function(t,e){for(var r in e)if(!(r in t))return!1;return!0}(t.query,e.query)}(n,g);var y=u[m]?this.ariaCurrentValue:null,v=function(t){Z(t)&&(e.replace?r.replace(i,Q):r.push(i,Q))},b={click:Z};Array.isArray(this.event)?this.event.forEach((function(t){b[t]=v})):b[this.event]=v;var E={class:u},x=!this.$scopedSlots.$hasNormal&&this.$scopedSlots.default&&this.$scopedSlots.default({href:a,route:s,navigate:v,isActive:u[f],isExactActive:u[m]});if(x){if(1===x.length)return x[0];if(x.length>1||!x.length)return 0===x.length?t():t("span",{},x)}if("a"===this.tag)E.on=b,E.attrs={href:a,"aria-current":y};else{var _=tt(this.$slots.default);if(_){_.isStatic=!1;var P=_.data=d({},_.data);for(var C in P.on=P.on||{},P.on){var L=P.on[C];C in b&&(P.on[C]=Array.isArray(L)?L:[L])}for(var R in b)R in P.on?P.on[R].push(b[R]):P.on[R]=v;var O=_.data.attrs=d({},_.data.attrs);O.href=a,O["aria-current"]=y}else E.on=b}return t(this.tag,E,this.$slots.default)}};function Z(t){if(!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey||t.defaultPrevented||void 0!==t.button&&0!==t.button)){if(t.currentTarget&&t.currentTarget.getAttribute){var e=t.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(e))return}return t.preventDefault&&t.preventDefault(),!0}}function tt(t){if(t)for(var e,r=0;r-1&&(u.params[l]=r.params[l]);return u.path=J(p.path,u.params),a(p,u,s)}if(u.path){u.params={};for(var h=0;h-1}function Nt(t,e){return Ot(t)&&t._isRouter&&(null==e||t.type===e)}function Ut(t,e,r){var n=function(o){o>=t.length?r():t[o]?e(t[o],(function(){n(o+1)})):n(o+1)};n(0)}function Tt(t,e){return kt(t.map((function(t){return Object.keys(t.components).map((function(r){return e(t.components[r],t.instances[r],t,r)}))})))}function kt(t){return Array.prototype.concat.apply([],t)}var jt="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag;function St(t){var e=!1;return function(){for(var r=[],n=arguments.length;n--;)r[n]=arguments[n];if(!e)return e=!0,t.apply(this,r)}}var Ft=function(t,e){this.router=t,this.base=function(t){if(!t)if(et){var e=document.querySelector("base");t=(t=e&&e.getAttribute("href")||"/").replace(/^https?:\/\/[^\/]+/,"")}else t="/";return"/"!==t.charAt(0)&&(t="/"+t),t.replace(/\/$/,"")}(e),this.current=x,this.pending=null,this.ready=!1,this.readyCbs=[],this.readyErrorCbs=[],this.errorCbs=[],this.listeners=[]};function $t(t,e,r,n){var o=Tt(t,(function(t,n,o,i){var s=function(t,e){return"function"!=typeof t&&(t=Y.extend(t)),t.options[e]}(t,e);if(s)return Array.isArray(s)?s.map((function(t){return r(t,n,o,i)})):r(s,n,o,i)}));return kt(n?o.reverse():o)}function Dt(t,e){if(e)return function(){return t.apply(e,arguments)}}Ft.prototype.listen=function(t){this.cb=t},Ft.prototype.onReady=function(t,e){this.ready?t():(this.readyCbs.push(t),e&&this.readyErrorCbs.push(e))},Ft.prototype.onError=function(t){this.errorCbs.push(t)},Ft.prototype.transitionTo=function(t,e,r){var n,o=this;try{n=this.router.match(t,this.current)}catch(t){throw this.errorCbs.forEach((function(e){e(t)})),t}var i=this.current;this.confirmTransition(n,(function(){o.updateRoute(n),e&&e(n),o.ensureURL(),o.router.afterHooks.forEach((function(t){t&&t(n,i)})),o.ready||(o.ready=!0,o.readyCbs.forEach((function(t){t(n)})))}),(function(t){r&&r(t),t&&!o.ready&&(Nt(t,It.redirected)&&i===x||(o.ready=!0,o.readyErrorCbs.forEach((function(e){e(t)}))))}))},Ft.prototype.confirmTransition=function(t,e,r){var n=this,o=this.current;this.pending=t;var i,s,a=function(t){!Nt(t)&&Ot(t)&&(n.errorCbs.length?n.errorCbs.forEach((function(e){e(t)})):p.error(t)),r&&r(t)},u=t.matched.length-1,c=o.matched.length-1;if(I(t,o)&&u===c&&t.matched[u]===o.matched[c])return this.ensureURL(),t.hash&&ft(this.router,o,t,!1),a(((s=Lt(i=o,t,It.duplicated,'Avoided redundant navigation to current location: "'+i.fullPath+'".')).name="NavigationDuplicated",s));var d,l=function(t,e){var r,n=Math.max(t.length,e.length);for(r=0;r0)){var e=this.router,r=e.options.scrollBehavior,n=xt&&r;n&&this.listeners.push(ht());var o=function(){var r=t.current,o=qt(t.base);t.current===x&&o===t._startLocation||t.transitionTo(o,(function(t){n&&ft(e,t,r,!0)}))};window.addEventListener("popstate",o),this.listeners.push((function(){window.removeEventListener("popstate",o)}))}},e.prototype.go=function(t){window.history.go(t)},e.prototype.push=function(t,e,r){var n=this,o=this.current;this.transitionTo(t,(function(t){_t(U(n.base+t.fullPath)),ft(n.router,t,o,!1),e&&e(t)}),r)},e.prototype.replace=function(t,e,r){var n=this,o=this.current;this.transitionTo(t,(function(t){Pt(U(n.base+t.fullPath)),ft(n.router,t,o,!1),e&&e(t)}),r)},e.prototype.ensureURL=function(t){if(qt(this.base)!==this.current.fullPath){var e=U(this.base+this.current.fullPath);t?_t(e):Pt(e)}},e.prototype.getCurrentLocation=function(){return qt(this.base)},e}(Ft);function qt(t){var e=window.location.pathname,r=e.toLowerCase(),n=t.toLowerCase();return!t||r!==n&&0!==r.indexOf(U(n+"/"))||(e=e.slice(t.length)),(e||"/")+window.location.search+window.location.hash}var Mt=function(t){function e(e,r,n){t.call(this,e,r),n&&function(t){var e=qt(t);if(!/^\/#/.test(e))return window.location.replace(U(t+"/#"+e)),!0}(this.base)||Gt()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.setupListeners=function(){var t=this;if(!(this.listeners.length>0)){var e=this.router.options.scrollBehavior,r=xt&&e;r&&this.listeners.push(ht());var n=function(){var e=t.current;Gt()&&t.transitionTo(Vt(),(function(n){r&&ft(t.router,n,e,!0),xt||zt(n.fullPath)}))},o=xt?"popstate":"hashchange";window.addEventListener(o,n),this.listeners.push((function(){window.removeEventListener(o,n)}))}},e.prototype.push=function(t,e,r){var n=this,o=this.current;this.transitionTo(t,(function(t){Ht(t.fullPath),ft(n.router,t,o,!1),e&&e(t)}),r)},e.prototype.replace=function(t,e,r){var n=this,o=this.current;this.transitionTo(t,(function(t){zt(t.fullPath),ft(n.router,t,o,!1),e&&e(t)}),r)},e.prototype.go=function(t){window.history.go(t)},e.prototype.ensureURL=function(t){var e=this.current.fullPath;Vt()!==e&&(t?Ht(e):zt(e))},e.prototype.getCurrentLocation=function(){return Vt()},e}(Ft);function Gt(){var t=Vt();return"/"===t.charAt(0)||(zt("/"+t),!1)}function Vt(){var t=window.location.href,e=t.indexOf("#");return e<0?"":t=t.slice(e+1)}function Kt(t){var e=window.location.href,r=e.indexOf("#");return(r>=0?e.slice(0,r):e)+"#"+t}function Ht(t){xt?_t(Kt(t)):window.location.hash=t}function zt(t){xt?Pt(Kt(t)):window.location.replace(Kt(t))}var Jt=function(t){function e(e,r){t.call(this,e,r),this.stack=[],this.index=-1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.push=function(t,e,r){var n=this;this.transitionTo(t,(function(t){n.stack=n.stack.slice(0,n.index+1).concat(t),n.index++,e&&e(t)}),r)},e.prototype.replace=function(t,e,r){var n=this;this.transitionTo(t,(function(t){n.stack=n.stack.slice(0,n.index).concat(t),e&&e(t)}),r)},e.prototype.go=function(t){var e=this,r=this.index+t;if(!(r<0||r>=this.stack.length)){var n=this.stack[r];this.confirmTransition(n,(function(){var t=e.current;e.index=r,e.updateRoute(n),e.router.afterHooks.forEach((function(e){e&&e(n,t)}))}),(function(t){Nt(t,It.duplicated)&&(e.index=r)}))}},e.prototype.getCurrentLocation=function(){var t=this.stack[this.stack.length-1];return t?t.fullPath:"/"},e.prototype.ensureURL=function(){},e}(Ft),Wt=function(t){void 0===t&&(t={}),this.app=null,this.apps=[],this.options=t,this.beforeHooks=[],this.resolveHooks=[],this.afterHooks=[],this.matcher=it(t.routes||[],this);var e=t.mode||"hash";switch(this.fallback="history"===e&&!xt&&!1!==t.fallback,this.fallback&&(e="hash"),et||(e="abstract"),this.mode=e,e){case"history":this.history=new Bt(this,t.base);break;case"hash":this.history=new Mt(this,t.base,this.fallback);break;case"abstract":this.history=new Jt(this,t.base)}},Yt={currentRoute:{configurable:!0}};Wt.prototype.match=function(t,e,r){return this.matcher.match(t,e,r)},Yt.currentRoute.get=function(){return this.history&&this.history.current},Wt.prototype.init=function(t){var e=this;if(this.apps.push(t),t.$once("hook:destroyed",(function(){var r=e.apps.indexOf(t);r>-1&&e.apps.splice(r,1),e.app===t&&(e.app=e.apps[0]||null),e.app||e.history.teardown()})),!this.app){this.app=t;var r=this.history;if(r instanceof Bt||r instanceof Mt){var n=function(t){r.setupListeners(),function(t){var n=r.current,o=e.options.scrollBehavior;xt&&o&&"fullPath"in t&&ft(e,t,n,!1)}(t)};r.transitionTo(r.getCurrentLocation(),n,n)}r.listen((function(t){e.apps.forEach((function(e){e._route=t}))}))}},Wt.prototype.beforeEach=function(t){return Xt(this.beforeHooks,t)},Wt.prototype.beforeResolve=function(t){return Xt(this.resolveHooks,t)},Wt.prototype.afterEach=function(t){return Xt(this.afterHooks,t)},Wt.prototype.onReady=function(t,e){this.history.onReady(t,e)},Wt.prototype.onError=function(t){this.history.onError(t)},Wt.prototype.push=function(t,e,r){var n=this;if(!e&&!r&&"undefined"!=typeof Promise)return new Promise((function(e,r){n.history.push(t,e,r)}));this.history.push(t,e,r)},Wt.prototype.replace=function(t,e,r){var n=this;if(!e&&!r&&"undefined"!=typeof Promise)return new Promise((function(e,r){n.history.replace(t,e,r)}));this.history.replace(t,e,r)},Wt.prototype.go=function(t){this.history.go(t)},Wt.prototype.back=function(){this.go(-1)},Wt.prototype.forward=function(){this.go(1)},Wt.prototype.getMatchedComponents=function(t){var e=t?t.matched?t:this.resolve(t).route:this.currentRoute;return e?[].concat.apply([],e.matched.map((function(t){return Object.keys(t.components).map((function(e){return t.components[e]}))}))):[]},Wt.prototype.resolve=function(t,e,r){var n=W(t,e=e||this.history.current,r,this),o=this.match(n,e),i=o.redirectedFrom||o.fullPath,s=function(t,e,r){var n="hash"===r?"#"+e:e;return t?U(t+"/"+n):n}(this.history.base,i,this.mode);return{location:n,route:o,href:s,normalizedTo:n,resolved:o}},Wt.prototype.getRoutes=function(){return this.matcher.getRoutes()},Wt.prototype.addRoute=function(t,e){this.matcher.addRoute(t,e),this.history.current!==x&&this.history.transitionTo(this.history.getCurrentLocation())},Wt.prototype.addRoutes=function(t){this.matcher.addRoutes(t),this.history.current!==x&&this.history.transitionTo(this.history.getCurrentLocation())},Object.defineProperties(Wt.prototype,Yt);var Qt=Wt;function Xt(t,e){return t.push(e),function(){var r=t.indexOf(e);r>-1&&t.splice(r,1)}}Wt.install=function t(e){if(!t.installed||Y!==e){t.installed=!0,Y=e;var r=function(t){return void 0!==t},n=function(t,e){var n=t.$options._parentVnode;r(n)&&r(n=n.data)&&r(n=n.registerRouteInstance)&&n(t,e)};e.mixin({beforeCreate:function(){r(this.$options.router)?(this._routerRoot=this,this._router=this.$options.router,this._router.init(this),e.util.defineReactive(this,"_route",this._router.history.current)):this._routerRoot=this.$parent&&this.$parent._routerRoot||this,n(this,this)},destroyed:function(){n(this)}}),Object.defineProperty(e.prototype,"$router",{get:function(){return this._routerRoot._router}}),Object.defineProperty(e.prototype,"$route",{get:function(){return this._routerRoot._route}}),e.component("RouterView",R),e.component("RouterLink",X);var o=e.config.optionMergeStrategies;o.beforeRouteEnter=o.beforeRouteLeave=o.beforeRouteUpdate=o.created}},Wt.version="3.6.5",Wt.isNavigationFailure=Nt,Wt.NavigationFailureType=It,Wt.START_LOCATION=x,et&&window.Vue&&window.Vue.use(Wt);var Zt=o(99498),te=o(92973),ee=o(95353),re=o(26287),ne=o(36124);o(51257);const oe=function(t){return t.replace(/\/$/,"")},ie=()=>(0,ne.C)(),se=(t,e)=>re.A.get(oe(t),e),ae=(t,e)=>re.A.post(oe(t),e),ue=(t,e)=>re.A.put(oe(t),e),ce=(t,e)=>re.A.delete(oe(t),{params:e});var pe=o(87485),de=o(58692),le=o(35810),he=o(96763);const fe=function(t,e){return 1===e?t.sort(((t,e)=>t.usercount-t.disabledt.name.localeCompare(e.name)))},me={id:"",name:"",usercount:0,disabled:0,canAdd:!0,canRemove:!0},ge={appendUsers(t,e){const r=t.users.map((t=>{let{id:e}=t;return e})),n=Object.values(e).filter((t=>{let{id:e}=t;return!r.includes(e)})),o=t.users.concat(n);t.usersOffset+=t.usersLimit,t.users=o},updateDisabledUsers(t,e){t.disabledUsersOffset+=t.disabledUsersLimit},setPasswordPolicyMinLength(t,e){t.minPasswordLength=""!==e?e:0},initGroups(t,e){let{groups:r,orderBy:n,userCount:o}=e;t.groups=r.map((t=>Object.assign({},me,t))),t.orderBy=n,t.userCount=o,t.groups=fe(t.groups,t.orderBy)},addGroup(t,e){let{gid:r,displayName:n}=e;try{if(void 0!==t.groups.find((t=>t.id===r)))return;const e=Object.assign({},me,{id:r,name:n});t.groups.unshift(e),t.groups=fe(t.groups,t.orderBy)}catch(t){he.error("Can't create group",t)}},renameGroup(t,e){let{gid:r,displayName:n}=e;const o=t.groups.findIndex((t=>t.id===r));if(o>=0){const e=t.groups[o];e.name=n,t.groups.splice(o,1,e),t.groups=fe(t.groups,t.orderBy)}},removeGroup(t,e){const r=t.groups.findIndex((t=>t.id===e));r>=0&&t.groups.splice(r,1)},addUserGroup(t,e){let{userid:r,gid:n}=e;const o=t.groups.find((t=>t.id===n)),i=t.users.find((t=>t.id===r));o&&i.enabled&&t.userCount>0&&o.usercount++,i.groups.push(n),t.groups=fe(t.groups,t.orderBy)},removeUserGroup(t,e){let{userid:r,gid:n}=e;const o=t.groups.find((t=>t.id===n)),i=t.users.find((t=>t.id===r));o&&i.enabled&&t.userCount>0&&o.usercount--;const s=i.groups;s.splice(s.indexOf(n),1),t.groups=fe(t.groups,t.orderBy)},addUserSubAdmin(t,e){let{userid:r,gid:n}=e;t.users.find((t=>t.id===r)).subadmin.push(n)},removeUserSubAdmin(t,e){let{userid:r,gid:n}=e;const o=t.users.find((t=>t.id===r)).subadmin;o.splice(o.indexOf(n),1)},deleteUser(t,e){const r=t.users.findIndex((t=>t.id===e));this.commit("updateUserCounts",{user:t.users[r],actionType:"remove"}),t.users.splice(r,1)},addUserData(t,e){const r=e.data.ocs.data;t.users.unshift(r),this.commit("updateUserCounts",{user:r,actionType:"create"})},enableDisableUser(t,e){let{userid:r,enabled:n}=e;const o=t.users.find((t=>t.id===r));o.enabled=n,this.commit("updateUserCounts",{user:o,actionType:n?"enable":"disable"})},updateUserCounts(t,e){let{user:r,actionType:n}=e;if(0===t.userCount)return;const o=t.groups.find((t=>"disabled"===t.id));switch(n){case"enable":case"disable":o.usercount+=r.enabled?-1:1,t.userCount+=r.enabled?1:-1,r.groups.forEach((e=>{t.groups.find((t=>t.id===e)).disabled+=r.enabled?-1:1}));break;case"create":t.userCount++,r.groups.forEach((e=>{t.groups.find((t=>t.id===e)).usercount++}));break;case"remove":r.enabled?(t.userCount--,r.groups.forEach((e=>{const r=t.groups.find((t=>t.id===e));r?r.usercount--:he.warn("User group "+e+" does not exist during user removal")}))):(o.usercount--,r.groups.forEach((e=>{t.groups.find((t=>t.id===e)).disabled--})));break;default:de.A.error("Unknown action type in updateUserCounts: '".concat(n,"'"))}},setUserData(t,e){let{userid:r,key:n,value:o}=e;if("quota"===n){const e=(0,le.lT)(o,!0);t.users.find((t=>t.id===r))[n][n]=null!==e?e:o}else t.users.find((t=>t.id===r))[n]=o},resetUsers(t){t.users=[],t.usersOffset=0,t.disabledUsersOffset=0},setShowConfig(t,e){let{key:r,value:n}=e;t.showConfig[r]=n}},ye=re.A.CancelToken;let ve=null;const be={state:{users:[],groups:[],orderBy:1,minPasswordLength:0,usersOffset:0,usersLimit:25,disabledUsersOffset:0,disabledUsersLimit:25,userCount:0,showConfig:{showStoragePath:!1,showUserBackend:!1,showLastLogin:!1,showNewUserForm:!1,showLanguages:!1}},mutations:ge,getters:{getUsers:t=>t.users,getGroups:t=>t.groups,getSubadminGroups:t=>t.groups.filter((t=>"admin"!==t.id&&"disabled"!==t.id)),getPasswordPolicyMinLength:t=>t.minPasswordLength,getUsersOffset:t=>t.usersOffset,getUsersLimit:t=>t.usersLimit,getDisabledUsersOffset:t=>t.disabledUsersOffset,getDisabledUsersLimit:t=>t.disabledUsersLimit,getUserCount:t=>t.userCount,getShowConfig:t=>t.showConfig},actions:{searchUsers(t,e){let{offset:r,limit:n,search:o}=e;return o="string"==typeof o?o:"",se((0,Zt.KT)("cloud/users/details?offset={offset}&limit={limit}&search={search}",{offset:r,limit:n,search:o})).catch((e=>{re.A.isCancel(e)||t.commit("API_FAILURE",e)}))},getUser:(t,e)=>se((0,Zt.KT)("cloud/users/".concat(e))).catch((e=>{re.A.isCancel(e)||t.commit("API_FAILURE",e)})),getUsers(t,e){let{offset:r,limit:n,search:o,group:i}=e;return ve&&ve.cancel("Operation canceled by another search request."),ve=ye.source(),o="string"==typeof o?o:"",o=o.replace(/in:[^\s]+/g,"").trim(),i="string"==typeof i?i:"",""!==i?se((0,Zt.KT)("cloud/groups/{group}/users/details?offset={offset}&limit={limit}&search={search}",{group:encodeURIComponent(i),offset:r,limit:n,search:o}),{cancelToken:ve.token}).then((e=>{const r=Object.keys(e.data.ocs.data.users).length;return r>0&&t.commit("appendUsers",e.data.ocs.data.users),r})).catch((e=>{re.A.isCancel(e)||t.commit("API_FAILURE",e)})):se((0,Zt.KT)("cloud/users/details?offset={offset}&limit={limit}&search={search}",{offset:r,limit:n,search:o}),{cancelToken:ve.token}).then((e=>{const r=Object.keys(e.data.ocs.data.users).length;return r>0&&t.commit("appendUsers",e.data.ocs.data.users),r})).catch((e=>{re.A.isCancel(e)||t.commit("API_FAILURE",e)}))},async getDisabledUsers(t,e){let{offset:r,limit:n,search:o}=e;const i=(0,Zt.KT)("cloud/users/disabled?offset={offset}&limit={limit}&search={search}",{offset:r,limit:n,search:o});try{const e=await se(i),r=Object.keys(e.data.ocs.data.users).length;return r>0&&(t.commit("appendUsers",e.data.ocs.data.users),t.commit("updateDisabledUsers",e.data.ocs.data.users)),r}catch(e){t.commit("API_FAILURE",e)}},getGroups(t,e){let{offset:r,limit:n,search:o}=e;o="string"==typeof o?o:"";const i=-1===n?"":"&limit=".concat(n);return se((0,Zt.KT)("cloud/groups?offset={offset}&search={search}",{offset:r,search:o})+i).then((e=>Object.keys(e.data.ocs.data.groups).length>0&&(e.data.ocs.data.groups.forEach((function(e){t.commit("addGroup",{gid:e,displayName:e})})),!0))).catch((e=>t.commit("API_FAILURE",e)))},getUsersFromList(t,e){let{offset:r,limit:n,search:o}=e;return o="string"==typeof o?o:"",se((0,Zt.KT)("cloud/users/details?offset={offset}&limit={limit}&search={search}",{offset:r,limit:n,search:o})).then((e=>Object.keys(e.data.ocs.data.users).length>0&&(t.commit("appendUsers",e.data.ocs.data.users),!0))).catch((e=>t.commit("API_FAILURE",e)))},getUsersFromGroup(t,e){let{groupid:r,offset:n,limit:o}=e;return se((0,Zt.KT)("cloud/users/{groupId}/details?offset={offset}&limit={limit}",{groupId:encodeURIComponent(r),offset:n,limit:o})).then((e=>t.commit("getUsersFromList",e.data.ocs.data.users))).catch((e=>t.commit("API_FAILURE",e)))},getPasswordPolicyMinLength:t=>!(!(0,pe.F)().password_policy||!(0,pe.F)().password_policy.minLength)&&(t.commit("setPasswordPolicyMinLength",(0,pe.F)().password_policy.minLength),(0,pe.F)().password_policy.minLength),addGroup:(t,e)=>ie().then((r=>ae((0,Zt.KT)("cloud/groups"),{groupid:e}).then((r=>(t.commit("addGroup",{gid:e,displayName:e}),{gid:e,displayName:e}))).catch((t=>{throw t})))).catch((r=>{throw t.commit("API_FAILURE",{gid:e,error:r}),r})),renameGroup(t,e){let{groupid:r,displayName:n}=e;return ie().then((e=>ue((0,Zt.KT)("cloud/groups/{groupId}",{groupId:encodeURIComponent(r)}),{key:"displayname",value:n}).then((e=>(t.commit("renameGroup",{gid:r,displayName:n}),{groupid:r,displayName:n}))).catch((t=>{throw t})))).catch((e=>{throw t.commit("API_FAILURE",{groupid:r,error:e}),e}))},removeGroup:(t,e)=>ie().then((r=>ce((0,Zt.KT)("cloud/groups/{groupId}",{groupId:encodeURIComponent(e)})).then((r=>t.commit("removeGroup",e))).catch((t=>{throw t})))).catch((r=>t.commit("API_FAILURE",{gid:e,error:r}))),addUserGroup(t,e){let{userid:r,gid:n}=e;return ie().then((e=>ae((0,Zt.KT)("cloud/users/{userid}/groups",{userid:r}),{groupid:n}).then((e=>t.commit("addUserGroup",{userid:r,gid:n}))).catch((t=>{throw t})))).catch((e=>t.commit("API_FAILURE",{userid:r,error:e})))},removeUserGroup(t,e){let{userid:r,gid:n}=e;return ie().then((e=>ce((0,Zt.KT)("cloud/users/{userid}/groups",{userid:r}),{groupid:n}).then((e=>t.commit("removeUserGroup",{userid:r,gid:n}))).catch((t=>{throw t})))).catch((e=>{throw t.commit("API_FAILURE",{userid:r,error:e}),e}))},addUserSubAdmin(t,e){let{userid:r,gid:n}=e;return ie().then((e=>ae((0,Zt.KT)("cloud/users/{userid}/subadmins",{userid:r}),{groupid:n}).then((e=>t.commit("addUserSubAdmin",{userid:r,gid:n}))).catch((t=>{throw t})))).catch((e=>t.commit("API_FAILURE",{userid:r,error:e})))},removeUserSubAdmin(t,e){let{userid:r,gid:n}=e;return ie().then((e=>ce((0,Zt.KT)("cloud/users/{userid}/subadmins",{userid:r}),{groupid:n}).then((e=>t.commit("removeUserSubAdmin",{userid:r,gid:n}))).catch((t=>{throw t})))).catch((e=>t.commit("API_FAILURE",{userid:r,error:e})))},wipeUserDevices:(t,e)=>ie().then((t=>ae((0,Zt.KT)("cloud/users/{userid}/wipe",{userid:e})).catch((t=>{throw t})))).catch((r=>t.commit("API_FAILURE",{userid:e,error:r}))),deleteUser:(t,e)=>ie().then((r=>ce((0,Zt.KT)("cloud/users/{userid}",{userid:e})).then((r=>t.commit("deleteUser",e))).catch((t=>{throw t})))).catch((r=>t.commit("API_FAILURE",{userid:e,error:r}))),addUser(t,e){let{commit:r,dispatch:n}=t,{userid:o,password:i,displayName:s,email:a,groups:u,subadmin:c,quota:p,language:d,manager:l}=e;return ie().then((t=>ae((0,Zt.KT)("cloud/users"),{userid:o,password:i,displayName:s,email:a,groups:u,subadmin:c,quota:p,language:d,manager:l}).then((t=>n("addUserData",o||t.data.ocs.data.id))).catch((t=>{throw t})))).catch((t=>{throw r("API_FAILURE",{userid:o,error:t}),t}))},addUserData:(t,e)=>ie().then((r=>se((0,Zt.KT)("cloud/users/{userid}",{userid:e})).then((e=>t.commit("addUserData",e))).catch((t=>{throw t})))).catch((r=>t.commit("API_FAILURE",{userid:e,error:r}))),enableDisableUser(t,e){let{userid:r,enabled:n=!0}=e;const o=n?"enable":"disable";return ie().then((e=>ue((0,Zt.KT)("cloud/users/{userid}/{userStatus}",{userid:r,userStatus:o})).then((e=>t.commit("enableDisableUser",{userid:r,enabled:n}))).catch((t=>{throw t})))).catch((e=>t.commit("API_FAILURE",{userid:r,error:e})))},setUserData(t,e){let{userid:r,key:n,value:o}=e;const i=["email","displayname","manager"];return-1!==["email","language","quota","displayname","password","manager"].indexOf(n)&&"string"==typeof o&&(-1===i.indexOf(n)&&o.length>0||-1!==i.indexOf(n))?ie().then((e=>ue((0,Zt.KT)("cloud/users/{userid}",{userid:r}),{key:n,value:o}).then((e=>t.commit("setUserData",{userid:r,key:n,value:o}))).catch((t=>{throw t})))).catch((e=>t.commit("API_FAILURE",{userid:r,error:e}))):Promise.reject(new Error("Invalid request data"))},sendWelcomeMail:(t,e)=>ie().then((t=>ae((0,Zt.KT)("cloud/users/{userid}/welcome",{userid:e})).then((t=>!0)).catch((t=>{throw t})))).catch((r=>t.commit("API_FAILURE",{userid:e,error:r})))}};var we=o(85168),Ae=o(96763);const Ee={APPS_API_FAILURE(e,r){(0,we.Qg)(t("settings","An error occurred during the request. Unable to proceed.")+"
"+r.error.response.data.data.message,{isHTML:!0}),Ae.error(e,r)},initCategories(t,e){let{categories:r,updateCount:n}=e;t.categories=r,t.updateCount=n},updateCategories(t,e){t.gettingCategoriesPromise=e},setUpdateCount(t,e){t.updateCount=e},addCategory(t,e){t.categories.push(e)},appendCategories(t,e){t.categories=e},setAllApps(t,e){t.apps=e},setError(t,e){let{appId:r,error:n}=e;Array.isArray(r)||(r=[r]),r.forEach((e=>{t.apps.find((t=>t.id===e)).error=n}))},clearError(t,e){let{appId:r,error:n}=e;t.apps.find((t=>t.id===r)).error=null},enableApp(t,e){let{appId:r,groups:n}=e;const o=t.apps.find((t=>t.id===r));o.active=!0,o.groups=n},disableApp(t,e){const r=t.apps.find((t=>t.id===e));r.active=!1,r.groups=[],r.removable&&(r.canUnInstall=!0)},uninstallApp(t,e){t.apps.find((t=>t.id===e)).active=!1,t.apps.find((t=>t.id===e)).groups=[],t.apps.find((t=>t.id===e)).needsDownload=!0,t.apps.find((t=>t.id===e)).installed=!1,t.apps.find((t=>t.id===e)).canUnInstall=!1,t.apps.find((t=>t.id===e)).canInstall=!0},updateApp(t,e){const r=t.apps.find((t=>t.id===e)),n=r.update;r.update=null,r.version=n,t.updateCount--},resetApps(t){t.apps=[]},reset(t){t.apps=[],t.categories=[],t.updateCount=0},startLoading(t,e){Array.isArray(e)?e.forEach((e=>{i.Ay.set(t.loading,e,!0)})):i.Ay.set(t.loading,e,!0)},stopLoading(t,e){Array.isArray(e)?e.forEach((e=>{i.Ay.set(t.loading,e,!1)})):i.Ay.set(t.loading,e,!1)}},xe={enableApp(e,r){let n,{appId:o,groups:i}=r;return n=Array.isArray(o)?o:[o],ie().then((r=>(e.commit("startLoading",n),e.commit("startLoading","install"),ae((0,Zt.Jv)("settings/apps/enable"),{appIds:n,groups:i}).then((r=>(e.commit("stopLoading",n),e.commit("stopLoading","install"),n.forEach((t=>{e.commit("enableApp",{appId:t,groups:i})})),se((0,Zt.Jv)("apps/files/")).then((()=>{r.data.update_required&&((0,we.cf)(t("settings","The app has been enabled but needs to be updated. You will be redirected to the update page in 5 seconds."),{onClick:()=>window.location.reload(),close:!1}),setTimeout((function(){location.reload()}),5e3))})).catch((()=>{Array.isArray(o)||((0,we.Qg)(t("settings","Error: This app cannot be enabled because it makes the server unstable")),e.commit("setError",{appId:n,error:t("settings","Error: This app cannot be enabled because it makes the server unstable")}),e.dispatch("disableApp",{appId:o}))}))))).catch((t=>{e.commit("stopLoading",n),e.commit("stopLoading","install"),e.commit("setError",{appId:n,error:t.response.data.data.message}),e.commit("APPS_API_FAILURE",{appId:o,error:t})}))))).catch((t=>e.commit("API_FAILURE",{appId:o,error:t})))},forceEnableApp(t,e){let r,{appId:n,groups:o}=e;return r=Array.isArray(n)?n:[n],ie().then((()=>(t.commit("startLoading",r),t.commit("startLoading","install"),ae((0,Zt.Jv)("settings/apps/force"),{appId:n}).then((t=>{location.reload()})).catch((e=>{t.commit("stopLoading",r),t.commit("stopLoading","install"),t.commit("setError",{appId:r,error:e.response.data.data.message}),t.commit("APPS_API_FAILURE",{appId:n,error:e})}))))).catch((e=>t.commit("API_FAILURE",{appId:n,error:e})))},disableApp(t,e){let r,{appId:n}=e;return r=Array.isArray(n)?n:[n],ie().then((e=>(t.commit("startLoading",r),ae((0,Zt.Jv)("settings/apps/disable"),{appIds:r}).then((e=>(t.commit("stopLoading",r),r.forEach((e=>{t.commit("disableApp",e)})),!0))).catch((e=>{t.commit("stopLoading",r),t.commit("APPS_API_FAILURE",{appId:n,error:e})}))))).catch((e=>t.commit("API_FAILURE",{appId:n,error:e})))},uninstallApp(t,e){let{appId:r}=e;return ie().then((e=>(t.commit("startLoading",r),se((0,Zt.Jv)("settings/apps/uninstall/".concat(r))).then((e=>(t.commit("stopLoading",r),t.commit("uninstallApp",r),!0))).catch((e=>{t.commit("stopLoading",r),t.commit("APPS_API_FAILURE",{appId:r,error:e})}))))).catch((e=>t.commit("API_FAILURE",{appId:r,error:e})))},updateApp(t,e){let{appId:r}=e;return ie().then((e=>(t.commit("startLoading",r),t.commit("startLoading","install"),se((0,Zt.Jv)("settings/apps/update/".concat(r))).then((e=>(t.commit("stopLoading","install"),t.commit("stopLoading",r),t.commit("updateApp",r),!0))).catch((e=>{t.commit("stopLoading",r),t.commit("stopLoading","install"),t.commit("APPS_API_FAILURE",{appId:r,error:e})}))))).catch((e=>t.commit("API_FAILURE",{appId:r,error:e})))},getAllApps:t=>(t.commit("startLoading","list"),se((0,Zt.Jv)("settings/apps/list")).then((e=>(t.commit("setAllApps",e.data.apps),t.commit("stopLoading","list"),!0))).catch((e=>t.commit("API_FAILURE",e)))),async getCategories(t){let{shouldRefetchCategories:e=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e||!t.state.gettingCategoriesPromise){t.commit("startLoading","categories");try{const e=se((0,Zt.Jv)("settings/apps/categories"));t.commit("updateCategories",e);const r=await e;return r.data.length>0?(t.commit("appendCategories",r.data),t.commit("stopLoading","categories"),!0):(t.commit("stopLoading","categories"),!1)}catch(e){t.commit("API_FAILURE",e)}}return t.state.gettingCategoriesPromise}},_e={state:{apps:[],categories:[],updateCount:0,loading:{},loadingList:!1,gettingCategoriesPromise:null},mutations:Ee,getters:{loading:t=>function(e){return t.loading[e]},getCategories:t=>t.categories,getAllApps:t=>t.apps,getUpdateCount:t=>t.updateCount,getCategoryById:t=>e=>t.categories.find((t=>t.id===e))},actions:xe},Pe={state:{serverData:{}},mutations:{setServerData(t,e){t.serverData=e}},getters:{getServerData:t=>t.serverData},actions:{}},Ie={state:{},mutations:{},getters:{},actions:{setAppConfig(t,e){let{app:r,key:n,value:o}=e;return ie().then((t=>ae((0,Zt.KT)("apps/provisioning_api/api/v1/config/apps/{app}/{key}",{app:r,key:n}),{value:o}).catch((t=>{throw t})))).catch((e=>t.commit("API_FAILURE",{app:r,key:n,value:o,error:e})))}}};var Ce=o(96763);i.Ay.use(ee.Ay);const Le={API_FAILURE(e,r){try{const e=r.error.response.data.ocs.meta.message;(0,we.Qg)(t("settings","An error occurred during the request. Unable to proceed.")+"
"+e,{isHTML:!0})}catch(e){(0,we.Qg)(t("settings","An error occurred during the request. Unable to proceed."))}Ce.error(e,r)}},Re=new ee.il({modules:{users:be,apps:_e,settings:Pe,oc:Ie},strict:!1,mutations:Le});o(38613);const Oe=()=>Promise.all([o.e(4208),o.e(3239)]).then(o.bind(o,84380)),Ne=()=>Promise.all([o.e(4208),o.e(4529)]).then(o.bind(o,86470));i.Ay.use(Qt);const Ue=document.title,Te=new Qt({mode:"history",base:(0,Zt.Jv)(""),linkActiveClass:"active",routes:[{path:"/:index(index.php/)?settings/users",component:Oe,props:!0,name:"users",meta:{title:()=>t("settings","Active users")},children:[{path:":selectedGroup",name:"group",meta:{title:e=>"admin"===e.params.selectedGroup?t("settings","Admins"):"disabled"===e.params.selectedGroup?t("settings","Disabled users"):decodeURIComponent(e.params.selectedGroup)},component:Oe}]},{path:"/:index(index.php/)?settings/apps",component:Ne,props:!0,name:"apps",meta:{title:()=>t("settings","Your apps")},children:[{path:":category",name:"apps-category",meta:{title:async e=>{if("apps"===e.name)return t("settings","Your apps");if(te.l[e.params.category])return te.l[e.params.category];await Re.dispatch("getCategories");const r=Re.getters.getCategoryById(e.params.category);return r.displayName?r.displayName:void 0}},component:Ne,children:[{path:":id",name:"apps-details",component:Ne}]}]}]});Te.afterEach((async t=>{var e,r;const n=await(null===(e=(r=t.meta).title)||void 0===e?void 0:e.call(r,t));n?(document.title="".concat(n," - ").concat(Ue),function(t){const e=document.getElementById("page-heading-level-1");e&&(e.textContent=t)}(n)):document.title=Ue}));const ke=Te;i.Ay.use(s.Ay,{defaultHtml:!1}),(0,a.O)(Re,ke),o.nc=btoa(OC.requestToken),i.Ay.prototype.t=t,i.Ay.prototype.n=n,i.Ay.prototype.OC=OC,i.Ay.prototype.OCA=OCA,i.Ay.prototype.oc_userconfig=oc_userconfig,new i.Ay({router:ke,store:Re,render:t=>t(c)}).$mount("#content")},58723:(t,e)=>{function r(t,e){var n={name:t.name,path:t.path,hash:t.hash,query:t.query,params:t.params,fullPath:t.fullPath,meta:t.meta};return e&&(n.from=r(e)),Object.freeze(n)}e.O=function(t,e,n){var o=(n||{}).moduleName||"route";t.registerModule(o,{namespaced:!0,state:r(e.currentRoute),mutations:{ROUTE_CHANGED:function(e,n){t.state[o]=r(n.to,n.from)}}});var i,s=!1,a=t.watch((function(t){return t[o]}),(function(t){var r=t.fullPath;r!==i&&(null!=i&&(s=!0,e.push(t)),i=r)}),{sync:!0}),u=e.afterEach((function(e,r){s?s=!1:(i=e.fullPath,t.commit(o+"/ROUTE_CHANGED",{to:e,from:r}))}));return function(){null!=u&&u(),null!=a&&a(),t.unregisterModule(o)}}},35810:(t,e,r)=>{"use strict";r.d(e,{Al:()=>N,H4:()=>R,PY:()=>L,Q$:()=>O,R3:()=>b,VL:()=>v,lJ:()=>C,lT:()=>j,pt:()=>w,v7:()=>k});var n=r(21777),o=r(84697),i=r(43627),s=r(71089),a=r(66656),u=r(44719),c=r(36117),p=r(2568);const d=null===(l=(0,n.HW)())?(0,o.YK)().setApp("files").build():(0,o.YK)().setApp("files").setUid(l.uid).build();var l,h=(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))(h||{});const f=["d:getcontentlength","d:getcontenttype","d:getetag","d:getlastmodified","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"],m={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=[...f]),window._nc_dav_properties.map((t=>`<${t} />`)).join(" ")},y=function(){return void 0===window._nc_dav_namespaces&&(window._nc_dav_namespaces={...m}),Object.keys(window._nc_dav_namespaces).map((t=>`xmlns:${t}="${window._nc_dav_namespaces?.[t]}"`)).join(" ")},v=function(){return`\n\t\t\n\t\t\t\n\t\t\t\t${g()}\n\t\t\t\n\t\t`},b=function(t){return`\n\n\t\n\t\t\n\t\t\t\n\t\t\t\t${g()}\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t/files/${(0,n.HW)()?.uid}/\n\t\t\t\tinfinity\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\thttpd/unix-directory\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t0\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t${t}\n\t\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t100\n\t\t\t0\n\t\t\n\t\n`};var w=(t=>(t.Folder="folder",t.File="file",t))(w||{});const A=function(t,e){return null!==t.match(e)},E=(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.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>=h.NONE&&t.permissions<=h.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&&A(t.source,e)){const r=t.source.match(e)[0];if(!t.source.includes((0,i.join)(r,t.root)))throw new Error("The root must be relative to the service. e.g /files/emma")}if(t.status&&!Object.values(x).includes(t.status))throw new Error("Status must be a valid NodeStatus")};var x=(t=>(t.NEW="new",t.FAILED="failed",t.LOADING="loading",t.LOCKED="locked",t))(x||{});class _{_data;_attributes;_knownDavService=/(remote|public)\.php\/(web)?dav/i;readonlyAttributes=Object.entries(Object.getOwnPropertyDescriptors(_.prototype)).filter((t=>"function"==typeof t[1].get&&"__proto__"!==t[0])).map((t=>t[0]));handler={set:(t,e,r)=>!this.readonlyAttributes.includes(e)&&(this.updateMtime(),Reflect.set(t,e,r)),deleteProperty:(t,e)=>!this.readonlyAttributes.includes(e)&&(this.updateMtime(),Reflect.deleteProperty(t,e)),get:(t,e,r)=>this.readonlyAttributes.includes(e)?(d.warn(`Accessing "Node.attributes.${e}" is deprecated, access it directly on the Node instance.`),Reflect.get(this,e)):Reflect.get(t,e,r)};constructor(t,e){E(t,e||this._knownDavService),this._data={...t,attributes:{}},this._attributes=new Proxy(this._data.attributes,this.handler),this.update(t.attributes??{}),this._data.mtime=t.mtime,e&&(this._knownDavService=e)}get source(){return this._data.source.replace(/\/$/i,"")}get encodedSource(){const{origin:t}=new URL(this.source);return t+(0,s.O0)(this.source.slice(t.length))}get basename(){return(0,i.basename)(this.source)}get extension(){return(0,i.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),r=this.root.replace(/\/$/,"");return(0,i.dirname)(t.slice(e+r.length)||"/")}const t=new URL(this.source);return(0,i.dirname)(t.pathname)}get mime(){return this._data.mime}get mtime(){return this._data.mtime}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:h.NONE:h.READ}set permissions(t){this.updateMtime(),this._data.permissions=t}get owner(){return this.isDavRessource?this._data.owner:null}get isDavRessource(){return A(this.source,this._knownDavService)}get root(){return this._data.root?this._data.root.replace(/^(.+)\/$/,"$1"):this.isDavRessource&&(0,i.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),r=this.root.replace(/\/$/,"");return t.slice(e+r.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){E({...this._data,source:t},this._knownDavService),this._data.source=t,this.updateMtime()}rename(t){if(t.includes("/"))throw new Error("Invalid basename");this.move((0,i.dirname)(this.source)+"/"+t)}updateMtime(){this._data.mtime&&(this._data.mtime=new Date)}update(t){for(const[e,r]of Object.entries(t))try{void 0===r?delete this.attributes[e]:this.attributes[e]=r}catch(t){if(t instanceof TypeError)continue;throw t}}}class P extends _{get type(){return w.File}}class I extends _{constructor(t){super({...t,mime:"httpd/unix-directory"})}get type(){return w.Folder}get extension(){return null}get mime(){return"httpd/unix-directory"}}const C=`/files/${(0,n.HW)()?.uid}`,L=(0,a.dC)("dav"),R=function(t=L,e={}){const r=(0,u.UU)(t,{headers:e});function o(t){r.setHeaders({...e,"X-Requested-With":"XMLHttpRequest",requesttoken:t??""})}return(0,n.zo)(o),o((0,n.do)()),(0,u.Gu)().patch("fetch",((t,e)=>{const r=e.headers;return r?.method&&(e.method=r.method,delete r.method),fetch(t,e)})),r},O=(t,e="/",r=C)=>{const n=new AbortController;return new c.CancelablePromise((async(o,i,s)=>{s((()=>n.abort()));try{o((await t.getDirectoryContents(`${r}${e}`,{signal:n.signal,details:!0,data:`\n\t\t\n\t\t\t\n\t\t\t\t${g()}\n\t\t\t\n\t\t\t\n\t\t\t\t1\n\t\t\t\n\t\t`,headers:{method:"REPORT"},includeSelf:!0})).data.filter((t=>t.filename!==e)).map((t=>N(t,r))))}catch(t){i(t)}}))},N=function(t,e=C,r=L){let o=(0,n.HW)()?.uid;const i=document.querySelector("input#isPublic")?.value;if(i)o=o??document.querySelector("input#sharingUserId")?.value,o=o??"anonymous";else if(!o)throw new Error("No user id found");const s=t.props,a=function(t=""){let e=h.NONE;return t?((t.includes("C")||t.includes("K"))&&(e|=h.CREATE),t.includes("G")&&(e|=h.READ),(t.includes("W")||t.includes("N")||t.includes("V"))&&(e|=h.UPDATE),t.includes("D")&&(e|=h.DELETE),t.includes("R")&&(e|=h.SHARE),e):e}(s?.permissions),u=String(s?.["owner-id"]||o),c={id:s?.fileid||0,source:`${r}${t.filename}`,mtime:new Date(Date.parse(t.lastmod)),mime:t.mime||"application/octet-stream",size:s?.size||Number.parseInt(s.getcontentlength||"0"),permissions:a,owner:u,root:e,attributes:{...t,...s,hasPreview:s?.["has-preview"]}};return delete c.attributes?.props,"file"===t.type?new P(c):new I(c)};window._oc_config,window._oc_config?.blacklist_files_regex&&new RegExp(window._oc_config.blacklist_files_regex);const U=["B","KB","MB","GB","TB","PB"],T=["B","KiB","MiB","GiB","TiB","PiB"];function k(t,e=!1,r=!1,n=!1){r=r&&!n,"string"==typeof t&&(t=Number(t));let o=t>0?Math.floor(Math.log(t)/Math.log(n?1e3:1024)):0;o=Math.min((r?T.length:U.length)-1,o);const i=r?T[o]:U[o];let s=(t/Math.pow(n?1e3:1024,o)).toFixed(1);return!0===e&&0===o?("0.0"!==s?"< 1 ":"0 ")+(r?T[1]:U[1]):(s=o<2?parseFloat(s).toFixed(0):parseFloat(s).toLocaleString((0,p.lO)()),s+" "+i)}function j(t,e=!1){try{t=`${t}`.toLocaleLowerCase().replaceAll(/\s+/g,"").replaceAll(",",".")}catch(t){return null}const r=t.match(/^([0-9]*(\.[0-9]*)?)([kmgtp]?)(i?)b?$/);if(null===r||"."===r[1]||""===r[1])return null;const n=`${r[1]}`,o="i"===r[4]||e?1024:1e3;return Math.round(Number.parseFloat(n)*o**{"":0,k:1,m:2,g:3,t:4,p:5,e:6}[r[3]])}var S={};!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",r="["+e+"]["+e+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*",n=new RegExp("^"+r+"$");t.isExist=function(t){return void 0!==t},t.isEmptyObject=function(t){return 0===Object.keys(t).length},t.merge=function(t,e,r){if(e){const n=Object.keys(e),o=n.length;for(let i=0;i!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(t,e,r){return t}};F.buildOptions=function(t){return Object.assign({},$,t)},F.defaultOptions=$,!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 D={};function B(t,e,r){let n;const o={};for(let i=0;i0&&(o[e.textNodeName]=n):void 0!==n&&(o[e.textNodeName]=n),o}function q(t){const e=Object.keys(t);for(let t=0;t`,i=!1;continue}if(u===e.commentPropName){o+=n+`\x3c!--${a[u][0][e.textNodeName]}--\x3e`,i=!0;continue}if("?"===u[0]){const t=J(a[":@"],e),r="?xml"===u?"":n;let s=a[u][0][e.textNodeName];s=0!==s.length?" "+s:"",o+=r+`<${u}${s}${t}?>`,i=!0;continue}let p=n;""!==p&&(p+=e.indentBy);const d=n+`<${u}${J(a[":@"],e)}`,l=H(a[u],e,c,p);-1!==e.unpairedTags.indexOf(u)?e.suppressUnpairedNode?o+=d+">":o+=d+"/>":l&&0!==l.length||!e.suppressEmptyNode?l&&l.endsWith(">")?o+=d+`>${l}${n}`:(o+=d+">",l&&""!==n&&(l.includes("/>")||l.includes("`):o+=d+"/>",i=!0}return o}function z(t){const e=Object.keys(t);for(let r=0;r0&&e.processEntities)for(let r=0;r0&&(r="\n"),H(t,e,"",r)},X={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:"&"},{regex:new RegExp(">","g"),val:">"},{regex:new RegExp("<","g"),val:"<"},{regex:new RegExp("'","g"),val:"'"},{regex:new RegExp('"',"g"),val:"""}],processEntities:!0,stopNodes:[],oneListGroup:!1};function Z(t){this.options=Object.assign({},X,t),this.options.ignoreAttributes||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=rt),this.processTextOrObjNode=tt,this.options.format?(this.indentate=et,this.tagEndChar=">\n",this.newLine="\n"):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}function tt(t,e,r){const n=this.j2x(t,r+1);return void 0!==t[this.options.textNodeName]&&1===Object.keys(t).length?this.buildTextValNode(t[this.options.textNodeName],e,n.attrStr,r):this.buildObjectNode(n.val,e,n.attrStr,r)}function et(t){return this.options.indentBy.repeat(t)}function rt(t){return!(!t.startsWith(this.options.attributeNamePrefix)||t===this.options.textNodeName)&&t.substr(this.attrPrefixLen)}Z.prototype.build=function(t){return this.options.preserveOrder?Q(t,this.options):(Array.isArray(t)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(t={[this.options.arrayNodeName]:t}),this.j2x(t,0).val)},Z.prototype.j2x=function(t,e){let r="",n="";for(let o in t)if(Object.prototype.hasOwnProperty.call(t,o))if(void 0===t[o])this.isAttribute(o)&&(n+="");else if(null===t[o])this.isAttribute(o)?n+="":"?"===o[0]?n+=this.indentate(e)+"<"+o+"?"+this.tagEndChar:n+=this.indentate(e)+"<"+o+"/"+this.tagEndChar;else if(t[o]instanceof Date)n+=this.buildTextValNode(t[o],o,"",e);else if("object"!=typeof t[o]){const i=this.isAttribute(o);if(i)r+=this.buildAttrPairStr(i,""+t[o]);else if(o===this.options.textNodeName){let e=this.options.tagValueProcessor(o,""+t[o]);n+=this.replaceEntitiesValue(e)}else n+=this.buildTextValNode(t[o],o,"",e)}else if(Array.isArray(t[o])){const r=t[o].length;let i="";for(let s=0;s"+t+o}},Z.prototype.closeTag=function(t){let e="";return-1!==this.options.unpairedTags.indexOf(t)?this.options.suppressUnpairedNode||(e="/"):e=this.options.suppressEmptyNode?"/":`>`+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+r+"?"+this.tagEndChar;{let o=this.options.tagValueProcessor(e,t);return o=this.replaceEntitiesValue(o),""===o?this.indentate(n)+"<"+e+r+this.closeTag(e)+this.tagEndChar:this.indentate(n)+"<"+e+r+">"+o+"0&&this.options.processEntities)for(let e=0;e{if(!r){var i=1/0;for(p=0;p=o)&&Object.keys(a.O).every((t=>a.O[t](r[u])))?r.splice(u--,1):(s=!1,o0&&e[p-1][2]>o;p--)e[p]=e[p-1];e[p]=[r,n,o]},a.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return a.d(e,{a:e}),e},a.d=(t,e)=>{for(var r in e)a.o(e,r)&&!a.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},a.f={},a.e=t=>Promise.all(Object.keys(a.f).reduce(((e,r)=>(a.f[r](t,e),e)),[])),a.u=t=>(({3239:"settings-users",4529:"settings-apps-view"}[t]||t)+"-"+t+".js?v="+{1110:"2909496e7e35d6258214",3239:"840dea09a2ae7fa5cda6",4529:"1c12345652ab9d108a9c",8902:"bb2f9be8a039f8db7e58"}[t]),a.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),a.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r={},o="nextcloud:",a.l=(t,e,n,i)=>{if(r[t])r[t].push(e);else{var s,u;if(void 0!==n)for(var c=document.getElementsByTagName("script"),p=0;p{s.onerror=s.onload=null,clearTimeout(h);var o=r[t];if(delete r[t],s.parentNode&&s.parentNode.removeChild(s),o&&o.forEach((t=>t(n))),e)return e(n)},h=setTimeout(l.bind(null,void 0,{type:"timeout",target:s}),12e4);s.onerror=l.bind(null,s.onerror),s.onload=l.bind(null,s.onload),u&&document.head.appendChild(s)}},a.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},a.nmd=t=>(t.paths=[],t.children||(t.children=[]),t),a.j=2689,(()=>{var t;a.g.importScripts&&(t=a.g.location+"");var e=a.g.document;if(!t&&e&&(e.currentScript&&(t=e.currentScript.src),!t)){var r=e.getElementsByTagName("script");if(r.length)for(var n=r.length-1;n>-1&&(!t||!/^http(s?):/.test(t));)t=r[n--].src}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),a.p=t})(),(()=>{a.b=document.baseURI||self.location.href;var t={2689:0};a.f.j=(e,r)=>{var n=a.o(t,e)?t[e]:void 0;if(0!==n)if(n)r.push(n[2]);else{var o=new Promise(((r,o)=>n=t[e]=[r,o]));r.push(n[2]=o);var i=a.p+a.u(e),s=new Error;a.l(i,(r=>{if(a.o(t,e)&&(0!==(n=t[e])&&(t[e]=void 0),n)){var o=r&&("load"===r.type?"missing":r.type),i=r&&r.target&&r.target.src;s.message="Loading chunk "+e+" failed.\n("+o+": "+i+")",s.name="ChunkLoadError",s.type=o,s.request=i,n[1](s)}}),"chunk-"+e,e)}},a.O.j=e=>0===t[e];var e=(e,r)=>{var n,o,i=r[0],s=r[1],u=r[2],c=0;if(i.some((e=>0!==t[e]))){for(n in s)a.o(s,n)&&(a.m[n]=s[n]);if(u)var p=u(a)}for(e&&e(r);ca(32843)));u=a.O(u)})(); //# sourceMappingURL=settings-vue-settings-apps-users-management.js.map?v=c30c209153e9e9a49714