@qaecy/cue-ui 0.0.16 → 0.0.18

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/371.js CHANGED
@@ -1 +1 @@
1
- (self.webpackChunkcue_ui=self.webpackChunkcue_ui||[]).push([[371],{5371(S,M,d){"use strict";d.d(M,{CueDocumentList:()=>Bt});var C=d(467),r=d(7705),l=d(5802),u=d(2271),h=d(9769),v=d(2065),x=d(7284),F=d.n(x);var t=d(5547);let V=(()=>{class o{get calculatedWidth(){let e=this.localConfig().width||this.width()||1;return this.el.nativeElement.parentNode.offsetWidth>0&&e<=1&&e>0&&(e*=this.el.nativeElement.parentNode.offsetWidth),e}get calculatedHeight(){let e=this.localConfig().height||this.height()||400;return this.el.nativeElement.parentNode.offsetHeight>0&&e<=1&&e>0&&(e*=this.el.nativeElement.parentNode.offsetHeight),e}onResize(e){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,u.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)(t.aKT),this.r2=(0,l.WQX)(t.sFG);const e=this.el.nativeElement;(0,l.QZP)(()=>{const n=this.localConfig();this.logMessage("warn","cloud configuration",n),n.font&&this.r2.setStyle(e,"font",n.font),n.background&&this.r2.setStyle(e,"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(e){let n=e.text;return n+=e.color?`-${e.color}`:"",n+=e.external?`-${e.external}`:"",n+=e.link?`-${e.link}`:"",n+=e.rotate?`-${e.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 e=this.dataArr.filter(i=>i.position),n=this.dataArr.filter(i=>!i.position);e.forEach((i,s)=>{this.drawWord(s,i)}),n.forEach((i,s)=>{this.drawWord(s,i)})}hitTest(e){for(const n of this.cloudDataHtmlElements)if(this.overlapping(e,n))return!0;return!1}overlapping(e,n){const{offsetLeft:i,offsetTop:s,offsetWidth:c,offsetHeight:m}=n;return!(e.right<i||e.left>i+c||e.bottom<s||e.top>s+m)}getWeightForWord(e){let n=5;return this.dataArr[0].weight>this.dataArr[this.dataArr.length-1].weight&&(this.options.strict?e.weight>10?(n=10,this.logMessage("warn",`[TagCloud strict] Weight property ${e.weight} > 10. Fallback to 10 as you are using strict mode`,e)):e.weight<1?(n=1,this.logMessage("warn",`[TagCloud strict] Given weight property ${e.weight} < 1. Fallback to 1 as you are using strict mode`,e)):e.weight%1!=0?(n=Math.round(e.weight),this.logMessage("warn",`[TagCloud strict] Given weight property ${e.weight} is not an integer. Rounded value to ${n}`,e)):n=e.weight:n=Math.round((e.weight-this.dataArr[this.dataArr.length-1].weight)/(this.dataArr[0].weight-this.dataArr[this.dataArr.length-1].weight)*9)+1),n}setWordColor(e,n){this.r2.setStyle(e,"color",n)}setTooltip(e,n){this.r2.addClass(e,"tooltip");const i=this.r2.createElement("span");i.className="tooltiptext";const s=this.r2.createText(n);i.appendChild(s),e.appendChild(i)}setWordRotation(e,n){const i=n?`rotate(${n}deg)`:"";return this.r2.setStyle(e,"transform",i),i}wrapNodeIntoAnchorElement(e,n){const i=this.r2.createElement("a");return i.href=n.link||"",void 0!==n.external&&n.external&&(i.target="_blank"),i.appendChild(e),i}applyZoomStyle(e,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?e:n,"color",this.options.zoomOnHover.color)},n.onmouseout=()=>{this.r2.setStyle(n,"transform",`none ${s}`),this.options.zoomOnHover?.color&&this.r2.removeStyle(i?e:n,"color")})}setPosition(e,n,i){let s=this.options.randomizeAngle?6.28*Math.random():0,c=0;const m=e.style;m.position="absolute";const p=!!(n.position&&n.position.left&&n.position.top),g=e.offsetWidth,_=e.offsetHeight;let b=p&&n.position?.left?n.position.left:this.options.center.x-g/2,w=p&&n.position?.top?n.position.top:this.options.center.y-_/2;if(m.left=b+"px",m.top=w+"px",this.options.delay&&(e.classList.add("tag-animation-delay"),m.setProperty("--tag-animation-delay",this.options.delay*i+"ms")),!p)if(0===i)m.left=b+2*(Math.random()-.5)*(this.calculatedWidth/5)+"px",m.top=w+2*(Math.random()-.5)*(this.calculatedHeight/5)+"30px";else{for(;this.options.width&&this.options.height&&e.offsetHeight&&e.offsetWidth&&this.hitTest(new DOMRect(b,w,e.offsetWidth,e.offsetHeight));)c+=this.options.step||1,s+=(i%2==0?1:-1)*(this.options.step||1),b=this.options.center.x-g/2+c*Math.cos(s)*this.options.aspectRatio,w=this.options.center.y+c*Math.sin(s)-_/2;m.left=b+"px",m.top=w+"px"}if(!this.options.overflow&&(b<0||w<0||b+g>this.calculatedWidth||w+_>this.calculatedHeight))return this.logMessage("warn","Word did not fit into the cloud and overflow is set to 'false'. The element will be removed",e),void e.remove()}drawWord(e,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 c=this.r2.createText(n.text);n.color&&this.setWordColor(i,n.color);const m=this.setWordRotation(i,n.rotate);n.link&&(c=this.wrapNodeIntoAnchorElement(c,n)),this.options.zoomOnHover&&1!==this.options.zoomOnHover.scale&&this.applyZoomStyle(c,i,n.link,m),i.appendChild(c),this.r2.appendChild(this.el.nativeElement,i),n.tooltip&&this.setTooltip(i,n.tooltip),i.id=`angular-tag-cloud-item-${e}`,this.setPosition(i,n,e),this.logMessage("debug","Adds new word <span>",i),this.cloudDataHtmlElements.push(i),this.logMessage("debug","Placed words",this.cloudDataHtmlElements)}logMessage(e,...n){this.localConfig()&&("debug"===this.localConfig().log?console.log(`[AngularTagCloudModule ${e}]`,...n):"warn"===this.localConfig().log&&"warn"===e&&console.warn(`[AngularTagCloudModule ${e}]`,...n))}static{this.\u0275fac=function(n){return new(n||o)}}static{this.\u0275cmp=t.VBU({type:o,selectors:[["angular-tag-cloud"],["ng-tag-cloud"],["ngtc"]],hostBindings:function(n,i){1&n&&t.bIt("resize",function(c){return i.onResize(c)},t.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 E=d(5970);const R=["wordCloudContainer"];function P(o,a){if(1&o){const e=t.RV6();t.j41(0,"angular-tag-cloud",3),t.bIt("clicked",function(i){l.eBV(e);const s=t.XpG();return l.Njj(s.handleClicked(i))}),t.k0s()}if(2&o){const e=t.XpG();t.Y8G("data",e.data())("zoomOnHover",e.zoomOnHoverOptions())("width",e.containerSize().width)("height",e.containerSize().height)("overflow",e.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,u.EW)(()=>{const e=this.words(),n=this.entries();return n?.length||e?.length?n?.length?n:e?.length?this._buildEntriesFromWords(e):[]:[]});ngAfterViewInit(){const e=new MutationObserver(()=>{this._applySelectionStyles()});this.wordCloudContainer?.nativeElement&&e.observe(this.wordCloudContainer.nativeElement,{childList:!0,subtree:!0})}handleResize(e){0!==e.newRect.height&&this.containerSize.set({width:e.newRect.width,height:e.newRect.height})}styleSelection=(0,l.QZP)(()=>{this.selection(),this._applySelectionStyles()});zoomOnHoverOptions=(0,u.EW)(()=>({scale:1.1,transitionTime:this.clickable()?1.2:0,delay:.05}));_buildEntriesFromWords(e){const n=new Map;for(const g of e){const _=this.caseSensitive()?g:g.toLowerCase();n.set(_,(n.get(_)||0)+1)}const i=Array.from(n.entries());if(0===i.length)return[];const s=i.map(([,g])=>g),c=Math.min(...s),m=Math.max(...s);return m===c?i.map(([g])=>({text:g,weight:this.maxWeight()})):i.sort(([,g],[,_])=>_-g).slice(0,this.maxWords()).map(([g,_])=>({text:g,weight:this.minWeight()+(_-c)*(this.maxWeight()-this.minWeight())/(m-c),color:this.colorScheme()[Math.floor(Math.random()*this.colorScheme().length)]}))}_applySelectionStyles(){if(!this.highlightSelection())return;const e=this.wordCloudContainer?.nativeElement;void 0!==e&&e.querySelectorAll("span").forEach(i=>{i.textContent&&(this.selection().includes(i.textContent.trim())?i.classList.add("selected"):i.classList.remove("selected"))})}handleClicked(e){this.clickable()&&(this.clickedWord.emit(e.text),this.highlightSelection()&&(this.selection().includes(e.text)?this.selection.update(n=>n.filter(i=>i!==e.text)):this.multiSelect()?this.selection.update(n=>[...n,e.text]):this.selection.update(()=>[e.text])),this.selectionChanged.emit(this.selection()))}static \u0275fac=function(n){return new(n||o)};static \u0275cmp=t.VBU({type:o,selectors:[["cue-word-cloud"]],viewQuery:function(n,i){if(1&n&&t.GBs(R,5),2&n){let s;t.mGM(s=t.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&&(t.j41(0,"div",1,0),t.bIt("resized",function(c){return i.handleResize(c)}),t.nVh(2,P,1,6,"angular-tag-cloud",2),t.k0s()),2&n&&(t.xc7("display",i.data().length?"block":"none"),t.AVh("clickable",i.clickable()),t.R7$(2),t.vxM(i.data().length?2:-1))},dependencies:[V,E.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=d(1696),ue=d(5448),W=d(3319);const U=o=>{const a=o.split("/");return a[a.length-1]};var he=d(6950),Y=d(7598),A=d(2245),j=d(5381),$=d(7089),f=d(4015),Q=d(2444),pe=d(9695),ge=d(5745),J=d(8957);let H=(()=>{class o{value="";lineHeight="1.5";agInit(e){this.value=e.value||"",this.lineHeight=e.colDef&&e.colDef.cellRendererParams&&e.colDef.cellRendererParams.lineHeight||e.context&&e.context.lineHeight||"1.5"}refresh(e){return this.value=e.value||"",!0}static \u0275fac=function(n){return new(n||o)};static \u0275cmp=t.VBU({type:o,selectors:[["cue-multiline-cell-renderer"]],decls:2,vars:3,consts:[[1,"multiline-cell"]],template:function(n,i){1&n&&(t.rj2(0,"div",0),t.EFF(1),t.eux()),2&n&&(t.xc7("line-height",i.lineHeight),t.R7$(),t.JRh(i.value))},styles:[".multiline-cell[_ngcontent-%COMP%]{white-space:pre-wrap;word-wrap:break-word;padding:4px 2px;text-align:left}"]})}return o})(),fe=(()=>{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,u.EW)(()=>this._options().map(e=>e.value));_labelMap=(0,u.EW)(()=>Object.fromEntries(this._options().map(e=>[e.value,e.label])));_params;agInit(e){this._apply(e)}refresh(e){return this._apply(e),!0}onValueChange(e){if(void 0===e)return;const n=String(e),i=this._canChange();i&&!i(n)||(this._value.set(n),this._params.setValue?.(n))}_apply(e){this._params=e,this._value.set(e.value??"");const n="function"==typeof e.colDef?.cellRendererParams?e.colDef.cellRendererParams(e):e.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=t.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&&(t.j41(0,"cue-select",0),t.bIt("valueChange",function(c){return i.onValueChange(c)}),t.k0s()),2&n&&t.Y8G("options",i._optionValues())("labelMap",i._labelMap())("value",i._value())("underline",!1)("menuPosition","bottomleft")("disabled",i._disabled())("cueTooltip",i._disabled()?i._disabledTooltip():"")},dependencies:[Q.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 _e=d(7374),q=d.n(_e),Ce=d(4955),ve=d.n(Ce),be=d(5164),xe=d.n(be);d(9785),d(2269),d(1409),d(4230),d(2494),d(9531),q().extend(ve()),q().extend(xe());let De=(()=>{class o{_transloco=(0,l.WQX)(f.JO);transform(e,n="dateTime"){if(!e)return"";const i=this._transloco.getActiveLang(),s=q()(e).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=t.EJ8({name:"cueLocalDate",type:o,pure:!0})}return o})(),X=(()=>{class o{_value=(0,l.vPA)("");_format=(0,l.vPA)("dateTime");agInit(e){this._apply(e)}refresh(e){return this._apply(e),!0}_apply(e){this._value.set(e.value??""),this._format.set(e.colDef?.cellRendererParams?.dateFormat??"dateTime")}static \u0275fac=function(n){return new(n||o)};static \u0275cmp=t.VBU({type:o,selectors:[["cue-date-cell-renderer"]],decls:2,vars:4,template:function(n,i){1&n&&(t.EFF(0),t.nI1(1,"cueLocalDate")),2&n&&t.JRh(t.i5U(1,1,i._value(),i._format()))},dependencies:[De],encapsulation:2,changeDetection:0})}return o})();const Me=["*"];function ye(o,a){1&o&&t.SdG(0)}let we=(()=>{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=t.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&&(t.NAR(),t.j41(0,"cue-flexcontainer",0)(1,"cue-flexcontainer",1),t.bIt("click",function(){return i.toggle()}),t.j41(2,"cue-typography",2),t.EFF(3),t.k0s(),t.j41(4,"cue-button",3)(5,"span"),t.nrm(6,"cue-button-icon",4),t.k0s()()(),t.nVh(7,ye,1,0),t.k0s()),2&n&&(t.R7$(2),t.Y8G("size",i.size())("info",i.info()),t.R7$(),t.JRh(i.label()),t.R7$(),t.Y8G("size",i.size()),t.R7$(),t.AVh("rotate",!0)("rotate-180",i.expanded()),t.R7$(2),t.vxM(i.expanded()?7:-1))},dependencies:[A.o,j.n,O.$,W.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 ee(o){if(o)return o.replace(/([A-Z])/g," $1").replace(/^./,a=>a.toUpperCase())}var Se=d(9417),Te=d(1359);const Fe=(o,a)=>a.value;function ke(o,a){if(1&o){const e=t.RV6();t.j41(0,"cue-input",6),t.bIt("valueChange",function(i){l.eBV(e);const s=t.XpG();return s.searchText=i,l.Njj(s.onSearchChange())}),t.k0s()}if(2&o){const e=t.XpG();t.Y8G("value",e.searchText)}}function Ie(o,a){if(1&o){const e=t.RV6();t.j41(0,"cue-checkbox",7),t.bIt("checkedChange",function(i){const s=l.eBV(e).$implicit,c=t.XpG();return s.selected=i,l.Njj(c.onSelectionChange())}),t.k0s()}if(2&o){const e=a.$implicit;t.Y8G("label",e.value||"(blank)")("checked",e.selected)}}function Re(o,a){1&o&&(t.j41(0,"cue-typography",5),t.EFF(1,"No results"),t.k0s())}let te=(()=>{class o{_cdr=(0,l.WQX)(r.gRc);_params;options=[];filteredOptions=[];searchText="";agInit(e){this._params=e}afterGuiAttached(e){this._refreshOptions(),this._cdr.markForCheck()}onNewRowsLoaded(){this._refreshOptions(),this._cdr.markForCheck()}isFilterActive(){return this.options.some(e=>!e.selected)}doesFilterPass(e){const n=new Set(this.options.filter(m=>m.selected).map(m=>m.value)),i=this._params.getValue(e.node),s=null==i?"":String(i);return"..."===s||"Loading..."===s||(""===s?n.has(""):s.split(", ").map(m=>m.trim()).some(m=>n.has(m)))}getModel(){return this.isFilterActive()?{selectedValues:this.options.filter(e=>e.selected).map(e=>e.value)}:null}setModel(e){if(e){const n=new Set(e.selectedValues);this.options.forEach(i=>i.selected=n.has(i.value))}else this.options.forEach(n=>n.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(e=>e.selected)}toggleAll(e){this.options.forEach(n=>n.selected=e),this._applySearch(),this._params.filterChangedCallback(),this._cdr.markForCheck()}_refreshOptions(){const e=new Set;this._params.api.forEachNode(i=>{const s=this._params.getValue(i);if(null==s||""===s)e.add("");else{const c=String(s);if("..."===c||"Loading..."===c)return;const m=c.split(", ").map(p=>p.trim());for(const p of m)e.add(p)}});const n=new Map(this.options.map(i=>[i.value,i.selected]));this.options=Array.from(e).sort((i,s)=>i.localeCompare(s)).map(i=>({value:i,selected:n.get(i)??!0})),this._applySearch()}_applySearch(){const e=this.searchText.toLowerCase().trim();this.filteredOptions=e?this.options.filter(n=>n.value.toLowerCase().includes(e)):this.options}static \u0275fac=function(n){return new(n||o)};static \u0275cmp=t.VBU({type:o,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(n,i){1&n&&(t.j41(0,"cue-flexcontainer",0),t.nVh(1,ke,1,1,"cue-input",1),t.j41(2,"cue-checkbox",2),t.bIt("checkedChange",function(c){return i.toggleAll(c)}),t.k0s(),t.j41(3,"div",3),t.Z7z(4,Ie,1,2,"cue-checkbox",4,Fe),t.nVh(6,Re,2,0,"cue-typography",5),t.k0s()()),2&n&&(t.R7$(),t.vxM(i.options.length>10?1:-1),t.R7$(),t.Y8G("checked",i.allSelected),t.R7$(2),t.Dyx(i.filteredOptions),t.R7$(2),t.vxM(0===i.filteredOptions.length?6:-1))},dependencies:[Se.YN,Te.S,J.p,A.o,j.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 o})();function Ne(o,a){if(1&o){const e=t.RV6();t.j41(0,"cue-input",4),t.bIt("valueChange",function(i){l.eBV(e);const s=t.XpG();return l.Njj(s.onValueChange(i))}),t.k0s()}if(2&o){const e=t.XpG();t.Y8G("value",e.filterText)}}function Pe(o,a){if(1&o){const e=t.RV6();t.j41(0,"cue-typography",5),t.bIt("click",function(){l.eBV(e);const i=t.XpG();return l.Njj(i.clear())}),t.EFF(1,"Clear"),t.k0s()}}let ne=(()=>{class o{_cdr=(0,l.WQX)(r.gRc);_params;filterText="";filterType="contains";filterTypeOptions=["contains","notContains","equals","notEqual","startsWith","endsWith","blank","notBlank"];_labelContains=(0,f.Xx)("components.agGridColumnSelect.textFilterContains");_labelNotContains=(0,f.Xx)("components.agGridColumnSelect.textFilterNotContains");_labelEquals=(0,f.Xx)("components.agGridColumnSelect.textFilterEquals");_labelNotEqual=(0,f.Xx)("components.agGridColumnSelect.textFilterNotEqual");_labelStartsWith=(0,f.Xx)("components.agGridColumnSelect.textFilterStartsWith");_labelEndsWith=(0,f.Xx)("components.agGridColumnSelect.textFilterEndsWith");_labelBlank=(0,f.Xx)("components.agGridColumnSelect.textFilterBlank");_labelNotBlank=(0,f.Xx)("components.agGridColumnSelect.textFilterNotBlank");filterTypeLabelMap=(0,u.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,u.EW)(()=>!["blank","notBlank"].includes(this.filterType));agInit(e){this._params=e}afterGuiAttached(e){this._cdr.markForCheck()}isFilterActive(){return!!["blank","notBlank"].includes(this.filterType)||this.filterText.trim().length>0}doesFilterPass(e){const n=this._params.getValue(e.node),i=null==n?"":String(n),s=this.filterText.toLowerCase().trim(),c=i.toLowerCase();switch(this.filterType){case"contains":default:return c.includes(s);case"notContains":return!c.includes(s);case"equals":return c===s;case"notEqual":return c!==s;case"startsWith":return c.startsWith(s);case"endsWith":return c.endsWith(s);case"blank":return""===i;case"notBlank":return""!==i}}getModel(){return this.isFilterActive()?{filterType:"text",type:this.filterType,filter:this.filterText}:null}setModel(e){this.filterText=e?.filter??"",this.filterType=e?.type??"contains",this._cdr.markForCheck()}onValueChange(e){this.filterText=e,this._params.filterChangedCallback(),this._cdr.markForCheck()}onFilterTypeChange(e){this.filterType=String(e||"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(n){return new(n||o)};static \u0275cmp=t.VBU({type:o,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(n,i){1&n&&(t.j41(0,"cue-flexcontainer",0)(1,"cue-select",1),t.bIt("valueChange",function(c){return i.onFilterTypeChange(c)}),t.k0s(),t.nVh(2,Ne,1,1,"cue-input",2),t.nVh(3,Pe,2,0,"cue-typography",3),t.k0s()),2&n&&(t.R7$(),t.Y8G("value",i.filterType)("options",i.filterTypeOptions)("labelMap",i.filterTypeLabelMap()),t.R7$(),t.vxM(i.showTextInput()?2:-1),t.R7$(),t.vxM(i.filterText||"contains"!==i.filterType?3:-1))},dependencies:[J.p,Q.l,A.o,j.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 o})();const Ae=[{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 oe(o){const a=[];let e=0;for(;e<o.length;){if(/\s/.test(o[e])){e++;continue}if('"'===o[e]||"'"===o[e]){const i=o[e++];let s="";for(;e<o.length&&o[e]!==i;)s+="\\"===o[e]?o[++e]:o[e],e++;if(o[e]!==i)throw new Error("Unterminated string literal");e++,a.push({kind:"str",val:s});continue}const n=o.slice(e).match(/^(\d+\.?\d*|\.\d+)([eE][+-]?\d+)?/);if(n)a.push({kind:"num",val:n[0]}),e+=n[0].length;else{if("?"===o[e]){let i="?";for(e++;e<o.length&&/\w/.test(o[e]);)i+=o[e++];a.push({kind:"var",val:i});continue}if(/[A-Za-z_]/.test(o[e])){let i="";for(;e<o.length&&/\w/.test(o[e]);)i+=o[e++];a.push({kind:"ident",val:i.toUpperCase()});continue}if("**"!==o.slice(e,e+2)){if(!"+-*/%(),".includes(o[e]))throw new Error(`Unexpected character "${o[e]}" at position ${e}`);a.push({kind:"op",val:o[e++]})}else a.push({kind:"op",val:"**"}),e+=2}}return a.push({kind:"eof",val:""}),a}class se{tokens;vars;pos=0;constructor(a,e){this.tokens=a,this.vars=e}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 e=this.next().val,n=this.multiplicative();a="+"===e?"string"==typeof a||"string"==typeof n?String(a)+String(n):a+n:D(a)-D(n)}return a}multiplicative(){let a=this.power();for(;"op"===this.peek().kind&&("*"===this.peek().val||"/"===this.peek().val||"%"===this.peek().val);){const e=this.next().val,n=this.power();if("*"===e)a=D(a)*D(n);else if("/"===e){const i=D(n);a=0!==i?D(a)/i:0}else a=D(a)%D(n)}return a}power(){const a=this.unary();return"op"===this.peek().kind&&"**"===this.peek().val?(this.next(),Math.pow(D(a),D(this.power()))):a}unary(){return"op"===this.peek().kind&&"-"===this.peek().val?(this.next(),-D(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 e=this.expr();return this.eat(")"),e}throw new Error(`Unexpected token: "${a.val}"`)}funcCall(){const a=this.next().val;this.eat("(");const e=[];if(")"!==this.peek().val)for(e.push(this.expr());","===this.peek().val;)this.next(),e.push(this.expr());return this.eat(")"),function Le(o,a){const e=n=>a[n]??"";switch(o){case"ROUND":return Number(D(e(0)).toFixed(Math.max(0,D(e(1)))));case"FLOOR":return Math.floor(D(e(0)));case"CEIL":return Math.ceil(D(e(0)));case"ABS":return Math.abs(D(e(0)));case"SQRT":return Math.sqrt(D(e(0)));case"MIN":return Math.min(...a.map(D));case"MAX":return Math.max(...a.map(D));case"CONCAT":return a.map(n=>String(n)).join("");case"TRIM":return String(e(0)).trim();case"UPPER":return String(e(0)).toUpperCase();case"LOWER":return String(e(0)).toLowerCase();case"LEN":return String(e(0)).length;case"REPLACE":return String(e(0)).replaceAll(String(e(1)),String(e(2)));case"NUM":return D(e(0));case"STR":return String(e(0));case"PREFIX":return String(e(0))?String(e(1))+String(e(0)):String(e(0));case"SUFFIX":return String(e(0))?String(e(0))+String(e(1)):String(e(0));case"IF":return 0!==D(e(0))&&""!==e(0)&&"false"!==e(0)?e(1):e(2);case"AFTER_LAST":{const n=String(e(0)),i=String(e(1)),s=n.lastIndexOf(i);return-1===s?n:n.slice(s+i.length)}case"AFTER_FIRST":{const n=String(e(0)),i=String(e(1)),s=n.indexOf(i);return-1===s?n:n.slice(s+i.length)}case"BEFORE_LAST":{const n=String(e(0)),i=String(e(1)),s=n.lastIndexOf(i);return-1===s?n:n.slice(0,s)}case"BEFORE_FIRST":{const n=String(e(0)),i=String(e(1)),s=n.indexOf(i);return-1===s?n:n.slice(0,s)}case"SEGMENT":return String(e(0)).split(String(e(1)))[D(e(2))]??"";default:throw new Error(`Unknown function: "${o}"`)}}(a,e)}}function D(o){if("number"==typeof o)return o;const a=Number(o);return isNaN(a)?0:a}const Ee=["*",[["","cueDisplayContent",""]],[["","cueDataContent",""]],[["","cueBehaviorContent",""]],[["","cueExtraContent",""]]],je=["*","[cueDisplayContent]","[cueDataContent]","[cueBehaviorContent]","[cueExtraContent]"],ze=(o,a)=>a.name;function Ve(o,a){if(1&o){const e=t.RV6();t.j41(0,"cue-input",7),t.nI1(1,"transloco"),t.bIt("valueChange",function(i){l.eBV(e);const s=t.XpG(2);return l.Njj(s.setLabel(i))}),t.k0s()}if(2&o){const e=t.XpG(2);t.Y8G("label",t.bMT(1,2,"components.agGridColumnSelect.labelLabel"))("value",e.label())}}function Be(o,a){if(1&o){const e=t.RV6();t.j41(0,"cue-button",11),t.bIt("click",function(){const i=l.eBV(e).$implicit,s=t.XpG(3);return l.Njj(s.setTextAlign(i))}),t.nrm(1,"cue-button-icon",12),t.k0s()}if(2&o){const e=a.$implicit,n=t.XpG(3);t.Y8G("selected",n.textAlign()===e),t.R7$(),t.Y8G("icon",n.ALIGN_ICON[e])}}function We(o,a){if(1&o&&(t.j41(0,"cue-typography",8),t.EFF(1),t.nI1(2,"transloco"),t.k0s(),t.j41(3,"cue-flexcontainer",9),t.Z7z(4,Be,2,2,"cue-button",10,t.Vm6),t.k0s()),2&o){const e=t.XpG(2);t.R7$(),t.SpI(" ",t.bMT(2,1,"components.agGridColumnSelect.labelTextAlign")," "),t.R7$(3),t.Dyx(e.alignOptions)}}function Ye(o,a){if(1&o){const e=t.RV6();t.j41(0,"cue-flexcontainer",6)(1,"cue-typography",13),t.nI1(2,"transloco"),t.EFF(3),t.nI1(4,"transloco"),t.k0s(),t.j41(5,"cue-input-switch",14),t.bIt("checkedChange",function(i){l.eBV(e);const s=t.XpG(2);return l.Njj(s.setMultiline(i))}),t.k0s()()}if(2&o){const e=t.XpG(2);t.R7$(),t.Y8G("cueTooltip",t.bMT(2,3,"components.agGridColumnSelect.tooltipMultiline")),t.R7$(2),t.JRh(t.bMT(4,5,"components.agGridColumnSelect.labelMultiline")),t.R7$(2),t.Y8G("checked",e.multiline())}}function $e(o,a){if(1&o&&(t.j41(0,"cue-expansion-panel",2),t.nI1(1,"transloco"),t.j41(2,"cue-flexcontainer",4),t.nVh(3,Ve,2,4,"cue-input",5),t.nVh(4,We,6,3),t.nVh(5,Ye,6,7,"cue-flexcontainer",6),t.SdG(6,1),t.k0s()()),2&o){const e=t.XpG();t.Y8G("label",t.bMT(1,5,"components.agGridColumnSelect.groupDisplay"))("expanded",!0),t.R7$(3),t.vxM(e.settings().allowSettingLabel?3:-1),t.R7$(),t.vxM(e.settings().allowSettingTextAlign?4:-1),t.R7$(),t.vxM(e.settings().allowSettingMultiline?5:-1)}}function He(o,a){if(1&o){const e=t.RV6();t.j41(0,"cue-select",16),t.nI1(1,"transloco"),t.bIt("valueChange",function(i){l.eBV(e);const s=t.XpG(2);return l.Njj(s.setFilterType(i))}),t.k0s()}if(2&o){const e=t.XpG(2);t.Y8G("label",t.bMT(1,4,"components.agGridColumnSelect.labelFilterType"))("value",e.filterType())("options",e.filterTypeOptions)("labelMap",e.filterTypeLabelMap())}}function Xe(o,a){if(1&o){const e=t.RV6();t.j41(0,"cue-input",7),t.nI1(1,"transloco"),t.bIt("valueChange",function(i){l.eBV(e);const s=t.XpG(2);return l.Njj(s.setEnumValues(i))}),t.k0s()}if(2&o){const e=t.XpG(2);t.Y8G("label",t.bMT(1,2,"components.agGridColumnSelect.labelEnumValues"))("value",e.enumValuesText())}}function Ue(o,a){if(1&o){const e=t.RV6();t.j41(0,"cue-select",16),t.bIt("valueChange",function(i){l.eBV(e);const s=t.XpG(3);return l.Njj(s.setDateFormat(i))}),t.k0s()}if(2&o){const e=t.XpG(3);t.Y8G("label",e._labelDateFormat())("value",e.dateFormat())("options",e.dateFormatOptions)("labelMap",e.dateFormatLabelMap())}}function Qe(o,a){if(1&o){const e=t.RV6();t.j41(0,"cue-select",16),t.bIt("valueChange",function(i){l.eBV(e);const s=t.XpG(2);return l.Njj(s.setDataType(i))}),t.k0s(),t.nVh(1,Ue,1,4,"cue-select",15)}if(2&o){const e=t.XpG(2);t.Y8G("label",e._labelDataType())("value",e.dataType())("options",e.dataTypeOptions)("labelMap",e.dataTypeLabelMap()),t.R7$(),t.vxM("date"===e.dataType()?1:-1)}}function Je(o,a){if(1&o&&(t.j41(0,"cue-expansion-panel",3),t.nI1(1,"transloco"),t.j41(2,"cue-flexcontainer",4),t.nVh(3,He,2,6,"cue-select",15),t.nVh(4,Xe,2,4,"cue-input",5),t.nVh(5,Qe,2,5),t.SdG(6,2),t.k0s()()),2&o){const e=t.XpG();t.Y8G("label",t.bMT(1,4,"components.agGridColumnSelect.groupData")),t.R7$(3),t.vxM(e.settings().allowSettingFilterType?3:-1),t.R7$(),t.vxM(e.settings().allowSettingEnumValues?4:-1),t.R7$(),t.vxM(e.settings().allowSettingDataType?5:-1)}}function qe(o,a){if(1&o){const e=t.RV6();t.j41(0,"cue-expansion-panel",3),t.nI1(1,"transloco"),t.j41(2,"cue-flexcontainer",4)(3,"cue-flexcontainer",6)(4,"cue-typography",13),t.nI1(5,"transloco"),t.EFF(6),t.nI1(7,"transloco"),t.k0s(),t.j41(8,"cue-input-switch",14),t.bIt("checkedChange",function(i){l.eBV(e);const s=t.XpG();return l.Njj(s.setEditable(i))}),t.k0s()(),t.SdG(9,3),t.k0s()()}if(2&o){const e=t.XpG();t.Y8G("label",t.bMT(1,4,"components.agGridColumnSelect.groupBehavior")),t.R7$(4),t.Y8G("cueTooltip",t.bMT(5,6,"components.agGridColumnSelect.tooltipAllowEditing")),t.R7$(2),t.JRh(t.bMT(7,8,"components.agGridColumnSelect.labelEditable")),t.R7$(2),t.Y8G("checked",e.editable())}}function Ze(o,a){if(1&o&&(t.j41(0,"cue-expansion-panel",2)(1,"cue-flexcontainer",4),t.SdG(2,4),t.k0s()()),2&o){const e=t.XpG();t.Y8G("label",e.extraPanelLabel())("expanded",e.extraPanelExpanded())}}function Ke(o,a){if(1&o&&(t.j41(0,"cue-typography",19),t.EFF(1),t.nI1(2,"transloco"),t.j41(3,"strong"),t.EFF(4),t.k0s()()),2&o){const e=t.XpG(2);t.R7$(),t.SpI(" ",t.bMT(2,2,"components.agGridColumnSelect.labelPostProcessPreview"),": "),t.R7$(3),t.JRh(e.postProcessFormulaPreview())}}function et(o,a){if(1&o&&(t.j41(0,"cue-flexcontainer",21)(1,"cue-typography",22),t.EFF(2),t.k0s(),t.j41(3,"cue-typography",23),t.EFF(4),t.k0s()()),2&o){const e=a.$implicit;t.R7$(2),t.JRh(e.signature),t.R7$(2),t.JRh(e.description)}}function tt(o,a){if(1&o){const e=t.RV6();t.j41(0,"cue-expansion-panel",3),t.nI1(1,"transloco"),t.j41(2,"cue-flexcontainer",17)(3,"cue-input",18),t.nI1(4,"transloco"),t.nI1(5,"transloco"),t.nI1(6,"transloco"),t.bIt("valueChange",function(i){l.eBV(e);const s=t.XpG();return l.Njj(s.setPostProcessFormula(i))}),t.k0s(),t.nVh(7,Ke,5,4,"cue-typography",19),t.j41(8,"cue-expansion-panel",20),t.nI1(9,"transloco"),t.j41(10,"cue-flexcontainer",17),t.Z7z(11,et,5,2,"cue-flexcontainer",21,ze),t.k0s()()()()}if(2&o){const e=t.XpG();t.Y8G("label",t.bMT(1,9,"components.agGridColumnSelect.groupPostProcess")),t.R7$(3),t.Y8G("label",t.bMT(4,11,"components.agGridColumnSelect.labelPostProcessFormula"))("info",t.bMT(5,13,"components.agGridColumnSelect.tooltipPostProcessFormula"))("placeholder",t.bMT(6,15,"components.agGridColumnSelect.placeholderPostProcessFormula"))("value",e.postProcessFormula())("error",e.postProcessFormulaError()??void 0),t.R7$(4),t.vxM(e.postProcessFormulaPreview()?7:-1),t.R7$(),t.Y8G("label",t.bMT(9,17,"components.agGridColumnSelect.labelPostProcessFunctions"))("expanded",!1),t.R7$(3),t.Dyx(e.formulaFunctions)}}class ae{allowEditing=!0;allowToggleEditable=!0;allowToggleHideOnHover=!0;allowSettingTextAlign=!0;allowSettingLabel=!0;allowSettingFilterType=!0;allowSettingMultiline=!0;allowSettingEnumValues=!0;allowSettingDataType=!1;allowSettingPostProcess=!0}const nt={Text:ne,Number:"agNumberColumnFilter",Date:"agDateColumnFilter",Select:te,None:!1,Auto:!0},it={agTextColumnFilter:"Text",agNumberColumnFilter:"Number",agDateColumnFilter:"Date",false:"None",true:"Auto"};let ot=(()=>{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,f.Xx)("components.agGridColumnSelect.labelDataType");_labelDateFormat=(0,f.Xx)("components.agGridColumnSelect.labelDateFormat");_dtText=(0,f.Xx)("components.agGridColumnSelect.dataTypeText");_dtNumber=(0,f.Xx)("components.agGridColumnSelect.dataTypeNumber");_dtDate=(0,f.Xx)("components.agGridColumnSelect.dataTypeDate");_dtBoolean=(0,f.Xx)("components.agGridColumnSelect.dataTypeBoolean");_dfDateTime=(0,f.Xx)("components.agGridColumnSelect.dateFormatDateTime");_dfDate=(0,f.Xx)("components.agGridColumnSelect.dateFormatDate");_dfShortDate=(0,f.Xx)("components.agGridColumnSelect.dateFormatShortDate");_dfTimeAgo=(0,f.Xx)("components.agGridColumnSelect.dateFormatTimeAgo");dataTypeLabelMap=(0,u.EW)(()=>({text:this._dtText(),number:this._dtNumber(),date:this._dtDate(),boolean:this._dtBoolean()}));dateFormatLabelMap=(0,u.EW)(()=>({dateTime:this._dfDateTime(),date:this._dfDate(),shortDate:this._dfShortDate(),timeAgo:this._dfTimeAgo()}));_labelText=(0,f.Xx)("components.agGridColumnSelect.filterTypeText");_labelNumber=(0,f.Xx)("components.agGridColumnSelect.filterTypeNumber");_labelDate=(0,f.Xx)("components.agGridColumnSelect.filterTypeDate");_labelSelect=(0,f.Xx)("components.agGridColumnSelect.filterTypeSelect");_labelNone=(0,f.Xx)("components.agGridColumnSelect.filterTypeNone");_labelAuto=(0,f.Xx)("components.agGridColumnSelect.filterTypeAuto");filterTypeLabelMap=(0,u.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,u.EW)(()=>{const e=this.columnDef().cellRenderer;return e===X||"DateCellRenderer"===e?"date":"text"});dateFormat=(0,u.EW)(()=>{const e=this.columnDef().cellRenderer;return e===X||"DateCellRenderer"===e?this.columnDef().cellRendererParams?.dateFormat??"dateTime":"dateTime"});editable=(0,u.EW)(()=>!0===this.columnDef().editable);multiline=(0,u.EW)(()=>{const e=this.columnDef().cellRenderer;return e===H||"MultilineCellRenderer"===e});_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,u.uu)(()=>{const e=this.columnDef().cellStyle;return e?.textAlign||this._FLEX_TO_ALIGN[e?.justifyContent]||"left"});filterType=(0,u.EW)(()=>{const e=this.columnDef().filter;return e===te?"Select":e===ne?"Text":it[e]||"Auto"});enumValuesText=(0,u.EW)(()=>(this.columnDef().cellRendererParams?.options??[]).map(n=>n.value).join(", "));label=(0,u.EW)(()=>this.columnDef().headerName||ee(this.columnDef().field)||"Unknown");setEditable(e){const n=this.columnDef().cellRendererParams;this.updateColumn.emit(n?.options?.length?{editable:e,cellRendererParams:{...n,disabled:!e}}:{editable:e})}setMultiline(e){this.updateColumn.emit({cellRenderer:e?H:void 0,cellRendererParams:{lineHeight:"1.8"},autoHeight:!0})}setLabel(e){this.updateColumn.emit({headerName:e})}setTextAlign(e){const n=this.columnDef().cellStyle||{};this.updateColumn.emit({cellStyle:{...n,display:"flex",justifyContent:this._ALIGN_TO_FLEX[e]??e,textAlign:e},headerClass:`header-align-${e}`}),this.textAlign.set(e)}setFilterType(e){this.updateColumn.emit({filter:nt[e]??!0})}setEnumValues(e){const n=e.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:fe,cellRendererParams:{options:i,disabled:!this.editable()}})}}setDateFormat(e){e&&this.updateColumn.emit({cellRenderer:X,cellRendererParams:{dateFormat:e}})}setDataType(e){this.updateColumn.emit("date"===e?{cellRenderer:X,cellRendererParams:{dateFormat:"dateTime"}}:{cellRenderer:void 0,cellRendererParams:void 0})}formulaFunctions=Ae;postProcessFormula=(0,u.EW)(()=>function Oe(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,u.EW)(()=>function Ge(o){if(!o||!o.trim())return null;try{const a=oe(o);return new se(a,{"?val":"42"}).parse(),null}catch(a){return a?.message??"Invalid formula"}}(this.postProcessFormula()));postProcessFormulaPreview=(0,u.EW)(()=>{const e=this.postProcessFormula();return!e||this.postProcessFormulaError()?"":function ie(o,a){if(!o||!o.trim())return a;try{const e=oe(o),n=new se(e,{"?val":a}).parse();return null==n?"":String(n)}catch{return a}}(e,"42")});setPostProcessFormula(e){const n=e.trim();this.updateColumn.emit({postProcess:n?{type:"formula",expression:n}:void 0})}static \u0275fac=function(n){return new(n||o)};static \u0275cmp=t.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:je,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&&(t.NAR(Ee),t.j41(0,"cue-modal",0),t.nI1(1,"transloco"),t.bIt("close",function(){return i.close.emit()}),t.j41(2,"cue-flexcontainer",1),t.nVh(3,$e,7,7,"cue-expansion-panel",2),t.nVh(4,Je,7,6,"cue-expansion-panel",3),t.nVh(5,qe,10,10,"cue-expansion-panel",3),t.nVh(6,Ze,3,2,"cue-expansion-panel",2),t.nVh(7,tt,13,19,"cue-expansion-panel",3),t.SdG(8),t.k0s()()),2&n&&(t.Y8G("label",t.bMT(1,7,"components.agGridColumnSelect.titleColumnSettings"))("minWidth",i.minWidth()),t.R7$(3),t.vxM(i.settings().allowSettingLabel||i.settings().allowSettingTextAlign||i.settings().allowSettingMultiline?3:-1),t.R7$(),t.vxM(i.settings().allowSettingFilterType||i.settings().allowSettingEnumValues||i.settings().allowSettingDataType?4:-1),t.R7$(),t.vxM(i.settings().allowToggleEditable?5:-1),t.R7$(),t.vxM(i.extraPanelLabel()?6:-1),t.R7$(),t.vxM(i.settings().allowSettingPostProcess?7:-1))},dependencies:[ge.a,j.n,A.o,Q.l,pe.d,$.d,J.p,O.$,W.a,we,f.Kj],encapsulation:2,changeDetection:0})}return o})();const le=o=>[o],st=(o,a)=>({$implicit:o,index:a});function at(o,a){if(1&o){const e=t.RV6();t.j41(0,"cue-table-column-settings-modal",9),t.bIt("updateColumn",function(i){const s=l.eBV(e),c=t.XpG();return l.Njj(c.updateColumnDef(s.index,i))})("close",function(){l.eBV(e);const i=t.XpG();return l.Njj(i.handleModalClose())}),t.k0s()}if(2&o){const e=a,n=t.XpG();t.Y8G("columnDef",e.col)("columnIndex",e.index)("settings",n.settings())}}function lt(o,a){1&o&&t.eu8(0)}function rt(o,a){if(1&o&&t.DNE(0,lt,1,0,"ng-container",13),2&o){const e=t.XpG(),n=e.$implicit,i=e.$index;t.Y8G("ngTemplateOutlet",a.templateRef)("ngTemplateOutletContext",t.l_i(2,st,n,i))}}function ct(o,a){if(1&o){const e=t.RV6();t.j41(0,"cue-button",14),t.nI1(1,"transloco"),t.bIt("click",function(){l.eBV(e);const i=t.XpG(),s=i.$implicit,c=i.$index,m=t.XpG();return l.Njj(m.showColumnSettings(s,c))}),t.nrm(2,"cue-button-icon",15),t.k0s()}2&o&&t.Y8G("cueTooltip",t.bMT(1,1,"components.agGridColumnSelect.tooltipSettings"))}function dt(o,a){if(1&o&&(t.j41(0,"div",8)(1,"cue-flexcontainer",10)(2,"cue-typography"),t.EFF(3),t.k0s(),t.nrm(4,"span",11),t.nVh(5,rt,1,5,"ng-container"),t.nVh(6,ct,3,3,"cue-button",12),t.k0s()()),2&o){let e;const n=a.$implicit,i=t.XpG();t.R7$(3),t.JRh(i.getLabel(n)),t.R7$(2),t.vxM((e=i.columnItemTpl())?5:-1,e),t.R7$(),t.vxM(i.settings().allowEditing?6:-1)}}function ut(o,a){1&o&&t.eu8(0)}function mt(o,a){1&o&&t.DNE(0,ut,1,0,"ng-container",16),2&o&&t.Y8G("ngTemplateOutlet",a.templateRef)}function ht(o,a){if(1&o&&(t.j41(0,"div",8)(1,"cue-typography"),t.EFF(2),t.k0s()()),2&o){const e=a.$implicit,n=t.XpG();t.R7$(2),t.JRh(n.getLabel(e))}}let re=(()=>{class o{templateRef=(0,l.WQX)(t.C4Q);static ngTemplateContextGuard(e,n){return!0}static \u0275fac=function(n){return new(n||o)};static \u0275dir=t.FsC({type:o,selectors:[["","cueColumnItem",""]]})}return o})(),ce=(()=>{class o{templateRef=(0,l.WQX)(t.C4Q);static \u0275fac=function(n){return new(n||o)};static \u0275dir=t.FsC({type:o,selectors:[["","cueColumnListFooter",""]]})}return o})(),pt=(()=>{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 e=this.columnDefs().map(i=>i.field),n=this.columnDefsGross().filter(i=>!e.includes(i.field));this.shownColumns.update(()=>[...this.columnDefs()]),this.hiddenColumns.update(()=>[...n])});drop(e){e.previousContainer===e.container?(0,Y.HD)(e.container.data,e.previousIndex,e.currentIndex):(0,Y.eg)(e.previousContainer.data,e.container.data,e.previousIndex,e.currentIndex);const n=this.shownColumns();this.columnDefs.update(()=>[...n]),this.shown.emit(n)}showColumnSettings(e,n){this.displayColumnSettings.set({col:e,index:n})}updateColumnDef(e,n){const i=this.columnDefs().map((s,c)=>c===e?{...s,...n}:s);this.columnDefs.set(i),this.shown.emit(i),this.shownColumns.set(i)}getLabel(e){return e.headerName||ee(e.field)||"Unknown"}handleModalClose(){this.displayColumnSettings.set(void 0)}static \u0275fac=function(n){return new(n||o)};static \u0275cmp=t.VBU({type:o,selectors:[["cue-ag-grid-column-select"]],contentQueries:function(n,i,s){1&n&&t.C6U(s,i.columnItemTpl,re,5)(s,i.columnListFooterTpl,ce,5),2&n&&t.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&&(t.nVh(0,at,1,3,"cue-table-column-settings-modal",2),t.j41(1,"cue-typography",3),t.EFF(2),t.nI1(3,"transloco"),t.k0s(),t.j41(4,"cue-flexcontainer",4)(5,"cue-flexcontainer",5)(6,"cue-typography",6),t.EFF(7),t.nI1(8,"transloco"),t.k0s(),t.j41(9,"div",7,0),t.bIt("cdkDropListDropped",function(c){return i.drop(c)}),t.Z7z(11,dt,7,3,"div",8,t.Vm6),t.nVh(13,mt,1,1,"ng-container"),t.k0s()(),t.j41(14,"cue-flexcontainer",5)(15,"cue-typography",6),t.EFF(16),t.nI1(17,"transloco"),t.k0s(),t.j41(18,"div",7,1),t.bIt("cdkDropListDropped",function(c){return i.drop(c)}),t.Z7z(20,ht,3,1,"div",8,t.Vm6),t.k0s()()()),2&n){let s,c;const m=t.sdS(10),p=t.sdS(19);t.vxM((s=i.displayColumnSettings())?0:-1,s),t.R7$(2),t.JRh(t.bMT(3,9,"components.agGridColumnSelect.dragHint")),t.R7$(5),t.JRh(t.bMT(8,11,"components.agGridColumnSelect.titleShown"));const g=i.shownColumns();t.R7$(2),t.Y8G("cdkDropListData",g)("cdkDropListConnectedTo",t.eq3(15,le,p)),t.R7$(2),t.Dyx(g),t.R7$(2),t.vxM((c=i.columnListFooterTpl())?13:-1,c),t.R7$(3),t.JRh(t.bMT(17,13,"components.agGridColumnSelect.titleHidden"));const _=i.hiddenColumns();t.R7$(2),t.Y8G("cdkDropListData",_)("cdkDropListConnectedTo",t.eq3(17,le,m)),t.R7$(2),t.Dyx(_)}},dependencies:[Y.O7,Y.T1,A.o,j.n,O.$,W.a,$.d,ot,h.T3,f.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 gt(o,a){if(1&o&&(l.qSk(),t.j41(0,"svg",0),t.nrm(1,"path",3)(2,"path",4),t.k0s()),2&o){const e=t.XpG();t.R7$(),t.BMQ("fill",e.colorDark()),t.R7$(),t.BMQ("fill",e.color())}}function ft(o,a){if(1&o&&(l.qSk(),t.j41(0,"svg",1),t.nrm(1,"path",5)(2,"path",6)(3,"path",7),t.k0s()),2&o){const e=t.XpG();t.R7$(2),t.BMQ("fill",e.color())}}const T_blue="#175EBB",_t={".dwg":T_blue,".dxf":T_blue,".doc":T_blue,".docx":T_blue,".ifc":"#9F388D",".pdf":"#E03833",".ppt":T_blue,".pptx":T_blue,".csv":"#0b7741",".xls":"#0b7741",".xlsx":"#0b7741",folder:"#9D9998"};let Ct=(()=>{class o{suffix=r.hFB.required();size=(0,r.hFB)("m");color=(0,u.EW)(()=>_t[this.suffix()]??"#9D9998");label=(0,u.EW)(()=>this.suffix().startsWith(".")?this.suffix().toUpperCase().replace(/^\./,""):"");className=(0,u.EW)(()=>`size-${this.size()}`);colorDark=(0,u.EW)(()=>{const e=this.color(),n=parseInt(e.slice(1),16),s=n>>8&255,c=255&n;return`#${(Math.floor(.8*(n>>16&255))<<16|Math.floor(.8*s)<<8|Math.floor(.8*c)).toString(16).padStart(6,"0")}`});static \u0275fac=function(n){return new(n||o)};static \u0275cmp=t.VBU({type:o,selectors:[["cue-file-icon"]],hostVars:2,hostBindings:function(n,i){2&n&&t.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&&(t.nVh(0,gt,3,2,":svg:svg",0)(1,ft,4,1,":svg:svg",1),t.j41(2,"cue-typography",2),t.EFF(3),t.k0s()),2&n&&(t.vxM("folder"===i.suffix()?0:1),t.R7$(3),t.JRh(i.label()))},dependencies:[A.o],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})(),vt=(()=>{class o{suffix=(0,l.vPA)("");iconSize=(0,l.vPA)("xs");agInit(e){this._apply(e)}refresh(e){return this._apply(e),!0}_apply(e){this.suffix.set(e.value||"folder"),this.iconSize.set({xs:"xs",s:"xs",m:"xs",l:"s",xl:"m"}[e.colDef?.cellRendererParams?.iconSize??e.iconSize??"xs"]??"xs")}static \u0275fac=function(n){return new(n||o)};static \u0275cmp=t.VBU({type:o,selectors:[["cue-file-icon-cell-renderer"]],decls:1,vars:2,consts:[[3,"suffix","size"]],template:function(n,i){1&n&&t.nrm(0,"cue-file-icon",0),2&n&&t.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 bt=d(6117),xt=d(29),Dt=d(1951),Mt=d(1493),yt=d(5187),wt=d(356),St=d(6279);let Tt=(()=>{class o{cueFlip=(0,r.geq)(!1);get flipped(){return this.cueFlip()}static \u0275fac=function(n){return new(n||o)};static \u0275dir=t.FsC({type:o,selectors:[["","cueFlip",""]],hostVars:2,hostBindings:function(n,i){2&n&&t.AVh("flipped",i.flipped)},inputs:{cueFlip:[1,"cueFlip"]},outputs:{cueFlip:"cueFlipChange"}})}return o})();const Ft=(o,a)=>a.id;function kt(o,a){if(1&o){const e=t.RV6();t.j41(0,"li",7),t.bIt("click",function(){const i=l.eBV(e).$implicit,s=t.XpG(3);return l.Njj(s.handleSimpleRowClick(i))}),t.j41(1,"cue-typography",8),t.EFF(2),t.k0s(),t.j41(3,"cue-typography",9),t.EFF(4),t.k0s()()}if(2&o){const e=a.$implicit,n=t.XpG(3);t.AVh("active",n.selectedSimpleDocumentId()===e.id),t.R7$(),t.Y8G("noWrap",!0)("title",e.name),t.R7$(),t.SpI(" ",e.name," "),t.R7$(2),t.SpI(" ",(e.suffix||"").replace(".","").toUpperCase()," ")}}function It(o,a){if(1&o&&(t.j41(0,"ul",3),t.Z7z(1,kt,5,6,"li",6,Ft),t.k0s()),2&o){const e=t.XpG(2);t.R7$(),t.Dyx(e.simpleDocumentsInt())}}function Rt(o,a){if(1&o&&(t.j41(0,"cue-flexcontainer",4)(1,"cue-typography",10),t.EFF(2),t.k0s()()),2&o){const e=t.XpG(2);t.R7$(2),t.SpI(" ",0===e.documentRefs().length&&0===e.documents().length&&e.handlers()?"No documents":e.infoLoading()," ")}}function Nt(o,a){if(1&o){const e=t.RV6();t.j41(0,"cue-flexcontainer",5)(1,"cue-typography",11),t.EFF(2),t.k0s(),t.j41(3,"cue-flexcontainer",12)(4,"cue-button",13),t.bIt("click",function(){l.eBV(e);const i=t.XpG(2);return l.Njj(i.previousSimplePage())}),t.nrm(5,"cue-button-icon",14),t.k0s(),t.j41(6,"cue-button",13),t.bIt("click",function(){l.eBV(e);const i=t.XpG(2);return l.Njj(i.nextSimplePage())}),t.nrm(7,"cue-button-icon",15),t.k0s()()()}if(2&o){const e=t.XpG(2);t.R7$(2),t.E5c(" ",e.simpleDisplayStart(),"-",e.simpleDisplayEnd()," / ",e.documentsInt().length," "),t.R7$(2),t.Y8G("disabled",!e.simpleHasPreviousPage()),t.R7$(2),t.Y8G("disabled",!e.simpleHasNextPage())}}function Pt(o,a){if(1&o&&(t.j41(0,"div",1),t.nVh(1,It,3,0,"ul",3)(2,Rt,3,1,"cue-flexcontainer",4),t.nVh(3,Nt,8,5,"cue-flexcontainer",5),t.k0s()),2&o){const e=t.XpG();t.R7$(),t.vxM(e.simpleDocumentsInt().length>0?1:2),t.R7$(2),t.vxM(e.documentsInt().length>0?3:-1)}}function Ot(o,a){if(1&o&&t.nrm(0,"cue-svg-icon",36),2&o){const e=t.XpG().$implicit;t.Y8G("name",e.icon)}}function At(o,a){if(1&o){const e=t.RV6();t.j41(0,"cue-menu-item",35),t.bIt("click",function(){const i=l.eBV(e).$implicit;return l.Njj(null==i?null:i.action())}),t.nVh(1,Ot,1,1,"cue-svg-icon",36),t.EFF(2),t.k0s()}if(2&o){const e=a.$implicit;t.R7$(),t.vxM(e.icon?1:-1),t.R7$(),t.SpI(" ",e.label)}}function Gt(o,a){if(1&o){const e=t.RV6();t.j41(0,"cue-flexcontainer",37),t.bIt("click",function(){l.eBV(e);const i=t.XpG(2);return l.Njj(i.applyTagFilter())}),t.j41(1,"cue-button",38)(2,"cue-button-label"),t.EFF(3,"Apply"),t.k0s()()()}}function Lt(o,a){if(1&o){const e=t.RV6();t.j41(0,"div",16),t.mxI("cueFlipChange",function(i){l.eBV(e);const s=t.XpG();return t.DH7(s.flipped,i)||(s.flipped=i),l.Njj(i)}),t.j41(1,"div",17)(2,"cue-card",18)(3,"cue-flexcontainer",19)(4,"cue-menu",20)(5,"cue-button",21,0),t.nrm(7,"cue-button-icon",22),t.k0s(),t.j41(8,"cue-menu-wrap",23),t.Z7z(9,At,3,2,"cue-menu-item",null,t.Vm6),t.k0s()(),t.j41(11,"cue-button",24),t.nI1(12,"transloco"),t.bIt("click",function(){l.eBV(e);const i=t.XpG();return l.Njj(i.flipped.set(!0))}),t.nrm(13,"cue-button-icon",25),t.k0s()(),t.j41(14,"div",26)(15,"cue-ag-grid",27),t.bIt("gridApiReady",function(i){l.eBV(e);const s=t.XpG();return l.Njj(s.onGridReady(i))})("selectedRows",function(i){l.eBV(e);const s=t.XpG();return l.Njj(s.clickedDocument.emit(i[0]))}),t.k0s()()(),t.j41(16,"cue-card",28)(17,"cue-flexcontainer",19)(18,"cue-button",29),t.bIt("click",function(){l.eBV(e);const i=t.XpG();return l.Njj(i.showFront())}),t.nrm(19,"cue-button-icon",30),t.k0s()(),t.j41(20,"cue-flexcontainer",31)(21,"cue-word-cloud",32),t.bIt("selectionChanged",function(i){l.eBV(e);const s=t.XpG();return l.Njj(s.tagSelection.set(i))}),t.k0s(),t.nVh(22,Gt,4,0,"cue-flexcontainer",33),t.k0s(),t.j41(23,"cue-ag-grid-column-select",34),t.mxI("columnDefsChange",function(i){l.eBV(e);const s=t.XpG();return t.DH7(s.columnDefs,i)||(s.columnDefs=i),l.Njj(i)}),t.k0s()()()()}if(2&o){const e=t.XpG();t.R50("cueFlip",e.flipped),t.R7$(9),t.Dyx(e.tableMenu()),t.R7$(2),t.Y8G("cueTooltip",t.bMT(12,23,"components.documentList.tooltipColumnSettings")),t.R7$(4),t.AVh("hidden",e.tableHidden()),t.Y8G("paginationPageSize",e.pageSize())("rowSelection",e.rowSelection)("rowData",e.documentsInt())("columnDefs",e.columnDefs())("overlaySettings",e.overlaySettings)("overlayActions",e.overlayActions()),t.R7$(5),t.AVh("hidden",!e.showTagFilterCloud()),t.R7$(),t.Y8G("words",e.tags())("clickable",!0)("overflow",!0)("multiSelect",!0)("highlightSelection",!0),t.R7$(),t.vxM(e.filterToBeApplied()?22:-1),t.R7$(),t.AVh("hidden",e.showTagFilterCloud()),t.Y8G("settings",e.columnSelectSettings),t.R50("columnDefs",e.columnDefs),t.Y8G("columnDefsGross",e.columnDefsGross())}}let Et=(()=>{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)([]);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,u.EW)(()=>this.documentRefs().length>0);_leafContentCategoryIris=(0,u.EW)(()=>{const e=this.availableContentCategories();if(!e)return null;const n=new Set(e.map(i=>i.parent).filter(i=>!!i));return new Set(e.filter(i=>!n.has(i.iri)).map(i=>i.iri))});labelDownload=(0,f.Xx)("components.documentList.labelDownload");labelName=(0,f.Xx)("components.documentList.labelName");labelOpenInFileManager=(0,f.Xx)("components.documentList.labelOpenInFileManager");labelOpenInDocumentViewer=(0,f.Xx)("components.documentList.labelOpenInDocumentViewer");labelSubject=(0,f.Xx)("components.documentList.labelSubject");labelSummary=(0,f.Xx)("components.documentList.labelSummary");labelPages=(0,f.Xx)("components.documentList.labelPages");labelSize=(0,f.Xx)("components.documentList.labelSize");labelCategories=(0,f.Xx)("components.documentList.labelCategories");labelType=(0,f.Xx)("components.documentList.labelType");buttonShowCloudFilter=(0,f.Xx)("components.documentList.buttonShowCloudFilter");buttonHideCloudFilter=(0,f.Xx)("components.documentList.buttonHideCloudFilter");buttonDownloadCSV=(0,f.Xx)("components.documentList.buttonDownloadCSV");infoLoading=(0,f.Xx)("components.documentList.infoLoading");overlaySettings={...new Dt.K,mode:"row"};overlayActions=(0,u.EW)(()=>{const e=[{label:this.labelDownload(),icon:"download",action:n=>{this.handlers()?.requestDownload?.(n.rowData),this.clickedDownloadDocument.emit(n.rowData)}}];return this.showOpenInDocumentViewerAction()&&e.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()&&e.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)}}),[...e,...this.customOverlayActions()||[]]});documentsInt=(0,u.EW)(()=>{let e;if(this._lazyMode()){const n=this.documentRefs(),i=this.documentData()||{};e=n.map(s=>{const c=i[s.id];return c?{...c,pages:s.pages??c.pages,...void 0!==s.sources?{sources:s.sources}:{},...void 0!==s.relevance?{relevance:s.relevance}:{},name:U(c.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 e=(this.documents()||[]).map(n=>({...n,name:U(n.path),loading:!1}));return this.tagFilter().length?e.filter(n=>n.tags?.some(i=>this.tagFilter().some(s=>s.toLowerCase()===i.toLowerCase()))):e});simplePageCount=(0,u.EW)(()=>Math.max(1,Math.ceil(this.documentsInt().length/Math.max(1,this.pageSize()))));simpleStartIndex=(0,u.EW)(()=>this.simplePageIndex()*Math.max(1,this.pageSize()));simpleEndIndex=(0,u.EW)(()=>this.simpleStartIndex()+Math.max(1,this.pageSize()));simpleDocumentsInt=(0,u.EW)(()=>this.documentsInt().slice(this.simpleStartIndex(),this.simpleEndIndex()));simpleHasPreviousPage=(0,u.EW)(()=>this.simplePageIndex()>0);simpleHasNextPage=(0,u.EW)(()=>this.simplePageIndex()<this.simplePageCount()-1);simpleDisplayStart=(0,u.EW)(()=>this.documentsInt().length?this.simpleStartIndex()+1:0);simpleDisplayEnd=(0,u.EW)(()=>Math.min(this.simpleEndIndex(),this.documentsInt().length));tags=(0,u.EW)(()=>{const e=this.documentsInt(),n=[];return e.forEach(i=>{i.tags?.forEach(s=>n.push(s))}),n});showPageColumn=(0,u.EW)(()=>this.documentsInt().some(e=>void 0!==e.pages));hasSubjects=(0,u.EW)(()=>this.documentsInt().some(e=>void 0!==e.subject&&""!==e.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,u.EW)(()=>{const e=this.tagSelection(),n=this.tagFilter();return JSON.stringify(e.sort())!==JSON.stringify(n.sort())});tableMenu=(0,u.EW)(()=>{const e=[];return this.showTagFilterCloud()?e.push({icon:"cloud-funnel",label:this.buttonHideCloudFilter(),variant:"accent",action:()=>{this.flipped.set(!1),this.showTagFilterCloud.set(!1)}}):e.push({icon:"cloud-funnel",label:this.buttonShowCloudFilter(),variant:"accent",action:()=>{this.flipped.set(!0),this.showTagFilterCloud.set(!0)}}),e.push({icon:"download",label:this.buttonDownloadCSV(),action:()=>function G(o,a,e="table.csv"){const n=function I(o,a){const e=function k(o,a){return o.map(e=>{const n={};return"id"in e&&(n.id=e.id),"key"in e&&(n.key=e.key),a.forEach(i=>{let s;"function"==typeof i.valueGetter?s=i.valueGetter({data:e,colDef:i,getValue:m=>e[m],node:void 0,column:void 0,api:void 0,context:void 0}):i.field&&(s=e[i.field]),"function"==typeof i.valueFormatter&&(s=i.valueFormatter({value:s,data:e,colDef:i,node:void 0,column:void 0,api:void 0,context:void 0}));const c=i.headerName||i.colId||i.field;void 0!==c&&(n[c]=s)}),n})}(o,a);if(0===e.length)return"";const n=e.some(c=>"id"in c),i=[];n&&i.push("id"),a.forEach(c=>{const m=c.headerName||c.colId||c.field;m&&"id"!==m&&!i.includes(m)&&i.push(m)});const s=e.map(c=>{const m={};return i.forEach(p=>{m[p]=c[p]}),m});return F().unparse(s,{columns:i})}(o,a);(0,v.YN)(n,e,"text/csv")}(this.documentsInt(),this.columnDefs())}),e});hideCloud(){this.flipped.set(!0),this.showTagFilterCloud.set(!0)}tableHidden=(0,u.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 e=this.documentsInt().length,n=Math.max(1,this.pageSize()),i=Math.max(0,Math.ceil(e/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 e=this.documentRefs();if(!e.length)return;const n=Math.max(1,this.pageSize()),s=n*Math.max(1,this.prefetchPages()),c=e.length,m=this.simpleStartIndex(),p=Math.min(c,m+n),g=this._simpleBufferedUntilIndex();let _=null;if(0===g?_=0:(m>=Math.max(0,g-n)||p>g)&&(_=g),null===_||_>=c)return;const b=Math.min(c,_+s),w=e.slice(_,b).map(y=>y.id).filter(y=>!this._requestedIds.has(y));this._simpleBufferedUntilIndex.set(Math.max(g,b)),w.length&&(w.forEach(y=>this._requestedIds.add(y)),setTimeout(()=>this.handlers()?.requestData(w)))});previousSimplePage(){this.simpleHasPreviousPage()&&this.simplePageIndex.update(e=>Math.max(0,e-1))}nextSimplePage(){this.simpleHasNextPage()&&this.simplePageIndex.update(e=>Math.min(this.simplePageCount()-1,e+1))}handleSimpleRowClick(e){this.selectedSimpleDocumentId.set(e.id),this.handleRowClick(e)}handleRowClick(e){var n=this;return(0,C.A)(function*(){n.clickedDocument.emit(e),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(e){this._gridApi=e,e.addEventListener("viewportChanged",()=>this._checkViewport()),e.addEventListener("modelUpdated",()=>this._checkViewport()),e.addEventListener("paginationChanged",()=>this._checkViewport()),e.addEventListener("sortChanged",()=>{const n=e.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 e=this.documentRefs(),n=e.length;if(!n)return;const i=Math.max(1,this._gridApi.paginationGetPageSize?.()??10),c=Math.max(0,this._gridApi.paginationGetCurrentPage?.()??0)*i,m=Math.min(n,c+i),p=this._tableBufferedUntilIndex();let g=null;if(0===p?g=0:(c>=Math.max(0,p-i)||m>p)&&(g=p),null===g||g>=n)return;const _=i*Math.max(1,this.prefetchPages()),b=Math.min(n,g+_),w=e.slice(g,b).map(y=>y.id).filter(y=>!this._requestedIds.has(y));this._tableBufferedUntilIndex.set(Math.max(p,b)),w.length&&(w.forEach(y=>this._requestedIds.add(y)),setTimeout(()=>this.handlers()?.requestData(w)))}_requestAllUnloaded(){if(!this._gridApi||this._gridApi.isDestroyed()||!this._lazyMode())return;const e=[];if(this._gridApi.forEachNode(n=>{const i=n.data;i?.loading&&!this._requestedIds.has(i.contentIRI)&&e.push(i.contentIRI)}),e.length>0){const n=Array.from(new Set(e));n.forEach(i=>this._requestedIds.add(i)),setTimeout(()=>this.handlers()?.requestData(n))}}_buildInitialColumnDefs(e){const n=[],i=[];n.push({field:"name",headerName:this.labelName(),width:e?250:120,filter:!0,valueGetter:p=>!p.data?.name&&p.data?.loading?"Loading...":p.data?.name||p.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"),e?n.push(s):i.push(s),this.showPageColumn()&&n.push({field:"pages",headerName:this.labelPages(),width:100,filter:!0,valueGetter:p=>Array.isArray(p.data?.pages)?p.data.pages.map(g=>g.page).join(", "):""});const c={field:"size",headerName:this.labelSize(),width:100,filter:!0,valueGetter:p=>(0,Mt.b)(p.data?.size||0)};e?n.push(c):i.push(c);const m={field:"categories",headerName:this.labelCategories(),width:120,filter:!0,valueGetter:p=>{const g=p.data?.categories||[],_=this._leafContentCategoryIris(),b=_?g.filter(y=>_.has(y)):g,w=b.slice(0,3).map(y=>this._getContentCategoryLabel(y)).join(", ");return b.length>3?`${w}...`:w}};e?n.push(m):i.push(m),n.push({field:"suffix",headerName:this.labelType(),width:80,filter:!0,headerClass:"header-align-right",cellStyle:{display:"flex",justifyContent:"flex-end"},cellRenderer:vt}),this.columnDefs.update(()=>[...n]),this.columnDefsGross.update(()=>[...n,...i])}_getContentCategoryLabel(e){const n=this.availableContentCategories();if(void 0!==n){const i=n.find(s=>s.iri===e);if(i)return i.label;console.warn(`No label found for content category IRI: ${e}`)}else console.warn("No availableContentCategories provided to DocumentList component");return(o=>{const a=o.split("#").pop()??o,e={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===e[a]&&console.log(`No pretty label for category: ${a}`),e[a]??a})(e)}static \u0275fac=function(n){return new(n||o)};static \u0275cmp=t.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"],documentRefs:[1,"documentRefs"],handlers:[1,"handlers"],documentData:[1,"documentData"]},outputs:{clickedDocument:"clickedDocument",clickedDownloadDocument:"clickedDownloadDocument",clickedOpenInDir:"clickedOpenInDir",clickedOpen:"clickedOpen"},decls:2,vars:1,consts:[["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"],["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"],[1,"card-face","back",2,"width","100%","height","auto"],["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"],[3,"click"],["before","",3,"name"],["justify","center",1,"word-cloud-actions",3,"click"],["variant","primary"]],template:function(n,i){1&n&&t.nVh(0,Pt,4,2,"div",1)(1,Lt,24,25,"div",2),2&n&&t.vxM(i.simple()?0:1)},dependencies:[j.n,B,O.$,ue.L,Tt,yt.Card,W.a,he.R,pt,wt.M,St.D,bt.W,xt.A,$.d,A.o,f.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})();function jt(o,a){if(1&o&&(t.j41(0,"cue-flexcontainer",0)(1,"cue-typography",2),t.EFF(2),t.k0s()()),2&o){const e=t.XpG();t.R7$(2),t.SpI(" ",e.errorMessage()," ")}}function zt(o,a){if(1&o){const e=t.RV6();t.j41(0,"cue-doc-list",3),t.bIt("clickedDocument",function(i){l.eBV(e);const s=t.XpG();return l.Njj(s.clickedDocument.emit(i))})("clickedDownloadDocument",function(i){l.eBV(e);const s=t.XpG();return l.Njj(s.clickedDownloadDocument.emit(i))})("clickedOpenInDir",function(i){l.eBV(e);const s=t.XpG();return l.Njj(s.clickedOpenInDir.emit(i))})("clickedOpen",function(i){l.eBV(e);const s=t.XpG();return l.Njj(s.clickedOpen.emit(i))}),t.k0s()}if(2&o){const e=t.XpG();t.Y8G("documentRefs",e.documentRefs())("documentData",e.documentData())("handlers",e.handlers())("availableContentCategories",e.availableContentCategories())("detailedView",e.detailedView())("simple",e.simple())("pageSize",e.pageSize())("prefetchPages",e.prefetchPages())("showOpenInDocumentViewerAction",e.showOpenInDocumentViewerAction())("showOpenInFileManagerAction",e.showOpenInFileManagerAction())("customOverlayActions",e.customOverlayActions())}}function de(o){return o.split("?")[0].trim()}let Bt=(()=>{class o{projectId=(0,r.hFB)(void 0);uuids=(0,r.hFB)([]);sdkState=(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);showOpenInDocumentViewerAction=(0,r.hFB)(!1);showOpenInFileManagerAction=(0,r.hFB)(!1);customMenuItems=(0,r.hFB)([]);clickedDocument=(0,r.CGW)();clickedDownloadDocument=(0,r.CGW)();clickedOpenInDir=(0,r.CGW)();clickedOpen=(0,r.CGW)();state=(0,l.vPA)("idle");errorMessage=(0,l.vPA)(null);documentData=(0,l.vPA)({});availableContentCategories=(0,l.vPA)(void 0);documentRefs=(0,u.EW)(()=>{const e=new Set;return(this.uuids()??[]).map(de).filter(n=>!!n).filter(n=>!e.has(n)&&(e.add(n),!0)).map(n=>({id:n}))});customOverlayActions=(0,u.EW)(()=>(this.customMenuItems()||[]).map(n=>({label:n.label,icon:n.icon,action:i=>{n.action(i.rowData,i)}})));handlers=(0,u.EW)(()=>{var e=this;const n=this._docs();if(n)return{requestData:(i=(0,C.A)(function*(s){const c=s.map(de).filter(p=>!!p),m=c.filter(p=>!e.documentData()[p]);if(console.debug("[CueDocumentListWC] requestData",{requestedCount:c.length,missingCount:m.length,missing:m}),m.length)try{const p=n,g=e.simple()&&p.fetchDocumentDataSimple?yield p.fetchDocumentDataSimple(m):yield n.fetchDocumentData(m);console.debug("[CueDocumentListWC] fetchDocumentData resolved",{fetchedCount:Object.keys(g).length,ids:Object.keys(g)});const _={};Object.values(g).forEach(b=>{_[b.id]=function Vt(o){return{id:o.id,path:o.path,suffix:o.suffix,size:o.size,contentIRI:o.contentIRI,providerId:o.providerId,tags:o.tags??[],summary:o.summary??"",categories:o.categories??[],subject:o.subject,relevance:0}}(b)}),Object.keys(_).length>0&&e.documentData.update(b=>({...b,..._}))}catch(p){console.error("[CueDocumentListWC] Failed to fetch document data:",p),e.errorMessage.set(p instanceof Error?p.message:String(p)),e.state.set("error")}}),function(c){return i.apply(this,arguments)}),requestDownload:function(){var i=(0,C.A)(function*(s){const c=e._cue(),m=e.projectId();if(c&&m)try{const p=yield c.storage.getDownloadUrl(m,s.id,s.suffix,"raw"),g=yield fetch(p);if(!g.ok)throw new Error(`Download failed: ${g.status} ${g.statusText}`);const _=yield g.blob(),b=U(s.path)||`${s.id}${s.suffix||""}`;(0,v.KE)(_,b)}catch(p){console.error("[CueDocumentListWC] Failed to download document:",p)}});return function(c){return i.apply(this,arguments)}}(),requestOpen:(i,s)=>{console.log("[CueDocumentListWC] requestOpen",{documentUUID:i,document:s})},requestOpenInDir:(i,s)=>{console.log("[CueDocumentListWC] requestOpenInDir",{documentUUID:i,document:s})}};var i});_cue=(0,l.vPA)(void 0);_docs=(0,l.vPA)(void 0);_ownedView;_unsubscribeCategories;_lastSetupSignature;constructor(){(0,l.QZP)(()=>{const e=this.projectId(),n=this.sdkState(),i=n?.language??"en";if(console.debug("[CueDocumentListWC] input state changed",{projectId:e,uuids:this.uuids().length,hasSdkState:!!n,hasCue:!!n?.cue,hasView:!!n?.view,hasDocuments:!!n?.documents}),!e||!n)return this._clearRuntimeState(),void this.state.set("idle");const s={projectId:e,cue:n.cue,view:n.view,documents:n.documents,language:i,simple:this.simple()};if(this._isSameSetupSignature(s))return this.state.set("ready"),void this.errorMessage.set(null);this._setupFromSdkState(e,n),this._lastSetupSignature=s,this.state.set("ready"),this.errorMessage.set(null)}),(0,l.QZP)(()=>{const e=new Set(this.documentRefs().map(n=>n.id));this.documentData.update(n=>Object.fromEntries(Object.entries(n).filter(([s])=>e.has(s))))})}ngOnDestroy(){this._cleanupOwnedView(),this._unsubscribeCategories?.(),this._unsubscribeCategories=void 0}_setupFromSdkState(e,n){const i=n.language??"en";if(this.documentData.set({}),this._cleanupOwnedView(),this._unsubscribeCategories?.(),this._unsubscribeCategories=void 0,this.availableContentCategories.set(n.availableContentCategories?n.availableContentCategories:void 0),n.documents)return n.documents.setLanguage(i),this._docs.set(n.documents),void this._cue.set(n.cue);if(n.view)return n.view.setLanguage(i),this._docs.set(n.view.documents),this._cue.set(n.cue),void(this.simple()||this._bindCategoriesFromView(n.view));if(n.cue){if(this.simple())return this._docs.set(n.cue.createProjectDocuments(e)),this._cue.set(n.cue),void this.availableContentCategories.set(void 0);const s=n.cue.createProjectView(e,{language:i});return this._ownedView=s,this._docs.set(s.documents),this._cue.set(n.cue),void this._bindCategoriesFromView(s)}this._docs.set(void 0),this._cue.set(void 0),this.errorMessage.set("sdkState must include cue, view, or documents to load data."),this.state.set("error")}_bindCategoriesFromView(e){const n=()=>{this.availableContentCategories.set(e.availableContentCategories.get())};n(),this._unsubscribeCategories=e.availableContentCategories.subscribe(n)}_clearRuntimeState(){this._cleanupOwnedView(),this._unsubscribeCategories?.(),this._unsubscribeCategories=void 0,this._docs.set(void 0),this._cue.set(void 0),this.documentData.set({}),this.availableContentCategories.set(void 0),this.errorMessage.set(null),this._lastSetupSignature=void 0}_cleanupOwnedView(){this._ownedView&&(this._ownedView.destroy(),this._ownedView=void 0)}_isSameSetupSignature(e){const n=this._lastSetupSignature;return!!n&&n.projectId===e.projectId&&n.cue===e.cue&&n.view===e.view&&n.documents===e.documents&&n.language===e.language&&n.simple===e.simple}static \u0275fac=function(n){return new(n||o)};static \u0275cmp=t.VBU({type:o,selectors:[["cue-document-list"]],inputs:{projectId:[1,"projectId"],uuids:[1,"uuids"],sdkState:[1,"sdkState"],detailedView:[1,"detailedView"],simple:[1,"simple"],pageSize:[1,"pageSize"],prefetchPages:[1,"prefetchPages"],showOpenInDocumentViewerAction:[1,"showOpenInDocumentViewerAction"],showOpenInFileManagerAction:[1,"showOpenInFileManagerAction"],customMenuItems:[1,"customMenuItems"]},outputs:{clickedDocument:"clickedDocument",clickedDownloadDocument:"clickedDownloadDocument",clickedOpenInDir:"clickedOpenInDir",clickedOpen:"clickedOpen"},decls:2,vars:1,consts:[["direction","column","align","center","justify","center",2,"height","100%","width","100%","padding","8px"],[3,"documentRefs","documentData","handlers","availableContentCategories","detailedView","simple","pageSize","prefetchPages","showOpenInDocumentViewerAction","showOpenInFileManagerAction","customOverlayActions"],[2,"color","#c44","font-size","13px"],[3,"clickedDocument","clickedDownloadDocument","clickedOpenInDir","clickedOpen","documentRefs","documentData","handlers","availableContentCategories","detailedView","simple","pageSize","prefetchPages","showOpenInDocumentViewerAction","showOpenInFileManagerAction","customOverlayActions"]],template:function(n,i){1&n&&t.nVh(0,jt,3,1,"cue-flexcontainer",0)(1,zt,1,11,"cue-doc-list",1),2&n&&t.vxM("error"===i.state()?0:1)},dependencies:[h.MD,Et,j.n,A.o],styles:["[_nghost-%COMP%]{display:block;width:100%}"],changeDetection:0})}return o})()},2269(S,M,d){S.exports=function(C){"use strict";var l=function r(h){return h&&"object"==typeof h&&"default"in h?h:{default:h}}(C),u={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(h){return h+"."},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 l.default.locale(u,null,!0),u}(d(7374))},1409(S,M,d){S.exports=function(C){"use strict";var l=function r(x){return x&&"object"==typeof x&&"default"in x?x:{default:x}}(C),u={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 h(x,F,k){var I=u[k];return Array.isArray(I)&&(I=I[F?0:1]),I.replace("%d",x)}var v={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(x){return x+"."},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:h,m:h,mm:h,h,hh:h,d:h,dd:h,M:h,MM:h,y:h,yy:h}};return l.default.locale(v,null,!0),v}(d(7374))},9785(S){S.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 d=["th","st","nd","rd"],C=M%100;return"["+M+(d[(C-20)%10]||d[C]||d[0])+"]"}}}()},2494(S,M,d){S.exports=function(C){"use strict";var l=function r(h){return h&&"object"==typeof h&&"default"in h?h:{default:h}}(C),u={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(h){return h+"\xba"}};return l.default.locale(u,null,!0),u}(d(7374))},4230(S,M,d){S.exports=function(C){"use strict";var l=function r(h){return h&&"object"==typeof h&&"default"in h?h:{default:h}}(C),u={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(h){return h+(1===h?"er":"")}};return l.default.locale(u,null,!0),u}(d(7374))},9531(S,M,d){S.exports=function(C){"use strict";var l=function r(h){return h&&"object"==typeof h&&"default"in h?h:{default:h}}(C),u={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(h){return h+"\xba"}};return l.default.locale(u,null,!0),u}(d(7374))},4955(S){S.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(d,C,r){var l=C.prototype,u=l.format;r.en.formats=M,l.format=function(h){void 0===h&&(h="YYYY-MM-DDTHH:mm:ssZ");var k,v=this.$locale().formats,x=(k=void 0===v?{}:v,h.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(I,G,t){var L=t&&t.toUpperCase();return G||k[t]||M[t]||k[L].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(z,N,V){return N||V.slice(1)})}));return u.call(this,x)}}}()},5164(S){S.exports=function(){"use strict";return function(M,d,C){M=M||{};var r=d.prototype,l={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 u(v,x,F,k){return r.fromToBase(v,x,F,k)}C.en.relativeTime=l,r.fromToBase=function(v,x,F,k,I){for(var G,t,L,z=F.$locale().relativeTime||l,N=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"}],V=N.length,E=0;E<V;E+=1){var R=N[E];R.d&&(G=k?C(v).diff(F,R.d,!0):F.diff(v,R.d,!0));var P=(M.rounding||Math.round)(Math.abs(G));if(L=G>0,P<=R.r||!R.r){P<=1&&E>0&&(R=N[E-1]);var B=z[R.l];I&&(P=I(""+P)),t="string"==typeof B?B.replace("%d",P):B(P,x,R.l,L);break}}if(x)return t;var O=L?z.future:z.past;return"function"==typeof O?O(t):O.replace("%s",t)},r.to=function(v,x){return u(v,x,this,!0)},r.from=function(v,x){return u(v,x,this)};var h=function(v){return v.$u?C.utc():C()};r.toNow=function(v){return this.to(h(this),v)},r.fromNow=function(v){return this.from(h(this),v)}}}()}}]);
1
+ (self.webpackChunkcue_ui=self.webpackChunkcue_ui||[]).push([[371],{5371(S,M,d){"use strict";d.d(M,{CueDocumentList:()=>Bt});var C=d(467),r=d(7705),l=d(5802),u=d(2271),h=d(9769),v=d(2065),x=d(7284),F=d.n(x);var t=d(5547);let V=(()=>{class o{get calculatedWidth(){let e=this.localConfig().width||this.width()||1;return this.el.nativeElement.parentNode.offsetWidth>0&&e<=1&&e>0&&(e*=this.el.nativeElement.parentNode.offsetWidth),e}get calculatedHeight(){let e=this.localConfig().height||this.height()||400;return this.el.nativeElement.parentNode.offsetHeight>0&&e<=1&&e>0&&(e*=this.el.nativeElement.parentNode.offsetHeight),e}onResize(e){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,u.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)(t.aKT),this.r2=(0,l.WQX)(t.sFG);const e=this.el.nativeElement;(0,l.QZP)(()=>{const n=this.localConfig();this.logMessage("warn","cloud configuration",n),n.font&&this.r2.setStyle(e,"font",n.font),n.background&&this.r2.setStyle(e,"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(e){let n=e.text;return n+=e.color?`-${e.color}`:"",n+=e.external?`-${e.external}`:"",n+=e.link?`-${e.link}`:"",n+=e.rotate?`-${e.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 e=this.dataArr.filter(i=>i.position),n=this.dataArr.filter(i=>!i.position);e.forEach((i,s)=>{this.drawWord(s,i)}),n.forEach((i,s)=>{this.drawWord(s,i)})}hitTest(e){for(const n of this.cloudDataHtmlElements)if(this.overlapping(e,n))return!0;return!1}overlapping(e,n){const{offsetLeft:i,offsetTop:s,offsetWidth:c,offsetHeight:m}=n;return!(e.right<i||e.left>i+c||e.bottom<s||e.top>s+m)}getWeightForWord(e){let n=5;return this.dataArr[0].weight>this.dataArr[this.dataArr.length-1].weight&&(this.options.strict?e.weight>10?(n=10,this.logMessage("warn",`[TagCloud strict] Weight property ${e.weight} > 10. Fallback to 10 as you are using strict mode`,e)):e.weight<1?(n=1,this.logMessage("warn",`[TagCloud strict] Given weight property ${e.weight} < 1. Fallback to 1 as you are using strict mode`,e)):e.weight%1!=0?(n=Math.round(e.weight),this.logMessage("warn",`[TagCloud strict] Given weight property ${e.weight} is not an integer. Rounded value to ${n}`,e)):n=e.weight:n=Math.round((e.weight-this.dataArr[this.dataArr.length-1].weight)/(this.dataArr[0].weight-this.dataArr[this.dataArr.length-1].weight)*9)+1),n}setWordColor(e,n){this.r2.setStyle(e,"color",n)}setTooltip(e,n){this.r2.addClass(e,"tooltip");const i=this.r2.createElement("span");i.className="tooltiptext";const s=this.r2.createText(n);i.appendChild(s),e.appendChild(i)}setWordRotation(e,n){const i=n?`rotate(${n}deg)`:"";return this.r2.setStyle(e,"transform",i),i}wrapNodeIntoAnchorElement(e,n){const i=this.r2.createElement("a");return i.href=n.link||"",void 0!==n.external&&n.external&&(i.target="_blank"),i.appendChild(e),i}applyZoomStyle(e,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?e:n,"color",this.options.zoomOnHover.color)},n.onmouseout=()=>{this.r2.setStyle(n,"transform",`none ${s}`),this.options.zoomOnHover?.color&&this.r2.removeStyle(i?e:n,"color")})}setPosition(e,n,i){let s=this.options.randomizeAngle?6.28*Math.random():0,c=0;const m=e.style;m.position="absolute";const p=!!(n.position&&n.position.left&&n.position.top),g=e.offsetWidth,_=e.offsetHeight;let b=p&&n.position?.left?n.position.left:this.options.center.x-g/2,w=p&&n.position?.top?n.position.top:this.options.center.y-_/2;if(m.left=b+"px",m.top=w+"px",this.options.delay&&(e.classList.add("tag-animation-delay"),m.setProperty("--tag-animation-delay",this.options.delay*i+"ms")),!p)if(0===i)m.left=b+2*(Math.random()-.5)*(this.calculatedWidth/5)+"px",m.top=w+2*(Math.random()-.5)*(this.calculatedHeight/5)+"30px";else{for(;this.options.width&&this.options.height&&e.offsetHeight&&e.offsetWidth&&this.hitTest(new DOMRect(b,w,e.offsetWidth,e.offsetHeight));)c+=this.options.step||1,s+=(i%2==0?1:-1)*(this.options.step||1),b=this.options.center.x-g/2+c*Math.cos(s)*this.options.aspectRatio,w=this.options.center.y+c*Math.sin(s)-_/2;m.left=b+"px",m.top=w+"px"}if(!this.options.overflow&&(b<0||w<0||b+g>this.calculatedWidth||w+_>this.calculatedHeight))return this.logMessage("warn","Word did not fit into the cloud and overflow is set to 'false'. The element will be removed",e),void e.remove()}drawWord(e,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 c=this.r2.createText(n.text);n.color&&this.setWordColor(i,n.color);const m=this.setWordRotation(i,n.rotate);n.link&&(c=this.wrapNodeIntoAnchorElement(c,n)),this.options.zoomOnHover&&1!==this.options.zoomOnHover.scale&&this.applyZoomStyle(c,i,n.link,m),i.appendChild(c),this.r2.appendChild(this.el.nativeElement,i),n.tooltip&&this.setTooltip(i,n.tooltip),i.id=`angular-tag-cloud-item-${e}`,this.setPosition(i,n,e),this.logMessage("debug","Adds new word <span>",i),this.cloudDataHtmlElements.push(i),this.logMessage("debug","Placed words",this.cloudDataHtmlElements)}logMessage(e,...n){this.localConfig()&&("debug"===this.localConfig().log?console.log(`[AngularTagCloudModule ${e}]`,...n):"warn"===this.localConfig().log&&"warn"===e&&console.warn(`[AngularTagCloudModule ${e}]`,...n))}static{this.\u0275fac=function(n){return new(n||o)}}static{this.\u0275cmp=t.VBU({type:o,selectors:[["angular-tag-cloud"],["ng-tag-cloud"],["ngtc"]],hostBindings:function(n,i){1&n&&t.bIt("resize",function(c){return i.onResize(c)},t.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 E=d(5970);const R=["wordCloudContainer"];function P(o,a){if(1&o){const e=t.RV6();t.j41(0,"angular-tag-cloud",3),t.bIt("clicked",function(i){l.eBV(e);const s=t.XpG();return l.Njj(s.handleClicked(i))}),t.k0s()}if(2&o){const e=t.XpG();t.Y8G("data",e.data())("zoomOnHover",e.zoomOnHoverOptions())("width",e.containerSize().width)("height",e.containerSize().height)("overflow",e.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,u.EW)(()=>{const e=this.words(),n=this.entries();return n?.length||e?.length?n?.length?n:e?.length?this._buildEntriesFromWords(e):[]:[]});ngAfterViewInit(){const e=new MutationObserver(()=>{this._applySelectionStyles()});this.wordCloudContainer?.nativeElement&&e.observe(this.wordCloudContainer.nativeElement,{childList:!0,subtree:!0})}handleResize(e){0!==e.newRect.height&&this.containerSize.set({width:e.newRect.width,height:e.newRect.height})}styleSelection=(0,l.QZP)(()=>{this.selection(),this._applySelectionStyles()});zoomOnHoverOptions=(0,u.EW)(()=>({scale:1.1,transitionTime:this.clickable()?1.2:0,delay:.05}));_buildEntriesFromWords(e){const n=new Map;for(const g of e){const _=this.caseSensitive()?g:g.toLowerCase();n.set(_,(n.get(_)||0)+1)}const i=Array.from(n.entries());if(0===i.length)return[];const s=i.map(([,g])=>g),c=Math.min(...s),m=Math.max(...s);return m===c?i.map(([g])=>({text:g,weight:this.maxWeight()})):i.sort(([,g],[,_])=>_-g).slice(0,this.maxWords()).map(([g,_])=>({text:g,weight:this.minWeight()+(_-c)*(this.maxWeight()-this.minWeight())/(m-c),color:this.colorScheme()[Math.floor(Math.random()*this.colorScheme().length)]}))}_applySelectionStyles(){if(!this.highlightSelection())return;const e=this.wordCloudContainer?.nativeElement;void 0!==e&&e.querySelectorAll("span").forEach(i=>{i.textContent&&(this.selection().includes(i.textContent.trim())?i.classList.add("selected"):i.classList.remove("selected"))})}handleClicked(e){this.clickable()&&(this.clickedWord.emit(e.text),this.highlightSelection()&&(this.selection().includes(e.text)?this.selection.update(n=>n.filter(i=>i!==e.text)):this.multiSelect()?this.selection.update(n=>[...n,e.text]):this.selection.update(()=>[e.text])),this.selectionChanged.emit(this.selection()))}static \u0275fac=function(n){return new(n||o)};static \u0275cmp=t.VBU({type:o,selectors:[["cue-word-cloud"]],viewQuery:function(n,i){if(1&n&&t.GBs(R,5),2&n){let s;t.mGM(s=t.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&&(t.j41(0,"div",1,0),t.bIt("resized",function(c){return i.handleResize(c)}),t.nVh(2,P,1,6,"angular-tag-cloud",2),t.k0s()),2&n&&(t.xc7("display",i.data().length?"block":"none"),t.AVh("clickable",i.clickable()),t.R7$(2),t.vxM(i.data().length?2:-1))},dependencies:[V,E.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=d(1696),ue=d(5448),W=d(3319);const U=o=>{const a=o.split("/");return a[a.length-1]};var he=d(6950),Y=d(7598),A=d(2245),j=d(5381),$=d(7089),f=d(4015),Q=d(2444),pe=d(9695),ge=d(5745),J=d(8957);let H=(()=>{class o{value="";lineHeight="1.5";agInit(e){this.value=e.value||"",this.lineHeight=e.colDef&&e.colDef.cellRendererParams&&e.colDef.cellRendererParams.lineHeight||e.context&&e.context.lineHeight||"1.5"}refresh(e){return this.value=e.value||"",!0}static \u0275fac=function(n){return new(n||o)};static \u0275cmp=t.VBU({type:o,selectors:[["cue-multiline-cell-renderer"]],decls:2,vars:3,consts:[[1,"multiline-cell"]],template:function(n,i){1&n&&(t.rj2(0,"div",0),t.EFF(1),t.eux()),2&n&&(t.xc7("line-height",i.lineHeight),t.R7$(),t.JRh(i.value))},styles:[".multiline-cell[_ngcontent-%COMP%]{white-space:pre-wrap;word-wrap:break-word;padding:4px 2px;text-align:left}"]})}return o})(),fe=(()=>{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,u.EW)(()=>this._options().map(e=>e.value));_labelMap=(0,u.EW)(()=>Object.fromEntries(this._options().map(e=>[e.value,e.label])));_params;agInit(e){this._apply(e)}refresh(e){return this._apply(e),!0}onValueChange(e){if(void 0===e)return;const n=String(e),i=this._canChange();i&&!i(n)||(this._value.set(n),this._params.setValue?.(n))}_apply(e){this._params=e,this._value.set(e.value??"");const n="function"==typeof e.colDef?.cellRendererParams?e.colDef.cellRendererParams(e):e.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=t.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&&(t.j41(0,"cue-select",0),t.bIt("valueChange",function(c){return i.onValueChange(c)}),t.k0s()),2&n&&t.Y8G("options",i._optionValues())("labelMap",i._labelMap())("value",i._value())("underline",!1)("menuPosition","bottomleft")("disabled",i._disabled())("cueTooltip",i._disabled()?i._disabledTooltip():"")},dependencies:[Q.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 _e=d(7374),Z=d.n(_e),Ce=d(4955),ve=d.n(Ce),be=d(5164),xe=d.n(be);d(9785),d(2269),d(1409),d(4230),d(2494),d(9531),Z().extend(ve()),Z().extend(xe());let De=(()=>{class o{_transloco=(0,l.WQX)(f.JO);transform(e,n="dateTime"){if(!e)return"";const i=this._transloco.getActiveLang(),s=Z()(e).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=t.EJ8({name:"cueLocalDate",type:o,pure:!0})}return o})(),X=(()=>{class o{_value=(0,l.vPA)("");_format=(0,l.vPA)("dateTime");agInit(e){this._apply(e)}refresh(e){return this._apply(e),!0}_apply(e){this._value.set(e.value??""),this._format.set(e.colDef?.cellRendererParams?.dateFormat??"dateTime")}static \u0275fac=function(n){return new(n||o)};static \u0275cmp=t.VBU({type:o,selectors:[["cue-date-cell-renderer"]],decls:2,vars:4,template:function(n,i){1&n&&(t.EFF(0),t.nI1(1,"cueLocalDate")),2&n&&t.JRh(t.i5U(1,1,i._value(),i._format()))},dependencies:[De],encapsulation:2,changeDetection:0})}return o})();const Me=["*"];function ye(o,a){1&o&&t.SdG(0)}let we=(()=>{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=t.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&&(t.NAR(),t.j41(0,"cue-flexcontainer",0)(1,"cue-flexcontainer",1),t.bIt("click",function(){return i.toggle()}),t.j41(2,"cue-typography",2),t.EFF(3),t.k0s(),t.j41(4,"cue-button",3)(5,"span"),t.nrm(6,"cue-button-icon",4),t.k0s()()(),t.nVh(7,ye,1,0),t.k0s()),2&n&&(t.R7$(2),t.Y8G("size",i.size())("info",i.info()),t.R7$(),t.JRh(i.label()),t.R7$(),t.Y8G("size",i.size()),t.R7$(),t.AVh("rotate",!0)("rotate-180",i.expanded()),t.R7$(2),t.vxM(i.expanded()?7:-1))},dependencies:[A.o,j.n,O.$,W.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 ee(o){if(o)return o.replace(/([A-Z])/g," $1").replace(/^./,a=>a.toUpperCase())}var Se=d(9417),Te=d(1359);const Fe=(o,a)=>a.value;function ke(o,a){if(1&o){const e=t.RV6();t.j41(0,"cue-input",6),t.bIt("valueChange",function(i){l.eBV(e);const s=t.XpG();return s.searchText=i,l.Njj(s.onSearchChange())}),t.k0s()}if(2&o){const e=t.XpG();t.Y8G("value",e.searchText)}}function Ie(o,a){if(1&o){const e=t.RV6();t.j41(0,"cue-checkbox",7),t.bIt("checkedChange",function(i){const s=l.eBV(e).$implicit,c=t.XpG();return s.selected=i,l.Njj(c.onSelectionChange())}),t.k0s()}if(2&o){const e=a.$implicit;t.Y8G("label",e.value||"(blank)")("checked",e.selected)}}function Re(o,a){1&o&&(t.j41(0,"cue-typography",5),t.EFF(1,"No results"),t.k0s())}let te=(()=>{class o{_cdr=(0,l.WQX)(r.gRc);_params;options=[];filteredOptions=[];searchText="";agInit(e){this._params=e}afterGuiAttached(e){this._refreshOptions(),this._cdr.markForCheck()}onNewRowsLoaded(){this._refreshOptions(),this._cdr.markForCheck()}isFilterActive(){return this.options.some(e=>!e.selected)}doesFilterPass(e){const n=new Set(this.options.filter(m=>m.selected).map(m=>m.value)),i=this._params.getValue(e.node),s=null==i?"":String(i);return"..."===s||"Loading..."===s||(""===s?n.has(""):s.split(", ").map(m=>m.trim()).some(m=>n.has(m)))}getModel(){return this.isFilterActive()?{selectedValues:this.options.filter(e=>e.selected).map(e=>e.value)}:null}setModel(e){if(e){const n=new Set(e.selectedValues);this.options.forEach(i=>i.selected=n.has(i.value))}else this.options.forEach(n=>n.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(e=>e.selected)}toggleAll(e){this.options.forEach(n=>n.selected=e),this._applySearch(),this._params.filterChangedCallback(),this._cdr.markForCheck()}_refreshOptions(){const e=new Set;this._params.api.forEachNode(i=>{const s=this._params.getValue(i);if(null==s||""===s)e.add("");else{const c=String(s);if("..."===c||"Loading..."===c)return;const m=c.split(", ").map(p=>p.trim());for(const p of m)e.add(p)}});const n=new Map(this.options.map(i=>[i.value,i.selected]));this.options=Array.from(e).sort((i,s)=>i.localeCompare(s)).map(i=>({value:i,selected:n.get(i)??!0})),this._applySearch()}_applySearch(){const e=this.searchText.toLowerCase().trim();this.filteredOptions=e?this.options.filter(n=>n.value.toLowerCase().includes(e)):this.options}static \u0275fac=function(n){return new(n||o)};static \u0275cmp=t.VBU({type:o,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(n,i){1&n&&(t.j41(0,"cue-flexcontainer",0),t.nVh(1,ke,1,1,"cue-input",1),t.j41(2,"cue-checkbox",2),t.bIt("checkedChange",function(c){return i.toggleAll(c)}),t.k0s(),t.j41(3,"div",3),t.Z7z(4,Ie,1,2,"cue-checkbox",4,Fe),t.nVh(6,Re,2,0,"cue-typography",5),t.k0s()()),2&n&&(t.R7$(),t.vxM(i.options.length>10?1:-1),t.R7$(),t.Y8G("checked",i.allSelected),t.R7$(2),t.Dyx(i.filteredOptions),t.R7$(2),t.vxM(0===i.filteredOptions.length?6:-1))},dependencies:[Se.YN,Te.S,J.p,A.o,j.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 o})();function Ne(o,a){if(1&o){const e=t.RV6();t.j41(0,"cue-input",4),t.bIt("valueChange",function(i){l.eBV(e);const s=t.XpG();return l.Njj(s.onValueChange(i))}),t.k0s()}if(2&o){const e=t.XpG();t.Y8G("value",e.filterText)}}function Pe(o,a){if(1&o){const e=t.RV6();t.j41(0,"cue-typography",5),t.bIt("click",function(){l.eBV(e);const i=t.XpG();return l.Njj(i.clear())}),t.EFF(1,"Clear"),t.k0s()}}let ne=(()=>{class o{_cdr=(0,l.WQX)(r.gRc);_params;filterText="";filterType="contains";filterTypeOptions=["contains","notContains","equals","notEqual","startsWith","endsWith","blank","notBlank"];_labelContains=(0,f.Xx)("components.agGridColumnSelect.textFilterContains");_labelNotContains=(0,f.Xx)("components.agGridColumnSelect.textFilterNotContains");_labelEquals=(0,f.Xx)("components.agGridColumnSelect.textFilterEquals");_labelNotEqual=(0,f.Xx)("components.agGridColumnSelect.textFilterNotEqual");_labelStartsWith=(0,f.Xx)("components.agGridColumnSelect.textFilterStartsWith");_labelEndsWith=(0,f.Xx)("components.agGridColumnSelect.textFilterEndsWith");_labelBlank=(0,f.Xx)("components.agGridColumnSelect.textFilterBlank");_labelNotBlank=(0,f.Xx)("components.agGridColumnSelect.textFilterNotBlank");filterTypeLabelMap=(0,u.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,u.EW)(()=>!["blank","notBlank"].includes(this.filterType));agInit(e){this._params=e}afterGuiAttached(e){this._cdr.markForCheck()}isFilterActive(){return!!["blank","notBlank"].includes(this.filterType)||this.filterText.trim().length>0}doesFilterPass(e){const n=this._params.getValue(e.node),i=null==n?"":String(n),s=this.filterText.toLowerCase().trim(),c=i.toLowerCase();switch(this.filterType){case"contains":default:return c.includes(s);case"notContains":return!c.includes(s);case"equals":return c===s;case"notEqual":return c!==s;case"startsWith":return c.startsWith(s);case"endsWith":return c.endsWith(s);case"blank":return""===i;case"notBlank":return""!==i}}getModel(){return this.isFilterActive()?{filterType:"text",type:this.filterType,filter:this.filterText}:null}setModel(e){this.filterText=e?.filter??"",this.filterType=e?.type??"contains",this._cdr.markForCheck()}onValueChange(e){this.filterText=e,this._params.filterChangedCallback(),this._cdr.markForCheck()}onFilterTypeChange(e){this.filterType=String(e||"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(n){return new(n||o)};static \u0275cmp=t.VBU({type:o,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(n,i){1&n&&(t.j41(0,"cue-flexcontainer",0)(1,"cue-select",1),t.bIt("valueChange",function(c){return i.onFilterTypeChange(c)}),t.k0s(),t.nVh(2,Ne,1,1,"cue-input",2),t.nVh(3,Pe,2,0,"cue-typography",3),t.k0s()),2&n&&(t.R7$(),t.Y8G("value",i.filterType)("options",i.filterTypeOptions)("labelMap",i.filterTypeLabelMap()),t.R7$(),t.vxM(i.showTextInput()?2:-1),t.R7$(),t.vxM(i.filterText||"contains"!==i.filterType?3:-1))},dependencies:[J.p,Q.l,A.o,j.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 o})();const Ae=[{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 oe(o){const a=[];let e=0;for(;e<o.length;){if(/\s/.test(o[e])){e++;continue}if('"'===o[e]||"'"===o[e]){const i=o[e++];let s="";for(;e<o.length&&o[e]!==i;)s+="\\"===o[e]?o[++e]:o[e],e++;if(o[e]!==i)throw new Error("Unterminated string literal");e++,a.push({kind:"str",val:s});continue}const n=o.slice(e).match(/^(\d+\.?\d*|\.\d+)([eE][+-]?\d+)?/);if(n)a.push({kind:"num",val:n[0]}),e+=n[0].length;else{if("?"===o[e]){let i="?";for(e++;e<o.length&&/\w/.test(o[e]);)i+=o[e++];a.push({kind:"var",val:i});continue}if(/[A-Za-z_]/.test(o[e])){let i="";for(;e<o.length&&/\w/.test(o[e]);)i+=o[e++];a.push({kind:"ident",val:i.toUpperCase()});continue}if("**"!==o.slice(e,e+2)){if(!"+-*/%(),".includes(o[e]))throw new Error(`Unexpected character "${o[e]}" at position ${e}`);a.push({kind:"op",val:o[e++]})}else a.push({kind:"op",val:"**"}),e+=2}}return a.push({kind:"eof",val:""}),a}class se{tokens;vars;pos=0;constructor(a,e){this.tokens=a,this.vars=e}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 e=this.next().val,n=this.multiplicative();a="+"===e?"string"==typeof a||"string"==typeof n?String(a)+String(n):a+n:D(a)-D(n)}return a}multiplicative(){let a=this.power();for(;"op"===this.peek().kind&&("*"===this.peek().val||"/"===this.peek().val||"%"===this.peek().val);){const e=this.next().val,n=this.power();if("*"===e)a=D(a)*D(n);else if("/"===e){const i=D(n);a=0!==i?D(a)/i:0}else a=D(a)%D(n)}return a}power(){const a=this.unary();return"op"===this.peek().kind&&"**"===this.peek().val?(this.next(),Math.pow(D(a),D(this.power()))):a}unary(){return"op"===this.peek().kind&&"-"===this.peek().val?(this.next(),-D(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 e=this.expr();return this.eat(")"),e}throw new Error(`Unexpected token: "${a.val}"`)}funcCall(){const a=this.next().val;this.eat("(");const e=[];if(")"!==this.peek().val)for(e.push(this.expr());","===this.peek().val;)this.next(),e.push(this.expr());return this.eat(")"),function Le(o,a){const e=n=>a[n]??"";switch(o){case"ROUND":return Number(D(e(0)).toFixed(Math.max(0,D(e(1)))));case"FLOOR":return Math.floor(D(e(0)));case"CEIL":return Math.ceil(D(e(0)));case"ABS":return Math.abs(D(e(0)));case"SQRT":return Math.sqrt(D(e(0)));case"MIN":return Math.min(...a.map(D));case"MAX":return Math.max(...a.map(D));case"CONCAT":return a.map(n=>String(n)).join("");case"TRIM":return String(e(0)).trim();case"UPPER":return String(e(0)).toUpperCase();case"LOWER":return String(e(0)).toLowerCase();case"LEN":return String(e(0)).length;case"REPLACE":return String(e(0)).replaceAll(String(e(1)),String(e(2)));case"NUM":return D(e(0));case"STR":return String(e(0));case"PREFIX":return String(e(0))?String(e(1))+String(e(0)):String(e(0));case"SUFFIX":return String(e(0))?String(e(0))+String(e(1)):String(e(0));case"IF":return 0!==D(e(0))&&""!==e(0)&&"false"!==e(0)?e(1):e(2);case"AFTER_LAST":{const n=String(e(0)),i=String(e(1)),s=n.lastIndexOf(i);return-1===s?n:n.slice(s+i.length)}case"AFTER_FIRST":{const n=String(e(0)),i=String(e(1)),s=n.indexOf(i);return-1===s?n:n.slice(s+i.length)}case"BEFORE_LAST":{const n=String(e(0)),i=String(e(1)),s=n.lastIndexOf(i);return-1===s?n:n.slice(0,s)}case"BEFORE_FIRST":{const n=String(e(0)),i=String(e(1)),s=n.indexOf(i);return-1===s?n:n.slice(0,s)}case"SEGMENT":return String(e(0)).split(String(e(1)))[D(e(2))]??"";default:throw new Error(`Unknown function: "${o}"`)}}(a,e)}}function D(o){if("number"==typeof o)return o;const a=Number(o);return isNaN(a)?0:a}const Ee=["*",[["","cueDisplayContent",""]],[["","cueDataContent",""]],[["","cueBehaviorContent",""]],[["","cueExtraContent",""]]],je=["*","[cueDisplayContent]","[cueDataContent]","[cueBehaviorContent]","[cueExtraContent]"],ze=(o,a)=>a.name;function Ve(o,a){if(1&o){const e=t.RV6();t.j41(0,"cue-input",7),t.nI1(1,"transloco"),t.bIt("valueChange",function(i){l.eBV(e);const s=t.XpG(2);return l.Njj(s.setLabel(i))}),t.k0s()}if(2&o){const e=t.XpG(2);t.Y8G("label",t.bMT(1,2,"components.agGridColumnSelect.labelLabel"))("value",e.label())}}function Be(o,a){if(1&o){const e=t.RV6();t.j41(0,"cue-button",11),t.bIt("click",function(){const i=l.eBV(e).$implicit,s=t.XpG(3);return l.Njj(s.setTextAlign(i))}),t.nrm(1,"cue-button-icon",12),t.k0s()}if(2&o){const e=a.$implicit,n=t.XpG(3);t.Y8G("selected",n.textAlign()===e),t.R7$(),t.Y8G("icon",n.ALIGN_ICON[e])}}function We(o,a){if(1&o&&(t.j41(0,"cue-typography",8),t.EFF(1),t.nI1(2,"transloco"),t.k0s(),t.j41(3,"cue-flexcontainer",9),t.Z7z(4,Be,2,2,"cue-button",10,t.Vm6),t.k0s()),2&o){const e=t.XpG(2);t.R7$(),t.SpI(" ",t.bMT(2,1,"components.agGridColumnSelect.labelTextAlign")," "),t.R7$(3),t.Dyx(e.alignOptions)}}function Ye(o,a){if(1&o){const e=t.RV6();t.j41(0,"cue-flexcontainer",6)(1,"cue-typography",13),t.nI1(2,"transloco"),t.EFF(3),t.nI1(4,"transloco"),t.k0s(),t.j41(5,"cue-input-switch",14),t.bIt("checkedChange",function(i){l.eBV(e);const s=t.XpG(2);return l.Njj(s.setMultiline(i))}),t.k0s()()}if(2&o){const e=t.XpG(2);t.R7$(),t.Y8G("cueTooltip",t.bMT(2,3,"components.agGridColumnSelect.tooltipMultiline")),t.R7$(2),t.JRh(t.bMT(4,5,"components.agGridColumnSelect.labelMultiline")),t.R7$(2),t.Y8G("checked",e.multiline())}}function $e(o,a){if(1&o&&(t.j41(0,"cue-expansion-panel",2),t.nI1(1,"transloco"),t.j41(2,"cue-flexcontainer",4),t.nVh(3,Ve,2,4,"cue-input",5),t.nVh(4,We,6,3),t.nVh(5,Ye,6,7,"cue-flexcontainer",6),t.SdG(6,1),t.k0s()()),2&o){const e=t.XpG();t.Y8G("label",t.bMT(1,5,"components.agGridColumnSelect.groupDisplay"))("expanded",!0),t.R7$(3),t.vxM(e.settings().allowSettingLabel?3:-1),t.R7$(),t.vxM(e.settings().allowSettingTextAlign?4:-1),t.R7$(),t.vxM(e.settings().allowSettingMultiline?5:-1)}}function He(o,a){if(1&o){const e=t.RV6();t.j41(0,"cue-select",16),t.nI1(1,"transloco"),t.bIt("valueChange",function(i){l.eBV(e);const s=t.XpG(2);return l.Njj(s.setFilterType(i))}),t.k0s()}if(2&o){const e=t.XpG(2);t.Y8G("label",t.bMT(1,4,"components.agGridColumnSelect.labelFilterType"))("value",e.filterType())("options",e.filterTypeOptions)("labelMap",e.filterTypeLabelMap())}}function Xe(o,a){if(1&o){const e=t.RV6();t.j41(0,"cue-input",7),t.nI1(1,"transloco"),t.bIt("valueChange",function(i){l.eBV(e);const s=t.XpG(2);return l.Njj(s.setEnumValues(i))}),t.k0s()}if(2&o){const e=t.XpG(2);t.Y8G("label",t.bMT(1,2,"components.agGridColumnSelect.labelEnumValues"))("value",e.enumValuesText())}}function Ue(o,a){if(1&o){const e=t.RV6();t.j41(0,"cue-select",16),t.bIt("valueChange",function(i){l.eBV(e);const s=t.XpG(3);return l.Njj(s.setDateFormat(i))}),t.k0s()}if(2&o){const e=t.XpG(3);t.Y8G("label",e._labelDateFormat())("value",e.dateFormat())("options",e.dateFormatOptions)("labelMap",e.dateFormatLabelMap())}}function Qe(o,a){if(1&o){const e=t.RV6();t.j41(0,"cue-select",16),t.bIt("valueChange",function(i){l.eBV(e);const s=t.XpG(2);return l.Njj(s.setDataType(i))}),t.k0s(),t.nVh(1,Ue,1,4,"cue-select",15)}if(2&o){const e=t.XpG(2);t.Y8G("label",e._labelDataType())("value",e.dataType())("options",e.dataTypeOptions)("labelMap",e.dataTypeLabelMap()),t.R7$(),t.vxM("date"===e.dataType()?1:-1)}}function Je(o,a){if(1&o&&(t.j41(0,"cue-expansion-panel",3),t.nI1(1,"transloco"),t.j41(2,"cue-flexcontainer",4),t.nVh(3,He,2,6,"cue-select",15),t.nVh(4,Xe,2,4,"cue-input",5),t.nVh(5,Qe,2,5),t.SdG(6,2),t.k0s()()),2&o){const e=t.XpG();t.Y8G("label",t.bMT(1,4,"components.agGridColumnSelect.groupData")),t.R7$(3),t.vxM(e.settings().allowSettingFilterType?3:-1),t.R7$(),t.vxM(e.settings().allowSettingEnumValues?4:-1),t.R7$(),t.vxM(e.settings().allowSettingDataType?5:-1)}}function Ze(o,a){if(1&o){const e=t.RV6();t.j41(0,"cue-expansion-panel",3),t.nI1(1,"transloco"),t.j41(2,"cue-flexcontainer",4)(3,"cue-flexcontainer",6)(4,"cue-typography",13),t.nI1(5,"transloco"),t.EFF(6),t.nI1(7,"transloco"),t.k0s(),t.j41(8,"cue-input-switch",14),t.bIt("checkedChange",function(i){l.eBV(e);const s=t.XpG();return l.Njj(s.setEditable(i))}),t.k0s()(),t.SdG(9,3),t.k0s()()}if(2&o){const e=t.XpG();t.Y8G("label",t.bMT(1,4,"components.agGridColumnSelect.groupBehavior")),t.R7$(4),t.Y8G("cueTooltip",t.bMT(5,6,"components.agGridColumnSelect.tooltipAllowEditing")),t.R7$(2),t.JRh(t.bMT(7,8,"components.agGridColumnSelect.labelEditable")),t.R7$(2),t.Y8G("checked",e.editable())}}function qe(o,a){if(1&o&&(t.j41(0,"cue-expansion-panel",2)(1,"cue-flexcontainer",4),t.SdG(2,4),t.k0s()()),2&o){const e=t.XpG();t.Y8G("label",e.extraPanelLabel())("expanded",e.extraPanelExpanded())}}function Ke(o,a){if(1&o&&(t.j41(0,"cue-typography",19),t.EFF(1),t.nI1(2,"transloco"),t.j41(3,"strong"),t.EFF(4),t.k0s()()),2&o){const e=t.XpG(2);t.R7$(),t.SpI(" ",t.bMT(2,2,"components.agGridColumnSelect.labelPostProcessPreview"),": "),t.R7$(3),t.JRh(e.postProcessFormulaPreview())}}function et(o,a){if(1&o&&(t.j41(0,"cue-flexcontainer",21)(1,"cue-typography",22),t.EFF(2),t.k0s(),t.j41(3,"cue-typography",23),t.EFF(4),t.k0s()()),2&o){const e=a.$implicit;t.R7$(2),t.JRh(e.signature),t.R7$(2),t.JRh(e.description)}}function tt(o,a){if(1&o){const e=t.RV6();t.j41(0,"cue-expansion-panel",3),t.nI1(1,"transloco"),t.j41(2,"cue-flexcontainer",17)(3,"cue-input",18),t.nI1(4,"transloco"),t.nI1(5,"transloco"),t.nI1(6,"transloco"),t.bIt("valueChange",function(i){l.eBV(e);const s=t.XpG();return l.Njj(s.setPostProcessFormula(i))}),t.k0s(),t.nVh(7,Ke,5,4,"cue-typography",19),t.j41(8,"cue-expansion-panel",20),t.nI1(9,"transloco"),t.j41(10,"cue-flexcontainer",17),t.Z7z(11,et,5,2,"cue-flexcontainer",21,ze),t.k0s()()()()}if(2&o){const e=t.XpG();t.Y8G("label",t.bMT(1,9,"components.agGridColumnSelect.groupPostProcess")),t.R7$(3),t.Y8G("label",t.bMT(4,11,"components.agGridColumnSelect.labelPostProcessFormula"))("info",t.bMT(5,13,"components.agGridColumnSelect.tooltipPostProcessFormula"))("placeholder",t.bMT(6,15,"components.agGridColumnSelect.placeholderPostProcessFormula"))("value",e.postProcessFormula())("error",e.postProcessFormulaError()??void 0),t.R7$(4),t.vxM(e.postProcessFormulaPreview()?7:-1),t.R7$(),t.Y8G("label",t.bMT(9,17,"components.agGridColumnSelect.labelPostProcessFunctions"))("expanded",!1),t.R7$(3),t.Dyx(e.formulaFunctions)}}class ae{allowEditing=!0;allowToggleEditable=!0;allowToggleHideOnHover=!0;allowSettingTextAlign=!0;allowSettingLabel=!0;allowSettingFilterType=!0;allowSettingMultiline=!0;allowSettingEnumValues=!0;allowSettingDataType=!1;allowSettingPostProcess=!0}const nt={Text:ne,Number:"agNumberColumnFilter",Date:"agDateColumnFilter",Select:te,None:!1,Auto:!0},it={agTextColumnFilter:"Text",agNumberColumnFilter:"Number",agDateColumnFilter:"Date",false:"None",true:"Auto"};let ot=(()=>{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,f.Xx)("components.agGridColumnSelect.labelDataType");_labelDateFormat=(0,f.Xx)("components.agGridColumnSelect.labelDateFormat");_dtText=(0,f.Xx)("components.agGridColumnSelect.dataTypeText");_dtNumber=(0,f.Xx)("components.agGridColumnSelect.dataTypeNumber");_dtDate=(0,f.Xx)("components.agGridColumnSelect.dataTypeDate");_dtBoolean=(0,f.Xx)("components.agGridColumnSelect.dataTypeBoolean");_dfDateTime=(0,f.Xx)("components.agGridColumnSelect.dateFormatDateTime");_dfDate=(0,f.Xx)("components.agGridColumnSelect.dateFormatDate");_dfShortDate=(0,f.Xx)("components.agGridColumnSelect.dateFormatShortDate");_dfTimeAgo=(0,f.Xx)("components.agGridColumnSelect.dateFormatTimeAgo");dataTypeLabelMap=(0,u.EW)(()=>({text:this._dtText(),number:this._dtNumber(),date:this._dtDate(),boolean:this._dtBoolean()}));dateFormatLabelMap=(0,u.EW)(()=>({dateTime:this._dfDateTime(),date:this._dfDate(),shortDate:this._dfShortDate(),timeAgo:this._dfTimeAgo()}));_labelText=(0,f.Xx)("components.agGridColumnSelect.filterTypeText");_labelNumber=(0,f.Xx)("components.agGridColumnSelect.filterTypeNumber");_labelDate=(0,f.Xx)("components.agGridColumnSelect.filterTypeDate");_labelSelect=(0,f.Xx)("components.agGridColumnSelect.filterTypeSelect");_labelNone=(0,f.Xx)("components.agGridColumnSelect.filterTypeNone");_labelAuto=(0,f.Xx)("components.agGridColumnSelect.filterTypeAuto");filterTypeLabelMap=(0,u.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,u.EW)(()=>{const e=this.columnDef().cellRenderer;return e===X||"DateCellRenderer"===e?"date":"text"});dateFormat=(0,u.EW)(()=>{const e=this.columnDef().cellRenderer;return e===X||"DateCellRenderer"===e?this.columnDef().cellRendererParams?.dateFormat??"dateTime":"dateTime"});editable=(0,u.EW)(()=>!0===this.columnDef().editable);multiline=(0,u.EW)(()=>{const e=this.columnDef().cellRenderer;return e===H||"MultilineCellRenderer"===e});_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,u.uu)(()=>{const e=this.columnDef().cellStyle;return e?.textAlign||this._FLEX_TO_ALIGN[e?.justifyContent]||"left"});filterType=(0,u.EW)(()=>{const e=this.columnDef().filter;return e===te?"Select":e===ne?"Text":it[e]||"Auto"});enumValuesText=(0,u.EW)(()=>(this.columnDef().cellRendererParams?.options??[]).map(n=>n.value).join(", "));label=(0,u.EW)(()=>this.columnDef().headerName||ee(this.columnDef().field)||"Unknown");setEditable(e){const n=this.columnDef().cellRendererParams;this.updateColumn.emit(n?.options?.length?{editable:e,cellRendererParams:{...n,disabled:!e}}:{editable:e})}setMultiline(e){this.updateColumn.emit({cellRenderer:e?H:void 0,cellRendererParams:{lineHeight:"1.8"},autoHeight:!0})}setLabel(e){this.updateColumn.emit({headerName:e})}setTextAlign(e){const n=this.columnDef().cellStyle||{};this.updateColumn.emit({cellStyle:{...n,display:"flex",justifyContent:this._ALIGN_TO_FLEX[e]??e,textAlign:e},headerClass:`header-align-${e}`}),this.textAlign.set(e)}setFilterType(e){this.updateColumn.emit({filter:nt[e]??!0})}setEnumValues(e){const n=e.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:fe,cellRendererParams:{options:i,disabled:!this.editable()}})}}setDateFormat(e){e&&this.updateColumn.emit({cellRenderer:X,cellRendererParams:{dateFormat:e}})}setDataType(e){this.updateColumn.emit("date"===e?{cellRenderer:X,cellRendererParams:{dateFormat:"dateTime"}}:{cellRenderer:void 0,cellRendererParams:void 0})}formulaFunctions=Ae;postProcessFormula=(0,u.EW)(()=>function Oe(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,u.EW)(()=>function Ge(o){if(!o||!o.trim())return null;try{const a=oe(o);return new se(a,{"?val":"42"}).parse(),null}catch(a){return a?.message??"Invalid formula"}}(this.postProcessFormula()));postProcessFormulaPreview=(0,u.EW)(()=>{const e=this.postProcessFormula();return!e||this.postProcessFormulaError()?"":function ie(o,a){if(!o||!o.trim())return a;try{const e=oe(o),n=new se(e,{"?val":a}).parse();return null==n?"":String(n)}catch{return a}}(e,"42")});setPostProcessFormula(e){const n=e.trim();this.updateColumn.emit({postProcess:n?{type:"formula",expression:n}:void 0})}static \u0275fac=function(n){return new(n||o)};static \u0275cmp=t.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:je,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&&(t.NAR(Ee),t.j41(0,"cue-modal",0),t.nI1(1,"transloco"),t.bIt("close",function(){return i.close.emit()}),t.j41(2,"cue-flexcontainer",1),t.nVh(3,$e,7,7,"cue-expansion-panel",2),t.nVh(4,Je,7,6,"cue-expansion-panel",3),t.nVh(5,Ze,10,10,"cue-expansion-panel",3),t.nVh(6,qe,3,2,"cue-expansion-panel",2),t.nVh(7,tt,13,19,"cue-expansion-panel",3),t.SdG(8),t.k0s()()),2&n&&(t.Y8G("label",t.bMT(1,7,"components.agGridColumnSelect.titleColumnSettings"))("minWidth",i.minWidth()),t.R7$(3),t.vxM(i.settings().allowSettingLabel||i.settings().allowSettingTextAlign||i.settings().allowSettingMultiline?3:-1),t.R7$(),t.vxM(i.settings().allowSettingFilterType||i.settings().allowSettingEnumValues||i.settings().allowSettingDataType?4:-1),t.R7$(),t.vxM(i.settings().allowToggleEditable?5:-1),t.R7$(),t.vxM(i.extraPanelLabel()?6:-1),t.R7$(),t.vxM(i.settings().allowSettingPostProcess?7:-1))},dependencies:[ge.a,j.n,A.o,Q.l,pe.d,$.d,J.p,O.$,W.a,we,f.Kj],encapsulation:2,changeDetection:0})}return o})();const le=o=>[o],st=(o,a)=>({$implicit:o,index:a});function at(o,a){if(1&o){const e=t.RV6();t.j41(0,"cue-table-column-settings-modal",9),t.bIt("updateColumn",function(i){const s=l.eBV(e),c=t.XpG();return l.Njj(c.updateColumnDef(s.index,i))})("close",function(){l.eBV(e);const i=t.XpG();return l.Njj(i.handleModalClose())}),t.k0s()}if(2&o){const e=a,n=t.XpG();t.Y8G("columnDef",e.col)("columnIndex",e.index)("settings",n.settings())}}function lt(o,a){1&o&&t.eu8(0)}function rt(o,a){if(1&o&&t.DNE(0,lt,1,0,"ng-container",13),2&o){const e=t.XpG(),n=e.$implicit,i=e.$index;t.Y8G("ngTemplateOutlet",a.templateRef)("ngTemplateOutletContext",t.l_i(2,st,n,i))}}function ct(o,a){if(1&o){const e=t.RV6();t.j41(0,"cue-button",14),t.nI1(1,"transloco"),t.bIt("click",function(){l.eBV(e);const i=t.XpG(),s=i.$implicit,c=i.$index,m=t.XpG();return l.Njj(m.showColumnSettings(s,c))}),t.nrm(2,"cue-button-icon",15),t.k0s()}2&o&&t.Y8G("cueTooltip",t.bMT(1,1,"components.agGridColumnSelect.tooltipSettings"))}function dt(o,a){if(1&o&&(t.j41(0,"div",8)(1,"cue-flexcontainer",10)(2,"cue-typography"),t.EFF(3),t.k0s(),t.nrm(4,"span",11),t.nVh(5,rt,1,5,"ng-container"),t.nVh(6,ct,3,3,"cue-button",12),t.k0s()()),2&o){let e;const n=a.$implicit,i=t.XpG();t.R7$(3),t.JRh(i.getLabel(n)),t.R7$(2),t.vxM((e=i.columnItemTpl())?5:-1,e),t.R7$(),t.vxM(i.settings().allowEditing?6:-1)}}function ut(o,a){1&o&&t.eu8(0)}function mt(o,a){1&o&&t.DNE(0,ut,1,0,"ng-container",16),2&o&&t.Y8G("ngTemplateOutlet",a.templateRef)}function ht(o,a){if(1&o&&(t.j41(0,"div",8)(1,"cue-typography"),t.EFF(2),t.k0s()()),2&o){const e=a.$implicit,n=t.XpG();t.R7$(2),t.JRh(n.getLabel(e))}}let re=(()=>{class o{templateRef=(0,l.WQX)(t.C4Q);static ngTemplateContextGuard(e,n){return!0}static \u0275fac=function(n){return new(n||o)};static \u0275dir=t.FsC({type:o,selectors:[["","cueColumnItem",""]]})}return o})(),ce=(()=>{class o{templateRef=(0,l.WQX)(t.C4Q);static \u0275fac=function(n){return new(n||o)};static \u0275dir=t.FsC({type:o,selectors:[["","cueColumnListFooter",""]]})}return o})(),pt=(()=>{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 e=this.columnDefs().map(i=>i.field),n=this.columnDefsGross().filter(i=>!e.includes(i.field));this.shownColumns.update(()=>[...this.columnDefs()]),this.hiddenColumns.update(()=>[...n])});drop(e){e.previousContainer===e.container?(0,Y.HD)(e.container.data,e.previousIndex,e.currentIndex):(0,Y.eg)(e.previousContainer.data,e.container.data,e.previousIndex,e.currentIndex);const n=this.shownColumns();this.columnDefs.update(()=>[...n]),this.shown.emit(n)}showColumnSettings(e,n){this.displayColumnSettings.set({col:e,index:n})}updateColumnDef(e,n){const i=this.columnDefs().map((s,c)=>c===e?{...s,...n}:s);this.columnDefs.set(i),this.shown.emit(i),this.shownColumns.set(i)}getLabel(e){return e.headerName||ee(e.field)||"Unknown"}handleModalClose(){this.displayColumnSettings.set(void 0)}static \u0275fac=function(n){return new(n||o)};static \u0275cmp=t.VBU({type:o,selectors:[["cue-ag-grid-column-select"]],contentQueries:function(n,i,s){1&n&&t.C6U(s,i.columnItemTpl,re,5)(s,i.columnListFooterTpl,ce,5),2&n&&t.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&&(t.nVh(0,at,1,3,"cue-table-column-settings-modal",2),t.j41(1,"cue-typography",3),t.EFF(2),t.nI1(3,"transloco"),t.k0s(),t.j41(4,"cue-flexcontainer",4)(5,"cue-flexcontainer",5)(6,"cue-typography",6),t.EFF(7),t.nI1(8,"transloco"),t.k0s(),t.j41(9,"div",7,0),t.bIt("cdkDropListDropped",function(c){return i.drop(c)}),t.Z7z(11,dt,7,3,"div",8,t.Vm6),t.nVh(13,mt,1,1,"ng-container"),t.k0s()(),t.j41(14,"cue-flexcontainer",5)(15,"cue-typography",6),t.EFF(16),t.nI1(17,"transloco"),t.k0s(),t.j41(18,"div",7,1),t.bIt("cdkDropListDropped",function(c){return i.drop(c)}),t.Z7z(20,ht,3,1,"div",8,t.Vm6),t.k0s()()()),2&n){let s,c;const m=t.sdS(10),p=t.sdS(19);t.vxM((s=i.displayColumnSettings())?0:-1,s),t.R7$(2),t.JRh(t.bMT(3,9,"components.agGridColumnSelect.dragHint")),t.R7$(5),t.JRh(t.bMT(8,11,"components.agGridColumnSelect.titleShown"));const g=i.shownColumns();t.R7$(2),t.Y8G("cdkDropListData",g)("cdkDropListConnectedTo",t.eq3(15,le,p)),t.R7$(2),t.Dyx(g),t.R7$(2),t.vxM((c=i.columnListFooterTpl())?13:-1,c),t.R7$(3),t.JRh(t.bMT(17,13,"components.agGridColumnSelect.titleHidden"));const _=i.hiddenColumns();t.R7$(2),t.Y8G("cdkDropListData",_)("cdkDropListConnectedTo",t.eq3(17,le,m)),t.R7$(2),t.Dyx(_)}},dependencies:[Y.O7,Y.T1,A.o,j.n,O.$,W.a,$.d,ot,h.T3,f.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 gt(o,a){if(1&o&&(l.qSk(),t.j41(0,"svg",0),t.nrm(1,"path",3)(2,"path",4),t.k0s()),2&o){const e=t.XpG();t.R7$(),t.BMQ("fill",e.colorDark()),t.R7$(),t.BMQ("fill",e.color())}}function ft(o,a){if(1&o&&(l.qSk(),t.j41(0,"svg",1),t.nrm(1,"path",5)(2,"path",6)(3,"path",7),t.k0s()),2&o){const e=t.XpG();t.R7$(2),t.BMQ("fill",e.color())}}const T_blue="#175EBB",_t={".dwg":T_blue,".dxf":T_blue,".doc":T_blue,".docx":T_blue,".ifc":"#9F388D",".pdf":"#E03833",".ppt":T_blue,".pptx":T_blue,".csv":"#0b7741",".xls":"#0b7741",".xlsx":"#0b7741",folder:"#9D9998"};let Ct=(()=>{class o{suffix=r.hFB.required();size=(0,r.hFB)("m");color=(0,u.EW)(()=>_t[this.suffix()]??"#9D9998");label=(0,u.EW)(()=>this.suffix().startsWith(".")?this.suffix().toUpperCase().replace(/^\./,""):"");className=(0,u.EW)(()=>`size-${this.size()}`);colorDark=(0,u.EW)(()=>{const e=this.color(),n=parseInt(e.slice(1),16),s=n>>8&255,c=255&n;return`#${(Math.floor(.8*(n>>16&255))<<16|Math.floor(.8*s)<<8|Math.floor(.8*c)).toString(16).padStart(6,"0")}`});static \u0275fac=function(n){return new(n||o)};static \u0275cmp=t.VBU({type:o,selectors:[["cue-file-icon"]],hostVars:2,hostBindings:function(n,i){2&n&&t.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&&(t.nVh(0,gt,3,2,":svg:svg",0)(1,ft,4,1,":svg:svg",1),t.j41(2,"cue-typography",2),t.EFF(3),t.k0s()),2&n&&(t.vxM("folder"===i.suffix()?0:1),t.R7$(3),t.JRh(i.label()))},dependencies:[A.o],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})(),vt=(()=>{class o{suffix=(0,l.vPA)("");iconSize=(0,l.vPA)("xs");agInit(e){this._apply(e)}refresh(e){return this._apply(e),!0}_apply(e){this.suffix.set(e.value||"folder"),this.iconSize.set({xs:"xs",s:"xs",m:"xs",l:"s",xl:"m"}[e.colDef?.cellRendererParams?.iconSize??e.iconSize??"xs"]??"xs")}static \u0275fac=function(n){return new(n||o)};static \u0275cmp=t.VBU({type:o,selectors:[["cue-file-icon-cell-renderer"]],decls:1,vars:2,consts:[[3,"suffix","size"]],template:function(n,i){1&n&&t.nrm(0,"cue-file-icon",0),2&n&&t.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 bt=d(6117),xt=d(29),Dt=d(1951),Mt=d(1493),yt=d(5187),wt=d(356),St=d(6279);let Tt=(()=>{class o{cueFlip=(0,r.geq)(!1);get flipped(){return this.cueFlip()}static \u0275fac=function(n){return new(n||o)};static \u0275dir=t.FsC({type:o,selectors:[["","cueFlip",""]],hostVars:2,hostBindings:function(n,i){2&n&&t.AVh("flipped",i.flipped)},inputs:{cueFlip:[1,"cueFlip"]},outputs:{cueFlip:"cueFlipChange"}})}return o})();const Ft=(o,a)=>a.id;function kt(o,a){if(1&o){const e=t.RV6();t.j41(0,"li",7),t.bIt("click",function(){const i=l.eBV(e).$implicit,s=t.XpG(3);return l.Njj(s.handleSimpleRowClick(i))}),t.j41(1,"cue-typography",8),t.EFF(2),t.k0s(),t.j41(3,"cue-typography",9),t.EFF(4),t.k0s()()}if(2&o){const e=a.$implicit,n=t.XpG(3);t.AVh("active",n.selectedSimpleDocumentId()===e.id),t.R7$(),t.Y8G("noWrap",!0)("title",e.name),t.R7$(),t.SpI(" ",e.name," "),t.R7$(2),t.SpI(" ",(e.suffix||"").replace(".","").toUpperCase()," ")}}function It(o,a){if(1&o&&(t.j41(0,"ul",3),t.Z7z(1,kt,5,6,"li",6,Ft),t.k0s()),2&o){const e=t.XpG(2);t.R7$(),t.Dyx(e.simpleDocumentsInt())}}function Rt(o,a){if(1&o&&(t.j41(0,"cue-flexcontainer",4)(1,"cue-typography",10),t.EFF(2),t.k0s()()),2&o){const e=t.XpG(2);t.R7$(2),t.SpI(" ",0===e.documentRefs().length&&0===e.documents().length&&e.handlers()?"No documents":e.infoLoading()," ")}}function Nt(o,a){if(1&o){const e=t.RV6();t.j41(0,"cue-flexcontainer",5)(1,"cue-typography",11),t.EFF(2),t.k0s(),t.j41(3,"cue-flexcontainer",12)(4,"cue-button",13),t.bIt("click",function(){l.eBV(e);const i=t.XpG(2);return l.Njj(i.previousSimplePage())}),t.nrm(5,"cue-button-icon",14),t.k0s(),t.j41(6,"cue-button",13),t.bIt("click",function(){l.eBV(e);const i=t.XpG(2);return l.Njj(i.nextSimplePage())}),t.nrm(7,"cue-button-icon",15),t.k0s()()()}if(2&o){const e=t.XpG(2);t.R7$(2),t.E5c(" ",e.simpleDisplayStart(),"-",e.simpleDisplayEnd()," / ",e.documentsInt().length," "),t.R7$(2),t.Y8G("disabled",!e.simpleHasPreviousPage()),t.R7$(2),t.Y8G("disabled",!e.simpleHasNextPage())}}function Pt(o,a){if(1&o&&(t.j41(0,"div",1),t.nVh(1,It,3,0,"ul",3)(2,Rt,3,1,"cue-flexcontainer",4),t.nVh(3,Nt,8,5,"cue-flexcontainer",5),t.k0s()),2&o){const e=t.XpG();t.R7$(),t.vxM(e.simpleDocumentsInt().length>0?1:2),t.R7$(2),t.vxM(e.documentsInt().length>0?3:-1)}}function Ot(o,a){if(1&o&&t.nrm(0,"cue-svg-icon",36),2&o){const e=t.XpG().$implicit;t.Y8G("name",e.icon)}}function At(o,a){if(1&o){const e=t.RV6();t.j41(0,"cue-menu-item",35),t.bIt("click",function(){const i=l.eBV(e).$implicit;return l.Njj(null==i?null:i.action())}),t.nVh(1,Ot,1,1,"cue-svg-icon",36),t.EFF(2),t.k0s()}if(2&o){const e=a.$implicit;t.R7$(),t.vxM(e.icon?1:-1),t.R7$(),t.SpI(" ",e.label)}}function Gt(o,a){if(1&o){const e=t.RV6();t.j41(0,"cue-flexcontainer",37),t.bIt("click",function(){l.eBV(e);const i=t.XpG(2);return l.Njj(i.applyTagFilter())}),t.j41(1,"cue-button",38)(2,"cue-button-label"),t.EFF(3,"Apply"),t.k0s()()()}}function Lt(o,a){if(1&o){const e=t.RV6();t.j41(0,"div",16),t.mxI("cueFlipChange",function(i){l.eBV(e);const s=t.XpG();return t.DH7(s.flipped,i)||(s.flipped=i),l.Njj(i)}),t.j41(1,"div",17)(2,"cue-card",18)(3,"cue-flexcontainer",19)(4,"cue-menu",20)(5,"cue-button",21,0),t.nrm(7,"cue-button-icon",22),t.k0s(),t.j41(8,"cue-menu-wrap",23),t.Z7z(9,At,3,2,"cue-menu-item",null,t.Vm6),t.k0s()(),t.j41(11,"cue-button",24),t.nI1(12,"transloco"),t.bIt("click",function(){l.eBV(e);const i=t.XpG();return l.Njj(i.flipped.set(!0))}),t.nrm(13,"cue-button-icon",25),t.k0s()(),t.j41(14,"div",26)(15,"cue-ag-grid",27),t.bIt("gridApiReady",function(i){l.eBV(e);const s=t.XpG();return l.Njj(s.onGridReady(i))})("selectedRows",function(i){l.eBV(e);const s=t.XpG();return l.Njj(s.clickedDocument.emit(i[0]))}),t.k0s()()(),t.j41(16,"cue-card",28)(17,"cue-flexcontainer",19)(18,"cue-button",29),t.bIt("click",function(){l.eBV(e);const i=t.XpG();return l.Njj(i.showFront())}),t.nrm(19,"cue-button-icon",30),t.k0s()(),t.j41(20,"cue-flexcontainer",31)(21,"cue-word-cloud",32),t.bIt("selectionChanged",function(i){l.eBV(e);const s=t.XpG();return l.Njj(s.tagSelection.set(i))}),t.k0s(),t.nVh(22,Gt,4,0,"cue-flexcontainer",33),t.k0s(),t.j41(23,"cue-ag-grid-column-select",34),t.mxI("columnDefsChange",function(i){l.eBV(e);const s=t.XpG();return t.DH7(s.columnDefs,i)||(s.columnDefs=i),l.Njj(i)}),t.k0s()()()()}if(2&o){const e=t.XpG();t.R50("cueFlip",e.flipped),t.R7$(9),t.Dyx(e.tableMenu()),t.R7$(2),t.Y8G("cueTooltip",t.bMT(12,23,"components.documentList.tooltipColumnSettings")),t.R7$(4),t.AVh("hidden",e.tableHidden()),t.Y8G("paginationPageSize",e.pageSize())("rowSelection",e.rowSelection)("rowData",e.documentsInt())("columnDefs",e.columnDefs())("overlaySettings",e.overlaySettings)("overlayActions",e.overlayActions()),t.R7$(5),t.AVh("hidden",!e.showTagFilterCloud()),t.R7$(),t.Y8G("words",e.tags())("clickable",!0)("overflow",!0)("multiSelect",!0)("highlightSelection",!0),t.R7$(),t.vxM(e.filterToBeApplied()?22:-1),t.R7$(),t.AVh("hidden",e.showTagFilterCloud()),t.Y8G("settings",e.columnSelectSettings),t.R50("columnDefs",e.columnDefs),t.Y8G("columnDefsGross",e.columnDefsGross())}}let Et=(()=>{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)([]);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,u.EW)(()=>this.documentRefs().length>0);_leafContentCategoryIris=(0,u.EW)(()=>{const e=this.availableContentCategories();if(!e)return null;const n=new Set(e.map(i=>i.parent).filter(i=>!!i));return new Set(e.filter(i=>!n.has(i.iri)).map(i=>i.iri))});labelDownload=(0,f.Xx)("components.documentList.labelDownload");labelName=(0,f.Xx)("components.documentList.labelName");labelOpenInFileManager=(0,f.Xx)("components.documentList.labelOpenInFileManager");labelOpenInDocumentViewer=(0,f.Xx)("components.documentList.labelOpenInDocumentViewer");labelSubject=(0,f.Xx)("components.documentList.labelSubject");labelSummary=(0,f.Xx)("components.documentList.labelSummary");labelPages=(0,f.Xx)("components.documentList.labelPages");labelSize=(0,f.Xx)("components.documentList.labelSize");labelCategories=(0,f.Xx)("components.documentList.labelCategories");labelType=(0,f.Xx)("components.documentList.labelType");buttonShowCloudFilter=(0,f.Xx)("components.documentList.buttonShowCloudFilter");buttonHideCloudFilter=(0,f.Xx)("components.documentList.buttonHideCloudFilter");buttonDownloadCSV=(0,f.Xx)("components.documentList.buttonDownloadCSV");infoLoading=(0,f.Xx)("components.documentList.infoLoading");overlaySettings={...new Dt.K,mode:"row"};overlayActions=(0,u.EW)(()=>{const e=[{label:this.labelDownload(),icon:"download",action:n=>{this.handlers()?.requestDownload?.(n.rowData),this.clickedDownloadDocument.emit(n.rowData)}}];return this.showOpenInDocumentViewerAction()&&e.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()&&e.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)}}),[...e,...this.customOverlayActions()||[]]});documentsInt=(0,u.EW)(()=>{let e;if(this._lazyMode()){const n=this.documentRefs(),i=this.documentData()||{};e=n.map(s=>{const c=i[s.id];return c?{...c,pages:s.pages??c.pages,...void 0!==s.sources?{sources:s.sources}:{},...void 0!==s.relevance?{relevance:s.relevance}:{},name:U(c.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 e=(this.documents()||[]).map(n=>({...n,name:U(n.path),loading:!1}));return this.tagFilter().length?e.filter(n=>n.tags?.some(i=>this.tagFilter().some(s=>s.toLowerCase()===i.toLowerCase()))):e});simplePageCount=(0,u.EW)(()=>Math.max(1,Math.ceil(this.documentsInt().length/Math.max(1,this.pageSize()))));simpleStartIndex=(0,u.EW)(()=>this.simplePageIndex()*Math.max(1,this.pageSize()));simpleEndIndex=(0,u.EW)(()=>this.simpleStartIndex()+Math.max(1,this.pageSize()));simpleDocumentsInt=(0,u.EW)(()=>this.documentsInt().slice(this.simpleStartIndex(),this.simpleEndIndex()));simpleHasPreviousPage=(0,u.EW)(()=>this.simplePageIndex()>0);simpleHasNextPage=(0,u.EW)(()=>this.simplePageIndex()<this.simplePageCount()-1);simpleDisplayStart=(0,u.EW)(()=>this.documentsInt().length?this.simpleStartIndex()+1:0);simpleDisplayEnd=(0,u.EW)(()=>Math.min(this.simpleEndIndex(),this.documentsInt().length));tags=(0,u.EW)(()=>{const e=this.documentsInt(),n=[];return e.forEach(i=>{i.tags?.forEach(s=>n.push(s))}),n});showPageColumn=(0,u.EW)(()=>this.documentsInt().some(e=>void 0!==e.pages));hasSubjects=(0,u.EW)(()=>this.documentsInt().some(e=>void 0!==e.subject&&""!==e.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,u.EW)(()=>{const e=this.tagSelection(),n=this.tagFilter();return JSON.stringify(e.sort())!==JSON.stringify(n.sort())});tableMenu=(0,u.EW)(()=>{const e=[];return this.showTagFilterCloud()?e.push({icon:"cloud-funnel",label:this.buttonHideCloudFilter(),variant:"accent",action:()=>{this.flipped.set(!1),this.showTagFilterCloud.set(!1)}}):e.push({icon:"cloud-funnel",label:this.buttonShowCloudFilter(),variant:"accent",action:()=>{this.flipped.set(!0),this.showTagFilterCloud.set(!0)}}),e.push({icon:"download",label:this.buttonDownloadCSV(),action:()=>function G(o,a,e="table.csv"){const n=function I(o,a){const e=function k(o,a){return o.map(e=>{const n={};return"id"in e&&(n.id=e.id),"key"in e&&(n.key=e.key),a.forEach(i=>{let s;"function"==typeof i.valueGetter?s=i.valueGetter({data:e,colDef:i,getValue:m=>e[m],node:void 0,column:void 0,api:void 0,context:void 0}):i.field&&(s=e[i.field]),"function"==typeof i.valueFormatter&&(s=i.valueFormatter({value:s,data:e,colDef:i,node:void 0,column:void 0,api:void 0,context:void 0}));const c=i.headerName||i.colId||i.field;void 0!==c&&(n[c]=s)}),n})}(o,a);if(0===e.length)return"";const n=e.some(c=>"id"in c),i=[];n&&i.push("id"),a.forEach(c=>{const m=c.headerName||c.colId||c.field;m&&"id"!==m&&!i.includes(m)&&i.push(m)});const s=e.map(c=>{const m={};return i.forEach(p=>{m[p]=c[p]}),m});return F().unparse(s,{columns:i})}(o,a);(0,v.YN)(n,e,"text/csv")}(this.documentsInt(),this.columnDefs())}),e});hideCloud(){this.flipped.set(!0),this.showTagFilterCloud.set(!0)}tableHidden=(0,u.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 e=this.documentsInt().length,n=Math.max(1,this.pageSize()),i=Math.max(0,Math.ceil(e/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 e=this.documentRefs();if(!e.length)return;const n=Math.max(1,this.pageSize()),s=n*Math.max(1,this.prefetchPages()),c=e.length,m=this.simpleStartIndex(),p=Math.min(c,m+n),g=this._simpleBufferedUntilIndex();let _=null;if(0===g?_=0:(m>=Math.max(0,g-n)||p>g)&&(_=g),null===_||_>=c)return;const b=Math.min(c,_+s),w=e.slice(_,b).map(y=>y.id).filter(y=>!this._requestedIds.has(y));this._simpleBufferedUntilIndex.set(Math.max(g,b)),w.length&&(w.forEach(y=>this._requestedIds.add(y)),setTimeout(()=>this.handlers()?.requestData(w)))});previousSimplePage(){this.simpleHasPreviousPage()&&this.simplePageIndex.update(e=>Math.max(0,e-1))}nextSimplePage(){this.simpleHasNextPage()&&this.simplePageIndex.update(e=>Math.min(this.simplePageCount()-1,e+1))}handleSimpleRowClick(e){this.selectedSimpleDocumentId.set(e.id),this.handleRowClick(e)}handleRowClick(e){var n=this;return(0,C.A)(function*(){n.clickedDocument.emit(e),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(e){this._gridApi=e,e.addEventListener("viewportChanged",()=>this._checkViewport()),e.addEventListener("modelUpdated",()=>this._checkViewport()),e.addEventListener("paginationChanged",()=>this._checkViewport()),e.addEventListener("sortChanged",()=>{const n=e.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 e=this.documentRefs(),n=e.length;if(!n)return;const i=Math.max(1,this._gridApi.paginationGetPageSize?.()??10),c=Math.max(0,this._gridApi.paginationGetCurrentPage?.()??0)*i,m=Math.min(n,c+i),p=this._tableBufferedUntilIndex();let g=null;if(0===p?g=0:(c>=Math.max(0,p-i)||m>p)&&(g=p),null===g||g>=n)return;const _=i*Math.max(1,this.prefetchPages()),b=Math.min(n,g+_),w=e.slice(g,b).map(y=>y.id).filter(y=>!this._requestedIds.has(y));this._tableBufferedUntilIndex.set(Math.max(p,b)),w.length&&(w.forEach(y=>this._requestedIds.add(y)),setTimeout(()=>this.handlers()?.requestData(w)))}_requestAllUnloaded(){if(!this._gridApi||this._gridApi.isDestroyed()||!this._lazyMode())return;const e=[];if(this._gridApi.forEachNode(n=>{const i=n.data;i?.loading&&!this._requestedIds.has(i.contentIRI)&&e.push(i.contentIRI)}),e.length>0){const n=Array.from(new Set(e));n.forEach(i=>this._requestedIds.add(i)),setTimeout(()=>this.handlers()?.requestData(n))}}_buildInitialColumnDefs(e){const n=[],i=[];n.push({field:"name",headerName:this.labelName(),width:e?250:120,filter:!0,valueGetter:p=>!p.data?.name&&p.data?.loading?"Loading...":p.data?.name||p.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"),e?n.push(s):i.push(s),this.showPageColumn()&&n.push({field:"pages",headerName:this.labelPages(),width:100,filter:!0,valueGetter:p=>Array.isArray(p.data?.pages)?p.data.pages.map(g=>g.page).join(", "):""});const c={field:"size",headerName:this.labelSize(),width:100,filter:!0,valueGetter:p=>(0,Mt.b)(p.data?.size||0)};e?n.push(c):i.push(c);const m={field:"categories",headerName:this.labelCategories(),width:120,filter:!0,valueGetter:p=>{const g=p.data?.categories||[],_=this._leafContentCategoryIris(),b=_?g.filter(y=>_.has(y)):g,w=b.slice(0,3).map(y=>this._getContentCategoryLabel(y)).join(", ");return b.length>3?`${w}...`:w}};e?n.push(m):i.push(m),n.push({field:"suffix",headerName:this.labelType(),width:80,filter:!0,headerClass:"header-align-right",cellStyle:{display:"flex",justifyContent:"flex-end"},cellRenderer:vt}),this.columnDefs.update(()=>[...n]),this.columnDefsGross.update(()=>[...n,...i])}_getContentCategoryLabel(e){const n=this.availableContentCategories();if(void 0!==n){const i=n.find(s=>s.iri===e);if(i)return i.label;console.warn(`No label found for content category IRI: ${e}`)}else console.warn("No availableContentCategories provided to DocumentList component");return(o=>{const a=o.split("#").pop()??o,e={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===e[a]&&console.log(`No pretty label for category: ${a}`),e[a]??a})(e)}static \u0275fac=function(n){return new(n||o)};static \u0275cmp=t.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"],documentRefs:[1,"documentRefs"],handlers:[1,"handlers"],documentData:[1,"documentData"]},outputs:{clickedDocument:"clickedDocument",clickedDownloadDocument:"clickedDownloadDocument",clickedOpenInDir:"clickedOpenInDir",clickedOpen:"clickedOpen"},decls:2,vars:1,consts:[["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"],["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"],[1,"card-face","back",2,"width","100%","height","auto"],["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"],[3,"click"],["before","",3,"name"],["justify","center",1,"word-cloud-actions",3,"click"],["variant","primary"]],template:function(n,i){1&n&&t.nVh(0,Pt,4,2,"div",1)(1,Lt,24,25,"div",2),2&n&&t.vxM(i.simple()?0:1)},dependencies:[j.n,B,O.$,ue.L,Tt,yt.Z,W.a,he.R,pt,wt.M,St.D,bt.W,xt.A,$.d,A.o,f.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})();function jt(o,a){if(1&o&&(t.j41(0,"cue-flexcontainer",0)(1,"cue-typography",2),t.EFF(2),t.k0s()()),2&o){const e=t.XpG();t.R7$(2),t.SpI(" ",e.errorMessage()," ")}}function zt(o,a){if(1&o){const e=t.RV6();t.j41(0,"cue-doc-list",3),t.bIt("clickedDocument",function(i){l.eBV(e);const s=t.XpG();return l.Njj(s.clickedDocument.emit(i))})("clickedDownloadDocument",function(i){l.eBV(e);const s=t.XpG();return l.Njj(s.clickedDownloadDocument.emit(i))})("clickedOpenInDir",function(i){l.eBV(e);const s=t.XpG();return l.Njj(s.clickedOpenInDir.emit(i))})("clickedOpen",function(i){l.eBV(e);const s=t.XpG();return l.Njj(s.clickedOpen.emit(i))}),t.k0s()}if(2&o){const e=t.XpG();t.Y8G("documentRefs",e.documentRefs())("documentData",e.documentData())("handlers",e.handlers())("availableContentCategories",e.availableContentCategories())("detailedView",e.detailedView())("simple",e.simple())("pageSize",e.pageSize())("prefetchPages",e.prefetchPages())("showOpenInDocumentViewerAction",e.showOpenInDocumentViewerAction())("showOpenInFileManagerAction",e.showOpenInFileManagerAction())("customOverlayActions",e.customOverlayActions())}}function de(o){return o.split("?")[0].trim()}let Bt=(()=>{class o{projectId=(0,r.hFB)(void 0);uuids=(0,r.hFB)([]);sdkState=(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);showOpenInDocumentViewerAction=(0,r.hFB)(!1);showOpenInFileManagerAction=(0,r.hFB)(!1);customMenuItems=(0,r.hFB)([]);clickedDocument=(0,r.CGW)();clickedDownloadDocument=(0,r.CGW)();clickedOpenInDir=(0,r.CGW)();clickedOpen=(0,r.CGW)();state=(0,l.vPA)("idle");errorMessage=(0,l.vPA)(null);documentData=(0,l.vPA)({});availableContentCategories=(0,l.vPA)(void 0);documentRefs=(0,u.EW)(()=>{const e=new Set;return(this.uuids()??[]).map(de).filter(n=>!!n).filter(n=>!e.has(n)&&(e.add(n),!0)).map(n=>({id:n}))});customOverlayActions=(0,u.EW)(()=>(this.customMenuItems()||[]).map(n=>({label:n.label,icon:n.icon,action:i=>{n.action(i.rowData,i)}})));handlers=(0,u.EW)(()=>{var e=this;const n=this._docs();if(n)return{requestData:(i=(0,C.A)(function*(s){const c=s.map(de).filter(p=>!!p),m=c.filter(p=>!e.documentData()[p]);if(console.debug("[CueDocumentListWC] requestData",{requestedCount:c.length,missingCount:m.length,missing:m}),m.length)try{const p=n,g=e.simple()&&p.fetchDocumentDataSimple?yield p.fetchDocumentDataSimple(m):yield n.fetchDocumentData(m);console.debug("[CueDocumentListWC] fetchDocumentData resolved",{fetchedCount:Object.keys(g).length,ids:Object.keys(g)});const _={};Object.values(g).forEach(b=>{_[b.id]=function Vt(o){return{id:o.id,path:o.path,suffix:o.suffix,size:o.size,contentIRI:o.contentIRI,providerId:o.providerId,tags:o.tags??[],summary:o.summary??"",categories:o.categories??[],subject:o.subject,relevance:0}}(b)}),Object.keys(_).length>0&&e.documentData.update(b=>({...b,..._}))}catch(p){console.error("[CueDocumentListWC] Failed to fetch document data:",p),e.errorMessage.set(p instanceof Error?p.message:String(p)),e.state.set("error")}}),function(c){return i.apply(this,arguments)}),requestDownload:function(){var i=(0,C.A)(function*(s){const c=e._cue(),m=e.projectId();if(c&&m)try{const p=yield c.storage.getDownloadUrl(m,s.id,s.suffix,"raw"),g=yield fetch(p);if(!g.ok)throw new Error(`Download failed: ${g.status} ${g.statusText}`);const _=yield g.blob(),b=U(s.path)||`${s.id}${s.suffix||""}`;(0,v.KE)(_,b)}catch(p){console.error("[CueDocumentListWC] Failed to download document:",p)}});return function(c){return i.apply(this,arguments)}}(),requestOpen:(i,s)=>{console.log("[CueDocumentListWC] requestOpen",{documentUUID:i,document:s})},requestOpenInDir:(i,s)=>{console.log("[CueDocumentListWC] requestOpenInDir",{documentUUID:i,document:s})}};var i});_cue=(0,l.vPA)(void 0);_docs=(0,l.vPA)(void 0);_ownedView;_unsubscribeCategories;_lastSetupSignature;constructor(){(0,l.QZP)(()=>{const e=this.projectId(),n=this.sdkState(),i=n?.language??"en";if(console.debug("[CueDocumentListWC] input state changed",{projectId:e,uuids:this.uuids().length,hasSdkState:!!n,hasCue:!!n?.cue,hasView:!!n?.view,hasDocuments:!!n?.documents}),!e||!n)return this._clearRuntimeState(),void this.state.set("idle");const s={projectId:e,cue:n.cue,view:n.view,documents:n.documents,language:i,simple:this.simple()};if(this._isSameSetupSignature(s))return this.state.set("ready"),void this.errorMessage.set(null);this._setupFromSdkState(e,n),this._lastSetupSignature=s,this.state.set("ready"),this.errorMessage.set(null)}),(0,l.QZP)(()=>{const e=new Set(this.documentRefs().map(n=>n.id));this.documentData.update(n=>Object.fromEntries(Object.entries(n).filter(([s])=>e.has(s))))})}ngOnDestroy(){this._cleanupOwnedView(),this._unsubscribeCategories?.(),this._unsubscribeCategories=void 0}_setupFromSdkState(e,n){const i=n.language??"en";if(this.documentData.set({}),this._cleanupOwnedView(),this._unsubscribeCategories?.(),this._unsubscribeCategories=void 0,this.availableContentCategories.set(n.availableContentCategories?n.availableContentCategories:void 0),n.documents)return n.documents.setLanguage(i),this._docs.set(n.documents),void this._cue.set(n.cue);if(n.view)return n.view.setLanguage(i),this._docs.set(n.view.documents),this._cue.set(n.cue),void(this.simple()||this._bindCategoriesFromView(n.view));if(n.cue){if(this.simple())return this._docs.set(n.cue.createProjectDocuments(e)),this._cue.set(n.cue),void this.availableContentCategories.set(void 0);const s=n.cue.createProjectView(e,{language:i});return this._ownedView=s,this._docs.set(s.documents),this._cue.set(n.cue),void this._bindCategoriesFromView(s)}this._docs.set(void 0),this._cue.set(void 0),this.errorMessage.set("sdkState must include cue, view, or documents to load data."),this.state.set("error")}_bindCategoriesFromView(e){const n=()=>{this.availableContentCategories.set(e.availableContentCategories.get())};n(),this._unsubscribeCategories=e.availableContentCategories.subscribe(n)}_clearRuntimeState(){this._cleanupOwnedView(),this._unsubscribeCategories?.(),this._unsubscribeCategories=void 0,this._docs.set(void 0),this._cue.set(void 0),this.documentData.set({}),this.availableContentCategories.set(void 0),this.errorMessage.set(null),this._lastSetupSignature=void 0}_cleanupOwnedView(){this._ownedView&&(this._ownedView.destroy(),this._ownedView=void 0)}_isSameSetupSignature(e){const n=this._lastSetupSignature;return!!n&&n.projectId===e.projectId&&n.cue===e.cue&&n.view===e.view&&n.documents===e.documents&&n.language===e.language&&n.simple===e.simple}static \u0275fac=function(n){return new(n||o)};static \u0275cmp=t.VBU({type:o,selectors:[["cue-document-list"]],inputs:{projectId:[1,"projectId"],uuids:[1,"uuids"],sdkState:[1,"sdkState"],detailedView:[1,"detailedView"],simple:[1,"simple"],pageSize:[1,"pageSize"],prefetchPages:[1,"prefetchPages"],showOpenInDocumentViewerAction:[1,"showOpenInDocumentViewerAction"],showOpenInFileManagerAction:[1,"showOpenInFileManagerAction"],customMenuItems:[1,"customMenuItems"]},outputs:{clickedDocument:"clickedDocument",clickedDownloadDocument:"clickedDownloadDocument",clickedOpenInDir:"clickedOpenInDir",clickedOpen:"clickedOpen"},decls:2,vars:1,consts:[["direction","column","align","center","justify","center",2,"height","100%","width","100%","padding","8px"],[3,"documentRefs","documentData","handlers","availableContentCategories","detailedView","simple","pageSize","prefetchPages","showOpenInDocumentViewerAction","showOpenInFileManagerAction","customOverlayActions"],[2,"color","#c44","font-size","13px"],[3,"clickedDocument","clickedDownloadDocument","clickedOpenInDir","clickedOpen","documentRefs","documentData","handlers","availableContentCategories","detailedView","simple","pageSize","prefetchPages","showOpenInDocumentViewerAction","showOpenInFileManagerAction","customOverlayActions"]],template:function(n,i){1&n&&t.nVh(0,jt,3,1,"cue-flexcontainer",0)(1,zt,1,11,"cue-doc-list",1),2&n&&t.vxM("error"===i.state()?0:1)},dependencies:[h.MD,Et,j.n,A.o],styles:["[_nghost-%COMP%]{display:block;width:100%}"],changeDetection:0})}return o})()},2269(S,M,d){S.exports=function(C){"use strict";var l=function r(h){return h&&"object"==typeof h&&"default"in h?h:{default:h}}(C),u={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(h){return h+"."},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 l.default.locale(u,null,!0),u}(d(7374))},1409(S,M,d){S.exports=function(C){"use strict";var l=function r(x){return x&&"object"==typeof x&&"default"in x?x:{default:x}}(C),u={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 h(x,F,k){var I=u[k];return Array.isArray(I)&&(I=I[F?0:1]),I.replace("%d",x)}var v={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(x){return x+"."},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:h,m:h,mm:h,h,hh:h,d:h,dd:h,M:h,MM:h,y:h,yy:h}};return l.default.locale(v,null,!0),v}(d(7374))},9785(S){S.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 d=["th","st","nd","rd"],C=M%100;return"["+M+(d[(C-20)%10]||d[C]||d[0])+"]"}}}()},2494(S,M,d){S.exports=function(C){"use strict";var l=function r(h){return h&&"object"==typeof h&&"default"in h?h:{default:h}}(C),u={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(h){return h+"\xba"}};return l.default.locale(u,null,!0),u}(d(7374))},4230(S,M,d){S.exports=function(C){"use strict";var l=function r(h){return h&&"object"==typeof h&&"default"in h?h:{default:h}}(C),u={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(h){return h+(1===h?"er":"")}};return l.default.locale(u,null,!0),u}(d(7374))},9531(S,M,d){S.exports=function(C){"use strict";var l=function r(h){return h&&"object"==typeof h&&"default"in h?h:{default:h}}(C),u={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(h){return h+"\xba"}};return l.default.locale(u,null,!0),u}(d(7374))},4955(S){S.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(d,C,r){var l=C.prototype,u=l.format;r.en.formats=M,l.format=function(h){void 0===h&&(h="YYYY-MM-DDTHH:mm:ssZ");var k,v=this.$locale().formats,x=(k=void 0===v?{}:v,h.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(I,G,t){var L=t&&t.toUpperCase();return G||k[t]||M[t]||k[L].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(z,N,V){return N||V.slice(1)})}));return u.call(this,x)}}}()},5164(S){S.exports=function(){"use strict";return function(M,d,C){M=M||{};var r=d.prototype,l={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 u(v,x,F,k){return r.fromToBase(v,x,F,k)}C.en.relativeTime=l,r.fromToBase=function(v,x,F,k,I){for(var G,t,L,z=F.$locale().relativeTime||l,N=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"}],V=N.length,E=0;E<V;E+=1){var R=N[E];R.d&&(G=k?C(v).diff(F,R.d,!0):F.diff(v,R.d,!0));var P=(M.rounding||Math.round)(Math.abs(G));if(L=G>0,P<=R.r||!R.r){P<=1&&E>0&&(R=N[E-1]);var B=z[R.l];I&&(P=I(""+P)),t="string"==typeof B?B.replace("%d",P):B(P,x,R.l,L);break}}if(x)return t;var O=L?z.future:z.past;return"function"==typeof O?O(t):O.replace("%s",t)},r.to=function(v,x){return u(v,x,this,!0)},r.from=function(v,x){return u(v,x,this)};var h=function(v){return v.$u?C.utc():C()};r.toNow=function(v){return this.to(h(this),v)},r.fromNow=function(v){return this.from(h(this),v)}}}()}}]);