@sync-in/server 1.9.1 → 1.9.3

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.
Files changed (163) hide show
  1. package/CHANGELOG.md +12 -8
  2. package/package.json +7 -7
  3. package/server/applications/files/services/files-manager.service.js +2 -2
  4. package/server/applications/files/services/files-manager.service.js.map +1 -1
  5. package/server/applications/files/services/files-tasks-manager.service.js +1 -1
  6. package/server/applications/files/services/files-tasks-manager.service.js.map +1 -1
  7. package/server/applications/files/utils/send-file.js +18 -9
  8. package/server/applications/files/utils/send-file.js.map +1 -1
  9. package/server/applications/files/utils/url-file.js +6 -6
  10. package/server/applications/files/utils/url-file.js.map +1 -1
  11. package/server/applications/links/services/links-manager.service.js +1 -1
  12. package/server/applications/links/services/links-manager.service.js.map +1 -1
  13. package/server/applications/shares/interfaces/share-props.interface.js.map +1 -1
  14. package/server/applications/shares/services/shares-manager.service.js +6 -4
  15. package/server/applications/shares/services/shares-manager.service.js.map +1 -1
  16. package/server/applications/spaces/services/spaces-manager.service.js +15 -12
  17. package/server/applications/spaces/services/spaces-manager.service.js.map +1 -1
  18. package/server/applications/users/services/admin-users-manager.service.js +4 -0
  19. package/server/applications/users/services/admin-users-manager.service.js.map +1 -1
  20. package/server/applications/users/users.controller.js +4 -1
  21. package/server/applications/users/users.controller.js.map +1 -1
  22. package/static/assets/pdfjs/build/pdf.mjs +35 -20
  23. package/static/assets/pdfjs/build/pdf.mjs.map +1 -1
  24. package/static/assets/pdfjs/build/pdf.sandbox.mjs +2 -2
  25. package/static/assets/pdfjs/build/pdf.worker.mjs +1488 -52
  26. package/static/assets/pdfjs/build/pdf.worker.mjs.map +1 -1
  27. package/static/assets/pdfjs/version +1 -1
  28. package/static/assets/pdfjs/web/locale/be/viewer.ftl +2 -12
  29. package/static/assets/pdfjs/web/locale/bg/viewer.ftl +4 -0
  30. package/static/assets/pdfjs/web/locale/bs/viewer.ftl +0 -15
  31. package/static/assets/pdfjs/web/locale/ca/viewer.ftl +0 -4
  32. package/static/assets/pdfjs/web/locale/cs/viewer.ftl +4 -14
  33. package/static/assets/pdfjs/web/locale/cy/viewer.ftl +2 -12
  34. package/static/assets/pdfjs/web/locale/da/viewer.ftl +2 -12
  35. package/static/assets/pdfjs/web/locale/de/viewer.ftl +0 -12
  36. package/static/assets/pdfjs/web/locale/dsb/viewer.ftl +0 -12
  37. package/static/assets/pdfjs/web/locale/el/viewer.ftl +2 -12
  38. package/static/assets/pdfjs/web/locale/en-CA/viewer.ftl +0 -12
  39. package/static/assets/pdfjs/web/locale/en-GB/viewer.ftl +0 -12
  40. package/static/assets/pdfjs/web/locale/eo/viewer.ftl +2 -12
  41. package/static/assets/pdfjs/web/locale/es-AR/viewer.ftl +0 -12
  42. package/static/assets/pdfjs/web/locale/es-CL/viewer.ftl +2 -12
  43. package/static/assets/pdfjs/web/locale/es-ES/viewer.ftl +2 -12
  44. package/static/assets/pdfjs/web/locale/es-MX/viewer.ftl +0 -12
  45. package/static/assets/pdfjs/web/locale/eu/viewer.ftl +0 -12
  46. package/static/assets/pdfjs/web/locale/fi/viewer.ftl +0 -12
  47. package/static/assets/pdfjs/web/locale/fr/viewer.ftl +0 -12
  48. package/static/assets/pdfjs/web/locale/fur/viewer.ftl +0 -12
  49. package/static/assets/pdfjs/web/locale/fy-NL/viewer.ftl +0 -12
  50. package/static/assets/pdfjs/web/locale/gn/viewer.ftl +2 -12
  51. package/static/assets/pdfjs/web/locale/he/viewer.ftl +0 -12
  52. package/static/assets/pdfjs/web/locale/hsb/viewer.ftl +0 -12
  53. package/static/assets/pdfjs/web/locale/hu/viewer.ftl +0 -12
  54. package/static/assets/pdfjs/web/locale/hy-AM/viewer.ftl +0 -15
  55. package/static/assets/pdfjs/web/locale/ia/viewer.ftl +0 -12
  56. package/static/assets/pdfjs/web/locale/id/viewer.ftl +0 -15
  57. package/static/assets/pdfjs/web/locale/is/viewer.ftl +0 -15
  58. package/static/assets/pdfjs/web/locale/it/viewer.ftl +2 -14
  59. package/static/assets/pdfjs/web/locale/ja/viewer.ftl +7 -2
  60. package/static/assets/pdfjs/web/locale/ka/viewer.ftl +0 -12
  61. package/static/assets/pdfjs/web/locale/kab/viewer.ftl +0 -12
  62. package/static/assets/pdfjs/web/locale/kk/viewer.ftl +3 -12
  63. package/static/assets/pdfjs/web/locale/ko/viewer.ftl +0 -12
  64. package/static/assets/pdfjs/web/locale/nb-NO/viewer.ftl +2 -12
  65. package/static/assets/pdfjs/web/locale/nl/viewer.ftl +0 -12
  66. package/static/assets/pdfjs/web/locale/nn-NO/viewer.ftl +0 -12
  67. package/static/assets/pdfjs/web/locale/pa-IN/viewer.ftl +4 -12
  68. package/static/assets/pdfjs/web/locale/pl/viewer.ftl +2 -12
  69. package/static/assets/pdfjs/web/locale/pt-BR/viewer.ftl +2 -12
  70. package/static/assets/pdfjs/web/locale/rm/viewer.ftl +0 -12
  71. package/static/assets/pdfjs/web/locale/ro/viewer.ftl +2 -14
  72. package/static/assets/pdfjs/web/locale/ru/viewer.ftl +0 -12
  73. package/static/assets/pdfjs/web/locale/sc/viewer.ftl +0 -1
  74. package/static/assets/pdfjs/web/locale/sk/viewer.ftl +0 -12
  75. package/static/assets/pdfjs/web/locale/sl/viewer.ftl +2 -12
  76. package/static/assets/pdfjs/web/locale/sq/viewer.ftl +2 -12
  77. package/static/assets/pdfjs/web/locale/sv-SE/viewer.ftl +0 -12
  78. package/static/assets/pdfjs/web/locale/tg/viewer.ftl +2 -12
  79. package/static/assets/pdfjs/web/locale/th/viewer.ftl +0 -12
  80. package/static/assets/pdfjs/web/locale/tr/viewer.ftl +2 -12
  81. package/static/assets/pdfjs/web/locale/vi/viewer.ftl +0 -12
  82. package/static/assets/pdfjs/web/locale/zh-CN/viewer.ftl +2 -12
  83. package/static/assets/pdfjs/web/locale/zh-TW/viewer.ftl +0 -12
  84. package/static/assets/pdfjs/web/viewer.css +53 -41
  85. package/static/assets/pdfjs/web/viewer.html +493 -132
  86. package/static/assets/pdfjs/web/viewer.mjs +225 -150
  87. package/static/assets/pdfjs/web/viewer.mjs.map +1 -1
  88. package/static/{chunk-LYZGJZNP.js → chunk-25PWAXTJ.js} +1 -1
  89. package/static/{chunk-HCSWO7BO.js → chunk-27XEAHMV.js} +1 -1
  90. package/static/{chunk-YMAN4LIU.js → chunk-2CAAJBRO.js} +1 -1
  91. package/static/{chunk-RK2ONYTL.js → chunk-2LHHXDD5.js} +1 -1
  92. package/static/{chunk-YCTCESL4.js → chunk-2XY4PMI5.js} +1 -1
  93. package/static/{chunk-ERDZ7IVF.js → chunk-33WFRCUP.js} +1 -1
  94. package/static/chunk-3LVFDMTN.js +1 -0
  95. package/static/{chunk-V6FA5QY4.js → chunk-4DF2SQD4.js} +1 -1
  96. package/static/{chunk-Q556XB3S.js → chunk-4EUHBTWV.js} +1 -1
  97. package/static/{chunk-AADK5D2H.js → chunk-4KXJ6C4N.js} +1 -1
  98. package/static/{chunk-BHZEPHRI.js → chunk-4OV3SAUS.js} +1 -1
  99. package/static/{chunk-5S6KPQRA.js → chunk-5HCVWZMA.js} +1 -1
  100. package/static/{chunk-ZCOWBVOT.js → chunk-5HYSNQR4.js} +1 -1
  101. package/static/{chunk-4PZPHJ7L.js → chunk-5NHB7SV3.js} +1 -1
  102. package/static/chunk-6VJI4X2A.js +1 -0
  103. package/static/{chunk-XCLK7NJL.js → chunk-7H5O4BLV.js} +1 -1
  104. package/static/{chunk-ACUF7IKP.js → chunk-7NI353LS.js} +1 -1
  105. package/static/{chunk-TGLJFALR.js → chunk-A6J6SOM6.js} +1 -1
  106. package/static/{chunk-XOF4UW3S.js → chunk-A7DSX7VP.js} +1 -1
  107. package/static/chunk-A7R246NW.js +1 -0
  108. package/static/{chunk-EL6QL4TP.js → chunk-ASBPYTLT.js} +1 -1
  109. package/static/chunk-BJARRIS6.js +562 -0
  110. package/static/{chunk-VQJYCYWI.js → chunk-CAZSNVMS.js} +1 -1
  111. package/static/{chunk-EIYRBM4J.js → chunk-CURVLK7L.js} +1 -1
  112. package/static/{chunk-5E3TYOL3.js → chunk-DDRGLHOP.js} +1 -1
  113. package/static/{chunk-ZXXHFBGL.js → chunk-FLPZB3OX.js} +1 -1
  114. package/static/{chunk-23UUFZSR.js → chunk-FRBTL2ER.js} +1 -1
  115. package/static/{chunk-JY2I3HGL.js → chunk-FXM7XXWA.js} +1 -1
  116. package/static/{chunk-7CKHC72R.js → chunk-GDPJRUVU.js} +1 -1
  117. package/static/{chunk-QMHUIHSR.js → chunk-GENTF6JM.js} +1 -1
  118. package/static/{chunk-VK7XMFVE.js → chunk-H4RLHI3Y.js} +1 -1
  119. package/static/{chunk-3WLBVJ2S.js → chunk-HE6EDXWI.js} +1 -1
  120. package/static/{chunk-U4RW6XG5.js → chunk-IUJ4IK26.js} +1 -1
  121. package/static/{chunk-XQGPSNQB.js → chunk-JEVBUJQ4.js} +1 -1
  122. package/static/{chunk-K657XPXA.js → chunk-K3MOXDU5.js} +1 -1
  123. package/static/{chunk-6B3GGAV3.js → chunk-KBWK65KM.js} +1 -1
  124. package/static/{chunk-I2S3XPC5.js → chunk-L3PDWJZ3.js} +2 -2
  125. package/static/{chunk-KDEEERWZ.js → chunk-LBXOAKBD.js} +1 -1
  126. package/static/{chunk-Y5RLD72B.js → chunk-LFAQLJZK.js} +1 -1
  127. package/static/{chunk-M4XL3JN5.js → chunk-MBFMTBVJ.js} +1 -1
  128. package/static/{chunk-HMOB6XC5.js → chunk-MZBO5PAR.js} +1 -1
  129. package/static/{chunk-DJDRX53V.js → chunk-NFIES7BC.js} +1 -1
  130. package/static/{chunk-3YDYZLF7.js → chunk-NK2NMAJI.js} +1 -1
  131. package/static/{chunk-FNOTGWRW.js → chunk-O7UXVNR2.js} +1 -1
  132. package/static/{chunk-RDNTK4YH.js → chunk-PKU4IIIR.js} +1 -1
  133. package/static/{chunk-NN4ONTOT.js → chunk-QUSS6SUC.js} +1 -1
  134. package/static/{chunk-BU4ZICZR.js → chunk-R6VB3INJ.js} +1 -1
  135. package/static/{chunk-2TB2INBF.js → chunk-RJOHDAPM.js} +1 -1
  136. package/static/{chunk-BODMMLVB.js → chunk-S6YKBWJE.js} +1 -1
  137. package/static/{chunk-AZ5TF5Y3.js → chunk-SDR3UG2F.js} +1 -1
  138. package/static/{chunk-C3AAEQKW.js → chunk-TGHBDJZA.js} +1 -1
  139. package/static/{chunk-HNMGPG72.js → chunk-TVJQXN73.js} +1 -1
  140. package/static/{chunk-6NEBGCAZ.js → chunk-U75PLYIJ.js} +1 -1
  141. package/static/chunk-UUX3M6DC.js +1 -0
  142. package/static/{chunk-JWPXQOS3.js → chunk-VJ2HWQRJ.js} +2 -2
  143. package/static/{chunk-S2VBGI6Q.js → chunk-VO4WVT6K.js} +1 -1
  144. package/static/{chunk-5XUIPWOH.js → chunk-W72JYHOH.js} +1 -1
  145. package/static/{chunk-PXRT4L57.js → chunk-WJYVS27M.js} +1 -1
  146. package/static/{chunk-HKRGIRKB.js → chunk-XAIOGRBO.js} +1 -1
  147. package/static/{chunk-NKGKBQBX.js → chunk-XHQEF2IX.js} +1 -1
  148. package/static/{chunk-DQ3GEMPM.js → chunk-XXYMVRSH.js} +1 -1
  149. package/static/{chunk-HHWXIK2M.js → chunk-YTBSB2GE.js} +1 -1
  150. package/static/{chunk-GRLHFXGB.js → chunk-YXWF2DGF.js} +1 -1
  151. package/static/{chunk-JMYAD7E2.js → chunk-Z6RJZIDG.js} +1 -1
  152. package/static/{chunk-GNZPP2VO.js → chunk-ZC5ZDCDC.js} +1 -1
  153. package/static/{chunk-EDJAISWO.js → chunk-ZERBTNFW.js} +8 -8
  154. package/static/{chunk-MIA5YBOI.js → chunk-ZPI7RQ2S.js} +1 -1
  155. package/static/{chunk-NOPACN4F.js → chunk-ZRBLCAOK.js} +1 -1
  156. package/static/index.html +2 -2
  157. package/static/{main-56PZQ6TJ.js → main-FE6GWZXU.js} +4 -4
  158. package/static/{styles-Q4OZOSSK.css → styles-S5HVK4H5.css} +1 -1
  159. package/static/chunk-H6WOTGQ5.js +0 -1
  160. package/static/chunk-HC7F57NA.js +0 -1
  161. package/static/chunk-IOIBQGHN.js +0 -562
  162. package/static/chunk-J6YSFHLZ.js +0 -1
  163. package/static/chunk-QVFPHTOH.js +0 -1
