@qaecy/cue-ui 0.0.57 → 0.0.58

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (75) hide show
  1. package/1051.js +1 -1
  2. package/1138.js +1 -1
  3. package/1153.js +1 -1
  4. package/1338.js +1 -1
  5. package/1520.js +1 -0
  6. package/1837.js +1 -1
  7. package/1985.js +1 -1
  8. package/2003.js +1 -0
  9. package/2014.js +1 -0
  10. package/2021.js +1 -1
  11. package/2081.js +1 -1
  12. package/2245.js +1 -1
  13. package/2283.js +1 -0
  14. package/2317.js +1 -1
  15. package/2775.js +1 -1
  16. package/2839.js +1 -1
  17. package/29.js +1 -1
  18. package/3036.js +1 -1
  19. package/3039.js +1 -1
  20. package/3288.js +1 -1
  21. package/3319.js +1 -0
  22. package/3577.js +1 -1
  23. package/3614.js +1 -1
  24. package/4098.js +1 -0
  25. package/4283.js +1 -1
  26. package/4311.js +1 -1
  27. package/4791.js +1 -0
  28. package/5277.js +1 -0
  29. package/5381.js +1 -0
  30. package/5448.js +1 -0
  31. package/5559.js +1 -1
  32. package/5649.js +1 -1
  33. package/5738.js +1 -1
  34. package/5872.js +1 -1
  35. package/5971.js +1 -0
  36. package/6027.js +1 -0
  37. package/617.js +1 -1
  38. package/6233.js +1 -1
  39. package/63.js +1 -1
  40. package/6419.js +1 -1
  41. package/6423.js +1 -1
  42. package/650.js +1 -1
  43. package/6947.js +1 -1
  44. package/7089.js +1 -0
  45. package/7154.js +1 -0
  46. package/7313.js +1 -0
  47. package/7441.js +1 -1
  48. package/7719.js +1 -1
  49. package/7802.js +1 -0
  50. package/7851.js +1 -0
  51. package/804.js +1 -1
  52. package/8194.js +1 -0
  53. package/8560.js +1 -1
  54. package/8659.js +1 -0
  55. package/880.js +1 -0
  56. package/8855.js +1 -1
  57. package/8957.js +1 -1
  58. package/928.js +1 -1
  59. package/9396.js +1 -1
  60. package/992.js +1 -0
  61. package/common.js +1 -1
  62. package/index.js +1 -1
  63. package/main.js +1 -1
  64. package/package.json +1 -1
  65. package/2399.js +0 -1
  66. package/2516.js +0 -1
  67. package/4687.js +0 -1
  68. package/4879.js +0 -1
  69. package/5041.js +0 -1
  70. package/5071.js +0 -1
  71. package/5137.js +0 -1
  72. package/7056.js +0 -1
  73. package/8336.js +0 -1
  74. package/8791.js +0 -1
  75. package/9376.js +0 -1
