bimplus-webcomponents 0.0.187 → 0.0.188

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.
@@ -15320,7 +15320,7 @@ ${de}: ${G}`}_createAttributeGroupsFromResponse(a){let f=[],g=null;if(a.localize
15320
15320
  `],encapsulation:3,changeDetection:0})}}return p})();var S7e=1e3,z7e={KB:"kB",GB:"gib",MB:"mb"},n3e=(()=>{class p extends kQ{transform(a,f=z7e.KB,g="1.2-2",D=S7e){if(!this.isNumber(a))throw new Error("[BitConverterPipe]: value is not a number");let q=this.getSizeFromBites(a,f,D),de=super.transform(q,g);return de??=a.toString(),`(${de} ${f})`}getSizeFromBites(a,f,g){switch(f){case"kB":return a/g;case"mb":return a/(g*g);case"gib":return a/(g*g*g);default:return a}}isNumber(a){return typeof a=="number"&&!isNaN(a)}static{this.\u0275fac=(()=>{let a;return function(g){return(a||(a=$g(p)))(g||p)}})()}static{this.\u0275pipe=DI({name:"bitConverter",type:p,pure:!0})}}return p})();var zL=new Mo("bimplus-attachments-config"),wY=class{constructor(h){this.id=h.id??"",this.fileName=h.fileName??"",this.size=h.size??0}},_Y=class{static{this.attachment=new wY({})}static create(h){return this.attachment=new wY(h),this}static setId(h){return this.attachment.id=h,this}static setFileName(h){return this.attachment.fileName=h,this}static setSize(h){return this.attachment.size=h,this}static setFile(h){return this.attachment.file=h,this}static build(){let h=structuredClone(this.attachment);return this.attachment=new wY({}),h}};var R7e=["attachmentSizeRef"],L7e=["attachmentNameRef"];function x7e(p,h){if(p&1&&(ln(0,"span",4),Os(1),ia(2,"bitConverter"),vn()),p&2){let a=on();Kt(),s0(ale(2,1,a.attachment.size,"kB","1.2-2"))}}function N7e(p,h){if(p&1&&(ln(0,"span"),Os(1),vn(),ln(2,"div",4,1),Os(4),ia(5,"bitConverter"),vn()),p&2){let a=on();Kt(),ga("",a.type," "),Kt(3),ga(" ",ale(5,2,a.attachment.size,"kB","1.2-2")," ")}}function P7e(p,h){if(p&1){let a=zr();ln(0,"span",6),ia(1,"translate"),wi("click",function(){Ci(a);let g=on();return Di(g.deleteAttachment.emit(g.attachment))})("keypress",function(g){return Ci(a),Di(g.preventDefault())}),ln(2,"span",7),Os(3,"\u2715\uFE0E"),vn()()}p&2&&Io("title",oa(1,1,"_Delete attachment"))}var i3e=30,B7e=28,s3e=(()=>{class p{constructor(){this.deleteAttachment=new ns,this.getAttachment=new ns,this.parentWidthSignal=C0(void 0),this.attachmentSizeWidth=C0(0),this.nameIsFullyVisible=C0(!1),this.config=Pi(zL,{optional:!0}),this.hideSize=!!this.config?.hideAttachmentSize,this.nameInfoLineWidth=nM(()=>{let a=this.parentWidthSignal(),f=this.attachmentSizeWidth(),g=this.nameIsFullyVisible();return a?g?a-i3e:a-f-(i3e+B7e):0})}set parentWidth(a){a&&this.parentWidthSignal.set(a)}get type(){return`.${this.attachment.fileName.split(".").at(-1)}`}ngAfterViewInit(){this.attachmentSizeRef&&(this.attachmentSizeWidth.set(+this.attachmentSizeRef.nativeElement.clientWidth),this.createIntersectionObserver(),this.intersectionObserver.observe(this.attachmentNameRef.nativeElement))}ngOnDestroy(){this.intersectionObserver?.unobserve(this.attachmentNameRef.nativeElement)}createIntersectionObserver(){let a={root:null,rootMargin:"0px",threshold:1},f=g=>g.forEach(({intersectionRect:D,boundingClientRect:q})=>{let de=D.width===q.width;this.nameIsFullyVisible.set(de)});this.intersectionObserver=new IntersectionObserver(f,a)}static{this.\u0275fac=function(f){return new(f||p)}}static{this.\u0275cmp=ks({type:p,selectors:[["lib-bimplus-attachment-item"]],viewQuery:function(f,g){if(f&1&&($1(R7e,5),$1(L7e,5)),f&2){let D;f0(D=m0())&&(g.attachmentSizeRef=D.first),f0(D=m0())&&(g.attachmentNameRef=D.first)}},inputs:{closeIconTemplate:"closeIconTemplate",attachment:"attachment",parentWidth:"parentWidth"},outputs:{deleteAttachment:"deleteAttachment",getAttachment:"getAttachment"},decls:8,vars:7,consts:[["attachmentNameRef",""],["attachmentSizeRef",""],[1,"bim-attachment-item"],["data-test","bim-attachment",1,"bim-attachment-name",3,"click","keypress","title"],[1,"bim-attachment-size"],["data-test","delete-attachment-btn",1,"bim-attachment-delete-button",3,"title"],["data-test","delete-attachment-btn",1,"bim-attachment-delete-button",3,"click","keypress","title"],[1,"icon"]],template:function(f,g){if(f&1){let D=zr();ln(0,"div",2)(1,"div",3),wi("click",function(){return Ci(D),Di(g.getAttachment.emit(g.attachment))})("keypress",function(de){return Ci(D),Di(de.preventDefault())}),ln(2,"span",null,0),Os(4),vn(),as(5,x7e,3,5,"span",4),vn(),as(6,N7e,6,6)(7,P7e,4,3,"span",5),vn()}f&2&&(Kt(),B2("width",g.nameInfoLineWidth(),"px"),Io("title",g.attachment.fileName),Kt(3),s0(g.attachment.fileName),Kt(),Js(g.nameIsFullyVisible()&&!g.hideSize?5:-1),Kt(),Js(!g.nameIsFullyVisible()&&!g.hideSize?6:-1),Kt(),Js(g.config!=null&&g.config.hideDeleteAttachmentButton?-1:7))},dependencies:[n3e,jo,y1],styles:['.bim-attachment-item[_ngcontent-%COMP%]{border-bottom:var(--bim-attachment-item-border-bottom, .1rem solid var(--bim-attachment-item-border-bottom-color, #B8BBBF));line-height:2.5rem;display:flex;align-items:center;justify-content:space-between;color:#46494d;padding-left:var(--bim-attachment-item-padding-left, 2.6rem);background-image:var(--bim-attachment-item-background-image, url("./assets/icn_grid_attachments.png"));background-size:var(--bim-attachment-item-background-size, auto);background-repeat:no-repeat;background-position:var(--bim-attachment-item-background-position, .8rem center)}.bim-attachment-item[_ngcontent-%COMP%] .bim-attachment-name[_ngcontent-%COMP%]{padding-left:1rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.bim-attachment-item[_ngcontent-%COMP%] .bim-attachment-size[_ngcontent-%COMP%]{padding-left:.5rem;white-space:nowrap;margin-right:.4rem}.bim-attachment-item[_ngcontent-%COMP%] .bim-attachment-delete-button[_ngcontent-%COMP%]{width:2.5rem;cursor:pointer;margin-left:auto}.bim-attachment-item[_ngcontent-%COMP%] .bim-attachment-delete-button[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{font-weight:var(--bim-attachment-delete-button-icon-font-weight, normal);color:var(--bim-attachment-delete-button-icon-color, #B8BBBF)}.bim-attachment-item[_ngcontent-%COMP%] .bim-attachment-delete-button[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]:hover{color:#46494d}']})}}return p})();var k7e=["attachmentListRef"],H7e=["fileInput"],r3e=(p,h)=>h.id;function F7e(p,h){if(p&1){let a=zr();ln(0,"input",7,0),wi("change",function(g){Ci(a);let D=lf(1),q=on();return Di(q.onFileChanged(g,D))}),vn()}}function q7e(p,h){if(p&1){let a=zr();ln(0,"lib-bimplus-buttons-row",8),wi("fileChanged",function(g){Ci(a);let D=on();return Di(D.onFileChanged(g))}),vn()}if(p&2){let a,f=on();Rn("items",(a=f.config==null?null:f.config.buttons)!==null&&a!==void 0?a:f.buttons)("isMultiple",!0)}}function W7e(p,h){p&1&&(ln(0,"div",9),Os(1),ia(2,"translate"),vn()),p&2&&(Kt(),s0(oa(2,1,"_No attachments found")))}function U7e(p,h){if(p&1&&as(0,W7e,3,3,"div",9),p&2){let a=on(2);Js(a.config!=null&&a.config.showNoAttachmentsFound?0:-1)}}function j7e(p,h){if(p&1){let a=zr();ln(0,"lib-bimplus-attachment-item",11),wi("deleteAttachment",function(g){Ci(a);let D=on(3);return Di(D.deleteAttachment.emit(g))})("getAttachment",function(g){Ci(a);let D=on(3);return Di(D.getAttachment.emit(g))}),vn()}if(p&2){let a=h.$implicit,f=on(3);Rn("closeIconTemplate",f.closeIconTemplate)("parentWidth",f.attachmentListWidth())("attachment",a),Tl("data-test",a.id)}}function G7e(p,h){if(p&1&&vp(0,j7e,1,4,"lib-bimplus-attachment-item",10,r3e),p&2){let a=on(2);gp(a.attachments)}}function V7e(p,h){if(p&1&&(ln(0,"section",5,1),as(2,U7e,1,1)(3,G7e,2,0),vn()),p&2){let a=on();Kt(2),Js(a.attachments.length?3:2)}}function Y7e(p,h){p&1&&(ln(0,"div",9),Os(1),ia(2,"translate"),vn()),p&2&&(Kt(),s0(oa(2,1,"_No attachments found")))}function X7e(p,h){if(p&1&&as(0,Y7e,3,3,"div",9),p&2){let a=on(2);Js(a.config!=null&&a.config.showNoAttachmentsFound?0:-1)}}function Q7e(p,h){if(p&1){let a=zr();ln(0,"lib-bimplus-attachment-item",11),wi("deleteAttachment",function(g){Ci(a);let D=on(3);return Di(D.deleteAttachment.emit(g))})("getAttachment",function(g){Ci(a);let D=on(3);return Di(D.getAttachment.emit(g))}),vn()}if(p&2){let a=h.$implicit,f=on(3);Rn("closeIconTemplate",f.closeIconTemplate)("parentWidth",f.attachmentListWidth())("attachment",a),Tl("data-test",a.id)}}function Z7e(p,h){if(p&1&&vp(0,Q7e,1,4,"lib-bimplus-attachment-item",10,r3e),p&2){let a=on(2);gp(a.attachments)}}function K7e(p,h){if(p&1&&(ln(0,"div",6)(1,"lib-bimplus-scrollable-container")(2,"section",5,1),as(4,X7e,1,1)(5,Z7e,2,0),vn()()()),p&2){let a=on();Kt(4),Js(a.attachments.length?5:4)}}var SK=(()=>{class p extends M1{constructor(){super(...arguments),this.api=null,this.attachments=[],this.listOnly=!1,this.deleteAttachment=new ns,this.addAttachment=new ns,this.getAttachment=new ns,this.config=Pi(zL,{optional:!0}),this.buttons=[{id:"add-attachment",title:this.translateService.instant("_Add attachment"),tooltip:this.translateService.instant("_Add attachment"),disabled:!1,buttonStyle:"primary",type:"file"}],this.attachmentListWidth=C0(void 0)}open(){this.fileInput.nativeElement.click()}ngAfterViewInit(){this.createResizeObserver(),this.resizeObserver.observe(this.attachmentListRef.nativeElement)}ngOnDestroy(){this.resizeObserver.unobserve(this.attachmentListRef.nativeElement)}onFileChanged(a,f){let g=[];if(a instanceof FileList)g=Array.from(a);else if(a instanceof Event){let D=a.target;D?.files&&(g=Array.from(D.files))}for(let D of g)D instanceof File&&this.addAttachment.emit(D);f&&(f.value="")}createResizeObserver(){this.resizeObserver=new ResizeObserver(a=>{let{width:f}=a[0].contentRect;this.attachmentListWidth.set(f)})}static{this.\u0275fac=(()=>{let a;return function(g){return(a||(a=$g(p)))(g||p)}})()}static{this.\u0275cmp=ks({type:p,selectors:[["lib-bimplus-attachments"]],viewQuery:function(f,g){if(f&1&&($1(k7e,5),$1(H7e,5)),f&2){let D;f0(D=m0())&&(g.attachmentListRef=D.first),f0(D=m0())&&(g.fileInput=D.first)}},inputs:{api:"api",attachments:"attachments",closeIconTemplate:"closeIconTemplate",listOnly:[2,"listOnly","listOnly",Ss]},outputs:{deleteAttachment:"deleteAttachment",addAttachment:"addAttachment",getAttachment:"getAttachment"},features:[el],decls:5,vars:2,consts:[["fileInput",""],["attachmentListRef",""],[1,"bim-attachments"],["hidden","","type","file","multiple",""],[3,"items","isMultiple"],[1,"bim-attachments-list"],[1,"scrollable-content-container"],["hidden","","type","file","multiple","",3,"change"],[3,"fileChanged","items","isMultiple"],["data-test","no-attachments",1,"bim-attachments-list-empty"],[3,"closeIconTemplate","parentWidth","attachment"],[3,"deleteAttachment","getAttachment","closeIconTemplate","parentWidth","attachment"]],template:function(f,g){f&1&&(ln(0,"div",2),as(1,F7e,2,0,"input",3)(2,q7e,1,2,"lib-bimplus-buttons-row",4)(3,V7e,4,1,"section",5)(4,K7e,6,1,"div",6),vn()),f&2&&(Kt(),Js(g.listOnly?1:2),Kt(2),Js(g.listOnly?3:4))},dependencies:[jo,y1,zI,s3e,RI],styles:[`lib-bimplus-buttons-row{--button-row-margin-top: 0;--button-row-margin-right: 0;--button-row-margin-bottom: 1.4rem;--button-row-margin-left: 0}lib-bimplus-scrollable-container{--scrollable-container-paddin-right: 0}.bim-attachments{display:flex;flex:1;flex-direction:column}.bim-attachments .scrollable-content-container{position:relative;flex:1}.bim-attachments .scrollable-content-container lib-bimplus-scrollable-container{position:absolute;top:0;bottom:0;width:100%}.bim-attachments-list{color:#84888c;cursor:pointer}.bim-attachments-list-empty{padding:2.5rem .5rem;color:var(--details-controls-details-not-found-text-color);text-align:center}
15321
15321
  `],encapsulation:3,changeDetection:0})}}return p})();var $B=(()=>{class p{getAttachment(a){let f;return a instanceof File?f=_Y.setFile(a).setFileName(a.name).build():f=_Y.create(a).build(),f}download(a,f){let g=document.createElement("a");g.rel="noopener noreferrer",g.target="_blank",g.href=a,g.download=f,g.click()}static{this.\u0275fac=function(f){return new(f||p)}}static{this.\u0275prov=ha({token:p,factory:p.\u0275fac,providedIn:"root"})}}return p})();var a3e="delete",$7e="cancel",zK=(()=>{class p{get title(){return this._title}set title(a){this._title=a}get message(){return this._message}set message(a){this._message=a}constructor(a,f){this.dialogService=a,this.translateService=f,this._title="",this._message="",this.buttons=[{id:a3e,title:this.translateService.instant("_Delete"),tooltip:this.translateService.instant("_Delete"),disabled:!1,buttonStyle:"primary"},{id:$7e,title:this.translateService.instant("_Cancel"),tooltip:this.translateService.instant("_Cancel"),disabled:!1,buttonStyle:"secondary"}],this.data=this.dialogService.inputData,this.data&&(this._title=this.data.title||"",this._message=this.data.message||"",this.acceptCallback=this.data.acceptCallback)}close(){this.dialogService.close()}keypressClose(a){(a.key==="Escape"||a.key==="Esc")&&this.dialogService.close()}buttonRowButtonClicked(a){this.dialogService.close(),a.id===a3e&&this.acceptCallback?.()}handleKeydown(a){(a.key==="Escape"||a.key==="Esc")&&this.close()}static{this.\u0275fac=function(f){return new(f||p)(ls(G_),ls(za))}}static{this.\u0275cmp=ks({type:p,selectors:[["lib-bimplus-overlay-dialog-delete"]],hostBindings:function(f,g){f&1&&wi("keydown",function(q){return g.handleKeydown(q)},!1,MI)},inputs:{title:"title",message:"message"},decls:10,vars:3,consts:[[1,"overlay-dialog-container"],[1,"overlay-dialog-container_title"],[1,"overlay-dialog-container_title_icon"],[1,"overlay-dialog-container_title_msg"],[1,"overlay-dialog-container_title_close",3,"click","keypress"],[1,"overlay-dialog-container_content"],[1,"overlay-dialog-container_content_msg",3,"innerHTML"],[1,"buttons"],[3,"buttonClicked","items"]],template:function(f,g){f&1&&(ln(0,"div",0)(1,"div",1),Rs(2,"div",2),ln(3,"div",3),Os(4),vn(),ln(5,"div",4),wi("click",function(){return g.close()})("keypress",function(q){return g.keypressClose(q)}),vn()(),ln(6,"div",5),Rs(7,"div",6),ln(8,"div",7)(9,"lib-bimplus-buttons-row",8),wi("buttonClicked",function(q){return g.buttonRowButtonClicked(q)}),vn()()()()),f&2&&(Kt(4),ga(" ",g.title," "),Kt(3),Rn("innerHTML",g.message,S_),Kt(2),Rn("items",g.buttons))},dependencies:[jo,zI],styles:[`.overlay-dialog-container{display:inline-flex;flex-direction:column;box-shadow:0 .4rem .8rem 0 var(--card-box-shadow-color),0 .6rem 2rem 0 var(--card-box-shadow-color);min-width:45rem;max-width:60rem;width:100vw}.overlay-dialog-container .overlay-dialog-container_title{background-color:var(--color-help-popup-title-background);display:inline-flex;align-items:center;height:3.2rem}.overlay-dialog-container .overlay-dialog-container_title .overlay-dialog-container_title_icon{width:1.8rem;height:1.8rem;background:url("./assets/bimplus_Components_Overlay_Dialog_Warning_Title.svg") no-repeat center center;padding:0 1.6rem}.overlay-dialog-container .overlay-dialog-container_title .overlay-dialog-container_title_msg{color:var(--main-menu-text-default);font:700 1.3832rem Source Sans Pro,Helvetica,Arial,tahoma,sans-serif;text-transform:capitalize;margin-bottom:.2rem}.overlay-dialog-container .overlay-dialog-container_title .overlay-dialog-container_title_close{width:1.8rem;height:1.8rem;background:url("./assets/bimplus_Components_Overlay_Dialog_Cross_White.svg") no-repeat center center;cursor:default;margin:0 0 0 auto;padding-right:1.6rem}.overlay-dialog-container .overlay-dialog-container_title .overlay-dialog-container_title_close:hover{cursor:pointer}.overlay-dialog-container .content .warning-title{line-height:2.4rem}.overlay-dialog-container .content .warning-message{line-height:1.6rem}.overlay-dialog-container .overlay-dialog-container_content{background-color:var(--main-menu-text-default);flex-grow:1}.overlay-dialog-container .overlay-dialog-container_content .overlay-dialog-container_content_msg{color:var(--color-help-popup-title-background);font:400 1.28rem Source Sans Pro,Helvetica,Arial,tahoma,sans-serif;padding-top:.8rem;padding-left:1.6rem}.overlay-dialog-container .buttons{padding:1.6rem}
15322
15322
  `],encapsulation:3})}}return p})();var o3e=(()=>{class p{set autoResizeMinRows(a){this._autoResizeMinRows=a>0?a:1,this.currentRows=this.currentRows<a?a:this.currentRows,this.input.rows=a}get autoResizeMinRows(){return this._autoResizeMinRows}set autoResizeMaxRows(a){this._autoResizeMaxRows=a<1?1:a}get autoResizeMaxRows(){return this._autoResizeMaxRows}set libAutoResizeTextarea(a){this._libAutoResizeTextarea=a}get libAutoResizeTextarea(){return this._libAutoResizeTextarea}constructor(a){this.el=a,this._libAutoResizeTextarea=!1,this._autoResizeMinRows=1,this._autoResizeMaxRows=1,this.currentRows=1,this.offsetHeight=0,this.avgLineHeight=0,this.input=this.el.nativeElement}onInput(){this.libAutoResizeTextarea&&(this.calculateLineHeight(),this.updateRows())}calculateLineHeight(){let a=window.getComputedStyle(this.input,null),f=a.getPropertyValue("line-height"),g=0;f==="normal"?g=(parseFloat(a.getPropertyValue("font-size"))||16)*1.14:g=parseFloat(f),this.avgLineHeight=Math.trunc(g)}updateRows(){this.offsetHeight<=0&&(this.offsetHeight=this.input.scrollHeight),this.input.rows=this._autoResizeMinRows;let a=Math.floor((this.input.scrollHeight-this.offsetHeight)/this.avgLineHeight),f=this._autoResizeMinRows+a;this.input.rows=f>this._autoResizeMaxRows?this._autoResizeMaxRows:f}static{this.\u0275fac=function(f){return new(f||p)(ls(Cl))}}static{this.\u0275dir=Dl({type:p,selectors:[["","libAutoResizeTextarea",""]],hostBindings:function(f,g){f&1&&wi("input",function(){return g.onInput()})},inputs:{autoResizeMinRows:"autoResizeMinRows",autoResizeMaxRows:"autoResizeMaxRows",libAutoResizeTextarea:"libAutoResizeTextarea"}})}}return p})();function eNe(p,h){if(p&1){let a=zr();ln(0,"textarea",2),ia(1,"translate"),wi("keydown",function(g){Ci(a);let D=on();return Di(D.onKeydown(g))}),vn()}if(p&2){let a=on();Rn("formControl",a.textareaControl)("placeholder",oa(1,8,a.placeholder))("name",a.name)("readonly",a.readonly)("required",a.required)("libAutoResizeTextarea",a.activeAutoResizeTextarea)("autoResizeMinRows",a.minRows)("autoResizeMaxRows",a.maxRows)}}function tNe(p,h){if(p&1){let a=zr();ln(0,"textarea",3),wi("keydown",function(g){Ci(a);let D=on();return Di(D.onKeydown(g))}),vn()}if(p&2){let a=on();Rn("formControl",a.textareaControl)("placeholder",a.placeholder)("name",a.name)("readonly",a.readonly)("required",a.required)("rows",a.rows)}}var RK=(()=>{class p{set name(a){this._name=a}get name(){return this._name}set placeholder(a){this._placeholder=a}get placeholder(){return this._placeholder}set readonly(a){this._readonly=a}get readonly(){return this._readonly}set required(a){this._required=a}get required(){return this._required}set minRows(a){this._minRows=a}get minRows(){return this._minRows}set maxRows(a){this._maxRows=a}get maxRows(){return this._maxRows}set activeAutoResizeTextarea(a){this._activeAutoResizeTextarea=a}get activeAutoResizeTextarea(){return this._activeAutoResizeTextarea}set clearValue(a){a?(this.textareaControl.reset(),this._clearValue=!1):this._clearValue=a}get clearValue(){return this._clearValue}set rows(a){this._rows=a}get rows(){return this._rows}constructor(){this.textareaControl=new XR,this.textAreaValueChange=new ns,this._name="",this._placeholder="",this._readonly=!1,this._required=!1,this._rows=1,this._activeAutoResizeTextarea=!1,this._minRows=1,this._maxRows=1,this._clearValue=!1}ngOnInit(){this._textareaSubscription=this.textareaControl.valueChanges.subscribe(a=>{this.textAreaValueChange.emit(a)})}getTextareaValue(){return this.textareaControl.value}onKeydown(a){return["<",">"].includes(a.key)?(a.preventDefault(),!1):!0}ngOnDestroy(){this._textareaSubscription?.unsubscribe()}static{this.\u0275fac=function(f){return new(f||p)}}static{this.\u0275cmp=ks({type:p,selectors:[["lib-bimplus-textarea"]],inputs:{name:"name",placeholder:"placeholder",readonly:"readonly",required:"required",minRows:"minRows",maxRows:"maxRows",activeAutoResizeTextarea:"activeAutoResizeTextarea",clearValue:"clearValue",rows:"rows"},outputs:{textAreaValueChange:"textAreaValueChange"},decls:2,vars:1,consts:[[3,"formControl","placeholder","name","readonly","required","libAutoResizeTextarea","autoResizeMinRows","autoResizeMaxRows"],[3,"formControl","placeholder","name","readonly","required","rows"],[3,"keydown","formControl","placeholder","name","readonly","required","libAutoResizeTextarea","autoResizeMinRows","autoResizeMaxRows"],[3,"keydown","formControl","placeholder","name","readonly","required","rows"]],template:function(f,g){f&1&&as(0,eNe,2,10,"textarea",0)(1,tNe,1,6,"textarea",1),f&2&&Js(g.activeAutoResizeTextarea?0:1)},dependencies:[SA,IB,Rw,e0e,$le,o3e,jo,y1],styles:["textarea[_ngcontent-%COMP%]{font-size:1.28rem;font-family:Source Sans Pro,Helvetica,Arial,tahoma,sans-serif;font-weight:400;padding:.4rem .4rem .4rem .3rem;border-radius:0;border:.1rem solid;border-color:var(--issue-details-view-select-border-color);background-color:var(--issue-details-view-select-background-color);resize:none;width:calc(100% - .8rem);margin-right:.8rem;box-sizing:border-box;white-space:normal;line-height:1.6rem}textarea[_ngcontent-%COMP%]:hover{background-color:var(--control-background-hover-color);border-radius:0;border:.1rem solid;border-color:var(--issue-details-view-select-border-color)}textarea[_ngcontent-%COMP%]:focus-visible{border-radius:0;border:.1rem solid;border-color:var(--issue-details-view-select-border-color);outline:none}textarea[_ngcontent-%COMP%]::placeholder{color:var(--dark-gray-color)}"]})}}return p})();function nNe(p,h){if(p&1&&(ln(0,"div",2)(1,"div",9),Os(2),vn()()),p&2){let a=on(2);Kt(2),s0(a.isActUserAuthor?"":a.displayname)}}function iNe(p,h){if(p&1){let a=zr();ln(0,"div",10),wi("click",function(){Ci(a);let g=on(2);return Di(g.close())})("keydown",function(g){Ci(a);let D=on(2);return Di(D.onKeyPress(g))}),vn()}}function sNe(p,h){if(p&1&&(ln(0,"div",4),Os(1),vn()),p&2){let a=on(2);Kt(),s0(a.message)}}function rNe(p,h){if(p&1){let a=zr();ln(0,"lib-bimplus-attachments",11),wi("getAttachment",function(g){Ci(a);let D=on(2);return Di(D.getAttachment.emit(g))}),vn()}if(p&2){let a=on(2);Rn("attachments",a.attachments)}}function aNe(p,h){if(p&1&&(ln(0,"a",6),Rs(1,"div",12),ia(2,"translate"),ln(3,"div",13),Os(4),vn()()),p&2){let a=h.$implicit;Io("href",a.link,q_),Kt(),Io("title",oa(2,4,"_Attachment_link")),Kt(2),Io("title",a.name),Kt(),s0(a.name)}}function oNe(p,h){if(p&1&&as(0,aNe,5,6,"a",7),p&2){let a=on(2);Rn("ngForOf",a.attachmentLinkItems)}}function lNe(p,h){if(p&1&&(ln(0,"a",6),Rs(1,"div",14),ia(2,"translate"),ln(3,"div",13),Os(4),vn()()),p&2){let a=h.$implicit;Io("href",a.url,q_),Kt(),Io("title",oa(2,4,"_Hyperlink")),Kt(2),Io("title",a.url),Kt(),s0(a.name)}}function cNe(p,h){if(p&1&&(ln(0,"div",8),Os(1),vn()),p&2){let a=on(2);Kt(),ga(" ",a.date," ")}}function uNe(p,h){if(p&1&&(ln(0,"div",1),as(1,nNe,3,1,"div",2)(2,iNe,1,0,"div",3)(3,sNe,2,1,"div",4)(4,rNe,1,1,"lib-bimplus-attachments",5)(5,oNe,1,1,"a",6)(6,lNe,5,6,"a",7)(7,cNe,2,1,"div",8),vn()),p&2){let a=on();Z6(a.isActUserAuthor?"author":""),Kt(),Js(a.isActUserAuthor?-1:1),Kt(),Js(a.isActUserAuthor?2:-1),Kt(),Js(a.message!==void 0?3:-1),Kt(),Js(a.attachments.length?4:-1),Kt(),Js(a.attachmentLinkItems.length?5:-1),Kt(),Rn("ngForOf",a.hyperlinks),Kt(),Js(a.date&&a.date.length>0?7:-1)}}var dNe={hideDeleteAttachmentButton:!0,hideAttachmentSize:!0},LK=(()=>{class p{constructor(){this.outputActionCommentEvent=new ns,this.getAttachment=new ns,this._message=void 0,this.api=null,this.attachmentLinkItems=[],this._date="",this._action="close",this._commentId="",this._isActUserAuthor=!0,this._displayname="",this.hyperlinks=[],this.attachments=[]}set message(a){this._message=a}get message(){return this._message}set date(a){let f=new Intl.DateTimeFormat(void 0,{timeStyle:"short"}).format(new Date(a));this._date=f}get date(){return this._date}set action(a){this._action=a}get action(){return this._action}set commentId(a){this._commentId=a}get commentId(){return this._commentId}set isActUserAuthor(a){this._isActUserAuthor=a}get isActUserAuthor(){return this._isActUserAuthor}set displayname(a){this._displayname=a}get displayname(){return this._displayname}emitAction(a){this.outputActionCommentEvent.emit(a)}close(){let a={action:this.action,data:{commentId:this.commentId}};this.emitAction(a)}onKeyPress(a){(a.key==="Escape"||a.key==="Esc")&&this.close()}formatTime(a){let f=window.navigator.language,g=new Date(a);return f.includes("en")?xQ(g,"hh:mm a",f):xQ(g,"hh:mm",f)}static{this.\u0275fac=function(f){return new(f||p)}}static{this.\u0275cmp=ks({type:p,selectors:[["lib-bimplus-comment"]],inputs:{api:"api",attachmentLinkItems:"attachmentLinkItems",message:"message",date:"date",action:"action",commentId:"commentId",isActUserAuthor:"isActUserAuthor",displayname:"displayname",hyperlinks:"hyperlinks",attachments:"attachments"},outputs:{outputActionCommentEvent:"outputActionCommentEvent",getAttachment:"getAttachment"},features:[dl([{provide:zL,useValue:dNe}])],decls:1,vars:1,consts:[[1,"comment-item-container",3,"class"],[1,"comment-item-container"],[1,"comment-header"],[1,"comment-close"],[1,"comment-item-text"],["listOnly","",3,"attachments"],["target","_blank",1,"item-row",3,"href"],["class","item-row","target","_blank",3,"href",4,"ngFor","ngForOf"],[1,"comment-item-date"],[1,"comment-title"],[1,"comment-close",3,"click","keydown"],["listOnly","",3,"getAttachment","attachments"],[1,"attachment-link-icon",3,"title"],[1,"text",3,"title"],[1,"link-icon",3,"title"]],template:function(f,g){f&1&&as(0,uNe,8,9,"div",0),f&2&&Js(g.message!==void 0?0:-1)},dependencies:[Kf,y1,SK],styles:[`.new-comment-attachment{display:flex;align-items:center;gap:.4rem}.new-comment-attachment .text{line-height:2.4rem;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.link-icon{background:url("./assets/Links_18_gray.svg") no-repeat center;width:1.8rem;height:1.8rem;cursor:pointer;display:flex}.attachment-link-icon{background:url("./assets/Attachmentlink_18_gray.svg") no-repeat center;width:1.8rem;height:1.8rem;cursor:pointer;display:flex}.item-row{display:flex;gap:.2rem;align-items:center;line-height:2.4rem}.comment-item-container{font:400 1.28rem Source Sans Pro,Helvetica,Arial,tahoma,sans-serif;background-color:var(--comments-list-item-container-background-color);border-radius:.4rem;margin:1rem 8rem 1rem 1rem;padding:.8rem}.comment-item-container.author{background-color:var(--comments-item-comment-author-background-color);margin:1rem 1rem 1rem 8rem}.comment-item-container a{text-decoration:none!important;color:var(--ui-text-1-color)}.comment-item-container .comment-header{display:inline-flex;justify-content:space-between;align-items:center;width:100%}.comment-item-container .comment-header .comment-title{font-weight:700}.comment-item-container .comment-close{background:url("./assets/bimplus_WebIcons_Cross.svg") no-repeat center;background-size:2rem;height:2rem;width:2rem;border:none;cursor:unset;float:right}.comment-item-container .comment-close:hover{cursor:pointer}.comment-item-container .comment-item-text{margin:.8rem 0;word-break:break-all;color:var(--ui-text-1-color)}.comment-item-container .hyperlink .link-icon{background-size:1.8rem}.comment-item-container .comment-attachments-list{line-height:2.4rem;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;color:var(--ui-text-1-color)}.comment-item-container .comment-attachments-list .attachment-object-item{width:100%}.comment-item-container .comment-attachments-list .attachment-object-item .attachment-object-link{display:inline-flex;align-items:center}.comment-item-container .comment-attachments-list .attachment-icon,.comment-item-container .comment-attachments-list .links-icon,.comment-item-container .comment-attachments-list .attachmentLink-icon{width:1.5rem;height:1.5rem;margin:0 .2rem}.comment-item-container .comment-attachments-list .tab-attachments{background:url("./assets/Attachment_18_gray.svg") no-repeat center}.comment-item-container .comment-attachments-list .tab-attachmentlinks{background:url("./assets/Attachmentlink_18_gray.svg") no-repeat center}.comment-item-container .comment-attachments-list .tab-hyperlinks{background:url("./assets/Links_18_gray.svg") no-repeat center}.comment-item-container .comment-attachments-list .icon:hover{cursor:pointer}.comment-item-container .comment-item-date{text-align:end;color:var(--comments-list-item-date-color)}lib-bimplus-attachments{--bim-attachment-item-border-bottom: none;--bim-attachment-item-background-position: 0 center;--bim-attachment-item-padding-left: 1.3rem;--bim-attachment-item-background-image: url("./assets/Attachment_18_gray.svg");--bim-attachment-item-background-size: 1.8rem}lib-links-to-documents{--bim-attachment-name-padding: 0;--bim-attachment-item-background-position: 0;--attachment-row-border-bottom: none;--bim-attachment-item-background-image: url("./assets/Attachmentlink_18_gray.svg");--bim-attachment-delete-button: #444;--attachment-row-margin: 0;--bim-attachment-item-background-size: 1.8rem;--bim-attachment-delete-button-font-weight: bold;--bim-attachmentlink-item-left-padding: 2.3rem}
15323
- `],encapsulation:3})}}return p})();var xK=(()=>{class p{constructor(a){this.decorators=a,this.bimplusAttachmentsService=Pi($B)}deleteComment(a){return Yu(this.api.comments.delete(a))}downloadAttachment(a){let{id:f,fileName:g}=a;if(!this.api)return;let D=this.api,q=`${D.getApiTeamUrl()}attachments/${f}/download?api-token=${D.getAccessToken()}&openInBrowser=true`;this.bimplusAttachmentsService.download(q,g)}postComments(a,f,g,D,q){return Yu(this.api.objects.postComment(a,f)).pipe($y(de=>{let{id:G}=de,ee=D.map(ye=>{let je=new FormData;return je.append("file",ye.file),je.append("name",ye.fileName),je.append("size",ye.file.size.toString()),je.append("type",ye.file.type),je.append("objectId",G),je});return(ee.length?mS(ee.map(ye=>Yu(this.api.objects.postAttachment(G,ye,void 0,"")))):Bd([])).pipe(Xu(()=>G))}),$y(de=>q.length?lce(q,de,this.api).pipe(Xu(()=>de)):Bd(de)),$y(de=>g.length?this.manageHyperLinks(de,g).pipe(Xu(()=>de)):Bd(de)),rV(null),Wre(),pX(de=>(console.error("Error in postComments:",de),Bd(null))))}decorateComment(a){if(a.attachmentLinks&&a.attachmentLinks.length>0){let f=a.attachmentLinks.map(g=>this.decorators.decorateLink(this.api,g,[a.id]));a.attachmentLinks=f}}decorateComments(a){return a.forEach(f=>{this.decorateComment(f)}),a}loadComments(a){return Yu(this.api.objects.getComments(a)).pipe(Xu(f=>{if(!f)throw new Error("Comments response is undefined");return this.decorateComments(f)}))}manageHyperLinks(a,f){let g=[];return f.forEach(D=>{if(!D)return;let q=JSON.stringify({name:D.name,objectId:D.objectId,url:D.url}),de=this.api?.objects.postHyperlink(a,q).catch(G=>{console.log(G)});g.push(de)}),Yu(Promise.all(g))}static{this.\u0275fac=function(f){return new(f||p)(h0(wK))}}static{this.\u0275prov=ha({token:p,factory:p.\u0275fac})}}return p})();var NK=(()=>{class p{constructor(){this._statusBarData=new fu({title:"",statusBarVisible:!1})}get statusBarVisible(){return this._statusBarData.value.statusBarVisible}get title(){return this._statusBarData.value.title}get statusBarData(){return this._statusBarData.value}get statusBarDataSubscription(){return this._statusBarData}setStatusBarData(a){this._statusBarData.next(a)}static{this.\u0275fac=function(f){return new(f||p)}}static{this.\u0275prov=ha({token:p,factory:p.\u0275fac,providedIn:"root"})}}return p})();var hNe=()=>["new-comment-attachments"],c3e=()=>[];function fNe(p,h){if(p&1){let a=zr();ln(0,"div",22),Rs(1,"div",22),ln(2,"div",23),Os(3),vn(),ln(4,"span",24),wi("click",function(){let g=Ci(a).$implicit,D=on(3);return Di(D.removeNewCommentAttachment(g))})("keydown",function(g){let D=Ci(a).$implicit,q=on(3);return Di(q.removeNewCommentAttachmentKeypress(g,D))}),vn()()}if(p&2){let a=h.$implicit;Rn("ngClass","new-comment-attachment "+a.type)("title",a.type==="Hyperlink"?a.url:a.name),Kt(),Rn("ngClass","icon-small "+a.type)("title",a.type==="Hyperlink"?a.url:a.name),Kt(2),ga("",a.name," "),Kt(),Io("title",a.deleteButtonTitle)}}function mNe(p,h){if(p&1&&(ln(0,"div",7),as(1,fNe,5,6,"div",21),vn()),p&2){let a=on(2);Kt(),Rn("ngForOf",a.newCommentAttachments)}}function bNe(p,h){if(p&1){let a=zr();ln(0,"form",8)(1,"div",25),Rs(2,"div",26),ln(3,"lib-bimplus-input-text-field",27),ia(4,"translate"),wi("enterKeyPressed",function(){Ci(a);let g=on(2);return Di(g.onEnterKeyPressedInHyperlinkForm())}),vn()(),ln(5,"div",25),Rs(6,"div",28),ln(7,"lib-bimplus-input-text-field",29),ia(8,"translate"),wi("enterKeyPressed",function(){Ci(a);let g=on(2);return Di(g.onEnterKeyPressedInHyperlinkForm())}),vn()(),ln(9,"lib-bimplus-buttons-row",17),wi("buttonClicked",function(g){Ci(a);let D=on(2);return Di(D.hyperlinkButtonRowButtonClicked(g))}),vn()()}if(p&2){let a=on(2);Rn("formGroup",a.hyperlinkForm),Kt(3),Io("placeholder",oa(4,4,"_Name")),Kt(4),Io("placeholder",oa(8,6,"_URL")),Kt(2),Rn("items",a.hyperlinkButtonRowItems)}}function vNe(p,h){p&1&&(ln(0,"div",20),Os(1),ia(2,"translate"),vn()),p&2&&(Kt(),ga(" ",oa(2,1,"_No comments found")," "))}function gNe(p,h){if(p&1&&(ln(0,"div",30),Os(1),vn()),p&2){let a=on().$implicit,f=on(3);Kt(),ga(" ",f.formatDate(a.createdAt)," ")}}function yNe(p,h){if(p&1){let a=zr();as(0,gNe,2,1,"div",30),ln(1,"lib-bimplus-comment",31),wi("outputActionCommentEvent",function(g){Ci(a);let D=on(3);return Di(D.handleActionCommentEvent(g))})("getAttachment",function(g){Ci(a);let D=on(3);return Di(D.onGetAttachment(g))}),vn()}if(p&2){let a,f,g=h.$implicit,D=on(3);Js(g.createdAt&&D.isSameDate(g.createdAt)?0:-1),Kt(),Rn("message",g.text)("api",D.api)("date",g.createdAt?g.createdAt:"")("commentId",g.id)("attachments",(a=g.attachments)!==null&&a!==void 0?a:hB(10,c3e))("attachmentLinkItems",(f=g.attachmentLinks)!==null&&f!==void 0?f:hB(11,c3e))("hyperlinks",g.hyperlinks)("isActUserAuthor",D.isActUserAuthor(g))("displayname",D.displayName(g))}}function MNe(p,h){if(p&1&&(vp(0,yNe,2,12,null,null,tM),ia(2,"async")),p&2){let a=on(2);gp(oa(2,0,a.commentsList$))}}function INe(p,h){if(p&1){let a=zr();ln(0,"div",2)(1,"div",3)(2,"lib-bimplus-textarea",4),wi("textAreaValueChange",function(g){Ci(a);let D=on();return Di(D.onTextareaValueChange(g))}),vn()(),ln(3,"lib-bimplus-attachments",5,0),wi("addAttachment",function(g){Ci(a);let D=on();return Di(D.onAddAttachment(g))})("deleteAttachment",function(g){Ci(a);let D=on();return Di(D.onDeleteAttachment(g))}),vn(),ln(5,"lib-links-to-documents",6,1),wi("attachmentsLinkChange",function(g){Ci(a);let D=on();return Di(D.onAttachmentsLinkChange(g))}),vn(),as(7,mNe,2,1,"div",7)(8,bNe,10,8,"form",8),ln(9,"div",9)(10,"div",10),Rs(11,"div",11),ln(12,"div",12),ia(13,"translate"),wi("click",function(){Ci(a);let g=lf(4);return Di(g.open())})("keydown",function(){Ci(a);let g=lf(4);return Di(g.open())}),vn(),ln(14,"div",13),ia(15,"translate"),wi("click",function(){Ci(a);let g=on();return Di(g.addHyperlinkIconClicked())})("keydown",function(g){Ci(a);let D=on();return Di(D.addHyperlinkIconKeypress(g))}),vn(),ln(16,"div",14),ia(17,"translate"),wi("click",function(){Ci(a);let g=lf(6),D=on();return Di(g.createAttachmentLink(D.api))})("keydown",function(){Ci(a);let g=lf(6),D=on();return Di(g.createAttachmentLink(D.api))}),vn(),Rs(18,"div",15),vn(),ln(19,"div",16)(20,"lib-bimplus-buttons-row",17),wi("buttonClicked",function(g){Ci(a);let D=on();return Di(D.buttonRowButtonClicked(g))}),vn()()(),Rs(21,"div",18),ln(22,"div",19)(23,"lib-bimplus-scrollable-container"),as(24,vNe,3,3,"div",20),ia(25,"async"),as(26,MNe,3,2),vn()()()}if(p&2){let a,f=on();Kt(2),Rn("placeholder",f.placeholder)("name",f.name)("readonly",f.readonly)("activeAutoResizeTextarea",!0)("minRows",f.minRows)("maxRows",f.maxRows)("clearValue",f.clearTextareaValue()),Kt(),Z6(hB(33,hNe)),Rn("attachments",f.attachmentsState()),Kt(2),Rn("attachments",f.attachmentLinkItems)("api",f.api)("project",f.project)("canCreateAttachmentLink",!0)("canDeleteAttachmentLink",!0)("wormholeSelector",f.wormholeSelector)("env",f.env)("inputBaseUrl",f.inputBaseUrl),Kt(2),Js(f.newCommentAttachments.length>0?7:-1),Kt(),Js(f.isAddingHyperlink?8:-1),Kt(4),Rn("title",oa(13,25,"_Add attachment")),Kt(2),Rn("title",oa(15,27,"_Add hyperlink")),Kt(2),Rn("title",oa(17,29,"_Add_attachment_link")),Kt(4),Rn("items",f.buttonRowItems),Kt(4),Js(((a=oa(25,31,f.commentsList$))==null?null:a.length)===0?24:26)}}var ANe={showNoAttachmentsFound:!1,hideAttachmentSize:!0},u3e=(()=>{class p extends M1{set rootObjectId(a){this._rootObjectId=a}get rootObjectId(){return this._rootObjectId}set userId(a){this._userId=a}get userId(){return this._userId}constructor(a,f,g,D,q,de,G){super(f),this.dialogService=a,this.datePipe=g,this.formBuilder=D,this.bimplusAttachmentsService=q,this.bimplusObjectCommentsListService=de,this.statusBarService=G,this.project=null,this.wormholeSelector="localEmbeddedModalId",this.env="prod",this.attachmentLinkItems=[],this.inputBaseUrl="",this.commentsList$=new fu([]),this.loading=C0(!1),this.attachmentsState=C0([]),this.buttonRowItems=[],this.hyperlinkButtonRowItems=[],this.textAreaValue=null,this.lastShownDate="",this.placeholder="",this.name="",this.readonly=!1,this.autoResizeTextarea=!0,this.minRows=3,this.maxRows=10,this.clearValue=!1,this.statusBarTitleMessage=this.translateService.instant("_Loading"),this.newAttachmentIDs=[],this.isAddingHyperlink=!1,this.newCommentAttachments=[],this._rootObjectId="",this._userId="",this.hyperlinkForm=this.formBuilder.group({name:["",[]],url:["",[ES.required,ES.pattern(/^[^<>]*$/),ES.pattern(/^(?!\s*$).+/)]]})}isCreateButtonDisabled(){return!(this.textAreaValue||this.newAttachmentIDs?.length>0||this.getHyperlinks(this.rootObjectId)?.length>0||this.attachmentsState()?.length>0)}checkCreateButtonState(){this.buttonRowItems?.[0]&&(this.buttonRowItems[0].disabled=this.isCreateButtonDisabled())}ngOnInit(){this.bimplusObjectCommentsListService.api=this.api,this.loadComments();let a=[{id:"submit",title:this.translateService.instant("_Add comment"),tooltip:this.translateService.instant("_Add comment"),disabled:this.isCreateButtonDisabled(),buttonStyle:"primary"}];this.placeholder=this.translateService.instant("_Place comment text here"),this.name=this.translateService.instant("comment"),this.buttonRowItems=a,this.hyperlinkButtonRowItems.push({id:"cancel-hyperlink",title:this.translateService.instant("_Cancel"),tooltip:this.translateService.instant("_Cancel"),disabled:!1,buttonStyle:"primary"},{id:"add-hyperlink",title:this.translateService.instant("_Add hyperlink"),tooltip:this.translateService.instant("_Add hyperlink"),disabled:!0,buttonStyle:"primary"}),this.hyperlinkForm.statusChanges.subscribe(f=>{this.hyperlinkButtonRowItems[1].disabled=f!=="VALID"})}ngOnChanges(a){a.rootObjectId&&!a.rootObjectId.firstChange&&this.loadComments()}onAttachmentsLinkChange(a){let f=a.map(D=>(D.iconClass="fa fa-link",D.iconTitle=this.translateService.instant("_Attachment_link"),D.deleteButtonTitle=this.translateService.instant("_Delete_attachmentlink"),D)),g=this.newCommentAttachments.filter(D=>D?.type==="Hyperlink");this.newCommentAttachments=[...g,...f],this.newAttachmentIDs=a.map(D=>D.id),this.checkCreateButtonState()}onAddAttachment(a){let f=this.bimplusAttachmentsService.getAttachment(a);this.attachmentsState.update(g=>[...g,f]),this.checkCreateButtonState()}onDeleteAttachment(a){this.attachmentsState.update(f=>f.filter(g=>g!==a)),this.checkCreateButtonState()}onGetAttachment(a){this.bimplusObjectCommentsListService.downloadAttachment(a)}onTextareaValueChange(a){this.textAreaValue=a,this.checkCreateButtonState()}handleActionCommentEvent(a){if(a.action==="delete"){let f=a.data;this.openDialogDeleteComment(f.commentId)}}actionDialogClose(a){this.dialogService.close(a)}openDialogDeleteComment(a){this.dialogService.open(zK,{options:{position:"middle",positionOptions:{},overlayClickEnabled:!1,overlayVisibilityEnabled:!0,draggable:!0},data:{title:this.translateService.instant("_Comment delete confirmation title"),message:this.translateService.instant("_Comment delete confirmation message"),acceptCallback:()=>{this.deleteComment(a)}}})}isSameDate(a){if(!a)return!1;let f=this.datePipe.transform(a,"shortDate");return this.lastShownDate===f?!1:(this.lastShownDate=a,!0)}buttonRowButtonClicked(a){if(a.id==="submit"){if(!this.api||!this.rootObjectId)return;this.loading.set(!0);let f={text:this.textAreaValue,objectId:this.rootObjectId},g=JSON.stringify(f);this.statusBarService.setStatusBarData({statusBarVisible:!0,title:this.translateService.instant("_Creating new comment")}),this.bimplusObjectCommentsListService.postComments(this.rootObjectId,g,this.getHyperlinks(this.rootObjectId),this.attachmentsState(),this.newAttachmentIDs).pipe($y(()=>this.bimplusObjectCommentsListService.loadComments(this.rootObjectId))).subscribe({next:D=>this.commentsList$.next(D),complete:()=>{this.attachmentsState.set([]),this.newCommentAttachments=[],this.attachmentLinkItems=[],this.newAttachmentIDs=[],this.textAreaValue=null,this.clearValue=!0,this.buttonRowItems[0].disabled=!0,this.loading.set(!1),this.statusBarService.setStatusBarData({statusBarVisible:!1,title:""})}})}}hyperlinkButtonRowButtonClicked(a){a.id==="add-hyperlink"?this.addNewCommentHyperlink():a.id==="cancel-hyperlink"&&(this.hyperlinkForm.reset(),this.isAddingHyperlink=!1)}addNewCommentHyperlink(){if(!this.hyperlinkForm.valid)return;let a=this.hyperlinkForm.value.url.trim();RegExp(/^http(s?):\/\//).exec(a)||(a="https://"+a);let f=this.hyperlinkForm.value.name?.trim()??"";f===""&&(f=a);let g={id:"",type:"Hyperlink",nameShort:f,name:f,url:a,iconClass:"fa fa-link",iconTitle:this.translateService.instant("_Hyperlink"),deleteButtonTitle:this.translateService.instant("_Remove hyperlink")};this.newCommentAttachments.push(g),this.hyperlinkForm.reset(),this.isAddingHyperlink=!1,this.checkCreateButtonState()}deleteComment(a){this.statusBarService.setStatusBarData({statusBarVisible:!0,title:this.translateService.instant("_Deleting the comment")}),this.bimplusObjectCommentsListService.deleteComment(a).subscribe(()=>this.loadComments())}addHyperlinkIconClicked(){this.isAddingHyperlink=!this.isAddingHyperlink}addHyperlinkIconKeypress(a){(a.key==="Enter"||a.key===" ")&&this.addHyperlinkIconClicked()}removeNewCommentAttachment(a){this.newCommentAttachments=this.newCommentAttachments.filter(f=>f.id!==a.id),a?.type!=="Hyperlink"&&(this.attachmentLinkItems=this.attachmentLinkItems.filter(f=>f.id!==a.id),this.newAttachmentIDs=this.newAttachmentIDs.filter(f=>f!==a.id)),this.checkCreateButtonState()}removeNewCommentAttachmentKeypress(a,f){(a.key==="Enter"||a.key===" ")&&this.removeNewCommentAttachment(f)}isActUserAuthor(a){return a.author?.id===this.userId}displayName(a){return a.author?.displayname?a.author?.displayname:""}formatDate(a){if(window.navigator.language.includes("en")){let g=new Date(a);return g.getMonth()+"/"+g.getDate()+"/"+g.getFullYear()}return new Intl.DateTimeFormat(void 0,{dateStyle:"short"}).format(new Date(a))}clearTextareaValue(){return this.clearValue}loadComments(){this.statusBarService.setStatusBarData({statusBarVisible:!0,title:this.translateService.instant("_Loading comments list")}),this.loading.set(!0),this.bimplusObjectCommentsListService.loadComments(this.rootObjectId).subscribe({next:a=>{this.commentsList$.next(a)},complete:()=>{this.loading.set(!1),this.statusBarService.setStatusBarData({statusBarVisible:!1,title:""})}})}getHyperlinks(a){return this.newCommentAttachments.filter(f=>f?.type==="Hyperlink").map(f=>Nd(k0({},f),{objectId:a}))}onEnterKeyPressedInHyperlinkForm(){this.addNewCommentHyperlink()}static{this.\u0275fac=function(f){return new(f||p)(ls(G_),ls(za),ls(BQ),ls(oZ),ls($B),ls(xK),ls(NK))}}static{this.\u0275cmp=ks({type:p,selectors:[["lib-bimplus-object-comments-list"]],inputs:{api:"api",project:"project",wormholeSelector:"wormholeSelector",env:"env",attachmentLinkItems:"attachmentLinkItems",inputBaseUrl:"inputBaseUrl",rootObjectId:"rootObjectId",userId:"userId"},features:[dl([BQ,xK,$B,{provide:zL,useValue:ANe}]),el,Gd],decls:1,vars:1,consts:[["attachments",""],["linksToDocuments",""],[1,"comment-tab-container"],[1,"textarea-container"],[3,"textAreaValueChange","placeholder","name","readonly","activeAutoResizeTextarea","minRows","maxRows","clearValue"],["listOnly","",3,"addAttachment","deleteAttachment","attachments"],["listOnly","","hideAttachmentSize","","showEmptyMessage","false",3,"attachmentsLinkChange","attachments","api","project","rootObjectId","canCreateAttachmentLink","canDeleteAttachmentLink","wormholeSelector","env","inputBaseUrl"],[1,"new-comment-attachment-list"],[1,"hyperlink-input-form",3,"formGroup"],[1,"comments-tab-attachments-section"],[1,"comments-attachments-list"],[1,"tab-attachments","icon","attachments-icon","hidden"],[1,"attachment-icon","icon-small","interactive",3,"click","keydown","title"],[1,"link-icon","icon-small","interactive",3,"click","keydown","title"],[1,"attachment-link-icon","icon-small","interactive",3,"click","keydown","title"],[1,"tab-attachmentlinks","icon","attachments-icon","hidden"],[1,"add-comment"],[3,"buttonClicked","items"],[1,"comments-separator"],[1,"scrollable-content-container"],[1,"no-comments-found"],[3,"ngClass","title",4,"ngFor","ngForOf"],[3,"ngClass","title"],[1,"text"],[1,"cancel-icon",3,"click","keydown","title"],[1,"hyperlink-input-row"],[1,"link-icon","icon-next-to-text-input"],["formControlName","name",1,"flex-grow",3,"enterKeyPressed","placeholder"],[1,"icon-next-to-text-input"],["formControlName","url",1,"flex-grow",3,"enterKeyPressed","placeholder"],[1,"comment-list-date"],["action","delete",3,"outputActionCommentEvent","getAttachment","message","api","date","commentId","attachments","attachmentLinkItems","hyperlinks","isActUserAuthor","displayname"]],template:function(f,g){f&1&&as(0,INe,27,34,"div",2),f&2&&Js(g.loading()?-1:0)},dependencies:[Kf,Lo,f1,PQ,RK,LK,zI,jo,y1,RI,sK,SK,$ve,pC,aZ,Rw,AB,SA,fL,ZV],styles:[`:host{height:100%;display:flex;flex-direction:column;flex:1}.link-icon{background:url("./assets/Links_18_gray.svg") no-repeat center}.attachment-icon{background:url("./assets/Attachment_18_gray.svg") no-repeat center}.attachment-link-icon{background:url("./assets/Attachmentlink_18_gray.svg") no-repeat center}.icon{height:2rem;width:2rem;margin:0 .2rem}.icon-small{height:100%;width:1.8rem;margin:0 .2rem}.icon-small.Hyperlink{background:url("./assets/Links_18_gray.svg") no-repeat center}.icon-small.Attachment{background:url("./assets/Attachment_18_gray.svg") no-repeat center}.icon-small.AttachmentLink{background:url("./assets/Attachmentlink_18_gray.svg") no-repeat center}.icon-next-to-text-input{width:1.8rem;margin:.3rem .2rem 0}.interactive{cursor:pointer}.flex{display:flex}.flex-grow{flex-grow:1}.hyperlink-input-row{display:flex;gap:.2rem}.hyperlink-input-row lib-bimplus-input-text-field{margin-top:.2rem}.new-comment-attachment-list{margin:0 .6rem .2rem 0}.new-comment-attachments{--bim-attachment-item-background-size: 1.8rem}.new-comment-attachment{padding-left:.8rem;display:grid;grid-template-columns:auto 1fr auto;column-gap:.4rem}.new-comment-attachment .text{line-height:2.4rem;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.new-comment-attachment .cancel-icon{flex:1;background:url("./assets/bimplus_WebIcons_Cross.svg") no-repeat center;background-size:1.8rem;width:3.2rem;max-width:3.2rem;cursor:pointer}.new-comment-attachment.attachment-link .icon{background:url("./assets/Attachmentlink_18_gray.svg") no-repeat center}.new-comment-attachment.hyperlink .icon{background:url("./assets/Links_18_gray.svg") no-repeat center}.hyperlink-input-form{padding-left:.8rem;padding-right:.8rem;display:flex;flex-direction:column;gap:.2rem}.comment-tab-container{height:100%;display:flex;flex-direction:column;flex:1}.comment-tab-container .scrollable-content-container{position:relative;flex:1;width:100%}.comment-tab-container .scrollable-content-container lib-bimplus-scrollable-container{position:absolute;top:0;bottom:0;flex:1;width:100%}.comment-tab-container .textarea-container{margin-left:.8rem}.comment-tab-container .comments-tab-attachments-section{display:inline-flex;width:100%;justify-content:space-between;margin:1rem .8rem .8rem 0}.comment-tab-container .comments-tab-attachments-section .comments-attachments-list{align-items:center;margin-left:.8rem}.comment-tab-container .comments-tab-attachments-section .add-comment{display:inline-flex;align-items:center;margin-right:.8rem}.comment-tab-container .comments-attachments-list{display:inline-flex}.comment-tab-container .comments-attachments-list .attachments-icon{height:2rem;width:2rem;margin:0 .2rem;cursor:pointer}.comment-tab-container .comments-attachments-list .tab-attachments{background:url("./assets/Attachment_18_gray.svg") no-repeat center}.comment-tab-container .comments-attachments-list .tab-attachmentlinks{background:url("./assets/Attachmentlink_18_gray.svg") no-repeat center}.comment-tab-container .comments-attachments-list .tab-hyperlinks{background:url("./assets/Links_18_gray.svg") no-repeat center}.comment-tab-container .comments-separator{margin:0 .8rem;border-bottom:solid .1rem var(--comments-chat-comments-separator-border-color)}.comment-tab-container textarea::-webkit-scrollbar-track{background-color:var(--main-menu-apps-container-background-color-enabled)}.comment-tab-container textarea::-webkit-scrollbar-thumb{background-color:var(--propertymanager-object-tree-scrollable-border-color);border-radius:.5rem}.comment-tab-container textarea::-webkit-scrollbar{width:.7rem;background:var(--storage-info-placeholder-text-color-enabled)}.comment-tab-container .comment-list-date{text-align:center;margin-top:1.2rem}.comment-tab-container .hidden{display:none}.comment-tab-container .no-comments-found{padding:2.5rem .5rem;color:var(--details-controls-details-not-found-text-color);text-align:center}lib-bimplus-attachments{--bim-attachment-item-border-bottom: none;--bim-attachment-delete-button-icon-color: #444;--bim-attachment-delete-button-icon-font-weight: bold;--bim-attachment-item-background-image: url("./assets/Attachment_18_gray.svg")}lib-links-to-documents{--attachment-row-border-bottom: none;--bim-attachment-item-background-image: url("./assets/Attachmentlink_18_gray.svg");--bim-attachment-delete-button: #444;--attachment-row-margin: 0;--bim-attachment-item-background-size: 1.8rem;--bim-attachment-delete-button-font-weight: bold}
15323
+ `],encapsulation:3})}}return p})();var xK=(()=>{class p{constructor(a){this.decorators=a,this.bimplusAttachmentsService=Pi($B)}deleteComment(a){return Yu(this.api.comments.delete(a))}downloadAttachment(a){let{id:f,fileName:g}=a;if(!this.api)return;let D=this.api,q=`${D.getApiTeamUrl()}attachments/${f}/download?api-token=${D.getAccessToken()}&openInBrowser=true`;this.bimplusAttachmentsService.download(q,g)}postComments(a,f,g,D,q){return Yu(this.api.objects.postComment(a,f)).pipe($y(de=>{let{id:G}=de,ee=D.map(ye=>{let je=new FormData;return je.append("file",ye.file),je.append("name",ye.fileName),je.append("size",ye.file.size.toString()),je.append("type",ye.file.type),je.append("objectId",G),je});return(ee.length?mS(ee.map(ye=>Yu(this.api.objects.postAttachment(G,ye,void 0,"")))):Bd([])).pipe(Xu(()=>G))}),$y(de=>q.length?lce(q,de,this.api).pipe(Xu(()=>de)):Bd(de)),$y(de=>g.length?this.manageHyperLinks(de,g).pipe(Xu(()=>de)):Bd(de)),rV(null),Wre(),pX(de=>(console.error("Error in postComments:",de),Bd(null))))}decorateComment(a){if(a.attachmentLinks&&a.attachmentLinks.length>0){let f=a.attachmentLinks.map(g=>this.decorators.decorateLink(this.api,g,[a.id]));a.attachmentLinks=f}}decorateComments(a){return a.forEach(f=>{this.decorateComment(f)}),a}loadComments(a){return Yu(this.api.objects.getComments(a)).pipe(Xu(f=>{if(!f)throw new Error("Comments response is undefined");return this.decorateComments(f)}))}manageHyperLinks(a,f){let g=[];return f.forEach(D=>{if(!D)return;let q=JSON.stringify({name:D.name,objectId:D.objectId,url:D.url}),de=this.api?.objects.postHyperlink(a,q).catch(G=>{console.log(G)});g.push(de)}),Yu(Promise.all(g))}static{this.\u0275fac=function(f){return new(f||p)(h0(wK))}}static{this.\u0275prov=ha({token:p,factory:p.\u0275fac})}}return p})();var NK=(()=>{class p{constructor(){this._statusBarData=new fu({title:"",statusBarVisible:!1})}get statusBarVisible(){return this._statusBarData.value.statusBarVisible}get title(){return this._statusBarData.value.title}get statusBarData(){return this._statusBarData.value}get statusBarDataSubscription(){return this._statusBarData}setStatusBarData(a){this._statusBarData.next(a)}static{this.\u0275fac=function(f){return new(f||p)}}static{this.\u0275prov=ha({token:p,factory:p.\u0275fac,providedIn:"root"})}}return p})();var hNe=()=>["new-comment-attachments"],c3e=()=>[];function fNe(p,h){if(p&1){let a=zr();ln(0,"div",22),Rs(1,"div",22),ln(2,"div",23),Os(3),vn(),ln(4,"span",24),wi("click",function(){let g=Ci(a).$implicit,D=on(3);return Di(D.removeNewCommentAttachment(g))})("keydown",function(g){let D=Ci(a).$implicit,q=on(3);return Di(q.removeNewCommentAttachmentKeypress(g,D))}),vn()()}if(p&2){let a=h.$implicit;Rn("ngClass","new-comment-attachment "+a.type)("title",a.type==="Hyperlink"?a.url:a.name),Kt(),Rn("ngClass","icon-small "+a.type)("title",a.type==="Hyperlink"?a.url:a.name),Kt(2),ga("",a.name," "),Kt(),Io("title",a.deleteButtonTitle)}}function mNe(p,h){if(p&1&&(ln(0,"div",7),as(1,fNe,5,6,"div",21),vn()),p&2){let a=on(2);Kt(),Rn("ngForOf",a.newCommentAttachments)}}function bNe(p,h){if(p&1){let a=zr();ln(0,"form",8)(1,"div",25),Rs(2,"div",26),ln(3,"lib-bimplus-input-text-field",27),ia(4,"translate"),wi("enterKeyPressed",function(){Ci(a);let g=on(2);return Di(g.onEnterKeyPressedInHyperlinkForm())}),vn()(),ln(5,"div",25),Rs(6,"div",28),ln(7,"lib-bimplus-input-text-field",29),ia(8,"translate"),wi("enterKeyPressed",function(){Ci(a);let g=on(2);return Di(g.onEnterKeyPressedInHyperlinkForm())}),vn()(),ln(9,"lib-bimplus-buttons-row",17),wi("buttonClicked",function(g){Ci(a);let D=on(2);return Di(D.hyperlinkButtonRowButtonClicked(g))}),vn()()}if(p&2){let a=on(2);Rn("formGroup",a.hyperlinkForm),Kt(3),Io("placeholder",oa(4,4,"_Name")),Kt(4),Io("placeholder",oa(8,6,"_URL")),Kt(2),Rn("items",a.hyperlinkButtonRowItems)}}function vNe(p,h){p&1&&(ln(0,"div",20),Os(1),ia(2,"translate"),vn()),p&2&&(Kt(),ga(" ",oa(2,1,"_No comments found")," "))}function gNe(p,h){if(p&1&&(ln(0,"div",30),Os(1),vn()),p&2){let a=on().$implicit,f=on(3);Kt(),ga(" ",f.formatDate(a.createdAt)," ")}}function yNe(p,h){if(p&1){let a=zr();as(0,gNe,2,1,"div",30),ln(1,"lib-bimplus-comment",31),wi("outputActionCommentEvent",function(g){Ci(a);let D=on(3);return Di(D.handleActionCommentEvent(g))})("getAttachment",function(g){Ci(a);let D=on(3);return Di(D.onGetAttachment(g))}),vn()}if(p&2){let a,f,g=h.$implicit,D=on(3);Js(g.createdAt&&!D.isSameDate(g.createdAt)?0:-1),Kt(),Rn("message",g.text)("api",D.api)("date",g.createdAt?g.createdAt:"")("commentId",g.id)("attachments",(a=g.attachments)!==null&&a!==void 0?a:hB(10,c3e))("attachmentLinkItems",(f=g.attachmentLinks)!==null&&f!==void 0?f:hB(11,c3e))("hyperlinks",g.hyperlinks)("isActUserAuthor",D.isActUserAuthor(g))("displayname",D.displayName(g))}}function MNe(p,h){if(p&1&&(vp(0,yNe,2,12,null,null,tM),ia(2,"async")),p&2){let a=on(2);gp(oa(2,0,a.commentsList$))}}function INe(p,h){if(p&1){let a=zr();ln(0,"div",2)(1,"div",3)(2,"lib-bimplus-textarea",4),wi("textAreaValueChange",function(g){Ci(a);let D=on();return Di(D.onTextareaValueChange(g))}),vn()(),ln(3,"lib-bimplus-attachments",5,0),wi("addAttachment",function(g){Ci(a);let D=on();return Di(D.onAddAttachment(g))})("deleteAttachment",function(g){Ci(a);let D=on();return Di(D.onDeleteAttachment(g))}),vn(),ln(5,"lib-links-to-documents",6,1),wi("attachmentsLinkChange",function(g){Ci(a);let D=on();return Di(D.onAttachmentsLinkChange(g))}),vn(),as(7,mNe,2,1,"div",7)(8,bNe,10,8,"form",8),ln(9,"div",9)(10,"div",10),Rs(11,"div",11),ln(12,"div",12),ia(13,"translate"),wi("click",function(){Ci(a);let g=lf(4);return Di(g.open())})("keydown",function(){Ci(a);let g=lf(4);return Di(g.open())}),vn(),ln(14,"div",13),ia(15,"translate"),wi("click",function(){Ci(a);let g=on();return Di(g.addHyperlinkIconClicked())})("keydown",function(g){Ci(a);let D=on();return Di(D.addHyperlinkIconKeypress(g))}),vn(),ln(16,"div",14),ia(17,"translate"),wi("click",function(){Ci(a);let g=lf(6),D=on();return Di(g.createAttachmentLink(D.api))})("keydown",function(){Ci(a);let g=lf(6),D=on();return Di(g.createAttachmentLink(D.api))}),vn(),Rs(18,"div",15),vn(),ln(19,"div",16)(20,"lib-bimplus-buttons-row",17),wi("buttonClicked",function(g){Ci(a);let D=on();return Di(D.buttonRowButtonClicked(g))}),vn()()(),Rs(21,"div",18),ln(22,"div",19)(23,"lib-bimplus-scrollable-container"),as(24,vNe,3,3,"div",20),ia(25,"async"),as(26,MNe,3,2),vn()()()}if(p&2){let a,f=on();Kt(2),Rn("placeholder",f.placeholder)("name",f.name)("readonly",f.readonly)("activeAutoResizeTextarea",!0)("minRows",f.minRows)("maxRows",f.maxRows)("clearValue",f.clearTextareaValue()),Kt(),Z6(hB(33,hNe)),Rn("attachments",f.attachmentsState()),Kt(2),Rn("attachments",f.attachmentLinkItems)("api",f.api)("project",f.project)("canCreateAttachmentLink",!0)("canDeleteAttachmentLink",!0)("wormholeSelector",f.wormholeSelector)("env",f.env)("inputBaseUrl",f.inputBaseUrl),Kt(2),Js(f.newCommentAttachments.length>0?7:-1),Kt(),Js(f.isAddingHyperlink?8:-1),Kt(4),Rn("title",oa(13,25,"_Add attachment")),Kt(2),Rn("title",oa(15,27,"_Add hyperlink")),Kt(2),Rn("title",oa(17,29,"_Add_attachment_link")),Kt(4),Rn("items",f.buttonRowItems),Kt(4),Js(((a=oa(25,31,f.commentsList$))==null?null:a.length)===0?24:26)}}var ANe={showNoAttachmentsFound:!1,hideAttachmentSize:!0},u3e=(()=>{class p extends M1{set rootObjectId(a){this._rootObjectId=a}get rootObjectId(){return this._rootObjectId}set userId(a){this._userId=a}get userId(){return this._userId}constructor(a,f,g,D,q,de,G){super(f),this.dialogService=a,this.datePipe=g,this.formBuilder=D,this.bimplusAttachmentsService=q,this.bimplusObjectCommentsListService=de,this.statusBarService=G,this.project=null,this.wormholeSelector="localEmbeddedModalId",this.env="prod",this.attachmentLinkItems=[],this.inputBaseUrl="",this.commentsList$=new fu([]),this.loading=C0(!1),this.attachmentsState=C0([]),this.buttonRowItems=[],this.hyperlinkButtonRowItems=[],this.textAreaValue=null,this.lastShownDate="",this.placeholder="",this.name="",this.readonly=!1,this.autoResizeTextarea=!0,this.minRows=3,this.maxRows=10,this.clearValue=!1,this.statusBarTitleMessage=this.translateService.instant("_Loading"),this.newAttachmentIDs=[],this.isAddingHyperlink=!1,this.newCommentAttachments=[],this._rootObjectId="",this._userId="",this.hyperlinkForm=this.formBuilder.group({name:["",[]],url:["",[ES.required,ES.pattern(/^[^<>]*$/),ES.pattern(/^(?!\s*$).+/)]]})}isCreateButtonDisabled(){return!(this.textAreaValue||this.newAttachmentIDs?.length>0||this.getHyperlinks(this.rootObjectId)?.length>0||this.attachmentsState()?.length>0)}checkCreateButtonState(){this.buttonRowItems?.[0]&&(this.buttonRowItems[0].disabled=this.isCreateButtonDisabled())}ngOnInit(){this.bimplusObjectCommentsListService.api=this.api,this.loadComments();let a=[{id:"submit",title:this.translateService.instant("_Add comment"),tooltip:this.translateService.instant("_Add comment"),disabled:this.isCreateButtonDisabled(),buttonStyle:"primary"}];this.placeholder=this.translateService.instant("_Place comment text here"),this.name=this.translateService.instant("comment"),this.buttonRowItems=a,this.hyperlinkButtonRowItems.push({id:"cancel-hyperlink",title:this.translateService.instant("_Cancel"),tooltip:this.translateService.instant("_Cancel"),disabled:!1,buttonStyle:"primary"},{id:"add-hyperlink",title:this.translateService.instant("_Add hyperlink"),tooltip:this.translateService.instant("_Add hyperlink"),disabled:!0,buttonStyle:"primary"}),this.hyperlinkForm.statusChanges.subscribe(f=>{this.hyperlinkButtonRowItems[1].disabled=f!=="VALID"})}ngOnChanges(a){a.rootObjectId&&!a.rootObjectId.firstChange&&(this.lastShownDate="",this.loadComments())}onAttachmentsLinkChange(a){let f=a.map(D=>(D.iconClass="fa fa-link",D.iconTitle=this.translateService.instant("_Attachment_link"),D.deleteButtonTitle=this.translateService.instant("_Delete_attachmentlink"),D)),g=this.newCommentAttachments.filter(D=>D?.type==="Hyperlink");this.newCommentAttachments=[...g,...f],this.newAttachmentIDs=a.map(D=>D.id),this.checkCreateButtonState()}onAddAttachment(a){let f=this.bimplusAttachmentsService.getAttachment(a);this.attachmentsState.update(g=>[...g,f]),this.checkCreateButtonState()}onDeleteAttachment(a){this.attachmentsState.update(f=>f.filter(g=>g!==a)),this.checkCreateButtonState()}onGetAttachment(a){this.bimplusObjectCommentsListService.downloadAttachment(a)}onTextareaValueChange(a){this.textAreaValue=a,this.checkCreateButtonState()}handleActionCommentEvent(a){if(a.action==="delete"){let f=a.data;this.openDialogDeleteComment(f.commentId)}}actionDialogClose(a){this.dialogService.close(a)}openDialogDeleteComment(a){this.dialogService.open(zK,{options:{position:"middle",positionOptions:{},overlayClickEnabled:!1,overlayVisibilityEnabled:!0,draggable:!0},data:{title:this.translateService.instant("_Comment delete confirmation title"),message:this.translateService.instant("_Comment delete confirmation message"),acceptCallback:()=>{this.deleteComment(a)}}})}isSameDate(a){if(!a)return!1;let f=this.datePipe.transform(a,"shortDate");return f?this.lastShownDate===f?!0:(this.lastShownDate=f,!1):!1}buttonRowButtonClicked(a){if(a.id==="submit"){if(!this.api||!this.rootObjectId)return;this.loading.set(!0);let f={text:this.textAreaValue,objectId:this.rootObjectId},g=JSON.stringify(f);this.statusBarService.setStatusBarData({statusBarVisible:!0,title:this.translateService.instant("_Creating new comment")}),this.bimplusObjectCommentsListService.postComments(this.rootObjectId,g,this.getHyperlinks(this.rootObjectId),this.attachmentsState(),this.newAttachmentIDs).pipe($y(()=>this.bimplusObjectCommentsListService.loadComments(this.rootObjectId))).subscribe({next:D=>this.commentsList$.next(D),complete:()=>{this.attachmentsState.set([]),this.newCommentAttachments=[],this.attachmentLinkItems=[],this.newAttachmentIDs=[],this.textAreaValue=null,this.clearValue=!0,this.buttonRowItems[0].disabled=!0,this.loading.set(!1),this.statusBarService.setStatusBarData({statusBarVisible:!1,title:""})}})}}hyperlinkButtonRowButtonClicked(a){a.id==="add-hyperlink"?this.addNewCommentHyperlink():a.id==="cancel-hyperlink"&&(this.hyperlinkForm.reset(),this.isAddingHyperlink=!1)}addNewCommentHyperlink(){if(!this.hyperlinkForm.valid)return;let a=this.hyperlinkForm.value.url.trim();RegExp(/^http(s?):\/\//).exec(a)||(a="https://"+a);let f=this.hyperlinkForm.value.name?.trim()??"";f===""&&(f=a);let g={id:"",type:"Hyperlink",nameShort:f,name:f,url:a,iconClass:"fa fa-link",iconTitle:this.translateService.instant("_Hyperlink"),deleteButtonTitle:this.translateService.instant("_Remove hyperlink")};this.newCommentAttachments.push(g),this.hyperlinkForm.reset(),this.isAddingHyperlink=!1,this.checkCreateButtonState()}deleteComment(a){this.statusBarService.setStatusBarData({statusBarVisible:!0,title:this.translateService.instant("_Deleting the comment")}),this.bimplusObjectCommentsListService.deleteComment(a).subscribe(()=>this.loadComments())}addHyperlinkIconClicked(){this.isAddingHyperlink=!this.isAddingHyperlink}addHyperlinkIconKeypress(a){(a.key==="Enter"||a.key===" ")&&this.addHyperlinkIconClicked()}removeNewCommentAttachment(a){this.newCommentAttachments=this.newCommentAttachments.filter(f=>f.id!==a.id),a?.type!=="Hyperlink"&&(this.attachmentLinkItems=this.attachmentLinkItems.filter(f=>f.id!==a.id),this.newAttachmentIDs=this.newAttachmentIDs.filter(f=>f!==a.id)),this.checkCreateButtonState()}removeNewCommentAttachmentKeypress(a,f){(a.key==="Enter"||a.key===" ")&&this.removeNewCommentAttachment(f)}isActUserAuthor(a){return a.author?.id===this.userId}displayName(a){return a.author?.displayname?a.author?.displayname:""}formatDate(a){if(window.navigator.language.includes("en")){let g=new Date(a);return g.getMonth()+"/"+g.getDate()+"/"+g.getFullYear()}return new Intl.DateTimeFormat(void 0,{dateStyle:"short"}).format(new Date(a))}clearTextareaValue(){return this.clearValue}loadComments(){this.statusBarService.setStatusBarData({statusBarVisible:!0,title:this.translateService.instant("_Loading comments list")}),this.loading.set(!0),this.bimplusObjectCommentsListService.loadComments(this.rootObjectId).subscribe({next:a=>{this.commentsList$.next(a)},complete:()=>{this.loading.set(!1),this.statusBarService.setStatusBarData({statusBarVisible:!1,title:""})}})}getHyperlinks(a){return this.newCommentAttachments.filter(f=>f?.type==="Hyperlink").map(f=>Nd(k0({},f),{objectId:a}))}onEnterKeyPressedInHyperlinkForm(){this.addNewCommentHyperlink()}static{this.\u0275fac=function(f){return new(f||p)(ls(G_),ls(za),ls(BQ),ls(oZ),ls($B),ls(xK),ls(NK))}}static{this.\u0275cmp=ks({type:p,selectors:[["lib-bimplus-object-comments-list"]],inputs:{api:"api",project:"project",wormholeSelector:"wormholeSelector",env:"env",attachmentLinkItems:"attachmentLinkItems",inputBaseUrl:"inputBaseUrl",rootObjectId:"rootObjectId",userId:"userId"},features:[dl([BQ,xK,$B,{provide:zL,useValue:ANe}]),el,Gd],decls:1,vars:1,consts:[["attachments",""],["linksToDocuments",""],[1,"comment-tab-container"],[1,"textarea-container"],[3,"textAreaValueChange","placeholder","name","readonly","activeAutoResizeTextarea","minRows","maxRows","clearValue"],["listOnly","",3,"addAttachment","deleteAttachment","attachments"],["listOnly","","hideAttachmentSize","","showEmptyMessage","false",3,"attachmentsLinkChange","attachments","api","project","rootObjectId","canCreateAttachmentLink","canDeleteAttachmentLink","wormholeSelector","env","inputBaseUrl"],[1,"new-comment-attachment-list"],[1,"hyperlink-input-form",3,"formGroup"],[1,"comments-tab-attachments-section"],[1,"comments-attachments-list"],[1,"tab-attachments","icon","attachments-icon","hidden"],[1,"attachment-icon","icon-small","interactive",3,"click","keydown","title"],[1,"link-icon","icon-small","interactive",3,"click","keydown","title"],[1,"attachment-link-icon","icon-small","interactive",3,"click","keydown","title"],[1,"tab-attachmentlinks","icon","attachments-icon","hidden"],[1,"add-comment"],[3,"buttonClicked","items"],[1,"comments-separator"],[1,"scrollable-content-container"],[1,"no-comments-found"],[3,"ngClass","title",4,"ngFor","ngForOf"],[3,"ngClass","title"],[1,"text"],[1,"cancel-icon",3,"click","keydown","title"],[1,"hyperlink-input-row"],[1,"link-icon","icon-next-to-text-input"],["formControlName","name",1,"flex-grow",3,"enterKeyPressed","placeholder"],[1,"icon-next-to-text-input"],["formControlName","url",1,"flex-grow",3,"enterKeyPressed","placeholder"],[1,"comment-list-date"],["action","delete",3,"outputActionCommentEvent","getAttachment","message","api","date","commentId","attachments","attachmentLinkItems","hyperlinks","isActUserAuthor","displayname"]],template:function(f,g){f&1&&as(0,INe,27,34,"div",2),f&2&&Js(g.loading()?-1:0)},dependencies:[Kf,Lo,f1,PQ,RK,LK,zI,jo,y1,RI,sK,SK,$ve,pC,aZ,Rw,AB,SA,fL,ZV],styles:[`:host{height:100%;display:flex;flex-direction:column;flex:1}.link-icon{background:url("./assets/Links_18_gray.svg") no-repeat center}.attachment-icon{background:url("./assets/Attachment_18_gray.svg") no-repeat center}.attachment-link-icon{background:url("./assets/Attachmentlink_18_gray.svg") no-repeat center}.icon{height:2rem;width:2rem;margin:0 .2rem}.icon-small{height:100%;width:1.8rem;margin:0 .2rem}.icon-small.Hyperlink{background:url("./assets/Links_18_gray.svg") no-repeat center}.icon-small.Attachment{background:url("./assets/Attachment_18_gray.svg") no-repeat center}.icon-small.AttachmentLink{background:url("./assets/Attachmentlink_18_gray.svg") no-repeat center}.icon-next-to-text-input{width:1.8rem;margin:.3rem .2rem 0}.interactive{cursor:pointer}.flex{display:flex}.flex-grow{flex-grow:1}.hyperlink-input-row{display:flex;gap:.2rem}.hyperlink-input-row lib-bimplus-input-text-field{margin-top:.2rem}.new-comment-attachment-list{margin:0 .6rem .2rem 0}.new-comment-attachments{--bim-attachment-item-background-size: 1.8rem}.new-comment-attachment{padding-left:.8rem;display:grid;grid-template-columns:auto 1fr auto;column-gap:.4rem}.new-comment-attachment .text{line-height:2.4rem;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.new-comment-attachment .cancel-icon{flex:1;background:url("./assets/bimplus_WebIcons_Cross.svg") no-repeat center;background-size:1.8rem;width:3.2rem;max-width:3.2rem;cursor:pointer}.new-comment-attachment.attachment-link .icon{background:url("./assets/Attachmentlink_18_gray.svg") no-repeat center}.new-comment-attachment.hyperlink .icon{background:url("./assets/Links_18_gray.svg") no-repeat center}.hyperlink-input-form{padding-left:.8rem;padding-right:.8rem;display:flex;flex-direction:column;gap:.2rem}.comment-tab-container{height:100%;display:flex;flex-direction:column;flex:1}.comment-tab-container .scrollable-content-container{position:relative;flex:1;width:100%}.comment-tab-container .scrollable-content-container lib-bimplus-scrollable-container{position:absolute;top:0;bottom:0;flex:1;width:100%}.comment-tab-container .textarea-container{margin-left:.8rem}.comment-tab-container .comments-tab-attachments-section{display:inline-flex;width:100%;justify-content:space-between;margin:1rem .8rem .8rem 0}.comment-tab-container .comments-tab-attachments-section .comments-attachments-list{align-items:center;margin-left:.8rem}.comment-tab-container .comments-tab-attachments-section .add-comment{display:inline-flex;align-items:center;margin-right:.8rem}.comment-tab-container .comments-attachments-list{display:inline-flex}.comment-tab-container .comments-attachments-list .attachments-icon{height:2rem;width:2rem;margin:0 .2rem;cursor:pointer}.comment-tab-container .comments-attachments-list .tab-attachments{background:url("./assets/Attachment_18_gray.svg") no-repeat center}.comment-tab-container .comments-attachments-list .tab-attachmentlinks{background:url("./assets/Attachmentlink_18_gray.svg") no-repeat center}.comment-tab-container .comments-attachments-list .tab-hyperlinks{background:url("./assets/Links_18_gray.svg") no-repeat center}.comment-tab-container .comments-separator{margin:0 .8rem;border-bottom:solid .1rem var(--comments-chat-comments-separator-border-color)}.comment-tab-container textarea::-webkit-scrollbar-track{background-color:var(--main-menu-apps-container-background-color-enabled)}.comment-tab-container textarea::-webkit-scrollbar-thumb{background-color:var(--propertymanager-object-tree-scrollable-border-color);border-radius:.5rem}.comment-tab-container textarea::-webkit-scrollbar{width:.7rem;background:var(--storage-info-placeholder-text-color-enabled)}.comment-tab-container .comment-list-date{text-align:center;margin-top:1.2rem}.comment-tab-container .hidden{display:none}.comment-tab-container .no-comments-found{padding:2.5rem .5rem;color:var(--details-controls-details-not-found-text-color);text-align:center}lib-bimplus-attachments{--bim-attachment-item-border-bottom: none;--bim-attachment-delete-button-icon-color: #444;--bim-attachment-delete-button-icon-font-weight: bold;--bim-attachment-item-background-image: url("./assets/Attachment_18_gray.svg")}lib-links-to-documents{--attachment-row-border-bottom: none;--bim-attachment-item-background-image: url("./assets/Attachmentlink_18_gray.svg");--bim-attachment-delete-button: #444;--attachment-row-margin: 0;--bim-attachment-item-background-size: 1.8rem;--bim-attachment-delete-button-font-weight: bold}
15324
15324
  `],encapsulation:3,changeDetection:0})}}return p})();var d3e=(()=>{class p{get title(){return this._title}constructor(a){this.statusBarService=a,this._title=""}ngOnInit(){this.statusBarService.statusBarDataSubscription.subscribe(a=>{this._title=a.title})}closeClick(){this.statusBarService.setStatusBarData({title:"",statusBarVisible:!1})}closeKeyDown(a){(a.key==="Enter"||a.key==="Escape")&&this.closeClick()}static{this.\u0275fac=function(f){return new(f||p)(ls(NK))}}static{this.\u0275cmp=ks({type:p,selectors:[["lib-bimplus-status-bar"]],decls:3,vars:1,consts:[[1,"statusBar-container"],[1,"status-bar-text",3,"innerHTML"],["title","Close",1,"close-button",3,"click","keydown"]],template:function(f,g){f&1&&(ln(0,"div",0),Rs(1,"span",1),ln(2,"div",2),wi("click",function(){return g.closeClick()})("keydown",function(q){return g.closeKeyDown(q)}),vn()()),f&2&&(Kt(),Rn("innerHTML",g.title,S_))},styles:[`.statusBar-container{display:flex;align-items:center;position:fixed;box-sizing:border-box;left:0;color:var(--status-bar-color);width:100%;height:3.3rem;line-height:1.7;padding:.5rem 3.5rem;background:url("./assets/progress-spinner.svg") no-repeat var(--clashdetection-empty-line-image-background-color);background-position:.2rem .2rem;background-size:3rem 3rem;bottom:0;will-change:opacity transform;animation:fade_in 1s cubic-bezier(.14,.18,.16,1.02) infinite;animation-iteration-count:1;z-index:2}.statusBar-container.hidden{display:none}.close-button{position:absolute;right:0;color:var(--status-bar-close-button-color);width:3.2rem;height:3.2rem;flex-grow:0;flex-shrink:0;background:url("./assets/bimplus_Components_Overlay_Dialog_Cross_White.svg") no-repeat;background-position:center;cursor:pointer}@keyframes fade_in{0%,14%{opacity:0;transform:translateY(1rem) scale(.95)}15%{opacity:.25}30%,to{opacity:1;transform:translateY(0) scale(1)}}
15325
15325
  `],encapsulation:3})}}return p})();var BK=vA(pce(),1),Y3e=vA(j3e(),1),tk=function(){return tk=Object.assign||function(h){for(var a,f=1,g=arguments.length;f<g;f++){a=arguments[f];for(var D in a)Object.prototype.hasOwnProperty.call(a,D)&&(h[D]=a[D])}return h},tk.apply(this,arguments)};function X3e(p){return!p||!p.ownerDocument||!p.ownerDocument.defaultView?window:p.ownerDocument.defaultView}function Q3e(p){return!p||!p.ownerDocument?document:p.ownerDocument}var Z3e=function(p){var h={},a=Array.prototype.reduce.call(p,function(f,g){var D=g.name.match(/data-simplebar-(.+)/);if(D){var q=D[1].replace(/\W+(.)/g,function(de,G){return G.toUpperCase()});switch(g.value){case"true":f[q]=!0;break;case"false":f[q]=!1;break;case void 0:f[q]=!0;break;default:f[q]=g.value}}return f},h);return a};function K3e(p,h){var a;p&&(a=p.classList).add.apply(a,h.split(" "))}function J3e(p,h){p&&h.split(" ").forEach(function(a){p.classList.remove(a)})}function $3e(p){return".".concat(p.split(" ").join("."))}var fce=!!(typeof window<"u"&&window.document&&window.document.createElement),mPe=Object.freeze({__proto__:null,addClasses:K3e,canUseDOM:fce,classNamesToQuery:$3e,getElementDocument:Q3e,getElementWindow:X3e,getOptions:Z3e,removeClasses:J3e}),ek=null,G3e=null;fce&&window.addEventListener("resize",function(){G3e!==window.devicePixelRatio&&(G3e=window.devicePixelRatio,ek=null)});function V3e(){if(ek===null){if(typeof document>"u")return ek=0,ek;var p=document.body,h=document.createElement("div");h.classList.add("simplebar-hide-scrollbar"),p.appendChild(h);var a=h.getBoundingClientRect().right;p.removeChild(h),ek=a}return ek}var RL=X3e,hce=Q3e,bPe=Z3e,LL=K3e,xL=J3e,V_=$3e,EY=function(){function p(h,a){a===void 0&&(a={});var f=this;if(this.removePreventClickId=null,this.minScrollbarWidth=20,this.stopScrollDelay=175,this.isScrolling=!1,this.isMouseEntering=!1,this.isDragging=!1,this.scrollXTicking=!1,this.scrollYTicking=!1,this.wrapperEl=null,this.contentWrapperEl=null,this.contentEl=null,this.offsetEl=null,this.maskEl=null,this.placeholderEl=null,this.heightAutoObserverWrapperEl=null,this.heightAutoObserverEl=null,this.rtlHelpers=null,this.scrollbarWidth=0,this.resizeObserver=null,this.mutationObserver=null,this.elStyles=null,this.isRtl=null,this.mouseX=0,this.mouseY=0,this.onMouseMove=function(){},this.onWindowResize=function(){},this.onStopScrolling=function(){},this.onMouseEntered=function(){},this.onScroll=function(){var g=RL(f.el);f.scrollXTicking||(g.requestAnimationFrame(f.scrollX),f.scrollXTicking=!0),f.scrollYTicking||(g.requestAnimationFrame(f.scrollY),f.scrollYTicking=!0),f.isScrolling||(f.isScrolling=!0,LL(f.el,f.classNames.scrolling)),f.showScrollbar("x"),f.showScrollbar("y"),f.onStopScrolling()},this.scrollX=function(){f.axis.x.isOverflowing&&f.positionScrollbar("x"),f.scrollXTicking=!1},this.scrollY=function(){f.axis.y.isOverflowing&&f.positionScrollbar("y"),f.scrollYTicking=!1},this._onStopScrolling=function(){xL(f.el,f.classNames.scrolling),f.options.autoHide&&(f.hideScrollbar("x"),f.hideScrollbar("y")),f.isScrolling=!1},this.onMouseEnter=function(){f.isMouseEntering||(LL(f.el,f.classNames.mouseEntered),f.showScrollbar("x"),f.showScrollbar("y"),f.isMouseEntering=!0),f.onMouseEntered()},this._onMouseEntered=function(){xL(f.el,f.classNames.mouseEntered),f.options.autoHide&&(f.hideScrollbar("x"),f.hideScrollbar("y")),f.isMouseEntering=!1},this._onMouseMove=function(g){f.mouseX=g.clientX,f.mouseY=g.clientY,(f.axis.x.isOverflowing||f.axis.x.forceVisible)&&f.onMouseMoveForAxis("x"),(f.axis.y.isOverflowing||f.axis.y.forceVisible)&&f.onMouseMoveForAxis("y")},this.onMouseLeave=function(){f.onMouseMove.cancel(),(f.axis.x.isOverflowing||f.axis.x.forceVisible)&&f.onMouseLeaveForAxis("x"),(f.axis.y.isOverflowing||f.axis.y.forceVisible)&&f.onMouseLeaveForAxis("y"),f.mouseX=-1,f.mouseY=-1},this._onWindowResize=function(){f.scrollbarWidth=f.getScrollbarWidth(),f.hideNativeScrollbar()},this.onPointerEvent=function(g){if(!(!f.axis.x.track.el||!f.axis.y.track.el||!f.axis.x.scrollbar.el||!f.axis.y.scrollbar.el)){var D,q;f.axis.x.track.rect=f.axis.x.track.el.getBoundingClientRect(),f.axis.y.track.rect=f.axis.y.track.el.getBoundingClientRect(),(f.axis.x.isOverflowing||f.axis.x.forceVisible)&&(D=f.isWithinBounds(f.axis.x.track.rect)),(f.axis.y.isOverflowing||f.axis.y.forceVisible)&&(q=f.isWithinBounds(f.axis.y.track.rect)),(D||q)&&(g.stopPropagation(),g.type==="pointerdown"&&g.pointerType!=="touch"&&(D&&(f.axis.x.scrollbar.rect=f.axis.x.scrollbar.el.getBoundingClientRect(),f.isWithinBounds(f.axis.x.scrollbar.rect)?f.onDragStart(g,"x"):f.onTrackClick(g,"x")),q&&(f.axis.y.scrollbar.rect=f.axis.y.scrollbar.el.getBoundingClientRect(),f.isWithinBounds(f.axis.y.scrollbar.rect)?f.onDragStart(g,"y"):f.onTrackClick(g,"y"))))}},this.drag=function(g){var D,q,de,G,ee,fe,ye,je,$e,Dt,gn;if(!(!f.draggedAxis||!f.contentWrapperEl)){var $n,Ri=f.axis[f.draggedAxis].track,os=(q=(D=Ri.rect)===null||D===void 0?void 0:D[f.axis[f.draggedAxis].sizeAttr])!==null&&q!==void 0?q:0,Er=f.axis[f.draggedAxis].scrollbar,Ns=(G=(de=f.contentWrapperEl)===null||de===void 0?void 0:de[f.axis[f.draggedAxis].scrollSizeAttr])!==null&&G!==void 0?G:0,ya=parseInt((fe=(ee=f.elStyles)===null||ee===void 0?void 0:ee[f.axis[f.draggedAxis].sizeAttr])!==null&&fe!==void 0?fe:"0px",10);g.preventDefault(),g.stopPropagation(),f.draggedAxis==="y"?$n=g.pageY:$n=g.pageX;var Fi=$n-((je=(ye=Ri.rect)===null||ye===void 0?void 0:ye[f.axis[f.draggedAxis].offsetAttr])!==null&&je!==void 0?je:0)-f.axis[f.draggedAxis].dragOffset;Fi=f.draggedAxis==="x"&&f.isRtl?((Dt=($e=Ri.rect)===null||$e===void 0?void 0:$e[f.axis[f.draggedAxis].sizeAttr])!==null&&Dt!==void 0?Dt:0)-Er.size-Fi:Fi;var Aa=Fi/(os-Er.size),mr=Aa*(Ns-ya);f.draggedAxis==="x"&&f.isRtl&&(mr=!((gn=p.getRtlHelpers())===null||gn===void 0)&&gn.isScrollingToNegative?-mr:mr),f.contentWrapperEl[f.axis[f.draggedAxis].scrollOffsetAttr]=mr}},this.onEndDrag=function(g){f.isDragging=!1;var D=hce(f.el),q=RL(f.el);g.preventDefault(),g.stopPropagation(),xL(f.el,f.classNames.dragging),f.onStopScrolling(),D.removeEventListener("mousemove",f.drag,!0),D.removeEventListener("mouseup",f.onEndDrag,!0),f.removePreventClickId=q.setTimeout(function(){D.removeEventListener("click",f.preventClick,!0),D.removeEventListener("dblclick",f.preventClick,!0),f.removePreventClickId=null})},this.preventClick=function(g){g.preventDefault(),g.stopPropagation()},this.el=h,this.options=tk(tk({},p.defaultOptions),a),this.classNames=tk(tk({},p.defaultOptions.classNames),a.classNames),this.axis={x:{scrollOffsetAttr:"scrollLeft",sizeAttr:"width",scrollSizeAttr:"scrollWidth",offsetSizeAttr:"offsetWidth",offsetAttr:"left",overflowAttr:"overflowX",dragOffset:0,isOverflowing:!0,forceVisible:!1,track:{size:null,el:null,rect:null,isVisible:!1},scrollbar:{size:null,el:null,rect:null,isVisible:!1}},y:{scrollOffsetAttr:"scrollTop",sizeAttr:"height",scrollSizeAttr:"scrollHeight",offsetSizeAttr:"offsetHeight",offsetAttr:"top",overflowAttr:"overflowY",dragOffset:0,isOverflowing:!0,forceVisible:!1,track:{size:null,el:null,rect:null,isVisible:!1},scrollbar:{size:null,el:null,rect:null,isVisible:!1}}},typeof this.el!="object"||!this.el.nodeName)throw new Error("Argument passed to SimpleBar must be an HTML element instead of ".concat(this.el));this.onMouseMove=(0,Y3e.default)(this._onMouseMove,64),this.onWindowResize=(0,BK.default)(this._onWindowResize,64,{leading:!0}),this.onStopScrolling=(0,BK.default)(this._onStopScrolling,this.stopScrollDelay),this.onMouseEntered=(0,BK.default)(this._onMouseEntered,this.stopScrollDelay),this.init()}return p.getRtlHelpers=function(){if(p.rtlHelpers)return p.rtlHelpers;var h=document.createElement("div");h.innerHTML='<div class="simplebar-dummy-scrollbar-size"><div></div></div>';var a=h.firstElementChild,f=a?.firstElementChild;if(!f)return null;document.body.appendChild(a),a.scrollLeft=0;var g=p.getOffset(a),D=p.getOffset(f);a.scrollLeft=-999;var q=p.getOffset(f);return document.body.removeChild(a),p.rtlHelpers={isScrollOriginAtZero:g.left!==D.left,isScrollingToNegative:D.left!==q.left},p.rtlHelpers},p.prototype.getScrollbarWidth=function(){try{return this.contentWrapperEl&&getComputedStyle(this.contentWrapperEl,"::-webkit-scrollbar").display==="none"||"scrollbarWidth"in document.documentElement.style||"-ms-overflow-style"in document.documentElement.style?0:V3e()}catch{return V3e()}},p.getOffset=function(h){var a=h.getBoundingClientRect(),f=hce(h),g=RL(h);return{top:a.top+(g.pageYOffset||f.documentElement.scrollTop),left:a.left+(g.pageXOffset||f.documentElement.scrollLeft)}},p.prototype.init=function(){fce&&(this.initDOM(),this.rtlHelpers=p.getRtlHelpers(),this.scrollbarWidth=this.getScrollbarWidth(),this.recalculate(),this.initListeners())},p.prototype.initDOM=function(){var h,a;this.wrapperEl=this.el.querySelector(V_(this.classNames.wrapper)),this.contentWrapperEl=this.options.scrollableNode||this.el.querySelector(V_(this.classNames.contentWrapper)),this.contentEl=this.options.contentNode||this.el.querySelector(V_(this.classNames.contentEl)),this.offsetEl=this.el.querySelector(V_(this.classNames.offset)),this.maskEl=this.el.querySelector(V_(this.classNames.mask)),this.placeholderEl=this.findChild(this.wrapperEl,V_(this.classNames.placeholder)),this.heightAutoObserverWrapperEl=this.el.querySelector(V_(this.classNames.heightAutoObserverWrapperEl)),this.heightAutoObserverEl=this.el.querySelector(V_(this.classNames.heightAutoObserverEl)),this.axis.x.track.el=this.findChild(this.el,"".concat(V_(this.classNames.track)).concat(V_(this.classNames.horizontal))),this.axis.y.track.el=this.findChild(this.el,"".concat(V_(this.classNames.track)).concat(V_(this.classNames.vertical))),this.axis.x.scrollbar.el=((h=this.axis.x.track.el)===null||h===void 0?void 0:h.querySelector(V_(this.classNames.scrollbar)))||null,this.axis.y.scrollbar.el=((a=this.axis.y.track.el)===null||a===void 0?void 0:a.querySelector(V_(this.classNames.scrollbar)))||null,this.options.autoHide||(LL(this.axis.x.scrollbar.el,this.classNames.visible),LL(this.axis.y.scrollbar.el,this.classNames.visible))},p.prototype.initListeners=function(){var h=this,a,f=RL(this.el);if(this.el.addEventListener("mouseenter",this.onMouseEnter),this.el.addEventListener("pointerdown",this.onPointerEvent,!0),this.el.addEventListener("mousemove",this.onMouseMove),this.el.addEventListener("mouseleave",this.onMouseLeave),(a=this.contentWrapperEl)===null||a===void 0||a.addEventListener("scroll",this.onScroll),f.addEventListener("resize",this.onWindowResize),!!this.contentEl){if(window.ResizeObserver){var g=!1,D=f.ResizeObserver||ResizeObserver;this.resizeObserver=new D(function(){g&&f.requestAnimationFrame(function(){h.recalculate()})}),this.resizeObserver.observe(this.el),this.resizeObserver.observe(this.contentEl),f.requestAnimationFrame(function(){g=!0})}this.mutationObserver=new f.MutationObserver(function(){f.requestAnimationFrame(function(){h.recalculate()})}),this.mutationObserver.observe(this.contentEl,{childList:!0,subtree:!0,characterData:!0})}},p.prototype.recalculate=function(){if(!(!this.heightAutoObserverEl||!this.contentEl||!this.contentWrapperEl||!this.wrapperEl||!this.placeholderEl)){var h=RL(this.el);this.elStyles=h.getComputedStyle(this.el),this.isRtl=this.elStyles.direction==="rtl";var a=this.contentEl.offsetWidth,f=this.heightAutoObserverEl.offsetHeight<=1,g=this.heightAutoObserverEl.offsetWidth<=1||a>0,D=this.contentWrapperEl.offsetWidth,q=this.elStyles.overflowX,de=this.elStyles.overflowY;this.contentEl.style.padding="".concat(this.elStyles.paddingTop," ").concat(this.elStyles.paddingRight," ").concat(this.elStyles.paddingBottom," ").concat(this.elStyles.paddingLeft),this.wrapperEl.style.margin="-".concat(this.elStyles.paddingTop," -").concat(this.elStyles.paddingRight," -").concat(this.elStyles.paddingBottom," -").concat(this.elStyles.paddingLeft);var G=this.contentEl.scrollHeight,ee=this.contentEl.scrollWidth;this.contentWrapperEl.style.height=f?"auto":"100%",this.placeholderEl.style.width=g?"".concat(a||ee,"px"):"auto",this.placeholderEl.style.height="".concat(G,"px");var fe=this.contentWrapperEl.offsetHeight;this.axis.x.isOverflowing=a!==0&&ee>a,this.axis.y.isOverflowing=G>fe,this.axis.x.isOverflowing=q==="hidden"?!1:this.axis.x.isOverflowing,this.axis.y.isOverflowing=de==="hidden"?!1:this.axis.y.isOverflowing,this.axis.x.forceVisible=this.options.forceVisible==="x"||this.options.forceVisible===!0,this.axis.y.forceVisible=this.options.forceVisible==="y"||this.options.forceVisible===!0,this.hideNativeScrollbar();var ye=this.axis.x.isOverflowing?this.scrollbarWidth:0,je=this.axis.y.isOverflowing?this.scrollbarWidth:0;this.axis.x.isOverflowing=this.axis.x.isOverflowing&&ee>D-je,this.axis.y.isOverflowing=this.axis.y.isOverflowing&&G>fe-ye,this.axis.x.scrollbar.size=this.getScrollbarSize("x"),this.axis.y.scrollbar.size=this.getScrollbarSize("y"),this.axis.x.scrollbar.el&&(this.axis.x.scrollbar.el.style.width="".concat(this.axis.x.scrollbar.size,"px")),this.axis.y.scrollbar.el&&(this.axis.y.scrollbar.el.style.height="".concat(this.axis.y.scrollbar.size,"px")),this.positionScrollbar("x"),this.positionScrollbar("y"),this.toggleTrackVisibility("x"),this.toggleTrackVisibility("y")}},p.prototype.getScrollbarSize=function(h){var a,f;if(h===void 0&&(h="y"),!this.axis[h].isOverflowing||!this.contentEl)return 0;var g=this.contentEl[this.axis[h].scrollSizeAttr],D=(f=(a=this.axis[h].track.el)===null||a===void 0?void 0:a[this.axis[h].offsetSizeAttr])!==null&&f!==void 0?f:0,q=D/g,de;return de=Math.max(~~(q*D),this.options.scrollbarMinSize),this.options.scrollbarMaxSize&&(de=Math.min(de,this.options.scrollbarMaxSize)),de},p.prototype.positionScrollbar=function(h){var a,f,g;h===void 0&&(h="y");var D=this.axis[h].scrollbar;if(!(!this.axis[h].isOverflowing||!this.contentWrapperEl||!D.el||!this.elStyles)){var q=this.contentWrapperEl[this.axis[h].scrollSizeAttr],de=((a=this.axis[h].track.el)===null||a===void 0?void 0:a[this.axis[h].offsetSizeAttr])||0,G=parseInt(this.elStyles[this.axis[h].sizeAttr],10),ee=this.contentWrapperEl[this.axis[h].scrollOffsetAttr];ee=h==="x"&&this.isRtl&&(!((f=p.getRtlHelpers())===null||f===void 0)&&f.isScrollOriginAtZero)?-ee:ee,h==="x"&&this.isRtl&&(ee=!((g=p.getRtlHelpers())===null||g===void 0)&&g.isScrollingToNegative?ee:-ee);var fe=ee/(q-G),ye=~~((de-D.size)*fe);ye=h==="x"&&this.isRtl?-ye+(de-D.size):ye,D.el.style.transform=h==="x"?"translate3d(".concat(ye,"px, 0, 0)"):"translate3d(0, ".concat(ye,"px, 0)")}},p.prototype.toggleTrackVisibility=function(h){h===void 0&&(h="y");var a=this.axis[h].track.el,f=this.axis[h].scrollbar.el;!a||!f||!this.contentWrapperEl||(this.axis[h].isOverflowing||this.axis[h].forceVisible?(a.style.visibility="visible",this.contentWrapperEl.style[this.axis[h].overflowAttr]="scroll",this.el.classList.add("".concat(this.classNames.scrollable,"-").concat(h))):(a.style.visibility="hidden",this.contentWrapperEl.style[this.axis[h].overflowAttr]="hidden",this.el.classList.remove("".concat(this.classNames.scrollable,"-").concat(h))),this.axis[h].isOverflowing?f.style.display="block":f.style.display="none")},p.prototype.showScrollbar=function(h){h===void 0&&(h="y"),this.axis[h].isOverflowing&&!this.axis[h].scrollbar.isVisible&&(LL(this.axis[h].scrollbar.el,this.classNames.visible),this.axis[h].scrollbar.isVisible=!0)},p.prototype.hideScrollbar=function(h){h===void 0&&(h="y"),!this.isDragging&&this.axis[h].isOverflowing&&this.axis[h].scrollbar.isVisible&&(xL(this.axis[h].scrollbar.el,this.classNames.visible),this.axis[h].scrollbar.isVisible=!1)},p.prototype.hideNativeScrollbar=function(){this.offsetEl&&(this.offsetEl.style[this.isRtl?"left":"right"]=this.axis.y.isOverflowing||this.axis.y.forceVisible?"-".concat(this.scrollbarWidth,"px"):"0px",this.offsetEl.style.bottom=this.axis.x.isOverflowing||this.axis.x.forceVisible?"-".concat(this.scrollbarWidth,"px"):"0px")},p.prototype.onMouseMoveForAxis=function(h){h===void 0&&(h="y");var a=this.axis[h];!a.track.el||!a.scrollbar.el||(a.track.rect=a.track.el.getBoundingClientRect(),a.scrollbar.rect=a.scrollbar.el.getBoundingClientRect(),this.isWithinBounds(a.track.rect)?(this.showScrollbar(h),LL(a.track.el,this.classNames.hover),this.isWithinBounds(a.scrollbar.rect)?LL(a.scrollbar.el,this.classNames.hover):xL(a.scrollbar.el,this.classNames.hover)):(xL(a.track.el,this.classNames.hover),this.options.autoHide&&this.hideScrollbar(h)))},p.prototype.onMouseLeaveForAxis=function(h){h===void 0&&(h="y"),xL(this.axis[h].track.el,this.classNames.hover),xL(this.axis[h].scrollbar.el,this.classNames.hover),this.options.autoHide&&this.hideScrollbar(h)},p.prototype.onDragStart=function(h,a){var f;a===void 0&&(a="y"),this.isDragging=!0;var g=hce(this.el),D=RL(this.el),q=this.axis[a].scrollbar,de=a==="y"?h.pageY:h.pageX;this.axis[a].dragOffset=de-(((f=q.rect)===null||f===void 0?void 0:f[this.axis[a].offsetAttr])||0),this.draggedAxis=a,LL(this.el,this.classNames.dragging),g.addEventListener("mousemove",this.drag,!0),g.addEventListener("mouseup",this.onEndDrag,!0),this.removePreventClickId===null?(g.addEventListener("click",this.preventClick,!0),g.addEventListener("dblclick",this.preventClick,!0)):(D.clearTimeout(this.removePreventClickId),this.removePreventClickId=null)},p.prototype.onTrackClick=function(h,a){var f=this,g,D,q,de;a===void 0&&(a="y");var G=this.axis[a];if(!(!this.options.clickOnTrack||!G.scrollbar.el||!this.contentWrapperEl)){h.preventDefault();var ee=RL(this.el);this.axis[a].scrollbar.rect=G.scrollbar.el.getBoundingClientRect();var fe=this.axis[a].scrollbar,ye=(D=(g=fe.rect)===null||g===void 0?void 0:g[this.axis[a].offsetAttr])!==null&&D!==void 0?D:0,je=parseInt((de=(q=this.elStyles)===null||q===void 0?void 0:q[this.axis[a].sizeAttr])!==null&&de!==void 0?de:"0px",10),$e=this.contentWrapperEl[this.axis[a].scrollOffsetAttr],Dt=a==="y"?this.mouseY-ye:this.mouseX-ye,gn=Dt<0?-1:1,$n=gn===-1?$e-je:$e+je,Ri=40,os=function(){f.contentWrapperEl&&(gn===-1?$e>$n&&($e-=Ri,f.contentWrapperEl[f.axis[a].scrollOffsetAttr]=$e,ee.requestAnimationFrame(os)):$e<$n&&($e+=Ri,f.contentWrapperEl[f.axis[a].scrollOffsetAttr]=$e,ee.requestAnimationFrame(os)))};os()}},p.prototype.getContentElement=function(){return this.contentEl},p.prototype.getScrollElement=function(){return this.contentWrapperEl},p.prototype.removeListeners=function(){var h=RL(this.el);this.el.removeEventListener("mouseenter",this.onMouseEnter),this.el.removeEventListener("pointerdown",this.onPointerEvent,!0),this.el.removeEventListener("mousemove",this.onMouseMove),this.el.removeEventListener("mouseleave",this.onMouseLeave),this.contentWrapperEl&&this.contentWrapperEl.removeEventListener("scroll",this.onScroll),h.removeEventListener("resize",this.onWindowResize),this.mutationObserver&&this.mutationObserver.disconnect(),this.resizeObserver&&this.resizeObserver.disconnect(),this.onMouseMove.cancel(),this.onWindowResize.cancel(),this.onStopScrolling.cancel(),this.onMouseEntered.cancel()},p.prototype.unMount=function(){this.removeListeners()},p.prototype.isWithinBounds=function(h){return this.mouseX>=h.left&&this.mouseX<=h.left+h.width&&this.mouseY>=h.top&&this.mouseY<=h.top+h.height},p.prototype.findChild=function(h,a){var f=h.matches||h.webkitMatchesSelector||h.mozMatchesSelector||h.msMatchesSelector;return Array.prototype.filter.call(h.children,function(g){return f.call(g,a)})[0]},p.rtlHelpers=null,p.defaultOptions={forceVisible:!1,clickOnTrack:!0,scrollbarMinSize:25,scrollbarMaxSize:0,ariaLabel:"scrollable content",tabIndex:0,classNames:{contentEl:"simplebar-content",contentWrapper:"simplebar-content-wrapper",offset:"simplebar-offset",mask:"simplebar-mask",wrapper:"simplebar-wrapper",placeholder:"simplebar-placeholder",scrollbar:"simplebar-scrollbar",track:"simplebar-track",heightAutoObserverWrapperEl:"simplebar-height-auto-observer-wrapper",heightAutoObserverEl:"simplebar-height-auto-observer",visible:"simplebar-visible",horizontal:"simplebar-horizontal",vertical:"simplebar-vertical",hover:"simplebar-hover",dragging:"simplebar-dragging",scrolling:"simplebar-scrolling",scrollable:"simplebar-scrollable",mouseEntered:"simplebar-mouse-entered"},scrollableNode:null,contentNode:null,autoHide:!0},p.getOptions=bPe,p.helpers=mPe,p}();var bce=function(p,h){return bce=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,f){a.__proto__=f}||function(a,f){for(var g in f)Object.prototype.hasOwnProperty.call(f,g)&&(a[g]=f[g])},bce(p,h)};function vPe(p,h){if(typeof h!="function"&&h!==null)throw new TypeError("Class extends value "+String(h)+" is not a constructor or null");bce(p,h);function a(){this.constructor=p}p.prototype=h===null?Object.create(h):(a.prototype=h.prototype,new a)}var vce=EY.helpers,mce=vce.getOptions,MC=vce.addClasses,gPe=vce.canUseDOM,ege=function(p){vPe(h,p);function h(){for(var a=[],f=0;f<arguments.length;f++)a[f]=arguments[f];var g=p.apply(this,a)||this;return h.instances.set(a[0],g),g}return h.initDOMLoadedElements=function(){document.removeEventListener("DOMContentLoaded",this.initDOMLoadedElements),window.removeEventListener("load",this.initDOMLoadedElements),Array.prototype.forEach.call(document.querySelectorAll("[data-simplebar]"),function(a){a.getAttribute("data-simplebar")!=="init"&&!h.instances.has(a)&&new h(a,mce(a.attributes))})},h.removeObserver=function(){var a;(a=h.globalObserver)===null||a===void 0||a.disconnect()},h.prototype.initDOM=function(){var a=this,f,g,D;if(!Array.prototype.filter.call(this.el.children,function(G){return G.classList.contains(a.classNames.wrapper)}).length){for(this.wrapperEl=document.createElement("div"),this.contentWrapperEl=document.createElement("div"),this.offsetEl=document.createElement("div"),this.maskEl=document.createElement("div"),this.contentEl=document.createElement("div"),this.placeholderEl=document.createElement("div"),this.heightAutoObserverWrapperEl=document.createElement("div"),this.heightAutoObserverEl=document.createElement("div"),MC(this.wrapperEl,this.classNames.wrapper),MC(this.contentWrapperEl,this.classNames.contentWrapper),MC(this.offsetEl,this.classNames.offset),MC(this.maskEl,this.classNames.mask),MC(this.contentEl,this.classNames.contentEl),MC(this.placeholderEl,this.classNames.placeholder),MC(this.heightAutoObserverWrapperEl,this.classNames.heightAutoObserverWrapperEl),MC(this.heightAutoObserverEl,this.classNames.heightAutoObserverEl);this.el.firstChild;)this.contentEl.appendChild(this.el.firstChild);this.contentWrapperEl.appendChild(this.contentEl),this.offsetEl.appendChild(this.contentWrapperEl),this.maskEl.appendChild(this.offsetEl),this.heightAutoObserverWrapperEl.appendChild(this.heightAutoObserverEl),this.wrapperEl.appendChild(this.heightAutoObserverWrapperEl),this.wrapperEl.appendChild(this.maskEl),this.wrapperEl.appendChild(this.placeholderEl),this.el.appendChild(this.wrapperEl),(f=this.contentWrapperEl)===null||f===void 0||f.setAttribute("tabindex",this.options.tabIndex.toString()),(g=this.contentWrapperEl)===null||g===void 0||g.setAttribute("role","region"),(D=this.contentWrapperEl)===null||D===void 0||D.setAttribute("aria-label",this.options.ariaLabel)}if(!this.axis.x.track.el||!this.axis.y.track.el){var q=document.createElement("div"),de=document.createElement("div");MC(q,this.classNames.track),MC(de,this.classNames.scrollbar),q.appendChild(de),this.axis.x.track.el=q.cloneNode(!0),MC(this.axis.x.track.el,this.classNames.horizontal),this.axis.y.track.el=q.cloneNode(!0),MC(this.axis.y.track.el,this.classNames.vertical),this.el.appendChild(this.axis.x.track.el),this.el.appendChild(this.axis.y.track.el)}EY.prototype.initDOM.call(this),this.el.setAttribute("data-simplebar","init")},h.prototype.unMount=function(){EY.prototype.unMount.call(this),h.instances.delete(this.el)},h.initHtmlApi=function(){this.initDOMLoadedElements=this.initDOMLoadedElements.bind(this),typeof MutationObserver<"u"&&(this.globalObserver=new MutationObserver(h.handleMutations),this.globalObserver.observe(document,{childList:!0,subtree:!0})),document.readyState==="complete"||document.readyState!=="loading"&&!document.documentElement.doScroll?window.setTimeout(this.initDOMLoadedElements):(document.addEventListener("DOMContentLoaded",this.initDOMLoadedElements),window.addEventListener("load",this.initDOMLoadedElements))},h.handleMutations=function(a){a.forEach(function(f){f.addedNodes.forEach(function(g){g.nodeType===1&&(g.hasAttribute("data-simplebar")?!h.instances.has(g)&&document.documentElement.contains(g)&&new h(g,mce(g.attributes)):g.querySelectorAll("[data-simplebar]").forEach(function(D){D.getAttribute("data-simplebar")!=="init"&&!h.instances.has(D)&&document.documentElement.contains(D)&&new h(D,mce(D.attributes))}))}),f.removedNodes.forEach(function(g){var D;g.nodeType===1&&(g.getAttribute("data-simplebar")==="init"?!document.documentElement.contains(g)&&((D=h.instances.get(g))===null||D===void 0||D.unMount()):Array.prototype.forEach.call(g.querySelectorAll('[data-simplebar="init"]'),function(q){var de;!document.documentElement.contains(q)&&((de=h.instances.get(q))===null||de===void 0||de.unMount())}))})})},h.instances=new WeakMap,h}(EY);gPe&&ege.initHtmlApi();var yPe=vA(yce(),1);var M4n=vA(nge(),1);var Oce=vA(ige(),1);var age=vA(sge(),1);var wce=function(p){return p.BimplusViewer="bimplusViewer",p.ModelViewerBlack="modelViewerBlack",p.ModelViewer="modelViewer",p.ConnexisViewer="connexisViewer",p.ConnexisViewerBlack="connexisViewerBlack",p}(wce||{});var I4n=Math.PI/180,A4n=2*Math.PI;var O4n=new Mo("bimplus-tabs-switcher-config");var w4n=new Mo("bimplus-attachments-config"),CY=class{constructor(h){this.id=h.id??"",this.fileName=h.fileName??"",this.size=h.size??0}},rge=class{static{this.attachment=new CY({})}static create(h){return this.attachment=new CY(h),this}static setId(h){return this.attachment.id=h,this}static setFileName(h){return this.attachment.fileName=h,this}static setSize(h){return this.attachment.size=h,this}static setFile(h){return this.attachment.file=h,this}static build(){let h=structuredClone(this.attachment);return this.attachment=new CY({}),h}};var lge=vA(oge());var MPe=()=>({active:"bimplus_Components_Connexis_Active",default:"bimplus_Components_Connexis_Disabled"}),IPe=p=>({id:"commentsd",title:"test",img:p});function APe(p,h){if(p&1){let a=zr();ln(0,"lib-bimplus-main-menu",22),wi("bimplusMainMenuClicked",function(g){Ci(a);let D=on();return Di(D.bimplusMainMenuClicked(g))})("bimplusMainMenuOverlayClicked",function(){Ci(a);let g=on();return Di(g.bimplusMainMenuOverlayClicked())}),vn()}if(p&2){let a=on();Rn("selectedLanguage",a.languageStringsService.currentLanguage)("localizedStrings",a.languageStringsService.currentLanguageStrings)("isTouch",a.isTouch)("showHorizontalMenuIcons",a.isTouch)("appsWithInfo",a.appsWithInfo)("appsOrder",a.appsOrder)("menuItemsOrder",a.menuItemsOrder)}}var cge=(()=>{class p{constructor(a,f){this.translateService=a,this.languageStringsService=f,this.logoState=wce.BimplusViewer,this.isTouch=!1,this.isBimplusMainMenuVisible=!0,this.isNavbarMenuActive=!0,this.selectedZoom="100",this.messages="",this.contextMenuItems=[],this.contextMenuData=[],this.treeData=[],this.treeDataStringified=null,this.treeDataContextMenu=null,this.appsWithInfo=["portalSelectProjectBtn","portalBimUsers","portalBimModels"],this.appsOrder=["portalBimUsers","portalBimModels","portalBimDocuments","portalBimProjectSettings","portalBimProcesses","dividerprojectmanagement","portalBimViewerBtn","portalCloudViewerBtn","portalConnexisBtn","portalBimAutoconverterBtn","dividerapps","portalTeamManagementBtn","portalPropertyManagerBtn"],this.menuItemsOrder=["portalBimUsers","portalBimModels","portalBimDocuments","portalBimProjectSettings","portalBimProcesses"],this.showDialog=!1,this.activeTab=C0("object-properties"),this.languageStringsService.currentLanguage$.pipe(LB()).subscribe({next:g=>{this.translateService.use(g),lge.default.locale(g)}}),this.languageStringsService.currentLanguageStrings$.pipe(LB()).subscribe({next:g=>{this.translateService.setTranslation(this.languageStringsService.currentLanguage,g)}})}log(a,f,g,D){let q=`EVENT : ${a}. `+(g?`INDEX: ${f?.detail?.index} ACTION: ${f?.detail?.action}`:`VALUE: ${f?.detail}`);(D?()=>window.alert(q):()=>console.log(q))()}ngOnInit(){this.initLanguage(),window.BimPlus={bimplusNavbarClicked:a=>{this.log("Navbar clicked",a),a?.detail==="menu"&&(this.isNavbarMenuActive=!this.isNavbarMenuActive)}},this.initMessages(),this.initContextMenu()}bimplusLanguageSelected(a){this.log("bimplusLanguageSelected",{detail:a}),this._switchLanguage(a)}onActiveTab(a){this.log("onActiveTab",{detail:a},!1)}_switchLanguage(a){a&&this.languageStringsService.setCurrentLanguage(a)}bimplusUserMenuClicked(a){this.log("bimplusUserMenuClicked",a,!0)}bimplusTouchModeSelected(a){this.log("bimplusTouchModeSelected",{detail:a}),this.isTouch=a==="touch"}bimplusMainMenuClicked(a){this.log("bimplusUserMenuClicked",{detail:a},!0,!0)}bimplusMainMenuOverlayClicked(){this.log("bimplusMainMenuOverlayClicked",{detail:""},!1,!0)}bimplusStorageInfoClicked(a){this.log("bimplusStorageInfoClicked",{detail:a},!1,!0)}bimplusContactClicked(a){this.log("bimplusContactClicked",{detail:a},!1,!0)}bimplusZoomSelected(a){this.log("bimplusZoomSelected",{detail:a}),this.selectedZoom=a;let f=62.5*(Number(a)/100),g=document.querySelector("html");g&&(g.style.fontSize=f+"%")}bimplusNotifyDeleteMessage(a){let f=JSON.parse(a),g=this.messages&&JSON.parse(this.messages)?.messages?.filter?.(D=>D.id!==f.id);this.messages=g&&JSON.stringify({messages:g})||""}bimplusNotifyDeleteAllMessages(){this.messages=""}bimplusNotifyMessageAction(a){this.log("This is notify message action handler",{detail:a},!1,!0)}selectedNodes(a){this.log("selectedNodes",{detail:JSON.stringify(a)})}initLanguage(){this.languageStringsService.languageFilesUri="/assets/languages",this._switchLanguage("en")}initMessages(){this.messages=JSON.stringify({messages:[{id:"ALFA",type:"info",title:"Import successful",text:"kolizia.ifc has been imported",linkText:"Click here to open the project",link:"#/"},{id:"BETA",type:"info",title:"Clash detection done",text:"Clash detection on the project House1 with preset has been done.",linkText:"Click here to open the project"},{id:"OMEGA",type:"info",title:"Model export finished",text:"",linkText:"Click here to download `00 EMPTY__revision_comparison1.ifc` model."},{id:"OMEGA1",type:"info",title:"Model export finished",text:"Structural model included. Reinforcement of Hospital.ifc has been imported.",linkText:["Click here to download `XXXX` model.","Click here to download `YYYYY` model."],links:["#/1","#/2"]},{id:"TEST3",type:"info",title:"Clash detection done",text:"Clash detection on the project Bridge with preset has been done."},{id:"TEST4",type:"info",title:"Clash detection done",text:"Clash detection on the project Bridge with preset has been done."},{id:"TEST5",type:"info",title:"Clash detection done",text:"Clash detection on the project Bridge with preset has been done."},{id:"TEST6",type:"info",title:"Clash detection done",text:"Clash detection on the project Bridge with preset has been done."}]})}initContextMenu(){this.contextMenuItems=[{id:"openFile",title:"Open file",icon:"./favicon.ico",tooltip:"Open file tooltip",disabled:()=>!0},{id:"separator"},{id:"closeFile",title:"Close file",icon:"./favicon.ico",disabled:()=>!0},{id:"deleteFile",title:"Delete file",icon:"./favicon.ico"},{id:"separator"},{id:"renameFile",title:"Rename file",icon:"./favicon.ico",action:a=>{console.log(a)},tooltip:"Rename file tooltip"},{id:"renameFile",title:"Looooooooooooooooooooooooooooooooooooooooooooooooooooong item name",icon:"./favicon.ico",action:a=>{console.log(a)},tooltip:"Looooooooooooooooooooooooooooooooooooooooooooooooooooong item name"}],this.contextMenuData=[{name:"Folder 5",id:"dbc08cd2-9f50-465b-9b54-da29c4988d07-23",parent:"dbc08cd2-9f50-465b-9b54-da29c4988d07-00",children:[{name:"File 3 - 3 - 3",id:"dbc08cd2-9f50-465b-9b54-da29c4988d07-24",parent:"dbc08cd2-9f50-465b-9b54-da29c4988d07-23"}]}]}setupTreeData(a){let f=[];switch(a){case"Folders3":f.push({name:"Folders3",id:"dbc08cd2-9f50-465b-9b54-da29c4988d07-00",parent:"dbc08cd2-9f50-465b-9b54-da29c4988d07",children:[{name:"Folder 1",id:"dbc08cd2-9f50-465b-9b54-da29c4988d07-01",parent:"dbc08cd2-9f50-465b-9b54-da29c4988d07-00",children:[{name:"Folder 1 - 1 very looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong name",id:"dbc08cd2-9f50-465b-9b54-da29c4988d07-02",parent:"dbc08cd2-9f50-465b-9b54-da29c4988d07-01",children:[{name:"File 1 - 1 - 1",id:"dbc08cd2-9f50-465b-9b54-da29c4988d07-03",parent:"dbc08cd2-9f50-465b-9b54-da29c4988d07-02"},{name:"File 1 - 1 - 2",id:"dbc08cd2-9f50-465b-9b54-da29c4988d07-04",parent:"dbc08cd2-9f50-465b-9b54-da29c4988d07-02"},{name:"File 1 - 1 - 3",id:"dbc08cd2-9f50-465b-9b54-da29c4988d07-05",parent:"dbc08cd2-9f50-465b-9b54-da29c4988d07-02"}]},{name:"File 1 - 2",id:"dbc08cd2-9f50-465b-9b54-da29c4988d07-06",parent:"dbc08cd2-9f50-465b-9b54-da29c4988d07-01"},{name:"File 1 - 3",id:"dbc08cd2-9f50-465b-9b54-da29c4988d07-07",parent:"dbc08cd2-9f50-465b-9b54-da29c4988d07-01"}]},{name:"Folder 4",id:"dbc08cd2-9f50-465b-9b54-da29c4988d07-22",parent:"dbc08cd2-9f50-465b-9b54-da29c4988d07-00",children:[]},{name:"Folder 5",id:"dbc08cd2-9f50-465b-9b54-da29c4988d07-23",parent:"dbc08cd2-9f50-465b-9b54-da29c4988d07-00",children:[{name:"File 3 - 3 - 3",id:"dbc08cd2-9f50-465b-9b54-da29c4988d07-24",parent:"dbc08cd2-9f50-465b-9b54-da29c4988d07-23"},{name:"File 3 - 3 - 3",id:"dbc08cd2-9f50-465b-9b54-da29c4988d07-25",parent:"dbc08cd2-9f50-465b-9b54-da29c4988d07-23"}]}]});break;case"Folders2":f.push({name:"Folders2",id:"dbc08cd2-9f50-465b-9b54-da29c4988d07-00",parent:"dbc08cd2-9f50-465b-9b54-da29c4988d07",children:[{name:"Folder 1",id:"dbc08cd2-9f50-465b-9b54-da29c4988d07-01",parent:"dbc08cd2-9f50-465b-9b54-da29c4988d07-00",children:[{name:"Folder 1 - 1",id:"dbc08cd2-9f50-465b-9b54-da29c4988d07-02",parent:"dbc08cd2-9f50-465b-9b54-da29c4988d07-01",children:[{name:"File 1 - 1 - 1",id:"dbc08cd2-9f50-465b-9b54-da29c4988d07-03",parent:"dbc08cd2-9f50-465b-9b54-da29c4988d07-02"},{name:"File 1 - 1 - 2",id:"dbc08cd2-9f50-465b-9b54-da29c4988d07-04",parent:"dbc08cd2-9f50-465b-9b54-da29c4988d07-02"},{name:"File 1 - 1 - 3",id:"dbc08cd2-9f50-465b-9b54-da29c4988d07-05",parent:"dbc08cd2-9f50-465b-9b54-da29c4988d07-02"}]},{name:"Folder 1 - 2",id:"dbc08cd2-9f50-465b-9b54-da29c4988d07-06",parent:"dbc08cd2-9f50-465b-9b54-da29c4988d07-01",children:[]},{name:"Folder 1 - 3",id:"dbc08cd2-9f50-465b-9b54-da29c4988d07-07",parent:"dbc08cd2-9f50-465b-9b54-da29c4988d07-01",children:[]}]},{name:"Folder 2",id:"dbc08cd2-9f50-465b-9b54-da29c4988d07-08",parent:"dbc08cd2-9f50-465b-9b54-da29c4988d07-00",children:[{name:"File 2 - 1",id:"dbc08cd2-9f50-465b-9b54-da29c4988d07-09",parent:"dbc08cd2-9f50-465b-9b54-da29c4988d07-08"},{name:"Folder 2 - 2",id:"dbc08cd2-9f50-465b-9b54-da29c4988d07-10",parent:"dbc08cd2-9f50-465b-9b54-da29c4988d07-08",children:[{name:"File 2 - 2 - 1",id:"dbc08cd2-9f50-465b-9b54-da29c4988d07-11",parent:"dbc08cd2-9f50-465b-9b54-da29c4988d07-10"},{name:"File 2 - 2 - 2",id:"dbc08cd2-9f50-465b-9b54-da29c4988d07-12",parent:"dbc08cd2-9f50-465b-9b54-da29c4988d07-10"},{name:"File 2 - 2 - 3",id:"dbc08cd2-9f50-465b-9b54-da29c4988d07-13",parent:"dbc08cd2-9f50-465b-9b54-da29c4988d07-10"}]},{name:"File 2 - 3",id:"dbc08cd2-9f50-465b-9b54-da29c4988d07-14",parent:"dbc08cd2-9f50-465b-9b54-da29c4988d07-08"}]},{name:"Folder 3",id:"dbc08cd2-9f50-465b-9b54-da29c4988d07-15",parent:"dbc08cd2-9f50-465b-9b54-da29c4988d07-00",children:[{name:"File 3 - 1",id:"dbc08cd2-9f50-465b-9b54-da29c4988d07-16",parent:"dbc08cd2-9f50-465b-9b54-da29c4988d07-15"},{name:"File 3 - 2",id:"dbc08cd2-9f50-465b-9b54-da29c4988d07-17",parent:"dbc08cd2-9f50-465b-9b54-da29c4988d07-15"},{name:"Folder 3 - 3",id:"dbc08cd2-9f50-465b-9b54-da29c4988d07-18",parent:"dbc08cd2-9f50-465b-9b54-da29c4988d07-15",children:[{name:"File 3 - 3 - 1",id:"dbc08cd2-9f50-465b-9b54-da29c4988d07-19",parent:"dbc08cd2-9f50-465b-9b54-da29c4988d07-18"},{name:"File 3 - 3 - 2",id:"dbc08cd2-9f50-465b-9b54-da29c4988d07-20",parent:"dbc08cd2-9f50-465b-9b54-da29c4988d07-18"},{name:"File 3 - 3 - 3",id:"dbc08cd2-9f50-465b-9b54-da29c4988d07-21",parent:"dbc08cd2-9f50-465b-9b54-da29c4988d07-18"}]}]},{name:"Folder 4",id:"dbc08cd2-9f50-465b-9b54-da29c4988d07-22",parent:"dbc08cd2-9f50-465b-9b54-da29c4988d07-00",children:[]},{name:"Folder 5",id:"dbc08cd2-9f50-465b-9b54-da29c4988d07-23",parent:"dbc08cd2-9f50-465b-9b54-da29c4988d07-00",children:[{name:"File 3 - 3 - 3",id:"dbc08cd2-9f50-465b-9b54-da29c4988d07-24",parent:"dbc08cd2-9f50-465b-9b54-da29c4988d07-23"}]}]});break;default:f.push({id:"dbc08cd2-9f50-465b-9b54-da29c4988d07",children:[{id:"78b8109a-aac3-4307-8ddb-745a64710d36",children:[],folderRole:{id:"a124a637-55a4-4e4e-ab24-777d96b320a0",name:"Folder_Admin"},roleSetByUser:!1,parent:"dbc08cd2-9f50-465b-9b54-da29c4988d07",name:"General folder",type:"DocumentFolder",number:1,level:1,createdAt:"2023-01-19T05:40:37.3",creator:{id:"9edf8528-b21f-b332-4785-6d5cc0b96e1f",email:"jgaba@allplan.com",firstname:"J\xE1n",lastname:"G\xE1ba"},changed:"2023-01-19T05:40:37.3",changedBy:{id:"9edf8528-b21f-b332-4785-6d5cc0b96e1f",email:"jgaba@allplan.com",firstname:"J\xE1n",lastname:"G\xE1ba"}},{id:"123756a8-c06f-4954-8851-93f95b1629c1",children:[{id:"36a92f23-98e7-42db-b150-b0dae491d355",children:[{id:"2bbfbce5-beb8-49b1-bbef-430b061318c9",structureElementId:"86b65d1e-0490-45f2-abd6-402a176bc219",parent:"36a92f23-98e7-42db-b150-b0dae491d355",name:"Allplan_QTO-QTO-2024-02-16-08-27-15.xlsx",type:"Attachment",number:0,level:3},{id:"9eb72c59-f019-4679-9bf4-07f8055388d4",structureElementId:"cc9c8694-4d70-4066-9475-d4375e67d7a0",parent:"36a92f23-98e7-42db-b150-b0dae491d355",name:"Allplan_QTO-QTO-2024-02-16-08-24-49.xlsx",type:"Attachment",number:0,level:3}],folderRole:{id:"a124a637-55a4-4e4e-ab24-777d96b320a0",name:"Folder_Admin"},roleSetByUser:!1,restricted:1,parent:"123756a8-c06f-4954-8851-93f95b1629c1",name:"ELEMENTS",type:"DocumentFolder",number:1,level:2,createdAt:"2023-01-19T05:40:37.3",creator:{id:"9edf8528-b21f-b332-4785-6d5cc0b96e1f",email:"jgaba@allplan.com",firstname:"J\xE1n",lastname:"G\xE1ba"},changed:"2023-01-19T05:40:37.3",changedBy:{id:"9edf8528-b21f-b332-4785-6d5cc0b96e1f",email:"jgaba@allplan.com",firstname:"J\xE1n",lastname:"G\xE1ba"}},{id:"73ad9d94-3ace-4124-b533-b4e2cbe07ab1",children:[],folderRole:{id:"a124a637-55a4-4e4e-ab24-777d96b320a0",name:"Folder_Admin"},roleSetByUser:!1,restricted:1,parent:"123756a8-c06f-4954-8851-93f95b1629c1",name:"IFC",type:"DocumentFolder",number:2,level:2,createdAt:"2023-01-19T05:40:37.3",creator:{id:"9edf8528-b21f-b332-4785-6d5cc0b96e1f",email:"jgaba@allplan.com",firstname:"J\xE1n",lastname:"G\xE1ba"},changed:"2023-01-19T05:40:37.3",changedBy:{id:"9edf8528-b21f-b332-4785-6d5cc0b96e1f",email:"jgaba@allplan.com",firstname:"J\xE1n",lastname:"G\xE1ba"}},{id:"0378d1be-7b77-4705-a347-adda0ec04674",children:[],folderRole:{id:"a124a637-55a4-4e4e-ab24-777d96b320a0",name:"Folder_Admin"},roleSetByUser:!1,restricted:1,parent:"123756a8-c06f-4954-8851-93f95b1629c1",name:"LOG",type:"DocumentFolder",number:3,level:2,createdAt:"2023-01-19T05:40:37.3",creator:{id:"9edf8528-b21f-b332-4785-6d5cc0b96e1f",email:"jgaba@allplan.com",firstname:"J\xE1n",lastname:"G\xE1ba"},changed:"2023-01-19T05:40:37.3",changedBy:{id:"9edf8528-b21f-b332-4785-6d5cc0b96e1f",email:"jgaba@allplan.com",firstname:"J\xE1n",lastname:"G\xE1ba"}},{id:"abfd2209-225b-452d-91c9-d33269e47334",children:[],folderRole:{id:"a124a637-55a4-4e4e-ab24-777d96b320a0",name:"Folder_Admin"},roleSetByUser:!1,restricted:1,parent:"123756a8-c06f-4954-8851-93f95b1629c1",name:"ISSUES",type:"DocumentFolder",number:4,level:2,createdAt:"2023-01-19T05:40:37.3",creator:{id:"9edf8528-b21f-b332-4785-6d5cc0b96e1f",email:"jgaba@allplan.com",firstname:"J\xE1n",lastname:"G\xE1ba"},changed:"2023-01-19T05:40:37.3",changedBy:{id:"9edf8528-b21f-b332-4785-6d5cc0b96e1f",email:"jgaba@allplan.com",firstname:"J\xE1n",lastname:"G\xE1ba"}},{id:"094c8e91-7023-4c1e-8afb-6480d34cd4d1",children:[],folderRole:{id:"a124a637-55a4-4e4e-ab24-777d96b320a0",name:"Folder_Admin"},roleSetByUser:!1,restricted:1,parent:"123756a8-c06f-4954-8851-93f95b1629c1",name:"SLIDESHOWS",type:"DocumentFolder",number:5,level:2,createdAt:"2023-01-19T05:40:37.3",creator:{id:"9edf8528-b21f-b332-4785-6d5cc0b96e1f",email:"jgaba@allplan.com",firstname:"J\xE1n",lastname:"G\xE1ba"},changed:"2023-01-19T05:40:37.3",changedBy:{id:"9edf8528-b21f-b332-4785-6d5cc0b96e1f",email:"jgaba@allplan.com",firstname:"J\xE1n",lastname:"G\xE1ba"}},{id:"d5d9ea2f-0337-4321-8917-3d485a76247a",children:[],color:4285988983,folderRole:{id:"a124a637-55a4-4e4e-ab24-777d96b320a0",name:"Folder_Admin"},roleSetByUser:!1,restricted:1,parent:"123756a8-c06f-4954-8851-93f95b1629c1",name:"OTHER MODELS",type:"DocumentFolder",number:6,level:2,createdAt:"2023-01-19T05:40:37.3",creator:{id:"9edf8528-b21f-b332-4785-6d5cc0b96e1f",email:"jgaba@allplan.com",firstname:"J\xE1n",lastname:"G\xE1ba"},changed:"2023-01-19T05:40:37.3",changedBy:{id:"9edf8528-b21f-b332-4785-6d5cc0b96e1f",email:"jgaba@allplan.com",firstname:"J\xE1n",lastname:"G\xE1ba"}}],folderRole:{id:"a124a637-55a4-4e4e-ab24-777d96b320a0",name:"Folder_Admin"},roleSetByUser:!1,restricted:1,parent:"dbc08cd2-9f50-465b-9b54-da29c4988d07",name:"MY DOCUMENTS",type:"DocumentFolder",number:2,level:1,createdAt:"2023-01-19T05:40:37.3",creator:{id:"9edf8528-b21f-b332-4785-6d5cc0b96e1f",email:"jgaba@allplan.com",firstname:"J\xE1n",lastname:"G\xE1ba"},changed:"2023-01-19T05:40:37.3",changedBy:{id:"9edf8528-b21f-b332-4785-6d5cc0b96e1f",email:"jgaba@allplan.com",firstname:"J\xE1n",lastname:"G\xE1ba"}}],folderRole:{id:"a124a637-55a4-4e4e-ab24-777d96b320a0",name:"Folder_Admin"},roleSetByUser:!1,parent:"d71d6daf-1114-42c4-84ad-5807837cac7b",name:"Folders1",type:"DocumentFolder",number:0,level:0});break}a==="Folders3"?(this.treeData=f,this.treeDataStringified=null,this.treeDataContextMenu={objectContextMenuitems:[{id:"openFile",title:"Open file",icon:"./favicon.ico",tooltip:"Open file tooltip"},{id:"separator"},{id:"closeFile",title:"Close file",icon:"./favicon.ico",disabled:()=>!0},{id:"deleteFile",title:"Delete file",icon:"./favicon.ico",disabled:()=>!1},{id:"separator"},{id:"renameFile",title:"Rename file",icon:"./favicon.ico",action:g=>{console.log(g)},tooltip:"Rename file tooltip"}],folderContextMenuitems:[{id:"renameFolder",title:"Rename folder",icon:"./favicon.ico",tooltip:"Rename folder tooltip"},{id:"deletFolder",title:"Delete folder",tooltip:"Delete folder tooltip"}]}):(this.treeData=[],this.treeDataStringified=JSON.stringify(f),this.treeDataContextMenu=null)}getNode(){let f=document.querySelector("lib-bimplus-flat-tree")?.get_node?.({id:"dbc08cd2-9f50-465b-9b54-da29c4988d07-23"},!1);console.log(f)}selectNode(){document.querySelector("lib-bimplus-flat-tree")?.select_node?.("dbc08cd2-9f50-465b-9b54-da29c4988d07-24")}static{this.\u0275fac=function(f){return new(f||p)(ls(za),ls(Tbe))}}static{this.\u0275cmp=ks({type:p,selectors:[["app-root"]],features:[dl([])],decls:28,vars:33,consts:[[1,"bimplus-components-navbar","visible"],["isNavbarMessageVisible","false","teamInfo","test_team","projectInfo","00 Quickstart project and some very very long text","teamInfoOffset","0.9rem","isDev","true","isStage","true","isNavbarInfoVisible","true",3,"logoState","isNavbarMenuVisible","isNavbarMenuActive","isTouch"],[3,"activeTabChange","activeTab"],[3,"activeTabChange","activeTab","bimplusTabComponentModel"],["showIcons","true","triggerTitle","File context menu",3,"items","data"],[3,"bimplusNotifyMessageAction","bimplusNotifyDeleteMessage","bimplusNotifyDeleteAllMessages","selectedLanguage","localizedStrings","messages"],[3,"bimplusStorageInfoClicked","selectedLanguage","localizedStrings","usedStorage"],[3,"bimplusContactClicked"],[3,"bimplusZoomSelected","selectedZoom"],[3,"bimplusTouchModeSelected","selectedMode","selectedLanguage","localizedStrings"],[3,"bimplusLanguageSelected","selectedLanguage"],["userName","Test User","userPhotoUrl","https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTMS36RRWYaTysG471mlormL1bYN3-QIabbo30rDitKRoaDs3EA&s","buttonTitle","testuser@allplan.com","allowRcaItem","true",3,"bimplusLanguageSelected","bimplusUserMenuClicked","selectedLanguage","localizedStrings","isTouch"],["projectName","00 Quickstart project and some very very long text","projectImageUrl","https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTMS36RRWYaTysG471mlormL1bYN3-QIabbo30rDitKRoaDs3EA&s","isDev","true","isStage","true","teammembersSubscribed","true","propertymanagerSubscribed","true","projectActiveItem","projectlist","menuActiveItem","projectmembers",3,"selectedLanguage","localizedStrings","isTouch","showHorizontalMenuIcons","appsWithInfo","appsOrder","menuItemsOrder"],[1,"floating-panels-wrapper"],[3,"selectedLanguage","localizedStrings","noModelsMessage"],[1,"tree-data","tree-data-1",3,"click","keypress"],[1,"tree-data","tree-data-2",3,"click","keypress"],[1,"tree-data","tree-data-3",3,"click","keypress"],[1,"tree-data","tree-data-3","get-node",3,"click","keypress"],[1,"tree-data","tree-data-3","select-node",3,"click","keypress"],[1,"tree"],["enableSelect","true","enableParentHighlighting","true","multiSelect","true","oneLevelMultiSelect","false","showFoldersIcons","true","showObjectsIcons","true","enableDragAndDrop","true","treeTitle","FLAT TREE","paddingIndent","2.8rem",1,"flat-tree",3,"selectedNodes","treeData","treeDataStringified","contextMenus"],["projectName","00 Quickstart project and some very very long text","projectImageUrl","https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTMS36RRWYaTysG471mlormL1bYN3-QIabbo30rDitKRoaDs3EA&s","isDev","true","isStage","true","teammembersSubscribed","true","propertymanagerSubscribed","true","projectActiveItem","projectlist","menuActiveItem","projectmembers",3,"bimplusMainMenuClicked","bimplusMainMenuOverlayClicked","selectedLanguage","localizedStrings","isTouch","showHorizontalMenuIcons","appsWithInfo","appsOrder","menuItemsOrder"]],template:function(f,g){f&1&&(ln(0,"div",0)(1,"lib-bimplus-navbar",1)(2,"lib-bimplus-tabs-switcher",2),AA("activeTabChange",function(q){return CA(g.activeTab,q)||(g.activeTab=q),q}),ln(3,"lib-bimplus-tab",3),wi("activeTabChange",function(q){return g.activeTab.set(q)}),vn()(),Rs(4,"lib-bimplus-context-menu",4),ln(5,"lib-bimplus-notify",5),wi("bimplusNotifyMessageAction",function(q){return g.bimplusNotifyMessageAction(q)})("bimplusNotifyDeleteMessage",function(q){return g.bimplusNotifyDeleteMessage(q)})("bimplusNotifyDeleteAllMessages",function(){return g.bimplusNotifyDeleteAllMessages()}),vn(),ln(6,"lib-bimplus-storage-info",6),wi("bimplusStorageInfoClicked",function(q){return g.bimplusStorageInfoClicked(q)}),vn(),ln(7,"lib-bimplus-contact",7),wi("bimplusContactClicked",function(q){return g.bimplusContactClicked(q)}),vn(),ln(8,"lib-bimplus-zoom",8),wi("bimplusZoomSelected",function(q){return g.bimplusZoomSelected(q)}),vn(),ln(9,"lib-bimplus-touch-menu",9),wi("bimplusTouchModeSelected",function(q){return g.bimplusTouchModeSelected(q)}),vn(),ln(10,"lib-bimplus-language-menu",10),wi("bimplusLanguageSelected",function(q){return g.bimplusLanguageSelected(q)}),vn(),ln(11,"lib-bimplus-user-menu",11),wi("bimplusLanguageSelected",function(q){return g.bimplusLanguageSelected(q)})("bimplusUserMenuClicked",function(q){return g.bimplusUserMenuClicked(q)}),vn()()(),as(12,APe,1,7,"lib-bimplus-main-menu",12),ln(13,"div",13),Rs(14,"lib-bimplus-floating-bar-project-navigator",14),vn(),ln(15,"div",15),wi("click",function(){return g.setupTreeData("Folders1")})("keypress",function(){return g.setupTreeData("Folders1")}),Os(16,"Folders1"),vn(),ln(17,"div",16),wi("click",function(){return g.setupTreeData("Folders2")})("keypress",function(){return g.setupTreeData("Folders2")}),Os(18,"Folders2"),vn(),ln(19,"div",17),wi("click",function(){return g.setupTreeData("Folders3")})("keypress",function(){return g.setupTreeData("Folders3")}),Os(20,"Folders3"),vn(),ln(21,"div",18),wi("click",function(){return g.getNode()})("keypress",function(){return g.getNode()}),Os(22,"get_node (from Folders3)"),vn(),ln(23,"div",19),wi("click",function(){return g.selectNode()})("keypress",function(){return g.selectNode()}),Os(24,"select_node (from Folders3)"),vn(),ln(25,"div",20)(26,"lib-bimplus-scrollable-container")(27,"lib-bimplus-flat-tree",21),wi("selectedNodes",function(q){return g.selectedNodes(q)}),vn()()()),f&2&&(Kt(),Rn("logoState",g.logoState)("isNavbarMenuVisible",g.isBimplusMainMenuVisible)("isNavbarMenuActive",g.isNavbarMenuActive)("isTouch",g.isTouch),Kt(),IA("activeTab",g.activeTab),Kt(),Rn("activeTab",g.activeTab())("bimplusTabComponentModel",Wf(31,IPe,hB(30,MPe))),Kt(),Rn("items",g.contextMenuItems)("data",g.contextMenuData),Kt(),Rn("selectedLanguage",g.languageStringsService.currentLanguage)("localizedStrings",g.languageStringsService.currentLanguageStrings)("messages",g.messages),Kt(),Rn("selectedLanguage",g.languageStringsService.currentLanguage)("localizedStrings",g.languageStringsService.currentLanguageStrings)("usedStorage",90),Kt(2),Rn("selectedZoom",g.selectedZoom),Kt(),Rn("selectedMode",g.isTouch?"touch":"desktop")("selectedLanguage",g.languageStringsService.currentLanguage)("localizedStrings",g.languageStringsService.currentLanguageStrings),Kt(),Rn("selectedLanguage",g.languageStringsService.currentLanguage),Kt(),Rn("selectedLanguage",g.languageStringsService.currentLanguage)("localizedStrings",g.languageStringsService.currentLanguageStrings)("isTouch",g.isTouch),Kt(),Js(g.isNavbarMenuActive?12:-1),Kt(2),Rn("selectedLanguage",g.languageStringsService.currentLanguage)("localizedStrings",g.languageStringsService.currentLanguageStrings)("noModelsMessage","_Loading project details"),Kt(13),Rn("treeData",g.treeData)("treeDataStringified",g.treeDataStringified)("contextMenus",g.treeDataContextMenu))},dependencies:[vZ,yZ,MZ,AZ,OZ,_Z,DZ,zZ,RZ,iC,EL,DK,RI,SZ,Lo,CK],styles:[`*,html{font-size:100%;margin:0;padding:0}html{font-size:62.5%}body{background-color:gray}.hidden{display:none}bimplus-main-menu{height:50vh}lib-bimplus-floating-bar-project-navigator{position:absolute}.floating-panels-wrapper{position:relative}.tree-data{background-color:#fff;font-size:1.5rem;width:fit-content;padding:.5rem;border-style:solid;border-width:.2rem;border-radius:.5rem;margin:.5rem;cursor:pointer}.tree{width:20%;height:250px}
15326
15326
  `],encapsulation:2})}}return p})();var OPe=p=>new _be(p,"./assets/languages/strings_",".json"),Tce=class{handle(h){return console.warn("Missing translation string "+h.key),h.key}};Qg(void 0,null,function*(){let p=yield Ufe({providers:[Lfe(),hoe(jo.forRoot({missingTranslationHandler:{provide:c9,useClass:Tce},isolate:!0,defaultLanguage:"en",loader:{provide:gL,useFactory:OPe,deps:[qV]}}))]}),h=Up(Sme,{injector:p.injector});customElements.define("bimplus-connection-designer",h);let a=Up(I2e,{injector:p.injector});customElements.define("bimplus-connection-designer-result",a);let f=Up(vZ,{injector:p.injector});customElements.define("bimplus-contact",f);let g=Up(w2e,{injector:p.injector});customElements.define("bimplus-floating-bar-hide-objects",g);let D=Up(_2e,{injector:p.injector});customElements.define("bimplus-floating-bar-isolation-objects",D);let q=Up(yZ,{injector:p.injector});customElements.define("bimplus-floating-bar-project-navigator",q);let de=Up(MZ,{injector:p.injector});customElements.define("bimplus-language-menu",de);let G=Up(AZ,{injector:p.injector});customElements.define("bimplus-main-menu",G);let ee=Up(OZ,{injector:p.injector});customElements.define("bimplus-navbar",ee);let fe=Up(_Z,{injector:p.injector});customElements.define("bimplus-notify",fe);let ye=Up(TZ,{injector:p.injector});customElements.define("bimplus-overlay",ye);let je=Up(IZ,{injector:p.injector});customElements.define("bimplus-project-menu",je);let $e=Up(L2e,{injector:p.injector});customElements.define("bimplus-sidenav",$e);let Dt=Up(_B,{injector:p.injector});customElements.define("bimplus-sidenav-drawer-content",Dt);let gn=Up(DZ,{injector:p.injector});customElements.define("bimplus-storage-info",gn);let $n=Up(B2e,{injector:p.injector});customElements.define("bimplus-tool-hub",$n),$n.prototype.toggleSubItemsView=function(rs){return this.ngElementStrategy.componentRef.instance.toggleSubItemsView(rs)};let Ri=Up(SZ,{injector:p.injector});customElements.define("bimplus-touch-menu",Ri);let os=Up(zZ,{injector:p.injector});customElements.define("bimplus-user-menu",os);let Er=Up(RZ,{injector:p.injector});customElements.define("bimplus-zoom",Er);let Ns=Up(Obe,{injector:p.injector});customElements.define("bimplus-object-navigator",Ns);let ya=Up(iC,{injector:p.injector});customElements.define("bimplus-flat-tree",ya);let Fi=Up(EL,{injector:p.injector});customElements.define("bimplus-context-menu",Fi);let Aa=Up(hZ,{injector:p.injector});customElements.define("loading-spinner",Aa);let mr=Up(wbe,{injector:p.injector});customElements.define("bimplus-tooltip-message-element",mr);let tr=Up(RI,{injector:p.injector});customElements.define("bimplus-scrollable-container-element",tr);let El=Up(cge,{injector:p.injector});customElements.define("bimplus-app-wrapper-internal-element",El);let pa=Up(Dbe,{injector:p.injector});customElements.define("bimplus-overlay-dialog-warning",pa);let To=Up(Sbe,{injector:p.injector});customElements.define("resizable-panel",To);let Il=Up(zbe,{injector:p.injector});customElements.define("object-properties-header",Il);let S1=Up(Qve,{injector:p.injector});customElements.define("object-properties",S1);let il=Up(e3e,{injector:p.injector});customElements.define("lib-bimplus-overlay-dialog-error",il);let No=Up(DK,{injector:p.injector});customElements.define("bimplus-tabs-switcher",No);let vu=Up(u3e,{injector:p.injector});customElements.define("bimplus-object-comments-list",vu);let Za=Up(RK,{injector:p.injector});customElements.define("bimplus-textarea",Za);let Ao=Up(zK,{injector:p.injector});customElements.define("bimplus-overlay-dialog-delete",Ao);let n0=Up(LK,{injector:p.injector});customElements.define("bimplus-comment",n0);let z1=Up($Z,{injector:p.injector});customElements.define("bimplus-link-tooltip-message",z1);let i0=Up(d3e,{injector:p.injector});customElements.define("bimplus-status-bar",i0)});export{Tce as BimplusMissingTranslationHandler};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bimplus-webcomponents",
3
- "version": "0.0.187",
3
+ "version": "0.0.188",
4
4
  "license": "MIT",
5
5
  "author": "",
6
6
  "description": "bim+ webcomponents library",