@qaecy/cue-ui 0.0.34 → 0.0.36
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/311.js +1 -1
- package/382.js +1 -0
- package/493.js +1 -1
- package/5.js +1 -0
- package/611.js +1 -1
- package/675.js +1 -0
- package/722.js +1 -1
- package/773.js +1 -1
- package/834.js +1 -0
- package/872.js +1 -0
- package/953.js +1 -0
- package/README.md +63 -2
- package/common.js +1 -1
- package/index.js +1 -1
- package/main.js +1 -1
- package/package.json +1 -1
- package/368.js +0 -1
- package/446.js +0 -1
- package/499.js +0 -1
- package/513.js +0 -1
- package/919.js +0 -1
package/611.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunkcue_ui=self.webpackChunkcue_ui||[]).push([[611],{8611(y,M,c){"use strict";c.d(M,{g:()=>At});var _=c(467),r=c(7705),d=c(2271),l=c(5802),m=c(2065),b=c(7284),C=c.n(b);var e=c(5547);let E=(()=>{class o{get calculatedWidth(){let t=this.localConfig().width||this.width()||1;return this.el.nativeElement.parentNode.offsetWidth>0&&t<=1&&t>0&&(t*=this.el.nativeElement.parentNode.offsetWidth),t}get calculatedHeight(){let t=this.localConfig().height||this.height()||400;return this.el.nativeElement.parentNode.offsetHeight>0&&t<=1&&t>0&&(t*=this.el.nativeElement.parentNode.offsetHeight),t}onResize(t){this.logMessage("debug","rezisze triggered"),window.clearTimeout(this.timeoutId),this.timeoutId=window.setTimeout(()=>{this.options.realignOnResize&&this.reDraw()},200)}constructor(){this.data=(0,r.hFB)([]),this.width=(0,r.hFB)(),this.height=(0,r.hFB)(),this.step=(0,r.hFB)(),this.overflow=(0,r.hFB)(),this.strict=(0,r.hFB)(),this.zoomOnHover=(0,r.hFB)(),this.realignOnResize=(0,r.hFB)(),this.randomizeAngle=(0,r.hFB)(),this.background=(0,r.hFB)(),this.font=(0,r.hFB)(),this.delay=(0,r.hFB)(),this.config=(0,r.hFB)({}),this.log=(0,r.hFB)(),this.clicked=(0,r.CGW)(),this.afterInit=(0,r.CGW)(),this.afterChecked=(0,r.CGW)(),this.localConfig=(0,d.EW)(()=>{const n=this.config();return{...n,width:this.width()||n.width||500,height:this.height()||n.height||300,overflow:this.overflow()??(n.overflow||!0),strict:this.strict()??(n.strict||!1),zoomOnHover:this.zoomOnHover()||n.zoomOnHover||{transitionTime:0,scale:1,delay:0},realignOnResize:this.realignOnResize()??(n.realignOnResize||!1),randomizeAngle:this.randomizeAngle()??(n.randomizeAngle||!1),step:this.step()||n.step||2,log:this.log()||n.log||!1,delay:this.delay()||n.delay,background:this.background()||n.background,font:this.font()||n.font}}),this.cloudDataHtmlElements=[],this.dataArr=[],this.el=(0,l.WQX)(e.aKT),this.r2=(0,l.WQX)(e.sFG);const t=this.el.nativeElement;(0,l.QZP)(()=>{const n=this.localConfig();this.logMessage("warn","cloud configuration",n),n.font&&this.r2.setStyle(t,"font",n.font),n.background&&this.r2.setStyle(t,"background",n.background),this.reDraw()})}reDraw(){this.afterChecked?.emit(),this.logMessage("debug","dataChanges emitted"),this.cloudDataHtmlElements=[],this.data()?(this.el.nativeElement.innerHTML="",this.data()&&(this.dataArr=this.data()),this.options={...this.localConfig(),aspectRatio:this.calculatedWidth/this.calculatedHeight,width:this.calculatedWidth,height:this.calculatedHeight,center:{x:this.calculatedWidth/2,y:this.calculatedHeight/2}},this.r2.setStyle(this.el.nativeElement,"width",this.options.width+"px"),this.r2.setStyle(this.el.nativeElement,"height",this.options.height+"px"),this.drawWordCloud(),this.logMessage("debug","reDraw finished")):console.error("angular-tag-cloud: No data passed. Please pass an Array of CloudData")}descriptiveEntry(t){let n=t.text;return n+=t.color?`-${t.color}`:"",n+=t.external?`-${t.external}`:"",n+=t.link?`-${t.link}`:"",n+=t.rotate?`-${t.rotate}`:"",n}drawWordCloud(){this.dataArr.sort((i,a)=>this.descriptiveEntry(i).localeCompare(this.descriptiveEntry(a))),this.dataArr.sort((i,a)=>a.weight-i.weight);const t=this.dataArr.filter(i=>i.position),n=this.dataArr.filter(i=>!i.position);t.forEach((i,a)=>{this.drawWord(a,i)}),n.forEach((i,a)=>{this.drawWord(a,i)})}hitTest(t){for(const n of this.cloudDataHtmlElements)if(this.overlapping(t,n))return!0;return!1}overlapping(t,n){const{offsetLeft:i,offsetTop:a,offsetWidth:u,offsetHeight:p}=n;return!(t.right<i||t.left>i+u||t.bottom<a||t.top>a+p)}getWeightForWord(t){let n=5;return this.dataArr[0].weight>this.dataArr[this.dataArr.length-1].weight&&(this.options.strict?t.weight>10?(n=10,this.logMessage("warn",`[TagCloud strict] Weight property ${t.weight} > 10. Fallback to 10 as you are using strict mode`,t)):t.weight<1?(n=1,this.logMessage("warn",`[TagCloud strict] Given weight property ${t.weight} < 1. Fallback to 1 as you are using strict mode`,t)):t.weight%1!=0?(n=Math.round(t.weight),this.logMessage("warn",`[TagCloud strict] Given weight property ${t.weight} is not an integer. Rounded value to ${n}`,t)):n=t.weight:n=Math.round((t.weight-this.dataArr[this.dataArr.length-1].weight)/(this.dataArr[0].weight-this.dataArr[this.dataArr.length-1].weight)*9)+1),n}setWordColor(t,n){this.r2.setStyle(t,"color",n)}setTooltip(t,n){this.r2.addClass(t,"tooltip");const i=this.r2.createElement("span");i.className="tooltiptext";const a=this.r2.createText(n);i.appendChild(a),t.appendChild(i)}setWordRotation(t,n){const i=n?`rotate(${n}deg)`:"";return this.r2.setStyle(t,"transform",i),i}wrapNodeIntoAnchorElement(t,n){const i=this.r2.createElement("a");return i.href=n.link||"",void 0!==n.external&&n.external&&(i.target="_blank"),i.appendChild(t),i}applyZoomStyle(t,n,i,a){this.options.zoomOnHover&&1!==this.options.zoomOnHover.scale&&(this.options.zoomOnHover.transitionTime||(this.options.zoomOnHover.transitionTime=0),this.options.zoomOnHover.scale||(this.options.zoomOnHover.scale=1),n.onmouseover=()=>{this.options.zoomOnHover?.transitionTime&&this.r2.setStyle(n,"transition",`transform ${this.options.zoomOnHover.transitionTime}s`),this.options.zoomOnHover?.scale&&this.r2.setStyle(n,"transform",`scale(${this.options.zoomOnHover.scale}) ${a}`),this.options.zoomOnHover?.delay&&this.r2.setStyle(n,"transition-delay",`${this.options.zoomOnHover.delay}s`),this.options.zoomOnHover?.color&&this.r2.setStyle(i?t:n,"color",this.options.zoomOnHover.color)},n.onmouseout=()=>{this.r2.setStyle(n,"transform",`none ${a}`),this.options.zoomOnHover?.color&&this.r2.removeStyle(i?t:n,"color")})}setPosition(t,n,i){let a=this.options.randomizeAngle?6.28*Math.random():0,u=0;const p=t.style;p.position="absolute";const f=!!(n.position&&n.position.left&&n.position.top),h=t.offsetWidth,v=t.offsetHeight;let w=f&&n.position?.left?n.position.left:this.options.center.x-h/2,S=f&&n.position?.top?n.position.top:this.options.center.y-v/2;if(p.left=w+"px",p.top=S+"px",this.options.delay&&(t.classList.add("tag-animation-delay"),p.setProperty("--tag-animation-delay",this.options.delay*i+"ms")),!f)if(0===i)p.left=w+2*(Math.random()-.5)*(this.calculatedWidth/5)+"px",p.top=S+2*(Math.random()-.5)*(this.calculatedHeight/5)+"30px";else{for(;this.options.width&&this.options.height&&t.offsetHeight&&t.offsetWidth&&this.hitTest(new DOMRect(w,S,t.offsetWidth,t.offsetHeight));)u+=this.options.step||1,a+=(i%2==0?1:-1)*(this.options.step||1),w=this.options.center.x-h/2+u*Math.cos(a)*this.options.aspectRatio,S=this.options.center.y+u*Math.sin(a)-v/2;p.left=w+"px",p.top=S+"px"}if(!this.options.overflow&&(w<0||S<0||w+h>this.calculatedWidth||S+v>this.calculatedHeight))return this.logMessage("warn","Word did not fit into the cloud and overflow is set to 'false'. The element will be removed",t),void t.remove()}drawWord(t,n){let i;const a=this.getWeightForWord(n);i=this.r2.createElement("span"),i.className=`w${a}`,i.onclick=()=>{this.clicked?.emit(n)},i.onmouseenter=()=>{i.style.zIndex="2"},i.onmouseleave=()=>{i.style.zIndex="1"};let u=this.r2.createText(n.text);n.color&&this.setWordColor(i,n.color);const p=this.setWordRotation(i,n.rotate);n.link&&(u=this.wrapNodeIntoAnchorElement(u,n)),this.options.zoomOnHover&&1!==this.options.zoomOnHover.scale&&this.applyZoomStyle(u,i,n.link,p),i.appendChild(u),this.r2.appendChild(this.el.nativeElement,i),n.tooltip&&this.setTooltip(i,n.tooltip),i.id=`angular-tag-cloud-item-${t}`,this.setPosition(i,n,t),this.logMessage("debug","Adds new word <span>",i),this.cloudDataHtmlElements.push(i),this.logMessage("debug","Placed words",this.cloudDataHtmlElements)}logMessage(t,...n){this.localConfig()&&("debug"===this.localConfig().log?console.log(`[AngularTagCloudModule ${t}]`,...n):"warn"===this.localConfig().log&&"warn"===t&&console.warn(`[AngularTagCloudModule ${t}]`,...n))}static{this.\u0275fac=function(n){return new(n||o)}}static{this.\u0275cmp=e.VBU({type:o,selectors:[["angular-tag-cloud"],["ng-tag-cloud"],["ngtc"]],hostBindings:function(n,i){1&n&&e.bIt("resize",function(u){return i.onResize(u)},e.tSv)},inputs:{data:[1,"data"],width:[1,"width"],height:[1,"height"],step:[1,"step"],overflow:[1,"overflow"],strict:[1,"strict"],zoomOnHover:[1,"zoomOnHover"],realignOnResize:[1,"realignOnResize"],randomizeAngle:[1,"randomizeAngle"],background:[1,"background"],font:[1,"font"],delay:[1,"delay"],config:[1,"config"],log:[1,"log"]},outputs:{clicked:"clicked",afterInit:"afterInit",afterChecked:"afterChecked"},decls:0,vars:0,template:function(n,i){},styles:['[_nghost-%COMP%]{font-family:Helvetica,Arial,sans-serif;font-size:10px;line-height:normal;color:#09f;overflow:hidden;position:relative;display:block}.tag-animation-delay[_ngcontent-%COMP%]{--tag-animation-delay: .5s;animation:_ngcontent-%COMP%_fadeIn .5s;opacity:0;animation-fill-mode:forwards;animation-delay:var(--tag-animation-delay)}span[_ngcontent-%COMP%]{padding:0}span.w10[_ngcontent-%COMP%]{font-size:550%}span.w9[_ngcontent-%COMP%]{font-size:500%}span.w8[_ngcontent-%COMP%]{font-size:450%}span.w7[_ngcontent-%COMP%]{font-size:400%}span.w6[_ngcontent-%COMP%]{font-size:350%}span.w5[_ngcontent-%COMP%]{font-size:300%}span.w4[_ngcontent-%COMP%]{font-size:250%}span.w3[_ngcontent-%COMP%]{font-size:200%}span.w2[_ngcontent-%COMP%]{font-size:150%}span.w1[_ngcontent-%COMP%]{font-size:100%}a[_ngcontent-%COMP%]:hover{color:#0df}a[_ngcontent-%COMP%]:hover, span.w10[_ngcontent-%COMP%], span.w9[_ngcontent-%COMP%], span.w8[_ngcontent-%COMP%]{color:#0cf}span.w7[_ngcontent-%COMP%]{color:#39d}span.w6[_ngcontent-%COMP%]{color:#90c5f0}span.w5[_ngcontent-%COMP%]{color:#90a0dd}span.w4[_ngcontent-%COMP%]{color:#90c5f0}span.w3[_ngcontent-%COMP%]{color:#a0ddff}span.w2[_ngcontent-%COMP%]{color:#9ce}span.w1[_ngcontent-%COMP%]{color:#aab5f0}.tooltip[_ngcontent-%COMP%] .tooltiptext[_ngcontent-%COMP%]{visibility:hidden;width:inherit;background-color:#555;color:#fff;text-align:center;border-radius:6px;padding:5px 10px;position:absolute;bottom:100%;left:0;opacity:0;transition:opacity .3s}.tooltip[_ngcontent-%COMP%] .tooltiptext[_ngcontent-%COMP%]:after{content:"";position:absolute;top:100%;left:50%;margin-left:-5px;border-width:5px;border-style:solid;border-color:#555 transparent transparent transparent}.tooltip[_ngcontent-%COMP%]:hover .tooltiptext[_ngcontent-%COMP%]{visibility:visible;opacity:1}@keyframes _ngcontent-%COMP%_fadeIn{0%{opacity:0}to{opacity:1}}'],changeDetection:0})}}return o})();var z=c(5970);const O=["wordCloudContainer"];function P(o,s){if(1&o){const t=e.RV6();e.j41(0,"angular-tag-cloud",3),e.bIt("clicked",function(i){l.eBV(t);const a=e.XpG();return l.Njj(a.handleClicked(i))}),e.k0s()}if(2&o){const t=e.XpG();e.Y8G("data",t.data())("zoomOnHover",t.zoomOnHoverOptions())("width",t.containerSize().width)("height",t.containerSize().height)("overflow",t.overflow())("realignOnResize",!0)}}let I=(()=>{class o{words=(0,r.hFB)();entries=(0,r.hFB)();caseSensitive=(0,r.hFB)(!1);clickable=(0,r.hFB)(!1);multiSelect=(0,r.hFB)(!1);highlightSelection=(0,r.hFB)(!1);minWeight=(0,r.hFB)(1);maxWeight=(0,r.hFB)(5);maxWords=(0,r.hFB)(50);colorScheme=(0,r.hFB)(["var(--cue-chart-text-color)","var(--cue-chart-text-color-select)"]);overflow=(0,r.hFB)(!1);clickedWord=(0,r.CGW)();selectionChanged=(0,r.CGW)();wordCloudContainer;containerSize=(0,l.vPA)({width:0,height:0});selection=(0,l.vPA)([]);data=(0,d.EW)(()=>{const t=this.words(),n=this.entries();return n?.length||t?.length?n?.length?n:t?.length?this._buildEntriesFromWords(t):[]:[]});ngAfterViewInit(){const t=new MutationObserver(()=>{this._applySelectionStyles()});this.wordCloudContainer?.nativeElement&&t.observe(this.wordCloudContainer.nativeElement,{childList:!0,subtree:!0})}handleResize(t){0!==t.newRect.height&&this.containerSize.set({width:t.newRect.width,height:t.newRect.height})}styleSelection=(0,l.QZP)(()=>{this.selection(),this._applySelectionStyles()});zoomOnHoverOptions=(0,d.EW)(()=>({scale:1.1,transitionTime:this.clickable()?1.2:0,delay:.05}));_buildEntriesFromWords(t){const n=new Map;for(const h of t){const v=this.caseSensitive()?h:h.toLowerCase();n.set(v,(n.get(v)||0)+1)}const i=Array.from(n.entries());if(0===i.length)return[];const a=i.map(([,h])=>h),u=Math.min(...a),p=Math.max(...a);return p===u?i.map(([h])=>({text:h,weight:this.maxWeight()})):i.sort(([,h],[,v])=>v-h).slice(0,this.maxWords()).map(([h,v])=>({text:h,weight:this.minWeight()+(v-u)*(this.maxWeight()-this.minWeight())/(p-u),color:this.colorScheme()[Math.floor(Math.random()*this.colorScheme().length)]}))}_applySelectionStyles(){if(!this.highlightSelection())return;const t=this.wordCloudContainer?.nativeElement;void 0!==t&&t.querySelectorAll("span").forEach(i=>{i.textContent&&(this.selection().includes(i.textContent.trim())?i.classList.add("selected"):i.classList.remove("selected"))})}handleClicked(t){this.clickable()&&(this.clickedWord.emit(t.text),this.highlightSelection()&&(this.selection().includes(t.text)?this.selection.update(n=>n.filter(i=>i!==t.text)):this.multiSelect()?this.selection.update(n=>[...n,t.text]):this.selection.update(()=>[t.text])),this.selectionChanged.emit(this.selection()))}static \u0275fac=function(n){return new(n||o)};static \u0275cmp=e.VBU({type:o,selectors:[["cue-word-cloud"]],viewQuery:function(n,i){if(1&n&&e.GBs(O,5),2&n){let a;e.mGM(a=e.lsd())&&(i.wordCloudContainer=a.first)}},inputs:{words:[1,"words"],entries:[1,"entries"],caseSensitive:[1,"caseSensitive"],clickable:[1,"clickable"],multiSelect:[1,"multiSelect"],highlightSelection:[1,"highlightSelection"],minWeight:[1,"minWeight"],maxWeight:[1,"maxWeight"],maxWords:[1,"maxWords"],colorScheme:[1,"colorScheme"],overflow:[1,"overflow"]},outputs:{clickedWord:"clickedWord",selectionChanged:"selectionChanged"},decls:3,vars:5,consts:[["wordCloudContainer",""],["cueResized","",1,"wordcloud-container",3,"resized"],[3,"data","zoomOnHover","width","height","overflow","realignOnResize"],[3,"clicked","data","zoomOnHover","width","height","overflow","realignOnResize"]],template:function(n,i){1&n&&(e.j41(0,"div",1,0),e.bIt("resized",function(u){return i.handleResize(u)}),e.nVh(2,P,1,6,"angular-tag-cloud",2),e.k0s()),2&n&&(e.xc7("display",i.data().length?"block":"none"),e.AVh("clickable",i.clickable()),e.R7$(2),e.vxM(i.data().length?2:-1))},dependencies:[E,z.C],styles:["[_nghost-%COMP%]{display:block;width:100%;height:100%;min-height:200px}.wordcloud-container[_ngcontent-%COMP%]{width:100%;height:100%} .wordcloud-container.clickable angular-tag-cloud span{cursor:pointer} .selected{text-decoration:underline}"],changeDetection:0})}return o})();var G=c(5971),j=c(5448),Y=c(3319),Z=c(4372),ue=c(6950),V=c(7598),B=c(2245),$=c(5381),H=c(7089),g=c(9352),K=c(2444),me=c(9695),pe=c(5745),he=c(8957);let W=(()=>{class o{value="";lineHeight="1.5";agInit(t){this.value=t.value||"",this.lineHeight=t.colDef&&t.colDef.cellRendererParams&&t.colDef.cellRendererParams.lineHeight||t.context&&t.context.lineHeight||"1.5"}refresh(t){return this.value=t.value||"",!0}static \u0275fac=function(n){return new(n||o)};static \u0275cmp=e.VBU({type:o,selectors:[["cue-multiline-cell-renderer"]],decls:2,vars:3,consts:[[1,"multiline-cell"]],template:function(n,i){1&n&&(e.rj2(0,"div",0),e.EFF(1),e.eux()),2&n&&(e.xc7("line-height",i.lineHeight),e.R7$(),e.JRh(i.value))},styles:[".multiline-cell[_ngcontent-%COMP%]{white-space:pre-wrap;word-wrap:break-word;padding:4px 2px;text-align:left}"]})}return o})(),ge=(()=>{class o{_value=(0,l.vPA)("");_options=(0,l.vPA)([]);_disabled=(0,l.vPA)(!1);_disabledTooltip=(0,l.vPA)("");_canChange=(0,l.vPA)(void 0);_optionValues=(0,d.EW)(()=>this._options().map(t=>t.value));_labelMap=(0,d.EW)(()=>Object.fromEntries(this._options().map(t=>[t.value,t.label])));_params;agInit(t){this._apply(t)}refresh(t){return this._apply(t),!0}onValueChange(t){if(void 0===t)return;const n=String(t),i=this._canChange();i&&!i(n)||(this._value.set(n),this._params.setValue?.(n))}_apply(t){this._params=t,this._value.set(t.value??"");const n="function"==typeof t.colDef?.cellRendererParams?t.colDef.cellRendererParams(t):t.colDef?.cellRendererParams??{};this._options.set(n.options??[]),this._disabled.set(n.disabled??!1),this._disabledTooltip.set(n.disabledTooltip??""),this._canChange.set(n.canChange??void 0)}static \u0275fac=function(n){return new(n||o)};static \u0275cmp=e.VBU({type:o,selectors:[["cue-select-cell-renderer"]],decls:1,vars:7,consts:[[3,"valueChange","options","labelMap","value","underline","menuPosition","disabled","cueTooltip"]],template:function(n,i){1&n&&(e.j41(0,"cue-select",0),e.bIt("valueChange",function(u){return i.onValueChange(u)}),e.k0s()),2&n&&e.Y8G("options",i._optionValues())("labelMap",i._labelMap())("value",i._value())("underline",!1)("menuPosition","bottomleft")("disabled",i._disabled())("cueTooltip",i._disabled()?i._disabledTooltip():"")},dependencies:[K.l,H.d],styles:["[_nghost-%COMP%]{display:block;width:100%;overflow:visible;--cue-input-value-color: currentColor}[_nghost-%COMP%] .select-trigger{font-size:var(--ag-font-size, inherit)}"],changeDetection:0})}return o})();var fe=c(7374),U=c.n(fe),_e=c(4955),ve=c.n(_e),Ce=c(5164),be=c.n(Ce);c(9785),c(2269),c(1409),c(4230),c(2494),c(9531),U().extend(ve()),U().extend(be());let Me=(()=>{class o{_transloco=(0,l.WQX)(g.JO);transform(t,n="dateTime"){if(!t)return"";const i=this._transloco.getActiveLang(),a=U()(t).locale(i);return"timeAgo"===n?a.fromNow():a.format("date"===n?"LL":"shortDate"===n?"L":"LLL")}static \u0275fac=function(n){return new(n||o)};static \u0275pipe=e.EJ8({name:"cueLocalDate",type:o,pure:!0})}return o})(),X=(()=>{class o{_value=(0,l.vPA)("");_format=(0,l.vPA)("dateTime");agInit(t){this._apply(t)}refresh(t){return this._apply(t),!0}_apply(t){this._value.set(t.value??""),this._format.set(t.colDef?.cellRendererParams?.dateFormat??"dateTime")}static \u0275fac=function(n){return new(n||o)};static \u0275cmp=e.VBU({type:o,selectors:[["cue-date-cell-renderer"]],decls:2,vars:4,template:function(n,i){1&n&&(e.EFF(0),e.nI1(1,"cueLocalDate")),2&n&&e.JRh(e.i5U(1,1,i._value(),i._format()))},dependencies:[Me],encapsulation:2,changeDetection:0})}return o})();const xe=["*"];function De(o,s){1&o&&e.SdG(0)}let ye=(()=>{class o{label=r.hFB.required();expanded=(0,r.geq)(!1);size=(0,r.hFB)("m");info=(0,r.hFB)("");expandToggled=(0,r.CGW)();toggle(){this.expanded.set(!this.expanded()),this.expandToggled.emit(this.expanded())}static \u0275fac=function(n){return new(n||o)};static \u0275cmp=e.VBU({type:o,selectors:[["cue-expansion-panel"]],inputs:{label:[1,"label"],expanded:[1,"expanded"],size:[1,"size"],info:[1,"info"]},outputs:{expanded:"expandedChange",expandToggled:"expandToggled"},ngContentSelectors:xe,decls:8,vars:9,consts:[["direction","column","gap","xs",2,"width","100%"],["justify","space-between","align","center",1,"expansion-header",3,"click"],[3,"size","info"],["variant","ghost",3,"size"],["icon","arrow-dropdown"]],template:function(n,i){1&n&&(e.NAR(),e.j41(0,"cue-flexcontainer",0)(1,"cue-flexcontainer",1),e.bIt("click",function(){return i.toggle()}),e.j41(2,"cue-typography",2),e.EFF(3),e.k0s(),e.j41(4,"cue-button",3)(5,"span"),e.nrm(6,"cue-button-icon",4),e.k0s()()(),e.nVh(7,De,1,0),e.k0s()),2&n&&(e.R7$(2),e.Y8G("size",i.size())("info",i.info()),e.R7$(),e.JRh(i.label()),e.R7$(),e.Y8G("size",i.size()),e.R7$(),e.AVh("rotate",!0)("rotate-180",i.expanded()),e.R7$(2),e.vxM(i.expanded()?7:-1))},dependencies:[B.Typography,$.n,G.$,Y.a],styles:[".expansion-header[_ngcontent-%COMP%]{cursor:pointer}.expansion-content[_ngcontent-%COMP%]{overflow:hidden;transition:max-height .3s cubic-bezier(.4,0,.2,1)}.rotate[_ngcontent-%COMP%]{transition:transform .3s cubic-bezier(.4,0,.2,1);display:inline-block}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}"],changeDetection:0})}return o})();function q(o){if(o)return o.replace(/([A-Z])/g," $1").replace(/^./,s=>s.toUpperCase())}var ee=c(3183),te=c(5902);const we=[{name:"ROUND",signature:"ROUND(?val, decimals)",description:"Round to N decimal places"},{name:"FLOOR",signature:"FLOOR(?val)",description:"Round down to nearest integer"},{name:"CEIL",signature:"CEIL(?val)",description:"Round up to nearest integer"},{name:"ABS",signature:"ABS(?val)",description:"Absolute value"},{name:"SQRT",signature:"SQRT(?val)",description:"Square root"},{name:"MIN",signature:"MIN(a, b)",description:"Smaller of two numbers"},{name:"MAX",signature:"MAX(a, b)",description:"Larger of two numbers"},{name:"CONCAT",signature:"CONCAT(a, b, ...)",description:"Concatenate strings"},{name:"PREFIX",signature:'PREFIX(?val, "text")',description:"Prepend text (skipped if value is empty)"},{name:"SUFFIX",signature:'SUFFIX(?val, "text")',description:"Append text (skipped if value is empty)"},{name:"TRIM",signature:"TRIM(?val)",description:"Remove leading/trailing whitespace"},{name:"UPPER",signature:"UPPER(?val)",description:"Convert to uppercase"},{name:"LOWER",signature:"LOWER(?val)",description:"Convert to lowercase"},{name:"LEN",signature:"LEN(?val)",description:"String length"},{name:"REPLACE",signature:'REPLACE(?val, "a", "b")',description:'Replace all occurrences of "a" with "b"'},{name:"NUM",signature:"NUM(?val)",description:"Parse as number"},{name:"STR",signature:"STR(?val)",description:"Convert to string"},{name:"IF",signature:"IF(condition, then, else)",description:"Conditional expression"},{name:"AFTER_LAST",signature:'AFTER_LAST(?val, "sep")',description:"Substring after the last occurrence of sep"},{name:"AFTER_FIRST",signature:'AFTER_FIRST(?val, "sep")',description:"Substring after the first occurrence of sep"},{name:"BEFORE_LAST",signature:'BEFORE_LAST(?val, "sep")',description:"Substring before the last occurrence of sep"},{name:"BEFORE_FIRST",signature:'BEFORE_FIRST(?val, "sep")',description:"Substring before the first occurrence of sep"},{name:"SEGMENT",signature:'SEGMENT(?val, "sep", n)',description:"Get the Nth segment (0-based) when splitting ?val by sep"}];function ie(o){const s=[];let t=0;for(;t<o.length;){if(/\s/.test(o[t])){t++;continue}if('"'===o[t]||"'"===o[t]){const i=o[t++];let a="";for(;t<o.length&&o[t]!==i;)a+="\\"===o[t]?o[++t]:o[t],t++;if(o[t]!==i)throw new Error("Unterminated string literal");t++,s.push({kind:"str",val:a});continue}const n=o.slice(t).match(/^(\d+\.?\d*|\.\d+)([eE][+-]?\d+)?/);if(n)s.push({kind:"num",val:n[0]}),t+=n[0].length;else{if("?"===o[t]){let i="?";for(t++;t<o.length&&/\w/.test(o[t]);)i+=o[t++];s.push({kind:"var",val:i});continue}if(/[A-Za-z_]/.test(o[t])){let i="";for(;t<o.length&&/\w/.test(o[t]);)i+=o[t++];s.push({kind:"ident",val:i.toUpperCase()});continue}if("**"!==o.slice(t,t+2)){if(!"+-*/%(),".includes(o[t]))throw new Error(`Unexpected character "${o[t]}" at position ${t}`);s.push({kind:"op",val:o[t++]})}else s.push({kind:"op",val:"**"}),t+=2}}return s.push({kind:"eof",val:""}),s}class oe{tokens;vars;pos=0;constructor(s,t){this.tokens=s,this.vars=t}parse(){const s=this.expr();if("eof"!==this.tokens[this.pos].kind)throw new Error(`Unexpected token "${this.tokens[this.pos].val}" after expression`);return s}peek(){return this.tokens[this.pos]}next(){return this.tokens[this.pos++]}eat(s){if(this.peek().val!==s)throw new Error(`Expected "${s}", got "${this.peek().val||"end of input"}"`);this.pos++}expr(){return this.additive()}additive(){let s=this.multiplicative();for(;"op"===this.peek().kind&&("+"===this.peek().val||"-"===this.peek().val);){const t=this.next().val,n=this.multiplicative();s="+"===t?"string"==typeof s||"string"==typeof n?String(s)+String(n):s+n:x(s)-x(n)}return s}multiplicative(){let s=this.power();for(;"op"===this.peek().kind&&("*"===this.peek().val||"/"===this.peek().val||"%"===this.peek().val);){const t=this.next().val,n=this.power();if("*"===t)s=x(s)*x(n);else if("/"===t){const i=x(n);s=0!==i?x(s)/i:0}else s=x(s)%x(n)}return s}power(){const s=this.unary();return"op"===this.peek().kind&&"**"===this.peek().val?(this.next(),Math.pow(x(s),x(this.power()))):s}unary(){return"op"===this.peek().kind&&"-"===this.peek().val?(this.next(),-x(this.primary())):this.primary()}primary(){const s=this.peek();if("num"===s.kind)return this.next(),Number(s.val);if("str"===s.kind)return this.next(),s.val;if("var"===s.kind)return this.next(),this.vars[s.val]??"";if("ident"===s.kind)return this.funcCall();if("op"===s.kind&&"("===s.val){this.next();const t=this.expr();return this.eat(")"),t}throw new Error(`Unexpected token: "${s.val}"`)}funcCall(){const s=this.next().val;this.eat("(");const t=[];if(")"!==this.peek().val)for(t.push(this.expr());","===this.peek().val;)this.next(),t.push(this.expr());return this.eat(")"),function Fe(o,s){const t=n=>s[n]??"";switch(o){case"ROUND":return Number(x(t(0)).toFixed(Math.max(0,x(t(1)))));case"FLOOR":return Math.floor(x(t(0)));case"CEIL":return Math.ceil(x(t(0)));case"ABS":return Math.abs(x(t(0)));case"SQRT":return Math.sqrt(x(t(0)));case"MIN":return Math.min(...s.map(x));case"MAX":return Math.max(...s.map(x));case"CONCAT":return s.map(n=>String(n)).join("");case"TRIM":return String(t(0)).trim();case"UPPER":return String(t(0)).toUpperCase();case"LOWER":return String(t(0)).toLowerCase();case"LEN":return String(t(0)).length;case"REPLACE":return String(t(0)).replaceAll(String(t(1)),String(t(2)));case"NUM":return x(t(0));case"STR":return String(t(0));case"PREFIX":return String(t(0))?String(t(1))+String(t(0)):String(t(0));case"SUFFIX":return String(t(0))?String(t(0))+String(t(1)):String(t(0));case"IF":return 0!==x(t(0))&&""!==t(0)&&"false"!==t(0)?t(1):t(2);case"AFTER_LAST":{const n=String(t(0)),i=String(t(1)),a=n.lastIndexOf(i);return-1===a?n:n.slice(a+i.length)}case"AFTER_FIRST":{const n=String(t(0)),i=String(t(1)),a=n.indexOf(i);return-1===a?n:n.slice(a+i.length)}case"BEFORE_LAST":{const n=String(t(0)),i=String(t(1)),a=n.lastIndexOf(i);return-1===a?n:n.slice(0,a)}case"BEFORE_FIRST":{const n=String(t(0)),i=String(t(1)),a=n.indexOf(i);return-1===a?n:n.slice(0,a)}case"SEGMENT":return String(t(0)).split(String(t(1)))[x(t(2))]??"";default:throw new Error(`Unknown function: "${o}"`)}}(s,t)}}function x(o){if("number"==typeof o)return o;const s=Number(o);return isNaN(s)?0:s}const Re=["*",[["","cueDisplayContent",""]],[["","cueDataContent",""]],[["","cueBehaviorContent",""]],[["","cueExtraContent",""]]],ke=["*","[cueDisplayContent]","[cueDataContent]","[cueBehaviorContent]","[cueExtraContent]"],Ne=(o,s)=>s.name;function Pe(o,s){if(1&o){const t=e.RV6();e.j41(0,"cue-input",7),e.nI1(1,"transloco"),e.bIt("valueChange",function(i){l.eBV(t);const a=e.XpG(2);return l.Njj(a.setLabel(i))}),e.k0s()}if(2&o){const t=e.XpG(2);e.Y8G("label",e.bMT(1,2,"components.agGridColumnSelect.labelLabel"))("value",t.label())}}function Ie(o,s){if(1&o){const t=e.RV6();e.j41(0,"cue-button",11),e.bIt("click",function(){const i=l.eBV(t).$implicit,a=e.XpG(3);return l.Njj(a.setTextAlign(i))}),e.nrm(1,"cue-button-icon",12),e.k0s()}if(2&o){const t=s.$implicit,n=e.XpG(3);e.Y8G("selected",n.textAlign()===t),e.R7$(),e.Y8G("icon",n.ALIGN_ICON[t])}}function Ge(o,s){if(1&o&&(e.j41(0,"cue-typography",8),e.EFF(1),e.nI1(2,"transloco"),e.k0s(),e.j41(3,"cue-flexcontainer",9),e.Z7z(4,Ie,2,2,"cue-button",10,e.Vm6),e.k0s()),2&o){const t=e.XpG(2);e.R7$(),e.SpI(" ",e.bMT(2,1,"components.agGridColumnSelect.labelTextAlign")," "),e.R7$(3),e.Dyx(t.alignOptions)}}function Ae(o,s){if(1&o){const t=e.RV6();e.j41(0,"cue-flexcontainer",6)(1,"cue-typography",13),e.nI1(2,"transloco"),e.EFF(3),e.nI1(4,"transloco"),e.k0s(),e.j41(5,"cue-input-switch",14),e.bIt("checkedChange",function(i){l.eBV(t);const a=e.XpG(2);return l.Njj(a.setMultiline(i))}),e.k0s()()}if(2&o){const t=e.XpG(2);e.R7$(),e.Y8G("cueTooltip",e.bMT(2,3,"components.agGridColumnSelect.tooltipMultiline")),e.R7$(2),e.JRh(e.bMT(4,5,"components.agGridColumnSelect.labelMultiline")),e.R7$(2),e.Y8G("checked",t.multiline())}}function Le(o,s){if(1&o&&(e.j41(0,"cue-expansion-panel",2),e.nI1(1,"transloco"),e.j41(2,"cue-flexcontainer",4),e.nVh(3,Pe,2,4,"cue-input",5),e.nVh(4,Ge,6,3),e.nVh(5,Ae,6,7,"cue-flexcontainer",6),e.SdG(6,1),e.k0s()()),2&o){const t=e.XpG();e.Y8G("label",e.bMT(1,5,"components.agGridColumnSelect.groupDisplay"))("expanded",!0),e.R7$(3),e.vxM(t.settings().allowSettingLabel?3:-1),e.R7$(),e.vxM(t.settings().allowSettingTextAlign?4:-1),e.R7$(),e.vxM(t.settings().allowSettingMultiline?5:-1)}}function Ee(o,s){if(1&o){const t=e.RV6();e.j41(0,"cue-select",16),e.nI1(1,"transloco"),e.bIt("valueChange",function(i){l.eBV(t);const a=e.XpG(2);return l.Njj(a.setFilterType(i))}),e.k0s()}if(2&o){const t=e.XpG(2);e.Y8G("label",e.bMT(1,4,"components.agGridColumnSelect.labelFilterType"))("value",t.filterType())("options",t.filterTypeOptions)("labelMap",t.filterTypeLabelMap())}}function Oe(o,s){if(1&o){const t=e.RV6();e.j41(0,"cue-input",7),e.nI1(1,"transloco"),e.bIt("valueChange",function(i){l.eBV(t);const a=e.XpG(2);return l.Njj(a.setEnumValues(i))}),e.k0s()}if(2&o){const t=e.XpG(2);e.Y8G("label",e.bMT(1,2,"components.agGridColumnSelect.labelEnumValues"))("value",t.enumValuesText())}}function ze(o,s){if(1&o){const t=e.RV6();e.j41(0,"cue-select",16),e.bIt("valueChange",function(i){l.eBV(t);const a=e.XpG(3);return l.Njj(a.setDateFormat(i))}),e.k0s()}if(2&o){const t=e.XpG(3);e.Y8G("label",t._labelDateFormat())("value",t.dateFormat())("options",t.dateFormatOptions)("labelMap",t.dateFormatLabelMap())}}function je(o,s){if(1&o){const t=e.RV6();e.j41(0,"cue-select",16),e.bIt("valueChange",function(i){l.eBV(t);const a=e.XpG(2);return l.Njj(a.setDataType(i))}),e.k0s(),e.nVh(1,ze,1,4,"cue-select",15)}if(2&o){const t=e.XpG(2);e.Y8G("label",t._labelDataType())("value",t.dataType())("options",t.dataTypeOptions)("labelMap",t.dataTypeLabelMap()),e.R7$(),e.vxM("date"===t.dataType()?1:-1)}}function Be(o,s){if(1&o&&(e.j41(0,"cue-expansion-panel",3),e.nI1(1,"transloco"),e.j41(2,"cue-flexcontainer",4),e.nVh(3,Ee,2,6,"cue-select",15),e.nVh(4,Oe,2,4,"cue-input",5),e.nVh(5,je,2,5),e.SdG(6,2),e.k0s()()),2&o){const t=e.XpG();e.Y8G("label",e.bMT(1,4,"components.agGridColumnSelect.groupData")),e.R7$(3),e.vxM(t.settings().allowSettingFilterType?3:-1),e.R7$(),e.vxM(t.settings().allowSettingEnumValues?4:-1),e.R7$(),e.vxM(t.settings().allowSettingDataType?5:-1)}}function Ye(o,s){if(1&o){const t=e.RV6();e.j41(0,"cue-expansion-panel",3),e.nI1(1,"transloco"),e.j41(2,"cue-flexcontainer",4)(3,"cue-flexcontainer",6)(4,"cue-typography",13),e.nI1(5,"transloco"),e.EFF(6),e.nI1(7,"transloco"),e.k0s(),e.j41(8,"cue-input-switch",14),e.bIt("checkedChange",function(i){l.eBV(t);const a=e.XpG();return l.Njj(a.setEditable(i))}),e.k0s()(),e.SdG(9,3),e.k0s()()}if(2&o){const t=e.XpG();e.Y8G("label",e.bMT(1,4,"components.agGridColumnSelect.groupBehavior")),e.R7$(4),e.Y8G("cueTooltip",e.bMT(5,6,"components.agGridColumnSelect.tooltipAllowEditing")),e.R7$(2),e.JRh(e.bMT(7,8,"components.agGridColumnSelect.labelEditable")),e.R7$(2),e.Y8G("checked",t.editable())}}function Ve(o,s){if(1&o&&(e.j41(0,"cue-expansion-panel",2)(1,"cue-flexcontainer",4),e.SdG(2,4),e.k0s()()),2&o){const t=e.XpG();e.Y8G("label",t.extraPanelLabel())("expanded",t.extraPanelExpanded())}}function $e(o,s){if(1&o&&(e.j41(0,"cue-typography",19),e.EFF(1),e.nI1(2,"transloco"),e.j41(3,"strong"),e.EFF(4),e.k0s()()),2&o){const t=e.XpG(2);e.R7$(),e.SpI(" ",e.bMT(2,2,"components.agGridColumnSelect.labelPostProcessPreview"),": "),e.R7$(3),e.JRh(t.postProcessFormulaPreview())}}function He(o,s){if(1&o&&(e.j41(0,"cue-flexcontainer",21)(1,"cue-typography",22),e.EFF(2),e.k0s(),e.j41(3,"cue-typography",23),e.EFF(4),e.k0s()()),2&o){const t=s.$implicit;e.R7$(2),e.JRh(t.signature),e.R7$(2),e.JRh(t.description)}}function We(o,s){if(1&o){const t=e.RV6();e.j41(0,"cue-expansion-panel",3),e.nI1(1,"transloco"),e.j41(2,"cue-flexcontainer",17)(3,"cue-input",18),e.nI1(4,"transloco"),e.nI1(5,"transloco"),e.nI1(6,"transloco"),e.bIt("valueChange",function(i){l.eBV(t);const a=e.XpG();return l.Njj(a.setPostProcessFormula(i))}),e.k0s(),e.nVh(7,$e,5,4,"cue-typography",19),e.j41(8,"cue-expansion-panel",20),e.nI1(9,"transloco"),e.j41(10,"cue-flexcontainer",17),e.Z7z(11,He,5,2,"cue-flexcontainer",21,Ne),e.k0s()()()()}if(2&o){const t=e.XpG();e.Y8G("label",e.bMT(1,9,"components.agGridColumnSelect.groupPostProcess")),e.R7$(3),e.Y8G("label",e.bMT(4,11,"components.agGridColumnSelect.labelPostProcessFormula"))("info",e.bMT(5,13,"components.agGridColumnSelect.tooltipPostProcessFormula"))("placeholder",e.bMT(6,15,"components.agGridColumnSelect.placeholderPostProcessFormula"))("value",t.postProcessFormula())("error",t.postProcessFormulaError()??void 0),e.R7$(4),e.vxM(t.postProcessFormulaPreview()?7:-1),e.R7$(),e.Y8G("label",e.bMT(9,17,"components.agGridColumnSelect.labelPostProcessFunctions"))("expanded",!1),e.R7$(3),e.Dyx(t.formulaFunctions)}}class se{allowEditing=!0;allowToggleEditable=!0;allowToggleHideOnHover=!0;allowSettingTextAlign=!0;allowSettingLabel=!0;allowSettingFilterType=!0;allowSettingMultiline=!0;allowSettingEnumValues=!0;allowSettingDataType=!1;allowSettingPostProcess=!0}const Xe={Text:te.U,Number:"agNumberColumnFilter",Date:"agDateColumnFilter",Select:ee.A,None:!1,Auto:!0},Ue={agTextColumnFilter:"Text",agNumberColumnFilter:"Number",agDateColumnFilter:"Date",false:"None",true:"Auto"};let Je=(()=>{class o{columnDef=r.geq.required();columnIndex=(0,r.hFB)();updateColumn=(0,r.CGW)();close=(0,r.CGW)();settings=r.hFB.required();extraPanelLabel=(0,r.hFB)();extraPanelExpanded=(0,r.hFB)(!0);minWidth=(0,r.hFB)("600px");alignOptions=["left","center","right"];filterTypeOptions=["Text","Number","Date","Select","None","Auto"];dateFormatOptions=["dateTime","date","shortDate","timeAgo"];dataTypeOptions=["text","number","date","boolean"];_labelDataType=(0,g.Xx)("components.agGridColumnSelect.labelDataType");_labelDateFormat=(0,g.Xx)("components.agGridColumnSelect.labelDateFormat");_dtText=(0,g.Xx)("components.agGridColumnSelect.dataTypeText");_dtNumber=(0,g.Xx)("components.agGridColumnSelect.dataTypeNumber");_dtDate=(0,g.Xx)("components.agGridColumnSelect.dataTypeDate");_dtBoolean=(0,g.Xx)("components.agGridColumnSelect.dataTypeBoolean");_dfDateTime=(0,g.Xx)("components.agGridColumnSelect.dateFormatDateTime");_dfDate=(0,g.Xx)("components.agGridColumnSelect.dateFormatDate");_dfShortDate=(0,g.Xx)("components.agGridColumnSelect.dateFormatShortDate");_dfTimeAgo=(0,g.Xx)("components.agGridColumnSelect.dateFormatTimeAgo");dataTypeLabelMap=(0,d.EW)(()=>({text:this._dtText(),number:this._dtNumber(),date:this._dtDate(),boolean:this._dtBoolean()}));dateFormatLabelMap=(0,d.EW)(()=>({dateTime:this._dfDateTime(),date:this._dfDate(),shortDate:this._dfShortDate(),timeAgo:this._dfTimeAgo()}));_labelText=(0,g.Xx)("components.agGridColumnSelect.filterTypeText");_labelNumber=(0,g.Xx)("components.agGridColumnSelect.filterTypeNumber");_labelDate=(0,g.Xx)("components.agGridColumnSelect.filterTypeDate");_labelSelect=(0,g.Xx)("components.agGridColumnSelect.filterTypeSelect");_labelNone=(0,g.Xx)("components.agGridColumnSelect.filterTypeNone");_labelAuto=(0,g.Xx)("components.agGridColumnSelect.filterTypeAuto");filterTypeLabelMap=(0,d.EW)(()=>({Text:this._labelText(),Number:this._labelNumber(),Date:this._labelDate(),Select:this._labelSelect(),None:this._labelNone(),Auto:this._labelAuto()}));ALIGN_ICON={center:"text-align-center",left:"text-align-left",right:"text-align-right"};dataType=(0,d.EW)(()=>{const t=this.columnDef().cellRenderer;return t===X||"DateCellRenderer"===t?"date":"text"});dateFormat=(0,d.EW)(()=>{const t=this.columnDef().cellRenderer;return t===X||"DateCellRenderer"===t?this.columnDef().cellRendererParams?.dateFormat??"dateTime":"dateTime"});editable=(0,d.EW)(()=>!0===this.columnDef().editable);multiline=(0,d.EW)(()=>{const t=this.columnDef().cellRenderer;return t===W||"MultilineCellRenderer"===t});_ALIGN_TO_FLEX={left:"flex-start",right:"flex-end",center:"center"};_FLEX_TO_ALIGN={"flex-start":"left","flex-end":"right",center:"center",left:"left",right:"right"};textAlign=(0,d.uu)(()=>{const t=this.columnDef().cellStyle;return t?.textAlign||this._FLEX_TO_ALIGN[t?.justifyContent]||"left"});filterType=(0,d.EW)(()=>{const t=this.columnDef().filter;return t===ee.A?"Select":t===te.U?"Text":Ue[t]||"Auto"});enumValuesText=(0,d.EW)(()=>(this.columnDef().cellRendererParams?.options??[]).map(n=>n.value).join(", "));label=(0,d.EW)(()=>this.columnDef().headerName||q(this.columnDef().field)||"Unknown");setEditable(t){const n=this.columnDef().cellRendererParams;this.updateColumn.emit(n?.options?.length?{editable:t,cellRendererParams:{...n,disabled:!t}}:{editable:t})}setMultiline(t){this.updateColumn.emit({cellRenderer:t?W:void 0,cellRendererParams:{lineHeight:"1.8"},autoHeight:!0})}setLabel(t){this.updateColumn.emit({headerName:t})}setTextAlign(t){const n=this.columnDef().cellStyle||{};this.updateColumn.emit({cellStyle:{...n,display:"flex",justifyContent:this._ALIGN_TO_FLEX[t]??t,textAlign:t},headerClass:`header-align-${t}`}),this.textAlign.set(t)}setFilterType(t){this.updateColumn.emit({filter:Xe[t]??!0})}setEnumValues(t){const n=t.split(",").map(i=>i.trim()).filter(i=>i.length>0);if(0===n.length)this.updateColumn.emit({cellRenderer:void 0,cellRendererParams:void 0});else{const i=n.map(a=>({value:a,label:a}));this.updateColumn.emit({cellRenderer:ge,cellRendererParams:{options:i,disabled:!this.editable()}})}}setDateFormat(t){t&&this.updateColumn.emit({cellRenderer:X,cellRendererParams:{dateFormat:t}})}setDataType(t){this.updateColumn.emit("date"===t?{cellRenderer:X,cellRendererParams:{dateFormat:"dateTime"}}:{cellRenderer:void 0,cellRendererParams:void 0})}formulaFunctions=we;postProcessFormula=(0,d.EW)(()=>function Se(o){return o&&"none"!==o.type?"round"===o.type?`ROUND(?val, ${o.decimals})`:"prefix"===o.type?`PREFIX(?val, "${o.value.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}")`:"suffix"===o.type?`SUFFIX(?val, "${o.value.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}")`:"formula"===o.type?o.expression:"":""}(this.columnDef().postProcess));postProcessFormulaError=(0,d.EW)(()=>function Te(o){if(!o||!o.trim())return null;try{const s=ie(o);return new oe(s,{"?val":"42"}).parse(),null}catch(s){return s?.message??"Invalid formula"}}(this.postProcessFormula()));postProcessFormulaPreview=(0,d.EW)(()=>{const t=this.postProcessFormula();return!t||this.postProcessFormulaError()?"":function ne(o,s){if(!o||!o.trim())return s;try{const t=ie(o),n=new oe(t,{"?val":s}).parse();return null==n?"":String(n)}catch{return s}}(t,"42")});setPostProcessFormula(t){const n=t.trim();this.updateColumn.emit({postProcess:n?{type:"formula",expression:n}:void 0})}static \u0275fac=function(n){return new(n||o)};static \u0275cmp=e.VBU({type:o,selectors:[["cue-table-column-settings-modal"]],inputs:{columnDef:[1,"columnDef"],columnIndex:[1,"columnIndex"],settings:[1,"settings"],extraPanelLabel:[1,"extraPanelLabel"],extraPanelExpanded:[1,"extraPanelExpanded"],minWidth:[1,"minWidth"]},outputs:{columnDef:"columnDefChange",updateColumn:"updateColumn",close:"close"},ngContentSelectors:ke,decls:9,vars:9,consts:[[3,"close","label","minWidth"],["direction","column","gap","s",2,"overflow-y","auto","max-height","70vh","min-height","0","width","100%"],[3,"label","expanded"],[3,"label"],["direction","column"],[3,"label","value"],["direction","row","gap","l","justify","space-between","align","center"],[3,"valueChange","label","value"],["size","s"],["direction","row"],["variant","tertiary","size","s",3,"selected"],["variant","tertiary","size","s",3,"click","selected"],[3,"icon"],["size","m",3,"cueTooltip"],["size","m",3,"checkedChange","checked"],[3,"label","value","options","labelMap"],[3,"valueChange","label","value","options","labelMap"],["direction","column","gap","xs"],[3,"valueChange","label","info","placeholder","value","error"],["size","xs",2,"opacity","0.65"],["size","s",3,"label","expanded"],["direction","row","gap","s","align","start"],["size","xs",2,"font-family","monospace","min-width","210px","flex-shrink","0"],["size","xs",2,"opacity","0.7"]],template:function(n,i){1&n&&(e.NAR(Re),e.j41(0,"cue-modal",0),e.nI1(1,"transloco"),e.bIt("close",function(){return i.close.emit()}),e.j41(2,"cue-flexcontainer",1),e.nVh(3,Le,7,7,"cue-expansion-panel",2),e.nVh(4,Be,7,6,"cue-expansion-panel",3),e.nVh(5,Ye,10,10,"cue-expansion-panel",3),e.nVh(6,Ve,3,2,"cue-expansion-panel",2),e.nVh(7,We,13,19,"cue-expansion-panel",3),e.SdG(8),e.k0s()()),2&n&&(e.Y8G("label",e.bMT(1,7,"components.agGridColumnSelect.titleColumnSettings"))("minWidth",i.minWidth()),e.R7$(3),e.vxM(i.settings().allowSettingLabel||i.settings().allowSettingTextAlign||i.settings().allowSettingMultiline?3:-1),e.R7$(),e.vxM(i.settings().allowSettingFilterType||i.settings().allowSettingEnumValues||i.settings().allowSettingDataType?4:-1),e.R7$(),e.vxM(i.settings().allowToggleEditable?5:-1),e.R7$(),e.vxM(i.extraPanelLabel()?6:-1),e.R7$(),e.vxM(i.settings().allowSettingPostProcess?7:-1))},dependencies:[pe.a,$.n,B.Typography,K.l,me.d,H.d,he.p,G.$,Y.a,ye,g.Kj],encapsulation:2,changeDetection:0})}return o})();var ae=c(9769);const le=o=>[o],Qe=(o,s)=>({$implicit:o,index:s});function Ze(o,s){if(1&o){const t=e.RV6();e.j41(0,"cue-table-column-settings-modal",9),e.bIt("updateColumn",function(i){const a=l.eBV(t),u=e.XpG();return l.Njj(u.updateColumnDef(a.index,i))})("close",function(){l.eBV(t);const i=e.XpG();return l.Njj(i.handleModalClose())}),e.k0s()}if(2&o){const t=s,n=e.XpG();e.Y8G("columnDef",t.col)("columnIndex",t.index)("settings",n.settings())}}function Ke(o,s){1&o&&e.eu8(0)}function qe(o,s){if(1&o&&e.DNE(0,Ke,1,0,"ng-container",13),2&o){const t=e.XpG(),n=t.$implicit,i=t.$index;e.Y8G("ngTemplateOutlet",s.templateRef)("ngTemplateOutletContext",e.l_i(2,Qe,n,i))}}function et(o,s){if(1&o){const t=e.RV6();e.j41(0,"cue-button",14),e.nI1(1,"transloco"),e.bIt("click",function(){l.eBV(t);const i=e.XpG(),a=i.$implicit,u=i.$index,p=e.XpG();return l.Njj(p.showColumnSettings(a,u))}),e.nrm(2,"cue-button-icon",15),e.k0s()}2&o&&e.Y8G("cueTooltip",e.bMT(1,1,"components.agGridColumnSelect.tooltipSettings"))}function tt(o,s){if(1&o&&(e.j41(0,"div",8)(1,"cue-flexcontainer",10)(2,"cue-typography"),e.EFF(3),e.k0s(),e.nrm(4,"span",11),e.nVh(5,qe,1,5,"ng-container"),e.nVh(6,et,3,3,"cue-button",12),e.k0s()()),2&o){let t;const n=s.$implicit,i=e.XpG();e.R7$(3),e.JRh(i.getLabel(n)),e.R7$(2),e.vxM((t=i.columnItemTpl())?5:-1,t),e.R7$(),e.vxM(i.settings().allowEditing?6:-1)}}function nt(o,s){1&o&&e.eu8(0)}function it(o,s){1&o&&e.DNE(0,nt,1,0,"ng-container",16),2&o&&e.Y8G("ngTemplateOutlet",s.templateRef)}function ot(o,s){if(1&o&&(e.j41(0,"div",8)(1,"cue-typography"),e.EFF(2),e.k0s()()),2&o){const t=s.$implicit,n=e.XpG();e.R7$(2),e.JRh(n.getLabel(t))}}let re=(()=>{class o{templateRef=(0,l.WQX)(e.C4Q);static ngTemplateContextGuard(t,n){return!0}static \u0275fac=function(n){return new(n||o)};static \u0275dir=e.FsC({type:o,selectors:[["","cueColumnItem",""]]})}return o})(),ce=(()=>{class o{templateRef=(0,l.WQX)(e.C4Q);static \u0275fac=function(n){return new(n||o)};static \u0275dir=e.FsC({type:o,selectors:[["","cueColumnListFooter",""]]})}return o})(),st=(()=>{class o{columnDefs=r.geq.required();columnDefsGross=(0,r.geq)([]);settings=(0,r.hFB)(new se);shown=(0,r.CGW)();columnItemTpl=(0,r.sbv)(re);columnListFooterTpl=(0,r.sbv)(ce);shownColumns=(0,l.vPA)([]);hiddenColumns=(0,l.vPA)([]);displayColumnSettings=(0,l.vPA)(void 0);onNoColumnDefsGross=(0,l.QZP)(()=>{(!this.columnDefsGross()||0===this.columnDefsGross().length)&&this.columnDefsGross.set(this.columnDefs())});onColumnDefs=(0,l.QZP)(()=>{const t=this.columnDefs().map(i=>i.field),n=this.columnDefsGross().filter(i=>!t.includes(i.field));this.shownColumns.update(()=>[...this.columnDefs()]),this.hiddenColumns.update(()=>[...n])});drop(t){t.previousContainer===t.container?(0,V.HD)(t.container.data,t.previousIndex,t.currentIndex):(0,V.eg)(t.previousContainer.data,t.container.data,t.previousIndex,t.currentIndex);const n=this.shownColumns();this.columnDefs.update(()=>[...n]),this.shown.emit(n)}showColumnSettings(t,n){this.displayColumnSettings.set({col:t,index:n})}updateColumnDef(t,n){const i=this.columnDefs().map((a,u)=>u===t?{...a,...n}:a);this.columnDefs.set(i),this.shown.emit(i),this.shownColumns.set(i)}getLabel(t){return t.headerName||q(t.field)||"Unknown"}handleModalClose(){this.displayColumnSettings.set(void 0)}static \u0275fac=function(n){return new(n||o)};static \u0275cmp=e.VBU({type:o,selectors:[["cue-ag-grid-column-select"]],contentQueries:function(n,i,a){1&n&&e.C6U(a,i.columnItemTpl,re,5)(a,i.columnListFooterTpl,ce,5),2&n&&e.NyB(2)},inputs:{columnDefs:[1,"columnDefs"],columnDefsGross:[1,"columnDefsGross"],settings:[1,"settings"]},outputs:{columnDefs:"columnDefsChange",columnDefsGross:"columnDefsGrossChange",shown:"shown"},decls:22,vars:19,consts:[["todoList","cdkDropList"],["doneList","cdkDropList"],[3,"columnDef","columnIndex","settings"],["size","xs","color","muted",2,"display","block","margin-bottom","8px"],["direction","row",2,"align-items","stretch"],["direction","column",1,"panel"],["size","l"],["cdkDropList","",1,"list",3,"cdkDropListDropped","cdkDropListData","cdkDropListConnectedTo"],["cdkDrag","",1,"box","draggable"],[3,"updateColumn","close","columnDef","columnIndex","settings"],["front","","justify","space-between","align","center",2,"width","100%"],[2,"display","flex","flex","1"],["variant","tertiary","size","s",3,"cueTooltip"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["variant","tertiary","size","s",3,"click","cueTooltip"],["icon","settings"],[4,"ngTemplateOutlet"]],template:function(n,i){if(1&n&&(e.nVh(0,Ze,1,3,"cue-table-column-settings-modal",2),e.j41(1,"cue-typography",3),e.EFF(2),e.nI1(3,"transloco"),e.k0s(),e.j41(4,"cue-flexcontainer",4)(5,"cue-flexcontainer",5)(6,"cue-typography",6),e.EFF(7),e.nI1(8,"transloco"),e.k0s(),e.j41(9,"div",7,0),e.bIt("cdkDropListDropped",function(u){return i.drop(u)}),e.Z7z(11,tt,7,3,"div",8,e.Vm6),e.nVh(13,it,1,1,"ng-container"),e.k0s()(),e.j41(14,"cue-flexcontainer",5)(15,"cue-typography",6),e.EFF(16),e.nI1(17,"transloco"),e.k0s(),e.j41(18,"div",7,1),e.bIt("cdkDropListDropped",function(u){return i.drop(u)}),e.Z7z(20,ot,3,1,"div",8,e.Vm6),e.k0s()()()),2&n){let a,u;const p=e.sdS(10),f=e.sdS(19);e.vxM((a=i.displayColumnSettings())?0:-1,a),e.R7$(2),e.JRh(e.bMT(3,9,"components.agGridColumnSelect.dragHint")),e.R7$(5),e.JRh(e.bMT(8,11,"components.agGridColumnSelect.titleShown"));const h=i.shownColumns();e.R7$(2),e.Y8G("cdkDropListData",h)("cdkDropListConnectedTo",e.eq3(15,le,f)),e.R7$(2),e.Dyx(h),e.R7$(2),e.vxM((u=i.columnListFooterTpl())?13:-1,u),e.R7$(3),e.JRh(e.bMT(17,13,"components.agGridColumnSelect.titleHidden"));const v=i.hiddenColumns();e.R7$(2),e.Y8G("cdkDropListData",v)("cdkDropListConnectedTo",e.eq3(17,le,p)),e.R7$(2),e.Dyx(v)}},dependencies:[V.O7,V.T1,B.Typography,$.n,G.$,Y.a,H.d,Je,ae.T3,g.Kj],styles:[".panel[_ngcontent-%COMP%]{width:50%;display:flex;flex-direction:column}.list[_ngcontent-%COMP%]{border:solid 1px #ccc;min-height:60px;flex:1;background:#fff;border-radius:4px;overflow:hidden;display:block}.box[_ngcontent-%COMP%]{padding:20px 10px;border-bottom:solid 1px #ccc;color:#000000de;display:flex;flex-direction:row;align-items:center;justify-content:space-between;box-sizing:border-box;background:#fff;font-size:14px}.draggable[_ngcontent-%COMP%]{cursor:move}.cdk-drag-preview[_ngcontent-%COMP%]{box-sizing:border-box;border-radius:4px;box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f}.cdk-drag-placeholder[_ngcontent-%COMP%]{opacity:0}.cdk-drag-animating[_ngcontent-%COMP%]{transition:transform .25s cubic-bezier(0,0,.2,1)}.box[_ngcontent-%COMP%]:last-child{border:none}.list.cdk-drop-list-dragging[_ngcontent-%COMP%] .box[_ngcontent-%COMP%]:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}"],changeDetection:0})}return o})();function at(o,s){if(1&o&&(l.qSk(),e.j41(0,"svg",0),e.nrm(1,"path",3)(2,"path",4),e.k0s()),2&o){const t=e.XpG();e.R7$(),e.BMQ("fill",t.colorDark()),e.R7$(),e.BMQ("fill",t.color())}}function lt(o,s){if(1&o&&(l.qSk(),e.j41(0,"svg",1),e.nrm(1,"path",5)(2,"path",6)(3,"path",7),e.k0s()),2&o){const t=e.XpG();e.R7$(2),e.BMQ("fill",t.color())}}const F_blue="#175EBB",rt={".dwg":F_blue,".dxf":F_blue,".doc":F_blue,".docx":F_blue,".ifc":"#9F388D",".pdf":"#E03833",".ppt":F_blue,".pptx":F_blue,".csv":"#0b7741",".xls":"#0b7741",".xlsx":"#0b7741",folder:"#9D9998"};let ct=(()=>{class o{suffix=r.hFB.required();size=(0,r.hFB)("m");color=(0,d.EW)(()=>rt[this.suffix()]??"#9D9998");label=(0,d.EW)(()=>this.suffix().startsWith(".")?this.suffix().toUpperCase().replace(/^\./,""):"");className=(0,d.EW)(()=>`size-${this.size()}`);colorDark=(0,d.EW)(()=>{const t=this.color(),n=parseInt(t.slice(1),16),a=n>>8&255,u=255&n;return`#${(Math.floor(.8*(n>>16&255))<<16|Math.floor(.8*a)<<8|Math.floor(.8*u)).toString(16).padStart(6,"0")}`});static \u0275fac=function(n){return new(n||o)};static \u0275cmp=e.VBU({type:o,selectors:[["cue-file-icon"]],hostVars:2,hostBindings:function(n,i){2&n&&e.HbH(i.className())},inputs:{suffix:[1,"suffix"],size:[1,"size"]},decls:4,vars:2,consts:[["xmlns","http://www.w3.org/2000/svg","width","100%","height","100%","viewBox","0 0 48 48"],["xmlns","http://www.w3.org/2000/svg","viewBox","0 0 24 30"],["size","xs","align","center","weight","semibold"],["d","M40 12H22l-4-4H8c-2.2 0-4 1.8-4 4v8h40v-4c0-2.2-1.8-4-4-4"],["d","M40 12H8c-2.2 0-4 1.8-4 4v20c0 2.2 1.8 4 4 4h32c2.2 0 4-1.8 4-4V16c0-2.2-1.8-4-4-4"],["fill","var(--cue-border-color)","d","M16.2.5H4.1C2.1.5.5 2.1.5 4.1v22.3c0 1.7 1.4 3.1 3.1 3.1h16.8c1.7 0 3.1-1.4 3.1-3.1V7.8h-.1c0-.1-7-7.1-7-7.1h-.1l-.1-.2Z"],["d","M4.1 1C2.4 1 1 2.4 1 4.1v22.3C1 27.8 2.2 29 3.6 29h16.8c1.4 0 2.6-1.2 2.6-2.6V8l-7-7H4.1Z"],["fill","#fff","d","M16 6c0 1.1.9 2 2 2h5l-7-7v5Z","opacity",".3"]],template:function(n,i){1&n&&(e.nVh(0,at,3,2,":svg:svg",0)(1,lt,4,1,":svg:svg",1),e.j41(2,"cue-typography",2),e.EFF(3),e.k0s()),2&n&&(e.vxM("folder"===i.suffix()?0:1),e.R7$(3),e.JRh(i.label()))},dependencies:[B.Typography],styles:["[_nghost-%COMP%]{display:block;position:relative;aspect-ratio:30 / 24;width:var(--cue-dim-elem-m)}.size-xs[_nghost-%COMP%]{width:var(--cue-dim-elem-xs)}.size-s[_nghost-%COMP%]{width:var(--cue-dim-elem-s)}[_nghost-%COMP%] svg[_ngcontent-%COMP%]{display:block;width:100%;height:auto}[_nghost-%COMP%] cue-typography[_ngcontent-%COMP%]{color:#fff;text-transform:uppercase;position:absolute;left:50%;bottom:24%;transform:translate(-50%)}"]})}return o})(),dt=(()=>{class o{suffix=(0,l.vPA)("");iconSize=(0,l.vPA)("xs");agInit(t){this._apply(t)}refresh(t){return this._apply(t),!0}_apply(t){this.suffix.set(t.value||"folder"),this.iconSize.set({xs:"xs",s:"xs",m:"xs",l:"s",xl:"m"}[t.colDef?.cellRendererParams?.iconSize??t.iconSize??"xs"]??"xs")}static \u0275fac=function(n){return new(n||o)};static \u0275cmp=e.VBU({type:o,selectors:[["cue-file-icon-cell-renderer"]],decls:1,vars:2,consts:[[3,"suffix","size"]],template:function(n,i){1&n&&e.nrm(0,"cue-file-icon",0),2&n&&e.Y8G("suffix",i.suffix())("size",i.iconSize())},dependencies:[ct],styles:["[_nghost-%COMP%]{display:flex;align-items:center;justify-content:center;width:100%;height:100%}"],changeDetection:0})}return o})();var ut=c(6117),mt=c(29),pt=c(1951),ht=c(1493),gt=c(5187),ft=c(356),_t=c(6279);let vt=(()=>{class o{cueFlip=(0,r.geq)(!1);get flipped(){return this.cueFlip()}static \u0275fac=function(n){return new(n||o)};static \u0275dir=e.FsC({type:o,selectors:[["","cueFlip",""]],hostVars:2,hostBindings:function(n,i){2&n&&e.AVh("flipped",i.flipped)},inputs:{cueFlip:[1,"cueFlip"]},outputs:{cueFlip:"cueFlipChange"}})}return o})();const Ct=(o,s)=>s.id;function bt(o,s){if(1&o){const t=e.RV6();e.j41(0,"li",9),e.bIt("click",function(){const i=l.eBV(t).$implicit,a=e.XpG(3);return l.Njj(a.handleSimpleRowClick(i))}),e.j41(1,"cue-typography",10),e.EFF(2),e.k0s(),e.j41(3,"cue-typography",11),e.EFF(4),e.k0s()()}if(2&o){const t=s.$implicit,n=e.XpG(3);e.AVh("active",n.selectedSimpleDocumentId()===t.id),e.R7$(),e.Y8G("noWrap",!0)("title",t.name),e.R7$(),e.SpI(" ",t.name," "),e.R7$(2),e.SpI(" ",(t.suffix||"").replace(".","").toUpperCase()," ")}}function Mt(o,s){if(1&o&&(e.j41(0,"ul",5),e.Z7z(1,bt,5,6,"li",8,Ct),e.k0s()),2&o){const t=e.XpG(2);e.R7$(),e.Dyx(t.simpleDocumentsInt())}}function xt(o,s){if(1&o&&(e.j41(0,"cue-flexcontainer",6)(1,"cue-typography",12),e.EFF(2),e.k0s()()),2&o){const t=e.XpG(2);e.R7$(2),e.SpI(" ",0===t.documentRefs().length&&0===t.documents().length&&t.handlers()?"No documents":t.infoLoading()," ")}}function Dt(o,s){if(1&o){const t=e.RV6();e.j41(0,"cue-flexcontainer",7)(1,"cue-typography",13),e.EFF(2),e.k0s(),e.j41(3,"cue-flexcontainer",14)(4,"cue-button",15),e.bIt("click",function(){l.eBV(t);const i=e.XpG(2);return l.Njj(i.previousSimplePage())}),e.nrm(5,"cue-button-icon",16),e.k0s(),e.j41(6,"cue-button",15),e.bIt("click",function(){l.eBV(t);const i=e.XpG(2);return l.Njj(i.nextSimplePage())}),e.nrm(7,"cue-button-icon",17),e.k0s()()()}if(2&o){const t=e.XpG(2);e.R7$(2),e.E5c(" ",t.simpleDisplayStart(),"-",t.simpleDisplayEnd()," / ",t.documentsInt().length," "),e.R7$(2),e.Y8G("disabled",!t.simpleHasPreviousPage()),e.R7$(2),e.Y8G("disabled",!t.simpleHasNextPage())}}function yt(o,s){if(1&o&&(e.j41(0,"div",3),e.nVh(1,Mt,3,0,"ul",5)(2,xt,3,1,"cue-flexcontainer",6),e.nVh(3,Dt,8,5,"cue-flexcontainer",7),e.k0s()),2&o){const t=e.XpG();e.R7$(),e.vxM(t.simpleDocumentsInt().length>0?1:2),e.R7$(2),e.vxM(t.documentsInt().length>0?3:-1)}}function St(o,s){if(1&o&&e.nrm(0,"cue-svg-icon",34),2&o){const t=e.XpG().$implicit;e.Y8G("name",t.icon)}}function wt(o,s){if(1&o){const t=e.RV6();e.j41(0,"cue-menu-item",33),e.bIt("click",function(){const i=l.eBV(t).$implicit;return l.Njj(null==i?null:i.action())}),e.nVh(1,St,1,1,"cue-svg-icon",34),e.EFF(2),e.k0s()}if(2&o){const t=s.$implicit;e.R7$(),e.vxM(t.icon?1:-1),e.R7$(),e.SpI(" ",t.label)}}function Tt(o,s){if(1&o){const t=e.RV6();e.j41(0,"cue-flexcontainer",24)(1,"cue-menu",25)(2,"cue-button",26,2),e.nrm(4,"cue-button-icon",27),e.k0s(),e.j41(5,"cue-menu-wrap",28),e.Z7z(6,wt,3,2,"cue-menu-item",null,e.Vm6),e.k0s()(),e.j41(8,"cue-button",29),e.nI1(9,"transloco"),e.bIt("click",function(){l.eBV(t);const i=e.XpG(2);return l.Njj(i.flipped.set(!0))}),e.nrm(10,"cue-button-icon",30),e.k0s()(),e.j41(11,"div",31)(12,"cue-ag-grid",32),e.bIt("gridApiReady",function(i){l.eBV(t);const a=e.XpG(2);return l.Njj(a.onGridReady(i))})("selectedRows",function(i){l.eBV(t);const a=e.XpG(2);return l.Njj(a.clickedDocument.emit(i[0]))}),e.k0s()()}if(2&o){const t=e.XpG(2);e.R7$(6),e.Dyx(t.tableMenu()),e.R7$(2),e.Y8G("cueTooltip",e.bMT(9,9,"components.documentList.tooltipColumnSettings")),e.R7$(4),e.AVh("hidden",t.tableHidden()),e.Y8G("paginationPageSize",t.pageSize())("rowSelection",t.rowSelection)("rowData",t.documentsInt())("columnDefs",t.columnDefs())("overlaySettings",t.overlaySettings())("overlayActions",t.overlayActions())}}function Ft(o,s){if(1&o){const t=e.RV6();e.j41(0,"cue-flexcontainer",41),e.bIt("click",function(){l.eBV(t);const i=e.XpG(3);return l.Njj(i.applyTagFilter())}),e.j41(1,"cue-button",42)(2,"cue-button-label"),e.EFF(3,"Apply"),e.k0s()()()}}function Rt(o,s){if(1&o){const t=e.RV6();e.j41(0,"cue-flexcontainer",24)(1,"cue-button",35),e.bIt("click",function(){l.eBV(t);const i=e.XpG(2);return l.Njj(i.showFront())}),e.nrm(2,"cue-button-icon",36),e.k0s()(),e.j41(3,"cue-flexcontainer",37)(4,"cue-word-cloud",38),e.bIt("selectionChanged",function(i){l.eBV(t);const a=e.XpG(2);return l.Njj(a.tagSelection.set(i))}),e.k0s(),e.nVh(5,Ft,4,0,"cue-flexcontainer",39),e.k0s(),e.j41(6,"cue-ag-grid-column-select",40),e.mxI("columnDefsChange",function(i){l.eBV(t);const a=e.XpG(2);return e.DH7(a.columnDefs,i)||(a.columnDefs=i),l.Njj(i)}),e.k0s()}if(2&o){const t=e.XpG(2);e.R7$(3),e.AVh("hidden",!t.showTagFilterCloud()),e.R7$(),e.Y8G("words",t.tags())("clickable",!0)("overflow",!0)("multiSelect",!0)("highlightSelection",!0),e.R7$(),e.vxM(t.filterToBeApplied()?5:-1),e.R7$(),e.AVh("hidden",t.showTagFilterCloud()),e.Y8G("settings",t.columnSelectSettings),e.R50("columnDefs",t.columnDefs),e.Y8G("columnDefsGross",t.columnDefsGross())}}function kt(o,s){if(1&o&&(e.j41(0,"cue-card",20),e.eu8(1,43),e.k0s()),2&o){e.XpG();const t=e.sdS(3),n=e.XpG();e.Y8G("variant",n._cardVariant()),e.R7$(),e.Y8G("ngTemplateOutlet",t)}}function Nt(o,s){if(1&o&&(e.j41(0,"div",21),e.eu8(1,43),e.k0s()),2&o){e.XpG();const t=e.sdS(3);e.R7$(),e.Y8G("ngTemplateOutlet",t)}}function Pt(o,s){if(1&o&&(e.j41(0,"cue-card",22),e.eu8(1,43),e.k0s()),2&o){e.XpG();const t=e.sdS(5),n=e.XpG();e.Y8G("variant",n._cardVariant()),e.R7$(),e.Y8G("ngTemplateOutlet",t)}}function It(o,s){if(1&o&&(e.j41(0,"div",23),e.eu8(1,43),e.k0s()),2&o){e.XpG();const t=e.sdS(5);e.R7$(),e.Y8G("ngTemplateOutlet",t)}}function Gt(o,s){if(1&o){const t=e.RV6();e.j41(0,"div",18),e.mxI("cueFlipChange",function(i){l.eBV(t);const a=e.XpG();return e.DH7(a.flipped,i)||(a.flipped=i),l.Njj(i)}),e.j41(1,"div",19),e.DNE(2,Tt,13,11,"ng-template",null,0,e.C5r)(4,Rt,7,13,"ng-template",null,1,e.C5r),e.nVh(6,kt,2,2,"cue-card",20)(7,Nt,2,1,"div",21),e.nVh(8,Pt,2,2,"cue-card",22)(9,It,2,1,"div",23),e.k0s()()}if(2&o){const t=e.XpG();e.R50("cueFlip",t.flipped),e.R7$(6),e.vxM("none"!==t.variant()?6:7),e.R7$(2),e.vxM("none"!==t.variant()?8:9)}}let At=(()=>{class o{documents=(0,r.hFB)([]);availableContentCategories=(0,r.hFB)(void 0);detailedView=(0,r.hFB)(!1);simple=(0,r.hFB)(!1);pageSize=(0,r.hFB)(10);prefetchPages=(0,r.hFB)(3);privileges=(0,r.hFB)();showOpenInDocumentViewerAction=(0,r.hFB)(!0);showOpenInFileManagerAction=(0,r.hFB)(!0);customOverlayActions=(0,r.hFB)([]);variant=(0,r.hFB)("default");_cardVariant=(0,d.EW)(()=>this.variant());documentRefs=(0,r.hFB)([]);handlers=(0,r.hFB)(void 0);documentData=(0,r.hFB)({});clickedDocument=(0,r.CGW)();clickedDownloadDocument=(0,r.CGW)();clickedOpenInDir=(0,r.CGW)();clickedOpen=(0,r.CGW)();flipped=(0,l.vPA)(!1);simplePageIndex=(0,l.vPA)(0);selectedSimpleDocumentId=(0,l.vPA)(null);_simpleBufferedUntilIndex=(0,l.vPA)(0);_tableBufferedUntilIndex=(0,l.vPA)(0);_lastDocumentRefsKey="";_gridApi=null;_requestedIds=new Set;_isSorted=!1;_viewportCheckTimerId=null;_lazyMode=(0,d.EW)(()=>this.documentRefs().length>0);_leafContentCategoryIris=(0,d.EW)(()=>{const t=this.availableContentCategories();if(!t)return null;const n=new Set(t.map(i=>i.parent).filter(i=>!!i));return new Set(t.filter(i=>!n.has(i.iri)).map(i=>i.iri))});labelDownload=(0,g.Xx)("components.documentList.labelDownload");labelName=(0,g.Xx)("components.documentList.labelName");labelOpenInFileManager=(0,g.Xx)("components.documentList.labelOpenInFileManager");labelOpenInDocumentViewer=(0,g.Xx)("components.documentList.labelOpenInDocumentViewer");labelSubject=(0,g.Xx)("components.documentList.labelSubject");labelSummary=(0,g.Xx)("components.documentList.labelSummary");labelPages=(0,g.Xx)("components.documentList.labelPages");labelSize=(0,g.Xx)("components.documentList.labelSize");labelCategories=(0,g.Xx)("components.documentList.labelCategories");labelType=(0,g.Xx)("components.documentList.labelType");buttonShowCloudFilter=(0,g.Xx)("components.documentList.buttonShowCloudFilter");buttonHideCloudFilter=(0,g.Xx)("components.documentList.buttonHideCloudFilter");buttonDownloadCSV=(0,g.Xx)("components.documentList.buttonDownloadCSV");infoLoading=(0,g.Xx)("components.documentList.infoLoading");overlaySettings=(0,d.EW)(()=>({...new pt.K,mode:"row",buttonVariant:"accent"===this.variant()?"primary":"accent"}));overlayActions=(0,d.EW)(()=>{const t=[{label:this.labelDownload(),icon:"download",action:n=>{this.handlers()?.requestDownload?.(n.rowData),this.clickedDownloadDocument.emit(n.rowData)}}];return this.showOpenInDocumentViewerAction()&&t.push({label:this.labelOpenInDocumentViewer(),icon:"document",action:n=>{const i=n.rowData.contentIRI.split("/").pop()??n.rowData.contentIRI;this.handlers()?.requestOpen?.(i,n.rowData),this.clickedOpen.emit(n.rowData)}}),this.showOpenInFileManagerAction()&&t.push({label:this.labelOpenInFileManager(),icon:"folder",action:n=>{const i=n.rowData.contentIRI.split("/").pop()??n.rowData.contentIRI;this.handlers()?.requestOpenInDir?.(i,n.rowData),this.clickedOpenInDir.emit(n.rowData)}}),[...t,...this.customOverlayActions()||[]]});documentsInt=(0,d.EW)(()=>{let t;if(this._lazyMode()){const n=this.documentRefs(),i=this.documentData()||{};t=n.map(a=>{const u=i[a.id];return u?{...u,pages:a.pages??u.pages,...void 0!==a.sources?{sources:a.sources}:{},...void 0!==a.relevance?{relevance:a.relevance}:{},name:(0,Z.M)(u.path),loading:!1}:{id:a.id,path:a.id,suffix:"",size:0,contentIRI:a.id,tags:[],summary:"",categories:[],relevance:a.relevance??0,pages:a.pages,sources:a.sources,name:this.infoLoading(),loading:!0}})}else t=(this.documents()||[]).map(n=>({...n,name:(0,Z.M)(n.path),loading:!1}));return this.tagFilter().length?t.filter(n=>n.tags?.some(i=>this.tagFilter().some(a=>a.toLowerCase()===i.toLowerCase()))):t});simplePageCount=(0,d.EW)(()=>Math.max(1,Math.ceil(this.documentsInt().length/Math.max(1,this.pageSize()))));simpleStartIndex=(0,d.EW)(()=>this.simplePageIndex()*Math.max(1,this.pageSize()));simpleEndIndex=(0,d.EW)(()=>this.simpleStartIndex()+Math.max(1,this.pageSize()));simpleDocumentsInt=(0,d.EW)(()=>this.documentsInt().slice(this.simpleStartIndex(),this.simpleEndIndex()));simpleHasPreviousPage=(0,d.EW)(()=>this.simplePageIndex()>0);simpleHasNextPage=(0,d.EW)(()=>this.simplePageIndex()<this.simplePageCount()-1);simpleDisplayStart=(0,d.EW)(()=>this.documentsInt().length?this.simpleStartIndex()+1:0);simpleDisplayEnd=(0,d.EW)(()=>Math.min(this.simpleEndIndex(),this.documentsInt().length));tags=(0,d.EW)(()=>{const t=this.documentsInt(),n=[];return t.forEach(i=>{i.tags?.forEach(a=>n.push(a))}),n});showPageColumn=(0,d.EW)(()=>this.documentsInt().some(t=>void 0!==t.pages));hasSubjects=(0,d.EW)(()=>this.documentsInt().some(t=>void 0!==t.subject&&""!==t.subject));columnSelectSettings=new se;columnDefs=(0,l.vPA)([]);columnDefsGross=(0,l.vPA)([]);tagSelection=(0,l.vPA)([]);tagFilter=(0,l.vPA)([]);showTagFilterCloud=(0,l.vPA)(!1);filterToBeApplied=(0,d.EW)(()=>{const t=this.tagSelection(),n=this.tagFilter();return JSON.stringify(t.sort())!==JSON.stringify(n.sort())});tableMenu=(0,d.EW)(()=>{const t=[];return this.showTagFilterCloud()?t.push({icon:"cloud-funnel",label:this.buttonHideCloudFilter(),variant:"accent",action:()=>{this.flipped.set(!1),this.showTagFilterCloud.set(!1)}}):t.push({icon:"cloud-funnel",label:this.buttonShowCloudFilter(),variant:"accent",action:()=>{this.flipped.set(!0),this.showTagFilterCloud.set(!0)}}),t.push({icon:"download",label:this.buttonDownloadCSV(),action:()=>function N(o,s,t="table.csv"){const n=function k(o,s){const t=function T(o,s){return o.map(t=>{const n={};return"id"in t&&(n.id=t.id),"key"in t&&(n.key=t.key),s.forEach(i=>{let a;"function"==typeof i.valueGetter?a=i.valueGetter({data:t,colDef:i,getValue:p=>t[p],node:void 0,column:void 0,api:void 0,context:void 0}):i.field&&(a=t[i.field]),"function"==typeof i.valueFormatter&&(a=i.valueFormatter({value:a,data:t,colDef:i,node:void 0,column:void 0,api:void 0,context:void 0}));const u=i.headerName||i.colId||i.field;void 0!==u&&(n[u]=a)}),n})}(o,s);if(0===t.length)return"";const n=t.some(u=>"id"in u),i=[];n&&i.push("id"),s.forEach(u=>{const p=u.headerName||u.colId||u.field;p&&"id"!==p&&!i.includes(p)&&i.push(p)});const a=t.map(u=>{const p={};return i.forEach(f=>{p[f]=u[f]}),p});return C().unparse(a,{columns:i})}(o,s);(0,m.YN)(n,t,"text/csv")}(this.documentsInt(),this.columnDefs())}),t});hideCloud(){this.flipped.set(!0),this.showTagFilterCloud.set(!0)}tableHidden=(0,d.EW)(()=>this.showTagFilterCloud()||this.flipped());rowSelection={mode:"singleRow",checkboxes:!1,enableClickSelection:!0};whenTableDataKnown=(0,l.QZP)(()=>{this.simple()||this._buildInitialColumnDefs(this.detailedView())});whenSimpleDataChanges=(0,l.QZP)(()=>{const t=this.documentsInt().length,n=Math.max(1,this.pageSize()),i=Math.max(0,Math.ceil(t/n)-1);this.simplePageIndex()>i&&this.simplePageIndex.set(i)});whenRefsChange=(0,l.QZP)(()=>{const n=this.documentRefs().map(i=>i.id).join("|");n!==this._lastDocumentRefsKey&&(this._lastDocumentRefsKey=n,this._requestedIds.clear(),this._simpleBufferedUntilIndex.set(0),this._tableBufferedUntilIndex.set(0),this.simplePageIndex.set(0))});whenSimpleLazyDataNeeded=(0,l.QZP)(()=>{if(!this.simple()||!this._lazyMode()||!this.handlers())return;const t=this.documentRefs();if(!t.length)return;const n=Math.max(1,this.pageSize()),a=n*Math.max(1,this.prefetchPages()),u=t.length,p=this.simpleStartIndex(),f=Math.min(u,p+n),h=this._simpleBufferedUntilIndex();let v=null;if(0===h?v=0:(p>=Math.max(0,h-n)||f>h)&&(v=h),null===v||v>=u)return;const w=Math.min(u,v+a),S=t.slice(v,w).map(D=>D.id).filter(D=>!this._requestedIds.has(D));this._simpleBufferedUntilIndex.set(Math.max(h,w)),S.length&&(S.forEach(D=>this._requestedIds.add(D)),setTimeout(()=>this.handlers()?.requestData(S)))});previousSimplePage(){this.simpleHasPreviousPage()&&this.simplePageIndex.update(t=>Math.max(0,t-1))}nextSimplePage(){this.simpleHasNextPage()&&this.simplePageIndex.update(t=>Math.min(this.simplePageCount()-1,t+1))}handleSimpleRowClick(t){this.selectedSimpleDocumentId.set(t.id),this.handleRowClick(t)}handleRowClick(t){var n=this;return(0,_.A)(function*(){n.clickedDocument.emit(t),window.cueDetachCellOverlay&&window.cueDetachCellOverlay(),n.overlayVisible&&"function"==typeof n.overlayVisible.set&&n.overlayVisible.set(!1)})()}showFront(){this.flipped.set(!1),this.showTagFilterCloud.set(!1)}applyTagFilter(){this.tagFilter.set(this.tagSelection()),this.flipped.set(!1),this.showTagFilterCloud.set(!1)}ngOnDestroy(){null!==this._viewportCheckTimerId&&(clearTimeout(this._viewportCheckTimerId),this._viewportCheckTimerId=null),this._gridApi=null}onGridReady(t){this._gridApi=t,t.addEventListener("viewportChanged",()=>this._checkViewport()),t.addEventListener("modelUpdated",()=>this._checkViewport()),t.addEventListener("paginationChanged",()=>this._checkViewport()),t.addEventListener("sortChanged",()=>{const n=t.getColumnState();this._isSorted=n.some(i=>null!=i.sort),this._isSorted&&this._requestAllUnloaded()}),this._viewportCheckTimerId=setTimeout(()=>{this._viewportCheckTimerId=null,this._checkViewport()},100)}_checkViewport(){if(!this._gridApi||this._gridApi.isDestroyed()||!this._lazyMode())return;if(this._isSorted)return void this._requestAllUnloaded();const t=this.documentRefs(),n=t.length;if(!n)return;const i=Math.max(1,this._gridApi.paginationGetPageSize?.()??10),u=Math.max(0,this._gridApi.paginationGetCurrentPage?.()??0)*i,p=Math.min(n,u+i),f=this._tableBufferedUntilIndex();let h=null;if(0===f?h=0:(u>=Math.max(0,f-i)||p>f)&&(h=f),null===h||h>=n)return;const v=i*Math.max(1,this.prefetchPages()),w=Math.min(n,h+v),S=t.slice(h,w).map(D=>D.id).filter(D=>!this._requestedIds.has(D));this._tableBufferedUntilIndex.set(Math.max(f,w)),S.length&&(S.forEach(D=>this._requestedIds.add(D)),setTimeout(()=>this.handlers()?.requestData(S)))}_requestAllUnloaded(){if(!this._gridApi||this._gridApi.isDestroyed()||!this._lazyMode())return;const t=[];if(this._gridApi.forEachNode(n=>{const i=n.data;i?.loading&&!this._requestedIds.has(i.contentIRI)&&t.push(i.contentIRI)}),t.length>0){const n=Array.from(new Set(t));n.forEach(i=>this._requestedIds.add(i)),setTimeout(()=>this.handlers()?.requestData(n))}}_buildInitialColumnDefs(t){const n=[],i=[];n.push({field:"name",headerName:this.labelName(),width:t?250:120,filter:!0,valueGetter:f=>!f.data?.name&&f.data?.loading?"Loading...":f.data?.name||f.data?.contentIRI}),this.hasSubjects()&&n.push({field:"subject",headerName:this.labelSubject(),flex:1,filter:!0,cellRenderer:W,cellRendererParams:{lineHeight:"1.8"},autoHeight:!0});const a={field:"summary",headerName:this.labelSummary(),flex:1,filter:!0,cellRenderer:W,cellRendererParams:{lineHeight:"1.8"},autoHeight:!0};this.detailedView()||(a.tooltipField="summary"),t?n.push(a):i.push(a),this.showPageColumn()&&n.push({field:"pages",headerName:this.labelPages(),width:100,filter:!0,valueGetter:f=>Array.isArray(f.data?.pages)?f.data.pages.map(h=>h.page).join(", "):""});const u={field:"size",headerName:this.labelSize(),width:100,filter:!0,valueGetter:f=>(0,ht.b)(f.data?.size||0)};t?n.push(u):i.push(u);const p={field:"categories",headerName:this.labelCategories(),width:120,filter:!0,valueGetter:f=>{const h=f.data?.categories||[],v=this._leafContentCategoryIris(),w=v?h.filter(D=>v.has(D)):h,S=w.slice(0,3).map(D=>this._getContentCategoryLabel(D)).join(", ");return w.length>3?`${S}...`:S}};t?n.push(p):i.push(p),n.push({field:"suffix",headerName:this.labelType(),width:80,filter:!0,headerClass:"header-align-right",cellStyle:{display:"flex",justifyContent:"flex-end"},cellRenderer:dt}),this.columnDefs.update(()=>[...n]),this.columnDefsGross.update(()=>[...n,...i])}_getContentCategoryLabel(t){const n=this.availableContentCategories();if(void 0!==n){const i=n.find(a=>a.iri===t);if(i)return i.label;console.warn(`No label found for content category IRI: ${t}`)}else console.warn("No availableContentCategories provided to DocumentList component");return(o=>{const s=o.split("#").pop()??o,t={AgreementDocument:"Agreement",ArchitecturalDesignDocument:"Architectural Design",AsBuiltDocument:"As-Built",BudgetEstimateDocument:"Budget Estimate",CertificationDocument:"Certification",ComplianceDocument:"Compliance",CorrespondenceDocument:"Correspondence",ConstructionContract:"Construction Contract",ConstructionProcessDocument:"Construction Process",ContractCondition:"Contract Condition",ContractRole:"Contract Role",ContractualDocument:"Contract",CostControlDocument:"Cost Control",DesignDocument:"Design Document",EmailAddress:"Email Address",EngineeringDesignDocument:"Engineering Design",FinancialAdministrativeDocument:"Financial/Administrative",FunctionalRequirementsDocument:"Functional Requirements",InspectionDocument:"Inspection",InsuranceBondDocument:"Insurance/Bond",InteriorDesignDocument:"Interior Design",MarketingCloseoutDocument:"Marketing Closeout",MiscDocument:"Miscellaneous",OperationManual:"Operation Manual",OperationsMaintenanceDocument:"Operations & Maintenance",OperationsManualDocument:"Operations Manual",OtherDocument:"Other",OtherContent:"Other Content",ProgressStatusReport:"Progress Status Report",QualityAssuranceDocument:"Quality Assurance",QualityControlDocument:"Quality Control",RegulatoryComplianceDocument:"Regulatory Compliance",SafetyDocument:"Safety",ScheduleDocument:"Schedule",SiteAssessmentDocument:"Site Assessment",TechnicalRequirementsDocument:"Technical Requirements",TechnicalSpecificationDocument:"Technical Specification",TenderingDocument:"Tendering Document",TermsAndConditionsDocument:"Terms & Conditions"};return void 0===t[s]&&console.log(`No pretty label for category: ${s}`),t[s]??s})(t)}static \u0275fac=function(n){return new(n||o)};static \u0275cmp=e.VBU({type:o,selectors:[["cue-doc-list"]],inputs:{documents:[1,"documents"],availableContentCategories:[1,"availableContentCategories"],detailedView:[1,"detailedView"],simple:[1,"simple"],pageSize:[1,"pageSize"],prefetchPages:[1,"prefetchPages"],privileges:[1,"privileges"],showOpenInDocumentViewerAction:[1,"showOpenInDocumentViewerAction"],showOpenInFileManagerAction:[1,"showOpenInFileManagerAction"],customOverlayActions:[1,"customOverlayActions"],variant:[1,"variant"],documentRefs:[1,"documentRefs"],handlers:[1,"handlers"],documentData:[1,"documentData"]},outputs:{clickedDocument:"clickedDocument",clickedDownloadDocument:"clickedDownloadDocument",clickedOpenInDir:"clickedOpenInDir",clickedOpen:"clickedOpen"},decls:2,vars:1,consts:[["frontContent",""],["backContent",""],["trigger",""],[1,"simple-container",2,"width","100%","height","auto"],[1,"flip-card",2,"width","100%","height","auto","overflow","hidden",3,"cueFlip"],[1,"simple-list"],["justify","center",1,"simple-empty"],["direction","row","justify","space-between","align","center",2,"padding","4px 8px"],[1,"simple-item",3,"active"],[1,"simple-item",3,"click"],["size","s",1,"simple-item-name",3,"noWrap","title"],["size","xs",1,"simple-item-meta"],["size","s"],["size","xs"],["direction","row","gap","s"],["size","xs","variant","tertiary",3,"click","disabled"],["icon","paginator-back"],["icon","paginator-next"],[1,"flip-card",2,"width","100%","height","auto","overflow","hidden",3,"cueFlipChange","cueFlip"],[1,"flip-content"],[1,"card-face","front",2,"width","100%","height","auto",3,"variant"],[1,"card-face","front",2,"width","100%","height","auto"],[1,"card-face","back",2,"width","100%","height","auto",3,"variant"],[1,"card-face","back",2,"width","100%","height","auto"],["direction","row","justify","end",2,"padding","2px"],["positioning","bottomleft"],["trigger","","variant","tertiary","size","s"],["icon","more-vert"],["menu",""],["variant","accent","size","s",3,"click","cueTooltip"],["icon","settings"],[2,"position","relative"],[3,"gridApiReady","selectedRows","paginationPageSize","rowSelection","rowData","columnDefs","overlaySettings","overlayActions"],[3,"click"],["before","",3,"name"],["variant","accent","size","s","cueTooltip","Back to table",3,"click"],["icon","arrow-back"],["justify","center",2,"height","350px"],[2,"height","100%","width","100%",3,"selectionChanged","words","clickable","overflow","multiSelect","highlightSelection"],["justify","center",1,"word-cloud-actions"],[3,"columnDefsChange","settings","columnDefs","columnDefsGross"],["justify","center",1,"word-cloud-actions",3,"click"],["variant","primary"],[3,"ngTemplateOutlet"]],template:function(n,i){1&n&&e.nVh(0,yt,4,2,"div",3)(1,Gt,10,3,"div",4),2&n&&e.vxM(i.simple()?0:1)},dependencies:[$.n,I,G.$,j.L,vt,gt.Z,ae.T3,Y.a,ue.R,st,ft.M,_t.D,ut.W,mt.A,H.d,B.Typography,g.Kj],styles:[".hidden[_ngcontent-%COMP%]{display:none}.word-cloud-actions[_ngcontent-%COMP%]{position:absolute;z-index:10;right:0;left:0;bottom:10px;pointer-events:none}.word-cloud-actions[_ngcontent-%COMP%] cue-button[_ngcontent-%COMP%]{pointer-events:auto}.simple-container[_ngcontent-%COMP%]{width:100%}.simple-list[_ngcontent-%COMP%]{list-style:none;margin:0;padding:4px;max-height:420px;overflow-y:auto}.simple-item[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2px;padding:9px 10px;border-radius:6px;cursor:pointer;transition:background .1s}.simple-item[_ngcontent-%COMP%]:hover{background:var(--cue-color-ultralightgray)}.simple-item.active[_ngcontent-%COMP%]{background:var(--cue-color-lightgray)}.simple-item-name[_ngcontent-%COMP%]{font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.simple-item-meta[_ngcontent-%COMP%]{font-size:11px;color:var(--cue-color-midgray)}.simple-empty[_ngcontent-%COMP%]{padding:12px}"],changeDetection:0})}return o})()},4372(y,M,c){"use strict";c.d(M,{M:()=>_});const _=r=>{const d=r.split("/");return d[d.length-1]}},1493(y,M,c){"use strict";function _(r,d=!1,l=1){const m=d?1e3:1024;if(Math.abs(r)<m)return r+" B";const b=d?["kB","MB","GB","TB","PB","EB","ZB","YB"]:["KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"];let C=-1;const T=10**l;do{r/=m,++C}while(Math.round(Math.abs(r)*T)/T>=m&&C<b.length-1);return r.toFixed(l)+" "+b[C]}c.d(M,{b:()=>_})},2269(y,M,c){y.exports=function(_){"use strict";var d=function r(m){return m&&"object"==typeof m&&"default"in m?m:{default:m}}(_),l={name:"da",weekdays:"s\xf8ndag_mandag_tirsdag_onsdag_torsdag_fredag_l\xf8rdag".split("_"),weekdaysShort:"s\xf8n._man._tirs._ons._tors._fre._l\xf8r.".split("_"),weekdaysMin:"s\xf8._ma._ti._on._to._fr._l\xf8.".split("_"),months:"januar_februar_marts_april_maj_juni_juli_august_september_oktober_november_december".split("_"),monthsShort:"jan._feb._mar._apr._maj_juni_juli_aug._sept._okt._nov._dec.".split("_"),weekStart:1,yearStart:4,ordinal:function(m){return m+"."},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd [d.] D. MMMM YYYY [kl.] HH:mm"},relativeTime:{future:"om %s",past:"%s siden",s:"f\xe5 sekunder",m:"et minut",mm:"%d minutter",h:"en time",hh:"%d timer",d:"en dag",dd:"%d dage",M:"en m\xe5ned",MM:"%d m\xe5neder",y:"et \xe5r",yy:"%d \xe5r"}};return d.default.locale(l,null,!0),l}(c(7374))},1409(y,M,c){y.exports=function(_){"use strict";var d=function r(C){return C&&"object"==typeof C&&"default"in C?C:{default:C}}(_),l={s:"ein paar Sekunden",m:["eine Minute","einer Minute"],mm:"%d Minuten",h:["eine Stunde","einer Stunde"],hh:"%d Stunden",d:["ein Tag","einem Tag"],dd:["%d Tage","%d Tagen"],M:["ein Monat","einem Monat"],MM:["%d Monate","%d Monaten"],y:["ein Jahr","einem Jahr"],yy:["%d Jahre","%d Jahren"]};function m(C,T,k){var N=l[k];return Array.isArray(N)&&(N=N[T?0:1]),N.replace("%d",C)}var b={name:"de",weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So._Mo._Di._Mi._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),months:"Januar_Februar_M\xe4rz_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Feb._M\xe4rz_Apr._Mai_Juni_Juli_Aug._Sept._Okt._Nov._Dez.".split("_"),ordinal:function(C){return C+"."},weekStart:1,yearStart:4,formats:{LTS:"HH:mm:ss",LT:"HH:mm",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},relativeTime:{future:"in %s",past:"vor %s",s:m,m,mm:m,h:m,hh:m,d:m,dd:m,M:m,MM:m,y:m,yy:m}};return d.default.locale(b,null,!0),b}(c(7374))},9785(y){y.exports=function(){"use strict";return{name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(M){var c=["th","st","nd","rd"],_=M%100;return"["+M+(c[(_-20)%10]||c[_]||c[0])+"]"}}}()},2494(y,M,c){y.exports=function(_){"use strict";var d=function r(m){return m&&"object"==typeof m&&"default"in m?m:{default:m}}(_),l={name:"es",monthsShort:"ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),weekdays:"domingo_lunes_martes_mi\xe9rcoles_jueves_viernes_s\xe1bado".split("_"),weekdaysShort:"dom._lun._mar._mi\xe9._jue._vie._s\xe1b.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_s\xe1".split("_"),months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),weekStart:1,formats:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY H:mm",LLLL:"dddd, D [de] MMMM [de] YYYY H:mm"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un d\xeda",dd:"%d d\xedas",M:"un mes",MM:"%d meses",y:"un a\xf1o",yy:"%d a\xf1os"},ordinal:function(m){return m+"\xba"}};return d.default.locale(l,null,!0),l}(c(7374))},4230(y,M,c){y.exports=function(_){"use strict";var d=function r(m){return m&&"object"==typeof m&&"default"in m?m:{default:m}}(_),l={name:"fr",weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"di_lu_ma_me_je_ve_sa".split("_"),months:"janvier_f\xe9vrier_mars_avril_mai_juin_juillet_ao\xfbt_septembre_octobre_novembre_d\xe9cembre".split("_"),monthsShort:"janv._f\xe9vr._mars_avr._mai_juin_juil._ao\xfbt_sept._oct._nov._d\xe9c.".split("_"),weekStart:1,yearStart:4,formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},ordinal:function(m){return m+(1===m?"er":"")}};return d.default.locale(l,null,!0),l}(c(7374))},9531(y,M,c){y.exports=function(_){"use strict";var d=function r(m){return m&&"object"==typeof m&&"default"in m?m:{default:m}}(_),l={name:"it",weekdays:"domenica_luned\xec_marted\xec_mercoled\xec_gioved\xec_venerd\xec_sabato".split("_"),weekdaysShort:"dom_lun_mar_mer_gio_ven_sab".split("_"),weekdaysMin:"do_lu_ma_me_gi_ve_sa".split("_"),months:"gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre".split("_"),weekStart:1,monthsShort:"gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic".split("_"),formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},relativeTime:{future:"tra %s",past:"%s fa",s:"qualche secondo",m:"un minuto",mm:"%d minuti",h:"un'ora",hh:"%d ore",d:"un giorno",dd:"%d giorni",M:"un mese",MM:"%d mesi",y:"un anno",yy:"%d anni"},ordinal:function(m){return m+"\xba"}};return d.default.locale(l,null,!0),l}(c(7374))},4955(y){y.exports=function(){"use strict";var M={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};return function(c,_,r){var d=_.prototype,l=d.format;r.en.formats=M,d.format=function(m){void 0===m&&(m="YYYY-MM-DDTHH:mm:ssZ");var k,b=this.$locale().formats,C=(k=void 0===b?{}:b,m.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(N,e,R){var A=R&&R.toUpperCase();return e||k[R]||M[R]||k[A].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(L,E,z){return E||z.slice(1)})}));return l.call(this,C)}}}()},5164(y){y.exports=function(){"use strict";return function(M,c,_){M=M||{};var r=c.prototype,d={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function l(b,C,T,k){return r.fromToBase(b,C,T,k)}_.en.relativeTime=d,r.fromToBase=function(b,C,T,k,N){for(var e,R,A,L=T.$locale().relativeTime||d,E=M.thresholds||[{l:"s",r:44,d:"second"},{l:"m",r:89},{l:"mm",r:44,d:"minute"},{l:"h",r:89},{l:"hh",r:21,d:"hour"},{l:"d",r:35},{l:"dd",r:25,d:"day"},{l:"M",r:45},{l:"MM",r:10,d:"month"},{l:"y",r:17},{l:"yy",d:"year"}],z=E.length,O=0;O<z;O+=1){var P=E[O];P.d&&(e=k?_(b).diff(T,P.d,!0):T.diff(b,P.d,!0));var I=(M.rounding||Math.round)(Math.abs(e));if(A=e>0,I<=P.r||!P.r){I<=1&&O>0&&(P=E[O-1]);var G=L[P.l];N&&(I=N(""+I)),R="string"==typeof G?G.replace("%d",I):G(I,C,P.l,A);break}}if(C)return R;var j=A?L.future:L.past;return"function"==typeof j?j(R):j.replace("%s",R)},r.to=function(b,C){return l(b,C,this,!0)},r.from=function(b,C){return l(b,C,this)};var m=function(b){return b.$u?_.utc():_()};r.toNow=function(b){return this.to(m(this),b)},r.fromNow=function(b){return this.from(m(this),b)}}}()}}]);
|
|
1
|
+
(self.webpackChunkcue_ui=self.webpackChunkcue_ui||[]).push([[611],{3183(P,w,c){"use strict";c.d(w,{A:()=>E});var x=c(7705),r=c(5802),d=c(9417),l=c(1359),u=c(8957),T=c(2245),S=c(5381),p=c(5547);const C=(k,D)=>D.value;function j(k,D){if(1&k){const h=p.RV6();p.j41(0,"cue-input",6),p.bIt("valueChange",function(g){r.eBV(h);const b=p.XpG();return b.searchText=g,r.Njj(b.onSearchChange())}),p.k0s()}if(2&k){const h=p.XpG();p.Y8G("value",h.searchText)}}function e(k,D){if(1&k){const h=p.RV6();p.j41(0,"cue-checkbox",7),p.bIt("checkedChange",function(g){const b=r.eBV(h).$implicit,O=p.XpG();return b.selected=g,r.Njj(O.onSelectionChange())}),p.k0s()}if(2&k){const h=D.$implicit;p.Y8G("label",h.value||"(blank)")("checked",h.selected)}}function L(k,D){1&k&&(p.j41(0,"cue-typography",5),p.EFF(1,"No results"),p.k0s())}let E=(()=>{class k{_cdr=(0,r.WQX)(x.gRc);_params;options=[];filteredOptions=[];searchText="";agInit(h){this._params=h}afterGuiAttached(h){this._refreshOptions(),this._cdr.markForCheck()}onNewRowsLoaded(){this._refreshOptions(),this._cdr.markForCheck()}isFilterActive(){return this.options.some(h=>!h.selected)}doesFilterPass(h){const f=new Set(this.options.filter(A=>A.selected).map(A=>A.value)),g=this._params.getValue(h.node),b=null==g?"":String(g);return"..."===b||"Loading..."===b||(""===b?f.has(""):b.split(", ").map(A=>A.trim()).some(A=>f.has(A)))}getModel(){return this.isFilterActive()?{selectedValues:this.options.filter(h=>h.selected).map(h=>h.value)}:null}setModel(h){if(h){const f=new Set(h.selectedValues);this.options.forEach(g=>g.selected=f.has(g.value))}else this.options.forEach(f=>f.selected=!0);this._applySearch(),this._cdr.markForCheck()}onSelectionChange(){this._params.filterChangedCallback(),this._cdr.markForCheck()}onSearchChange(){this._applySearch(),this._cdr.markForCheck()}get allSelected(){return this.options.length>0&&this.options.every(h=>h.selected)}toggleAll(h){this.options.forEach(f=>f.selected=h),this._applySearch(),this._params.filterChangedCallback(),this._cdr.markForCheck()}_refreshOptions(){const h=new Set;this._params.api.forEachNode(g=>{const b=this._params.getValue(g);if(null==b||""===b)h.add("");else{const O=String(b);if("..."===O||"Loading..."===O)return;const A=O.split(", ").map(B=>B.trim());for(const B of A)h.add(B)}});const f=new Map(this.options.map(g=>[g.value,g.selected]));this.options=Array.from(h).sort((g,b)=>g.localeCompare(b)).map(g=>({value:g,selected:f.get(g)??!0})),this._applySearch()}_applySearch(){const h=this.searchText.toLowerCase().trim();this.filteredOptions=h?this.options.filter(f=>f.value.toLowerCase().includes(h)):this.options}static \u0275fac=function(f){return new(f||k)};static \u0275cmp=p.VBU({type:k,selectors:[["cue-multi-select-filter"]],decls:7,vars:3,consts:[["direction","column","gap","s"],["placeholder","Search...","size","s",3,"value"],["size","s","label","Select all",3,"checkedChange","checked"],[1,"msf-list"],["size","s",3,"label","checked"],["size","s"],["placeholder","Search...","size","s",3,"valueChange","value"],["size","s",3,"checkedChange","label","checked"]],template:function(f,g){1&f&&(p.j41(0,"cue-flexcontainer",0),p.nVh(1,j,1,1,"cue-input",1),p.j41(2,"cue-checkbox",2),p.bIt("checkedChange",function(O){return g.toggleAll(O)}),p.k0s(),p.j41(3,"div",3),p.Z7z(4,e,1,2,"cue-checkbox",4,C),p.nVh(6,L,2,0,"cue-typography",5),p.k0s()()),2&f&&(p.R7$(),p.vxM(g.options.length>10?1:-1),p.R7$(),p.Y8G("checked",g.allSelected),p.R7$(2),p.Dyx(g.filteredOptions),p.R7$(2),p.vxM(0===g.filteredOptions.length?6:-1))},dependencies:[d.YN,l.S,u.p,T.Typography,S.n],styles:["[_nghost-%COMP%]{display:block;padding:var(--cue-card-padding-y) var(--cue-card-padding-x);min-width:200px;max-width:300px;box-sizing:border-box}.msf-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2px;max-height:200px;overflow-y:auto}"],changeDetection:0})}return k})()},5902(P,w,c){"use strict";c.d(w,{U:()=>L});var x=c(7705),r=c(5802),d=c(2271),l=c(9352),u=c(8957),T=c(2444),S=c(2245),p=c(5381),C=c(5547);function j(E,k){if(1&E){const D=C.RV6();C.j41(0,"cue-input",4),C.bIt("valueChange",function(f){r.eBV(D);const g=C.XpG();return r.Njj(g.onValueChange(f))}),C.k0s()}if(2&E){const D=C.XpG();C.Y8G("value",D.filterText)}}function e(E,k){if(1&E){const D=C.RV6();C.j41(0,"cue-typography",5),C.bIt("click",function(){r.eBV(D);const f=C.XpG();return r.Njj(f.clear())}),C.EFF(1,"Clear"),C.k0s()}}let L=(()=>{class E{_cdr=(0,r.WQX)(x.gRc);_params;filterText="";filterType="contains";filterTypeOptions=["contains","notContains","equals","notEqual","startsWith","endsWith","blank","notBlank"];_labelContains=(0,l.Xx)("components.agGridColumnSelect.textFilterContains");_labelNotContains=(0,l.Xx)("components.agGridColumnSelect.textFilterNotContains");_labelEquals=(0,l.Xx)("components.agGridColumnSelect.textFilterEquals");_labelNotEqual=(0,l.Xx)("components.agGridColumnSelect.textFilterNotEqual");_labelStartsWith=(0,l.Xx)("components.agGridColumnSelect.textFilterStartsWith");_labelEndsWith=(0,l.Xx)("components.agGridColumnSelect.textFilterEndsWith");_labelBlank=(0,l.Xx)("components.agGridColumnSelect.textFilterBlank");_labelNotBlank=(0,l.Xx)("components.agGridColumnSelect.textFilterNotBlank");filterTypeLabelMap=(0,d.EW)(()=>({contains:this._labelContains(),notContains:this._labelNotContains(),equals:this._labelEquals(),notEqual:this._labelNotEqual(),startsWith:this._labelStartsWith(),endsWith:this._labelEndsWith(),blank:this._labelBlank(),notBlank:this._labelNotBlank()}));showTextInput=(0,d.EW)(()=>!["blank","notBlank"].includes(this.filterType));agInit(D){this._params=D}afterGuiAttached(D){this._cdr.markForCheck()}isFilterActive(){return!!["blank","notBlank"].includes(this.filterType)||this.filterText.trim().length>0}doesFilterPass(D){const h=this._params.getValue(D.node),f=null==h?"":String(h),g=this.filterText.toLowerCase().trim(),b=f.toLowerCase();switch(this.filterType){case"contains":default:return b.includes(g);case"notContains":return!b.includes(g);case"equals":return b===g;case"notEqual":return b!==g;case"startsWith":return b.startsWith(g);case"endsWith":return b.endsWith(g);case"blank":return""===f;case"notBlank":return""!==f}}getModel(){return this.isFilterActive()?{filterType:"text",type:this.filterType,filter:this.filterText}:null}setModel(D){this.filterText=D?.filter??"",this.filterType=D?.type??"contains",this._cdr.markForCheck()}onValueChange(D){this.filterText=D,this._params.filterChangedCallback(),this._cdr.markForCheck()}onFilterTypeChange(D){this.filterType=String(D||"contains"),["blank","notBlank"].includes(this.filterType)&&(this.filterText=""),this._params.filterChangedCallback(),this._cdr.markForCheck()}clear(){this.filterText="",this.filterType="contains",this._params.filterChangedCallback(),this._cdr.markForCheck()}static \u0275fac=function(h){return new(h||E)};static \u0275cmp=C.VBU({type:E,selectors:[["cue-text-filter"]],decls:4,vars:5,consts:[["direction","column","gap","s"],["size","s",3,"valueChange","value","options","labelMap"],["placeholder","Filter...","size","s",3,"value"],["size","s",2,"cursor","pointer","text-align","right"],["placeholder","Filter...","size","s",3,"valueChange","value"],["size","s",2,"cursor","pointer","text-align","right",3,"click"]],template:function(h,f){1&h&&(C.j41(0,"cue-flexcontainer",0)(1,"cue-select",1),C.bIt("valueChange",function(b){return f.onFilterTypeChange(b)}),C.k0s(),C.nVh(2,j,1,1,"cue-input",2),C.nVh(3,e,2,0,"cue-typography",3),C.k0s()),2&h&&(C.R7$(),C.Y8G("value",f.filterType)("options",f.filterTypeOptions)("labelMap",f.filterTypeLabelMap()),C.R7$(),C.vxM(f.showTextInput()?2:-1),C.R7$(),C.vxM(f.filterText||"contains"!==f.filterType?3:-1))},dependencies:[u.p,T.l,S.Typography,p.n],styles:["[_nghost-%COMP%]{display:block;padding:var(--cue-card-padding-y) var(--cue-card-padding-x);min-width:180px;max-width:280px;box-sizing:border-box}"],changeDetection:0})}return E})()},8611(P,w,c){"use strict";c.d(w,{g:()=>Ot});var x=c(467),r=c(7705),d=c(2271),l=c(5802),u=c(2065),T=c(7284),S=c.n(T);var e=c(5547);let D=(()=>{class o{get calculatedWidth(){let t=this.localConfig().width||this.width()||1;return this.el.nativeElement.parentNode.offsetWidth>0&&t<=1&&t>0&&(t*=this.el.nativeElement.parentNode.offsetWidth),t}get calculatedHeight(){let t=this.localConfig().height||this.height()||400;return this.el.nativeElement.parentNode.offsetHeight>0&&t<=1&&t>0&&(t*=this.el.nativeElement.parentNode.offsetHeight),t}onResize(t){this.logMessage("debug","rezisze triggered"),window.clearTimeout(this.timeoutId),this.timeoutId=window.setTimeout(()=>{this.options.realignOnResize&&this.reDraw()},200)}constructor(){this.data=(0,r.hFB)([]),this.width=(0,r.hFB)(),this.height=(0,r.hFB)(),this.step=(0,r.hFB)(),this.overflow=(0,r.hFB)(),this.strict=(0,r.hFB)(),this.zoomOnHover=(0,r.hFB)(),this.realignOnResize=(0,r.hFB)(),this.randomizeAngle=(0,r.hFB)(),this.background=(0,r.hFB)(),this.font=(0,r.hFB)(),this.delay=(0,r.hFB)(),this.config=(0,r.hFB)({}),this.log=(0,r.hFB)(),this.clicked=(0,r.CGW)(),this.afterInit=(0,r.CGW)(),this.afterChecked=(0,r.CGW)(),this.localConfig=(0,d.EW)(()=>{const n=this.config();return{...n,width:this.width()||n.width||500,height:this.height()||n.height||300,overflow:this.overflow()??(n.overflow||!0),strict:this.strict()??(n.strict||!1),zoomOnHover:this.zoomOnHover()||n.zoomOnHover||{transitionTime:0,scale:1,delay:0},realignOnResize:this.realignOnResize()??(n.realignOnResize||!1),randomizeAngle:this.randomizeAngle()??(n.randomizeAngle||!1),step:this.step()||n.step||2,log:this.log()||n.log||!1,delay:this.delay()||n.delay,background:this.background()||n.background,font:this.font()||n.font}}),this.cloudDataHtmlElements=[],this.dataArr=[],this.el=(0,l.WQX)(e.aKT),this.r2=(0,l.WQX)(e.sFG);const t=this.el.nativeElement;(0,l.QZP)(()=>{const n=this.localConfig();this.logMessage("warn","cloud configuration",n),n.font&&this.r2.setStyle(t,"font",n.font),n.background&&this.r2.setStyle(t,"background",n.background),this.reDraw()})}reDraw(){this.afterChecked?.emit(),this.logMessage("debug","dataChanges emitted"),this.cloudDataHtmlElements=[],this.data()?(this.el.nativeElement.innerHTML="",this.data()&&(this.dataArr=this.data()),this.options={...this.localConfig(),aspectRatio:this.calculatedWidth/this.calculatedHeight,width:this.calculatedWidth,height:this.calculatedHeight,center:{x:this.calculatedWidth/2,y:this.calculatedHeight/2}},this.r2.setStyle(this.el.nativeElement,"width",this.options.width+"px"),this.r2.setStyle(this.el.nativeElement,"height",this.options.height+"px"),this.drawWordCloud(),this.logMessage("debug","reDraw finished")):console.error("angular-tag-cloud: No data passed. Please pass an Array of CloudData")}descriptiveEntry(t){let n=t.text;return n+=t.color?`-${t.color}`:"",n+=t.external?`-${t.external}`:"",n+=t.link?`-${t.link}`:"",n+=t.rotate?`-${t.rotate}`:"",n}drawWordCloud(){this.dataArr.sort((i,s)=>this.descriptiveEntry(i).localeCompare(this.descriptiveEntry(s))),this.dataArr.sort((i,s)=>s.weight-i.weight);const t=this.dataArr.filter(i=>i.position),n=this.dataArr.filter(i=>!i.position);t.forEach((i,s)=>{this.drawWord(s,i)}),n.forEach((i,s)=>{this.drawWord(s,i)})}hitTest(t){for(const n of this.cloudDataHtmlElements)if(this.overlapping(t,n))return!0;return!1}overlapping(t,n){const{offsetLeft:i,offsetTop:s,offsetWidth:m,offsetHeight:_}=n;return!(t.right<i||t.left>i+m||t.bottom<s||t.top>s+_)}getWeightForWord(t){let n=5;return this.dataArr[0].weight>this.dataArr[this.dataArr.length-1].weight&&(this.options.strict?t.weight>10?(n=10,this.logMessage("warn",`[TagCloud strict] Weight property ${t.weight} > 10. Fallback to 10 as you are using strict mode`,t)):t.weight<1?(n=1,this.logMessage("warn",`[TagCloud strict] Given weight property ${t.weight} < 1. Fallback to 1 as you are using strict mode`,t)):t.weight%1!=0?(n=Math.round(t.weight),this.logMessage("warn",`[TagCloud strict] Given weight property ${t.weight} is not an integer. Rounded value to ${n}`,t)):n=t.weight:n=Math.round((t.weight-this.dataArr[this.dataArr.length-1].weight)/(this.dataArr[0].weight-this.dataArr[this.dataArr.length-1].weight)*9)+1),n}setWordColor(t,n){this.r2.setStyle(t,"color",n)}setTooltip(t,n){this.r2.addClass(t,"tooltip");const i=this.r2.createElement("span");i.className="tooltiptext";const s=this.r2.createText(n);i.appendChild(s),t.appendChild(i)}setWordRotation(t,n){const i=n?`rotate(${n}deg)`:"";return this.r2.setStyle(t,"transform",i),i}wrapNodeIntoAnchorElement(t,n){const i=this.r2.createElement("a");return i.href=n.link||"",void 0!==n.external&&n.external&&(i.target="_blank"),i.appendChild(t),i}applyZoomStyle(t,n,i,s){this.options.zoomOnHover&&1!==this.options.zoomOnHover.scale&&(this.options.zoomOnHover.transitionTime||(this.options.zoomOnHover.transitionTime=0),this.options.zoomOnHover.scale||(this.options.zoomOnHover.scale=1),n.onmouseover=()=>{this.options.zoomOnHover?.transitionTime&&this.r2.setStyle(n,"transition",`transform ${this.options.zoomOnHover.transitionTime}s`),this.options.zoomOnHover?.scale&&this.r2.setStyle(n,"transform",`scale(${this.options.zoomOnHover.scale}) ${s}`),this.options.zoomOnHover?.delay&&this.r2.setStyle(n,"transition-delay",`${this.options.zoomOnHover.delay}s`),this.options.zoomOnHover?.color&&this.r2.setStyle(i?t:n,"color",this.options.zoomOnHover.color)},n.onmouseout=()=>{this.r2.setStyle(n,"transform",`none ${s}`),this.options.zoomOnHover?.color&&this.r2.removeStyle(i?t:n,"color")})}setPosition(t,n,i){let s=this.options.randomizeAngle?6.28*Math.random():0,m=0;const _=t.style;_.position="absolute";const y=!!(n.position&&n.position.left&&n.position.top),v=t.offsetWidth,F=t.offsetHeight;let G=y&&n.position?.left?n.position.left:this.options.center.x-v/2,N=y&&n.position?.top?n.position.top:this.options.center.y-F/2;if(_.left=G+"px",_.top=N+"px",this.options.delay&&(t.classList.add("tag-animation-delay"),_.setProperty("--tag-animation-delay",this.options.delay*i+"ms")),!y)if(0===i)_.left=G+2*(Math.random()-.5)*(this.calculatedWidth/5)+"px",_.top=N+2*(Math.random()-.5)*(this.calculatedHeight/5)+"30px";else{for(;this.options.width&&this.options.height&&t.offsetHeight&&t.offsetWidth&&this.hitTest(new DOMRect(G,N,t.offsetWidth,t.offsetHeight));)m+=this.options.step||1,s+=(i%2==0?1:-1)*(this.options.step||1),G=this.options.center.x-v/2+m*Math.cos(s)*this.options.aspectRatio,N=this.options.center.y+m*Math.sin(s)-F/2;_.left=G+"px",_.top=N+"px"}if(!this.options.overflow&&(G<0||N<0||G+v>this.calculatedWidth||N+F>this.calculatedHeight))return this.logMessage("warn","Word did not fit into the cloud and overflow is set to 'false'. The element will be removed",t),void t.remove()}drawWord(t,n){let i;const s=this.getWeightForWord(n);i=this.r2.createElement("span"),i.className=`w${s}`,i.onclick=()=>{this.clicked?.emit(n)},i.onmouseenter=()=>{i.style.zIndex="2"},i.onmouseleave=()=>{i.style.zIndex="1"};let m=this.r2.createText(n.text);n.color&&this.setWordColor(i,n.color);const _=this.setWordRotation(i,n.rotate);n.link&&(m=this.wrapNodeIntoAnchorElement(m,n)),this.options.zoomOnHover&&1!==this.options.zoomOnHover.scale&&this.applyZoomStyle(m,i,n.link,_),i.appendChild(m),this.r2.appendChild(this.el.nativeElement,i),n.tooltip&&this.setTooltip(i,n.tooltip),i.id=`angular-tag-cloud-item-${t}`,this.setPosition(i,n,t),this.logMessage("debug","Adds new word <span>",i),this.cloudDataHtmlElements.push(i),this.logMessage("debug","Placed words",this.cloudDataHtmlElements)}logMessage(t,...n){this.localConfig()&&("debug"===this.localConfig().log?console.log(`[AngularTagCloudModule ${t}]`,...n):"warn"===this.localConfig().log&&"warn"===t&&console.warn(`[AngularTagCloudModule ${t}]`,...n))}static{this.\u0275fac=function(n){return new(n||o)}}static{this.\u0275cmp=e.VBU({type:o,selectors:[["angular-tag-cloud"],["ng-tag-cloud"],["ngtc"]],hostBindings:function(n,i){1&n&&e.bIt("resize",function(m){return i.onResize(m)},e.tSv)},inputs:{data:[1,"data"],width:[1,"width"],height:[1,"height"],step:[1,"step"],overflow:[1,"overflow"],strict:[1,"strict"],zoomOnHover:[1,"zoomOnHover"],realignOnResize:[1,"realignOnResize"],randomizeAngle:[1,"randomizeAngle"],background:[1,"background"],font:[1,"font"],delay:[1,"delay"],config:[1,"config"],log:[1,"log"]},outputs:{clicked:"clicked",afterInit:"afterInit",afterChecked:"afterChecked"},decls:0,vars:0,template:function(n,i){},styles:['[_nghost-%COMP%]{font-family:Helvetica,Arial,sans-serif;font-size:10px;line-height:normal;color:#09f;overflow:hidden;position:relative;display:block}.tag-animation-delay[_ngcontent-%COMP%]{--tag-animation-delay: .5s;animation:_ngcontent-%COMP%_fadeIn .5s;opacity:0;animation-fill-mode:forwards;animation-delay:var(--tag-animation-delay)}span[_ngcontent-%COMP%]{padding:0}span.w10[_ngcontent-%COMP%]{font-size:550%}span.w9[_ngcontent-%COMP%]{font-size:500%}span.w8[_ngcontent-%COMP%]{font-size:450%}span.w7[_ngcontent-%COMP%]{font-size:400%}span.w6[_ngcontent-%COMP%]{font-size:350%}span.w5[_ngcontent-%COMP%]{font-size:300%}span.w4[_ngcontent-%COMP%]{font-size:250%}span.w3[_ngcontent-%COMP%]{font-size:200%}span.w2[_ngcontent-%COMP%]{font-size:150%}span.w1[_ngcontent-%COMP%]{font-size:100%}a[_ngcontent-%COMP%]:hover{color:#0df}a[_ngcontent-%COMP%]:hover, span.w10[_ngcontent-%COMP%], span.w9[_ngcontent-%COMP%], span.w8[_ngcontent-%COMP%]{color:#0cf}span.w7[_ngcontent-%COMP%]{color:#39d}span.w6[_ngcontent-%COMP%]{color:#90c5f0}span.w5[_ngcontent-%COMP%]{color:#90a0dd}span.w4[_ngcontent-%COMP%]{color:#90c5f0}span.w3[_ngcontent-%COMP%]{color:#a0ddff}span.w2[_ngcontent-%COMP%]{color:#9ce}span.w1[_ngcontent-%COMP%]{color:#aab5f0}.tooltip[_ngcontent-%COMP%] .tooltiptext[_ngcontent-%COMP%]{visibility:hidden;width:inherit;background-color:#555;color:#fff;text-align:center;border-radius:6px;padding:5px 10px;position:absolute;bottom:100%;left:0;opacity:0;transition:opacity .3s}.tooltip[_ngcontent-%COMP%] .tooltiptext[_ngcontent-%COMP%]:after{content:"";position:absolute;top:100%;left:50%;margin-left:-5px;border-width:5px;border-style:solid;border-color:#555 transparent transparent transparent}.tooltip[_ngcontent-%COMP%]:hover .tooltiptext[_ngcontent-%COMP%]{visibility:visible;opacity:1}@keyframes _ngcontent-%COMP%_fadeIn{0%{opacity:0}to{opacity:1}}'],changeDetection:0})}}return o})();var h=c(5970);const f=["wordCloudContainer"];function g(o,a){if(1&o){const t=e.RV6();e.j41(0,"angular-tag-cloud",3),e.bIt("clicked",function(i){l.eBV(t);const s=e.XpG();return l.Njj(s.handleClicked(i))}),e.k0s()}if(2&o){const t=e.XpG();e.Y8G("data",t.data())("zoomOnHover",t.zoomOnHoverOptions())("width",t.containerSize().width)("height",t.containerSize().height)("overflow",t.overflow())("realignOnResize",!0)}}let b=(()=>{class o{words=(0,r.hFB)();entries=(0,r.hFB)();caseSensitive=(0,r.hFB)(!1);clickable=(0,r.hFB)(!1);multiSelect=(0,r.hFB)(!1);highlightSelection=(0,r.hFB)(!1);minWeight=(0,r.hFB)(1);maxWeight=(0,r.hFB)(5);maxWords=(0,r.hFB)(50);colorScheme=(0,r.hFB)(["var(--cue-chart-text-color)","var(--cue-chart-text-color-select)"]);overflow=(0,r.hFB)(!1);clickedWord=(0,r.CGW)();selectionChanged=(0,r.CGW)();wordCloudContainer;containerSize=(0,l.vPA)({width:0,height:0});selection=(0,l.vPA)([]);data=(0,d.EW)(()=>{const t=this.words(),n=this.entries();return n?.length||t?.length?n?.length?n:t?.length?this._buildEntriesFromWords(t):[]:[]});ngAfterViewInit(){const t=new MutationObserver(()=>{this._applySelectionStyles()});this.wordCloudContainer?.nativeElement&&t.observe(this.wordCloudContainer.nativeElement,{childList:!0,subtree:!0})}handleResize(t){0!==t.newRect.height&&this.containerSize.set({width:t.newRect.width,height:t.newRect.height})}styleSelection=(0,l.QZP)(()=>{this.selection(),this._applySelectionStyles()});zoomOnHoverOptions=(0,d.EW)(()=>({scale:1.1,transitionTime:this.clickable()?1.2:0,delay:.05}));_buildEntriesFromWords(t){const n=new Map;for(const v of t){const F=this.caseSensitive()?v:v.toLowerCase();n.set(F,(n.get(F)||0)+1)}const i=Array.from(n.entries());if(0===i.length)return[];const s=i.map(([,v])=>v),m=Math.min(...s),_=Math.max(...s);return _===m?i.map(([v])=>({text:v,weight:this.maxWeight()})):i.sort(([,v],[,F])=>F-v).slice(0,this.maxWords()).map(([v,F])=>({text:v,weight:this.minWeight()+(F-m)*(this.maxWeight()-this.minWeight())/(_-m),color:this.colorScheme()[Math.floor(Math.random()*this.colorScheme().length)]}))}_applySelectionStyles(){if(!this.highlightSelection())return;const t=this.wordCloudContainer?.nativeElement;void 0!==t&&t.querySelectorAll("span").forEach(i=>{i.textContent&&(this.selection().includes(i.textContent.trim())?i.classList.add("selected"):i.classList.remove("selected"))})}handleClicked(t){this.clickable()&&(this.clickedWord.emit(t.text),this.highlightSelection()&&(this.selection().includes(t.text)?this.selection.update(n=>n.filter(i=>i!==t.text)):this.multiSelect()?this.selection.update(n=>[...n,t.text]):this.selection.update(()=>[t.text])),this.selectionChanged.emit(this.selection()))}static \u0275fac=function(n){return new(n||o)};static \u0275cmp=e.VBU({type:o,selectors:[["cue-word-cloud"]],viewQuery:function(n,i){if(1&n&&e.GBs(f,5),2&n){let s;e.mGM(s=e.lsd())&&(i.wordCloudContainer=s.first)}},inputs:{words:[1,"words"],entries:[1,"entries"],caseSensitive:[1,"caseSensitive"],clickable:[1,"clickable"],multiSelect:[1,"multiSelect"],highlightSelection:[1,"highlightSelection"],minWeight:[1,"minWeight"],maxWeight:[1,"maxWeight"],maxWords:[1,"maxWords"],colorScheme:[1,"colorScheme"],overflow:[1,"overflow"]},outputs:{clickedWord:"clickedWord",selectionChanged:"selectionChanged"},decls:3,vars:5,consts:[["wordCloudContainer",""],["cueResized","",1,"wordcloud-container",3,"resized"],[3,"data","zoomOnHover","width","height","overflow","realignOnResize"],[3,"clicked","data","zoomOnHover","width","height","overflow","realignOnResize"]],template:function(n,i){1&n&&(e.j41(0,"div",1,0),e.bIt("resized",function(m){return i.handleResize(m)}),e.nVh(2,g,1,6,"angular-tag-cloud",2),e.k0s()),2&n&&(e.xc7("display",i.data().length?"block":"none"),e.AVh("clickable",i.clickable()),e.R7$(2),e.vxM(i.data().length?2:-1))},dependencies:[D,h.C],styles:["[_nghost-%COMP%]{display:block;width:100%;height:100%;min-height:200px}.wordcloud-container[_ngcontent-%COMP%]{width:100%;height:100%} .wordcloud-container.clickable angular-tag-cloud span{cursor:pointer} .selected{text-decoration:underline}"],changeDetection:0})}return o})();var O=c(5971),A=c(5448),B=c(3319),K=c(4372),ue=c(6950),W=c(7598),V=c(2245),Y=c(5381),$=c(7089),M=c(9352),Z=c(2444),me=c(9695),pe=c(5745),he=c(8957);let H=(()=>{class o{value="";lineHeight="1.5";agInit(t){this.value=t.value||"",this.lineHeight=t.colDef&&t.colDef.cellRendererParams&&t.colDef.cellRendererParams.lineHeight||t.context&&t.context.lineHeight||"1.5"}refresh(t){return this.value=t.value||"",!0}static \u0275fac=function(n){return new(n||o)};static \u0275cmp=e.VBU({type:o,selectors:[["cue-multiline-cell-renderer"]],decls:2,vars:3,consts:[[1,"multiline-cell"]],template:function(n,i){1&n&&(e.rj2(0,"div",0),e.EFF(1),e.eux()),2&n&&(e.xc7("line-height",i.lineHeight),e.R7$(),e.JRh(i.value))},styles:[".multiline-cell[_ngcontent-%COMP%]{white-space:pre-wrap;word-wrap:break-word;padding:4px 2px;text-align:left}"]})}return o})(),ge=(()=>{class o{_value=(0,l.vPA)("");_options=(0,l.vPA)([]);_disabled=(0,l.vPA)(!1);_disabledTooltip=(0,l.vPA)("");_canChange=(0,l.vPA)(void 0);_optionValues=(0,d.EW)(()=>this._options().map(t=>t.value));_labelMap=(0,d.EW)(()=>Object.fromEntries(this._options().map(t=>[t.value,t.label])));_params;agInit(t){this._apply(t)}refresh(t){return this._apply(t),!0}onValueChange(t){if(void 0===t)return;const n=String(t),i=this._canChange();i&&!i(n)||(this._value.set(n),this._params.setValue?.(n))}_apply(t){this._params=t,this._value.set(t.value??"");const n="function"==typeof t.colDef?.cellRendererParams?t.colDef.cellRendererParams(t):t.colDef?.cellRendererParams??{};this._options.set(n.options??[]),this._disabled.set(n.disabled??!1),this._disabledTooltip.set(n.disabledTooltip??""),this._canChange.set(n.canChange??void 0)}static \u0275fac=function(n){return new(n||o)};static \u0275cmp=e.VBU({type:o,selectors:[["cue-select-cell-renderer"]],decls:1,vars:7,consts:[[3,"valueChange","options","labelMap","value","underline","menuPosition","disabled","cueTooltip"]],template:function(n,i){1&n&&(e.j41(0,"cue-select",0),e.bIt("valueChange",function(m){return i.onValueChange(m)}),e.k0s()),2&n&&e.Y8G("options",i._optionValues())("labelMap",i._labelMap())("value",i._value())("underline",!1)("menuPosition","bottomleft")("disabled",i._disabled())("cueTooltip",i._disabled()?i._disabledTooltip():"")},dependencies:[Z.l,$.d],styles:["[_nghost-%COMP%]{display:block;width:100%;overflow:visible;--cue-input-value-color: currentColor}[_nghost-%COMP%] .select-trigger{font-size:var(--ag-font-size, inherit)}"],changeDetection:0})}return o})();var fe=c(7374),U=c.n(fe),_e=c(4955),ve=c.n(_e),Ce=c(5164),be=c.n(Ce);c(9785),c(2269),c(1409),c(4230),c(2494),c(9531),U().extend(ve()),U().extend(be());let xe=(()=>{class o{_transloco=(0,l.WQX)(M.JO);transform(t,n="dateTime"){if(!t)return"";const i=this._transloco.getActiveLang(),s=U()(t).locale(i);return"timeAgo"===n?s.fromNow():s.format("date"===n?"LL":"shortDate"===n?"L":"LLL")}static \u0275fac=function(n){return new(n||o)};static \u0275pipe=e.EJ8({name:"cueLocalDate",type:o,pure:!0})}return o})(),X=(()=>{class o{_value=(0,l.vPA)("");_format=(0,l.vPA)("dateTime");agInit(t){this._apply(t)}refresh(t){return this._apply(t),!0}_apply(t){this._value.set(t.value??""),this._format.set(t.colDef?.cellRendererParams?.dateFormat??"dateTime")}static \u0275fac=function(n){return new(n||o)};static \u0275cmp=e.VBU({type:o,selectors:[["cue-date-cell-renderer"]],decls:2,vars:4,template:function(n,i){1&n&&(e.EFF(0),e.nI1(1,"cueLocalDate")),2&n&&e.JRh(e.i5U(1,1,i._value(),i._format()))},dependencies:[xe],encapsulation:2,changeDetection:0})}return o})();const Me=["*"];function De(o,a){1&o&&e.SdG(0)}let ye=(()=>{class o{label=r.hFB.required();expanded=(0,r.geq)(!1);size=(0,r.hFB)("m");info=(0,r.hFB)("");expandToggled=(0,r.CGW)();toggle(){this.expanded.set(!this.expanded()),this.expandToggled.emit(this.expanded())}static \u0275fac=function(n){return new(n||o)};static \u0275cmp=e.VBU({type:o,selectors:[["cue-expansion-panel"]],inputs:{label:[1,"label"],expanded:[1,"expanded"],size:[1,"size"],info:[1,"info"]},outputs:{expanded:"expandedChange",expandToggled:"expandToggled"},ngContentSelectors:Me,decls:8,vars:9,consts:[["direction","column","gap","xs",2,"width","100%"],["justify","space-between","align","center",1,"expansion-header",3,"click"],[3,"size","info"],["variant","ghost",3,"size"],["icon","arrow-dropdown"]],template:function(n,i){1&n&&(e.NAR(),e.j41(0,"cue-flexcontainer",0)(1,"cue-flexcontainer",1),e.bIt("click",function(){return i.toggle()}),e.j41(2,"cue-typography",2),e.EFF(3),e.k0s(),e.j41(4,"cue-button",3)(5,"span"),e.nrm(6,"cue-button-icon",4),e.k0s()()(),e.nVh(7,De,1,0),e.k0s()),2&n&&(e.R7$(2),e.Y8G("size",i.size())("info",i.info()),e.R7$(),e.JRh(i.label()),e.R7$(),e.Y8G("size",i.size()),e.R7$(),e.AVh("rotate",!0)("rotate-180",i.expanded()),e.R7$(2),e.vxM(i.expanded()?7:-1))},dependencies:[V.Typography,Y.n,O.$,B.a],styles:[".expansion-header[_ngcontent-%COMP%]{cursor:pointer}.expansion-content[_ngcontent-%COMP%]{overflow:hidden;transition:max-height .3s cubic-bezier(.4,0,.2,1)}.rotate[_ngcontent-%COMP%]{transition:transform .3s cubic-bezier(.4,0,.2,1);display:inline-block}.rotate-180[_ngcontent-%COMP%]{transform:rotate(180deg)}"],changeDetection:0})}return o})();function q(o){if(o)return o.replace(/([A-Z])/g," $1").replace(/^./,a=>a.toUpperCase())}var ee=c(3183),te=c(5902);const Te=[{name:"ROUND",signature:"ROUND(?val, decimals)",description:"Round to N decimal places"},{name:"FLOOR",signature:"FLOOR(?val)",description:"Round down to nearest integer"},{name:"CEIL",signature:"CEIL(?val)",description:"Round up to nearest integer"},{name:"ABS",signature:"ABS(?val)",description:"Absolute value"},{name:"SQRT",signature:"SQRT(?val)",description:"Square root"},{name:"MIN",signature:"MIN(a, b)",description:"Smaller of two numbers"},{name:"MAX",signature:"MAX(a, b)",description:"Larger of two numbers"},{name:"CONCAT",signature:"CONCAT(a, b, ...)",description:"Concatenate strings"},{name:"PREFIX",signature:'PREFIX(?val, "text")',description:"Prepend text (skipped if value is empty)"},{name:"SUFFIX",signature:'SUFFIX(?val, "text")',description:"Append text (skipped if value is empty)"},{name:"TRIM",signature:"TRIM(?val)",description:"Remove leading/trailing whitespace"},{name:"UPPER",signature:"UPPER(?val)",description:"Convert to uppercase"},{name:"LOWER",signature:"LOWER(?val)",description:"Convert to lowercase"},{name:"LEN",signature:"LEN(?val)",description:"String length"},{name:"REPLACE",signature:'REPLACE(?val, "a", "b")',description:'Replace all occurrences of "a" with "b"'},{name:"NUM",signature:"NUM(?val)",description:"Parse as number"},{name:"STR",signature:"STR(?val)",description:"Convert to string"},{name:"IF",signature:"IF(condition, then, else)",description:"Conditional expression"},{name:"AFTER_LAST",signature:'AFTER_LAST(?val, "sep")',description:"Substring after the last occurrence of sep"},{name:"AFTER_FIRST",signature:'AFTER_FIRST(?val, "sep")',description:"Substring after the first occurrence of sep"},{name:"BEFORE_LAST",signature:'BEFORE_LAST(?val, "sep")',description:"Substring before the last occurrence of sep"},{name:"BEFORE_FIRST",signature:'BEFORE_FIRST(?val, "sep")',description:"Substring before the first occurrence of sep"},{name:"SEGMENT",signature:'SEGMENT(?val, "sep", n)',description:"Get the Nth segment (0-based) when splitting ?val by sep"}];function ie(o){const a=[];let t=0;for(;t<o.length;){if(/\s/.test(o[t])){t++;continue}if('"'===o[t]||"'"===o[t]){const i=o[t++];let s="";for(;t<o.length&&o[t]!==i;)s+="\\"===o[t]?o[++t]:o[t],t++;if(o[t]!==i)throw new Error("Unterminated string literal");t++,a.push({kind:"str",val:s});continue}const n=o.slice(t).match(/^(\d+\.?\d*|\.\d+)([eE][+-]?\d+)?/);if(n)a.push({kind:"num",val:n[0]}),t+=n[0].length;else{if("?"===o[t]){let i="?";for(t++;t<o.length&&/\w/.test(o[t]);)i+=o[t++];a.push({kind:"var",val:i});continue}if(/[A-Za-z_]/.test(o[t])){let i="";for(;t<o.length&&/\w/.test(o[t]);)i+=o[t++];a.push({kind:"ident",val:i.toUpperCase()});continue}if("**"!==o.slice(t,t+2)){if(!"+-*/%(),".includes(o[t]))throw new Error(`Unexpected character "${o[t]}" at position ${t}`);a.push({kind:"op",val:o[t++]})}else a.push({kind:"op",val:"**"}),t+=2}}return a.push({kind:"eof",val:""}),a}class oe{tokens;vars;pos=0;constructor(a,t){this.tokens=a,this.vars=t}parse(){const a=this.expr();if("eof"!==this.tokens[this.pos].kind)throw new Error(`Unexpected token "${this.tokens[this.pos].val}" after expression`);return a}peek(){return this.tokens[this.pos]}next(){return this.tokens[this.pos++]}eat(a){if(this.peek().val!==a)throw new Error(`Expected "${a}", got "${this.peek().val||"end of input"}"`);this.pos++}expr(){return this.additive()}additive(){let a=this.multiplicative();for(;"op"===this.peek().kind&&("+"===this.peek().val||"-"===this.peek().val);){const t=this.next().val,n=this.multiplicative();a="+"===t?"string"==typeof a||"string"==typeof n?String(a)+String(n):a+n:R(a)-R(n)}return a}multiplicative(){let a=this.power();for(;"op"===this.peek().kind&&("*"===this.peek().val||"/"===this.peek().val||"%"===this.peek().val);){const t=this.next().val,n=this.power();if("*"===t)a=R(a)*R(n);else if("/"===t){const i=R(n);a=0!==i?R(a)/i:0}else a=R(a)%R(n)}return a}power(){const a=this.unary();return"op"===this.peek().kind&&"**"===this.peek().val?(this.next(),Math.pow(R(a),R(this.power()))):a}unary(){return"op"===this.peek().kind&&"-"===this.peek().val?(this.next(),-R(this.primary())):this.primary()}primary(){const a=this.peek();if("num"===a.kind)return this.next(),Number(a.val);if("str"===a.kind)return this.next(),a.val;if("var"===a.kind)return this.next(),this.vars[a.val]??"";if("ident"===a.kind)return this.funcCall();if("op"===a.kind&&"("===a.val){this.next();const t=this.expr();return this.eat(")"),t}throw new Error(`Unexpected token: "${a.val}"`)}funcCall(){const a=this.next().val;this.eat("(");const t=[];if(")"!==this.peek().val)for(t.push(this.expr());","===this.peek().val;)this.next(),t.push(this.expr());return this.eat(")"),function Fe(o,a){const t=n=>a[n]??"";switch(o){case"ROUND":return Number(R(t(0)).toFixed(Math.max(0,R(t(1)))));case"FLOOR":return Math.floor(R(t(0)));case"CEIL":return Math.ceil(R(t(0)));case"ABS":return Math.abs(R(t(0)));case"SQRT":return Math.sqrt(R(t(0)));case"MIN":return Math.min(...a.map(R));case"MAX":return Math.max(...a.map(R));case"CONCAT":return a.map(n=>String(n)).join("");case"TRIM":return String(t(0)).trim();case"UPPER":return String(t(0)).toUpperCase();case"LOWER":return String(t(0)).toLowerCase();case"LEN":return String(t(0)).length;case"REPLACE":return String(t(0)).replaceAll(String(t(1)),String(t(2)));case"NUM":return R(t(0));case"STR":return String(t(0));case"PREFIX":return String(t(0))?String(t(1))+String(t(0)):String(t(0));case"SUFFIX":return String(t(0))?String(t(0))+String(t(1)):String(t(0));case"IF":return 0!==R(t(0))&&""!==t(0)&&"false"!==t(0)?t(1):t(2);case"AFTER_LAST":{const n=String(t(0)),i=String(t(1)),s=n.lastIndexOf(i);return-1===s?n:n.slice(s+i.length)}case"AFTER_FIRST":{const n=String(t(0)),i=String(t(1)),s=n.indexOf(i);return-1===s?n:n.slice(s+i.length)}case"BEFORE_LAST":{const n=String(t(0)),i=String(t(1)),s=n.lastIndexOf(i);return-1===s?n:n.slice(0,s)}case"BEFORE_FIRST":{const n=String(t(0)),i=String(t(1)),s=n.indexOf(i);return-1===s?n:n.slice(0,s)}case"SEGMENT":return String(t(0)).split(String(t(1)))[R(t(2))]??"";default:throw new Error(`Unknown function: "${o}"`)}}(a,t)}}function R(o){if("number"==typeof o)return o;const a=Number(o);return isNaN(a)?0:a}const ke=["*",[["","cueDisplayContent",""]],[["","cueDataContent",""]],[["","cueBehaviorContent",""]],[["","cueExtraContent",""]]],Re=["*","[cueDisplayContent]","[cueDataContent]","[cueBehaviorContent]","[cueExtraContent]"],Pe=(o,a)=>a.name;function Ee(o,a){if(1&o){const t=e.RV6();e.j41(0,"cue-input",7),e.nI1(1,"transloco"),e.bIt("valueChange",function(i){l.eBV(t);const s=e.XpG(2);return l.Njj(s.setLabel(i))}),e.k0s()}if(2&o){const t=e.XpG(2);e.Y8G("label",e.bMT(1,2,"components.agGridColumnSelect.labelLabel"))("value",t.label())}}function Ie(o,a){if(1&o){const t=e.RV6();e.j41(0,"cue-button",11),e.bIt("click",function(){const i=l.eBV(t).$implicit,s=e.XpG(3);return l.Njj(s.setTextAlign(i))}),e.nrm(1,"cue-button-icon",12),e.k0s()}if(2&o){const t=a.$implicit,n=e.XpG(3);e.Y8G("selected",n.textAlign()===t),e.R7$(),e.Y8G("icon",n.ALIGN_ICON[t])}}function Ne(o,a){if(1&o&&(e.j41(0,"cue-typography",8),e.EFF(1),e.nI1(2,"transloco"),e.k0s(),e.j41(3,"cue-flexcontainer",9),e.Z7z(4,Ie,2,2,"cue-button",10,e.Vm6),e.k0s()),2&o){const t=e.XpG(2);e.R7$(),e.SpI(" ",e.bMT(2,1,"components.agGridColumnSelect.labelTextAlign")," "),e.R7$(3),e.Dyx(t.alignOptions)}}function Oe(o,a){if(1&o){const t=e.RV6();e.j41(0,"cue-flexcontainer",6)(1,"cue-typography",13),e.nI1(2,"transloco"),e.EFF(3),e.nI1(4,"transloco"),e.k0s(),e.j41(5,"cue-input-switch",14),e.bIt("checkedChange",function(i){l.eBV(t);const s=e.XpG(2);return l.Njj(s.setMultiline(i))}),e.k0s()()}if(2&o){const t=e.XpG(2);e.R7$(),e.Y8G("cueTooltip",e.bMT(2,3,"components.agGridColumnSelect.tooltipMultiline")),e.R7$(2),e.JRh(e.bMT(4,5,"components.agGridColumnSelect.labelMultiline")),e.R7$(2),e.Y8G("checked",t.multiline())}}function Ge(o,a){if(1&o&&(e.j41(0,"cue-expansion-panel",2),e.nI1(1,"transloco"),e.j41(2,"cue-flexcontainer",4),e.nVh(3,Ee,2,4,"cue-input",5),e.nVh(4,Ne,6,3),e.nVh(5,Oe,6,7,"cue-flexcontainer",6),e.SdG(6,1),e.k0s()()),2&o){const t=e.XpG();e.Y8G("label",e.bMT(1,5,"components.agGridColumnSelect.groupDisplay"))("expanded",!0),e.R7$(3),e.vxM(t.settings().allowSettingLabel?3:-1),e.R7$(),e.vxM(t.settings().allowSettingTextAlign?4:-1),e.R7$(),e.vxM(t.settings().allowSettingMultiline?5:-1)}}function Le(o,a){if(1&o){const t=e.RV6();e.j41(0,"cue-select",16),e.nI1(1,"transloco"),e.bIt("valueChange",function(i){l.eBV(t);const s=e.XpG(2);return l.Njj(s.setFilterType(i))}),e.k0s()}if(2&o){const t=e.XpG(2);e.Y8G("label",e.bMT(1,4,"components.agGridColumnSelect.labelFilterType"))("value",t.filterType())("options",t.filterTypeOptions)("labelMap",t.filterTypeLabelMap())}}function Ae(o,a){if(1&o){const t=e.RV6();e.j41(0,"cue-input",7),e.nI1(1,"transloco"),e.bIt("valueChange",function(i){l.eBV(t);const s=e.XpG(2);return l.Njj(s.setEnumValues(i))}),e.k0s()}if(2&o){const t=e.XpG(2);e.Y8G("label",e.bMT(1,2,"components.agGridColumnSelect.labelEnumValues"))("value",t.enumValuesText())}}function je(o,a){if(1&o){const t=e.RV6();e.j41(0,"cue-select",16),e.bIt("valueChange",function(i){l.eBV(t);const s=e.XpG(3);return l.Njj(s.setDateFormat(i))}),e.k0s()}if(2&o){const t=e.XpG(3);e.Y8G("label",t._labelDateFormat())("value",t.dateFormat())("options",t.dateFormatOptions)("labelMap",t.dateFormatLabelMap())}}function ze(o,a){if(1&o){const t=e.RV6();e.j41(0,"cue-select",16),e.bIt("valueChange",function(i){l.eBV(t);const s=e.XpG(2);return l.Njj(s.setDataType(i))}),e.k0s(),e.nVh(1,je,1,4,"cue-select",15)}if(2&o){const t=e.XpG(2);e.Y8G("label",t._labelDataType())("value",t.dataType())("options",t.dataTypeOptions)("labelMap",t.dataTypeLabelMap()),e.R7$(),e.vxM("date"===t.dataType()?1:-1)}}function Be(o,a){if(1&o&&(e.j41(0,"cue-expansion-panel",3),e.nI1(1,"transloco"),e.j41(2,"cue-flexcontainer",4),e.nVh(3,Le,2,6,"cue-select",15),e.nVh(4,Ae,2,4,"cue-input",5),e.nVh(5,ze,2,5),e.SdG(6,2),e.k0s()()),2&o){const t=e.XpG();e.Y8G("label",e.bMT(1,4,"components.agGridColumnSelect.groupData")),e.R7$(3),e.vxM(t.settings().allowSettingFilterType?3:-1),e.R7$(),e.vxM(t.settings().allowSettingEnumValues?4:-1),e.R7$(),e.vxM(t.settings().allowSettingDataType?5:-1)}}function Ve(o,a){if(1&o){const t=e.RV6();e.j41(0,"cue-expansion-panel",3),e.nI1(1,"transloco"),e.j41(2,"cue-flexcontainer",4)(3,"cue-flexcontainer",6)(4,"cue-typography",13),e.nI1(5,"transloco"),e.EFF(6),e.nI1(7,"transloco"),e.k0s(),e.j41(8,"cue-input-switch",14),e.bIt("checkedChange",function(i){l.eBV(t);const s=e.XpG();return l.Njj(s.setEditable(i))}),e.k0s()(),e.SdG(9,3),e.k0s()()}if(2&o){const t=e.XpG();e.Y8G("label",e.bMT(1,4,"components.agGridColumnSelect.groupBehavior")),e.R7$(4),e.Y8G("cueTooltip",e.bMT(5,6,"components.agGridColumnSelect.tooltipAllowEditing")),e.R7$(2),e.JRh(e.bMT(7,8,"components.agGridColumnSelect.labelEditable")),e.R7$(2),e.Y8G("checked",t.editable())}}function We(o,a){if(1&o&&(e.j41(0,"cue-expansion-panel",2)(1,"cue-flexcontainer",4),e.SdG(2,4),e.k0s()()),2&o){const t=e.XpG();e.Y8G("label",t.extraPanelLabel())("expanded",t.extraPanelExpanded())}}function Ye(o,a){if(1&o&&(e.j41(0,"cue-typography",19),e.EFF(1),e.nI1(2,"transloco"),e.j41(3,"strong"),e.EFF(4),e.k0s()()),2&o){const t=e.XpG(2);e.R7$(),e.SpI(" ",e.bMT(2,2,"components.agGridColumnSelect.labelPostProcessPreview"),": "),e.R7$(3),e.JRh(t.postProcessFormulaPreview())}}function $e(o,a){if(1&o&&(e.j41(0,"cue-flexcontainer",21)(1,"cue-typography",22),e.EFF(2),e.k0s(),e.j41(3,"cue-typography",23),e.EFF(4),e.k0s()()),2&o){const t=a.$implicit;e.R7$(2),e.JRh(t.signature),e.R7$(2),e.JRh(t.description)}}function He(o,a){if(1&o){const t=e.RV6();e.j41(0,"cue-expansion-panel",3),e.nI1(1,"transloco"),e.j41(2,"cue-flexcontainer",17)(3,"cue-input",18),e.nI1(4,"transloco"),e.nI1(5,"transloco"),e.nI1(6,"transloco"),e.bIt("valueChange",function(i){l.eBV(t);const s=e.XpG();return l.Njj(s.setPostProcessFormula(i))}),e.k0s(),e.nVh(7,Ye,5,4,"cue-typography",19),e.j41(8,"cue-expansion-panel",20),e.nI1(9,"transloco"),e.j41(10,"cue-flexcontainer",17),e.Z7z(11,$e,5,2,"cue-flexcontainer",21,Pe),e.k0s()()()()}if(2&o){const t=e.XpG();e.Y8G("label",e.bMT(1,9,"components.agGridColumnSelect.groupPostProcess")),e.R7$(3),e.Y8G("label",e.bMT(4,11,"components.agGridColumnSelect.labelPostProcessFormula"))("info",e.bMT(5,13,"components.agGridColumnSelect.tooltipPostProcessFormula"))("placeholder",e.bMT(6,15,"components.agGridColumnSelect.placeholderPostProcessFormula"))("value",t.postProcessFormula())("error",t.postProcessFormulaError()??void 0),e.R7$(4),e.vxM(t.postProcessFormulaPreview()?7:-1),e.R7$(),e.Y8G("label",e.bMT(9,17,"components.agGridColumnSelect.labelPostProcessFunctions"))("expanded",!1),e.R7$(3),e.Dyx(t.formulaFunctions)}}class ae{allowEditing=!0;allowToggleEditable=!0;allowToggleHideOnHover=!0;allowSettingTextAlign=!0;allowSettingLabel=!0;allowSettingFilterType=!0;allowSettingMultiline=!0;allowSettingEnumValues=!0;allowSettingDataType=!1;allowSettingPostProcess=!0}const Xe={Text:te.U,Number:"agNumberColumnFilter",Date:"agDateColumnFilter",Select:ee.A,None:!1,Auto:!0},Ue={agTextColumnFilter:"Text",agNumberColumnFilter:"Number",agDateColumnFilter:"Date",false:"None",true:"Auto"};let Je=(()=>{class o{columnDef=r.geq.required();columnIndex=(0,r.hFB)();updateColumn=(0,r.CGW)();close=(0,r.CGW)();settings=r.hFB.required();extraPanelLabel=(0,r.hFB)();extraPanelExpanded=(0,r.hFB)(!0);minWidth=(0,r.hFB)("600px");alignOptions=["left","center","right"];filterTypeOptions=["Text","Number","Date","Select","None","Auto"];dateFormatOptions=["dateTime","date","shortDate","timeAgo"];dataTypeOptions=["text","number","date","boolean"];_labelDataType=(0,M.Xx)("components.agGridColumnSelect.labelDataType");_labelDateFormat=(0,M.Xx)("components.agGridColumnSelect.labelDateFormat");_dtText=(0,M.Xx)("components.agGridColumnSelect.dataTypeText");_dtNumber=(0,M.Xx)("components.agGridColumnSelect.dataTypeNumber");_dtDate=(0,M.Xx)("components.agGridColumnSelect.dataTypeDate");_dtBoolean=(0,M.Xx)("components.agGridColumnSelect.dataTypeBoolean");_dfDateTime=(0,M.Xx)("components.agGridColumnSelect.dateFormatDateTime");_dfDate=(0,M.Xx)("components.agGridColumnSelect.dateFormatDate");_dfShortDate=(0,M.Xx)("components.agGridColumnSelect.dateFormatShortDate");_dfTimeAgo=(0,M.Xx)("components.agGridColumnSelect.dateFormatTimeAgo");dataTypeLabelMap=(0,d.EW)(()=>({text:this._dtText(),number:this._dtNumber(),date:this._dtDate(),boolean:this._dtBoolean()}));dateFormatLabelMap=(0,d.EW)(()=>({dateTime:this._dfDateTime(),date:this._dfDate(),shortDate:this._dfShortDate(),timeAgo:this._dfTimeAgo()}));_labelText=(0,M.Xx)("components.agGridColumnSelect.filterTypeText");_labelNumber=(0,M.Xx)("components.agGridColumnSelect.filterTypeNumber");_labelDate=(0,M.Xx)("components.agGridColumnSelect.filterTypeDate");_labelSelect=(0,M.Xx)("components.agGridColumnSelect.filterTypeSelect");_labelNone=(0,M.Xx)("components.agGridColumnSelect.filterTypeNone");_labelAuto=(0,M.Xx)("components.agGridColumnSelect.filterTypeAuto");filterTypeLabelMap=(0,d.EW)(()=>({Text:this._labelText(),Number:this._labelNumber(),Date:this._labelDate(),Select:this._labelSelect(),None:this._labelNone(),Auto:this._labelAuto()}));ALIGN_ICON={center:"text-align-center",left:"text-align-left",right:"text-align-right"};dataType=(0,d.EW)(()=>{const t=this.columnDef().cellRenderer;return t===X||"DateCellRenderer"===t?"date":"text"});dateFormat=(0,d.EW)(()=>{const t=this.columnDef().cellRenderer;return t===X||"DateCellRenderer"===t?this.columnDef().cellRendererParams?.dateFormat??"dateTime":"dateTime"});editable=(0,d.EW)(()=>!0===this.columnDef().editable);multiline=(0,d.EW)(()=>{const t=this.columnDef().cellRenderer;return t===H||"MultilineCellRenderer"===t});_ALIGN_TO_FLEX={left:"flex-start",right:"flex-end",center:"center"};_FLEX_TO_ALIGN={"flex-start":"left","flex-end":"right",center:"center",left:"left",right:"right"};textAlign=(0,d.uu)(()=>{const t=this.columnDef().cellStyle;return t?.textAlign||this._FLEX_TO_ALIGN[t?.justifyContent]||"left"});filterType=(0,d.EW)(()=>{const t=this.columnDef().filter;return t===ee.A?"Select":t===te.U?"Text":Ue[t]||"Auto"});enumValuesText=(0,d.EW)(()=>(this.columnDef().cellRendererParams?.options??[]).map(n=>n.value).join(", "));label=(0,d.EW)(()=>this.columnDef().headerName||q(this.columnDef().field)||"Unknown");setEditable(t){const n=this.columnDef().cellRendererParams;this.updateColumn.emit(n?.options?.length?{editable:t,cellRendererParams:{...n,disabled:!t}}:{editable:t})}setMultiline(t){this.updateColumn.emit({cellRenderer:t?H:void 0,cellRendererParams:{lineHeight:"1.8"},autoHeight:!0})}setLabel(t){this.updateColumn.emit({headerName:t})}setTextAlign(t){const n=this.columnDef().cellStyle||{};this.updateColumn.emit({cellStyle:{...n,display:"flex",justifyContent:this._ALIGN_TO_FLEX[t]??t,textAlign:t},headerClass:`header-align-${t}`}),this.textAlign.set(t)}setFilterType(t){this.updateColumn.emit({filter:Xe[t]??!0})}setEnumValues(t){const n=t.split(",").map(i=>i.trim()).filter(i=>i.length>0);if(0===n.length)this.updateColumn.emit({cellRenderer:void 0,cellRendererParams:void 0});else{const i=n.map(s=>({value:s,label:s}));this.updateColumn.emit({cellRenderer:ge,cellRendererParams:{options:i,disabled:!this.editable()}})}}setDateFormat(t){t&&this.updateColumn.emit({cellRenderer:X,cellRendererParams:{dateFormat:t}})}setDataType(t){this.updateColumn.emit("date"===t?{cellRenderer:X,cellRendererParams:{dateFormat:"dateTime"}}:{cellRenderer:void 0,cellRendererParams:void 0})}formulaFunctions=Te;postProcessFormula=(0,d.EW)(()=>function Se(o){return o&&"none"!==o.type?"round"===o.type?`ROUND(?val, ${o.decimals})`:"prefix"===o.type?`PREFIX(?val, "${o.value.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}")`:"suffix"===o.type?`SUFFIX(?val, "${o.value.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}")`:"formula"===o.type?o.expression:"":""}(this.columnDef().postProcess));postProcessFormulaError=(0,d.EW)(()=>function we(o){if(!o||!o.trim())return null;try{const a=ie(o);return new oe(a,{"?val":"42"}).parse(),null}catch(a){return a?.message??"Invalid formula"}}(this.postProcessFormula()));postProcessFormulaPreview=(0,d.EW)(()=>{const t=this.postProcessFormula();return!t||this.postProcessFormulaError()?"":function ne(o,a){if(!o||!o.trim())return a;try{const t=ie(o),n=new oe(t,{"?val":a}).parse();return null==n?"":String(n)}catch{return a}}(t,"42")});setPostProcessFormula(t){const n=t.trim();this.updateColumn.emit({postProcess:n?{type:"formula",expression:n}:void 0})}static \u0275fac=function(n){return new(n||o)};static \u0275cmp=e.VBU({type:o,selectors:[["cue-table-column-settings-modal"]],inputs:{columnDef:[1,"columnDef"],columnIndex:[1,"columnIndex"],settings:[1,"settings"],extraPanelLabel:[1,"extraPanelLabel"],extraPanelExpanded:[1,"extraPanelExpanded"],minWidth:[1,"minWidth"]},outputs:{columnDef:"columnDefChange",updateColumn:"updateColumn",close:"close"},ngContentSelectors:Re,decls:9,vars:9,consts:[[3,"close","label","minWidth"],["direction","column","gap","s",2,"overflow-y","auto","max-height","70vh","min-height","0","width","100%"],[3,"label","expanded"],[3,"label"],["direction","column"],[3,"label","value"],["direction","row","gap","l","justify","space-between","align","center"],[3,"valueChange","label","value"],["size","s"],["direction","row"],["variant","tertiary","size","s",3,"selected"],["variant","tertiary","size","s",3,"click","selected"],[3,"icon"],["size","m",3,"cueTooltip"],["size","m",3,"checkedChange","checked"],[3,"label","value","options","labelMap"],[3,"valueChange","label","value","options","labelMap"],["direction","column","gap","xs"],[3,"valueChange","label","info","placeholder","value","error"],["size","xs",2,"opacity","0.65"],["size","s",3,"label","expanded"],["direction","row","gap","s","align","start"],["size","xs",2,"font-family","monospace","min-width","210px","flex-shrink","0"],["size","xs",2,"opacity","0.7"]],template:function(n,i){1&n&&(e.NAR(ke),e.j41(0,"cue-modal",0),e.nI1(1,"transloco"),e.bIt("close",function(){return i.close.emit()}),e.j41(2,"cue-flexcontainer",1),e.nVh(3,Ge,7,7,"cue-expansion-panel",2),e.nVh(4,Be,7,6,"cue-expansion-panel",3),e.nVh(5,Ve,10,10,"cue-expansion-panel",3),e.nVh(6,We,3,2,"cue-expansion-panel",2),e.nVh(7,He,13,19,"cue-expansion-panel",3),e.SdG(8),e.k0s()()),2&n&&(e.Y8G("label",e.bMT(1,7,"components.agGridColumnSelect.titleColumnSettings"))("minWidth",i.minWidth()),e.R7$(3),e.vxM(i.settings().allowSettingLabel||i.settings().allowSettingTextAlign||i.settings().allowSettingMultiline?3:-1),e.R7$(),e.vxM(i.settings().allowSettingFilterType||i.settings().allowSettingEnumValues||i.settings().allowSettingDataType?4:-1),e.R7$(),e.vxM(i.settings().allowToggleEditable?5:-1),e.R7$(),e.vxM(i.extraPanelLabel()?6:-1),e.R7$(),e.vxM(i.settings().allowSettingPostProcess?7:-1))},dependencies:[pe.a,Y.n,V.Typography,Z.l,me.d,$.d,he.p,O.$,B.a,ye,M.Kj],encapsulation:2,changeDetection:0})}return o})();var se=c(9769);const le=o=>[o],Qe=(o,a)=>({$implicit:o,index:a});function Ke(o,a){if(1&o){const t=e.RV6();e.j41(0,"cue-table-column-settings-modal",9),e.bIt("updateColumn",function(i){const s=l.eBV(t),m=e.XpG();return l.Njj(m.updateColumnDef(s.index,i))})("close",function(){l.eBV(t);const i=e.XpG();return l.Njj(i.handleModalClose())}),e.k0s()}if(2&o){const t=a,n=e.XpG();e.Y8G("columnDef",t.col)("columnIndex",t.index)("settings",n.settings())}}function Ze(o,a){1&o&&e.eu8(0)}function qe(o,a){if(1&o&&e.DNE(0,Ze,1,0,"ng-container",13),2&o){const t=e.XpG(),n=t.$implicit,i=t.$index;e.Y8G("ngTemplateOutlet",a.templateRef)("ngTemplateOutletContext",e.l_i(2,Qe,n,i))}}function et(o,a){if(1&o){const t=e.RV6();e.j41(0,"cue-button",14),e.nI1(1,"transloco"),e.bIt("click",function(){l.eBV(t);const i=e.XpG(),s=i.$implicit,m=i.$index,_=e.XpG();return l.Njj(_.showColumnSettings(s,m))}),e.nrm(2,"cue-button-icon",15),e.k0s()}2&o&&e.Y8G("cueTooltip",e.bMT(1,1,"components.agGridColumnSelect.tooltipSettings"))}function tt(o,a){if(1&o&&(e.j41(0,"div",8)(1,"cue-flexcontainer",10)(2,"cue-typography"),e.EFF(3),e.k0s(),e.nrm(4,"span",11),e.nVh(5,qe,1,5,"ng-container"),e.nVh(6,et,3,3,"cue-button",12),e.k0s()()),2&o){let t;const n=a.$implicit,i=e.XpG();e.R7$(3),e.JRh(i.getLabel(n)),e.R7$(2),e.vxM((t=i.columnItemTpl())?5:-1,t),e.R7$(),e.vxM(i.settings().allowEditing?6:-1)}}function nt(o,a){1&o&&e.eu8(0)}function it(o,a){1&o&&e.DNE(0,nt,1,0,"ng-container",16),2&o&&e.Y8G("ngTemplateOutlet",a.templateRef)}function ot(o,a){if(1&o&&(e.j41(0,"div",8)(1,"cue-typography"),e.EFF(2),e.k0s()()),2&o){const t=a.$implicit,n=e.XpG();e.R7$(2),e.JRh(n.getLabel(t))}}let re=(()=>{class o{templateRef=(0,l.WQX)(e.C4Q);static ngTemplateContextGuard(t,n){return!0}static \u0275fac=function(n){return new(n||o)};static \u0275dir=e.FsC({type:o,selectors:[["","cueColumnItem",""]]})}return o})(),ce=(()=>{class o{templateRef=(0,l.WQX)(e.C4Q);static \u0275fac=function(n){return new(n||o)};static \u0275dir=e.FsC({type:o,selectors:[["","cueColumnListFooter",""]]})}return o})(),at=(()=>{class o{columnDefs=r.geq.required();columnDefsGross=(0,r.geq)([]);settings=(0,r.hFB)(new ae);shown=(0,r.CGW)();columnItemTpl=(0,r.sbv)(re);columnListFooterTpl=(0,r.sbv)(ce);shownColumns=(0,l.vPA)([]);hiddenColumns=(0,l.vPA)([]);displayColumnSettings=(0,l.vPA)(void 0);onNoColumnDefsGross=(0,l.QZP)(()=>{(!this.columnDefsGross()||0===this.columnDefsGross().length)&&this.columnDefsGross.set(this.columnDefs())});onColumnDefs=(0,l.QZP)(()=>{const t=this.columnDefs().map(i=>i.field),n=this.columnDefsGross().filter(i=>!t.includes(i.field));this.shownColumns.update(()=>[...this.columnDefs()]),this.hiddenColumns.update(()=>[...n])});drop(t){t.previousContainer===t.container?(0,W.HD)(t.container.data,t.previousIndex,t.currentIndex):(0,W.eg)(t.previousContainer.data,t.container.data,t.previousIndex,t.currentIndex);const n=this.shownColumns();this.columnDefs.update(()=>[...n]),this.shown.emit(n)}showColumnSettings(t,n){this.displayColumnSettings.set({col:t,index:n})}updateColumnDef(t,n){const i=this.columnDefs().map((s,m)=>m===t?{...s,...n}:s);this.columnDefs.set(i),this.shown.emit(i),this.shownColumns.set(i)}getLabel(t){return t.headerName||q(t.field)||"Unknown"}handleModalClose(){this.displayColumnSettings.set(void 0)}static \u0275fac=function(n){return new(n||o)};static \u0275cmp=e.VBU({type:o,selectors:[["cue-ag-grid-column-select"]],contentQueries:function(n,i,s){1&n&&e.C6U(s,i.columnItemTpl,re,5)(s,i.columnListFooterTpl,ce,5),2&n&&e.NyB(2)},inputs:{columnDefs:[1,"columnDefs"],columnDefsGross:[1,"columnDefsGross"],settings:[1,"settings"]},outputs:{columnDefs:"columnDefsChange",columnDefsGross:"columnDefsGrossChange",shown:"shown"},decls:22,vars:19,consts:[["todoList","cdkDropList"],["doneList","cdkDropList"],[3,"columnDef","columnIndex","settings"],["size","xs","color","muted",2,"display","block","margin-bottom","8px"],["direction","row",2,"align-items","stretch","gap","12px"],["direction","column",1,"panel"],["size","l"],["cdkDropList","",1,"list",3,"cdkDropListDropped","cdkDropListData","cdkDropListConnectedTo"],["cdkDrag","",1,"box","draggable"],[3,"updateColumn","close","columnDef","columnIndex","settings"],["front","","justify","space-between","align","center",2,"width","100%"],[2,"display","flex","flex","1"],["variant","tertiary","size","s",3,"cueTooltip"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["variant","tertiary","size","s",3,"click","cueTooltip"],["icon","settings"],[4,"ngTemplateOutlet"]],template:function(n,i){if(1&n&&(e.nVh(0,Ke,1,3,"cue-table-column-settings-modal",2),e.j41(1,"cue-typography",3),e.EFF(2),e.nI1(3,"transloco"),e.k0s(),e.j41(4,"cue-flexcontainer",4)(5,"cue-flexcontainer",5)(6,"cue-typography",6),e.EFF(7),e.nI1(8,"transloco"),e.k0s(),e.j41(9,"div",7,0),e.bIt("cdkDropListDropped",function(m){return i.drop(m)}),e.Z7z(11,tt,7,3,"div",8,e.Vm6),e.nVh(13,it,1,1,"ng-container"),e.k0s()(),e.j41(14,"cue-flexcontainer",5)(15,"cue-typography",6),e.EFF(16),e.nI1(17,"transloco"),e.k0s(),e.j41(18,"div",7,1),e.bIt("cdkDropListDropped",function(m){return i.drop(m)}),e.Z7z(20,ot,3,1,"div",8,e.Vm6),e.k0s()()()),2&n){let s,m;const _=e.sdS(10),y=e.sdS(19);e.vxM((s=i.displayColumnSettings())?0:-1,s),e.R7$(2),e.JRh(e.bMT(3,9,"components.agGridColumnSelect.dragHint")),e.R7$(5),e.JRh(e.bMT(8,11,"components.agGridColumnSelect.titleShown"));const v=i.shownColumns();e.R7$(2),e.Y8G("cdkDropListData",v)("cdkDropListConnectedTo",e.eq3(15,le,y)),e.R7$(2),e.Dyx(v),e.R7$(2),e.vxM((m=i.columnListFooterTpl())?13:-1,m),e.R7$(3),e.JRh(e.bMT(17,13,"components.agGridColumnSelect.titleHidden"));const F=i.hiddenColumns();e.R7$(2),e.Y8G("cdkDropListData",F)("cdkDropListConnectedTo",e.eq3(17,le,_)),e.R7$(2),e.Dyx(F)}},dependencies:[W.O7,W.T1,V.Typography,Y.n,O.$,B.a,$.d,Je,se.T3,M.Kj],styles:[".panel[_ngcontent-%COMP%]{width:50%;display:flex;flex-direction:column;gap:8px}.list[_ngcontent-%COMP%]{border:1px solid var(--cue-card-border-color);min-height:60px;flex:1;background:var(--cue-main-background);border-radius:var(--cue-card-border-radius);overflow:hidden;display:block}.list.cdk-drop-list-receiving[_ngcontent-%COMP%]{border-color:var(--cue-primary);border-style:dashed}.box[_ngcontent-%COMP%]{padding:calc(var(--cue-card-padding-y) * .6) var(--cue-card-padding-x);border-bottom:1px solid var(--cue-card-border-color);color:var(--cue-main-foreground);display:flex;flex-direction:row;align-items:center;justify-content:space-between;box-sizing:border-box;background:var(--cue-main-background);font-size:14px;transition:background .15s ease}.box[_ngcontent-%COMP%]:hover{background:color-mix(in srgb,var(--cue-main-foreground) 5%,var(--cue-main-background))}.draggable[_ngcontent-%COMP%]{cursor:grab}.draggable[_ngcontent-%COMP%]:active{cursor:grabbing}.cdk-drag-preview[_ngcontent-%COMP%]{box-sizing:border-box;border-radius:var(--cue-card-border-radius);border:1px solid var(--cue-card-border-color);background:var(--cue-main-background);color:var(--cue-main-foreground);padding:calc(var(--cue-card-padding-y) * .6) var(--cue-card-padding-x);font-size:14px;box-shadow:var(--cue-card-box-shadow)}.cdk-drag-placeholder[_ngcontent-%COMP%]{background:color-mix(in srgb,var(--cue-primary) 10%,var(--cue-main-background));border-bottom:1px dashed var(--cue-primary);min-height:40px;opacity:1}.cdk-drag-animating[_ngcontent-%COMP%]{transition:transform .25s cubic-bezier(0,0,.2,1)}.box[_ngcontent-%COMP%]:last-child{border-bottom:none}.list.cdk-drop-list-dragging[_ngcontent-%COMP%] .box[_ngcontent-%COMP%]:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}"],changeDetection:0})}return o})();function st(o,a){if(1&o&&(l.qSk(),e.j41(0,"svg",0),e.nrm(1,"path",3)(2,"path",4),e.k0s()),2&o){const t=e.XpG();e.R7$(),e.BMQ("fill",t.colorDark()),e.R7$(),e.BMQ("fill",t.color())}}function lt(o,a){if(1&o&&(l.qSk(),e.j41(0,"svg",1),e.nrm(1,"path",5)(2,"path",6)(3,"path",7),e.k0s()),2&o){const t=e.XpG();e.R7$(2),e.BMQ("fill",t.color())}}const z_blue="#175EBB",rt={".dwg":z_blue,".dxf":z_blue,".doc":z_blue,".docx":z_blue,".ifc":"#9F388D",".pdf":"#E03833",".ppt":z_blue,".pptx":z_blue,".csv":"#0b7741",".xls":"#0b7741",".xlsx":"#0b7741",folder:"#9D9998"};let ct=(()=>{class o{suffix=r.hFB.required();size=(0,r.hFB)("m");color=(0,d.EW)(()=>rt[this.suffix()]??"#9D9998");label=(0,d.EW)(()=>this.suffix().startsWith(".")?this.suffix().toUpperCase().replace(/^\./,""):"");className=(0,d.EW)(()=>`size-${this.size()}`);colorDark=(0,d.EW)(()=>{const t=this.color(),n=parseInt(t.slice(1),16),s=n>>8&255,m=255&n;return`#${(Math.floor(.8*(n>>16&255))<<16|Math.floor(.8*s)<<8|Math.floor(.8*m)).toString(16).padStart(6,"0")}`});static \u0275fac=function(n){return new(n||o)};static \u0275cmp=e.VBU({type:o,selectors:[["cue-file-icon"]],hostVars:2,hostBindings:function(n,i){2&n&&e.HbH(i.className())},inputs:{suffix:[1,"suffix"],size:[1,"size"]},decls:4,vars:2,consts:[["xmlns","http://www.w3.org/2000/svg","width","100%","height","100%","viewBox","0 0 48 48"],["xmlns","http://www.w3.org/2000/svg","viewBox","0 0 24 30"],["size","xs","align","center","weight","semibold"],["d","M40 12H22l-4-4H8c-2.2 0-4 1.8-4 4v8h40v-4c0-2.2-1.8-4-4-4"],["d","M40 12H8c-2.2 0-4 1.8-4 4v20c0 2.2 1.8 4 4 4h32c2.2 0 4-1.8 4-4V16c0-2.2-1.8-4-4-4"],["fill","var(--cue-border-color)","d","M16.2.5H4.1C2.1.5.5 2.1.5 4.1v22.3c0 1.7 1.4 3.1 3.1 3.1h16.8c1.7 0 3.1-1.4 3.1-3.1V7.8h-.1c0-.1-7-7.1-7-7.1h-.1l-.1-.2Z"],["d","M4.1 1C2.4 1 1 2.4 1 4.1v22.3C1 27.8 2.2 29 3.6 29h16.8c1.4 0 2.6-1.2 2.6-2.6V8l-7-7H4.1Z"],["fill","#fff","d","M16 6c0 1.1.9 2 2 2h5l-7-7v5Z","opacity",".3"]],template:function(n,i){1&n&&(e.nVh(0,st,3,2,":svg:svg",0)(1,lt,4,1,":svg:svg",1),e.j41(2,"cue-typography",2),e.EFF(3),e.k0s()),2&n&&(e.vxM("folder"===i.suffix()?0:1),e.R7$(3),e.JRh(i.label()))},dependencies:[V.Typography],styles:["[_nghost-%COMP%]{display:block;position:relative;aspect-ratio:30 / 24;width:var(--cue-dim-elem-m)}.size-xs[_nghost-%COMP%]{width:var(--cue-dim-elem-xs)}.size-s[_nghost-%COMP%]{width:var(--cue-dim-elem-s)}[_nghost-%COMP%] svg[_ngcontent-%COMP%]{display:block;width:100%;height:auto}[_nghost-%COMP%] cue-typography[_ngcontent-%COMP%]{color:#fff;text-transform:uppercase;position:absolute;left:50%;bottom:24%;transform:translate(-50%)}"]})}return o})(),dt=(()=>{class o{suffix=(0,l.vPA)("");iconSize=(0,l.vPA)("xs");agInit(t){this._apply(t)}refresh(t){return this._apply(t),!0}_apply(t){this.suffix.set(t.value||"folder"),this.iconSize.set({xs:"xs",s:"xs",m:"xs",l:"s",xl:"m"}[t.colDef?.cellRendererParams?.iconSize??t.iconSize??"xs"]??"xs")}static \u0275fac=function(n){return new(n||o)};static \u0275cmp=e.VBU({type:o,selectors:[["cue-file-icon-cell-renderer"]],decls:1,vars:2,consts:[[3,"suffix","size"]],template:function(n,i){1&n&&e.nrm(0,"cue-file-icon",0),2&n&&e.Y8G("suffix",i.suffix())("size",i.iconSize())},dependencies:[ct],styles:["[_nghost-%COMP%]{display:flex;align-items:center;justify-content:center;width:100%;height:100%}"],changeDetection:0})}return o})();var ut=c(6117),mt=c(29),pt=c(1951),ht=c(1493),gt=c(5187),ft=c(356),_t=c(6279);let vt=(()=>{class o{cueFlip=(0,r.geq)(!1);get flipped(){return this.cueFlip()}static \u0275fac=function(n){return new(n||o)};static \u0275dir=e.FsC({type:o,selectors:[["","cueFlip",""]],hostVars:2,hostBindings:function(n,i){2&n&&e.AVh("flipped",i.flipped)},inputs:{cueFlip:[1,"cueFlip"]},outputs:{cueFlip:"cueFlipChange"}})}return o})();const Ct=(o,a)=>a.id;function bt(o,a){if(1&o){const t=e.RV6();e.j41(0,"li",9),e.bIt("click",function(){const i=l.eBV(t).$implicit,s=e.XpG(3);return l.Njj(s.handleSimpleRowClick(i))}),e.j41(1,"cue-typography",10),e.EFF(2),e.k0s(),e.j41(3,"cue-typography",11),e.EFF(4),e.k0s()()}if(2&o){const t=a.$implicit,n=e.XpG(3);e.AVh("active",n.selectedSimpleDocumentId()===t.id),e.R7$(),e.Y8G("noWrap",!0)("title",t.name),e.R7$(),e.SpI(" ",t.name," "),e.R7$(2),e.SpI(" ",(t.suffix||"").replace(".","").toUpperCase()," ")}}function xt(o,a){if(1&o&&(e.j41(0,"ul",5),e.Z7z(1,bt,5,6,"li",8,Ct),e.k0s()),2&o){const t=e.XpG(2);e.R7$(),e.Dyx(t.simpleDocumentsInt())}}function Mt(o,a){if(1&o&&(e.j41(0,"cue-flexcontainer",6)(1,"cue-typography",12),e.EFF(2),e.k0s()()),2&o){const t=e.XpG(2);e.R7$(2),e.SpI(" ",0===t.documentRefs().length&&0===t.documents().length&&t.handlers()?"No documents":t.infoLoading()," ")}}function Dt(o,a){if(1&o){const t=e.RV6();e.j41(0,"cue-flexcontainer",7)(1,"cue-typography",13),e.EFF(2),e.k0s(),e.j41(3,"cue-flexcontainer",14)(4,"cue-button",15),e.bIt("click",function(){l.eBV(t);const i=e.XpG(2);return l.Njj(i.previousSimplePage())}),e.nrm(5,"cue-button-icon",16),e.k0s(),e.j41(6,"cue-button",15),e.bIt("click",function(){l.eBV(t);const i=e.XpG(2);return l.Njj(i.nextSimplePage())}),e.nrm(7,"cue-button-icon",17),e.k0s()()()}if(2&o){const t=e.XpG(2);e.R7$(2),e.E5c(" ",t.simpleDisplayStart(),"-",t.simpleDisplayEnd()," / ",t.documentsInt().length," "),e.R7$(2),e.Y8G("disabled",!t.simpleHasPreviousPage()),e.R7$(2),e.Y8G("disabled",!t.simpleHasNextPage())}}function yt(o,a){if(1&o&&(e.j41(0,"div",3),e.nVh(1,xt,3,0,"ul",5)(2,Mt,3,1,"cue-flexcontainer",6),e.nVh(3,Dt,8,5,"cue-flexcontainer",7),e.k0s()),2&o){const t=e.XpG();e.R7$(),e.vxM(t.simpleDocumentsInt().length>0?1:2),e.R7$(2),e.vxM(t.documentsInt().length>0?3:-1)}}function St(o,a){if(1&o&&e.nrm(0,"cue-svg-icon",34),2&o){const t=e.XpG().$implicit;e.Y8G("name",t.icon)}}function Tt(o,a){if(1&o){const t=e.RV6();e.j41(0,"cue-menu-item",33),e.bIt("click",function(){const i=l.eBV(t).$implicit;return l.Njj(null==i?null:i.action())}),e.nVh(1,St,1,1,"cue-svg-icon",34),e.EFF(2),e.k0s()}if(2&o){const t=a.$implicit;e.R7$(),e.vxM(t.icon?1:-1),e.R7$(),e.SpI(" ",t.label)}}function wt(o,a){if(1&o){const t=e.RV6();e.j41(0,"cue-flexcontainer",24)(1,"cue-menu",25)(2,"cue-button",26,2),e.nrm(4,"cue-button-icon",27),e.k0s(),e.j41(5,"cue-menu-wrap",28),e.Z7z(6,Tt,3,2,"cue-menu-item",null,e.Vm6),e.k0s()(),e.j41(8,"cue-button",29),e.nI1(9,"transloco"),e.bIt("click",function(){l.eBV(t);const i=e.XpG(2);return l.Njj(i.flipped.set(!0))}),e.nrm(10,"cue-button-icon",30),e.k0s()(),e.j41(11,"div",31)(12,"cue-ag-grid",32),e.bIt("gridApiReady",function(i){l.eBV(t);const s=e.XpG(2);return l.Njj(s.onGridReady(i))})("selectedRows",function(i){l.eBV(t);const s=e.XpG(2);return l.Njj(s.clickedDocument.emit(i[0]))}),e.k0s()()}if(2&o){const t=e.XpG(2);e.R7$(6),e.Dyx(t.tableMenu()),e.R7$(2),e.Y8G("cueTooltip",e.bMT(9,9,"components.documentList.tooltipColumnSettings")),e.R7$(4),e.AVh("hidden",t.tableHidden()),e.Y8G("paginationPageSize",t.pageSize())("rowSelection",t.rowSelection)("rowData",t.documentsInt())("columnDefs",t.columnDefs())("overlaySettings",t.overlaySettings())("overlayActions",t.overlayActions())}}function Ft(o,a){if(1&o){const t=e.RV6();e.j41(0,"cue-flexcontainer",41),e.bIt("click",function(){l.eBV(t);const i=e.XpG(3);return l.Njj(i.applyTagFilter())}),e.j41(1,"cue-button",42)(2,"cue-button-label"),e.EFF(3,"Apply"),e.k0s()()()}}function kt(o,a){if(1&o){const t=e.RV6();e.j41(0,"cue-flexcontainer",24)(1,"cue-button",35),e.bIt("click",function(){l.eBV(t);const i=e.XpG(2);return l.Njj(i.showFront())}),e.nrm(2,"cue-button-icon",36),e.k0s()(),e.j41(3,"cue-flexcontainer",37)(4,"cue-word-cloud",38),e.bIt("selectionChanged",function(i){l.eBV(t);const s=e.XpG(2);return l.Njj(s.tagSelection.set(i))}),e.k0s(),e.nVh(5,Ft,4,0,"cue-flexcontainer",39),e.k0s(),e.j41(6,"cue-ag-grid-column-select",40),e.mxI("columnDefsChange",function(i){l.eBV(t);const s=e.XpG(2);return e.DH7(s.columnDefs,i)||(s.columnDefs=i),l.Njj(i)}),e.k0s()}if(2&o){const t=e.XpG(2);e.R7$(3),e.AVh("hidden",!t.showTagFilterCloud()),e.R7$(),e.Y8G("words",t.tags())("clickable",!0)("overflow",!0)("multiSelect",!0)("highlightSelection",!0),e.R7$(),e.vxM(t.filterToBeApplied()?5:-1),e.R7$(),e.AVh("hidden",t.showTagFilterCloud()),e.Y8G("settings",t.columnSelectSettings),e.R50("columnDefs",t.columnDefs),e.Y8G("columnDefsGross",t.columnDefsGross())}}function Rt(o,a){if(1&o&&(e.j41(0,"cue-card",20),e.eu8(1,43),e.k0s()),2&o){e.XpG();const t=e.sdS(3),n=e.XpG();e.Y8G("variant",n._cardVariant()),e.R7$(),e.Y8G("ngTemplateOutlet",t)}}function Pt(o,a){if(1&o&&(e.j41(0,"div",21),e.eu8(1,43),e.k0s()),2&o){e.XpG();const t=e.sdS(3);e.R7$(),e.Y8G("ngTemplateOutlet",t)}}function Et(o,a){if(1&o&&(e.j41(0,"cue-card",22),e.eu8(1,43),e.k0s()),2&o){e.XpG();const t=e.sdS(5),n=e.XpG();e.Y8G("variant",n._cardVariant()),e.R7$(),e.Y8G("ngTemplateOutlet",t)}}function It(o,a){if(1&o&&(e.j41(0,"div",23),e.eu8(1,43),e.k0s()),2&o){e.XpG();const t=e.sdS(5);e.R7$(),e.Y8G("ngTemplateOutlet",t)}}function Nt(o,a){if(1&o){const t=e.RV6();e.j41(0,"div",18),e.mxI("cueFlipChange",function(i){l.eBV(t);const s=e.XpG();return e.DH7(s.flipped,i)||(s.flipped=i),l.Njj(i)}),e.j41(1,"div",19),e.DNE(2,wt,13,11,"ng-template",null,0,e.C5r)(4,kt,7,13,"ng-template",null,1,e.C5r),e.nVh(6,Rt,2,2,"cue-card",20)(7,Pt,2,1,"div",21),e.nVh(8,Et,2,2,"cue-card",22)(9,It,2,1,"div",23),e.k0s()()}if(2&o){const t=e.XpG();e.R50("cueFlip",t.flipped),e.R7$(6),e.vxM("none"!==t.variant()?6:7),e.R7$(2),e.vxM("none"!==t.variant()?8:9)}}let Ot=(()=>{class o{documents=(0,r.hFB)([]);availableContentCategories=(0,r.hFB)(void 0);detailedView=(0,r.hFB)(!1);simple=(0,r.hFB)(!1);pageSize=(0,r.hFB)(10);prefetchPages=(0,r.hFB)(3);privileges=(0,r.hFB)();showOpenInDocumentViewerAction=(0,r.hFB)(!0);showOpenInFileManagerAction=(0,r.hFB)(!0);customOverlayActions=(0,r.hFB)([]);variant=(0,r.hFB)("default");_cardVariant=(0,d.EW)(()=>this.variant());documentRefs=(0,r.hFB)([]);handlers=(0,r.hFB)(void 0);documentData=(0,r.hFB)({});clickedDocument=(0,r.CGW)();clickedDownloadDocument=(0,r.CGW)();clickedOpenInDir=(0,r.CGW)();clickedOpen=(0,r.CGW)();flipped=(0,l.vPA)(!1);simplePageIndex=(0,l.vPA)(0);selectedSimpleDocumentId=(0,l.vPA)(null);_simpleBufferedUntilIndex=(0,l.vPA)(0);_tableBufferedUntilIndex=(0,l.vPA)(0);_lastDocumentRefsKey="";_gridApi=null;_requestedIds=new Set;_isSorted=!1;_viewportCheckTimerId=null;_lazyMode=(0,d.EW)(()=>this.documentRefs().length>0);_leafContentCategoryIris=(0,d.EW)(()=>{const t=this.availableContentCategories();if(!t)return null;const n=new Set(t.map(i=>i.parent).filter(i=>!!i));return new Set(t.filter(i=>!n.has(i.iri)).map(i=>i.iri))});labelDownload=(0,M.Xx)("components.documentList.labelDownload");labelName=(0,M.Xx)("components.documentList.labelName");labelOpenInFileManager=(0,M.Xx)("components.documentList.labelOpenInFileManager");labelOpenInDocumentViewer=(0,M.Xx)("components.documentList.labelOpenInDocumentViewer");labelSubject=(0,M.Xx)("components.documentList.labelSubject");labelSummary=(0,M.Xx)("components.documentList.labelSummary");labelPages=(0,M.Xx)("components.documentList.labelPages");labelSize=(0,M.Xx)("components.documentList.labelSize");labelCategories=(0,M.Xx)("components.documentList.labelCategories");labelType=(0,M.Xx)("components.documentList.labelType");buttonShowCloudFilter=(0,M.Xx)("components.documentList.buttonShowCloudFilter");buttonHideCloudFilter=(0,M.Xx)("components.documentList.buttonHideCloudFilter");buttonDownloadCSV=(0,M.Xx)("components.documentList.buttonDownloadCSV");infoLoading=(0,M.Xx)("components.documentList.infoLoading");overlaySettings=(0,d.EW)(()=>({...new pt.K,mode:"row",buttonVariant:"accent"===this.variant()?"primary":"accent"}));overlayActions=(0,d.EW)(()=>{const t=[{label:this.labelDownload(),icon:"download",action:n=>{this.handlers()?.requestDownload?.(n.rowData),this.clickedDownloadDocument.emit(n.rowData)}}];return this.showOpenInDocumentViewerAction()&&t.push({label:this.labelOpenInDocumentViewer(),icon:"document",action:n=>{const i=n.rowData.contentIRI.split("/").pop()??n.rowData.contentIRI;this.handlers()?.requestOpen?.(i,n.rowData),this.clickedOpen.emit(n.rowData)}}),this.showOpenInFileManagerAction()&&t.push({label:this.labelOpenInFileManager(),icon:"folder",action:n=>{const i=n.rowData.contentIRI.split("/").pop()??n.rowData.contentIRI;this.handlers()?.requestOpenInDir?.(i,n.rowData),this.clickedOpenInDir.emit(n.rowData)}}),[...t,...this.customOverlayActions()||[]]});documentsInt=(0,d.EW)(()=>{let t;if(this._lazyMode()){const n=this.documentRefs(),i=this.documentData()||{};t=n.map(s=>{const m=i[s.id];return m?{...m,pages:s.pages??m.pages,...void 0!==s.sources?{sources:s.sources}:{},...void 0!==s.relevance?{relevance:s.relevance}:{},name:(0,K.M)(m.path),loading:!1}:{id:s.id,path:s.id,suffix:"",size:0,contentIRI:s.id,tags:[],summary:"",categories:[],relevance:s.relevance??0,pages:s.pages,sources:s.sources,name:this.infoLoading(),loading:!0}})}else t=(this.documents()||[]).map(n=>({...n,name:(0,K.M)(n.path),loading:!1}));return this.tagFilter().length?t.filter(n=>n.tags?.some(i=>this.tagFilter().some(s=>s.toLowerCase()===i.toLowerCase()))):t});simplePageCount=(0,d.EW)(()=>Math.max(1,Math.ceil(this.documentsInt().length/Math.max(1,this.pageSize()))));simpleStartIndex=(0,d.EW)(()=>this.simplePageIndex()*Math.max(1,this.pageSize()));simpleEndIndex=(0,d.EW)(()=>this.simpleStartIndex()+Math.max(1,this.pageSize()));simpleDocumentsInt=(0,d.EW)(()=>this.documentsInt().slice(this.simpleStartIndex(),this.simpleEndIndex()));simpleHasPreviousPage=(0,d.EW)(()=>this.simplePageIndex()>0);simpleHasNextPage=(0,d.EW)(()=>this.simplePageIndex()<this.simplePageCount()-1);simpleDisplayStart=(0,d.EW)(()=>this.documentsInt().length?this.simpleStartIndex()+1:0);simpleDisplayEnd=(0,d.EW)(()=>Math.min(this.simpleEndIndex(),this.documentsInt().length));tags=(0,d.EW)(()=>{const t=this.documentsInt(),n=[];return t.forEach(i=>{i.tags?.forEach(s=>n.push(s))}),n});showPageColumn=(0,d.EW)(()=>this.documentsInt().some(t=>void 0!==t.pages));hasSubjects=(0,d.EW)(()=>this.documentsInt().some(t=>void 0!==t.subject&&""!==t.subject));columnSelectSettings=new ae;columnDefs=(0,l.vPA)([]);columnDefsGross=(0,l.vPA)([]);tagSelection=(0,l.vPA)([]);tagFilter=(0,l.vPA)([]);showTagFilterCloud=(0,l.vPA)(!1);filterToBeApplied=(0,d.EW)(()=>{const t=this.tagSelection(),n=this.tagFilter();return JSON.stringify(t.sort())!==JSON.stringify(n.sort())});tableMenu=(0,d.EW)(()=>{const t=[];return this.showTagFilterCloud()?t.push({icon:"cloud-funnel",label:this.buttonHideCloudFilter(),variant:"accent",action:()=>{this.flipped.set(!1),this.showTagFilterCloud.set(!1)}}):t.push({icon:"cloud-funnel",label:this.buttonShowCloudFilter(),variant:"accent",action:()=>{this.flipped.set(!0),this.showTagFilterCloud.set(!0)}}),t.push({icon:"download",label:this.buttonDownloadCSV(),action:()=>function j(o,a,t="table.csv"){const n=function C(o,a){const t=function p(o,a){return o.map(t=>{const n={};return"id"in t&&(n.id=t.id),"key"in t&&(n.key=t.key),a.forEach(i=>{let s;"function"==typeof i.valueGetter?s=i.valueGetter({data:t,colDef:i,getValue:_=>t[_],node:void 0,column:void 0,api:void 0,context:void 0}):i.field&&(s=t[i.field]),"function"==typeof i.valueFormatter&&(s=i.valueFormatter({value:s,data:t,colDef:i,node:void 0,column:void 0,api:void 0,context:void 0}));const m=i.headerName||i.colId||i.field;void 0!==m&&(n[m]=s)}),n})}(o,a);if(0===t.length)return"";const n=t.some(m=>"id"in m),i=[];n&&i.push("id"),a.forEach(m=>{const _=m.headerName||m.colId||m.field;_&&"id"!==_&&!i.includes(_)&&i.push(_)});const s=t.map(m=>{const _={};return i.forEach(y=>{_[y]=m[y]}),_});return S().unparse(s,{columns:i})}(o,a);(0,u.YN)(n,t,"text/csv")}(this.documentsInt(),this.columnDefs())}),t});hideCloud(){this.flipped.set(!0),this.showTagFilterCloud.set(!0)}tableHidden=(0,d.EW)(()=>this.showTagFilterCloud()||this.flipped());rowSelection={mode:"singleRow",checkboxes:!1,enableClickSelection:!0};whenTableDataKnown=(0,l.QZP)(()=>{this.simple()||this._buildInitialColumnDefs(this.detailedView())});whenSimpleDataChanges=(0,l.QZP)(()=>{const t=this.documentsInt().length,n=Math.max(1,this.pageSize()),i=Math.max(0,Math.ceil(t/n)-1);this.simplePageIndex()>i&&this.simplePageIndex.set(i)});whenRefsChange=(0,l.QZP)(()=>{const n=this.documentRefs().map(i=>i.id).join("|");n!==this._lastDocumentRefsKey&&(this._lastDocumentRefsKey=n,this._requestedIds.clear(),this._simpleBufferedUntilIndex.set(0),this._tableBufferedUntilIndex.set(0),this.simplePageIndex.set(0))});whenSimpleLazyDataNeeded=(0,l.QZP)(()=>{if(!this.simple()||!this._lazyMode()||!this.handlers())return;const t=this.documentRefs();if(!t.length)return;const n=Math.max(1,this.pageSize()),s=n*Math.max(1,this.prefetchPages()),m=t.length,_=this.simpleStartIndex(),y=Math.min(m,_+n),v=this._simpleBufferedUntilIndex();let F=null;if(0===v?F=0:(_>=Math.max(0,v-n)||y>v)&&(F=v),null===F||F>=m)return;const G=Math.min(m,F+s),N=t.slice(F,G).map(I=>I.id).filter(I=>!this._requestedIds.has(I));this._simpleBufferedUntilIndex.set(Math.max(v,G)),N.length&&(N.forEach(I=>this._requestedIds.add(I)),setTimeout(()=>this.handlers()?.requestData(N)))});previousSimplePage(){this.simpleHasPreviousPage()&&this.simplePageIndex.update(t=>Math.max(0,t-1))}nextSimplePage(){this.simpleHasNextPage()&&this.simplePageIndex.update(t=>Math.min(this.simplePageCount()-1,t+1))}handleSimpleRowClick(t){this.selectedSimpleDocumentId.set(t.id),this.handleRowClick(t)}handleRowClick(t){var n=this;return(0,x.A)(function*(){n.clickedDocument.emit(t),window.cueDetachCellOverlay&&window.cueDetachCellOverlay(),n.overlayVisible&&"function"==typeof n.overlayVisible.set&&n.overlayVisible.set(!1)})()}showFront(){this.flipped.set(!1),this.showTagFilterCloud.set(!1)}applyTagFilter(){this.tagFilter.set(this.tagSelection()),this.flipped.set(!1),this.showTagFilterCloud.set(!1)}ngOnDestroy(){null!==this._viewportCheckTimerId&&(clearTimeout(this._viewportCheckTimerId),this._viewportCheckTimerId=null),this._gridApi=null}onGridReady(t){this._gridApi=t,t.addEventListener("viewportChanged",()=>this._checkViewport()),t.addEventListener("modelUpdated",()=>this._checkViewport()),t.addEventListener("paginationChanged",()=>this._checkViewport()),t.addEventListener("sortChanged",()=>{const n=t.getColumnState();this._isSorted=n.some(i=>null!=i.sort),this._isSorted&&this._requestAllUnloaded()}),this._viewportCheckTimerId=setTimeout(()=>{this._viewportCheckTimerId=null,this._checkViewport()},100)}_checkViewport(){if(!this._gridApi||this._gridApi.isDestroyed()||!this._lazyMode())return;if(this._isSorted)return void this._requestAllUnloaded();const t=this.documentRefs(),n=t.length;if(!n)return;const i=Math.max(1,this._gridApi.paginationGetPageSize?.()??10),m=Math.max(0,this._gridApi.paginationGetCurrentPage?.()??0)*i,_=Math.min(n,m+i),y=this._tableBufferedUntilIndex();let v=null;if(0===y?v=0:(m>=Math.max(0,y-i)||_>y)&&(v=y),null===v||v>=n)return;const F=i*Math.max(1,this.prefetchPages()),G=Math.min(n,v+F),N=t.slice(v,G).map(I=>I.id).filter(I=>!this._requestedIds.has(I));this._tableBufferedUntilIndex.set(Math.max(y,G)),N.length&&(N.forEach(I=>this._requestedIds.add(I)),setTimeout(()=>this.handlers()?.requestData(N)))}_requestAllUnloaded(){if(!this._gridApi||this._gridApi.isDestroyed()||!this._lazyMode())return;const t=[];if(this._gridApi.forEachNode(n=>{const i=n.data;i?.loading&&!this._requestedIds.has(i.contentIRI)&&t.push(i.contentIRI)}),t.length>0){const n=Array.from(new Set(t));n.forEach(i=>this._requestedIds.add(i)),setTimeout(()=>this.handlers()?.requestData(n))}}_buildInitialColumnDefs(t){const n=[],i=[];n.push({field:"name",headerName:this.labelName(),width:t?250:120,filter:!0,valueGetter:y=>!y.data?.name&&y.data?.loading?"Loading...":y.data?.name||y.data?.contentIRI}),this.hasSubjects()&&n.push({field:"subject",headerName:this.labelSubject(),flex:1,filter:!0,cellRenderer:H,cellRendererParams:{lineHeight:"1.8"},autoHeight:!0});const s={field:"summary",headerName:this.labelSummary(),flex:1,filter:!0,cellRenderer:H,cellRendererParams:{lineHeight:"1.8"},autoHeight:!0};this.detailedView()||(s.tooltipField="summary"),t?n.push(s):i.push(s),this.showPageColumn()&&n.push({field:"pages",headerName:this.labelPages(),width:100,filter:!0,valueGetter:y=>Array.isArray(y.data?.pages)?y.data.pages.map(v=>v.page).join(", "):""});const m={field:"size",headerName:this.labelSize(),width:100,filter:!0,valueGetter:y=>(0,ht.b)(y.data?.size||0)};t?n.push(m):i.push(m);const _={field:"categories",headerName:this.labelCategories(),width:120,filter:!0,valueGetter:y=>{const v=y.data?.categories||[],F=this._leafContentCategoryIris(),G=F?v.filter(I=>F.has(I)):v,N=G.slice(0,3).map(I=>this._getContentCategoryLabel(I)).join(", ");return G.length>3?`${N}...`:N}};t?n.push(_):i.push(_),n.push({field:"suffix",headerName:this.labelType(),width:80,filter:!0,headerClass:"header-align-right",cellStyle:{display:"flex",justifyContent:"flex-end"},cellRenderer:dt}),this.columnDefs.update(()=>[...n]),this.columnDefsGross.update(()=>[...n,...i])}_getContentCategoryLabel(t){const n=this.availableContentCategories();if(void 0!==n){const i=n.find(s=>s.iri===t);if(i)return i.label;console.warn(`No label found for content category IRI: ${t}`)}else console.warn("No availableContentCategories provided to DocumentList component");return(o=>{const a=o.split("#").pop()??o,t={AgreementDocument:"Agreement",ArchitecturalDesignDocument:"Architectural Design",AsBuiltDocument:"As-Built",BudgetEstimateDocument:"Budget Estimate",CertificationDocument:"Certification",ComplianceDocument:"Compliance",CorrespondenceDocument:"Correspondence",ConstructionContract:"Construction Contract",ConstructionProcessDocument:"Construction Process",ContractCondition:"Contract Condition",ContractRole:"Contract Role",ContractualDocument:"Contract",CostControlDocument:"Cost Control",DesignDocument:"Design Document",EmailAddress:"Email Address",EngineeringDesignDocument:"Engineering Design",FinancialAdministrativeDocument:"Financial/Administrative",FunctionalRequirementsDocument:"Functional Requirements",InspectionDocument:"Inspection",InsuranceBondDocument:"Insurance/Bond",InteriorDesignDocument:"Interior Design",MarketingCloseoutDocument:"Marketing Closeout",MiscDocument:"Miscellaneous",OperationManual:"Operation Manual",OperationsMaintenanceDocument:"Operations & Maintenance",OperationsManualDocument:"Operations Manual",OtherDocument:"Other",OtherContent:"Other Content",ProgressStatusReport:"Progress Status Report",QualityAssuranceDocument:"Quality Assurance",QualityControlDocument:"Quality Control",RegulatoryComplianceDocument:"Regulatory Compliance",SafetyDocument:"Safety",ScheduleDocument:"Schedule",SiteAssessmentDocument:"Site Assessment",TechnicalRequirementsDocument:"Technical Requirements",TechnicalSpecificationDocument:"Technical Specification",TenderingDocument:"Tendering Document",TermsAndConditionsDocument:"Terms & Conditions"};return void 0===t[a]&&console.log(`No pretty label for category: ${a}`),t[a]??a})(t)}static \u0275fac=function(n){return new(n||o)};static \u0275cmp=e.VBU({type:o,selectors:[["cue-doc-list"]],inputs:{documents:[1,"documents"],availableContentCategories:[1,"availableContentCategories"],detailedView:[1,"detailedView"],simple:[1,"simple"],pageSize:[1,"pageSize"],prefetchPages:[1,"prefetchPages"],privileges:[1,"privileges"],showOpenInDocumentViewerAction:[1,"showOpenInDocumentViewerAction"],showOpenInFileManagerAction:[1,"showOpenInFileManagerAction"],customOverlayActions:[1,"customOverlayActions"],variant:[1,"variant"],documentRefs:[1,"documentRefs"],handlers:[1,"handlers"],documentData:[1,"documentData"]},outputs:{clickedDocument:"clickedDocument",clickedDownloadDocument:"clickedDownloadDocument",clickedOpenInDir:"clickedOpenInDir",clickedOpen:"clickedOpen"},decls:2,vars:1,consts:[["frontContent",""],["backContent",""],["trigger",""],[1,"simple-container",2,"width","100%","height","auto"],[1,"flip-card",2,"width","100%","height","auto","overflow","hidden",3,"cueFlip"],[1,"simple-list"],["justify","center",1,"simple-empty"],["direction","row","justify","space-between","align","center",2,"padding","4px 8px"],[1,"simple-item",3,"active"],[1,"simple-item",3,"click"],["size","s",1,"simple-item-name",3,"noWrap","title"],["size","xs",1,"simple-item-meta"],["size","s"],["size","xs"],["direction","row","gap","s"],["size","xs","variant","tertiary",3,"click","disabled"],["icon","paginator-back"],["icon","paginator-next"],[1,"flip-card",2,"width","100%","height","auto","overflow","hidden",3,"cueFlipChange","cueFlip"],[1,"flip-content"],[1,"card-face","front",2,"width","100%","height","auto",3,"variant"],[1,"card-face","front",2,"width","100%","height","auto"],[1,"card-face","back",2,"width","100%","height","auto",3,"variant"],[1,"card-face","back",2,"width","100%","height","auto"],["direction","row","justify","end",2,"padding","2px"],["positioning","bottomleft"],["trigger","","variant","tertiary","size","s"],["icon","more-vert"],["menu",""],["variant","accent","size","s",3,"click","cueTooltip"],["icon","settings"],[2,"position","relative"],[3,"gridApiReady","selectedRows","paginationPageSize","rowSelection","rowData","columnDefs","overlaySettings","overlayActions"],[3,"click"],["before","",3,"name"],["variant","accent","size","s","cueTooltip","Back to table",3,"click"],["icon","arrow-back"],["justify","center",2,"height","350px"],[2,"height","100%","width","100%",3,"selectionChanged","words","clickable","overflow","multiSelect","highlightSelection"],["justify","center",1,"word-cloud-actions"],[3,"columnDefsChange","settings","columnDefs","columnDefsGross"],["justify","center",1,"word-cloud-actions",3,"click"],["variant","primary"],[3,"ngTemplateOutlet"]],template:function(n,i){1&n&&e.nVh(0,yt,4,2,"div",3)(1,Nt,10,3,"div",4),2&n&&e.vxM(i.simple()?0:1)},dependencies:[Y.n,b,O.$,A.L,vt,gt.Z,se.T3,B.a,ue.R,at,ft.M,_t.D,ut.W,mt.A,$.d,V.Typography,M.Kj],styles:[".hidden[_ngcontent-%COMP%]{display:none}.word-cloud-actions[_ngcontent-%COMP%]{position:absolute;z-index:10;right:0;left:0;bottom:10px;pointer-events:none}.word-cloud-actions[_ngcontent-%COMP%] cue-button[_ngcontent-%COMP%]{pointer-events:auto}.simple-container[_ngcontent-%COMP%]{width:100%}.simple-list[_ngcontent-%COMP%]{list-style:none;margin:0;padding:4px;max-height:420px;overflow-y:auto}.simple-item[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2px;padding:9px 10px;border-radius:6px;cursor:pointer;transition:background .1s}.simple-item[_ngcontent-%COMP%]:hover{background:var(--cue-color-ultralightgray)}.simple-item.active[_ngcontent-%COMP%]{background:var(--cue-color-lightgray)}.simple-item-name[_ngcontent-%COMP%]{font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.simple-item-meta[_ngcontent-%COMP%]{font-size:11px;color:var(--cue-color-midgray)}.simple-empty[_ngcontent-%COMP%]{padding:12px}"],changeDetection:0})}return o})()},4372(P,w,c){"use strict";c.d(w,{M:()=>x});const x=r=>{const d=r.split("/");return d[d.length-1]}},1493(P,w,c){"use strict";function x(r,d=!1,l=1){const u=d?1e3:1024;if(Math.abs(r)<u)return r+" B";const T=d?["kB","MB","GB","TB","PB","EB","ZB","YB"]:["KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"];let S=-1;const p=10**l;do{r/=u,++S}while(Math.round(Math.abs(r)*p)/p>=u&&S<T.length-1);return r.toFixed(l)+" "+T[S]}c.d(w,{b:()=>x})},2269(P,w,c){P.exports=function(x){"use strict";var d=function r(u){return u&&"object"==typeof u&&"default"in u?u:{default:u}}(x),l={name:"da",weekdays:"s\xf8ndag_mandag_tirsdag_onsdag_torsdag_fredag_l\xf8rdag".split("_"),weekdaysShort:"s\xf8n._man._tirs._ons._tors._fre._l\xf8r.".split("_"),weekdaysMin:"s\xf8._ma._ti._on._to._fr._l\xf8.".split("_"),months:"januar_februar_marts_april_maj_juni_juli_august_september_oktober_november_december".split("_"),monthsShort:"jan._feb._mar._apr._maj_juni_juli_aug._sept._okt._nov._dec.".split("_"),weekStart:1,yearStart:4,ordinal:function(u){return u+"."},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd [d.] D. MMMM YYYY [kl.] HH:mm"},relativeTime:{future:"om %s",past:"%s siden",s:"f\xe5 sekunder",m:"et minut",mm:"%d minutter",h:"en time",hh:"%d timer",d:"en dag",dd:"%d dage",M:"en m\xe5ned",MM:"%d m\xe5neder",y:"et \xe5r",yy:"%d \xe5r"}};return d.default.locale(l,null,!0),l}(c(7374))},1409(P,w,c){P.exports=function(x){"use strict";var d=function r(S){return S&&"object"==typeof S&&"default"in S?S:{default:S}}(x),l={s:"ein paar Sekunden",m:["eine Minute","einer Minute"],mm:"%d Minuten",h:["eine Stunde","einer Stunde"],hh:"%d Stunden",d:["ein Tag","einem Tag"],dd:["%d Tage","%d Tagen"],M:["ein Monat","einem Monat"],MM:["%d Monate","%d Monaten"],y:["ein Jahr","einem Jahr"],yy:["%d Jahre","%d Jahren"]};function u(S,p,C){var j=l[C];return Array.isArray(j)&&(j=j[p?0:1]),j.replace("%d",S)}var T={name:"de",weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So._Mo._Di._Mi._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),months:"Januar_Februar_M\xe4rz_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Feb._M\xe4rz_Apr._Mai_Juni_Juli_Aug._Sept._Okt._Nov._Dez.".split("_"),ordinal:function(S){return S+"."},weekStart:1,yearStart:4,formats:{LTS:"HH:mm:ss",LT:"HH:mm",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},relativeTime:{future:"in %s",past:"vor %s",s:u,m:u,mm:u,h:u,hh:u,d:u,dd:u,M:u,MM:u,y:u,yy:u}};return d.default.locale(T,null,!0),T}(c(7374))},9785(P){P.exports=function(){"use strict";return{name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(w){var c=["th","st","nd","rd"],x=w%100;return"["+w+(c[(x-20)%10]||c[x]||c[0])+"]"}}}()},2494(P,w,c){P.exports=function(x){"use strict";var d=function r(u){return u&&"object"==typeof u&&"default"in u?u:{default:u}}(x),l={name:"es",monthsShort:"ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),weekdays:"domingo_lunes_martes_mi\xe9rcoles_jueves_viernes_s\xe1bado".split("_"),weekdaysShort:"dom._lun._mar._mi\xe9._jue._vie._s\xe1b.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_s\xe1".split("_"),months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),weekStart:1,formats:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY H:mm",LLLL:"dddd, D [de] MMMM [de] YYYY H:mm"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un d\xeda",dd:"%d d\xedas",M:"un mes",MM:"%d meses",y:"un a\xf1o",yy:"%d a\xf1os"},ordinal:function(u){return u+"\xba"}};return d.default.locale(l,null,!0),l}(c(7374))},4230(P,w,c){P.exports=function(x){"use strict";var d=function r(u){return u&&"object"==typeof u&&"default"in u?u:{default:u}}(x),l={name:"fr",weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"di_lu_ma_me_je_ve_sa".split("_"),months:"janvier_f\xe9vrier_mars_avril_mai_juin_juillet_ao\xfbt_septembre_octobre_novembre_d\xe9cembre".split("_"),monthsShort:"janv._f\xe9vr._mars_avr._mai_juin_juil._ao\xfbt_sept._oct._nov._d\xe9c.".split("_"),weekStart:1,yearStart:4,formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},ordinal:function(u){return u+(1===u?"er":"")}};return d.default.locale(l,null,!0),l}(c(7374))},9531(P,w,c){P.exports=function(x){"use strict";var d=function r(u){return u&&"object"==typeof u&&"default"in u?u:{default:u}}(x),l={name:"it",weekdays:"domenica_luned\xec_marted\xec_mercoled\xec_gioved\xec_venerd\xec_sabato".split("_"),weekdaysShort:"dom_lun_mar_mer_gio_ven_sab".split("_"),weekdaysMin:"do_lu_ma_me_gi_ve_sa".split("_"),months:"gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre".split("_"),weekStart:1,monthsShort:"gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic".split("_"),formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},relativeTime:{future:"tra %s",past:"%s fa",s:"qualche secondo",m:"un minuto",mm:"%d minuti",h:"un'ora",hh:"%d ore",d:"un giorno",dd:"%d giorni",M:"un mese",MM:"%d mesi",y:"un anno",yy:"%d anni"},ordinal:function(u){return u+"\xba"}};return d.default.locale(l,null,!0),l}(c(7374))},4955(P){P.exports=function(){"use strict";var w={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};return function(c,x,r){var d=x.prototype,l=d.format;r.en.formats=w,d.format=function(u){void 0===u&&(u="YYYY-MM-DDTHH:mm:ssZ");var C,T=this.$locale().formats,S=(C=void 0===T?{}:T,u.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(j,e,L){var E=L&&L.toUpperCase();return e||C[L]||w[L]||C[E].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(k,D,h){return D||h.slice(1)})}));return l.call(this,S)}}}()},5164(P){P.exports=function(){"use strict";return function(w,c,x){w=w||{};var r=c.prototype,d={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function l(T,S,p,C){return r.fromToBase(T,S,p,C)}x.en.relativeTime=d,r.fromToBase=function(T,S,p,C,j){for(var e,L,E,k=p.$locale().relativeTime||d,D=w.thresholds||[{l:"s",r:44,d:"second"},{l:"m",r:89},{l:"mm",r:44,d:"minute"},{l:"h",r:89},{l:"hh",r:21,d:"hour"},{l:"d",r:35},{l:"dd",r:25,d:"day"},{l:"M",r:45},{l:"MM",r:10,d:"month"},{l:"y",r:17},{l:"yy",d:"year"}],h=D.length,f=0;f<h;f+=1){var g=D[f];g.d&&(e=C?x(T).diff(p,g.d,!0):p.diff(T,g.d,!0));var b=(w.rounding||Math.round)(Math.abs(e));if(E=e>0,b<=g.r||!g.r){b<=1&&f>0&&(g=D[f-1]);var O=k[g.l];j&&(b=j(""+b)),L="string"==typeof O?O.replace("%d",b):O(b,S,g.l,E);break}}if(S)return L;var A=E?k.future:k.past;return"function"==typeof A?A(L):A.replace("%s",L)},r.to=function(T,S){return l(T,S,this,!0)},r.from=function(T,S){return l(T,S,this)};var u=function(T){return T.$u?x.utc():x()};r.toNow=function(T){return this.to(u(this),T)},r.fromNow=function(T){return this.from(u(this),T)}}}()}}]);
|
package/675.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkcue_ui=self.webpackChunkcue_ui||[]).push([[675],{1675(G,g,s){s.d(g,{CueProjectList:()=>F});var m=s(467),r=s(7705),c=s(5802),l=s(2271),j=s(6950),f=s(8017),h=s(6455),v=s(8334),u=s(2306),_=s(140),p=s(58),S=s(5187),t=s(5547);function x(n,d){if(1&n){const e=t.RV6();t.j41(0,"cue-tabs",0)(1,"cue-tab",1)(2,"cue-ag-grid",2),t.bIt("selectedRows",function(a){c.eBV(e);const i=t.XpG();return c.Njj(i.onSelectedRows(a))}),t.k0s()(),t.j41(3,"cue-tab",3)(4,"cue-map",4),t.bIt("clickedFeature",function(a){c.eBV(e);const i=t.XpG();return c.Njj(i.onMapFeatureClick(a))}),t.k0s()()()}if(2&n){const e=t.XpG();t.Y8G("variant",e.variant()),t.R7$(2),t.Y8G("rowData",e.projects())("columnDefs",e.columnDefs)("rowSelection",e.rowSelection)("showPaginator",!1),t.R7$(2),t.Y8G("layers",e.mapLayers())("settings",e._mapSettings())("zoomToFit",!0)("hoverTooltipFn",e.mapHoverTooltipFn)}}function P(n,d){if(1&n){const e=t.RV6();t.j41(0,"cue-card",5)(1,"cue-ag-grid",2),t.bIt("selectedRows",function(a){c.eBV(e);const i=t.XpG(2);return c.Njj(i.onSelectedRows(a))}),t.k0s()()}if(2&n){const e=t.XpG(2);t.Y8G("variant",e._cardVariant())("padded",!1),t.R7$(),t.Y8G("rowData",e.projects())("columnDefs",e.columnDefs)("rowSelection",e.rowSelection)("showPaginator",!1)}}function C(n,d){if(1&n){const e=t.RV6();t.j41(0,"cue-ag-grid",2),t.bIt("selectedRows",function(a){c.eBV(e);const i=t.XpG(2);return c.Njj(i.onSelectedRows(a))}),t.k0s()}if(2&n){const e=t.XpG(2);t.Y8G("rowData",e.projects())("columnDefs",e.columnDefs)("rowSelection",e.rowSelection)("showPaginator",!1)}}function w(n,d){if(1&n&&t.nVh(0,P,2,6,"cue-card",5)(1,C,1,4,"cue-ag-grid",6),2&n){const e=t.XpG();t.vxM("none"!==e.variant()?0:1)}}let M=(()=>{class n{projects=(0,r.hFB)([]);mapSettings=(0,r.hFB)(new u.yY);variant=(0,r.hFB)("none");projectSelected=(0,r.CGW)();_cardVariant=(0,l.EW)(()=>this.variant());columnDefs=[{field:"name",headerName:"Project",flex:1}];rowSelection={mode:"singleRow",checkboxes:!1,enableClickSelection:!0};_mapSettings=(0,l.EW)(()=>({...this.mapSettings(),contextMenu:{showProperties:!1,showFlyTo:!1}}));mapHoverTooltipFn=e=>e.name??null;onSelectedRows(e){const o=e[0]?.id;o&&this.projectSelected.emit(o)}onMapFeatureClick(e){const o=e.feature.properties?.id;o&&this.projectSelected.emit(o)}hasLocations=(0,l.EW)(()=>this.projects().some(e=>!!e.location));mapLayers=(0,l.EW)(()=>{const e=this.projects().filter(a=>!!a.location);if(!e.length)return[];const o=new u.ux("Projects","projects");return o.collection=new _.o(e.flatMap(a=>{const i=(0,p.S)(a.location);return i?[{type:"Feature",geometry:(0,p.n)(i),properties:{name:a.name,id:a.id}}]:[]})),[o]});static \u0275fac=function(o){return new(o||n)};static \u0275cmp=t.VBU({type:n,selectors:[["cue-proj-list"]],inputs:{projects:[1,"projects"],mapSettings:[1,"mapSettings"],variant:[1,"variant"]},outputs:{projectSelected:"projectSelected"},decls:2,vars:1,consts:[[2,"flex","1",3,"variant"],["label","List"],[3,"selectedRows","rowData","columnDefs","rowSelection","showPaginator"],["label","Map"],[3,"clickedFeature","layers","settings","zoomToFit","hoverTooltipFn"],[2,"height","100%","width","100%",3,"variant","padded"],[3,"rowData","columnDefs","rowSelection","showPaginator"]],template:function(o,a){1&o&&t.nVh(0,x,5,9,"cue-tabs",0)(1,w,2,1),2&o&&t.vxM(a.hasLocations()?0:1)},dependencies:[j.R,f.T,h.t,v.o,S.Z],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;height:100%}cue-tabs[_ngcontent-%COMP%]{flex:1}cue-ag-grid[_ngcontent-%COMP%]{flex:1}cue-map[_ngcontent-%COMP%]{flex:1;min-height:300px}"],changeDetection:0})}return n})();var y=s(5381),D=s(2245);function T(n,d){1&n&&(t.j41(0,"cue-flexcontainer",0)(1,"cue-typography",2),t.EFF(2," Loading projects\u2026 "),t.k0s()())}function b(n,d){if(1&n&&(t.j41(0,"cue-flexcontainer",0)(1,"cue-typography",3),t.EFF(2),t.k0s()()),2&n){const e=t.XpG();t.R7$(2),t.SpI(" ",e.errorMessage()," ")}}function L(n,d){if(1&n){const e=t.RV6();t.j41(0,"cue-proj-list",4),t.bIt("projectSelected",function(a){c.eBV(e);const i=t.XpG();return c.Njj(i.projectSelected.emit(a))}),t.k0s()}if(2&n){const e=t.XpG();t.Y8G("projects",e.projects())("mapSettings",e.mapSettings())("variant",e.variant())}}let F=(()=>{class n{sdkState=(0,r.hFB)(void 0);mapboxToken=(0,r.hFB)(void 0);variant=(0,r.hFB)("none");projectSelected=(0,r.CGW)();state=(0,c.vPA)("idle");errorMessage=(0,c.vPA)(null);_rawProjects=(0,c.vPA)([]);mapSettings=(0,l.EW)(()=>({...new u.yY,mapboxToken:this.mapboxToken()}));projects=(0,l.EW)(()=>this._rawProjects().map(e=>({id:e.id,name:e.name,location:e.location??void 0})));_lastCue;constructor(){(0,c.QZP)(()=>{const e=this.sdkState()?.cue;e!==this._lastCue&&(this._lastCue=e,e?this._loadProjects(e.projects):(this._rawProjects.set([]),this.state.set("idle"),this.errorMessage.set(null)))})}_loadProjects(e){var o=this;return(0,m.A)(function*(){o.state.set("loading"),o.errorMessage.set(null);try{const a=yield e.listProjects();o._rawProjects.set(a),o.state.set("ready")}catch(a){console.error("[CueProjectList] Failed to load projects:",a),o.errorMessage.set(a instanceof Error?a.message:String(a)),o.state.set("error")}})()}static \u0275fac=function(o){return new(o||n)};static \u0275cmp=t.VBU({type:n,selectors:[["cue-project-list"]],inputs:{sdkState:[1,"sdkState"],mapboxToken:[1,"mapboxToken"],variant:[1,"variant"]},outputs:{projectSelected:"projectSelected"},decls:3,vars:1,consts:[["direction","column","align","center","justify","center",2,"height","100%","width","100%","padding","8px"],[2,"height","100%",3,"projects","mapSettings","variant"],[2,"color","var(--cue-defaultContrast)","opacity","0.5","font-size","13px"],[2,"color","#c44","font-size","13px"],[2,"height","100%",3,"projectSelected","projects","mapSettings","variant"]],template:function(o,a){1&o&&t.nVh(0,T,3,0,"cue-flexcontainer",0)(1,b,3,1,"cue-flexcontainer",0)(2,L,1,3,"cue-proj-list",1),2&o&&t.vxM("loading"===a.state()?0:"error"===a.state()?1:2)},dependencies:[M,y.n,D.Typography],styles:["[_nghost-%COMP%]{display:block;width:100%;height:100%}"],changeDetection:0})}return n})()}}]);
|