@qaecy/cue-ui 0.0.54 → 0.0.55

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qaecy/cue-ui",
3
- "version": "0.0.54",
3
+ "version": "0.0.55",
4
4
  "description": "QAECY UI Web Components",
5
5
  "keywords": [
6
6
  "web-components",
package/1830.js DELETED
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkcue_ui=self.webpackChunkcue_ui||[]).push([[1830],{2014(H,N,g){g.d(N,{z:()=>n});var I=g(7705),a=g(2271),p=g(5547);const b=["*"];let n=(()=>{class m{justify=(0,I.hFB)("start");size=(0,I.hFB)("l");widthStyle=(0,a.EW)(()=>`var(--cue-button-label-padding-${this.size()}-x)`);static \u0275fac=function(T){return new(T||m)};static \u0275cmp=p.VBU({type:m,selectors:[["cue-button-padder"]],inputs:{justify:[1,"justify"],size:[1,"size"]},ngContentSelectors:b,decls:2,vars:4,template:function(T,q){1&T&&(p.NAR(),p.rj2(0,"div"),p.SdG(1),p.eux()),2&T&&p.xc7("justify-content",q.justify())("min-width",q.widthStyle())},styles:["div[_ngcontent-%COMP%]{display:flex;align-items:center;min-height:1px}"]})}return m})()},7517(H,N,g){g.d(N,{P:()=>G});var I=g(7705),a=g(2271),p=g(2245),b=g(1359),n=g(5381),m=g(5547),d=g(5802);const _=(k,S)=>S.category;function T(k,S){if(1&k){const E=m.RV6();m.j41(0,"cue-flexcontainer",1)(1,"cue-checkbox",2),m.bIt("checkedChange",function(){d.eBV(E);const M=m.XpG();return d.Njj(M.toggleAll())}),m.k0s()()}if(2&k){const E=m.XpG();m.R7$(),m.Y8G("checked",E.allVisible())}}function q(k,S){if(1&k&&(m.j41(0,"cue-typography",3),m.EFF(1),m.k0s()),2&k){const E=m.XpG().$implicit;m.R7$(),m.JRh(E.category)}}function U(k,S){if(1&k){const E=m.RV6();m.j41(0,"cue-flexcontainer",1)(1,"cue-checkbox",4),m.bIt("checkedChange",function(){const M=d.eBV(E).$implicit,x=m.XpG(2);return d.Njj(x.toggleSingle(M))}),m.k0s(),m.j41(2,"cue-typography",5),m.bIt("click",function(){const M=d.eBV(E).$implicit,x=m.XpG(2);return d.Njj(x.toggleSingle(M))}),m.EFF(3),m.k0s()()}if(2&k){const E=S.$implicit;m.R7$(),m.Y8G("checked",E.visible)("color",E.color),m.R7$(2),m.JRh(E.label)}}function V(k,S){if(1&k&&(m.nVh(0,q,2,1,"cue-typography",3),m.Z7z(1,U,4,3,"cue-flexcontainer",1,m.Vm6)),2&k){const E=S.$implicit;m.vxM(E.category?0:-1),m.R7$(),m.Dyx(E.items)}}let G=(()=>{class k{layers=(0,I.geq)([]);visibilityChange=(0,I.CGW)();layerChange=(0,I.CGW)();visibilityAll=(0,I.CGW)();showCheckAll=(0,a.EW)(()=>this.layers().length>1);allVisible=(0,a.EW)(()=>this.layers().every(E=>E.visible));groupedLayers=(0,a.EW)(()=>{const E=[];for(const D of this.layers()){const M=D.category,x=E.find(j=>j.category===M);x?x.items.push(D):E.push({category:M,items:[D]})}return E});toggleAll(){const E=this.allVisible(),D=this.layers().map(M=>(M.visible=!E,M));this.layers.update(()=>[...D]),this.visibilityAll.emit(E),this.emitChange()}toggleSingle(E){E.visible=!E.visible,this.layerChange.emit(E),this.layers.update(()=>[...this.layers()]),this.emitChange()}emitChange(){this.visibilityChange.emit(this.layers())}static \u0275fac=function(D){return new(D||k)};static \u0275cmp=m.VBU({type:k,selectors:[["cue-layer-legend"]],inputs:{layers:[1,"layers"]},outputs:{layers:"layersChange",visibilityChange:"visibilityChange",layerChange:"layerChange",visibilityAll:"visibilityAll"},decls:4,vars:1,consts:[["direction","column"],["align","center","justify","start",2,"width","100%"],["size","s",3,"checkedChange","checked"],["variant","label",2,"margin-top","4px","opacity","0.6"],["size","s",3,"checkedChange","checked","color"],[2,"cursor","pointer",3,"click"]],template:function(D,M){1&D&&(m.j41(0,"cue-flexcontainer",0),m.nVh(1,T,2,1,"cue-flexcontainer",1),m.Z7z(2,V,3,1,null,null,_),m.k0s()),2&D&&(m.R7$(),m.vxM(M.showCheckAll()?1:-1),m.R7$(),m.Dyx(M.groupedLayers()))},dependencies:[n.n,p.Typography,b.Checkbox],encapsulation:2,changeDetection:0})}return k})()},8334(H,N,g){g.d(N,{o:()=>b});var I=g(7705),a=g(5547);const p=["*"];let b=(()=>{class n{label=I.hFB.required();active=(0,I.geq)(!1);static \u0275fac=function(_){return new(_||n)};static \u0275cmp=a.VBU({type:n,selectors:[["cue-tab"]],hostVars:1,hostBindings:function(_,T){2&_&&a.Avn("hidden",!T.active())},inputs:{label:[1,"label"],active:[1,"active"]},outputs:{active:"activeChange"},ngContentSelectors:p,decls:1,vars:0,template:function(_,T){1&_&&(a.NAR(),a.SdG(0))},styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;flex:1;min-height:0}[hidden][_nghost-%COMP%]{display:none!important}"]})}return n})()},6455(H,N,g){g.d(N,{t:()=>k});var I=g(7705),a=g(5802),p=g(2271),b=g(8334),n=g(5187),m=g(9769),d=g(5547);const _=["*"],T=(S,E)=>E.label();function q(S,E){if(1&S&&(d.j41(0,"cue-card",1),d.eu8(1,2),d.k0s()),2&S){const D=d.XpG(),M=d.sdS(3);d.Y8G("variant",D._cardVariant())("padded",!1),d.R7$(),d.Y8G("ngTemplateOutlet",M)}}function U(S,E){if(1&S&&d.eu8(0,2),2&S){d.XpG();const D=d.sdS(3);d.Y8G("ngTemplateOutlet",D)}}function V(S,E){if(1&S){const D=d.RV6();d.j41(0,"button",6),d.bIt("click",function(){const x=a.eBV(D).$index,j=d.XpG(2);return a.Njj(j.setActive(x))}),d.EFF(1),d.k0s()}if(2&S){const D=E.$implicit,M=E.$index,x=d.XpG(2);d.AVh("active",x.activeIndex()===M),d.R7$(),d.SpI(" ",D.label()," ")}}function G(S,E){if(1&S&&(d.j41(0,"div",3),d.Z7z(1,V,2,3,"button",4,T),d.k0s(),d.j41(3,"div",5),d.SdG(4),d.k0s()),2&S){const D=d.XpG();d.R7$(),d.Dyx(D.tabs())}}let k=(()=>{class S{tabs=(0,I.tEk)(b.o);activeIndex=(0,a.vPA)(0);variant=(0,I.hFB)("none");_cardVariant=(0,p.EW)(()=>"none"===this.variant()?"default":this.variant());constructor(){(0,a.QZP)(()=>{const D=this.tabs(),M=this.activeIndex();D.forEach((x,j)=>x.active.set(j===M))})}setActive(D){this.activeIndex.set(D)}static \u0275fac=function(M){return new(M||S)};static \u0275cmp=d.VBU({type:S,selectors:[["cue-tabs"]],contentQueries:function(M,x,j){1&M&&d.C6U(j,x.tabs,b.o,4),2&M&&d.NyB()},inputs:{variant:[1,"variant"]},ngContentSelectors:_,decls:4,vars:1,consts:[["inner",""],[2,"height","100%","width","100%","display","flex","flex-direction","column","overflow","hidden",3,"variant","padded"],[3,"ngTemplateOutlet"],[1,"tabs-header"],[1,"tab-button",3,"active"],[1,"tabs-content"],[1,"tab-button",3,"click"]],template:function(M,x){1&M&&(d.NAR(),d.nVh(0,q,2,3,"cue-card",1)(1,U,1,1,"ng-container",2),d.DNE(2,G,5,0,"ng-template",null,0,d.C5r)),2&M&&d.vxM("none"!==x.variant()?0:1)},dependencies:[n.Card,m.T3],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;box-sizing:border-box;border-radius:var(--cue-card-border-radius);border:1px solid var(--cue-card-border-color);background-color:var(--cue-default);color:var(--cue-defaultContrast);overflow:hidden}.tabs-header[_ngcontent-%COMP%]{display:flex;border-bottom:1px solid var(--cue-card-border-color);background-color:var(--background-color, var(--cue-default))}.tab-button[_ngcontent-%COMP%]{padding:10px 16px;background:none;border:none;border-bottom:2px solid transparent;cursor:pointer;color:inherit;font-family:var(--cue-font-family);font-size:var(--cue-font-s-size);line-height:var(--cue-font-s-line-height);opacity:.6;transition:opacity .15s,border-bottom-color .15s}.tab-button[_ngcontent-%COMP%]:hover{opacity:.9}.tab-button.active[_ngcontent-%COMP%]{border-bottom-color:currentColor;opacity:1;font-weight:500}.tabs-content[_ngcontent-%COMP%]{padding:var(--cue-card-padding-y) var(--cue-card-padding-x);flex:1;min-height:0;box-sizing:border-box;display:flex;flex-direction:column}"]})}return S})()},3067(H,N,g){g.d(N,{CueSparqlClientSdk:()=>Un});var I=g(467),a=g(5802),p=g(7705),b=g(2271),n=g(5547),m=g(9352),d=g(6019),_=g(7089),T=g(7717),q=g(5661),U=g(1096),V=g(9937),G=g(6117),k=g(356),S=g(6279);function E(t){return Array.isArray?Array.isArray(t):"[object Array]"===Fe(t)}function M(t){return null==t?"":function D(t){if("string"==typeof t)return t;if("bigint"==typeof t)return t.toString();const o=t+"";return"0"==o&&1/t==-1/0?"-0":o}(t)}function x(t){return"string"==typeof t}function j(t){return"number"==typeof t}function Se(t){return"object"==typeof t}function O(t){return null!=t}function oe(t){return!t.trim().length}function Fe(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":Object.prototype.toString.call(t)}const de="Invalid doc index: must be a non-negative integer within the bounds of the docs array",Ie=Object.prototype.hasOwnProperty;var st=class{constructor(t){this._keys=[],this._keyMap={};let o=0;t.forEach(e=>{const i=ke(e);this._keys.push(i),this._keyMap[i.id]=i,o+=i.weight}),this._keys.forEach(e=>{e.weight/=o})}get(t){return this._keyMap[t]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}};function ke(t){let o=null,e=null,i=null,s=1,r=null;if(x(t)||E(t))i=t,o=we(t),e=re(t);else{if(!Ie.call(t,"name"))throw new Error("Missing name property in key");const c=t.name;if(i=c,Ie.call(t,"weight")&&void 0!==t.weight&&(s=t.weight,s<=0))throw new Error((t=>`Property 'weight' in key '${t}' must be a positive integer`)(re(c)));o=we(c),e=re(c),r=t.getFn??null}return{path:o,id:e,weight:s,src:i,getFn:r}}function we(t){return E(t)?t:t.split(".")}function re(t){return E(t)?t.join("."):t}const v=Object.freeze({isCaseSensitive:!1,ignoreDiacritics:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(t,o)=>t.score===o.score?t.idx<o.idx?-1:1:t.score<o.score?-1:1,includeMatches:!1,findAllMatches:!1,minMatchCharLength:1,location:0,threshold:.6,distance:100,useExtendedSearch:!1,useTokenSearch:!1,tokenize:void 0,tokenMatch:"any",getFn:function ot(t,o){const e=[];let i=!1;const s=(r,c,u,l)=>{if(O(r))if(c[u]){const f=r[c[u]];if(!O(f))return;if(u===c.length-1&&(x(f)||j(f)||function Ye(t){return!0===t||!1===t||function Ke(t){return Se(t)&&null!==t}(t)&&"[object Boolean]"==Fe(t)}(f)||"bigint"==typeof f))e.push(void 0!==l?{v:M(f),i:l}:M(f));else if(E(f)){i=!0;for(let h=0,y=f.length;h<y;h+=1)s(f[h],c,u+1,h)}else c.length&&s(f,c,u+1,l)}else e.push(void 0!==l?{v:r,i:l}:r)};return s(t,x(o)?o.split("."):o,0),i?e:e[0]},ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1});var he=class{constructor({getFn:t=v.getFn,fieldNormWeight:o=v.fieldNormWeight}={}){this.norm=function rt(t=1,o=3){const e=new Map,i=Math.pow(10,o);return{get(s){let r=1,c=!1;for(let l=0;l<s.length;l++)32===s.charCodeAt(l)?c||(r++,c=!0):c=!1;if(e.has(r))return e.get(r);const u=Math.round(i/Math.pow(r,.5*t))/i;return e.set(r,u),u},clear(){e.clear()}}}(o,3),this.getFn=t,this.isCreated=!1,this.docs=[],this.keys=[],this._keysMap={},this.setIndexRecords()}setSources(t=[]){this.docs=t}setIndexRecords(t=[]){this.records=t}setKeys(t=[]){this.keys=t,this._keysMap={},t.forEach((o,e)=>{this._keysMap[o.id]=e})}create(){if(this.isCreated||!this.docs.length)return;this.isCreated=!0;const t=this.docs.length;this.records=new Array(t);let o=0;if(x(this.docs[0]))for(let e=0;e<t;e++){const i=this._createStringRecord(this.docs[e],e);i&&(this.records[o++]=i)}else for(let e=0;e<t;e++)this.records[o++]=this._createObjectRecord(this.docs[e],e);this.records.length=o,this.norm.clear()}add(t,o){if(!Number.isInteger(o)||o<0)throw new Error(de);if(x(t)){const i=this._createStringRecord(t,o);return i&&this.records.push(i),i}const e=this._createObjectRecord(t,o);return this.records.push(e),e}removeAt(t){if(!Number.isInteger(t)||t<0)throw new Error(de);for(let o=0,e=this.records.length;o<e;o+=1)if(this.records[o].i===t){this.records.splice(o,1);break}for(let o=0,e=this.records.length;o<e;o+=1)this.records[o].i>t&&(this.records[o].i-=1)}removeAll(t){const o=new Set;for(const i of t)Number.isInteger(i)&&i>=0&&o.add(i);if(0===o.size)return;this.records=this.records.filter(i=>!o.has(i.i));const e=Array.from(o).sort((i,s)=>i-s);for(const i of this.records){let s=0,r=e.length;for(;s<r;){const c=s+r>>>1;e[c]<i.i?s=c+1:r=c}i.i-=s}}getValueForItemAtKeyId(t,o){return t[this._keysMap[o]]}size(){return this.records.length}_createStringRecord(t,o){return!O(t)||oe(t)?null:{v:t,i:o,n:this.norm.get(t)}}_createObjectRecord(t,o){const e={i:o,$:{}};for(let i=0,s=this.keys.length;i<s;i++){const r=this.keys[i],c=r.getFn?r.getFn(t):this.getFn(t,r.path);if(O(c))if(E(c)){const u=[];for(let l=0,f=c.length;l<f;l+=1){const h=c[l];if(O(h))if(x(h)){if(!oe(h)){const y={v:h,i:l,n:this.norm.get(h)};u.push(y)}}else if(O(h.v)){const y=x(h.v)?h.v:M(h.v);if(!oe(y)){const C={v:y,i:h.i,n:this.norm.get(y)};u.push(C)}}}e.$[i]=u}else if(x(c)&&!oe(c)){const u={v:c,n:this.norm.get(c)};e.$[i]=u}}return e}toJSON(){return{keys:this.keys.map(({getFn:t,...o})=>o),records:this.records}}};function Be(t,o,{getFn:e=v.getFn,fieldNormWeight:i=v.fieldNormWeight}={}){const s=new he({getFn:e,fieldNormWeight:i});return s.setKeys(t.map(ke)),s.setSources(o),s.create(),s}function ct(t,{getFn:o=v.getFn,fieldNormWeight:e=v.fieldNormWeight}={}){const{keys:i,records:s}=t,r=new he({getFn:o,fieldNormWeight:e});return r.setKeys(i),r.setIndexRecords(s),r}function ut(t){const o={};for(let e=0,i=t.length;e<i;e+=1){const s=t.charAt(e);o[s]=(o[s]||0)|1<<i-e-1}return o}function fe(t){if(t.length<=1)return t;t.sort((e,i)=>e[0]-i[0]||e[1]-i[1]);const o=[t[0]];for(let e=1,i=t.length;e<i;e+=1){const s=o[o.length-1],r=t[e];r[0]<=s[1]+1?s[1]=Math.max(s[1],r[1]):o.push(r)}return o}const Pe={\u0142:"l",\u0141:"L",\u0111:"d",\u0110:"D",\u00f8:"o",\u00d8:"O",\u0127:"h",\u0126:"H",\u0167:"t",\u0166:"T",\u0131:"i",\u00df:"ss"},dt=new RegExp("["+Object.keys(Pe).join("")+"]","g"),J="function"==typeof String.prototype.normalize?t=>t.normalize("NFD").replace(/[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]/g,"").replace(dt,o=>Pe[o]):t=>t;var ge=class{constructor(t,{location:o=v.location,threshold:e=v.threshold,distance:i=v.distance,includeMatches:s=v.includeMatches,findAllMatches:r=v.findAllMatches,minMatchCharLength:c=v.minMatchCharLength,isCaseSensitive:u=v.isCaseSensitive,ignoreDiacritics:l=v.ignoreDiacritics,ignoreLocation:f=v.ignoreLocation}={}){if(this.options={location:o,threshold:e,distance:i,includeMatches:s,findAllMatches:r,minMatchCharLength:c,isCaseSensitive:u,ignoreDiacritics:l,ignoreLocation:f},t=u?t:t.toLowerCase(),t=l?J(t):t,this.pattern=t,this.chunks=[],!this.pattern.length)return;const h=(C,A)=>{this.chunks.push({pattern:C,alphabet:ut(C),startIndex:A})},y=this.pattern.length;if(y>32){let C=0;const A=y%32,R=y-A;for(;C<R;)h(this.pattern.substr(C,32),C),C+=32;if(A){const w=y-32;h(this.pattern.substr(w),w)}}else h(this.pattern,0)}searchIn(t){const{isCaseSensitive:o,ignoreDiacritics:e,includeMatches:i}=this.options;if(t=o?t:t.toLowerCase(),t=e?J(t):t,this.pattern===t){const R={isMatch:!0,score:0};return i&&(R.indices=[[0,t.length-1]]),R}const{location:s,distance:r,threshold:c,findAllMatches:u,minMatchCharLength:l,ignoreLocation:f}=this.options,h=[];let y=0,C=!1;this.chunks.forEach(({pattern:R,alphabet:w,startIndex:B})=>{const{isMatch:$,score:Y,indices:z}=function lt(t,o,e,{location:i=v.location,distance:s=v.distance,threshold:r=v.threshold,findAllMatches:c=v.findAllMatches,minMatchCharLength:u=v.minMatchCharLength,includeMatches:l=v.includeMatches,ignoreLocation:f=v.ignoreLocation}={}){if(o.length>32)throw new Error("Pattern length exceeds max of 32.");const h=o.length,y=t.length,C=Math.max(0,Math.min(i,y));let A=r,R=C;const w=(P,L)=>{const Q=P/h;if(f)return Q;const se=Math.abs(C-L);return s?Q+se/s:se?1:Q},B=u>1||l,$=B?Array(y):[];let Y;for(;(Y=t.indexOf(o,R))>-1;){const P=w(0,Y);if(A=Math.min(P,A),R=Y+h,B){let L=0;for(;L<h;)$[Y+L]=1,L+=1}}R=-1;let z=[],le=1,ze=0,ue=h+y;const Xn=1<<h-1;for(let P=0;P<h;P+=1){let L=0,Q=ue;for(;L<Q;)w(P,C+Q)<=A?L=Q:ue=Q,Q=Math.floor((ue-L)/2+L);ue=Q;let se=Math.max(1,C-Q+1);const Ae=c?y:Math.min(C+Q,y)+h,K=Array(Ae+2);K[Ae+1]=(1<<P)-1;for(let W=Ae;W>=se;W-=1){const Te=W-1;if(K[W]=(K[W+1]<<1|1)&e[t[Te]],P&&(K[W]|=(z[W+1]|z[W])<<1|1|z[W+1]),K[W]&Xn&&(le=w(P,Te),le<=A)){if(A=le,R=Te,ze=P,R<=C)break;se=Math.max(1,2*C-R)}}if(w(P+1,C)>A)break;z=K}if(B&&R>=0){const P=Math.min(y-1,R+h-1+ze);for(let L=R;L<=P;L+=1)e[t[L]]&&($[L]=1)}const xe={isMatch:R>=0,score:Math.max(.001,le)};if(B){const P=function at(t=[],o=v.minMatchCharLength){const e=[];let i=-1,s=-1,r=0;for(let c=t.length;r<c;r+=1){const u=t[r];u&&-1===i?i=r:!u&&-1!==i&&(s=r-1,s-i+1>=o&&e.push([i,s]),i=-1)}return t[r-1]&&r-i>=o&&e.push([i,r-1]),e}($,u);P.length?l&&(xe.indices=P):xe.isMatch=!1}return xe}(t,R,w,{location:s+B,distance:r,threshold:c,findAllMatches:u,minMatchCharLength:l,includeMatches:i,ignoreLocation:f});$&&(C=!0),y+=Y,$&&z&&h.push(...z)});const A={isMatch:C,score:C?y/this.chunks.length:1};return C&&i&&(A.indices=fe(h)),A}};const ht=new Set(["fuzzy","include"]);function ft(t){return t.startsWith("inverse")}const me=[{type:"exact",multiRegex:/^="(.*)"$/,singleRegex:/^=(.*)$/,create:t=>({type:"exact",search(o){const e=o===t;return{isMatch:e,score:e?0:1,indices:[0,t.length-1]}}})},{type:"include",multiRegex:/^'"(.*)"$/,singleRegex:/^'(.*)$/,create:t=>({type:"include",search(o){let i,e=0;const s=[],r=t.length;for(;(i=o.indexOf(t,e))>-1;)e=i+r,s.push([i,e-1]);const c=!!s.length;return{isMatch:c,score:c?0:1,indices:s}}})},{type:"prefix-exact",multiRegex:/^\^"(.*)"$/,singleRegex:/^\^(.*)$/,create:t=>({type:"prefix-exact",search(o){const e=o.startsWith(t);return{isMatch:e,score:e?0:1,indices:[0,t.length-1]}}})},{type:"inverse-prefix-exact",multiRegex:/^!\^"(.*)"$/,singleRegex:/^!\^(.*)$/,create:t=>({type:"inverse-prefix-exact",search(o){const e=!o.startsWith(t);return{isMatch:e,score:e?0:1,indices:[0,o.length-1]}}})},{type:"inverse-suffix-exact",multiRegex:/^!"(.*)"\$$/,singleRegex:/^!(.*)\$$/,create:t=>({type:"inverse-suffix-exact",search(o){const e=!o.endsWith(t);return{isMatch:e,score:e?0:1,indices:[0,o.length-1]}}})},{type:"suffix-exact",multiRegex:/^"(.*)"\$$/,singleRegex:/^(.*)\$$/,create:t=>({type:"suffix-exact",search(o){const e=o.endsWith(t);return{isMatch:e,score:e?0:1,indices:[o.length-t.length,o.length-1]}}})},{type:"inverse-exact",multiRegex:/^!"(.*)"$/,singleRegex:/^!(.*)$/,create:t=>({type:"inverse-exact",search(o){const e=-1===o.indexOf(t);return{isMatch:e,score:e?0:1,indices:[0,o.length-1]}}})},{type:"fuzzy",multiRegex:/^"(.*)"$/,singleRegex:/^(.*)$/,create:(t,o={})=>{const e=new ge(t,{location:o.location??v.location,threshold:o.threshold??v.threshold,distance:o.distance??v.distance,includeMatches:o.includeMatches??v.includeMatches,findAllMatches:o.findAllMatches??v.findAllMatches,minMatchCharLength:o.minMatchCharLength??v.minMatchCharLength,isCaseSensitive:o.isCaseSensitive??v.isCaseSensitive,ignoreDiacritics:o.ignoreDiacritics??v.ignoreDiacritics,ignoreLocation:o.ignoreLocation??v.ignoreLocation});return{type:"fuzzy",search:i=>e.searchIn(i)}}}],Ne=me.length;function qe(t,o){const e=t.match(o);return e?e[1]:null}const pe=[];function ye(...t){pe.push(...t)}function ce(t,o){for(let e=0,i=pe.length;e<i;e+=1){const s=pe[e];if(s.condition(t,o))return new s(t,o)}return new ge(t,o)}const ae_AND="$and",Ce=t=>!(!t.$and&&!t.$or),Le=t=>({[ae_AND]:Object.keys(t).map(o=>({[o]:t[o]}))});function Oe(t,o,{auto:e=!0}={}){const i=s=>{if(x(s)){const l={keyId:null,pattern:s};return e&&(l.searcher=ce(s,o)),l}const r=Object.keys(s),c=(t=>!!t.$path)(s);if(!c&&r.length>1&&!Ce(s))return i(Le(s));if((t=>!E(t)&&Se(t)&&!Ce(t))(s)){const l=c?s.$path:r[0],f=c?s.$val:s[l];if(!x(f))throw new Error((t=>`Invalid value for key ${t}`)(l));const h={keyId:re(l),pattern:f};return e&&(h.searcher=ce(f,o)),h}const u={children:[],operator:r[0]};return r.forEach(l=>{const f=s[l];E(f)&&f.forEach(h=>{u.children.push(i(h))})}),u};return Ce(t)||(t=Le(t)),i(t)}function ve(t,{ignoreFieldNorm:o=v.ignoreFieldNorm}){let e=1;return t.forEach(({key:i,norm:s,score:r})=>{const c=i?i.weight:null;e*=Math.pow(0===r&&c?Number.EPSILON:r,(c||1)*(o?1:s))}),e}var Et=class{constructor(t){this.limit=t,this.heap=[]}get size(){return this.heap.length}shouldInsert(t){return this.size<this.limit||t<this.heap[0].score}insert(t){this.size<this.limit?(this.heap.push(t),this._bubbleUp(this.size-1)):t.score<this.heap[0].score&&(this.heap[0]=t,this._sinkDown(0))}extractSorted(t){return this.heap.sort(t)}_bubbleUp(t){const o=this.heap;for(;t>0;){const e=t-1>>1;if(o[t].score<=o[e].score)break;const i=o[t];o[t]=o[e],o[e]=i,t=e}}_sinkDown(t){const o=this.heap,e=o.length;let i=t;do{const s=2*(t=i)+1,r=2*t+2;if(s<e&&o[s].score>o[i].score&&(i=s),r<e&&o[r].score>o[i].score&&(i=r),i!==t){const c=o[t];o[t]=o[i],o[i]=c}}while(i!==t)}};const Dt=/[\p{L}\p{M}\p{N}_]+/gu,Ve=new WeakSet;function be({isCaseSensitive:t=!1,ignoreDiacritics:o=!1,tokenize:e}={}){const i=function At(t){if("function"==typeof t){let o=!1;return e=>{const i=t(e);if(!o&&(o=!0,!Array.isArray(i)||i.some(s=>"string"!=typeof s)))throw new Error(`[Fuse] tokenize function must return string[]; received ${Array.isArray(i)?"array containing non-strings":typeof i}.`);return i}}return t instanceof RegExp?(t.global||function xt(t){Ve.has(t)||(Ve.add(t),console.warn(`[Fuse] tokenize regex ${t} lacks the global flag; only the first match per text will be returned. Add the 'g' flag.`))}(t),o=>o.match(t)||[]):o=>o.match(Dt)||[]}(e);return{tokenize:s=>(t||(s=s.toLowerCase()),o&&(s=J(s)),i(s))}}function Ee(t,o,e,i){const s=i.tokenize(o);if(!s.length)return;t.fieldCount++,t.docFieldCount.set(e,(t.docFieldCount.get(e)||0)+1);const r=new Set(s);let c=t.docTermFieldHits.get(e);c||(c=new Map,t.docTermFieldHits.set(e,c));for(const u of r)c.set(u,(c.get(u)||0)+1),t.df.set(u,(t.df.get(u)||0)+1)}function je(t,o,e,i){const{i:s,v:r,$:c}=o;if(void 0===r){if(c)for(let u=0;u<e;u++){const l=c[u];if(l)if(Array.isArray(l))for(const f of l)Ee(t,f.v,s,i);else Ee(t,l.v,s,i)}}else Ee(t,r,s,i)}function It(t,o){const e=t.docFieldCount.get(o);if(void 0===e)return;t.fieldCount-=e,t.docFieldCount.delete(o);const i=t.docTermFieldHits.get(o);if(i){for(const[s,r]of i){const c=(t.df.get(s)||0)-r;c<=0?t.df.delete(s):t.df.set(s,c)}t.docTermFieldHits.delete(o)}}function Qe(t,o){if(0===o.length)return;const e=Array.from(new Set(o)).sort((u,l)=>u-l);for(const u of e)It(t,u);const i=u=>{let l=0,f=e.length;for(;l<f;){const h=l+f>>>1;e[h]<u?l=h+1:f=h}return u-l},s=e[0],r=new Map;for(const[u,l]of t.docFieldCount)r.set(u>s?i(u):u,l);t.docFieldCount=r;const c=new Map;for(const[u,l]of t.docTermFieldHits)c.set(u>s?i(u):u,l);t.docTermFieldHits=c}var Ge=(()=>{let t=class{constructor(o,e,i){this.options={...v,...e},this._keyStore=new st(this.options.keys),this._docs=o,this._myIndex=null,this._invertedIndex=null,this.setCollection(o,i),this._lastQuery=null,this._lastSearcher=null}_getSearcher(o){if(this._lastQuery===o)return this._lastSearcher;const e=ce(o,this._invertedIndex?{...this.options,_invertedIndex:this._invertedIndex}:this.options);return this._lastQuery=o,this._lastSearcher=e,e}setCollection(o,e){if(this._docs=o,e&&!(e instanceof he))throw new Error("Incorrect 'index' type");if(this._myIndex=e||Be(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight}),this.options.useTokenSearch){const i=be({isCaseSensitive:this.options.isCaseSensitive,ignoreDiacritics:this.options.ignoreDiacritics,tokenize:this.options.tokenize});this._invertedIndex=function St(t,o,e){const i={fieldCount:0,df:new Map,docFieldCount:new Map,docTermFieldHits:new Map};for(const s of t)je(i,s,o,e);return i}(this._myIndex.records,this._myIndex.keys.length,i)}this._invalidateSearcherCache()}add(o){if(!O(o))return;this._docs.push(o);const e=this._myIndex.add(o,this._docs.length-1);if(this._invertedIndex&&e){const i=be({isCaseSensitive:this.options.isCaseSensitive,ignoreDiacritics:this.options.ignoreDiacritics,tokenize:this.options.tokenize});!function Ft(t,o,e,i){je(t,o,e,i)}(this._invertedIndex,e,this._myIndex.keys.length,i)}this._invalidateSearcherCache()}remove(o=()=>!1){const e=[],i=[];for(let s=0,r=this._docs.length;s<r;s+=1)o(this._docs[s],s)&&(e.push(this._docs[s]),i.push(s));if(i.length){this._invertedIndex&&Qe(this._invertedIndex,i);const s=new Set(i);this._docs=this._docs.filter((r,c)=>!s.has(c)),this._myIndex.removeAll(i),this._invalidateSearcherCache()}return e}removeAt(o){if(!Number.isInteger(o)||o<0||o>=this._docs.length)throw new Error(de);this._invertedIndex&&Qe(this._invertedIndex,[o]);const e=this._docs.splice(o,1)[0];return this._myIndex.removeAt(o),this._invalidateSearcherCache(),e}_invalidateSearcherCache(){this._lastQuery=null,this._lastSearcher=null}getIndex(){return this._myIndex}search(o,e){const{limit:i=-1}=e||{},{includeMatches:s,includeScore:r,shouldSort:c,sortFn:u,ignoreFieldNorm:l}=this.options;if(x(o)&&!o.trim()){let y=this._docs.map((C,A)=>({item:C,refIndex:A}));return j(i)&&i>-1&&(y=y.slice(0,i)),y}let h;if(j(i)&&i>0&&x(o)){const y=new Et(i);x(this._docs[0])?this._searchStringList(o,{heap:y,ignoreFieldNorm:l}):this._searchObjectList(o,{heap:y,ignoreFieldNorm:l}),h=y.extractSorted(u)}else h=x(o)?x(this._docs[0])?this._searchStringList(o):this._searchObjectList(o):this._searchLogical(o),function bt(t,{ignoreFieldNorm:o=v.ignoreFieldNorm}){t.forEach(e=>{e.score=ve(e.matches,{ignoreFieldNorm:o})})}(h,{ignoreFieldNorm:l}),c&&h.sort(u),j(i)&&i>-1&&(h=h.slice(0,i));return function Mt(t,o,{includeMatches:e=v.includeMatches,includeScore:i=v.includeScore}={}){return t.map(s=>{const{idx:r}=s,c={item:o[r],refIndex:r};return e&&(c.matches=function Rt(t){const o=[];return t.matches.forEach(e=>{if(!O(e.indices)||!e.indices.length)return;const i={indices:e.indices,value:e.value};e.key&&(i.key=e.key.id),e.idx>-1&&(i.refIndex=e.idx),o.push(i)}),o}(s)),i&&(c.score=s.score),c})}(h,this._docs,{includeMatches:s,includeScore:r})}_searchStringList(o,{heap:e,ignoreFieldNorm:i}={}){const s=this._getSearcher(o),r=this.options.useTokenSearch&&"all"===this.options.tokenMatch,{records:c}=this._myIndex,u=e?null:[];return c.forEach(({v:l,i:f,n:h})=>{if(!O(l))return;const y=s.searchIn(l);if(y.isMatch){const C={score:y.score,value:l,norm:h,indices:y.indices};r&&(C.matchedMask=y.matchedMask,C.matchedTerms=y.matchedTerms,C.termCount=y.termCount);const A=[C];if(!r||this._coversAllTokens(A)){const R={item:l,idx:f,matches:A};e?(R.score=ve(R.matches,{ignoreFieldNorm:i}),e.shouldInsert(R.score)&&e.insert(R)):u.push(R)}}}),u}_searchLogical(o){const e=Oe(o,this.options),i=(u,l,f)=>{if(!("children"in u)){const{keyId:A,searcher:R}=u;let w;return null===A?(w=[],this._myIndex.keys.forEach((B,$)=>{w.push(...this._findMatches({key:B,value:l[$],searcher:R}))})):w=this._findMatches({key:this._keyStore.get(A),value:this._myIndex.getValueForItemAtKeyId(l,A),searcher:R}),w&&w.length?[{idx:f,item:l,matches:w}]:[]}const{children:h,operator:y}=u,C=[];for(let A=0,R=h.length;A<R;A+=1){const B=i(h[A],l,f);if(B.length)C.push(...B);else if("$and"===y)return[]}return C},s=this._myIndex.records,r=new Map,c=[];return s.forEach(({$:u,i:l})=>{if(O(u)){const f=i(e,u,l);f.length&&(r.has(l)||(r.set(l,{idx:l,item:u,matches:[]}),c.push(r.get(l))),f.forEach(({matches:h})=>{r.get(l).matches.push(...h)}))}}),c}_searchObjectList(o,{heap:e,ignoreFieldNorm:i}={}){const s=this._getSearcher(o),r=this.options.useTokenSearch&&"all"===this.options.tokenMatch,{keys:c,records:u}=this._myIndex,l=e?null:[];return u.forEach(({$:f,i:h})=>{if(!O(f))return;const y=[];let C=!1,A=!1;if(c.forEach((R,w)=>{const B=this._findMatches({key:R,value:f[w],searcher:s});B.length?(y.push(...B),B[0].hasInverse&&(A=!0)):C=!0}),(!A||!C)&&y.length&&(!r||this._coversAllTokens(y))){const R={idx:h,item:f,matches:y};e?(R.score=ve(R.matches,{ignoreFieldNorm:i}),e.shouldInsert(R.score)&&e.insert(R)):l.push(R)}}),l}_findMatches({key:o,value:e,searcher:i}){if(!O(e))return[];const s=[];if(E(e))e.forEach(({v:r,i:c,n:u})=>{if(!O(r))return;const l=i.searchIn(r);if(l.isMatch){const f={score:l.score,key:o,value:r,idx:c,norm:u,indices:l.indices,hasInverse:l.hasInverse};void 0!==l.termCount&&(f.matchedMask=l.matchedMask,f.matchedTerms=l.matchedTerms,f.termCount=l.termCount),s.push(f)}});else{const{v:r,n:c}=e,u=i.searchIn(r);if(u.isMatch){const l={score:u.score,key:o,value:r,norm:c,indices:u.indices,hasInverse:u.hasInverse};void 0!==u.termCount&&(l.matchedMask=u.matchedMask,l.matchedTerms=u.matchedTerms,l.termCount=u.termCount),s.push(l)}}return s}_coversAllTokens(o){const e=o.length?o[0].termCount:void 0;if(void 0===e)return!0;if(e<=31){let s=0;for(let r=0;r<o.length;r++)s|=o[r].matchedMask||0;return s===2**e-1}const i=new Set;for(let s=0;s<o.length;s++){const r=o[s].matchedTerms;if(r)for(const c of r)i.add(c)}return i.size===e}};return t.version="7.4.2",t.createIndex=Be,t.parseIndex=ct,t.config=v,t.match=function(o,e,i){if(i&&i.useTokenSearch)throw new Error("Fuse.match does not support useTokenSearch: token search requires corpus-level statistics (df, fieldCount) that a one-off string comparison does not have. Use new Fuse(...).search(...) instead.");return ce(o,{...v,...i}).searchIn(e)},t.parseQuery=Oe,t})();ye(class{constructor(t,{isCaseSensitive:o=v.isCaseSensitive,ignoreDiacritics:e=v.ignoreDiacritics,includeMatches:i=v.includeMatches,minMatchCharLength:s=v.minMatchCharLength,ignoreLocation:r=v.ignoreLocation,findAllMatches:c=v.findAllMatches,location:u=v.location,threshold:l=v.threshold,distance:f=v.distance}={}){this.query=null,this.options={isCaseSensitive:o,ignoreDiacritics:e,includeMatches:i,minMatchCharLength:s,findAllMatches:c,ignoreLocation:r,location:u,threshold:l,distance:f},t=o?t:t.toLowerCase(),t=e?J(t):t,this.pattern=t,this.query=function yt(t,o={}){return t.replace(/\\\|/g,"\0").split("|").map(e=>{const i=function pt(t){const o=[],e=t.length;let i=0;for(;i<e;){for(;i<e&&" "===t[i];)i++;if(i>=e)break;let s=i;for(;s<e&&" "!==t[s]&&'"'!==t[s];)s++;if(s<e&&'"'===t[s]){for(s++;s<e;){if('"'===t[s]){const r=s+1;if(r>=e||" "===t[r]){s++;break}if("$"===t[r]&&(r+1>=e||" "===t[r+1])){s+=2;break}}s++}o.push(t.substring(i,s)),i=s}else{for(;s<e&&" "!==t[s];)s++;o.push(t.substring(i,s)),i=s}}return o}(e.replace(/\u0000/g,"|").trim()).filter(r=>r&&!!r.trim()),s=[];for(let r=0,c=i.length;r<c;r+=1){const u=i[r];let l=!1,f=-1;for(;!l&&++f<Ne;){const h=me[f],y=qe(u,h.multiRegex);y&&(s.push(h.create(y,o)),l=!0)}if(!l)for(f=-1;++f<Ne;){const h=me[f],y=qe(u,h.singleRegex);if(y){s.push(h.create(y,o));break}}}return s})}(this.pattern,this.options)}static condition(t,o){return o.useExtendedSearch}searchIn(t){const o=this.query;if(!o)return{isMatch:!1,score:1};const{includeMatches:e,isCaseSensitive:i,ignoreDiacritics:s}=this.options;t=i?t:t.toLowerCase(),t=s?J(t):t;let r=0;const c=[];let u=0,l=!1;for(let f=0,h=o.length;f<h;f+=1){const y=o[f];c.length=0,r=0,l=!1;for(let C=0,A=y.length;C<A;C+=1){const R=y[C],{isMatch:w,indices:B,score:$}=R.search(t);if(!w){u=0,r=0,c.length=0,l=!1;break}r+=1,u+=$,ft(R.type)&&(l=!0),e&&(ht.has(R.type)?c.push(...B):c.push(B))}if(r){const C={isMatch:!0,score:u/r};return l&&(C.hasInverse=!0),e&&(C.indices=fe(c)),C}}return{isMatch:!1,score:1}}}),ye(class{static condition(t,o){return o.useTokenSearch}constructor(t,o){this.options=o,this.analyzer=be({isCaseSensitive:o.isCaseSensitive,ignoreDiacritics:o.ignoreDiacritics,tokenize:o.tokenize});const e=this.analyzer.tokenize(t),{df:i,fieldCount:s}=o._invertedIndex;this.termSearchers=[],this.idfWeights=[];for(const r of e){this.termSearchers.push(new ge(r,{location:o.location,threshold:o.threshold,distance:o.distance,includeMatches:o.includeMatches,findAllMatches:o.findAllMatches,minMatchCharLength:o.minMatchCharLength,isCaseSensitive:o.isCaseSensitive,ignoreDiacritics:o.ignoreDiacritics,ignoreLocation:!0}));const c=i.get(r)||0,u=Math.log(1+(s-c+.5)/(c+.5));this.idfWeights.push(u)}this.combineAll="all"===o.tokenMatch,this.numTerms=this.termSearchers.length,this.useMask=this.numTerms<=31}searchIn(t){if(!this.termSearchers.length)return{isMatch:!1,score:1};const o=[];let e=0,i=0,s=0,r=0;const c=this.combineAll&&!this.useMask?new Set:null;for(let f=0;f<this.termSearchers.length;f++){const h=this.termSearchers[f].searchIn(t),y=this.idfWeights[f];i+=y,h.isMatch&&(s++,e+=y*(1-h.score),h.indices&&o.push(...h.indices),this.combineAll&&(this.useMask?r|=1<<f:c.add(f)))}if(0===s)return{isMatch:!1,score:1};const l={isMatch:!0,score:Math.max(.001,i>0?1-e/i:0)};return this.options.includeMatches&&o.length&&(l.indices=fe(o)),this.combineAll&&(this.useMask?l.matchedMask=r:l.matchedTerms=c,l.termCount=this.numTerms),l}}),Ge.use=function(...t){t.forEach(o=>ye(o))};var kt=Ge,Bt=g(2065),Pt=g(7284),Nt=g.n(Pt);let Lt=(()=>{class t{filterOptions=(0,b.uu)(()=>({isCaseSensitive:!!this.filterExactMatch(),includeScore:!1,ignoreDiacritics:!1,shouldSort:!0,includeMatches:!1,findAllMatches:!1,minMatchCharLength:1,location:0,threshold:this.filterExactMatch()?0:.3,distance:100,useExtendedSearch:!1,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1,keys:this.filterKeys()}));fuse=(0,b.EW)(()=>new kt(this.sorted(),this.filterOptions()));columnDefs=(0,a.vPA)([]);data=(0,a.vPA)([]);sortCol=(0,a.vPA)(void 0);sortOrder=(0,a.vPA)("ASC");filterValue=(0,a.vPA)(void 0);filterOnlyVisible=(0,a.vPA)(!0);paginatorStartIndex=(0,a.vPA)(1);paginatorEndIndex=(0,a.vPA)(5);showColumnSettings=(0,a.vPA)(!1);totalRows=(0,b.EW)(()=>this.sortedAndFiltered().length);sorted=(0,b.EW)(()=>function wt(t,o,e){if(void 0===t)return[...o];const i=t.split(",").map(r=>r.trim()),s=e.split(",").map(r=>r.trim());return[...o].sort((r,c)=>{for(let u=0;u<i.length;u++){const l=i[u],f=s[u]||s[0];if(!(l in r))continue;let h=r[l],y=c[l];if("object"==typeof h&&(h=r[l].value,y=c[l].value),null==h)return 1;if(null==y)return-1;let C=0;if(C="string"==typeof h&&"string"==typeof y?h.localeCompare(y):h>y?1:h<y?-1:0,"DESC"===f&&(C*=-1),0!==C)return C}return 0})}(this.sortCol(),this.data(),this.sortOrder()));filterCol=(0,a.vPA)(void 0);filterExactMatch=(0,a.vPA)(!1);filterKeys=(0,b.EW)(()=>{const e=this.filterCol();return void 0!==e?[e]:this.filterOnlyVisible()?this.columnDefs().map(i=>i.key):Object.keys(this.sorted()[0]||{})});sortedAndFiltered=(0,b.EW)(()=>{const e=this.filterValue()??"";return""===e?this.sorted():this.fuse().search(e).map(s=>s.item)});sortedFilteredAndPaginated=(0,b.EW)(()=>this.sortedAndFiltered().slice(this.paginatorStartIndex(),this.paginatorEndIndex()));downloadCSV(){!function qt(t,o,e="table.csv"){const i=o.map(c=>c.label),s=t.map(c=>o.map(u=>u.formatter?u.formatter(c[u.key]):c[u.key])),r=Nt().unparse({fields:i,data:s});(0,Bt.YN)(r,e,"text/csv")}(this.sortedFilteredAndPaginated(),this.columnDefs())}static \u0275fac=function(i){return new(i||t)};static \u0275prov=a.jDH({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Ot=(()=>{class t{value=(0,a.vPA)("");agInit(e){const i=e.colDef?.cellRendererParams?.prefixes??{};this.value.set(this._prefixIRI(e?.value||"",i))}refresh(e){return this.value.set(e?.value||""),!0}_prefixIRI(e,i){if("http://www.w3.org/1999/02/22-rdf-syntax-ns#type"===e)return"a";if(void 0===i)return e;const s=Object.keys(i).find(r=>e.includes(i[r]));return void 0!==s?`${s}:${e.split(i[s])[1]}`:e}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=n.VBU({type:t,selectors:[["cue-iri-cell-renderer"]],decls:1,vars:1,template:function(i,s){1&i&&n.EFF(0),2&i&&n.JRh(s.value())},encapsulation:2,changeDetection:0})}return t})();var Z=g(2245),Vt=g(2530),ee=g(5381),te=g(5971),$e=g(5448),jt=g(2014),Qt=g(2611),Re=g(3319),We=g(29),Gt=g(9695);const $t=(t,o)=>o.label;function Wt(t,o){if(1&t){const e=n.RV6();n.j41(0,"cue-flexcontainer",10)(1,"cue-input-switch",11),n.mxI("checkedChange",function(s){a.eBV(e);const r=n.XpG();return n.DH7(r.collapseClasses,s)||(r.collapseClasses=s),a.Njj(s)}),n.k0s(),n.j41(2,"cue-typography",12),n.EFF(3,"Collapse classes"),n.k0s()(),n.j41(4,"cue-flexcontainer",10)(5,"cue-input-switch",11),n.mxI("checkedChange",function(s){a.eBV(e);const r=n.XpG();return n.DH7(r.collapseAttributes,s)||(r.collapseAttributes=s),a.Njj(s)}),n.k0s(),n.j41(6,"cue-typography",12),n.EFF(7,"Collapse properties"),n.k0s()()}if(2&t){const e=n.XpG();n.R7$(),n.R50("checked",e.collapseClasses),n.R7$(4),n.R50("checked",e.collapseAttributes)}}function Ut(t,o){if(1&t&&n.nrm(0,"cue-svg-icon",17),2&t){const e=n.XpG().$implicit;n.Y8G("name",e.icon)}}function Xt(t,o){if(1&t){const e=n.RV6();n.j41(0,"cue-menu-item",16),n.bIt("click",function(){const s=a.eBV(e).$implicit;return a.Njj(s.action())}),n.nVh(1,Ut,1,1,"cue-svg-icon",17),n.EFF(2),n.k0s()}if(2&t){const e=o.$implicit;n.R7$(),n.vxM(e.icon?1:-1),n.R7$(),n.SpI(" ",e.label)}}function Ht(t,o){if(1&t&&(n.j41(0,"cue-menu",5)(1,"cue-button",13,0),n.nrm(3,"cue-button-icon",14),n.k0s(),n.j41(4,"cue-menu-wrap",15),n.Z7z(5,Xt,3,2,"cue-menu-item",null,$t),n.k0s()()),2&t){const e=n.XpG();n.R7$(5),n.Dyx(e.moreMenuContent())}}function zt(t,o){if(1&t){const e=n.RV6();n.j41(0,"cue-button",18),n.bIt("click",function(){a.eBV(e);const s=n.XpG();return a.Njj(s.showColumnSettings.set(!1))}),n.nrm(1,"cue-button-icon",19),n.k0s()}}function Yt(t,o){if(1&t&&(n.j41(0,"cue-typography"),n.EFF(1),n.k0s()),2&t){const e=n.XpG(2);n.R7$(),n.SpI("Result: ",e.askQueryResults().boolean)}}function Kt(t,o){if(1&t&&n.nrm(0,"cue-code-editor",20),2&t){const e=n.XpG(2);n.Y8G("content",e.askQueryResults())("variant",e.variant())}}function Jt(t,o){if(1&t&&(n.nVh(0,Yt,2,1,"cue-typography"),n.nVh(1,Kt,1,2,"cue-code-editor",20)),2&t){const e=n.XpG();n.vxM("formatted"===e.selectedView()?0:-1),n.R7$(),n.vxM("raw"===e.selectedView()?1:-1)}}function Zt(t,o){if(1&t&&n.nrm(0,"cue-ag-grid",21),2&t){const e=n.XpG(3);n.Y8G("rowData",e.tableData())("columnDefs",e.columnDefs())}}function en(t,o){if(1&t){const e=n.RV6();n.j41(0,"cue-ag-grid-column-select",23),n.mxI("columnDefsChange",function(s){a.eBV(e);const r=n.XpG(3);return n.DH7(r.columnDefs,s)||(r.columnDefs=s),a.Njj(s)}),n.k0s()}if(2&t){const e=n.XpG(3);n.R50("columnDefs",e.columnDefs),n.Y8G("columnDefsGross",e.columnDefsGross())("settings",e.columnSelectSettings())}}function tn(t,o){if(1&t&&n.nVh(0,Zt,1,2,"cue-ag-grid",21)(1,en,1,3,"cue-ag-grid-column-select",22),2&t){const e=n.XpG(2);n.vxM(e.showColumnSettings()?1:0)}}function nn(t,o){if(1&t&&n.nrm(0,"cue-code-editor",20),2&t){const e=n.XpG(2);n.Y8G("content",e.selectQueryResults())("variant",e.variant())}}function sn(t,o){if(1&t&&(n.nVh(0,tn,2,1),n.nVh(1,nn,1,2,"cue-code-editor",20)),2&t){const e=n.XpG();n.vxM("formatted"===e.selectedView()?0:-1),n.R7$(),n.vxM("raw"===e.selectedView()?1:-1)}}function on(t,o){if(1&t&&n.nrm(0,"cue-rdf-graph",25),2&t){const e=n.XpG(2);n.xc7("min-height",e.minGraphHeight()),n.Y8G("doc",e.rdfResult())("collapseAttributes",e.collapseAttributes())("collapseClasses",e.collapseClasses())}}function rn(t,o){}function cn(t,o){if(1&t&&n.nrm(0,"cue-code-editor",26),2&t){const e=n.XpG(3);n.Y8G("content",e.rdfResult())("variant",e.variant())}}function an(t,o){if(1&t&&n.nVh(0,rn,0,0)(1,cn,1,2,"cue-code-editor",26),2&t){const e=n.XpG(2);n.vxM(e.isJSON()?0:1)}}function ln(t,o){if(1&t&&(n.nVh(0,on,1,5,"cue-rdf-graph",24),n.nVh(1,an,2,1)),2&t){const e=n.XpG();n.vxM("formatted"===e.selectedView()&&e.isJSON()?0:-1),n.R7$(),n.vxM("raw"===e.selectedView()?1:-1)}}let un=(()=>{class t{_tableService=(0,a.WQX)(Lt);queryResults=(0,p.hFB)();queryDetails=(0,p.hFB)(void 0);variant=(0,p.hFB)("accent");minGraphHeight=(0,p.hFB)("300px");responseMimeType=(0,p.hFB)(void 0);clickedClose=(0,p.CGW)();totalHeight=(0,a.vPA)(0);selectedView=(0,b.uu)(()=>this.isJSON()?"formatted":"raw");isJSON=(0,b.EW)(()=>{const e=this.responseMimeType();return void 0===e||e.includes("json")});collapseClasses=(0,a.vPA)(!0);collapseAttributes=(0,a.vPA)(!0);moreMenuContent=(0,b.EW)(()=>this.selectQueryResults()&&!this.showColumnSettings()?[{label:"Show column settings",icon:"settings",action:()=>this.showColumnSettings.set(!0)},{label:"Download CSV",icon:"download",action:()=>this._downloadCSV()}]:[]);showContextMenu=(0,a.vPA)(!1);showColumnSettings=(0,a.vPA)(!1);askQueryResults=(0,b.EW)(()=>{if("ASK"===this.queryDetails()?.queryType)return this.queryResults()});selectQueryResults=(0,b.EW)(()=>{const e=this.queryDetails();if(console.log(e),"SELECT"===e?.queryType)return this.queryResults()});rdfResult=(0,b.EW)(()=>{const e=this.queryDetails();if("CONSTRUCT"===e?.queryType||"DESCRIBE"===e?.queryType)return this.queryResults()});columnDefs=(0,b.uu)(()=>this._buildAgGridColumnDefs());columnDefsGross=(0,b.EW)(()=>this._buildAgGridColumnDefs());queryVariables=(0,b.EW)(()=>{const e=this._getQueryVariables();return console.log(e),e.includes("*")?this.selectQueryResults()?.head.vars??[]:e});tableData=(0,b.EW)(()=>{const e=this.selectQueryResults();if(void 0===e)return[];const i=this.queryVariables();return e?.results.bindings.map(s=>{const r={};return i.forEach(c=>{r[c]=s[c]?.value??"-"}),r})});columnSelectSettings=(0,b.EW)(()=>{const e=new U.e;return e.allowToggleEditable=!1,e});_buildAgGridColumnDefs(){return this.queryVariables().map(i=>{const s={field:i,headerName:i,sortable:!0,filter:!0,flex:1};return this._isIRICol(i)&&(s.cellRenderer=Ot,s.cellRendererParams={prefixes:this.queryDetails()?.prefixes}),s})}_isIRICol(e){const i=this.selectQueryResults()?.results.bindings.find(s=>void 0!==s[e]);return void 0!==i&&"uri"===i[e].type}_downloadCSV(){this._tableService.downloadCSV()}_getQueryVariables(){const e=new Set;return this.queryDetails()?.variables.map(i=>{const s=i;e.add(void 0!==s?.value?s.value:void 0!==s?.variable?s.variable.value:"*")}),Array.from(e)}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=n.VBU({type:t,selectors:[["cue-query-results"]],inputs:{queryResults:[1,"queryResults"],queryDetails:[1,"queryDetails"],variant:[1,"variant"],minGraphHeight:[1,"minGraphHeight"],responseMimeType:[1,"responseMimeType"]},outputs:{clickedClose:"clickedClose"},decls:20,vars:10,consts:[["trigger",""],["direction","column","gap","m",2,"height","100%"],["direction","row","gap","s"],["size","s",3,"click","disabled","variant"],[2,"flex","1"],["positioning","bottomright"],["variant","tertiary","size","s"],["size","s","cueTooltip","Back to query",3,"click"],["icon","arrow-back"],["direction","column",1,"result-container",2,"flex","1 1 0%","min-height","0","width","100%"],["align","center","gap","s"],["size","s",3,"checkedChange","checked"],["size","s"],["trigger","","variant","tertiary","size","s"],["icon","more-vert"],["menu",""],[3,"click"],["before","",3,"name"],["variant","tertiary","size","s",3,"click"],["icon","save"],["type","json",1,"result",3,"content","variant"],[1,"result",2,"flex","1 1 0%","min-height","0","overflow","auto",3,"rowData","columnDefs"],[2,"width","100%",3,"columnDefs","columnDefsGross","settings"],[2,"width","100%",3,"columnDefsChange","columnDefs","columnDefsGross","settings"],[1,"result",3,"doc","collapseAttributes","collapseClasses","min-height"],[1,"result",3,"doc","collapseAttributes","collapseClasses"],["type","ttl",1,"result",3,"content","variant"]],template:function(i,s){1&i&&(n.j41(0,"cue-flexcontainer",1)(1,"cue-flexcontainer",2)(2,"cue-button",3),n.bIt("click",function(){return s.selectedView.set("raw")}),n.j41(3,"cue-button-padder")(4,"cue-button-label"),n.EFF(5,"Raw"),n.k0s()()(),n.j41(6,"cue-button",3),n.bIt("click",function(){return s.selectedView.set("formatted")}),n.j41(7,"cue-button-padder")(8,"cue-button-label"),n.EFF(9,"Formatted"),n.k0s()()(),n.nVh(10,Wt,8,2),n.nrm(11,"cue-flexcontainer",4),n.nVh(12,Ht,7,0,"cue-menu",5),n.nVh(13,zt,2,0,"cue-button",6),n.j41(14,"cue-button",7),n.bIt("click",function(){return s.clickedClose.emit()}),n.nrm(15,"cue-button-icon",8),n.k0s()(),n.j41(16,"cue-flexcontainer",9),n.nVh(17,Jt,2,2),n.nVh(18,sn,2,2),n.nVh(19,ln,2,2),n.k0s()()),2&i&&(n.R7$(2),n.Y8G("disabled","raw"===s.selectedView())("variant","raw"===s.selectedView()?"primary":"secondary"),n.R7$(4),n.Y8G("disabled","formatted"===s.selectedView())("variant","formatted"===s.selectedView()?"primary":"secondary"),n.R7$(4),n.vxM(s.rdfResult()&&"formatted"===s.selectedView()?10:-1),n.R7$(2),n.vxM(s.moreMenuContent().length?12:-1),n.R7$(),n.vxM(s.showColumnSettings()?13:-1),n.R7$(4),n.vxM(s.askQueryResults()?17:-1),n.R7$(),n.vxM(s.selectQueryResults()?18:-1),n.R7$(),n.vxM(s.rdfResult()?19:-1))},dependencies:[Z.Typography,Vt.B,ee.n,te.$,$e.L,jt.z,Qt.R,V.t,Re.a,G.W,k.M,S.D,q.pL,We.A,Gt.Switch],styles:["[_nghost-%COMP%]{display:block;height:100%}.result-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;flex:1 1 0%;min-height:0;width:100%}.result[_ngcontent-%COMP%]{flex:1 1 0%;width:100%;box-sizing:border-box;overflow:auto;min-height:0}"],changeDetection:0})}return t})(),Ue=(()=>{class t{vcr;componentRef=null;setViewContainerRef(e){this.componentRef&&(this.componentRef.destroy(),this.componentRef=null),void 0!==this.vcr&&this.vcr?.clear(),this.vcr=e}static \u0275fac=function(i){return new(i||t)};static \u0275prov=a.jDH({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var Xe=g(5745),dn=g(8957);const hn=["*"];function fn(t,o){if(1&t&&(n.j41(0,"cue-typography"),n.EFF(1),n.k0s()),2&t){const e=n.XpG(2);n.R7$(),n.JRh(e.message())}}function gn(t,o){if(1&t){const e=n.RV6();n.j41(0,"cue-modal",1),n.bIt("close",function(){a.eBV(e);const s=n.XpG();return a.Njj(s.onClose())}),n.j41(1,"cue-flexcontainer",2),n.SdG(2),n.nVh(3,fn,2,1,"cue-typography"),n.j41(4,"cue-input",3),n.mxI("valueChange",function(s){a.eBV(e);const r=n.XpG();return n.DH7(r.inputValue,s)||(r.inputValue=s),a.Njj(s)}),n.k0s(),n.j41(5,"cue-typography")(6,"cue-flexcontainer",4)(7,"cue-button",5),n.bIt("click",function(){a.eBV(e);const s=n.XpG();return a.Njj(s.onConfirmed())}),n.EFF(8),n.k0s(),n.j41(9,"cue-button",6),n.bIt("click",function(){a.eBV(e);const s=n.XpG();return a.Njj(s.onClose())}),n.EFF(10),n.k0s()()()()()}if(2&t){const e=n.XpG();n.Y8G("displayCloseBtn",!1)("closeOnBackgroundClick",!1),n.R7$(3),n.vxM(e.message()?3:-1),n.R7$(),n.R50("value",e.inputValue),n.Y8G("label",e.inputLabel()),n.R7$(4),n.JRh(e.confirmText()),n.R7$(2),n.JRh(e.rejectText())}}let mn=(()=>{class t{visible=(0,p.geq)(!0);message=(0,p.hFB)("");inputLabel=(0,p.hFB)("");inputValue=(0,p.geq)("");confirmText=(0,p.hFB)("Update");rejectText=(0,p.hFB)("Cancel");valueChange=(0,p.CGW)();onConfirmed(){this.visible.set(!1),this.valueChange.emit(this.inputValue())}onClose(){this.visible.set(!1)}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=n.VBU({type:t,selectors:[["cue-modal-input"]],inputs:{visible:[1,"visible"],message:[1,"message"],inputLabel:[1,"inputLabel"],inputValue:[1,"inputValue"],confirmText:[1,"confirmText"],rejectText:[1,"rejectText"]},outputs:{visible:"visibleChange",inputValue:"inputValueChange",valueChange:"valueChange"},ngContentSelectors:hn,decls:1,vars:1,consts:[[2,"font-family","var(--cue-font-family)",3,"displayCloseBtn","closeOnBackgroundClick"],[2,"font-family","var(--cue-font-family)",3,"close","displayCloseBtn","closeOnBackgroundClick"],["direction","column"],[3,"valueChange","value","label"],["direction","row"],["variant","secondary",3,"click"],[3,"click"]],template:function(i,s){1&i&&(n.NAR(),n.nVh(0,gn,11,7,"cue-modal",0)),2&i&&n.vxM(s.visible()?0:-1)},dependencies:[Xe.a,ee.n,te.$,Z.Typography,dn.Input],encapsulation:2})}return t})(),He=(()=>{class t extends Ue{requestInput(e){if(!this.vcr)throw new Error("No ViewContainerRef!");const i=this.vcr.createComponent(mn);return this.componentRef=i,e.message&&i.setInput("message",e.message),e.inputLabel&&i.setInput("inputLabel",e.inputLabel),e.inputValue&&i.setInput("inputValue",e.inputValue),e.confirmText&&i.setInput("confirmText",e.confirmText),e.rejectText&&i.setInput("rejectText",e.rejectText),new Promise(s=>{const r=i.instance.valueChange.subscribe(c=>{s(c),r.unsubscribe(),i.destroy()})})}static \u0275fac=(()=>{let e;return function(s){return(e||(e=n.xGo(t)))(s||t)}})();static \u0275prov=a.jDH({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var pn=g(5187),yn=g(4906);const _n=["panel"];let Cn=(()=>{class t{content=(0,p.geq)("");variant=(0,p.hFB)("default");contextPatterns=(0,p.hFB)([]);contentChanged=(0,p.CGW)();invalid=(0,p.CGW)();error=(0,p.CGW)();panel;_editor;_editorValue=(0,a.vPA)("");onVariantChange=(0,a.QZP)(()=>{const e=this.variant();this._editor&&(this._editor.theme=e)});onContentChange=(0,a.QZP)(()=>{const e=this.content();e!==this._editorValue()&&this._editor&&(this._editor.content=e)});onContextPatternsChange=(0,a.QZP)(()=>{const e=this.contextPatterns();this._editor&&(this._editor.contextPatterns=e)});ngAfterViewInit(){this._editor=new yn.j(this.panel.nativeElement,this.variant()),this._editor.contextPatterns=this.contextPatterns();const e=this.content();e&&(this._editor.content=e),this._editor.events.addListener("contentChanged",i=>{this._editorValue.set(i),this.content()!==i&&this.content.set(i),this.contentChanged.emit(i)}),this._editor.events.addListener("contentValid",i=>{this.invalid.emit(!i)}),this._editor.events.addListener("error",i=>{this.error.emit(i)})}ngOnDestroy(){this._editor?.dispose()}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=n.VBU({type:t,selectors:[["cue-sparql-editor"]],viewQuery:function(i,s){if(1&i&&n.GBs(_n,5),2&i){let r;n.mGM(r=n.lsd())&&(s.panel=r.first)}},inputs:{content:[1,"content"],variant:[1,"variant"],contextPatterns:[1,"contextPatterns"]},outputs:{content:"contentChange",contentChanged:"contentChanged",invalid:"invalid",error:"error"},decls:2,vars:0,consts:[["panel",""],[1,"panel"]],template:function(i,s){1&i&&n.Hgh(0,"div",1,0)},styles:["[_nghost-%COMP%]{display:contents}.panel[_ngcontent-%COMP%]{overflow-y:auto;height:100%;width:100%;border:1px solid var(--borderColor-default)}"]})}return t})();var F=g(7573),Me=g(4284);const vn=["modalContainer"],bn=(t,o)=>o.label;function En(t,o){if(1&t){const e=n.RV6();n.j41(0,"cue-flexcontainer",7)(1,"cue-button",19),n.nI1(2,"transloco"),n.bIt("click",function(){a.eBV(e);const s=n.XpG();return a.Njj(s.showResults.set(!0))}),n.nrm(3,"cue-button-icon",20),n.k0s()()}2&t&&(n.R7$(),n.Y8G("cueTooltip",n.bMT(2,1,"components.sparqlClient.tooltipViewResults")))}function Rn(t,o){if(1&t&&(n.j41(0,"div",10),n.EFF(1),n.k0s()),2&t){const e=n.XpG();n.R7$(),n.JRh(e.queryError())}}function Mn(t,o){1&t&&(n.j41(0,"cue-typography"),n.EFF(1),n.nI1(2,"transloco"),n.k0s()),2&t&&(n.R7$(),n.JRh(n.bMT(2,1,"components.sparqlClient.infoQueryInProgress")))}function Dn(t,o){if(1&t&&n.nrm(0,"cue-svg-icon",21),2&t){const e=n.XpG().$implicit;n.Y8G("name",e.icon)}}function xn(t,o){if(1&t){const e=n.RV6();n.j41(0,"cue-menu-item",16),n.bIt("click",function(){const s=a.eBV(e).$implicit;return a.Njj(null==s?null:s.action())}),n.nVh(1,Dn,1,1,"cue-svg-icon",21),n.EFF(2),n.k0s()}if(2&t){const e=o.$implicit;n.R7$(),n.vxM(e.icon?1:-1),n.R7$(),n.SpI(" ",e.label)}}function An(t,o){if(1&t){const e=n.RV6();n.j41(0,"cue-button",22),n.bIt("click",function(){a.eBV(e);const s=n.XpG();return a.Njj(s.resetQuery())}),n.j41(1,"cue-button-label"),n.EFF(2),n.nI1(3,"transloco"),n.k0s()()}2&t&&(n.R7$(2),n.JRh(n.bMT(3,1,"components.sparqlClient.buttonReset")))}function Tn(t,o){1&t&&(n.j41(0,"cue-typography"),n.EFF(1),n.nI1(2,"transloco"),n.k0s()),2&t&&(n.R7$(),n.JRh(n.bMT(2,1,"components.sparqlClient.infoQueryInProgress")))}function Sn(t,o){if(1&t){const e=n.RV6();n.j41(0,"cue-query-results",23),n.bIt("clickedClose",function(){a.eBV(e);const s=n.XpG();return a.Njj(s.showResults.set(!1))}),n.k0s()}if(2&t){const e=n.XpG();n.Y8G("queryDetails",e.queryDetails())("queryResults",e.resultsRaw())("responseMimeType",e.responseMimeType())("variant",e.cardVariantBack())("minGraphHeight",e.minCardHeight())}}const Fn=[{label:"File Content",iri:`${F.E.qcy}FileContent`},{label:"File Location",iri:`${F.E.qcy}Location`},{label:"Entity Mention",iri:`${F.E.qcy}EntityMention`},{label:"Canonical Entity",iri:`${F.E.qcy}CanonicalEntity`},{label:"Selector",iri:`${F.E.qcy}Selector`}].sort((t,o)=>t.label.localeCompare(o.label)),In=[{label:"has entity category",iri:`${F.E.qcy}hasEntityCategory`},{label:"has content category",iri:`${F.E.qcy}hasContentCategory`},{label:"value",iri:`${F.E.qcy}value`},{label:"a",iri:`${Me.B.rdf}type`}].sort((t,o)=>t.label.localeCompare(o.label));let De=(()=>{class t{_inputModal=(0,a.WQX)(He);modalContainer;handlers=(0,p.hFB)();query=p.geq.required();cardVariant=(0,p.hFB)("default");cardVariantBack=(0,p.hFB)("accent");showResultsImmidiately=(0,p.hFB)(!0);showResults=(0,p.geq)(!1);flipForResults=(0,p.hFB)(!0);minCardHeight=(0,p.hFB)("300px");availableEntityCategories=(0,p.hFB)([]);availableContentCategories=(0,p.hFB)([]);availableTypes=(0,p.hFB)(Fn);availablePredicates=(0,p.hFB)(In);contextPatterns=(0,b.EW)(()=>{const e=[],i=this.availableEntityCategories();i?.length>0&&e.push({predicate:"qcy:hasEntityCategory",options:i});const s=this.availableContentCategories();s?.length>0&&e.push({predicate:"qcy:hasContentCategory",options:s});const r=this.availableTypes();r?.length>0&&e.push({predicate:"a",options:r});const c=this.availablePredicates();return c?.length>0&&e.push({options:c}),e});editorQuery=(0,b.uu)(()=>this.query());userQuery=(0,a.vPA)(void 0);userHasDefinedQuery=(0,b.EW)(()=>void 0!==this.userQuery()&&this.userQuery()!==this.query());currentQuery=(0,b.EW)(()=>this.userQuery()??this.query());queryInProgress=(0,a.vPA)(!1);responseMimeType=(0,a.vPA)(void 0);queryDetails=(0,b.EW)(()=>{const e=this.userQuery()??this.query();try{return(0,d.t)(e)}catch{return}});resultsRaw=(0,a.vPA)(void 0);queryError=(0,a.vPA)(void 0);executedQuery=(0,a.vPA)(void 0);resultsStillValid=(0,b.EW)(()=>this.executedQuery()===JSON.stringify(this.queryDetails()));labelSetResponseMime=(0,m.Xx)("components.sparqlClient.buttonSetResponseMime");menuItems=(0,b.EW)(()=>{var i,e=this;return[{label:this.labelSetResponseMime(),action:(i=(0,I.A)(function*(){e._inputModal.setViewContainerRef(e.modalContainer);const s=yield e._inputModal.requestInput({inputLabel:"Response Mime Type",inputValue:"",confirmText:"Set",rejectText:"Cancel"});e.responseMimeType.set(s??void 0)}),function(){return i.apply(this,arguments)})}]});onQuery=(0,a.QZP)(()=>{this.query(),this.showResults.set(!1),this.queryError.set(void 0),this.userQuery.set(void 0)});executeQuery(){var e=this;return(0,I.A)(function*(){e.queryInProgress.set(!0),e.queryError.set(void 0),e._reset();try{const i=e.userQuery()??e.query(),s=yield e.handlers()?.queryHandler(i,e.queryDetails(),e.responseMimeType());e.resultsRaw.set(s),e.executedQuery.set(JSON.stringify(e.queryDetails())),e.showResultsImmidiately()&&e.showResults.set(!0)}catch(i){e.queryError.set(i?.message??i?.error??String(i))}finally{e.queryInProgress.set(!1)}})()}resetQuery(){this.editorQuery.update(()=>this.query()+" "),setTimeout(()=>{this.editorQuery.update(()=>this.query()),this.userQuery.set(void 0)})}_reset(){this.resultsRaw.set(void 0),this.executedQuery.set(void 0)}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=n.VBU({type:t,selectors:[["cue-sparql-client"]],viewQuery:function(i,s){if(1&i&&n.GBs(vn,7,n.c1b),2&i){let r;n.mGM(r=n.lsd())&&(s.modalContainer=r.first)}},inputs:{handlers:[1,"handlers"],query:[1,"query"],cardVariant:[1,"cardVariant"],cardVariantBack:[1,"cardVariantBack"],showResultsImmidiately:[1,"showResultsImmidiately"],showResults:[1,"showResults"],flipForResults:[1,"flipForResults"],minCardHeight:[1,"minCardHeight"],availableEntityCategories:[1,"availableEntityCategories"],availableContentCategories:[1,"availableContentCategories"],availableTypes:[1,"availableTypes"],availablePredicates:[1,"availablePredicates"]},outputs:{query:"queryChange",showResults:"showResultsChange"},decls:29,vars:17,consts:[["modalContainer",""],["trigger",""],[2,"height","100%","width","100%","flex","1 1"],[1,"flip-card",3,"cueFlipChange","cueFlip"],[1,"flip-content"],[1,"card-face","front",2,"height","100%","flex","1 1",3,"variant","scrollable"],["direction","column",2,"height","calc(100% - 4px)","margin","2px"],["direction","row","justify","end","align","center","gap","m"],[2,"overflow-y","auto",3,"contentChanged","content","variant","contextPatterns"],[2,"flex","1"],[2,"background","#fef2f2","border","1px solid #fecaca","border-radius","6px","padding","8px 12px","font-size","12px","color","#b91c1c","word-break","break-word","white-space","pre-wrap","max-height","120px","overflow-y","auto","margin","4px 0"],["positioning","topright"],["trigger","","variant","tertiary"],["icon","more-vert"],["menu",""],["variant","secondary"],[3,"click"],[1,"card-face","back",2,"height","100%",3,"variant"],[2,"height","100%",3,"queryDetails","queryResults","responseMimeType","variant","minGraphHeight"],["size","s",3,"click","cueTooltip"],["icon","view-active"],["before","",3,"name"],["variant","secondary",3,"click"],[2,"height","100%",3,"clickedClose","queryDetails","queryResults","responseMimeType","variant","minGraphHeight"]],template:function(i,s){if(1&i){const r=n.RV6();n.eu8(0,null,0),n.j41(2,"cue-flexcontainer",2)(3,"div",3),n.mxI("cueFlipChange",function(u){return a.eBV(r),n.DH7(s.showResults,u)||(s.showResults=u),a.Njj(u)}),n.j41(4,"div",4)(5,"cue-card",5)(6,"cue-flexcontainer",6),n.nVh(7,En,4,3,"cue-flexcontainer",7),n.j41(8,"cue-sparql-editor",8),n.bIt("contentChanged",function(u){return s.userQuery.set(u)}),n.k0s(),n.nrm(9,"cue-flexcontainer",9),n.nVh(10,Rn,2,1,"div",10),n.j41(11,"cue-flexcontainer",7),n.nVh(12,Mn,3,3,"cue-typography"),n.j41(13,"cue-menu",11)(14,"cue-button",12,1),n.nrm(16,"cue-button-icon",13),n.k0s(),n.j41(17,"cue-menu-wrap",14),n.Z7z(18,xn,3,2,"cue-menu-item",null,bn),n.k0s()(),n.nVh(20,An,4,3,"cue-button",15),n.j41(21,"cue-button",16),n.bIt("click",function(){return s.executeQuery()}),n.j41(22,"cue-button-label"),n.EFF(23),n.nI1(24,"transloco"),n.k0s()()()()(),n.j41(25,"cue-card",17),n.nrm(26,"cue-flexcontainer",7),n.nVh(27,Tn,3,3,"cue-typography")(28,Sn,1,5,"cue-query-results",18),n.k0s()()()()}2&i&&(n.R7$(3),n.R50("cueFlip",s.showResults),n.R7$(2),n.Y8G("variant",s.cardVariant())("scrollable",!0),n.R7$(2),n.vxM(s.resultsRaw()&&s.resultsStillValid()?7:-1),n.R7$(),n.Y8G("content",s.editorQuery())("variant",s.cardVariant())("contextPatterns",s.contextPatterns()),n.R7$(2),n.vxM(s.queryError()?10:-1),n.R7$(2),n.vxM(s.queryInProgress()?12:-1),n.R7$(6),n.Dyx(s.menuItems()),n.R7$(2),n.vxM(s.userHasDefinedQuery()?20:-1),n.R7$(3),n.JRh(n.bMT(24,15,"components.sparqlClient.buttonExecute")),n.R7$(2),n.xc7("min-height",s.minCardHeight()),n.Y8G("variant",s.cardVariantBack()),n.R7$(2),n.vxM(s.queryInProgress()?27:28))},dependencies:[pn.Card,ee.n,te.$,$e.L,Cn,Z.Typography,Re.a,_.d,un,T.R,G.W,k.M,S.D,We.A,m.Kj],styles:["[_nghost-%COMP%]{display:contents}.wrapper[_ngcontent-%COMP%]{display:flex;width:100%}.flip-content[_ngcontent-%COMP%]{height:100%}.flip-card[_ngcontent-%COMP%]{height:100%;width:100%;flex:1 1}"],changeDetection:0})}return t})();var kn=g(63);const wn=["*"];function Bn(t,o){if(1&t&&(n.j41(0,"cue-typography"),n.EFF(1),n.k0s()),2&t){const e=n.XpG(2);n.R7$(),n.JRh(e.message())}}function Pn(t,o){if(1&t){const e=n.RV6();n.j41(0,"cue-modal",1),n.bIt("close",function(){a.eBV(e);const s=n.XpG();return a.Njj(s.onClose())}),n.j41(1,"cue-flexcontainer",2),n.SdG(2),n.nVh(3,Bn,2,1,"cue-typography"),n.j41(4,"cue-typography")(5,"cue-flexcontainer",3)(6,"cue-button",4),n.bIt("click",function(){a.eBV(e);const s=n.XpG();return a.Njj(s.onConfirmed())}),n.EFF(7),n.k0s(),n.j41(8,"cue-button",5),n.bIt("click",function(){a.eBV(e);const s=n.XpG();return a.Njj(s.onClose())}),n.EFF(9),n.k0s()()()()()}if(2&t){const e=n.XpG();n.Y8G("displayCloseBtn",!1)("closeOnBackgroundClick",!1),n.R7$(3),n.vxM(e.message()?3:-1),n.R7$(4),n.JRh(e.confirmText()),n.R7$(2),n.JRh(e.rejectText())}}let Nn=(()=>{class t{visible=(0,p.geq)(!0);message=(0,p.hFB)("");confirmText=(0,p.hFB)("Yes");rejectText=(0,p.hFB)("No");confirmed=(0,p.CGW)();onConfirmed(){this.visible.set(!1),this.confirmed.emit(!0)}onClose(){this.visible.set(!1),this.confirmed.emit(!1)}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=n.VBU({type:t,selectors:[["cue-modal-confirm"]],inputs:{visible:[1,"visible"],message:[1,"message"],confirmText:[1,"confirmText"],rejectText:[1,"rejectText"]},outputs:{visible:"visibleChange",confirmed:"confirmed"},ngContentSelectors:wn,decls:1,vars:1,consts:[[3,"displayCloseBtn","closeOnBackgroundClick"],[3,"close","displayCloseBtn","closeOnBackgroundClick"],["direction","column"],["direction","row"],["variant","secondary",3,"click"],[3,"click"]],template:function(i,s){1&i&&(n.NAR(),n.nVh(0,Pn,10,5,"cue-modal",0)),2&i&&n.vxM(s.visible()?0:-1)},dependencies:[Xe.a,ee.n,te.$,Z.Typography],encapsulation:2})}return t})(),qn=(()=>{class t extends Ue{confirm(e){if(!this.vcr)throw new Error("No ViewContainerRef!");const i=this.vcr.createComponent(Nn);return this.componentRef=i,e.message&&i.setInput("message",e.message),e.confirmText&&i.setInput("confirmText",e.confirmText),e.rejectText&&i.setInput("rejectText",e.rejectText),new Promise(s=>{const r=i.instance.confirmed.subscribe(c=>{s(c),r.unsubscribe(),i.destroy()})})}static \u0275fac=(()=>{let e;return function(s){return(e||(e=n.xGo(t)))(s||t)}})();static \u0275prov=a.jDH({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();const Ln=[{label:"List files",query:`PREFIX qcy: <${F.E.qcy}>\n\nSELECT ?content ?mimeCategory ?contentCategory (GROUP_CONCAT(?path) AS ?filePaths)\nWHERE{\n ?content a qcy:FileContent ;\n qcy:hasMimeCategory ?mimeCategory ;\n qcy:hasContentCategory ?contentCategory ;\n qcy:hasFileLocation ?location .\n ?location qcy:filePath ?path\n}\nGROUP BY ?content ?mimeCategory ?contentCategory`},{label:"Unresolved Entity Mentions",query:`PREFIX qcy: <${F.E.qcy}>\nPREFIX qcy-e: <${F.E["qcy-e"]}>\n\nSELECT ?category (COUNT(?entity) AS ?count)\nWHERE{\n ?entity a qcy:EntityMention ;\n qcy:hasEntityCategory ?category .\n FILTER NOT EXISTS { ?entity qcy:resolvesTo ?canonicalEntity }\n}\nGROUP BY ?category\nORDER BY DESC(?count)`},{label:"Resolved Entity Mentions",query:`PREFIX qcy: <${F.E.qcy}>\nPREFIX qcy-e: <${F.E["qcy-e"]}>\n\nSELECT ?category (COUNT(?entity) AS ?count)\nWHERE{\n ?entity a qcy:EntityMention ;\n qcy:hasEntityCategory ?category .\n ?entity qcy:resolvesTo ?canonicalEntity\n}\nGROUP BY ?category\nORDER BY DESC(?count)`},{label:"Canonical Entity count",query:`PREFIX qcy: <${F.E.qcy}>\nPREFIX qcy-e: <${F.E["qcy-e"]}>\n\nSELECT ?category (COUNT(?entity) AS ?count)\nWHERE{\n ?entity a qcy:CanonicalEntity ;\n qcy:hasEntityCategory ?category\n}\nGROUP BY ?category\nORDER BY DESC(?count)`},{label:"Design Documents and the most common entity categories in these",query:`PREFIX qcy: <${F.E.qcy}>\nPREFIX qcy-e: <${F.E["qcy-e"]}>\nPREFIX skos: <${Me.B.skos}>\n\nSELECT ?entityCategory ?label (COUNT(?entity) AS ?count)\nWHERE{\n ?document qcy:hasContentCategory qcy-e:DesignDocument ;\n qcy:about ?entity .\n ?entity qcy:hasEntityCategory ?entityCategory .\n ?entityCategory skos:prefLabel ?label\n}\nGROUP BY ?entityCategory ?label\nORDER BY desc(?count)`},{label:"Unique documents per file suffix",query:`PREFIX qcy: <${F.E.qcy}>\nSELECT ?ext (COUNT(?fc) as ?count)\nWHERE{\n ?fc a qcy:FileContent ;\n qcy:hasFileLocation ?loc .\n ?loc qcy:suffix ?ext\n}\nGROUP BY ?ext\nORDER BY DESC(?count)`},{label:"File duplicates",query:`PREFIX qcy: <${F.E.qcy}>\nSELECT ?file (COUNT(?path) AS ?count) (GROUP_CONCAT(?path; SEPARATOR=";") AS ?paths)\nWHERE{\n ?iri a qcy:FileContent ;\n qcy:hasFileLocation ?loc .\n ?loc qcy:filePath ?path\n BIND(REPLACE(STR(?iri), "^.*/([^/]*)$", "$1") AS ?file)\n}\nGROUP BY ?file\nHAVING (?count > 1)\nORDER BY DESC(?count)`},{label:"Drawing Categories in Drawing Sheets",query:`PREFIX qcy: <${F.E.qcy}>\nPREFIX qcy-e: <${F.E["qcy-e"]}>\nPREFIX skos: <${Me.B.skos}>\n\nSELECT ?drawingCat ?drawingCatLabel (COUNT(?drawing) AS ?count)\nWHERE{\n ?entity a qcy:CanonicalEntity ;\n qcy:hasEntityCategory qcy-e:DrawingSheet ;\n qcy:sheetContainsDrawing ?drawing .\n ?drawing qcy:hasEntityCategory ?drawingCat .\n ?drawingCat skos:prefLabel ?drawingCatLabel\n}\nGROUP BY ?drawingCat ?drawingCatLabel\nORDER BY DESC(?count)`},{label:"Documents with Drawing Sheets that contain Floor Plan Drawings",query:`PREFIX qcy: <${F.E.qcy}>\nPREFIX qcy-e: <${F.E["qcy-e"]}>\n\nSELECT ?document ?filePath\nWHERE{\n ?document qcy:hasContentCategory qcy-e:DesignDocument ;\n qcy:about ?drawingSheet .\n ?drawingSheet qcy:hasEntityCategory qcy-e:DrawingSheet ;\n qcy:sheetContainsDrawing ?drawing .\n ?drawing qcy:hasEntityCategory qcy-e:FloorPlanDrawing .\n ?document qcy:hasFileLocation/qcy:filePath ?filePath\n}`},{label:"Index stats",query:"\nSELECT ?implicitCount ?explicitCount ?totalCount ?implicitFractionPct\nWHERE{\n {\n SELECT (COUNT(*) AS ?implicitCount)\n WHERE{\n GRAPH <https://implicit> { ?s ?p ?o }\n }\n }\n {\n SELECT (COUNT(*) AS ?explicitCount)\n WHERE{\n GRAPH ?g { ?s ?p ?o }\n FILTER(?g != <https://implicit>)\n }\n }\n BIND(?implicitCount + ?explicitCount AS ?totalCount)\n BIND(?implicitCount / ?totalCount * 100 AS ?implicitFractionPct)\n}"},{label:"Most prominent graphs",query:"SELECT ?g (COUNT(?s) AS ?triples)\nWHERE{\n GRAPH ?g {?s ?p ?o}\n}\nGROUP BY ?g\nORDER BY DESC(?triples)"},{label:"Most connected entities of a category",query:`PREFIX qcy: <${F.E.qcy}>\nPREFIX qcy-e: <${F.E["qcy-e"]}>\nSELECT ?s (COUNT(?x) AS ?rels)\nWHERE{\n # DEFINE CATEGORY\n BIND(qcy-e:DrawingSheet as ?category)\n\n ?s a qcy:CanonicalEntity ;\n qcy:hasEntityCategory ?category ;\n qcy:relatedEntity ?x\n}\nGROUP BY ?s\nORDER BY DESC(?rels)\nLIMIT 10`},{label:"Documents about Philipp",query:`PREFIX qcy: <${F.E.qcy}>\nPREFIX qcy-e: <${F.E["qcy-e"]}>\n\nSELECT ?doc\nWHERE{\n ?doc a qcy:FileContent ;\n qcy:about ?entity .\n ?entity a qcy:CanonicalEntity ;\n qcy:hasEntityCategory qcy-e:Person ;\n qcy:value ?name .\n FILTER(REGEX(?name, "Philipp"))\n}`}],On=["modalContainer"];function Vn(t,o){if(1&t){const e=n.RV6();n.j41(0,"cue-button",6),n.bIt("click",function(){a.eBV(e);const s=n.XpG(3);return a.Njj(s.deleteSelectedQuery())}),n.nrm(1,"cue-button-icon",9),n.k0s()}if(2&t){const e=n.XpG(3);n.Y8G("cueTooltip",e.tooltipDeleteQuery())}}function jn(t,o){if(1&t){const e=n.RV6();n.j41(0,"cue-button",6),n.bIt("click",function(){a.eBV(e);const s=n.XpG(2);return a.Njj(s.saveCurrentQuery())}),n.nrm(1,"cue-button-icon",7),n.k0s(),n.nVh(2,Vn,2,1,"cue-button",8)}if(2&t){const e=n.XpG(2);n.Y8G("cueTooltip",e.labelSaveCurrentQuery()),n.R7$(2),n.vxM(e.selectedIsSaved()?2:-1)}}function Qn(t,o){if(1&t){const e=n.RV6();n.j41(0,"cue-flexcontainer",1)(1,"cue-flexcontainer",3)(2,"cue-select",4),n.mxI("valueChange",function(s){a.eBV(e);const r=n.XpG();return n.DH7(r.selectedKey,s)||(r.selectedKey=s),a.Njj(s)}),n.k0s(),n.nVh(3,jn,3,2),n.k0s(),n.j41(4,"cue-sparql-client",5),n.mxI("queryChange",function(s){a.eBV(e);const r=n.XpG();return n.DH7(r.query,s)||(r.query=s),a.Njj(s)}),n.k0s()()}if(2&t){const e=n.XpG();n.R7$(2),n.Y8G("options",e.selectOptions())("labelMap",e.selectLabelMap())("iconMap",e.selectIconMap()),n.R50("value",e.selectedKey),n.Y8G("placeholder",e.labelQueries()),n.R7$(),n.vxM(e.canPersist()?3:-1),n.R7$(),n.R50("query",e.query),n.Y8G("handlers",o)("showResultsImmidiately",!0)}}function Gn(t,o){1&t&&(n.j41(0,"cue-flexcontainer",2)(1,"cue-typography",10),n.EFF(2," No project connected. Pass a sdkState with cue and projectId. "),n.k0s()())}const ne="31980d52-5d6f-4cd1-bf75-7a543ed8410b",Wn=`PREFIX qcy: <${F.E.qcy}>\n\nSELECT DISTINCT ?doc ?contentCat\nWHERE {\n ?doc a qcy:FileContent .\n FILTER NOT EXISTS { ?_alt qcy:alternativeRepresentation ?doc }\n OPTIONAL { ?doc qcy:hasContentCategory ?contentCat }\n}\nLIMIT 20`,ie="predefined:",X="saved:";let Un=(()=>{class t{_inputModal=(0,a.WQX)(He);_confirmModal=(0,a.WQX)(qn);modalContainer;sdkState=(0,p.hFB)(void 0);query=(0,p.geq)(Wn);predefinedQueries=Ln;savedQueries=(0,a.vPA)([]);selectedKey=(0,a.vPA)(void 0);_client=(0,p.ebz)(De);_savedQueriesLoaded=!1;labelQueries=(0,m.Xx)("components.sparqlClient.buttonQueries");labelSaveCurrentQuery=(0,m.Xx)("components.sparqlClient.buttonSaveCurrentQuery");tooltipDeleteQuery=(0,m.Xx)("components.sparqlClient.tooltipDeleteQuery");_handlers=(0,b.EW)(()=>{const e=this.sdkState();if(!e)return;const{cue:i,projectId:s,graphType:r="fuseki"}=e;return{queryHandler:c=>i.api.sparql(c,s,r)}});canPersist=(0,b.EW)(()=>!!this.sdkState()?.cue.auth.currentUser);selectOptions=(0,b.EW)(()=>[...this.predefinedQueries.map(e=>ie+e.label),...this.savedQueries().map(e=>X+e.label)]);selectLabelMap=(0,b.EW)(()=>{const e={};for(const i of this.predefinedQueries)e[ie+i.label]=i.label;for(const i of this.savedQueries())e[X+i.label]=i.label;return e});selectIconMap=(0,b.EW)(()=>{const e={};for(const i of this.predefinedQueries)e[ie+i.label]="document";for(const i of this.savedQueries())e[X+i.label]="save";return e});selectedIsSaved=(0,b.EW)(()=>(this.selectedKey()??"").startsWith(X));onLoadSavedQueries=(0,a.QZP)(()=>{const e=this.sdkState()?.cue;!e?.auth.currentUser||this._savedQueriesLoaded||(this._savedQueriesLoaded=!0,e.api.appData.get(ne).then(i=>this.savedQueries.set(i??[])).catch(()=>this._savedQueriesLoaded=!1))});onQuerySelected=(0,a.QZP)(()=>{const e=this.selectedKey();if(!e)return;const i=this._findQuery(e);i&&this.query.set(i.query)});saveCurrentQuery(){var e=this;return(0,I.A)(function*(){const i=e.sdkState()?.cue;if(!i?.auth.currentUser)return;e._inputModal.setViewContainerRef(e.modalContainer);const s=yield e._inputModal.requestInput({inputLabel:"Query name",inputValue:"",confirmText:"Save",rejectText:"Cancel"});if(!s)return;const r=e._client()?.currentQuery()??e.query(),u=[...((yield i.api.appData.get(ne))??[]).filter(l=>l.label!==s),{label:s,query:r}];yield i.api.appData.set(ne,u),e.savedQueries.set(u),e.selectedKey.set(X+s)})()}deleteSelectedQuery(){var e=this;return(0,I.A)(function*(){const i=e.sdkState()?.cue,s=e.selectedKey();if(!i?.auth.currentUser||!s?.startsWith(X))return;const r=s.slice(6);if(e._confirmModal.setViewContainerRef(e.modalContainer),!(yield e._confirmModal.confirm({message:`Delete saved query "${r}"?`,confirmText:"Delete",rejectText:"Cancel"})))return;const l=((yield i.api.appData.get(ne))??[]).filter(f=>f.label!==r);yield i.api.appData.set(ne,l),e.savedQueries.set(l),e.selectedKey.set(void 0)})()}_findQuery(e){if(e.startsWith(ie)){const i=e.slice(11);return this.predefinedQueries.find(s=>s.label===i)}if(e.startsWith(X)){const i=e.slice(6);return this.savedQueries().find(s=>s.label===i)}}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=n.VBU({type:t,selectors:[["cue-sparql-client-sdk"]],viewQuery:function(i,s){if(1&i&&(n.wEZ(s._client,De,5),n.GBs(On,7,n.c1b)),2&i){let r;n.NyB(),n.mGM(r=n.lsd())&&(s.modalContainer=r.first)}},inputs:{sdkState:[1,"sdkState"],query:[1,"query"]},outputs:{query:"queryChange"},decls:4,vars:1,consts:[["modalContainer",""],["direction","column","gap","s",2,"height","100%","width","100%"],["direction","column","align","center","justify","center",2,"height","100%","width","100%","padding","8px"],["direction","row","align","center","gap","s",2,"flex","0 0 auto"],["size","s",2,"flex","1 1 auto","min-width","0",3,"valueChange","options","labelMap","iconMap","value","placeholder"],["cardVariant","primary","cardVariantBack","default",2,"flex","1 1 auto","display","block","min-height","0",3,"queryChange","query","handlers","showResultsImmidiately"],["variant","tertiary","size","s",3,"click","cueTooltip"],["icon","save"],["variant","tertiary","size","s",3,"cueTooltip"],["icon","delete"],[2,"color","#9ca3af","font-size","13px"]],template:function(i,s){if(1&i&&(n.eu8(0,null,0),n.nVh(2,Qn,5,9,"cue-flexcontainer",1)(3,Gn,3,0,"cue-flexcontainer",2)),2&i){let r;n.R7$(2),n.vxM((r=s._handlers())?2:3,r)}},dependencies:[De,ee.n,Z.Typography,kn.Select,te.$,Re.a,_.d],styles:["[_nghost-%COMP%]{display:block;width:100%;height:100%}"],changeDetection:0})}return t})()},2065(H,N,g){function p(m,d,_="text/plain"){return function I(m,d="data.zip"){const _=document.createElement("a"),T=URL.createObjectURL(m);_.href=T,_.download=d,document.body.appendChild(_),_.click(),document.body.removeChild(_),URL.revokeObjectURL(T)}(new Blob([m],{type:_}),d)}function b(m,d){const _=document.createElement("a");_.style.display="hidden",_.setAttribute("href",window.URL.createObjectURL(m)),_.setAttribute("download",d),document.body.appendChild(_),_.click(),_.remove()}g.d(N,{KE:()=>b,YN:()=>p})},5332(H,N,g){g.d(N,{k:()=>b});for(var a=[],p=0;p<256;++p)a.push((p+256).toString(16).slice(1));function b(d,_=0){return(a[d[_+0]]+a[d[_+1]]+a[d[_+2]]+a[d[_+3]]+"-"+a[d[_+4]]+a[d[_+5]]+"-"+a[d[_+6]]+a[d[_+7]]+"-"+a[d[_+8]]+a[d[_+9]]+"-"+a[d[_+10]]+a[d[_+11]]+a[d[_+12]]+a[d[_+13]]+a[d[_+14]]+a[d[_+15]]).toLowerCase()}},8402(H,N,g){g.d(N,{A:()=>_});const a={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};var p,b=new Uint8Array(16);function n(){if(!p&&!(p=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return p(b)}var m=g(5332);const _=function d(T,q,U){if(a.randomUUID&&!q&&!T)return a.randomUUID();var V=(T=T||{}).random||(T.rng||n)();if(V[6]=15&V[6]|64,V[8]=63&V[8]|128,q){U=U||0;for(var G=0;G<16;++G)q[U+G]=V[G];return q}return(0,m.k)(V)}}}]);