@sync-in/server 1.3.4 → 1.3.7

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 (33) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/package.json +1 -1
  3. package/static/{chunk-WWKXW4MM.js → chunk-3CQHRM6K.js} +1 -1
  4. package/static/{chunk-QKELW3MH.js → chunk-62NKWSCZ.js} +1 -1
  5. package/static/{chunk-2PQGH3LQ.js → chunk-7DWT7W6L.js} +1 -1
  6. package/static/{chunk-GLAK4VQT.js → chunk-AOASP2ML.js} +1 -1
  7. package/static/{chunk-GW5AVRYT.js → chunk-ATROK3XR.js} +1 -1
  8. package/static/{chunk-YQGJX5R7.js → chunk-BMZK5PGX.js} +1 -1
  9. package/static/{chunk-4RF354LU.js → chunk-CBQRUHAW.js} +1 -1
  10. package/static/{chunk-Q7LN54AP.js → chunk-CS5K4IBF.js} +1 -1
  11. package/static/{chunk-X4CIBLP6.js → chunk-CXGKFQMB.js} +1 -1
  12. package/static/{chunk-W4LKCEBR.js → chunk-E2MMQS3P.js} +1 -1
  13. package/static/{chunk-BOIXDTUT.js → chunk-EUCMHS6F.js} +1 -1
  14. package/static/{chunk-2QNFUN7G.js → chunk-FNR2JLQZ.js} +1 -1
  15. package/static/{chunk-55WOZ7P6.js → chunk-H3O3N5LY.js} +1 -1
  16. package/static/{chunk-XQFA4DLU.js → chunk-H5ZPIT76.js} +1 -1
  17. package/static/{chunk-MLLPT7BU.js → chunk-IYMU2AOQ.js} +1 -1
  18. package/static/{chunk-MTBJHA2L.js → chunk-K375F6CH.js} +1 -1
  19. package/static/{chunk-ZEZVOO4G.js → chunk-KOYXXWT3.js} +1 -1
  20. package/static/{chunk-6HV65OKG.js → chunk-MAVDZOWK.js} +1 -1
  21. package/static/{chunk-HPRC4PXX.js → chunk-MDYFTKWU.js} +1 -1
  22. package/static/{chunk-AS7H5UIO.js → chunk-ME4DNAIM.js} +1 -1
  23. package/static/{chunk-ESSY62VJ.js → chunk-MGWJOK6G.js} +1 -1
  24. package/static/{chunk-SOYI5P5A.js → chunk-N6A3HHB5.js} +1 -1
  25. package/static/{chunk-5SYLS7WR.js → chunk-NC5X67U2.js} +1 -1
  26. package/static/{chunk-Q35EEVWP.js → chunk-OHGTSIIO.js} +1 -1
  27. package/static/{chunk-2OSA27SE.js → chunk-PU26FIXJ.js} +1 -1
  28. package/static/{chunk-ZJDBESQA.js → chunk-USM4HKKT.js} +1 -1
  29. package/static/{chunk-X2BMM3NY.js → chunk-VUBNAENR.js} +1 -1
  30. package/static/{chunk-7XBZXSHI.js → chunk-YCR3E6AS.js} +1 -1
  31. package/static/{chunk-3XDVB3TW.js → chunk-ZFGAD4UR.js} +1 -1
  32. package/static/index.html +1 -1
  33. package/static/{main-2GG5BCQL.js → main-TFDBY2TB.js} +3 -3
