@sync-in/server 1.3.3 → 1.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/package.json +1 -1
- package/static/{chunk-TJICEVPI.js → chunk-2OSA27SE.js} +1 -1
- package/static/{chunk-W37K2YDS.js → chunk-2PQGH3LQ.js} +1 -1
- package/static/{chunk-HX6BM5E5.js → chunk-2QNFUN7G.js} +1 -1
- package/static/{chunk-MWMJMTGE.js → chunk-3XDVB3TW.js} +1 -1
- package/static/{chunk-67ENNMPZ.js → chunk-4RF354LU.js} +1 -1
- package/static/{chunk-4GYSKJJC.js → chunk-55WOZ7P6.js} +1 -1
- package/static/{chunk-6WROUPVQ.js → chunk-5SYLS7WR.js} +1 -1
- package/static/{chunk-3SC36MTD.js → chunk-6HV65OKG.js} +1 -1
- package/static/{chunk-NJVHZKGK.js → chunk-7XBZXSHI.js} +1 -1
- package/static/{chunk-UILGGLKW.js → chunk-AS7H5UIO.js} +1 -1
- package/static/{chunk-2AC4RLMK.js → chunk-BOIXDTUT.js} +1 -1
- package/static/{chunk-ZGLYEYWA.js → chunk-ESSY62VJ.js} +1 -1
- package/static/{chunk-RTHDK2Z7.js → chunk-GLAK4VQT.js} +1 -1
- package/static/{chunk-DZNKFVGE.js → chunk-GW5AVRYT.js} +1 -1
- package/static/{chunk-TECWTVNM.js → chunk-HPRC4PXX.js} +1 -1
- package/static/{chunk-Q2UU32ST.js → chunk-MLLPT7BU.js} +1 -1
- package/static/{chunk-JEF7STYA.js → chunk-MTBJHA2L.js} +1 -1
- package/static/{chunk-MGWQFMQF.js → chunk-Q35EEVWP.js} +1 -1
- package/static/{chunk-QNGY6EWB.js → chunk-Q7LN54AP.js} +1 -1
- package/static/{chunk-2FUMMTEK.js → chunk-QKELW3MH.js} +1 -1
- package/static/{chunk-QVWBPQWU.js → chunk-SOYI5P5A.js} +1 -1
- package/static/{chunk-WA2KMN23.js → chunk-W4LKCEBR.js} +1 -1
- package/static/{chunk-JOPTBE35.js → chunk-WWKXW4MM.js} +1 -1
- package/static/{chunk-SDYSHQI5.js → chunk-X2BMM3NY.js} +1 -1
- package/static/{chunk-OR75MKSH.js → chunk-X4CIBLP6.js} +1 -1
- package/static/{chunk-6QJL2YDQ.js → chunk-XQFA4DLU.js} +1 -1
- package/static/{chunk-X7LCJ4LA.js → chunk-YQGJX5R7.js} +1 -1
- package/static/{chunk-LHULGE6M.js → chunk-ZEZVOO4G.js} +1 -1
- package/static/{chunk-XCIDAKI5.js → chunk-ZJDBESQA.js} +1 -1
- package/static/index.html +1 -1
- package/static/{main-64E5RI2M.js → main-2GG5BCQL.js} +3 -3
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as m1}from"./chunk-RTHDK2Z7.js";import{c as d1}from"./chunk-JXZCNFW7.js";import{a as r1}from"./chunk-DZNKFVGE.js";import{a as n1,b as o1,c as a1,d as s1,e as l1,f as Qt,i as c1}from"./chunk-2AC4RLMK.js";import{b as u1,c as Jt,d as h1,e as Zt}from"./chunk-2FUMMTEK.js";import{a as f1,d as Et,g as ct}from"./chunk-W37K2YDS.js";import{f as Xt}from"./chunk-3SC36MTD.js";import{Aa as Yn,Ab as t1,Ba as Xn,Hb as Yt,Ib as W,Ja as nt,Jb as st,La as rt,Ma as Qn,O as Ve,Za as Ii,f as Rn,ib as Jn,kb as ot,mb as at,nb as Z,ob as Me,qb as Zn,xb as U,yb as e1,za as Kn}from"./chunk-4GYSKJJC.js";import{c as Ne,d as p1,h as He,m as lt}from"./chunk-ZZ3LHYOY.js";import{d as An}from"./chunk-J6YSVODR.js";import{$ as gn,$b as St,$c as Dn,Ab as xn,Ac as Ee,C as mn,Cb as b,Db as En,Dc as ke,Eb as u,Ed as In,Fb as Mn,Fd as ae,Ga as kt,Gb as Nn,Gf as Gn,Hb as yt,Hc as Ln,Ib as Vt,If as $n,Jb as _e,Jd as Pn,Je as Hn,Kb as xe,L as Ke,La as Mi,Lb as Ai,Ma as l,Mb as Pe,Mc as Ti,Na as Ni,Nb as q,Ob as Qe,Oc as jt,Pb as p,Qa as Xe,Qb as k,Rb as J,Re as Bn,Rf as qn,Sa as wi,Tb as Je,Ub as Ze,Vb as et,Wf as Wn,X as vn,Xa as D,Xb as tt,Xc as On,Ya as Cn,Za as Te,Zb as Di,Zc as oe,_a as yn,_b as Fe,_e as jn,ab as z,ad as Ut,bb as j,bc as wn,bf as Kt,ca as ye,cb as zi,cc as Ht,cg as i1,da as bn,dc as fe,ec as Bt,ed as Gt,f as pn,fc as _t,ha as h,hc as xt,jb as L,jd as $t,kb as O,ke as Fn,kf as Un,ma as _,na as x,nb as Sn,ob as _n,pb as f,pe as kn,qb as c,rb as d,sb as g,se as Vn,tb as Li,td as qt,u as hn,ub as Oi,v as Ei,va as Ft,wb as Ie,wd as Wt,xb as Re,xd as Tn,ya as Ye,yb as Se,yd as it,zb as F,zc as zn}from"./chunk-JQOMI5VI.js";import{a as Q,b as De}from"./chunk-RTRJ3KFH.js";var C0={prefix:"far",iconName:"bell",icon:[448,512,[128276,61602],"f0f3","M224 0c-13.3 0-24 10.7-24 24l0 9.7C118.6 45.3 56 115.4 56 200l0 14.5c0 37.7-10 74.7-29 107.3L5.1 359.2C1.8 365 0 371.5 0 378.2 0 399.1 16.9 416 37.8 416l372.4 0c20.9 0 37.8-16.9 37.8-37.8 0-6.7-1.8-13.3-5.1-19L421 321.7c-19-32.6-29-69.6-29-107.3l0-14.5c0-84.6-62.6-154.7-144-166.3l0-9.7c0-13.3-10.7-24-24-24zM392.4 368l-336.9 0 12.9-22.1C91.7 306 104 260.6 104 214.5l0-14.5c0-66.3 53.7-120 120-120s120 53.7 120 120l0 14.5c0 46.2 12.3 91.5 35.5 131.4L392.4 368zM156.1 464c9.9 28 36.6 48 67.9 48s58-20 67.9-48l-135.8 0z"]};var Ar={prefix:"far",iconName:"file-zipper",icon:[384,512,["file-archive"],"f1c6","M64 48l112 0 0 88c0 39.8 32.2 72 72 72l88 0 0 240c0 8.8-7.2 16-16 16L64 464c-8.8 0-16-7.2-16-16L48 64c0-8.8 7.2-16 16-16zM224 67.9l92.1 92.1-68.1 0c-13.3 0-24-10.7-24-24l0-68.1zM64 0C28.7 0 0 28.7 0 64L0 448c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-261.5c0-17-6.7-33.3-18.7-45.3L242.7 18.7C230.7 6.7 214.5 0 197.5 0L64 0zM80 104c0 13.3 10.7 24 24 24l16 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-16 0c-13.3 0-24 10.7-24 24zm0 80c0 13.3 10.7 24 24 24l32 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-32 0c-13.3 0-24 10.7-24 24zm64 56l-32 0c-17.7 0-32 14.3-32 32l0 48c0 26.5 21.5 48 48 48s48-21.5 48-48l0-48c0-17.7-14.3-32-32-32zm-16 64a16 16 0 1 1 0 32 16 16 0 1 1 0-32z"]},y0=Ar;var S0={prefix:"far",iconName:"clock",icon:[512,512,[128339,"clock-four"],"f017","M464 256a208 208 0 1 1 -416 0 208 208 0 1 1 416 0zM0 256a256 256 0 1 0 512 0 256 256 0 1 0 -512 0zM232 120l0 136c0 8 4 15.5 10.7 20l96 64c11 7.4 25.9 4.4 33.3-6.7s4.4-25.9-6.7-33.3L280 243.2 280 120c0-13.3-10.7-24-24-24s-24 10.7-24 24z"]};var ei={prefix:"far",iconName:"file",icon:[384,512,[128196,128459,61462],"f15b","M176 48L64 48c-8.8 0-16 7.2-16 16l0 384c0 8.8 7.2 16 16 16l256 0c8.8 0 16-7.2 16-16l0-240-88 0c-39.8 0-72-32.2-72-72l0-88zM316.1 160L224 67.9 224 136c0 13.3 10.7 24 24 24l68.1 0zM0 64C0 28.7 28.7 0 64 0L197.5 0c17 0 33.3 6.7 45.3 18.7L365.3 141.3c12 12 18.7 28.3 18.7 45.3L384 448c0 35.3-28.7 64-64 64L64 512c-35.3 0-64-28.7-64-64L0 64z"]};var _0={prefix:"far",iconName:"trash-can",icon:[448,512,[61460,"trash-alt"],"f2ed","M166.2-16c-13.3 0-25.3 8.3-30 20.8L120 48 24 48C10.7 48 0 58.7 0 72S10.7 96 24 96l400 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-96 0-16.2-43.2C307.1-7.7 295.2-16 281.8-16L166.2-16zM32 144l0 304c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-304-48 0 0 304c0 8.8-7.2 16-16 16L96 464c-8.8 0-16-7.2-16-16l0-304-48 0zm160 72c0-13.3-10.7-24-24-24s-24 10.7-24 24l0 176c0 13.3 10.7 24 24 24s24-10.7 24-24l0-176zm112 0c0-13.3-10.7-24-24-24s-24 10.7-24 24l0 176c0 13.3 10.7 24 24 24s24-10.7 24-24l0-176z"]};var x0={prefix:"far",iconName:"user",icon:[448,512,[128100,62144,62470,"user-alt","user-large"],"f007","M144 128a80 80 0 1 1 160 0 80 80 0 1 1 -160 0zm208 0a128 128 0 1 0 -256 0 128 128 0 1 0 256 0zM48 480c0-70.7 57.3-128 128-128l96 0c70.7 0 128 57.3 128 128l0 8c0 13.3 10.7 24 24 24s24-10.7 24-24l0-8c0-97.2-78.8-176-176-176l-96 0C78.8 304 0 382.8 0 480l0 8c0 13.3 10.7 24 24 24s24-10.7 24-24l0-8z"]};var E0={prefix:"far",iconName:"file-lines",icon:[384,512,[128441,128462,61686,"file-alt","file-text"],"f15c","M64 48l112 0 0 88c0 39.8 32.2 72 72 72l88 0 0 240c0 8.8-7.2 16-16 16L64 464c-8.8 0-16-7.2-16-16L48 64c0-8.8 7.2-16 16-16zM224 67.9l92.1 92.1-68.1 0c-13.3 0-24-10.7-24-24l0-68.1zM64 0C28.7 0 0 28.7 0 64L0 448c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-261.5c0-17-6.7-33.3-18.7-45.3L242.7 18.7C230.7 6.7 214.5 0 197.5 0L64 0zm56 256c-13.3 0-24 10.7-24 24s10.7 24 24 24l144 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-144 0zm0 96c-13.3 0-24 10.7-24 24s10.7 24 24 24l144 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-144 0z"]};var M0={prefix:"far",iconName:"comment-dots",icon:[512,512,[128172,62075,"commenting"],"f4ad","M0 240c0 54.4 19.3 104.6 51.9 144.9L3.1 474.3c-2 3.7-3.1 7.9-3.1 12.2 0 14.1 11.4 25.5 25.5 25.5 4 0 7.8-.6 11.5-2.1L153.4 460c31.4 12.9 66.1 20 102.6 20 141.4 0 256-107.5 256-240S397.4 0 256 0 0 107.5 0 240zM94 407.9c9.3-17.1 7.4-38.1-4.8-53.2-26.1-32.3-41.2-71.9-41.2-114.7 0-103.2 90.2-192 208-192s208 88.8 208 192-90.2 192-208 192c-30.2 0-58.7-5.9-84.3-16.4-11.9-4.9-25.3-4.8-37.1 .3L76 440.9 94 407.9zM144 272a32 32 0 1 0 0-64 32 32 0 1 0 0 64zm144-32a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zm80 32a32 32 0 1 0 0-64 32 32 0 1 0 0 64z"]};var N0={prefix:"far",iconName:"flag",icon:[448,512,[127988,61725],"f024","M48 24C48 10.7 37.3 0 24 0S0 10.7 0 24L0 488c0 13.3 10.7 24 24 24s24-10.7 24-24l0-100 80.3-20.1c41.1-10.3 84.6-5.5 122.5 13.4 44.2 22.1 95.5 24.8 141.7 7.4l34.7-13c12.5-4.7 20.8-16.6 20.8-30l0-279.7c0-23-24.2-38-44.8-27.7l-9.6 4.8c-46.3 23.2-100.8 23.2-147.1 0-35.1-17.6-75.4-22-113.5-12.5L48 52 48 24zm0 77.5l96.6-24.2c27-6.7 55.5-3.6 80.4 8.8 54.9 27.4 118.7 29.7 175 6.8l0 241.8-24.4 9.1c-33.7 12.6-71.2 10.7-103.4-5.4-48.2-24.1-103.3-30.1-155.6-17.1l-68.6 17.2 0-237z"]};var w0={prefix:"far",iconName:"window-restore",icon:[576,512,[],"f2d2","M512 80L224 80c-8.8 0-16 7.2-16 16l0 16-48 0 0-16c0-35.3 28.7-64 64-64l288 0c35.3 0 64 28.7 64 64l0 192c0 35.3-28.7 64-64 64l-48 0 0-48 48 0c8.8 0 16-7.2 16-16l0-192c0-8.8-7.2-16-16-16zM368 288l-320 0 0 128c0 8.8 7.2 16 16 16l288 0c8.8 0 16-7.2 16-16l0-128zM64 160l288 0c35.3 0 64 28.7 64 64l0 192c0 35.3-28.7 64-64 64L64 480c-35.3 0-64-28.7-64-64L0 224c0-35.3 28.7-64 64-64z"]};var v1={prefix:"far",iconName:"folder-closed",icon:[512,512,[],"e185","M448 400L64 400c-8.8 0-16-7.2-16-16l0-144 416 0 0 144c0 8.8-7.2 16-16 16zm16-208l-416 0 0-96c0-8.8 7.2-16 16-16l138.7 0c3.5 0 6.8 1.1 9.6 3.2L250.7 112c13.8 10.4 30.7 16 48 16L448 128c8.8 0 16 7.2 16 16l0 48zM64 448l384 0c35.3 0 64-28.7 64-64l0-240c0-35.3-28.7-64-64-64L298.7 80c-6.9 0-13.7-2.2-19.2-6.4L241.1 44.8C230 36.5 216.5 32 202.7 32L64 32C28.7 32 0 60.7 0 96L0 384c0 35.3 28.7 64 64 64z"]};var g1=(()=>{let e=class e{transform(i,r=0,o=void 0){return rt(i,r,o)}};e.\u0275fac=function(r){return new(r||e)},e.\u0275pipe=yn({name:"pathSlice",type:e,pure:!0});let t=e;return t})();var ki=function(t,e){return ki=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var r in i)i.hasOwnProperty(r)&&(n[r]=i[r])},ki(t,e)};function z1(t,e){ki(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}var K=function(){return K=Object.assign||function(e){for(var n,i=1,r=arguments.length;i<r;i++){n=arguments[i];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},K.apply(this,arguments)};function L1(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var i=n.call(t),r,o=[],a;try{for(;(e===void 0||e-- >0)&&!(r=i.next()).done;)o.push(r.value)}catch(s){a={error:s}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(a)throw a.error}}return o}function Vi(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(L1(arguments[e]));return t}var Dr="An invariant failed, however the error is obfuscated because this is an production build.",ni=[];Object.freeze(ni);var $i={};Object.freeze($i);var Tr={};function Hi(){return typeof window<"u"?window:typeof global<"u"?global:Tr}function Y(){return++v.mobxGuid}function T(t){throw Nt(!1,t),"X"}function Nt(t,e){if(!t)throw new Error("[mobx] "+(e||Dr))}var b1=[];function he(t,e){return!1}function qi(t){var e=!1;return function(){if(!e)return e=!0,t.apply(this,arguments)}}var C1=function(){};function Ir(t){var e=[];return t.forEach(function(n){e.indexOf(n)===-1&&e.push(n)}),e}function Wi(t){return t!==null&&typeof t=="object"}function pt(t){if(t===null||typeof t!="object")return!1;var e=Object.getPrototypeOf(t);return e===Object.prototype||e===null}function Rr(t){return ht(t)||qe(t)?t:Array.isArray(t)?new Map(t):pt(t)?new Map(Object.entries(t)):T("Cannot convert to map from '"+t+"'")}function Pr(t,e){for(var n=0;n<e.length;n++)Ge(t,e[n],t[e[n]])}function Ge(t,e,n){Object.defineProperty(t,e,{enumerable:!1,writable:!0,configurable:!0,value:n})}function Ot(t,e,n){Object.defineProperty(t,e,{enumerable:!1,writable:!1,configurable:!0,value:n})}function Oe(t,e){var n="isMobX"+t;return e.prototype[n]=!0,function(i){return Wi(i)&&i[n]===!0}}function Fr(t,e){return typeof t=="number"&&typeof e=="number"&&isNaN(t)&&isNaN(e)}function ht(t){return Hi().Map!==void 0&&t instanceof Hi().Map}function At(t){return t instanceof Set}function ft(t){for(var e=[];;){var n=t.next();if(n.done)break;e.push(n.value)}return e}function O1(){return typeof Symbol=="function"&&Symbol.toPrimitive||"@@toPrimitive"}function A1(t){return t===null?null:typeof t=="object"?""+t:t}function Ki(){return typeof Symbol=="function"&&Symbol.iterator||"@@iterator"}function Yi(t,e){Ot(t,Ki(),e)}function wt(t){return t[Ki()]=kr,t}function Xi(){return typeof Symbol=="function"&&Symbol.toStringTag||"@@toStringTag"}function kr(){return this}var ci=function(){function t(e){e===void 0&&(e="Atom@"+Y()),this.name=e,this.isPendingUnobservation=!1,this.isBeingObserved=!1,this.observers=[],this.observersIndexes={},this.diffValue=0,this.lastAccessedBy=0,this.lowestObserverState=w.NOT_TRACKING}return t.prototype.onBecomeUnobserved=function(){},t.prototype.onBecomeObserved=function(){},t.prototype.reportObserved=function(){return $1(this)},t.prototype.reportChanged=function(){me(),s2(this),ve()},t.prototype.toString=function(){return this.name},t}(),Qi=Oe("Atom",ci);function Vr(t,e,n){e===void 0&&(e=C1),n===void 0&&(n=C1);var i=new ci(t);return C2(i,e),X1(i,n),i}function D1(t,e){return t===e}function Hr(t,e){return tn(t,e)}function Br(t,e){return tn(t,e,1)}function jr(t,e){return Fr(t,e)||D1(t,e)}var ut={identity:D1,structural:Hr,default:jr,shallow:Br},Ur={},Gr={};function $r(t,e){var n=e?Ur:Gr;return n[t]||(n[t]={configurable:!0,enumerable:e,get:function(){return je(this),this[t]},set:function(i){je(this),this[t]=i}})}function je(t){if(t.__mobxDidRunLazyInitializers!==!0){var e=t.__mobxDecorators;if(e){Ge(t,"__mobxDidRunLazyInitializers",!0);for(var n in e){var i=e[n];i.propertyCreator(t,i.prop,i.descriptor,i.decoratorTarget,i.decoratorArguments)}}}}function T1(t,e){return function(){var i,r=function(a,s,m,C){if(C===!0)return e(a,s,m,a,i),null;if(!Object.prototype.hasOwnProperty.call(a,"__mobxDecorators")){var A=a.__mobxDecorators;Ge(a,"__mobxDecorators",K({},A))}return a.__mobxDecorators[s]={prop:s,propertyCreator:e,descriptor:m,decoratorTarget:a,decoratorArguments:i},$r(s,t)};return qr(arguments)?(i=ni,r.apply(null,arguments)):(i=Array.prototype.slice.call(arguments),r)}}function qr(t){return(t.length===2||t.length===3)&&typeof t[1]=="string"||t.length===4&&t[3]===!0}function Dt(t,e,n){return Z1(t)?t:Array.isArray(t)?E.array(t,{name:n}):pt(t)?E.object(t,void 0,{name:n}):ht(t)?E.map(t,{name:n}):At(t)?E.set(t,{name:n}):t}function Wr(t,e,n){return t==null||Lt(t)||pi(t)||qe(t)||vt(t)?t:Array.isArray(t)?E.array(t,{name:n,deep:!1}):pt(t)?E.object(t,void 0,{name:n,deep:!1}):ht(t)?E.map(t,{name:n,deep:!1}):At(t)?E.set(t,{name:n,deep:!1}):T(!1)}function zt(t){return t}function Kr(t,e,n){return tn(t,e)?e:t}function di(t){var e=T1(!0,function(i,r,o,a,s){var m=o?o.initializer?o.initializer.call(i):o.value:void 0;T2(i,r,m,t)}),n=(typeof process<"u"&&process.env,e);return n.enhancer=t,n}var I1={deep:!0,name:void 0,defaultDecorator:void 0},Yr={deep:!1,name:void 0,defaultDecorator:void 0};Object.freeze(I1);Object.freeze(Yr);function dt(t){return t==null?I1:typeof t=="string"?{name:t,deep:!0}:t}function ti(t){return t.defaultDecorator?t.defaultDecorator.enhancer:t.deep===!1?zt:Dt}var Ji=di(Dt),Xr=di(Wr),R1=di(zt),Qr=di(Kr);function Jr(t,e,n){if(typeof arguments[1]=="string")return Ji.apply(null,arguments);if(Z1(t))return t;var i=pt(t)?E.object(t,e,n):Array.isArray(t)?E.array(t,e):ht(t)?E.map(t,e):At(t)?E.set(t,e):t;if(i!==t)return i;T(!1)}var y1={box:function(t,e){arguments.length>2&&ue("box");var n=dt(e);return new ze(t,ti(n),n.name,!0,n.equals)},shallowBox:function(t,e){return arguments.length>2&&ue("shallowBox"),he("observable.shallowBox","observable.box(value, { deep: false })"),E.box(t,{name:e,deep:!1})},array:function(t,e){arguments.length>2&&ue("array");var n=dt(e);return new be(t,ti(n),n.name)},shallowArray:function(t,e){return arguments.length>2&&ue("shallowArray"),he("observable.shallowArray","observable.array(values, { deep: false })"),E.array(t,{name:e,deep:!1})},map:function(t,e){arguments.length>2&&ue("map");var n=dt(e);return new hi(t,ti(n),n.name)},shallowMap:function(t,e){return arguments.length>2&&ue("shallowMap"),he("observable.shallowMap","observable.map(values, { deep: false })"),E.map(t,{name:e,deep:!1})},set:function(t,e){arguments.length>2&&ue("set");var n=dt(e);return new mi(t,ti(n),n.name)},object:function(t,e,n){typeof arguments[1]=="string"&&ue("object");var i=dt(n);return y2({},t,e,i)},shallowObject:function(t,e){return typeof arguments[1]=="string"&&ue("shallowObject"),he("observable.shallowObject","observable.object(values, {}, { deep: false })"),E.object(t,{},{name:e,deep:!1})},ref:R1,shallow:Xr,deep:Ji,struct:Qr},E=Jr;Object.keys(y1).forEach(function(t){return E[t]=y1[t]});function ue(t){T("Expected one or two arguments to observable."+t+". Did you accidentally try to use observable."+t+" as decorator?")}var ri=T1(!1,function(t,e,n,i,r){var o=n.get,a=n.set,s=r[0]||{};I2(t,e,K({get:o,set:a},s))}),Zr=ri({equals:ut.structural}),R=function(e,n,i){if(typeof n=="string"||e!==null&&typeof e=="object"&&arguments.length===1)return ri.apply(null,arguments);var r=typeof n=="object"?n:{};return r.get=e,r.set=typeof n=="function"?n:r.set,r.name=r.name||e.name||"",new Le(r)};R.struct=Zr;var w=function(t){return t[t.NOT_TRACKING=-1]="NOT_TRACKING",t[t.UP_TO_DATE=0]="UP_TO_DATE",t[t.POSSIBLY_STALE=1]="POSSIBLY_STALE",t[t.STALE=2]="STALE",t}(w||{}),le=function(t){return t[t.NONE=0]="NONE",t[t.LOG=1]="LOG",t[t.BREAK=2]="BREAK",t}(le||{}),oi=function(){function t(e){this.cause=e}return t}();function Mt(t){return t instanceof oi}function Bi(t){switch(t.dependenciesState){case w.UP_TO_DATE:return!1;case w.NOT_TRACKING:case w.STALE:return!0;case w.POSSIBLY_STALE:{for(var e=mt(),n=t.observing,i=n.length,r=0;r<i;r++){var o=n[r];if(ui(o)){if(v.disableErrorBoundaries)o.get();else try{o.get()}catch{return we(e),!0}if(t.dependenciesState===w.STALE)return we(e),!0}}return H1(t),we(e),!1}}}function fi(t){var e=t.observers.length>0;v.computationDepth>0&&e&&T(!1),!v.allowStateChanges&&(e||v.enforceActions==="strict")&&T(!1)}function P1(t,e,n){var i=k1(!0);H1(t),t.newObserving=new Array(t.observing.length+100),t.unboundDepsCount=0,t.runId=++v.runId;var r=v.trackingDerivation;v.trackingDerivation=t;var o;if(v.disableErrorBoundaries===!0)o=e.call(n);else try{o=e.call(n)}catch(a){o=new oi(a)}return v.trackingDerivation=r,e2(t),t.observing.length===0&&void 0,V1(i),o}function e2(t){for(var e=t.observing,n=t.observing=t.newObserving,i=w.UP_TO_DATE,r=0,o=t.unboundDepsCount,a=0;a<o;a++){var s=n[a];s.diffValue===0&&(s.diffValue=1,r!==a&&(n[r]=s),r++),s.dependenciesState>i&&(i=s.dependenciesState)}for(n.length=r,t.newObserving=null,o=e.length;o--;){var s=e[o];s.diffValue===0&&U1(s,t),s.diffValue=0}for(;r--;){var s=n[r];s.diffValue===1&&(s.diffValue=0,a2(s,t))}i!==w.UP_TO_DATE&&(t.dependenciesState=i,t.onBecomeStale())}function ji(t){var e=t.observing;t.observing=[];for(var n=e.length;n--;)U1(e[n],t);t.dependenciesState=w.NOT_TRACKING}function F1(t){var e=mt(),n=t();return we(e),n}function mt(){var t=v.trackingDerivation;return v.trackingDerivation=null,t}function we(t){v.trackingDerivation=t}function k1(t){var e=v.allowStateReads;return v.allowStateReads=t,e}function V1(t){v.allowStateReads=t}function H1(t){if(t.dependenciesState!==w.UP_TO_DATE){t.dependenciesState=w.UP_TO_DATE;for(var e=t.observing,n=e.length;n--;)e[n].lowestObserverState=w.UP_TO_DATE}}var ai=0,t2=1;function Be(t,e){var n=function(){return i2(t,e,this,arguments)};return n.isMobxAction=!0,n}function i2(t,e,n,i){var r=n2(t,n,i);try{return e.apply(n,i)}catch(o){throw r.error=o,o}finally{r2(r)}}function n2(t,e,n){var i=B()&&!!t,r=0;if(i){r=Date.now();var o=n&&n.length||0,a=new Array(o);if(o>0)for(var s=0;s<o;s++)a[s]=n[s];ee({type:"action",name:t,object:e,arguments:a})}var m=mt();me();var C=B1(!0),A=k1(!0),X={prevDerivation:m,prevAllowStateChanges:C,prevAllowStateReads:A,notifySpy:i,startTime:r,actionId:t2++,parentActionId:ai};return ai=X.actionId,X}function r2(t){ai!==t.actionId&&T("invalid action stack. did you forget to finish an action?"),ai=t.parentActionId,t.error!==void 0&&(v.suppressReactionErrors=!0),j1(t.prevAllowStateChanges),V1(t.prevAllowStateReads),ve(),we(t.prevDerivation),t.notifySpy&&te({time:Date.now()-t.startTime}),v.suppressReactionErrors=!1}function B1(t){var e=v.allowStateChanges;return v.allowStateChanges=t,e}function j1(t){v.allowStateChanges=t}var ze=function(t){z1(e,t);function e(n,i,r,o,a){r===void 0&&(r="ObservableValue@"+Y()),o===void 0&&(o=!0),a===void 0&&(a=ut.default);var s=t.call(this,r)||this;return s.enhancer=i,s.name=r,s.equals=a,s.hasUnreportedChange=!1,s.value=i(n,void 0,r),o&&B()&&Ue({type:"create",name:s.name,newValue:""+s.value}),s}return e.prototype.dehanceValue=function(n){return this.dehancer!==void 0?this.dehancer(n):n},e.prototype.set=function(n){var i=this.value;if(n=this.prepareNewValue(n),n!==v.UNCHANGED){var r=B();r&&ee({type:"update",name:this.name,newValue:n,oldValue:i}),this.setNewValue(n),r&&te()}},e.prototype.prepareNewValue=function(n){if(fi(this),ce(this)){var i=de(this,{object:this,type:"update",newValue:n});if(!i)return v.UNCHANGED;n=i.newValue}return n=this.enhancer(n,this.value,this.name),this.equals(this.value,n)?v.UNCHANGED:n},e.prototype.setNewValue=function(n){var i=this.value;this.value=n,this.reportChanged(),ie(this)&&ne(this,{type:"update",object:this,newValue:n,oldValue:i})},e.prototype.get=function(){return this.reportObserved(),this.dehanceValue(this.value)},e.prototype.intercept=function(n){return It(this,n)},e.prototype.observe=function(n,i){return i&&n({object:this,type:"update",newValue:this.value,oldValue:void 0}),Rt(this,n)},e.prototype.toJSON=function(){return this.get()},e.prototype.toString=function(){return this.name+"["+this.value+"]"},e.prototype.valueOf=function(){return A1(this.get())},e}(ci);ze.prototype[O1()]=ze.prototype.valueOf;var A0=Oe("ObservableValue",ze),Le=function(){function t(e){this.dependenciesState=w.NOT_TRACKING,this.observing=[],this.newObserving=null,this.isBeingObserved=!1,this.isPendingUnobservation=!1,this.observers=[],this.observersIndexes={},this.diffValue=0,this.runId=0,this.lastAccessedBy=0,this.lowestObserverState=w.UP_TO_DATE,this.unboundDepsCount=0,this.__mapid="#"+Y(),this.value=new oi(null),this.isComputing=!1,this.isRunningSetter=!1,this.isTracing=le.NONE,this.derivation=e.get,this.name=e.name||"ComputedValue@"+Y(),e.set&&(this.setter=Be(this.name+"-setter",e.set)),this.equals=e.equals||(e.compareStructural||e.struct?ut.structural:ut.default),this.scope=e.context,this.requiresReaction=!!e.requiresReaction,this.keepAlive=!!e.keepAlive}return t.prototype.onBecomeStale=function(){c2(this)},t.prototype.onBecomeUnobserved=function(){},t.prototype.onBecomeObserved=function(){},t.prototype.get=function(){this.isComputing&&T("Cycle detected in computation "+this.name+": "+this.derivation),v.inBatch===0&&this.observers.length===0&&!this.keepAlive?Bi(this)&&(this.warnAboutUntrackedRead(),me(),this.value=this.computeValue(!1),ve()):($1(this),Bi(this)&&this.trackAndCompute()&&l2(this));var e=this.value;if(Mt(e))throw e.cause;return e},t.prototype.peek=function(){var e=this.computeValue(!1);if(Mt(e))throw e.cause;return e},t.prototype.set=function(e){if(this.setter){Nt(!this.isRunningSetter,"The setter of computed value '"+this.name+"' is trying to update itself. Did you intend to update an _observable_ value, instead of the computed property?"),this.isRunningSetter=!0;try{this.setter.call(this.scope,e)}finally{this.isRunningSetter=!1}}else Nt(!1,!1)},t.prototype.trackAndCompute=function(){B()&&Ue({object:this.scope,type:"compute",name:this.name});var e=this.value,n=this.dependenciesState===w.NOT_TRACKING,i=this.computeValue(!0),r=n||Mt(e)||Mt(i)||!this.equals(e,i);return r&&(this.value=i),r},t.prototype.computeValue=function(e){this.isComputing=!0,v.computationDepth++;var n;if(e)n=P1(this,this.derivation,this.scope);else if(v.disableErrorBoundaries===!0)n=this.derivation.call(this.scope);else try{n=this.derivation.call(this.scope)}catch(i){n=new oi(i)}return v.computationDepth--,this.isComputing=!1,n},t.prototype.suspend=function(){this.keepAlive||(ji(this),this.value=void 0)},t.prototype.observe=function(e,n){var i=this,r=!0,o=void 0;return Tt(function(){var a=i.get();if(!r||n){var s=mt();e({type:"update",object:i,newValue:a,oldValue:o}),we(s)}r=!1,o=a})},t.prototype.warnAboutUntrackedRead=function(){},t.prototype.toJSON=function(){return this.get()},t.prototype.toString=function(){return this.name+"["+this.derivation.toString()+"]"},t.prototype.valueOf=function(){return A1(this.get())},t}();Le.prototype[O1()]=Le.prototype.valueOf;var ui=Oe("ComputedValue",Le);var Ri=function(){function t(){this.version=5,this.UNCHANGED={},this.trackingDerivation=null,this.computationDepth=0,this.runId=0,this.mobxGuid=0,this.inBatch=0,this.pendingUnobservations=[],this.pendingReactions=[],this.isRunningReactions=!1,this.allowStateChanges=!0,this.allowStateReads=!0,this.enforceActions=!1,this.spyListeners=[],this.globalReactionErrorHandlers=[],this.computedRequiresReaction=!1,this.reactionRequiresObservable=!1,this.observableRequiresReaction=!1,this.computedConfigurable=!1,this.disableErrorBoundaries=!1,this.suppressReactionErrors=!1}return t}(),Pi=!0,o2=!1,v=function(){var t=Hi();return t.__mobxInstanceCount>0&&!t.__mobxGlobals&&(Pi=!1),t.__mobxGlobals&&t.__mobxGlobals.version!==new Ri().version&&(Pi=!1),Pi?t.__mobxGlobals?(t.__mobxInstanceCount+=1,t.__mobxGlobals.UNCHANGED||(t.__mobxGlobals.UNCHANGED={}),t.__mobxGlobals):(t.__mobxInstanceCount=1,t.__mobxGlobals=new Ri):(setTimeout(function(){o2||T("There are multiple, different versions of MobX active. Make sure MobX is loaded only once or use `configure({ isolateGlobalState: true })`")},1),new Ri)}();function a2(t,e){var n=t.observers.length;n&&(t.observersIndexes[e.__mapid]=n),t.observers[n]=e,t.lowestObserverState>e.dependenciesState&&(t.lowestObserverState=e.dependenciesState)}function U1(t,e){if(t.observers.length===1)t.observers.length=0,G1(t);else{var n=t.observers,i=t.observersIndexes,r=n.pop();if(r!==e){var o=i[e.__mapid]||0;o?i[r.__mapid]=o:delete i[r.__mapid],n[o]=r}delete i[e.__mapid]}}function G1(t){t.isPendingUnobservation===!1&&(t.isPendingUnobservation=!0,v.pendingUnobservations.push(t))}function me(){v.inBatch++}function ve(){if(--v.inBatch===0){K1();for(var t=v.pendingUnobservations,e=0;e<t.length;e++){var n=t[e];n.isPendingUnobservation=!1,n.observers.length===0&&(n.isBeingObserved&&(n.isBeingObserved=!1,n.onBecomeUnobserved()),n instanceof Le&&n.suspend())}v.pendingUnobservations=[]}}function $1(t){var e=v.trackingDerivation;return e!==null?(e.runId!==t.lastAccessedBy&&(t.lastAccessedBy=e.runId,e.newObserving[e.unboundDepsCount++]=t,t.isBeingObserved||(t.isBeingObserved=!0,t.onBecomeObserved())),!0):(t.observers.length===0&&v.inBatch>0&&G1(t),!1)}function s2(t){if(t.lowestObserverState!==w.STALE){t.lowestObserverState=w.STALE;for(var e=t.observers,n=e.length;n--;){var i=e[n];i.dependenciesState===w.UP_TO_DATE&&(i.isTracing!==le.NONE&&q1(i,t),i.onBecomeStale()),i.dependenciesState=w.STALE}}}function l2(t){if(t.lowestObserverState!==w.STALE){t.lowestObserverState=w.STALE;for(var e=t.observers,n=e.length;n--;){var i=e[n];i.dependenciesState===w.POSSIBLY_STALE?i.dependenciesState=w.STALE:i.dependenciesState===w.UP_TO_DATE&&(t.lowestObserverState=w.UP_TO_DATE)}}}function c2(t){if(t.lowestObserverState===w.UP_TO_DATE){t.lowestObserverState=w.POSSIBLY_STALE;for(var e=t.observers,n=e.length;n--;){var i=e[n];i.dependenciesState===w.UP_TO_DATE&&(i.dependenciesState=w.POSSIBLY_STALE,i.isTracing!==le.NONE&&q1(i,t),i.onBecomeStale())}}}function q1(t,e){if(console.log("[mobx.trace] '"+t.name+"' is invalidated due to a change in: '"+e.name+"'"),t.isTracing===le.BREAK){var n=[];W1(S2(t),n,1),new Function(`debugger;
|
|
1
|
+
import{a as m1}from"./chunk-GLAK4VQT.js";import{c as d1}from"./chunk-JXZCNFW7.js";import{a as r1}from"./chunk-GW5AVRYT.js";import{a as n1,b as o1,c as a1,d as s1,e as l1,f as Qt,i as c1}from"./chunk-BOIXDTUT.js";import{b as u1,c as Jt,d as h1,e as Zt}from"./chunk-QKELW3MH.js";import{a as f1,d as Et,g as ct}from"./chunk-2PQGH3LQ.js";import{f as Xt}from"./chunk-6HV65OKG.js";import{Aa as Yn,Ab as t1,Ba as Xn,Hb as Yt,Ib as W,Ja as nt,Jb as st,La as rt,Ma as Qn,O as Ve,Za as Ii,f as Rn,ib as Jn,kb as ot,mb as at,nb as Z,ob as Me,qb as Zn,xb as U,yb as e1,za as Kn}from"./chunk-55WOZ7P6.js";import{c as Ne,d as p1,h as He,m as lt}from"./chunk-ZZ3LHYOY.js";import{d as An}from"./chunk-J6YSVODR.js";import{$ as gn,$b as St,$c as Dn,Ab as xn,Ac as Ee,C as mn,Cb as b,Db as En,Dc as ke,Eb as u,Ed as In,Fb as Mn,Fd as ae,Ga as kt,Gb as Nn,Gf as Gn,Hb as yt,Hc as Ln,Ib as Vt,If as $n,Jb as _e,Jd as Pn,Je as Hn,Kb as xe,L as Ke,La as Mi,Lb as Ai,Ma as l,Mb as Pe,Mc as Ti,Na as Ni,Nb as q,Ob as Qe,Oc as jt,Pb as p,Qa as Xe,Qb as k,Rb as J,Re as Bn,Rf as qn,Sa as wi,Tb as Je,Ub as Ze,Vb as et,Wf as Wn,X as vn,Xa as D,Xb as tt,Xc as On,Ya as Cn,Za as Te,Zb as Di,Zc as oe,_a as yn,_b as Fe,_e as jn,ab as z,ad as Ut,bb as j,bc as wn,bf as Kt,ca as ye,cb as zi,cc as Ht,cg as i1,da as bn,dc as fe,ec as Bt,ed as Gt,f as pn,fc as _t,ha as h,hc as xt,jb as L,jd as $t,kb as O,ke as Fn,kf as Un,ma as _,na as x,nb as Sn,ob as _n,pb as f,pe as kn,qb as c,rb as d,sb as g,se as Vn,tb as Li,td as qt,u as hn,ub as Oi,v as Ei,va as Ft,wb as Ie,wd as Wt,xb as Re,xd as Tn,ya as Ye,yb as Se,yd as it,zb as F,zc as zn}from"./chunk-JQOMI5VI.js";import{a as Q,b as De}from"./chunk-RTRJ3KFH.js";var C0={prefix:"far",iconName:"bell",icon:[448,512,[128276,61602],"f0f3","M224 0c-13.3 0-24 10.7-24 24l0 9.7C118.6 45.3 56 115.4 56 200l0 14.5c0 37.7-10 74.7-29 107.3L5.1 359.2C1.8 365 0 371.5 0 378.2 0 399.1 16.9 416 37.8 416l372.4 0c20.9 0 37.8-16.9 37.8-37.8 0-6.7-1.8-13.3-5.1-19L421 321.7c-19-32.6-29-69.6-29-107.3l0-14.5c0-84.6-62.6-154.7-144-166.3l0-9.7c0-13.3-10.7-24-24-24zM392.4 368l-336.9 0 12.9-22.1C91.7 306 104 260.6 104 214.5l0-14.5c0-66.3 53.7-120 120-120s120 53.7 120 120l0 14.5c0 46.2 12.3 91.5 35.5 131.4L392.4 368zM156.1 464c9.9 28 36.6 48 67.9 48s58-20 67.9-48l-135.8 0z"]};var Ar={prefix:"far",iconName:"file-zipper",icon:[384,512,["file-archive"],"f1c6","M64 48l112 0 0 88c0 39.8 32.2 72 72 72l88 0 0 240c0 8.8-7.2 16-16 16L64 464c-8.8 0-16-7.2-16-16L48 64c0-8.8 7.2-16 16-16zM224 67.9l92.1 92.1-68.1 0c-13.3 0-24-10.7-24-24l0-68.1zM64 0C28.7 0 0 28.7 0 64L0 448c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-261.5c0-17-6.7-33.3-18.7-45.3L242.7 18.7C230.7 6.7 214.5 0 197.5 0L64 0zM80 104c0 13.3 10.7 24 24 24l16 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-16 0c-13.3 0-24 10.7-24 24zm0 80c0 13.3 10.7 24 24 24l32 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-32 0c-13.3 0-24 10.7-24 24zm64 56l-32 0c-17.7 0-32 14.3-32 32l0 48c0 26.5 21.5 48 48 48s48-21.5 48-48l0-48c0-17.7-14.3-32-32-32zm-16 64a16 16 0 1 1 0 32 16 16 0 1 1 0-32z"]},y0=Ar;var S0={prefix:"far",iconName:"clock",icon:[512,512,[128339,"clock-four"],"f017","M464 256a208 208 0 1 1 -416 0 208 208 0 1 1 416 0zM0 256a256 256 0 1 0 512 0 256 256 0 1 0 -512 0zM232 120l0 136c0 8 4 15.5 10.7 20l96 64c11 7.4 25.9 4.4 33.3-6.7s4.4-25.9-6.7-33.3L280 243.2 280 120c0-13.3-10.7-24-24-24s-24 10.7-24 24z"]};var ei={prefix:"far",iconName:"file",icon:[384,512,[128196,128459,61462],"f15b","M176 48L64 48c-8.8 0-16 7.2-16 16l0 384c0 8.8 7.2 16 16 16l256 0c8.8 0 16-7.2 16-16l0-240-88 0c-39.8 0-72-32.2-72-72l0-88zM316.1 160L224 67.9 224 136c0 13.3 10.7 24 24 24l68.1 0zM0 64C0 28.7 28.7 0 64 0L197.5 0c17 0 33.3 6.7 45.3 18.7L365.3 141.3c12 12 18.7 28.3 18.7 45.3L384 448c0 35.3-28.7 64-64 64L64 512c-35.3 0-64-28.7-64-64L0 64z"]};var _0={prefix:"far",iconName:"trash-can",icon:[448,512,[61460,"trash-alt"],"f2ed","M166.2-16c-13.3 0-25.3 8.3-30 20.8L120 48 24 48C10.7 48 0 58.7 0 72S10.7 96 24 96l400 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-96 0-16.2-43.2C307.1-7.7 295.2-16 281.8-16L166.2-16zM32 144l0 304c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-304-48 0 0 304c0 8.8-7.2 16-16 16L96 464c-8.8 0-16-7.2-16-16l0-304-48 0zm160 72c0-13.3-10.7-24-24-24s-24 10.7-24 24l0 176c0 13.3 10.7 24 24 24s24-10.7 24-24l0-176zm112 0c0-13.3-10.7-24-24-24s-24 10.7-24 24l0 176c0 13.3 10.7 24 24 24s24-10.7 24-24l0-176z"]};var x0={prefix:"far",iconName:"user",icon:[448,512,[128100,62144,62470,"user-alt","user-large"],"f007","M144 128a80 80 0 1 1 160 0 80 80 0 1 1 -160 0zm208 0a128 128 0 1 0 -256 0 128 128 0 1 0 256 0zM48 480c0-70.7 57.3-128 128-128l96 0c70.7 0 128 57.3 128 128l0 8c0 13.3 10.7 24 24 24s24-10.7 24-24l0-8c0-97.2-78.8-176-176-176l-96 0C78.8 304 0 382.8 0 480l0 8c0 13.3 10.7 24 24 24s24-10.7 24-24l0-8z"]};var E0={prefix:"far",iconName:"file-lines",icon:[384,512,[128441,128462,61686,"file-alt","file-text"],"f15c","M64 48l112 0 0 88c0 39.8 32.2 72 72 72l88 0 0 240c0 8.8-7.2 16-16 16L64 464c-8.8 0-16-7.2-16-16L48 64c0-8.8 7.2-16 16-16zM224 67.9l92.1 92.1-68.1 0c-13.3 0-24-10.7-24-24l0-68.1zM64 0C28.7 0 0 28.7 0 64L0 448c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-261.5c0-17-6.7-33.3-18.7-45.3L242.7 18.7C230.7 6.7 214.5 0 197.5 0L64 0zm56 256c-13.3 0-24 10.7-24 24s10.7 24 24 24l144 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-144 0zm0 96c-13.3 0-24 10.7-24 24s10.7 24 24 24l144 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-144 0z"]};var M0={prefix:"far",iconName:"comment-dots",icon:[512,512,[128172,62075,"commenting"],"f4ad","M0 240c0 54.4 19.3 104.6 51.9 144.9L3.1 474.3c-2 3.7-3.1 7.9-3.1 12.2 0 14.1 11.4 25.5 25.5 25.5 4 0 7.8-.6 11.5-2.1L153.4 460c31.4 12.9 66.1 20 102.6 20 141.4 0 256-107.5 256-240S397.4 0 256 0 0 107.5 0 240zM94 407.9c9.3-17.1 7.4-38.1-4.8-53.2-26.1-32.3-41.2-71.9-41.2-114.7 0-103.2 90.2-192 208-192s208 88.8 208 192-90.2 192-208 192c-30.2 0-58.7-5.9-84.3-16.4-11.9-4.9-25.3-4.8-37.1 .3L76 440.9 94 407.9zM144 272a32 32 0 1 0 0-64 32 32 0 1 0 0 64zm144-32a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zm80 32a32 32 0 1 0 0-64 32 32 0 1 0 0 64z"]};var N0={prefix:"far",iconName:"flag",icon:[448,512,[127988,61725],"f024","M48 24C48 10.7 37.3 0 24 0S0 10.7 0 24L0 488c0 13.3 10.7 24 24 24s24-10.7 24-24l0-100 80.3-20.1c41.1-10.3 84.6-5.5 122.5 13.4 44.2 22.1 95.5 24.8 141.7 7.4l34.7-13c12.5-4.7 20.8-16.6 20.8-30l0-279.7c0-23-24.2-38-44.8-27.7l-9.6 4.8c-46.3 23.2-100.8 23.2-147.1 0-35.1-17.6-75.4-22-113.5-12.5L48 52 48 24zm0 77.5l96.6-24.2c27-6.7 55.5-3.6 80.4 8.8 54.9 27.4 118.7 29.7 175 6.8l0 241.8-24.4 9.1c-33.7 12.6-71.2 10.7-103.4-5.4-48.2-24.1-103.3-30.1-155.6-17.1l-68.6 17.2 0-237z"]};var w0={prefix:"far",iconName:"window-restore",icon:[576,512,[],"f2d2","M512 80L224 80c-8.8 0-16 7.2-16 16l0 16-48 0 0-16c0-35.3 28.7-64 64-64l288 0c35.3 0 64 28.7 64 64l0 192c0 35.3-28.7 64-64 64l-48 0 0-48 48 0c8.8 0 16-7.2 16-16l0-192c0-8.8-7.2-16-16-16zM368 288l-320 0 0 128c0 8.8 7.2 16 16 16l288 0c8.8 0 16-7.2 16-16l0-128zM64 160l288 0c35.3 0 64 28.7 64 64l0 192c0 35.3-28.7 64-64 64L64 480c-35.3 0-64-28.7-64-64L0 224c0-35.3 28.7-64 64-64z"]};var v1={prefix:"far",iconName:"folder-closed",icon:[512,512,[],"e185","M448 400L64 400c-8.8 0-16-7.2-16-16l0-144 416 0 0 144c0 8.8-7.2 16-16 16zm16-208l-416 0 0-96c0-8.8 7.2-16 16-16l138.7 0c3.5 0 6.8 1.1 9.6 3.2L250.7 112c13.8 10.4 30.7 16 48 16L448 128c8.8 0 16 7.2 16 16l0 48zM64 448l384 0c35.3 0 64-28.7 64-64l0-240c0-35.3-28.7-64-64-64L298.7 80c-6.9 0-13.7-2.2-19.2-6.4L241.1 44.8C230 36.5 216.5 32 202.7 32L64 32C28.7 32 0 60.7 0 96L0 384c0 35.3 28.7 64 64 64z"]};var g1=(()=>{let e=class e{transform(i,r=0,o=void 0){return rt(i,r,o)}};e.\u0275fac=function(r){return new(r||e)},e.\u0275pipe=yn({name:"pathSlice",type:e,pure:!0});let t=e;return t})();var ki=function(t,e){return ki=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var r in i)i.hasOwnProperty(r)&&(n[r]=i[r])},ki(t,e)};function z1(t,e){ki(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}var K=function(){return K=Object.assign||function(e){for(var n,i=1,r=arguments.length;i<r;i++){n=arguments[i];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},K.apply(this,arguments)};function L1(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var i=n.call(t),r,o=[],a;try{for(;(e===void 0||e-- >0)&&!(r=i.next()).done;)o.push(r.value)}catch(s){a={error:s}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(a)throw a.error}}return o}function Vi(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(L1(arguments[e]));return t}var Dr="An invariant failed, however the error is obfuscated because this is an production build.",ni=[];Object.freeze(ni);var $i={};Object.freeze($i);var Tr={};function Hi(){return typeof window<"u"?window:typeof global<"u"?global:Tr}function Y(){return++v.mobxGuid}function T(t){throw Nt(!1,t),"X"}function Nt(t,e){if(!t)throw new Error("[mobx] "+(e||Dr))}var b1=[];function he(t,e){return!1}function qi(t){var e=!1;return function(){if(!e)return e=!0,t.apply(this,arguments)}}var C1=function(){};function Ir(t){var e=[];return t.forEach(function(n){e.indexOf(n)===-1&&e.push(n)}),e}function Wi(t){return t!==null&&typeof t=="object"}function pt(t){if(t===null||typeof t!="object")return!1;var e=Object.getPrototypeOf(t);return e===Object.prototype||e===null}function Rr(t){return ht(t)||qe(t)?t:Array.isArray(t)?new Map(t):pt(t)?new Map(Object.entries(t)):T("Cannot convert to map from '"+t+"'")}function Pr(t,e){for(var n=0;n<e.length;n++)Ge(t,e[n],t[e[n]])}function Ge(t,e,n){Object.defineProperty(t,e,{enumerable:!1,writable:!0,configurable:!0,value:n})}function Ot(t,e,n){Object.defineProperty(t,e,{enumerable:!1,writable:!1,configurable:!0,value:n})}function Oe(t,e){var n="isMobX"+t;return e.prototype[n]=!0,function(i){return Wi(i)&&i[n]===!0}}function Fr(t,e){return typeof t=="number"&&typeof e=="number"&&isNaN(t)&&isNaN(e)}function ht(t){return Hi().Map!==void 0&&t instanceof Hi().Map}function At(t){return t instanceof Set}function ft(t){for(var e=[];;){var n=t.next();if(n.done)break;e.push(n.value)}return e}function O1(){return typeof Symbol=="function"&&Symbol.toPrimitive||"@@toPrimitive"}function A1(t){return t===null?null:typeof t=="object"?""+t:t}function Ki(){return typeof Symbol=="function"&&Symbol.iterator||"@@iterator"}function Yi(t,e){Ot(t,Ki(),e)}function wt(t){return t[Ki()]=kr,t}function Xi(){return typeof Symbol=="function"&&Symbol.toStringTag||"@@toStringTag"}function kr(){return this}var ci=function(){function t(e){e===void 0&&(e="Atom@"+Y()),this.name=e,this.isPendingUnobservation=!1,this.isBeingObserved=!1,this.observers=[],this.observersIndexes={},this.diffValue=0,this.lastAccessedBy=0,this.lowestObserverState=w.NOT_TRACKING}return t.prototype.onBecomeUnobserved=function(){},t.prototype.onBecomeObserved=function(){},t.prototype.reportObserved=function(){return $1(this)},t.prototype.reportChanged=function(){me(),s2(this),ve()},t.prototype.toString=function(){return this.name},t}(),Qi=Oe("Atom",ci);function Vr(t,e,n){e===void 0&&(e=C1),n===void 0&&(n=C1);var i=new ci(t);return C2(i,e),X1(i,n),i}function D1(t,e){return t===e}function Hr(t,e){return tn(t,e)}function Br(t,e){return tn(t,e,1)}function jr(t,e){return Fr(t,e)||D1(t,e)}var ut={identity:D1,structural:Hr,default:jr,shallow:Br},Ur={},Gr={};function $r(t,e){var n=e?Ur:Gr;return n[t]||(n[t]={configurable:!0,enumerable:e,get:function(){return je(this),this[t]},set:function(i){je(this),this[t]=i}})}function je(t){if(t.__mobxDidRunLazyInitializers!==!0){var e=t.__mobxDecorators;if(e){Ge(t,"__mobxDidRunLazyInitializers",!0);for(var n in e){var i=e[n];i.propertyCreator(t,i.prop,i.descriptor,i.decoratorTarget,i.decoratorArguments)}}}}function T1(t,e){return function(){var i,r=function(a,s,m,C){if(C===!0)return e(a,s,m,a,i),null;if(!Object.prototype.hasOwnProperty.call(a,"__mobxDecorators")){var A=a.__mobxDecorators;Ge(a,"__mobxDecorators",K({},A))}return a.__mobxDecorators[s]={prop:s,propertyCreator:e,descriptor:m,decoratorTarget:a,decoratorArguments:i},$r(s,t)};return qr(arguments)?(i=ni,r.apply(null,arguments)):(i=Array.prototype.slice.call(arguments),r)}}function qr(t){return(t.length===2||t.length===3)&&typeof t[1]=="string"||t.length===4&&t[3]===!0}function Dt(t,e,n){return Z1(t)?t:Array.isArray(t)?E.array(t,{name:n}):pt(t)?E.object(t,void 0,{name:n}):ht(t)?E.map(t,{name:n}):At(t)?E.set(t,{name:n}):t}function Wr(t,e,n){return t==null||Lt(t)||pi(t)||qe(t)||vt(t)?t:Array.isArray(t)?E.array(t,{name:n,deep:!1}):pt(t)?E.object(t,void 0,{name:n,deep:!1}):ht(t)?E.map(t,{name:n,deep:!1}):At(t)?E.set(t,{name:n,deep:!1}):T(!1)}function zt(t){return t}function Kr(t,e,n){return tn(t,e)?e:t}function di(t){var e=T1(!0,function(i,r,o,a,s){var m=o?o.initializer?o.initializer.call(i):o.value:void 0;T2(i,r,m,t)}),n=(typeof process<"u"&&process.env,e);return n.enhancer=t,n}var I1={deep:!0,name:void 0,defaultDecorator:void 0},Yr={deep:!1,name:void 0,defaultDecorator:void 0};Object.freeze(I1);Object.freeze(Yr);function dt(t){return t==null?I1:typeof t=="string"?{name:t,deep:!0}:t}function ti(t){return t.defaultDecorator?t.defaultDecorator.enhancer:t.deep===!1?zt:Dt}var Ji=di(Dt),Xr=di(Wr),R1=di(zt),Qr=di(Kr);function Jr(t,e,n){if(typeof arguments[1]=="string")return Ji.apply(null,arguments);if(Z1(t))return t;var i=pt(t)?E.object(t,e,n):Array.isArray(t)?E.array(t,e):ht(t)?E.map(t,e):At(t)?E.set(t,e):t;if(i!==t)return i;T(!1)}var y1={box:function(t,e){arguments.length>2&&ue("box");var n=dt(e);return new ze(t,ti(n),n.name,!0,n.equals)},shallowBox:function(t,e){return arguments.length>2&&ue("shallowBox"),he("observable.shallowBox","observable.box(value, { deep: false })"),E.box(t,{name:e,deep:!1})},array:function(t,e){arguments.length>2&&ue("array");var n=dt(e);return new be(t,ti(n),n.name)},shallowArray:function(t,e){return arguments.length>2&&ue("shallowArray"),he("observable.shallowArray","observable.array(values, { deep: false })"),E.array(t,{name:e,deep:!1})},map:function(t,e){arguments.length>2&&ue("map");var n=dt(e);return new hi(t,ti(n),n.name)},shallowMap:function(t,e){return arguments.length>2&&ue("shallowMap"),he("observable.shallowMap","observable.map(values, { deep: false })"),E.map(t,{name:e,deep:!1})},set:function(t,e){arguments.length>2&&ue("set");var n=dt(e);return new mi(t,ti(n),n.name)},object:function(t,e,n){typeof arguments[1]=="string"&&ue("object");var i=dt(n);return y2({},t,e,i)},shallowObject:function(t,e){return typeof arguments[1]=="string"&&ue("shallowObject"),he("observable.shallowObject","observable.object(values, {}, { deep: false })"),E.object(t,{},{name:e,deep:!1})},ref:R1,shallow:Xr,deep:Ji,struct:Qr},E=Jr;Object.keys(y1).forEach(function(t){return E[t]=y1[t]});function ue(t){T("Expected one or two arguments to observable."+t+". Did you accidentally try to use observable."+t+" as decorator?")}var ri=T1(!1,function(t,e,n,i,r){var o=n.get,a=n.set,s=r[0]||{};I2(t,e,K({get:o,set:a},s))}),Zr=ri({equals:ut.structural}),R=function(e,n,i){if(typeof n=="string"||e!==null&&typeof e=="object"&&arguments.length===1)return ri.apply(null,arguments);var r=typeof n=="object"?n:{};return r.get=e,r.set=typeof n=="function"?n:r.set,r.name=r.name||e.name||"",new Le(r)};R.struct=Zr;var w=function(t){return t[t.NOT_TRACKING=-1]="NOT_TRACKING",t[t.UP_TO_DATE=0]="UP_TO_DATE",t[t.POSSIBLY_STALE=1]="POSSIBLY_STALE",t[t.STALE=2]="STALE",t}(w||{}),le=function(t){return t[t.NONE=0]="NONE",t[t.LOG=1]="LOG",t[t.BREAK=2]="BREAK",t}(le||{}),oi=function(){function t(e){this.cause=e}return t}();function Mt(t){return t instanceof oi}function Bi(t){switch(t.dependenciesState){case w.UP_TO_DATE:return!1;case w.NOT_TRACKING:case w.STALE:return!0;case w.POSSIBLY_STALE:{for(var e=mt(),n=t.observing,i=n.length,r=0;r<i;r++){var o=n[r];if(ui(o)){if(v.disableErrorBoundaries)o.get();else try{o.get()}catch{return we(e),!0}if(t.dependenciesState===w.STALE)return we(e),!0}}return H1(t),we(e),!1}}}function fi(t){var e=t.observers.length>0;v.computationDepth>0&&e&&T(!1),!v.allowStateChanges&&(e||v.enforceActions==="strict")&&T(!1)}function P1(t,e,n){var i=k1(!0);H1(t),t.newObserving=new Array(t.observing.length+100),t.unboundDepsCount=0,t.runId=++v.runId;var r=v.trackingDerivation;v.trackingDerivation=t;var o;if(v.disableErrorBoundaries===!0)o=e.call(n);else try{o=e.call(n)}catch(a){o=new oi(a)}return v.trackingDerivation=r,e2(t),t.observing.length===0&&void 0,V1(i),o}function e2(t){for(var e=t.observing,n=t.observing=t.newObserving,i=w.UP_TO_DATE,r=0,o=t.unboundDepsCount,a=0;a<o;a++){var s=n[a];s.diffValue===0&&(s.diffValue=1,r!==a&&(n[r]=s),r++),s.dependenciesState>i&&(i=s.dependenciesState)}for(n.length=r,t.newObserving=null,o=e.length;o--;){var s=e[o];s.diffValue===0&&U1(s,t),s.diffValue=0}for(;r--;){var s=n[r];s.diffValue===1&&(s.diffValue=0,a2(s,t))}i!==w.UP_TO_DATE&&(t.dependenciesState=i,t.onBecomeStale())}function ji(t){var e=t.observing;t.observing=[];for(var n=e.length;n--;)U1(e[n],t);t.dependenciesState=w.NOT_TRACKING}function F1(t){var e=mt(),n=t();return we(e),n}function mt(){var t=v.trackingDerivation;return v.trackingDerivation=null,t}function we(t){v.trackingDerivation=t}function k1(t){var e=v.allowStateReads;return v.allowStateReads=t,e}function V1(t){v.allowStateReads=t}function H1(t){if(t.dependenciesState!==w.UP_TO_DATE){t.dependenciesState=w.UP_TO_DATE;for(var e=t.observing,n=e.length;n--;)e[n].lowestObserverState=w.UP_TO_DATE}}var ai=0,t2=1;function Be(t,e){var n=function(){return i2(t,e,this,arguments)};return n.isMobxAction=!0,n}function i2(t,e,n,i){var r=n2(t,n,i);try{return e.apply(n,i)}catch(o){throw r.error=o,o}finally{r2(r)}}function n2(t,e,n){var i=B()&&!!t,r=0;if(i){r=Date.now();var o=n&&n.length||0,a=new Array(o);if(o>0)for(var s=0;s<o;s++)a[s]=n[s];ee({type:"action",name:t,object:e,arguments:a})}var m=mt();me();var C=B1(!0),A=k1(!0),X={prevDerivation:m,prevAllowStateChanges:C,prevAllowStateReads:A,notifySpy:i,startTime:r,actionId:t2++,parentActionId:ai};return ai=X.actionId,X}function r2(t){ai!==t.actionId&&T("invalid action stack. did you forget to finish an action?"),ai=t.parentActionId,t.error!==void 0&&(v.suppressReactionErrors=!0),j1(t.prevAllowStateChanges),V1(t.prevAllowStateReads),ve(),we(t.prevDerivation),t.notifySpy&&te({time:Date.now()-t.startTime}),v.suppressReactionErrors=!1}function B1(t){var e=v.allowStateChanges;return v.allowStateChanges=t,e}function j1(t){v.allowStateChanges=t}var ze=function(t){z1(e,t);function e(n,i,r,o,a){r===void 0&&(r="ObservableValue@"+Y()),o===void 0&&(o=!0),a===void 0&&(a=ut.default);var s=t.call(this,r)||this;return s.enhancer=i,s.name=r,s.equals=a,s.hasUnreportedChange=!1,s.value=i(n,void 0,r),o&&B()&&Ue({type:"create",name:s.name,newValue:""+s.value}),s}return e.prototype.dehanceValue=function(n){return this.dehancer!==void 0?this.dehancer(n):n},e.prototype.set=function(n){var i=this.value;if(n=this.prepareNewValue(n),n!==v.UNCHANGED){var r=B();r&&ee({type:"update",name:this.name,newValue:n,oldValue:i}),this.setNewValue(n),r&&te()}},e.prototype.prepareNewValue=function(n){if(fi(this),ce(this)){var i=de(this,{object:this,type:"update",newValue:n});if(!i)return v.UNCHANGED;n=i.newValue}return n=this.enhancer(n,this.value,this.name),this.equals(this.value,n)?v.UNCHANGED:n},e.prototype.setNewValue=function(n){var i=this.value;this.value=n,this.reportChanged(),ie(this)&&ne(this,{type:"update",object:this,newValue:n,oldValue:i})},e.prototype.get=function(){return this.reportObserved(),this.dehanceValue(this.value)},e.prototype.intercept=function(n){return It(this,n)},e.prototype.observe=function(n,i){return i&&n({object:this,type:"update",newValue:this.value,oldValue:void 0}),Rt(this,n)},e.prototype.toJSON=function(){return this.get()},e.prototype.toString=function(){return this.name+"["+this.value+"]"},e.prototype.valueOf=function(){return A1(this.get())},e}(ci);ze.prototype[O1()]=ze.prototype.valueOf;var A0=Oe("ObservableValue",ze),Le=function(){function t(e){this.dependenciesState=w.NOT_TRACKING,this.observing=[],this.newObserving=null,this.isBeingObserved=!1,this.isPendingUnobservation=!1,this.observers=[],this.observersIndexes={},this.diffValue=0,this.runId=0,this.lastAccessedBy=0,this.lowestObserverState=w.UP_TO_DATE,this.unboundDepsCount=0,this.__mapid="#"+Y(),this.value=new oi(null),this.isComputing=!1,this.isRunningSetter=!1,this.isTracing=le.NONE,this.derivation=e.get,this.name=e.name||"ComputedValue@"+Y(),e.set&&(this.setter=Be(this.name+"-setter",e.set)),this.equals=e.equals||(e.compareStructural||e.struct?ut.structural:ut.default),this.scope=e.context,this.requiresReaction=!!e.requiresReaction,this.keepAlive=!!e.keepAlive}return t.prototype.onBecomeStale=function(){c2(this)},t.prototype.onBecomeUnobserved=function(){},t.prototype.onBecomeObserved=function(){},t.prototype.get=function(){this.isComputing&&T("Cycle detected in computation "+this.name+": "+this.derivation),v.inBatch===0&&this.observers.length===0&&!this.keepAlive?Bi(this)&&(this.warnAboutUntrackedRead(),me(),this.value=this.computeValue(!1),ve()):($1(this),Bi(this)&&this.trackAndCompute()&&l2(this));var e=this.value;if(Mt(e))throw e.cause;return e},t.prototype.peek=function(){var e=this.computeValue(!1);if(Mt(e))throw e.cause;return e},t.prototype.set=function(e){if(this.setter){Nt(!this.isRunningSetter,"The setter of computed value '"+this.name+"' is trying to update itself. Did you intend to update an _observable_ value, instead of the computed property?"),this.isRunningSetter=!0;try{this.setter.call(this.scope,e)}finally{this.isRunningSetter=!1}}else Nt(!1,!1)},t.prototype.trackAndCompute=function(){B()&&Ue({object:this.scope,type:"compute",name:this.name});var e=this.value,n=this.dependenciesState===w.NOT_TRACKING,i=this.computeValue(!0),r=n||Mt(e)||Mt(i)||!this.equals(e,i);return r&&(this.value=i),r},t.prototype.computeValue=function(e){this.isComputing=!0,v.computationDepth++;var n;if(e)n=P1(this,this.derivation,this.scope);else if(v.disableErrorBoundaries===!0)n=this.derivation.call(this.scope);else try{n=this.derivation.call(this.scope)}catch(i){n=new oi(i)}return v.computationDepth--,this.isComputing=!1,n},t.prototype.suspend=function(){this.keepAlive||(ji(this),this.value=void 0)},t.prototype.observe=function(e,n){var i=this,r=!0,o=void 0;return Tt(function(){var a=i.get();if(!r||n){var s=mt();e({type:"update",object:i,newValue:a,oldValue:o}),we(s)}r=!1,o=a})},t.prototype.warnAboutUntrackedRead=function(){},t.prototype.toJSON=function(){return this.get()},t.prototype.toString=function(){return this.name+"["+this.derivation.toString()+"]"},t.prototype.valueOf=function(){return A1(this.get())},t}();Le.prototype[O1()]=Le.prototype.valueOf;var ui=Oe("ComputedValue",Le);var Ri=function(){function t(){this.version=5,this.UNCHANGED={},this.trackingDerivation=null,this.computationDepth=0,this.runId=0,this.mobxGuid=0,this.inBatch=0,this.pendingUnobservations=[],this.pendingReactions=[],this.isRunningReactions=!1,this.allowStateChanges=!0,this.allowStateReads=!0,this.enforceActions=!1,this.spyListeners=[],this.globalReactionErrorHandlers=[],this.computedRequiresReaction=!1,this.reactionRequiresObservable=!1,this.observableRequiresReaction=!1,this.computedConfigurable=!1,this.disableErrorBoundaries=!1,this.suppressReactionErrors=!1}return t}(),Pi=!0,o2=!1,v=function(){var t=Hi();return t.__mobxInstanceCount>0&&!t.__mobxGlobals&&(Pi=!1),t.__mobxGlobals&&t.__mobxGlobals.version!==new Ri().version&&(Pi=!1),Pi?t.__mobxGlobals?(t.__mobxInstanceCount+=1,t.__mobxGlobals.UNCHANGED||(t.__mobxGlobals.UNCHANGED={}),t.__mobxGlobals):(t.__mobxInstanceCount=1,t.__mobxGlobals=new Ri):(setTimeout(function(){o2||T("There are multiple, different versions of MobX active. Make sure MobX is loaded only once or use `configure({ isolateGlobalState: true })`")},1),new Ri)}();function a2(t,e){var n=t.observers.length;n&&(t.observersIndexes[e.__mapid]=n),t.observers[n]=e,t.lowestObserverState>e.dependenciesState&&(t.lowestObserverState=e.dependenciesState)}function U1(t,e){if(t.observers.length===1)t.observers.length=0,G1(t);else{var n=t.observers,i=t.observersIndexes,r=n.pop();if(r!==e){var o=i[e.__mapid]||0;o?i[r.__mapid]=o:delete i[r.__mapid],n[o]=r}delete i[e.__mapid]}}function G1(t){t.isPendingUnobservation===!1&&(t.isPendingUnobservation=!0,v.pendingUnobservations.push(t))}function me(){v.inBatch++}function ve(){if(--v.inBatch===0){K1();for(var t=v.pendingUnobservations,e=0;e<t.length;e++){var n=t[e];n.isPendingUnobservation=!1,n.observers.length===0&&(n.isBeingObserved&&(n.isBeingObserved=!1,n.onBecomeUnobserved()),n instanceof Le&&n.suspend())}v.pendingUnobservations=[]}}function $1(t){var e=v.trackingDerivation;return e!==null?(e.runId!==t.lastAccessedBy&&(t.lastAccessedBy=e.runId,e.newObserving[e.unboundDepsCount++]=t,t.isBeingObserved||(t.isBeingObserved=!0,t.onBecomeObserved())),!0):(t.observers.length===0&&v.inBatch>0&&G1(t),!1)}function s2(t){if(t.lowestObserverState!==w.STALE){t.lowestObserverState=w.STALE;for(var e=t.observers,n=e.length;n--;){var i=e[n];i.dependenciesState===w.UP_TO_DATE&&(i.isTracing!==le.NONE&&q1(i,t),i.onBecomeStale()),i.dependenciesState=w.STALE}}}function l2(t){if(t.lowestObserverState!==w.STALE){t.lowestObserverState=w.STALE;for(var e=t.observers,n=e.length;n--;){var i=e[n];i.dependenciesState===w.POSSIBLY_STALE?i.dependenciesState=w.STALE:i.dependenciesState===w.UP_TO_DATE&&(t.lowestObserverState=w.UP_TO_DATE)}}}function c2(t){if(t.lowestObserverState===w.UP_TO_DATE){t.lowestObserverState=w.POSSIBLY_STALE;for(var e=t.observers,n=e.length;n--;){var i=e[n];i.dependenciesState===w.UP_TO_DATE&&(i.dependenciesState=w.POSSIBLY_STALE,i.isTracing!==le.NONE&&q1(i,t),i.onBecomeStale())}}}function q1(t,e){if(console.log("[mobx.trace] '"+t.name+"' is invalidated due to a change in: '"+e.name+"'"),t.isTracing===le.BREAK){var n=[];W1(S2(t),n,1),new Function(`debugger;
|
|
2
2
|
/*
|
|
3
3
|
Tracing '`+t.name+`'
|
|
4
4
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as ue,b as z,c as we,d as Ct}from"./chunk-QVWBPQWU.js";import{b as R,c as _t}from"./chunk-LHULGE6M.js";import{a as S,b as Y,c as tt,e as dt}from"./chunk-X7LCJ4LA.js";import{a as bt}from"./chunk-3UFSZ24R.js";import{a as ft,b as ht,c as gt}from"./chunk-HX6BM5E5.js";import{a as _e,b as st,c as mt,d as pt,f as ct,i as ut}from"./chunk-2AC4RLMK.js";import{a as Ge,b as Se,c as at,d as lt}from"./chunk-UILGGLKW.js";import"./chunk-WA2KMN23.js";import{g as rt}from"./chunk-3SC36MTD.js";import{L as Ze,M as K,Mb as xe,N as et,Rb as ye,Ta as ve,Xa as de,pa as it,qa as nt,ra as ot,ua as H,v as je,xb as V}from"./chunk-4GYSKJJC.js";import{b as Me,d as Pe}from"./chunk-J6YSVODR.js";import{$c as Ve,Bf as Ye,Cb as _,E as be,Eb as u,Ed as re,Fd as P,Ga as J,Gc as te,Gd as Ke,Ge as se,Gf as ce,Ib as Q,If as Je,Jb as q,Kb as W,L as O,Ld as ae,Ma as s,Mb as Ce,Nb as U,Ob as k,Pb as m,Qb as C,Qd as He,Rb as $,Re as qe,Sb as Ee,Tb as X,Ub as Z,Ue as We,Uf as Xe,Vb as ee,Xa as E,Xb as Ae,Yb as De,Zc as M,ab as T,ad as Re,ae as le,bb as I,cd as Fe,dc as v,ec as D,ed as L,fc as w,fd as Ue,gd as ke,ha as x,id as j,jb as h,jd as ie,kb as g,ma as y,na as G,nb as B,nd as Oe,ob as N,od as Ie,of as me,pb as c,pd as Be,qb as r,qd as Ne,rb as a,rd as $e,sb as d,wd as ne,wf as pe,xd as Le,xe as Qe,yd as oe,zb as A,zf as ze}from"./chunk-JQOMI5VI.js";import{a as he,b as ge}from"./chunk-RTRJ3KFH.js";var vt=(()=>{let l=class l{constructor(){this.currentMemberIds=[],this.hasChanges=new I,this.layout=x(V),this.newMembers=[],this.submitted=!1,this.icons={faUserPlus:se},this.adminService=x(R)}searchMembers(o){let n={search:o,onlyUsers:!0,usersRole:this.parentGroup.type===ue.USER?Ze.USER:void 0,ignoreUserIds:[...this.currentMemberIds,...this.newMembers.map(e=>e.id)]};return this.adminService.searchMembers(n)}onSubmit(){this.submitted=!0,this.adminService.addUsersToGroup(this.parentGroup.id,this.newMembers.map(o=>o.id)).subscribe({next:()=>{this.hasChanges.emit(!0),this.layout.sendNotification("success","Add members",this.newMembers.map(o=>o.name).join("<br>"),null,{enableHtml:!0}),this.layout.closeDialog()},error:o=>{this.submitted=!1,this.layout.sendNotification("error","Add members",this.newMembers.map(n=>n.name).join("<br>"),o,{enableHtml:!0})}})}};l.\u0275fac=function(n){return new(n||l)},l.\u0275cmp=E({type:l,selectors:[["app-admin-group-add-users-dialog"]],inputs:{parentGroup:"parentGroup",currentMemberIds:"currentMemberIds"},outputs:{hasChanges:"hasChanges"},decls:16,vars:7,consts:[[1,"modal-header","align-items-center"],[1,"modal-title"],[1,"me-2",3,"icon"],[1,"modal-title","ms-auto"],["l10nTranslate",""],["aria-label","Close","type","button",1,"btn-close","btn-close-white","ms-2",3,"click"],[1,"modal-body"],[3,"membersChange","members","withPermissions","customPlaceholder","searchFunction"],[1,"modal-footer"],["data-dismiss","modal","type","button","l10nTranslate","",1,"btn","btn-sm","btn-secondary","ms-auto",3,"click"],["type","button","l10nTranslate","",1,"btn","btn-sm","btn-primary",3,"click","disabled"]],template:function(n,e){n&1&&(r(0,"div",0)(1,"h4",1),d(2,"fa-icon",2),r(3,"span"),m(4),a()(),r(5,"h4",3)(6,"span",4),m(7,"Add members"),a()(),r(8,"button",5),_("click",function(){return e.layout.closeDialog()}),a()(),r(9,"div",6)(10,"app-user-search",7),ee("membersChange",function(f){return Z(e.newMembers,f)||(e.newMembers=f),f}),a()(),r(11,"div",8)(12,"button",9),_("click",function(){return e.layout.closeDialog()}),m(13,"Cancel"),a(),r(14,"button",10),_("click",function(){return e.onSubmit()}),m(15," Confirm "),a()()),n&2&&(s(2),c("icon",e.icons.faUserPlus),s(2),C(e.parentGroup.name),s(6),X("members",e.newMembers),c("withPermissions",!1)("customPlaceholder","Type to search for users to add")("searchFunction",e.searchMembers.bind(e)),s(4),c("disabled",e.submitted||!e.newMembers.length))},dependencies:[M,P,ut],encapsulation:2});let t=l;return t})();function wt(t,l){if(t&1&&d(0,"img",9),t&2){let i=u();c("src",i.member.avatarUrl,J)}}function Tt(t,l){if(t&1&&d(0,"fa-icon",15),t&2){let i=u();k(i.member.isPersonalGroup?"circle-purple-icon":"circle-primary-icon"),c("icon",i.icons.GROUPS)}}function Et(t,l){if(t&1&&(r(0,"div",7)(1,"span",16),m(2,"from the group"),a(),r(3,"span",11),m(4),v(5,"capitalize"),a()()),t&2){let i=u();s(4),C(D(5,1,i.parentGroup.name))}}function At(t,l){t&1&&(r(0,"small",4),m(1,"Only the group will be deleted, the members will no longer be part of it."),a())}var xt=(()=>{let l=class l{constructor(){this.wasDeleted=new I,this.submitted=!1,this.icons={GROUPS:H.GROUPS,faMinus:ae,faUserMinus:pe},this.layout=x(V),this.adminService=x(R)}onSubmit(){this.submitted=!0;let o=this.member.isUser?"Remove from group":"Delete group";(this.member.isUser?this.adminService.removeUserFromGroup(this.parentGroup.id,this.member.id):this.adminService.deleteGroup(this.member.id)).subscribe({next:()=>{this.wasDeleted.emit(!0),this.layout.sendNotification("success",o,this.member.name),this.onClose()},error:e=>{this.submitted=!1,this.layout.sendNotification("error",o,this.member.name,e)}})}onClose(){this.wasDeleted.emit(!1),this.layout.closeDialog()}};l.\u0275fac=function(n){return new(n||l)},l.\u0275cmp=E({type:l,selectors:[["app-admin-group-delete-dialog"]],inputs:{parentGroup:"parentGroup",member:"member"},outputs:{wasDeleted:"wasDeleted"},decls:26,vars:10,consts:[[1,"modal-header","align-items-center"],[1,"modal-title"],[1,"me-2",3,"icon"],[1,"modal-title","ms-auto"],["l10nTranslate",""],["aria-label","Close","type","button",1,"btn-close","btn-close-white","ms-2",3,"click"],[1,"modal-body"],[1,"d-flex","align-items-center"],[1,"d-flex","align-items-center","avatar","me-2"],["alt","",1,"avatar-img",3,"src"],[3,"icon","class"],[1,"fw-bold","me-1"],[1,"modal-footer"],["data-dismiss","modal","type","button","l10nTranslate","",1,"btn","btn-sm","btn-secondary","ms-auto",3,"click"],["type","button","l10nTranslate","",1,"btn","btn-sm","btn-danger",3,"click","disabled"],[3,"icon"],["l10nTranslate","",1,"mx-1"]],template:function(n,e){n&1&&(r(0,"div",0)(1,"h4",1),d(2,"fa-icon",2),r(3,"span"),m(4),a()(),r(5,"h4",3)(6,"span",4),m(7),a()(),r(8,"button",5),_("click",function(){return e.onClose()}),a()(),r(9,"div",6)(10,"div",7)(11,"div",8),h(12,wt,1,1,"img",9)(13,Tt,1,3,"fa-icon",10),a(),r(14,"span",11),m(15),v(16,"capitalize"),a(),r(17,"span",4),m(18,"will be removed"),a(),h(19,Et,6,3,"div",7),a(),h(20,At,2,0,"small",4),a(),r(21,"div",12)(22,"button",13),_("click",function(){return e.onClose()}),m(23,"Cancel"),a(),r(24,"button",14),_("click",function(){return e.onSubmit()}),m(25," Remove "),a()()),n&2&&(s(2),c("icon",e.member.isUser?e.icons.faUserMinus:e.icons.faMinus),s(2),C(e.member.name),s(3),C(e.member.isUser?"Remove from group":"Delete group"),s(5),g(e.member.isUser?12:13),s(3),C(D(16,8,e.member.name)),s(4),g(e.member.isUser?19:-1),s(),g(e.member.isGroup?20:-1),s(4),c("disabled",e.submitted))},dependencies:[M,P,dt],encapsulation:2});let t=l;return t})();var Dt=(t,l)=>l.value;function Mt(t,l){if(t&1&&(d(0,"fa-icon",31),r(1,"span"),m(2),a()),t&2){let i=u();c("icon",i.icons.faPen),s(2),C(i.group.name)}}function Pt(t,l){if(t&1&&(d(0,"fa-icon",31),r(1,"span",23),m(2,"New group"),a()),t&2){let i=u();c("icon",i.icons.faPlus)}}function Vt(t,l){t&1&&(r(0,"h4",2)(1,"span",23),m(2,"Edit group"),a()())}function Rt(t,l){if(t&1&&(d(0,"fa-icon",32),r(1,"span",33),m(2,"Settings"),a()),t&2){let i=u();c("icon",i.icons.faCog)}}function Ft(t,l){if(t&1&&(r(0,"option",21),m(1),a()),t&2){let i=l.$implicit;c("ngValue",i.value),s(),C(i.key)}}function Ut(t,l){t&1&&(r(0,"span",23),m(1,"All users can see this group."),a())}function kt(t,l){t&1&&(r(0,"span",23),m(1,"Users who are not members of this group cannot see it."),a())}function Ot(t,l){t&1&&(r(0,"span",23),m(1,"The group is not visible, its members cannot see it and cannot see each other."),a())}function It(t,l){if(t&1&&(r(0,"div",24)(1,"div",18)(2,"label",34),m(3,"Creation date"),a(),r(4,"div",35),m(5),v(6,"amDateFormat"),a()(),r(7,"div",36)(8,"label",37),m(9,"Modification date"),a(),r(10,"div",38),m(11),v(12,"amDateFormat"),a()()()),t&2){let i=u();s(5),C(D(6,2,i.group.createdAt)),s(6),C(D(12,4,i.group.modifiedAt))}}function Bt(t,l){if(t&1&&(d(0,"fa-icon",32),r(1,"span",33),m(2,"Permissions"),a()),t&2){let i=u();c("icon",i.icons.faShieldHalved)}}var Te=(()=>{let l=class l{constructor(){this.group=null,this.parentGroup=null,this.groupChange=new I,this.locale=x(oe),this.layout=x(V),this.icons={GROUPS:H.GROUPS,faPen:me,faPlus:ce,faCog:qe,faShieldHalved:Ye},this.submitted=!1,this.originalOrderKeyValue=de,this.allVisibilities={Visible:z.VISIBLE,Private:z.PRIVATE,Isolated:z.ISOLATED},this.adminService=x(R)}ngOnInit(){this.groupForm=new ke({name:new j(this.group?.name||"",Fe.required),description:new j(this.group?.description||""),visibility:new j(this.group?.visibility||z.VISIBLE),applications:new j(this.group?.applications||[]),parent:new j(this.parentGroup)})}updateApplications(o){this.groupForm.controls.applications.setValue(o),this.groupForm.controls.applications.markAsDirty()}onSetParent(o){this.groupForm.controls.parent.setValue(o?{id:o.id,name:o.name}:null),this.groupForm.controls.parent.markAsDirty()}searchGroups(o){let n={search:o,onlyGroups:!0,excludePersonalGroups:!0,ignoreGroupIds:this.groupForm.value.parent?[this.groupForm.value.parent.id]:[]};return this.adminService.searchMembers(n,!0)}onSubmit(){if(this.submitted=!0,this.group?.id){let o=this.makeDto();this.adminService.updateGroup(this.group.id,o).subscribe({next:n=>{this.groupChange.emit(["update",n]),this.layout.sendNotification("success","Group updated",this.groupForm.value.name),this.layout.closeDialog()},error:n=>this.onError(n)})}else{let o=this.makeDto(!0);this.adminService.createGroup(o).subscribe({next:n=>{this.groupChange.emit(["add",n]),this.layout.sendNotification("success","Group created",this.groupForm.value.name),this.layout.closeDialog()},error:n=>this.onError(n)})}}makeDto(o=!1){let n;o?n=Object.fromEntries(Object.keys(this.groupForm.controls).map(e=>[e,this.groupForm.controls[e].value])):n=Object.fromEntries(Object.keys(this.groupForm.controls).filter(e=>this.groupForm.controls[e].dirty).map(e=>[e,this.groupForm.controls[e].value]));for(let e in n)switch(e){case"applications":n.permissions=n[e].join(et),delete n.applications;break;case"parent":n.parentId=n[e]?n[e].id:null,delete n.parent;break}return n}onError(o){this.layout.sendNotification("error","Group error",this.groupForm.value.name,o),this.submitted=!1}};l.\u0275fac=function(n){return new(n||l)},l.\u0275cmp=E({type:l,selectors:[["app-admin-group-dialog"]],inputs:{group:"group",parentGroup:"parentGroup"},outputs:{groupChange:"groupChange"},decls:50,vars:24,consts:[[1,"modal-header","align-items-center"],[1,"modal-title"],[1,"modal-title","ms-auto"],["aria-label","Close","type","button",3,"click"],[1,"modal-body","form-validation",3,"formGroup"],["type","pills",3,"justified"],[1,"my-3"],["customClass","tab-dialog form-validation",3,"selectTab"],["tabHeading",""],[1,"d-flex","flex-column"],[1,"d-flex","col-12","pb-3"],[1,"flex-fill","col-6","pe-4"],["for","name","l10nTranslate",""],["id","name","appAutofocus","","formControlName","name","autocomplete","off","type","text",1,"form-control","form-control-sm",3,"autoSelect"],[1,"flex-fill","col-6","ps-4"],["for","description","l10nTranslate",""],["id","description","formControlName","description","autocomplete","off","type","text",1,"form-control","form-control-sm"],[1,"d-flex","flex-column","align-items-start","col-12","pb-3"],[1,"col-6","pe-4"],["for","visibility","l10nTranslate",""],["id","visibility","formControlName","visibility",1,"form-control","form-select","form-select-sm"],["l10nTranslate","",3,"ngValue"],[1,"d-none","d-sm-block","fst-italic","fs-xxs"],["l10nTranslate",""],[1,"d-flex","align-items-start","col-12","pb-3"],["for","parent","translate",""],["id","parent",3,"data","searchFunction","active","itemIcon","placeholder"],[3,"permissionsChange","permissions"],[1,"modal-footer"],["data-dismiss","modal","type","button","l10nTranslate","",1,"btn","btn-sm","btn-secondary","ms-auto",3,"click"],["type","button","l10nTranslate","",1,"btn","btn-sm","btn-primary",3,"click","disabled"],[1,"me-2",3,"icon"],[3,"icon"],["l10nTranslate","",1,"ms-2"],["for","created","l10nTranslate",""],["id","created"],[1,"d-flex","flex-column","align-items-end","col-6","ps-4"],["for","modified","l10nTranslate",""],["id","modified"]],template:function(n,e){if(n&1&&(r(0,"div",0)(1,"h4",1),h(2,Mt,3,2)(3,Pt,3,1),a(),h(4,Vt,3,0,"h4",2),r(5,"button",3),_("click",function(){return e.layout.closeDialog()}),a()(),r(6,"div",4)(7,"tabset",5),d(8,"hr",6),r(9,"tab",7),_("selectTab",function(){return e.tabView=null}),T(10,Rt,3,1,"ng-template",8),r(11,"div",9)(12,"div",10)(13,"div",11)(14,"label",12),m(15,"Name"),a(),d(16,"input",13),a(),r(17,"div",14)(18,"label",15),m(19,"Description"),a(),d(20,"input",16),a()(),r(21,"div",17)(22,"div",18)(23,"label",19),m(24,"Visibility"),a(),r(25,"select",20),B(26,Ft,2,2,"option",21,Dt),v(28,"keyvalue"),a()(),r(29,"div",22),h(30,Ut,2,0,"span",23)(31,kt,2,0,"span",23)(32,Ot,2,0,"span",23),a()(),r(33,"div",24)(34,"div",18)(35,"label",25),m(36,"Parent group"),a(),r(37,"app-select",26),v(38,"translate"),_("data",function(f){return e.onSetParent(f)}),a()()(),h(39,It,13,6,"div",24),a()(),r(40,"tab",7),_("selectTab",function(){return e.tabView="permissions"}),T(41,Bt,3,1,"ng-template",8),r(42,"div",9)(43,"div",10)(44,"app-admin-permissions",27),_("permissionsChange",function(f){return e.updateApplications(f)}),a()()()()()(),r(45,"div",28)(46,"button",29),_("click",function(){return e.layout.closeDialog()}),m(47,"Cancel"),a(),r(48,"button",30),_("click",function(){return e.onSubmit()}),m(49," Confirm "),a()()),n&2){let p;s(2),g(e.group?2:3),s(2),g(e.group?4:-1),s(),k(Ae("btn-close btn-close-white ",e.group?"ms-2":"ms-auto"," ms-2")),s(),c("formGroup",e.groupForm),s(),c("justified",!0),s(9),U("is-invalid",e.groupForm.controls.name.invalid),c("autoSelect",!1),s(10),N(w(28,18,e.allVisibilities,e.originalOrderKeyValue)),s(4),g((p=e.groupForm.value.visibility)===e.allVisibilities.Visible?30:p===e.allVisibilities.Private?31:p===e.allVisibilities.Isolated?32:-1),s(7),c("searchFunction",e.searchGroups.bind(e))("active",e.groupForm.value.parent)("itemIcon",e.icons.GROUPS)("placeholder",w(38,21,"Select the parent group",e.locale.language)),s(2),g(e.group?39:-1),s(5),c("permissions",e.groupForm.value.applications),s(4),c("disabled",e.submitted||e.groupForm.invalid)}},dependencies:[M,P,Le,Ne,$e,Re,Be,L,Ue,Oe,Ie,ct,_t,Ct,mt,pt,st,te,re,_e],encapsulation:2});let t=l;return t})();var Gt=(()=>{let l=class l{constructor(){this.layout=x(V),this.submitted=!1,this.isManager=!1,this.USER_GROUP_ROLE=K,this.icons={faUserPen:Qe,faKey:le},this.adminService=x(R)}ngOnInit(){this.isManager=this.user.isGroupManager}onSubmit(){if(this.submitted=!0,this.user.isGroupManager===this.isManager){this.layout.closeDialog();return}let o=this.isManager?K.MANAGER:K.MEMBER;this.adminService.updateUserFromGroup(this.parentGroup.id,this.user.id,{role:o}).subscribe({next:()=>{this.user.setGroupRole(o),this.layout.sendNotification("success","Edit user",this.user.name),this.layout.closeDialog()},error:n=>{this.submitted=!1,this.layout.sendNotification("error","Edit user",this.user.name,n)}})}};l.\u0275fac=function(n){return new(n||l)},l.\u0275cmp=E({type:l,selectors:[["app-admin-group-edit-user-dialog"]],inputs:{parentGroup:"parentGroup",user:"user"},decls:25,vars:5,consts:[[1,"modal-header","align-items-center"],[1,"modal-title"],[1,"me-2",3,"icon"],[1,"modal-title","ms-auto"],["l10nTranslate",""],["aria-label","Close","type","button",1,"btn-close","btn-close-white","ms-2",3,"click"],[1,"modal-body"],[1,"d-flex","align-items-center"],[1,"form-check","form-switch","form-check-inline"],[1,"d-flex"],[1,"form-check-label"],["type","checkbox",1,"form-check-input",3,"ngModelChange","ngModel"],[1,"ms-1",3,"icon"],[1,"modal-footer"],["data-dismiss","modal","type","button","l10nTranslate","",1,"btn","btn-sm","btn-secondary","ms-auto",3,"click"],["type","button","l10nTranslate","",1,"btn","btn-sm","btn-primary",3,"click","disabled"]],template:function(n,e){n&1&&(r(0,"div",0)(1,"h4",1),d(2,"fa-icon",2),r(3,"span"),m(4),a()(),r(5,"h4",3)(6,"span",4),m(7,"Edit user"),a()(),r(8,"button",5),_("click",function(){return e.layout.closeDialog()}),a()(),r(9,"div",6)(10,"div",7)(11,"div",8)(12,"div",9)(13,"label",10)(14,"input",11),ee("ngModelChange",function(f){return Z(e.isManager,f)||(e.isManager=f),f}),a(),r(15,"span",4),m(16,"Set as group manager"),a(),d(17,"fa-icon",12),a()()()(),r(18,"small",4),m(19,"As a manager, the user will be able to manage group members but not group properties."),a()(),r(20,"div",13)(21,"button",14),_("click",function(){return e.layout.closeDialog()}),m(22,"Cancel"),a(),r(23,"button",15),_("click",function(){return e.onSubmit()}),m(24," Confirm "),a()()),n&2&&(s(2),c("icon",e.icons.faUserPen),s(2),C(e.user.name),s(10),X("ngModel",e.isManager),s(3),c("icon",e.icons.faKey),s(6),c("disabled",e.submitted))},dependencies:[M,P,ne,Ve,L,ie],encapsulation:2});let t=l;return t})();var Nt=["MainContextMenu"],$t=["TargetContextMenu"],St=(t,l)=>l.key,Lt=(t,l)=>l.mid;function jt(t,l){if(t&1){let i=A();r(0,"ul",26)(1,"li",27)(2,"a",28),_("click",function(){y(i);let n=u();return G(n.openDialog(!0))}),r(3,"span",14),d(4,"fa-icon",7),m(5),a()()(),r(6,"li",27)(7,"a",28),_("click",function(){y(i);let n=u();return G(n.addUserToGroupDialog())}),r(8,"span",14),d(9,"fa-icon",7),m(10,"Add members"),a()()()()}if(t&2){let i=u();s(2),U("disabled",!!i.currentGroup&&i.personalGroupsView),s(2),c("icon",i.icons.GROUPS),s(),$(" ",i.personalGroupsView?"Personal group":"Group"),s(2),U("disabled",!i.currentGroup),s(2),c("icon",i.icons.faUserPlus)}}function Kt(t,l){if(t&1&&d(0,"fa-icon",31),t&2){let i=u(3);c("icon",i.sortTable.sortParam.asc?i.icons.faArrowDown:i.icons.faArrowUp)("fixedWidth",!1)}}function Ht(t,l){if(t&1){let i=A();r(0,"th",30),_("click",function(){y(i);let n=u().$implicit,e=u();return G(e.sortBy(n.key))}),m(1),h(2,Kt,1,2,"fa-icon",31),a()}if(t&2){let i=u().$implicit,o=u();k(i.value.class),Ce("width",i.value.width,"%"),U("text-align-center",i.value.textCenter)("cursor-pointer",i.value.sortable),s(),$(" ",i.value.label," "),s(),g(o.sortTable.sortParam.column===i.key?2:-1)}}function Qt(t,l){if(t&1&&h(0,Ht,3,10,"th",29),t&2){let i=l.$implicit;g(i.value.show?0:-1)}}function qt(t,l){if(t&1&&d(0,"img",36),t&2){let i=u(4).$implicit;c("src",i.avatarUrl,J)}}function Wt(t,l){if(t&1&&d(0,"fa-icon",7),t&2){let i=u(4).$implicit,o=u();k(i.isPersonalGroup?"circle-purple-icon":"circle-primary-icon"),c("icon",o.icons.GROUPS)}}function zt(t,l){if(t&1&&d(0,"fa-icon",39),t&2){let i=u(5);c("icon",i.icons.faKey)}}function Yt(t,l){if(t&1&&(r(0,"div",34),h(1,qt,1,1,"img",36)(2,Wt,1,3,"fa-icon",37),r(3,"div",35)(4,"span",38),m(5),h(6,zt,1,1,"fa-icon",39),a(),r(7,"span",40),m(8),a()()()),t&2){let i=u(3).$implicit;s(),g(i.isUser?1:2),s(4),$(" ",i.name," "),s(),g(i.isUser&&i.isGroupManager?6:-1),s(2),C(i.description)}}function Jt(t,l){if(t&1&&(r(0,"span"),m(1),v(2,"joinCounts"),a()),t&2){let i=u(4).$implicit;s(),C(D(2,1,i.counts))}}function Xt(t,l){if(t&1&&h(0,Jt,3,3,"span"),t&2){let i=u(3).$implicit;g(i.isGroup?0:-1)}}function Zt(t,l){t&1&&(r(0,"span",14),m(1,"manager"),a())}function ei(t,l){if(t&1&&(r(0,"span",14),m(1),a()),t&2){let i=u(4).$implicit;s(),C(i.type)}}function ti(t,l){if(t&1&&h(0,Zt,2,0,"span",14)(1,ei,2,1,"span",14),t&2){let i=u(3).$implicit;g(i.isUser&&i.isGroupManager?0:1)}}function ii(t,l){if(t&1&&(r(0,"div"),m(1),v(2,"amDateFormat"),a()),t&2){let i=u(4).$implicit;s(),C(D(2,1,i.modifiedAt))}}function ni(t,l){if(t&1&&(r(0,"div",35)(1,"div"),m(2),v(3,"amDateFormat"),a(),h(4,ii,3,3,"div"),a()),t&2){let i=u(3).$implicit;s(2),C(D(3,2,i.createdAt)),s(2),g(i.modifiedAt?4:-1)}}function oi(t,l){if(t&1&&(r(0,"td"),h(1,Yt,9,4,"div",34)(2,Xt,1,1)(3,ti,2,1)(4,ni,5,4,"div",35),a()),t&2){let i,o=u().$implicit,n=u().$implicit;k(De("",o.value.class," ",o.value.newly?"prop-newly-"+n[o.value.newly]:"")),Ce("width",o.value.width,"%"),U("text-align-center",o.value.textCenter),s(),g((i=o.key)==="name"?1:i==="members"?2:i==="type"?3:i==="createdAndModified"?4:-1)}}function ri(t,l){if(t&1&&h(0,oi,5,9,"td",33),t&2){let i=l.$implicit;g(i.value.show?0:-1)}}function ai(t,l){if(t&1){let i=A();r(0,"tr",32),_("click",function(){let n=y(i).$implicit,e=u();return G(e.onSelect(n))})("contextmenu",function(n){let e=y(i).$implicit,p=u();return G(p.onTargetContextMenu(n,e))})("pressup",function(n){let e=y(i).$implicit,p=u();return G(p.onTargetContextMenu(n,e))})("tap",function(){let n=y(i).$implicit,e=u();return G(e.browse(n))}),B(1,ri,1,1,null,null,St),v(3,"keyvalue"),a()}if(t&2){let i=l.$implicit,o=u();U("selected",i.mid===(o.selected==null?null:o.selected.mid)),s(),N(w(3,2,o.tableHeaders,o.originalOrderKeyValue))}}function li(t,l){if(t&1&&(r(0,"span",14),d(1,"fa-icon",7),m(2),a()),t&2){let i=u(2);s(),c("icon",i.icons.faPlus),s(),$(" ",i.personalGroupsView?"Personal group":"Group")}}function si(t,l){if(t&1){let i=A();T(0,li,3,2,"ng-template",25),_("execute",function(){y(i);let n=u();return G(n.openDialog(!0))})}}function mi(t,l){if(t&1&&(r(0,"span",14),d(1,"fa-icon",7),m(2,"Add members"),a()),t&2){let i=u(2);s(),c("icon",i.icons.faUserPlus)}}function pi(t,l){if(t&1){let i=A();T(0,mi,3,1,"ng-template",25),_("execute",function(){y(i);let n=u();return G(n.addUserToGroupDialog())})}}function ci(t,l){}function ui(t,l){if(t&1&&(r(0,"span",14),d(1,"fa-icon",7),m(2,"Refresh"),a()),t&2){let i=u();s(),c("icon",i.icons.faArrowRotateRight)}}function di(t,l){if(t&1&&(r(0,"span",14),d(1,"fa-icon",7),m(2),a()),t&2){let i=u(2);s(),c("icon",i.icons.faPen),s(),$(" ",i.selected.isGroup?"Edit group":"Edit user")}}function _i(t,l){if(t&1&&(r(0,"span",14),d(1,"fa-icon",7),m(2,"Delete group"),a()),t&2){let i=u(3);s(),c("icon",i.icons.faMinus)}}function fi(t,l){if(t&1){let i=A();T(0,_i,3,1,"ng-template",25),_("execute",function(){y(i);let n=u(2);return G(n.openDialog(!1,!0))})}}function hi(t,l){if(t&1&&(r(0,"span",14),d(1,"fa-icon",7),m(2,"Remove from group"),a()),t&2){let i=u(3);s(),c("icon",i.icons.faUserMinus)}}function gi(t,l){if(t&1){let i=A();T(0,hi,3,1,"ng-template",25),_("execute",function(){y(i);let n=u(2);return G(n.openDialog(!1,!0))})}}function bi(t,l){if(t&1){let i=A();T(0,di,3,2,"ng-template",25),_("execute",function(){y(i);let n=u();return G(n.openDialog())}),h(1,fi,1,0,null,23)(2,gi,1,0,null,23)}if(t&2){let i=u();s(),g(i.selected.isGroup?1:2)}}var oo=(()=>{let l=class l{constructor(){this.locale=x(oe),this.originalOrderKeyValue=de,this.icons={GROUPS:H.GROUPS,faRotate:Ke,faPlus:ce,faMinus:ae,faPen:me,faArrowDown:Xe,faArrowUp:We,faKey:le,faUserPlus:se,faUserMinus:pe,faArrowRotateRight:Je,faToggleOn:ze,faToggleOff:He},this.tableHeaders={name:{label:"Name",width:30,textCenter:!1,class:"",show:!0,sortable:!0},type:{label:"Type",width:10,textCenter:!0,class:"",show:!0,sortable:!0},members:{label:"Members",width:10,class:"",textCenter:!0,show:!0},createdAndModified:{label:"Created & Modified",width:12,textCenter:!0,class:"d-none d-lg-table-cell",newly:"newly",show:!0,sortable:!0}},this.personalGroupsView=!1,this.loading=!1,this.selected=null,this.members=[],this.router=x(Pe),this.activatedRoute=x(Me),this.layout=x(V),this.adminService=x(R),this.sortSettings={default:[{prop:"name",type:"string"}],name:[{prop:"name",type:"string"}],type:[{prop:"type",type:"string"}],createdAndModified:[{prop:"modifiedAt",type:"date"},{prop:"createdAt",type:"date"}]},this.sortTable=new lt(this.constructor.name,this.sortSettings),this.activatedRoute.data.subscribe(o=>{this.personalGroupsView=o.type===ue.PERSONAL,this.setEnv(o.routes)}),this.activatedRoute.queryParams.subscribe(o=>this.focusOnSelect=o.select),this.layout.setBreadcrumbIcon(tt.GROUPS)}onPersonalGroupsView(o){this.personalGroupsView=o,this.router.navigate([S.BASE,o?S.PGROUPS:S.GROUPS]).catch(console.error)}refresh(){this.loadGroups(this.currentGroup?.name)}browse(o){o.isGroup&&this.router.navigate([o.name],{relativeTo:this.activatedRoute}).catch(console.error)}onSelect(o=null){this.selected=o}onContextMenu(o){o.preventDefault(),o.stopPropagation(),this.layout.openContextMenu(o,this.mainContextMenu)}onTargetContextMenu(o,n){o.preventDefault(),o.type==="contextmenu"&&o.stopPropagation(),this.onSelect(n),this.layout.openContextMenu(o,this.targetContextMenu)}sortBy(o,n=!0,e){this.members=this.sortTable.sortBy(o,n,e||this.members)}addUserToGroupDialog(){this.layout.openDialog(vt,"md",{initialState:{parentGroup:this.currentGroup,currentMemberIds:this.members.filter(n=>n.isUser).map(n=>n.id)}}).content.hasChanges.pipe(be(n=>n),O(1)).subscribe(()=>this.refresh())}openDialog(o=!1,n=!1){o?this.personalGroupsView?this.layout.openDialog(we,"md").content.groupChange.pipe(O(1)).subscribe(p=>{let[f,b]=p;f==="add"&&(b.setGroupRole(K.MANAGER),b.counts={users:1},this.sortBy(this.sortTable.sortParam.column,!1,this.members.concat(b)),this.onSelect(b))}):this.layout.openDialog(Te,"md",{initialState:{parentGroup:this.currentGroup}}).content.groupChange.pipe(O(1)).subscribe(p=>{let[f,b]=p;if(f==="add")if(!this.currentGroup&&!b?.parent||b.parent.id===this.currentGroup.id){let F=new ye(ge(he({},b),{type:xe.GROUP}));this.sortBy(this.sortTable.sortParam.column,!1,this.members.concat(new ye(ge(he({},b),{type:xe.GROUP})))),this.onSelect(F)}else this.router.navigate([`${S.BASE}/${S.GROUPS}`,b.parent?.id?b.parent.name:""],{queryParams:{select:b.name}}).catch(console.error)}):n?this.layout.openDialog(xt,"md",{initialState:{parentGroup:this.currentGroup,member:this.selected}}).content.wasDeleted.pipe(be(p=>p),O(1)).subscribe(()=>{this.currentGroup?this.selected.counts?.groups?this.loadGroups(this.currentGroup.name):(this.sortBy(this.sortTable.sortParam.column,!1,this.members.filter(p=>this.selected.mid!==p.mid)),this.onSelect()):this.loadGroups()}):this.selected.isGroup?this.personalGroupsView?this.layout.openDialog(we,"md",{initialState:{originalGroup:this.selected}}).content.groupChange.pipe(O(1)).subscribe(p=>{let[f,b]=p;f==="update"&&(this.selected=Object.assign(this.selected,{name:b.name,description:b.description,modifiedAt:b.modifiedAt}))}):this.adminService.getGroup(this.selected.id).subscribe({next:e=>{this.layout.openDialog(Te,"md",{initialState:{group:e,parentGroup:this.currentGroup}}).content.groupChange.pipe(O(1)).subscribe(f=>{let[b,F]=f;b==="update"&&(!this.currentGroup&&!F?.parent||F.parent.id===this.currentGroup.id?this.selected=Object.assign(this.selected,F):this.router.navigate([`${S.BASE}/${S.GROUPS}`,F.parent?.id?F.parent.name:""],{queryParams:{select:F.name}}).catch(console.error))})},error:e=>this.layout.sendNotification("error","Edit group",this.selected.name,e)}):this.layout.openDialog(Gt,"md",{initialState:{user:this.selected,parentGroup:this.currentGroup}})}setEnv(o){let n;o.length?(n=o[o.length-1].path,this.layout.setBreadcrumbNav({url:this.personalGroupsView?`/${S.BASE}/${S.PGROUPS}${ve(o)}`:`/${S.BASE}/${S.GROUPS}${ve(o)}`,firstLink:`/${S.BASE}/${S.GROUPS}`,splicing:1,translating:!0,sameLink:!1,mutateLevel:{0:{setTitle:this.personalGroupsView?Y.PGROUPS:Y.GROUPS,translateTitle:!0}}})):this.layout.setBreadcrumbNav({url:this.personalGroupsView?`/${S.BASE}/${S.PGROUPS}/${Y.PGROUPS}`:`/${S.BASE}/${S.GROUPS}/${Y.GROUPS}`,splicing:2,translating:!0,sameLink:!0}),this.loadGroups(n)}loadGroups(o){this.loading=!0,this.onSelect(),this.adminService.browseGroup(o,this.personalGroupsView).subscribe({next:n=>{this.currentGroup=n.parentGroup,this.sortBy(this.sortTable.sortParam.column,!1,n.members),this.focusOnSelect?this.focusOn(this.focusOnSelect):this.scrollView.scrollInto(-1),this.loading=!1},error:n=>{this.members=[],this.layout.sendNotification("error","Groups",n.error.message),this.onSelect(),this.loading=!1}})}focusOn(o){let n=this.members.find(e=>e.name===o);n&&(setTimeout(()=>this.scrollView.scrollInto(n),100),this.onSelect(n))}};l.\u0275fac=function(n){return new(n||l)},l.\u0275cmp=E({type:l,selectors:[["app-admin-groups"]],viewQuery:function(n,e){if(n&1&&(Q(Se,5),Q(Ge,7),Q(Nt,7),Q($t,7)),n&2){let p;q(p=W())&&(e.scrollView=p.first),q(p=W())&&(e.inputFilter=p.first),q(p=W())&&(e.mainContextMenu=p.first),q(p=W())&&(e.targetContextMenu=p.first)}},decls:48,vars:42,consts:[["MainContextMenu",""],["TargetContextMenu",""],[1,"app-top-menu"],["container","body","type","button",1,"btn","btn-sm","btn-secondary","me-1",3,"click","tooltip"],[3,"icon","animation"],["dropdown","",1,"btn-group","btn-group-sm","me-1"],["dropdownToggle","","container","body","type","button",1,"btn","btn-sm","btn-secondary","dropdown-toggle",3,"tooltip"],[3,"icon"],["class","dropdown-menu","role","menu",4,"dropdownMenu"],["container","body","type","button",1,"btn","btn-sm","btn-secondary","me-1",3,"click","disabled","tooltip"],[1,"ms-auto"],["btnCheckbox","","type","button",1,"btn","btn-sm","btn-custom","me-1",3,"ngModelChange","ngModel"],[1,"d-flex","align-items-center"],[1,"me-2",3,"icon"],["l10nTranslate",""],[1,"btn-group","btn-group-sm"],[1,"d-none","d-sm-block"],[1,"app-table"],[3,"contextmenu","bufferAmount","items"],["tabindex","-1"],[3,"selected"],[1,"app-foot-menu"],[1,"mx-auto"],["contextMenuItem",""],["contextMenuItem","",3,"divider"],["contextMenuItem","",3,"execute"],["role","menu",1,"dropdown-menu"],["role","menuitem"],[1,"dropdown-item",3,"click"],["l10nTranslate","",3,"width","text-align-center","cursor-pointer","class"],["l10nTranslate","",3,"click"],[3,"icon","fixedWidth"],[3,"click","contextmenu","pressup","tap"],[3,"width","text-align-center","class"],[1,"d-flex","align-items-center","avatar"],[1,"d-flex","flex-column"],["alt","",1,"avatar-img",3,"src"],[3,"icon","class"],["draggable","false",1,"no-pointer-events"],[1,"m-0",3,"icon"],["draggable","false",1,"no-pointer-events","text-muted","fs-xxxs"]],template:function(n,e){if(n&1){let p=A();r(0,"div",2)(1,"button",3),v(2,"translate"),_("click",function(){return y(p),G(e.refresh())}),d(3,"fa-icon",4),a(),r(4,"div",5)(5,"button",6),v(6,"translate"),d(7,"fa-icon",7),a(),T(8,jt,11,7,"ul",8),a(),r(9,"button",9),v(10,"translate"),_("click",function(){return y(p),G(e.openDialog(!1,!0))}),d(11,"fa-icon",7),a(),r(12,"button",9),v(13,"translate"),_("click",function(){return y(p),G(e.openDialog())}),d(14,"fa-icon",7),a(),r(15,"div",10)(16,"button",11),_("ngModelChange",function(b){return y(p),G(e.onPersonalGroupsView(b))}),r(17,"div",12),d(18,"fa-icon",13),r(19,"span",14),m(20,"Personal groups"),a()()(),r(21,"div",15),d(22,"app-input-filter",16),a()()(),r(23,"table",17)(24,"thead")(25,"tr"),B(26,Qt,1,1,null,null,St),v(28,"keyvalue"),a()()(),r(29,"app-virtual-scroll",18),v(30,"searchFilter"),_("contextmenu",function(b){return y(p),G(e.onContextMenu(b))}),r(31,"table",17)(32,"tbody",19),B(33,ai,4,5,"tr",20,Lt),a()()(),r(35,"div",21)(36,"span",22),m(37),v(38,"translate"),a()(),r(39,"context-menu",null,0),h(41,si,1,0,null,23),h(42,pi,1,0,null,23),T(43,ci,0,0,"ng-template",24)(44,ui,3,1,"ng-template",25),_("execute",function(){return y(p),G(e.refresh())}),a(),r(45,"context-menu",null,1),h(47,bi,3,1),a()}n&2&&(s(),c("tooltip",w(2,21,"Refresh",e.locale.language)),s(2),c("icon",e.icons.faRotate)("animation",e.loading?"spin":null),s(2),c("tooltip",w(6,24,"New",e.locale.language)),s(2),c("icon",e.icons.faPlus),s(2),c("disabled",!e.selected)("tooltip",w(10,27,e.selected!=null&&e.selected.isUser?"Remove from group":"Delete group",e.locale.language)),s(2),c("icon",e.icons.faMinus),s(),c("disabled",!e.selected)("tooltip",w(13,30,e.selected!=null&&e.selected.isGroup?"Edit group":"Edit user",e.locale.language)),s(2),c("icon",e.icons.faPen),s(2),c("ngModel",e.personalGroupsView),s(2),c("icon",e.personalGroupsView?e.icons.faToggleOn:e.icons.faToggleOff),s(8),N(w(28,33,e.tableHeaders,e.originalOrderKeyValue)),s(3),c("bufferAmount",5)("items",w(30,36,e.members,e.inputFilter.search())),s(4),N(e.scrollView==null?null:e.scrollView.viewPortItems),s(4),Ee("",e.members.length," ",w(38,39,"groups",e.locale.language)),s(4),g(e.currentGroup&&!e.personalGroupsView||!e.currentGroup&&e.personalGroupsView?41:-1),s(),g(e.currentGroup?42:-1),s(),c("divider",!0),s(4),g(e.selected?47:-1))},dependencies:[ot,nt,it,M,P,Ge,Se,je,ft,gt,ht,rt,ne,L,ie,te,re,at,bt,_e],encapsulation:2});let t=l;return t})();export{oo as AdminGroupsComponent};
|
|
1
|
+
import{a as ue,b as z,c as we,d as Ct}from"./chunk-SOYI5P5A.js";import{b as R,c as _t}from"./chunk-ZEZVOO4G.js";import{a as S,b as Y,c as tt,e as dt}from"./chunk-YQGJX5R7.js";import{a as bt}from"./chunk-3UFSZ24R.js";import{a as ft,b as ht,c as gt}from"./chunk-2QNFUN7G.js";import{a as _e,b as st,c as mt,d as pt,f as ct,i as ut}from"./chunk-BOIXDTUT.js";import{a as Ge,b as Se,c as at,d as lt}from"./chunk-AS7H5UIO.js";import"./chunk-W4LKCEBR.js";import{g as rt}from"./chunk-6HV65OKG.js";import{L as Ze,M as K,Mb as xe,N as et,Rb as ye,Ta as ve,Xa as de,pa as it,qa as nt,ra as ot,ua as H,v as je,xb as V}from"./chunk-55WOZ7P6.js";import{b as Me,d as Pe}from"./chunk-J6YSVODR.js";import{$c as Ve,Bf as Ye,Cb as _,E as be,Eb as u,Ed as re,Fd as P,Ga as J,Gc as te,Gd as Ke,Ge as se,Gf as ce,Ib as Q,If as Je,Jb as q,Kb as W,L as O,Ld as ae,Ma as s,Mb as Ce,Nb as U,Ob as k,Pb as m,Qb as C,Qd as He,Rb as $,Re as qe,Sb as Ee,Tb as X,Ub as Z,Ue as We,Uf as Xe,Vb as ee,Xa as E,Xb as Ae,Yb as De,Zc as M,ab as T,ad as Re,ae as le,bb as I,cd as Fe,dc as v,ec as D,ed as L,fc as w,fd as Ue,gd as ke,ha as x,id as j,jb as h,jd as ie,kb as g,ma as y,na as G,nb as B,nd as Oe,ob as N,od as Ie,of as me,pb as c,pd as Be,qb as r,qd as Ne,rb as a,rd as $e,sb as d,wd as ne,wf as pe,xd as Le,xe as Qe,yd as oe,zb as A,zf as ze}from"./chunk-JQOMI5VI.js";import{a as he,b as ge}from"./chunk-RTRJ3KFH.js";var vt=(()=>{let l=class l{constructor(){this.currentMemberIds=[],this.hasChanges=new I,this.layout=x(V),this.newMembers=[],this.submitted=!1,this.icons={faUserPlus:se},this.adminService=x(R)}searchMembers(o){let n={search:o,onlyUsers:!0,usersRole:this.parentGroup.type===ue.USER?Ze.USER:void 0,ignoreUserIds:[...this.currentMemberIds,...this.newMembers.map(e=>e.id)]};return this.adminService.searchMembers(n)}onSubmit(){this.submitted=!0,this.adminService.addUsersToGroup(this.parentGroup.id,this.newMembers.map(o=>o.id)).subscribe({next:()=>{this.hasChanges.emit(!0),this.layout.sendNotification("success","Add members",this.newMembers.map(o=>o.name).join("<br>"),null,{enableHtml:!0}),this.layout.closeDialog()},error:o=>{this.submitted=!1,this.layout.sendNotification("error","Add members",this.newMembers.map(n=>n.name).join("<br>"),o,{enableHtml:!0})}})}};l.\u0275fac=function(n){return new(n||l)},l.\u0275cmp=E({type:l,selectors:[["app-admin-group-add-users-dialog"]],inputs:{parentGroup:"parentGroup",currentMemberIds:"currentMemberIds"},outputs:{hasChanges:"hasChanges"},decls:16,vars:7,consts:[[1,"modal-header","align-items-center"],[1,"modal-title"],[1,"me-2",3,"icon"],[1,"modal-title","ms-auto"],["l10nTranslate",""],["aria-label","Close","type","button",1,"btn-close","btn-close-white","ms-2",3,"click"],[1,"modal-body"],[3,"membersChange","members","withPermissions","customPlaceholder","searchFunction"],[1,"modal-footer"],["data-dismiss","modal","type","button","l10nTranslate","",1,"btn","btn-sm","btn-secondary","ms-auto",3,"click"],["type","button","l10nTranslate","",1,"btn","btn-sm","btn-primary",3,"click","disabled"]],template:function(n,e){n&1&&(r(0,"div",0)(1,"h4",1),d(2,"fa-icon",2),r(3,"span"),m(4),a()(),r(5,"h4",3)(6,"span",4),m(7,"Add members"),a()(),r(8,"button",5),_("click",function(){return e.layout.closeDialog()}),a()(),r(9,"div",6)(10,"app-user-search",7),ee("membersChange",function(f){return Z(e.newMembers,f)||(e.newMembers=f),f}),a()(),r(11,"div",8)(12,"button",9),_("click",function(){return e.layout.closeDialog()}),m(13,"Cancel"),a(),r(14,"button",10),_("click",function(){return e.onSubmit()}),m(15," Confirm "),a()()),n&2&&(s(2),c("icon",e.icons.faUserPlus),s(2),C(e.parentGroup.name),s(6),X("members",e.newMembers),c("withPermissions",!1)("customPlaceholder","Type to search for users to add")("searchFunction",e.searchMembers.bind(e)),s(4),c("disabled",e.submitted||!e.newMembers.length))},dependencies:[M,P,ut],encapsulation:2});let t=l;return t})();function wt(t,l){if(t&1&&d(0,"img",9),t&2){let i=u();c("src",i.member.avatarUrl,J)}}function Tt(t,l){if(t&1&&d(0,"fa-icon",15),t&2){let i=u();k(i.member.isPersonalGroup?"circle-purple-icon":"circle-primary-icon"),c("icon",i.icons.GROUPS)}}function Et(t,l){if(t&1&&(r(0,"div",7)(1,"span",16),m(2,"from the group"),a(),r(3,"span",11),m(4),v(5,"capitalize"),a()()),t&2){let i=u();s(4),C(D(5,1,i.parentGroup.name))}}function At(t,l){t&1&&(r(0,"small",4),m(1,"Only the group will be deleted, the members will no longer be part of it."),a())}var xt=(()=>{let l=class l{constructor(){this.wasDeleted=new I,this.submitted=!1,this.icons={GROUPS:H.GROUPS,faMinus:ae,faUserMinus:pe},this.layout=x(V),this.adminService=x(R)}onSubmit(){this.submitted=!0;let o=this.member.isUser?"Remove from group":"Delete group";(this.member.isUser?this.adminService.removeUserFromGroup(this.parentGroup.id,this.member.id):this.adminService.deleteGroup(this.member.id)).subscribe({next:()=>{this.wasDeleted.emit(!0),this.layout.sendNotification("success",o,this.member.name),this.onClose()},error:e=>{this.submitted=!1,this.layout.sendNotification("error",o,this.member.name,e)}})}onClose(){this.wasDeleted.emit(!1),this.layout.closeDialog()}};l.\u0275fac=function(n){return new(n||l)},l.\u0275cmp=E({type:l,selectors:[["app-admin-group-delete-dialog"]],inputs:{parentGroup:"parentGroup",member:"member"},outputs:{wasDeleted:"wasDeleted"},decls:26,vars:10,consts:[[1,"modal-header","align-items-center"],[1,"modal-title"],[1,"me-2",3,"icon"],[1,"modal-title","ms-auto"],["l10nTranslate",""],["aria-label","Close","type","button",1,"btn-close","btn-close-white","ms-2",3,"click"],[1,"modal-body"],[1,"d-flex","align-items-center"],[1,"d-flex","align-items-center","avatar","me-2"],["alt","",1,"avatar-img",3,"src"],[3,"icon","class"],[1,"fw-bold","me-1"],[1,"modal-footer"],["data-dismiss","modal","type","button","l10nTranslate","",1,"btn","btn-sm","btn-secondary","ms-auto",3,"click"],["type","button","l10nTranslate","",1,"btn","btn-sm","btn-danger",3,"click","disabled"],[3,"icon"],["l10nTranslate","",1,"mx-1"]],template:function(n,e){n&1&&(r(0,"div",0)(1,"h4",1),d(2,"fa-icon",2),r(3,"span"),m(4),a()(),r(5,"h4",3)(6,"span",4),m(7),a()(),r(8,"button",5),_("click",function(){return e.onClose()}),a()(),r(9,"div",6)(10,"div",7)(11,"div",8),h(12,wt,1,1,"img",9)(13,Tt,1,3,"fa-icon",10),a(),r(14,"span",11),m(15),v(16,"capitalize"),a(),r(17,"span",4),m(18,"will be removed"),a(),h(19,Et,6,3,"div",7),a(),h(20,At,2,0,"small",4),a(),r(21,"div",12)(22,"button",13),_("click",function(){return e.onClose()}),m(23,"Cancel"),a(),r(24,"button",14),_("click",function(){return e.onSubmit()}),m(25," Remove "),a()()),n&2&&(s(2),c("icon",e.member.isUser?e.icons.faUserMinus:e.icons.faMinus),s(2),C(e.member.name),s(3),C(e.member.isUser?"Remove from group":"Delete group"),s(5),g(e.member.isUser?12:13),s(3),C(D(16,8,e.member.name)),s(4),g(e.member.isUser?19:-1),s(),g(e.member.isGroup?20:-1),s(4),c("disabled",e.submitted))},dependencies:[M,P,dt],encapsulation:2});let t=l;return t})();var Dt=(t,l)=>l.value;function Mt(t,l){if(t&1&&(d(0,"fa-icon",31),r(1,"span"),m(2),a()),t&2){let i=u();c("icon",i.icons.faPen),s(2),C(i.group.name)}}function Pt(t,l){if(t&1&&(d(0,"fa-icon",31),r(1,"span",23),m(2,"New group"),a()),t&2){let i=u();c("icon",i.icons.faPlus)}}function Vt(t,l){t&1&&(r(0,"h4",2)(1,"span",23),m(2,"Edit group"),a()())}function Rt(t,l){if(t&1&&(d(0,"fa-icon",32),r(1,"span",33),m(2,"Settings"),a()),t&2){let i=u();c("icon",i.icons.faCog)}}function Ft(t,l){if(t&1&&(r(0,"option",21),m(1),a()),t&2){let i=l.$implicit;c("ngValue",i.value),s(),C(i.key)}}function Ut(t,l){t&1&&(r(0,"span",23),m(1,"All users can see this group."),a())}function kt(t,l){t&1&&(r(0,"span",23),m(1,"Users who are not members of this group cannot see it."),a())}function Ot(t,l){t&1&&(r(0,"span",23),m(1,"The group is not visible, its members cannot see it and cannot see each other."),a())}function It(t,l){if(t&1&&(r(0,"div",24)(1,"div",18)(2,"label",34),m(3,"Creation date"),a(),r(4,"div",35),m(5),v(6,"amDateFormat"),a()(),r(7,"div",36)(8,"label",37),m(9,"Modification date"),a(),r(10,"div",38),m(11),v(12,"amDateFormat"),a()()()),t&2){let i=u();s(5),C(D(6,2,i.group.createdAt)),s(6),C(D(12,4,i.group.modifiedAt))}}function Bt(t,l){if(t&1&&(d(0,"fa-icon",32),r(1,"span",33),m(2,"Permissions"),a()),t&2){let i=u();c("icon",i.icons.faShieldHalved)}}var Te=(()=>{let l=class l{constructor(){this.group=null,this.parentGroup=null,this.groupChange=new I,this.locale=x(oe),this.layout=x(V),this.icons={GROUPS:H.GROUPS,faPen:me,faPlus:ce,faCog:qe,faShieldHalved:Ye},this.submitted=!1,this.originalOrderKeyValue=de,this.allVisibilities={Visible:z.VISIBLE,Private:z.PRIVATE,Isolated:z.ISOLATED},this.adminService=x(R)}ngOnInit(){this.groupForm=new ke({name:new j(this.group?.name||"",Fe.required),description:new j(this.group?.description||""),visibility:new j(this.group?.visibility||z.VISIBLE),applications:new j(this.group?.applications||[]),parent:new j(this.parentGroup)})}updateApplications(o){this.groupForm.controls.applications.setValue(o),this.groupForm.controls.applications.markAsDirty()}onSetParent(o){this.groupForm.controls.parent.setValue(o?{id:o.id,name:o.name}:null),this.groupForm.controls.parent.markAsDirty()}searchGroups(o){let n={search:o,onlyGroups:!0,excludePersonalGroups:!0,ignoreGroupIds:this.groupForm.value.parent?[this.groupForm.value.parent.id]:[]};return this.adminService.searchMembers(n,!0)}onSubmit(){if(this.submitted=!0,this.group?.id){let o=this.makeDto();this.adminService.updateGroup(this.group.id,o).subscribe({next:n=>{this.groupChange.emit(["update",n]),this.layout.sendNotification("success","Group updated",this.groupForm.value.name),this.layout.closeDialog()},error:n=>this.onError(n)})}else{let o=this.makeDto(!0);this.adminService.createGroup(o).subscribe({next:n=>{this.groupChange.emit(["add",n]),this.layout.sendNotification("success","Group created",this.groupForm.value.name),this.layout.closeDialog()},error:n=>this.onError(n)})}}makeDto(o=!1){let n;o?n=Object.fromEntries(Object.keys(this.groupForm.controls).map(e=>[e,this.groupForm.controls[e].value])):n=Object.fromEntries(Object.keys(this.groupForm.controls).filter(e=>this.groupForm.controls[e].dirty).map(e=>[e,this.groupForm.controls[e].value]));for(let e in n)switch(e){case"applications":n.permissions=n[e].join(et),delete n.applications;break;case"parent":n.parentId=n[e]?n[e].id:null,delete n.parent;break}return n}onError(o){this.layout.sendNotification("error","Group error",this.groupForm.value.name,o),this.submitted=!1}};l.\u0275fac=function(n){return new(n||l)},l.\u0275cmp=E({type:l,selectors:[["app-admin-group-dialog"]],inputs:{group:"group",parentGroup:"parentGroup"},outputs:{groupChange:"groupChange"},decls:50,vars:24,consts:[[1,"modal-header","align-items-center"],[1,"modal-title"],[1,"modal-title","ms-auto"],["aria-label","Close","type","button",3,"click"],[1,"modal-body","form-validation",3,"formGroup"],["type","pills",3,"justified"],[1,"my-3"],["customClass","tab-dialog form-validation",3,"selectTab"],["tabHeading",""],[1,"d-flex","flex-column"],[1,"d-flex","col-12","pb-3"],[1,"flex-fill","col-6","pe-4"],["for","name","l10nTranslate",""],["id","name","appAutofocus","","formControlName","name","autocomplete","off","type","text",1,"form-control","form-control-sm",3,"autoSelect"],[1,"flex-fill","col-6","ps-4"],["for","description","l10nTranslate",""],["id","description","formControlName","description","autocomplete","off","type","text",1,"form-control","form-control-sm"],[1,"d-flex","flex-column","align-items-start","col-12","pb-3"],[1,"col-6","pe-4"],["for","visibility","l10nTranslate",""],["id","visibility","formControlName","visibility",1,"form-control","form-select","form-select-sm"],["l10nTranslate","",3,"ngValue"],[1,"d-none","d-sm-block","fst-italic","fs-xxs"],["l10nTranslate",""],[1,"d-flex","align-items-start","col-12","pb-3"],["for","parent","translate",""],["id","parent",3,"data","searchFunction","active","itemIcon","placeholder"],[3,"permissionsChange","permissions"],[1,"modal-footer"],["data-dismiss","modal","type","button","l10nTranslate","",1,"btn","btn-sm","btn-secondary","ms-auto",3,"click"],["type","button","l10nTranslate","",1,"btn","btn-sm","btn-primary",3,"click","disabled"],[1,"me-2",3,"icon"],[3,"icon"],["l10nTranslate","",1,"ms-2"],["for","created","l10nTranslate",""],["id","created"],[1,"d-flex","flex-column","align-items-end","col-6","ps-4"],["for","modified","l10nTranslate",""],["id","modified"]],template:function(n,e){if(n&1&&(r(0,"div",0)(1,"h4",1),h(2,Mt,3,2)(3,Pt,3,1),a(),h(4,Vt,3,0,"h4",2),r(5,"button",3),_("click",function(){return e.layout.closeDialog()}),a()(),r(6,"div",4)(7,"tabset",5),d(8,"hr",6),r(9,"tab",7),_("selectTab",function(){return e.tabView=null}),T(10,Rt,3,1,"ng-template",8),r(11,"div",9)(12,"div",10)(13,"div",11)(14,"label",12),m(15,"Name"),a(),d(16,"input",13),a(),r(17,"div",14)(18,"label",15),m(19,"Description"),a(),d(20,"input",16),a()(),r(21,"div",17)(22,"div",18)(23,"label",19),m(24,"Visibility"),a(),r(25,"select",20),B(26,Ft,2,2,"option",21,Dt),v(28,"keyvalue"),a()(),r(29,"div",22),h(30,Ut,2,0,"span",23)(31,kt,2,0,"span",23)(32,Ot,2,0,"span",23),a()(),r(33,"div",24)(34,"div",18)(35,"label",25),m(36,"Parent group"),a(),r(37,"app-select",26),v(38,"translate"),_("data",function(f){return e.onSetParent(f)}),a()()(),h(39,It,13,6,"div",24),a()(),r(40,"tab",7),_("selectTab",function(){return e.tabView="permissions"}),T(41,Bt,3,1,"ng-template",8),r(42,"div",9)(43,"div",10)(44,"app-admin-permissions",27),_("permissionsChange",function(f){return e.updateApplications(f)}),a()()()()()(),r(45,"div",28)(46,"button",29),_("click",function(){return e.layout.closeDialog()}),m(47,"Cancel"),a(),r(48,"button",30),_("click",function(){return e.onSubmit()}),m(49," Confirm "),a()()),n&2){let p;s(2),g(e.group?2:3),s(2),g(e.group?4:-1),s(),k(Ae("btn-close btn-close-white ",e.group?"ms-2":"ms-auto"," ms-2")),s(),c("formGroup",e.groupForm),s(),c("justified",!0),s(9),U("is-invalid",e.groupForm.controls.name.invalid),c("autoSelect",!1),s(10),N(w(28,18,e.allVisibilities,e.originalOrderKeyValue)),s(4),g((p=e.groupForm.value.visibility)===e.allVisibilities.Visible?30:p===e.allVisibilities.Private?31:p===e.allVisibilities.Isolated?32:-1),s(7),c("searchFunction",e.searchGroups.bind(e))("active",e.groupForm.value.parent)("itemIcon",e.icons.GROUPS)("placeholder",w(38,21,"Select the parent group",e.locale.language)),s(2),g(e.group?39:-1),s(5),c("permissions",e.groupForm.value.applications),s(4),c("disabled",e.submitted||e.groupForm.invalid)}},dependencies:[M,P,Le,Ne,$e,Re,Be,L,Ue,Oe,Ie,ct,_t,Ct,mt,pt,st,te,re,_e],encapsulation:2});let t=l;return t})();var Gt=(()=>{let l=class l{constructor(){this.layout=x(V),this.submitted=!1,this.isManager=!1,this.USER_GROUP_ROLE=K,this.icons={faUserPen:Qe,faKey:le},this.adminService=x(R)}ngOnInit(){this.isManager=this.user.isGroupManager}onSubmit(){if(this.submitted=!0,this.user.isGroupManager===this.isManager){this.layout.closeDialog();return}let o=this.isManager?K.MANAGER:K.MEMBER;this.adminService.updateUserFromGroup(this.parentGroup.id,this.user.id,{role:o}).subscribe({next:()=>{this.user.setGroupRole(o),this.layout.sendNotification("success","Edit user",this.user.name),this.layout.closeDialog()},error:n=>{this.submitted=!1,this.layout.sendNotification("error","Edit user",this.user.name,n)}})}};l.\u0275fac=function(n){return new(n||l)},l.\u0275cmp=E({type:l,selectors:[["app-admin-group-edit-user-dialog"]],inputs:{parentGroup:"parentGroup",user:"user"},decls:25,vars:5,consts:[[1,"modal-header","align-items-center"],[1,"modal-title"],[1,"me-2",3,"icon"],[1,"modal-title","ms-auto"],["l10nTranslate",""],["aria-label","Close","type","button",1,"btn-close","btn-close-white","ms-2",3,"click"],[1,"modal-body"],[1,"d-flex","align-items-center"],[1,"form-check","form-switch","form-check-inline"],[1,"d-flex"],[1,"form-check-label"],["type","checkbox",1,"form-check-input",3,"ngModelChange","ngModel"],[1,"ms-1",3,"icon"],[1,"modal-footer"],["data-dismiss","modal","type","button","l10nTranslate","",1,"btn","btn-sm","btn-secondary","ms-auto",3,"click"],["type","button","l10nTranslate","",1,"btn","btn-sm","btn-primary",3,"click","disabled"]],template:function(n,e){n&1&&(r(0,"div",0)(1,"h4",1),d(2,"fa-icon",2),r(3,"span"),m(4),a()(),r(5,"h4",3)(6,"span",4),m(7,"Edit user"),a()(),r(8,"button",5),_("click",function(){return e.layout.closeDialog()}),a()(),r(9,"div",6)(10,"div",7)(11,"div",8)(12,"div",9)(13,"label",10)(14,"input",11),ee("ngModelChange",function(f){return Z(e.isManager,f)||(e.isManager=f),f}),a(),r(15,"span",4),m(16,"Set as group manager"),a(),d(17,"fa-icon",12),a()()()(),r(18,"small",4),m(19,"As a manager, the user will be able to manage group members but not group properties."),a()(),r(20,"div",13)(21,"button",14),_("click",function(){return e.layout.closeDialog()}),m(22,"Cancel"),a(),r(23,"button",15),_("click",function(){return e.onSubmit()}),m(24," Confirm "),a()()),n&2&&(s(2),c("icon",e.icons.faUserPen),s(2),C(e.user.name),s(10),X("ngModel",e.isManager),s(3),c("icon",e.icons.faKey),s(6),c("disabled",e.submitted))},dependencies:[M,P,ne,Ve,L,ie],encapsulation:2});let t=l;return t})();var Nt=["MainContextMenu"],$t=["TargetContextMenu"],St=(t,l)=>l.key,Lt=(t,l)=>l.mid;function jt(t,l){if(t&1){let i=A();r(0,"ul",26)(1,"li",27)(2,"a",28),_("click",function(){y(i);let n=u();return G(n.openDialog(!0))}),r(3,"span",14),d(4,"fa-icon",7),m(5),a()()(),r(6,"li",27)(7,"a",28),_("click",function(){y(i);let n=u();return G(n.addUserToGroupDialog())}),r(8,"span",14),d(9,"fa-icon",7),m(10,"Add members"),a()()()()}if(t&2){let i=u();s(2),U("disabled",!!i.currentGroup&&i.personalGroupsView),s(2),c("icon",i.icons.GROUPS),s(),$(" ",i.personalGroupsView?"Personal group":"Group"),s(2),U("disabled",!i.currentGroup),s(2),c("icon",i.icons.faUserPlus)}}function Kt(t,l){if(t&1&&d(0,"fa-icon",31),t&2){let i=u(3);c("icon",i.sortTable.sortParam.asc?i.icons.faArrowDown:i.icons.faArrowUp)("fixedWidth",!1)}}function Ht(t,l){if(t&1){let i=A();r(0,"th",30),_("click",function(){y(i);let n=u().$implicit,e=u();return G(e.sortBy(n.key))}),m(1),h(2,Kt,1,2,"fa-icon",31),a()}if(t&2){let i=u().$implicit,o=u();k(i.value.class),Ce("width",i.value.width,"%"),U("text-align-center",i.value.textCenter)("cursor-pointer",i.value.sortable),s(),$(" ",i.value.label," "),s(),g(o.sortTable.sortParam.column===i.key?2:-1)}}function Qt(t,l){if(t&1&&h(0,Ht,3,10,"th",29),t&2){let i=l.$implicit;g(i.value.show?0:-1)}}function qt(t,l){if(t&1&&d(0,"img",36),t&2){let i=u(4).$implicit;c("src",i.avatarUrl,J)}}function Wt(t,l){if(t&1&&d(0,"fa-icon",7),t&2){let i=u(4).$implicit,o=u();k(i.isPersonalGroup?"circle-purple-icon":"circle-primary-icon"),c("icon",o.icons.GROUPS)}}function zt(t,l){if(t&1&&d(0,"fa-icon",39),t&2){let i=u(5);c("icon",i.icons.faKey)}}function Yt(t,l){if(t&1&&(r(0,"div",34),h(1,qt,1,1,"img",36)(2,Wt,1,3,"fa-icon",37),r(3,"div",35)(4,"span",38),m(5),h(6,zt,1,1,"fa-icon",39),a(),r(7,"span",40),m(8),a()()()),t&2){let i=u(3).$implicit;s(),g(i.isUser?1:2),s(4),$(" ",i.name," "),s(),g(i.isUser&&i.isGroupManager?6:-1),s(2),C(i.description)}}function Jt(t,l){if(t&1&&(r(0,"span"),m(1),v(2,"joinCounts"),a()),t&2){let i=u(4).$implicit;s(),C(D(2,1,i.counts))}}function Xt(t,l){if(t&1&&h(0,Jt,3,3,"span"),t&2){let i=u(3).$implicit;g(i.isGroup?0:-1)}}function Zt(t,l){t&1&&(r(0,"span",14),m(1,"manager"),a())}function ei(t,l){if(t&1&&(r(0,"span",14),m(1),a()),t&2){let i=u(4).$implicit;s(),C(i.type)}}function ti(t,l){if(t&1&&h(0,Zt,2,0,"span",14)(1,ei,2,1,"span",14),t&2){let i=u(3).$implicit;g(i.isUser&&i.isGroupManager?0:1)}}function ii(t,l){if(t&1&&(r(0,"div"),m(1),v(2,"amDateFormat"),a()),t&2){let i=u(4).$implicit;s(),C(D(2,1,i.modifiedAt))}}function ni(t,l){if(t&1&&(r(0,"div",35)(1,"div"),m(2),v(3,"amDateFormat"),a(),h(4,ii,3,3,"div"),a()),t&2){let i=u(3).$implicit;s(2),C(D(3,2,i.createdAt)),s(2),g(i.modifiedAt?4:-1)}}function oi(t,l){if(t&1&&(r(0,"td"),h(1,Yt,9,4,"div",34)(2,Xt,1,1)(3,ti,2,1)(4,ni,5,4,"div",35),a()),t&2){let i,o=u().$implicit,n=u().$implicit;k(De("",o.value.class," ",o.value.newly?"prop-newly-"+n[o.value.newly]:"")),Ce("width",o.value.width,"%"),U("text-align-center",o.value.textCenter),s(),g((i=o.key)==="name"?1:i==="members"?2:i==="type"?3:i==="createdAndModified"?4:-1)}}function ri(t,l){if(t&1&&h(0,oi,5,9,"td",33),t&2){let i=l.$implicit;g(i.value.show?0:-1)}}function ai(t,l){if(t&1){let i=A();r(0,"tr",32),_("click",function(){let n=y(i).$implicit,e=u();return G(e.onSelect(n))})("contextmenu",function(n){let e=y(i).$implicit,p=u();return G(p.onTargetContextMenu(n,e))})("pressup",function(n){let e=y(i).$implicit,p=u();return G(p.onTargetContextMenu(n,e))})("tap",function(){let n=y(i).$implicit,e=u();return G(e.browse(n))}),B(1,ri,1,1,null,null,St),v(3,"keyvalue"),a()}if(t&2){let i=l.$implicit,o=u();U("selected",i.mid===(o.selected==null?null:o.selected.mid)),s(),N(w(3,2,o.tableHeaders,o.originalOrderKeyValue))}}function li(t,l){if(t&1&&(r(0,"span",14),d(1,"fa-icon",7),m(2),a()),t&2){let i=u(2);s(),c("icon",i.icons.faPlus),s(),$(" ",i.personalGroupsView?"Personal group":"Group")}}function si(t,l){if(t&1){let i=A();T(0,li,3,2,"ng-template",25),_("execute",function(){y(i);let n=u();return G(n.openDialog(!0))})}}function mi(t,l){if(t&1&&(r(0,"span",14),d(1,"fa-icon",7),m(2,"Add members"),a()),t&2){let i=u(2);s(),c("icon",i.icons.faUserPlus)}}function pi(t,l){if(t&1){let i=A();T(0,mi,3,1,"ng-template",25),_("execute",function(){y(i);let n=u();return G(n.addUserToGroupDialog())})}}function ci(t,l){}function ui(t,l){if(t&1&&(r(0,"span",14),d(1,"fa-icon",7),m(2,"Refresh"),a()),t&2){let i=u();s(),c("icon",i.icons.faArrowRotateRight)}}function di(t,l){if(t&1&&(r(0,"span",14),d(1,"fa-icon",7),m(2),a()),t&2){let i=u(2);s(),c("icon",i.icons.faPen),s(),$(" ",i.selected.isGroup?"Edit group":"Edit user")}}function _i(t,l){if(t&1&&(r(0,"span",14),d(1,"fa-icon",7),m(2,"Delete group"),a()),t&2){let i=u(3);s(),c("icon",i.icons.faMinus)}}function fi(t,l){if(t&1){let i=A();T(0,_i,3,1,"ng-template",25),_("execute",function(){y(i);let n=u(2);return G(n.openDialog(!1,!0))})}}function hi(t,l){if(t&1&&(r(0,"span",14),d(1,"fa-icon",7),m(2,"Remove from group"),a()),t&2){let i=u(3);s(),c("icon",i.icons.faUserMinus)}}function gi(t,l){if(t&1){let i=A();T(0,hi,3,1,"ng-template",25),_("execute",function(){y(i);let n=u(2);return G(n.openDialog(!1,!0))})}}function bi(t,l){if(t&1){let i=A();T(0,di,3,2,"ng-template",25),_("execute",function(){y(i);let n=u();return G(n.openDialog())}),h(1,fi,1,0,null,23)(2,gi,1,0,null,23)}if(t&2){let i=u();s(),g(i.selected.isGroup?1:2)}}var oo=(()=>{let l=class l{constructor(){this.locale=x(oe),this.originalOrderKeyValue=de,this.icons={GROUPS:H.GROUPS,faRotate:Ke,faPlus:ce,faMinus:ae,faPen:me,faArrowDown:Xe,faArrowUp:We,faKey:le,faUserPlus:se,faUserMinus:pe,faArrowRotateRight:Je,faToggleOn:ze,faToggleOff:He},this.tableHeaders={name:{label:"Name",width:30,textCenter:!1,class:"",show:!0,sortable:!0},type:{label:"Type",width:10,textCenter:!0,class:"",show:!0,sortable:!0},members:{label:"Members",width:10,class:"",textCenter:!0,show:!0},createdAndModified:{label:"Created & Modified",width:12,textCenter:!0,class:"d-none d-lg-table-cell",newly:"newly",show:!0,sortable:!0}},this.personalGroupsView=!1,this.loading=!1,this.selected=null,this.members=[],this.router=x(Pe),this.activatedRoute=x(Me),this.layout=x(V),this.adminService=x(R),this.sortSettings={default:[{prop:"name",type:"string"}],name:[{prop:"name",type:"string"}],type:[{prop:"type",type:"string"}],createdAndModified:[{prop:"modifiedAt",type:"date"},{prop:"createdAt",type:"date"}]},this.sortTable=new lt(this.constructor.name,this.sortSettings),this.activatedRoute.data.subscribe(o=>{this.personalGroupsView=o.type===ue.PERSONAL,this.setEnv(o.routes)}),this.activatedRoute.queryParams.subscribe(o=>this.focusOnSelect=o.select),this.layout.setBreadcrumbIcon(tt.GROUPS)}onPersonalGroupsView(o){this.personalGroupsView=o,this.router.navigate([S.BASE,o?S.PGROUPS:S.GROUPS]).catch(console.error)}refresh(){this.loadGroups(this.currentGroup?.name)}browse(o){o.isGroup&&this.router.navigate([o.name],{relativeTo:this.activatedRoute}).catch(console.error)}onSelect(o=null){this.selected=o}onContextMenu(o){o.preventDefault(),o.stopPropagation(),this.layout.openContextMenu(o,this.mainContextMenu)}onTargetContextMenu(o,n){o.preventDefault(),o.type==="contextmenu"&&o.stopPropagation(),this.onSelect(n),this.layout.openContextMenu(o,this.targetContextMenu)}sortBy(o,n=!0,e){this.members=this.sortTable.sortBy(o,n,e||this.members)}addUserToGroupDialog(){this.layout.openDialog(vt,"md",{initialState:{parentGroup:this.currentGroup,currentMemberIds:this.members.filter(n=>n.isUser).map(n=>n.id)}}).content.hasChanges.pipe(be(n=>n),O(1)).subscribe(()=>this.refresh())}openDialog(o=!1,n=!1){o?this.personalGroupsView?this.layout.openDialog(we,"md").content.groupChange.pipe(O(1)).subscribe(p=>{let[f,b]=p;f==="add"&&(b.setGroupRole(K.MANAGER),b.counts={users:1},this.sortBy(this.sortTable.sortParam.column,!1,this.members.concat(b)),this.onSelect(b))}):this.layout.openDialog(Te,"md",{initialState:{parentGroup:this.currentGroup}}).content.groupChange.pipe(O(1)).subscribe(p=>{let[f,b]=p;if(f==="add")if(!this.currentGroup&&!b?.parent||b.parent.id===this.currentGroup.id){let F=new ye(ge(he({},b),{type:xe.GROUP}));this.sortBy(this.sortTable.sortParam.column,!1,this.members.concat(new ye(ge(he({},b),{type:xe.GROUP})))),this.onSelect(F)}else this.router.navigate([`${S.BASE}/${S.GROUPS}`,b.parent?.id?b.parent.name:""],{queryParams:{select:b.name}}).catch(console.error)}):n?this.layout.openDialog(xt,"md",{initialState:{parentGroup:this.currentGroup,member:this.selected}}).content.wasDeleted.pipe(be(p=>p),O(1)).subscribe(()=>{this.currentGroup?this.selected.counts?.groups?this.loadGroups(this.currentGroup.name):(this.sortBy(this.sortTable.sortParam.column,!1,this.members.filter(p=>this.selected.mid!==p.mid)),this.onSelect()):this.loadGroups()}):this.selected.isGroup?this.personalGroupsView?this.layout.openDialog(we,"md",{initialState:{originalGroup:this.selected}}).content.groupChange.pipe(O(1)).subscribe(p=>{let[f,b]=p;f==="update"&&(this.selected=Object.assign(this.selected,{name:b.name,description:b.description,modifiedAt:b.modifiedAt}))}):this.adminService.getGroup(this.selected.id).subscribe({next:e=>{this.layout.openDialog(Te,"md",{initialState:{group:e,parentGroup:this.currentGroup}}).content.groupChange.pipe(O(1)).subscribe(f=>{let[b,F]=f;b==="update"&&(!this.currentGroup&&!F?.parent||F.parent.id===this.currentGroup.id?this.selected=Object.assign(this.selected,F):this.router.navigate([`${S.BASE}/${S.GROUPS}`,F.parent?.id?F.parent.name:""],{queryParams:{select:F.name}}).catch(console.error))})},error:e=>this.layout.sendNotification("error","Edit group",this.selected.name,e)}):this.layout.openDialog(Gt,"md",{initialState:{user:this.selected,parentGroup:this.currentGroup}})}setEnv(o){let n;o.length?(n=o[o.length-1].path,this.layout.setBreadcrumbNav({url:this.personalGroupsView?`/${S.BASE}/${S.PGROUPS}${ve(o)}`:`/${S.BASE}/${S.GROUPS}${ve(o)}`,firstLink:`/${S.BASE}/${S.GROUPS}`,splicing:1,translating:!0,sameLink:!1,mutateLevel:{0:{setTitle:this.personalGroupsView?Y.PGROUPS:Y.GROUPS,translateTitle:!0}}})):this.layout.setBreadcrumbNav({url:this.personalGroupsView?`/${S.BASE}/${S.PGROUPS}/${Y.PGROUPS}`:`/${S.BASE}/${S.GROUPS}/${Y.GROUPS}`,splicing:2,translating:!0,sameLink:!0}),this.loadGroups(n)}loadGroups(o){this.loading=!0,this.onSelect(),this.adminService.browseGroup(o,this.personalGroupsView).subscribe({next:n=>{this.currentGroup=n.parentGroup,this.sortBy(this.sortTable.sortParam.column,!1,n.members),this.focusOnSelect?this.focusOn(this.focusOnSelect):this.scrollView.scrollInto(-1),this.loading=!1},error:n=>{this.members=[],this.layout.sendNotification("error","Groups",n.error.message),this.onSelect(),this.loading=!1}})}focusOn(o){let n=this.members.find(e=>e.name===o);n&&(setTimeout(()=>this.scrollView.scrollInto(n),100),this.onSelect(n))}};l.\u0275fac=function(n){return new(n||l)},l.\u0275cmp=E({type:l,selectors:[["app-admin-groups"]],viewQuery:function(n,e){if(n&1&&(Q(Se,5),Q(Ge,7),Q(Nt,7),Q($t,7)),n&2){let p;q(p=W())&&(e.scrollView=p.first),q(p=W())&&(e.inputFilter=p.first),q(p=W())&&(e.mainContextMenu=p.first),q(p=W())&&(e.targetContextMenu=p.first)}},decls:48,vars:42,consts:[["MainContextMenu",""],["TargetContextMenu",""],[1,"app-top-menu"],["container","body","type","button",1,"btn","btn-sm","btn-secondary","me-1",3,"click","tooltip"],[3,"icon","animation"],["dropdown","",1,"btn-group","btn-group-sm","me-1"],["dropdownToggle","","container","body","type","button",1,"btn","btn-sm","btn-secondary","dropdown-toggle",3,"tooltip"],[3,"icon"],["class","dropdown-menu","role","menu",4,"dropdownMenu"],["container","body","type","button",1,"btn","btn-sm","btn-secondary","me-1",3,"click","disabled","tooltip"],[1,"ms-auto"],["btnCheckbox","","type","button",1,"btn","btn-sm","btn-custom","me-1",3,"ngModelChange","ngModel"],[1,"d-flex","align-items-center"],[1,"me-2",3,"icon"],["l10nTranslate",""],[1,"btn-group","btn-group-sm"],[1,"d-none","d-sm-block"],[1,"app-table"],[3,"contextmenu","bufferAmount","items"],["tabindex","-1"],[3,"selected"],[1,"app-foot-menu"],[1,"mx-auto"],["contextMenuItem",""],["contextMenuItem","",3,"divider"],["contextMenuItem","",3,"execute"],["role","menu",1,"dropdown-menu"],["role","menuitem"],[1,"dropdown-item",3,"click"],["l10nTranslate","",3,"width","text-align-center","cursor-pointer","class"],["l10nTranslate","",3,"click"],[3,"icon","fixedWidth"],[3,"click","contextmenu","pressup","tap"],[3,"width","text-align-center","class"],[1,"d-flex","align-items-center","avatar"],[1,"d-flex","flex-column"],["alt","",1,"avatar-img",3,"src"],[3,"icon","class"],["draggable","false",1,"no-pointer-events"],[1,"m-0",3,"icon"],["draggable","false",1,"no-pointer-events","text-muted","fs-xxxs"]],template:function(n,e){if(n&1){let p=A();r(0,"div",2)(1,"button",3),v(2,"translate"),_("click",function(){return y(p),G(e.refresh())}),d(3,"fa-icon",4),a(),r(4,"div",5)(5,"button",6),v(6,"translate"),d(7,"fa-icon",7),a(),T(8,jt,11,7,"ul",8),a(),r(9,"button",9),v(10,"translate"),_("click",function(){return y(p),G(e.openDialog(!1,!0))}),d(11,"fa-icon",7),a(),r(12,"button",9),v(13,"translate"),_("click",function(){return y(p),G(e.openDialog())}),d(14,"fa-icon",7),a(),r(15,"div",10)(16,"button",11),_("ngModelChange",function(b){return y(p),G(e.onPersonalGroupsView(b))}),r(17,"div",12),d(18,"fa-icon",13),r(19,"span",14),m(20,"Personal groups"),a()()(),r(21,"div",15),d(22,"app-input-filter",16),a()()(),r(23,"table",17)(24,"thead")(25,"tr"),B(26,Qt,1,1,null,null,St),v(28,"keyvalue"),a()()(),r(29,"app-virtual-scroll",18),v(30,"searchFilter"),_("contextmenu",function(b){return y(p),G(e.onContextMenu(b))}),r(31,"table",17)(32,"tbody",19),B(33,ai,4,5,"tr",20,Lt),a()()(),r(35,"div",21)(36,"span",22),m(37),v(38,"translate"),a()(),r(39,"context-menu",null,0),h(41,si,1,0,null,23),h(42,pi,1,0,null,23),T(43,ci,0,0,"ng-template",24)(44,ui,3,1,"ng-template",25),_("execute",function(){return y(p),G(e.refresh())}),a(),r(45,"context-menu",null,1),h(47,bi,3,1),a()}n&2&&(s(),c("tooltip",w(2,21,"Refresh",e.locale.language)),s(2),c("icon",e.icons.faRotate)("animation",e.loading?"spin":null),s(2),c("tooltip",w(6,24,"New",e.locale.language)),s(2),c("icon",e.icons.faPlus),s(2),c("disabled",!e.selected)("tooltip",w(10,27,e.selected!=null&&e.selected.isUser?"Remove from group":"Delete group",e.locale.language)),s(2),c("icon",e.icons.faMinus),s(),c("disabled",!e.selected)("tooltip",w(13,30,e.selected!=null&&e.selected.isGroup?"Edit group":"Edit user",e.locale.language)),s(2),c("icon",e.icons.faPen),s(2),c("ngModel",e.personalGroupsView),s(2),c("icon",e.personalGroupsView?e.icons.faToggleOn:e.icons.faToggleOff),s(8),N(w(28,33,e.tableHeaders,e.originalOrderKeyValue)),s(3),c("bufferAmount",5)("items",w(30,36,e.members,e.inputFilter.search())),s(4),N(e.scrollView==null?null:e.scrollView.viewPortItems),s(4),Ee("",e.members.length," ",w(38,39,"groups",e.locale.language)),s(4),g(e.currentGroup&&!e.personalGroupsView||!e.currentGroup&&e.personalGroupsView?41:-1),s(),g(e.currentGroup?42:-1),s(),c("divider",!0),s(4),g(e.selected?47:-1))},dependencies:[ot,nt,it,M,P,Ge,Se,je,ft,gt,ht,rt,ne,L,ie,te,re,at,bt,_e],encapsulation:2});let t=l;return t})();export{oo as AdminGroupsComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as ft,c as ht}from"./chunk-MGWQFMQF.js";import{A as ut,C as Ct,z as _t}from"./chunk-JOPTBE35.js";import{a as dt}from"./chunk-RTHDK2Z7.js";import{a as re}from"./chunk-6QJL2YDQ.js";import{a as lt}from"./chunk-XCIDAKI5.js";import{d as Ge}from"./chunk-ZGLYEYWA.js";import"./chunk-JXZCNFW7.js";import{a as et}from"./chunk-DZNKFVGE.js";import{a as ct}from"./chunk-3UFSZ24R.js";import"./chunk-HX6BM5E5.js";import{a as Je,b as tt,c as it,d as nt,e as ot,f as at,h as rt,i as st}from"./chunk-2AC4RLMK.js";import{a as oe,b as ae,c as Xe,d as Ze}from"./chunk-UILGGLKW.js";import{e as mt}from"./chunk-2FUMMTEK.js";import{f as pt,g as ie}from"./chunk-W37K2YDS.js";import"./chunk-Q2UU32ST.js";import"./chunk-WA2KMN23.js";import{f as te}from"./chunk-3SC36MTD.js";import{B as Y,Hb as je,Ib as I,Ja as He,Jb as ne,O as We,Sb as Ye,Xa as Qe,kb as ze,mb as W,pa as Ue,pb as Z,qa as $e,ra as qe,v as Me,w as Ve,xb as ee}from"./chunk-4GYSKJJC.js";import"./chunk-ZZ3LHYOY.js";import{b as Se,d as xe}from"./chunk-J6YSVODR.js";import{$c as be,Cb as f,Eb as c,Ed as De,Ef as Le,Fd as j,Gc as ge,Gd as Pe,Gf as J,Ib as B,If as Be,Jb as N,Kb as O,L,Ma as a,Mb as F,Nb as U,Ob as R,Pb as m,Qb as E,Rb as D,Re as Fe,Sb as ue,Tb as M,Ub as V,Ue as Re,Uf as Ne,Vb as P,Xa as $,Xb as H,Yb as fe,Zc as z,Zf as Oe,_a as q,_b as Ce,ab as w,ad as ve,bb as de,bf as Ie,cg as Ke,dc as b,ec as Q,ed as ye,f as me,fc as v,gc as he,ha as y,ib as _e,jb as g,jd as we,kb as S,ma as C,na as h,nb as A,ob as k,of as G,pb as p,pe as Ae,qb as s,rb as l,sb as u,se as ke,td as Te,vf as X,wd as Ee,yd as K,zb as x}from"./chunk-JQOMI5VI.js";import{a as ce,b as pe}from"./chunk-RTRJ3KFH.js";var gt=(()=>{let r=class r{transform(n,o,i){if(typeof o>"u"||typeof o=="number"&&typeof i>"u")throw new Error("TimeAddPipe: missing required arguments");return(0,Y.default)(n).add(o,i)}};r.\u0275fac=function(o){return new(o||r)},r.\u0275pipe=q({name:"amAdd",type:r,pure:!0});let e=r;return e})();var St=(()=>{let r=class r{transform(n,o){if(!o)throw new Error("TimeDurationPipe: missing required time unit argument");return Y.default.duration({[o]:n}).humanize()}};r.\u0275fac=function(o){return new(o||r)},r.\u0275pipe=q({name:"amDuration",type:r,pure:!1});let e=r;return e})();function Tt(e,r){if(e&1&&(s(0,"span"),m(1),l()),e&2){let t=c();a(),E(t.space.name)}}function Et(e,r){e&1&&(s(0,"span",3),m(1,"Create a new space"),l())}function Dt(e,r){if(e&1&&u(0,"fa-icon",4),e&2){let t=c();p("icon",t.icons.faSpinner)}}function Mt(e,r){e&1&&(s(0,"h4",5)(1,"span",3),m(2,"Edit space"),l()())}function Vt(e,r){if(e&1&&(u(0,"fa-icon",45),s(1,"span",46),m(2,"Settings"),l()),e&2){let t=c();p("icon",t.icons.faCog)}}function Pt(e,r){if(e&1&&(s(0,"div",21)(1,"label",47),m(2,"Storage Usage"),l(),u(3,"app-storage-usage",48),l()),e&2){let t=c();a(3),p("item",t.space)}}function At(e,r){if(e&1&&(s(0,"span"),m(1),b(2,"amAdd"),b(3,"amTimeAgo"),l()),e&2){let t=c(2);a(),D("\xA0",v(3,5,he(2,1,t.space.disabledAt,t.SPACE_MAX_DISABLED_DAYS,"days"),!0))}}function kt(e,r){if(e&1&&(s(0,"span"),m(1),b(2,"amDuration"),l()),e&2){let t=c(2);a(),D("\xA0",v(2,1,t.SPACE_MAX_DISABLED_DAYS,"days"))}}function Ft(e,r){if(e&1&&(s(0,"div",27)(1,"span",3),m(2,"Space and data will be deleted in"),l(),s(3,"span",49),g(4,At,4,8,"span")(5,kt,3,4,"span"),l()()),e&2){let t=c();a(4),S(t.space.disabledAt?4:5)}}function Rt(e,r){e&1&&(s(0,"small",33),m(1,"At least one manager is required"),l())}function It(e,r){if(e&1&&(s(0,"div",56)(1,"label",57),m(2,"Deactivation date"),l(),s(3,"div",58),m(4),b(5,"amDateFormat"),l()()),e&2){let t=c(2);a(4),E(Q(5,1,t.space.disabledAt))}}function Lt(e,r){if(e&1&&(s(0,"div",34)(1,"div",50)(2,"label",51),m(3,"Creation date"),l(),s(4,"div",52),m(5),b(6,"amDateFormat"),l()(),s(7,"div",53)(8,"label",54),m(9,"Modification date"),l(),s(10,"div",55),m(11),b(12,"amDateFormat"),l()(),g(13,It,6,3,"div",56),l()),e&2){let t=c();a(5),E(Q(6,3,t.space.createdAt)),a(6),E(Q(12,5,t.space.modifiedAt)),a(2),S(t.space.disabledAt&&!t.space.enabled?13:-1)}}function Bt(e,r){if(e&1&&(u(0,"fa-icon",45),s(1,"span",59),m(2,"Files"),l(),s(3,"span"),m(4),l()),e&2){let t=c();p("icon",t.icons.faAnchor),a(4),D("(",(t.space.roots==null?null:t.space.roots.length)||0,")")}}function Nt(e,r){if(e&1&&(u(0,"fa-icon",45),s(1,"span",59),m(2,"Members"),l(),s(3,"span"),m(4),l()),e&2){let t=c();p("icon",t.icons.faUsers),a(4),D("(",t.space.members.length,")")}}function Ot(e,r){if(e&1&&(u(0,"fa-icon",45),s(1,"span",59),m(2,"Links"),l(),s(3,"span"),m(4),l()),e&2){let t=c();p("icon",t.icons.LINKS),a(4),D("(",t.space.links.length,")")}}function Wt(e,r){if(e&1){let t=x();s(0,"button",60),f("click",function(){C(t);let o=c();return h(o.confirmDeletion=!0)}),m(1," Remove "),l()}if(e&2){let t=c();p("disabled",t.confirmDeletion)}}function Ut(e,r){if(e&1){let t=x();s(0,"button",61),f("click",function(){C(t);let o=c();return h(o.openCreateLinkDialog())}),u(1,"fa-icon",45)(2,"fa-icon",45),m(3," Link "),l()}if(e&2){let t=c();a(),p("icon",t.icons.faPlus),a(),p("icon",t.icons.LINKS)}}function $t(e,r){if(e&1){let t=x();s(0,"button",63),f("click",function(){C(t);let o=c(2);return h(o.openAdminRootDialog())}),u(1,"fa-icon",45)(2,"fa-icon",45),m(3," External location "),l()}if(e&2){let t=c(2);a(),p("icon",t.icons.faPlus),a(),p("icon",t.icons.faUserShield)}}function qt(e,r){if(e&1){let t=x();s(0,"button",61),f("click",function(){C(t);let o=c();return h(o.openSelectRootDialog())}),u(1,"fa-icon",45)(2,"fa-icon",45),m(3," File "),l(),g(4,$t,4,2,"button",62)}if(e&2){let t=c();a(),p("icon",t.icons.faPlus),a(),p("icon",t.icons.faAnchor),a(2),S(t.user.isAdmin?4:-1)}}var le=(()=>{let r=class r{constructor(){this.space=new pt({id:0,name:"",createdAt:new Date,enabled:!0,storageUsage:0,storageQuota:null}),this.spaceChange=new de,this.locale=y(K),this.layout=y(ee),this.icons={SPACES:I.SPACES,LINKS:I.LINKS,faPen:G,faAnchor:X,faUserShield:ke,faPlus:J,faSpinner:Ie,faCog:Fe,faUsers:Ae},this.SPACE_MAX_DISABLED_DAYS=30,this.addRootFileEvent=new me,this.allowedLinkPermissions=[W.ADD,W.DELETE,W.MODIFY],this.editManagers=!1,this.confirmDeletion=!1,this.loading=!1,this.submitted=!1,this.userService=y(te),this.user=this.userService.user,this.spacesService=y(ie),this.linksService=y(mt)}ngOnInit(){this.space.id||this.space.managers.unshift(Ye(this.user,Z.IS_MANAGER))}searchManagers(n){let o={search:n,ignoreUserIds:[...this.space.managers.map(i=>i.id),...this.space.members.filter(i=>i.isUser).map(i=>i.id)],onlyUsers:!0};return this.userService.searchMembers(o)}searchMembers(n){let o={search:n,ignoreUserIds:[...this.space.managers.map(i=>i.id),...this.space.members.filter(i=>i.isUser).map(i=>i.id)],ignoreGroupIds:this.space.members.filter(i=>i.isGroup).map(i=>i.id)};return this.userService.searchMembers(o)}openSelectRootDialog(){this.layout.openDialog(_t,"xl",{initialState:{currentRoots:this.space.roots.filter(o=>o.owner.id===this.user.id)}}).content.submitEvent.pipe(L(1)).subscribe(o=>this.addRootFileEvent.next(o))}openAdminRootDialog(){this.layout.openDialog(ut,null,{initialState:{currentRoots:this.space.roots.filter(o=>o.externalPath)}}).content.submitEvent.pipe(L(1)).subscribe(o=>this.addRootFileEvent.next(o))}openEditLinkDialog(n){this.linksService.editLinkDialog(n,this.space,Ke.SPACE)}openCreateLinkDialog(){this.linksService.createLinkDialog(this.space)}onCancel(){this.confirmDeletion?this.confirmDeletion=!1:this.layout.closeDialog()}onSubmit(){this.loading=!0,this.submitted=!0,this.confirmDeletion?(this.space.id===0&&this.layout.closeDialog(),this.spacesService.deleteSpace(this.space.id,{deleteNow:!0}).subscribe({next:()=>{this.loading=!1,this.spaceChange.emit(["delete",this.space]),this.layout.closeDialog()},error:n=>{this.onError(),this.layout.sendNotification("error","Delete space",this.space.name,n)}})):this.space.id===0?this.spacesService.createSpace(this.space).subscribe({next:n=>{this.loading=!1,this.space=n,this.spaceChange.emit(["add",n]),this.layout.closeDialog()},error:n=>{this.onError(),this.layout.sendNotification("error","Create space",this.space.name,n)}}):this.spacesService.updateSpace(this.space).subscribe({next:n=>{this.loading=!1,n?(this.space=n,this.spaceChange.emit(["update",n])):this.spaceChange.emit(["delete",this.space]),this.layout.closeDialog()},error:n=>{this.onError(),this.layout.sendNotification("error","Edit space",this.space.name,n)}})}cantSubmit(){return this.submitted||!this.space.name||!this.space.managers.length}onError(){this.confirmDeletion=!1,this.submitted=!1,this.loading=!1}};r.\u0275fac=function(o){return new(o||r)},r.\u0275cmp=$({type:r,selectors:[["app-space-dialog"]],inputs:{space:"space"},outputs:{spaceChange:"spaceChange"},decls:62,vars:47,consts:[[1,"modal-header","align-items-center"],[1,"modal-title"],[1,"me-2",3,"icon"],["l10nTranslate",""],["animation","spin","size","sm",1,"ms-2",3,"icon"],[1,"modal-title","ms-auto"],["aria-label","Close","type","button",3,"click"],[1,"modal-body"],["type","pills",3,"justified"],[1,"my-3"],["customClass","tab-dialog form-validation",3,"selectTab"],["tabHeading",""],[1,"d-flex","col-12"],[1,"d-flex","flex-column","col-6","pe-2"],[1,"mb-3","px-0",2,"max-width","80%"],["for","name","l10nTranslate",""],["id","name","type","text","appAutofocus","","required","",3,"ngModelChange","ngModel"],["for","description","l10nTranslate",""],["id","description","type","text",1,"form-control","form-control-sm",3,"ngModelChange","ngModel"],[1,"d-flex","flex-column","align-items-start","mb-3",2,"max-width","80%"],[1,"w-100",3,"quotaChange","quota","fullWidth"],[1,"d-flex","flex-column","mb-3",2,"max-width","80%"],[1,"mb-3","px-0"],["for","switchStatus","l10nTranslate",""],[1,"d-flex","align-items-center","form-check","form-switch","cursor-pointer"],["id","switchStatus","type","checkbox","role","button",1,"form-check-input",3,"ngModelChange","ngModel"],["for","switchStatus","l10nTranslate","",1,"form-check-label","mb-0","ms-2"],[1,"text-danger","mt-2"],[1,"d-flex","flex-column","col-6"],["type","button",3,"click"],["for","editManagers","l10nTranslate","",1,"no-select-pointer"],["id","editManagers",1,"ms-1",3,"icon"],[3,"membersChange","members","searchFunction","editMode","hideInput","customPlaceholder"],["l10nTranslate","",1,"text-danger"],[1,"d-flex","d-none","d-lg-flex","mt-auto"],["customClass","tab-dialog",3,"selectTab"],[1,"col-12"],[3,"space","user","addRootFile"],[3,"membersChange","members","withPermissions","searchFunction"],[3,"membersChange","members","filterPermissions","allowedPermissions","withPermissions","editFunction","hideInput"],[1,"modal-footer"],["type","button","l10nTranslate","",1,"btn","btn-sm","btn-danger",3,"disabled"],["type","button","l10nTranslate","",1,"btn","btn-sm","btn-success"],["data-dismiss","modal","type","button","l10nTranslate","",1,"btn","btn-sm","btn-secondary","ms-auto",3,"click"],["type","button","l10nTranslate","",3,"click","disabled"],[3,"icon"],["l10nTranslate","",1,"ms-2"],["for","storage","l10nTranslate",""],["id","storage",3,"item"],[1,"fw-bold"],[1,"d-flex","flex-column","align-items-start","col-4","px-0"],["for","created","l10nTranslate",""],["id","created"],[1,"d-flex","flex-column","align-items-center","col-4","px-0"],["for","modified","l10nTranslate",""],["id","modified"],[1,"d-flex","flex-column","align-items-end","col-4","text-danger","px-0"],["for","disabled","l10nTranslate",""],["id","disabled"],["l10nTranslate","",1,"ms-2","me-1"],["type","button","l10nTranslate","",1,"btn","btn-sm","btn-danger",3,"click","disabled"],["type","button","l10nTranslate","",1,"btn","btn-sm","btn-success",3,"click"],["type","button","l10nTranslate","",1,"btn","btn-sm","btn-warning"],["type","button","l10nTranslate","",1,"btn","btn-sm","btn-warning",3,"click"]],template:function(o,i){o&1&&(s(0,"div",0)(1,"h4",1),u(2,"fa-icon",2),g(3,Tt,2,1,"span")(4,Et,2,0,"span",3),g(5,Dt,1,1,"fa-icon",4),l(),g(6,Mt,3,0,"h4",5),s(7,"button",6),f("click",function(){return i.layout.closeDialog()}),l()(),s(8,"div",7)(9,"tabset",8),u(10,"hr",9),s(11,"tab",10),f("selectTab",function(){return i.tabView=null}),w(12,Vt,3,1,"ng-template",11),s(13,"div",12)(14,"div",13)(15,"div",14)(16,"label",15),m(17," Space name "),l(),s(18,"input",16),P("ngModelChange",function(_){return V(i.space.name,_)||(i.space.name=_),_}),l()(),s(19,"div",14)(20,"label",17),m(21," Description "),l(),s(22,"input",18),P("ngModelChange",function(_){return V(i.space.description,_)||(i.space.description=_),_}),l()(),s(23,"div",19)(24,"app-storage-quota",20),P("quotaChange",function(_){return V(i.space.storageQuota,_)||(i.space.storageQuota=_),_}),l()(),g(25,Pt,4,1,"div",21),s(26,"div",22)(27,"label",23),m(28,"Space status"),l(),s(29,"div",24)(30,"input",25),P("ngModelChange",function(_){return V(i.space.enabled,_)||(i.space.enabled=_),_}),l(),s(31,"label",26),m(32),l()(),g(33,Ft,6,1,"div",27),l()(),s(34,"div",28)(35,"div",29),f("click",function(){return i.editManagers=!i.editManagers}),s(36,"label",30),m(37,"Managers"),l(),u(38,"fa-icon",31),l(),s(39,"app-user-search",32),P("membersChange",function(_){return V(i.space.managers,_)||(i.space.managers=_),_}),l(),g(40,Rt,2,0,"small",33),g(41,Lt,14,7,"div",34),l()()(),s(42,"tab",35),f("selectTab",function(){return i.tabView="roots"}),w(43,Bt,5,2,"ng-template",11),s(44,"div",36),u(45,"app-space-manage-roots",37),l()(),s(46,"tab",35),f("selectTab",function(){return i.tabView="members"}),w(47,Nt,5,2,"ng-template",11),s(48,"div",9)(49,"app-user-search",38),P("membersChange",function(_){return V(i.space.members,_)||(i.space.members=_),_}),l()()(),s(50,"tab",35),f("selectTab",function(){return i.tabView="links"}),w(51,Ot,5,2,"ng-template",11),s(52,"div",9)(53,"app-user-search",39),P("membersChange",function(_){return V(i.space.links,_)||(i.space.links=_),_}),l()()()()(),s(54,"div",40),g(55,Wt,2,1,"button",41),g(56,Ut,4,2,"button",42),g(57,qt,5,3),s(58,"button",43),f("click",function(){return i.onCancel()}),m(59,"Cancel"),l(),s(60,"button",44),f("click",function(){return i.onSubmit()}),m(61),l()()),o&2&&(a(2),p("icon",i.icons.SPACES),a(),S(i.space.id?3:4),a(2),S(i.loading?5:-1),a(),S(i.space.id?6:-1),a(),R(H("btn-close btn-close-white ",i.space.id?"ms-2":"ms-auto"," ms-2")),a(2),p("justified",!0),a(9),R(H("form-control form-control-sm ",i.space.name?"":"is-invalid")),M("ngModel",i.space.name),a(4),M("ngModel",i.space.description),a(2),M("quota",i.space.storageQuota),p("fullWidth",!0),a(),S(i.space.storageUsage?25:-1),a(5),M("ngModel",i.space.enabled),a(2),D(" ",i.space.enabled?"enabled":"disabled"," "),a(),S(i.space.enabled?-1:33),a(5),p("icon",i.icons.faPen),a(),M("members",i.space.managers),p("searchFunction",i.searchManagers.bind(i))("editMode",i.editManagers)("hideInput",!i.editManagers)("customPlaceholder","Type to search for managers to add"),a(),S(i.space.managers.length?-1:40),a(),S(i.space.id?41:-1),a(4),p("space",i.space)("user",i.user)("addRootFile",i.addRootFileEvent),a(4),M("members",i.space.members),p("withPermissions",!0)("searchFunction",i.searchMembers.bind(i)),a(4),M("members",i.space.links),p("filterPermissions",!0)("allowedPermissions",i.allowedLinkPermissions)("withPermissions",!0)("editFunction",i.openEditLinkDialog.bind(i))("hideInput",!0),a(2),S(!i.tabView&&i.space.id&&i.user.isAdmin?55:-1),a(),S(i.tabView==="links"?56:-1),a(),S(i.tabView==="roots"?57:-1),a(3),R(H("btn btn-sm ",i.confirmDeletion?"btn-danger":"btn-primary")),p("disabled",i.cantSubmit()),a(),D(" ",i.confirmDeletion?"Confirm permanent deletion of data":"Confirm"," "))},dependencies:[j,z,ot,it,tt,nt,Ee,ve,be,ye,Te,we,at,lt,st,ft,Ge,rt,gt,St,Je],encapsulation:2});let e=r;return e})();var Ht=["MainContextMenu"],Qt=["TargetContextMenu"],zt=()=>["roots","shares"],xt=(e,r)=>r.id,bt=(e,r)=>r.mid,vt=(e,r)=>r.key;function Kt(e,r){if(e&1){let t=x();s(0,"button",3),b(1,"translate"),f("click",function(){C(t);let o=c();return h(o.openSpaceDialog(!0))}),u(2,"fa-icon",7),l()}if(e&2){let t=c();p("tooltip",v(1,2,"New space",t.locale.language)),a(2),p("icon",t.icons.faPlus)}}function jt(e,r){if(e&1&&(s(0,"span",29),m(1),l()),e&2){let t=c().$implicit,n=c(2);F("font-size",n.galleryMode.textSize,"px"),a(),E(t.hTimeAgo)}}function Yt(e,r){if(e&1&&u(0,"app-user-avatar",30),e&2){let t=r.$implicit,n=c(4);p("user",t)("isMember",!0)("height",n.galleryMode.dimensions/3)("width",n.galleryMode.dimensions/3)}}function Gt(e,r){if(e&1&&(s(0,"span",26),A(1,Yt,1,4,"app-user-avatar",30,bt),l()),e&2){let t=c().$implicit;a(),k(t.managers)}}function Xt(e,r){if(e&1){let t=x();s(0,"div",21),f("click",function(){let o=C(t).$implicit,i=c(2);return h(i.onSelect(o))})("contextmenu",function(o){let i=C(t).$implicit,d=c(2);return h(d.onTargetContextMenu(o,i))})("pressup",function(o){let i=C(t).$implicit,d=c(2);return h(d.onTargetContextMenu(o,i))})("tap",function(){let o=C(t).$implicit,i=c(2);return h(i.browse(o))}),s(1,"div",22),u(2,"fa-icon",23),s(3,"span",24),g(4,jt,2,3,"span",25),l(),g(5,Gt,3,0,"span",26),l(),s(6,"div",27)(7,"span",28),m(8),l()()()}if(e&2){let t=r.$implicit,n=r.$index,o=c(2);F("height",o.galleryMode.dimensions,"px")("width",o.galleryMode.dimensions,"px"),U("disabled",!t.enabled)("selected",t.id===(o.selected==null?null:o.selected.id)),a(),_e("rowIndex",n),a(),F("min-width",o.galleryMode.image,"px")("min-height",o.galleryMode.image,"px")("font-size",o.galleryMode.faSize,"px"),p("icon",o.icons.SPACES),a(2),S(t.newly?4:-1),a(),S(t.managers.length?5:-1),a(2),F("font-size",o.galleryMode.textSize,"px"),a(),E(t.name)}}function Jt(e,r){if(e&1){let t=x();s(0,"div",12)(1,"app-virtual-scroll",18),b(2,"searchFilter"),f("contextmenu",function(o){C(t);let i=c();return h(i.onContextMenu(o))}),s(3,"div",19),A(4,Xt,9,21,"div",20,xt),l()()()}if(e&2){let t=c();a(),p("childHeight",t.galleryMode.dimensions)("childWidth",t.galleryMode.dimensions)("items",v(2,5,t.spaces,t.inputFilter.search()))("galleryMode",!0)("resizeOffset",110),a(3),k(t.scrollView==null?null:t.scrollView.viewPortItems)}}function Zt(e,r){if(e&1&&u(0,"fa-icon",37),e&2){let t=c(4);p("icon",t.sortTable.sortParam.asc?t.icons.faArrowDown:t.icons.faArrowUp)("fixedWidth",!1)}}function ei(e,r){if(e&1){let t=x();s(0,"th",36),f("click",function(){C(t);let o=c().$implicit,i=c(2);return h(i.sortBy(o.key))}),m(1),g(2,Zt,1,2,"fa-icon",37),l()}if(e&2){let t=c().$implicit,n=c(2);R(t.value.class),F("width",t.value.width,"%"),U("text-align-center",t.value.textCenter)("cursor-pointer",t.value.sortable),a(),D(" ",t.value.label," "),a(),S(n.sortTable.sortParam.column===t.key?2:-1)}}function ti(e,r){if(e&1&&g(0,ei,3,10,"th",35),e&2){let t=r.$implicit;S(t.value.show?0:-1)}}function ii(e,r){if(e&1&&(s(0,"div",40),u(1,"fa-icon",41),s(2,"div",42)(3,"span",28),m(4),l(),s(5,"span",43),m(6),l()()()),e&2){let t=c(3).$implicit,n=c(2);a(),p("icon",n.icons.SPACES)("fixedWidth",!1),a(3),E(t.name),a(2),E(t.description)}}function ni(e,r){if(e&1&&u(0,"app-user-avatar",44),e&2){let t=r.$implicit;p("user",t)("isMember",!0)}}function oi(e,r){if(e&1&&A(0,ni,1,2,"app-user-avatar",44,bt),e&2){let t=c(3).$implicit;k(t.managers)}}function ai(e,r){if(e&1&&(s(0,"span"),m(1),b(2,"joinCounts"),l()),e&2){let t=c(3).$implicit;a(),E(v(2,1,t.counts,Ce(4,zt)))}}function ri(e,r){if(e&1){let t=x();s(0,"span",47),f("click",function(){C(t);let o=c(6);return h(o.openSpaceRootsDialog())}),u(1,"fa-icon",7),m(2),l()}if(e&2){let t=c(4).$implicit,n=c(2);a(),p("icon",n.icons.faAnchor),a(),D("\xA0",t.counts.roots," ")}}function si(e,r){if(e&1){let t=x();s(0,"span",48),f("click",function(){C(t);let o=c(4).$implicit,i=c(2);return h(i.openChildShareDialog(o))}),u(1,"fa-icon",49),s(2,"span"),m(3),l()()}if(e&2){let t=c(4).$implicit,n=c(2);a(),p("icon",n.icons.SHARED),a(2),E(t.counts.shares)}}function li(e,r){if(e&1&&(g(0,ri,3,2,"span",45),g(1,si,4,2,"span",46)),e&2){let t=c(3).$implicit,n=c(2);S(t.counts!=null&&t.counts.roots?0:-1),a(),S(t.role===n.SPACE_ROLE.IS_MANAGER&&t.counts.shares?1:-1)}}function ci(e,r){if(e&1&&u(0,"app-file-permissions",50),e&2){let t=c(4).$implicit;p("permissions",t.hPerms)}}function pi(e,r){if(e&1&&g(0,ci,1,1,"app-file-permissions",50),e&2){let t=c(3).$implicit;S(t.permissions?0:-1)}}function mi(e,r){if(e&1&&m(0),e&2){let t=c(3).$implicit;D(" ",t.hTimeAgo," ")}}function di(e,r){if(e&1&&(s(0,"td"),g(1,ii,7,4,"div",40)(2,oi,2,0)(3,ai,3,5,"span")(4,li,2,2)(5,pi,1,1)(6,mi,1,1),l()),e&2){let t,n=c().$implicit,o=c().$implicit;R(fe("",n.value.class," ",n.value.newly?"prop-newly-"+o[n.value.newly]:"")),F("width",n.value.width,"%"),U("text-align-center",n.value.textCenter),a(),S((t=n.key)==="name"?1:t==="managers"?2:t==="members"?3:t==="infos"?4:t==="permissions"?5:t==="modified"?6:-1)}}function _i(e,r){if(e&1&&g(0,di,7,9,"td",39),e&2){let t=r.$implicit;S(t.value.show?0:-1)}}function ui(e,r){if(e&1){let t=x();s(0,"tr",38),f("click",function(){let o=C(t).$implicit,i=c(2);return h(i.onSelect(o))})("contextmenu",function(o){let i=C(t).$implicit,d=c(2);return h(d.onTargetContextMenu(o,i))})("pressup",function(o){let i=C(t).$implicit,d=c(2);return h(d.onTargetContextMenu(o,i))})("tap",function(){let o=C(t).$implicit,i=c(2);return h(i.browse(o))}),A(1,_i,1,1,null,null,vt),b(3,"keyvalue"),l()}if(e&2){let t=r.$implicit,n=c(2);U("disabled",!t.enabled)("selected",t.id===(n.selected==null?null:n.selected.id)),a(),k(v(3,4,n.tableHeaders,n.originalOrderKeyValue))}}function fi(e,r){if(e&1){let t=x();s(0,"table",31)(1,"thead")(2,"tr"),A(3,ti,1,1,null,null,vt),b(5,"keyvalue"),l()()(),s(6,"app-virtual-scroll",32),b(7,"searchFilter"),f("contextmenu",function(o){C(t);let i=c();return h(i.onContextMenu(o))}),s(8,"table",31)(9,"tbody",33),A(10,ui,4,7,"tr",34,xt),l()()()}if(e&2){let t=c();a(3),k(v(5,2,t.tableHeaders,t.originalOrderKeyValue)),a(3),p("bufferAmount",5)("items",v(7,5,t.spaces,t.inputFilter.search())),a(4),k(t.scrollView==null?null:t.scrollView.viewPortItems)}}function Ci(e,r){if(e&1&&(s(0,"span",51),u(1,"fa-icon",7),m(2,"New space"),l()),e&2){let t=c(2);a(),p("icon",t.icons.faPlus)}}function hi(e,r){}function gi(e,r){if(e&1){let t=x();w(0,Ci,3,1,"ng-template",15),f("execute",function(){C(t);let o=c();return h(o.openSpaceDialog(!0))}),w(1,hi,0,0,"ng-template",17)}e&2&&(a(),p("divider",!0))}function Si(e,r){if(e&1&&(s(0,"span",51),u(1,"fa-icon",7),m(2,"Refresh"),l()),e&2){let t=c();a(),p("icon",t.icons.faArrowRotateRight)}}function xi(e,r){if(e&1&&(s(0,"span",51),u(1,"fa-icon",7),m(2,"Edit space"),l()),e&2){let t=c(2);a(),p("icon",t.icons.faPen)}}function bi(e,r){if(e&1&&(s(0,"span",51),u(1,"fa-icon",7),m(2,"Edit children shares"),l()),e&2){let t=c(3);a(),p("icon",t.icons.SHARED)}}function vi(e,r){if(e&1){let t=x();w(0,bi,3,1,"ng-template",15),f("execute",function(){C(t);let o=c(2);return h(o.openChildShareDialog())})}}function yi(e,r){if(e&1){let t=x();w(0,xi,3,1,"ng-template",15),f("execute",function(){C(t);let o=c();return h(o.openSpaceDialog())}),g(1,vi,1,0,null,16)}if(e&2){let t=c();a(),S(t.selected!=null&&t.selected.counts.shares?1:-1)}}function wi(e,r){if(e&1&&(s(0,"span",51),u(1,"fa-icon",7),m(2,"Manage my anchored files"),l()),e&2){let t=c(2);a(),p("icon",t.icons.faAnchor)}}function Ti(e,r){if(e&1){let t=x();w(0,wi,3,1,"ng-template",15),f("execute",function(){C(t);let o=c();return h(o.openSpaceRootsDialog())})}}function Ei(e,r){}function Di(e,r){e&1&&w(0,Ei,0,0,"ng-template",17),e&2&&p("divider",!0)}function Mi(e,r){if(e&1&&(s(0,"span",51),u(1,"fa-icon",7),m(2,"Informations"),l()),e&2){let t=c();a(),p("icon",t.icons.faCircleInfo)}}var Kn=(()=>{let r=class r{constructor(){this.locale=y(K),this.layout=y(ee),this.SPACE_ROLE=Z,this.originalOrderKeyValue=Qe,this.TAB_MENU=He,this.icons={SPACES:I.SPACES,SHARED:I.SHARED_WITH_OTHERS,faAnchor:X,faArrowDown:Ne,faArrowUp:Re,faRotate:Pe,faArrowRotateRight:Be,faUpload:Le,faPlus:J,faPen:G,faCircleInfo:Oe},this.tableHeaders={name:{label:"Name",width:30,textCenter:!1,class:"",show:!0,sortable:!0},managers:{label:"Managers",width:10,class:"d-none d-md-table-cell",textCenter:!0,show:!0,sortable:!0},members:{label:"Members",width:20,class:"d-none d-md-table-cell",textCenter:!1,show:!0},infos:{label:"Infos",width:15,textCenter:!0,class:"d-none d-md-table-cell",show:!0},permissions:{label:"Permissions",width:10,textCenter:!0,class:"d-none d-lg-table-cell",show:!0,sortable:!0},modified:{label:"Modified",width:10,textCenter:!0,class:"d-none d-lg-table-cell",newly:"newly",show:!0,sortable:!0}},this.btnSortFields={name:"Name",managers:"Managers",permissions:"Permissions",modified:"Modified"},this.loading=!1,this.spaces=[],this.selected=null,this.canCreateSpace=!1,this.canEditSpace=!1,this.canManageRoots=!1,this.router=y(xe),this.activatedRoute=y(Se),this.spacesService=y(ie),this.store=y(ze),this.userService=y(te),this.sortSettings={default:[{prop:"name",type:"string"}],name:[{prop:"name",type:"string"}],managers:[{prop:"managers",type:"length"}],permissions:[{prop:"permissions",type:"length"}],modified:[{prop:"modified",type:"date"}]},this.sortTable=new Ze(this.constructor.name,this.sortSettings),this.loadSpaces(),this.canCreateSpace=this.userService.userHavePermission(We.SPACES_ADMIN),this.layout.setBreadcrumbIcon(I.SPACES),this.layout.setBreadcrumbNav({url:`/${ne.SPACES}/${je.SPACES}`,translating:!0,sameLink:!0}),this.activatedRoute.queryParams.subscribe(n=>this.focusOnSelect=n.select)}ngOnInit(){this.galleryMode=this.btnNavigationView.currentView()}loadSpaces(){this.loading=!0,this.onSelect(),this.spacesService.listSpaces().subscribe({next:n=>{this.sortBy(this.sortTable.sortParam.column,!1,n),this.loading=!1,this.focusOnSelect?this.focusOn(this.focusOnSelect):this.scrollView.scrollInto(-1)},error:n=>{this.spaces=[],this.loading=!1,this.layout.sendNotification("error","Spaces",n.error.message)}})}browse(n){n.enabled?this.router.navigate([ne.FILES,n.alias],{relativeTo:this.activatedRoute}).catch(console.error):this.layout.sendNotification("warning",n.name,"Space is disabled")}onSelect(n=null){n?(this.selected=n,this.canEditSpace=!!n.managers.find(o=>o.id===this.userService.user.id),this.canManageRoots=this.canEditSpace||n.havePermission(W.SHARE_INSIDE)):(this.selected=null,this.canEditSpace=!1,this.canManageRoots=!1),this.store.spaceSelection.set(this.selected)}sortBy(n,o=!0,i){this.spaces=this.sortTable.sortBy(n,o,i||this.spaces)}onContextMenu(n){n.preventDefault(),n.stopPropagation(),this.layout.openContextMenu(n,this.mainContextMenu)}onTargetContextMenu(n,o){n.preventDefault(),n.type==="contextmenu"&&n.stopPropagation(),this.onSelect(o),this.layout.openContextMenu(n,this.targetContextMenu)}openSpaceDialog(n=!1){n?this.layout.openDialog(le,"xl").content.spaceChange.pipe(L(1)).subscribe(i=>{let[d,_]=i;d==="add"&&(this.sortBy(this.sortTable.sortParam.column,!1,this.spaces.concat(_)),this.onSelect(_))}):this.selected&&this.canEditSpace&&this.spacesService.getSpace(this.selected.id).subscribe({next:o=>{this.layout.openDialog(le,"xl",{initialState:{space:o}}).content.spaceChange.pipe(L(1)).subscribe(d=>{let[_,T]=d;_==="update"?(this.selected.name=T.name,this.selected.alias=T.alias,this.selected.description=T.description,this.selected.counts=pe(ce({},T.counts),{shares:this.selected.counts.shares}),this.selected.modifiedAt=T.modifiedAt,this.selected.enabled=T.enabled,this.selected.managers=[...T.managers]):_==="delete"&&(this.onSelect(),this.sortBy(this.sortTable.sortParam.column,!1,this.spaces.filter(yt=>yt.id!==T.id)))})},error:o=>this.layout.sendNotification("error","Edit space",this.selected.name,o)})}openSpaceRootsDialog(){setTimeout(()=>{this.layout.openDialog(ht,"md",{initialState:{space:this.selected,user:this.userService.user}})},this.selected?0:100)}openChildShareDialog(n){n&&this.onSelect(n),this.layout.openDialog(Ct,null,{initialState:{space:this.selected}}).content.sharesCountEvent.subscribe(i=>this.selected.counts.shares=i)}focusOn(n){let o=this.spaces.find(i=>i.name===n);o&&(setTimeout(()=>this.scrollView.scrollInto(o),100),this.onSelect(o))}};r.\u0275fac=function(o){return new(o||r)},r.\u0275cmp=$({type:r,selectors:[["app-spaces"]],viewQuery:function(o,i){if(o&1&&(B(ae,5),B(oe,7),B(re,7),B(Ht,7),B(Qt,7)),o&2){let d;N(d=O())&&(i.scrollView=d.first),N(d=O())&&(i.inputFilter=d.first),N(d=O())&&(i.btnNavigationView=d.first),N(d=O())&&(i.mainContextMenu=d.first),N(d=O())&&(i.targetContextMenu=d.first)}},decls:34,vars:37,consts:[["MainContextMenu",""],["TargetContextMenu",""],[1,"app-top-menu"],["container","body","type","button",1,"btn","btn-sm","btn-secondary","me-1",3,"click","tooltip"],[3,"icon","animation"],["container","body","type","button",1,"btn","btn-sm","btn-secondary","me-1",3,"tooltip"],["container","body","type","button",1,"btn","btn-sm","btn-secondary","me-1",3,"click","disabled","tooltip"],[3,"icon"],[1,"ms-auto"],[1,"btn-group","btn-group-sm","me-1"],[1,"d-none","d-sm-block"],[3,"sortBy","switchView","sortParams","sortFields"],[1,"app-thumbs"],[1,"app-foot-menu"],[1,"mx-auto"],["contextMenuItem","",3,"execute"],["contextMenuItem",""],["contextMenuItem","",3,"divider"],[3,"contextmenu","childHeight","childWidth","items","galleryMode","resizeOffset"],["tabindex","-1",1,"row","g-0"],[1,"card",3,"disabled","selected","height","width"],[1,"card",3,"click","contextmenu","pressup","tap"],[1,"card-body"],[1,"circle-primary-icon",3,"icon"],[1,"label-top-right"],["l10nTranslate","",1,"badge","rounded-pill","bg-warning",3,"font-size"],[1,"label-bottom-left"],[1,"card-footer","text-center","text-truncate","p-1"],["draggable","false",1,"no-pointer-events"],["l10nTranslate","",1,"badge","rounded-pill","bg-warning"],[3,"user","isMember","height","width"],[1,"app-table"],[3,"contextmenu","bufferAmount","items"],["tabindex","-1"],[3,"disabled","selected"],["l10nTranslate","",3,"width","text-align-center","cursor-pointer","class"],["l10nTranslate","",3,"click"],[3,"icon","fixedWidth"],[3,"click","contextmenu","pressup","tap"],[3,"width","text-align-center","class"],[1,"d-flex","align-items-center"],[1,"circle-primary-icon",3,"icon","fixedWidth"],[1,"d-flex","flex-column","text-truncate"],["draggable","false",1,"no-pointer-events","text-muted","fs-xxxs"],[3,"user","isMember"],[1,"badge","rounded-pill","bg-primary","cursor-pointer","me-1"],[1,"badge","rounded-pill","bg-purple","cursor-pointer","me-1"],[1,"badge","rounded-pill","bg-primary","cursor-pointer","me-1",3,"click"],[1,"badge","rounded-pill","bg-purple","cursor-pointer","me-1",3,"click"],[1,"me-1",3,"icon"],["tooltipPlacement","auto",3,"permissions"],["l10nTranslate",""]],template:function(o,i){if(o&1){let d=x();s(0,"div",2)(1,"button",3),b(2,"translate"),f("click",function(){return C(d),h(i.loadSpaces())}),u(3,"fa-icon",4),l(),g(4,Kt,3,5,"button",5),s(5,"button",6),b(6,"translate"),f("click",function(){return C(d),h(i.openSpaceDialog())}),u(7,"fa-icon",7),l(),s(8,"button",6),b(9,"translate"),f("click",function(){return C(d),h(i.openChildShareDialog())}),u(10,"fa-icon",7),l(),s(11,"button",6),b(12,"translate"),f("click",function(){return C(d),h(i.openSpaceRootsDialog())}),u(13,"fa-icon",7),l(),s(14,"div",8)(15,"div",9),u(16,"app-input-filter",10),l(),s(17,"app-navigation-view",11),f("sortBy",function(T){return C(d),h(i.sortBy(T))})("switchView",function(T){return C(d),h(i.galleryMode=T)}),l()()(),g(18,Jt,6,8,"div",12)(19,fi,12,8),s(20,"div",13)(21,"span",14),m(22),b(23,"translate"),l()(),s(24,"context-menu",null,0),g(26,gi,2,1),w(27,Si,3,1,"ng-template",15),f("execute",function(){return C(d),h(i.loadSpaces())}),l(),s(28,"context-menu",null,1),g(30,yi,2,1),g(31,Ti,1,0,null,16),g(32,Di,1,1,null,17),w(33,Mi,3,1,"ng-template",15),f("execute",function(){return C(d),h(i.layout.showRSideBarTab(i.TAB_MENU.SELECTION))}),l()}o&2&&(a(),p("tooltip",v(2,22,"Refresh",i.locale.language)),a(2),p("icon",i.icons.faArrowRotateRight)("animation",i.loading?"spin":null),a(),S(i.canCreateSpace?4:-1),a(),p("disabled",!i.canEditSpace)("tooltip",v(6,25,"Edit space",i.locale.language)),a(2),p("icon",i.icons.faPen),a(),p("disabled",!i.canEditSpace||!(i.selected!=null&&i.selected.counts.shares))("tooltip",v(9,28,"Edit children shares",i.locale.language)),a(2),p("icon",i.icons.SHARED),a(),p("disabled",!i.canManageRoots)("tooltip",v(12,31,"Manage my anchored files",i.locale.language)),a(2),p("icon",i.icons.faAnchor),a(4),p("sortParams",i.sortTable.sortParam)("sortFields",i.btnSortFields),a(),S(i.galleryMode!=null&&i.galleryMode.enabled?18:19),a(4),ue("",i.spaces.length," ",v(23,34,"spaces",i.locale.language)),a(4),S(i.canCreateSpace?26:-1),a(4),S(i.canEditSpace?30:-1),a(),S(i.canManageRoots?31:-1),a(),S(i.canEditSpace||i.canManageRoots?32:-1))},dependencies:[j,z,et,ae,Ve,Me,qe,$e,Ue,re,oe,dt,ge,ct,De,Xe],encapsulation:2});let e=r;return e})();export{Kn as SpacesComponent};
|
|
1
|
+
import{b as ft,c as ht}from"./chunk-Q35EEVWP.js";import{A as ut,C as Ct,z as _t}from"./chunk-WWKXW4MM.js";import{a as dt}from"./chunk-GLAK4VQT.js";import{a as re}from"./chunk-XQFA4DLU.js";import{a as lt}from"./chunk-ZJDBESQA.js";import{d as Ge}from"./chunk-ESSY62VJ.js";import"./chunk-JXZCNFW7.js";import{a as et}from"./chunk-GW5AVRYT.js";import{a as ct}from"./chunk-3UFSZ24R.js";import"./chunk-2QNFUN7G.js";import{a as Je,b as tt,c as it,d as nt,e as ot,f as at,h as rt,i as st}from"./chunk-BOIXDTUT.js";import{a as oe,b as ae,c as Xe,d as Ze}from"./chunk-AS7H5UIO.js";import{e as mt}from"./chunk-QKELW3MH.js";import{f as pt,g as ie}from"./chunk-2PQGH3LQ.js";import"./chunk-MLLPT7BU.js";import"./chunk-W4LKCEBR.js";import{f as te}from"./chunk-6HV65OKG.js";import{B as Y,Hb as je,Ib as I,Ja as He,Jb as ne,O as We,Sb as Ye,Xa as Qe,kb as ze,mb as W,pa as Ue,pb as Z,qa as $e,ra as qe,v as Me,w as Ve,xb as ee}from"./chunk-55WOZ7P6.js";import"./chunk-ZZ3LHYOY.js";import{b as Se,d as xe}from"./chunk-J6YSVODR.js";import{$c as be,Cb as f,Eb as c,Ed as De,Ef as Le,Fd as j,Gc as ge,Gd as Pe,Gf as J,Ib as B,If as Be,Jb as N,Kb as O,L,Ma as a,Mb as F,Nb as U,Ob as R,Pb as m,Qb as E,Rb as D,Re as Fe,Sb as ue,Tb as M,Ub as V,Ue as Re,Uf as Ne,Vb as P,Xa as $,Xb as H,Yb as fe,Zc as z,Zf as Oe,_a as q,_b as Ce,ab as w,ad as ve,bb as de,bf as Ie,cg as Ke,dc as b,ec as Q,ed as ye,f as me,fc as v,gc as he,ha as y,ib as _e,jb as g,jd as we,kb as S,ma as C,na as h,nb as A,ob as k,of as G,pb as p,pe as Ae,qb as s,rb as l,sb as u,se as ke,td as Te,vf as X,wd as Ee,yd as K,zb as x}from"./chunk-JQOMI5VI.js";import{a as ce,b as pe}from"./chunk-RTRJ3KFH.js";var gt=(()=>{let r=class r{transform(n,o,i){if(typeof o>"u"||typeof o=="number"&&typeof i>"u")throw new Error("TimeAddPipe: missing required arguments");return(0,Y.default)(n).add(o,i)}};r.\u0275fac=function(o){return new(o||r)},r.\u0275pipe=q({name:"amAdd",type:r,pure:!0});let e=r;return e})();var St=(()=>{let r=class r{transform(n,o){if(!o)throw new Error("TimeDurationPipe: missing required time unit argument");return Y.default.duration({[o]:n}).humanize()}};r.\u0275fac=function(o){return new(o||r)},r.\u0275pipe=q({name:"amDuration",type:r,pure:!1});let e=r;return e})();function Tt(e,r){if(e&1&&(s(0,"span"),m(1),l()),e&2){let t=c();a(),E(t.space.name)}}function Et(e,r){e&1&&(s(0,"span",3),m(1,"Create a new space"),l())}function Dt(e,r){if(e&1&&u(0,"fa-icon",4),e&2){let t=c();p("icon",t.icons.faSpinner)}}function Mt(e,r){e&1&&(s(0,"h4",5)(1,"span",3),m(2,"Edit space"),l()())}function Vt(e,r){if(e&1&&(u(0,"fa-icon",45),s(1,"span",46),m(2,"Settings"),l()),e&2){let t=c();p("icon",t.icons.faCog)}}function Pt(e,r){if(e&1&&(s(0,"div",21)(1,"label",47),m(2,"Storage Usage"),l(),u(3,"app-storage-usage",48),l()),e&2){let t=c();a(3),p("item",t.space)}}function At(e,r){if(e&1&&(s(0,"span"),m(1),b(2,"amAdd"),b(3,"amTimeAgo"),l()),e&2){let t=c(2);a(),D("\xA0",v(3,5,he(2,1,t.space.disabledAt,t.SPACE_MAX_DISABLED_DAYS,"days"),!0))}}function kt(e,r){if(e&1&&(s(0,"span"),m(1),b(2,"amDuration"),l()),e&2){let t=c(2);a(),D("\xA0",v(2,1,t.SPACE_MAX_DISABLED_DAYS,"days"))}}function Ft(e,r){if(e&1&&(s(0,"div",27)(1,"span",3),m(2,"Space and data will be deleted in"),l(),s(3,"span",49),g(4,At,4,8,"span")(5,kt,3,4,"span"),l()()),e&2){let t=c();a(4),S(t.space.disabledAt?4:5)}}function Rt(e,r){e&1&&(s(0,"small",33),m(1,"At least one manager is required"),l())}function It(e,r){if(e&1&&(s(0,"div",56)(1,"label",57),m(2,"Deactivation date"),l(),s(3,"div",58),m(4),b(5,"amDateFormat"),l()()),e&2){let t=c(2);a(4),E(Q(5,1,t.space.disabledAt))}}function Lt(e,r){if(e&1&&(s(0,"div",34)(1,"div",50)(2,"label",51),m(3,"Creation date"),l(),s(4,"div",52),m(5),b(6,"amDateFormat"),l()(),s(7,"div",53)(8,"label",54),m(9,"Modification date"),l(),s(10,"div",55),m(11),b(12,"amDateFormat"),l()(),g(13,It,6,3,"div",56),l()),e&2){let t=c();a(5),E(Q(6,3,t.space.createdAt)),a(6),E(Q(12,5,t.space.modifiedAt)),a(2),S(t.space.disabledAt&&!t.space.enabled?13:-1)}}function Bt(e,r){if(e&1&&(u(0,"fa-icon",45),s(1,"span",59),m(2,"Files"),l(),s(3,"span"),m(4),l()),e&2){let t=c();p("icon",t.icons.faAnchor),a(4),D("(",(t.space.roots==null?null:t.space.roots.length)||0,")")}}function Nt(e,r){if(e&1&&(u(0,"fa-icon",45),s(1,"span",59),m(2,"Members"),l(),s(3,"span"),m(4),l()),e&2){let t=c();p("icon",t.icons.faUsers),a(4),D("(",t.space.members.length,")")}}function Ot(e,r){if(e&1&&(u(0,"fa-icon",45),s(1,"span",59),m(2,"Links"),l(),s(3,"span"),m(4),l()),e&2){let t=c();p("icon",t.icons.LINKS),a(4),D("(",t.space.links.length,")")}}function Wt(e,r){if(e&1){let t=x();s(0,"button",60),f("click",function(){C(t);let o=c();return h(o.confirmDeletion=!0)}),m(1," Remove "),l()}if(e&2){let t=c();p("disabled",t.confirmDeletion)}}function Ut(e,r){if(e&1){let t=x();s(0,"button",61),f("click",function(){C(t);let o=c();return h(o.openCreateLinkDialog())}),u(1,"fa-icon",45)(2,"fa-icon",45),m(3," Link "),l()}if(e&2){let t=c();a(),p("icon",t.icons.faPlus),a(),p("icon",t.icons.LINKS)}}function $t(e,r){if(e&1){let t=x();s(0,"button",63),f("click",function(){C(t);let o=c(2);return h(o.openAdminRootDialog())}),u(1,"fa-icon",45)(2,"fa-icon",45),m(3," External location "),l()}if(e&2){let t=c(2);a(),p("icon",t.icons.faPlus),a(),p("icon",t.icons.faUserShield)}}function qt(e,r){if(e&1){let t=x();s(0,"button",61),f("click",function(){C(t);let o=c();return h(o.openSelectRootDialog())}),u(1,"fa-icon",45)(2,"fa-icon",45),m(3," File "),l(),g(4,$t,4,2,"button",62)}if(e&2){let t=c();a(),p("icon",t.icons.faPlus),a(),p("icon",t.icons.faAnchor),a(2),S(t.user.isAdmin?4:-1)}}var le=(()=>{let r=class r{constructor(){this.space=new pt({id:0,name:"",createdAt:new Date,enabled:!0,storageUsage:0,storageQuota:null}),this.spaceChange=new de,this.locale=y(K),this.layout=y(ee),this.icons={SPACES:I.SPACES,LINKS:I.LINKS,faPen:G,faAnchor:X,faUserShield:ke,faPlus:J,faSpinner:Ie,faCog:Fe,faUsers:Ae},this.SPACE_MAX_DISABLED_DAYS=30,this.addRootFileEvent=new me,this.allowedLinkPermissions=[W.ADD,W.DELETE,W.MODIFY],this.editManagers=!1,this.confirmDeletion=!1,this.loading=!1,this.submitted=!1,this.userService=y(te),this.user=this.userService.user,this.spacesService=y(ie),this.linksService=y(mt)}ngOnInit(){this.space.id||this.space.managers.unshift(Ye(this.user,Z.IS_MANAGER))}searchManagers(n){let o={search:n,ignoreUserIds:[...this.space.managers.map(i=>i.id),...this.space.members.filter(i=>i.isUser).map(i=>i.id)],onlyUsers:!0};return this.userService.searchMembers(o)}searchMembers(n){let o={search:n,ignoreUserIds:[...this.space.managers.map(i=>i.id),...this.space.members.filter(i=>i.isUser).map(i=>i.id)],ignoreGroupIds:this.space.members.filter(i=>i.isGroup).map(i=>i.id)};return this.userService.searchMembers(o)}openSelectRootDialog(){this.layout.openDialog(_t,"xl",{initialState:{currentRoots:this.space.roots.filter(o=>o.owner.id===this.user.id)}}).content.submitEvent.pipe(L(1)).subscribe(o=>this.addRootFileEvent.next(o))}openAdminRootDialog(){this.layout.openDialog(ut,null,{initialState:{currentRoots:this.space.roots.filter(o=>o.externalPath)}}).content.submitEvent.pipe(L(1)).subscribe(o=>this.addRootFileEvent.next(o))}openEditLinkDialog(n){this.linksService.editLinkDialog(n,this.space,Ke.SPACE)}openCreateLinkDialog(){this.linksService.createLinkDialog(this.space)}onCancel(){this.confirmDeletion?this.confirmDeletion=!1:this.layout.closeDialog()}onSubmit(){this.loading=!0,this.submitted=!0,this.confirmDeletion?(this.space.id===0&&this.layout.closeDialog(),this.spacesService.deleteSpace(this.space.id,{deleteNow:!0}).subscribe({next:()=>{this.loading=!1,this.spaceChange.emit(["delete",this.space]),this.layout.closeDialog()},error:n=>{this.onError(),this.layout.sendNotification("error","Delete space",this.space.name,n)}})):this.space.id===0?this.spacesService.createSpace(this.space).subscribe({next:n=>{this.loading=!1,this.space=n,this.spaceChange.emit(["add",n]),this.layout.closeDialog()},error:n=>{this.onError(),this.layout.sendNotification("error","Create space",this.space.name,n)}}):this.spacesService.updateSpace(this.space).subscribe({next:n=>{this.loading=!1,n?(this.space=n,this.spaceChange.emit(["update",n])):this.spaceChange.emit(["delete",this.space]),this.layout.closeDialog()},error:n=>{this.onError(),this.layout.sendNotification("error","Edit space",this.space.name,n)}})}cantSubmit(){return this.submitted||!this.space.name||!this.space.managers.length}onError(){this.confirmDeletion=!1,this.submitted=!1,this.loading=!1}};r.\u0275fac=function(o){return new(o||r)},r.\u0275cmp=$({type:r,selectors:[["app-space-dialog"]],inputs:{space:"space"},outputs:{spaceChange:"spaceChange"},decls:62,vars:47,consts:[[1,"modal-header","align-items-center"],[1,"modal-title"],[1,"me-2",3,"icon"],["l10nTranslate",""],["animation","spin","size","sm",1,"ms-2",3,"icon"],[1,"modal-title","ms-auto"],["aria-label","Close","type","button",3,"click"],[1,"modal-body"],["type","pills",3,"justified"],[1,"my-3"],["customClass","tab-dialog form-validation",3,"selectTab"],["tabHeading",""],[1,"d-flex","col-12"],[1,"d-flex","flex-column","col-6","pe-2"],[1,"mb-3","px-0",2,"max-width","80%"],["for","name","l10nTranslate",""],["id","name","type","text","appAutofocus","","required","",3,"ngModelChange","ngModel"],["for","description","l10nTranslate",""],["id","description","type","text",1,"form-control","form-control-sm",3,"ngModelChange","ngModel"],[1,"d-flex","flex-column","align-items-start","mb-3",2,"max-width","80%"],[1,"w-100",3,"quotaChange","quota","fullWidth"],[1,"d-flex","flex-column","mb-3",2,"max-width","80%"],[1,"mb-3","px-0"],["for","switchStatus","l10nTranslate",""],[1,"d-flex","align-items-center","form-check","form-switch","cursor-pointer"],["id","switchStatus","type","checkbox","role","button",1,"form-check-input",3,"ngModelChange","ngModel"],["for","switchStatus","l10nTranslate","",1,"form-check-label","mb-0","ms-2"],[1,"text-danger","mt-2"],[1,"d-flex","flex-column","col-6"],["type","button",3,"click"],["for","editManagers","l10nTranslate","",1,"no-select-pointer"],["id","editManagers",1,"ms-1",3,"icon"],[3,"membersChange","members","searchFunction","editMode","hideInput","customPlaceholder"],["l10nTranslate","",1,"text-danger"],[1,"d-flex","d-none","d-lg-flex","mt-auto"],["customClass","tab-dialog",3,"selectTab"],[1,"col-12"],[3,"space","user","addRootFile"],[3,"membersChange","members","withPermissions","searchFunction"],[3,"membersChange","members","filterPermissions","allowedPermissions","withPermissions","editFunction","hideInput"],[1,"modal-footer"],["type","button","l10nTranslate","",1,"btn","btn-sm","btn-danger",3,"disabled"],["type","button","l10nTranslate","",1,"btn","btn-sm","btn-success"],["data-dismiss","modal","type","button","l10nTranslate","",1,"btn","btn-sm","btn-secondary","ms-auto",3,"click"],["type","button","l10nTranslate","",3,"click","disabled"],[3,"icon"],["l10nTranslate","",1,"ms-2"],["for","storage","l10nTranslate",""],["id","storage",3,"item"],[1,"fw-bold"],[1,"d-flex","flex-column","align-items-start","col-4","px-0"],["for","created","l10nTranslate",""],["id","created"],[1,"d-flex","flex-column","align-items-center","col-4","px-0"],["for","modified","l10nTranslate",""],["id","modified"],[1,"d-flex","flex-column","align-items-end","col-4","text-danger","px-0"],["for","disabled","l10nTranslate",""],["id","disabled"],["l10nTranslate","",1,"ms-2","me-1"],["type","button","l10nTranslate","",1,"btn","btn-sm","btn-danger",3,"click","disabled"],["type","button","l10nTranslate","",1,"btn","btn-sm","btn-success",3,"click"],["type","button","l10nTranslate","",1,"btn","btn-sm","btn-warning"],["type","button","l10nTranslate","",1,"btn","btn-sm","btn-warning",3,"click"]],template:function(o,i){o&1&&(s(0,"div",0)(1,"h4",1),u(2,"fa-icon",2),g(3,Tt,2,1,"span")(4,Et,2,0,"span",3),g(5,Dt,1,1,"fa-icon",4),l(),g(6,Mt,3,0,"h4",5),s(7,"button",6),f("click",function(){return i.layout.closeDialog()}),l()(),s(8,"div",7)(9,"tabset",8),u(10,"hr",9),s(11,"tab",10),f("selectTab",function(){return i.tabView=null}),w(12,Vt,3,1,"ng-template",11),s(13,"div",12)(14,"div",13)(15,"div",14)(16,"label",15),m(17," Space name "),l(),s(18,"input",16),P("ngModelChange",function(_){return V(i.space.name,_)||(i.space.name=_),_}),l()(),s(19,"div",14)(20,"label",17),m(21," Description "),l(),s(22,"input",18),P("ngModelChange",function(_){return V(i.space.description,_)||(i.space.description=_),_}),l()(),s(23,"div",19)(24,"app-storage-quota",20),P("quotaChange",function(_){return V(i.space.storageQuota,_)||(i.space.storageQuota=_),_}),l()(),g(25,Pt,4,1,"div",21),s(26,"div",22)(27,"label",23),m(28,"Space status"),l(),s(29,"div",24)(30,"input",25),P("ngModelChange",function(_){return V(i.space.enabled,_)||(i.space.enabled=_),_}),l(),s(31,"label",26),m(32),l()(),g(33,Ft,6,1,"div",27),l()(),s(34,"div",28)(35,"div",29),f("click",function(){return i.editManagers=!i.editManagers}),s(36,"label",30),m(37,"Managers"),l(),u(38,"fa-icon",31),l(),s(39,"app-user-search",32),P("membersChange",function(_){return V(i.space.managers,_)||(i.space.managers=_),_}),l(),g(40,Rt,2,0,"small",33),g(41,Lt,14,7,"div",34),l()()(),s(42,"tab",35),f("selectTab",function(){return i.tabView="roots"}),w(43,Bt,5,2,"ng-template",11),s(44,"div",36),u(45,"app-space-manage-roots",37),l()(),s(46,"tab",35),f("selectTab",function(){return i.tabView="members"}),w(47,Nt,5,2,"ng-template",11),s(48,"div",9)(49,"app-user-search",38),P("membersChange",function(_){return V(i.space.members,_)||(i.space.members=_),_}),l()()(),s(50,"tab",35),f("selectTab",function(){return i.tabView="links"}),w(51,Ot,5,2,"ng-template",11),s(52,"div",9)(53,"app-user-search",39),P("membersChange",function(_){return V(i.space.links,_)||(i.space.links=_),_}),l()()()()(),s(54,"div",40),g(55,Wt,2,1,"button",41),g(56,Ut,4,2,"button",42),g(57,qt,5,3),s(58,"button",43),f("click",function(){return i.onCancel()}),m(59,"Cancel"),l(),s(60,"button",44),f("click",function(){return i.onSubmit()}),m(61),l()()),o&2&&(a(2),p("icon",i.icons.SPACES),a(),S(i.space.id?3:4),a(2),S(i.loading?5:-1),a(),S(i.space.id?6:-1),a(),R(H("btn-close btn-close-white ",i.space.id?"ms-2":"ms-auto"," ms-2")),a(2),p("justified",!0),a(9),R(H("form-control form-control-sm ",i.space.name?"":"is-invalid")),M("ngModel",i.space.name),a(4),M("ngModel",i.space.description),a(2),M("quota",i.space.storageQuota),p("fullWidth",!0),a(),S(i.space.storageUsage?25:-1),a(5),M("ngModel",i.space.enabled),a(2),D(" ",i.space.enabled?"enabled":"disabled"," "),a(),S(i.space.enabled?-1:33),a(5),p("icon",i.icons.faPen),a(),M("members",i.space.managers),p("searchFunction",i.searchManagers.bind(i))("editMode",i.editManagers)("hideInput",!i.editManagers)("customPlaceholder","Type to search for managers to add"),a(),S(i.space.managers.length?-1:40),a(),S(i.space.id?41:-1),a(4),p("space",i.space)("user",i.user)("addRootFile",i.addRootFileEvent),a(4),M("members",i.space.members),p("withPermissions",!0)("searchFunction",i.searchMembers.bind(i)),a(4),M("members",i.space.links),p("filterPermissions",!0)("allowedPermissions",i.allowedLinkPermissions)("withPermissions",!0)("editFunction",i.openEditLinkDialog.bind(i))("hideInput",!0),a(2),S(!i.tabView&&i.space.id&&i.user.isAdmin?55:-1),a(),S(i.tabView==="links"?56:-1),a(),S(i.tabView==="roots"?57:-1),a(3),R(H("btn btn-sm ",i.confirmDeletion?"btn-danger":"btn-primary")),p("disabled",i.cantSubmit()),a(),D(" ",i.confirmDeletion?"Confirm permanent deletion of data":"Confirm"," "))},dependencies:[j,z,ot,it,tt,nt,Ee,ve,be,ye,Te,we,at,lt,st,ft,Ge,rt,gt,St,Je],encapsulation:2});let e=r;return e})();var Ht=["MainContextMenu"],Qt=["TargetContextMenu"],zt=()=>["roots","shares"],xt=(e,r)=>r.id,bt=(e,r)=>r.mid,vt=(e,r)=>r.key;function Kt(e,r){if(e&1){let t=x();s(0,"button",3),b(1,"translate"),f("click",function(){C(t);let o=c();return h(o.openSpaceDialog(!0))}),u(2,"fa-icon",7),l()}if(e&2){let t=c();p("tooltip",v(1,2,"New space",t.locale.language)),a(2),p("icon",t.icons.faPlus)}}function jt(e,r){if(e&1&&(s(0,"span",29),m(1),l()),e&2){let t=c().$implicit,n=c(2);F("font-size",n.galleryMode.textSize,"px"),a(),E(t.hTimeAgo)}}function Yt(e,r){if(e&1&&u(0,"app-user-avatar",30),e&2){let t=r.$implicit,n=c(4);p("user",t)("isMember",!0)("height",n.galleryMode.dimensions/3)("width",n.galleryMode.dimensions/3)}}function Gt(e,r){if(e&1&&(s(0,"span",26),A(1,Yt,1,4,"app-user-avatar",30,bt),l()),e&2){let t=c().$implicit;a(),k(t.managers)}}function Xt(e,r){if(e&1){let t=x();s(0,"div",21),f("click",function(){let o=C(t).$implicit,i=c(2);return h(i.onSelect(o))})("contextmenu",function(o){let i=C(t).$implicit,d=c(2);return h(d.onTargetContextMenu(o,i))})("pressup",function(o){let i=C(t).$implicit,d=c(2);return h(d.onTargetContextMenu(o,i))})("tap",function(){let o=C(t).$implicit,i=c(2);return h(i.browse(o))}),s(1,"div",22),u(2,"fa-icon",23),s(3,"span",24),g(4,jt,2,3,"span",25),l(),g(5,Gt,3,0,"span",26),l(),s(6,"div",27)(7,"span",28),m(8),l()()()}if(e&2){let t=r.$implicit,n=r.$index,o=c(2);F("height",o.galleryMode.dimensions,"px")("width",o.galleryMode.dimensions,"px"),U("disabled",!t.enabled)("selected",t.id===(o.selected==null?null:o.selected.id)),a(),_e("rowIndex",n),a(),F("min-width",o.galleryMode.image,"px")("min-height",o.galleryMode.image,"px")("font-size",o.galleryMode.faSize,"px"),p("icon",o.icons.SPACES),a(2),S(t.newly?4:-1),a(),S(t.managers.length?5:-1),a(2),F("font-size",o.galleryMode.textSize,"px"),a(),E(t.name)}}function Jt(e,r){if(e&1){let t=x();s(0,"div",12)(1,"app-virtual-scroll",18),b(2,"searchFilter"),f("contextmenu",function(o){C(t);let i=c();return h(i.onContextMenu(o))}),s(3,"div",19),A(4,Xt,9,21,"div",20,xt),l()()()}if(e&2){let t=c();a(),p("childHeight",t.galleryMode.dimensions)("childWidth",t.galleryMode.dimensions)("items",v(2,5,t.spaces,t.inputFilter.search()))("galleryMode",!0)("resizeOffset",110),a(3),k(t.scrollView==null?null:t.scrollView.viewPortItems)}}function Zt(e,r){if(e&1&&u(0,"fa-icon",37),e&2){let t=c(4);p("icon",t.sortTable.sortParam.asc?t.icons.faArrowDown:t.icons.faArrowUp)("fixedWidth",!1)}}function ei(e,r){if(e&1){let t=x();s(0,"th",36),f("click",function(){C(t);let o=c().$implicit,i=c(2);return h(i.sortBy(o.key))}),m(1),g(2,Zt,1,2,"fa-icon",37),l()}if(e&2){let t=c().$implicit,n=c(2);R(t.value.class),F("width",t.value.width,"%"),U("text-align-center",t.value.textCenter)("cursor-pointer",t.value.sortable),a(),D(" ",t.value.label," "),a(),S(n.sortTable.sortParam.column===t.key?2:-1)}}function ti(e,r){if(e&1&&g(0,ei,3,10,"th",35),e&2){let t=r.$implicit;S(t.value.show?0:-1)}}function ii(e,r){if(e&1&&(s(0,"div",40),u(1,"fa-icon",41),s(2,"div",42)(3,"span",28),m(4),l(),s(5,"span",43),m(6),l()()()),e&2){let t=c(3).$implicit,n=c(2);a(),p("icon",n.icons.SPACES)("fixedWidth",!1),a(3),E(t.name),a(2),E(t.description)}}function ni(e,r){if(e&1&&u(0,"app-user-avatar",44),e&2){let t=r.$implicit;p("user",t)("isMember",!0)}}function oi(e,r){if(e&1&&A(0,ni,1,2,"app-user-avatar",44,bt),e&2){let t=c(3).$implicit;k(t.managers)}}function ai(e,r){if(e&1&&(s(0,"span"),m(1),b(2,"joinCounts"),l()),e&2){let t=c(3).$implicit;a(),E(v(2,1,t.counts,Ce(4,zt)))}}function ri(e,r){if(e&1){let t=x();s(0,"span",47),f("click",function(){C(t);let o=c(6);return h(o.openSpaceRootsDialog())}),u(1,"fa-icon",7),m(2),l()}if(e&2){let t=c(4).$implicit,n=c(2);a(),p("icon",n.icons.faAnchor),a(),D("\xA0",t.counts.roots," ")}}function si(e,r){if(e&1){let t=x();s(0,"span",48),f("click",function(){C(t);let o=c(4).$implicit,i=c(2);return h(i.openChildShareDialog(o))}),u(1,"fa-icon",49),s(2,"span"),m(3),l()()}if(e&2){let t=c(4).$implicit,n=c(2);a(),p("icon",n.icons.SHARED),a(2),E(t.counts.shares)}}function li(e,r){if(e&1&&(g(0,ri,3,2,"span",45),g(1,si,4,2,"span",46)),e&2){let t=c(3).$implicit,n=c(2);S(t.counts!=null&&t.counts.roots?0:-1),a(),S(t.role===n.SPACE_ROLE.IS_MANAGER&&t.counts.shares?1:-1)}}function ci(e,r){if(e&1&&u(0,"app-file-permissions",50),e&2){let t=c(4).$implicit;p("permissions",t.hPerms)}}function pi(e,r){if(e&1&&g(0,ci,1,1,"app-file-permissions",50),e&2){let t=c(3).$implicit;S(t.permissions?0:-1)}}function mi(e,r){if(e&1&&m(0),e&2){let t=c(3).$implicit;D(" ",t.hTimeAgo," ")}}function di(e,r){if(e&1&&(s(0,"td"),g(1,ii,7,4,"div",40)(2,oi,2,0)(3,ai,3,5,"span")(4,li,2,2)(5,pi,1,1)(6,mi,1,1),l()),e&2){let t,n=c().$implicit,o=c().$implicit;R(fe("",n.value.class," ",n.value.newly?"prop-newly-"+o[n.value.newly]:"")),F("width",n.value.width,"%"),U("text-align-center",n.value.textCenter),a(),S((t=n.key)==="name"?1:t==="managers"?2:t==="members"?3:t==="infos"?4:t==="permissions"?5:t==="modified"?6:-1)}}function _i(e,r){if(e&1&&g(0,di,7,9,"td",39),e&2){let t=r.$implicit;S(t.value.show?0:-1)}}function ui(e,r){if(e&1){let t=x();s(0,"tr",38),f("click",function(){let o=C(t).$implicit,i=c(2);return h(i.onSelect(o))})("contextmenu",function(o){let i=C(t).$implicit,d=c(2);return h(d.onTargetContextMenu(o,i))})("pressup",function(o){let i=C(t).$implicit,d=c(2);return h(d.onTargetContextMenu(o,i))})("tap",function(){let o=C(t).$implicit,i=c(2);return h(i.browse(o))}),A(1,_i,1,1,null,null,vt),b(3,"keyvalue"),l()}if(e&2){let t=r.$implicit,n=c(2);U("disabled",!t.enabled)("selected",t.id===(n.selected==null?null:n.selected.id)),a(),k(v(3,4,n.tableHeaders,n.originalOrderKeyValue))}}function fi(e,r){if(e&1){let t=x();s(0,"table",31)(1,"thead")(2,"tr"),A(3,ti,1,1,null,null,vt),b(5,"keyvalue"),l()()(),s(6,"app-virtual-scroll",32),b(7,"searchFilter"),f("contextmenu",function(o){C(t);let i=c();return h(i.onContextMenu(o))}),s(8,"table",31)(9,"tbody",33),A(10,ui,4,7,"tr",34,xt),l()()()}if(e&2){let t=c();a(3),k(v(5,2,t.tableHeaders,t.originalOrderKeyValue)),a(3),p("bufferAmount",5)("items",v(7,5,t.spaces,t.inputFilter.search())),a(4),k(t.scrollView==null?null:t.scrollView.viewPortItems)}}function Ci(e,r){if(e&1&&(s(0,"span",51),u(1,"fa-icon",7),m(2,"New space"),l()),e&2){let t=c(2);a(),p("icon",t.icons.faPlus)}}function hi(e,r){}function gi(e,r){if(e&1){let t=x();w(0,Ci,3,1,"ng-template",15),f("execute",function(){C(t);let o=c();return h(o.openSpaceDialog(!0))}),w(1,hi,0,0,"ng-template",17)}e&2&&(a(),p("divider",!0))}function Si(e,r){if(e&1&&(s(0,"span",51),u(1,"fa-icon",7),m(2,"Refresh"),l()),e&2){let t=c();a(),p("icon",t.icons.faArrowRotateRight)}}function xi(e,r){if(e&1&&(s(0,"span",51),u(1,"fa-icon",7),m(2,"Edit space"),l()),e&2){let t=c(2);a(),p("icon",t.icons.faPen)}}function bi(e,r){if(e&1&&(s(0,"span",51),u(1,"fa-icon",7),m(2,"Edit children shares"),l()),e&2){let t=c(3);a(),p("icon",t.icons.SHARED)}}function vi(e,r){if(e&1){let t=x();w(0,bi,3,1,"ng-template",15),f("execute",function(){C(t);let o=c(2);return h(o.openChildShareDialog())})}}function yi(e,r){if(e&1){let t=x();w(0,xi,3,1,"ng-template",15),f("execute",function(){C(t);let o=c();return h(o.openSpaceDialog())}),g(1,vi,1,0,null,16)}if(e&2){let t=c();a(),S(t.selected!=null&&t.selected.counts.shares?1:-1)}}function wi(e,r){if(e&1&&(s(0,"span",51),u(1,"fa-icon",7),m(2,"Manage my anchored files"),l()),e&2){let t=c(2);a(),p("icon",t.icons.faAnchor)}}function Ti(e,r){if(e&1){let t=x();w(0,wi,3,1,"ng-template",15),f("execute",function(){C(t);let o=c();return h(o.openSpaceRootsDialog())})}}function Ei(e,r){}function Di(e,r){e&1&&w(0,Ei,0,0,"ng-template",17),e&2&&p("divider",!0)}function Mi(e,r){if(e&1&&(s(0,"span",51),u(1,"fa-icon",7),m(2,"Informations"),l()),e&2){let t=c();a(),p("icon",t.icons.faCircleInfo)}}var Kn=(()=>{let r=class r{constructor(){this.locale=y(K),this.layout=y(ee),this.SPACE_ROLE=Z,this.originalOrderKeyValue=Qe,this.TAB_MENU=He,this.icons={SPACES:I.SPACES,SHARED:I.SHARED_WITH_OTHERS,faAnchor:X,faArrowDown:Ne,faArrowUp:Re,faRotate:Pe,faArrowRotateRight:Be,faUpload:Le,faPlus:J,faPen:G,faCircleInfo:Oe},this.tableHeaders={name:{label:"Name",width:30,textCenter:!1,class:"",show:!0,sortable:!0},managers:{label:"Managers",width:10,class:"d-none d-md-table-cell",textCenter:!0,show:!0,sortable:!0},members:{label:"Members",width:20,class:"d-none d-md-table-cell",textCenter:!1,show:!0},infos:{label:"Infos",width:15,textCenter:!0,class:"d-none d-md-table-cell",show:!0},permissions:{label:"Permissions",width:10,textCenter:!0,class:"d-none d-lg-table-cell",show:!0,sortable:!0},modified:{label:"Modified",width:10,textCenter:!0,class:"d-none d-lg-table-cell",newly:"newly",show:!0,sortable:!0}},this.btnSortFields={name:"Name",managers:"Managers",permissions:"Permissions",modified:"Modified"},this.loading=!1,this.spaces=[],this.selected=null,this.canCreateSpace=!1,this.canEditSpace=!1,this.canManageRoots=!1,this.router=y(xe),this.activatedRoute=y(Se),this.spacesService=y(ie),this.store=y(ze),this.userService=y(te),this.sortSettings={default:[{prop:"name",type:"string"}],name:[{prop:"name",type:"string"}],managers:[{prop:"managers",type:"length"}],permissions:[{prop:"permissions",type:"length"}],modified:[{prop:"modified",type:"date"}]},this.sortTable=new Ze(this.constructor.name,this.sortSettings),this.loadSpaces(),this.canCreateSpace=this.userService.userHavePermission(We.SPACES_ADMIN),this.layout.setBreadcrumbIcon(I.SPACES),this.layout.setBreadcrumbNav({url:`/${ne.SPACES}/${je.SPACES}`,translating:!0,sameLink:!0}),this.activatedRoute.queryParams.subscribe(n=>this.focusOnSelect=n.select)}ngOnInit(){this.galleryMode=this.btnNavigationView.currentView()}loadSpaces(){this.loading=!0,this.onSelect(),this.spacesService.listSpaces().subscribe({next:n=>{this.sortBy(this.sortTable.sortParam.column,!1,n),this.loading=!1,this.focusOnSelect?this.focusOn(this.focusOnSelect):this.scrollView.scrollInto(-1)},error:n=>{this.spaces=[],this.loading=!1,this.layout.sendNotification("error","Spaces",n.error.message)}})}browse(n){n.enabled?this.router.navigate([ne.FILES,n.alias],{relativeTo:this.activatedRoute}).catch(console.error):this.layout.sendNotification("warning",n.name,"Space is disabled")}onSelect(n=null){n?(this.selected=n,this.canEditSpace=!!n.managers.find(o=>o.id===this.userService.user.id),this.canManageRoots=this.canEditSpace||n.havePermission(W.SHARE_INSIDE)):(this.selected=null,this.canEditSpace=!1,this.canManageRoots=!1),this.store.spaceSelection.set(this.selected)}sortBy(n,o=!0,i){this.spaces=this.sortTable.sortBy(n,o,i||this.spaces)}onContextMenu(n){n.preventDefault(),n.stopPropagation(),this.layout.openContextMenu(n,this.mainContextMenu)}onTargetContextMenu(n,o){n.preventDefault(),n.type==="contextmenu"&&n.stopPropagation(),this.onSelect(o),this.layout.openContextMenu(n,this.targetContextMenu)}openSpaceDialog(n=!1){n?this.layout.openDialog(le,"xl").content.spaceChange.pipe(L(1)).subscribe(i=>{let[d,_]=i;d==="add"&&(this.sortBy(this.sortTable.sortParam.column,!1,this.spaces.concat(_)),this.onSelect(_))}):this.selected&&this.canEditSpace&&this.spacesService.getSpace(this.selected.id).subscribe({next:o=>{this.layout.openDialog(le,"xl",{initialState:{space:o}}).content.spaceChange.pipe(L(1)).subscribe(d=>{let[_,T]=d;_==="update"?(this.selected.name=T.name,this.selected.alias=T.alias,this.selected.description=T.description,this.selected.counts=pe(ce({},T.counts),{shares:this.selected.counts.shares}),this.selected.modifiedAt=T.modifiedAt,this.selected.enabled=T.enabled,this.selected.managers=[...T.managers]):_==="delete"&&(this.onSelect(),this.sortBy(this.sortTable.sortParam.column,!1,this.spaces.filter(yt=>yt.id!==T.id)))})},error:o=>this.layout.sendNotification("error","Edit space",this.selected.name,o)})}openSpaceRootsDialog(){setTimeout(()=>{this.layout.openDialog(ht,"md",{initialState:{space:this.selected,user:this.userService.user}})},this.selected?0:100)}openChildShareDialog(n){n&&this.onSelect(n),this.layout.openDialog(Ct,null,{initialState:{space:this.selected}}).content.sharesCountEvent.subscribe(i=>this.selected.counts.shares=i)}focusOn(n){let o=this.spaces.find(i=>i.name===n);o&&(setTimeout(()=>this.scrollView.scrollInto(o),100),this.onSelect(o))}};r.\u0275fac=function(o){return new(o||r)},r.\u0275cmp=$({type:r,selectors:[["app-spaces"]],viewQuery:function(o,i){if(o&1&&(B(ae,5),B(oe,7),B(re,7),B(Ht,7),B(Qt,7)),o&2){let d;N(d=O())&&(i.scrollView=d.first),N(d=O())&&(i.inputFilter=d.first),N(d=O())&&(i.btnNavigationView=d.first),N(d=O())&&(i.mainContextMenu=d.first),N(d=O())&&(i.targetContextMenu=d.first)}},decls:34,vars:37,consts:[["MainContextMenu",""],["TargetContextMenu",""],[1,"app-top-menu"],["container","body","type","button",1,"btn","btn-sm","btn-secondary","me-1",3,"click","tooltip"],[3,"icon","animation"],["container","body","type","button",1,"btn","btn-sm","btn-secondary","me-1",3,"tooltip"],["container","body","type","button",1,"btn","btn-sm","btn-secondary","me-1",3,"click","disabled","tooltip"],[3,"icon"],[1,"ms-auto"],[1,"btn-group","btn-group-sm","me-1"],[1,"d-none","d-sm-block"],[3,"sortBy","switchView","sortParams","sortFields"],[1,"app-thumbs"],[1,"app-foot-menu"],[1,"mx-auto"],["contextMenuItem","",3,"execute"],["contextMenuItem",""],["contextMenuItem","",3,"divider"],[3,"contextmenu","childHeight","childWidth","items","galleryMode","resizeOffset"],["tabindex","-1",1,"row","g-0"],[1,"card",3,"disabled","selected","height","width"],[1,"card",3,"click","contextmenu","pressup","tap"],[1,"card-body"],[1,"circle-primary-icon",3,"icon"],[1,"label-top-right"],["l10nTranslate","",1,"badge","rounded-pill","bg-warning",3,"font-size"],[1,"label-bottom-left"],[1,"card-footer","text-center","text-truncate","p-1"],["draggable","false",1,"no-pointer-events"],["l10nTranslate","",1,"badge","rounded-pill","bg-warning"],[3,"user","isMember","height","width"],[1,"app-table"],[3,"contextmenu","bufferAmount","items"],["tabindex","-1"],[3,"disabled","selected"],["l10nTranslate","",3,"width","text-align-center","cursor-pointer","class"],["l10nTranslate","",3,"click"],[3,"icon","fixedWidth"],[3,"click","contextmenu","pressup","tap"],[3,"width","text-align-center","class"],[1,"d-flex","align-items-center"],[1,"circle-primary-icon",3,"icon","fixedWidth"],[1,"d-flex","flex-column","text-truncate"],["draggable","false",1,"no-pointer-events","text-muted","fs-xxxs"],[3,"user","isMember"],[1,"badge","rounded-pill","bg-primary","cursor-pointer","me-1"],[1,"badge","rounded-pill","bg-purple","cursor-pointer","me-1"],[1,"badge","rounded-pill","bg-primary","cursor-pointer","me-1",3,"click"],[1,"badge","rounded-pill","bg-purple","cursor-pointer","me-1",3,"click"],[1,"me-1",3,"icon"],["tooltipPlacement","auto",3,"permissions"],["l10nTranslate",""]],template:function(o,i){if(o&1){let d=x();s(0,"div",2)(1,"button",3),b(2,"translate"),f("click",function(){return C(d),h(i.loadSpaces())}),u(3,"fa-icon",4),l(),g(4,Kt,3,5,"button",5),s(5,"button",6),b(6,"translate"),f("click",function(){return C(d),h(i.openSpaceDialog())}),u(7,"fa-icon",7),l(),s(8,"button",6),b(9,"translate"),f("click",function(){return C(d),h(i.openChildShareDialog())}),u(10,"fa-icon",7),l(),s(11,"button",6),b(12,"translate"),f("click",function(){return C(d),h(i.openSpaceRootsDialog())}),u(13,"fa-icon",7),l(),s(14,"div",8)(15,"div",9),u(16,"app-input-filter",10),l(),s(17,"app-navigation-view",11),f("sortBy",function(T){return C(d),h(i.sortBy(T))})("switchView",function(T){return C(d),h(i.galleryMode=T)}),l()()(),g(18,Jt,6,8,"div",12)(19,fi,12,8),s(20,"div",13)(21,"span",14),m(22),b(23,"translate"),l()(),s(24,"context-menu",null,0),g(26,gi,2,1),w(27,Si,3,1,"ng-template",15),f("execute",function(){return C(d),h(i.loadSpaces())}),l(),s(28,"context-menu",null,1),g(30,yi,2,1),g(31,Ti,1,0,null,16),g(32,Di,1,1,null,17),w(33,Mi,3,1,"ng-template",15),f("execute",function(){return C(d),h(i.layout.showRSideBarTab(i.TAB_MENU.SELECTION))}),l()}o&2&&(a(),p("tooltip",v(2,22,"Refresh",i.locale.language)),a(2),p("icon",i.icons.faArrowRotateRight)("animation",i.loading?"spin":null),a(),S(i.canCreateSpace?4:-1),a(),p("disabled",!i.canEditSpace)("tooltip",v(6,25,"Edit space",i.locale.language)),a(2),p("icon",i.icons.faPen),a(),p("disabled",!i.canEditSpace||!(i.selected!=null&&i.selected.counts.shares))("tooltip",v(9,28,"Edit children shares",i.locale.language)),a(2),p("icon",i.icons.SHARED),a(),p("disabled",!i.canManageRoots)("tooltip",v(12,31,"Manage my anchored files",i.locale.language)),a(2),p("icon",i.icons.faAnchor),a(4),p("sortParams",i.sortTable.sortParam)("sortFields",i.btnSortFields),a(),S(i.galleryMode!=null&&i.galleryMode.enabled?18:19),a(4),ue("",i.spaces.length," ",v(23,34,"spaces",i.locale.language)),a(4),S(i.canCreateSpace?26:-1),a(4),S(i.canEditSpace?30:-1),a(),S(i.canManageRoots?31:-1),a(),S(i.canEditSpace||i.canManageRoots?32:-1))},dependencies:[j,z,et,ae,Ve,Me,qe,$e,Ue,re,oe,dt,ge,ct,De,Xe],encapsulation:2});let e=r;return e})();export{Kn as SpacesComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as P,b as R,c as X,d as $}from"./chunk-
|
|
1
|
+
import{a as P,b as R,c as X,d as $}from"./chunk-2QNFUN7G.js";import{Xa as K,xb as O}from"./chunk-55WOZ7P6.js";import{Cb as h,Eb as l,Fd as B,Gc as k,Le as F,Ma as r,Pb as m,Rb as y,Re as E,Ue as L,Uf as I,Xa as M,Ye as d,Yf as N,Zc as z,ab as T,bb as g,dc as S,fc as V,ha as C,jb as b,kb as D,ma as w,na as f,nb as _,ob as v,pb as p,qb as a,rb as s,sb as u,zb as x}from"./chunk-JQOMI5VI.js";var A=(t,i)=>i.key;function U(t,i){if(t&1){let e=x();a(0,"li",6)(1,"a",8),h("click",function(){let o=w(e).$implicit,c=l(2);return f(c.setView(o.key))}),a(2,"span"),u(3,"fa-icon",2),m(4),s()()()}if(t&2){let e=i.$implicit;r(3),p("icon",e.value.icon),r(),y(" ",e.value.text)}}function j(t,i){if(t&1&&u(0,"fa-icon",10),t&2){let e=l(3);p("icon",e.sortParams.asc?e.icons.faArrowDown:e.icons.faArrowUp)}}function q(t,i){if(t&1){let e=x();a(0,"li",6)(1,"a",8),h("click",function(){let o=w(e).$implicit,c=l(2);return f(c.sortBy.emit(o.key))}),a(2,"span",9),m(3),b(4,j,1,1,"fa-icon",10),s()()()}if(t&2){let e=i.$implicit,n=l(2);r(3),y(" ",e.value," "),r(),D(n.sortParams.column===e.key?4:-1)}}function G(t,i){if(t&1&&(a(0,"ul",4)(1,"li",5),m(2,"Display"),s(),_(3,U,5,2,"li",6,A),S(5,"keyvalue"),a(6,"li",7),m(7,"Sort by"),s(),_(8,q,5,2,"li",6,A),S(10,"keyvalue"),s()),t&2){let e=l();r(3),v(V(5,0,e.viewsMode,e.originalOrderKeyValue)),r(5),v(V(10,3,e.sortFields,e.originalOrderKeyValue))}}var le=(()=>{let i=class i{constructor(){this.switchView=new g,this.sortBy=new g,this.originalOrderKeyValue=K,this.icons={faCog:E,faArrowDown:I,faArrowUp:L},this.viewsMode={tl:{enabled:!1,text:"List",icon:F},th:{enabled:!0,text:"S",icon:d,dimensions:96,image:56,imageRes:128,faSize:30,textSize:10,margins:18},thM:{enabled:!0,text:"M",icon:d,dimensions:112,image:72,imageRes:192,faSize:34,textSize:11,margins:18},thL:{enabled:!0,text:"L",icon:d,dimensions:152,image:112,imageRes:256,faSize:50,textSize:12,margins:18},thXl:{enabled:!0,text:"XL",icon:d,dimensions:192,image:152,imageRes:512,faSize:65,textSize:13,margins:18},thXxl:{enabled:!0,text:"XXL",icon:N,dimensions:232,image:192,imageRes:1024,faSize:80,textSize:13,margins:18}},this.layout=C(O),this.viewsMode.tl.text=this.layout.translateString(this.viewsMode.tl.text)}get viewMode(){return localStorage.getItem("viewMode")||"tl"}set viewMode(n){localStorage.setItem("viewMode",n)}currentView(){return this.viewsMode[this.viewMode]}setView(n){this.viewMode=n,this.switchView.emit(this.viewsMode[n])}};i.\u0275fac=function(o){return new(o||i)},i.\u0275cmp=M({type:i,selectors:[["app-navigation-view"]],inputs:{sortParams:"sortParams",sortFields:"sortFields"},outputs:{switchView:"switchView",sortBy:"sortBy"},decls:4,vars:1,consts:[["dropdown","",1,"btn-group","btn-group-sm"],["dropdownToggle","","type","button",1,"btn","btn-sm","btn-secondary","dropdown-toggle"],[3,"icon"],["class","dropdown-menu dropdown-menu-right","role","menu",4,"dropdownMenu"],["role","menu",1,"dropdown-menu","dropdown-menu-right"],["l10nTranslate","",1,"dropdown-header","fw-bold"],["role","menuitem"],["l10nTranslate","",1,"dropdown-header","fw-bold","mt-1"],[1,"dropdown-item",3,"click"],["l10nTranslate","",1,"me-2"],["size","xs",1,"ms-1",3,"icon"]],template:function(o,c){o&1&&(a(0,"div",0)(1,"button",1),u(2,"fa-icon",2),s(),T(3,G,11,6,"ul",3),s()),o&2&&(r(2),p("icon",c.icons.faCog))},dependencies:[$,R,X,P,z,B,k],encapsulation:2,changeDetection:0});let t=i;return t})();export{le as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Fa as U}from"./chunk-
|
|
1
|
+
import{Fa as U}from"./chunk-55WOZ7P6.js";import{Qe as o,Qf as E,Tf as p,_a as n}from"./chunk-JQOMI5VI.js";var t={BASE:"admin",USERS:"users",GUESTS:"guests",GROUPS:"groups",PGROUPS:"personal_groups"},i={ADMIN:"Administration",USERS:"Users",GROUPS:"Groups",GUESTS:"Guests",PGROUPS:"Personal groups"},s={BASE:o,USERS:p,GROUPS:E},c={title:i.ADMIN,link:`${t.BASE}/${t.USERS}`,icon:s.BASE,matchLink:new RegExp(`^${t.BASE}`),level:12,checks:[{prop:"user",value:"isAdmin"}],submenus:[{title:i.USERS,icon:s.USERS,link:`${t.BASE}/${t.USERS}`,matchLink:RegExp(`^${t.BASE}/${t.USERS}$|^${t.BASE}/${t.GUESTS}$`)},{title:i.GROUPS,icon:s.GROUPS,link:`${t.BASE}/${t.GROUPS}`,matchLink:RegExp(`^${t.BASE}/${t.GROUPS}|^${t.BASE}/${t.PGROUPS}`)}]};var $=(()=>{let S=class S{transform(r){return r&&U(r)}};S.\u0275fac=function(a){return new(a||S)},S.\u0275pipe=n({name:"capitalize",type:S,pure:!0});let e=S;return e})();export{t as a,i as b,s as c,c as d,$ as e};
|