package/5071.js DELETED
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkcue_ui=self.webpackChunkcue_ui||[]).push([[5071],{2014(W,k,f){f.d(k,{z:()=>T});var g=f(7705),s=f(2271),_=f(5547);const q=["*"];let T=(()=>{class N{justify=(0,g.hFB)("start");size=(0,g.hFB)("l");widthStyle=(0,s.EW)(()=>`var(--cue-button-label-padding-${this.size()}-x)`);static \u0275fac=function(w){return new(w||N)};static \u0275cmp=_.VBU({type:N,selectors:[["cue-button-padder"]],inputs:{justify:[1,"justify"],size:[1,"size"]},ngContentSelectors:q,decls:2,vars:4,template:function(w,F){1&w&&(_.NAR(),_.rj2(0,"div"),_.SdG(1),_.eux()),2&w&&_.xc7("justify-content",F.justify())("min-width",F.widthStyle())},styles:["div[_ngcontent-%COMP%]{display:flex;align-items:center;min-height:1px}"]})}return N})()},7293(W,k,f){f.d(k,{x:()=>w});var g=f(7705),s=f(5802),_=f(2271),q=f(4613),T=f(9352),N=f(7089),S=f(5547);function E(F,Y){1&F&&S.nrm(0,"cue-logo",4)}let w=(()=>{class F{projectId=(0,g.hFB)(void 0);resourceId=(0,g.hFB)(void 0);_active=(0,s.vPA)(!0);onHover(){this._active.set(!1),requestAnimationFrame(()=>this._active.set(!0))}_title=(0,_.EW)(()=>this.projectId()&&this.resourceId()?"components.logoLink.showResourceInCue":this.projectId()?"components.logoLink.openProjectInCue":"components.logoLink.openCuePortal");_href=(0,_.EW)(()=>{const j=this.projectId(),A=this.resourceId();return j&&A?`https://cue.qaecy.com/r/${encodeURIComponent(j)}/${encodeURIComponent(A)}`:j?`https://cue.qaecy.com/home/projects?p=${encodeURIComponent(j)}`:"https://cue.qaecy.com/home/projects"});static \u0275fac=function(A){return new(A||F)};static \u0275cmp=S.VBU({type:F,selectors:[["cue-logo-link"]],inputs:{projectId:[1,"projectId"],resourceId:[1,"resourceId"]},decls:6,vars:5,consts:[["target","_blank","rel","noopener noreferrer",1,"link",3,"mouseenter","href"],[1,"logo-stack",3,"cueTooltip"],["size","xs",1,"logo-bg"],[1,"logo-fg"],["size","xs"]],template:function(A,G){1&A&&(S.j41(0,"a",0),S.bIt("mouseenter",function(){return G.onHover()}),S.j41(1,"div",1),S.nI1(2,"transloco"),S.nrm(3,"cue-logo",2),S.j41(4,"div",3),S.nVh(5,E,1,0,"cue-logo",4),S.k0s()()()),2&A&&(S.Y8G("href",G._href(),S.B4B),S.R7$(),S.Y8G("cueTooltip",S.bMT(2,3,G._title())),S.R7$(4),S.vxM(G._active()?5:-1))},dependencies:[q.Logo,N.d,T.Kj],styles:["[_nghost-%COMP%]{display:inline-block;line-height:0}.link[_ngcontent-%COMP%]{display:block;text-decoration:none;cursor:pointer}.logo-stack[_ngcontent-%COMP%]{position:relative;display:inline-block;line-height:0}.logo-bg[_ngcontent-%COMP%]{display:block;opacity:.3;transition:opacity .2s ease}.link[_ngcontent-%COMP%]:hover .logo-bg[_ngcontent-%COMP%]{opacity:.15}.logo-fg[_ngcontent-%COMP%]{position:absolute;inset:0;opacity:0;transition:opacity .15s ease}.link[_ngcontent-%COMP%]:hover .logo-fg[_ngcontent-%COMP%]{opacity:1}"],changeDetection:0})}return F})()},5071(W,k,f){f.d(k,{CueSparqlTable:()=>en});var g=f(7705),s=f(5802),_=f(2271),q=f(9376),T=f(467),N=f(7374),S=f.n(N),E=f(7400);function w(i,d,t=""){const a=d.valueKey??"val",n=d.priorityKey,o=d.fallback??t,l=d.preProcess?i.map(p=>{const c=p[a];return null==c?p:{...p,[a]:(0,E.w9)(d.preProcess,c)}}):i,r=(n?[...l].sort((p,c)=>{const m=p[n],h=c[n],y=Number(m),C=Number(h);return isNaN(y)||isNaN(C)?(h??"").localeCompare(m??""):C-y}):l).map(p=>p[a]).filter(p=>null!=p);if(0===r.length)return o;switch(d.type){case"first":default:return r[0];case"last":return r[r.length-1];case"random":return r[Math.floor(Math.random()*r.length)];case"count":return String(r.length);case"join":return r.join(d.separator??", ");case"longest":return r.reduce((p,c)=>c.length>p.length?c:p);case"shortest":return r.reduce((p,c)=>c.length<p.length?c:p);case"sum":{const p=r.map(Number).filter(c=>!isNaN(c));return p.length?String(p.reduce((c,m)=>c+m,0)):t}case"avg":{const p=r.map(Number).filter(c=>!isNaN(c));return p.length?String(p.reduce((c,m)=>c+m,0)/p.length):t}case"min":{const p=r.map(Number).filter(c=>!isNaN(c));return p.length?String(Math.min(...p)):t}case"max":{const p=r.map(Number).filter(c=>!isNaN(c));return p.length?String(Math.max(...p)):t}case"mostRecent":return[...r].sort((c,m)=>S()(m).valueOf()-S()(c).valueOf())[0];case"oldest":return[...r].sort((c,m)=>S()(c).valueOf()-S()(m).valueOf())[0];case"map":{const{map:p}=d;return p[r[0]]??o}}}const Y=Object.keys({first:"First",last:"Last",random:"Random",join:"Concatenate",count:"Count",longest:"Longest text",shortest:"Shortest text",map:"Map lookup",sum:"Sum",avg:"Average",min:"Minimum",max:"Maximum",mostRecent:"Most recent date",oldest:"Oldest date"}),j=["first","last","random","join","count"],A={text:[...j,"longest","shortest","map"],number:[...j,"sum","avg","min","max"],date:[...j,"mostRecent","oldest"]},G={first:"components.sparqlTable.strategyFirst",last:"components.sparqlTable.strategyLast",random:"components.sparqlTable.strategyRandom",join:"components.sparqlTable.strategyJoin",count:"components.sparqlTable.strategyCount",longest:"components.sparqlTable.strategyLongest",shortest:"components.sparqlTable.strategyShortest",map:"components.sparqlTable.strategyMap",sum:"components.sparqlTable.strategySum",avg:"components.sparqlTable.strategyAvg",min:"components.sparqlTable.strategyMin",max:"components.sparqlTable.strategyMax",mostRecent:"components.sparqlTable.strategyMostRecent",oldest:"components.sparqlTable.strategyOldest"},se={first:"components.sparqlTable.strategyFirstDesc",last:"components.sparqlTable.strategyLastDesc",random:"components.sparqlTable.strategyRandomDesc",join:"components.sparqlTable.strategyJoinDesc",count:"components.sparqlTable.strategyCountDesc",longest:"components.sparqlTable.strategyLongestDesc",shortest:"components.sparqlTable.strategyShortestDesc",map:"components.sparqlTable.strategyMapDesc",sum:"components.sparqlTable.strategySumDesc",avg:"components.sparqlTable.strategyAvgDesc",min:"components.sparqlTable.strategyMinDesc",max:"components.sparqlTable.strategyMaxDesc",mostRecent:"components.sparqlTable.strategyMostRecentDesc",oldest:"components.sparqlTable.strategyOldestDesc"};var U=f(7573);const H=`PREFIX qcy: <${U.E.qcy}>\nPREFIX qcy-e: <${U.E["qcy-e"]}>\n\nSELECT ?subject\nWHERE {\n ?subject a qcy:CanonicalEntity ;\n qcy:hasEntityCategory qcy-e:Person .\n}`;class re{field;headerName;sortable;filter;editable;hide;minWidth;cellStyle;headerClass;query="";defType="data";calculatedFrom;evaluation;datatype;postProcess;strategy;valueKey;labelKey;formatter=void 0;constructor(d="",t=""){this.field=d,this.headerName=t}getFormatter=()=>{if(this.formatter)return this.formatter;if(this.strategy){const d=this.strategy;return t=>w(t,d,"")}return d=>Array.isArray(d)?d.map(t=>t?.val??"").filter(Boolean).join(", "):String(d??"")}}var Ce=f(4284);class Se{menuDisplaySettings=new Me;columnSelectSettings=new Re}class Me{hide=!0;buttonVariant="tertiary";buttonSize="s";showColumnSelect=!0;showDownload=!0}class Re{allowEditing=!0;allowToggleEditable=!0;allowToggleHideOnHover=!0;allowSettingTextAlign=!0;allowSettingLabel=!0}var Pe=f(222),I=f(6019);class xe{queryHandler=(0,T.A)(function*(){throw new Error("No query handler defined")})}var ue=f(7089),e=f(5547);function Fe(i,d){if(1&i&&(e.j41(0,"span",1),e.EFF(1),e.k0s()),2&i){const t=e.XpG();e.Y8G("cueTooltip",t._tooltip()),e.R7$(),e.SpI("\xd7",t._allValues().length)}}let je=(()=>{class i{_displayValue=(0,s.vPA)("");_allValues=(0,s.vPA)([]);_tooltip=(0,s.vPA)("");agInit(t){this._apply(t)}refresh(t){return this._apply(t),!0}_apply(t){const a=t.value,n=Array.isArray(a)?a:null!=a?[a]:[],o=t.colDef?.cellRendererParams?.strategy,l=t.colDef?.cellRendererParams?.valueKey??"val",r=t.colDef?.cellRendererParams?.labelKey??l,p=n.map(m=>m[r]).filter(Boolean);this._allValues.set(p);const c=t.colDef?.cellRendererParams?.postProcess;this._displayValue.set((0,E.g4)(o?w(n,o):p[0]??"",c)),this._tooltip.set(p.map(m=>(0,E.g4)(m,c)).join("\n"))}static \u0275fac=function(a){return new(a||i)};static \u0275cmp=e.VBU({type:i,selectors:[["cue-multi-binding-cell-renderer"]],decls:3,vars:2,consts:[[1,"cell-value"],["cueTooltipPosition","bottomleft",1,"badge",3,"cueTooltip"]],template:function(a,n){1&a&&(e.j41(0,"span",0),e.EFF(1),e.k0s(),e.nVh(2,Fe,2,2,"span",1)),2&a&&(e.R7$(),e.JRh(n._displayValue()),e.R7$(),e.vxM(n._allValues().length>1?2:-1))},dependencies:[ue.d],styles:["[_nghost-%COMP%]{display:flex;align-items:center;gap:4px;overflow:hidden;width:100%}.cell-value[_ngcontent-%COMP%]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1}.badge[_ngcontent-%COMP%]{flex-shrink:0;font-size:10px;font-weight:600;background:var(--cue-color-blue, #2563eb);color:#fff;border-radius:8px;padding:0 5px;line-height:16px;cursor:default}"],changeDetection:0})}return i})();const de=["template","formula","pipeline"],pe=["add","subtract","multiply","divide"],Ne={template:"components.sparqlTable.evalTypeTemplate",formula:"components.sparqlTable.evalTypeFormula",pipeline:"components.sparqlTable.evalTypePipeline"},ke={template:"components.sparqlTable.evalTypeTemplateDesc",formula:"components.sparqlTable.evalTypeFormulaDesc",pipeline:"components.sparqlTable.evalTypePipelineDesc"},Ie={add:"components.sparqlTable.formulaOpAdd",subtract:"components.sparqlTable.formulaOpSubtract",multiply:"components.sparqlTable.formulaOpMultiply",divide:"components.sparqlTable.formulaOpDivide"};let B=(()=>{class i{_requestedColumns=[];_columnQueries={};emptyTableText=(0,s.vPA)("Building table");_columns=(0,s.vPA)([]);_columnsGross=(0,s.vPA)(void 0);_dataColumns=(0,s.vPA)(void 0);columnDefsGross=(0,_.EW)(()=>void 0===this._columnsGross()?this._columns():this._columnsGross());keyVals={};_handlers=(0,s.vPA)(new xe);destroy(){this.keyVals={},this._requestedColumns=[],this._columnQueries={},this.fetchedColumns.update(()=>[])}resetData(){this.keyVals={},this._requestedColumns=[],this._columnQueries={},this.fetchedColumns.update(()=>[])}mergeColumnData(t,a,n){Object.entries(a).forEach(([o,l])=>{this.keyVals[o]||(this.keyVals[o]={}),void 0===this.keyVals[o][t]&&(this.keyVals[o][t]=l)}),this._requestedColumns.includes(t)||this._requestedColumns.push(t),this._columnQueries[t]=n,this.fetchedColumns.update(o=>[...o,t])}injectPreloadedData(t,a,n){this.keyVals=t,this._requestedColumns=[...a],this._columnQueries={...n},this.fetchedColumns.update(()=>[...a])}fetchedColumns=(0,s.vPA)([],{equal:(t,a)=>t.length===a.length});isLoading=(0,_.EW)(()=>this._columns().length>0&&this.fetchedColumns().length<this.totalQueryCount());totalQueryCount=(0,_.EW)(()=>{const t=new Set;for(const a of this._columns())"data"===a.defType&&!a.hide&&a.query&&t.add(a.field);return t.size});columnDefsAG=(0,_.EW)(()=>{const t=[];return this._columns().forEach(a=>{const n=a.getFormatter();if("calculated"===a.defType){const o=this._columns().filter(r=>"data"===r.defType).map(r=>r.field);if(Array.from(new Set(o)).every(r=>this.fetchedColumns().includes(r))){const r=a.formatter??n;t.push({colId:a.field,headerName:a.headerName,sortable:!0,filter:!0,...a.minWidth?{minWidth:a.minWidth}:{},valueGetter:p=>r(null,p.data)})}}else if("evaluation"===a.defType){const o=this._columns().filter(r=>"data"===r.defType).map(r=>r.field);if(Array.from(new Set(o)).every(r=>this.fetchedColumns().includes(r))&&a.evaluation){const r=a.evaluation,p=this._columns();t.push({colId:a.field,headerName:a.headerName,hide:a.hide,flex:1,sortable:!0,filter:!0,valueGetter:c=>{const m=c.data??{},h={};for(const y of p)if("data"===y.defType){const C=y.getFormatter();h[y.field]=(0,E.g4)(C(m[y.field]??[]),y.postProcess)}return function Ae(i,d,t="",a){switch(i.type){case"template":return i.template.replace(/\$\{([\w.-]+)\}/g,(n,o)=>d[o]??"").trim();case"formula":{const n=i.fields.map(o=>parseFloat(d[o])).filter(o=>!isNaN(o));if(0===n.length)return t;switch(i.op){case"add":return String(n.reduce((o,l)=>o+l,0));case"subtract":return String(n.reduce((o,l)=>o-l));case"multiply":return String(n.reduce((o,l)=>o*l,1));case"divide":return n.length<2||0===n[1]?t:String(n[0]/n[1])}return t}case"pipeline":{const{sources:n,transform:o,exclude:l,deduplicate:u,sort:r,limit:p,valueKey:c="val"}=i,m=i.separator??", ",h=i.fallback??t,y=new Set,C=[];for(const R of n){let D=(a?.[R]??[]).map(b=>b[c]??"").filter(b=>""!==b);o&&(D=D.map(b=>(0,E.w9)(o,b))),l?.length&&(D=D.filter(b=>!l.includes(b)));for(const b of D)u&&y.has(b)||(y.add(b),C.push(b))}r&&C.sort();const v=void 0!==p?C.slice(0,p):C;return 0===v.length?h:v.join(m)}}}(r,h,"",m)}})}}else{const o=!!a.strategy;t.push({field:a.field,headerName:a.headerName,hide:a.hide,flex:1,sortable:!0,filter:!0,...a.minWidth?{minWidth:a.minWidth}:{},...a.cellStyle?{cellStyle:a.cellStyle}:{},...a.headerClass?{headerClass:a.headerClass}:{},valueGetter:o?l=>l.data?.[a.field]??[]:l=>(0,E.g4)(n(l.data?.[a.field]??[]),a.postProcess),...o?{comparator:(l,u)=>{const r=Array.isArray(l)?l:[],p=Array.isArray(u)?u:[],c=(0,E.g4)(w(r,a.strategy,""),a.postProcess),m=(0,E.g4)(w(p,a.strategy,""),a.postProcess);return c.localeCompare(m)},cellRenderer:je,cellRendererParams:{strategy:a.strategy,valueKey:a.valueKey??"val",labelKey:a.labelKey,postProcess:a.postProcess}}:{}})}}),t});set columns(t){t.forEach(a=>{a.field&&void 0!==this._columnQueries[a.field]&&this._columnQueries[a.field]!==a.query&&(this._requestedColumns=this._requestedColumns.filter(n=>n!==a.field),Object.values(this.keyVals).forEach(n=>delete n[a.field]),this.fetchedColumns.update(n=>n.filter(o=>o!==a.field))),this._columnQueries[a.field]=a.query}),this._columns.set(t),this.buildTable()}set columnsGross(t){this._columnsGross.set(t)}set dataColumns(t){this._dataColumns.set(t)}set handlers(t){this._handlers.set(t)}get visibleColumns(){return this._columns}buildTable(){var t=this;return(0,T.A)(function*(){const a=t._columns(),n=t._dataColumns(),o=a.filter(r=>"data"===r.defType&&!r.hide),l=n?.filter(r=>"data"===r.defType&&!r.hide);if(!o.length&&!l?.length)return void((a.length>0||(n?.length??0)>0)&&t.emptyTableText.set("No data columns defined"));t.emptyTableText.set("Building table...");const u=[];o.forEach(r=>{u.push(t.fetchColumnData(r))}),l?.forEach(r=>{u.push(t.fetchColumnData(r))}),yield Promise.all(u),t.emptyTableText.set("Table data downloaded")})()}fetchColumnData(t){var a=this;return(0,T.A)(function*(){if(a._requestedColumns.includes(t.field))return;a._requestedColumns.push(t.field);const n=(0,I.t)(t.query),o=yield a._handlers().queryHandler(t.query,n),l=new Set;o.results.bindings.forEach(u=>{const r=u.subject?.value,p=Object.keys(u).filter(m=>"subject"!==m),c={};p.forEach(m=>{const h=u[m]?.value;Object.keys(a.keyVals).includes(r)||(a.keyVals[r]={}),void 0===a.keyVals[r][t.field]&&(a.keyVals[r][t.field]=[]),c[m]=h}),a.keyVals[r][t.field].push(c),l.add(r)}),a.fetchedColumns.update(u=>[...u,t.field])})()}static \u0275fac=function(a){return new(a||i)};static \u0275prov=s.jDH({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})(),J=(()=>{class i{_isUpdating=!1;_pendingUpdate=!1;_dataFetchService=(0,s.WQX)(B);tableData=(0,s.vPA)([]);destroy(){this.tableData.update(()=>[])}onProcessedColumn=(0,s.QZP)((()=>{var t=this;return(0,T.A)(function*(){t._dataFetchService.fetchedColumns(),yield t._debouncedUpdateTableData()})})());_debouncedUpdateTableData(){var t=this;return(0,T.A)(function*(){t._isUpdating?t._pendingUpdate=!0:(t._isUpdating=!0,yield t._updateTableData(),t._isUpdating=!1,t._pendingUpdate&&(t._pendingUpdate=!1,yield t._debouncedUpdateTableData()))})()}_updateTableData(){var t=this;return(0,T.A)(function*(){return new Promise(a=>{const n={},o=Object.keys(t._dataFetchService.keyVals),l=[],u=t._dataFetchService.visibleColumns().map(p=>p.field);let r=!1;for(let p=0;p<o.length;p++){const c=o[p],m={};if(m.id=c,Object.keys(t._dataFetchService.keyVals[c]).forEach(h=>{Object.keys(n).includes(h)||(n[h]=0),m[h]=t._dataFetchService.keyVals[c][h]??[],""!==m[h]&&n[h]++}),l.push(m),!r&&9===p){let h=!0;for(const y of u)if(typeof m[y]>"u"){h=!1;break}h&&(t.tableData.update(()=>[...l]),r=!0)}}t.tableData.update(()=>l),a()})})()}static \u0275fac=function(a){return new(a||i)};static \u0275prov=s.jDH({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var V=f(2245),O=f(5381),Le=f(2611);function qe(i,d){if(1&i&&e.nrm(0,"cue-typography",1),2&i){const t=e.XpG();e.Y8G("innerHTML",t.instructions(),e.npT)}}let Ge=(()=>{class i{tableService=(0,s.WQX)(J);dataFetchService=(0,s.WQX)(B);handlers=g.hFB.required();columns=(0,g.geq)([]);columnsGross=(0,g.hFB)();dataColumns=(0,g.hFB)();showInstructions=(0,g.hFB)(!1);showPaginator=(0,g.hFB)(!0);paginationPageSize=(0,g.hFB)(10);settings=(0,g.hFB)(new Se);emptyTableText=(0,g.geq)("Building table");loading=(0,g.hFB)(!1);clickableRows=(0,g.hFB)(!1);useAGGrid=(0,g.hFB)(!1);size=(0,g.hFB)("m");clickedRow=(0,g.CGW)();hoveredRow=(0,g.CGW)();tableDataUpdated=(0,g.CGW)();gridApi=(0,g.CGW)();visibleRows=(0,g.CGW)();columnDefsAG=(0,g.CGW)();onAGColumnDefs=(0,s.QZP)(()=>{const t=this.dataFetchService.columnDefsAG();this.columnDefsAG.emit(t)});onTableDataChange=(0,s.QZP)(()=>{this.tableDataUpdated.emit(this.tableService.tableData())});onHandlersChange=(0,s.QZP)(()=>{this.dataFetchService.handlers=this.handlers()});onColumnsChange=(0,s.QZP)(()=>{this.dataFetchService.columns=this.columns()});onColumnsGrossChange=(0,s.QZP)(()=>{this.dataFetchService.columnsGross=this.columnsGross()});onDataColumnsChange=(0,s.QZP)(()=>{this.dataFetchService.dataColumns=this.dataColumns()});onEmptyTableTextChange=(0,s.QZP)(()=>{this.emptyTableText.set(this.emptyTableText())});_onGridApiReady(t){this.gridApi.emit(t),t.addEventListener("columnVisible",a=>{a.visible&&(a.columns??(a.column?[a.column]:[])).forEach(o=>{const l=o.getColId(),u=this.columns().find(r=>r.field===l);u&&this.dataFetchService.fetchColumnData(u)})})}instructions=(0,s.vPA)("");buildInstructions=(0,s.QZP)((()=>{var t=this;return(0,T.A)(function*(){if(t.showInstructions()){const a=yield(0,Pe.xI)('The component takes an array of SPARQL table columns. It is an extension of the regular table that adds a query to the column definition and restricts the formatter to always start with an array of values that should be converted to a string value (per default by comma joining).\n\nThere are some requirements for the SPARQL query:\n\n- Must be a SELECT query \n- Must use variable `?subject` to bind to the row identifier\n- No grouping needed since the component automatically groups by key and returns the remaining bindings as an array\n\nExample query:\n\n```sparql\nSELECT ?subject ?val \nWHERE { \n ?subject qcy:entityCategory qcy-e:Space ;\n qcy:hasProperty [\n qcy:label "LongName" ;\n qcy:value ?val\n ]\n}\n```\n\nThis query will outputs for the formatter in the following form (in this case with two bindings to the key/val):\n\n```json\n[{"val": "Room 101"}, {"val": "Room 01"}]\n```\n\nThese can then be used in a simple formatter that simply returns the first value or a - in case there are no bindings:\n\n```typescript\n(row) => row[0]?.val ?? \'-\'\n```\n\nLet\'s imagine that we instead had a query that would return bindings on the variables *?val* and *?score* and return bindings like this:\n\n```json\n[{"val": "Room 101", "score": "1"}, {"val": "Room 01", "score": "0.9"}]\n```\n\nA formatter could then take the highest score value:\n\n```typescript\n(row) => {\n const maxScore = 0;\n let val = "";\n row.forEach(r => {\n if(parseFloat(r.score) > maxScore) {\n maxScore = parseFloat(r.score);\n val = r.val;\n }\n });\n return val;\n}\n```\n\nThe formatter can also be more advanced and for example first format the values as dates using a library like DayJS before taking the most recent.\n');t.instructions.set(a)}})})());ngOnDestroy(){this.tableService.destroy(),this.dataFetchService.destroy()}static \u0275fac=function(a){return new(a||i)};static \u0275cmp=e.VBU({type:i,selectors:[["cue-sparql-table-inner"]],inputs:{handlers:[1,"handlers"],columns:[1,"columns"],columnsGross:[1,"columnsGross"],dataColumns:[1,"dataColumns"],showInstructions:[1,"showInstructions"],showPaginator:[1,"showPaginator"],paginationPageSize:[1,"paginationPageSize"],settings:[1,"settings"],emptyTableText:[1,"emptyTableText"],loading:[1,"loading"],clickableRows:[1,"clickableRows"],useAGGrid:[1,"useAGGrid"],size:[1,"size"]},outputs:{columns:"columnsChange",emptyTableText:"emptyTableTextChange",clickedRow:"clickedRow",hoveredRow:"hoveredRow",tableDataUpdated:"tableDataUpdated",gridApi:"gridApi",visibleRows:"visibleRows",columnDefsAG:"columnDefsAG"},decls:3,vars:8,consts:[["direction","column","gap","xl"],[3,"innerHTML"],[3,"gridApiReady","visibleRows","size","rowData","columnDefs","showPaginator","paginationPageSize","noRowsText","loading"]],template:function(a,n){1&a&&(e.j41(0,"cue-flexcontainer",0),e.nVh(1,qe,1,1,"cue-typography",1),e.j41(2,"cue-ag-grid",2),e.bIt("gridApiReady",function(l){return n._onGridApiReady(l)})("visibleRows",function(l){return n.visibleRows.emit(l)}),e.k0s()()),2&a&&(e.R7$(),e.vxM(n.showInstructions()?1:-1),e.R7$(),e.Y8G("size",n.size())("rowData",n.tableService.tableData())("columnDefs",n.dataFetchService.columnDefsAG())("showPaginator",n.showPaginator())("paginationPageSize",n.paginationPageSize())("noRowsText",n.dataFetchService.emptyTableText())("loading",n.loading()||n.dataFetchService.isLoading()))},dependencies:[V.Typography,O.n,Le.R],encapsulation:2,changeDetection:0})}return i})();var Ve=f(9079),z=f(9352),_e=f(63),me=f(8957),Z=f(5971),fe=f(3319),ge=f(2530),ee=f(1096),he=f(5448),Oe=f(2014),Q=f(6593);const te=(i,d)=>d.field;function $e(i,d){if(1&i&&(e.j41(0,"cue-typography",6),e.EFF(1),e.k0s()),2&i){const t=e.XpG(2);e.R7$(),e.SpI(" ",t._queryError()," ")}}function Be(i,d){if(1&i){const t=e.RV6();e.j41(0,"cue-button",17),e.bIt("click",function(){s.eBV(t);const n=e.XpG(2);return s.Njj(n.discardQuery())}),e.nrm(1,"cue-button-padder"),e.j41(2,"cue-button-label"),e.EFF(3),e.nI1(4,"transloco"),e.k0s(),e.nrm(5,"cue-button-padder"),e.k0s()}2&i&&(e.R7$(3),e.JRh(e.bMT(4,1,"components.sparqlTable.labelDiscard")))}function ze(i,d){1&i&&(e.j41(0,"cue-typography",11),e.EFF(1),e.nI1(2,"transloco"),e.k0s()),2&i&&(e.R7$(),e.SpI(" ",e.bMT(2,1,"components.sparqlTable.labelQueryPending")," "))}function Xe(i,d){if(1&i&&(e.j41(0,"cue-typography",6),e.EFF(1),e.k0s()),2&i){const t=e.XpG(2);e.R7$(),e.SpI(" ",t._testError()," ")}}function Ke(i,d){if(1&i&&(e.j41(0,"cue-typography",19),e.EFF(1),e.k0s()),2&i){const t=d.$implicit;e.R7$(),e.JRh(t)}}function We(i,d){if(1&i&&(e.j41(0,"cue-typography",18),e.EFF(1),e.nI1(2,"transloco"),e.k0s(),e.Z7z(3,Ke,2,1,"cue-typography",19,e.Vm6)),2&i){const t=e.XpG(2);e.R7$(),e.JRh(e.bMT(2,1,"components.sparqlTable.labelTestResults")),e.R7$(2),e.Dyx(t._testRows())}}function Ye(i,d){if(1&i){const t=e.RV6();e.j41(0,"cue-input",20),e.nI1(1,"transloco"),e.bIt("valueChange",function(n){s.eBV(t);const o=e.XpG(2);return s.Njj(o._strategySeparator.set(n))}),e.k0s()}if(2&i){const t=e.XpG(2);e.Y8G("label",e.bMT(1,2,"components.sparqlTable.labelSeparator"))("value",t._strategySeparator())}}function Ue(i,d){if(1&i){const t=e.RV6();e.j41(0,"cue-input",20),e.nI1(1,"transloco"),e.bIt("valueChange",function(n){s.eBV(t);const o=e.XpG(2);return s.Njj(o._strategyValueKey.set(n))}),e.k0s()}if(2&i){const t=e.XpG(2);e.Y8G("label",e.bMT(1,2,"components.sparqlTable.labelValueKey"))("value",t._strategyValueKey())}}function He(i,d){if(1&i){const t=e.RV6();e.j41(0,"cue-input",16),e.nI1(1,"transloco"),e.nI1(2,"transloco"),e.bIt("valueChange",function(n){s.eBV(t);const o=e.XpG(2);return o._strategyPriorityKey.set(n),s.Njj(o._applyStrategyChange())}),e.k0s()}if(2&i){const t=e.XpG(2);e.Y8G("label",e.bMT(1,3,"components.sparqlTable.labelPriorityKey"))("info",e.bMT(2,5,"components.sparqlTable.tooltipPriorityKey"))("value",t._strategyPriorityKey())}}function Je(i,d){if(1&i&&(e.j41(0,"cue-typography",6),e.EFF(1),e.k0s()),2&i){const t=e.XpG(3);e.R7$(),e.SpI(" ",t._strategyMapError()," ")}}function Ze(i,d){if(1&i){const t=e.RV6();e.j41(0,"cue-typography",3),e.nI1(1,"transloco"),e.EFF(2),e.nI1(3,"transloco"),e.k0s(),e.j41(4,"div",21)(5,"cue-code-editor",22),e.bIt("contentChanged",function(n){s.eBV(t);const o=e.XpG(2);return s.Njj(o._onMapJsonChanged(n))}),e.k0s()(),e.nVh(6,Je,2,1,"cue-typography",6)}if(2&i){const t=e.XpG(2);e.Y8G("info",e.bMT(1,4,"components.sparqlTable.tooltipMapJson")),e.R7$(2),e.SpI(" ",e.bMT(3,6,"components.sparqlTable.labelMapJson")," "),e.R7$(3),e.Y8G("content",t._strategyMapJson()),e.R7$(),e.vxM(t._strategyMapError()?6:-1)}}function et(i,d){if(1&i&&(e.j41(0,"cue-typography",6),e.EFF(1),e.k0s()),2&i){const t=e.XpG(2);e.R7$(),e.SpI(" ",t._strategyPreProcessError()," ")}}function tt(i,d){if(1&i){const t=e.RV6();e.j41(0,"cue-typography",3),e.nI1(1,"transloco"),e.EFF(2),e.nI1(3,"transloco"),e.k0s(),e.j41(4,"div",4)(5,"cue-code-editor",5),e.bIt("contentChanged",function(n){s.eBV(t);const o=e.XpG();return s.Njj(o.onQueryChanged(n))}),e.k0s()(),e.nVh(6,$e,2,1,"cue-typography",6),e.j41(7,"cue-flexcontainer",7),e.nVh(8,Be,6,3,"cue-button",8),e.j41(9,"cue-button",9),e.bIt("click",function(){s.eBV(t);const n=e.XpG();return s.Njj(n.testQuery())}),e.nrm(10,"cue-button-padder")(11,"cue-button-icon",10),e.j41(12,"cue-button-label"),e.EFF(13),e.nI1(14,"transloco"),e.k0s(),e.nrm(15,"cue-button-padder"),e.k0s()(),e.nVh(16,ze,3,3,"cue-typography",11),e.nVh(17,Xe,2,1,"cue-typography",6),e.nVh(18,We,5,3),e.j41(19,"cue-select",2),e.nI1(20,"transloco"),e.bIt("valueChange",function(n){s.eBV(t);const o=e.XpG();return s.Njj(o.setDatatype(n))}),e.k0s(),e.j41(21,"cue-select",12),e.nI1(22,"transloco"),e.nI1(23,"transloco"),e.bIt("valueChange",function(n){s.eBV(t);const o=e.XpG();return s.Njj(o.setStrategyType(n))}),e.k0s(),e.j41(24,"cue-typography",13),e.EFF(25),e.k0s(),e.nVh(26,Ye,2,4,"cue-input",14),e.nVh(27,Ue,2,4,"cue-input",14),e.nVh(28,He,3,7,"cue-input",15),e.nVh(29,Ze,7,8),e.j41(30,"cue-input",16),e.nI1(31,"transloco"),e.nI1(32,"transloco"),e.bIt("valueChange",function(n){s.eBV(t);const o=e.XpG();return o._strategyPreProcess.set(n),s.Njj(o._applyStrategyChange())}),e.k0s(),e.nVh(33,et,2,1,"cue-typography",6),e.j41(34,"cue-input",16),e.nI1(35,"transloco"),e.nI1(36,"transloco"),e.bIt("valueChange",function(n){s.eBV(t);const o=e.XpG();return o._strategyFallback.set(n),s.Njj(o._applyStrategyChange())}),e.k0s()}if(2&i){const t=e.XpG();e.Y8G("info",e.bMT(1,31,"components.sparqlTable.tooltipQuery")),e.R7$(2),e.JRh(e.bMT(3,33,"components.sparqlTable.labelQuery")),e.R7$(3),e.Y8G("content",t.query()),e.R7$(),e.vxM(t._queryError()?6:-1),e.R7$(2),e.vxM(t._queryDirty()?8:-1),e.R7$(),e.Y8G("disabled",!!t._queryError()),e.R7$(4),e.JRh(e.bMT(14,35,"components.sparqlTable.labelTest")),e.R7$(3),e.vxM(t._queryDirty()&&!t._queryError()?16:-1),e.R7$(),e.vxM(t._testError()?17:-1),e.R7$(),e.vxM(t._testRows().length>0?18:-1),e.R7$(),e.Y8G("label",e.bMT(20,37,"components.sparqlTable.labelDatatype"))("value",t._datatype()??"")("options",t.datatypeOptions)("labelMap",t.datatypeLabelMap()),e.R7$(2),e.Y8G("label",e.bMT(22,39,"components.sparqlTable.labelStrategy"))("info",e.bMT(23,41,"components.sparqlTable.tooltipStrategy"))("value",t._strategyType())("options",t.availableStrategyTypes())("labelMap",t.strategyLabelMap()),e.R7$(4),e.JRh(t._strategyDescription()),e.R7$(),e.vxM(t._strategyNeedsSeparator()?26:-1),e.R7$(),e.vxM(t._strategyNeedsValueKey()?27:-1),e.R7$(),e.vxM(t._strategyNeedsPriorityKey()?28:-1),e.R7$(),e.vxM(t._strategyNeedsMap()?29:-1),e.R7$(),e.Y8G("label",e.bMT(31,43,"components.sparqlTable.labelPreProcess"))("info",e.bMT(32,45,"components.sparqlTable.tooltipPreProcess"))("value",t._strategyPreProcess()),e.R7$(3),e.vxM(t._strategyPreProcessError()?33:-1),e.R7$(),e.Y8G("label",e.bMT(35,47,"components.sparqlTable.labelFallback"))("info",e.bMT(36,49,"components.sparqlTable.tooltipFallback"))("value",t._strategyFallback())}}function nt(i,d){if(1&i){const t=e.RV6();e.j41(0,"span",26),e.bIt("click",function(){const n=s.eBV(t).$implicit,o=e.XpG(4);return s.Njj(o._insertFieldIntoTemplate(n.field))}),e.EFF(1),e.k0s()}if(2&i){const t=d.$implicit;e.Y8G("title",t.headerName),e.R7$(),e.JRh(t.token)}}function at(i,d){if(1&i&&(e.j41(0,"cue-typography",13),e.EFF(1),e.nI1(2,"transloco"),e.k0s(),e.j41(3,"cue-flexcontainer",24),e.Z7z(4,nt,2,2,"span",25,te),e.k0s()),2&i){const t=e.XpG(3);e.R7$(),e.SpI(" ",e.bMT(2,1,"components.sparqlTable.labelAvailableFields")," "),e.R7$(3),e.Dyx(t._dataColumnFields())}}function ot(i,d){if(1&i){const t=e.RV6();e.j41(0,"cue-input",16),e.nI1(1,"transloco"),e.nI1(2,"transloco"),e.bIt("valueChange",function(n){s.eBV(t);const o=e.XpG(2);return o._evalTemplate.set(n),s.Njj(o._applyEvaluation())}),e.k0s(),e.nVh(3,at,6,3)}if(2&i){const t=e.XpG(2);e.Y8G("label",e.bMT(1,4,"components.sparqlTable.labelEvalTemplate"))("info",e.bMT(2,6,"components.sparqlTable.tooltipEvalTemplate"))("value",t._evalTemplate()),e.R7$(3),e.vxM(t._dataColumnFields().length?3:-1)}}function it(i,d){if(1&i){const t=e.RV6();e.j41(0,"span",26),e.bIt("click",function(){const n=s.eBV(t).$implicit,o=e.XpG(3);return s.Njj(o._toggleFormulaField(n.field))}),e.EFF(1),e.k0s()}if(2&i){const t=d.$implicit,a=e.XpG(3);e.AVh("field-chip--active",a._formulaFields().includes(t.field)),e.Y8G("title",t.field),e.R7$(),e.JRh(t.headerName)}}function lt(i,d){if(1&i&&(e.j41(0,"span",30),e.EFF(1),e.k0s()),2&i){const t=e.XpG(5);e.R7$(),e.JRh(t._formulaOpSymbol())}}function st(i,d){if(1&i&&(e.j41(0,"span",29),e.EFF(1),e.k0s(),e.nVh(2,lt,2,1,"span",30)),2&i){const t=d.$implicit,a=d.$index,n=d.$count,o=e.XpG(4);e.R7$(),e.JRh(o._fieldLabel(t)),e.R7$(),e.vxM(a!==n-1?2:-1)}}function rt(i,d){if(1&i&&(e.j41(0,"cue-flexcontainer",28),e.Z7z(1,st,3,2,null,null,e.fX1),e.k0s()),2&i){const t=e.XpG(3);e.R7$(),e.Dyx(t._formulaFields())}}function ct(i,d){if(1&i){const t=e.RV6();e.j41(0,"cue-select",2),e.nI1(1,"transloco"),e.bIt("valueChange",function(n){s.eBV(t);const o=e.XpG(2);return s.Njj(o.setFormulaOp(n))}),e.k0s(),e.j41(2,"cue-typography",13),e.EFF(3),e.nI1(4,"transloco"),e.k0s(),e.j41(5,"cue-flexcontainer",24),e.Z7z(6,it,2,4,"span",27,te),e.k0s(),e.nVh(8,rt,3,0,"cue-flexcontainer",28)}if(2&i){const t=e.XpG(2);e.Y8G("label",e.bMT(1,6,"components.sparqlTable.labelFormulaOp"))("value",t._formulaOp())("options",t.formulaOpOptions)("labelMap",t.formulaOpLabelMap()),e.R7$(3),e.SpI(" ",e.bMT(4,8,"components.sparqlTable.labelFormulaFields")," "),e.R7$(3),e.Dyx(t._dataColumnFields()),e.R7$(2),e.vxM(t._formulaFields().length?8:-1)}}function ut(i,d){if(1&i&&(e.j41(0,"cue-typography",23),e.EFF(1),e.nI1(2,"transloco"),e.k0s()),2&i){const t=e.XpG(2);e.R7$(),e.Lme(" ",e.bMT(2,2,"components.sparqlTable.labelEvalPreview"),": ",t._evalPreview()," ")}}function dt(i,d){if(1&i){const t=e.RV6();e.j41(0,"span",26),e.bIt("click",function(){const n=s.eBV(t).$implicit,o=e.XpG(3);return s.Njj(o._togglePipelineSource(n.field))}),e.EFF(1),e.k0s()}if(2&i){const t=d.$implicit,a=e.XpG(3);e.AVh("field-chip--active",a._pipelineSources().includes(t.field)),e.Y8G("title",t.field),e.R7$(),e.JRh(t.headerName)}}function pt(i,d){if(1&i&&(e.j41(0,"cue-typography",11),e.EFF(1),e.nI1(2,"transloco"),e.k0s()),2&i){const t=e.XpG(3);e.R7$(),e.Lme(" ",e.bMT(2,2,"components.sparqlTable.labelPipelineSourceOrder"),": ",t._pipelineSources().join(" \u2192 ")," ")}}function _t(i,d){if(1&i&&(e.j41(0,"cue-typography",6),e.EFF(1),e.k0s()),2&i){const t=e.XpG(3);e.R7$(),e.JRh(t._pipelineTransformError())}}function mt(i,d){if(1&i&&(e.j41(0,"cue-typography",6),e.EFF(1),e.k0s()),2&i){const t=e.XpG(3);e.R7$(),e.JRh(t._pipelineExcludeError())}}function ft(i,d){if(1&i){const t=e.RV6();e.j41(0,"cue-typography",3),e.nI1(1,"transloco"),e.EFF(2),e.nI1(3,"transloco"),e.k0s(),e.j41(4,"cue-flexcontainer",24),e.Z7z(5,dt,2,4,"span",27,te),e.k0s(),e.nVh(7,pt,3,4,"cue-typography",11),e.j41(8,"cue-input",16),e.nI1(9,"transloco"),e.nI1(10,"transloco"),e.bIt("valueChange",function(n){s.eBV(t);const o=e.XpG(2);return o._pipelineTransform.set(n),s.Njj(o._applyEvaluation())}),e.k0s(),e.nVh(11,_t,2,1,"cue-typography",6),e.j41(12,"cue-input",16),e.nI1(13,"transloco"),e.nI1(14,"transloco"),e.bIt("valueChange",function(n){s.eBV(t);const o=e.XpG(2);return o._pipelineLimit.set(n),s.Njj(o._applyEvaluation())}),e.k0s(),e.j41(15,"cue-input",20),e.nI1(16,"transloco"),e.bIt("valueChange",function(n){s.eBV(t);const o=e.XpG(2);return o._pipelineSeparator.set(n),s.Njj(o._applyEvaluation())}),e.k0s(),e.j41(17,"cue-input",16),e.nI1(18,"transloco"),e.nI1(19,"transloco"),e.bIt("valueChange",function(n){s.eBV(t);const o=e.XpG(2);return o._pipelineFallback.set(n),s.Njj(o._applyEvaluation())}),e.k0s(),e.j41(20,"cue-flexcontainer",31)(21,"label",32)(22,"input",33),e.bIt("change",function(){s.eBV(t);const n=e.XpG(2);return n._pipelineDeduplicate.set(!n._pipelineDeduplicate()),s.Njj(n._applyEvaluation())}),e.k0s(),e.EFF(23),e.nI1(24,"transloco"),e.k0s(),e.j41(25,"label",32)(26,"input",33),e.bIt("change",function(){s.eBV(t);const n=e.XpG(2);return n._pipelineSort.set(!n._pipelineSort()),s.Njj(n._applyEvaluation())}),e.k0s(),e.EFF(27),e.nI1(28,"transloco"),e.k0s()(),e.j41(29,"cue-typography",3),e.nI1(30,"transloco"),e.EFF(31),e.nI1(32,"transloco"),e.k0s(),e.j41(33,"div",34)(34,"cue-code-editor",22),e.bIt("contentChanged",function(n){s.eBV(t);const o=e.XpG(2);return s.Njj(o._onPipelineExcludeChanged(n))}),e.k0s()(),e.nVh(35,mt,2,1,"cue-typography",6)}if(2&i){const t=e.XpG(2);e.Y8G("info",e.bMT(1,23,"components.sparqlTable.tooltipPipelineSources")),e.R7$(2),e.SpI(" ",e.bMT(3,25,"components.sparqlTable.labelPipelineSources")," "),e.R7$(3),e.Dyx(t._dataColumnFields()),e.R7$(2),e.vxM(t._pipelineSources().length>1?7:-1),e.R7$(),e.Y8G("label",e.bMT(9,27,"components.sparqlTable.labelPipelineTransform"))("info",e.bMT(10,29,"components.sparqlTable.tooltipPipelineTransform"))("value",t._pipelineTransform()),e.R7$(3),e.vxM(t._pipelineTransformError()?11:-1),e.R7$(),e.Y8G("label",e.bMT(13,31,"components.sparqlTable.labelPipelineLimit"))("info",e.bMT(14,33,"components.sparqlTable.tooltipPipelineLimit"))("value",t._pipelineLimit()),e.R7$(3),e.Y8G("label",e.bMT(16,35,"components.sparqlTable.labelSeparator"))("value",t._pipelineSeparator()),e.R7$(2),e.Y8G("label",e.bMT(18,37,"components.sparqlTable.labelFallback"))("info",e.bMT(19,39,"components.sparqlTable.tooltipFallback"))("value",t._pipelineFallback()),e.R7$(5),e.Y8G("checked",t._pipelineDeduplicate()),e.R7$(),e.SpI(" ",e.bMT(24,41,"components.sparqlTable.labelPipelineDeduplicate")," "),e.R7$(3),e.Y8G("checked",t._pipelineSort()),e.R7$(),e.SpI(" ",e.bMT(28,43,"components.sparqlTable.labelPipelineSort")," "),e.R7$(2),e.Y8G("info",e.bMT(30,45,"components.sparqlTable.tooltipPipelineExclude")),e.R7$(2),e.SpI(" ",e.bMT(32,47,"components.sparqlTable.labelPipelineExclude")," "),e.R7$(3),e.Y8G("content",t._pipelineExcludeJson()),e.R7$(),e.vxM(t._pipelineExcludeError()?35:-1)}}function gt(i,d){if(1&i){const t=e.RV6();e.j41(0,"cue-select",2),e.nI1(1,"transloco"),e.bIt("valueChange",function(n){s.eBV(t);const o=e.XpG();return s.Njj(o.setEvalType(n))}),e.k0s(),e.j41(2,"cue-typography",13),e.EFF(3),e.k0s(),e.nVh(4,ot,4,8),e.nVh(5,ct,9,10),e.nVh(6,ut,3,4,"cue-typography",23),e.nVh(7,ft,36,49)}if(2&i){const t=e.XpG();e.Y8G("label",e.bMT(1,9,"components.sparqlTable.labelEvalType"))("value",t._evalType())("options",t.evaluationTypeOptions)("labelMap",t.evaluationTypeLabelMap()),e.R7$(3),e.JRh(t._evalTypeDescription()),e.R7$(),e.vxM("template"===t._evalType()?4:-1),e.R7$(),e.vxM("formula"===t._evalType()?5:-1),e.R7$(),e.vxM(t._evalPreview()?6:-1),e.R7$(),e.vxM("pipeline"===t._evalType()?7:-1)}}const ht=["join"],ye=["sum","avg","min","max","mostRecent","oldest","longest","shortest"],ve=["first","last","sum","avg","min","max","mostRecent","oldest","longest","shortest"],yt=["map"],be=["text","number","date"],vt=Object.assign(new ee.e,{});let bt=(()=>{class i{columnDef=g.geq.required();handlers=(0,g.hFB)();columns=(0,g.hFB)([]);close=(0,g.CGW)();updateColumnDef=(0,g.CGW)();agGridSettings=vt;_transloco=(0,s.WQX)(z.JO);_lang=(0,Ve.ot)(this._transloco.langChanges$,{initialValue:this._transloco.getActiveLang()});columnTypeOptions=["data","evaluation"];columnTypeLabelMap=(0,_.EW)(()=>(this._lang(),{data:this._transloco.translate("components.sparqlTable.columnTypeData"),evaluation:this._transloco.translate("components.sparqlTable.columnTypeEvaluation")}));_defType=(0,_.uu)(()=>"evaluation"===this.columnDef().defType?"evaluation":"data");setDefType(t){const a=t;if(this._defType.set(a),"evaluation"===a){const o=this.columnDef().evaluation??{type:"template",template:""};this.updateColumnDef.emit({defType:"evaluation",evaluation:o})}else this.updateColumnDef.emit({defType:"data"})}_evalType=(0,_.uu)(()=>this.columnDef().evaluation?.type??"template");_evalTemplate=(0,_.uu)(()=>{const t=this.columnDef().evaluation;return"template"===t?.type?t.template:""});_formulaOp=(0,_.uu)(()=>{const t=this.columnDef().evaluation;return"formula"===t?.type?t.op:"add"});_formulaFields=(0,_.uu)(()=>{const t=this.columnDef().evaluation;return"formula"===t?.type?[...t.fields]:[]});_pipelineSources=(0,_.uu)(()=>{const t=this.columnDef().evaluation;return"pipeline"===t?.type?[...t.sources]:[]});_pipelineTransform=(0,_.uu)(()=>{const t=this.columnDef().evaluation;return"pipeline"===t?.type?t.transform??"":""});_pipelineLimit=(0,_.uu)(()=>{const t=this.columnDef().evaluation;return"pipeline"===t?.type?String(t.limit??""):""});_pipelineSeparator=(0,_.uu)(()=>{const t=this.columnDef().evaluation;return"pipeline"===t?.type?t.separator??", ":", "});_pipelineFallback=(0,_.uu)(()=>{const t=this.columnDef().evaluation;return"pipeline"===t?.type?t.fallback??"":""});_pipelineDeduplicate=(0,_.uu)(()=>{const t=this.columnDef().evaluation;return"pipeline"===t?.type&&(t.deduplicate??!1)});_pipelineSort=(0,_.uu)(()=>{const t=this.columnDef().evaluation;return"pipeline"===t?.type&&(t.sort??!1)});_pipelineExcludeJson=(0,_.uu)(()=>{const t=this.columnDef().evaluation,a="pipeline"===t?.type?t.exclude??[]:[];try{return JSON.stringify(a,null,2)}catch{return"[]"}});_pipelineExcludeError=(0,s.vPA)("");_pipelineExcludeParsed=(0,s.vPA)([]);_pipelineTransformError=(0,_.EW)(()=>{const t=this._pipelineTransform();if(t)return(0,E.NF)(t)??void 0});evaluationTypeOptions=de;evaluationTypeLabelMap=(0,_.EW)(()=>(this._lang(),Object.fromEntries(de.map(t=>[t,this._transloco.translate(Ne[t])]))));_evalTypeDescription=(0,_.EW)(()=>(this._lang(),this._transloco.translate(ke[this._evalType()])));formulaOpOptions=pe;formulaOpLabelMap=(0,_.EW)(()=>(this._lang(),Object.fromEntries(pe.map(t=>[t,this._transloco.translate(Ie[t])]))));_dataColumnFields=(0,_.EW)(()=>this.columns().filter(t=>"data"===t.defType&&t.field!==this.columnDef().field).map(t=>({field:t.field,headerName:t.headerName??t.field,token:"${"+t.field+"}"})));_evalPreview=(0,_.EW)(()=>{if("template"===this._evalType()){const t=this._evalTemplate();return t?t.replace(/\$\{([\w.-]+)\}/g,(a,n)=>`[${n}]`):""}if("formula"===this._evalType()){const t=this._formulaFields(),a=this._formulaOp();return 0===t.length?"":t.join(` ${{add:"+",subtract:"\u2212",multiply:"\xd7",divide:"\xf7"}[a]} `)}if("pipeline"===this._evalType()){const t=this._pipelineSources(),a=this._pipelineTransform(),n=this._pipelineLimit();if(0===t.length)return"";const o=[`sources: [${t.join(", ")}]`];return a&&o.push(`transform: ${a}`),this._pipelineDeduplicate()&&o.push("deduplicate"),this._pipelineSort()&&o.push("sort"),n&&o.push(`limit: ${n}`),o.join(" | ")}return""});setEvalType(t){if(t){if(this._evalType.set(t),"pipeline"===t&&0===this._pipelineSources().length){const a=this._dataColumnFields()[0];a&&this._pipelineSources.set([a.field])}this._applyEvaluation()}}setFormulaOp(t){t&&(this._formulaOp.set(t),this._applyEvaluation())}_toggleFormulaField(t){const a=this._formulaFields(),n=a.includes(t)?a.filter(o=>o!==t):[...a,t];this._formulaFields.set(n),this._applyEvaluation()}_fieldLabel(t){return this._dataColumnFields().find(a=>a.field===t)?.headerName??t}_formulaOpSymbol=(0,_.EW)(()=>({add:"+",subtract:"\u2212",multiply:"\xd7",divide:"\xf7"}[this._formulaOp()]));_insertFieldIntoTemplate(t){const a=this._evalTemplate();this._evalTemplate.set(a+`\${${t}}`),this._applyEvaluation()}_togglePipelineSource(t){const a=this._pipelineSources(),n=a.includes(t)?a.filter(o=>o!==t):[...a,t];this._pipelineSources.set(n),this._applyEvaluation()}_applyEvaluation(){let t;if("template"===this._evalType())t={type:"template",template:this._evalTemplate()};else if("pipeline"===this._evalType()){const a={type:"pipeline",sources:this._pipelineSources(),deduplicate:this._pipelineDeduplicate()||void 0,sort:this._pipelineSort()||void 0,separator:this._pipelineSeparator()||void 0,fallback:this._pipelineFallback()||void 0,transform:this._pipelineTransform()||void 0,exclude:this._pipelineExcludeParsed().length?this._pipelineExcludeParsed():void 0},n=parseInt(this._pipelineLimit(),10);!isNaN(n)&&n>0&&(a.limit=n),t=a}else t={type:"formula",fields:this._formulaFields(),op:this._formulaOp()};this.updateColumnDef.emit({evaluation:t})}_onPipelineExcludeChanged(t){this._pipelineExcludeJson.set(t);try{const a=JSON.parse(t);if(!Array.isArray(a))throw new Error("Must be a JSON array of strings");this._pipelineExcludeError.set(""),this._pipelineExcludeParsed.set(a),this._applyEvaluation()}catch(a){this._pipelineExcludeError.set(a?.message??"Invalid JSON")}}datatypeOptions=be;datatypeLabelMap=(0,_.EW)(()=>(this._lang(),Object.fromEntries(be.map(t=>[t,this._transloco.translate(`components.sparqlTable.datatype${t.charAt(0).toUpperCase()+t.slice(1)}`)]))));availableStrategyTypes=(0,_.EW)(()=>{const t=this._datatype();return t?A[t]:Y});strategyLabelMap=(0,_.EW)(()=>(this._lang(),Object.fromEntries(Y.map(t=>[t,this._transloco.translate(G[t])]))));_strategyDescription=(0,_.EW)(()=>(this._lang(),this._transloco.translate(se[this._strategyType()])));query=(0,_.EW)(()=>this.columnDef().query??"");_editedQuery=(0,_.uu)(()=>this.query());_queryError=(0,_.EW)(()=>{this._lang();const t=function Qe(i,d="val"){if(!i?.trim())return null;let t;try{t=new Q.Parser({sparqlStar:!0}).parse(i)}catch{return"validationErrorSyntax"}if("query"!==t?.type||"SELECT"!==t?.queryType)return"validationErrorNotSelect";const n=t.variables;if(1===n.length&&"*"===n[0])return null;const o=n.map(l=>l?.value??l?.variable?.value??"");return o.includes("subject")?o.includes(d)?null:"validationErrorMissingVal":"validationErrorMissingKey"}(this._editedQuery(),this._strategyValueKey()||"val");if(!t)return;const a=`components.sparqlTable.${t}`;return"validationErrorMissingVal"===t?this._transloco.translate(a,{var:this._strategyValueKey()||"val"}):this._transloco.translate(a)});_datatype=(0,_.uu)(()=>this.columnDef().datatype);_strategyType=(0,_.uu)(()=>this.columnDef().strategy?.type??"join");_strategySeparator=(0,_.uu)(()=>this.columnDef().strategy?.separator??", ");_strategyValueKey=(0,_.uu)(()=>this.columnDef().strategy?.valueKey??"val");_strategyPriorityKey=(0,_.uu)(()=>this.columnDef().strategy?.priorityKey??"");_strategyPreProcess=(0,_.uu)(()=>this.columnDef().strategy?.preProcess??"");_strategyFallback=(0,_.uu)(()=>this.columnDef().strategy?.fallback??"");_strategyMapJson=(0,_.uu)(()=>{const t=this.columnDef().strategy;if("map"!==t?.type)return"{}";try{return JSON.stringify(t.map,null,2)}catch{return"{}"}});_strategyMapError=(0,s.vPA)("");_strategyNeedsSeparator=(0,_.EW)(()=>ht.includes(this._strategyType()));_strategyNeedsValueKey=(0,_.EW)(()=>ye.includes(this._strategyType()));_strategyNeedsPriorityKey=(0,_.EW)(()=>ve.includes(this._strategyType())&&this._queryExtraBindings().length>0);_strategyNeedsMap=(0,_.EW)(()=>yt.includes(this._strategyType()));_strategyPreProcessError=(0,_.EW)(()=>{const t=this._strategyPreProcess();return t?(0,E.NF)(t)??void 0:void 0});_queryExtraBindings=(0,_.EW)(()=>{const t=this._editedQuery(),a=this._strategyValueKey()||"val";if(!t?.trim())return[];try{const n=new Q.Parser({sparqlStar:!0}).parse(t);if("SELECT"!==n?.queryType)return[];const o=n.variables;return 1===o.length&&"*"===o[0]?[]:o.map(u=>u?.value??u?.variable?.value??"").filter(Boolean).filter(u=>"subject"!==u&&u!==a)}catch{return[]}});setDatatype(t){const a=t||void 0;if(this._datatype.set(a),a&&!A[a].includes(this._strategyType()))return this._strategyType.set("first"),void this.updateColumnDef.emit({strategy:{type:"first"},datatype:a});this.updateColumnDef.emit({datatype:a})}setStrategyType(t){if(!t)return;this._strategyType.set(t);const a=this._buildStrategy(t);this.updateColumnDef.emit({strategy:a})}_applyStrategyChange(){const t=this._buildStrategy(this._strategyType());this.updateColumnDef.emit({strategy:t})}_buildStrategy(t){const a=this._strategyValueKey()||"val",n=this._strategyPriorityKey()||void 0,u={preProcess:this._strategyPreProcess()||void 0,fallback:this._strategyFallback()||void 0};if("join"===t)return{type:t,separator:this._strategySeparator(),...u};if("map"===t){let r={};try{r=JSON.parse(this._strategyMapJson())}catch{}return{type:t,map:r,...u}}return ye.includes(t)?{type:t,valueKey:a,priorityKey:n,...u}:ve.includes(t)?{type:t,priorityKey:n,...u}:{type:t,...u}}_onMapJsonChanged(t){this._strategyMapJson.set(t);try{const a=JSON.parse(t);if("object"!=typeof a||Array.isArray(a))throw new Error("Must be a JSON object");this._strategyMapError.set(""),this._applyStrategyChange()}catch(a){this._strategyMapError.set(a?.message??"Invalid JSON")}}_queryDirty=(0,_.EW)(()=>this._editedQuery()!==this.query());onQueryChanged(t){this._editedQuery.set(t)}discardQuery(){this._editedQuery.set(this.query()),this._testRows.set([]),this._testError.set("")}_testRows=(0,s.vPA)([]);_testError=(0,s.vPA)("");_testLoading=(0,s.vPA)(!1);testQuery(){var t=this;return(0,T.A)(function*(){const a=t.handlers()?.queryHandler;if(!a)return void t._testError.set("No query handler available.");t._testRows.set([]),t._testError.set(""),t._testLoading.set(!0);const o=t._editedQuery().trim().replace(/\s*LIMIT\s+\d+\s*$/i,"")+"\nLIMIT 5";try{const u=((yield a(o,{}))?.results?.bindings??[]).map(r=>JSON.stringify(Object.fromEntries(Object.entries(r).map(([p,c])=>[p,c.value])),null,2));t._testRows.set(u),t.updateColumnDef.emit({query:t._editedQuery()})}catch(l){t._testError.set(l?.message??String(l))}finally{t._testLoading.set(!1)}})()}_onColDefUpdate(t){this.updateColumnDef.emit(t)}static \u0275fac=function(a){return new(a||i)};static \u0275cmp=e.VBU({type:i,selectors:[["cue-declarative-sparql-column-settings-modal"]],inputs:{columnDef:[1,"columnDef"],handlers:[1,"handlers"],columns:[1,"columns"]},outputs:{columnDef:"columnDefChange",close:"close",updateColumnDef:"updateColumnDef"},decls:7,vars:13,consts:[["minWidth","800px",3,"updateColumn","close","columnDef","settings","extraPanelLabel"],["cueExtraContent","","direction","column"],[3,"valueChange","label","value","options","labelMap"],["size","s",3,"info"],[2,"height","200px","min-height","120px"],["type","sparql",3,"contentChanged","content"],["size","s",2,"color","var(--cue-error)"],["direction","row","justify","end","gap","s"],["variant","ghost","size","s"],["variant","secondary","size","s",3,"click","disabled"],["icon","go"],["size","xs",2,"opacity","0.6","font-style","italic"],[3,"valueChange","label","info","value","options","labelMap"],["size","xs",2,"opacity","0.7"],[3,"label","value"],[3,"label","info","value"],[3,"valueChange","label","info","value"],["variant","ghost","size","s",3,"click"],["size","s"],["size","xs",2,"font-family","monospace","white-space","pre-wrap"],[3,"valueChange","label","value"],[2,"height","200px","min-height","120px","text-align","left"],["type","json",3,"contentChanged","content"],["size","xs",2,"opacity","0.7","font-style","italic"],["direction","row","wrap","wrap","gap","xs"],[1,"field-chip",3,"title"],[1,"field-chip",3,"click","title"],[1,"field-chip",3,"field-chip--active","title"],["direction","row","wrap","wrap","gap","xs",2,"align-items","center"],[1,"formula-token"],[1,"formula-op"],["direction","row","gap","m"],[2,"display","flex","align-items","center","gap","4px","font-size","0.85rem","cursor","pointer"],["type","checkbox",3,"change","checked"],[2,"height","160px","min-height","80px","text-align","left"]],template:function(a,n){1&a&&(e.j41(0,"cue-table-column-settings-modal",0),e.nI1(1,"transloco"),e.bIt("updateColumn",function(l){return n._onColDefUpdate(l)})("close",function(){return n.close.emit()}),e.j41(2,"cue-flexcontainer",1)(3,"cue-select",2),e.nI1(4,"transloco"),e.bIt("valueChange",function(l){return n.setDefType(l)}),e.k0s(),e.nVh(5,tt,37,51),e.nVh(6,gt,8,11),e.k0s()()),2&a&&(e.Y8G("columnDef",n.columnDef())("settings",n.agGridSettings)("extraPanelLabel",e.bMT(1,9,"components.sparqlTable.panelLabel")),e.R7$(3),e.Y8G("label",e.bMT(4,11,"components.sparqlTable.labelColumnType"))("value",n._defType())("options",n.columnTypeOptions)("labelMap",n.columnTypeLabelMap()),e.R7$(2),e.vxM("data"===n._defType()?5:-1),e.R7$(),e.vxM("evaluation"===n._defType()?6:-1))},dependencies:[ee.T,O.n,V.Typography,_e.Select,me.Input,Z.$,fe.a,ge.B,he.L,Oe.z,z.Kj],styles:[".field-chip[_ngcontent-%COMP%]{display:inline-block;padding:2px 8px;border-radius:4px;background:var(--cue-surface-2, #eee);font-family:monospace;font-size:.75rem;cursor:pointer;-webkit-user-select:none;user-select:none;transition:background .12s,outline .12s;outline:2px solid transparent}.field-chip[_ngcontent-%COMP%]:hover{background:var(--cue-primary-light, #c8e6c9)}.field-chip--active[_ngcontent-%COMP%]{background:var(--cue-primary, #4caf50);color:#fff;outline-color:var(--cue-primary, #4caf50)}.formula-token[_ngcontent-%COMP%]{display:inline-block;padding:2px 8px;border-radius:4px;background:var(--cue-primary, #4caf50);color:#fff;font-family:monospace;font-size:.75rem}.formula-op[_ngcontent-%COMP%]{font-size:1rem;font-weight:700;opacity:.6;padding:0 2px}"],changeDetection:0})}return i})();var Dt=f(5187),Tt=f(7717),ne=f(5661),Ct=f(6117),St=f(356),Mt=f(6279),Rt=f(29),Pt=f(5821),Et=f(5745);const xt=(i,d)=>d.key;function wt(i,d){if(1&i){const t=e.RV6();e.j41(0,"cue-input",12),e.bIt("valueChange",function(n){s.eBV(t);const o=e.XpG().$implicit,l=e.XpG(2);return s.Njj(l._setVar(o.key,n))}),e.k0s()}if(2&i){const t=e.XpG().$implicit,a=e.XpG(2);e.Y8G("label",t.label)("value",a._varValues()[t.key]??a._filePathPlaceholder())}}function Ft(i,d){if(1&i){const t=e.RV6();e.j41(0,"cue-select",13),e.bIt("valueChange",function(n){s.eBV(t);const o=e.XpG().$implicit,l=e.XpG(2);return s.Njj(l._setVar(o.key,n))}),e.k0s()}if(2&i){const t=e.XpG().$implicit,a=e.XpG(2);e.Y8G("label",t.label)("options",a._categoryOptions())("labelMap",a._categoryLabelMap())("value",a._varValues()[t.key]??void 0)("disabled",a._categoriesLoading())("placeholder",a._categoriesLoading()?"Loading\u2026":"Select a category\u2026")}}function jt(i,d){if(1&i&&e.nVh(0,wt,1,2,"cue-input",10)(1,Ft,1,6,"cue-select",11),2&i){const t=d.$implicit;e.vxM("text"===t.type?0:"select"===t.type?1:-1)}}function At(i,d){1&i&&e.Z7z(0,jt,2,1,null,null,xt),2&i&&e.Dyx(d.variables)}function Nt(i,d){1&i&&(e.j41(0,"div",6),e.EFF(1),e.nI1(2,"transloco"),e.k0s()),2&i&&(e.R7$(),e.JRh(e.bMT(2,1,d)))}const kt=new Q.Parser({sparqlStar:!0}),De=`PREFIX qcy: <${U.E.qcy}>`,ae=[{id:"files-in-directory",label:"Files in a specific directory",template:`${De}\n\nSELECT DISTINCT ?subject\nWHERE {\n ?subject a qcy:FileContent ;\n qcy:hasFileLocation ?fl .\n ?fl qcy:filePath ?path .\n FILTER(STRSTARTS(STR(?path), "\${THE_FILE_PATH}"))\n\n # EXCLUDE DERIVED FILES\n FILTER NOT EXISTS {?x qcy:alternativeRepresentation ?subject}\n}`,variables:[{key:"THE_FILE_PATH",label:"File path",type:"text"}]},{id:"entities-of-category",label:"Entities of a specific category",template:`${De}\n\nSELECT DISTINCT ?subject\nWHERE {\n ?subject a qcy:CanonicalEntity ;\n qcy:hasEntityCategory <\${CATEGORY_IRI}> .\n}`,variables:[{key:"CATEGORY_IRI",label:"Category",type:"select"}]}];let It=(()=>{class i{rowDefinitionQuery=(0,g.geq)(null);handlers=(0,g.hFB)(void 0);close=(0,g.CGW)();saved=(0,g.CGW)();_draft=(0,_.uu)(()=>this.rowDefinitionQuery()||H);_selectedPredefinedId=(0,s.vPA)(null);_varValues=(0,s.vPA)({});_categories=(0,s.vPA)([]);_categoriesLoading=(0,s.vPA)(!1);_filePathPlaceholder=(0,s.vPA)("");_selectedPredefined=(0,_.EW)(()=>{const t=this._selectedPredefinedId();return t?ae.find(a=>a.id===t)??null:null});_predefinedOptions=ae.map(t=>t.id);_predefinedLabelMap=Object.fromEntries(ae.map(t=>[t.id,t.label]));_categoryOptions=(0,_.EW)(()=>this._categories().map(t=>t.iri));_categoryLabelMap=(0,_.EW)(()=>Object.fromEntries(this._categories().map(t=>[t.iri,t.label])));_resolvedTemplate=(0,_.EW)(()=>{const t=this._selectedPredefined();if(!t)return null;const a=this._varValues();let n=t.template;for(const o of t.variables)n=n.replaceAll(`\${${o.key}}`,a[o.key]??"");return n});constructor(){(0,s.QZP)(()=>{const t=this._selectedPredefined(),a=this.handlers();this._varValues.set({}),this._categories.set([]),this._filePathPlaceholder.set(""),t?.variables.some(n=>"select"===n.type)&&this._loadCategories(a),t?.variables.some(n=>"THE_FILE_PATH"===n.key)&&this._loadFilePathPlaceholder(a)}),(0,s.QZP)(()=>{const t=this._resolvedTemplate();null!==t&&this._draft.set(t)})}_loadCategories(t){var a=this;return(0,T.A)(function*(){const n=t?.contentCategoriesInProject;if(n){a._categoriesLoading.set(!0);try{const o=yield n();a._categories.set(o)}catch(o){console.error("[RowDefModal] _loadCategories \u2014 error:",o)}finally{a._categoriesLoading.set(!1)}}})()}_loadFilePathPlaceholder(t){var a=this;return(0,T.A)(function*(){const n=t?.randomFilePath;if(!n)return;const o=yield n();if(o){const l=o.replace(/\/?[^\/]*$/,"/");a._filePathPlaceholder.set(l),a._setVar("THE_FILE_PATH",l)}})()}_onPredefinedChange(t){this._selectedPredefinedId.set(null!=t?String(t):null)}_setVar(t,a){null!=a&&this._varValues.update(n=>({...n,[t]:String(a)}))}_validationError=(0,_.EW)(()=>{const t=this._draft().trim();if(!t)return null;try{const a=kt.parse(t);if("SELECT"!==a?.queryType)return"components.sparqlTable.rowDefinitionErrorNotSelect";if(!a.variables.filter(l=>"*"!==l).map(l=>l?.value??l?.variable?.value??"").includes("subject"))return"components.sparqlTable.rowDefinitionErrorMissingSubject"}catch{return"components.sparqlTable.rowDefinitionErrorSyntax"}return null});_isSaveDisabled=(0,_.EW)(()=>!!this._draft().trim()&&!!this._validationError());_save(){this._draft()&&this._validationError()||(this.rowDefinitionQuery.set(this._draft()),this.saved.emit(),this.close.emit())}static \u0275fac=function(a){return new(a||i)};static \u0275cmp=e.VBU({type:i,selectors:[["cue-sparql-row-definition-modal"]],inputs:{rowDefinitionQuery:[1,"rowDefinitionQuery"],handlers:[1,"handlers"]},outputs:{rowDefinitionQuery:"rowDefinitionQueryChange",close:"close",saved:"saved"},decls:20,vars:20,consts:[[3,"close","label","minWidth"],["direction","column","gap","m",2,"padding","4px 0"],["size","s","color","secondary"],["label","Predefined query","placeholder","Custom query\u2026",3,"valueChange","options","labelMap","value"],[2,"height","200px","display","flex","flex-direction","column"],["type","sparql",2,"flex","1",3,"contentChange","content"],[1,"row-def-error"],["direction","row","gap","s","justify","end"],["variant","tertiary","size","s",3,"click"],["variant","primary","size","s",3,"click","disabled"],[3,"label","value"],[3,"label","options","labelMap","value","disabled","placeholder"],[3,"valueChange","label","value"],[3,"valueChange","label","options","labelMap","value","disabled","placeholder"]],template:function(a,n){if(1&a&&(e.j41(0,"cue-modal",0),e.nI1(1,"transloco"),e.bIt("close",function(){return n.close.emit()}),e.j41(2,"cue-flexcontainer",1)(3,"cue-typography",2),e.EFF(4),e.nI1(5,"transloco"),e.k0s(),e.j41(6,"cue-select",3),e.bIt("valueChange",function(l){return n._onPredefinedChange(l)}),e.k0s(),e.nVh(7,At,2,0),e.j41(8,"div",4)(9,"cue-code-editor",5),e.bIt("contentChange",function(l){return n._draft.set(l)}),e.k0s()(),e.nVh(10,Nt,3,3,"div",6),e.j41(11,"cue-flexcontainer",7)(12,"cue-button",8),e.bIt("click",function(){return n.close.emit()}),e.j41(13,"cue-button-label"),e.EFF(14),e.nI1(15,"transloco"),e.k0s()(),e.j41(16,"cue-button",9),e.bIt("click",function(){return n._save()}),e.j41(17,"cue-button-label"),e.EFF(18),e.nI1(19,"transloco"),e.k0s()()()()()),2&a){let o,l;e.Y8G("label",e.bMT(1,12,"components.sparqlTable.rowDefinitionModalTitle"))("minWidth","620px"),e.R7$(4),e.SpI(" ",e.bMT(5,14,"components.sparqlTable.rowDefinitionModalDescription")," "),e.R7$(2),e.Y8G("options",n._predefinedOptions)("labelMap",n._predefinedLabelMap)("value",n._selectedPredefinedId()??void 0),e.R7$(),e.vxM((o=n._selectedPredefined())?7:-1,o),e.R7$(2),e.Y8G("content",n._draft()),e.R7$(),e.vxM((l=n._draft()&&n._validationError())?10:-1,l),e.R7$(4),e.SpI(" ",e.bMT(15,16,"components.sparqlTable.rowDefinitionDiscard")," "),e.R7$(2),e.Y8G("disabled",n._isSaveDisabled()),e.R7$(2),e.SpI(" ",e.bMT(19,18,"components.sparqlTable.rowDefinitionSave")," ")}},dependencies:[Et.a,O.n,V.Typography,Z.$,he.L,ge.B,_e.Select,me.Input,z.Kj],styles:[".row-def-error[_ngcontent-%COMP%]{color:var(--cue-color-error, #ef4444);font-size:12px;padding:2px 0}"],changeDetection:0})}return i})();var Lt=f(7284);function qt(i,d){if(1&i&&(e.j41(0,"div",13),e.nrm(1,"span",26),e.EFF(2),e.k0s()),2&i){const t=d;e.R7$(2),e.Lme(" ",t.done," / ",t.total," queries ")}}function Gt(i,d){1&i&&(e.j41(0,"div",13),e.nrm(1,"span",26),e.EFF(2," Building table for download\u2026 "),e.k0s())}function Vt(i,d){if(1&i){const t=e.RV6();e.j41(0,"div",27),e.bIt("click",function(){s.eBV(t);const n=e.XpG();return s.Njj(n._openRowDefModal())}),e.j41(1,"cue-typography",28),e.EFF(2),e.nI1(3,"transloco"),e.k0s()()}2&i&&(e.R7$(2),e.SpI(" ",e.bMT(3,1,"components.sparqlTable.rowDefinitionEmpty")," "))}function Ot(i,d){if(1&i){const t=e.RV6();e.j41(0,"cue-paginator",29),e.bIt("currentPage",function(n){s.eBV(t);const o=e.XpG();return s.Njj(o._onPaginateEvent(n))}),e.k0s()}if(2&i){const t=e.XpG();e.Y8G("size",t._totalKeys())("pageSize",t.pageSize())}}function Qt(i,d){if(1&i){const t=e.RV6();e.j41(0,"cue-button",30),e.bIt("click",function(){const n=s.eBV(t),o=n.$implicit,l=n.index,u=e.XpG();return s.Njj(u._openSettings(o,l))}),e.nrm(1,"cue-button-icon",11),e.k0s(),e.j41(2,"cue-button",31),e.bIt("click",function(){const n=s.eBV(t).$implicit,o=e.XpG();return s.Njj(o._deleteColumn(n.field))}),e.nrm(3,"cue-button-icon",32),e.k0s()}}function $t(i,d){if(1&i){const t=e.RV6();e.j41(0,"div",33),e.bIt("click",function(){s.eBV(t);const n=e.XpG();return s.Njj(n._addColumn())}),e.nrm(1,"cue-button-icon",34),e.k0s()}}function Bt(i,d){if(1&i){const t=e.RV6();e.j41(0,"cue-declarative-sparql-column-settings-modal",35),e.mxI("columnDefChange",function(n){const o=s.eBV(t);return e.DH7(o.col,n)||(o.col=n),s.Njj(n)}),e.bIt("close",function(){s.eBV(t);const n=e.XpG();return s.Njj(n._activeColumn.set(void 0))})("updateColumnDef",function(n){const o=s.eBV(t),l=e.XpG();return s.Njj(l._applyColumnUpdate(o.index,n))}),e.k0s()}if(2&i){const t=e.XpG();e.R50("columnDef",d.col),e.Y8G("handlers",t.handlers())("columns",t.columns())}}function zt(i,d){if(1&i){const t=e.RV6();e.j41(0,"cue-sparql-row-definition-modal",36),e.mxI("rowDefinitionQueryChange",function(n){s.eBV(t);const o=e.XpG();return e.DH7(o.rowDefinition,n)||(o.rowDefinition=n),s.Njj(n)}),e.bIt("saved",function(){s.eBV(t);const n=e.XpG();return s.Njj(n._onRowDefSaved())})("close",function(){s.eBV(t);const n=e.XpG();return s.Njj(n._showRowDefModal.set(!1))}),e.k0s()}if(2&i){const t=e.XpG();e.R50("rowDefinitionQuery",t.rowDefinition),e.Y8G("handlers",t.rowDefinitionHandlers())}}const Xt=new Q.Parser({sparqlStar:!0}),Kt=new Q.Generator;function K(i,d){return oe.apply(this,arguments)}function oe(){return oe=(0,T.A)(function*(i,d){const t=new Array(i.length);let a=0;function o(){return(o=(0,T.A)(function*(){for(;a<i.length;){const u=a++;t[u]=yield i[u]()}})).apply(this,arguments)}const l=Array.from({length:Math.min(d,i.length)},()=>function n(){return o.apply(this,arguments)}());return yield Promise.all(l),t}),oe.apply(this,arguments)}function ie(i,d){if(d.length>200)return i;try{const t=Xt.parse(i),a={type:"values",values:d.map(n=>({"?subject":{termType:"NamedNode",value:n}}))};return Array.isArray(t.where)&&(t.where=[a,...t.where]),Kt.stringify(t)}catch{const t=`VALUES ?subject { ${d.map(a=>`<${a}>`).join(" ")} }`;return i.replace(/WHERE\s*\{/i,`WHERE {\n ${t}`)}}let Yt=(()=>{class i{visibleRows=(0,g.CGW)();columnDefsAG=(0,g.CGW)();columns=g.geq.required();handlers=g.hFB.required();rowDefinitionHandlers=(0,g.hFB)(void 0);rowDefinition=(0,g.geq)(H);pageSize=(0,g.hFB)(10);size=(0,g.hFB)("m");bufferFactor=(0,g.hFB)(5);_bufferSize=(0,_.EW)(()=>this.pageSize()*this.bufferFactor());_noRowDef=(0,_.EW)(()=>null!==this.rowDefinition()&&!this.rowDefinition()&&!this._showSettings());_showSettings=(0,s.vPA)(!1);_activeColumn=(0,s.vPA)(void 0);_showRowDefModal=(0,s.vPA)(!1);_dataFetchService=(0,s.WQX)(B);_tableService=(0,s.WQX)(J);_allKeys=(0,s.vPA)([]);_totalKeys=(0,_.EW)(()=>this._allKeys().length);_bufferKeys=(0,s.vPA)([]);_bufferOffset=(0,s.vPA)(0);_rowDefLoading=(0,s.vPA)(!1);_rowDefError=(0,s.vPA)("");_gridApi=null;_fullDataMode=(0,s.vPA)(!1);_fetchingFullData=(0,s.vPA)(!1);_fullDataFetchVersion=0;_exporting=(0,s.vPA)(!1);_prefetchCache=new Map;_currentlyPrefetching=new Set;_displayColumns=(0,_.EW)(()=>{const t=this._bufferKeys();return null===this.rowDefinition()||t.length?this._patchColumns(this.columns(),t):[]});_queryProgress=(0,_.EW)(()=>{const t=!!this.rowDefinition(),a=t?1:0;if(this._fetchingFullData()){const p=this._dataFetchService.totalQueryCount(),c=a+Math.max(p,1);return 0===c?null:{done:0,total:c}}const n=t&&!this._rowDefLoading()&&this._allKeys().length>0?1:0,o=this._dataFetchService.totalQueryCount(),u=n+this._dataFetchService.fetchedColumns().length,r=a+o;return 0===r||u>=r?null:{done:u,total:r}});_handlers=(0,_.EW)(()=>({queryHandler:this.handlers().queryHandler}));constructor(){(0,s.QZP)(()=>{const t=this.rowDefinition(),a=this.handlers();t&&a&&this._fetchRowDef(t,a)})}_openRowDefModal(){this._showRowDefModal.set(!0)}_onGridApi(t){this._gridApi=t,null!==this.rowDefinition()&&(t.addEventListener("sortChanged",()=>this._checkSortFilterState(t)),t.addEventListener("filterChanged",()=>this._checkSortFilterState(t)))}_checkSortFilterState(t){if(!this.rowDefinition())return;const a=t.getColumnState().some(l=>null!=l.sort),n=Object.keys(t.getFilterModel()??{}).length>0,o=a||n;!o||this._fullDataMode()||this._fetchingFullData()?o&&this._fullDataMode()?this._fillVisibleRows():!o&&(this._fullDataMode()||this._fetchingFullData())&&this._exitFullDataMode():this._enterFullDataMode()}_fillingVisibleRows=!1;_fillVisibleRows(){var t=this;return(0,T.A)(function*(){if(!t._fillingVisibleRows&&t._gridApi){t._fillingVisibleRows=!0;try{const a=t._gridApi.paginationGetPageSize?.()??t.pageSize(),o=(t._gridApi.paginationGetCurrentPage?.()??0)*a,l=[];for(let p=o;p<o+a;p++){const c=t._gridApi.getDisplayedRowAtIndex(p);if(!c?.data?.id)break;l.push(c.data.id)}if(!l.length)return;const u=t.columns().filter(p=>"data"===p.defType&&p.query&&!p.hide),r=t._dataFetchService.keyVals;yield K(u.map(p=>(0,T.A)(function*(){const c=l.filter(h=>void 0===r[h]?.[p.field]);if(!c.length)return;const m=ie(p.query,c);try{const h=yield t.handlers().queryHandler(m,(0,I.t)(m)),y={};h.results.bindings.forEach(C=>{const v=C.subject?.value;if(!v)return;y[v]||(y[v]=[]);const R={};Object.keys(C).filter(M=>"subject"!==M).forEach(M=>{R[M]=C[M]?.value}),y[v].push(R)}),t._dataFetchService.mergeColumnData(p.field,y,p.query)}catch{}})),3)}finally{t._fillingVisibleRows=!1}}})()}_onPaginateEvent(t){const a=t.startIndex,n=this._bufferSize(),o=Math.floor(a/n)*n;this._loadBuffer(o);const l=Math.floor((a-o)/this.pageSize());if(this._gridApi)try{this._gridApi.paginationGoToPage(l)}catch{}if(l>=Math.ceil(n/this.pageSize())-1){const r=o+n;r<this._allKeys().length&&this._prefetchBuffer(r)}}_fetchRowDef(t,a){var n=this;return(0,T.A)(function*(){n._rowDefLoading.set(!0),n._rowDefError.set(""),n._dataFetchService.emptyTableText.set("Loading\u2026"),n._allKeys.set([]),n._bufferKeys.set([]),n._bufferOffset.set(0),n._prefetchCache.clear(),n._currentlyPrefetching.clear();try{const o=(0,I.t)(t),l=yield a.queryHandler(t,o),u=l.results.bindings.map(r=>r.subject?.value).filter(Boolean);console.log("[ROWDEF] _fetchRowDef received",l.results.bindings.length,"bindings,",u.length,"valid keys. meta=",l.meta),n._allKeys.set(u),n._loadBuffer(0)}catch(o){n._rowDefError.set(String(o?.message??o))}finally{n._rowDefLoading.set(!1)}})()}_loadBuffer(t,a=!1){const n=this._allKeys().slice(t,t+this._bufferSize()),o=this._bufferKeys();if(!a&&n.length===o.length&&n.every((u,r)=>u===o[r]))return;const l=this._prefetchCache.get(t);if(this._prefetchCache.delete(t),this._dataFetchService.resetData(),l?this._dataFetchService.injectPreloadedData(l.keyVals,l.fetchedColumnFields,l.columnQueries):this._tableService.destroy(),this._bufferOffset.set(t),this._bufferKeys.set(n),this._gridApi)try{this._gridApi.paginationGoToPage(0)}catch{}}_enterFullDataMode(){var t=this;return(0,T.A)(function*(){if(console.log("[FDM] _enterFullDataMode called. _fetchingFullData=",t._fetchingFullData(),"_fullDataMode=",t._fullDataMode(),"_allKeys=",t._allKeys().length),t._fetchingFullData())return;t._fetchingFullData.set(!0);const a=++t._fullDataFetchVersion;let n;t._gridApi&&(n=t._gridApi.getColumnState().find(r=>null!=r.sort)?.colId,n||(n=Object.keys(t._gridApi.getFilterModel()??{})[0]));const o=n?.replace(/_\d+$/,""),l=o?t.columns().find(u=>u.field===o&&"data"===u.defType&&u.query):void 0;if(!l)return t._fullDataMode.set(!0),void t._fetchingFullData.set(!1);try{if(a!==t._fullDataFetchVersion)return;const u=yield t.handlers().queryHandler(l.query,(0,I.t)(l.query));if(a!==t._fullDataFetchVersion)return;const r={};Object.entries(t._dataFetchService.keyVals).forEach(([v,R])=>{r[v]={...R}});const p=t._allKeys();p.forEach(v=>{r[v]||(r[v]={})}),console.log("[DeclarativeSPARQLTable] keyVals pre-seed: allKeys=",p.length,"keyVals size=",Object.keys(r).length);const c=[...t._dataFetchService.fetchedColumns()],m={...t._dataFetchService._columnQueries},h=[];if(u.results.bindings.forEach(v=>{const R=v.subject?.value;if(!R)return;r[R]||(r[R]={}),r[R][l.field]=[];const M={};Object.keys(v).filter(D=>"subject"!==D).forEach(D=>{M[D]=v[D]?.value}),r[R][l.field].push(M),h.push(R)}),c.includes(l.field)||c.push(l.field),m[l.field]=l.query,console.log("[FDM] after sort-col fetch: keyVals size=",Object.keys(r).length,"allKeys from sort col=",h.length),console.log("[FDM] calling resetData()"),t._dataFetchService.resetData(),t._tableService.destroy(),console.log("[FDM] calling injectPreloadedData with",Object.keys(r).length,"rows"),t._dataFetchService.injectPreloadedData(r,c,m),console.log("[FDM] injectPreloadedData done. Service keyVals size=",Object.keys(t._dataFetchService.keyVals).length),t._fullDataMode.set(!0),a!==t._fullDataFetchVersion)return;const y=t.columns().filter(v=>"data"===v.defType&&v.query&&v.field!==l.field&&!v.hide),C=new Set(t._bufferKeys());yield K(y.map(v=>(0,T.A)(function*(){const R=h.filter(D=>C.has(D)&&void 0===r[D]?.[v.field]);if(!R.length||a!==t._fullDataFetchVersion)return;const M=ie(v.query,R);try{const D=yield t.handlers().queryHandler(M,(0,I.t)(M));if(a!==t._fullDataFetchVersion)return;const b={};D.results.bindings.forEach(P=>{const x=P.subject?.value;if(!x)return;b[x]||(b[x]=[]);const $={};Object.keys(P).filter(L=>"subject"!==L).forEach(L=>{$[L]=P[L]?.value}),b[x].push($)}),Object.entries(b).forEach(([P,x])=>{r[P]&&(r[P][v.field]=x)}),t._dataFetchService.mergeColumnData(v.field,b,v.query)}catch{}})),3)}catch(u){console.error("[DeclarativeSPARQLTable] Error in _enterFullDataMode:",u)}finally{a===t._fullDataFetchVersion&&t._fetchingFullData.set(!1)}})()}_exitFullDataMode(){if(console.log("[FDM] _exitFullDataMode called"),this._fullDataFetchVersion++,this._fetchingFullData.set(!1),this._fullDataMode.set(!1),this._dataFetchService.resetData(),this._tableService.destroy(),this._loadBuffer(this._bufferOffset(),!0),this._gridApi)try{this._gridApi.paginationGoToPage(0)}catch{}}_prefetchBuffer(t){var a=this;return(0,T.A)(function*(){if(a._prefetchCache.has(t)||a._currentlyPrefetching.has(t))return;const n=a._allKeys().slice(t,t+a._bufferSize());if(!n.length)return;a._currentlyPrefetching.add(t);const l=a._patchColumns(a.columns(),n).filter(c=>"data"===c.defType&&!c.hide&&c.query),u={},r=[],p={};try{yield K(l.map(c=>(0,T.A)(function*(){try{(yield a.handlers().queryHandler(c.query,(0,I.t)(c.query))).results.bindings.forEach(h=>{const y=h.subject?.value;if(!y)return;u[y]||(u[y]={}),u[y][c.field]||(u[y][c.field]=[]);const C={};Object.keys(h).filter(v=>"subject"!==v).forEach(v=>{C[v]=h[v]?.value}),u[y][c.field].push(C)}),r.push(c.field),p[c.field]=c.query}catch{}})),3),a._prefetchCache.set(t,{keyVals:u,fetchedColumnFields:r,columnQueries:p})}finally{a._currentlyPrefetching.delete(t)}})()}_patchColumns(t,a){return a.length?t.map(n=>n.query&&"data"===n.defType?{...n,query:ie(n.query,a)}:n):t}_columnSelectSettings=Object.assign(new ee.e,{allowEditing:!1});_shownColumns=(0,_.EW)(()=>this.columns().filter(t=>!t.hide));_openSettings(t,a){const n=this.columns().findIndex(o=>o.field===t.field);this._activeColumn.set({col:{...t},index:n})}_onShownChanged(t){const a=new Set(t.map(u=>u.field)),n=this.columns(),o=t.map(u=>({...n.find(p=>p.field===u.field)??u,hide:!1})),l=n.filter(u=>!a.has(u.field)).map(u=>({...u,hide:!0}));this.columns.set([...o,...l])}_applyColumnUpdate(t,a){const n=this.columns().map((o,l)=>l===t?Object.assign(Object.create(Object.getPrototypeOf(o)),o,a):o);this.columns.set(n)}_addColumn(){const t=this.columns();let a;if(t.length>0)a=t[t.length-1];else{const l=this.rowDefinition();a=Object.assign(new re,{query:l?this._seedQueryFromRowDef(l):"",strategy:{type:"first"}})}const n=Object.assign(Object.create(Object.getPrototypeOf(a)),a,{field:`column_${Date.now()}`,headerName:`${a.headerName??a.field??"Column"} Copy`,hide:!1}),o=t.length;this.columns.update(l=>[...l,n]),this._activeColumn.set({col:{...n},index:o})}_deleteColumn(t){this.columns.update(a=>a.filter(n=>n.field!==t))}_onRowDefSaved(){if(this.columns().length>0)return;this._showSettings.set(!0);const t=this.rowDefinition(),a=t?this._seedQueryFromRowDef(t):"",n=Object.assign(new re,{field:`column_${Date.now()}`,headerName:"Column 1",query:a,strategy:{type:"first"}});this.columns.set([n]),this._activeColumn.set({col:{...n},index:0})}_seedQueryFromRowDef(t){try{if(/qcy:FileContent\b/.test(t)){let n=t.replace(/SELECT\s+(?:DISTINCT\s+)?\?subject\b/i,"SELECT ?subject ?value");n=n.replace(/\s*ORDER\s+BY\s+[^\n{}]*/gi,""),/PREFIX\s+skos:/i.test(n)||(n=`PREFIX skos: <${Ce.B.skos}>\n`+n);const o=n.lastIndexOf("}");return-1!==o&&(n=n.slice(0,o)+" ?subject qcy:hasContentCategory ?cat .\n ?cat skos:prefLabel ?value .\n}"),n.trim()}{let n=t.replace(/SELECT\s+(?:DISTINCT\s+)?\?subject\b/i,"SELECT ?subject ?val");n=n.replace(/\s*ORDER\s+BY\s+[^\n{}]*/gi,"");const o=n.lastIndexOf("}");return-1!==o&&(n=n.slice(0,o)+" ?subject qcy:value ?val .\n}"),n.trim()}}catch{return t}}_getFormattedData(t=!1,a){const n=t?this.columns().filter(c=>"data"===c.defType&&c.query).map(c=>this._dataFetchService.columnDefsAG().find(h=>h.colId===c.field||h.field===c.field)??{colId:c.field,headerName:c.headerName??c.field,cellRendererParams:{strategy:c.strategy,postProcess:c.postProcess}}):this._dataFetchService.columnDefsAG().filter(c=>!c.hide),o=this._allKeys(),l=a?(o.length>0?o:Object.keys(a)).map(c=>({id:c,...a[c]??{}})):this._tableService.tableData(),u=["Key",...n.map(c=>c.headerName??c.field??"")],r=["",...n.map(c=>{const m=c.cellStyle;return m&&"object"==typeof m?String(m.textAlign??m["text-align"]??"").toLowerCase():""})];return{headers:u,rows:l.map(c=>[String(c.id??""),...n.map(m=>{const h=m.colId??m.field??"",y=m.valueGetter;let C="function"==typeof y?y({data:c,colDef:m}):c[h];if(void 0===C&&a&&(C=(a[c.id]??{})[h]??[]),Array.isArray(C)){const v=m.cellRendererParams?.strategy,R=m.cellRendererParams?.postProcess,M=v?w(C,v,""):C.map(D=>D?.val??"").filter(Boolean).join(", ");return(0,E.g4)(M,R)}return String(C??"")})]),alignments:r}}_fetchAllColumnsForExport(t){var a=this;return(0,T.A)(function*(){const n=a._allKeys();console.log("[EXPORT] _fetchAllColumnsForExport called for",t.length,"columns. allKeys=",n.length);const o=t.filter(r=>"data"===r.defType&&r.query);if(!o.length)return{};const l=n.length?a._patchColumns(o,n):o,u={};return yield K(l.map(r=>(0,T.A)(function*(){try{(yield a.handlers().queryHandler(r.query,(0,I.t)(r.query))).results.bindings.forEach(c=>{const m=c.subject?.value;if(!m)return;u[m]||(u[m]={}),u[m][r.field]||(u[m][r.field]=[]);const h={};Object.keys(c).filter(y=>"subject"!==y).forEach(y=>{h[y]=c[y]?.value}),u[m][r.field].push(h)})}catch{}})),3),u})()}_downloadCsv(){var t=this;return(0,T.A)(function*(a=!1){if(!t._exporting()){t._exporting.set(!0);try{const n=a?t.columns():t.columns().filter(c=>!c.hide),o=yield t._fetchAllColumnsForExport(n),{headers:l,rows:u}=t._getFormattedData(a,o),r=Lt.unparse([l,...u]),p=new Blob([r],{type:"text/csv;charset=utf-8;"});t._triggerDownload(p,"export.csv")}finally{t._exporting.set(!1)}}}).apply(this,arguments)}_downloadXlsx(){var t=this;return(0,T.A)(function*(a=!1){if(!t._exporting()){t._exporting.set(!0);try{const n=a?t.columns():t.columns().filter(c=>!c.hide),o=yield t._fetchAllColumnsForExport(n),{headers:l,rows:u,alignments:r}=t._getFormattedData(a,o),p=yield t._buildStyledXlsxBlob(l,u,r);t._triggerDownload(p,"export.xlsx")}finally{t._exporting.set(!1)}}}).apply(this,arguments)}_buildStyledXlsxBlob(t,a,n){return(0,T.A)(function*(){const u=(D,b)=>D?"center"===b?2:"right"===b?3:1:"center"===b?4:"right"===b?5:0,r=(D,b,P,x)=>{const $=`${(D=>{let b="",P=D+1;for(;P>0;)b=String.fromCharCode(65+(P-1)%26)+b,P=Math.floor((P-1)/26);return b})(D)}${b}`,L=x>0?` s="${x}"`:"",le=Number(P);return 0===x&&""!==P&&!isNaN(le)&&isFinite(le)?`<c r="${$}"${L}><v>${le}</v></c>`:`<c r="${$}"${L} t="inlineStr"><is><t>${(D=>D.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;"))(P)}</t></is></c>`},p=[];p.push(`<row r="1">${t.map((D,b)=>r(b,1,D,u(!0,n[b]??""))).join("")}</row>`),a.forEach((D,b)=>{p.push(`<row r="${b+2}">${D.map((P,x)=>r(x,b+2,P,u(!1,n[x]??""))).join("")}</row>`)});const c=`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\n<worksheet xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main">\n <cols><col min="1" max="1" hidden="1"/></cols>\n <sheetData>${p.join("")}</sheetData>\n</worksheet>`,M=new(0,(yield f.e(7247).then(f.t.bind(f,7247,23))).default);return M.file("[Content_Types].xml",'<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\n<Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types">\n <Default Extension="rels" ContentType="application/vnd.openxmlformats-package.relationships+xml"/>\n <Default Extension="xml" ContentType="application/xml"/>\n <Override PartName="/xl/workbook.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml"/>\n <Override PartName="/xl/worksheets/sheet1.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml"/>\n <Override PartName="/xl/styles.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml"/>\n</Types>'),M.file("_rels/.rels",'<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\n<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">\n <Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument" Target="xl/workbook.xml"/>\n</Relationships>'),M.file("xl/workbook.xml",'<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\n<workbook xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships">\n <sheets><sheet name="Data" sheetId="1" r:id="rId1"/></sheets>\n</workbook>'),M.file("xl/_rels/workbook.xml.rels",'<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\n<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">\n <Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet" Target="worksheets/sheet1.xml"/>\n <Relationship Id="rId2" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles" Target="styles.xml"/>\n</Relationships>'),M.file("xl/worksheets/sheet1.xml",c),M.file("xl/styles.xml",'<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\n<styleSheet xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main">\n <fonts count="2">\n <font><sz val="11"/><name val="Calibri"/></font>\n <font><b/><color rgb="FFFFFFFF"/><sz val="11"/><name val="Poppins"/></font>\n </fonts>\n <fills count="3">\n <fill><patternFill patternType="none"/></fill>\n <fill><patternFill patternType="gray125"/></fill>\n <fill><patternFill patternType="solid"><fgColor rgb="FF2859E1"/><bgColor indexed="64"/></patternFill></fill>\n </fills>\n <borders count="1">\n <border><left/><right/><top/><bottom/><diagonal/></border>\n </borders>\n <cellStyleXfs count="1"><xf numFmtId="0" fontId="0" fillId="0" borderId="0"/></cellStyleXfs>\n <cellXfs count="6">\n <xf numFmtId="0" fontId="0" fillId="0" borderId="0" xfId="0"/>\n <xf numFmtId="0" fontId="1" fillId="2" borderId="0" xfId="0" applyFont="1" applyFill="1"/>\n <xf numFmtId="0" fontId="1" fillId="2" borderId="0" xfId="0" applyFont="1" applyFill="1" applyAlignment="1"><alignment horizontal="center"/></xf>\n <xf numFmtId="0" fontId="1" fillId="2" borderId="0" xfId="0" applyFont="1" applyFill="1" applyAlignment="1"><alignment horizontal="right"/></xf>\n <xf numFmtId="0" fontId="0" fillId="0" borderId="0" xfId="0" applyAlignment="1"><alignment horizontal="center"/></xf>\n <xf numFmtId="0" fontId="0" fillId="0" borderId="0" xfId="0" applyAlignment="1"><alignment horizontal="right"/></xf>\n </cellXfs>\n</styleSheet>'),M.generateAsync({type:"blob",mimeType:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"})})()}_triggerDownload(t,a){const n=URL.createObjectURL(t),o=document.createElement("a");o.href=n,o.download=a,document.body.appendChild(o),o.click(),document.body.removeChild(o),URL.revokeObjectURL(n)}static \u0275fac=function(a){return new(a||i)};static \u0275cmp=e.VBU({type:i,selectors:[["cue-declarative-sparql-table"]],inputs:{columns:[1,"columns"],handlers:[1,"handlers"],rowDefinitionHandlers:[1,"rowDefinitionHandlers"],rowDefinition:[1,"rowDefinition"],pageSize:[1,"pageSize"],size:[1,"size"],bufferFactor:[1,"bufferFactor"]},outputs:{visibleRows:"visibleRows",columnDefsAG:"columnDefsAG",columns:"columnsChange",rowDefinition:"rowDefinitionChange"},features:[e.Jv_([B,J])],decls:39,vars:27,consts:[[1,"flip-card",3,"cueFlipChange","cueFlip"],[1,"flip-content"],[1,"card-face","front"],["direction","row","justify","end",2,"padding","2px"],["positioning","bottomleft"],["trigger","","variant","tertiary","size","s","cueTooltip","Export",3,"disabled"],["icon","more-vert"],["menu",""],[3,"click","disabled"],["before","","name","download"],["variant","accent","size","s","cueTooltip","Column settings",3,"click"],["icon","settings"],[3,"gridApi","visibleRows","columnDefsAG","handlers","columns","showPaginator","paginationPageSize","size","loading"],[1,"query-status"],[1,"row-def-empty"],[3,"size","pageSize"],[1,"card-face","back",2,"min-height","var(--cue-table-m-height)",3,"maxHeight"],["variant","tertiary","size","s",3,"click","cueTooltip"],["icon","filter"],["variant","accent","size","s","cueTooltip","Back to table",3,"click"],["icon","arrow-back"],[3,"shown","columnDefs","columnDefsGross","settings"],["cueColumnItem",""],["cueColumnListFooter",""],[3,"columnDef","handlers","columns"],[3,"rowDefinitionQuery","handlers"],[1,"query-status-spinner"],[1,"row-def-empty",3,"click"],["size","s","color","muted"],[3,"currentPage","size","pageSize"],["variant","tertiary","size","s","cueTooltip","Edit column",3,"click"],["variant","tertiary","size","s","cueTooltip","Delete column",3,"click"],["icon","delete"],["cueTooltip","Add column definition",1,"add-column-row",3,"click"],["icon","add"],[3,"columnDefChange","close","updateColumnDef","columnDef","handlers","columns"],[3,"rowDefinitionQueryChange","saved","close","rowDefinitionQuery","handlers"]],template:function(a,n){if(1&a&&(e.j41(0,"div",0),e.mxI("cueFlipChange",function(l){return e.DH7(n._showSettings,l)||(n._showSettings=l),l}),e.j41(1,"div",1)(2,"cue-card",2)(3,"cue-flexcontainer",3)(4,"cue-menu",4)(5,"cue-button",5),e.nrm(6,"cue-button-icon",6),e.k0s(),e.j41(7,"cue-menu-wrap",7)(8,"cue-menu-item",8),e.bIt("click",function(){return n._downloadCsv()}),e.nrm(9,"cue-svg-icon",9),e.EFF(10," Download CSV "),e.k0s(),e.j41(11,"cue-menu-item",8),e.bIt("click",function(){return n._downloadCsv(!0)}),e.nrm(12,"cue-svg-icon",9),e.EFF(13," Download CSV (incl. hidden columns) "),e.k0s(),e.j41(14,"cue-menu-item",8),e.bIt("click",function(){return n._downloadXlsx()}),e.nrm(15,"cue-svg-icon",9),e.EFF(16," Download XLSX "),e.k0s(),e.j41(17,"cue-menu-item",8),e.bIt("click",function(){return n._downloadXlsx(!0)}),e.nrm(18,"cue-svg-icon",9),e.EFF(19," Download XLSX (incl. hidden columns) "),e.k0s()()(),e.j41(20,"cue-button",10),e.bIt("click",function(){return n._showSettings.set(!0)}),e.nrm(21,"cue-button-icon",11),e.k0s()(),e.j41(22,"cue-sparql-table-inner",12),e.bIt("gridApi",function(l){return n._onGridApi(l)})("visibleRows",function(l){return n.visibleRows.emit(l)})("columnDefsAG",function(l){return n.columnDefsAG.emit(l)}),e.k0s(),e.nVh(23,qt,3,2,"div",13),e.nVh(24,Gt,3,0,"div",13),e.nVh(25,Vt,4,3,"div",14),e.nVh(26,Ot,1,2,"cue-paginator",15),e.k0s(),e.j41(27,"cue-card",16)(28,"cue-flexcontainer",3)(29,"cue-button",17),e.nI1(30,"transloco"),e.bIt("click",function(){return n._openRowDefModal()}),e.nrm(31,"cue-button-icon",18),e.k0s(),e.j41(32,"cue-button",19),e.bIt("click",function(){return n._showSettings.set(!1)}),e.nrm(33,"cue-button-icon",20),e.k0s()(),e.j41(34,"cue-ag-grid-column-select",21),e.bIt("shown",function(l){return n._onShownChanged(l)}),e.DNE(35,Qt,4,0,"ng-template",22)(36,$t,2,0,"ng-template",23),e.k0s()()()(),e.nVh(37,Bt,1,3,"cue-declarative-sparql-column-settings-modal",24),e.nVh(38,zt,1,2,"cue-sparql-row-definition-modal",25)),2&a){let o,l;e.R50("cueFlip",n._showSettings),e.R7$(5),e.Y8G("disabled",n._exporting()),e.R7$(3),e.Y8G("disabled",n._exporting()),e.R7$(3),e.Y8G("disabled",n._exporting()),e.R7$(3),e.Y8G("disabled",n._exporting()),e.R7$(3),e.Y8G("disabled",n._exporting()),e.R7$(5),e.AVh("hidden",n._showSettings()||n._noRowDef()),e.Y8G("handlers",n._handlers())("columns",n._displayColumns())("showPaginator",n._fullDataMode())("paginationPageSize",n.pageSize())("size",n.size())("loading",n._rowDefLoading()),e.R7$(),e.vxM((o=n._queryProgress())?23:-1,o),e.R7$(),e.vxM(n._exporting()?24:-1),e.R7$(),e.vxM(n._noRowDef()?25:-1),e.R7$(),e.vxM(n.rowDefinition()&&!n._fullDataMode()?26:-1),e.R7$(),e.Y8G("maxHeight","var(--cue-table-m-height)"),e.R7$(2),e.Y8G("cueTooltip",e.bMT(30,25,"components.sparqlTable.rowDefinitionTooltip")),e.R7$(5),e.Y8G("columnDefs",n._shownColumns())("columnDefsGross",n.columns())("settings",n._columnSelectSettings),e.R7$(3),e.vxM((l=n._activeColumn())?37:-1,l),e.R7$(),e.vxM(n._showRowDefModal()?38:-1)}},dependencies:[Ge,bt,It,ne.pL,ne.pC,ne.rx,Dt.Card,O.n,V.Typography,Z.$,fe.a,Tt.R,ue.d,Ct.W,St.M,Mt.D,Rt.A,Pt.m,z.Kj],styles:[".flip-card[_ngcontent-%COMP%]{width:100%}.flip-content[_ngcontent-%COMP%]{position:relative;width:100%}.card-face[_ngcontent-%COMP%]{width:100%}.hidden[_ngcontent-%COMP%]{display:none}.row-def-empty[_ngcontent-%COMP%]{flex:1;min-height:160px;display:flex;align-items:center;justify-content:center;padding:32px 16px;border:2px dashed var(--cue-color-border, #d1d5db);border-radius:8px;cursor:pointer;margin-top:8px;transition:border-color .15s}.row-def-empty[_ngcontent-%COMP%]:hover{border-color:var(--cue-color-accent, #4f46e5)}.query-status[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;padding:6px 10px;font-size:12px;color:var(--cue-color-text-muted, #6b7280);background:var(--cue-color-surface-subtle, #f9fafb);border:1px solid var(--cue-color-border, #e5e7eb);border-radius:6px;margin-top:6px}@keyframes _ngcontent-%COMP%_spin{to{transform:rotate(360deg)}}.query-status-spinner[_ngcontent-%COMP%]{display:inline-block;width:11px;height:11px;border:2px solid currentColor;border-top-color:transparent;border-radius:50%;animation:_ngcontent-%COMP%_spin .7s linear infinite;flex-shrink:0}.add-column-row[_ngcontent-%COMP%]{padding:20px 10px;border-top:solid 1px #ccc;display:flex;align-items:center;justify-content:center;opacity:.4;cursor:pointer;transition:opacity .15s ease}.add-column-row[_ngcontent-%COMP%]:hover{opacity:.75}"],changeDetection:0})}return i})();var Ut=f(7293);function Ht(i,d){if(1&i){const t=e.RV6();e.j41(0,"cue-declarative-sparql-table",3),e.mxI("columnsChange",function(n){s.eBV(t);const o=e.XpG();return e.DH7(o.columns,n)||(o.columns=n),s.Njj(n)})("rowDefinitionChange",function(n){s.eBV(t);const o=e.XpG();return e.DH7(o.rowDefinition,n)||(o.rowDefinition=n),s.Njj(n)}),e.bIt("visibleRows",function(n){s.eBV(t);const o=e.XpG();return s.Njj(o.visibleRows.emit(n))})("columnDefsAG",function(n){s.eBV(t);const o=e.XpG();return s.Njj(o.columnDefsAG.emit(n))}),e.k0s()}if(2&i){const t=e.XpG();e.Y8G("handlers",d)("rowDefinitionHandlers",t._rowDefinitionHandlers()),e.R50("columns",t.columns)("rowDefinition",t.rowDefinition),e.Y8G("pageSize",t.pageSize())("size",t.size())("bufferFactor",t.bufferFactor())}}function Jt(i,d){1&i&&(e.j41(0,"cue-flexcontainer",1)(1,"cue-typography",4),e.EFF(2," No project connected. Pass a sdkState with cue and projectId. "),e.k0s()())}function Zt(i,d){if(1&i&&e.nrm(0,"cue-logo-link",2),2&i){let t;const a=e.XpG();e.Y8G("projectId",null==(t=a.sdkState())?null:t.projectId)}}let en=(()=>{class i{sdkState=(0,g.hFB)(void 0);columns=g.geq.required();rowDefinition=(0,g.geq)(H);pageSize=(0,g.hFB)(10,{transform:g.Udg});size=(0,g.hFB)("m");showLogo=(0,g.hFB)(!1,{transform:g.L39});bufferFactor=(0,g.hFB)(5,{transform:g.Udg});visibleRows=(0,g.CGW)();columnDefsAG=(0,g.CGW)();_entities=(0,s.vPA)(void 0);_documents=(0,s.vPA)(void 0);_handlers=(0,_.EW)(()=>{const t=this.sdkState();if(!t)return;const{cue:a,projectId:n,graphType:o="fuseki"}=t;return{queryHandler:l=>a.api.sparql(l,n,o)}});_rowDefinitionHandlers=(0,_.EW)(()=>{const t=this._entities(),a=this._documents();if(t&&a)return{contentCategoriesInProject:()=>t.contentCategoriesInProject(),randomFilePath:()=>a.randomFilePath()}});constructor(){(0,s.QZP)(()=>{const t=this.sdkState();t?.cue&&t?.projectId?(this._entities.set(new q.g8(t.cue.api,t.projectId)),this._documents.set(new q.f$(t.cue.api,t.projectId))):(this._entities.set(void 0),this._documents.set(void 0))})}static \u0275fac=function(a){return new(a||i)};static \u0275cmp=e.VBU({type:i,selectors:[["cue-sparql-table"]],inputs:{sdkState:[1,"sdkState"],columns:[1,"columns"],rowDefinition:[1,"rowDefinition"],pageSize:[1,"pageSize"],size:[1,"size"],showLogo:[1,"showLogo"],bufferFactor:[1,"bufferFactor"]},outputs:{columns:"columnsChange",rowDefinition:"rowDefinitionChange",visibleRows:"visibleRows",columnDefsAG:"columnDefsAG"},decls:3,vars:2,consts:[[3,"handlers","rowDefinitionHandlers","columns","rowDefinition","pageSize","size","bufferFactor"],["direction","column","align","center","justify","center",2,"height","100%","width","100%","padding","8px"],[2,"position","absolute","top","26px","left","26px","z-index","5",3,"projectId"],[3,"columnsChange","rowDefinitionChange","visibleRows","columnDefsAG","handlers","rowDefinitionHandlers","columns","rowDefinition","pageSize","size","bufferFactor"],[2,"color","#9ca3af","font-size","13px"]],template:function(a,n){if(1&a&&(e.nVh(0,Ht,1,7,"cue-declarative-sparql-table",0)(1,Jt,3,0,"cue-flexcontainer",1),e.nVh(2,Zt,1,1,"cue-logo-link",2)),2&a){let o;e.vxM((o=n._handlers())?0:1,o),e.R7$(2),e.vxM(n.showLogo()?2:-1)}},dependencies:[Yt,O.n,V.Typography,Ut.x],styles:["[_nghost-%COMP%]{display:block;width:100%;position:relative}"],changeDetection:0})}return i})()},7573(W,k,f){f.d(k,{E:()=>g});const g={qcy:"https://dev.qaecy.com/ont#","qcy-e":"https://dev.qaecy.com/enum#","qcy-f":"https://dev.qaecy.com/functions#",obc:"https://w3id.org/obc#",dicc:"https://w3id.org/digitalconstruction/0.5/Contexts#",dicv:"https://w3id.org/digitalconstruction/0.5/Variables#",dice:"https://w3id.org/digitalconstruction/0.5/Entities#",dicp:"https://w3id.org/digitalconstruction/0.5/Processes#",dica:"https://w3id.org/digitalconstruction/0.5/Agents#",dici:"https://w3id.org/digitalconstruction/0.5/Information#",dicbm:"https://w3id.org/digitalconstruction/0.5/Materials#",dicob:"https://w3id.org/digitalconstruction/0.5/Occupancy#",dicl:"https://w3id.org/digitalconstruction/0.5/Lifecycle#",dices:"https://w3id.org/digitalconstruction/0.5/Energy#",dicu:"https://w3id.org/digitalconstruction/0.5/Units#",diclvl:"https://w3id.org/digitalconstruction/0.5/Levels#",dicstg:"https://w3id.org/digitalconstruction/0.5/Stages#"}}}]);
package/5137.js DELETED
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkcue_ui=self.webpackChunkcue_ui||[]).push([[5137],{5137(F,B,a){a.d(B,{BlockProjectDocuments:()=>L});var v=a(467),f=a(7705),r=a(5802),u=a(2271),y=a(6114),_=a(7993),C=a(3615),D=a(1493),S=a(9352),P=a(2245),z=a(5381),t=a(5547);const R=i=>({percent:i}),T=i=>({count:i});function O(i,d){if(1&i){const e=t.RV6();t.j41(0,"cue-block-documents-by-suffix",11),t.bIt("navigated",function(c){r.eBV(e);const s=t.XpG();return r.Njj(s.handleNavigated(c))}),t.k0s()}if(2&i){t.XpG();const e=t.r8f(2),n=t.r8f(4);t.Y8G("data",e)("config",n)}}function N(i,d){if(1&i){const e=t.RV6();t.j41(0,"cue-block-documents-by-content-category",11),t.bIt("navigated",function(c){r.eBV(e);const s=t.XpG();return r.Njj(s.handleNavigated(c))}),t.k0s()}if(2&i){t.XpG();const e=t.r8f(3),n=t.r8f(4);t.Y8G("data",e)("config",n)}}function E(i,d){if(1&i&&(t.nrm(0,"cue-typography",7),t.nI1(1,"transloco")),2&i){const e=t.XpG();t.Y8G("innerHTML",t.i5U(1,1,"components.contentBlocks.projectDocuments.pctOpenFormats",t.eq3(4,R,e.openFormatPct())),t.npT)}}function A(i,d){if(1&i){const e=t.RV6();t.j41(0,"cue-typography",12),t.nI1(1,"transloco"),t.bIt("click",function(){r.eBV(e);const c=t.XpG();return r.Njj(c.getDuplicates())}),t.k0s()}2&i&&t.Y8G("innerHTML",t.i5U(1,1,1===d?"components.contentBlocks.projectDocuments.duplicateFilesSingular":"components.contentBlocks.projectDocuments.duplicateFilesPlural",t.eq3(4,T,d)),t.npT)}function G(i,d){if(1&i&&(t.j41(0,"cue-typography",10),t.EFF(1),t.k0s()),2&i){const e=t.XpG();t.R7$(),t.SpI("\u2696\ufe0f ",e.humanSize()," ")}}function $(i,d){if(1&i&&(t.j41(0,"cue-typography",10),t.EFF(1),t.k0s()),2&i){const e=t.XpG();t.R7$(),t.E5c("",e.filterKey(),": ",e.humanSizeFiltered()," (",e.countFiltered(),")")}}let L=(()=>{class i{data=(0,f.hFB)(void 0);_data=(0,r.vPA)(void 0);constructor(){let e=null;(0,r.QZP)(()=>{const n=this.data();null!==e&&clearTimeout(e),(0,u.O8)(()=>this._data.set(n)),e=setTimeout(()=>{e=null,(0,u.O8)(()=>this._data.set(this.data()))},100)})}config=f.hFB.required();handlers=(0,u.EW)(()=>this.config().handlers);filterKey=(0,r.vPA)("");bySuffix=(0,u.EW)(()=>{const e=this._data();if(e?.documentsBySuffix&&0!==Object.keys(e.documentsBySuffix).length)return{documents:e.documentsBySuffix}});byContentCategory=(0,u.EW)(()=>{const e=this._data();if(e?.documentsByContentCategory&&0!==Object.keys(e.documentsByContentCategory).length)return{documents:e.documentsByContentCategory}});duplicateCount=(0,u.EW)(()=>this._data()?.duplicateCount??0);size=(0,u.EW)(()=>{const e=this._data();if(!e)return 0;const n=Object.values(e.documentsBySuffix||{}).reduce((s,o)=>s+(o?.size||0),0),c=Object.values(e.documentsByContentCategory||{}).reduce((s,o)=>s+(o?.size||0),0);return Math.max(n,c)});documentCount=(0,u.EW)(()=>{const e=this._data();if(!e)return 0;const n=Object.values(e.documentsBySuffix||{}).reduce((s,o)=>s+(o?.count||0),0),c=Object.values(e.documentsByContentCategory||{}).reduce((s,o)=>s+(o?.count||0),0);return Math.max(n,c)});sizeFiltered=(0,r.vPA)(0);countFiltered=(0,r.vPA)(0);humanSize=(0,u.EW)(()=>(0,D.b)(this.size()));humanSizeFiltered=(0,u.EW)(()=>(0,D.b)(this.sizeFiltered()));openFormatPct=(0,u.EW)(()=>{const e=this._data();if(!e?.documentsBySuffix)return 0;let n=0,c=0;for(const[o,l]of Object.entries(e.documentsBySuffix)){if(!l)continue;const g=Number(l.count||0);n+=g;const b=o.toLowerCase().trim(),x=b.startsWith(".")?b:`.${b}`;y.V[x]?.open&&(c+=g)}return n>0?Math.round(c/n*100):null});configWithFilterResolver=(0,u.EW)(()=>{var e=this;const n=this.config();return{...n,handlers:{...n.handlers,docListFilterRequest:(c=(0,v.A)(function*(s,o){if(console.log("[ProjectDocuments] docListFilterRequest",s,o),!o||0===o.length)return;const l="contentCat"===s?(i=>{const d=i.split("#").pop()??i,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[d]&&console.log(`No pretty label for category: ${d}`),e[d]??d})(o[0]):o[0];if(e.filterKey.set(l),"suffix"===s){const m=e._data()?.documentsBySuffix;if(m){const M=o.reduce((h,p)=>h+(m[p.toLowerCase()]?.size||0),0),k=o.reduce((h,p)=>h+(m[p.toLowerCase()]?.count||0),0);e.sizeFiltered.set(M),e.countFiltered.set(k)}}else if("contentCat"===s){const m=e._data()?.documentsByContentCategory;if(m){const M=o.reduce((h,p)=>h+(m[p]?.size||0),0),k=o.reduce((h,p)=>h+(m[p]?.count||0),0);e.sizeFiltered.set(M),e.countFiltered.set(k)}}const g=n.handlers?.requestDocumentsByFilter;if(!g)return void console.warn("No requestDocumentsByFilter handler defined");const x=yield g([{type:"suffix"===s?"suffix":"content",included:o,excluded:[]}]);return{ids:x.map(m=>({id:m})),totalCount:x.length}}),function(o,l){return c.apply(this,arguments)})}};var c});handleNavigated(e){if(!e)return this.sizeFiltered.set(0),this.countFiltered.set(0),void this.filterKey.set("");this.filterKey.set(e.label);const n=this._data();if(!n)return;let c=0,s=0;if("suffix"===e.filterBy){const o=n.documentsBySuffix;e.values.forEach(l=>{const g=l.toLowerCase();c+=o[g]?.size||0,s+=o[g]?.count||0})}else if("contentCat"===e.filterBy){const o=n.documentsByContentCategory;e.values.forEach(l=>{c+=o[l]?.size||0,s+=o[l]?.count||0})}this.sizeFiltered.set(c),this.countFiltered.set(s)}handleCanvasClick(){this.sizeFiltered.set(0),this.countFiltered.set(0)}getDuplicates(){var e=this;return(0,v.A)(function*(){const n=e.handlers()?.subsequentBlockRequest;if(void 0===n)return void console.warn("No handler for subsequent block request");const c=e.handlers()?.documentDuplicatesRequest;if(!c)return void console.warn("No documentDuplicatesRequest handler defined");const s=yield c();n({id:"document-duplicates",config:e.config(),data:s,focusOnAdd:!0},"Duplicates",!0)})()}static \u0275fac=function(n){return new(n||i)};static \u0275cmp=t.VBU({type:i,selectors:[["cue-block-project-documents"]],inputs:{data:[1,"data"],config:[1,"config"]},decls:19,vars:13,consts:[["direction","column"],[1,"container",3,"click"],["id","chart-1",1,"chart"],[3,"data","config"],["id","chart-2",1,"chart"],["direction","column","align","center",1,"stats"],[1,"stat-line"],["size","l",3,"innerHTML"],["size","l",1,"clickable",3,"innerHTML"],["direction","column","align","center",1,"sizes"],["size","l"],[3,"navigated","data","config"],["size","l",1,"clickable",3,"click","innerHTML"]],template:function(n,c){if(1&n&&(t.j41(0,"cue-flexcontainer",0)(1,"div",1),t.bIt("click",function(){return c.handleCanvasClick()}),t.SS7(2)(3)(4),t.j41(5,"div",2),t.nVh(6,O,1,2,"cue-block-documents-by-suffix",3),t.k0s(),t.j41(7,"div",4),t.nVh(8,N,1,2,"cue-block-documents-by-content-category",3),t.k0s(),t.j41(9,"cue-flexcontainer",5)(10,"div",6),t.nVh(11,E,2,6,"cue-typography",7),t.k0s(),t.j41(12,"div",6),t.nVh(13,A,2,6,"cue-typography",8),t.k0s()(),t.j41(14,"cue-flexcontainer",9)(15,"div",6),t.nVh(16,G,2,1,"cue-typography",10),t.k0s(),t.j41(17,"div",6),t.nVh(18,$,2,3,"cue-typography",10),t.k0s()()()()),2&n){let s;t.R7$(2);const o=t.bH3(c.bySuffix());t.R7$();const l=t.bH3(c.byContentCategory());t.R7$(),t.bH3(c.configWithFilterResolver()),t.R7$(),t.xc7("opacity",o?1:0),t.R7$(),t.vxM(o?6:-1),t.R7$(),t.xc7("opacity",l?1:0),t.R7$(),t.vxM(l?8:-1),t.R7$(3),t.vxM(null!==c.openFormatPct()?11:-1),t.R7$(2),t.vxM((s=c.duplicateCount())?13:-1,s),t.R7$(3),t.vxM(c.size()>0?16:-1),t.R7$(2),t.vxM(c.sizeFiltered()>0?18:-1)}},dependencies:[P.Typography,z.n,_.o,C.Y,S.Kj],styles:[".container[_ngcontent-%COMP%]{height:700px;width:100%;position:relative;overflow:hidden}.chart[_ngcontent-%COMP%]{position:absolute;width:470px;height:350px;transition:opacity .5s ease-in-out}#chart-1[_ngcontent-%COMP%]{top:20px;left:0}#chart-2[_ngcontent-%COMP%]{bottom:50px;right:0}.stats[_ngcontent-%COMP%]{position:absolute;right:230px;top:180px;transform:translate(50%);min-height:80px;justify-content:center}.sizes[_ngcontent-%COMP%]{position:absolute;left:230px;bottom:180px;transform:translate(-50%);min-height:80px;justify-content:center}.stat-line[_ngcontent-%COMP%]{height:32px;display:flex;align-items:center;justify-content:center}.clickable[_ngcontent-%COMP%]:hover{cursor:pointer;transform:scale(1.05)}"],changeDetection:0})}return i})()},1493(F,B,a){function v(f,r=!1,u=1){const y=r?1e3:1024;if(Math.abs(f)<y)return f+" B";const _=r?["kB","MB","GB","TB","PB","EB","ZB","YB"]:["KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"];let C=-1;const D=10**u;do{f/=y,++C}while(Math.round(Math.abs(f)*D)/D>=y&&C<_.length-1);return f.toFixed(u)+" "+_[C]}a.d(B,{b:()=>v})}}]);
package/7056.js DELETED
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkcue_ui=self.webpackChunkcue_ui||[]).push([[4613,7056],{4613(x,v,l){l.d(v,{Logo:()=>o});var u=l(7705),a=l(5547),t=l(5802),r=l(2271),h=l(6170);let o=(()=>{class g{size=(0,u.hFB)("m");sizeMap={xs:"40px",s:"80px",m:"160px",l:"222px",xl:"320px"};active=(0,u.hFB)(!0,{transform:u.L39});continuous=(0,u.hFB)(!1,{transform:u.L39});mode=(0,u.hFB)("default");isDarkMode=(0,u.geq)(!1);handleDarkModeChange(i){this.isDarkMode.set(i),-1===this.raf&&this.animate()}colorA=(0,r.EW)(()=>this.isDarkMode()?[221,246,18]:[18,28,43]);colorB=[0,202,204];paths=[];raf=-1;playfulPhase="idle";playfulIdleUntil=0;playfulAnimStart=0;playfulAnimDuration=2e3;playfulRetractAmount=.3;appearTime=0;disappearTime=0;tip=0;toe=0;mix=[0,0,0];norm=0;animate=i=>{if(void 0!==i){const e=5e-4*(i-this.appearTime);"glow"===this.mode()?this.tip=e%1:"playful"!==this.mode()&&(this.tip=Math.min(1,e),this.active()||(this.toe=Math.min(1,6e-4*(i-this.disappearTime))))}if("playful"===this.mode())return void 0!==i&&("idle"===this.playfulPhase?i>=this.playfulIdleUntil&&(this.playfulPhase="animating",this.playfulAnimStart=i,this.playfulRetractAmount=.2+.75*Math.random(),this.playfulAnimDuration=2*this.playfulRetractAmount/5e-4):(i-this.playfulAnimStart)/this.playfulAnimDuration>=1&&(this.playfulPhase="idle",this.playfulIdleUntil=i+1e3+4e3*Math.random())),this.renderPlayful(i),void(void 0!==i&&(this.raf=requestAnimationFrame(this.animate)));if("glow"===this.mode()){const e=.06666666666666667,n=this.rgbToSvg(this.colorA());return this.paths.forEach((s,d)=>{this.norm=1/this.paths.length*d;let m=this.tip-this.norm;if(m<-(1-e)&&(m+=1),m>=0&&m<e){const p=1-m/e;s.setAttribute("stroke",this.rgbToSvg(this.colorB)),s.setAttribute("stroke-opacity",p.toFixed(3))}else s.setAttribute("stroke",n),s.setAttribute("stroke-opacity","0.005")}),void(this.raf=requestAnimationFrame(this.animate))}if(this.paths.forEach((e,n)=>{this.norm=1/this.paths.length*n,this.mix=this.mixRgb(this.colorA(),this.colorB,Math.max(0,Math.min(1,15*(this.tip-this.norm)))),e.setAttribute("stroke",this.tip*this.paths.length>n&&(this.active()||this.toe*this.paths.length<n)?this.rgbToSvg(this.mix):"transparent")}),this.tip>=1&&(this.active()||this.toe>=1))return this.continuous()?void setTimeout(()=>{this.appearTime=performance.now(),this.tip=0,this.toe=0,this.raf=requestAnimationFrame(this.animate)},500):void(this.raf=-1);this.raf=requestAnimationFrame(this.animate)};activate(){this.appearTime=performance.now(),"playful"===this.mode()&&(this.playfulPhase="intro",this.playfulAnimStart=this.appearTime),this.animate(this.appearTime)}deactivate(){this.disappearTime=performance.now(),-1===this.raf&&this.animate(this.disappearTime)}renderPlayful(i){if(void 0===i)return void this.renderPlayfulDraw(1);const e=Math.min(1,5e-4*(i-this.playfulAnimStart));if("intro"===this.playfulPhase)this.renderPlayfulDraw(e),e>=1&&(this.playfulPhase="idle",this.playfulIdleUntil=i+1e3+4e3*Math.random());else if("idle"===this.playfulPhase)this.renderPlayfulDraw(1);else{const n=Math.min(1,(i-this.playfulAnimStart)/this.playfulAnimDuration),d=1-this.playfulRetractAmount*(1-Math.cos(2*n*Math.PI))/2;this.renderPlayfulDraw(d)}}renderPlayfulDraw(i){const e=this.paths.length,n=this.colorA();this.paths.forEach((s,d)=>{if(this.norm=d/e,i*e>d){const m=Math.max(0,Math.min(1,15*(i-this.norm)));this.mix=this.mixRgb(n,this.colorB,m),s.setAttribute("stroke",this.rgbToSvg(this.mix)),s.setAttribute("stroke-opacity","1")}else s.setAttribute("stroke","transparent")})}mixChannel(i,e,n){return parseInt((i*n+e*(1-n)).toFixed())}mixRgb(i,e,n){return[this.mixChannel(i[0],e[0],n),this.mixChannel(i[1],e[1],n),this.mixChannel(i[2],e[2],n)]}rgbToSvg(i){return`rgb(${i[0]},${i[1]},${i[2]})`}constructor(){(0,t.QZP)(()=>{"glow"===this.mode()||"playful"===this.mode()||this.active()?this.activate():this.deactivate()}),(0,t.QZP)(()=>{this.isDarkMode(),this.animate()});const i=(0,t.WQX)(a.aKT);(0,a.mal)({read:()=>{if(this.paths.length)return;const e=i.nativeElement.querySelector("svg"),n=i.nativeElement.querySelector("#original-path");if(!n)return;const s=n.getTotalLength(),m=[];for(let p=0;p<400;p++){const f=n.getPointAtLength(s/400*p);m.push({x:parseFloat(f.x.toFixed(2)),y:parseFloat(f.y.toFixed(2))})}m.push(n.getPointAtLength(s)),m.reverse(),m.forEach((p,f)=>{if(0===f||1===f)return;const M=document.createElementNS("http://www.w3.org/2000/svg","path");M.setAttribute("d",`M${m[f-2].x},${m[f-2].y}L${m[f-1].x},${m[f-1].y}L${p.x},${p.y}`),M.setAttribute("fill","none"),M.setAttribute("stroke","transparent"),M.setAttribute("stroke-width",n?.getAttribute("stroke-width")||"1"),M.setAttribute("stroke-miterlimit",n?.getAttribute("stroke-miterlimit")||"1"),e.appendChild(M),this.paths.push(M)})}})}ngOnDestroy(){this.paths=[],cancelAnimationFrame(this.raf),this.raf=-1}static \u0275fac=function(e){return new(e||g)};static \u0275cmp=a.VBU({type:g,selectors:[["cue-logo"]],hostVars:2,hostBindings:function(e,n){2&e&&a.xc7("width",n.sizeMap[n.size()])},inputs:{size:[1,"size"],active:[1,"active"],continuous:[1,"continuous"],mode:[1,"mode"],isDarkMode:[1,"isDarkMode"]},outputs:{isDarkMode:"isDarkModeChange"},decls:2,vars:0,consts:[["cueDarkMode","","xmlns","http://www.w3.org/2000/svg","viewBox","0 0 221.545 86.191","width","222","height","86","overflow","visible",3,"darkModeChange"],["id","original-path","fill","none","stroke","transparent","stroke-miterlimit","10","stroke-width","12","d","M216.046 56.638s-10.561 24.201-36.192 22.991c-25.631-1.21-22.771-24.751-20.351-37.622 2.42-12.871 10.451-20.351 16.831-18.041 6.283 2.275 8.03 9.68 2.09 21.891-5.94 12.211-21.341 37.567-35.862 33.992-12.413-3.056-13.281-23.162-13.281-23.162V29.762v26.925c0 14.471-12.47 23.212-24.672 23.212s-24.672-8.301-24.672-23.212V29.829l-.006.105v13.031c0 20.416-16.55 36.966-36.966 36.966S6 63.381 6 42.966 22.55 6 42.966 6c6.91 0 13.377 1.896 18.91 5.196"]],template:function(e,n){1&e&&(t.qSk(),a.j41(0,"svg",0),a.bIt("darkModeChange",function(d){return n.handleDarkModeChange(d)}),a.nrm(1,"path",1),a.k0s())},dependencies:[h.R],styles:["[_nghost-%COMP%]{display:block}svg[_ngcontent-%COMP%]{flex:1;display:block;width:100%;height:auto}"]})}return g})()},6279(x,v,l){l.d(v,{D:()=>c});var u=l(7705),a=l(2271),t=l(2245),r=l(7089),h=l(5547);const o=[[["","before",""]],"*",[["","after",""]]],g=["[before]","*","[after]"];let c=(()=>{class i{selected=(0,u.hFB)(!1);disabled=(0,u.hFB)(!1);size=(0,u.hFB)("s");tooltip=(0,u.hFB)("");getClass=(0,a.EW)(()=>this.selected()?"selected":"");getTabindex=(0,a.EW)(()=>this.disabled()||this.selected()?"-1":"0");getStyles=(0,a.EW)(()=>`min-width: var(--cue-menu-item-${this.size()}-min-width);\n width: 100%;`);static \u0275fac=function(s){return new(s||i)};static \u0275cmp=h.VBU({type:i,selectors:[["cue-menu-item"]],inputs:{selected:[1,"selected"],disabled:[1,"disabled"],size:[1,"size"],tooltip:[1,"tooltip"]},ngContentSelectors:g,decls:6,vars:8,consts:[["tooltipPlacement","right",3,"disabled","cueTooltip"],[3,"noWrap"],[1,"flexer"]],template:function(s,d){1&s&&(h.NAR(o),h.j41(0,"button",0),h.SdG(1),h.j41(2,"cue-typography",1),h.SdG(3,1),h.k0s(),h.nrm(4,"div",2),h.SdG(5,2),h.k0s()),2&s&&(h.Aen(d.getStyles()),h.HbH(d.getClass()),h.Y8G("disabled",d.disabled())("cueTooltip",d.tooltip()),h.BMQ("tabIndex",d.getTabindex()),h.R7$(2),h.Y8G("noWrap",!0))},dependencies:[t.Typography,r.d],styles:["[_nghost-%COMP%]{display:contents}button[_ngcontent-%COMP%]{appearance:none;font:inherit;display:flex;border:0;align-items:center;justify-content:start;background:transparent;height:var(--cue-menu-item-height);border-radius:var(--cue-menu-item-border-radius);padding:0 var(--cue-menu-item-padding-x);gap:0 var(--cue-menu-item-gap);--cue-icon-width: var(--cue-menu-item-icon-size);background:var(--cue-menu-item-background-color)}button[_ngcontent-%COMP%]:focus{outline:none}button[_ngcontent-%COMP%]:hover:not(:disabled), button[_ngcontent-%COMP%]:focus:not(:disabled){background:var(--cue-menu-item-focus-background-color)}button.selected[_ngcontent-%COMP%]{background:var(--cue-menu-item-selected-background-color)!important}button[_ngcontent-%COMP%]:disabled{opacity:.5;cursor:default!important;background:var(--cue-menu-item-background-color)!important}button[_ngcontent-%COMP%]:hover{cursor:pointer}button[_ngcontent-%COMP%]:disabled:hover{cursor:not-allowed}.flexer[_ngcontent-%COMP%]{flex:1}"]})}return i})()},356(x,v,l){l.d(v,{M:()=>h});var u=l(7705),a=l(2271),t=l(5547);const r=["*"];let h=(()=>{class o{maxHeight=(0,u.hFB)(void 0);size=(0,u.hFB)(void 0);maxHeightStyle=(0,a.EW)(()=>{const c=this.maxHeight();if(void 0!==c)return"number"==typeof c?`${c}px`:c});static \u0275fac=function(i){return new(i||o)};static \u0275cmp=t.VBU({type:o,selectors:[["cue-menu-wrap"]],hostVars:4,hostBindings:function(i,e){2&i&&(t.HbH(e.size()?"size-"+e.size():""),t.xc7("max-height",e.maxHeightStyle()))},inputs:{maxHeight:[1,"maxHeight"],size:[1,"size"]},ngContentSelectors:r,decls:2,vars:0,consts:[[1,"cue-menu-wrap-inner"]],template:function(i,e){1&i&&(t.NAR(),t.rj2(0,"div",0),t.SdG(1),t.eux())},styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:var(--cue-menu-gap);padding:var(--cue-menu-padding-y) var(--cue-menu-padding-x);border-radius:var(--cue-menu-border-radius);border:1px solid var(--cue-menu-border-color);background:var(--cue-menu-background-color);color:var(--cue-menu-foreground-color);max-height:var(--cue-menu-max-height);overflow-y:auto}.size-s[_nghost-%COMP%]{font-size:13px;--cue-menu-item-height: var(--cue-dim-elem-s);--cue-menu-item-padding-x: 10px;--cue-menu-item-gap: 10px;--cue-menu-item-icon-size: 16px;--cue-menu-padding-y: 6px;--cue-menu-padding-x: 6px;--cue-menu-gap: 4px}.size-xs[_nghost-%COMP%]{font-size:12px;--cue-menu-item-height: var(--cue-dim-elem-xs);--cue-menu-item-padding-x: 8px;--cue-menu-item-gap: 8px;--cue-menu-item-icon-size: 14px;--cue-menu-padding-y: 4px;--cue-menu-padding-x: 4px;--cue-menu-gap: 2px}.cue-menu-wrap-inner[_ngcontent-%COMP%]{--cue-input-value-color: var(--cue-menu-foreground-color);width:100%;height:100%;display:flex;flex-direction:column;gap:var(--cue-menu-gap)}"]})}return o})()},6117(x,v,l){l.d(v,{W:()=>i});var u=l(7705),a=l(7023),t=l(5547);const r=["contextMenuDirective"],h=[[["","trigger",""]],[["","menu",""]],[["","menu",""]]],o=["[trigger]","[menu]","[menu]"];function g(e,n){1&e&&t.SdG(0,1)}function c(e,n){1&e&&t.SdG(0,2)}let i=(()=>{class e{contextMenuData=(0,u.hFB)({});trigger=(0,u.hFB)("leftclick");positioning=(0,u.hFB)(void 0);size=(0,u.hFB)("m");contextEnabled=(0,u.hFB)(!0);menuClosed=(0,u.CGW)();keepOpenOnInsideClick=(0,u.hFB)(!1);contextMenuDirective=(0,u.ebz)("contextMenuDirective",{read:a.Q});onMenuClose(){this.menuClosed.emit()}closeMenu(){const s=this.contextMenuDirective();s&&s.closeContextMenu()}static \u0275fac=function(d){return new(d||e)};static \u0275cmp=t.VBU({type:e,selectors:[["cue-menu"]],viewQuery:function(d,m){1&d&&t.wEZ(m.contextMenuDirective,r,5,a.Q),2&d&&t.NyB()},inputs:{contextMenuData:[1,"contextMenuData"],trigger:[1,"trigger"],positioning:[1,"positioning"],size:[1,"size"],contextEnabled:[1,"contextEnabled"],keepOpenOnInsideClick:[1,"keepOpenOnInsideClick"]},outputs:{menuClosed:"menuClosed"},ngContentSelectors:o,decls:7,vars:7,consts:[["contextMenuDirective",""],["menuTemplate",""],[3,"contextMenuClose","cueContextMenu","contextMenuData","cueContextEnabled","trigger","positioning","menuSize","keepOpenOnInsideClick"]],template:function(d,m){if(1&d&&(t.NAR(h),t.j41(0,"div",2,0),t.bIt("contextMenuClose",function(){return m.onMenuClose()}),t.SdG(2),t.k0s(),t.DNE(3,g,1,0,"ng-template",null,1,t.C5r)(5,c,1,0,"ng-template",null,1,t.C5r)),2&d){const p=t.sdS(4);t.Y8G("cueContextMenu",p)("contextMenuData",m.contextMenuData)("cueContextEnabled",m.contextEnabled())("trigger",m.trigger())("positioning",m.positioning())("menuSize",m.size())("keepOpenOnInsideClick",m.keepOpenOnInsideClick())}},dependencies:[a.Q],styles:["[_nghost-%COMP%]{display:block}"]})}return e})()},7023(x,v,l){l.d(v,{Q:()=>g});var u=l(7705),a=l(5547),t=l(5802),r=l(9769),h=l(9595);let o=(()=>{class c{template=u.hFB.required();context=(0,u.hFB)({});positioning=(0,u.hFB)("bottomright");size=(0,u.hFB)("m");menuClick=(0,u.CGW)();positioningClass=()=>this.positioning();static \u0275fac=function(n){return new(n||c)};static \u0275cmp=a.VBU({type:c,selectors:[["cue-context-menu-container"]],hostVars:2,hostBindings:function(n,s){2&n&&a.HbH("clickoutside-ignore size-"+s.size()+" "+s.positioning())},inputs:{template:[1,"template"],context:[1,"context"],positioning:[1,"positioning"],size:[1,"size"]},outputs:{menuClick:"menuClick"},decls:2,vars:4,consts:[[1,"context-menu-wrapper","clickoutside-ignore",3,"click"],[3,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(n,s){1&n&&(a.j41(0,"div",0),a.bIt("click",function(){return s.menuClick.emit()}),a.eu8(1,1),a.k0s()),2&n&&(a.HbH(s.positioningClass()),a.R7$(),a.Y8G("ngTemplateOutlet",s.template())("ngTemplateOutletContext",s.context()))},dependencies:[r.MD,r.T3],styles:["[_nghost-%COMP%]{position:fixed;pointer-events:auto;z-index:10000;min-width:10px;min-height:10px}.topleft[_nghost-%COMP%]{transform:translate(-100%,-100%)}.topright[_nghost-%COMP%]{transform:translateY(-100%)}.bottomleft[_nghost-%COMP%]{transform:translate(-100%)}.bottomright[_nghost-%COMP%]{transform:translate(0)}.rightstart[_nghost-%COMP%]{transform:translate(0)}.rightend[_nghost-%COMP%]{transform:translateY(-100%)}.leftstart[_nghost-%COMP%]{transform:translate(-100%)}.leftend[_nghost-%COMP%]{transform:translate(-100%,-100%)}.size-s[_nghost-%COMP%]{font-size:13px;--cue-menu-item-height: var(--cue-dim-elem-s);--cue-menu-item-padding-x: 10px;--cue-menu-item-gap: 10px;--cue-menu-item-icon-size: 16px;--cue-menu-padding-y: 6px;--cue-menu-padding-x: 6px;--cue-menu-gap: 4px}.size-xs[_nghost-%COMP%]{font-size:12px;--cue-menu-item-height: var(--cue-dim-elem-xs);--cue-menu-item-padding-x: 8px;--cue-menu-item-gap: 8px;--cue-menu-item-icon-size: 14px;--cue-menu-padding-y: 4px;--cue-menu-padding-x: 4px;--cue-menu-gap: 2px}.context-menu-wrapper[_ngcontent-%COMP%]{pointer-events:auto;min-width:150px;min-height:10px;cursor:pointer}"]})}return c})(),g=(()=>{class c{elementRef=(0,t.WQX)(a.aKT);applicationRef=(0,t.WQX)(a.o8S);environmentInjector=(0,t.WQX)(t.uvJ);mousePressHandler=h.B.getInstance();static openMenus=[];cueContextMenu=u.hFB.required();contextMenuData=(0,u.hFB)();cueContextEnabled=(0,u.hFB)(!0);trigger=(0,u.hFB)("rightclick");positioning=(0,u.hFB)(void 0);positionAtCursor=(0,u.hFB)(!1);menuSize=(0,u.hFB)("m");keepOpenOnInsideClick=(0,u.hFB)(!1);contextMenuOpen=(0,u.CGW)();contextMenuClose=(0,u.CGW)();contextMenuRef=null;documentClickHandlerAttached=!1;documentClickHandler=this.onDocumentClick.bind(this);documentScrollHandler=this.onDocumentScroll.bind(this);hoverTimeout=null;closeTimeout=null;hoverDelay=150;menuMouseEnterHandler=null;menuMouseLeaveHandler=null;boundOnShortRightPress=this.onShortRightPress.bind(this);boundOnShortLeftPress=this.onShortLeftPress.bind(this);boundOnLongRightPress=this.onLongRightPress.bind(this);boundOnLongLeftPress=this.onLongLeftPress.bind(this);constructor(){(0,t.QZP)(()=>{!this.cueContextEnabled()&&this.contextMenuRef&&setTimeout(()=>{this.contextMenuRef&&this.closeContextMenu()},0)})}ngOnInit(){const e=document.querySelectorAll("cue-context-menu-container");if(e.length>0){const n=new Set(c.openMenus.filter(s=>s.contextMenuRef).map(s=>s.contextMenuRef.location.nativeElement));e.forEach(s=>{s.parentNode&&!n.has(s)&&s.parentNode.removeChild(s)})}("rightclick"===this.trigger()||"both"===this.trigger()||"longpress"===this.trigger())&&this.mousePressHandler.setSuppressNativeContextMenu(!0),this.mousePressHandler.events.addListener("shortPressedRight",this.boundOnShortRightPress),this.mousePressHandler.events.addListener("shortPressedLeft",this.boundOnShortLeftPress),"longpress"===this.trigger()&&(this.mousePressHandler.events.addListener("longPressedRight",this.boundOnLongRightPress),this.mousePressHandler.events.addListener("longPressedLeft",this.boundOnLongLeftPress)),"hover"===this.trigger()&&(this.elementRef.nativeElement.addEventListener("mouseenter",this.onMouseEnter.bind(this)),this.elementRef.nativeElement.addEventListener("mouseleave",this.onMouseLeave.bind(this)))}onShortRightPress(e){if(this.isEventOnThisElement(e)&&("rightclick"===this.trigger()||"both"===this.trigger())){if(this.contextMenuRef)return e.preventDefault(),e.stopPropagation(),void this.closeContextMenu();if(!this.cueContextEnabled?.())return;e.preventDefault(),e.stopPropagation(),this.showContextMenu(e)}}onShortLeftPress(e){if(this.isEventOnThisElement(e)&&("leftclick"===this.trigger()||"both"===this.trigger())){if(this.contextMenuRef)return e.preventDefault(),e.stopPropagation(),void this.closeContextMenu();if(!this.cueContextEnabled?.())return;e.preventDefault(),e.stopPropagation(),this.showContextMenu(e)}}onLongRightPress(e){this.cueContextEnabled?.()&&this.isEventOnThisElement(e)&&("longpress"===this.trigger()||"rightclick"===this.trigger()||"both"===this.trigger())&&(e.preventDefault(),e.stopPropagation(),this.showContextMenu(e))}onLongLeftPress(e){this.cueContextEnabled?.()&&this.isEventOnThisElement(e)&&("longpress"===this.trigger()||"leftclick"===this.trigger()||"both"===this.trigger())&&(e.preventDefault(),e.stopPropagation(),this.showContextMenu(e))}isEventOnThisElement(e){return this.elementRef.nativeElement.contains(e.target)}onMouseEnter(e){!this.cueContextEnabled?.()||"hover"!==this.trigger()||(this.hoverTimeout&&(clearTimeout(this.hoverTimeout),this.hoverTimeout=null),this.closeTimeout&&(clearTimeout(this.closeTimeout),this.closeTimeout=null),c.openMenus.slice().forEach(n=>{n!==this&&(n.contextMenuRef?.location.nativeElement?.contains(this.elementRef.nativeElement)||n.closeContextMenu())}),this.contextMenuRef||(this.hoverTimeout=setTimeout(()=>{this.showContextMenu(e)},this.hoverDelay)))}onMouseLeave(e){!this.cueContextEnabled?.()||"hover"!==this.trigger()||(this.hoverTimeout&&(clearTimeout(this.hoverTimeout),this.hoverTimeout=null),this.closeTimeout&&(clearTimeout(this.closeTimeout),this.closeTimeout=null),this.closeTimeout=setTimeout(()=>{this.contextMenuRef&&this.closeContextMenu()},this.hoverDelay))}onDocumentClick(e){if(!this.contextMenuRef)return;const s=this.contextMenuRef.location.nativeElement.contains(e.target),d=this.elementRef.nativeElement.contains(e.target);if(!s&&!d){if(this.keepOpenOnInsideClick()){const m=e.target;if(c.openMenus.some(f=>{const M=f.contextMenuRef?.location.nativeElement;return!!M&&M.contains(m)}))return}this.closeContextMenu()}}onDocumentScroll(e){this.contextMenuRef&&(this.contextMenuRef.location.nativeElement.contains(e.target)||this.closeContextMenu())}showContextMenu(e){const n=this.elementRef.nativeElement.getBoundingClientRect();c.openMenus.forEach(M=>{M!==this&&(M.contextMenuRef?.location.nativeElement?.contains(this.elementRef.nativeElement)||M.closeContextMenu())}),this.closeContextMenu();const s=this.calculatePositioning(e,n),d=this.cueContextMenu();if(!(d&&d instanceof a.C4Q))return void console.error("Invalid template provided to context menu");this.contextMenuRef=(0,u.a0P)(o,{environmentInjector:this.environmentInjector}),this.contextMenuRef.setInput("template",d),this.contextMenuRef.setInput("context",{$implicit:this.contextMenuData(),event:e}),this.contextMenuRef.setInput("positioning",s),this.contextMenuRef.setInput("size",this.menuSize());const m=this.contextMenuRef.instance.menuClick.subscribe(()=>{this.closeContextMenu()}),p=this.contextMenuRef.location.nativeElement;p.style.zIndex="10000","hover"!==this.trigger()||this.positionAtCursor()?(p.style.left=`${e.clientX}px`,p.style.top=`${e.clientY}px`):this.positionSubmenu(p,s,n),this.applicationRef.attachView(this.contextMenuRef.hostView),(this.elementRef.nativeElement.closest("dialog")||document.body).appendChild(p),this.contextMenuRef._menuClickSubscription=m,"hover"===this.trigger()&&(this.menuMouseEnterHandler=()=>{this.closeTimeout&&(clearTimeout(this.closeTimeout),this.closeTimeout=null)},this.menuMouseLeaveHandler=()=>{this.closeTimeout&&(clearTimeout(this.closeTimeout),this.closeTimeout=null),this.closeTimeout=setTimeout(()=>{this.contextMenuRef&&this.closeContextMenu()},this.hoverDelay)},p.addEventListener("mouseenter",this.menuMouseEnterHandler),p.addEventListener("mouseleave",this.menuMouseLeaveHandler)),this.documentClickHandlerAttached||(document.addEventListener("mousedown",this.documentClickHandler,!0),document.addEventListener("contextmenu",this.documentClickHandler,!0),document.addEventListener("scroll",this.documentScrollHandler,!0),this.documentClickHandlerAttached=!0),c.openMenus.includes(this)||c.openMenus.push(this),this.contextMenuOpen.emit({event:e,data:this.contextMenuData(),suggestedPositioning:s})}calculatePositioning(e,n){const s=this.positioning();if(s)return s;if("hover"===this.trigger()&&!this.positionAtCursor())return this.calculateSubmenuPositioning(n);const d=window.innerWidth,m=window.innerHeight,f=e.clientX>d-200,M=e.clientY>m-200;return f&&M?"topleft":f?"bottomleft":M?"topright":"bottomright"}calculateSubmenuPositioning(e){const n=window.innerWidth,s=window.innerHeight,C=n-e.right>=300,_=s-e.bottom>=150;return C&&_?"rightstart":C&&!_?"rightend":!C&&_?"leftstart":"leftend"}positionSubmenu(e,n,s){const m=this.elementRef.nativeElement.closest?.("cue-context-menu-container")?.getBoundingClientRect()??s;switch(n){case"rightstart":default:e.style.left=`${m.right}px`,e.style.top=`${s.top}px`;break;case"rightend":e.style.left=`${m.right}px`,e.style.top=`${s.bottom}px`;break;case"leftstart":e.style.left=`${m.left}px`,e.style.top=`${s.top}px`;break;case"leftend":e.style.left=`${m.left}px`,e.style.top=`${s.bottom}px`}requestAnimationFrame(()=>{if(!e.isConnected)return;const f=(e.querySelector(".context-menu-wrapper")??e).getBoundingClientRect(),M=window.innerWidth,C=window.innerHeight;let E=parseFloat(e.style.left)||0,y=parseFloat(e.style.top)||0;f.right>M-8&&(E-=f.right-(M-8)),f.left<8&&(E+=8-f.left),f.bottom>C-8&&(y-=f.bottom-(C-8)),f.top<8&&(y+=8-f.top),e.style.left=`${E}px`,e.style.top=`${y}px`})}closeContextMenu(){if(this.contextMenuRef){const n=this.contextMenuRef.location.nativeElement;this.menuMouseEnterHandler&&(n.removeEventListener("mouseenter",this.menuMouseEnterHandler),this.menuMouseEnterHandler=null),this.menuMouseLeaveHandler&&(n.removeEventListener("mouseleave",this.menuMouseLeaveHandler),this.menuMouseLeaveHandler=null),this.documentClickHandlerAttached&&(document.removeEventListener("mousedown",this.documentClickHandler,!0),document.removeEventListener("contextmenu",this.documentClickHandler,!0),document.removeEventListener("scroll",this.documentScrollHandler,!0),this.documentClickHandlerAttached=!1);const s=this.contextMenuRef._menuClickSubscription;s&&s.unsubscribe(),this.closeTimeout&&(clearTimeout(this.closeTimeout),this.closeTimeout=null);try{n.parentNode?n.parentNode.removeChild(n):document.body.contains(n)&&document.body.removeChild(n)}catch{try{n.remove&&n.remove()}catch{}}this.applicationRef.detachView(this.contextMenuRef.hostView),this.contextMenuRef.destroy(),this.contextMenuRef=null,this.contextMenuClose.emit()}const e=c.openMenus.indexOf(this);e>-1&&c.openMenus.splice(e,1)}ngOnDestroy(){this.mousePressHandler.setSuppressNativeContextMenu(!1),this.mousePressHandler.events.removeListener("shortPressedRight",this.boundOnShortRightPress),this.mousePressHandler.events.removeListener("shortPressedLeft",this.boundOnShortLeftPress),this.mousePressHandler.events.removeListener("longPressedRight",this.boundOnLongRightPress),this.mousePressHandler.events.removeListener("longPressedLeft",this.boundOnLongLeftPress),"hover"===this.trigger()&&(this.elementRef.nativeElement.removeEventListener("mouseenter",this.onMouseEnter),this.elementRef.nativeElement.removeEventListener("mouseleave",this.onMouseLeave)),this.hoverTimeout&&clearTimeout(this.hoverTimeout),this.closeTimeout&&clearTimeout(this.closeTimeout),this.closeContextMenu()}static \u0275fac=function(n){return new(n||c)};static \u0275dir=a.FsC({type:c,selectors:[["","cueContextMenu",""]],inputs:{cueContextMenu:[1,"cueContextMenu"],contextMenuData:[1,"contextMenuData"],cueContextEnabled:[1,"cueContextEnabled"],trigger:[1,"trigger"],positioning:[1,"positioning"],positionAtCursor:[1,"positionAtCursor"],menuSize:[1,"menuSize"],keepOpenOnInsideClick:[1,"keepOpenOnInsideClick"]},outputs:{contextMenuOpen:"contextMenuOpen",contextMenuClose:"contextMenuClose"}})}return c})()},6170(x,v,l){l.d(v,{R:()=>h});var u=l(7705),a=l(5802),t=l(2271),r=l(5547);let h=(()=>{class o{destroyRef=(0,a.WQX)(a.abz);_isDarkMode=(0,a.vPA)(this.hasDarkClass());isDarkMode=(0,t.EW)(()=>this._isDarkMode());darkModeChange=(0,u.CGW)();constructor(){const c=new MutationObserver(i=>{i.forEach(e=>{if("attributes"===e.type&&"class"===e.attributeName){const n=this.hasDarkClass();n!==this._isDarkMode()&&this._isDarkMode.set(n)}})});c.observe(document.body,{attributes:!0,attributeFilter:["class"]}),this.destroyRef.onDestroy(()=>c.disconnect()),(0,a.QZP)(()=>{this.darkModeChange.emit(this._isDarkMode()),document.documentElement.style.colorScheme=this._isDarkMode()?"dark":"light"})}hasDarkClass(){return document.body.classList.contains("dark")}toggleDarkMode(){document.body.classList.toggle("dark")}static \u0275fac=function(i){return new(i||o)};static \u0275dir=r.FsC({type:o,selectors:[["","cueDarkMode",""]],outputs:{darkModeChange:"darkModeChange"},exportAs:["darkModeDetector"]})}return o})()},7851(x,v,l){l.d(v,{k:()=>c});var u=l(7705),a=l(5547),t=l(5802),r=l(4613),h=l(2245);function o(i,e){if(1&i&&(a.j41(0,"cue-typography",1),a.EFF(1),a.k0s()),2&i){const n=a.XpG();a.R7$(),a.JRh(n.message)}}let g=(()=>{class i{message="";static \u0275fac=function(s){return new(s||i)};static \u0275cmp=a.VBU({type:i,selectors:[["cue-logo-loader-overlay"]],decls:2,vars:1,consts:[["size","m","mode","glow"],["size","s",1,"message"]],template:function(s,d){1&s&&(a.nrm(0,"cue-logo",0),a.nVh(1,o,2,1,"cue-typography",1)),2&s&&(a.R7$(),a.vxM(d.message?1:-1))},dependencies:[r.Logo,h.Typography],styles:["[_nghost-%COMP%]{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.75rem;z-index:1000;pointer-events:none}.message[_ngcontent-%COMP%]{color:var(--color-text-secondary)}"],changeDetection:0})}return i})(),c=(()=>{class i{cueLogoLoader=(0,u.hFB)(!1);cueLogoLoaderMessage=(0,u.hFB)("");el=(0,t.WQX)(a.aKT);appRef=(0,t.WQX)(a.o8S);envInjector=(0,t.WQX)(t.uvJ);renderer=(0,t.WQX)(a.sFG);overlayRef;constructor(){(0,t.QZP)(()=>{const n=this.cueLogoLoader(),s=this.cueLogoLoaderMessage();n?(this.overlayRef||this.createOverlay(),this.overlayRef&&(this.overlayRef.instance.message=s,this.overlayRef.changeDetectorRef.markForCheck())):this.destroyOverlay()})}createOverlay(){this.overlayRef=(0,u.a0P)(g,{environmentInjector:this.envInjector}),this.appRef.attachView(this.overlayRef.hostView),this.renderer.appendChild(this.el.nativeElement,this.overlayRef.hostView.rootNodes[0])}destroyOverlay(){this.overlayRef&&(this.appRef.detachView(this.overlayRef.hostView),this.overlayRef.destroy(),this.overlayRef=void 0)}ngOnDestroy(){this.destroyOverlay()}static \u0275fac=function(s){return new(s||i)};static \u0275dir=a.FsC({type:i,selectors:[["","cueLogoLoader",""]],hostVars:2,hostBindings:function(s,d){2&s&&a.xc7("position","relative")},inputs:{cueLogoLoader:[1,"cueLogoLoader"],cueLogoLoaderMessage:[1,"cueLogoLoaderMessage"]}})}return i})()},9595(x,v,l){l.d(v,{B:()=>t});var u=l(1339);let a=(()=>{class r{static _instance;_pressTimer;_shortPressDuration=300;_longPressDuration=1e3;_pressTime;_emittedLongPress=!1;events=new u.EventEmitter;constructor(){document.addEventListener("keydown",o=>{void 0===this._pressTime&&(this._pressTime=(new Date).getTime(),this._pressTimer=setTimeout(()=>{this._handleLongPress(o.key),this._emittedLongPress=!0,clearTimeout(this._pressTimer)},this._longPressDuration),this.events.emit("holdingKey",o.key))}),document.addEventListener("keyup",o=>{void 0!==this._pressTime&&(clearTimeout(this._pressTimer),this._pressTime-(new Date).getTime()<this._shortPressDuration&&!this._emittedLongPress&&this._handleShortPress(o.key),this._reset(),this.events.emit("releasedKey",o.key))})}static getInstance(){return this._instance||(this._instance=new r),this._instance}_handleShortPress(o){"Escape"===o&&this.events.emit("shortPressedEsc"),this.events.emit("shortPressedKey",o)}_handleLongPress(o){"Escape"===o&&this.events.emit("longPressedEsc"),this.events.emit("longPressedKey",o)}_reset(){this._pressTime=void 0,this._emittedLongPress=!1}}return r})(),t=(()=>{class r{static _instance;_pressTimer;_shortPressDuration=200;_pressTime;_emittedLongPress=!1;_holdingControl=!1;_keyPressHandler=a.getInstance();_suppressNativeContextMenu=!1;events=new u.EventEmitter;constructor(){this._keyPressHandler.events.addListener("holdingKey",o=>{this._holdingControl="Control"===o}),this._keyPressHandler.events.addListener("releasedKey",o=>{"Control"===o&&(this._holdingControl=!1)}),document.addEventListener("mousedown",o=>{void 0===this._pressTime&&(this._pressTime=(new Date).getTime(),this._pressTimer=setTimeout(()=>{this._handlePress(o,"long"),this._emittedLongPress=!0,clearTimeout(this._pressTimer)},this._shortPressDuration))}),document.addEventListener("mouseup",o=>{void 0!==this._pressTime&&(clearTimeout(this._pressTimer),this._pressTime-(new Date).getTime()<this._shortPressDuration&&!this._emittedLongPress&&this._handlePress(o,"short"),this._reset())}),document.addEventListener("contextmenu",o=>{this._suppressNativeContextMenu&&(o.preventDefault(),o.stopPropagation())})}static getInstance(){return this._instance||(this._instance=new r),this._instance}setSuppressNativeContextMenu(o){this._suppressNativeContextMenu=o}get suppressNativeContextMenu(){return this._suppressNativeContextMenu}_handlePress(o,g){0===o.button&&!this._holdingControl&&this.events.emit(`${g}PressedLeft`,o),0===o.button&&this._holdingControl&&this.events.emit(`${g}PressedRight`,o),2===o.button&&this.events.emit(`${g}PressedRight`,o)}_reset(){this._pressTime=void 0,this._emittedLongPress=!1}}return r})()},2001(x,v){var l=this&&this.__spreadArrays||function(){for(var a=0,t=0,r=arguments.length;t<r;t++)a+=arguments[t].length;var h=Array(a),o=0;for(t=0;t<r;t++)for(var g=arguments[t],c=0,i=g.length;c<i;c++,o++)h[o]=g[c];return h};Object.defineProperty(v,"__esModule",{value:!0});var u=function(){return function a(){var t=this;this.events={},this.maxListeners=1/0,this.emit=function(r){for(var h=[],o=1;o<arguments.length;o++)h[o-1]=arguments[o];if(t.events[r]){for(var g=t.events[r].length,i=0,e=Array.from(t.events[r]);i<e.length;i++)e[i].apply(void 0,h);return!!g}return!1},this.on=function(r,h){return t.addListener(r,h),t},this.once=function(r,h){var o=function(){for(var g=[],c=0;c<arguments.length;c++)g[c]=arguments[c];h.apply(void 0,g),t.removeListener(r,o)};return t.addListener(r,o),t},this.addListener=function(r,h){return r in t.events?t.events[r].push(h):t.events[r]=[h],t.maxListeners!==1/0&&t.maxListeners<=t.events[r].length&&console.warn('Maximum event listeners for "'+r+'" event!'),t},this.removeListener=function(r,h){if(r in t.events){var o=t.events[r].indexOf(h);-1!==o&&t.events[r].splice(o,1)}return t},this.hasListeners=function(r){return t.events[r]&&!!t.events[r].length},this.prependListener=function(r,h){return r in t.events?t.events[r].unshift(h):t.events[r]=[h],t},this.prependOnceListener=function(r,h){var o=function(){for(var g=[],c=0;c<arguments.length;c++)g[c]=arguments[c];h.apply(void 0,g),t.removeListener(r,o)};return t.prependListener(r,o),t},this.off=function(r,h){return t.removeListener(r,h)},this.removeAllListeners=function(r){return delete t.events[r],t},this.setMaxListeners=function(r){return t.maxListeners=r,t},this.getMaxListeners=function(){return t.maxListeners},this.listeners=function(r){return l(t.events[r])},this.rawListeners=function(r){return t.events[r]},this.eventNames=function(){return Object.keys(t.events)},this.listenerCount=function(r){return t.events[r]&&t.events[r].length||0}}}();v.EventEmitter=u},1339(x,v,l){function u(a){for(var t in a)v.hasOwnProperty(t)||(v[t]=a[t])}Object.defineProperty(v,"__esModule",{value:!0}),u(l(9146)),u(l(2001))},9146(x,v){Object.defineProperty(v,"__esModule",{value:!0}),v.asTypedEventEmitter=function l(u){return u}}}]);