@@ -1 +1 @@
1
- import{Oa as n,Qb as s,ab as l,vb as d,wb as h,xa as c,xb as g}from"./chunk-IOIBQGHN.js";var M=(()=>{let r=class r{constructor(){this.passwordToCheck="",this.bar0="",this.bar1="",this.bar2="",this.bar3="",this.bar4="",this.colors=["#F00","#F90","#FF0","#7ACC00","#06854B"]}static measureStrength(e){let t=0,o=/[$-/:-?{-~!"^_`[\]]/g,p=/[a-z]+/.test(e),m=/[A-Z]+/.test(e),u=/[0-9]+/.test(e),b=o.test(e),f=[p,m,u,b],a=0;for(let C of f)a+=C===!0?1:0;return t+=2*e.length+(e.length>=10?1:0),t+=a*10,t=e.length<=6?Math.min(t,10):t,t=a===1?Math.min(t,10):t,t=a===2?Math.min(t,20):t,t=a===3?Math.min(t,40):t,t}ngOnChanges(e){let t=e.passwordToCheck.currentValue;if(this.setBarColors(5,"#DDD"),t){let o=this.getColor(r.measureStrength(t));this.setBarColors(o.idx,o.col)}}getColor(e){let t=Math.min(Math.floor((e-1)/10),4);return{idx:t+1,col:this.colors[t]}}setBarColors(e,t){for(let o=0;o<e;o++)this[`bar${o}`]=t}};r.\u0275fac=function(t){return new(t||r)},r.\u0275cmp=l({type:r,selectors:[["app-password-strength-bar"]],inputs:{passwordToCheck:"passwordToCheck"},features:[c],decls:8,vars:10,consts:[["strength",""],["id","strength"],["id","strengthBar"],[1,"point"]],template:function(t,o){t&1&&(d(0,"div",1,0)(2,"ul",2),g(3,"li",3)(4,"li",3)(5,"li",3)(6,"li",3)(7,"li",3),h()()),t&2&&(n(3),s("background-color",o.bar0),n(),s("background-color",o.bar1),n(),s("background-color",o.bar2),n(),s("background-color",o.bar3),n(),s("background-color",o.bar4))},styles:["ul#strengthBar[_ngcontent-%COMP%]{display:flex;list-style:none;padding:0;align-self:center;margin-bottom:-2px}.point[_ngcontent-%COMP%]:last-child{margin:0!important}.point[_ngcontent-%COMP%]{background:#ddd;border-radius:2px;height:6px;margin-right:1px;width:20px}"],changeDetection:0});let i=r;return i})();export{M as a};
1
+ import{Oa as n,Qb as s,ab as l,vb as d,wb as h,xa as c,xb as g}from"./chunk-BJARRIS6.js";var M=(()=>{let r=class r{constructor(){this.passwordToCheck="",this.bar0="",this.bar1="",this.bar2="",this.bar3="",this.bar4="",this.colors=["#F00","#F90","#FF0","#7ACC00","#06854B"]}static measureStrength(e){let t=0,o=/[$-/:-?{-~!"^_`[\]]/g,p=/[a-z]+/.test(e),m=/[A-Z]+/.test(e),u=/[0-9]+/.test(e),b=o.test(e),f=[p,m,u,b],a=0;for(let C of f)a+=C===!0?1:0;return t+=2*e.length+(e.length>=10?1:0),t+=a*10,t=e.length<=6?Math.min(t,10):t,t=a===1?Math.min(t,10):t,t=a===2?Math.min(t,20):t,t=a===3?Math.min(t,40):t,t}ngOnChanges(e){let t=e.passwordToCheck.currentValue;if(this.setBarColors(5,"#DDD"),t){let o=this.getColor(r.measureStrength(t));this.setBarColors(o.idx,o.col)}}getColor(e){let t=Math.min(Math.floor((e-1)/10),4);return{idx:t+1,col:this.colors[t]}}setBarColors(e,t){for(let o=0;o<e;o++)this[`bar${o}`]=t}};r.\u0275fac=function(t){return new(t||r)},r.\u0275cmp=l({type:r,selectors:[["app-password-strength-bar"]],inputs:{passwordToCheck:"passwordToCheck"},features:[c],decls:8,vars:10,consts:[["strength",""],["id","strength"],["id","strengthBar"],[1,"point"]],template:function(t,o){t&1&&(d(0,"div",1,0)(2,"ul",2),g(3,"li",3)(4,"li",3)(5,"li",3)(6,"li",3)(7,"li",3),h()()),t&2&&(n(3),s("background-color",o.bar0),n(),s("background-color",o.bar1),n(),s("background-color",o.bar2),n(),s("background-color",o.bar3),n(),s("background-color",o.bar4))},styles:["ul#strengthBar[_ngcontent-%COMP%]{display:flex;list-style:none;padding:0;align-self:center;margin-bottom:-2px}.point[_ngcontent-%COMP%]:last-child{margin:0!important}.point[_ngcontent-%COMP%]{background:#ddd;border-radius:2px;height:6px;margin-right:1px;width:20px}"],changeDetection:0});let i=r;return i})();export{M as a};
@@ -1,4 +1,4 @@
1
- import{b as ye}from"./chunk-6B3GGAV3.js";import{m as ve,n as xe,s as N,w as Oe}from"./chunk-FNOTGWRW.js";import{Cb as Ce,J as _e}from"./chunk-I2S3XPC5.js";import{Aa as q,Ab as D,Bb as y,Cd as ce,Dd as le,Eb as h,Gb as p,Gd as pe,Ha as T,J as I,Kd as de,Mc as ie,N as W,Oa as s,Od as ue,Pb as F,Qa as O,Rb as b,Sb as Z,Tb as m,Ub as k,Xb as V,Yb as G,Zb as A,ab as M,af as he,cb as B,cc as J,cd as ne,da as U,db as Q,dd as oe,ec as Y,fb as w,fd as re,gc as ee,hc as te,ja as C,jd as se,kc as H,lb as f,mb as g,mc as j,mf as fe,nb as $,oa as v,oc as z,od as ae,og as P,pa as x,pb as K,qb as X,rb as u,sb as c,tb as a,ub as _,ze as me,zf as ge}from"./chunk-IOIBQGHN.js";var ke=(function(i){return i[i.USER=0]="USER",i[i.PERSONAL=1]="PERSONAL",i})(ke||{}),Se=(function(i){return i[i.VISIBLE=0]="VISIBLE",i[i.PRIVATE=1]="PRIVATE",i[i.ISOLATED=2]="ISOLATED",i})(Se||{});var Xe=(()=>{let n=class n{constructor(){this.translate=C(pe)}transform(e,t=[]){let o="";if(!e)return o;for(let[l,d]of Object.entries(e).filter(([E,qe])=>t.indexOf(E)===-1))d&&(o+=`${d} ${this.translate.translate(d===1?l.slice(0,-1):l)}, `);return o.slice(0,-2)}};n.\u0275fac=function(t){return new(t||n)},n.\u0275pipe=Q({name:"joinCounts",type:n,pure:!0});let i=n;return i})();function Me(i,n){if(i&1&&(c(0,"span"),m(1),a()),i&2){let r=p();s(),k(r.group.name)}}function we(i,n){i&1&&(c(0,"span",3),m(1,"New personal group"),a())}function Pe(i,n){if(i&1&&_(0,"fa-icon",4),i&2){let r=p();u("icon",r.icons.faSpinner)}}function Ee(i,n){i&1&&(c(0,"span",3),m(1,"Edit personal group"),a())}function Te(i,n){i&1&&(c(0,"span",3),m(1,"Edit group"),a())}function De(i,n){if(i&1&&(c(0,"h4",5),f(1,Ee,2,0,"span",3)(2,Te,2,0,"span",3),a()),i&2){let r=p();s(),g(r.isPersonalGroup?1:2)}}var mt=(()=>{let n=class n{constructor(){this.groupChange=new O,this.layout=C(Ce),this.icons={GROUPS:_e.GROUPS,faSpinner:fe,faCog:he,faUsers:me,faPen:ge},this.isPersonalGroup=!0,this.submitted=!1,this.loading=!1,this.userService=C(Oe),this.user=this.userService.user}ngOnInit(){this.originalGroup?.id?(this.isPersonalGroup=this.originalGroup.isPersonalGroup,this.group=new N({id:this.originalGroup.id,name:this.originalGroup.name,description:this.originalGroup.description,createdAt:this.originalGroup.createdAt,modifiedAt:this.originalGroup.modifiedAt,type:this.originalGroup.type})):this.group=new N({id:0,name:"",description:"",createdAt:null,modifiedAt:null,type:xe.PGROUP})}onCancel(){this.layout.closeDialog()}onSubmit(){if(this.loading=!0,this.submitted=!0,this.group.id===0)this.userService.createPersonalGroup(this.makeDto(!0)).subscribe({next:e=>{this.loading=!1,this.groupChange.emit(["add",e]),this.layout.sendNotification("success","Group created",e.name),this.layout.closeDialog()},error:e=>this.onError(e)});else{let e=this.makeDto();if(!Object.keys(e).length){this.loading=!1,this.submitted=!1;return}this.userService.updatePersonalGroup(this.originalGroup.id,this.makeDto()).subscribe({next:t=>{this.loading=!1,this.groupChange.emit(["update",t]),this.layout.sendNotification("success","Group updated",t.name),this.layout.closeDialog()},error:t=>this.onError(t)})}}makeDto(e=!1){return{name:e?this.group.name:this.group.name!==this.originalGroup.name?this.group.name:void 0,description:e?this.group.description:this.group.description!==this.originalGroup.description?this.group.description:void 0}}onError(e){this.layout.sendNotification("error","Group error",this.group.name,e),this.submitted=!1,this.loading=!1}};n.\u0275fac=function(t){return new(t||n)},n.\u0275cmp=M({type:n,selectors:[["app-user-group-dialog"]],inputs:{originalGroup:"originalGroup"},outputs:{groupChange:"groupChange"},decls:23,vars:15,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"],[1,"d-flex","col-12","pb-3"],[1,"flex-fill","col-6","pe-4"],["for","name","l10nTranslate",""],["id","name","appAutofocus","","autocomplete","off","type","text",1,"form-control","form-control-sm",3,"ngModelChange","disabled","autoSelect","ngModel"],[1,"flex-fill","col-6","ps-4"],["for","description","l10nTranslate",""],["id","description","autocomplete","off","type","text",1,"form-control","form-control-sm",3,"ngModelChange","ngModel","disabled"],[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(t,o){t&1&&(c(0,"div",0)(1,"h4",1),_(2,"fa-icon",2),f(3,Me,2,1,"span")(4,we,2,0,"span",3),f(5,Pe,1,1,"fa-icon",4),a(),f(6,De,3,1,"h4",5),c(7,"button",6),h("click",function(){return o.layout.closeDialog()}),a()(),c(8,"div",7)(9,"div",8)(10,"div",9)(11,"label",10),m(12,"Name"),a(),c(13,"input",11),A("ngModelChange",function(d){return G(o.group.name,d)||(o.group.name=d),d}),a()(),c(14,"div",12)(15,"label",13),m(16,"Description"),a(),c(17,"input",14),A("ngModelChange",function(d){return G(o.group.description,d)||(o.group.description=d),d}),a()()()(),c(18,"div",15)(19,"button",16),h("click",function(){return o.onCancel()}),m(20,"Cancel"),a(),c(21,"button",17),h("click",function(){return o.onSubmit()}),m(22," Confirm "),a()()),t&2&&(s(2),u("icon",o.icons.GROUPS),s(),g(o.group.id?3:4),s(2),g(o.loading?5:-1),s(),g(o.group.id?6:-1),s(),Z(J("btn-close btn-close-white ",o.group.id?"ms-2":"ms-auto"," ms-2")),s(6),b("is-invalid",!o.group.name),u("disabled",!o.isPersonalGroup)("autoSelect",!1),V("ngModel",o.group.name),s(4),V("ngModel",o.group.description),u("disabled",!o.isPersonalGroup),s(4),u("disabled",!o.group.name||o.submitted))},dependencies:[le,re,se,ce,ae,P,de,ve],encapsulation:2});let i=n;return i})();var be=(()=>{let n=class n{onClick(e){e.stopPropagation()}ngOnInit(){setTimeout(()=>{typeof document<"u"&&document.addEventListener("click",this.offClickHandler)},0)}ngOnDestroy(){typeof document<"u"&&document.removeEventListener("click",this.offClickHandler)}};n.\u0275fac=function(t){return new(t||n)},n.\u0275dir=B({type:n,selectors:[["","offClick",""]],hostBindings:function(t,o){t&1&&h("click",function(d){return o.onClick(d)})},inputs:{offClickHandler:[0,"offClick","offClickHandler"]}});let i=n;return i})();var S=class{constructor(n){typeof n=="string"&&(this.id=this.name=n,this.description=""),typeof n=="object"&&(this.id=n.id||n.name,this.name=n.name,this.description=n.description||"")}};var Fe=i=>({active:i}),Ve=(i,n)=>({o:i,i:n});function Ge(i,n){if(i&1){let r=y();c(0,"input",6),h("keydown",function(t){v(r);let o=p();return x(o.inputEvent(t))})("keyup",function(t){v(r);let o=p();return x(o.inputEvent(t,!0))}),a()}if(i&2){let r=p();u("disabled",r.disabled)}}function Ae(i,n){i&1&&D(0)}function He(i,n){if(i&1&&(c(0,"span",12),w(1,Ae,1,0,"ng-container",13),a()),i&2){let r=p(2),e=F(6);b("ui-select-allow-clear",r.allowClear&&r.active),s(),u("ngTemplateOutlet",r.customTemplateSelect||e)("ngTemplateOutletContext",ee(4,Fe,r.active))}}function je(i,n){if(i&1&&(c(0,"span",9),m(1),a()),i&2){let r=p(2);s(),k(r.placeholder)}}function ze(i,n){if(i&1){let r=y();c(0,"button",14),h("click",function(t){v(r);let o=p(2);return x(o.removeClick(o.active,t))}),a()}}function Ne(i,n){if(i&1){let r=y();c(0,"div",4)(1,"span",7),h("click",function(t){v(r);let o=p();return x(o.matchClick(t))}),f(2,He,2,6,"span",8)(3,je,2,1,"span",9),f(4,ze,1,0,"button",10),_(5,"i",11),a()()}if(i&2){let r=p();s(2),g(r.active?2:3),s(2),g(r.allowClear&&r.active?4:-1)}}function Le(i,n){i&1&&D(0)}function Re(i,n){if(i&1){let r=y();c(0,"li",15)(1,"div",16),h("click",function(t){let o=v(r).$implicit,l=p(2);return x(l.selectMatch(o,t))})("mouseenter",function(){let t=v(r).$implicit,o=p(2);return x(o.selectActive(t))}),w(2,Le,1,0,"ng-container",13),a()()}if(i&2){let r=n.$implicit,e=p(2),t=F(8);s(),b("active",e.isActive(r)),s(),u("ngTemplateOutlet",e.customTemplateOptions||t)("ngTemplateOutletContext",te(4,Ve,r,e.inputValue))}}function Ie(i,n){if(i&1&&(c(0,"ul",5),K(1,Re,3,7,"li",15,$),a()),i&2){let r=p();s(),X(r.options)}}function We(i,n){if(i&1&&(c(0,"div",17)(1,"span",18),_(2,"fa-icon",19),a(),c(3,"span"),m(4),a(),c(5,"div",20),m(6),a()()),i&2){let r=n.active,e=p();s(2),u("icon",e.itemIcon)("fixedWidth",!1),s(2),k(r.name),s(2),k(r.description)}}function Ue(i,n){if(i&1&&(c(0,"a",21)(1,"div",17)(2,"span",18),_(3,"fa-icon",19),a(),_(4,"span",22),H(5,"highlight"),_(6,"span",23),H(7,"highlight"),a()()),i&2){let r=n.i,e=n.o,t=p();s(3),u("icon",t.itemIcon)("fixedWidth",!1),s(),u("innerHtml",t.sanitize(j(5,4,e.name,r)),T),s(2),u("innerHtml",t.sanitize(j(7,7,e.description,r)),T)}}var Tt=(()=>{let n=class n{constructor(){this.element=C(q),this.itemIcon=ue,this.allowClear=!0,this.placeholder="",this.idField="id",this.nameField="name",this.descriptionField="description",this.data=new O,this.selected=new O,this.removed=new O,this.typed=new O,this.opened=new O,this.options=[],this.itemObjects=[],this.inputMode=!1,this.inputValue="",this.onChange=Function.prototype,this.onTouched=Function.prototype,this.sanitizer=C(ne),this._items=[],this._optionsOpened=!1,this._disabled=!1,this._active=null,this.clickedOutside=this.clickedOutside.bind(this)}set items(e){if(!e.length){this._items=this.itemObjects=[],this.itemObjects=[];return}this._items=e.filter(t=>{if(typeof t=="string"||typeof t=="object"&&t&&t[this.nameField]&&t[this.idField])return t}),this.itemObjects=this._items.map(t=>typeof t=="string"?new S(t):new S({id:t[this.idField],name:t[this.nameField],description:t[this.descriptionField]}))}get optionsOpened(){return this._optionsOpened}set optionsOpened(e){this._optionsOpened=e,this.opened.emit(e)}get disabled(){return this._disabled}set disabled(e){this._disabled=e,this._disabled===!0&&this.hideOptions()}get active(){return this._active}set active(e){e?this._active=typeof e=="string"?e:new S({id:e[this.idField],name:e[this.nameField],description:e[this.descriptionField]}):this._active=null}sanitize(e){return this.sanitizer.bypassSecurityTrustHtml(e)}inputEvent(e,t=!1){if(e.keyCode===9)return;if(t&&(e.keyCode===37||e.keyCode===39||e.keyCode===38||e.keyCode===40||e.keyCode===13)){e.preventDefault();return}if(!t&&e.keyCode===8){let l=this.element.nativeElement.querySelector("div.ui-select-container > input");(!l.value||l.value.length<=0)&&(this.active&&this.remove(this.active),e.preventDefault())}if(!t&&e.keyCode===27){this.hideOptions(),e.preventDefault();return}if(!t&&e.keyCode===46&&(this.active&&this.remove(this.active),e.preventDefault()),!t&&e.keyCode===37&&this._items.length>0){this.behavior.first(),e.preventDefault();return}if(!t&&e.keyCode===39&&this._items.length>0){this.behavior.last(),e.preventDefault();return}if(!t&&e.keyCode===38){this.behavior.prev(),e.preventDefault();return}if(!t&&e.keyCode===40){this.behavior.next(),e.preventDefault();return}if(!t&&e.keyCode===13){(!this.active||this.active.id!==this.activeOption.id)&&(this.selectActiveMatch(),this.behavior.next()),e.preventDefault();return}let o=e.target||e.srcElement;o?(this.inputValue=o.value,this.doEvent("typed",this.inputValue||" ")):this.open()}ngOnInit(){this.subscription=this.typed.asObservable().pipe(I(200),W()).subscribe(e=>this.doSearch(e)),this.behavior=new R(this),this.doEvent("typed"," ")}ngOnDestroy(){this.subscription.unsubscribe()}remove(e){this._disabled!==!0&&(this.active=null,this.data.next(this.active),this.doEvent("removed",e),this.inputValue="",this.doEvent("typed"," "))}doEvent(e,t){this[e]&&t&&this[e].next(t),this.onTouched(),(e==="selected"||e==="removed")&&this.onChange(this.active)}clickedOutside(){this.inputMode=!1,this.optionsOpened=!1}writeValue(e){this.active=e,this.data.emit(this.active)}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouched=e}matchClick(e){this._disabled!==!0&&(this.inputMode=!this.inputMode,this.inputMode===!0&&(this.focusToInput(),this.open()))}mainClick(e){if(this.inputMode===!0||this._disabled===!0)return;if(e.keyCode===46){e.preventDefault(),this.inputEvent(e);return}if(e.keyCode===8){e.preventDefault(),this.inputEvent(e,!0);return}if(e.keyCode===9||e.keyCode===13||e.keyCode===27||e.keyCode>=37&&e.keyCode<=40){e.preventDefault();return}this.inputMode=!0;let t=String.fromCharCode(96<=e.keyCode&&e.keyCode<=105?e.keyCode-48:e.keyCode).toLowerCase();this.focusToInput(t),this.open();let o=e.target||e.srcElement;o.value=t,this.inputEvent(e)}selectActive(e){this.activeOption=e}isActive(e){return this.activeOption.id===e.id}removeClick(e,t){t.stopPropagation(),this.remove(e)}focusToInput(e=""){setTimeout(()=>{let t=this.element.nativeElement.querySelector("div.ui-select-container > input");t&&(t.focus(),t.value=e)},0)}selectMatch(e,t=void 0){t&&(t.stopPropagation(),t.preventDefault()),!(this.options.length<=0)&&(this.active=e,this.data.next(this.active),this.doEvent("selected",e),this.hideOptions(),this.focusToInput(e.name),this.element.nativeElement.querySelector(".ui-select-container").focus())}doSearch(e){this.searchFunction(e).subscribe({next:t=>{this.items=t},error:t=>{console.error(t),this.items=[]},complete:()=>this.behavior.filter()})}open(){this.options=this.itemObjects,this.options.length>0&&this.behavior.first(),this.optionsOpened=!0}hideOptions(){this.inputMode=!1,this.optionsOpened=!1}selectActiveMatch(){this.selectMatch(this.activeOption)}};n.\u0275fac=function(t){return new(t||n)},n.\u0275cmp=M({type:n,selectors:[["app-select"]],inputs:{searchFunction:"searchFunction",customTemplateOptions:"customTemplateOptions",customTemplateSelect:"customTemplateSelect",itemIcon:"itemIcon",allowClear:"allowClear",placeholder:"placeholder",idField:"idField",nameField:"nameField",descriptionField:"descriptionField",disabled:"disabled",active:"active"},outputs:{data:"data",selected:"selected",removed:"removed",typed:"typed",opened:"opened"},features:[Y([{provide:oe,useExisting:U(()=>n),multi:!0}])],decls:9,vars:5,consts:[["DefaultSelect",""],["DefaultOptions",""],[1,"ui-select-container","dropdown","open",3,"keyup","offClick"],["autocomplete","false","tabindex","-1","type","text",1,"form-control","form-control-sm","ui-select-search",3,"disabled"],[1,"ui-select-match","form-control","form-control-sm"],["role","menu",1,"ui-select-choices","dropdown-menu"],["autocomplete","false","tabindex","-1","type","text",1,"form-control","form-control-sm","ui-select-search",3,"keydown","keyup","disabled"],["tabindex","-1",1,"ui-select-toggle","no-select",2,"outline","0",3,"click"],[1,"ui-select-match-text","w-100",3,"ui-select-allow-clear"],[1,"ui-select-placeholder"],["aria-label","close","type","button",1,"btn-close"],[1,"dropdown-toggle"],[1,"ui-select-match-text","w-100"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["aria-label","close","type","button",1,"btn-close",3,"click"],["role","menuitem"],[1,"ui-select-choices-row",3,"click","mouseenter"],[1,"d-flex","align-items-center"],[1,"ui-icon","circle-primary-icon","me-2"],[3,"icon","fixedWidth"],[1,"d-flex","ms-auto","me-4","fs-xxxs","text-muted"],["href","javascript:void(0)",1,"dropdown-item","cursor-pointer",2,"padding","3px 5px"],[3,"innerHtml"],[1,"d-flex","ms-auto","fs-xxxs","text-muted",3,"innerHtml"]],template:function(t,o){if(t&1){let l=y();c(0,"div",2),h("keyup",function(E){return v(l),x(o.mainClick(E))}),_(1,"div"),f(2,Ge,1,1,"input",3)(3,Ne,6,2,"div",4),f(4,Ie,3,0,"ul",5),a(),w(5,We,7,4,"ng-template",null,0,z)(7,Ue,8,10,"ng-template",null,1,z)}t&2&&(u("offClick",o.clickedOutside),s(),b("ui-disabled",o.disabled),s(),g(o.inputMode?2:3),s(2),g(o.optionsOpened&&o.options&&o.options.length>0?4:-1))},dependencies:[be,P,ie,ye],styles:[`.ui-select-container[_ngcontent-%COMP%]{background-color:transparent;border-radius:4px}.ui-select-container.open[_ngcontent-%COMP%] > .dropdown-menu[_ngcontent-%COMP%]{display:block}.ui-select-container.open[_ngcontent-%COMP%] > a[_ngcontent-%COMP%]{outline:none}.ui-select-container[_ngcontent-%COMP%] .ui-icon[_ngcontent-%COMP%]{min-width:26px;min-height:26px;font-size:.85rem}.ui-select-container[_ngcontent-%COMP%] .ui-disabled[_ngcontent-%COMP%]{background-color:#d4dbe8;border-radius:4px;position:absolute;width:100%;height:100%;z-index:5;opacity:.6;top:0;left:0;cursor:not-allowed}.ui-select-container[_ngcontent-%COMP%] .ui-select-search[_ngcontent-%COMP%]{line-height:26px}.ui-select-container[_ngcontent-%COMP%] .ui-select-match[_ngcontent-%COMP%]{padding-left:.3rem}.ui-select-container[_ngcontent-%COMP%] .ui-select-match[_ngcontent-%COMP%] .btn[_ngcontent-%COMP%]{text-align:start!important}.ui-select-container[_ngcontent-%COMP%] .ui-select-match[_ngcontent-%COMP%] .caret[_ngcontent-%COMP%]{position:absolute;top:45%;right:15px}.ui-select-container[_ngcontent-%COMP%] .ui-select-match[_ngcontent-%COMP%] .close[_ngcontent-%COMP%]{font-size:1.6em;line-height:.75}.ui-select-container[_ngcontent-%COMP%] .ui-select-match[_ngcontent-%COMP%] .ui-select-toggle[_ngcontent-%COMP%]{display:flex;align-items:center}.ui-select-container[_ngcontent-%COMP%] .ui-select-match[_ngcontent-%COMP%] .ui-select-toggle[_ngcontent-%COMP%] > .caret[_ngcontent-%COMP%]{position:absolute;height:10px;top:50%;right:10px;margin-top:-2px}.ui-select-container[_ngcontent-%COMP%] .ui-select-match[_ngcontent-%COMP%] .ui-select-placeholder[_ngcontent-%COMP%]{float:left;line-height:26px;color:#8c8c8c;width:100%}.ui-select-container[_ngcontent-%COMP%] .ui-select-match[_ngcontent-%COMP%] .dropdown-toggle[_ngcontent-%COMP%]{cursor:pointer}.ui-select-container[_ngcontent-%COMP%] .ui-select-match[_ngcontent-%COMP%] .dropdown-toggle[_ngcontent-%COMP%]:after{display:inline-block!important}.ui-select-container[_ngcontent-%COMP%] .ui-select-choices[_ngcontent-%COMP%]{width:100%;height:auto;max-height:200px;overflow-x:hidden;margin-top:0}.ui-select-container[_ngcontent-%COMP%] .ui-select-choices[_ngcontent-%COMP%] .ui-select-choices-row[_ngcontent-%COMP%] > a[_ngcontent-%COMP%]{display:block;padding:3px 5px;clear:both;font-weight:400;line-height:1.42857143;color:#333;white-space:nowrap}.ui-select-container[_ngcontent-%COMP%] .ui-select-choices[_ngcontent-%COMP%] .ui-select-choices-row[_ngcontent-%COMP%] .active[_ngcontent-%COMP%] > a[_ngcontent-%COMP%]{text-decoration:none;outline:0}.ui-select-container[_ngcontent-%COMP%] .ui-select-choices[_ngcontent-%COMP%] .ui-select-choices-row[_ngcontent-%COMP%] .dropdown-item[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{pointer-events:none}
1
+ import{b as ye}from"./chunk-KBWK65KM.js";import{m as ve,n as xe,s as N,w as Oe}from"./chunk-O7UXVNR2.js";import{Cb as Ce,J as _e}from"./chunk-L3PDWJZ3.js";import{Aa as q,Ab as D,Bb as y,Cd as ce,Dd as le,Eb as h,Gb as p,Gd as pe,Ha as T,J as I,Kd as de,Mc as ie,N as W,Oa as s,Od as ue,Pb as F,Qa as O,Rb as b,Sb as Z,Tb as m,Ub as k,Xb as V,Yb as G,Zb as A,ab as M,af as he,cb as B,cc as J,cd as ne,da as U,db as Q,dd as oe,ec as Y,fb as w,fd as re,gc as ee,hc as te,ja as C,jd as se,kc as H,lb as f,mb as g,mc as j,mf as fe,nb as $,oa as v,oc as z,od as ae,og as P,pa as x,pb as K,qb as X,rb as u,sb as c,tb as a,ub as _,ze as me,zf as ge}from"./chunk-BJARRIS6.js";var ke=(function(i){return i[i.USER=0]="USER",i[i.PERSONAL=1]="PERSONAL",i})(ke||{}),Se=(function(i){return i[i.VISIBLE=0]="VISIBLE",i[i.PRIVATE=1]="PRIVATE",i[i.ISOLATED=2]="ISOLATED",i})(Se||{});var Xe=(()=>{let n=class n{constructor(){this.translate=C(pe)}transform(e,t=[]){let o="";if(!e)return o;for(let[l,d]of Object.entries(e).filter(([E,qe])=>t.indexOf(E)===-1))d&&(o+=`${d} ${this.translate.translate(d===1?l.slice(0,-1):l)}, `);return o.slice(0,-2)}};n.\u0275fac=function(t){return new(t||n)},n.\u0275pipe=Q({name:"joinCounts",type:n,pure:!0});let i=n;return i})();function Me(i,n){if(i&1&&(c(0,"span"),m(1),a()),i&2){let r=p();s(),k(r.group.name)}}function we(i,n){i&1&&(c(0,"span",3),m(1,"New personal group"),a())}function Pe(i,n){if(i&1&&_(0,"fa-icon",4),i&2){let r=p();u("icon",r.icons.faSpinner)}}function Ee(i,n){i&1&&(c(0,"span",3),m(1,"Edit personal group"),a())}function Te(i,n){i&1&&(c(0,"span",3),m(1,"Edit group"),a())}function De(i,n){if(i&1&&(c(0,"h4",5),f(1,Ee,2,0,"span",3)(2,Te,2,0,"span",3),a()),i&2){let r=p();s(),g(r.isPersonalGroup?1:2)}}var mt=(()=>{let n=class n{constructor(){this.groupChange=new O,this.layout=C(Ce),this.icons={GROUPS:_e.GROUPS,faSpinner:fe,faCog:he,faUsers:me,faPen:ge},this.isPersonalGroup=!0,this.submitted=!1,this.loading=!1,this.userService=C(Oe),this.user=this.userService.user}ngOnInit(){this.originalGroup?.id?(this.isPersonalGroup=this.originalGroup.isPersonalGroup,this.group=new N({id:this.originalGroup.id,name:this.originalGroup.name,description:this.originalGroup.description,createdAt:this.originalGroup.createdAt,modifiedAt:this.originalGroup.modifiedAt,type:this.originalGroup.type})):this.group=new N({id:0,name:"",description:"",createdAt:null,modifiedAt:null,type:xe.PGROUP})}onCancel(){this.layout.closeDialog()}onSubmit(){if(this.loading=!0,this.submitted=!0,this.group.id===0)this.userService.createPersonalGroup(this.makeDto(!0)).subscribe({next:e=>{this.loading=!1,this.groupChange.emit(["add",e]),this.layout.sendNotification("success","Group created",e.name),this.layout.closeDialog()},error:e=>this.onError(e)});else{let e=this.makeDto();if(!Object.keys(e).length){this.loading=!1,this.submitted=!1;return}this.userService.updatePersonalGroup(this.originalGroup.id,this.makeDto()).subscribe({next:t=>{this.loading=!1,this.groupChange.emit(["update",t]),this.layout.sendNotification("success","Group updated",t.name),this.layout.closeDialog()},error:t=>this.onError(t)})}}makeDto(e=!1){return{name:e?this.group.name:this.group.name!==this.originalGroup.name?this.group.name:void 0,description:e?this.group.description:this.group.description!==this.originalGroup.description?this.group.description:void 0}}onError(e){this.layout.sendNotification("error","Group error",this.group.name,e),this.submitted=!1,this.loading=!1}};n.\u0275fac=function(t){return new(t||n)},n.\u0275cmp=M({type:n,selectors:[["app-user-group-dialog"]],inputs:{originalGroup:"originalGroup"},outputs:{groupChange:"groupChange"},decls:23,vars:15,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"],[1,"d-flex","col-12","pb-3"],[1,"flex-fill","col-6","pe-4"],["for","name","l10nTranslate",""],["id","name","appAutofocus","","autocomplete","off","type","text",1,"form-control","form-control-sm",3,"ngModelChange","disabled","autoSelect","ngModel"],[1,"flex-fill","col-6","ps-4"],["for","description","l10nTranslate",""],["id","description","autocomplete","off","type","text",1,"form-control","form-control-sm",3,"ngModelChange","ngModel","disabled"],[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(t,o){t&1&&(c(0,"div",0)(1,"h4",1),_(2,"fa-icon",2),f(3,Me,2,1,"span")(4,we,2,0,"span",3),f(5,Pe,1,1,"fa-icon",4),a(),f(6,De,3,1,"h4",5),c(7,"button",6),h("click",function(){return o.layout.closeDialog()}),a()(),c(8,"div",7)(9,"div",8)(10,"div",9)(11,"label",10),m(12,"Name"),a(),c(13,"input",11),A("ngModelChange",function(d){return G(o.group.name,d)||(o.group.name=d),d}),a()(),c(14,"div",12)(15,"label",13),m(16,"Description"),a(),c(17,"input",14),A("ngModelChange",function(d){return G(o.group.description,d)||(o.group.description=d),d}),a()()()(),c(18,"div",15)(19,"button",16),h("click",function(){return o.onCancel()}),m(20,"Cancel"),a(),c(21,"button",17),h("click",function(){return o.onSubmit()}),m(22," Confirm "),a()()),t&2&&(s(2),u("icon",o.icons.GROUPS),s(),g(o.group.id?3:4),s(2),g(o.loading?5:-1),s(),g(o.group.id?6:-1),s(),Z(J("btn-close btn-close-white ",o.group.id?"ms-2":"ms-auto"," ms-2")),s(6),b("is-invalid",!o.group.name),u("disabled",!o.isPersonalGroup)("autoSelect",!1),V("ngModel",o.group.name),s(4),V("ngModel",o.group.description),u("disabled",!o.isPersonalGroup),s(4),u("disabled",!o.group.name||o.submitted))},dependencies:[le,re,se,ce,ae,P,de,ve],encapsulation:2});let i=n;return i})();var be=(()=>{let n=class n{onClick(e){e.stopPropagation()}ngOnInit(){setTimeout(()=>{typeof document<"u"&&document.addEventListener("click",this.offClickHandler)},0)}ngOnDestroy(){typeof document<"u"&&document.removeEventListener("click",this.offClickHandler)}};n.\u0275fac=function(t){return new(t||n)},n.\u0275dir=B({type:n,selectors:[["","offClick",""]],hostBindings:function(t,o){t&1&&h("click",function(d){return o.onClick(d)})},inputs:{offClickHandler:[0,"offClick","offClickHandler"]}});let i=n;return i})();var S=class{constructor(n){typeof n=="string"&&(this.id=this.name=n,this.description=""),typeof n=="object"&&(this.id=n.id||n.name,this.name=n.name,this.description=n.description||"")}};var Fe=i=>({active:i}),Ve=(i,n)=>({o:i,i:n});function Ge(i,n){if(i&1){let r=y();c(0,"input",6),h("keydown",function(t){v(r);let o=p();return x(o.inputEvent(t))})("keyup",function(t){v(r);let o=p();return x(o.inputEvent(t,!0))}),a()}if(i&2){let r=p();u("disabled",r.disabled)}}function Ae(i,n){i&1&&D(0)}function He(i,n){if(i&1&&(c(0,"span",12),w(1,Ae,1,0,"ng-container",13),a()),i&2){let r=p(2),e=F(6);b("ui-select-allow-clear",r.allowClear&&r.active),s(),u("ngTemplateOutlet",r.customTemplateSelect||e)("ngTemplateOutletContext",ee(4,Fe,r.active))}}function je(i,n){if(i&1&&(c(0,"span",9),m(1),a()),i&2){let r=p(2);s(),k(r.placeholder)}}function ze(i,n){if(i&1){let r=y();c(0,"button",14),h("click",function(t){v(r);let o=p(2);return x(o.removeClick(o.active,t))}),a()}}function Ne(i,n){if(i&1){let r=y();c(0,"div",4)(1,"span",7),h("click",function(t){v(r);let o=p();return x(o.matchClick(t))}),f(2,He,2,6,"span",8)(3,je,2,1,"span",9),f(4,ze,1,0,"button",10),_(5,"i",11),a()()}if(i&2){let r=p();s(2),g(r.active?2:3),s(2),g(r.allowClear&&r.active?4:-1)}}function Le(i,n){i&1&&D(0)}function Re(i,n){if(i&1){let r=y();c(0,"li",15)(1,"div",16),h("click",function(t){let o=v(r).$implicit,l=p(2);return x(l.selectMatch(o,t))})("mouseenter",function(){let t=v(r).$implicit,o=p(2);return x(o.selectActive(t))}),w(2,Le,1,0,"ng-container",13),a()()}if(i&2){let r=n.$implicit,e=p(2),t=F(8);s(),b("active",e.isActive(r)),s(),u("ngTemplateOutlet",e.customTemplateOptions||t)("ngTemplateOutletContext",te(4,Ve,r,e.inputValue))}}function Ie(i,n){if(i&1&&(c(0,"ul",5),K(1,Re,3,7,"li",15,$),a()),i&2){let r=p();s(),X(r.options)}}function We(i,n){if(i&1&&(c(0,"div",17)(1,"span",18),_(2,"fa-icon",19),a(),c(3,"span"),m(4),a(),c(5,"div",20),m(6),a()()),i&2){let r=n.active,e=p();s(2),u("icon",e.itemIcon)("fixedWidth",!1),s(2),k(r.name),s(2),k(r.description)}}function Ue(i,n){if(i&1&&(c(0,"a",21)(1,"div",17)(2,"span",18),_(3,"fa-icon",19),a(),_(4,"span",22),H(5,"highlight"),_(6,"span",23),H(7,"highlight"),a()()),i&2){let r=n.i,e=n.o,t=p();s(3),u("icon",t.itemIcon)("fixedWidth",!1),s(),u("innerHtml",t.sanitize(j(5,4,e.name,r)),T),s(2),u("innerHtml",t.sanitize(j(7,7,e.description,r)),T)}}var Tt=(()=>{let n=class n{constructor(){this.element=C(q),this.itemIcon=ue,this.allowClear=!0,this.placeholder="",this.idField="id",this.nameField="name",this.descriptionField="description",this.data=new O,this.selected=new O,this.removed=new O,this.typed=new O,this.opened=new O,this.options=[],this.itemObjects=[],this.inputMode=!1,this.inputValue="",this.onChange=Function.prototype,this.onTouched=Function.prototype,this.sanitizer=C(ne),this._items=[],this._optionsOpened=!1,this._disabled=!1,this._active=null,this.clickedOutside=this.clickedOutside.bind(this)}set items(e){if(!e.length){this._items=this.itemObjects=[],this.itemObjects=[];return}this._items=e.filter(t=>{if(typeof t=="string"||typeof t=="object"&&t&&t[this.nameField]&&t[this.idField])return t}),this.itemObjects=this._items.map(t=>typeof t=="string"?new S(t):new S({id:t[this.idField],name:t[this.nameField],description:t[this.descriptionField]}))}get optionsOpened(){return this._optionsOpened}set optionsOpened(e){this._optionsOpened=e,this.opened.emit(e)}get disabled(){return this._disabled}set disabled(e){this._disabled=e,this._disabled===!0&&this.hideOptions()}get active(){return this._active}set active(e){e?this._active=typeof e=="string"?e:new S({id:e[this.idField],name:e[this.nameField],description:e[this.descriptionField]}):this._active=null}sanitize(e){return this.sanitizer.bypassSecurityTrustHtml(e)}inputEvent(e,t=!1){if(e.keyCode===9)return;if(t&&(e.keyCode===37||e.keyCode===39||e.keyCode===38||e.keyCode===40||e.keyCode===13)){e.preventDefault();return}if(!t&&e.keyCode===8){let l=this.element.nativeElement.querySelector("div.ui-select-container > input");(!l.value||l.value.length<=0)&&(this.active&&this.remove(this.active),e.preventDefault())}if(!t&&e.keyCode===27){this.hideOptions(),e.preventDefault();return}if(!t&&e.keyCode===46&&(this.active&&this.remove(this.active),e.preventDefault()),!t&&e.keyCode===37&&this._items.length>0){this.behavior.first(),e.preventDefault();return}if(!t&&e.keyCode===39&&this._items.length>0){this.behavior.last(),e.preventDefault();return}if(!t&&e.keyCode===38){this.behavior.prev(),e.preventDefault();return}if(!t&&e.keyCode===40){this.behavior.next(),e.preventDefault();return}if(!t&&e.keyCode===13){(!this.active||this.active.id!==this.activeOption.id)&&(this.selectActiveMatch(),this.behavior.next()),e.preventDefault();return}let o=e.target||e.srcElement;o?(this.inputValue=o.value,this.doEvent("typed",this.inputValue||" ")):this.open()}ngOnInit(){this.subscription=this.typed.asObservable().pipe(I(200),W()).subscribe(e=>this.doSearch(e)),this.behavior=new R(this),this.doEvent("typed"," ")}ngOnDestroy(){this.subscription.unsubscribe()}remove(e){this._disabled!==!0&&(this.active=null,this.data.next(this.active),this.doEvent("removed",e),this.inputValue="",this.doEvent("typed"," "))}doEvent(e,t){this[e]&&t&&this[e].next(t),this.onTouched(),(e==="selected"||e==="removed")&&this.onChange(this.active)}clickedOutside(){this.inputMode=!1,this.optionsOpened=!1}writeValue(e){this.active=e,this.data.emit(this.active)}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouched=e}matchClick(e){this._disabled!==!0&&(this.inputMode=!this.inputMode,this.inputMode===!0&&(this.focusToInput(),this.open()))}mainClick(e){if(this.inputMode===!0||this._disabled===!0)return;if(e.keyCode===46){e.preventDefault(),this.inputEvent(e);return}if(e.keyCode===8){e.preventDefault(),this.inputEvent(e,!0);return}if(e.keyCode===9||e.keyCode===13||e.keyCode===27||e.keyCode>=37&&e.keyCode<=40){e.preventDefault();return}this.inputMode=!0;let t=String.fromCharCode(96<=e.keyCode&&e.keyCode<=105?e.keyCode-48:e.keyCode).toLowerCase();this.focusToInput(t),this.open();let o=e.target||e.srcElement;o.value=t,this.inputEvent(e)}selectActive(e){this.activeOption=e}isActive(e){return this.activeOption.id===e.id}removeClick(e,t){t.stopPropagation(),this.remove(e)}focusToInput(e=""){setTimeout(()=>{let t=this.element.nativeElement.querySelector("div.ui-select-container > input");t&&(t.focus(),t.value=e)},0)}selectMatch(e,t=void 0){t&&(t.stopPropagation(),t.preventDefault()),!(this.options.length<=0)&&(this.active=e,this.data.next(this.active),this.doEvent("selected",e),this.hideOptions(),this.focusToInput(e.name),this.element.nativeElement.querySelector(".ui-select-container").focus())}doSearch(e){this.searchFunction(e).subscribe({next:t=>{this.items=t},error:t=>{console.error(t),this.items=[]},complete:()=>this.behavior.filter()})}open(){this.options=this.itemObjects,this.options.length>0&&this.behavior.first(),this.optionsOpened=!0}hideOptions(){this.inputMode=!1,this.optionsOpened=!1}selectActiveMatch(){this.selectMatch(this.activeOption)}};n.\u0275fac=function(t){return new(t||n)},n.\u0275cmp=M({type:n,selectors:[["app-select"]],inputs:{searchFunction:"searchFunction",customTemplateOptions:"customTemplateOptions",customTemplateSelect:"customTemplateSelect",itemIcon:"itemIcon",allowClear:"allowClear",placeholder:"placeholder",idField:"idField",nameField:"nameField",descriptionField:"descriptionField",disabled:"disabled",active:"active"},outputs:{data:"data",selected:"selected",removed:"removed",typed:"typed",opened:"opened"},features:[Y([{provide:oe,useExisting:U(()=>n),multi:!0}])],decls:9,vars:5,consts:[["DefaultSelect",""],["DefaultOptions",""],[1,"ui-select-container","dropdown","open",3,"keyup","offClick"],["autocomplete","false","tabindex","-1","type","text",1,"form-control","form-control-sm","ui-select-search",3,"disabled"],[1,"ui-select-match","form-control","form-control-sm"],["role","menu",1,"ui-select-choices","dropdown-menu"],["autocomplete","false","tabindex","-1","type","text",1,"form-control","form-control-sm","ui-select-search",3,"keydown","keyup","disabled"],["tabindex","-1",1,"ui-select-toggle","no-select",2,"outline","0",3,"click"],[1,"ui-select-match-text","w-100",3,"ui-select-allow-clear"],[1,"ui-select-placeholder"],["aria-label","close","type","button",1,"btn-close"],[1,"dropdown-toggle"],[1,"ui-select-match-text","w-100"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["aria-label","close","type","button",1,"btn-close",3,"click"],["role","menuitem"],[1,"ui-select-choices-row",3,"click","mouseenter"],[1,"d-flex","align-items-center"],[1,"ui-icon","circle-primary-icon","me-2"],[3,"icon","fixedWidth"],[1,"d-flex","ms-auto","me-4","fs-xxxs","text-muted"],["href","javascript:void(0)",1,"dropdown-item","cursor-pointer",2,"padding","3px 5px"],[3,"innerHtml"],[1,"d-flex","ms-auto","fs-xxxs","text-muted",3,"innerHtml"]],template:function(t,o){if(t&1){let l=y();c(0,"div",2),h("keyup",function(E){return v(l),x(o.mainClick(E))}),_(1,"div"),f(2,Ge,1,1,"input",3)(3,Ne,6,2,"div",4),f(4,Ie,3,0,"ul",5),a(),w(5,We,7,4,"ng-template",null,0,z)(7,Ue,8,10,"ng-template",null,1,z)}t&2&&(u("offClick",o.clickedOutside),s(),b("ui-disabled",o.disabled),s(),g(o.inputMode?2:3),s(2),g(o.optionsOpened&&o.options&&o.options.length>0?4:-1))},dependencies:[be,P,ie,ye],styles:[`.ui-select-container[_ngcontent-%COMP%]{background-color:transparent;border-radius:4px}.ui-select-container.open[_ngcontent-%COMP%] > .dropdown-menu[_ngcontent-%COMP%]{display:block}.ui-select-container.open[_ngcontent-%COMP%] > a[_ngcontent-%COMP%]{outline:none}.ui-select-container[_ngcontent-%COMP%] .ui-icon[_ngcontent-%COMP%]{min-width:26px;min-height:26px;font-size:.85rem}.ui-select-container[_ngcontent-%COMP%] .ui-disabled[_ngcontent-%COMP%]{background-color:#d4dbe8;border-radius:4px;position:absolute;width:100%;height:100%;z-index:5;opacity:.6;top:0;left:0;cursor:not-allowed}.ui-select-container[_ngcontent-%COMP%] .ui-select-search[_ngcontent-%COMP%]{line-height:26px}.ui-select-container[_ngcontent-%COMP%] .ui-select-match[_ngcontent-%COMP%]{padding-left:.3rem}.ui-select-container[_ngcontent-%COMP%] .ui-select-match[_ngcontent-%COMP%] .btn[_ngcontent-%COMP%]{text-align:start!important}.ui-select-container[_ngcontent-%COMP%] .ui-select-match[_ngcontent-%COMP%] .caret[_ngcontent-%COMP%]{position:absolute;top:45%;right:15px}.ui-select-container[_ngcontent-%COMP%] .ui-select-match[_ngcontent-%COMP%] .close[_ngcontent-%COMP%]{font-size:1.6em;line-height:.75}.ui-select-container[_ngcontent-%COMP%] .ui-select-match[_ngcontent-%COMP%] .ui-select-toggle[_ngcontent-%COMP%]{display:flex;align-items:center}.ui-select-container[_ngcontent-%COMP%] .ui-select-match[_ngcontent-%COMP%] .ui-select-toggle[_ngcontent-%COMP%] > .caret[_ngcontent-%COMP%]{position:absolute;height:10px;top:50%;right:10px;margin-top:-2px}.ui-select-container[_ngcontent-%COMP%] .ui-select-match[_ngcontent-%COMP%] .ui-select-placeholder[_ngcontent-%COMP%]{float:left;line-height:26px;color:#8c8c8c;width:100%}.ui-select-container[_ngcontent-%COMP%] .ui-select-match[_ngcontent-%COMP%] .dropdown-toggle[_ngcontent-%COMP%]{cursor:pointer}.ui-select-container[_ngcontent-%COMP%] .ui-select-match[_ngcontent-%COMP%] .dropdown-toggle[_ngcontent-%COMP%]:after{display:inline-block!important}.ui-select-container[_ngcontent-%COMP%] .ui-select-choices[_ngcontent-%COMP%]{width:100%;height:auto;max-height:200px;overflow-x:hidden;margin-top:0}.ui-select-container[_ngcontent-%COMP%] .ui-select-choices[_ngcontent-%COMP%] .ui-select-choices-row[_ngcontent-%COMP%] > a[_ngcontent-%COMP%]{display:block;padding:3px 5px;clear:both;font-weight:400;line-height:1.42857143;color:#333;white-space:nowrap}.ui-select-container[_ngcontent-%COMP%] .ui-select-choices[_ngcontent-%COMP%] .ui-select-choices-row[_ngcontent-%COMP%] .active[_ngcontent-%COMP%] > a[_ngcontent-%COMP%]{text-decoration:none;outline:0}.ui-select-container[_ngcontent-%COMP%] .ui-select-choices[_ngcontent-%COMP%] .ui-select-choices-row[_ngcontent-%COMP%] .dropdown-item[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{pointer-events:none}
2
2
 
3
3
 
4
4
 
@@ -1 +1 @@
1
- import{Je as d,Rd as r,Rf as C,Sf as a,Xe as R,df as i,dg as c,if as t,uf as E}from"./chunk-IOIBQGHN.js";var e=(function(o){return o.LOCAL="local",o.REMOTE="remote",o})(e||{}),f={[e.LOCAL]:"circle-purple-icon-sm",[e.REMOTE]:"circle-primary-icon-sm"},p={[e.LOCAL]:c,[e.REMOTE]:i},n={NEW:"Added",DIFF:"Modified",RM:"Removed",RMDIR:"Removed",MOVE:"Moved",COPY:"Copied",MKDIR:"Added",MKFILE:"Added",FILTERED:"Filtered",ERROR:"Error"},O={Added:C,Modified:d,Removed:E,Moved:t,Copied:a,Filtered:r,Error:R};export{e as a,f as b,p as c,n as d,O as e};
1
+ import{Je as d,Rd as r,Rf as C,Sf as a,Xe as R,df as i,dg as c,if as t,uf as E}from"./chunk-BJARRIS6.js";var e=(function(o){return o.LOCAL="local",o.REMOTE="remote",o})(e||{}),f={[e.LOCAL]:"circle-purple-icon-sm",[e.REMOTE]:"circle-primary-icon-sm"},p={[e.LOCAL]:c,[e.REMOTE]:i},n={NEW:"Added",DIFF:"Modified",RM:"Removed",RMDIR:"Removed",MOVE:"Moved",COPY:"Copied",MKDIR:"Added",MKFILE:"Added",FILTERED:"Filtered",ERROR:"Error"},O={Added:C,Modified:d,Removed:E,Moved:t,Copied:a,Filtered:r,Error:R};export{e as a,f as b,p as c,n as d,O as e};
@@ -1 +1 @@
1
- import{d as F,f as y,p as _,u as b}from"./chunk-I2S3XPC5.js";import{Aa as l,Ac as v,E as D,Eb as w,Gc as P,Hb as N,Ib as L,Qa as p,Rb as C,Ta as k,Wa as u,Xa as o,Ya as g,ab as I,bb as O,cb as f,ea as m,ec as E,fa as M,gc as H,kb as A,rb as S,sb as R,tb as j}from"./chunk-IOIBQGHN.js";var U=["*"],V=s=>({dropdown:s}),B=(()=>{let t=class t{constructor(){this.autoClose=!0,this.insideClick=!1,this.isAnimated=!1,this.stopOnClickPropagation=!1}};t.\u0275fac=function(i){return new(i||t)},t.\u0275prov=m({token:t,factory:t.\u0275fac,providedIn:"root"});let s=t;return s})(),c=(()=>{let t=class t{constructor(){this.direction="down",this.autoClose=!0,this.insideClick=!1,this.isAnimated=!1,this.stopOnClickPropagation=!1,this.isOpenChange=new p,this.isDisabledChange=new p,this.toggleClick=new p,this.counts=0,this.dropdownMenu=new Promise(e=>{this.resolveDropdownMenu=e})}};t.\u0275fac=function(i){return new(i||t)},t.\u0275prov=m({token:t,factory:t.\u0275fac,providedIn:"platform"});let s=t;return s})(),K="220ms cubic-bezier(0, 0, 0.2, 1)",T=[y({height:0,overflow:"hidden"}),F(K,y({height:"*",overflow:"hidden"}))],q=(()=>{let t=class t{get direction(){return this._state.direction}constructor(e,i,n,d,a){this._state=e,this.cd=i,this._renderer=n,this._element=d,this.isOpen=!1,this._factoryDropDownAnimation=a.build(T),this._subscription=e.isOpenChange.subscribe(h=>{this.isOpen=h;let r=this._element.nativeElement.querySelector(".dropdown-menu");this._renderer.addClass(this._element.nativeElement.querySelector("div"),"open"),r&&(this._renderer.addClass(r,"show"),(r.classList.contains("dropdown-menu-right")||r.classList.contains("dropdown-menu-end"))&&(this._renderer.setStyle(r,"left","auto"),this._renderer.setStyle(r,"right","0")),this.direction==="up"&&(this._renderer.setStyle(r,"top","auto"),this._renderer.setStyle(r,"transform","translateY(-101%)"))),r&&this._state.isAnimated&&this._factoryDropDownAnimation.create(r).play(),this.cd.markForCheck(),this.cd.detectChanges()})}_contains(e){return this._element.nativeElement.contains(e)}ngOnDestroy(){this._subscription.unsubscribe()}};t.\u0275fac=function(i){return new(i||t)(o(c),o(v),o(u),o(l),o(b))},t.\u0275cmp=I({type:t,selectors:[["bs-dropdown-container"]],hostAttrs:[2,"display","block","position","absolute","z-index","1040"],ngContentSelectors:U,decls:2,vars:9,consts:[[3,"ngClass"]],template:function(i,n){i&1&&(N(),R(0,"div",0),L(1),j()),i&2&&(C("dropup",n.direction==="up")("show",n.isOpen)("open",n.isOpen),S("ngClass",H(7,V,n.direction==="down")))},dependencies:[P],encapsulation:2,changeDetection:0});let s=t;return s})(),Y=(()=>{let t=class t{set autoClose(e){this._state.autoClose=e}get autoClose(){return this._state.autoClose}set isAnimated(e){this._state.isAnimated=e}get isAnimated(){return this._state.isAnimated}set insideClick(e){this._state.insideClick=e}get insideClick(){return this._state.insideClick}set isDisabled(e){this._isDisabled=e,this._state.isDisabledChange.emit(e),e&&this.hide()}get isDisabled(){return this._isDisabled}get isOpen(){return this._showInline?this._isInlineOpen:this._dropdown.isShown}set isOpen(e){e?this.show():this.hide()}get _showInline(){return!this.container}constructor(e,i,n,d,a,h,r){this._elementRef=e,this._renderer=i,this._viewContainerRef=n,this._cis=d,this._state=a,this._config=h,this.dropup=!1,this._isInlineOpen=!1,this._isDisabled=!1,this._subscriptions=[],this._isInited=!1,this._state.autoClose=this._config.autoClose,this._state.insideClick=this._config.insideClick,this._state.isAnimated=this._config.isAnimated,this._state.stopOnClickPropagation=this._config.stopOnClickPropagation,this._factoryDropDownAnimation=r.build(T),this._dropdown=this._cis.createLoader(this._elementRef,this._viewContainerRef,this._renderer).provide({provide:c,useValue:this._state}),this.onShown=this._dropdown.onShown,this.onHidden=this._dropdown.onHidden,this.isOpenChange=this._state.isOpenChange}ngOnInit(){this._isInited||(this._isInited=!0,this._dropdown.listen({outsideClick:!1,triggers:this.triggers,show:()=>this.show()}),this._subscriptions.push(this._state.toggleClick.subscribe(e=>this.toggle(e))),this._subscriptions.push(this._state.isDisabledChange.pipe(D(e=>e)).subscribe(()=>this.hide())))}show(){if(!(this.isOpen||this.isDisabled)){if(this._showInline){this._inlinedMenu||this._state.dropdownMenu.then(e=>{this._dropdown.attachInline(e.viewContainer,e.templateRef),this._inlinedMenu=this._dropdown._inlineViewRef,this.addBs4Polyfills(),this._inlinedMenu&&this._renderer.addClass(this._inlinedMenu.rootNodes[0].parentNode,"open"),this.playAnimation()}).catch(),this.addBs4Polyfills(),this._isInlineOpen=!0,this.onShown.emit(!0),this._state.isOpenChange.emit(!0),this.playAnimation();return}this._state.dropdownMenu.then(e=>{let i=this.dropup||typeof this.dropup<"u"&&this.dropup;this._state.direction=i?"up":"down";let n=this.placement||(i?"top start":"bottom start");this._dropdown.attach(q).to(this.container).position({attachment:n}).show({content:e.templateRef,placement:n}),this._state.isOpenChange.emit(!0)}).catch()}}hide(){this.isOpen&&(this._showInline?(this.removeShowClass(),this.removeDropupStyles(),this._isInlineOpen=!1,this.onHidden.emit(!0)):this._dropdown.hide(),this._state.isOpenChange.emit(!1))}toggle(e){return this.isOpen||!e?this.hide():this.show()}_contains(e){return this._elementRef.nativeElement.contains(e.target)||this._dropdown.instance&&this._dropdown.instance._contains(e.target)}navigationClick(e){let i=this._elementRef.nativeElement.querySelector(".dropdown-menu");if(!i)return;let n=this._elementRef.nativeElement.ownerDocument.activeElement,d=i.querySelectorAll(".dropdown-item");switch(e.keyCode){case 38:this._state.counts>0&&d[--this._state.counts].focus();break;case 40:this._state.counts+1<d.length&&(n.classList!==d[this._state.counts].classList?d[this._state.counts].focus():d[++this._state.counts].focus());break;default:}e.preventDefault()}ngOnDestroy(){for(let e of this._subscriptions)e.unsubscribe();this._dropdown.dispose()}addBs4Polyfills(){this.addShowClass(),this.checkRightAlignment(),this.addDropupStyles()}playAnimation(){this._state.isAnimated&&this._inlinedMenu&&setTimeout(()=>{this._inlinedMenu&&this._factoryDropDownAnimation.create(this._inlinedMenu.rootNodes[0]).play()})}addShowClass(){this._inlinedMenu&&this._inlinedMenu.rootNodes[0]&&this._renderer.addClass(this._inlinedMenu.rootNodes[0],"show")}removeShowClass(){this._inlinedMenu&&this._inlinedMenu.rootNodes[0]&&this._renderer.removeClass(this._inlinedMenu.rootNodes[0],"show")}checkRightAlignment(){if(this._inlinedMenu&&this._inlinedMenu.rootNodes[0]){let e=this._inlinedMenu.rootNodes[0].classList.contains("dropdown-menu-right")||this._inlinedMenu.rootNodes[0].classList.contains("dropdown-menu-end");this._renderer.setStyle(this._inlinedMenu.rootNodes[0],"left",e?"auto":"0"),this._renderer.setStyle(this._inlinedMenu.rootNodes[0],"right",e?"0":"auto")}}addDropupStyles(){this._inlinedMenu&&this._inlinedMenu.rootNodes[0]&&(this._renderer.setStyle(this._inlinedMenu.rootNodes[0],"top",this.dropup?"auto":"100%"),this._renderer.setStyle(this._inlinedMenu.rootNodes[0],"transform",this.dropup?"translateY(-101%)":"translateY(0)"),this._renderer.setStyle(this._inlinedMenu.rootNodes[0],"bottom","auto"))}removeDropupStyles(){this._inlinedMenu&&this._inlinedMenu.rootNodes[0]&&(this._renderer.removeStyle(this._inlinedMenu.rootNodes[0],"top"),this._renderer.removeStyle(this._inlinedMenu.rootNodes[0],"transform"),this._renderer.removeStyle(this._inlinedMenu.rootNodes[0],"bottom"))}};t.\u0275fac=function(i){return new(i||t)(o(l),o(u),o(g),o(_),o(c),o(B),o(b))},t.\u0275dir=f({type:t,selectors:[["","bsDropdown",""],["","dropdown",""]],hostVars:6,hostBindings:function(i,n){i&1&&w("keydown.arrowDown",function(a){return n.navigationClick(a)})("keydown.arrowUp",function(a){return n.navigationClick(a)}),i&2&&C("dropup",n.dropup)("open",n.isOpen)("show",n.isOpen)},inputs:{placement:"placement",triggers:"triggers",container:"container",dropup:"dropup",autoClose:"autoClose",isAnimated:"isAnimated",insideClick:"insideClick",isDisabled:"isDisabled",isOpen:"isOpen"},outputs:{isOpenChange:"isOpenChange",onShown:"onShown",onHidden:"onHidden"},exportAs:["bs-dropdown"],features:[E([c,_,B])]});let s=t;return s})(),ae=(()=>{let t=class t{constructor(e,i,n){e.resolveDropdownMenu({templateRef:n,viewContainer:i})}};t.\u0275fac=function(i){return new(i||t)(o(c),o(g),o(k))},t.\u0275dir=f({type:t,selectors:[["","bsDropdownMenu",""],["","dropdownMenu",""]],exportAs:["bs-dropdown-menu"]});let s=t;return s})(),he=(()=>{let t=class t{constructor(e,i,n,d,a){this._changeDetectorRef=e,this._dropdown=i,this._element=n,this._renderer=d,this._state=a,this.isOpen=!1,this._subscriptions=[],this._subscriptions.push(this._state.isOpenChange.subscribe(h=>{this.isOpen=h,h?(this._documentClickListener=this._renderer.listen("document","click",r=>{this._state.autoClose&&r.button!==2&&!this._element.nativeElement.contains(r.target)&&!(this._state.insideClick&&this._dropdown._contains(r))&&(this._state.toggleClick.emit(!1),this._changeDetectorRef.detectChanges())}),this._escKeyUpListener=this._renderer.listen(this._element.nativeElement,"keyup.esc",()=>{this._state.autoClose&&(this._state.toggleClick.emit(!1),this._changeDetectorRef.detectChanges())})):(this._documentClickListener&&this._documentClickListener(),this._escKeyUpListener&&this._escKeyUpListener())})),this._subscriptions.push(this._state.isDisabledChange.subscribe(h=>this.isDisabled=h||void 0))}onClick(e){this._state.stopOnClickPropagation&&e.stopPropagation(),!this.isDisabled&&this._state.toggleClick.emit(!0)}ngOnDestroy(){this._documentClickListener&&this._documentClickListener(),this._escKeyUpListener&&this._escKeyUpListener();for(let e of this._subscriptions)e.unsubscribe()}};t.\u0275fac=function(i){return new(i||t)(o(v),o(Y),o(l),o(u),o(c))},t.\u0275dir=f({type:t,selectors:[["","bsDropdownToggle",""],["","dropdownToggle",""]],hostVars:3,hostBindings:function(i,n){i&1&&w("click",function(a){return n.onClick(a)}),i&2&&A("aria-haspopup",!0)("disabled",n.isDisabled)("aria-expanded",n.isOpen)},exportAs:["bs-dropdown-toggle"]});let s=t;return s})(),ce=(()=>{let t=class t{static forRoot(){return{ngModule:t,providers:[]}}};t.\u0275fac=function(i){return new(i||t)},t.\u0275mod=O({type:t}),t.\u0275inj=M({});let s=t;return s})();export{Y as a,ae as b,he as c,ce as d};
1
+ import{d as F,f as y,p as _,u as b}from"./chunk-L3PDWJZ3.js";import{Aa as l,Ac as v,E as D,Eb as w,Gc as P,Hb as N,Ib as L,Qa as p,Rb as C,Ta as k,Wa as u,Xa as o,Ya as g,ab as I,bb as O,cb as f,ea as m,ec as E,fa as M,gc as H,kb as A,rb as S,sb as R,tb as j}from"./chunk-BJARRIS6.js";var U=["*"],V=s=>({dropdown:s}),B=(()=>{let t=class t{constructor(){this.autoClose=!0,this.insideClick=!1,this.isAnimated=!1,this.stopOnClickPropagation=!1}};t.\u0275fac=function(i){return new(i||t)},t.\u0275prov=m({token:t,factory:t.\u0275fac,providedIn:"root"});let s=t;return s})(),c=(()=>{let t=class t{constructor(){this.direction="down",this.autoClose=!0,this.insideClick=!1,this.isAnimated=!1,this.stopOnClickPropagation=!1,this.isOpenChange=new p,this.isDisabledChange=new p,this.toggleClick=new p,this.counts=0,this.dropdownMenu=new Promise(e=>{this.resolveDropdownMenu=e})}};t.\u0275fac=function(i){return new(i||t)},t.\u0275prov=m({token:t,factory:t.\u0275fac,providedIn:"platform"});let s=t;return s})(),K="220ms cubic-bezier(0, 0, 0.2, 1)",T=[y({height:0,overflow:"hidden"}),F(K,y({height:"*",overflow:"hidden"}))],q=(()=>{let t=class t{get direction(){return this._state.direction}constructor(e,i,n,d,a){this._state=e,this.cd=i,this._renderer=n,this._element=d,this.isOpen=!1,this._factoryDropDownAnimation=a.build(T),this._subscription=e.isOpenChange.subscribe(h=>{this.isOpen=h;let r=this._element.nativeElement.querySelector(".dropdown-menu");this._renderer.addClass(this._element.nativeElement.querySelector("div"),"open"),r&&(this._renderer.addClass(r,"show"),(r.classList.contains("dropdown-menu-right")||r.classList.contains("dropdown-menu-end"))&&(this._renderer.setStyle(r,"left","auto"),this._renderer.setStyle(r,"right","0")),this.direction==="up"&&(this._renderer.setStyle(r,"top","auto"),this._renderer.setStyle(r,"transform","translateY(-101%)"))),r&&this._state.isAnimated&&this._factoryDropDownAnimation.create(r).play(),this.cd.markForCheck(),this.cd.detectChanges()})}_contains(e){return this._element.nativeElement.contains(e)}ngOnDestroy(){this._subscription.unsubscribe()}};t.\u0275fac=function(i){return new(i||t)(o(c),o(v),o(u),o(l),o(b))},t.\u0275cmp=I({type:t,selectors:[["bs-dropdown-container"]],hostAttrs:[2,"display","block","position","absolute","z-index","1040"],ngContentSelectors:U,decls:2,vars:9,consts:[[3,"ngClass"]],template:function(i,n){i&1&&(N(),R(0,"div",0),L(1),j()),i&2&&(C("dropup",n.direction==="up")("show",n.isOpen)("open",n.isOpen),S("ngClass",H(7,V,n.direction==="down")))},dependencies:[P],encapsulation:2,changeDetection:0});let s=t;return s})(),Y=(()=>{let t=class t{set autoClose(e){this._state.autoClose=e}get autoClose(){return this._state.autoClose}set isAnimated(e){this._state.isAnimated=e}get isAnimated(){return this._state.isAnimated}set insideClick(e){this._state.insideClick=e}get insideClick(){return this._state.insideClick}set isDisabled(e){this._isDisabled=e,this._state.isDisabledChange.emit(e),e&&this.hide()}get isDisabled(){return this._isDisabled}get isOpen(){return this._showInline?this._isInlineOpen:this._dropdown.isShown}set isOpen(e){e?this.show():this.hide()}get _showInline(){return!this.container}constructor(e,i,n,d,a,h,r){this._elementRef=e,this._renderer=i,this._viewContainerRef=n,this._cis=d,this._state=a,this._config=h,this.dropup=!1,this._isInlineOpen=!1,this._isDisabled=!1,this._subscriptions=[],this._isInited=!1,this._state.autoClose=this._config.autoClose,this._state.insideClick=this._config.insideClick,this._state.isAnimated=this._config.isAnimated,this._state.stopOnClickPropagation=this._config.stopOnClickPropagation,this._factoryDropDownAnimation=r.build(T),this._dropdown=this._cis.createLoader(this._elementRef,this._viewContainerRef,this._renderer).provide({provide:c,useValue:this._state}),this.onShown=this._dropdown.onShown,this.onHidden=this._dropdown.onHidden,this.isOpenChange=this._state.isOpenChange}ngOnInit(){this._isInited||(this._isInited=!0,this._dropdown.listen({outsideClick:!1,triggers:this.triggers,show:()=>this.show()}),this._subscriptions.push(this._state.toggleClick.subscribe(e=>this.toggle(e))),this._subscriptions.push(this._state.isDisabledChange.pipe(D(e=>e)).subscribe(()=>this.hide())))}show(){if(!(this.isOpen||this.isDisabled)){if(this._showInline){this._inlinedMenu||this._state.dropdownMenu.then(e=>{this._dropdown.attachInline(e.viewContainer,e.templateRef),this._inlinedMenu=this._dropdown._inlineViewRef,this.addBs4Polyfills(),this._inlinedMenu&&this._renderer.addClass(this._inlinedMenu.rootNodes[0].parentNode,"open"),this.playAnimation()}).catch(),this.addBs4Polyfills(),this._isInlineOpen=!0,this.onShown.emit(!0),this._state.isOpenChange.emit(!0),this.playAnimation();return}this._state.dropdownMenu.then(e=>{let i=this.dropup||typeof this.dropup<"u"&&this.dropup;this._state.direction=i?"up":"down";let n=this.placement||(i?"top start":"bottom start");this._dropdown.attach(q).to(this.container).position({attachment:n}).show({content:e.templateRef,placement:n}),this._state.isOpenChange.emit(!0)}).catch()}}hide(){this.isOpen&&(this._showInline?(this.removeShowClass(),this.removeDropupStyles(),this._isInlineOpen=!1,this.onHidden.emit(!0)):this._dropdown.hide(),this._state.isOpenChange.emit(!1))}toggle(e){return this.isOpen||!e?this.hide():this.show()}_contains(e){return this._elementRef.nativeElement.contains(e.target)||this._dropdown.instance&&this._dropdown.instance._contains(e.target)}navigationClick(e){let i=this._elementRef.nativeElement.querySelector(".dropdown-menu");if(!i)return;let n=this._elementRef.nativeElement.ownerDocument.activeElement,d=i.querySelectorAll(".dropdown-item");switch(e.keyCode){case 38:this._state.counts>0&&d[--this._state.counts].focus();break;case 40:this._state.counts+1<d.length&&(n.classList!==d[this._state.counts].classList?d[this._state.counts].focus():d[++this._state.counts].focus());break;default:}e.preventDefault()}ngOnDestroy(){for(let e of this._subscriptions)e.unsubscribe();this._dropdown.dispose()}addBs4Polyfills(){this.addShowClass(),this.checkRightAlignment(),this.addDropupStyles()}playAnimation(){this._state.isAnimated&&this._inlinedMenu&&setTimeout(()=>{this._inlinedMenu&&this._factoryDropDownAnimation.create(this._inlinedMenu.rootNodes[0]).play()})}addShowClass(){this._inlinedMenu&&this._inlinedMenu.rootNodes[0]&&this._renderer.addClass(this._inlinedMenu.rootNodes[0],"show")}removeShowClass(){this._inlinedMenu&&this._inlinedMenu.rootNodes[0]&&this._renderer.removeClass(this._inlinedMenu.rootNodes[0],"show")}checkRightAlignment(){if(this._inlinedMenu&&this._inlinedMenu.rootNodes[0]){let e=this._inlinedMenu.rootNodes[0].classList.contains("dropdown-menu-right")||this._inlinedMenu.rootNodes[0].classList.contains("dropdown-menu-end");this._renderer.setStyle(this._inlinedMenu.rootNodes[0],"left",e?"auto":"0"),this._renderer.setStyle(this._inlinedMenu.rootNodes[0],"right",e?"0":"auto")}}addDropupStyles(){this._inlinedMenu&&this._inlinedMenu.rootNodes[0]&&(this._renderer.setStyle(this._inlinedMenu.rootNodes[0],"top",this.dropup?"auto":"100%"),this._renderer.setStyle(this._inlinedMenu.rootNodes[0],"transform",this.dropup?"translateY(-101%)":"translateY(0)"),this._renderer.setStyle(this._inlinedMenu.rootNodes[0],"bottom","auto"))}removeDropupStyles(){this._inlinedMenu&&this._inlinedMenu.rootNodes[0]&&(this._renderer.removeStyle(this._inlinedMenu.rootNodes[0],"top"),this._renderer.removeStyle(this._inlinedMenu.rootNodes[0],"transform"),this._renderer.removeStyle(this._inlinedMenu.rootNodes[0],"bottom"))}};t.\u0275fac=function(i){return new(i||t)(o(l),o(u),o(g),o(_),o(c),o(B),o(b))},t.\u0275dir=f({type:t,selectors:[["","bsDropdown",""],["","dropdown",""]],hostVars:6,hostBindings:function(i,n){i&1&&w("keydown.arrowDown",function(a){return n.navigationClick(a)})("keydown.arrowUp",function(a){return n.navigationClick(a)}),i&2&&C("dropup",n.dropup)("open",n.isOpen)("show",n.isOpen)},inputs:{placement:"placement",triggers:"triggers",container:"container",dropup:"dropup",autoClose:"autoClose",isAnimated:"isAnimated",insideClick:"insideClick",isDisabled:"isDisabled",isOpen:"isOpen"},outputs:{isOpenChange:"isOpenChange",onShown:"onShown",onHidden:"onHidden"},exportAs:["bs-dropdown"],features:[E([c,_,B])]});let s=t;return s})(),ae=(()=>{let t=class t{constructor(e,i,n){e.resolveDropdownMenu({templateRef:n,viewContainer:i})}};t.\u0275fac=function(i){return new(i||t)(o(c),o(g),o(k))},t.\u0275dir=f({type:t,selectors:[["","bsDropdownMenu",""],["","dropdownMenu",""]],exportAs:["bs-dropdown-menu"]});let s=t;return s})(),he=(()=>{let t=class t{constructor(e,i,n,d,a){this._changeDetectorRef=e,this._dropdown=i,this._element=n,this._renderer=d,this._state=a,this.isOpen=!1,this._subscriptions=[],this._subscriptions.push(this._state.isOpenChange.subscribe(h=>{this.isOpen=h,h?(this._documentClickListener=this._renderer.listen("document","click",r=>{this._state.autoClose&&r.button!==2&&!this._element.nativeElement.contains(r.target)&&!(this._state.insideClick&&this._dropdown._contains(r))&&(this._state.toggleClick.emit(!1),this._changeDetectorRef.detectChanges())}),this._escKeyUpListener=this._renderer.listen(this._element.nativeElement,"keyup.esc",()=>{this._state.autoClose&&(this._state.toggleClick.emit(!1),this._changeDetectorRef.detectChanges())})):(this._documentClickListener&&this._documentClickListener(),this._escKeyUpListener&&this._escKeyUpListener())})),this._subscriptions.push(this._state.isDisabledChange.subscribe(h=>this.isDisabled=h||void 0))}onClick(e){this._state.stopOnClickPropagation&&e.stopPropagation(),!this.isDisabled&&this._state.toggleClick.emit(!0)}ngOnDestroy(){this._documentClickListener&&this._documentClickListener(),this._escKeyUpListener&&this._escKeyUpListener();for(let e of this._subscriptions)e.unsubscribe()}};t.\u0275fac=function(i){return new(i||t)(o(v),o(Y),o(l),o(u),o(c))},t.\u0275dir=f({type:t,selectors:[["","bsDropdownToggle",""],["","dropdownToggle",""]],hostVars:3,hostBindings:function(i,n){i&1&&w("click",function(a){return n.onClick(a)}),i&2&&A("aria-haspopup",!0)("disabled",n.isDisabled)("aria-expanded",n.isOpen)},exportAs:["bs-dropdown-toggle"]});let s=t;return s})(),ce=(()=>{let t=class t{static forRoot(){return{ngModule:t,providers:[]}}};t.\u0275fac=function(i){return new(i||t)},t.\u0275mod=O({type:t}),t.\u0275inj=M({});let s=t;return s})();export{Y as a,ae as b,he as c,ce as d};