@@ -1 +1 @@
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
+ import{b as ft,c as ht}from"./chunk-OHGTSIIO.js";import{A as ut,C as Ct,z as _t}from"./chunk-3CQHRM6K.js";import{a as dt}from"./chunk-AOASP2ML.js";import{a as re}from"./chunk-H5ZPIT76.js";import{a as lt}from"./chunk-USM4HKKT.js";import{d as Ge}from"./chunk-MGWJOK6G.js";import"./chunk-JXZCNFW7.js";import{a as et}from"./chunk-ATROK3XR.js";import{a as ct}from"./chunk-3UFSZ24R.js";import"./chunk-FNR2JLQZ.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-EUCMHS6F.js";import{a as oe,b as ae,c as Xe,d as Ze}from"./chunk-ME4DNAIM.js";import{e as mt}from"./chunk-62NKWSCZ.js";import{f as pt,g as ie}from"./chunk-7DWT7W6L.js";import"./chunk-IYMU2AOQ.js";import"./chunk-E2MMQS3P.js";import{f as te}from"./chunk-MAVDZOWK.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-H3O3N5LY.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{f as P}from"./chunk-6HV65OKG.js";import{Ba as d,U as g,Va as C,X as N,cb as E,kb as H,oa as O,sa as f,wb as k,xb as F}from"./chunk-55WOZ7P6.js";import{d as T}from"./chunk-J6YSVODR.js";import{$ as I,G as h,O as m,Oc as R,Z as x,ca as A,ha as n,p as c,q as _,v as p}from"./chunk-JQOMI5VI.js";var a=function(r){return r.ACCESS="access",r.REFRESH="refresh",r.WS="ws",r.CSRF="csrf",r}(a||{});var s=function(r){return r.BASE="/api/auth",r.LOGIN="login",r.LOGOUT="logout",r.REFRESH="refresh",r.TOKEN="token",r.TOKEN_REFRESH="token/refresh",r.WS="socket.io",r}(s||{}),U=`${s.BASE}/${s.LOGIN}`,K=`${s.BASE}/${s.LOGOUT}`,l=`${s.BASE}/${s.REFRESH}`,M=`${s.BASE}/${s.TOKEN}`,W=`${s.BASE}/${s.TOKEN_REFRESH}`,b=`/${s.WS}`;var u="sync-in-csrf";var y=[a.REFRESH,a.ACCESS,a.WS,a.CSRF];var L="Client token is expired";var S={BASE:"auth",LOGIN:"login"};var fe=(()=>{let o=class o{constructor(){this.http=n(R),this.router=n(T),this.store=n(H),this.userService=n(P),this.layout=n(F),this.electron=n(k),this._refreshExpiration=parseInt(localStorage.getItem("refresh_expiration")||"0",10)||0,this._accessExpiration=parseInt(localStorage.getItem("access_expiration")||"0",10)||0}get refreshExpiration(){return this._refreshExpiration}set refreshExpiration(e){this._refreshExpiration=e!==0?e+60:e,localStorage.setItem("refresh_expiration",e.toString())}get accessExpiration(){return this._accessExpiration}set accessExpiration(e){this._accessExpiration=e!==0?e+60:e,localStorage.setItem("access_expiration",e.toString())}login(e,t){return this.http.post(U,{login:e,password:t}).pipe(p(i=>(this.accessExpiration=i.token.access_expiration,this.refreshExpiration=i.token.refresh_expiration,this.userService.initUser(i.user),{success:!0,message:null})),h(i=>(console.warn(i),c({success:!1,message:i.error.message||i.message}))))}loginElectron(){return this.electron.authenticate().pipe(x(e=>this.http.post(g,e).pipe(p(t=>(this.accessExpiration=t.token.access_expiration,this.refreshExpiration=t.token.refresh_expiration,this.userService.initUser(t.user),t?.client_token_update&&this.electron.send(E.SERVER.AUTHENTICATION_TOKEN_UPDATE,t.client_token_update),!0)),h(t=>(console.warn(t),t.error.message===L?this.electron.send(E.SERVER.AUTHENTICATION_TOKEN_EXPIRED):this.electron.send(E.SERVER.AUTHENTICATION_FAILED),c(!1))))))}logout(e=!0,t=!1){if((e||t)&&this.store.userImpersonate()){this.logoutImpersonateUser();return}this.userService.disconnectWebSocket(),this.clearCookies().pipe(m(()=>{this.accessExpiration=0,this.refreshExpiration=0,this.layout.clean(),this.store.clean(),e&&this.router.navigate([S.BASE,S.LOGIN]).catch(console.error),t&&this.layout.sendNotification("warning","Session has expired","Please sign in")})).subscribe()}logoutImpersonateUser(){this.http.post(O,null).subscribe({next:e=>{this.userService.disconnectWebSocket(),this.initUserFromResponse(e),this.router.navigate([f.BASE,f.ACCOUNT]).catch(console.error)},error:e=>{console.error(e),this.layout.sendNotification("error","Impersonate identity","logout",e)}})}initUserFromResponse(e,t=!1){e!==null&&(this.accessExpiration=e.token.access_expiration,this.refreshExpiration=e.token.refresh_expiration,this.userService.initUser(e.user,t))}isLogged(){return!this.refreshTokenHasExpired()}refreshToken(){return this.http.post(l,null).pipe(p(e=>(this.accessExpiration=e.access_expiration,this.refreshExpiration=e.refresh_expiration,console.debug("refresh token done"),!0)),h(e=>(console.debug("token has expired"),this.electron.enabled?(console.debug("login with app"),this.loginElectron()):(this.logout(!0,!0),_(()=>e)))))}checkUserAuthAndLoad(e){return this.refreshTokenHasExpired()?this.electron.enabled?this.loginElectron():(this.returnUrl=e.length>1?e:null,this.logout(),c(!1)):this.store.user.getValue()?c(!0):this.http.get(N).pipe(I(t=>this.userService.initUser(t.user)),p(()=>!0),h(t=>(t.status===401?this.logout():console.warn(t),c(!1))))}checkCSRF(e){return e.headers.has(u)?e.clone({headers:e.headers.set(u,C(u))}):e}refreshTokenHasExpired(){return this.refreshExpiration===0||d()>=this.refreshExpiration}clearCookies(){return this.http.post(K,null)}};o.\u0275fac=function(t){return new(t||o)},o.\u0275prov=A({token:o,factory:o.\u0275fac,providedIn:"root"});let r=o;return r})();export{U as a,K as b,l as c,u as d,S as e,fe as f};
1
+ import{f as P}from"./chunk-MAVDZOWK.js";import{Ba as d,U as g,Va as C,X as N,cb as E,kb as H,oa as O,sa as f,wb as k,xb as F}from"./chunk-H3O3N5LY.js";import{d as T}from"./chunk-J6YSVODR.js";import{$ as I,G as h,O as m,Oc as R,Z as x,ca as A,ha as n,p as c,q as _,v as p}from"./chunk-JQOMI5VI.js";var a=function(r){return r.ACCESS="access",r.REFRESH="refresh",r.WS="ws",r.CSRF="csrf",r}(a||{});var s=function(r){return r.BASE="/api/auth",r.LOGIN="login",r.LOGOUT="logout",r.REFRESH="refresh",r.TOKEN="token",r.TOKEN_REFRESH="token/refresh",r.WS="socket.io",r}(s||{}),U=`${s.BASE}/${s.LOGIN}`,K=`${s.BASE}/${s.LOGOUT}`,l=`${s.BASE}/${s.REFRESH}`,M=`${s.BASE}/${s.TOKEN}`,W=`${s.BASE}/${s.TOKEN_REFRESH}`,b=`/${s.WS}`;var u="sync-in-csrf";var y=[a.REFRESH,a.ACCESS,a.WS,a.CSRF];var L="Client token is expired";var S={BASE:"auth",LOGIN:"login"};var fe=(()=>{let o=class o{constructor(){this.http=n(R),this.router=n(T),this.store=n(H),this.userService=n(P),this.layout=n(F),this.electron=n(k),this._refreshExpiration=parseInt(localStorage.getItem("refresh_expiration")||"0",10)||0,this._accessExpiration=parseInt(localStorage.getItem("access_expiration")||"0",10)||0}get refreshExpiration(){return this._refreshExpiration}set refreshExpiration(e){this._refreshExpiration=e!==0?e+60:e,localStorage.setItem("refresh_expiration",e.toString())}get accessExpiration(){return this._accessExpiration}set accessExpiration(e){this._accessExpiration=e!==0?e+60:e,localStorage.setItem("access_expiration",e.toString())}login(e,t){return this.http.post(U,{login:e,password:t}).pipe(p(i=>(this.accessExpiration=i.token.access_expiration,this.refreshExpiration=i.token.refresh_expiration,this.userService.initUser(i.user),{success:!0,message:null})),h(i=>(console.warn(i),c({success:!1,message:i.error.message||i.message}))))}loginElectron(){return this.electron.authenticate().pipe(x(e=>this.http.post(g,e).pipe(p(t=>(this.accessExpiration=t.token.access_expiration,this.refreshExpiration=t.token.refresh_expiration,this.userService.initUser(t.user),t?.client_token_update&&this.electron.send(E.SERVER.AUTHENTICATION_TOKEN_UPDATE,t.client_token_update),!0)),h(t=>(console.warn(t),t.error.message===L?this.electron.send(E.SERVER.AUTHENTICATION_TOKEN_EXPIRED):this.electron.send(E.SERVER.AUTHENTICATION_FAILED),c(!1))))))}logout(e=!0,t=!1){if((e||t)&&this.store.userImpersonate()){this.logoutImpersonateUser();return}this.userService.disconnectWebSocket(),this.clearCookies().pipe(m(()=>{this.accessExpiration=0,this.refreshExpiration=0,this.layout.clean(),this.store.clean(),e&&this.router.navigate([S.BASE,S.LOGIN]).catch(console.error),t&&this.layout.sendNotification("warning","Session has expired","Please sign in")})).subscribe()}logoutImpersonateUser(){this.http.post(O,null).subscribe({next:e=>{this.userService.disconnectWebSocket(),this.initUserFromResponse(e),this.router.navigate([f.BASE,f.ACCOUNT]).catch(console.error)},error:e=>{console.error(e),this.layout.sendNotification("error","Impersonate identity","logout",e)}})}initUserFromResponse(e,t=!1){e!==null&&(this.accessExpiration=e.token.access_expiration,this.refreshExpiration=e.token.refresh_expiration,this.userService.initUser(e.user,t))}isLogged(){return!this.refreshTokenHasExpired()}refreshToken(){return this.http.post(l,null).pipe(p(e=>(this.accessExpiration=e.access_expiration,this.refreshExpiration=e.refresh_expiration,console.debug("refresh token done"),!0)),h(e=>(console.debug("token has expired"),this.electron.enabled?(console.debug("login with app"),this.loginElectron()):(this.logout(!0,!0),_(()=>e)))))}checkUserAuthAndLoad(e){return this.refreshTokenHasExpired()?this.electron.enabled?this.loginElectron():(this.returnUrl=e.length>1?e:null,this.logout(),c(!1)):this.store.user.getValue()?c(!0):this.http.get(N).pipe(I(t=>this.userService.initUser(t.user)),p(()=>!0),h(t=>(t.status===401?this.logout():console.warn(t),c(!1))))}checkCSRF(e){return e.headers.has(u)?e.clone({headers:e.headers.set(u,C(u))}):e}refreshTokenHasExpired(){return this.refreshExpiration===0||d()>=this.refreshExpiration}clearCookies(){return this.http.post(K,null)}};o.\u0275fac=function(t){return new(t||o)},o.\u0275prov=A({token:o,factory:o.\u0275fac,providedIn:"root"});let r=o;return r})();export{U as a,K as b,l as c,u as d,S as e,fe as f};
@@ -1,4 +1,4 @@
1
- import{g as lt,h as ct}from"./chunk-6HV65OKG.js";import{B as x,Ib as st,Kb as at,Mb as rt,Qb as ot,Xa as nt,e as Te,g as Z,j as qe,k as he,m as Y,n as Oe,o as de,t as pe,ua as it,v as Je,w as Xe}from"./chunk-55WOZ7P6.js";import{$ as ee,$b as Ue,Ac as le,Cb as C,Dc as He,E as Me,Eb as l,Ed as Ze,Fa as j,Fb as Pe,Fd as Ye,Ga as fe,Gb as Le,Gc as Ne,H as Ae,Hc as ce,Ib as $,J as ue,Jb as W,Kb as K,Lb as H,Ma as h,Mb as De,Na as Fe,Nb as F,Ob as re,Pb as b,Qa as U,Qb as T,Ra as u,Sa as ne,Tb as ge,Ub as ve,Vb as Ce,Xa as V,Xb as Re,Ya as se,Z as ke,Za as k,Zb as be,Zc as ze,_a as B,a as Ee,ab as O,ad as je,bb as v,c as we,ca as te,cb as ae,cc as xe,da as ie,dc as I,dd as $e,ec as Ve,ed as We,fc as P,ha as M,hc as G,ib as L,jb as S,jd as Ke,k as me,kb as E,kf as et,ma as y,na as _,nb as ye,o as Ie,ob as _e,of as tt,pb as d,qb as p,qc as Q,r as J,rb as m,sb as g,wd as Ge,x as X,xc as Be,ya as A,yd as Qe,zb as w,zc as oe}from"./chunk-JQOMI5VI.js";var li=(()=>{let n=class n{transform(e,t="L HH:mm:ss"){return e?(0,x.default)(e).format(t):""}};n.\u0275fac=function(t){return new(t||n)},n.\u0275pipe=B({name:"amDateFormat",type:n,pure:!0});let s=n;return s})();var _t=["*"],gt=s=>["nav-item",s];function vt(s,n){if(s&1){let a=w();p(0,"span",7),C("click",function(t){y(a);let i=l().$implicit,r=l();return t.preventDefault(),_(r.removeTab(i))}),b(1," \u274C"),m()}}function Ct(s,n){if(s&1){let a=w();p(0,"li",3),C("keydown",function(t){let i=y(a).index,r=l();return _(r.keyNavActions(t,i))}),p(1,"a",4),C("click",function(){let t=y(a).$implicit;return _(t.active=!0)}),p(2,"span",5),b(3),m(),O(4,vt,2,0,"span",6),m()()}if(s&2){let a=n.$implicit;F("active",a.active)("disabled",a.disabled),d("ngClass",Ue(15,gt,a.customClass||"")),h(),F("active",a.active)("disabled",a.disabled),L("aria-controls",a.id?a.id:"")("aria-selected",!!a.active)("id",a.id?a.id+"-link":""),h(),d("ngTransclude",a.headingRef),h(),T(a.heading),h(),d("ngIf",a.removable)}}var bt=(()=>{let n=class n{set ngTransclude(e){this._ngTransclude=e,e&&this.viewRef.createEmbeddedView(e)}get ngTransclude(){return this._ngTransclude}constructor(e){this.viewRef=e}};n.\u0275fac=function(t){return new(t||n)(u(ne))},n.\u0275dir=k({type:n,selectors:[["","ngTransclude",""]],inputs:{ngTransclude:"ngTransclude"}});let s=n;return s})(),xt=(()=>{let n=class n{constructor(){this.type="tabs",this.isKeysAllowed=!0,this.ariaLabel="Tabs"}};n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=te({token:n,factory:n.\u0275fac,providedIn:"root"});let s=n;return s})(),Tt=(()=>{let n=class n{get vertical(){return this._vertical}set vertical(e){this._vertical=e,this.setClassMap()}get justified(){return this._justified}set justified(e){this._justified=e,this.setClassMap()}get type(){return this._type}set type(e){this._type=e,this.setClassMap()}get isKeysAllowed(){return this._isKeysAllowed}set isKeysAllowed(e){this._isKeysAllowed=e}constructor(e,t,i){this.renderer=t,this.elementRef=i,this.clazz=!0,this.tabs=[],this.classMap={},this.ariaLabel="Tabs",this.isDestroyed=!1,this._vertical=!1,this._justified=!1,this._type="tabs",this._isKeysAllowed=!0,Object.assign(this,e)}ngOnDestroy(){this.isDestroyed=!0}addTab(e){e.tabOrder!==void 0?this.insertTabByOrder(e):this.tabs.push(e),e.active=this.tabs.length===1&&!e.active}insertTabByOrder(e){let t=this.tabs.length;for(let i=0;i<this.tabs.length;i++){let r=this.tabs[i];if(r.tabOrder!==void 0&&e.tabOrder!==void 0&&e.tabOrder<r.tabOrder){t=i;break}if(r.tabOrder===void 0){t=i;break}}this.tabs.splice(t,0,e)}removeTab(e,t={reselect:!0,emit:!0}){let i=this.tabs.indexOf(e);if(!(i===-1||this.isDestroyed)){if(t.reselect&&e.active&&this.hasAvailableTabs(i)){let r=this.getClosestTabIndex(i);this.tabs[r].active=!0}t.emit&&e.removed.emit(e),this.tabs.splice(i,1),e.elementRef.nativeElement.parentNode&&this.renderer.removeChild(e.elementRef.nativeElement.parentNode,e.elementRef.nativeElement)}}keyNavActions(e,t){if(!this.isKeysAllowed)return;let i=Array.from(this.elementRef.nativeElement.querySelectorAll(".nav-link"));if(e.keyCode===13||e.key==="Enter"||e.keyCode===32||e.key==="Space"){e.preventDefault(),i[t%i.length].click();return}if(e.keyCode===39||e.key==="RightArrow"){let r,o=1;do r=i[(t+o)%i.length],o++;while(r.classList.contains("disabled"));r.focus();return}if(e.keyCode===37||e.key==="LeftArrow"){let r,o=1,c=t;do c-o<0?(c=i.length-1,r=i[c],o=0):r=i[c-o],o++;while(r.classList.contains("disabled"));r.focus();return}if(e.keyCode===36||e.key==="Home"){e.preventDefault();let r,o=0;do r=i[o%i.length],o++;while(r.classList.contains("disabled"));r.focus();return}if(e.keyCode===35||e.key==="End"){e.preventDefault();let r,o=1,c=t;do c-o<0?(c=i.length-1,r=i[c],o=0):r=i[c-o],o++;while(r.classList.contains("disabled"));r.focus();return}if((e.keyCode===46||e.key==="Delete")&&this.tabs[t].removable){if(this.removeTab(this.tabs[t]),i[t+1]){i[(t+1)%i.length].focus();return}i[i.length-1]&&i[0].focus()}}getClosestTabIndex(e){let t=this.tabs.length;if(!t)return-1;for(let i=1;i<=t;i+=1){let r=e-i,o=e+i;if(this.tabs[r]&&!this.tabs[r].disabled)return r;if(this.tabs[o]&&!this.tabs[o].disabled)return o}return-1}hasAvailableTabs(e){let t=this.tabs.length;if(!t)return!1;for(let i=0;i<t;i+=1)if(!this.tabs[i].disabled&&i!==e)return!0;return!1}setClassMap(){this.classMap={"nav-stacked":this.vertical,"flex-column":this.vertical,"nav-justified":this.justified,[`nav-${this.type}`]:!0}}};n.\u0275fac=function(t){return new(t||n)(u(xt),u(U),u(A))},n.\u0275cmp=V({type:n,selectors:[["tabset"]],hostVars:2,hostBindings:function(t,i){t&2&&F("tab-container",i.clazz)},inputs:{vertical:"vertical",justified:"justified",type:"type"},ngContentSelectors:_t,decls:4,vars:3,consts:[["role","tablist",1,"nav",3,"click","ngClass"],[3,"ngClass","active","disabled","keydown",4,"ngFor","ngForOf"],[1,"tab-content"],[3,"keydown","ngClass"],["href","javascript:void(0);","role","tab",1,"nav-link",3,"click"],[3,"ngTransclude"],["class","bs-remove-tab",3,"click",4,"ngIf"],[1,"bs-remove-tab",3,"click"]],template:function(t,i){t&1&&(Pe(),p(0,"ul",0),C("click",function(o){return o.preventDefault()}),O(1,Ct,5,17,"li",1),m(),p(2,"div",2),Le(3),m()),t&2&&(d("ngClass",i.classMap),L("aria-label",i.ariaLabel),h(),d("ngForOf",i.tabs))},dependencies:[Be,oe,bt,le],styles:["[_nghost-%COMP%] .nav-tabs[_ngcontent-%COMP%] .nav-item.disabled[_ngcontent-%COMP%] a.disabled[_ngcontent-%COMP%]{cursor:default}"]});let s=n;return s})(),Ot=(()=>{let n=class n{get customClass(){return this._customClass}set customClass(e){this.customClass&&this.customClass.split(" ").forEach(t=>{this.renderer.removeClass(this.elementRef.nativeElement,t)}),this._customClass=e?e.trim():"",this.customClass&&this.customClass.split(" ").forEach(t=>{this.renderer.addClass(this.elementRef.nativeElement,t)})}get active(){return this._active}set active(e){if(this._active!==e){if(this.disabled&&e||!e){this._active&&!e&&(this.deselect.emit(this),this._active=e);return}this._active=e,this.selectTab.emit(this),this.tabset.tabs.forEach(t=>{t!==this&&(t.active=!1)})}}get ariaLabelledby(){return this.id?`${this.id}-link`:""}constructor(e,t,i){this.elementRef=t,this.renderer=i,this.disabled=!1,this.removable=!1,this.selectTab=new v,this.deselect=new v,this.removed=new v,this.addClass=!0,this.role="tabpanel",this._active=!1,this._customClass="",this.tabset=e}ngOnInit(){this.removable=!!this.removable,this.tabset.addTab(this)}ngOnDestroy(){this.tabset.removeTab(this,{reselect:!1,emit:!1})}};n.\u0275fac=function(t){return new(t||n)(u(Tt),u(A),u(U))},n.\u0275dir=k({type:n,selectors:[["tab"],["","tab",""]],hostVars:7,hostBindings:function(t,i){t&2&&(L("id",i.id)("role",i.role)("aria-labelledby",i.ariaLabelledby),F("active",i.active)("tab-pane",i.addClass))},inputs:{heading:"heading",id:"id",disabled:"disabled",removable:"removable",tabOrder:"tabOrder",customClass:"customClass",active:"active"},outputs:{selectTab:"selectTab",deselect:"deselect",removed:"removed"},exportAs:["tab"]});let s=n;return s})(),vi=(()=>{let n=class n{constructor(e,t){t.headingRef=e}};n.\u0275fac=function(t){return new(t||n)(u(Fe),u(Ot))},n.\u0275dir=k({type:n,selectors:[["","tabHeading",""]]});let s=n;return s})(),Ci=(()=>{let n=class n{static forRoot(){return{ngModule:n,providers:[]}}};n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=se({type:n}),n.\u0275inj=ie({imports:[ce]});let s=n;return s})();var Si=(()=>{let n=class n{constructor(){this.autoFocus=!0,this.autoSelect=!0,this.elementRef=M(A)}ngOnInit(){setTimeout(()=>{this.autoFocus&&this.elementRef.nativeElement.focus(),this.autoSelect&&this.elementRef.nativeElement.select()},0)}};n.\u0275fac=function(t){return new(t||n)},n.\u0275dir=k({type:n,selectors:[["","appAutofocus",""]],inputs:{autoFocus:"autoFocus",autoSelect:"autoSelect"}});let s=n;return s})();var ht=(()=>{let n=class n{constructor(){this.cdRef=M(Q),this.ngZone=M(ae)}format(e){return e.from((0,x.default)(),this.lastOmitSuffix)}transform(e,t,i){return this.hasChanged(e,t)?(this.lastTime=this.getTime(e),this.lastValue=e,this.lastOmitSuffix=t,this.lastLocale=this.getLocale(e),this.formatFn=i||this.format.bind(this),this.removeTimer(),this.createTimer(),this.lastText=this.formatFn((0,x.default)(e))):this.createTimer(),this.lastText}ngOnDestroy(){this.removeTimer()}createTimer(){if(this.currentTimer)return;let e=(0,x.default)(this.lastValue),t=this.getSecondsUntilUpdate(e)*1e3;this.currentTimer=this.ngZone.runOutsideAngular(()=>typeof window<"u"?window.setTimeout(()=>{this.lastText=this.formatFn((0,x.default)(this.lastValue)),this.currentTimer=null,this.ngZone.run(()=>this.cdRef.markForCheck())},t):null)}removeTimer(){this.currentTimer&&(window.clearTimeout(this.currentTimer),this.currentTimer=null)}getSecondsUntilUpdate(e){let t=Math.abs((0,x.default)().diff(e,"minute"));return t<1?1:t<60?30:t<180?300:3600}hasChanged(e,t){return this.getTime(e)!==this.lastTime||this.getLocale(e)!==this.lastLocale||t!==this.lastOmitSuffix}getTime(e){return e instanceof Date?e.getTime():x.default.isDayjs(e)?e.valueOf():(0,x.default)(e).valueOf()}getLocale(e){return x.default.isDayjs(e)?e.locale():x.default.locale()}};n.\u0275fac=function(t){return new(t||n)},n.\u0275pipe=B({name:"amTimeAgo",type:n,pure:!1});let s=n;return s})();var Et=["ulElement"],wt=["liElements"],It=(s,n,a,e)=>({matches:s,itemTemplate:n,query:a,$implicit:e}),Mt=(s,n,a,e)=>({item:s,index:n,match:a,query:e});function At(s,n){}function kt(s,n){if(s&1&&g(0,"span",4),s&2){let a=n.match,e=n.query,t=l();d("innerHtml",t.highlight(a,e),j)}}function Ft(s,n){if(s&1&&(p(0,"h6",8),b(1),m()),s&2){let a=l().$implicit;h(),T(a)}}function Pt(s,n){}function Lt(s,n){if(s&1){let a=w();p(0,"button",9,2),C("click",function(t){y(a);let i=l().$implicit,r=l(2);return _(r.selectMatch(i,t))})("mouseenter",function(){y(a);let t=l().$implicit,i=l(2);return _(i.selectActive(t))}),O(2,Pt,0,0,"ng-template",3),m()}if(s&2){let a=l(),e=a.$implicit,t=a.index,i=l(2),r=H(2);F("active",i.isActive(e)),d("id",i.popupId+"-"+t)("@typeaheadAnimation",i.animationState),h(2),d("ngTemplateOutlet",i.itemTemplate||r)("ngTemplateOutletContext",xe(6,Mt,e.item,t,e,i.query))}}function Dt(s,n){if(s&1&&O(0,Ft,2,1,"h6",6)(1,Lt,3,11,"ng-template",7),s&2){let a=n.$implicit;d("ngIf",a.isHeader()),h(),d("ngIf",!a.isHeader())}}function Rt(s,n){if(s&1&&O(0,Dt,2,2,"ng-template",5),s&2){let a=l();d("ngForOf",a.matches)}}var Ut={\u00C1:"A",\u0102:"A",\u1EAE:"A",\u1EB6:"A",\u1EB0:"A",\u1EB2:"A",\u1EB4:"A",\u01CD:"A",\u00C2:"A",\u1EA4:"A",\u1EAC:"A",\u1EA6:"A",\u1EA8:"A",\u1EAA:"A",\u00C4:"A",\u01DE:"A",\u0226:"A",\u01E0:"A",\u1EA0:"A",\u0200:"A",\u00C0:"A",\u1EA2:"A",\u0202:"A",\u0100:"A",\u0104:"A",\u00C5:"A",\u01FA:"A",\u1E00:"A","\u023A":"A",\u00C3:"A","\uA732":"AA",\u00C6:"AE",\u01FC:"AE",\u01E2:"AE","\uA734":"AO","\uA736":"AU","\uA738":"AV","\uA73A":"AV","\uA73C":"AY",\u1E02:"B",\u1E04:"B",\u0181:"B",\u1E06:"B","\u0243":"B",\u0182:"B",\u0106:"C",\u010C:"C",\u00C7:"C",\u1E08:"C",\u0108:"C",\u010A:"C",\u0187:"C","\u023B":"C",\u010E:"D",\u1E10:"D",\u1E12:"D",\u1E0A:"D",\u1E0C:"D",\u018A:"D",\u1E0E:"D",\u01F2:"D",\u01C5:"D",\u0110:"D",\u018B:"D",\u01F1:"DZ",\u01C4:"DZ",\u00C9:"E",\u0114:"E",\u011A:"E",\u0228:"E",\u1E1C:"E",\u00CA:"E",\u1EBE:"E",\u1EC6:"E",\u1EC0:"E",\u1EC2:"E",\u1EC4:"E",\u1E18:"E",\u00CB:"E",\u0116:"E",\u1EB8:"E",\u0204:"E",\u00C8:"E",\u1EBA:"E",\u0206:"E",\u0112:"E",\u1E16:"E",\u1E14:"E",\u0118:"E","\u0246":"E",\u1EBC:"E",\u1E1A:"E","\uA76A":"ET",\u1E1E:"F",\u0191:"F",\u01F4:"G",\u011E:"G",\u01E6:"G",\u0122:"G",\u011C:"G",\u0120:"G",\u0193:"G",\u1E20:"G",\u01E4:"G",\u1E2A:"H",\u021E:"H",\u1E28:"H",\u0124:"H","\u2C67":"H",\u1E26:"H",\u1E22:"H",\u1E24:"H",\u0126:"H",\u00CD:"I",\u012C:"I",\u01CF:"I",\u00CE:"I",\u00CF:"I",\u1E2E:"I",\u0130:"I",\u1ECA:"I",\u0208:"I",\u00CC:"I",\u1EC8:"I",\u020A:"I",\u012A:"I",\u012E:"I",\u0197:"I",\u0128:"I",\u1E2C:"I","\uA779":"D","\uA77B":"F","\uA77D":"G","\uA782":"R","\uA784":"S","\uA786":"T","\uA76C":"IS",\u0134:"J","\u0248":"J",\u1E30:"K",\u01E8:"K",\u0136:"K","\u2C69":"K","\uA742":"K",\u1E32:"K",\u0198:"K",\u1E34:"K","\uA740":"K","\uA744":"K",\u0139:"L","\u023D":"L",\u013D:"L",\u013B:"L",\u1E3C:"L",\u1E36:"L",\u1E38:"L","\u2C60":"L","\uA748":"L",\u1E3A:"L",\u013F:"L","\u2C62":"L",\u01C8:"L",\u0141:"L",\u01C7:"LJ",\u1E3E:"M",\u1E40:"M",\u1E42:"M","\u2C6E":"M",\u0143:"N",\u0147:"N",\u0145:"N",\u1E4A:"N",\u1E44:"N",\u1E46:"N",\u01F8:"N",\u019D:"N",\u1E48:"N","\u0220":"N",\u01CB:"N",\u00D1:"N",\u01CA:"NJ",\u00D3:"O",\u014E:"O",\u01D1:"O",\u00D4:"O",\u1ED0:"O",\u1ED8:"O",\u1ED2:"O",\u1ED4:"O",\u1ED6:"O",\u00D6:"O",\u022A:"O",\u022E:"O",\u0230:"O",\u1ECC:"O",\u0150:"O",\u020C:"O",\u00D2:"O",\u1ECE:"O",\u01A0:"O",\u1EDA:"O",\u1EE2:"O",\u1EDC:"O",\u1EDE:"O",\u1EE0:"O",\u020E:"O","\uA74A":"O","\uA74C":"O",\u014C:"O",\u1E52:"O",\u1E50:"O",\u019F:"O",\u01EA:"O",\u01EC:"O",\u00D8:"O",\u01FE:"O",\u00D5:"O",\u1E4C:"O",\u1E4E:"O",\u022C:"O",\u01A2:"OI","\uA74E":"OO",\u0190:"E",\u0186:"O",\u0222:"OU",\u1E54:"P",\u1E56:"P","\uA752":"P",\u01A4:"P","\uA754":"P","\u2C63":"P","\uA750":"P","\uA758":"Q","\uA756":"Q",\u0154:"R",\u0158:"R",\u0156:"R",\u1E58:"R",\u1E5A:"R",\u1E5C:"R",\u0210:"R",\u0212:"R",\u1E5E:"R","\u024C":"R","\u2C64":"R","\uA73E":"C",\u018E:"E",\u015A:"S",\u1E64:"S",\u0160:"S",\u1E66:"S",\u015E:"S",\u015C:"S",\u0218:"S",\u1E60:"S",\u1E62:"S",\u1E68:"S",\u0164:"T",\u0162:"T",\u1E70:"T",\u021A:"T","\u023E":"T",\u1E6A:"T",\u1E6C:"T",\u01AC:"T",\u1E6E:"T",\u01AE:"T",\u0166:"T","\u2C6F":"A","\uA780":"L",\u019C:"M","\u0245":"V","\uA728":"TZ",\u00DA:"U",\u016C:"U",\u01D3:"U",\u00DB:"U",\u1E76:"U",\u00DC:"U",\u01D7:"U",\u01D9:"U",\u01DB:"U",\u01D5:"U",\u1E72:"U",\u1EE4:"U",\u0170:"U",\u0214:"U",\u00D9:"U",\u1EE6:"U",\u01AF:"U",\u1EE8:"U",\u1EF0:"U",\u1EEA:"U",\u1EEC:"U",\u1EEE:"U",\u0216:"U",\u016A:"U",\u1E7A:"U",\u0172:"U",\u016E:"U",\u0168:"U",\u1E78:"U",\u1E74:"U","\uA75E":"V",\u1E7E:"V",\u01B2:"V",\u1E7C:"V","\uA760":"VY",\u1E82:"W",\u0174:"W",\u1E84:"W",\u1E86:"W",\u1E88:"W",\u1E80:"W","\u2C72":"W",\u1E8C:"X",\u1E8A:"X",\u00DD:"Y",\u0176:"Y",\u0178:"Y",\u1E8E:"Y",\u1EF4:"Y",\u1EF2:"Y",\u01B3:"Y",\u1EF6:"Y","\u1EFE":"Y",\u0232:"Y","\u024E":"Y",\u1EF8:"Y",\u0179:"Z",\u017D:"Z",\u1E90:"Z","\u2C6B":"Z",\u017B:"Z",\u1E92:"Z",\u0224:"Z",\u1E94:"Z",\u01B5:"Z",\u0132:"IJ",\u0152:"OE","\u1D00":"A","\u1D01":"AE",\u0299:"B","\u1D03":"B","\u1D04":"C","\u1D05":"D","\u1D07":"E","\uA730":"F",\u0262:"G",\u029B:"G",\u029C:"H",\u026A:"I",\u0281:"R","\u1D0A":"J","\u1D0B":"K",\u029F:"L","\u1D0C":"L","\u1D0D":"M",\u0274:"N","\u1D0F":"O",\u0276:"OE","\u1D10":"O","\u1D15":"OU","\u1D18":"P",\u0280:"R","\u1D0E":"N","\u1D19":"R","\uA731":"S","\u1D1B":"T","\u2C7B":"E","\u1D1A":"R","\u1D1C":"U","\u1D20":"V","\u1D21":"W",\u028F:"Y","\u1D22":"Z",\u00E1:"a",\u0103:"a",\u1EAF:"a",\u1EB7:"a",\u1EB1:"a",\u1EB3:"a",\u1EB5:"a",\u01CE:"a",\u00E2:"a",\u1EA5:"a",\u1EAD:"a",\u1EA7:"a",\u1EA9:"a",\u1EAB:"a",\u00E4:"a",\u01DF:"a",\u0227:"a",\u01E1:"a",\u1EA1:"a",\u0201:"a",\u00E0:"a",\u1EA3:"a",\u0203:"a",\u0101:"a",\u0105:"a","\u1D8F":"a",\u1E9A:"a",\u00E5:"a",\u01FB:"a",\u1E01:"a","\u2C65":"a",\u00E3:"a","\uA733":"aa",\u00E6:"ae",\u01FD:"ae",\u01E3:"ae","\uA735":"ao","\uA737":"au","\uA739":"av","\uA73B":"av","\uA73D":"ay",\u1E03:"b",\u1E05:"b",\u0253:"b",\u1E07:"b","\u1D6C":"b","\u1D80":"b",\u0180:"b",\u0183:"b",\u0275:"o",\u0107:"c",\u010D:"c",\u00E7:"c",\u1E09:"c",\u0109:"c",\u0255:"c",\u010B:"c",\u0188:"c","\u023C":"c",\u010F:"d",\u1E11:"d",\u1E13:"d","\u0221":"d",\u1E0B:"d",\u1E0D:"d",\u0257:"d","\u1D91":"d",\u1E0F:"d","\u1D6D":"d","\u1D81":"d",\u0111:"d",\u0256:"d",\u018C:"d",\u0131:"i","\u0237":"j",\u025F:"j",\u0284:"j",\u01F3:"dz",\u01C6:"dz",\u00E9:"e",\u0115:"e",\u011B:"e",\u0229:"e",\u1E1D:"e",\u00EA:"e",\u1EBF:"e",\u1EC7:"e",\u1EC1:"e",\u1EC3:"e",\u1EC5:"e",\u1E19:"e",\u00EB:"e",\u0117:"e",\u1EB9:"e",\u0205:"e",\u00E8:"e",\u1EBB:"e",\u0207:"e",\u0113:"e",\u1E17:"e",\u1E15:"e","\u2C78":"e",\u0119:"e","\u1D92":"e","\u0247":"e",\u1EBD:"e",\u1E1B:"e","\uA76B":"et",\u1E1F:"f",\u0192:"f","\u1D6E":"f","\u1D82":"f",\u01F5:"g",\u011F:"g",\u01E7:"g",\u0123:"g",\u011D:"g",\u0121:"g",\u0260:"g",\u1E21:"g","\u1D83":"g",\u01E5:"g",\u1E2B:"h",\u021F:"h",\u1E29:"h",\u0125:"h","\u2C68":"h",\u1E27:"h",\u1E23:"h",\u1E25:"h",\u0266:"h",\u1E96:"h",\u0127:"h",\u0195:"hv",\u00ED:"i",\u012D:"i",\u01D0:"i",\u00EE:"i",\u00EF:"i",\u1E2F:"i",\u1ECB:"i",\u0209:"i",\u00EC:"i",\u1EC9:"i",\u020B:"i",\u012B:"i",\u012F:"i","\u1D96":"i",\u0268:"i",\u0129:"i",\u1E2D:"i","\uA77A":"d","\uA77C":"f","\u1D79":"g","\uA783":"r","\uA785":"s","\uA787":"t","\uA76D":"is",\u01F0:"j",\u0135:"j",\u029D:"j","\u0249":"j",\u1E31:"k",\u01E9:"k",\u0137:"k","\u2C6A":"k","\uA743":"k",\u1E33:"k",\u0199:"k",\u1E35:"k","\u1D84":"k","\uA741":"k","\uA745":"k",\u013A:"l",\u019A:"l",\u026C:"l",\u013E:"l",\u013C:"l",\u1E3D:"l","\u0234":"l",\u1E37:"l",\u1E39:"l","\u2C61":"l","\uA749":"l",\u1E3B:"l",\u0140:"l",\u026B:"l","\u1D85":"l",\u026D:"l",\u0142:"l",\u01C9:"lj",\u017F:"s","\u1E9C":"s",\u1E9B:"s","\u1E9D":"s",\u1E3F:"m",\u1E41:"m",\u1E43:"m",\u0271:"m","\u1D6F":"m","\u1D86":"m",\u0144:"n",\u0148:"n",\u0146:"n",\u1E4B:"n","\u0235":"n",\u1E45:"n",\u1E47:"n",\u01F9:"n",\u0272:"n",\u1E49:"n",\u019E:"n","\u1D70":"n","\u1D87":"n",\u0273:"n",\u00F1:"n",\u01CC:"nj",\u00F3:"o",\u014F:"o",\u01D2:"o",\u00F4:"o",\u1ED1:"o",\u1ED9:"o",\u1ED3:"o",\u1ED5:"o",\u1ED7:"o",\u00F6:"o",\u022B:"o",\u022F:"o",\u0231:"o",\u1ECD:"o",\u0151:"o",\u020D:"o",\u00F2:"o",\u1ECF:"o",\u01A1:"o",\u1EDB:"o",\u1EE3:"o",\u1EDD:"o",\u1EDF:"o",\u1EE1:"o",\u020F:"o","\uA74B":"o","\uA74D":"o","\u2C7A":"o",\u014D:"o",\u1E53:"o",\u1E51:"o",\u01EB:"o",\u01ED:"o",\u00F8:"o",\u01FF:"o",\u00F5:"o",\u1E4D:"o",\u1E4F:"o",\u022D:"o",\u01A3:"oi","\uA74F":"oo",\u025B:"e","\u1D93":"e",\u0254:"o","\u1D97":"o",\u0223:"ou",\u1E55:"p",\u1E57:"p","\uA753":"p",\u01A5:"p","\u1D71":"p","\u1D88":"p","\uA755":"p","\u1D7D":"p","\uA751":"p","\uA759":"q",\u02A0:"q","\u024B":"q","\uA757":"q",\u0155:"r",\u0159:"r",\u0157:"r",\u1E59:"r",\u1E5B:"r",\u1E5D:"r",\u0211:"r",\u027E:"r","\u1D73":"r",\u0213:"r",\u1E5F:"r",\u027C:"r","\u1D72":"r","\u1D89":"r","\u024D":"r",\u027D:"r","\u2184":"c","\uA73F":"c",\u0258:"e",\u027F:"r",\u015B:"s",\u1E65:"s",\u0161:"s",\u1E67:"s",\u015F:"s",\u015D:"s",\u0219:"s",\u1E61:"s",\u1E63:"s",\u1E69:"s",\u0282:"s","\u1D74":"s","\u1D8A":"s","\u023F":"s",\u0261:"g","\u1D11":"o","\u1D13":"o","\u1D1D":"u",\u0165:"t",\u0163:"t",\u1E71:"t",\u021B:"t","\u0236":"t",\u1E97:"t","\u2C66":"t",\u1E6B:"t",\u1E6D:"t",\u01AD:"t",\u1E6F:"t","\u1D75":"t",\u01AB:"t",\u0288:"t",\u0167:"t","\u1D7A":"th",\u0250:"a","\u1D02":"ae",\u01DD:"e","\u1D77":"g",\u0265:"h","\u02AE":"h","\u02AF":"h","\u1D09":"i",\u029E:"k","\uA781":"l",\u026F:"m",\u0270:"m","\u1D14":"oe",\u0279:"r",\u027B:"r",\u027A:"r","\u2C79":"r",\u0287:"t",\u028C:"v",\u028D:"w",\u028E:"y","\uA729":"tz",\u00FA:"u",\u016D:"u",\u01D4:"u",\u00FB:"u",\u1E77:"u",\u00FC:"u",\u01D8:"u",\u01DA:"u",\u01DC:"u",\u01D6:"u",\u1E73:"u",\u1EE5:"u",\u0171:"u",\u0215:"u",\u00F9:"u",\u1EE7:"u",\u01B0:"u",\u1EE9:"u",\u1EF1:"u",\u1EEB:"u",\u1EED:"u",\u1EEF:"u",\u0217:"u",\u016B:"u",\u1E7B:"u",\u0173:"u","\u1D99":"u",\u016F:"u",\u0169:"u",\u1E79:"u",\u1E75:"u","\u1D6B":"ue","\uA778":"um","\u2C74":"v","\uA75F":"v",\u1E7F:"v",\u028B:"v","\u1D8C":"v","\u2C71":"v",\u1E7D:"v","\uA761":"vy",\u1E83:"w",\u0175:"w",\u1E85:"w",\u1E87:"w",\u1E89:"w",\u1E81:"w","\u2C73":"w",\u1E98:"w",\u1E8D:"x",\u1E8B:"x","\u1D8D":"x",\u00FD:"y",\u0177:"y",\u00FF:"y",\u1E8F:"y",\u1EF5:"y",\u1EF3:"y",\u01B4:"y",\u1EF7:"y","\u1EFF":"y",\u0233:"y",\u1E99:"y","\u024F":"y",\u1EF9:"y",\u017A:"z",\u017E:"z",\u1E91:"z",\u0291:"z","\u2C6C":"z",\u017C:"z",\u1E93:"z",\u0225:"z",\u1E95:"z","\u1D76":"z","\u1D8E":"z",\u0290:"z",\u01B6:"z","\u0240":"z",\uFB00:"ff",\uFB03:"ffi",\uFB04:"ffl",\uFB01:"fi",\uFB02:"fl",\u0133:"ij",\u0153:"oe",\uFB06:"st","\u2090":"a","\u2091":"e","\u1D62":"i","\u2C7C":"j","\u2092":"o","\u1D63":"r","\u1D64":"u","\u1D65":"v","\u2093":"x"};var z=class{constructor(n,a=n,e=!1){this.item=n,this.value=a,this.header=e}isHeader(){return this.header}toString(){return this.value}};function q(s){return s?s.replace(/[^A-Za-z0-9[\] ]/g,function(n){return Ut[n]||n}):""}function Se(s,n=" ",a="",e){let t=[];if(!e)t=dt(s,n,a);else{let i=`([${e}]+)`,r=s.split(new RegExp(i,"g")),o=r[r.length-1];o>""&&(n&&a?t=dt(o,n,a):t.push(o))}return t}function dt(s,n,a){let e=[],t=`(?:[${a}])([^${a}]+)(?:[${a}])|([^${n}]+)`,i=s.split(new RegExp(t,"g")),r=i.length,o,c=new RegExp(`[${a}]+`,"g");for(let f=0;f<r;f+=1)o=i[f],o&&o.length&&o!==n&&e.push(o.replace(c,""));return e}function D(s,n){if(!n||typeof s!="object")return s.toString();if(n.endsWith("()")){let t=n.slice(0,n.length-2);return s[t]().toString()}let e=n.replace(/\[(\w+)\]/g,".$1").replace(/^\./,"").split(".");for(let t of e)t in s&&(s=s[t]);return s?s.toString():""}var pt="220ms cubic-bezier(0, 0, 0.2, 1)",Vt=qe("typeaheadAnimation",[Oe("animated-down",Y({height:"*",overflow:"hidden"})),de("* => animated-down",[Y({height:0,overflow:"hidden"}),he(pt)]),Oe("animated-up",Y({height:"*",overflow:"hidden"})),de("* => animated-up",[Y({height:"*",overflow:"hidden"}),he(pt)]),de("* => unanimated",he("0s"))]),Bt=0,Ht=(()=>{let n=class n{get typeaheadTemplateMethods(){return{selectMatch:this.selectMatch.bind(this),selectActive:this.selectActive.bind(this),isActive:this.isActive.bind(this)}}constructor(e,t,i,r){this.positionService=e,this.renderer=t,this.element=i,this.changeDetectorRef=r,this.activeChangeEvent=new v,this.isFocused=!1,this.positionServiceSubscription=new Ee,this.height=0,this.popupId=`ngb-typeahead-${Bt++}`,this._matches=[],this.renderer.setAttribute(this.element.nativeElement,"id",this.popupId),this.positionServiceSubscription.add(this.positionService.event$?.subscribe(()=>{if(this.isAnimated){this.animationState=this.isTopPosition?"animated-up":"animated-down",this.changeDetectorRef.detectChanges();return}this.animationState="unanimated",this.changeDetectorRef.detectChanges()}))}get active(){return this._active}set active(e){this._active=e,this.activeChanged()}get matches(){return this._matches}set matches(e){if(this.positionService.setOptions({modifiers:{flip:{enabled:this.adaptivePosition}},allowedPositions:["top","bottom"]}),this._matches=e,this.needScrollbar=this.typeaheadScrollable&&this.typeaheadOptionsInScrollableView<this.matches.length,this.typeaheadScrollable&&setTimeout(()=>{this.setScrollableMode()}),this.typeaheadIsFirstItemActive&&this._matches.length>0&&(this.setActive(this._matches[0]),this._active?.isHeader()&&this.nextActiveMatch()),this._active&&!this.typeaheadIsFirstItemActive){let t=this._matches.find(i=>i.value===this._active?.value);if(t){this.selectActive(t);return}this.active=void 0}}get isTopPosition(){return this.element.nativeElement.classList.contains("top")}get optionsListTemplate(){return this.parent?this.parent.optionsListTemplate:void 0}get isAnimated(){return this.parent?this.parent.isAnimated:!1}get adaptivePosition(){return this.parent?this.parent.adaptivePosition:!1}get typeaheadScrollable(){return this.parent?this.parent.typeaheadScrollable:!1}get typeaheadOptionsInScrollableView(){return this.parent?this.parent.typeaheadOptionsInScrollableView:5}get typeaheadIsFirstItemActive(){return this.parent?this.parent.typeaheadIsFirstItemActive:!0}get itemTemplate(){return this.parent?this.parent.typeaheadItemTemplate:void 0}get canSelectItemsOnBlur(){return!!this.parent?.selectItemOnBlur}selectActiveMatch(e){this._active&&this.parent?.typeaheadSelectFirstItem&&this.selectMatch(this._active),!this.parent?.typeaheadSelectFirstItem&&e&&this.selectMatch(this._active)}activeChanged(){if(!this._active)return;let e=this.matches.indexOf(this._active);this.activeChangeEvent.emit(`${this.popupId}-${e}`)}prevActiveMatch(){if(!this._active)return;let e=this.matches.indexOf(this._active);this.setActive(this.matches[e-1<0?this.matches.length-1:e-1]),this._active.isHeader()&&this.prevActiveMatch(),this.typeaheadScrollable&&this.scrollPrevious(e)}nextActiveMatch(){let e=this._active?this.matches.indexOf(this._active):-1;this.setActive(this.matches[e+1>this.matches.length-1?0:e+1]),this._active?.isHeader()&&this.nextActiveMatch(),this.typeaheadScrollable&&this.scrollNext(e)}selectActive(e){this.isFocused=!0,this.setActive(e)}highlight(e,t){let i=e.value,r=(this.parent&&this.parent.typeaheadLatinize?q(i):i).toLowerCase(),o,c;if(typeof t=="object"){let f=t.length;for(let R=0;R<f;R+=1)o=r.indexOf(t[R]),c=t[R].length,o>=0&&c>0&&(i=`${i.substring(0,o)}<strong>${i.substring(o,o+c)}</strong>${i.substring(o+c)}`,r=`${r.substring(0,o)}????????${"??".repeat(c)}??????????${r.substring(o+c)}`)}else t&&(o=r.indexOf(t),c=t.length,o>=0&&c>0&&(i=`${i.substring(0,o)}<strong>${i.substring(o,o+c)}</strong>${i.substring(o+c)}`));return i}focusLost(){this.isFocused=!1,this.canSelectItemsOnBlur||this.setActive(void 0)}isActive(e){return this.active===e}selectMatch(e,t){return t&&(t.stopPropagation(),t.preventDefault()),this.parent?.changeModel(e),setTimeout(()=>this.parent?.typeaheadOnSelect.emit(e),0),!1}setScrollableMode(){if(this.ulElement||(this.ulElement=this.element),this.liElements?.first){let e=Te.getStyles(this.ulElement.nativeElement),t=Te.getStyles(this.liElements.first.nativeElement),i=parseFloat((e["padding-bottom"]?e["padding-bottom"]:"").replace("px","")),r=parseFloat((e["padding-top"]?e["padding-top"]:"0").replace("px","")),o=parseFloat((t.height?t.height:"0").replace("px","")),c=this.typeaheadOptionsInScrollableView*o;this.guiHeight=`${c+r+i}px`}this.renderer.setStyle(this.element.nativeElement,"visibility","visible")}scrollPrevious(e){if(e===0){this.scrollToBottom();return}if(this.liElements&&this.ulElement){let t=this.liElements.toArray()[e-1];t&&!this.isScrolledIntoView(t.nativeElement)&&(this.ulElement.nativeElement.scrollTop=t.nativeElement.offsetTop)}}scrollNext(e){if(e+1>this.matches.length-1){this.scrollToTop();return}if(this.liElements&&this.ulElement){let t=this.liElements.toArray()[e+1];t&&!this.isScrolledIntoView(t.nativeElement)&&(this.ulElement.nativeElement.scrollTop=t.nativeElement.offsetTop-Number(this.ulElement.nativeElement.offsetHeight)+Number(t.nativeElement.offsetHeight))}}ngOnDestroy(){this.positionServiceSubscription.unsubscribe()}setActive(e){this._active=e;let t;this._active==null||this._active.isHeader()||(t=e),this.parent?.typeaheadOnPreview.emit(t)}isScrolledIntoView(e){if(!this.ulElement)return!1;let t=this.ulElement.nativeElement.scrollTop,i=t+Number(this.ulElement.nativeElement.offsetHeight),r=e.offsetTop;return r+e.offsetHeight<=i&&r>=t}scrollToBottom(){this.ulElement?.nativeElement&&(this.ulElement.nativeElement.scrollTop=this.ulElement.nativeElement.scrollHeight)}scrollToTop(){this.ulElement?.nativeElement&&(this.ulElement.nativeElement.scrollTop=0)}};n.\u0275fac=function(t){return new(t||n)(u(Z),u(U),u(A),u(Q))},n.\u0275cmp=V({type:n,selectors:[["typeahead-container"]],viewQuery:function(t,i){if(t&1&&($(Et,5),$(wt,5)),t&2){let r;W(r=K())&&(i.ulElement=r.first),W(r=K())&&(i.liElements=r)}},hostAttrs:[1,"dropdown","open","bottom","dropdown-menu",2,"position","absolute","display","block"],hostVars:7,hostBindings:function(t,i){t&1&&C("mouseleave",function(){return i.focusLost()})("blur",function(){return i.focusLost()}),t&2&&(L("role","listbox"),De("height",i.needScrollbar?i.guiHeight:"auto")("visibility","inherit"),F("dropup",i.dropup))},outputs:{activeChangeEvent:"activeChange"},features:[be([Z])],decls:5,vars:7,consts:[["bsItemTemplate",""],["bs4Template",""],["liElements",""],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[3,"innerHtml"],["ngFor","",3,"ngForOf"],["class","dropdown-header",4,"ngIf"],[3,"ngIf"],[1,"dropdown-header"],["role","option",1,"dropdown-item",3,"click","mouseenter","id"]],template:function(t,i){if(t&1&&O(0,At,0,0,"ng-template",3)(1,kt,1,1,"ng-template",null,0,G)(3,Rt,1,1,"ng-template",null,1,G),t&2){let r=H(2),o=H(4);d("ngTemplateOutlet",i.optionsListTemplate||o)("ngTemplateOutletContext",xe(2,It,i.matches,i.itemTemplate||r,i.query,i.typeaheadTemplateMethods))}},dependencies:[He,oe,le],styles:[".dropdown[_nghost-%COMP%]{z-index:1000}.dropdown-menu[_nghost-%COMP%], .dropdown-menu[_ngcontent-%COMP%]{overflow-y:auto;height:100px}"],data:{animation:[Vt]}});let s=n;return s})(),mt=(()=>{let n=class n{constructor(){this.adaptivePosition=!1,this.isAnimated=!1,this.hideResultsOnBlur=!0,this.cancelRequestOnFocusLost=!1,this.selectFirstItem=!0,this.isFirstItemActive=!0,this.minLength=1,this.selectItemOnBlur=!1}};n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=te({token:n,factory:n.\u0275fac,providedIn:"root"});let s=n;return s})(),ut=(()=>{let n=class n{constructor(e,t,i,r,o,c,f){this.changeDetection=i,this.element=r,this.ngControl=o,this.renderer=c,this.typeaheadMinLength=1,this.adaptivePosition=!1,this.isAnimated=!1,this.typeaheadWaitMs=0,this.typeaheadLatinize=!0,this.typeaheadSingleWords=!0,this.typeaheadWordDelimiters=" ",this.typeaheadMultipleSearchDelimiters=",",this.typeaheadPhraseDelimiters=`'"`,this.typeaheadScrollable=!1,this.typeaheadOptionsInScrollableView=5,this.typeaheadSelectFirstItem=!0,this.typeaheadIsFirstItemActive=!0,this.typeaheadLoading=new v,this.typeaheadNoResults=new v,this.typeaheadOnSelect=new v,this.typeaheadOnPreview=new v,this.typeaheadOnBlur=new v,this.dropup=!1,this.isOpen=!1,this.list="list",this.isActiveItemChanged=!1,this.isFocused=!1,this.cancelRequestOnFocusLost=!1,this.selectItemOnBlur=!1,this.keyUpEventEmitter=new v,this.placement="bottom left",this._matches=[],this._subscriptions=[],this._outsideClickListener=()=>{},this._typeahead=e.createLoader(r,f,c).provide({provide:mt,useValue:t}),Object.assign(this,{typeaheadHideResultsOnBlur:t.hideResultsOnBlur,cancelRequestOnFocusLost:t.cancelRequestOnFocusLost,typeaheadSelectFirstItem:t.selectFirstItem,typeaheadIsFirstItemActive:t.isFirstItemActive,typeaheadMinLength:t.minLength,adaptivePosition:t.adaptivePosition,isAnimated:t.isAnimated,selectItemOnBlur:t.selectItemOnBlur})}get matches(){return this._matches}ngOnInit(){this.typeaheadOptionsLimit=this.typeaheadOptionsLimit||20,this.typeaheadMinLength=this.typeaheadMinLength===void 0?1:this.typeaheadMinLength,this.typeaheadAsync===void 0&&!J(this.typeahead)&&(this.typeaheadAsync=!1),J(this.typeahead)&&(this.typeaheadAsync=!0),this.typeaheadAsync?this.asyncActions():this.syncActions(),this.checkDelimitersConflict()}onInput(e){let t=e.target.value!==void 0?e.target.value:e.target.textContent!==void 0?e.target.textContent:e.target.innerText;t!=null&&t.trim().length>=this.typeaheadMinLength?(this.typeaheadLoading.emit(!0),this.keyUpEventEmitter.emit(e.target.value)):(this.typeaheadLoading.emit(!1),this.typeaheadNoResults.emit(!1),this.hide())}onChange(e){if(this._container){if(e.keyCode===27||e.key==="Escape"){this.hide();return}if(e.keyCode===38||e.key==="ArrowUp"){this.isActiveItemChanged=!0,this._container.prevActiveMatch();return}if(e.keyCode===40||e.key==="ArrowDown"){this.isActiveItemChanged=!0,this._container.nextActiveMatch();return}if(e.keyCode===13||e.key==="Enter"){this._container.selectActiveMatch();return}}}onFocus(){this.isFocused=!0,setTimeout(()=>{this.typeaheadMinLength===0&&(this.typeaheadLoading.emit(!0),this.keyUpEventEmitter.emit(this.element.nativeElement.value||""))},0)}onBlur(){this.isFocused=!1,this._container&&!this._container.isFocused&&this.typeaheadOnBlur.emit(this._container.active),!this.container&&this._matches?.length===0&&this.typeaheadOnBlur.emit(new z(this.element.nativeElement.value,this.element.nativeElement.value,!1))}onKeydown(e){if(this._container&&((e.keyCode===9||e.key==="Tab")&&this.onBlur(),e.keyCode===9||e.key==="Tab"||e.keyCode===13||e.key==="Enter")){if(e.preventDefault(),this.typeaheadSelectFirstItem){this._container.selectActiveMatch();return}this.typeaheadSelectFirstItem||(this._container.selectActiveMatch(this.isActiveItemChanged),this.isActiveItemChanged=!1,this.hide())}}changeModel(e){if(!e)return;let t;if(this.typeaheadMultipleSearch&&this._allEnteredValue){let i=this._allEnteredValue.split(new RegExp(`([${this.typeaheadMultipleSearchDelimiters}]+)`));this._allEnteredValue=i.slice(0,i.length-1).concat(e.value).join(""),t=this._allEnteredValue}else t=e.value;this.ngControl.viewToModelUpdate(t),this.ngControl.control?.setValue(t),this.changeDetection.markForCheck(),this.hide()}show(){if(this._typeahead.attach(Ht).to(this.container).position({attachment:`${this.dropup?"top":"bottom"} left`}).show({typeaheadRef:this,placement:this.placement,animation:!1,dropup:this.dropup}),this._outsideClickListener=this.renderer.listen("document","click",t=>{this.typeaheadMinLength===0&&this.element.nativeElement.contains(t.target)||!this.typeaheadHideResultsOnBlur||this.element.nativeElement.contains(t.target)||this.onOutsideClick()}),!this._typeahead.instance||!this.ngControl.control)return;this._container=this._typeahead.instance,this._container.parent=this;let e=(this.typeaheadLatinize?q(this.ngControl.control.value):this.ngControl.control.value).toString().toLowerCase();this._container.query=this.tokenizeQuery(e),this._container.matches=this._matches,this.element.nativeElement.focus(),this._container.activeChangeEvent.subscribe(t=>{this.activeDescendant=t,this.changeDetection.markForCheck()}),this.isOpen=!0}hide(){this._typeahead.isShown&&(this._typeahead.hide(),this._outsideClickListener(),this._container=void 0,this.isOpen=!1,this.changeDetection.markForCheck()),this.typeaheadOnPreview.emit()}onOutsideClick(){this._container&&!this._container.isFocused&&this.hide()}ngOnDestroy(){for(let e of this._subscriptions)e.unsubscribe();this._typeahead.dispose()}asyncActions(){this._subscriptions.push(this.keyUpEventEmitter.pipe(ue(this.typeaheadWaitMs),ee(e=>this._allEnteredValue=e),ke(()=>this.typeahead?this.typeahead:me)).subscribe(e=>{this.finalizeAsyncCall(e)}))}syncActions(){this._subscriptions.push(this.keyUpEventEmitter.pipe(ue(this.typeaheadWaitMs),X(e=>{this._allEnteredValue=e;let t=this.normalizeQuery(e);return this.typeahead?(J(this.typeahead)?this.typeahead:Ie(this.typeahead)).pipe(Me(r=>!!r&&this.testMatch(this.normalizeOption(r),t)),Ae()):me})).subscribe(e=>{this.finalizeAsyncCall(e)}))}normalizeOption(e){let t=D(e,this.typeaheadOptionField);return(this.typeaheadLatinize?q(t):t).toLowerCase()}tokenizeQuery(e){let t=e;return this.typeaheadMultipleSearch&&this.typeaheadSingleWords?this.haveCommonCharacters(`${this.typeaheadPhraseDelimiters}${this.typeaheadWordDelimiters}`,this.typeaheadMultipleSearchDelimiters)||(t=Se(t,this.typeaheadWordDelimiters,this.typeaheadPhraseDelimiters,this.typeaheadMultipleSearchDelimiters)):this.typeaheadSingleWords?t=Se(t,this.typeaheadWordDelimiters,this.typeaheadPhraseDelimiters):t=Se(t,void 0,void 0,this.typeaheadMultipleSearchDelimiters),t}normalizeQuery(e){let t=(this.typeaheadLatinize?q(e):e).toString().toLowerCase();return t=this.tokenizeQuery(t),t}testMatch(e,t){let i;if(typeof t=="object"){i=t.length;for(let r=0;r<i;r+=1)if(t[r].length>0&&e.indexOf(t[r])<0)return!1;return!0}return e.indexOf(t)>=0}finalizeAsyncCall(e){if(this.prepareMatches(e||[]),this.typeaheadLoading.emit(!1),this.typeaheadNoResults.emit(!this.hasMatches()),!this.hasMatches()){this.hide();return}if(!(!this.isFocused&&this.cancelRequestOnFocusLost))if(this._container&&this.ngControl.control){let i=((this.typeaheadLatinize?q(this.ngControl.control.value):this.ngControl.control.value)||"").toString().toLowerCase();this._container.query=this.tokenizeQuery(i),this._container.matches=this._matches}else this.show()}prepareMatches(e){let t=e.slice(0,this.typeaheadOptionsLimit),i=this.typeaheadOrderBy?this.orderMatches(t):t;if(this.typeaheadGroupField){let r=[];i.map(c=>D(c,this.typeaheadGroupField)).filter((c,f,R)=>R.indexOf(c)===f).forEach(c=>{r.push(new z(c,c,!0)),r=r.concat(i.filter(f=>D(f,this.typeaheadGroupField)===c).map(f=>new z(f,D(f,this.typeaheadOptionField))))}),this._matches=r}else this._matches=i.map(r=>new z(r,D(r,this.typeaheadOptionField)))}orderMatches(e){if(!e.length)return e;if(this.typeaheadOrderBy!==null&&this.typeaheadOrderBy!==void 0&&typeof this.typeaheadOrderBy=="object"&&Object.keys(this.typeaheadOrderBy).length===0)return console.error("Field and direction properties for typeaheadOrderBy have to be set according to documentation!"),e;let{field:t,direction:i}=this.typeaheadOrderBy||{};return!i||!(i==="asc"||i==="desc")?(console.error('typeaheadOrderBy direction has to equal "asc" or "desc". Please follow the documentation.'),e):typeof e[0]=="string"?i==="asc"?e.sort():e.sort().reverse():!t||typeof t!="string"?(console.error("typeaheadOrderBy field has to set according to the documentation."),e):e.sort((r,o)=>{let c=D(r,t),f=D(o,t);return c<f?i==="asc"?-1:1:c>f?i==="asc"?1:-1:0})}hasMatches(){return this._matches.length>0}checkDelimitersConflict(){if(this.typeaheadMultipleSearch&&this.typeaheadSingleWords&&this.haveCommonCharacters(`${this.typeaheadPhraseDelimiters}${this.typeaheadWordDelimiters}`,this.typeaheadMultipleSearchDelimiters))throw new Error(`Delimiters used in typeaheadMultipleSearchDelimiters must be different
1
+ import{g as lt,h as ct}from"./chunk-MAVDZOWK.js";import{B as x,Ib as st,Kb as at,Mb as rt,Qb as ot,Xa as nt,e as Te,g as Z,j as qe,k as he,m as Y,n as Oe,o as de,t as pe,ua as it,v as Je,w as Xe}from"./chunk-H3O3N5LY.js";import{$ as ee,$b as Ue,Ac as le,Cb as C,Dc as He,E as Me,Eb as l,Ed as Ze,Fa as j,Fb as Pe,Fd as Ye,Ga as fe,Gb as Le,Gc as Ne,H as Ae,Hc as ce,Ib as $,J as ue,Jb as W,Kb as K,Lb as H,Ma as h,Mb as De,Na as Fe,Nb as F,Ob as re,Pb as b,Qa as U,Qb as T,Ra as u,Sa as ne,Tb as ge,Ub as ve,Vb as Ce,Xa as V,Xb as Re,Ya as se,Z as ke,Za as k,Zb as be,Zc as ze,_a as B,a as Ee,ab as O,ad as je,bb as v,c as we,ca as te,cb as ae,cc as xe,da as ie,dc as I,dd as $e,ec as Ve,ed as We,fc as P,ha as M,hc as G,ib as L,jb as S,jd as Ke,k as me,kb as E,kf as et,ma as y,na as _,nb as ye,o as Ie,ob as _e,of as tt,pb as d,qb as p,qc as Q,r as J,rb as m,sb as g,wd as Ge,x as X,xc as Be,ya as A,yd as Qe,zb as w,zc as oe}from"./chunk-JQOMI5VI.js";var li=(()=>{let n=class n{transform(e,t="L HH:mm:ss"){return e?(0,x.default)(e).format(t):""}};n.\u0275fac=function(t){return new(t||n)},n.\u0275pipe=B({name:"amDateFormat",type:n,pure:!0});let s=n;return s})();var _t=["*"],gt=s=>["nav-item",s];function vt(s,n){if(s&1){let a=w();p(0,"span",7),C("click",function(t){y(a);let i=l().$implicit,r=l();return t.preventDefault(),_(r.removeTab(i))}),b(1," \u274C"),m()}}function Ct(s,n){if(s&1){let a=w();p(0,"li",3),C("keydown",function(t){let i=y(a).index,r=l();return _(r.keyNavActions(t,i))}),p(1,"a",4),C("click",function(){let t=y(a).$implicit;return _(t.active=!0)}),p(2,"span",5),b(3),m(),O(4,vt,2,0,"span",6),m()()}if(s&2){let a=n.$implicit;F("active",a.active)("disabled",a.disabled),d("ngClass",Ue(15,gt,a.customClass||"")),h(),F("active",a.active)("disabled",a.disabled),L("aria-controls",a.id?a.id:"")("aria-selected",!!a.active)("id",a.id?a.id+"-link":""),h(),d("ngTransclude",a.headingRef),h(),T(a.heading),h(),d("ngIf",a.removable)}}var bt=(()=>{let n=class n{set ngTransclude(e){this._ngTransclude=e,e&&this.viewRef.createEmbeddedView(e)}get ngTransclude(){return this._ngTransclude}constructor(e){this.viewRef=e}};n.\u0275fac=function(t){return new(t||n)(u(ne))},n.\u0275dir=k({type:n,selectors:[["","ngTransclude",""]],inputs:{ngTransclude:"ngTransclude"}});let s=n;return s})(),xt=(()=>{let n=class n{constructor(){this.type="tabs",this.isKeysAllowed=!0,this.ariaLabel="Tabs"}};n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=te({token:n,factory:n.\u0275fac,providedIn:"root"});let s=n;return s})(),Tt=(()=>{let n=class n{get vertical(){return this._vertical}set vertical(e){this._vertical=e,this.setClassMap()}get justified(){return this._justified}set justified(e){this._justified=e,this.setClassMap()}get type(){return this._type}set type(e){this._type=e,this.setClassMap()}get isKeysAllowed(){return this._isKeysAllowed}set isKeysAllowed(e){this._isKeysAllowed=e}constructor(e,t,i){this.renderer=t,this.elementRef=i,this.clazz=!0,this.tabs=[],this.classMap={},this.ariaLabel="Tabs",this.isDestroyed=!1,this._vertical=!1,this._justified=!1,this._type="tabs",this._isKeysAllowed=!0,Object.assign(this,e)}ngOnDestroy(){this.isDestroyed=!0}addTab(e){e.tabOrder!==void 0?this.insertTabByOrder(e):this.tabs.push(e),e.active=this.tabs.length===1&&!e.active}insertTabByOrder(e){let t=this.tabs.length;for(let i=0;i<this.tabs.length;i++){let r=this.tabs[i];if(r.tabOrder!==void 0&&e.tabOrder!==void 0&&e.tabOrder<r.tabOrder){t=i;break}if(r.tabOrder===void 0){t=i;break}}this.tabs.splice(t,0,e)}removeTab(e,t={reselect:!0,emit:!0}){let i=this.tabs.indexOf(e);if(!(i===-1||this.isDestroyed)){if(t.reselect&&e.active&&this.hasAvailableTabs(i)){let r=this.getClosestTabIndex(i);this.tabs[r].active=!0}t.emit&&e.removed.emit(e),this.tabs.splice(i,1),e.elementRef.nativeElement.parentNode&&this.renderer.removeChild(e.elementRef.nativeElement.parentNode,e.elementRef.nativeElement)}}keyNavActions(e,t){if(!this.isKeysAllowed)return;let i=Array.from(this.elementRef.nativeElement.querySelectorAll(".nav-link"));if(e.keyCode===13||e.key==="Enter"||e.keyCode===32||e.key==="Space"){e.preventDefault(),i[t%i.length].click();return}if(e.keyCode===39||e.key==="RightArrow"){let r,o=1;do r=i[(t+o)%i.length],o++;while(r.classList.contains("disabled"));r.focus();return}if(e.keyCode===37||e.key==="LeftArrow"){let r,o=1,c=t;do c-o<0?(c=i.length-1,r=i[c],o=0):r=i[c-o],o++;while(r.classList.contains("disabled"));r.focus();return}if(e.keyCode===36||e.key==="Home"){e.preventDefault();let r,o=0;do r=i[o%i.length],o++;while(r.classList.contains("disabled"));r.focus();return}if(e.keyCode===35||e.key==="End"){e.preventDefault();let r,o=1,c=t;do c-o<0?(c=i.length-1,r=i[c],o=0):r=i[c-o],o++;while(r.classList.contains("disabled"));r.focus();return}if((e.keyCode===46||e.key==="Delete")&&this.tabs[t].removable){if(this.removeTab(this.tabs[t]),i[t+1]){i[(t+1)%i.length].focus();return}i[i.length-1]&&i[0].focus()}}getClosestTabIndex(e){let t=this.tabs.length;if(!t)return-1;for(let i=1;i<=t;i+=1){let r=e-i,o=e+i;if(this.tabs[r]&&!this.tabs[r].disabled)return r;if(this.tabs[o]&&!this.tabs[o].disabled)return o}return-1}hasAvailableTabs(e){let t=this.tabs.length;if(!t)return!1;for(let i=0;i<t;i+=1)if(!this.tabs[i].disabled&&i!==e)return!0;return!1}setClassMap(){this.classMap={"nav-stacked":this.vertical,"flex-column":this.vertical,"nav-justified":this.justified,[`nav-${this.type}`]:!0}}};n.\u0275fac=function(t){return new(t||n)(u(xt),u(U),u(A))},n.\u0275cmp=V({type:n,selectors:[["tabset"]],hostVars:2,hostBindings:function(t,i){t&2&&F("tab-container",i.clazz)},inputs:{vertical:"vertical",justified:"justified",type:"type"},ngContentSelectors:_t,decls:4,vars:3,consts:[["role","tablist",1,"nav",3,"click","ngClass"],[3,"ngClass","active","disabled","keydown",4,"ngFor","ngForOf"],[1,"tab-content"],[3,"keydown","ngClass"],["href","javascript:void(0);","role","tab",1,"nav-link",3,"click"],[3,"ngTransclude"],["class","bs-remove-tab",3,"click",4,"ngIf"],[1,"bs-remove-tab",3,"click"]],template:function(t,i){t&1&&(Pe(),p(0,"ul",0),C("click",function(o){return o.preventDefault()}),O(1,Ct,5,17,"li",1),m(),p(2,"div",2),Le(3),m()),t&2&&(d("ngClass",i.classMap),L("aria-label",i.ariaLabel),h(),d("ngForOf",i.tabs))},dependencies:[Be,oe,bt,le],styles:["[_nghost-%COMP%] .nav-tabs[_ngcontent-%COMP%] .nav-item.disabled[_ngcontent-%COMP%] a.disabled[_ngcontent-%COMP%]{cursor:default}"]});let s=n;return s})(),Ot=(()=>{let n=class n{get customClass(){return this._customClass}set customClass(e){this.customClass&&this.customClass.split(" ").forEach(t=>{this.renderer.removeClass(this.elementRef.nativeElement,t)}),this._customClass=e?e.trim():"",this.customClass&&this.customClass.split(" ").forEach(t=>{this.renderer.addClass(this.elementRef.nativeElement,t)})}get active(){return this._active}set active(e){if(this._active!==e){if(this.disabled&&e||!e){this._active&&!e&&(this.deselect.emit(this),this._active=e);return}this._active=e,this.selectTab.emit(this),this.tabset.tabs.forEach(t=>{t!==this&&(t.active=!1)})}}get ariaLabelledby(){return this.id?`${this.id}-link`:""}constructor(e,t,i){this.elementRef=t,this.renderer=i,this.disabled=!1,this.removable=!1,this.selectTab=new v,this.deselect=new v,this.removed=new v,this.addClass=!0,this.role="tabpanel",this._active=!1,this._customClass="",this.tabset=e}ngOnInit(){this.removable=!!this.removable,this.tabset.addTab(this)}ngOnDestroy(){this.tabset.removeTab(this,{reselect:!1,emit:!1})}};n.\u0275fac=function(t){return new(t||n)(u(Tt),u(A),u(U))},n.\u0275dir=k({type:n,selectors:[["tab"],["","tab",""]],hostVars:7,hostBindings:function(t,i){t&2&&(L("id",i.id)("role",i.role)("aria-labelledby",i.ariaLabelledby),F("active",i.active)("tab-pane",i.addClass))},inputs:{heading:"heading",id:"id",disabled:"disabled",removable:"removable",tabOrder:"tabOrder",customClass:"customClass",active:"active"},outputs:{selectTab:"selectTab",deselect:"deselect",removed:"removed"},exportAs:["tab"]});let s=n;return s})(),vi=(()=>{let n=class n{constructor(e,t){t.headingRef=e}};n.\u0275fac=function(t){return new(t||n)(u(Fe),u(Ot))},n.\u0275dir=k({type:n,selectors:[["","tabHeading",""]]});let s=n;return s})(),Ci=(()=>{let n=class n{static forRoot(){return{ngModule:n,providers:[]}}};n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=se({type:n}),n.\u0275inj=ie({imports:[ce]});let s=n;return s})();var Si=(()=>{let n=class n{constructor(){this.autoFocus=!0,this.autoSelect=!0,this.elementRef=M(A)}ngOnInit(){setTimeout(()=>{this.autoFocus&&this.elementRef.nativeElement.focus(),this.autoSelect&&this.elementRef.nativeElement.select()},0)}};n.\u0275fac=function(t){return new(t||n)},n.\u0275dir=k({type:n,selectors:[["","appAutofocus",""]],inputs:{autoFocus:"autoFocus",autoSelect:"autoSelect"}});let s=n;return s})();var ht=(()=>{let n=class n{constructor(){this.cdRef=M(Q),this.ngZone=M(ae)}format(e){return e.from((0,x.default)(),this.lastOmitSuffix)}transform(e,t,i){return this.hasChanged(e,t)?(this.lastTime=this.getTime(e),this.lastValue=e,this.lastOmitSuffix=t,this.lastLocale=this.getLocale(e),this.formatFn=i||this.format.bind(this),this.removeTimer(),this.createTimer(),this.lastText=this.formatFn((0,x.default)(e))):this.createTimer(),this.lastText}ngOnDestroy(){this.removeTimer()}createTimer(){if(this.currentTimer)return;let e=(0,x.default)(this.lastValue),t=this.getSecondsUntilUpdate(e)*1e3;this.currentTimer=this.ngZone.runOutsideAngular(()=>typeof window<"u"?window.setTimeout(()=>{this.lastText=this.formatFn((0,x.default)(this.lastValue)),this.currentTimer=null,this.ngZone.run(()=>this.cdRef.markForCheck())},t):null)}removeTimer(){this.currentTimer&&(window.clearTimeout(this.currentTimer),this.currentTimer=null)}getSecondsUntilUpdate(e){let t=Math.abs((0,x.default)().diff(e,"minute"));return t<1?1:t<60?30:t<180?300:3600}hasChanged(e,t){return this.getTime(e)!==this.lastTime||this.getLocale(e)!==this.lastLocale||t!==this.lastOmitSuffix}getTime(e){return e instanceof Date?e.getTime():x.default.isDayjs(e)?e.valueOf():(0,x.default)(e).valueOf()}getLocale(e){return x.default.isDayjs(e)?e.locale():x.default.locale()}};n.\u0275fac=function(t){return new(t||n)},n.\u0275pipe=B({name:"amTimeAgo",type:n,pure:!1});let s=n;return s})();var Et=["ulElement"],wt=["liElements"],It=(s,n,a,e)=>({matches:s,itemTemplate:n,query:a,$implicit:e}),Mt=(s,n,a,e)=>({item:s,index:n,match:a,query:e});function At(s,n){}function kt(s,n){if(s&1&&g(0,"span",4),s&2){let a=n.match,e=n.query,t=l();d("innerHtml",t.highlight(a,e),j)}}function Ft(s,n){if(s&1&&(p(0,"h6",8),b(1),m()),s&2){let a=l().$implicit;h(),T(a)}}function Pt(s,n){}function Lt(s,n){if(s&1){let a=w();p(0,"button",9,2),C("click",function(t){y(a);let i=l().$implicit,r=l(2);return _(r.selectMatch(i,t))})("mouseenter",function(){y(a);let t=l().$implicit,i=l(2);return _(i.selectActive(t))}),O(2,Pt,0,0,"ng-template",3),m()}if(s&2){let a=l(),e=a.$implicit,t=a.index,i=l(2),r=H(2);F("active",i.isActive(e)),d("id",i.popupId+"-"+t)("@typeaheadAnimation",i.animationState),h(2),d("ngTemplateOutlet",i.itemTemplate||r)("ngTemplateOutletContext",xe(6,Mt,e.item,t,e,i.query))}}function Dt(s,n){if(s&1&&O(0,Ft,2,1,"h6",6)(1,Lt,3,11,"ng-template",7),s&2){let a=n.$implicit;d("ngIf",a.isHeader()),h(),d("ngIf",!a.isHeader())}}function Rt(s,n){if(s&1&&O(0,Dt,2,2,"ng-template",5),s&2){let a=l();d("ngForOf",a.matches)}}var Ut={\u00C1:"A",\u0102:"A",\u1EAE:"A",\u1EB6:"A",\u1EB0:"A",\u1EB2:"A",\u1EB4:"A",\u01CD:"A",\u00C2:"A",\u1EA4:"A",\u1EAC:"A",\u1EA6:"A",\u1EA8:"A",\u1EAA:"A",\u00C4:"A",\u01DE:"A",\u0226:"A",\u01E0:"A",\u1EA0:"A",\u0200:"A",\u00C0:"A",\u1EA2:"A",\u0202:"A",\u0100:"A",\u0104:"A",\u00C5:"A",\u01FA:"A",\u1E00:"A","\u023A":"A",\u00C3:"A","\uA732":"AA",\u00C6:"AE",\u01FC:"AE",\u01E2:"AE","\uA734":"AO","\uA736":"AU","\uA738":"AV","\uA73A":"AV","\uA73C":"AY",\u1E02:"B",\u1E04:"B",\u0181:"B",\u1E06:"B","\u0243":"B",\u0182:"B",\u0106:"C",\u010C:"C",\u00C7:"C",\u1E08:"C",\u0108:"C",\u010A:"C",\u0187:"C","\u023B":"C",\u010E:"D",\u1E10:"D",\u1E12:"D",\u1E0A:"D",\u1E0C:"D",\u018A:"D",\u1E0E:"D",\u01F2:"D",\u01C5:"D",\u0110:"D",\u018B:"D",\u01F1:"DZ",\u01C4:"DZ",\u00C9:"E",\u0114:"E",\u011A:"E",\u0228:"E",\u1E1C:"E",\u00CA:"E",\u1EBE:"E",\u1EC6:"E",\u1EC0:"E",\u1EC2:"E",\u1EC4:"E",\u1E18:"E",\u00CB:"E",\u0116:"E",\u1EB8:"E",\u0204:"E",\u00C8:"E",\u1EBA:"E",\u0206:"E",\u0112:"E",\u1E16:"E",\u1E14:"E",\u0118:"E","\u0246":"E",\u1EBC:"E",\u1E1A:"E","\uA76A":"ET",\u1E1E:"F",\u0191:"F",\u01F4:"G",\u011E:"G",\u01E6:"G",\u0122:"G",\u011C:"G",\u0120:"G",\u0193:"G",\u1E20:"G",\u01E4:"G",\u1E2A:"H",\u021E:"H",\u1E28:"H",\u0124:"H","\u2C67":"H",\u1E26:"H",\u1E22:"H",\u1E24:"H",\u0126:"H",\u00CD:"I",\u012C:"I",\u01CF:"I",\u00CE:"I",\u00CF:"I",\u1E2E:"I",\u0130:"I",\u1ECA:"I",\u0208:"I",\u00CC:"I",\u1EC8:"I",\u020A:"I",\u012A:"I",\u012E:"I",\u0197:"I",\u0128:"I",\u1E2C:"I","\uA779":"D","\uA77B":"F","\uA77D":"G","\uA782":"R","\uA784":"S","\uA786":"T","\uA76C":"IS",\u0134:"J","\u0248":"J",\u1E30:"K",\u01E8:"K",\u0136:"K","\u2C69":"K","\uA742":"K",\u1E32:"K",\u0198:"K",\u1E34:"K","\uA740":"K","\uA744":"K",\u0139:"L","\u023D":"L",\u013D:"L",\u013B:"L",\u1E3C:"L",\u1E36:"L",\u1E38:"L","\u2C60":"L","\uA748":"L",\u1E3A:"L",\u013F:"L","\u2C62":"L",\u01C8:"L",\u0141:"L",\u01C7:"LJ",\u1E3E:"M",\u1E40:"M",\u1E42:"M","\u2C6E":"M",\u0143:"N",\u0147:"N",\u0145:"N",\u1E4A:"N",\u1E44:"N",\u1E46:"N",\u01F8:"N",\u019D:"N",\u1E48:"N","\u0220":"N",\u01CB:"N",\u00D1:"N",\u01CA:"NJ",\u00D3:"O",\u014E:"O",\u01D1:"O",\u00D4:"O",\u1ED0:"O",\u1ED8:"O",\u1ED2:"O",\u1ED4:"O",\u1ED6:"O",\u00D6:"O",\u022A:"O",\u022E:"O",\u0230:"O",\u1ECC:"O",\u0150:"O",\u020C:"O",\u00D2:"O",\u1ECE:"O",\u01A0:"O",\u1EDA:"O",\u1EE2:"O",\u1EDC:"O",\u1EDE:"O",\u1EE0:"O",\u020E:"O","\uA74A":"O","\uA74C":"O",\u014C:"O",\u1E52:"O",\u1E50:"O",\u019F:"O",\u01EA:"O",\u01EC:"O",\u00D8:"O",\u01FE:"O",\u00D5:"O",\u1E4C:"O",\u1E4E:"O",\u022C:"O",\u01A2:"OI","\uA74E":"OO",\u0190:"E",\u0186:"O",\u0222:"OU",\u1E54:"P",\u1E56:"P","\uA752":"P",\u01A4:"P","\uA754":"P","\u2C63":"P","\uA750":"P","\uA758":"Q","\uA756":"Q",\u0154:"R",\u0158:"R",\u0156:"R",\u1E58:"R",\u1E5A:"R",\u1E5C:"R",\u0210:"R",\u0212:"R",\u1E5E:"R","\u024C":"R","\u2C64":"R","\uA73E":"C",\u018E:"E",\u015A:"S",\u1E64:"S",\u0160:"S",\u1E66:"S",\u015E:"S",\u015C:"S",\u0218:"S",\u1E60:"S",\u1E62:"S",\u1E68:"S",\u0164:"T",\u0162:"T",\u1E70:"T",\u021A:"T","\u023E":"T",\u1E6A:"T",\u1E6C:"T",\u01AC:"T",\u1E6E:"T",\u01AE:"T",\u0166:"T","\u2C6F":"A","\uA780":"L",\u019C:"M","\u0245":"V","\uA728":"TZ",\u00DA:"U",\u016C:"U",\u01D3:"U",\u00DB:"U",\u1E76:"U",\u00DC:"U",\u01D7:"U",\u01D9:"U",\u01DB:"U",\u01D5:"U",\u1E72:"U",\u1EE4:"U",\u0170:"U",\u0214:"U",\u00D9:"U",\u1EE6:"U",\u01AF:"U",\u1EE8:"U",\u1EF0:"U",\u1EEA:"U",\u1EEC:"U",\u1EEE:"U",\u0216:"U",\u016A:"U",\u1E7A:"U",\u0172:"U",\u016E:"U",\u0168:"U",\u1E78:"U",\u1E74:"U","\uA75E":"V",\u1E7E:"V",\u01B2:"V",\u1E7C:"V","\uA760":"VY",\u1E82:"W",\u0174:"W",\u1E84:"W",\u1E86:"W",\u1E88:"W",\u1E80:"W","\u2C72":"W",\u1E8C:"X",\u1E8A:"X",\u00DD:"Y",\u0176:"Y",\u0178:"Y",\u1E8E:"Y",\u1EF4:"Y",\u1EF2:"Y",\u01B3:"Y",\u1EF6:"Y","\u1EFE":"Y",\u0232:"Y","\u024E":"Y",\u1EF8:"Y",\u0179:"Z",\u017D:"Z",\u1E90:"Z","\u2C6B":"Z",\u017B:"Z",\u1E92:"Z",\u0224:"Z",\u1E94:"Z",\u01B5:"Z",\u0132:"IJ",\u0152:"OE","\u1D00":"A","\u1D01":"AE",\u0299:"B","\u1D03":"B","\u1D04":"C","\u1D05":"D","\u1D07":"E","\uA730":"F",\u0262:"G",\u029B:"G",\u029C:"H",\u026A:"I",\u0281:"R","\u1D0A":"J","\u1D0B":"K",\u029F:"L","\u1D0C":"L","\u1D0D":"M",\u0274:"N","\u1D0F":"O",\u0276:"OE","\u1D10":"O","\u1D15":"OU","\u1D18":"P",\u0280:"R","\u1D0E":"N","\u1D19":"R","\uA731":"S","\u1D1B":"T","\u2C7B":"E","\u1D1A":"R","\u1D1C":"U","\u1D20":"V","\u1D21":"W",\u028F:"Y","\u1D22":"Z",\u00E1:"a",\u0103:"a",\u1EAF:"a",\u1EB7:"a",\u1EB1:"a",\u1EB3:"a",\u1EB5:"a",\u01CE:"a",\u00E2:"a",\u1EA5:"a",\u1EAD:"a",\u1EA7:"a",\u1EA9:"a",\u1EAB:"a",\u00E4:"a",\u01DF:"a",\u0227:"a",\u01E1:"a",\u1EA1:"a",\u0201:"a",\u00E0:"a",\u1EA3:"a",\u0203:"a",\u0101:"a",\u0105:"a","\u1D8F":"a",\u1E9A:"a",\u00E5:"a",\u01FB:"a",\u1E01:"a","\u2C65":"a",\u00E3:"a","\uA733":"aa",\u00E6:"ae",\u01FD:"ae",\u01E3:"ae","\uA735":"ao","\uA737":"au","\uA739":"av","\uA73B":"av","\uA73D":"ay",\u1E03:"b",\u1E05:"b",\u0253:"b",\u1E07:"b","\u1D6C":"b","\u1D80":"b",\u0180:"b",\u0183:"b",\u0275:"o",\u0107:"c",\u010D:"c",\u00E7:"c",\u1E09:"c",\u0109:"c",\u0255:"c",\u010B:"c",\u0188:"c","\u023C":"c",\u010F:"d",\u1E11:"d",\u1E13:"d","\u0221":"d",\u1E0B:"d",\u1E0D:"d",\u0257:"d","\u1D91":"d",\u1E0F:"d","\u1D6D":"d","\u1D81":"d",\u0111:"d",\u0256:"d",\u018C:"d",\u0131:"i","\u0237":"j",\u025F:"j",\u0284:"j",\u01F3:"dz",\u01C6:"dz",\u00E9:"e",\u0115:"e",\u011B:"e",\u0229:"e",\u1E1D:"e",\u00EA:"e",\u1EBF:"e",\u1EC7:"e",\u1EC1:"e",\u1EC3:"e",\u1EC5:"e",\u1E19:"e",\u00EB:"e",\u0117:"e",\u1EB9:"e",\u0205:"e",\u00E8:"e",\u1EBB:"e",\u0207:"e",\u0113:"e",\u1E17:"e",\u1E15:"e","\u2C78":"e",\u0119:"e","\u1D92":"e","\u0247":"e",\u1EBD:"e",\u1E1B:"e","\uA76B":"et",\u1E1F:"f",\u0192:"f","\u1D6E":"f","\u1D82":"f",\u01F5:"g",\u011F:"g",\u01E7:"g",\u0123:"g",\u011D:"g",\u0121:"g",\u0260:"g",\u1E21:"g","\u1D83":"g",\u01E5:"g",\u1E2B:"h",\u021F:"h",\u1E29:"h",\u0125:"h","\u2C68":"h",\u1E27:"h",\u1E23:"h",\u1E25:"h",\u0266:"h",\u1E96:"h",\u0127:"h",\u0195:"hv",\u00ED:"i",\u012D:"i",\u01D0:"i",\u00EE:"i",\u00EF:"i",\u1E2F:"i",\u1ECB:"i",\u0209:"i",\u00EC:"i",\u1EC9:"i",\u020B:"i",\u012B:"i",\u012F:"i","\u1D96":"i",\u0268:"i",\u0129:"i",\u1E2D:"i","\uA77A":"d","\uA77C":"f","\u1D79":"g","\uA783":"r","\uA785":"s","\uA787":"t","\uA76D":"is",\u01F0:"j",\u0135:"j",\u029D:"j","\u0249":"j",\u1E31:"k",\u01E9:"k",\u0137:"k","\u2C6A":"k","\uA743":"k",\u1E33:"k",\u0199:"k",\u1E35:"k","\u1D84":"k","\uA741":"k","\uA745":"k",\u013A:"l",\u019A:"l",\u026C:"l",\u013E:"l",\u013C:"l",\u1E3D:"l","\u0234":"l",\u1E37:"l",\u1E39:"l","\u2C61":"l","\uA749":"l",\u1E3B:"l",\u0140:"l",\u026B:"l","\u1D85":"l",\u026D:"l",\u0142:"l",\u01C9:"lj",\u017F:"s","\u1E9C":"s",\u1E9B:"s","\u1E9D":"s",\u1E3F:"m",\u1E41:"m",\u1E43:"m",\u0271:"m","\u1D6F":"m","\u1D86":"m",\u0144:"n",\u0148:"n",\u0146:"n",\u1E4B:"n","\u0235":"n",\u1E45:"n",\u1E47:"n",\u01F9:"n",\u0272:"n",\u1E49:"n",\u019E:"n","\u1D70":"n","\u1D87":"n",\u0273:"n",\u00F1:"n",\u01CC:"nj",\u00F3:"o",\u014F:"o",\u01D2:"o",\u00F4:"o",\u1ED1:"o",\u1ED9:"o",\u1ED3:"o",\u1ED5:"o",\u1ED7:"o",\u00F6:"o",\u022B:"o",\u022F:"o",\u0231:"o",\u1ECD:"o",\u0151:"o",\u020D:"o",\u00F2:"o",\u1ECF:"o",\u01A1:"o",\u1EDB:"o",\u1EE3:"o",\u1EDD:"o",\u1EDF:"o",\u1EE1:"o",\u020F:"o","\uA74B":"o","\uA74D":"o","\u2C7A":"o",\u014D:"o",\u1E53:"o",\u1E51:"o",\u01EB:"o",\u01ED:"o",\u00F8:"o",\u01FF:"o",\u00F5:"o",\u1E4D:"o",\u1E4F:"o",\u022D:"o",\u01A3:"oi","\uA74F":"oo",\u025B:"e","\u1D93":"e",\u0254:"o","\u1D97":"o",\u0223:"ou",\u1E55:"p",\u1E57:"p","\uA753":"p",\u01A5:"p","\u1D71":"p","\u1D88":"p","\uA755":"p","\u1D7D":"p","\uA751":"p","\uA759":"q",\u02A0:"q","\u024B":"q","\uA757":"q",\u0155:"r",\u0159:"r",\u0157:"r",\u1E59:"r",\u1E5B:"r",\u1E5D:"r",\u0211:"r",\u027E:"r","\u1D73":"r",\u0213:"r",\u1E5F:"r",\u027C:"r","\u1D72":"r","\u1D89":"r","\u024D":"r",\u027D:"r","\u2184":"c","\uA73F":"c",\u0258:"e",\u027F:"r",\u015B:"s",\u1E65:"s",\u0161:"s",\u1E67:"s",\u015F:"s",\u015D:"s",\u0219:"s",\u1E61:"s",\u1E63:"s",\u1E69:"s",\u0282:"s","\u1D74":"s","\u1D8A":"s","\u023F":"s",\u0261:"g","\u1D11":"o","\u1D13":"o","\u1D1D":"u",\u0165:"t",\u0163:"t",\u1E71:"t",\u021B:"t","\u0236":"t",\u1E97:"t","\u2C66":"t",\u1E6B:"t",\u1E6D:"t",\u01AD:"t",\u1E6F:"t","\u1D75":"t",\u01AB:"t",\u0288:"t",\u0167:"t","\u1D7A":"th",\u0250:"a","\u1D02":"ae",\u01DD:"e","\u1D77":"g",\u0265:"h","\u02AE":"h","\u02AF":"h","\u1D09":"i",\u029E:"k","\uA781":"l",\u026F:"m",\u0270:"m","\u1D14":"oe",\u0279:"r",\u027B:"r",\u027A:"r","\u2C79":"r",\u0287:"t",\u028C:"v",\u028D:"w",\u028E:"y","\uA729":"tz",\u00FA:"u",\u016D:"u",\u01D4:"u",\u00FB:"u",\u1E77:"u",\u00FC:"u",\u01D8:"u",\u01DA:"u",\u01DC:"u",\u01D6:"u",\u1E73:"u",\u1EE5:"u",\u0171:"u",\u0215:"u",\u00F9:"u",\u1EE7:"u",\u01B0:"u",\u1EE9:"u",\u1EF1:"u",\u1EEB:"u",\u1EED:"u",\u1EEF:"u",\u0217:"u",\u016B:"u",\u1E7B:"u",\u0173:"u","\u1D99":"u",\u016F:"u",\u0169:"u",\u1E79:"u",\u1E75:"u","\u1D6B":"ue","\uA778":"um","\u2C74":"v","\uA75F":"v",\u1E7F:"v",\u028B:"v","\u1D8C":"v","\u2C71":"v",\u1E7D:"v","\uA761":"vy",\u1E83:"w",\u0175:"w",\u1E85:"w",\u1E87:"w",\u1E89:"w",\u1E81:"w","\u2C73":"w",\u1E98:"w",\u1E8D:"x",\u1E8B:"x","\u1D8D":"x",\u00FD:"y",\u0177:"y",\u00FF:"y",\u1E8F:"y",\u1EF5:"y",\u1EF3:"y",\u01B4:"y",\u1EF7:"y","\u1EFF":"y",\u0233:"y",\u1E99:"y","\u024F":"y",\u1EF9:"y",\u017A:"z",\u017E:"z",\u1E91:"z",\u0291:"z","\u2C6C":"z",\u017C:"z",\u1E93:"z",\u0225:"z",\u1E95:"z","\u1D76":"z","\u1D8E":"z",\u0290:"z",\u01B6:"z","\u0240":"z",\uFB00:"ff",\uFB03:"ffi",\uFB04:"ffl",\uFB01:"fi",\uFB02:"fl",\u0133:"ij",\u0153:"oe",\uFB06:"st","\u2090":"a","\u2091":"e","\u1D62":"i","\u2C7C":"j","\u2092":"o","\u1D63":"r","\u1D64":"u","\u1D65":"v","\u2093":"x"};var z=class{constructor(n,a=n,e=!1){this.item=n,this.value=a,this.header=e}isHeader(){return this.header}toString(){return this.value}};function q(s){return s?s.replace(/[^A-Za-z0-9[\] ]/g,function(n){return Ut[n]||n}):""}function Se(s,n=" ",a="",e){let t=[];if(!e)t=dt(s,n,a);else{let i=`([${e}]+)`,r=s.split(new RegExp(i,"g")),o=r[r.length-1];o>""&&(n&&a?t=dt(o,n,a):t.push(o))}return t}function dt(s,n,a){let e=[],t=`(?:[${a}])([^${a}]+)(?:[${a}])|([^${n}]+)`,i=s.split(new RegExp(t,"g")),r=i.length,o,c=new RegExp(`[${a}]+`,"g");for(let f=0;f<r;f+=1)o=i[f],o&&o.length&&o!==n&&e.push(o.replace(c,""));return e}function D(s,n){if(!n||typeof s!="object")return s.toString();if(n.endsWith("()")){let t=n.slice(0,n.length-2);return s[t]().toString()}let e=n.replace(/\[(\w+)\]/g,".$1").replace(/^\./,"").split(".");for(let t of e)t in s&&(s=s[t]);return s?s.toString():""}var pt="220ms cubic-bezier(0, 0, 0.2, 1)",Vt=qe("typeaheadAnimation",[Oe("animated-down",Y({height:"*",overflow:"hidden"})),de("* => animated-down",[Y({height:0,overflow:"hidden"}),he(pt)]),Oe("animated-up",Y({height:"*",overflow:"hidden"})),de("* => animated-up",[Y({height:"*",overflow:"hidden"}),he(pt)]),de("* => unanimated",he("0s"))]),Bt=0,Ht=(()=>{let n=class n{get typeaheadTemplateMethods(){return{selectMatch:this.selectMatch.bind(this),selectActive:this.selectActive.bind(this),isActive:this.isActive.bind(this)}}constructor(e,t,i,r){this.positionService=e,this.renderer=t,this.element=i,this.changeDetectorRef=r,this.activeChangeEvent=new v,this.isFocused=!1,this.positionServiceSubscription=new Ee,this.height=0,this.popupId=`ngb-typeahead-${Bt++}`,this._matches=[],this.renderer.setAttribute(this.element.nativeElement,"id",this.popupId),this.positionServiceSubscription.add(this.positionService.event$?.subscribe(()=>{if(this.isAnimated){this.animationState=this.isTopPosition?"animated-up":"animated-down",this.changeDetectorRef.detectChanges();return}this.animationState="unanimated",this.changeDetectorRef.detectChanges()}))}get active(){return this._active}set active(e){this._active=e,this.activeChanged()}get matches(){return this._matches}set matches(e){if(this.positionService.setOptions({modifiers:{flip:{enabled:this.adaptivePosition}},allowedPositions:["top","bottom"]}),this._matches=e,this.needScrollbar=this.typeaheadScrollable&&this.typeaheadOptionsInScrollableView<this.matches.length,this.typeaheadScrollable&&setTimeout(()=>{this.setScrollableMode()}),this.typeaheadIsFirstItemActive&&this._matches.length>0&&(this.setActive(this._matches[0]),this._active?.isHeader()&&this.nextActiveMatch()),this._active&&!this.typeaheadIsFirstItemActive){let t=this._matches.find(i=>i.value===this._active?.value);if(t){this.selectActive(t);return}this.active=void 0}}get isTopPosition(){return this.element.nativeElement.classList.contains("top")}get optionsListTemplate(){return this.parent?this.parent.optionsListTemplate:void 0}get isAnimated(){return this.parent?this.parent.isAnimated:!1}get adaptivePosition(){return this.parent?this.parent.adaptivePosition:!1}get typeaheadScrollable(){return this.parent?this.parent.typeaheadScrollable:!1}get typeaheadOptionsInScrollableView(){return this.parent?this.parent.typeaheadOptionsInScrollableView:5}get typeaheadIsFirstItemActive(){return this.parent?this.parent.typeaheadIsFirstItemActive:!0}get itemTemplate(){return this.parent?this.parent.typeaheadItemTemplate:void 0}get canSelectItemsOnBlur(){return!!this.parent?.selectItemOnBlur}selectActiveMatch(e){this._active&&this.parent?.typeaheadSelectFirstItem&&this.selectMatch(this._active),!this.parent?.typeaheadSelectFirstItem&&e&&this.selectMatch(this._active)}activeChanged(){if(!this._active)return;let e=this.matches.indexOf(this._active);this.activeChangeEvent.emit(`${this.popupId}-${e}`)}prevActiveMatch(){if(!this._active)return;let e=this.matches.indexOf(this._active);this.setActive(this.matches[e-1<0?this.matches.length-1:e-1]),this._active.isHeader()&&this.prevActiveMatch(),this.typeaheadScrollable&&this.scrollPrevious(e)}nextActiveMatch(){let e=this._active?this.matches.indexOf(this._active):-1;this.setActive(this.matches[e+1>this.matches.length-1?0:e+1]),this._active?.isHeader()&&this.nextActiveMatch(),this.typeaheadScrollable&&this.scrollNext(e)}selectActive(e){this.isFocused=!0,this.setActive(e)}highlight(e,t){let i=e.value,r=(this.parent&&this.parent.typeaheadLatinize?q(i):i).toLowerCase(),o,c;if(typeof t=="object"){let f=t.length;for(let R=0;R<f;R+=1)o=r.indexOf(t[R]),c=t[R].length,o>=0&&c>0&&(i=`${i.substring(0,o)}<strong>${i.substring(o,o+c)}</strong>${i.substring(o+c)}`,r=`${r.substring(0,o)}????????${"??".repeat(c)}??????????${r.substring(o+c)}`)}else t&&(o=r.indexOf(t),c=t.length,o>=0&&c>0&&(i=`${i.substring(0,o)}<strong>${i.substring(o,o+c)}</strong>${i.substring(o+c)}`));return i}focusLost(){this.isFocused=!1,this.canSelectItemsOnBlur||this.setActive(void 0)}isActive(e){return this.active===e}selectMatch(e,t){return t&&(t.stopPropagation(),t.preventDefault()),this.parent?.changeModel(e),setTimeout(()=>this.parent?.typeaheadOnSelect.emit(e),0),!1}setScrollableMode(){if(this.ulElement||(this.ulElement=this.element),this.liElements?.first){let e=Te.getStyles(this.ulElement.nativeElement),t=Te.getStyles(this.liElements.first.nativeElement),i=parseFloat((e["padding-bottom"]?e["padding-bottom"]:"").replace("px","")),r=parseFloat((e["padding-top"]?e["padding-top"]:"0").replace("px","")),o=parseFloat((t.height?t.height:"0").replace("px","")),c=this.typeaheadOptionsInScrollableView*o;this.guiHeight=`${c+r+i}px`}this.renderer.setStyle(this.element.nativeElement,"visibility","visible")}scrollPrevious(e){if(e===0){this.scrollToBottom();return}if(this.liElements&&this.ulElement){let t=this.liElements.toArray()[e-1];t&&!this.isScrolledIntoView(t.nativeElement)&&(this.ulElement.nativeElement.scrollTop=t.nativeElement.offsetTop)}}scrollNext(e){if(e+1>this.matches.length-1){this.scrollToTop();return}if(this.liElements&&this.ulElement){let t=this.liElements.toArray()[e+1];t&&!this.isScrolledIntoView(t.nativeElement)&&(this.ulElement.nativeElement.scrollTop=t.nativeElement.offsetTop-Number(this.ulElement.nativeElement.offsetHeight)+Number(t.nativeElement.offsetHeight))}}ngOnDestroy(){this.positionServiceSubscription.unsubscribe()}setActive(e){this._active=e;let t;this._active==null||this._active.isHeader()||(t=e),this.parent?.typeaheadOnPreview.emit(t)}isScrolledIntoView(e){if(!this.ulElement)return!1;let t=this.ulElement.nativeElement.scrollTop,i=t+Number(this.ulElement.nativeElement.offsetHeight),r=e.offsetTop;return r+e.offsetHeight<=i&&r>=t}scrollToBottom(){this.ulElement?.nativeElement&&(this.ulElement.nativeElement.scrollTop=this.ulElement.nativeElement.scrollHeight)}scrollToTop(){this.ulElement?.nativeElement&&(this.ulElement.nativeElement.scrollTop=0)}};n.\u0275fac=function(t){return new(t||n)(u(Z),u(U),u(A),u(Q))},n.\u0275cmp=V({type:n,selectors:[["typeahead-container"]],viewQuery:function(t,i){if(t&1&&($(Et,5),$(wt,5)),t&2){let r;W(r=K())&&(i.ulElement=r.first),W(r=K())&&(i.liElements=r)}},hostAttrs:[1,"dropdown","open","bottom","dropdown-menu",2,"position","absolute","display","block"],hostVars:7,hostBindings:function(t,i){t&1&&C("mouseleave",function(){return i.focusLost()})("blur",function(){return i.focusLost()}),t&2&&(L("role","listbox"),De("height",i.needScrollbar?i.guiHeight:"auto")("visibility","inherit"),F("dropup",i.dropup))},outputs:{activeChangeEvent:"activeChange"},features:[be([Z])],decls:5,vars:7,consts:[["bsItemTemplate",""],["bs4Template",""],["liElements",""],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[3,"innerHtml"],["ngFor","",3,"ngForOf"],["class","dropdown-header",4,"ngIf"],[3,"ngIf"],[1,"dropdown-header"],["role","option",1,"dropdown-item",3,"click","mouseenter","id"]],template:function(t,i){if(t&1&&O(0,At,0,0,"ng-template",3)(1,kt,1,1,"ng-template",null,0,G)(3,Rt,1,1,"ng-template",null,1,G),t&2){let r=H(2),o=H(4);d("ngTemplateOutlet",i.optionsListTemplate||o)("ngTemplateOutletContext",xe(2,It,i.matches,i.itemTemplate||r,i.query,i.typeaheadTemplateMethods))}},dependencies:[He,oe,le],styles:[".dropdown[_nghost-%COMP%]{z-index:1000}.dropdown-menu[_nghost-%COMP%], .dropdown-menu[_ngcontent-%COMP%]{overflow-y:auto;height:100px}"],data:{animation:[Vt]}});let s=n;return s})(),mt=(()=>{let n=class n{constructor(){this.adaptivePosition=!1,this.isAnimated=!1,this.hideResultsOnBlur=!0,this.cancelRequestOnFocusLost=!1,this.selectFirstItem=!0,this.isFirstItemActive=!0,this.minLength=1,this.selectItemOnBlur=!1}};n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=te({token:n,factory:n.\u0275fac,providedIn:"root"});let s=n;return s})(),ut=(()=>{let n=class n{constructor(e,t,i,r,o,c,f){this.changeDetection=i,this.element=r,this.ngControl=o,this.renderer=c,this.typeaheadMinLength=1,this.adaptivePosition=!1,this.isAnimated=!1,this.typeaheadWaitMs=0,this.typeaheadLatinize=!0,this.typeaheadSingleWords=!0,this.typeaheadWordDelimiters=" ",this.typeaheadMultipleSearchDelimiters=",",this.typeaheadPhraseDelimiters=`'"`,this.typeaheadScrollable=!1,this.typeaheadOptionsInScrollableView=5,this.typeaheadSelectFirstItem=!0,this.typeaheadIsFirstItemActive=!0,this.typeaheadLoading=new v,this.typeaheadNoResults=new v,this.typeaheadOnSelect=new v,this.typeaheadOnPreview=new v,this.typeaheadOnBlur=new v,this.dropup=!1,this.isOpen=!1,this.list="list",this.isActiveItemChanged=!1,this.isFocused=!1,this.cancelRequestOnFocusLost=!1,this.selectItemOnBlur=!1,this.keyUpEventEmitter=new v,this.placement="bottom left",this._matches=[],this._subscriptions=[],this._outsideClickListener=()=>{},this._typeahead=e.createLoader(r,f,c).provide({provide:mt,useValue:t}),Object.assign(this,{typeaheadHideResultsOnBlur:t.hideResultsOnBlur,cancelRequestOnFocusLost:t.cancelRequestOnFocusLost,typeaheadSelectFirstItem:t.selectFirstItem,typeaheadIsFirstItemActive:t.isFirstItemActive,typeaheadMinLength:t.minLength,adaptivePosition:t.adaptivePosition,isAnimated:t.isAnimated,selectItemOnBlur:t.selectItemOnBlur})}get matches(){return this._matches}ngOnInit(){this.typeaheadOptionsLimit=this.typeaheadOptionsLimit||20,this.typeaheadMinLength=this.typeaheadMinLength===void 0?1:this.typeaheadMinLength,this.typeaheadAsync===void 0&&!J(this.typeahead)&&(this.typeaheadAsync=!1),J(this.typeahead)&&(this.typeaheadAsync=!0),this.typeaheadAsync?this.asyncActions():this.syncActions(),this.checkDelimitersConflict()}onInput(e){let t=e.target.value!==void 0?e.target.value:e.target.textContent!==void 0?e.target.textContent:e.target.innerText;t!=null&&t.trim().length>=this.typeaheadMinLength?(this.typeaheadLoading.emit(!0),this.keyUpEventEmitter.emit(e.target.value)):(this.typeaheadLoading.emit(!1),this.typeaheadNoResults.emit(!1),this.hide())}onChange(e){if(this._container){if(e.keyCode===27||e.key==="Escape"){this.hide();return}if(e.keyCode===38||e.key==="ArrowUp"){this.isActiveItemChanged=!0,this._container.prevActiveMatch();return}if(e.keyCode===40||e.key==="ArrowDown"){this.isActiveItemChanged=!0,this._container.nextActiveMatch();return}if(e.keyCode===13||e.key==="Enter"){this._container.selectActiveMatch();return}}}onFocus(){this.isFocused=!0,setTimeout(()=>{this.typeaheadMinLength===0&&(this.typeaheadLoading.emit(!0),this.keyUpEventEmitter.emit(this.element.nativeElement.value||""))},0)}onBlur(){this.isFocused=!1,this._container&&!this._container.isFocused&&this.typeaheadOnBlur.emit(this._container.active),!this.container&&this._matches?.length===0&&this.typeaheadOnBlur.emit(new z(this.element.nativeElement.value,this.element.nativeElement.value,!1))}onKeydown(e){if(this._container&&((e.keyCode===9||e.key==="Tab")&&this.onBlur(),e.keyCode===9||e.key==="Tab"||e.keyCode===13||e.key==="Enter")){if(e.preventDefault(),this.typeaheadSelectFirstItem){this._container.selectActiveMatch();return}this.typeaheadSelectFirstItem||(this._container.selectActiveMatch(this.isActiveItemChanged),this.isActiveItemChanged=!1,this.hide())}}changeModel(e){if(!e)return;let t;if(this.typeaheadMultipleSearch&&this._allEnteredValue){let i=this._allEnteredValue.split(new RegExp(`([${this.typeaheadMultipleSearchDelimiters}]+)`));this._allEnteredValue=i.slice(0,i.length-1).concat(e.value).join(""),t=this._allEnteredValue}else t=e.value;this.ngControl.viewToModelUpdate(t),this.ngControl.control?.setValue(t),this.changeDetection.markForCheck(),this.hide()}show(){if(this._typeahead.attach(Ht).to(this.container).position({attachment:`${this.dropup?"top":"bottom"} left`}).show({typeaheadRef:this,placement:this.placement,animation:!1,dropup:this.dropup}),this._outsideClickListener=this.renderer.listen("document","click",t=>{this.typeaheadMinLength===0&&this.element.nativeElement.contains(t.target)||!this.typeaheadHideResultsOnBlur||this.element.nativeElement.contains(t.target)||this.onOutsideClick()}),!this._typeahead.instance||!this.ngControl.control)return;this._container=this._typeahead.instance,this._container.parent=this;let e=(this.typeaheadLatinize?q(this.ngControl.control.value):this.ngControl.control.value).toString().toLowerCase();this._container.query=this.tokenizeQuery(e),this._container.matches=this._matches,this.element.nativeElement.focus(),this._container.activeChangeEvent.subscribe(t=>{this.activeDescendant=t,this.changeDetection.markForCheck()}),this.isOpen=!0}hide(){this._typeahead.isShown&&(this._typeahead.hide(),this._outsideClickListener(),this._container=void 0,this.isOpen=!1,this.changeDetection.markForCheck()),this.typeaheadOnPreview.emit()}onOutsideClick(){this._container&&!this._container.isFocused&&this.hide()}ngOnDestroy(){for(let e of this._subscriptions)e.unsubscribe();this._typeahead.dispose()}asyncActions(){this._subscriptions.push(this.keyUpEventEmitter.pipe(ue(this.typeaheadWaitMs),ee(e=>this._allEnteredValue=e),ke(()=>this.typeahead?this.typeahead:me)).subscribe(e=>{this.finalizeAsyncCall(e)}))}syncActions(){this._subscriptions.push(this.keyUpEventEmitter.pipe(ue(this.typeaheadWaitMs),X(e=>{this._allEnteredValue=e;let t=this.normalizeQuery(e);return this.typeahead?(J(this.typeahead)?this.typeahead:Ie(this.typeahead)).pipe(Me(r=>!!r&&this.testMatch(this.normalizeOption(r),t)),Ae()):me})).subscribe(e=>{this.finalizeAsyncCall(e)}))}normalizeOption(e){let t=D(e,this.typeaheadOptionField);return(this.typeaheadLatinize?q(t):t).toLowerCase()}tokenizeQuery(e){let t=e;return this.typeaheadMultipleSearch&&this.typeaheadSingleWords?this.haveCommonCharacters(`${this.typeaheadPhraseDelimiters}${this.typeaheadWordDelimiters}`,this.typeaheadMultipleSearchDelimiters)||(t=Se(t,this.typeaheadWordDelimiters,this.typeaheadPhraseDelimiters,this.typeaheadMultipleSearchDelimiters)):this.typeaheadSingleWords?t=Se(t,this.typeaheadWordDelimiters,this.typeaheadPhraseDelimiters):t=Se(t,void 0,void 0,this.typeaheadMultipleSearchDelimiters),t}normalizeQuery(e){let t=(this.typeaheadLatinize?q(e):e).toString().toLowerCase();return t=this.tokenizeQuery(t),t}testMatch(e,t){let i;if(typeof t=="object"){i=t.length;for(let r=0;r<i;r+=1)if(t[r].length>0&&e.indexOf(t[r])<0)return!1;return!0}return e.indexOf(t)>=0}finalizeAsyncCall(e){if(this.prepareMatches(e||[]),this.typeaheadLoading.emit(!1),this.typeaheadNoResults.emit(!this.hasMatches()),!this.hasMatches()){this.hide();return}if(!(!this.isFocused&&this.cancelRequestOnFocusLost))if(this._container&&this.ngControl.control){let i=((this.typeaheadLatinize?q(this.ngControl.control.value):this.ngControl.control.value)||"").toString().toLowerCase();this._container.query=this.tokenizeQuery(i),this._container.matches=this._matches}else this.show()}prepareMatches(e){let t=e.slice(0,this.typeaheadOptionsLimit),i=this.typeaheadOrderBy?this.orderMatches(t):t;if(this.typeaheadGroupField){let r=[];i.map(c=>D(c,this.typeaheadGroupField)).filter((c,f,R)=>R.indexOf(c)===f).forEach(c=>{r.push(new z(c,c,!0)),r=r.concat(i.filter(f=>D(f,this.typeaheadGroupField)===c).map(f=>new z(f,D(f,this.typeaheadOptionField))))}),this._matches=r}else this._matches=i.map(r=>new z(r,D(r,this.typeaheadOptionField)))}orderMatches(e){if(!e.length)return e;if(this.typeaheadOrderBy!==null&&this.typeaheadOrderBy!==void 0&&typeof this.typeaheadOrderBy=="object"&&Object.keys(this.typeaheadOrderBy).length===0)return console.error("Field and direction properties for typeaheadOrderBy have to be set according to documentation!"),e;let{field:t,direction:i}=this.typeaheadOrderBy||{};return!i||!(i==="asc"||i==="desc")?(console.error('typeaheadOrderBy direction has to equal "asc" or "desc". Please follow the documentation.'),e):typeof e[0]=="string"?i==="asc"?e.sort():e.sort().reverse():!t||typeof t!="string"?(console.error("typeaheadOrderBy field has to set according to the documentation."),e):e.sort((r,o)=>{let c=D(r,t),f=D(o,t);return c<f?i==="asc"?-1:1:c>f?i==="asc"?1:-1:0})}hasMatches(){return this._matches.length>0}checkDelimitersConflict(){if(this.typeaheadMultipleSearch&&this.typeaheadSingleWords&&this.haveCommonCharacters(`${this.typeaheadPhraseDelimiters}${this.typeaheadWordDelimiters}`,this.typeaheadMultipleSearchDelimiters))throw new Error(`Delimiters used in typeaheadMultipleSearchDelimiters must be different
2
2
  from delimiters used in typeaheadWordDelimiters (current value: ${this.typeaheadWordDelimiters}) and
3
3
  typeaheadPhraseDelimiters (current value: ${this.typeaheadPhraseDelimiters}).
4
4
  Please refer to the documentation`)}haveCommonCharacters(e,t){for(let i=0;i<e.length;i++)if(e.charAt(i).indexOf(t)>-1)return!0;return!1}};n.\u0275fac=function(t){return new(t||n)(u(pe),u(mt),u(Q),u(A),u($e),u(U),u(ne))},n.\u0275dir=k({type:n,selectors:[["","typeahead",""]],hostVars:4,hostBindings:function(t,i){t&1&&C("input",function(o){return i.onInput(o)})("keyup",function(o){return i.onChange(o)})("click",function(){return i.onFocus()})("focus",function(){return i.onFocus()})("blur",function(){return i.onBlur()})("keydown",function(o){return i.onKeydown(o)}),t&2&&L("aria-activedescendant",i.activeDescendant)("aria-owns",i.isOpen?i._container.popupId:null)("aria-expanded",i.isOpen)("aria-autocomplete",i.list)},inputs:{typeahead:"typeahead",typeaheadMinLength:"typeaheadMinLength",adaptivePosition:"adaptivePosition",isAnimated:"isAnimated",typeaheadWaitMs:"typeaheadWaitMs",typeaheadOptionsLimit:"typeaheadOptionsLimit",typeaheadOptionField:"typeaheadOptionField",typeaheadGroupField:"typeaheadGroupField",typeaheadOrderBy:"typeaheadOrderBy",typeaheadAsync:"typeaheadAsync",typeaheadLatinize:"typeaheadLatinize",typeaheadSingleWords:"typeaheadSingleWords",typeaheadWordDelimiters:"typeaheadWordDelimiters",typeaheadMultipleSearch:"typeaheadMultipleSearch",typeaheadMultipleSearchDelimiters:"typeaheadMultipleSearchDelimiters",typeaheadPhraseDelimiters:"typeaheadPhraseDelimiters",typeaheadItemTemplate:"typeaheadItemTemplate",optionsListTemplate:"optionsListTemplate",typeaheadScrollable:"typeaheadScrollable",typeaheadOptionsInScrollableView:"typeaheadOptionsInScrollableView",typeaheadHideResultsOnBlur:"typeaheadHideResultsOnBlur",typeaheadSelectFirstItem:"typeaheadSelectFirstItem",typeaheadIsFirstItemActive:"typeaheadIsFirstItemActive",container:"container",dropup:"dropup"},outputs:{typeaheadLoading:"typeaheadLoading",typeaheadNoResults:"typeaheadNoResults",typeaheadOnSelect:"typeaheadOnSelect",typeaheadOnPreview:"typeaheadOnPreview",typeaheadOnBlur:"typeaheadOnBlur"},exportAs:["bs-typeahead"],features:[be([pe,Z])]});let s=n;return s})(),ft=(()=>{let n=class n{static forRoot(){return{ngModule:n,providers:[]}}};n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=se({type:n}),n.\u0275inj=ie({imports:[ce]});let s=n;return s})();var yt=(()=>{let n=class n{transform(e,t,i=!1){if(i&&t.length<1)return e;if(t&&e){let r=t.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&");r=r.split(" ").filter(c=>c.length>0).join("|");let o=new RegExp(r,"gi");return e.replace(o,c=>`<b>${c}</b>`)}else return e}};n.\u0275fac=function(t){return new(t||n)},n.\u0275pipe=B({name:"highlight",type:n,pure:!0});let s=n;return s})();var zt=["InputTypeHead"],jt=(s,n)=>n.mid,$t=(s,n)=>n.key;function Wt(s,n){if(s&1&&g(0,"img",7),s&2){let a=l().item;d("src",a.avatarUrl,fe)}}function Kt(s,n){if(s&1&&g(0,"fa-icon",13),s&2){let a=l().item,e=l();re(a.isPersonalGroup?"circle-purple-icon":"circle-primary-icon"),d("icon",e.icons.GROUPS)}}function Gt(s,n){if(s&1&&(g(0,"span",10),I(1,"highlight")),s&2){let a=l().item,e=l();d("innerHTML",P(1,1,a.description,e.selection),j)}}function Qt(s,n){if(s&1&&(p(0,"div",5)(1,"div",6),S(2,Wt,1,1,"img",7)(3,Kt,1,3,"fa-icon",8),m(),p(4,"div"),g(5,"div",9),I(6,"highlight"),S(7,Gt,2,4,"span",10),m(),p(8,"div",11)(9,"span",12),b(10),m()()()),s&2){let a=n.item,e=l();h(2),E(a.isUser?2:3),h(2),re(Re("d-flex ms-2 pe-5 ",a.description?"flex-column align-items-start":"align-items-center")),h(),d("innerHTML",P(6,7,a.name,e.selection),j),h(2),E(a.description?7:-1),h(3),T(a.type)}}function Zt(s,n){if(s&1){let a=w();p(0,"input",14,1),I(2,"translate"),C("typeaheadOnSelect",function(t){y(a);let i=l();return _(i.onSelect(t))})("typeaheadLoading",function(){y(a);let t=l();return _(t.onLoading())})("typeaheadNoResults",function(){y(a);let t=l();return _(t.onNoResults())})("typeaheadOnPreview",function(){y(a);let t=l();return _(t.onPreview())}),Ce("ngModelChange",function(t){y(a);let i=l();return ve(i.selection,t)||(i.selection=t),_(t)}),m()}if(s&2){let a=l(),e=H(1);ge("ngModel",a.selection),d("placeholder",P(2,10,a.placeHolder,a.locale.language))("typeaheadItemTemplate",e)("typeaheadAsync",!0)("typeaheadMinLength",0)("typeaheadSingleWords",!0)("typeaheadOptionField","name")("typeaheadWaitMs",100)("typeaheadHideResultsOnBlur",!0)("typeahead",a.asyncSearchUsersOrGroups)}}function Yt(s,n){if(s&1&&g(0,"img",7),s&2){let a=l().$implicit;d("src",a.avatarUrl,fe)}}function qt(s,n){if(s&1&&g(0,"fa-icon",17),s&2){let a=l(2);d("icon",a.icons.LINKS)}}function Jt(s,n){if(s&1&&g(0,"fa-icon",13),s&2){let a=l().$implicit,e=l();re(a.isPersonalGroup?"circle-purple-icon":"circle-primary-icon"),d("icon",e.icons.GROUPS)}}function Xt(s,n){if(s&1&&(p(0,"span",21),b(1),m()),s&2){let a=l().$implicit;h(),T(a.description)}}function ei(s,n){if(s&1&&(p(0,"span",22),b(1),m()),s&2){let a=l().$implicit;h(),T(a.type)}}function ti(s,n){if(s&1){let a=w();p(0,"button",32),I(1,"translate"),Ce("ngModelChange",function(t){y(a);let i=l().$implicit,r=l(3).$implicit;return ve(r.hPerms[i.key],t)||(r.hPerms[i.key]=t),_(t)}),C("ngModelChange",function(){y(a);let t=l(4).$implicit,i=l();return _(i.onPermissionChange(t))}),g(2,"fa-icon",33),m()}if(s&2){let a=l().$implicit,e=l(3).$implicit,t=l();ge("ngModel",e.hPerms[a.key]),d("tooltip",P(1,3,t.SPACES_PERMISSIONS_TEXT[a.key].text,t.locale.language)),h(2),d("icon",t.SPACES_PERMISSIONS_TEXT[a.key].icon)}}function ii(s,n){if(s&1&&S(0,ti,3,6,"button",31),s&2){let a=n.$implicit,e=l(4);E(!e.filterPermissions||(e.filterPermissions&&e.allowedPermissions.indexOf(a.key))>-1?0:-1)}}function ni(s,n){if(s&1&&(ye(0,ii,1,1,null,null,$t),I(2,"keyvalue"),g(3,"div",30)),s&2){let a=l(2).$implicit,e=l();_e(P(2,0,a.hPerms,e.originalOrderKeyValue))}}function si(s,n){if(s&1){let a=w();p(0,"button",34),I(1,"translate"),C("click",function(){y(a);let t=l(2).$implicit,i=l();return _(i.editFunction(t))}),g(2,"fa-icon",13),m()}if(s&2){let a=l(3);d("tooltip",P(1,2,"Edit",a.locale.language)),h(2),d("icon",a.icons.faPen)}}function ai(s,n){if(s&1){let a=w();p(0,"div",26),g(1,"div",27),S(2,ni,4,3),S(3,si,3,5,"button",28),p(4,"button",29),I(5,"translate"),C("click",function(){y(a);let t=l().$implicit,i=l();return _(i.removeMember(t))}),g(6,"fa-icon",13),m()()}if(s&2){let a=l(2);h(2),E(a.withPermissions?2:-1),h(),E(a.editFunction?3:-1),h(),d("tooltip",P(5,4,"Remove",a.locale.language)),h(2),d("icon",a.icons.faTimes)}}function ri(s,n){if(s&1&&(p(0,"div",4)(1,"div",15)(2,"div",16),S(3,Yt,1,1,"img",7)(4,qt,1,1,"fa-icon",17)(5,Jt,1,3,"fa-icon",8),p(6,"div",18)(7,"div",19),b(8),m(),p(9,"div",20),S(10,Xt,2,1,"span",21)(11,ei,2,1,"span",22),m()()(),p(12,"div",23)(13,"div",24),b(14),m(),p(15,"div",25),b(16),I(17,"amTimeAgo"),m()(),S(18,ai,7,7,"div",26),m()()),s&2){let a=n.$implicit,e=l();h(3),E(a.isUser?3:a.isLink?4:5),h(5),T(a.name),h(2),E(a.description?10:a.linkId?-1:11),h(4),T(a.isLink?e.MEMBER_TYPE.LINK:a.type),h(2),T(Ve(17,6,a.createdAt)),h(2),E(e.editMode?18:-1)}}var xn=(()=>{let n=class n{constructor(){this.members=[],this.membersChange=new v,this.withPermissions=!1,this.filterPermissions=!1,this.allowedPermissions=[],this.editMode=!0,this.hideInput=!1,this.editFunction=null,this.locale=M(Qe),this.MEMBER_TYPE=rt,this.originalOrderKeyValue=nt,this.SPACES_PERMISSIONS_TEXT=at,this.icons={GROUPS:it.GROUPS,LINKS:st.LINKS,faTimes:et,faPen:tt},this.selection="",this.ngZone=M(ae),this.defaultPlaceholder="Type to search for users or groups to add",this.placeHolder=this.defaultPlaceholder,this.lastResults=[],this.asyncSearchUsersOrGroups=new we(e=>e.next(this.selection)).pipe(X(e=>this.searchFunction(e||"").pipe(ee(t=>this.lastResults=t))))}ngOnInit(){this.setDefaultPlaceHolder()}onSelect(e){this.ngZone.run(()=>{this.selection="",this.inputTypeHead.nativeElement.value=""});let t=e.item;t.createdAt||(t.createdAt=new Date),this.members.unshift(e.item),this.membersChange.emit(this.members),this.lastResults=this.lastResults.filter(i=>i.mid!==t.mid)}onPermissionChange(e){e.permissions=ot(e.hPerms)}removeMember(e){this.members=this.members.filter(t=>t.mid!==e.mid),this.membersChange.emit(this.members),this.lastResults.push(e)}onLoading(){this.placeHolder="Loading..."}onNoResults(){this.placeHolder="No results"}onPreview(){this.setDefaultPlaceHolder()}setDefaultPlaceHolder(){this.placeHolder=this.customPlaceholder||this.defaultPlaceholder}};n.\u0275fac=function(t){return new(t||n)},n.\u0275cmp=V({type:n,selectors:[["app-user-search"]],viewQuery:function(t,i){if(t&1&&$(zt,5),t&2){let r;W(r=K())&&(i.inputTypeHead=r.first)}},inputs:{members:"members",withPermissions:"withPermissions",filterPermissions:"filterPermissions",allowedPermissions:"allowedPermissions",editMode:"editMode",hideInput:"hideInput",searchFunction:"searchFunction",editFunction:"editFunction",customPlaceholder:"customPlaceholder"},outputs:{membersChange:"membersChange"},decls:6,vars:1,consts:[["searchMembers",""],["InputTypeHead",""],[1,"form-control","form-control-sm","mb-2",3,"ngModel","placeholder","typeaheadItemTemplate","typeaheadAsync","typeaheadMinLength","typeaheadSingleWords","typeaheadOptionField","typeaheadWaitMs","typeaheadHideResultsOnBlur","typeahead"],[1,"col-12","mt-1"],[1,"bg-theme","mb-1","p-2",2,"border-radius","4px"],["role","button",1,"d-flex"],[1,"d-flex","align-items-center","text-truncate"],["alt","","height","30","width","30",1,"avatar-base-img",3,"src"],[3,"icon","class"],[3,"innerHTML"],[1,"fs-xxxs","me-4",3,"innerHTML"],[1,"ms-auto","ps-5","me-1","text-muted","d-none","d-lg-block","fs-xxxs","align-self-center"],["l10nTranslate",""],[3,"icon"],[1,"form-control","form-control-sm","mb-2",3,"typeaheadOnSelect","typeaheadLoading","typeaheadNoResults","typeaheadOnPreview","ngModelChange","ngModel","placeholder","typeaheadItemTemplate","typeaheadAsync","typeaheadMinLength","typeaheadSingleWords","typeaheadOptionField","typeaheadWaitMs","typeaheadHideResultsOnBlur","typeahead"],[1,"d-flex","align-items-center","text-truncate","no-select","fs-xs",2,"height","32px"],[1,"d-flex","align-items-center","text-truncate","me-auto"],[1,"circle-primary-icon",3,"icon"],[1,"d-flex","flex-column","text-truncate","ms-2"],[1,"text-truncate"],[1,"fs-xxxs","text-truncate"],[1,"fs-xxxs"],["l10nTranslate","",1,"fs-xxxs"],[1,"d-flex","flex-column","fs-xxxs","text-muted","d-none","d-lg-block","ms-3"],["l10nTranslate","",1,"d-flex","justify-content-end"],[1,"d-flex","justify-content-end"],[1,"d-flex","no-select"],[1,"vr","mx-2"],["type","button",1,"btn","btn-sm","btn-custom","me-2",3,"tooltip"],["type","button",1,"btn","btn-sm","btn-danger",3,"click","tooltip"],[1,"vr","ms-1","me-2"],["btnCheckbox","","type","button",1,"btn","btn-sm","btn-custom",3,"ngModel","tooltip"],["btnCheckbox","","type","button",1,"btn","btn-sm","btn-custom",3,"ngModelChange","ngModel","tooltip"],["size","lg",3,"icon"],["type","button",1,"btn","btn-sm","btn-custom","me-2",3,"click","tooltip"]],template:function(t,i){t&1&&(O(0,Qt,11,10,"ng-template",null,0,G),S(2,Zt,3,13,"input",2),p(3,"div",3),ye(4,ri,19,8,"div",4,jt),m()),t&2&&(h(2),E(i.hideInput?-1:2),h(2),_e(i.members))},dependencies:[ft,ut,Ge,je,We,Ke,ze,Ye,ct,lt,Xe,Je,Ze,ht,yt,Ne],encapsulation:2});let s=n;return s})();export{li as a,Tt as b,Ot as c,vi as d,Ci as e,Si as f,yt as g,ht as h,xn as i};
@@ -1 +1 @@
1
- import{k as F,m as y,s as b,t as _}from"./chunk-55WOZ7P6.js";import{$b as H,Cb as w,E as D,Fb as N,Gb as L,Na as k,Nb as C,Qa as p,Ra as o,Sa as g,Xa as I,Ya as O,Za as u,Zb as E,bb as f,ca as m,da as M,ib as A,pb as S,qb as R,qc as v,rb as j,xc as P,ya as l}from"./chunk-JQOMI5VI.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 f,this.isDisabledChange=new f,this.toggleClick=new f,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(p),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(p),o(g),o(_),o(c),o(B),o(b))},t.\u0275dir=u({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=u({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(p),o(c))},t.\u0275dir=u({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{k as F,m as y,s as b,t as _}from"./chunk-H3O3N5LY.js";import{$b as H,Cb as w,E as D,Fb as N,Gb as L,Na as k,Nb as C,Qa as p,Ra as o,Sa as g,Xa as I,Ya as O,Za as u,Zb as E,bb as f,ca as m,da as M,ib as A,pb as S,qb as R,qc as v,rb as j,xc as P,ya as l}from"./chunk-JQOMI5VI.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 f,this.isDisabledChange=new f,this.toggleClick=new f,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(p),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(p),o(g),o(_),o(c),o(B),o(b))},t.\u0275dir=u({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=u({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(p),o(c))},t.\u0275dir=u({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};