@spectric/ui 0.0.7 → 0.0.9

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 (46) hide show
  1. package/README.MD +5 -28
  2. package/dist/components/Button.d.ts +14 -3
  3. package/dist/components/index.d.ts +3 -0
  4. package/dist/components/input.d.ts +5 -1
  5. package/dist/components/pagination/index.d.ts +1 -0
  6. package/dist/components/pagination/pagination.d.ts +60 -0
  7. package/dist/components/table/body.d.ts +44 -0
  8. package/dist/components/table/cell.d.ts +58 -0
  9. package/dist/components/table/header.d.ts +42 -0
  10. package/dist/components/table/index.d.ts +1 -0
  11. package/dist/components/table/table.d.ts +100 -0
  12. package/dist/components/tooltip/index.d.ts +1 -0
  13. package/dist/components/tooltip/tooltip.d.ts +95 -0
  14. package/dist/custom-elements.json +201 -7
  15. package/dist/index.es.js +2104 -1612
  16. package/dist/index.es.js.map +1 -1
  17. package/dist/index.umd.js +222 -83
  18. package/dist/index.umd.js.map +1 -1
  19. package/dist/style.css +1 -1
  20. package/package.json +1 -1
  21. package/src/components/Button.ts +23 -4
  22. package/src/components/button.css.ts +85 -2
  23. package/src/components/index.ts +4 -1
  24. package/src/components/input.css +6 -1
  25. package/src/components/input.ts +26 -5
  26. package/src/components/pagination/index.ts +1 -0
  27. package/src/components/pagination/pagination.css +10 -0
  28. package/src/components/pagination/pagination.ts +133 -0
  29. package/src/components/table/body.ts +69 -0
  30. package/src/components/table/cell.ts +133 -0
  31. package/src/components/table/header.ts +68 -0
  32. package/src/components/table/index.ts +1 -0
  33. package/src/components/table/table.css +46 -0
  34. package/src/components/table/table.ts +174 -0
  35. package/src/components/tooltip/index.ts +1 -0
  36. package/src/components/tooltip/tooltip.css +52 -0
  37. package/src/components/tooltip/tooltip.ts +228 -0
  38. package/src/docs/HTML-Vue-Python Integration.mdx +18 -0
  39. package/src/docs/React.mdx +20 -0
  40. package/src/docs/welcome.mdx +29 -0
  41. package/src/stories/Button.stories.ts +25 -2
  42. package/src/stories/fixtures/ExampleContent.ts +39 -4
  43. package/src/stories/fixtures/data.ts +20 -2
  44. package/src/stories/pagination.stories.ts +63 -0
  45. package/src/stories/table.stories.ts +88 -0
  46. package/src/stories/tooltip.stories.ts +68 -0
package/dist/index.umd.js CHANGED
@@ -1,30 +1,30 @@
1
- (function(d,Z){typeof exports=="object"&&typeof module<"u"?Z(exports):typeof define=="function"&&define.amd?define(["exports"],Z):(d=typeof globalThis<"u"?globalThis:d||self,Z(d["Spectric-UI"]={}))})(this,function(d){"use strict";/**
1
+ (function(d,X){typeof exports=="object"&&typeof module<"u"?X(exports):typeof define=="function"&&define.amd?define(["exports"],X):(d=typeof globalThis<"u"?globalThis:d||self,X(d["Spectric-UI"]={}))})(this,function(d){"use strict";/**
2
2
  * @license
3
3
  * Copyright 2019 Google LLC
4
4
  * SPDX-License-Identifier: BSD-3-Clause
5
- */var zr;const Z=globalThis,ht=Z.ShadowRoot&&(Z.ShadyCSS===void 0||Z.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,gt=Symbol(),Gt=new WeakMap;let Jt=class{constructor(r,s,i){if(this._$cssResult$=!0,i!==gt)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=r,this.t=s}get styleSheet(){let r=this.o;const s=this.t;if(ht&&r===void 0){const i=s!==void 0&&s.length===1;i&&(r=Gt.get(s)),r===void 0&&((this.o=r=new CSSStyleSheet).replaceSync(this.cssText),i&&Gt.set(s,r))}return r}toString(){return this.cssText}};const Vi=n=>new Jt(typeof n=="string"?n:n+"",void 0,gt),z=(n,...r)=>{const s=n.length===1?n[0]:r.reduce((i,a,t)=>i+(p=>{if(p._$cssResult$===!0)return p.cssText;if(typeof p=="number")return p;throw Error("Value passed to 'css' function must be a 'css' function result: "+p+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(a)+n[t+1],n[0]);return new Jt(s,n,gt)},Ki=(n,r)=>{if(ht)n.adoptedStyleSheets=r.map(s=>s instanceof CSSStyleSheet?s:s.styleSheet);else for(const s of r){const i=document.createElement("style"),a=Z.litNonce;a!==void 0&&i.setAttribute("nonce",a),i.textContent=s.cssText,n.appendChild(i)}},er=ht?n=>n:n=>n instanceof CSSStyleSheet?(r=>{let s="";for(const i of r.cssRules)s+=i.cssText;return Vi(s)})(n):n;/**
5
+ */var Jr;const X=globalThis,_t=X.ShadowRoot&&(X.ShadyCSS===void 0||X.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,wt=Symbol(),ar=new WeakMap;let cr=class{constructor(r,s,i){if(this._$cssResult$=!0,i!==wt)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=r,this.t=s}get styleSheet(){let r=this.o;const s=this.t;if(_t&&r===void 0){const i=s!==void 0&&s.length===1;i&&(r=ar.get(s)),r===void 0&&((this.o=r=new CSSStyleSheet).replaceSync(this.cssText),i&&ar.set(s,r))}return r}toString(){return this.cssText}};const as=o=>new cr(typeof o=="string"?o:o+"",void 0,wt),R=(o,...r)=>{const s=o.length===1?o[0]:r.reduce((i,a,e)=>i+(u=>{if(u._$cssResult$===!0)return u.cssText;if(typeof u=="number")return u;throw Error("Value passed to 'css' function must be a 'css' function result: "+u+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(a)+o[e+1],o[0]);return new cr(s,o,wt)},cs=(o,r)=>{if(_t)o.adoptedStyleSheets=r.map(s=>s instanceof CSSStyleSheet?s:s.styleSheet);else for(const s of r){const i=document.createElement("style"),a=X.litNonce;a!==void 0&&i.setAttribute("nonce",a),i.textContent=s.cssText,o.appendChild(i)}},lr=_t?o=>o:o=>o instanceof CSSStyleSheet?(r=>{let s="";for(const i of r.cssRules)s+=i.cssText;return as(s)})(o):o;/**
6
6
  * @license
7
7
  * Copyright 2017 Google LLC
8
8
  * SPDX-License-Identifier: BSD-3-Clause
9
- */const{is:Zi,defineProperty:Xi,getOwnPropertyDescriptor:Gi,getOwnPropertyNames:Ji,getOwnPropertySymbols:es,getPrototypeOf:ts}=Object,X=globalThis,tr=X.trustedTypes,rs=tr?tr.emptyScript:"",bt=X.reactiveElementPolyfillSupport,ke=(n,r)=>n,ze={toAttribute(n,r){switch(r){case Boolean:n=n?rs:null;break;case Object:case Array:n=n==null?n:JSON.stringify(n)}return n},fromAttribute(n,r){let s=n;switch(r){case Boolean:s=n!==null;break;case Number:s=n===null?null:Number(n);break;case Object:case Array:try{s=JSON.parse(n)}catch{s=null}}return s}},vt=(n,r)=>!Zi(n,r),rr={attribute:!0,type:String,converter:ze,reflect:!1,hasChanged:vt};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),X.litPropertyMetadata??(X.litPropertyMetadata=new WeakMap);class fe extends HTMLElement{static addInitializer(r){this._$Ei(),(this.l??(this.l=[])).push(r)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(r,s=rr){if(s.state&&(s.attribute=!1),this._$Ei(),this.elementProperties.set(r,s),!s.noAccessor){const i=Symbol(),a=this.getPropertyDescriptor(r,i,s);a!==void 0&&Xi(this.prototype,r,a)}}static getPropertyDescriptor(r,s,i){const{get:a,set:t}=Gi(this.prototype,r)??{get(){return this[s]},set(p){this[s]=p}};return{get(){return a==null?void 0:a.call(this)},set(p){const g=a==null?void 0:a.call(this);t.call(this,p),this.requestUpdate(r,g,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(r){return this.elementProperties.get(r)??rr}static _$Ei(){if(this.hasOwnProperty(ke("elementProperties")))return;const r=ts(this);r.finalize(),r.l!==void 0&&(this.l=[...r.l]),this.elementProperties=new Map(r.elementProperties)}static finalize(){if(this.hasOwnProperty(ke("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(ke("properties"))){const s=this.properties,i=[...Ji(s),...es(s)];for(const a of i)this.createProperty(a,s[a])}const r=this[Symbol.metadata];if(r!==null){const s=litPropertyMetadata.get(r);if(s!==void 0)for(const[i,a]of s)this.elementProperties.set(i,a)}this._$Eh=new Map;for(const[s,i]of this.elementProperties){const a=this._$Eu(s,i);a!==void 0&&this._$Eh.set(a,s)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(r){const s=[];if(Array.isArray(r)){const i=new Set(r.flat(1/0).reverse());for(const a of i)s.unshift(er(a))}else r!==void 0&&s.push(er(r));return s}static _$Eu(r,s){const i=s.attribute;return i===!1?void 0:typeof i=="string"?i:typeof r=="string"?r.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var r;this._$ES=new Promise(s=>this.enableUpdating=s),this._$AL=new Map,this._$E_(),this.requestUpdate(),(r=this.constructor.l)==null||r.forEach(s=>s(this))}addController(r){var s;(this._$EO??(this._$EO=new Set)).add(r),this.renderRoot!==void 0&&this.isConnected&&((s=r.hostConnected)==null||s.call(r))}removeController(r){var s;(s=this._$EO)==null||s.delete(r)}_$E_(){const r=new Map,s=this.constructor.elementProperties;for(const i of s.keys())this.hasOwnProperty(i)&&(r.set(i,this[i]),delete this[i]);r.size>0&&(this._$Ep=r)}createRenderRoot(){const r=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Ki(r,this.constructor.elementStyles),r}connectedCallback(){var r;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(r=this._$EO)==null||r.forEach(s=>{var i;return(i=s.hostConnected)==null?void 0:i.call(s)})}enableUpdating(r){}disconnectedCallback(){var r;(r=this._$EO)==null||r.forEach(s=>{var i;return(i=s.hostDisconnected)==null?void 0:i.call(s)})}attributeChangedCallback(r,s,i){this._$AK(r,i)}_$EC(r,s){var t;const i=this.constructor.elementProperties.get(r),a=this.constructor._$Eu(r,i);if(a!==void 0&&i.reflect===!0){const p=(((t=i.converter)==null?void 0:t.toAttribute)!==void 0?i.converter:ze).toAttribute(s,i.type);this._$Em=r,p==null?this.removeAttribute(a):this.setAttribute(a,p),this._$Em=null}}_$AK(r,s){var t;const i=this.constructor,a=i._$Eh.get(r);if(a!==void 0&&this._$Em!==a){const p=i.getPropertyOptions(a),g=typeof p.converter=="function"?{fromAttribute:p.converter}:((t=p.converter)==null?void 0:t.fromAttribute)!==void 0?p.converter:ze;this._$Em=a,this[a]=g.fromAttribute(s,p.type),this._$Em=null}}requestUpdate(r,s,i){if(r!==void 0){if(i??(i=this.constructor.getPropertyOptions(r)),!(i.hasChanged??vt)(this[r],s))return;this.P(r,s,i)}this.isUpdatePending===!1&&(this._$ES=this._$ET())}P(r,s,i){this._$AL.has(r)||this._$AL.set(r,s),i.reflect===!0&&this._$Em!==r&&(this._$Ej??(this._$Ej=new Set)).add(r)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(s){Promise.reject(s)}const r=this.scheduleUpdate();return r!=null&&await r,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var i;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[t,p]of this._$Ep)this[t]=p;this._$Ep=void 0}const a=this.constructor.elementProperties;if(a.size>0)for(const[t,p]of a)p.wrapped!==!0||this._$AL.has(t)||this[t]===void 0||this.P(t,this[t],p)}let r=!1;const s=this._$AL;try{r=this.shouldUpdate(s),r?(this.willUpdate(s),(i=this._$EO)==null||i.forEach(a=>{var t;return(t=a.hostUpdate)==null?void 0:t.call(a)}),this.update(s)):this._$EU()}catch(a){throw r=!1,this._$EU(),a}r&&this._$AE(s)}willUpdate(r){}_$AE(r){var s;(s=this._$EO)==null||s.forEach(i=>{var a;return(a=i.hostUpdated)==null?void 0:a.call(i)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(r)),this.updated(r)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(r){return!0}update(r){this._$Ej&&(this._$Ej=this._$Ej.forEach(s=>this._$EC(s,this[s]))),this._$EU()}updated(r){}firstUpdated(r){}}fe.elementStyles=[],fe.shadowRootOptions={mode:"open"},fe[ke("elementProperties")]=new Map,fe[ke("finalized")]=new Map,bt==null||bt({ReactiveElement:fe}),(X.reactiveElementVersions??(X.reactiveElementVersions=[])).push("2.0.4");/**
9
+ */const{is:ls,defineProperty:ps,getOwnPropertyDescriptor:us,getOwnPropertyNames:ds,getOwnPropertySymbols:hs,getPrototypeOf:fs}=Object,G=globalThis,pr=G.trustedTypes,gs=pr?pr.emptyScript:"",St=G.reactiveElementPolyfillSupport,Pe=(o,r)=>o,qe={toAttribute(o,r){switch(r){case Boolean:o=o?gs:null;break;case Object:case Array:o=o==null?o:JSON.stringify(o)}return o},fromAttribute(o,r){let s=o;switch(r){case Boolean:s=o!==null;break;case Number:s=o===null?null:Number(o);break;case Object:case Array:try{s=JSON.parse(o)}catch{s=null}}return s}},At=(o,r)=>!ls(o,r),ur={attribute:!0,type:String,converter:qe,reflect:!1,hasChanged:At};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),G.litPropertyMetadata??(G.litPropertyMetadata=new WeakMap);class fe extends HTMLElement{static addInitializer(r){this._$Ei(),(this.l??(this.l=[])).push(r)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(r,s=ur){if(s.state&&(s.attribute=!1),this._$Ei(),this.elementProperties.set(r,s),!s.noAccessor){const i=Symbol(),a=this.getPropertyDescriptor(r,i,s);a!==void 0&&ps(this.prototype,r,a)}}static getPropertyDescriptor(r,s,i){const{get:a,set:e}=us(this.prototype,r)??{get(){return this[s]},set(u){this[s]=u}};return{get(){return a==null?void 0:a.call(this)},set(u){const g=a==null?void 0:a.call(this);e.call(this,u),this.requestUpdate(r,g,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(r){return this.elementProperties.get(r)??ur}static _$Ei(){if(this.hasOwnProperty(Pe("elementProperties")))return;const r=fs(this);r.finalize(),r.l!==void 0&&(this.l=[...r.l]),this.elementProperties=new Map(r.elementProperties)}static finalize(){if(this.hasOwnProperty(Pe("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(Pe("properties"))){const s=this.properties,i=[...ds(s),...hs(s)];for(const a of i)this.createProperty(a,s[a])}const r=this[Symbol.metadata];if(r!==null){const s=litPropertyMetadata.get(r);if(s!==void 0)for(const[i,a]of s)this.elementProperties.set(i,a)}this._$Eh=new Map;for(const[s,i]of this.elementProperties){const a=this._$Eu(s,i);a!==void 0&&this._$Eh.set(a,s)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(r){const s=[];if(Array.isArray(r)){const i=new Set(r.flat(1/0).reverse());for(const a of i)s.unshift(lr(a))}else r!==void 0&&s.push(lr(r));return s}static _$Eu(r,s){const i=s.attribute;return i===!1?void 0:typeof i=="string"?i:typeof r=="string"?r.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var r;this._$ES=new Promise(s=>this.enableUpdating=s),this._$AL=new Map,this._$E_(),this.requestUpdate(),(r=this.constructor.l)==null||r.forEach(s=>s(this))}addController(r){var s;(this._$EO??(this._$EO=new Set)).add(r),this.renderRoot!==void 0&&this.isConnected&&((s=r.hostConnected)==null||s.call(r))}removeController(r){var s;(s=this._$EO)==null||s.delete(r)}_$E_(){const r=new Map,s=this.constructor.elementProperties;for(const i of s.keys())this.hasOwnProperty(i)&&(r.set(i,this[i]),delete this[i]);r.size>0&&(this._$Ep=r)}createRenderRoot(){const r=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return cs(r,this.constructor.elementStyles),r}connectedCallback(){var r;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(r=this._$EO)==null||r.forEach(s=>{var i;return(i=s.hostConnected)==null?void 0:i.call(s)})}enableUpdating(r){}disconnectedCallback(){var r;(r=this._$EO)==null||r.forEach(s=>{var i;return(i=s.hostDisconnected)==null?void 0:i.call(s)})}attributeChangedCallback(r,s,i){this._$AK(r,i)}_$EC(r,s){var e;const i=this.constructor.elementProperties.get(r),a=this.constructor._$Eu(r,i);if(a!==void 0&&i.reflect===!0){const u=(((e=i.converter)==null?void 0:e.toAttribute)!==void 0?i.converter:qe).toAttribute(s,i.type);this._$Em=r,u==null?this.removeAttribute(a):this.setAttribute(a,u),this._$Em=null}}_$AK(r,s){var e;const i=this.constructor,a=i._$Eh.get(r);if(a!==void 0&&this._$Em!==a){const u=i.getPropertyOptions(a),g=typeof u.converter=="function"?{fromAttribute:u.converter}:((e=u.converter)==null?void 0:e.fromAttribute)!==void 0?u.converter:qe;this._$Em=a,this[a]=g.fromAttribute(s,u.type),this._$Em=null}}requestUpdate(r,s,i){if(r!==void 0){if(i??(i=this.constructor.getPropertyOptions(r)),!(i.hasChanged??At)(this[r],s))return;this.P(r,s,i)}this.isUpdatePending===!1&&(this._$ES=this._$ET())}P(r,s,i){this._$AL.has(r)||this._$AL.set(r,s),i.reflect===!0&&this._$Em!==r&&(this._$Ej??(this._$Ej=new Set)).add(r)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(s){Promise.reject(s)}const r=this.scheduleUpdate();return r!=null&&await r,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var i;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[e,u]of this._$Ep)this[e]=u;this._$Ep=void 0}const a=this.constructor.elementProperties;if(a.size>0)for(const[e,u]of a)u.wrapped!==!0||this._$AL.has(e)||this[e]===void 0||this.P(e,this[e],u)}let r=!1;const s=this._$AL;try{r=this.shouldUpdate(s),r?(this.willUpdate(s),(i=this._$EO)==null||i.forEach(a=>{var e;return(e=a.hostUpdate)==null?void 0:e.call(a)}),this.update(s)):this._$EU()}catch(a){throw r=!1,this._$EU(),a}r&&this._$AE(s)}willUpdate(r){}_$AE(r){var s;(s=this._$EO)==null||s.forEach(i=>{var a;return(a=i.hostUpdated)==null?void 0:a.call(i)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(r)),this.updated(r)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(r){return!0}update(r){this._$Ej&&(this._$Ej=this._$Ej.forEach(s=>this._$EC(s,this[s]))),this._$EU()}updated(r){}firstUpdated(r){}}fe.elementStyles=[],fe.shadowRootOptions={mode:"open"},fe[Pe("elementProperties")]=new Map,fe[Pe("finalized")]=new Map,St==null||St({ReactiveElement:fe}),(G.reactiveElementVersions??(G.reactiveElementVersions=[])).push("2.0.4");/**
10
10
  * @license
11
11
  * Copyright 2017 Google LLC
12
12
  * SPDX-License-Identifier: BSD-3-Clause
13
- */const xe=globalThis,Ie=xe.trustedTypes,ir=Ie?Ie.createPolicy("lit-html",{createHTML:n=>n}):void 0,sr="$lit$",G=`lit$${Math.random().toFixed(9).slice(2)}$`,or="?"+G,is=`<${or}>`,se=document,Ce=()=>se.createComment(""),Ee=n=>n===null||typeof n!="object"&&typeof n!="function",yt=Array.isArray,ss=n=>yt(n)||typeof(n==null?void 0:n[Symbol.iterator])=="function",mt=`[
14
- \f\r]`,Oe=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,nr=/-->/g,cr=/>/g,oe=RegExp(`>|${mt}(?:([^\\s"'>=/]+)(${mt}*=${mt}*(?:[^
15
- \f\r"'\`<>=]|("|')|))|$)`,"g"),ar=/'/g,lr=/"/g,ur=/^(?:script|style|textarea|title)$/i,os=n=>(r,...s)=>({_$litType$:n,strings:r,values:s}),k=os(1),ne=Symbol.for("lit-noChange"),C=Symbol.for("lit-nothing"),pr=new WeakMap,ce=se.createTreeWalker(se,129);function dr(n,r){if(!yt(n)||!n.hasOwnProperty("raw"))throw Error("invalid template strings array");return ir!==void 0?ir.createHTML(r):r}const ns=(n,r)=>{const s=n.length-1,i=[];let a,t=r===2?"<svg>":r===3?"<math>":"",p=Oe;for(let g=0;g<s;g++){const v=n[g];let _,A,S=-1,E=0;for(;E<v.length&&(p.lastIndex=E,A=p.exec(v),A!==null);)E=p.lastIndex,p===Oe?A[1]==="!--"?p=nr:A[1]!==void 0?p=cr:A[2]!==void 0?(ur.test(A[2])&&(a=RegExp("</"+A[2],"g")),p=oe):A[3]!==void 0&&(p=oe):p===oe?A[0]===">"?(p=a??Oe,S=-1):A[1]===void 0?S=-2:(S=p.lastIndex-A[2].length,_=A[1],p=A[3]===void 0?oe:A[3]==='"'?lr:ar):p===lr||p===ar?p=oe:p===nr||p===cr?p=Oe:(p=oe,a=void 0);const x=p===oe&&n[g+1].startsWith("/>")?" ":"";t+=p===Oe?v+is:S>=0?(i.push(_),v.slice(0,S)+sr+v.slice(S)+G+x):v+G+(S===-2?g:x)}return[dr(n,t+(n[s]||"<?>")+(r===2?"</svg>":r===3?"</math>":"")),i]};class Pe{constructor({strings:r,_$litType$:s},i){let a;this.parts=[];let t=0,p=0;const g=r.length-1,v=this.parts,[_,A]=ns(r,s);if(this.el=Pe.createElement(_,i),ce.currentNode=this.el.content,s===2||s===3){const S=this.el.content.firstChild;S.replaceWith(...S.childNodes)}for(;(a=ce.nextNode())!==null&&v.length<g;){if(a.nodeType===1){if(a.hasAttributes())for(const S of a.getAttributeNames())if(S.endsWith(sr)){const E=A[p++],x=a.getAttribute(S).split(G),L=/([.?@])?(.*)/.exec(E);v.push({type:1,index:t,name:L[2],strings:x,ctor:L[1]==="."?as:L[1]==="?"?ls:L[1]==="@"?us:Qe}),a.removeAttribute(S)}else S.startsWith(G)&&(v.push({type:6,index:t}),a.removeAttribute(S));if(ur.test(a.tagName)){const S=a.textContent.split(G),E=S.length-1;if(E>0){a.textContent=Ie?Ie.emptyScript:"";for(let x=0;x<E;x++)a.append(S[x],Ce()),ce.nextNode(),v.push({type:2,index:++t});a.append(S[E],Ce())}}}else if(a.nodeType===8)if(a.data===or)v.push({type:2,index:t});else{let S=-1;for(;(S=a.data.indexOf(G,S+1))!==-1;)v.push({type:7,index:t}),S+=G.length-1}t++}}static createElement(r,s){const i=se.createElement("template");return i.innerHTML=r,i}}function he(n,r,s=n,i){var p,g;if(r===ne)return r;let a=i!==void 0?(p=s._$Co)==null?void 0:p[i]:s._$Cl;const t=Ee(r)?void 0:r._$litDirective$;return(a==null?void 0:a.constructor)!==t&&((g=a==null?void 0:a._$AO)==null||g.call(a,!1),t===void 0?a=void 0:(a=new t(n),a._$AT(n,s,i)),i!==void 0?(s._$Co??(s._$Co=[]))[i]=a:s._$Cl=a),a!==void 0&&(r=he(n,a._$AS(n,r.values),a,i)),r}class cs{constructor(r,s){this._$AV=[],this._$AN=void 0,this._$AD=r,this._$AM=s}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(r){const{el:{content:s},parts:i}=this._$AD,a=((r==null?void 0:r.creationScope)??se).importNode(s,!0);ce.currentNode=a;let t=ce.nextNode(),p=0,g=0,v=i[0];for(;v!==void 0;){if(p===v.index){let _;v.type===2?_=new Te(t,t.nextSibling,this,r):v.type===1?_=new v.ctor(t,v.name,v.strings,this,r):v.type===6&&(_=new ps(t,this,r)),this._$AV.push(_),v=i[++g]}p!==(v==null?void 0:v.index)&&(t=ce.nextNode(),p++)}return ce.currentNode=se,a}p(r){let s=0;for(const i of this._$AV)i!==void 0&&(i.strings!==void 0?(i._$AI(r,i,s),s+=i.strings.length-2):i._$AI(r[s])),s++}}class Te{get _$AU(){var r;return((r=this._$AM)==null?void 0:r._$AU)??this._$Cv}constructor(r,s,i,a){this.type=2,this._$AH=C,this._$AN=void 0,this._$AA=r,this._$AB=s,this._$AM=i,this.options=a,this._$Cv=(a==null?void 0:a.isConnected)??!0}get parentNode(){let r=this._$AA.parentNode;const s=this._$AM;return s!==void 0&&(r==null?void 0:r.nodeType)===11&&(r=s.parentNode),r}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(r,s=this){r=he(this,r,s),Ee(r)?r===C||r==null||r===""?(this._$AH!==C&&this._$AR(),this._$AH=C):r!==this._$AH&&r!==ne&&this._(r):r._$litType$!==void 0?this.$(r):r.nodeType!==void 0?this.T(r):ss(r)?this.k(r):this._(r)}O(r){return this._$AA.parentNode.insertBefore(r,this._$AB)}T(r){this._$AH!==r&&(this._$AR(),this._$AH=this.O(r))}_(r){this._$AH!==C&&Ee(this._$AH)?this._$AA.nextSibling.data=r:this.T(se.createTextNode(r)),this._$AH=r}$(r){var t;const{values:s,_$litType$:i}=r,a=typeof i=="number"?this._$AC(r):(i.el===void 0&&(i.el=Pe.createElement(dr(i.h,i.h[0]),this.options)),i);if(((t=this._$AH)==null?void 0:t._$AD)===a)this._$AH.p(s);else{const p=new cs(a,this),g=p.u(this.options);p.p(s),this.T(g),this._$AH=p}}_$AC(r){let s=pr.get(r.strings);return s===void 0&&pr.set(r.strings,s=new Pe(r)),s}k(r){yt(this._$AH)||(this._$AH=[],this._$AR());const s=this._$AH;let i,a=0;for(const t of r)a===s.length?s.push(i=new Te(this.O(Ce()),this.O(Ce()),this,this.options)):i=s[a],i._$AI(t),a++;a<s.length&&(this._$AR(i&&i._$AB.nextSibling,a),s.length=a)}_$AR(r=this._$AA.nextSibling,s){var i;for((i=this._$AP)==null?void 0:i.call(this,!1,!0,s);r&&r!==this._$AB;){const a=r.nextSibling;r.remove(),r=a}}setConnected(r){var s;this._$AM===void 0&&(this._$Cv=r,(s=this._$AP)==null||s.call(this,r))}}class Qe{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(r,s,i,a,t){this.type=1,this._$AH=C,this._$AN=void 0,this.element=r,this.name=s,this._$AM=a,this.options=t,i.length>2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=C}_$AI(r,s=this,i,a){const t=this.strings;let p=!1;if(t===void 0)r=he(this,r,s,0),p=!Ee(r)||r!==this._$AH&&r!==ne,p&&(this._$AH=r);else{const g=r;let v,_;for(r=t[0],v=0;v<t.length-1;v++)_=he(this,g[i+v],s,v),_===ne&&(_=this._$AH[v]),p||(p=!Ee(_)||_!==this._$AH[v]),_===C?r=C:r!==C&&(r+=(_??"")+t[v+1]),this._$AH[v]=_}p&&!a&&this.j(r)}j(r){r===C?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,r??"")}}class as extends Qe{constructor(){super(...arguments),this.type=3}j(r){this.element[this.name]=r===C?void 0:r}}class ls extends Qe{constructor(){super(...arguments),this.type=4}j(r){this.element.toggleAttribute(this.name,!!r&&r!==C)}}class us extends Qe{constructor(r,s,i,a,t){super(r,s,i,a,t),this.type=5}_$AI(r,s=this){if((r=he(this,r,s,0)??C)===ne)return;const i=this._$AH,a=r===C&&i!==C||r.capture!==i.capture||r.once!==i.once||r.passive!==i.passive,t=r!==C&&(i===C||a);a&&this.element.removeEventListener(this.name,this,i),t&&this.element.addEventListener(this.name,this,r),this._$AH=r}handleEvent(r){var s;typeof this._$AH=="function"?this._$AH.call(((s=this.options)==null?void 0:s.host)??this.element,r):this._$AH.handleEvent(r)}}class ps{constructor(r,s,i){this.element=r,this.type=6,this._$AN=void 0,this._$AM=s,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(r){he(this,r)}}const $t=xe.litHtmlPolyfillSupport;$t==null||$t(Pe,Te),(xe.litHtmlVersions??(xe.litHtmlVersions=[])).push("3.2.1");const fr=(n,r,s)=>{const i=(s==null?void 0:s.renderBefore)??r;let a=i._$litPart$;if(a===void 0){const t=(s==null?void 0:s.renderBefore)??null;i._$litPart$=a=new Te(r.insertBefore(Ce(),t),t,void 0,s??{})}return a._$AI(n),a};/**
13
+ */const Te=globalThis,We=Te.trustedTypes,dr=We?We.createPolicy("lit-html",{createHTML:o=>o}):void 0,hr="$lit$",J=`lit$${Math.random().toFixed(9).slice(2)}$`,fr="?"+J,bs=`<${fr}>`,ne=document,Oe=()=>ne.createComment(""),Le=o=>o===null||typeof o!="object"&&typeof o!="function",xt=Array.isArray,vs=o=>xt(o)||typeof(o==null?void 0:o[Symbol.iterator])=="function",kt=`[
14
+ \f\r]`,De=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,gr=/-->/g,br=/>/g,ae=RegExp(`>|${kt}(?:([^\\s"'>=/]+)(${kt}*=${kt}*(?:[^
15
+ \f\r"'\`<>=]|("|')|))|$)`,"g"),vr=/'/g,mr=/"/g,yr=/^(?:script|style|textarea|title)$/i,ms=o=>(r,...s)=>({_$litType$:o,strings:r,values:s}),A=ms(1),ce=Symbol.for("lit-noChange"),E=Symbol.for("lit-nothing"),$r=new WeakMap,le=ne.createTreeWalker(ne,129);function _r(o,r){if(!xt(o)||!o.hasOwnProperty("raw"))throw Error("invalid template strings array");return dr!==void 0?dr.createHTML(r):r}const ys=(o,r)=>{const s=o.length-1,i=[];let a,e=r===2?"<svg>":r===3?"<math>":"",u=De;for(let g=0;g<s;g++){const m=o[g];let w,x,S=-1,C=0;for(;C<m.length&&(u.lastIndex=C,x=u.exec(m),x!==null);)C=u.lastIndex,u===De?x[1]==="!--"?u=gr:x[1]!==void 0?u=br:x[2]!==void 0?(yr.test(x[2])&&(a=RegExp("</"+x[2],"g")),u=ae):x[3]!==void 0&&(u=ae):u===ae?x[0]===">"?(u=a??De,S=-1):x[1]===void 0?S=-2:(S=u.lastIndex-x[2].length,w=x[1],u=x[3]===void 0?ae:x[3]==='"'?mr:vr):u===mr||u===vr?u=ae:u===gr||u===br?u=De:(u=ae,a=void 0);const k=u===ae&&o[g+1].startsWith("/>")?" ":"";e+=u===De?m+bs:S>=0?(i.push(w),m.slice(0,S)+hr+m.slice(S)+J+k):m+J+(S===-2?g:k)}return[_r(o,e+(o[s]||"<?>")+(r===2?"</svg>":r===3?"</math>":"")),i]};class Ne{constructor({strings:r,_$litType$:s},i){let a;this.parts=[];let e=0,u=0;const g=r.length-1,m=this.parts,[w,x]=ys(r,s);if(this.el=Ne.createElement(w,i),le.currentNode=this.el.content,s===2||s===3){const S=this.el.content.firstChild;S.replaceWith(...S.childNodes)}for(;(a=le.nextNode())!==null&&m.length<g;){if(a.nodeType===1){if(a.hasAttributes())for(const S of a.getAttributeNames())if(S.endsWith(hr)){const C=x[u++],k=a.getAttribute(S).split(J),N=/([.?@])?(.*)/.exec(C);m.push({type:1,index:e,name:N[2],strings:k,ctor:N[1]==="."?_s:N[1]==="?"?ws:N[1]==="@"?Ss:Ve}),a.removeAttribute(S)}else S.startsWith(J)&&(m.push({type:6,index:e}),a.removeAttribute(S));if(yr.test(a.tagName)){const S=a.textContent.split(J),C=S.length-1;if(C>0){a.textContent=We?We.emptyScript:"";for(let k=0;k<C;k++)a.append(S[k],Oe()),le.nextNode(),m.push({type:2,index:++e});a.append(S[C],Oe())}}}else if(a.nodeType===8)if(a.data===fr)m.push({type:2,index:e});else{let S=-1;for(;(S=a.data.indexOf(J,S+1))!==-1;)m.push({type:7,index:e}),S+=J.length-1}e++}}static createElement(r,s){const i=ne.createElement("template");return i.innerHTML=r,i}}function ge(o,r,s=o,i){var u,g;if(r===ce)return r;let a=i!==void 0?(u=s._$Co)==null?void 0:u[i]:s._$Cl;const e=Le(r)?void 0:r._$litDirective$;return(a==null?void 0:a.constructor)!==e&&((g=a==null?void 0:a._$AO)==null||g.call(a,!1),e===void 0?a=void 0:(a=new e(o),a._$AT(o,s,i)),i!==void 0?(s._$Co??(s._$Co=[]))[i]=a:s._$Cl=a),a!==void 0&&(r=ge(o,a._$AS(o,r.values),a,i)),r}class $s{constructor(r,s){this._$AV=[],this._$AN=void 0,this._$AD=r,this._$AM=s}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(r){const{el:{content:s},parts:i}=this._$AD,a=((r==null?void 0:r.creationScope)??ne).importNode(s,!0);le.currentNode=a;let e=le.nextNode(),u=0,g=0,m=i[0];for(;m!==void 0;){if(u===m.index){let w;m.type===2?w=new je(e,e.nextSibling,this,r):m.type===1?w=new m.ctor(e,m.name,m.strings,this,r):m.type===6&&(w=new As(e,this,r)),this._$AV.push(w),m=i[++g]}u!==(m==null?void 0:m.index)&&(e=le.nextNode(),u++)}return le.currentNode=ne,a}p(r){let s=0;for(const i of this._$AV)i!==void 0&&(i.strings!==void 0?(i._$AI(r,i,s),s+=i.strings.length-2):i._$AI(r[s])),s++}}class je{get _$AU(){var r;return((r=this._$AM)==null?void 0:r._$AU)??this._$Cv}constructor(r,s,i,a){this.type=2,this._$AH=E,this._$AN=void 0,this._$AA=r,this._$AB=s,this._$AM=i,this.options=a,this._$Cv=(a==null?void 0:a.isConnected)??!0}get parentNode(){let r=this._$AA.parentNode;const s=this._$AM;return s!==void 0&&(r==null?void 0:r.nodeType)===11&&(r=s.parentNode),r}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(r,s=this){r=ge(this,r,s),Le(r)?r===E||r==null||r===""?(this._$AH!==E&&this._$AR(),this._$AH=E):r!==this._$AH&&r!==ce&&this._(r):r._$litType$!==void 0?this.$(r):r.nodeType!==void 0?this.T(r):vs(r)?this.k(r):this._(r)}O(r){return this._$AA.parentNode.insertBefore(r,this._$AB)}T(r){this._$AH!==r&&(this._$AR(),this._$AH=this.O(r))}_(r){this._$AH!==E&&Le(this._$AH)?this._$AA.nextSibling.data=r:this.T(ne.createTextNode(r)),this._$AH=r}$(r){var e;const{values:s,_$litType$:i}=r,a=typeof i=="number"?this._$AC(r):(i.el===void 0&&(i.el=Ne.createElement(_r(i.h,i.h[0]),this.options)),i);if(((e=this._$AH)==null?void 0:e._$AD)===a)this._$AH.p(s);else{const u=new $s(a,this),g=u.u(this.options);u.p(s),this.T(g),this._$AH=u}}_$AC(r){let s=$r.get(r.strings);return s===void 0&&$r.set(r.strings,s=new Ne(r)),s}k(r){xt(this._$AH)||(this._$AH=[],this._$AR());const s=this._$AH;let i,a=0;for(const e of r)a===s.length?s.push(i=new je(this.O(Oe()),this.O(Oe()),this,this.options)):i=s[a],i._$AI(e),a++;a<s.length&&(this._$AR(i&&i._$AB.nextSibling,a),s.length=a)}_$AR(r=this._$AA.nextSibling,s){var i;for((i=this._$AP)==null?void 0:i.call(this,!1,!0,s);r&&r!==this._$AB;){const a=r.nextSibling;r.remove(),r=a}}setConnected(r){var s;this._$AM===void 0&&(this._$Cv=r,(s=this._$AP)==null||s.call(this,r))}}class Ve{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(r,s,i,a,e){this.type=1,this._$AH=E,this._$AN=void 0,this.element=r,this.name=s,this._$AM=a,this.options=e,i.length>2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=E}_$AI(r,s=this,i,a){const e=this.strings;let u=!1;if(e===void 0)r=ge(this,r,s,0),u=!Le(r)||r!==this._$AH&&r!==ce,u&&(this._$AH=r);else{const g=r;let m,w;for(r=e[0],m=0;m<e.length-1;m++)w=ge(this,g[i+m],s,m),w===ce&&(w=this._$AH[m]),u||(u=!Le(w)||w!==this._$AH[m]),w===E?r=E:r!==E&&(r+=(w??"")+e[m+1]),this._$AH[m]=w}u&&!a&&this.j(r)}j(r){r===E?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,r??"")}}class _s extends Ve{constructor(){super(...arguments),this.type=3}j(r){this.element[this.name]=r===E?void 0:r}}class ws extends Ve{constructor(){super(...arguments),this.type=4}j(r){this.element.toggleAttribute(this.name,!!r&&r!==E)}}class Ss extends Ve{constructor(r,s,i,a,e){super(r,s,i,a,e),this.type=5}_$AI(r,s=this){if((r=ge(this,r,s,0)??E)===ce)return;const i=this._$AH,a=r===E&&i!==E||r.capture!==i.capture||r.once!==i.once||r.passive!==i.passive,e=r!==E&&(i===E||a);a&&this.element.removeEventListener(this.name,this,i),e&&this.element.addEventListener(this.name,this,r),this._$AH=r}handleEvent(r){var s;typeof this._$AH=="function"?this._$AH.call(((s=this.options)==null?void 0:s.host)??this.element,r):this._$AH.handleEvent(r)}}class As{constructor(r,s,i){this.element=r,this.type=6,this._$AN=void 0,this._$AM=s,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(r){ge(this,r)}}const Et=Te.litHtmlPolyfillSupport;Et==null||Et(Ne,je),(Te.litHtmlVersions??(Te.litHtmlVersions=[])).push("3.2.1");const Ct=(o,r,s)=>{const i=(s==null?void 0:s.renderBefore)??r;let a=i._$litPart$;if(a===void 0){const e=(s==null?void 0:s.renderBefore)??null;i._$litPart$=a=new je(r.insertBefore(Oe(),e),e,void 0,s??{})}return a._$AI(o),a};/**
16
16
  * @license
17
17
  * Copyright 2017 Google LLC
18
18
  * SPDX-License-Identifier: BSD-3-Clause
19
- */let N=class extends fe{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var s;const r=super.createRenderRoot();return(s=this.renderOptions).renderBefore??(s.renderBefore=r.firstChild),r}update(r){const s=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(r),this._$Do=fr(s,this.renderRoot,this.renderOptions)}connectedCallback(){var r;super.connectedCallback(),(r=this._$Do)==null||r.setConnected(!0)}disconnectedCallback(){var r;super.disconnectedCallback(),(r=this._$Do)==null||r.setConnected(!1)}render(){return ne}};N._$litElement$=!0,N.finalized=!0,(zr=globalThis.litElementHydrateSupport)==null||zr.call(globalThis,{LitElement:N});const wt=globalThis.litElementPolyfillSupport;wt==null||wt({LitElement:N}),(globalThis.litElementVersions??(globalThis.litElementVersions=[])).push("4.1.1");/**
19
+ */let P=class extends fe{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var s;const r=super.createRenderRoot();return(s=this.renderOptions).renderBefore??(s.renderBefore=r.firstChild),r}update(r){const s=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(r),this._$Do=Ct(s,this.renderRoot,this.renderOptions)}connectedCallback(){var r;super.connectedCallback(),(r=this._$Do)==null||r.setConnected(!0)}disconnectedCallback(){var r;super.disconnectedCallback(),(r=this._$Do)==null||r.setConnected(!1)}render(){return ce}};P._$litElement$=!0,P.finalized=!0,(Jr=globalThis.litElementHydrateSupport)==null||Jr.call(globalThis,{LitElement:P});const Pt=globalThis.litElementPolyfillSupport;Pt==null||Pt({LitElement:P}),(globalThis.litElementVersions??(globalThis.litElementVersions=[])).push("4.1.1");/**
20
20
  * @license
21
21
  * Copyright 2017 Google LLC
22
22
  * SPDX-License-Identifier: BSD-3-Clause
23
- */const hr={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},_t=n=>(...r)=>({_$litDirective$:n,values:r});let gr=class{constructor(r){}get _$AU(){return this._$AM._$AU}_$AT(r,s,i){this._$Ct=r,this._$AM=s,this._$Ci=i}_$AS(r,s){return this.update(r,s)}update(r,s){return this.render(...s)}};/**
23
+ */const wr={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},Tt=o=>(...r)=>({_$litDirective$:o,values:r});let Sr=class{constructor(r){}get _$AU(){return this._$AM._$AU}_$AT(r,s,i){this._$Ct=r,this._$AM=s,this._$Ci=i}_$AS(r,s){return this.update(r,s)}update(r,s){return this.render(...s)}};/**
24
24
  * @license
25
25
  * Copyright 2018 Google LLC
26
26
  * SPDX-License-Identifier: BSD-3-Clause
27
- */const br="important",ds=" !"+br,vr=_t(class extends gr{constructor(n){var r;if(super(n),n.type!==hr.ATTRIBUTE||n.name!=="style"||((r=n.strings)==null?void 0:r.length)>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(n){return Object.keys(n).reduce((r,s)=>{const i=n[s];return i==null?r:r+`${s=s.includes("-")?s:s.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${i};`},"")}update(n,[r]){const{style:s}=n.element;if(this.ft===void 0)return this.ft=new Set(Object.keys(r)),this.render(r);for(const i of this.ft)r[i]==null&&(this.ft.delete(i),i.includes("-")?s.removeProperty(i):s[i]=null);for(const i in r){const a=r[i];if(a!=null){this.ft.add(i);const t=typeof a=="string"&&a.endsWith(ds);i.includes("-")||t?s.setProperty(i,t?a.slice(0,-11):a,t?br:""):s[i]=a}}return ne}}),fs=z`
27
+ */const Ar="important",xs=" !"+Ar,xr=Tt(class extends Sr{constructor(o){var r;if(super(o),o.type!==wr.ATTRIBUTE||o.name!=="style"||((r=o.strings)==null?void 0:r.length)>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(o){return Object.keys(o).reduce((r,s)=>{const i=o[s];return i==null?r:r+`${s=s.includes("-")?s:s.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${i};`},"")}update(o,[r]){const{style:s}=o.element;if(this.ft===void 0)return this.ft=new Set(Object.keys(r)),this.render(r);for(const i of this.ft)r[i]==null&&(this.ft.delete(i),i.includes("-")?s.removeProperty(i):s[i]=null);for(const i in r){const a=r[i];if(a!=null){this.ft.add(i);const e=typeof a=="string"&&a.endsWith(xs);i.includes("-")||e?s.setProperty(i,e?a.slice(0,-11):a,e?Ar:""):s[i]=a}}return ce}}),ks=R`
28
28
  :host{
29
29
  display: inline-block;
30
30
  --text-on-color: var(--spectric-text-on-color, #ffffff);
@@ -47,9 +47,15 @@
47
47
  --button-primary-hover: var(--spectric-button-primary-hover, #0050e6);
48
48
  --button-secondary-hover: var(--spectric-button-secondary-hover, #474747);
49
49
  --button-tertiary-hover: var(--spectric-button-tertiary-hover, #0050e6);
50
- --button-disabled: var(--spectric-button-disabled, #c6c6c6);
50
+ --button-disabled: var(--spectric-button-disabled, #cfcbcb4d);
51
+ }
52
+ :host([disabled]) {
53
+ cursor: not-allowed;
54
+ }
55
+
56
+ :host([disabled]) .animation{
57
+ visibility:hidden;
51
58
  }
52
- :host([disabled]) { pointer-events: none }
53
59
 
54
60
  .spectric-button {
55
61
  pointer-events:none;
@@ -103,6 +109,59 @@
103
109
  box-shadow: 0 0 30px white inset;
104
110
  }
105
111
 
112
+ :host([icon]) .spectric-button {
113
+ padding: unset;
114
+ display: flex;
115
+ align-items: center;
116
+ justify-content: center;
117
+ -webkit-user-select: none; /* For Safari */
118
+ -moz-user-select: none; /* For Firefox */
119
+ -ms-user-select: none; /* For IE 10+ */
120
+ user-select: none; /* Standard syntax */
121
+ }
122
+
123
+
124
+
125
+ /* :host([icon][size="small"]){
126
+ height:12px;
127
+ width:12px;
128
+ }
129
+
130
+ :host([icon][size="medium"]){
131
+ height:14px;
132
+ width:14px;
133
+ }
134
+
135
+ :host([icon][size="large"]){
136
+ width: 48px;
137
+ height: 48px;
138
+ } */
139
+ :host([icon][size="tiny"]) .spectric-button{
140
+ width: 10px;
141
+ height: 10px;
142
+ }
143
+ :host([icon][size="xxsmall"]) .spectric-button{
144
+ width: 20px;
145
+ height: 20px;
146
+ }
147
+ :host([icon][size="xsmall"]) .spectric-button{
148
+ width: 28px;
149
+ height: 28px;
150
+ }
151
+ :host([icon][size="small"]) .spectric-button{
152
+ width: 34px;
153
+ height: 34px;
154
+ }
155
+ :host([icon][size="medium"]) .spectric-button{
156
+ width: 40px;
157
+ height: 40px;
158
+ }
159
+
160
+ :host([icon][size="large"]) .spectric-button{
161
+ width: 48px;
162
+ height: 48px;
163
+ }
164
+
106
165
  .spectric-button:disabled{
107
166
  cursor: not-allowed;
108
167
  pointer-events: none;
@@ -110,6 +169,11 @@
110
169
  /* background-color:var(--button-disabled); */
111
170
  color:var(--text-on-color-disabled);
112
171
  }
172
+ .spectric-button.spectric-button--primary:disabled{
173
+
174
+ background-color:var(--button-disabled);
175
+
176
+ }
113
177
  .spectric-button:disabled .animation , :host(:disabled:hover) .animation{
114
178
  background-color: rgba(0, 0, 0, 0);
115
179
  opacity:1
@@ -170,6 +234,25 @@ opacity:1
170
234
  background-color: transparent;
171
235
  color: var(--text-secondary);
172
236
  }
237
+ .spectric-button--tiny {
238
+ font-size: 10px;
239
+ line-height: 10px;
240
+ height: 10px;
241
+ display: flex;
242
+ align-content: center;
243
+ align-items: center;
244
+ }
245
+ .spectric-button--xxsmall {
246
+ padding: 5px 6px;
247
+ font-size: 10px;
248
+ line-height: 8px;
249
+ }
250
+ .spectric-button--xsmall {
251
+ padding: 5px 8px;
252
+ font-size: 10px;
253
+ font-size: 12px;
254
+ line-height: 14px;
255
+ }
173
256
  .spectric-button--small {
174
257
  padding: 5px 10px;
175
258
  font-size: 12px;
@@ -186,67 +269,68 @@ opacity:1
186
269
  * @license
187
270
  * Copyright 2017 Google LLC
188
271
  * SPDX-License-Identifier: BSD-3-Clause
189
- */const R=n=>(r,s)=>{s!==void 0?s.addInitializer(()=>{customElements.define(n,r)}):customElements.define(n,r)};/**
272
+ */const L=o=>(r,s)=>{s!==void 0?s.addInitializer(()=>{customElements.define(o,r)}):customElements.define(o,r)};/**
190
273
  * @license
191
274
  * Copyright 2017 Google LLC
192
275
  * SPDX-License-Identifier: BSD-3-Clause
193
- */const hs={attribute:!0,type:String,converter:ze,reflect:!1,hasChanged:vt},gs=(n=hs,r,s)=>{const{kind:i,metadata:a}=s;let t=globalThis.litPropertyMetadata.get(a);if(t===void 0&&globalThis.litPropertyMetadata.set(a,t=new Map),t.set(s.name,n),i==="accessor"){const{name:p}=s;return{set(g){const v=r.get.call(this);r.set.call(this,g),this.requestUpdate(p,v,n)},init(g){return g!==void 0&&this.P(p,void 0,n),g}}}if(i==="setter"){const{name:p}=s;return function(g){const v=this[p];r.call(this,g),this.requestUpdate(p,v,n)}}throw Error("Unsupported decorator location: "+i)};function y(n){return(r,s)=>typeof s=="object"?gs(n,r,s):((i,a,t)=>{const p=a.hasOwnProperty(t);return a.constructor.createProperty(t,p?{...i,wrapped:!0}:i),p?Object.getOwnPropertyDescriptor(a,t):void 0})(n,r,s)}/**
276
+ */const Es={attribute:!0,type:String,converter:qe,reflect:!1,hasChanged:At},Cs=(o=Es,r,s)=>{const{kind:i,metadata:a}=s;let e=globalThis.litPropertyMetadata.get(a);if(e===void 0&&globalThis.litPropertyMetadata.set(a,e=new Map),e.set(s.name,o),i==="accessor"){const{name:u}=s;return{set(g){const m=r.get.call(this);r.set.call(this,g),this.requestUpdate(u,m,o)},init(g){return g!==void 0&&this.P(u,void 0,o),g}}}if(i==="setter"){const{name:u}=s;return function(g){const m=this[u];r.call(this,g),this.requestUpdate(u,m,o)}}throw Error("Unsupported decorator location: "+i)};function v(o){return(r,s)=>typeof s=="object"?Cs(o,r,s):((i,a,e)=>{const u=a.hasOwnProperty(e);return a.constructor.createProperty(e,u?{...i,wrapped:!0}:i),u?Object.getOwnPropertyDescriptor(a,e):void 0})(o,r,s)}/**
194
277
  * @license
195
278
  * Copyright 2017 Google LLC
196
279
  * SPDX-License-Identifier: BSD-3-Clause
197
- */function Fe(n){return y({...n,state:!0,attribute:!1})}/**
280
+ */function ze(o){return v({...o,state:!0,attribute:!1})}/**
198
281
  * @license
199
282
  * Copyright 2017 Google LLC
200
283
  * SPDX-License-Identifier: BSD-3-Clause
201
- */const yr=(n,r,s)=>(s.configurable=!0,s.enumerable=!0,Reflect.decorate&&typeof r!="object"&&Object.defineProperty(n,r,s),s);/**
284
+ */const kr=(o,r,s)=>(s.configurable=!0,s.enumerable=!0,Reflect.decorate&&typeof r!="object"&&Object.defineProperty(o,r,s),s);/**
202
285
  * @license
203
286
  * Copyright 2017 Google LLC
204
287
  * SPDX-License-Identifier: BSD-3-Clause
205
- */function Le(n,r){return(s,i,a)=>{const t=p=>{var g;return((g=p.renderRoot)==null?void 0:g.querySelector(n))??null};return yr(s,i,{get(){return t(this)}})}}/**
288
+ */function be(o,r){return(s,i,a)=>{const e=u=>{var g;return((g=u.renderRoot)==null?void 0:g.querySelector(o))??null};return kr(s,i,{get(){return e(this)}})}}/**
206
289
  * @license
207
290
  * Copyright 2017 Google LLC
208
291
  * SPDX-License-Identifier: BSD-3-Clause
209
- */function He(n){return(r,s)=>yr(r,s,{async get(){var i;return await this.updateComplete,((i=this.renderRoot)==null?void 0:i.querySelector(n))??null}})}var bs=Object.defineProperty,vs=Object.getOwnPropertyDescriptor,ae=(n,r,s,i)=>{for(var a=i>1?void 0:i?vs(r,s):r,t=n.length-1,p;t>=0;t--)(p=n[t])&&(a=(i?p(r,s,a):p(a))||a);return i&&a&&bs(r,s,a),a},mr=(n=>(n.large="large",n.medium="medium",n.small="small",n))(mr||{}),$r=(n=>(n.primary="primary",n.secondary="secondary",n.text="text",n))($r||{});const ys={primary:"spectric-button--primary",secondary:"spectric-button--secondary",text:"spectric-button--text"};d.SpectricButton=class extends N{constructor(){super(...arguments),this.variant="primary",this.disabled=!1,this.size="large",this.label="",this.danger=!1,this._onClick=r=>{if(r instanceof CustomEvent)return;r.preventDefault(),r.stopImmediatePropagation(),r.stopPropagation();const s={bubbles:!0,composed:!0,detail:r};this.dispatchEvent(new CustomEvent("click",s))}}connectedCallback(){super.connectedCallback(),this.addEventListener("click",this._onClick)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",this._onClick)}render(){const r=ys[this.variant]||"spectric-button--primary";return k`
292
+ */function Ye(o){return(r,s)=>kr(r,s,{async get(){var i;return await this.updateComplete,((i=this.renderRoot)==null?void 0:i.querySelector(o))??null}})}var Ps=Object.defineProperty,Ts=Object.getOwnPropertyDescriptor,I=(o,r,s,i)=>{for(var a=i>1?void 0:i?Ts(r,s):r,e=o.length-1,u;e>=0;e--)(u=o[e])&&(a=(i?u(r,s,a):u(a))||a);return i&&a&&Ps(r,s,a),a},Er=(o=>(o.large="large",o.medium="medium",o.small="small",o.xsmall="xsmall",o.xxsmall="xxsmall",o.tiny="tiny",o))(Er||{}),Cr=(o=>(o.primary="primary",o.secondary="secondary",o.text="text",o))(Cr||{});const Os={primary:"spectric-button--primary",secondary:"spectric-button--secondary",text:"spectric-button--text"};d.SpectricButton=class extends P{constructor(){super(...arguments),this.variant="primary",this.disabled=!1,this.size="small",this.label="",this.danger=!1,this.icon=!1,this.tooltipPosition="right",this._onClick=r=>{if(r instanceof CustomEvent||(r.preventDefault(),r.stopImmediatePropagation(),r.stopPropagation(),this.disabled))return;const s={bubbles:!0,composed:!0,detail:r};this.dispatchEvent(new CustomEvent("click",s))}}connectedCallback(){super.connectedCallback(),this.addEventListener("click",this._onClick,{capture:!0})}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",this._onClick)}render(){const r=Os[this.variant]||"spectric-button--primary";return A`
293
+ ${this.tooltip?A`<spectric-tooltip .text=${this.tooltip} .position=${this.tooltipPosition||"right"} .triggerTarget=${this}></spectric-tooltip>`:null}
210
294
  <button
211
295
  type="button"
212
296
  ?disabled=${this.disabled}
213
297
  class=${["spectric-button",`spectric-button-danger--${this.danger||!1}`,`spectric-button--${this.size||"medium"}`,r].join(" ")}
214
- style=${vr({backgroundColor:this.backgroundColor})}
298
+ style=${xr({backgroundColor:this.backgroundColor})}
215
299
  >
216
300
  <span class="animation"></span>
217
301
  <slot>${this.label}</slot>
218
302
  </button>
219
- `}},d.SpectricButton.styles=fs,ae([y({type:String,reflect:!0})],d.SpectricButton.prototype,"variant",2),ae([y({type:Boolean,reflect:!0})],d.SpectricButton.prototype,"disabled",2),ae([y({type:String,reflect:!0})],d.SpectricButton.prototype,"backgroundColor",2),ae([y({type:String,reflect:!0})],d.SpectricButton.prototype,"size",2),ae([y({type:String,reflect:!0})],d.SpectricButton.prototype,"label",2),ae([y({type:Boolean,reflect:!0})],d.SpectricButton.prototype,"danger",2),d.SpectricButton=ae([R("spectric-button")],d.SpectricButton);/**
303
+ `}},d.SpectricButton.styles=ks,I([v({type:String,reflect:!0})],d.SpectricButton.prototype,"variant",2),I([v({type:Boolean,reflect:!0})],d.SpectricButton.prototype,"disabled",2),I([v({type:String,reflect:!0})],d.SpectricButton.prototype,"backgroundColor",2),I([v({type:String,reflect:!0})],d.SpectricButton.prototype,"size",2),I([v({type:String,reflect:!0})],d.SpectricButton.prototype,"label",2),I([v({type:Boolean,reflect:!0})],d.SpectricButton.prototype,"danger",2),I([v({type:Boolean,reflect:!0})],d.SpectricButton.prototype,"icon",2),I([v({type:String,reflect:!0})],d.SpectricButton.prototype,"tooltip",2),I([v({type:String,reflect:!0})],d.SpectricButton.prototype,"tooltipPosition",2),d.SpectricButton=I([L("spectric-button")],d.SpectricButton);/**
220
304
  * @license
221
305
  * Copyright 2020 Google LLC
222
306
  * SPDX-License-Identifier: BSD-3-Clause
223
- */const ms=n=>n.strings===void 0;/**
307
+ */const Ls=o=>o.strings===void 0;/**
224
308
  * @license
225
309
  * Copyright 2017 Google LLC
226
310
  * SPDX-License-Identifier: BSD-3-Clause
227
- */const Ne=(n,r)=>{var i;const s=n._$AN;if(s===void 0)return!1;for(const a of s)(i=a._$AO)==null||i.call(a,r,!1),Ne(a,r);return!0},qe=n=>{let r,s;do{if((r=n._$AM)===void 0)break;s=r._$AN,s.delete(n),n=r}while((s==null?void 0:s.size)===0)},wr=n=>{for(let r;r=n._$AM;n=r){let s=r._$AN;if(s===void 0)r._$AN=s=new Set;else if(s.has(n))break;s.add(n),_s(r)}};function $s(n){this._$AN!==void 0?(qe(this),this._$AM=n,wr(this)):this._$AM=n}function ws(n,r=!1,s=0){const i=this._$AH,a=this._$AN;if(a!==void 0&&a.size!==0)if(r)if(Array.isArray(i))for(let t=s;t<i.length;t++)Ne(i[t],!1),qe(i[t]);else i!=null&&(Ne(i,!1),qe(i));else Ne(this,n)}const _s=n=>{n.type==hr.CHILD&&(n._$AP??(n._$AP=ws),n._$AQ??(n._$AQ=$s))};class _r extends gr{constructor(){super(...arguments),this._$AN=void 0}_$AT(r,s,i){super._$AT(r,s,i),wr(this),this.isConnected=r._$AU}_$AO(r,s=!0){var i,a;r!==this.isConnected&&(this.isConnected=r,r?(i=this.reconnected)==null||i.call(this):(a=this.disconnected)==null||a.call(this)),s&&(Ne(this,r),qe(this))}setValue(r){if(ms(this._$Ct))this._$Ct._$AI(r,this);else{const s=[...this._$Ct._$AH];s[this._$Ci]=r,this._$Ct._$AI(s,this,0)}}disconnected(){}reconnected(){}}/**
311
+ */const Be=(o,r)=>{var i;const s=o._$AN;if(s===void 0)return!1;for(const a of s)(i=a._$AO)==null||i.call(a,r,!1),Be(a,r);return!0},Ke=o=>{let r,s;do{if((r=o._$AM)===void 0)break;s=r._$AN,s.delete(o),o=r}while((s==null?void 0:s.size)===0)},Pr=o=>{for(let r;r=o._$AM;o=r){let s=r._$AN;if(s===void 0)r._$AN=s=new Set;else if(s.has(o))break;s.add(o),js(r)}};function Ds(o){this._$AN!==void 0?(Ke(this),this._$AM=o,Pr(this)):this._$AM=o}function Ns(o,r=!1,s=0){const i=this._$AH,a=this._$AN;if(a!==void 0&&a.size!==0)if(r)if(Array.isArray(i))for(let e=s;e<i.length;e++)Be(i[e],!1),Ke(i[e]);else i!=null&&(Be(i,!1),Ke(i));else Be(this,o)}const js=o=>{o.type==wr.CHILD&&(o._$AP??(o._$AP=Ns),o._$AQ??(o._$AQ=Ds))};class Tr extends Sr{constructor(){super(...arguments),this._$AN=void 0}_$AT(r,s,i){super._$AT(r,s,i),Pr(this),this.isConnected=r._$AU}_$AO(r,s=!0){var i,a;r!==this.isConnected&&(this.isConnected=r,r?(i=this.reconnected)==null||i.call(this):(a=this.disconnected)==null||a.call(this)),s&&(Be(this,r),Ke(this))}setValue(r){if(Ls(this._$Ct))this._$Ct._$AI(r,this);else{const s=[...this._$Ct._$AH];s[this._$Ci]=r,this._$Ct._$AI(s,this,0)}}disconnected(){}reconnected(){}}/**
228
312
  * @license
229
313
  * Copyright 2020 Google LLC
230
314
  * SPDX-License-Identifier: BSD-3-Clause
231
- */const We=()=>new Ss;class Ss{}const St=new WeakMap,Ye=_t(class extends _r{render(n){return C}update(n,[r]){var i;const s=r!==this.Y;return s&&this.Y!==void 0&&this.rt(void 0),(s||this.lt!==this.ct)&&(this.Y=r,this.ht=(i=n.options)==null?void 0:i.host,this.rt(this.ct=n.element)),C}rt(n){if(this.isConnected||(n=void 0),typeof this.Y=="function"){const r=this.ht??globalThis;let s=St.get(r);s===void 0&&(s=new WeakMap,St.set(r,s)),s.get(this.Y)!==void 0&&this.Y.call(this.ht,void 0),s.set(this.Y,n),n!==void 0&&this.Y.call(this.ht,n)}else this.Y.value=n}get lt(){var n,r;return typeof this.Y=="function"?(n=St.get(this.ht??globalThis))==null?void 0:n.get(this.Y):(r=this.Y)==null?void 0:r.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}}),As=class{constructor(r){return this.buffer=r,this.u8=new Uint8Array(r),new Proxy(this,{get(s,i){return s[i]?s[i]:s.getBit(i)}})}getBit(r){var s=this.u8[r>>3],i=r&7;return s>>7-i&1}setBit(r,s){var i=r&7;s?this.u8[r>>3]|=128>>i:this.u8[r>>3]&=~(128>>i)}get length(){return this.u8.byteLength*8}set(r,s){for(let i=s||0,a=0,t=r.length;a<t;i++,a++)this.setBit(i,r[a])}subarray(r,s){let i=[];r=r||0,s=s||this.length,s=s>this.length?this.length:s;for(let a=r;a<s;a++)i.push(this.getBit(a));return i}};class Sr{constructor(r,s,i,a){this.__target=r,this._handler=i,this._type=s,this._handler=i,this._options=a||!1,r instanceof Promise?r.then(t=>{this._handler&&(this._node=t,this._node.addEventListener(this._type,this._handler,this._options))}):(this._node=r,this._node.addEventListener(this._type,this._handler,this._options))}dispose(){this._handler&&(this._node&&(console.log(`removing event ${this._type} from `,this._node,this.__target instanceof Promise),this._node.removeEventListener(this._type,this._handler,this._options)),this.__target=void 0,this._node=void 0,this._handler=void 0)}}class Ar extends N{constructor(){super(...arguments),this._disposables=new Set,this._isDisposed=!1,this._disposableListeners=[],this._connected=!1}addDisposableListener(r,s,i){if(this._disposableListeners.find(t=>t.event===s&&t.target===r&&t.handler===i)){console.warn("Event handler already exists best practice is to add the this in the constructor");return}this._disposableListeners.push({target:r,event:s,handler:i}),this._connected&&this.registerDisposable(new Sr(r,s,i))}registerDisposable(r){if(!r)return r;if(r===this)throw new Error("Cannot register a disposable on itself!");return this._isDisposed?console.warn(new Error("Trying to add a disposable to something that has already been disposed of. The added object will be leaked!").stack):this._disposables.add(r),r}connectedCallback(){super.connectedCallback(),this._connected=!0,this._isDisposed=!1,this._disposableListeners.forEach(({target:r,event:s,handler:i})=>{this.registerDisposable(new Sr(r,s,i))})}disconnectedCallback(){super.disconnectedCallback(),this._connected=!1,this._disposables.forEach(r=>{r.dispose()}),this._isDisposed=!0}}const kr=n=>{var r;return(...s)=>{r&&cancelAnimationFrame(r),r=requestAnimationFrame(()=>{n.apply(void 0,s)})}};var ks=Object.defineProperty,xs=Object.getOwnPropertyDescriptor,le=(n,r,s,i)=>{for(var a=i>1?void 0:i?xs(r,s):r,t=n.length-1,p;t>=0;t--)(p=n[t])&&(a=(i?p(r,s,a):p(a))||a);return i&&a&&ks(r,s,a),a};const Cs=["mousemove","click","dblclick","mousedown","mouseup","contextmenu"],Ve={width:200,height:200},Ke={width:10,height:10};d.BitDisplayCanvas=class extends Ar{constructor(){super(),this.arrayBuffer=new ArrayBuffer(0),this.frameWidth=100,this.scale=1,this.width=200,this.height=200,this.state={},this.yStart=0,this.xStart=0,this.refs={viewport:We(),canvas:We(),scrollDiv:We()},this.color="#000000",this.onThemeChange=()=>{let i=getComputedStyle(this);this.color!=i.color&&(this.color=i.color,this.paint())},this.onResize=()=>{this.calculateViewport()},this.handleScroll=()=>{if(!this.refs.viewport.value)return;const i=this.getPxPerBit();this.yStart=this.refs.viewport.value.scrollTop?Math.floor(this.refs.viewport.value.scrollTop/i)+1:0,this.xStart=this.refs.viewport.value.scrollLeft?Math.floor(this.refs.viewport.value.scrollLeft/i)+1:0,this.paint()};let r=new ResizeObserver(this.onResize);r.dispose=()=>{this.resizeObserver.disconnect()},this.resizeObserver=r,this.addDisposableListener(document.body,"theme-change",this.onThemeChange);var s={};Cs.forEach(i=>{this.addDisposableListener(this._canvas,i,kr(async a=>{a.stopImmediatePropagation(),a.stopPropagation(),a.preventDefault();var t=await this._canvas;let p=t.getBoundingClientRect(),g={x:Math.floor(Math.abs(a.clientX-p.left)),y:Math.floor(Math.abs(a.clientY-p.top))},v=this.canvasPositionToBit(g);if(i==="mousemove"&&s[i]==v)return;s[i]=v;let _="bit"+String(i).charAt(0).toUpperCase()+String(i).slice(1);if(v!=-1){let A=new CustomEvent(_,{detail:{bitIndex:v,position:g,nativeEvent:a}});this.dispatchEvent(A)}}))})}connectedCallback(){this.onResize(),super.connectedCallback(),this.registerDisposable(this.resizeObserver),this.resizeObserver.observe(this)}updated(r){r.has("arrayBuffer")&&this.arrayBuffer&&(this._bitArray=new As(this.arrayBuffer));const s=["arrayBuffer","scale","frameWidth","width","height"];for(const i of s)if(r.has(i)){this.paint();return}}canvasPositionToBit(r){let s=Math.floor(r.x/this.scale),i=Math.floor(r.y/this.scale);return s>this.frameWidth-1?-1:this.yStart*this.frameWidth+this.xStart+(i*this.frameWidth+s)}paint(){if(!this.refs.canvas.value||!this._bitArray)return;const{frameWidth:r,_bitArray:s}=this;if(r<=0)return;this.calculateViewport();const{width:i=Ve.width,height:a=Ve.height}=this,t=this.getPxPerBit(),p=this.refs.canvas.value.getContext("2d");if(!p)return;this.state.scale!=t&&(p.reset(),p.scale(t,t));let g=getComputedStyle(this);p.fillStyle=g.color,p.clearRect(0,0,i,a);let v=0;for(let _=this.yStart*r+this.xStart,A=s.length;_<A;_++){let S=_%r-this.xStart;if(!(S<0)){if(Math.floor(S*t)>i){v++,_=v*r+this.yStart*r+this.xStart-1;continue}if(Math.floor(v*t)>a)break;s.getBit(_)===1&&p.fillRect(S,v,1,1),(_+1)%r===0&&_>=r-1&&v++}}}getPxPerBit(){return this.scale>0?this.scale:1}calculateViewport(){const{frameWidth:r,_bitArray:s}=this;if(this.refs.scrollDiv.value){var i=this.getPxPerBit();const a=s.length/r*i,t=r*i,p=this.refs.scrollDiv.value;p.style.width=t+"px",p.style.height=a+"px"}}render(){const{height:r=Ve.height,width:s=Ve.width}=this;return k`
315
+ */const Ze=()=>new zs;class zs{}const Ot=new WeakMap,Xe=Tt(class extends Tr{render(o){return E}update(o,[r]){var i;const s=r!==this.Y;return s&&this.Y!==void 0&&this.rt(void 0),(s||this.lt!==this.ct)&&(this.Y=r,this.ht=(i=o.options)==null?void 0:i.host,this.rt(this.ct=o.element)),E}rt(o){if(this.isConnected||(o=void 0),typeof this.Y=="function"){const r=this.ht??globalThis;let s=Ot.get(r);s===void 0&&(s=new WeakMap,Ot.set(r,s)),s.get(this.Y)!==void 0&&this.Y.call(this.ht,void 0),s.set(this.Y,o),o!==void 0&&this.Y.call(this.ht,o)}else this.Y.value=o}get lt(){var o,r;return typeof this.Y=="function"?(o=Ot.get(this.ht??globalThis))==null?void 0:o.get(this.Y):(r=this.Y)==null?void 0:r.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}}),Bs=class{constructor(r){return this.buffer=r,this.u8=new Uint8Array(r),new Proxy(this,{get(s,i){return s[i]?s[i]:s.getBit(i)}})}getBit(r){var s=this.u8[r>>3],i=r&7;return s>>7-i&1}setBit(r,s){var i=r&7;s?this.u8[r>>3]|=128>>i:this.u8[r>>3]&=~(128>>i)}get length(){return this.u8.byteLength*8}set(r,s){for(let i=s||0,a=0,e=r.length;a<e;i++,a++)this.setBit(i,r[a])}subarray(r,s){let i=[];r=r||0,s=s||this.length,s=s>this.length?this.length:s;for(let a=r;a<s;a++)i.push(this.getBit(a));return i}};class Or{constructor(r,s,i,a){this.__target=r,this._handler=i,this._type=s,this._handler=i,this._options=a||!1,r instanceof Promise?r.then(e=>{this._handler&&(this._node=e,this._node.addEventListener(this._type,this._handler,this._options))}):(this._node=r,this._node.addEventListener(this._type,this._handler,this._options))}dispose(){this._handler&&(this._node&&(console.log(`removing event ${this._type} from `,this._node,this.__target instanceof Promise),this._node.removeEventListener(this._type,this._handler,this._options)),this.__target=void 0,this._node=void 0,this._handler=void 0)}}class Lr extends P{constructor(){super(...arguments),this._disposables=new Set,this._isDisposed=!1,this._disposableListeners=[],this._connected=!1}addDisposableListener(r,s,i){if(this._disposableListeners.find(e=>e.event===s&&e.target===r&&e.handler===i)){console.warn("Event handler already exists best practice is to add the this in the constructor");return}this._disposableListeners.push({target:r,event:s,handler:i}),this._connected&&this.registerDisposable(new Or(r,s,i))}registerDisposable(r){if(!r)return r;if(r===this)throw new Error("Cannot register a disposable on itself!");return this._isDisposed?console.warn(new Error("Trying to add a disposable to something that has already been disposed of. The added object will be leaked!").stack):this._disposables.add(r),r}connectedCallback(){super.connectedCallback(),this._connected=!0,this._isDisposed=!1,this._disposableListeners.forEach(({target:r,event:s,handler:i})=>{this.registerDisposable(new Or(r,s,i))})}disconnectedCallback(){super.disconnectedCallback(),this._connected=!1,this._disposables.forEach(r=>{r.dispose()}),this._isDisposed=!0}}const Dr=o=>{var r;return(...s)=>{r&&cancelAnimationFrame(r),r=requestAnimationFrame(()=>{o.apply(void 0,s)})}};var Rs=Object.defineProperty,Ms=Object.getOwnPropertyDescriptor,pe=(o,r,s,i)=>{for(var a=i>1?void 0:i?Ms(r,s):r,e=o.length-1,u;e>=0;e--)(u=o[e])&&(a=(i?u(r,s,a):u(a))||a);return i&&a&&Rs(r,s,a),a};const Us=["mousemove","click","dblclick","mousedown","mouseup","contextmenu"],Ge={width:200,height:200},Je={width:10,height:10};d.BitDisplayCanvas=class extends Lr{constructor(){super(),this.arrayBuffer=new ArrayBuffer(0),this.frameWidth=100,this.scale=1,this.width=200,this.height=200,this.state={},this.yStart=0,this.xStart=0,this.refs={viewport:Ze(),canvas:Ze(),scrollDiv:Ze()},this.color="#000000",this.onThemeChange=()=>{let i=getComputedStyle(this);this.color!=i.color&&(this.color=i.color,this.paint())},this.onResize=()=>{this.calculateViewport()},this.handleScroll=()=>{if(!this.refs.viewport.value)return;const i=this.getPxPerBit();this.yStart=this.refs.viewport.value.scrollTop?Math.floor(this.refs.viewport.value.scrollTop/i)+1:0,this.xStart=this.refs.viewport.value.scrollLeft?Math.floor(this.refs.viewport.value.scrollLeft/i)+1:0,this.paint()};let r=new ResizeObserver(this.onResize);r.dispose=()=>{this.resizeObserver.disconnect()},this.resizeObserver=r,this.addDisposableListener(document.body,"theme-change",this.onThemeChange);var s={};Us.forEach(i=>{this.addDisposableListener(this._canvas,i,Dr(async a=>{a.stopImmediatePropagation(),a.stopPropagation(),a.preventDefault();var e=await this._canvas;let u=e.getBoundingClientRect(),g={x:Math.floor(Math.abs(a.clientX-u.left)),y:Math.floor(Math.abs(a.clientY-u.top))},m=this.canvasPositionToBit(g);if(i==="mousemove"&&s[i]==m)return;s[i]=m;let w="bit"+String(i).charAt(0).toUpperCase()+String(i).slice(1);if(m!=-1){let x=new CustomEvent(w,{detail:{bitIndex:m,position:g,nativeEvent:a}});this.dispatchEvent(x)}}))})}connectedCallback(){this.onResize(),super.connectedCallback(),this.registerDisposable(this.resizeObserver),this.resizeObserver.observe(this)}updated(r){r.has("arrayBuffer")&&this.arrayBuffer&&(this._bitArray=new Bs(this.arrayBuffer));const s=["arrayBuffer","scale","frameWidth","width","height"];for(const i of s)if(r.has(i)){this.paint();return}}canvasPositionToBit(r){let s=Math.floor(r.x/this.scale),i=Math.floor(r.y/this.scale);return s>this.frameWidth-1?-1:this.yStart*this.frameWidth+this.xStart+(i*this.frameWidth+s)}paint(){if(!this.refs.canvas.value||!this._bitArray)return;const{frameWidth:r,_bitArray:s}=this;if(r<=0)return;this.calculateViewport();const{width:i=Ge.width,height:a=Ge.height}=this,e=this.getPxPerBit(),u=this.refs.canvas.value.getContext("2d");if(!u)return;this.state.scale!=e&&(u.reset(),u.scale(e,e));let g=getComputedStyle(this);u.fillStyle=g.color,u.clearRect(0,0,i,a);let m=0;for(let w=this.yStart*r+this.xStart,x=s.length;w<x;w++){let S=w%r-this.xStart;if(!(S<0)){if(Math.floor(S*e)>i){m++,w=m*r+this.yStart*r+this.xStart-1;continue}if(Math.floor(m*e)>a)break;s.getBit(w)===1&&u.fillRect(S,m,1,1),(w+1)%r===0&&w>=r-1&&m++}}}getPxPerBit(){return this.scale>0?this.scale:1}calculateViewport(){const{frameWidth:r,_bitArray:s}=this;if(this.refs.scrollDiv.value){var i=this.getPxPerBit();const a=s.length/r*i,e=r*i,u=this.refs.scrollDiv.value;u.style.width=e+"px",u.style.height=a+"px"}}render(){const{height:r=Ge.height,width:s=Ge.width}=this;return A`
232
316
  <div
233
317
  id="viewport"
234
- ${Ye(this.refs.viewport)}
318
+ ${Xe(this.refs.viewport)}
235
319
  @scroll=${this.handleScroll}
236
320
  style=${`width:${s}px;height:${r}px;overflow:auto;position:relative`}
237
321
  >
238
322
  <div
239
323
  id="fakescrolldiv"
240
- ${Ye(this.refs.scrollDiv)}
324
+ ${Xe(this.refs.scrollDiv)}
241
325
  >
242
326
  </div>
243
327
  </div>
244
328
  <canvas
245
- ${Ye(this.refs.canvas)}
246
- width=${s-Ke.width}
247
- height=${r-Ke.height}
329
+ ${Xe(this.refs.canvas)}
330
+ width=${s-Je.width}
331
+ height=${r-Je.height}
248
332
  ></canvas>
249
- `}},d.BitDisplayCanvas.styles=z`
333
+ `}},d.BitDisplayCanvas.styles=R`
250
334
  :host{
251
335
  position: relative;
252
336
  --border-radius: var(--spectric-border-radius,4em);
@@ -270,8 +354,8 @@ opacity:1
270
354
  background-color:var(--background-color);
271
355
  }
272
356
  ::-webkit-scrollbar {
273
- height: ${Ke.height}px;
274
- width: ${Ke.width}px;
357
+ height: ${Je.height}px;
358
+ width: ${Je.width}px;
275
359
 
276
360
  }
277
361
 
@@ -342,7 +426,7 @@ opacity:1
342
426
 
343
427
  }
344
428
 
345
- `,le([y({type:Object,attribute:!1})],d.BitDisplayCanvas.prototype,"arrayBuffer",2),le([y({type:Number})],d.BitDisplayCanvas.prototype,"frameWidth",2),le([y({type:Number})],d.BitDisplayCanvas.prototype,"scale",2),le([y({type:Number})],d.BitDisplayCanvas.prototype,"width",2),le([y({type:Number})],d.BitDisplayCanvas.prototype,"height",2),le([He("canvas")],d.BitDisplayCanvas.prototype,"_canvas",2),d.BitDisplayCanvas=le([R("spectric-bit-display")],d.BitDisplayCanvas);const Es=z`.spectric-header {
429
+ `,pe([v({type:Object,attribute:!1})],d.BitDisplayCanvas.prototype,"arrayBuffer",2),pe([v({type:Number})],d.BitDisplayCanvas.prototype,"frameWidth",2),pe([v({type:Number})],d.BitDisplayCanvas.prototype,"scale",2),pe([v({type:Number})],d.BitDisplayCanvas.prototype,"width",2),pe([v({type:Number})],d.BitDisplayCanvas.prototype,"height",2),pe([Ye("canvas")],d.BitDisplayCanvas.prototype,"_canvas",2),d.BitDisplayCanvas=pe([L("spectric-bit-display")],d.BitDisplayCanvas);const Is=R`.spectric-header {
346
430
  display: flex;
347
431
  justify-content: space-between;
348
432
  align-items: center;
@@ -377,7 +461,7 @@ opacity:1
377
461
  color: #333;
378
462
  font-size: 14px;
379
463
  }
380
- `;var Os=Object.defineProperty,Ps=Object.getOwnPropertyDescriptor,Ze=(n,r,s,i)=>{for(var a=i>1?void 0:i?Ps(r,s):r,t=n.length-1,p;t>=0;t--)(p=n[t])&&(a=(i?p(r,s,a):p(a))||a);return i&&a&&Os(r,s,a),a};d.Header=class extends N{constructor(){super(...arguments),this.showCreateAccount=!1,this.showLoginButton=!1,this.username="",this.onLogout=()=>{const r={bubbles:!0,composed:!0};this.dispatchEvent(new CustomEvent("logout",r))},this.onLogin=()=>{const r={bubbles:!0,composed:!0};this.dispatchEvent(new CustomEvent("login",r))},this.onCreateAccount=()=>{const r={bubbles:!0,composed:!0};this.dispatchEvent(new CustomEvent("createAccount",r))}}render(){return k`
464
+ `;var Fs=Object.defineProperty,Qs=Object.getOwnPropertyDescriptor,et=(o,r,s,i)=>{for(var a=i>1?void 0:i?Qs(r,s):r,e=o.length-1,u;e>=0;e--)(u=o[e])&&(a=(i?u(r,s,a):u(a))||a);return i&&a&&Fs(r,s,a),a};d.Header=class extends P{constructor(){super(...arguments),this.showCreateAccount=!1,this.showLoginButton=!1,this.username="",this.onLogout=()=>{const r={bubbles:!0,composed:!0};this.dispatchEvent(new CustomEvent("logout",r))},this.onLogin=()=>{const r={bubbles:!0,composed:!0};this.dispatchEvent(new CustomEvent("login",r))},this.onCreateAccount=()=>{const r={bubbles:!0,composed:!0};this.dispatchEvent(new CustomEvent("createAccount",r))}}render(){return A`
381
465
  <header>
382
466
  <div class="spectric-header">
383
467
  <div style="flex-grow:1;">
@@ -385,10 +469,10 @@ opacity:1
385
469
  <h1><slot name="name"></slot></h1>
386
470
  <slot name="center"></slot>
387
471
  </div>
388
- ${this.showLoginButton!==!1?k`
472
+ ${this.showLoginButton!==!1?A`
389
473
  <div>
390
- ${this.username&&this.username!==""?k`<spectric-button variant="secondary" size="small" @click=${this.onLogout}>Log out</spectric-button>`:k`
391
- ${this.showCreateAccount!==!1?k`<spectric-button variant="text" size="small" @click=${this.onCreateAccount}>Sign up</spectric-button>`:null}
474
+ ${this.username&&this.username!==""?A`<spectric-button variant="secondary" size="small" @click=${this.onLogout}>Log out</spectric-button>`:A`
475
+ ${this.showCreateAccount!==!1?A`<spectric-button variant="text" size="small" @click=${this.onCreateAccount}>Sign up</spectric-button>`:null}
392
476
  <spectric-button variant="primary" size="small" @click=${this.onLogin}>Log in</spectric-button>`}
393
477
 
394
478
 
@@ -396,12 +480,12 @@ opacity:1
396
480
  <slot name="end"></slot>
397
481
  </div>
398
482
  </header>
399
- `}},d.Header.styles=Es,Ze([y({type:Boolean,reflect:!0})],d.Header.prototype,"showCreateAccount",2),Ze([y({type:Boolean,reflect:!0})],d.Header.prototype,"showLoginButton",2),Ze([y({type:String,reflect:!0})],d.Header.prototype,"username",2),d.Header=Ze([R("spectric-header")],d.Header);var Ts=Object.defineProperty,Ls=Object.getOwnPropertyDescriptor,ge=(n,r,s,i)=>{for(var a=i>1?void 0:i?Ls(r,s):r,t=n.length-1,p;t>=0;t--)(p=n[t])&&(a=(i?p(r,s,a):p(a))||a);return i&&a&&Ts(r,s,a),a};const Ns={display:"flex",alignItems:"center",backgroundColor:"black",color:"white",textAlign:"center"};let ue=class extends N{constructor(){super(...arguments),this.dismissable=!1,this.text="",this.bannerId="",this.headerStyle={},this._dismissed=!1,this.onDismiss=n=>{n.preventDefault(),n.stopPropagation();const r={bubbles:!0,composed:!0};this._dismissed=!0;let{bannerId:s,text:i,headerStyle:a,dismissable:t}=this;this.dispatchEvent(new CustomEvent("bannerDismissed",{detail:{bannerId:s,text:i,headerStyle:a,dismissable:t},...r}))}}render(){if(!this._dismissed)return k`
400
- <header style=${vr({...Ns,...this.headerStyle})}>
483
+ `}},d.Header.styles=Is,et([v({type:Boolean,reflect:!0})],d.Header.prototype,"showCreateAccount",2),et([v({type:Boolean,reflect:!0})],d.Header.prototype,"showLoginButton",2),et([v({type:String,reflect:!0})],d.Header.prototype,"username",2),d.Header=et([L("spectric-header")],d.Header);var Hs=Object.defineProperty,qs=Object.getOwnPropertyDescriptor,ve=(o,r,s,i)=>{for(var a=i>1?void 0:i?qs(r,s):r,e=o.length-1,u;e>=0;e--)(u=o[e])&&(a=(i?u(r,s,a):u(a))||a);return i&&a&&Hs(r,s,a),a};const Ws={display:"flex",alignItems:"center",backgroundColor:"black",color:"white",textAlign:"center"};let ue=class extends P{constructor(){super(...arguments),this.dismissable=!1,this.text="",this.bannerId="",this.headerStyle={},this._dismissed=!1,this.onDismiss=o=>{o.preventDefault(),o.stopPropagation();const r={bubbles:!0,composed:!0};this._dismissed=!0;let{bannerId:s,text:i,headerStyle:a,dismissable:e}=this;this.dispatchEvent(new CustomEvent("bannerDismissed",{detail:{bannerId:s,text:i,headerStyle:a,dismissable:e},...r}))}}render(){if(!this._dismissed)return A`
484
+ <header style=${xr({...Ws,...this.headerStyle})}>
401
485
  <div style="flex-grow:1"><slot name="text">${this.text}</slot><slot></slot></div>
402
- ${this.dismissable?k`<spectric-button size="small" @click=${this.onDismiss}>X</spectric-button>`:null}
486
+ ${this.dismissable?A`<spectric-button size="small" @click=${this.onDismiss}>X</spectric-button>`:null}
403
487
  </header>
404
- `}};ge([y({type:Boolean,reflect:!0})],ue.prototype,"dismissable",2),ge([y({type:String,reflect:!0})],ue.prototype,"text",2),ge([y({type:String,reflect:!0})],ue.prototype,"bannerId",2),ge([y({type:Object})],ue.prototype,"headerStyle",2),ge([y({state:!0,type:Boolean,attribute:!1})],ue.prototype,"_dismissed",2),ue=ge([R("spectric-banner")],ue);const Ds=z`
488
+ `}};ve([v({type:Boolean,reflect:!0})],ue.prototype,"dismissable",2),ve([v({type:String,reflect:!0})],ue.prototype,"text",2),ve([v({type:String,reflect:!0})],ue.prototype,"bannerId",2),ve([v({type:Object})],ue.prototype,"headerStyle",2),ve([v({state:!0,type:Boolean,attribute:!1})],ue.prototype,"_dismissed",2),ue=ve([L("spectric-banner")],ue);const Vs=R`
405
489
 
406
490
  :host {
407
491
  height:100vh;
@@ -561,18 +645,18 @@ article{
561
645
  * @license
562
646
  * Copyright 2018 Google LLC
563
647
  * SPDX-License-Identifier: BSD-3-Clause
564
- */const At=n=>n??C;class Bs extends _r{constructor(){super(...arguments),this.prevData={}}render(r){return C}update(r,[s]){var i;this.element!==r.element&&(this.element=r.element),this.host=((i=r.options)==null?void 0:i.host)||this.element,this.apply(s),this.groom(s),this.prevData={...s}}apply(r){if(!r)return;const{prevData:s,element:i}=this;for(const a in r){const t=r[a];t!==s[a]&&(i[a]=t)}}groom(r){const{prevData:s,element:i}=this;if(s)for(const a in s)(!r||!(a in r)&&i[a]===s[a])&&(i[a]=void 0)}}const kt=_t(Bs);var xt=(n=>(n.None="none",n.Uscui="us.cui",n.Usclassified="us.classified",n.Usunclassified="us.unclassified",n.Usconfidential="us.confidential",n.Ussecret="us.secret",n.Ustopsecret="us.topsecret",n.UstopsecretSi="us.topsecret.si",n.Uknotset="uk.notset",n.Ukofficial="uk.official",n.Uksecret="uk.secret",n.Uktopsecret="uk.topsecret",n.Caprotected_a="ca.protected_a",n.Caprotected_b="ca.protected_b",n.Caprotected_c="ca.protected_c",n.Caconfidential="ca.confidential",n.Casecret="ca.secret",n.Catopsecret="ca.topsecret",n.Auunofficial="au.unofficial",n.Auofficial="au.official",n.Auofficialsensitive="au.officialsensitive",n.Auconfidential="au.confidential",n.Ausecret="au.secret",n.Autopsecret="au.topsecret",n))(xt||{});const Xe={none:{},"us.cui":{color:"white",backgroundColor:"#3D1E5A",content:"Controlled Unclassified Information"},"us.classified":{color:"white",backgroundColor:"#723D9A",content:"Classified"},"us.unclassified":{color:"white",backgroundColor:"#007A33",content:"Unclassified"},"us.confidential":{color:"white",backgroundColor:"#0033A0",content:"Confidential"},"us.secret":{color:"white",backgroundColor:"#C8102E",content:"Secret"},"us.topsecret":{color:"white",backgroundColor:"#FF671F",content:"Top Secret"},"us.topsecret.si":{color:"black",backgroundColor:"#F7EA48",content:"Top Secret//SI"},"uk.notset":{color:"white",backgroundColor:" #616161",content:"Not Set"},"uk.official":{color:"white",backgroundColor:"#2B71C7",content:"For Offical Use"},"uk.secret":{color:"white",backgroundColor:"#F39C2C",content:"Secret"},"uk.topsecret":{color:"white",backgroundColor:"#AA0000",content:"Top Secret"},"ca.protected_a":{color:"white",backgroundColor:"#227ABC",content:"PROTECTED A"},"ca.protected_b":{color:"white",backgroundColor:"#900FB5",content:"PROTECTED B"},"ca.protected_c":{color:"white",backgroundColor:"#460FB5",content:"PROTECTED C"},"ca.confidential":{color:"white",backgroundColor:"#0033a0",content:"Confidential"},"ca.secret":{color:"white",backgroundColor:"#c8102e",content:"Secret"},"ca.topsecret":{color:"white",backgroundColor:"#ff671f",content:"Top Secret"},"au.unofficial":{color:"#666",backgroundColor:"#ffffffff",content:"Unofficial"},"au.official":{color:"#666",backgroundColor:"#ffffffff",content:"Official"},"au.officialsensitive":{color:"#666",backgroundColor:"#ffffffff",content:"Official Sentitive"},"au.confidential":{color:"white",backgroundColor:"#4F81BD",content:"Confidential"},"au.secret":{color:"black",backgroundColor:" #E5B8B7",content:"Secret"},"au.topsecret":{color:"black",backgroundColor:"#AA0000",content:"Top Secret"}};var js=Object.defineProperty,Rs=Object.getOwnPropertyDescriptor,I=(n,r,s,i)=>{for(var a=i>1?void 0:i?Rs(r,s):r,t=n.length-1,p;t>=0;t--)(p=n[t])&&(a=(i?p(r,s,a):p(a))||a);return i&&a&&js(r,s,a),a};d.SpectricPage=class extends N{constructor(){super(...arguments),this.showHeader=!0,this.headerSticky=!0,this.classificationLevel=xt.None,this.classificationText="",this.notifications=[],this.showCreateAccount=!1,this.showLoginButton=!0,this.username=""}render(){this.classificationLevel&&!Xe[this.classificationLevel]&&(console.warn("Unknown classification",this.classificationLevel),this.classificationLevel=xt.None);const r=this.classificationLevel?this.classificationText||Xe[this.classificationLevel].content:"",s=this.showHeader?k`<spectric-header ?showCreateAccount=${this.showCreateAccount} .showLoginButton=${this.showLoginButton} username=${At(this.username)}>
648
+ */const Lt=o=>o??E;class Ys extends Tr{constructor(){super(...arguments),this.prevData={}}render(r){return E}update(r,[s]){var i;this.element!==r.element&&(this.element=r.element),this.host=((i=r.options)==null?void 0:i.host)||this.element,this.apply(s),this.groom(s),this.prevData={...s}}apply(r){if(!r)return;const{prevData:s,element:i}=this;for(const a in r){const e=r[a];e!==s[a]&&(i[a]=e)}}groom(r){const{prevData:s,element:i}=this;if(s)for(const a in s)(!r||!(a in r)&&i[a]===s[a])&&(i[a]=void 0)}}const tt=Tt(Ys);var Dt=(o=>(o.None="none",o.Uscui="us.cui",o.Usclassified="us.classified",o.Usunclassified="us.unclassified",o.Usconfidential="us.confidential",o.Ussecret="us.secret",o.Ustopsecret="us.topsecret",o.UstopsecretSi="us.topsecret.si",o.Uknotset="uk.notset",o.Ukofficial="uk.official",o.Uksecret="uk.secret",o.Uktopsecret="uk.topsecret",o.Caprotected_a="ca.protected_a",o.Caprotected_b="ca.protected_b",o.Caprotected_c="ca.protected_c",o.Caconfidential="ca.confidential",o.Casecret="ca.secret",o.Catopsecret="ca.topsecret",o.Auunofficial="au.unofficial",o.Auofficial="au.official",o.Auofficialsensitive="au.officialsensitive",o.Auconfidential="au.confidential",o.Ausecret="au.secret",o.Autopsecret="au.topsecret",o))(Dt||{});const rt={none:{},"us.cui":{color:"white",backgroundColor:"#3D1E5A",content:"Controlled Unclassified Information"},"us.classified":{color:"white",backgroundColor:"#723D9A",content:"Classified"},"us.unclassified":{color:"white",backgroundColor:"#007A33",content:"Unclassified"},"us.confidential":{color:"white",backgroundColor:"#0033A0",content:"Confidential"},"us.secret":{color:"white",backgroundColor:"#C8102E",content:"Secret"},"us.topsecret":{color:"white",backgroundColor:"#FF671F",content:"Top Secret"},"us.topsecret.si":{color:"black",backgroundColor:"#F7EA48",content:"Top Secret//SI"},"uk.notset":{color:"white",backgroundColor:" #616161",content:"Not Set"},"uk.official":{color:"white",backgroundColor:"#2B71C7",content:"For Offical Use"},"uk.secret":{color:"white",backgroundColor:"#F39C2C",content:"Secret"},"uk.topsecret":{color:"white",backgroundColor:"#AA0000",content:"Top Secret"},"ca.protected_a":{color:"white",backgroundColor:"#227ABC",content:"PROTECTED A"},"ca.protected_b":{color:"white",backgroundColor:"#900FB5",content:"PROTECTED B"},"ca.protected_c":{color:"white",backgroundColor:"#460FB5",content:"PROTECTED C"},"ca.confidential":{color:"white",backgroundColor:"#0033a0",content:"Confidential"},"ca.secret":{color:"white",backgroundColor:"#c8102e",content:"Secret"},"ca.topsecret":{color:"white",backgroundColor:"#ff671f",content:"Top Secret"},"au.unofficial":{color:"#666",backgroundColor:"#ffffffff",content:"Unofficial"},"au.official":{color:"#666",backgroundColor:"#ffffffff",content:"Official"},"au.officialsensitive":{color:"#666",backgroundColor:"#ffffffff",content:"Official Sentitive"},"au.confidential":{color:"white",backgroundColor:"#4F81BD",content:"Confidential"},"au.secret":{color:"black",backgroundColor:" #E5B8B7",content:"Secret"},"au.topsecret":{color:"black",backgroundColor:"#AA0000",content:"Top Secret"}};var Ks=Object.defineProperty,Zs=Object.getOwnPropertyDescriptor,F=(o,r,s,i)=>{for(var a=i>1?void 0:i?Zs(r,s):r,e=o.length-1,u;e>=0;e--)(u=o[e])&&(a=(i?u(r,s,a):u(a))||a);return i&&a&&Ks(r,s,a),a};d.SpectricPage=class extends P{constructor(){super(...arguments),this.showHeader=!0,this.headerSticky=!0,this.classificationLevel=Dt.None,this.classificationText="",this.notifications=[],this.showCreateAccount=!1,this.showLoginButton=!0,this.username=""}render(){this.classificationLevel&&!rt[this.classificationLevel]&&(console.warn("Unknown classification",this.classificationLevel),this.classificationLevel=Dt.None);const r=this.classificationLevel?this.classificationText||rt[this.classificationLevel].content:"",s=this.showHeader?A`<spectric-header ?showCreateAccount=${this.showCreateAccount} .showLoginButton=${this.showLoginButton} username=${Lt(this.username)}>
565
649
  <slot name="branding" slot="branding"></slot>
566
650
  <slot name="name" slot="name"></slot>
567
651
  <slot name="center" slot="center"></slot>
568
652
  <slot name="end" slot="end"></slot>
569
- </spectric-header>`:null;return k`
570
- ${this.classificationLevel&&r?k`
653
+ </spectric-header>`:null;return A`
654
+ ${this.classificationLevel&&r?A`
571
655
  <!-- Classification Banner -->
572
- <spectric-banner ${kt({text:r,headerStyle:Xe[this.classificationLevel]})}></spectric-banner>
656
+ <spectric-banner ${tt({text:r,headerStyle:rt[this.classificationLevel]})}></spectric-banner>
573
657
  `:null}
574
- <spectric-theme theme=${At(this.theme)}>
575
- ${this.notifications?this.notifications.map(i=>k`<spectric-banner ${kt(i)} ></spectric-banner>`):null}
658
+ <spectric-theme theme=${Lt(this.theme)}>
659
+ ${this.notifications?this.notifications.map(i=>A`<spectric-banner ${tt(i)} ></spectric-banner>`):null}
576
660
  ${this.headerSticky?s:null}
577
661
  <article>
578
662
  ${this.headerSticky?null:s}
@@ -582,9 +666,9 @@ article{
582
666
  </section>
583
667
  </article>
584
668
  </spectric-theme>
585
- ${this.classificationLevel&&r?k`<spectric-banner ${kt({text:r,headerStyle:Xe[this.classificationLevel]})}></spectric-banner>`:null}
669
+ ${this.classificationLevel&&r?A`<spectric-banner ${tt({text:r,headerStyle:rt[this.classificationLevel]})}></spectric-banner>`:null}
586
670
 
587
- `}},d.SpectricPage.styles=Ds,I([y({type:Boolean,reflect:!0})],d.SpectricPage.prototype,"showHeader",2),I([y({type:Boolean,reflect:!0})],d.SpectricPage.prototype,"headerSticky",2),I([y({type:String,reflect:!0})],d.SpectricPage.prototype,"classificationLevel",2),I([y({type:String,reflect:!0})],d.SpectricPage.prototype,"classificationText",2),I([y({type:Array,reflect:!0})],d.SpectricPage.prototype,"notifications",2),I([y({type:Boolean,reflect:!0})],d.SpectricPage.prototype,"showCreateAccount",2),I([y({type:Boolean,reflect:!0})],d.SpectricPage.prototype,"showLoginButton",2),I([y({type:String,reflect:!0})],d.SpectricPage.prototype,"username",2),I([y({type:String,reflect:!0})],d.SpectricPage.prototype,"theme",2),d.SpectricPage=I([R("spectric-page")],d.SpectricPage);var Us=Object.defineProperty,Ms=Object.getOwnPropertyDescriptor,O=(n,r,s,i)=>{for(var a=i>1?void 0:i?Ms(r,s):r,t=n.length-1,p;t>=0;t--)(p=n[t])&&(a=(i?p(r,s,a):p(a))||a);return i&&a&&Us(r,s,a),a},xr=(n=>(n.Text="text",n.TextArea="text-area",n.number="number",n.color="color",n.date="date",n.datetime="datetime-local",n.email="email",n.file="file",n.hidden="hidden",n.password="password",n))(xr||{});d.SpectricInput=class extends N{constructor(){super(...arguments),this.placeholder="",this.readonly=!1,this.variant="text",this.disabled=!1,this.label="",this.hidePasswordLabel="Hide",this.showPasswordLabel="Show",this.showPasswordVisibilityToggle=!0,this.helperText="",this.invalid=!1,this.required=!1,this.invalidText="",this.name="",this.pattern="",this.maxCount=0,this._value="",this._showPassword=!1,this.autocomplete="",this._handleInput=({target:r})=>{const s=r;this.value=s.value,this.invalid=!s.validity.valid},this.handleTogglePasswordVisibility=()=>{this._showPassword=!this._showPassword,this.requestUpdate()}}createRenderRoot(){return this}get selectionStart(){return this._input?this._input.selectionStart:null}get value(){return this._input?this.variant=="number"?parseFloat(this._input.value):this._input.value:this._value}set value(r){const s=this._value;this._value=r,this.requestUpdate("value",s),this._input&&(this._input.value=String(r))}blur(){this._input&&this._input.blur()}focus(r){this._input&&(this._input.blur(),this._input.focus(r))}setSelectionRange(r,s,i="none"){this._input&&this._input.setSelectionRange(r,s,i)}render(){switch(this.variant){case"text":case"password":case"number":case"email":case"date":case"datetime-local":case"file":case"color":return k`
671
+ `}},d.SpectricPage.styles=Vs,F([v({type:Boolean,reflect:!0})],d.SpectricPage.prototype,"showHeader",2),F([v({type:Boolean,reflect:!0})],d.SpectricPage.prototype,"headerSticky",2),F([v({type:String,reflect:!0})],d.SpectricPage.prototype,"classificationLevel",2),F([v({type:String,reflect:!0})],d.SpectricPage.prototype,"classificationText",2),F([v({type:Array,reflect:!0})],d.SpectricPage.prototype,"notifications",2),F([v({type:Boolean,reflect:!0})],d.SpectricPage.prototype,"showCreateAccount",2),F([v({type:Boolean,reflect:!0})],d.SpectricPage.prototype,"showLoginButton",2),F([v({type:String,reflect:!0})],d.SpectricPage.prototype,"username",2),F([v({type:String,reflect:!0})],d.SpectricPage.prototype,"theme",2),d.SpectricPage=F([L("spectric-page")],d.SpectricPage);var Xs=Object.defineProperty,Gs=Object.getOwnPropertyDescriptor,T=(o,r,s,i)=>{for(var a=i>1?void 0:i?Gs(r,s):r,e=o.length-1,u;e>=0;e--)(u=o[e])&&(a=(i?u(r,s,a):u(a))||a);return i&&a&&Xs(r,s,a),a},Nr=(o=>(o.Text="text",o.TextArea="text-area",o.number="number",o.color="color",o.date="date",o.datetime="datetime-local",o.email="email",o.file="file",o.hidden="hidden",o.password="password",o.checkbox="checkbox",o))(Nr||{});d.SpectricInput=class extends P{constructor(){super(...arguments),this.placeholder="",this.readonly=!1,this.variant="text",this.disabled=!1,this.label="",this.hidePasswordLabel="Hide",this.showPasswordLabel="Show",this.showPasswordVisibilityToggle=!0,this.helperText="",this.invalid=!1,this.required=!1,this.invalidText="",this.name="",this.pattern="",this.maxCount=0,this._value="",this._showPassword=!1,this.autocomplete="",this._handleInput=({target:r})=>{const s=r;this.value=s.value,this.invalid=!s.validity.valid},this.handleTogglePasswordVisibility=()=>{this._showPassword=!this._showPassword,this.requestUpdate()}}createRenderRoot(){return this}get selectionStart(){return this._input?this._input.selectionStart:null}get value(){return this._input?this.variant=="number"?parseFloat(this._input.value):this._input.value:this._value}set value(r){const s=this._value;this._value=r,this.requestUpdate("value",s),this._input&&(this._input.value=String(r))}blur(){this._input&&this._input.blur()}focus(r){this._input&&(this._input.blur(),this._input.focus(r))}setSelectionRange(r,s,i="none"){this._input&&this._input.setSelectionRange(r,s,i)}render(){switch(this.variant){case"text":case"password":case"number":case"email":case"date":case"datetime-local":case"file":case"color":return A`
588
672
  <div class="inputWrapper">
589
673
  <div class="text-input__label-helper-wrapper">
590
674
  <div class="--text-input__label-wrapper">
@@ -598,20 +682,20 @@ article{
598
682
  ?disabled="${this.disabled}"
599
683
  aria-describedby="helper-text"
600
684
  id="input"
601
- name="${be(this.name)}"
602
- pattern="${be(this.pattern)}"
603
- placeholder="${be(this.placeholder)}"
604
- autocomplete="${be(this.autocomplete)}"
685
+ name="${me(this.name)}"
686
+ pattern="${me(this.pattern)}"
687
+ placeholder="${me(this.placeholder)}"
688
+ autocomplete="${me(this.autocomplete)}"
605
689
  ?readonly="${this.readonly}"
606
690
  ?required="${this.required}"
607
- type="${be(this.variant!=="password"?this.variant:this._showPassword?"text":"password")}"
691
+ type="${me(this.variant!=="password"?this.variant:this._showPassword?"text":"password")}"
608
692
  .value="${this._value}"
609
- maxlength="${be(this.maxCount>0?this.maxCount:void 0)}"
693
+ maxlength="${me(this.maxCount>0?this.maxCount:void 0)}"
610
694
  @input="${this._handleInput}"
611
695
  @change=${()=>{this.dispatchEvent(new Event("change",{bubbles:!0}))}}
612
696
  />
613
697
 
614
- ${this.variant==="password"&&this.showPasswordVisibilityToggle?k`
698
+ ${this.variant==="password"&&this.showPasswordVisibilityToggle?A`
615
699
  <spectric-button
616
700
  size="small"
617
701
  type="button"
@@ -629,11 +713,18 @@ article{
629
713
 
630
714
  </div>
631
715
  </div>
632
- `;case"hidden":return k`<input type="hidden"></input>`}return`Not yet implemented ${this.variant}`}},O([y({type:String,reflect:!0})],d.SpectricInput.prototype,"placeholder",2),O([y({type:Boolean,reflect:!0})],d.SpectricInput.prototype,"readonly",2),O([y({type:String,reflect:!0})],d.SpectricInput.prototype,"variant",2),O([y({type:Boolean,reflect:!0})],d.SpectricInput.prototype,"disabled",2),O([y({type:String,reflect:!0})],d.SpectricInput.prototype,"label",2),O([y()],d.SpectricInput.prototype,"hidePasswordLabel",2),O([y()],d.SpectricInput.prototype,"showPasswordLabel",2),O([y({type:Boolean,reflect:!0})],d.SpectricInput.prototype,"showPasswordVisibilityToggle",2),O([y({type:String,reflect:!0})],d.SpectricInput.prototype,"helperText",2),O([y({type:Boolean,reflect:!0})],d.SpectricInput.prototype,"invalid",2),O([y({type:Boolean,reflect:!0})],d.SpectricInput.prototype,"required",2),O([y({type:String,reflect:!0})],d.SpectricInput.prototype,"invalidText",2),O([y()],d.SpectricInput.prototype,"name",2),O([y()],d.SpectricInput.prototype,"pattern",2),O([y({type:Number,reflect:!0})],d.SpectricInput.prototype,"maxCount",2),O([y({reflect:!0})],d.SpectricInput.prototype,"autocomplete",2),O([y({reflect:!0})],d.SpectricInput.prototype,"value",1),O([Le("input")],d.SpectricInput.prototype,"_input",2),d.SpectricInput=O([R("spectric-input")],d.SpectricInput);const be=n=>At(n===""?void 0:n??void 0),zs="end of input",Is={fieldName:"field name",value:"value",literal:"literal",whitespace:"whitespace"};class Cr extends Error{constructor(r,s){let i=r.message;if(r.expected){const p=r.expected.map(v=>Is[v.description]||v.description).join(", ");let g=r.found?`"${r.found}"`:zs;i=`Expected ${p} but ${g} found.`}const a=[i,s,"-".repeat(r.location.start.offset)+"^"].join(`
633
- `);super(a),this.name="DQLSyntaxError",this.shortMessage=i}}function ve(n){return{type:"literal",value:n}}function Ct(n){return n.value}const Qs=Object.freeze(Object.defineProperty({__proto__:null,buildNode:ve,toOpenSearchQuery:Ct},Symbol.toStringTag,{value:"Module"})),{SyntaxError:Fc,parse:Ge}=function(){function n(i,a){function t(){this.constructor=i}t.prototype=a.prototype,i.prototype=new t}function r(i,a,t,p){this.message=i,this.expected=a,this.found=t,this.location=p,this.name="SyntaxError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,r)}n(r,Error);function s(i){var a=arguments.length>1?arguments[1]:{},t={},p={start:Oi,Literal:Kt},g=Oi,v=function(e,o){return o.type==="cursor"?{...o,suggestionTypes:["conjunction"]}:e!==null?e:de.function.buildNode("is","*","*")},_=function(){return jc},A=function(e,o){const l=[e,o].find(u=>u.type==="cursor");return l||W("or",[e,o])},S=function(e,o){const l=[e,o].find(u=>u.type==="cursor");return l||W("and",[e,o])},E=function(e){return e.type==="cursor"?e:W("not",[e])},x="(",L={type:"literal",value:"(",description:'"("'},et=")",te={type:"literal",value:")",description:'")"'},F=function(e,o){return o.type==="cursor"?{...o,suggestionTypes:["conjunction"]}:e},H=":",j={type:"literal",value:":",description:'":"'},me="{",Bt={type:"literal",value:"{",description:'"{"'},jt="}",Rt={type:"literal",value:"}",description:'"}"'},ln=function(e,o,l){return o.type==="cursor"?{...o,nestedPath:o.nestedPath?`${e.value}.${o.nestedPath}`:e.value}:l.type==="cursor"?{...l,suggestionTypes:["conjunction"]}:W("nested",[e,o])},un={type:"other",description:"fieldName"},pn=function(e,o,l){if(l.type==="cursor")return{...l,suggestionTypes:["conjunction"]};const u=Ic(o,l);return W("range",[e,u])},dn=function(e,o){return o.type==="cursor"?{...o,fieldName:e.value,suggestionTypes:["value","conjunction"]}:o(e)},fn=function(e){if(e.type==="cursor"){const l=`${e.prefix}${e.suffix}`.trim();return{...e,fieldName:l,suggestionTypes:["field","operator","conjunction"]}}const o=re(null);return e(o)},hn=function(e,o){return o.type==="cursor"?{...o,suggestionTypes:["conjunction"]}:e},gn=function(e,o){const l=[e,o].find(u=>u.type==="cursor");return l?{...l,suggestionTypes:["value"]}:u=>W("or",[e(u),o(u)])},bn=function(e,o){const l=[e,o].find(u=>u.type==="cursor");return l?{...l,suggestionTypes:["value"]}:u=>W("and",[e(u),o(u)])},vn=function(e){return e.type==="cursor"?{...list,suggestionTypes:["value"]}:o=>W("not",[e(o)])},yn={type:"other",description:"value"},mn=function(e){if(e.type==="cursor")return e;const o=re(!0);return l=>W("is",[l,e,o])},$n=function(e){if(e.type==="cursor")return e;!Mc&&e.type==="wildcard"&&de.wildcard.hasLeadingWildcard(e)&&U("Leading wildcards are disabled. See query:allowLeadingWildcards in Advanced Settings.");const o=re(!1);return l=>W("is",[l,e,o])},wn={type:"other",description:"OR"},Ir="or",Qr={type:"literal",value:"or",description:'"or"'},_n={type:"other",description:"AND"},Fr="and",Hr={type:"literal",value:"and",description:'"and"'},Sn={type:"other",description:"NOT"},qr="not",Wr={type:"literal",value:"not",description:'"not"'},An={type:"other",description:"literal"},De='"',Be={type:"literal",value:'"',description:'"\\""'},Ut=function(e,o,l){const{start:u,end:h}=hc();return{type:"cursor",start:u.offset,end:h.offset-o.length,prefix:e.join(""),suffix:l.join(""),text:fc().replace(o,"")}},kn=function(e){return re(e.join(""))},je="\\",Re={type:"literal",value:"\\",description:'"\\\\"'},xn=/^[\\"]/,Cn={type:"class",value:'[\\\\"]',description:'[\\\\"]'},tt=function(e){return e},En=/^[^"]/,On={type:"class",value:'[^"]',description:'[^"]'},Pn=function(e){const o=e.join("").trim();return o==="null"?re(null):o==="true"?re(!0):o==="false"?re(!1):e.includes(qi)?zc(o):re(/^(-?[1-9]+\d*([.]\d+)?)$|^(-?0[.]\d*[1-9]+)$|^0$|^0.0$|^[.]\d{1,}$/.test(o)?isFinite(o)&&(o>Number.MAX_SAFE_INTEGER||o<Number.MIN_SAFE_INTEGER)?BigInt(o):Number(o):o)},Yr={type:"any",description:"any character"},rt="*",it={type:"literal",value:"*",description:'"*"'},Tn=function(){return qi},Vr="\\t",Ln={type:"literal",value:"\\t",description:'"\\\\t"'},Nn=function(){return" "},Kr="\\r",Dn={type:"literal",value:"\\r",description:'"\\\\r"'},Bn=function(){return"\r"},Zr="\\n",jn={type:"literal",value:"\\n",description:'"\\\\n"'},Rn=function(){return`
634
- `},Un=function(e){return e},Mn=/^[\\():<>"*{}]/,zn={type:"class",value:'[\\\\():<>"*{}]',description:'[\\\\():<>"*{}]'},Xr="<=",In={type:"literal",value:"<=",description:'"<="'},Qn=function(){return"lte"},Gr=">=",Fn={type:"literal",value:">=",description:'">="'},Hn=function(){return"gte"},Jr="<",ei={type:"literal",value:"<",description:'"<"'},qn=function(){return"lt"},ti=">",ri={type:"literal",value:">",description:'">"'},Wn=function(){return"gt"},Yn={type:"other",description:"whitespace"},Vn=/^[ \t\r\n]/,Kn={type:"class",value:"[\\ \\t\\r\\n]",description:"[\\ \\t\\r\\n]"},Zn=function(){return Rc},ii="@kuery-cursor@",Xn={type:"literal",value:"@kuery-cursor@",description:'"@kuery-cursor@"'},Gn=function(){return Uc},si="||",Jn={type:"literal",value:"||",description:'"||"'},ec=function(){U("LuceneOr")},oi="&&",tc={type:"literal",value:"&&",description:'"&&"'},ni=function(){U("LuceneAnd")},ci="+",ai={type:"literal",value:"+",description:'"+"'},li="-",ui={type:"literal",value:"-",description:'"-"'},pi=function(){U("LuceneNot")},di="!",fi={type:"literal",value:"!",description:'"!"'},hi="_exists_",rc={type:"literal",value:"_exists_",description:'"_exists_"'},ic=function(){U("LuceneExists")},gi=function(){U("LuceneRange")},bi="?",vi={type:"literal",value:"?",description:'"?"'},sc=function(){U("LuceneWildcard")},Mt="/",zt={type:"literal",value:"/",description:'"/"'},yi=/^[^\/]/,mi={type:"class",value:"[^/]",description:"[^/]"},oc=function(){U("LuceneRegex")},It="~",Qt={type:"literal",value:"~",description:'"~"'},$e=/^[0-9]/,we={type:"class",value:"[0-9]",description:"[0-9]"},nc=function(){U("LuceneFuzzy")},cc=function(){U("LuceneProximity")},$i="^",wi={type:"literal",value:"^",description:'"^"'},ac=function(){U("LuceneBoost")},lc=function(){return char},uc="=",pc={type:"literal",value:"=",description:'"="'},_i="[",Si={type:"literal",value:"[",description:'"["'},Ai="]",ki={type:"literal",value:"]",description:'"]"'},xi="TO",dc={type:"literal",value:"TO",description:'"TO"'},c=0,w=0,st=[{line:1,column:1,seenCR:!1}],q=0,Ft=[],f=0,ot;if("startRule"in a){if(!(a.startRule in p))throw new Error(`Can't start parsing from rule "`+a.startRule+'".');g=p[a.startRule]}function fc(){return i.substring(w,c)}function hc(){return nt(w,c)}function U(e){throw Ei(e,null,i.substring(w,c),nt(w,c))}function Ci(e){var o=st[e],l,u;if(o)return o;for(l=e-1;!st[l];)l--;for(o=st[l],o={line:o.line,column:o.column,seenCR:o.seenCR};l<e;)u=i.charAt(l),u===`
635
- `?(o.seenCR||o.line++,o.column=1,o.seenCR=!1):u==="\r"||u==="\u2028"||u==="\u2029"?(o.line++,o.column=1,o.seenCR=!0):(o.column++,o.seenCR=!1),l++;return st[e]=o,o}function nt(e,o){var l=Ci(e),u=Ci(o);return{start:{offset:e,line:l.line,column:l.column},end:{offset:o,line:u.line,column:u.column}}}function b(e){c<q||(c>q&&(q=c,Ft=[]),Ft.push(e))}function Ei(e,o,l,u){function h(P){var T=1;for(P.sort(function(ie,M){return ie.description<M.description?-1:ie.description>M.description?1:0});T<P.length;)P[T-1]===P[T]?P.splice(T,1):T++}function $(P,T){function ie(Qc){function ft(K){return K.charCodeAt(0).toString(16).toUpperCase()}return Qc.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\x08/g,"\\b").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\f/g,"\\f").replace(/\r/g,"\\r").replace(/[\x00-\x07\x0B\x0E\x0F]/g,function(K){return"\\x0"+ft(K)}).replace(/[\x10-\x1F\x80-\xFF]/g,function(K){return"\\x"+ft(K)}).replace(/[\u0100-\u0FFF]/g,function(K){return"\\u0"+ft(K)}).replace(/[\u1000-\uFFFF]/g,function(K){return"\\u"+ft(K)})}var M=new Array(P.length),Wi,Yi,Me;for(Me=0;Me<P.length;Me++)M[Me]=P[Me].description;return Wi=P.length>1?M.slice(0,-1).join(", ")+" or "+M[P.length-1]:M[0],Yi=T?'"'+ie(T)+'"':"end of input","Expected "+Wi+" but "+Yi+" found."}return o!==null&&h(o),new r(e!==null?e:$(o,l),o,l,u)}function Oi(){var e,o,l,u;for(e=c,o=[],l=m();l!==t;)o.push(l),l=m();return o!==t?(l=ct(),l===t&&(l=null),l!==t?(u=pt(),u!==t?(w=e,o=v(l,u),e=o):(c=e,e=t)):(c=e,e=t)):(c=e,e=t),e}function ct(){var e,o,l,u;return e=c,w=c,o=_(),o?o=void 0:o=t,o!==t?(l=Ac(),l!==t?(o=[o,l],e=o):(c=e,e=t)):(c=e,e=t),e===t&&(e=c,o=Ht(),o!==t?(l=at(),l!==t?(u=ct(),u!==t?(w=e,o=A(o,u),e=o):(c=e,e=t)):(c=e,e=t)):(c=e,e=t),e===t&&(e=Ht())),e}function Ht(){var e,o,l,u;return e=c,o=Pi(),o!==t?(l=lt(),l!==t?(u=Ht(),u!==t?(w=e,o=S(o,u),e=o):(c=e,e=t)):(c=e,e=t)):(c=e,e=t),e===t&&(e=Pi()),e}function Pi(){var e,o,l;return e=c,o=Vt(),o!==t?(l=Ti(),l!==t?(w=e,o=E(l),e=o):(c=e,e=t)):(c=e,e=t),e===t&&(e=Ti()),e}function Ti(){var e,o,l,u,h,$;if(e=c,i.charCodeAt(c)===40?(o=x,c++):(o=t,f===0&&b(L)),o!==t){for(l=[],u=m();u!==t;)l.push(u),u=m();l!==t?(u=ct(),u!==t?(h=pt(),h!==t?(i.charCodeAt(c)===41?($=et,c++):($=t,f===0&&b(te)),$!==t?(w=e,o=F(u,h),e=o):(c=e,e=t)):(c=e,e=t)):(c=e,e=t)):(c=e,e=t)}else c=e,e=t;return e===t&&(e=gc()),e}function gc(){var e,o,l,u,h,$,P,T,ie,M;if(e=c,o=qt(),o!==t){for(l=[],u=m();u!==t;)l.push(u),u=m();if(l!==t)if(i.charCodeAt(c)===58?(u=H,c++):(u=t,f===0&&b(j)),u!==t){for(h=[],$=m();$!==t;)h.push($),$=m();if(h!==t)if(i.charCodeAt(c)===123?($=me,c++):($=t,f===0&&b(Bt)),$!==t){for(P=[],T=m();T!==t;)P.push(T),T=m();P!==t?(T=ct(),T!==t?(ie=pt(),ie!==t?(i.charCodeAt(c)===125?(M=jt,c++):(M=t,f===0&&b(Rt)),M!==t?(w=e,o=ln(o,T,ie),e=o):(c=e,e=t)):(c=e,e=t)):(c=e,e=t)):(c=e,e=t)}else c=e,e=t;else c=e,e=t}else c=e,e=t;else c=e,e=t}else c=e,e=t;return e===t&&(e=bc()),e}function bc(){var e;return e=vc(),e===t&&(e=yc(),e===t&&(e=mc())),e}function qt(){var e;return f++,e=Kt(),f--,e===t&&f===0&&b(un),e}function vc(){var e,o,l,u,h,$;if(e=c,o=qt(),o!==t){for(l=[],u=m();u!==t;)l.push(u),u=m();if(l!==t)if(u=Ri(),u!==t){for(h=[],$=m();$!==t;)h.push($),$=m();h!==t?($=Kt(),$!==t?(w=e,o=pn(o,u,$),e=o):(c=e,e=t)):(c=e,e=t)}else c=e,e=t;else c=e,e=t}else c=e,e=t;return e}function yc(){var e,o,l,u,h,$;if(e=c,o=qt(),o!==t){for(l=[],u=m();u!==t;)l.push(u),u=m();if(l!==t)if(i.charCodeAt(c)===58?(u=H,c++):(u=t,f===0&&b(j)),u!==t){for(h=[],$=m();$!==t;)h.push($),$=m();h!==t?($=Wt(),$!==t?(w=e,o=dn(o,$),e=o):(c=e,e=t)):(c=e,e=t)}else c=e,e=t;else c=e,e=t}else c=e,e=t;return e}function mc(){var e,o;return e=c,o=Di(),o!==t&&(w=e,o=fn(o)),e=o,e}function Wt(){var e,o,l,u,h,$;if(e=c,i.charCodeAt(c)===40?(o=x,c++):(o=t,f===0&&b(L)),o!==t){for(l=[],u=m();u!==t;)l.push(u),u=m();l!==t?(u=Li(),u!==t?(h=pt(),h!==t?(i.charCodeAt(c)===41?($=et,c++):($=t,f===0&&b(te)),$!==t?(w=e,o=hn(u,h),e=o):(c=e,e=t)):(c=e,e=t)):(c=e,e=t)):(c=e,e=t)}else c=e,e=t;return e===t&&(e=Di()),e}function Li(){var e,o,l,u;return e=c,o=Yt(),o!==t?(l=at(),l!==t?(u=Li(),u!==t?(w=e,o=gn(o,u),e=o):(c=e,e=t)):(c=e,e=t)):(c=e,e=t),e===t&&(e=Yt()),e}function Yt(){var e,o,l,u;return e=c,o=Ni(),o!==t?(l=lt(),l!==t?(u=Yt(),u!==t?(w=e,o=bn(o,u),e=o):(c=e,e=t)):(c=e,e=t)):(c=e,e=t),e===t&&(e=Ni()),e}function Ni(){var e,o,l;return e=c,o=Vt(),o!==t?(l=Wt(),l!==t?(w=e,o=vn(l),e=o):(c=e,e=t)):(c=e,e=t),e===t&&(e=Wt()),e}function Di(){var e,o;return f++,e=c,o=ut(),o!==t&&(w=e,o=mn(o)),e=o,e===t&&(e=c,o=Bi(),o!==t&&(w=e,o=$n(o)),e=o),f--,e===t&&(o=t,f===0&&b(yn)),e}function at(){var e,o,l,u,h;if(f++,e=c,o=[],l=m(),l!==t)for(;l!==t;)o.push(l),l=m();else o=t;if(o!==t)if(i.substr(c,2).toLowerCase()===Ir?(l=i.substr(c,2),c+=2):(l=t,f===0&&b(Qr)),l!==t){if(u=[],h=m(),h!==t)for(;h!==t;)u.push(h),h=m();else u=t;u!==t?(o=[o,l,u],e=o):(c=e,e=t)}else c=e,e=t;else c=e,e=t;return e===t&&(e=c,w=c,o=_(),o?o=void 0:o=t,o!==t?(l=Ui(),l!==t?(o=[o,l],e=o):(c=e,e=t)):(c=e,e=t)),f--,e===t&&(o=t,f===0&&b(wn)),e}function lt(){var e,o,l,u,h;if(f++,e=c,o=[],l=m(),l!==t)for(;l!==t;)o.push(l),l=m();else o=t;if(o!==t)if(i.substr(c,3).toLowerCase()===Fr?(l=i.substr(c,3),c+=3):(l=t,f===0&&b(Hr)),l!==t){if(u=[],h=m(),h!==t)for(;h!==t;)u.push(h),h=m();else u=t;u!==t?(o=[o,l,u],e=o):(c=e,e=t)}else c=e,e=t;else c=e,e=t;return e===t&&(e=c,w=c,o=_(),o?o=void 0:o=t,o!==t?(l=Mi(),l!==t?(o=[o,l],e=o):(c=e,e=t)):(c=e,e=t)),f--,e===t&&(o=t,f===0&&b(_n)),e}function Vt(){var e,o,l,u;if(f++,e=c,i.substr(c,3).toLowerCase()===qr?(o=i.substr(c,3),c+=3):(o=t,f===0&&b(Wr)),o!==t){if(l=[],u=m(),u!==t)for(;u!==t;)l.push(u),u=m();else l=t;l!==t?(o=[o,l],e=o):(c=e,e=t)}else c=e,e=t;return e===t&&(e=c,w=c,o=_(),o?o=void 0:o=t,o!==t?(l=zi(),l!==t?(o=[o,l],e=o):(c=e,e=t)):(c=e,e=t)),f--,e===t&&(o=t,f===0&&b(Sn)),e}function Kt(){var e;return f++,e=ut(),e===t&&(e=Bi()),f--,e===t&&f===0&&b(An),e}function ut(){var e,o,l,u,h,$;if(e=c,i.charCodeAt(c)===34?(o=De,c++):(o=t,f===0&&b(Be)),o!==t){for(l=[],u=_e();u!==t;)l.push(u),u=_e();if(l!==t)if(u=Ue(),u!==t){for(h=[],$=_e();$!==t;)h.push($),$=_e();h!==t?(i.charCodeAt(c)===34?($=De,c++):($=t,f===0&&b(Be)),$!==t?(w=e,o=Ut(l,u,h),e=o):(c=e,e=t)):(c=e,e=t)}else c=e,e=t;else c=e,e=t}else c=e,e=t;if(e===t)if(e=c,i.charCodeAt(c)===34?(o=De,c++):(o=t,f===0&&b(Be)),o!==t){for(l=[],u=_e();u!==t;)l.push(u),u=_e();l!==t?(i.charCodeAt(c)===34?(u=De,c++):(u=t,f===0&&b(Be)),u!==t?(w=e,o=kn(l),e=o):(c=e,e=t)):(c=e,e=t)}else c=e,e=t;return e}function _e(){var e,o,l;return e=Zt(),e===t&&(e=c,i.charCodeAt(c)===92?(o=je,c++):(o=t,f===0&&b(Re)),o!==t?(xn.test(i.charAt(c))?(l=i.charAt(c),c++):(l=t,f===0&&b(Cn)),l!==t?(w=e,o=tt(l),e=o):(c=e,e=t)):(c=e,e=t),e===t&&(e=c,o=c,f++,l=Ue(),f--,l===t?o=void 0:(c=o,o=t),o!==t?(En.test(i.charAt(c))?(l=i.charAt(c),c++):(l=t,f===0&&b(On)),l!==t?(w=e,o=tt(l),e=o):(c=e,e=t)):(c=e,e=t))),e}function Bi(){var e,o,l,u,h;for(e=c,o=[],l=Se();l!==t;)o.push(l),l=Se();if(o!==t)if(l=Ue(),l!==t){for(u=[],h=Se();h!==t;)u.push(h),h=Se();u!==t?(w=e,o=Ut(o,l,u),e=o):(c=e,e=t)}else c=e,e=t;else c=e,e=t;if(e===t){if(e=c,o=[],l=Se(),l!==t)for(;l!==t;)o.push(l),l=Se();else o=t;o!==t&&(w=e,o=Pn(o)),e=o}return e}function Se(){var e,o,l,u,h;return e=Zt(),e===t&&(e=wc(),e===t&&(e=_c(),e===t&&(e=$c(),e===t&&(e=c,o=c,f++,l=ji(),f--,l===t?o=void 0:(c=o,o=t),o!==t?(l=c,f++,u=Sc(),f--,u===t?l=void 0:(c=l,l=t),l!==t?(u=c,f++,h=Ue(),f--,h===t?u=void 0:(c=u,u=t),u!==t?(i.length>c?(h=i.charAt(c),c++):(h=t,f===0&&b(Yr)),h!==t?(w=e,o=tt(h),e=o):(c=e,e=t)):(c=e,e=t)):(c=e,e=t)):(c=e,e=t))))),e}function $c(){var e,o;return e=c,i.charCodeAt(c)===42?(o=rt,c++):(o=t,f===0&&b(it)),o!==t&&(w=e,o=Tn()),e=o,e}function pt(){var e,o,l,u,h;for(e=c,o=[],l=m();l!==t;)o.push(l),l=m();if(o!==t)if(l=Ue(),l!==t){for(u=[],h=m();h!==t;)u.push(h),h=m();u!==t?(w=e,o=Ut(o,l,u),e=o):(c=e,e=t)}else c=e,e=t;else c=e,e=t;if(e===t)for(e=[],o=m();o!==t;)e.push(o),o=m();return e}function Zt(){var e,o;return e=c,i.substr(c,2)===Vr?(o=Vr,c+=2):(o=t,f===0&&b(Ln)),o!==t&&(w=e,o=Nn()),e=o,e===t&&(e=c,i.substr(c,2)===Kr?(o=Kr,c+=2):(o=t,f===0&&b(Dn)),o!==t&&(w=e,o=Bn()),e=o,e===t&&(e=c,i.substr(c,2)===Zr?(o=Zr,c+=2):(o=t,f===0&&b(jn)),o!==t&&(w=e,o=Rn()),e=o)),e}function wc(){var e,o,l;return e=c,i.charCodeAt(c)===92?(o=je,c++):(o=t,f===0&&b(Re)),o!==t?(l=ji(),l!==t?(w=e,o=tt(l),e=o):(c=e,e=t)):(c=e,e=t),e}function _c(){var e,o,l;return e=c,i.charCodeAt(c)===92?(o=je,c++):(o=t,f===0&&b(Re)),o!==t?(i.substr(c,2).toLowerCase()===Ir?(l=i.substr(c,2),c+=2):(l=t,f===0&&b(Qr)),l===t&&(i.substr(c,3).toLowerCase()===Fr?(l=i.substr(c,3),c+=3):(l=t,f===0&&b(Hr)),l===t&&(i.substr(c,3).toLowerCase()===qr?(l=i.substr(c,3),c+=3):(l=t,f===0&&b(Wr)))),l!==t?(w=e,o=Un(l),e=o):(c=e,e=t)):(c=e,e=t),e}function Sc(){var e;return e=at(),e===t&&(e=lt(),e===t&&(e=Vt())),e}function ji(){var e;return Mn.test(i.charAt(c))?(e=i.charAt(c),c++):(e=t,f===0&&b(zn)),e}function Ri(){var e,o;return e=c,i.substr(c,2)===Xr?(o=Xr,c+=2):(o=t,f===0&&b(In)),o!==t&&(w=e,o=Qn()),e=o,e===t&&(e=c,i.substr(c,2)===Gr?(o=Gr,c+=2):(o=t,f===0&&b(Fn)),o!==t&&(w=e,o=Hn()),e=o,e===t&&(e=c,i.charCodeAt(c)===60?(o=Jr,c++):(o=t,f===0&&b(ei)),o!==t&&(w=e,o=qn()),e=o,e===t&&(e=c,i.charCodeAt(c)===62?(o=ti,c++):(o=t,f===0&&b(ri)),o!==t&&(w=e,o=Wn()),e=o))),e}function m(){var e;return f++,Vn.test(i.charAt(c))?(e=i.charAt(c),c++):(e=t,f===0&&b(Kn)),f--,e===t&&f===0&&b(Yn),e}function Ue(){var e,o,l;return e=c,w=c,o=Zn(),o?o=void 0:o=t,o!==t?(i.substr(c,14)===ii?(l=ii,c+=14):(l=t,f===0&&b(Xn)),l!==t?(w=e,o=Gn(),e=o):(c=e,e=t)):(c=e,e=t),e}function Ui(){var e,o,l,u,h;for(e=c,o=[],l=m();l!==t;)o.push(l),l=m();if(o!==t)if(i.substr(c,2)===si?(l=si,c+=2):(l=t,f===0&&b(Jn)),l!==t){for(u=[],h=m();h!==t;)u.push(h),h=m();u!==t?(w=e,o=ec(),e=o):(c=e,e=t)}else c=e,e=t;else c=e,e=t;return e}function Mi(){var e,o,l,u,h;for(e=c,o=[],l=m();l!==t;)o.push(l),l=m();if(o!==t)if(i.substr(c,2)===oi?(l=oi,c+=2):(l=t,f===0&&b(tc)),l!==t){for(u=[],h=m();h!==t;)u.push(h),h=m();u!==t?(w=e,o=ni(),e=o):(c=e,e=t)}else c=e,e=t;else c=e,e=t;return e===t&&(e=c,i.charCodeAt(c)===43?(o=ci,c++):(o=t,f===0&&b(ai)),o!==t&&(w=e,o=ni()),e=o),e}function zi(){var e,o;return e=c,i.charCodeAt(c)===45?(o=li,c++):(o=t,f===0&&b(ui)),o!==t&&(w=e,o=pi()),e=o,e===t&&(e=c,i.charCodeAt(c)===33?(o=di,c++):(o=t,f===0&&b(fi)),o!==t&&(w=e,o=pi()),e=o),e}function Ac(){var e;return e=kc(),e===t&&(e=Ii(),e===t&&(e=xc())),e}function kc(){var e,o,l,u,h,$;if(e=c,o=Ae(),o!==t){for(l=[],u=m();u!==t;)l.push(u),u=m();if(l!==t)if(i.charCodeAt(c)===58?(u=H,c++):(u=t,f===0&&b(j)),u!==t){for(h=[],$=m();$!==t;)h.push($),$=m();h!==t?($=Ii(),$!==t?(o=[o,l,u,h,$],e=o):(c=e,e=t)):(c=e,e=t)}else c=e,e=t;else c=e,e=t}else c=e,e=t;return e}function Ii(){var e;return e=Cc(),e===t&&(e=Xt(),e===t&&(e=Ec(),e===t&&(e=Oc(),e===t&&(e=Pc(),e===t&&(e=Tc()))))),e}function xc(){var e,o,l,u,h,$;if(e=c,i.substr(c,8)===hi?(o=hi,c+=8):(o=t,f===0&&b(rc)),o!==t){for(l=[],u=m();u!==t;)l.push(u),u=m();if(l!==t)if(i.charCodeAt(c)===58?(u=H,c++):(u=t,f===0&&b(j)),u!==t){for(h=[],$=m();$!==t;)h.push($),$=m();h!==t?($=Ae(),$!==t?(w=e,o=ic(),e=o):(c=e,e=t)):(c=e,e=t)}else c=e,e=t;else c=e,e=t}else c=e,e=t;return e}function Cc(){var e,o,l,u,h,$,P;if(e=c,o=Ri(),o!==t){for(l=[],u=m();u!==t;)l.push(u),u=m();l!==t?(u=Ae(),u!==t?(w=e,o=gi(),e=o):(c=e,e=t)):(c=e,e=t)}else c=e,e=t;if(e===t)if(e=c,o=Dc(),o!==t){for(l=[],u=m();u!==t;)l.push(u),u=m();l!==t?(u=Ae(),u!==t?(h=Hi(),h!==t?($=Ae(),$!==t?(P=Bc(),P!==t?(w=e,o=gi(),e=o):(c=e,e=t)):(c=e,e=t)):(c=e,e=t)):(c=e,e=t)):(c=e,e=t)}else c=e,e=t;return e}function Xt(){var e,o,l,u,h;for(e=c,o=[],l=dt(),l===t&&(i.charCodeAt(c)===42?(l=rt,c++):(l=t,f===0&&b(it)));l!==t;)o.push(l),l=dt(),l===t&&(i.charCodeAt(c)===42?(l=rt,c++):(l=t,f===0&&b(it)));if(o!==t)if(i.charCodeAt(c)===63?(l=bi,c++):(l=t,f===0&&b(vi)),l!==t){for(u=[],h=Xt();h!==t;)u.push(h),h=Xt();u!==t?(w=e,o=sc(),e=o):(c=e,e=t)}else c=e,e=t;else c=e,e=t;return e}function Ec(){var e,o,l,u;if(e=c,i.charCodeAt(c)===47?(o=Mt,c++):(o=t,f===0&&b(zt)),o!==t){for(l=[],yi.test(i.charAt(c))?(u=i.charAt(c),c++):(u=t,f===0&&b(mi));u!==t;)l.push(u),yi.test(i.charAt(c))?(u=i.charAt(c),c++):(u=t,f===0&&b(mi));l!==t?(i.charCodeAt(c)===47?(u=Mt,c++):(u=t,f===0&&b(zt)),u!==t?(w=e,o=oc(),e=o):(c=e,e=t)):(c=e,e=t)}else c=e,e=t;return e}function Oc(){var e,o,l,u,h;if(e=c,o=Qi(),o!==t)if(i.charCodeAt(c)===126?(l=It,c++):(l=t,f===0&&b(Qt)),l!==t){for(u=[],$e.test(i.charAt(c))?(h=i.charAt(c),c++):(h=t,f===0&&b(we));h!==t;)u.push(h),$e.test(i.charAt(c))?(h=i.charAt(c),c++):(h=t,f===0&&b(we));u!==t?(w=e,o=nc(),e=o):(c=e,e=t)}else c=e,e=t;else c=e,e=t;return e}function Pc(){var e,o,l,u,h;if(e=c,o=ut(),o!==t)if(i.charCodeAt(c)===126?(l=It,c++):(l=t,f===0&&b(Qt)),l!==t){for(u=[],$e.test(i.charAt(c))?(h=i.charAt(c),c++):(h=t,f===0&&b(we));h!==t;)u.push(h),$e.test(i.charAt(c))?(h=i.charAt(c),c++):(h=t,f===0&&b(we));u!==t?(w=e,o=cc(),e=o):(c=e,e=t)}else c=e,e=t;else c=e,e=t;return e}function Tc(){var e,o,l,u,h;if(e=c,o=Ae(),o!==t)if(i.charCodeAt(c)===94?(l=$i,c++):(l=t,f===0&&b(wi)),l!==t){for(u=[],$e.test(i.charAt(c))?(h=i.charAt(c),c++):(h=t,f===0&&b(we));h!==t;)u.push(h),$e.test(i.charAt(c))?(h=i.charAt(c),c++):(h=t,f===0&&b(we));u!==t?(w=e,o=ac(),e=o):(c=e,e=t)}else c=e,e=t;else c=e,e=t;return e}function Ae(){var e;return e=ut(),e===t&&(e=Qi()),e}function Qi(){var e,o;if(e=[],o=dt(),o!==t)for(;o!==t;)e.push(o),o=dt();else e=t;return e}function dt(){var e,o,l,u;return e=Zt(),e===t&&(e=Nc(),e===t&&(e=c,o=c,f++,l=Fi(),f--,l===t?o=void 0:(c=o,o=t),o!==t?(l=c,f++,u=Lc(),f--,u===t?l=void 0:(c=l,l=t),l!==t?(i.length>c?(u=i.charAt(c),c++):(u=t,f===0&&b(Yr)),u!==t?(o=[o,l,u],e=o):(c=e,e=t)):(c=e,e=t)):(c=e,e=t))),e}function Lc(){var e;return e=at(),e===t&&(e=lt(),e===t&&(e=Ui(),e===t&&(e=Mi(),e===t&&(e=zi(),e===t&&(e=Hi()))))),e}function Nc(){var e,o,l;return e=c,i.charCodeAt(c)===92?(o=je,c++):(o=t,f===0&&b(Re)),o!==t?(l=Fi(),l!==t?(w=e,o=lc(),e=o):(c=e,e=t)):(c=e,e=t),e}function Fi(){var e;return i.charCodeAt(c)===43?(e=ci,c++):(e=t,f===0&&b(ai)),e===t&&(i.charCodeAt(c)===45?(e=li,c++):(e=t,f===0&&b(ui)),e===t&&(i.charCodeAt(c)===61?(e=uc,c++):(e=t,f===0&&b(pc)),e===t&&(i.charCodeAt(c)===62?(e=ti,c++):(e=t,f===0&&b(ri)),e===t&&(i.charCodeAt(c)===60?(e=Jr,c++):(e=t,f===0&&b(ei)),e===t&&(i.charCodeAt(c)===33?(e=di,c++):(e=t,f===0&&b(fi)),e===t&&(i.charCodeAt(c)===40?(e=x,c++):(e=t,f===0&&b(L)),e===t&&(i.charCodeAt(c)===41?(e=et,c++):(e=t,f===0&&b(te)),e===t&&(i.charCodeAt(c)===123?(e=me,c++):(e=t,f===0&&b(Bt)),e===t&&(i.charCodeAt(c)===125?(e=jt,c++):(e=t,f===0&&b(Rt)),e===t&&(i.charCodeAt(c)===91?(e=_i,c++):(e=t,f===0&&b(Si)),e===t&&(i.charCodeAt(c)===93?(e=Ai,c++):(e=t,f===0&&b(ki)),e===t&&(i.charCodeAt(c)===94?(e=$i,c++):(e=t,f===0&&b(wi)),e===t&&(i.charCodeAt(c)===34?(e=De,c++):(e=t,f===0&&b(Be)),e===t&&(i.charCodeAt(c)===126?(e=It,c++):(e=t,f===0&&b(Qt)),e===t&&(i.charCodeAt(c)===42?(e=rt,c++):(e=t,f===0&&b(it)),e===t&&(i.charCodeAt(c)===63?(e=bi,c++):(e=t,f===0&&b(vi)),e===t&&(i.charCodeAt(c)===58?(e=H,c++):(e=t,f===0&&b(j)),e===t&&(i.charCodeAt(c)===92?(e=je,c++):(e=t,f===0&&b(Re)),e===t&&(i.charCodeAt(c)===47?(e=Mt,c++):(e=t,f===0&&b(zt))))))))))))))))))))),e}function Hi(){var e,o,l,u,h;if(e=c,o=[],l=m(),l!==t)for(;l!==t;)o.push(l),l=m();else o=t;if(o!==t)if(i.substr(c,2)===xi?(l=xi,c+=2):(l=t,f===0&&b(dc)),l!==t){if(u=[],h=m(),h!==t)for(;h!==t;)u.push(h),h=m();else u=t;u!==t?(o=[o,l,u],e=o):(c=e,e=t)}else c=e,e=t;else c=e,e=t;return e}function Dc(){var e;return i.charCodeAt(c)===91?(e=_i,c++):(e=t,f===0&&b(Si)),e===t&&(i.charCodeAt(c)===123?(e=me,c++):(e=t,f===0&&b(Bt))),e}function Bc(){var e;return i.charCodeAt(c)===93?(e=Ai,c++):(e=t,f===0&&b(ki)),e===t&&(i.charCodeAt(c)===125?(e=jt,c++):(e=t,f===0&&b(Rt))),e}const{errorOnLuceneSyntax:jc,parseCursor:Rc,cursorSymbol:Uc,allowLeadingWildcards:Mc=!0,helpers:{nodeTypes:de}}=a,W=de.function.buildNodeWithArgumentNodes,re=de.literal.buildNode,zc=de.wildcard.buildNode,Ic=de.namedArg.buildNode,{wildcardSymbol:qi}=de.wildcard;if(ot=g(),ot!==t&&c===i.length)return ot;throw ot!==t&&c<i.length&&b({type:"end",description:"end of input"}),Ei(null,Ft,q<i.length?i.charAt(q):null,q<i.length?nt(q,q+1):nt(q,q))}return{SyntaxError:r,parse:s}}(),Et=(n,r={},s=Ge)=>{if(typeof n>"u")throw new Error("expression must be a string, got undefined instead");return s(n,{...r,helpers:{nodeTypes:V}})},ye=(n,r={})=>Et(n,{...r,startRule:"Literal"},Ge),Je=(n,r={})=>{try{return Et(n,r,Ge)}catch(s){throw s.name==="SyntaxError"?new Cr(s,n):s}},Fs=n=>{try{return Et(n,{errorOnLuceneSyntax:!0},Ge),!1}catch(r){return r.message.startsWith("Lucene")}},D=(n,r,s,i)=>(r=void 0,!n||!n.type||!V[n.type]?D(V.function.buildNode("and",[]),r):V[n.type].toOpenSearchQuery(n,r,s,i)),Y="@kuery-wildcard@";function Hs(n){return n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function qs(n){return n.replace(/[+-=&|><!(){}[\]^"~*?:\\/]/g,"\\$&")}function Ws(n){return n.includes(Y)?{type:"wildcard",value:n}:ye(n)}function Er(n,r){const{value:s}=n,i=s.split(Y).map(Hs).join("[\\s\\S]*");return new RegExp(`^${i}$`).test(r)}function Ys(n){const{value:r}=n;return r.split(Y).join("*")}function Ot(n){const{value:r}=n;return r.split(Y).map(qs).join("*")}function Vs(n){const{value:r}=n;return r.startsWith(Y)&&r.replace(Y,"").length>0}const Ks=Object.freeze(Object.defineProperty({__proto__:null,buildNode:Ws,hasLeadingWildcard:Vs,test:Er,toOpenSearchQuery:Ys,toQueryStringQuery:Ot,wildcardSymbol:Y},Symbol.toStringTag,{value:"Module"}));function Pt(n,r){if(!r)return[];if(n.type==="literal"){const s=Ct(n),i=r.fields.find(a=>a.name===s);return i?[i]:[]}else if(n.type==="wildcard")return r.fields.filter(i=>Er(n,i.name))}function Hc(n){return n}function Or(n,r,s){const i={...n,value:s?`${s}.${n.value}`:n.value};if(!r||i.type==="wildcard"&&!s)return i;const t=Pt(i,r).reduce((p,g)=>{const v=g.subType&&g.subType.nested?g.subType.nested.path:void 0;return s&&!v?[...p,`${g.name} is not a nested field but is in nested group "${s}" in the DQL expression.`]:v&&!s?[...p,`${g.name} is a nested field, but is not in a nested group in the DQL expression.`]:v!==s?[...p,`Nested field ${g.name} is being queried with the incorrect nested path. The correct path is ${g.subType.nested.path}.`]:p},[]);if(t.length>0)throw new Error(t.join(`
636
- `));return i}function Zs(n,r,s=!1){if(n===void 0)throw new Error("fieldName is a required argument");if(r===void 0)throw new Error("value is a required argument");const i=typeof n=="string"?ye(n):ve(n),a=typeof r=="string"?ye(r):ve(r),t=ve(s);return{arguments:[i,a,t]}}function Xs(n,r,s={},i={}){const{arguments:[a,t,p]}=n,g=Or(a,r,i!=null&&i.nested?i.nested.path:void 0),v=D(g),_=t!==void 0?D(t):t,A=p.value?"phrase":"best_fields";if(g.value===null)return t.type==="wildcard"?{query_string:{query:Ot(t)}}:{multi_match:{type:A,query:_,lenient:!0}};const S=r?Pt(g,r):[];S&&S.length===0&&S.push({name:D(g),scripted:!1,type:""});const E=t.type==="wildcard"&&_==="*",x=g.type==="wildcard"&&v==="*"||S&&r&&S.length===r.fields.length;return E&&x?{match_all:{}}:{bool:{should:S.reduce((te,F)=>{const H=j=>{var me;return g.type!=="wildcard"||!((me=F.subType)!=null&&me.nested)||i!=null&&i.nested?j:{nested:{path:F.subType.nested.path,query:j,score_mode:"none"}}};if(F.scripted)return[];if(E)return[...te,H({exists:{field:F.name}})];if(t.type==="wildcard")return[...te,H({query_string:{fields:[F.name],query:Ot(t)}})];if(F.type==="date"){const j=s.dateFormatTZ?{time_zone:s.dateFormatTZ}:{};return[...te,H({range:{[F.name]:{gte:_,lte:_,...j}}})]}else{const j=A==="phrase"?"match_phrase":"match";return[...te,H({[j]:{[F.name]:_}})]}},[])||[],minimum_should_match:1}}}const Gs=Object.freeze(Object.defineProperty({__proto__:null,buildNodeParams:Zs,toOpenSearchQuery:Xs},Symbol.toStringTag,{value:"Module"}));function Js(n){return{arguments:n}}function eo(n,r,s={},i={}){return{bool:{filter:(n.arguments||[]).map(t=>D(t,r,s,i))}}}const to=Object.freeze(Object.defineProperty({__proto__:null,buildNodeParams:Js,toOpenSearchQuery:eo},Symbol.toStringTag,{value:"Module"}));function ro(n){return{arguments:n}}function io(n,r,s={},i={}){return{bool:{should:(n.arguments||[]).map(t=>D(t,r,s,i)),minimum_should_match:1}}}const so=Object.freeze(Object.defineProperty({__proto__:null,buildNodeParams:ro,toOpenSearchQuery:io},Symbol.toStringTag,{value:"Module"}));function oo(n){return{arguments:[n]}}function no(n,r,s={},i={}){const[a]=n.arguments;return{bool:{must_not:D(a,r,s,i)}}}const co=Object.freeze(Object.defineProperty({__proto__:null,buildNodeParams:oo,toOpenSearchQuery:no},Symbol.toStringTag,{value:"Module"}));function ao(n,...r){let s={};for(let i of r)s[i]=n[i];return s}function lo(n,r){const s=ao(r,"gt","lt","gte","lte","format"),i=typeof n=="string"?ye(n):V.literal.buildNode(n),a=Object.entries(s).map(t=>{let[p,g]=t;return V.namedArg.buildNode(p,g)});return{arguments:[i,...a]}}function uo(n,r,s={},i={}){const[a,...t]=n.arguments,p=Or(a,r,i!=null&&i.nested?i.nested.path:void 0),g=r?Pt(p,r):[],v=po(t),_=Object.fromEntries(Object.entries(v).map(([S,E])=>[S,D(E)]));return g&&g.length===0&&g.push({name:D(p),scripted:!1,type:""}),{bool:{should:g.map(S=>{const E=x=>{var L;return p.type!=="wildcard"||!((L=S.subType)!=null&&L.nested)||i.nested?x:{nested:{path:S.subType.nested.path,query:x,score_mode:"none"}}};if(S.scripted)return{};if(S.type==="date"){const x=s.dateFormatTZ?{time_zone:s.dateFormatTZ}:{};return E({range:{[S.name]:{..._,...x}}})}return E({range:{[S.name]:_}})}),minimum_should_match:1}}}function po(n){if(n.gt&&n.gte||n.lt&&n.lte)throw new Error("range ends cannot be both inclusive and exclusive");const r=["gte","lte","format"];return n.reduce((s,i,a)=>(i.type==="namedArg"?s[i.name]=i.value:s[r[a]]=i,s),{})}const fo=Object.freeze(Object.defineProperty({__proto__:null,buildNodeParams:lo,toOpenSearchQuery:uo},Symbol.toStringTag,{value:"Module"}));function ho(n){return{arguments:[ve(n)]}}function go(n,r,s={},i={}){const{arguments:[a]}=n,t={...a,value:i!=null&&i.nested?`${i.nested.path}.${a.value}`:a.value},p=Ct(t),g=((r==null?void 0:r.fields)||[]).find(v=>v.name===p);if(g&&g.scripted)throw new Error("Exists query does not support scripted fields");return{exists:{field:p}}}const bo=Object.freeze(Object.defineProperty({__proto__:null,buildNodeParams:ho,toOpenSearchQuery:go},Symbol.toStringTag,{value:"Module"}));function vo(n,r){return{arguments:[typeof n=="string"?ye(n):ve(n),r]}}function yo(n,r,s={},i={}){var v;const[a,t]=n.arguments,p=D(a),g=(v=i==null?void 0:i.nested)!=null&&v.path?`${i.nested.path}.${p}`:p;return{nested:{path:g,query:D(t,r,s,{...i,nested:{path:g}}),score_mode:"none"}}}const Tt={is:Gs,and:to,or:so,not:co,range:fo,exists:bo,nested:Object.freeze(Object.defineProperty({__proto__:null,buildNodeParams:vo,toOpenSearchQuery:yo},Symbol.toStringTag,{value:"Module"}))};function mo(n,...r){const s=Tt[n];if(s===void 0)throw new Error(`Unknown function "${n}"`);return{type:"function",function:n,...s.buildNodeParams(...r)}}function $o(n,r){if(Tt[n]===void 0)throw new Error(`Unknown function "${n}"`);return{type:"function",function:n,arguments:r}}function wo(n,r,s,i){return Tt[n.function].toOpenSearchQuery(n,r,s,i)}const _o=Object.freeze(Object.defineProperty({__proto__:null,buildNode:mo,buildNodeWithArgumentNodes:$o,toOpenSearchQuery:wo},Symbol.toStringTag,{value:"Module"}));function So(n,r){const s=r.type==="literal"?r:V.literal.buildNode(r);return{type:"namedArg",name:n,value:s}}function Ao(n){return D(n.value)}const V={function:_o,literal:Qs,namedArg:Object.freeze(Object.defineProperty({__proto__:null,buildNode:So,toOpenSearchQuery:Ao},Symbol.toStringTag,{value:"Module"})),wildcard:Ks},ko=Y,xo=(n,r)=>"("+(n.arguments||[]).map(i=>pe(i,r)).join(" AND ")+")",Co=(n,r)=>{var{arguments:[s,i,a]}=n;let t="=";i.type==="wildcard"&&(t="");let p=pe(i);a=a.value||typeof p=="string",i.type==="literal"&&a&&(p=`'${p}'`),i.type==="literal"&&!a&&(p=`${p}`);let g=pe(s);return g==null?r&&a?`(${r.filter(v=>v.type==="string").map(v=>`${v.name} ILIKE '%${i.value}%'`).join(" OR ")})`:r&&!a&&(i.value===!0||i.value===!1)?`(${r.filter(v=>v.type==="boolean").map(v=>`${v.name}=${i.value}`).join(" OR ")})`:"":g+t+p},Eo=(n,r)=>"("+(n.arguments||[]).map(i=>pe(i,r)).join(" OR ")+")",Oo=(n,r)=>{const[s]=n.arguments;return"NOT ("+pe(s,r)+")"},Po={gt:">",lt:"<",gte:">=",lte:"<="},To={is:Co,and:xo,or:Eo,not:Oo,range:n=>{const[r,s]=n.arguments;let i=s.value;const a=Po[s.name];let t=pe(i);return i.type==="literal"&&(t=`${t}`),`${r.value} ${a} ${t}`},exists:n=>{const[r]=n.arguments;return`${r.value} IS NOT NULL`},nested:n=>(console.warn("Nested types dont exist in CQL",n),"")},Lo={function:(n,r)=>To[n.function](n,r),literal:n=>n.value,wildcard:n=>{const{value:r}=n;return` LIKE '${r.split(ko).join("%")}'`}},pe=(n,r)=>{const s=Lo[n.type];return s(n,r)},No=Y,Do=n=>({$and:(n.arguments||[]).map(i=>J(i))}),Bo=n=>{const{arguments:[r,s]}=n;let i=J(s);if(s.type==="wildcard"&&s.value==="@kuery-wildcard@")return Pr(n);let t={};return t[J(r)]={$eq:i},t},jo=n=>({$or:(n.arguments||[]).map(s=>J(s))}),Ro=n=>{const[r]=n.arguments;let s={};return s={$ne:J(r)},s},Uo={gt:"$gt",lt:"$lt",gte:"$gte",lte:"$lte"},Mo=n=>{const[r,s]=n.arguments;let i=s.value;const a=Uo[s.name];let t=J(i),p={};return p[r.value]={},p[r.value][a]=t,p},Pr=n=>{const[r]=n.arguments;return{[J(r)]:{$ne:null}}},zo={is:Bo,and:Do,or:jo,not:Ro,range:Mo,exists:Pr,nested:n=>(console.warn("TODO Implement nested search",n),"")},Io={function:n=>zo[n.function](n),literal:n=>n.value,wildcard:n=>{const{value:r}=n;return`/${r.split(No).join(".*")}/`}},J=(n,r)=>{const s=Io[n.type];return s(n,r)},Qo=Object.freeze(Object.defineProperty({__proto__:null,DQLSyntaxError:Cr,doesKueryExpressionHaveLuceneSyntaxError:Fs,fromKueryExpression:Je,fromLiteralExpression:ye,nodeTypes:V,parse:Je,toCql:pe,toDSL:D,toMongo:J,toOpenSearchQuery:D},Symbol.toStringTag,{value:"Module"})),Fo=z`
716
+ `;case"hidden":return A`<input type="hidden"></input>`;case"checkbox":return A`
717
+ <div class="checkbox">
718
+ <spectric-button @click=${()=>{this.checked=!this.checked,this.value=!!this.checked,console.log(this.checked,this.value),this.dispatchEvent(new Event("change",{bubbles:!0}))}} icon size=${this.size||"xxsmall"} variant=${this.checked?"primary":"secondary"}>${this.checked?"":" "}</spectric-button>
719
+ ${this.invalid||this.helperText?A`<spectric-tooltip text=${this.invalid||this.helperText}></spectric-tooltip>`:null}
720
+ ${this.label}
721
+ </div>
722
+ </label>
723
+ `}return`Not yet implemented ${this.variant}`}},T([v({type:Boolean,reflect:!0})],d.SpectricInput.prototype,"checked",2),T([v({type:String,reflect:!0})],d.SpectricInput.prototype,"placeholder",2),T([v({type:Boolean,reflect:!0})],d.SpectricInput.prototype,"readonly",2),T([v({type:String,reflect:!0})],d.SpectricInput.prototype,"variant",2),T([v({type:Boolean,reflect:!0})],d.SpectricInput.prototype,"disabled",2),T([v({type:String,reflect:!0})],d.SpectricInput.prototype,"label",2),T([v()],d.SpectricInput.prototype,"hidePasswordLabel",2),T([v()],d.SpectricInput.prototype,"showPasswordLabel",2),T([v({type:Boolean,reflect:!0})],d.SpectricInput.prototype,"showPasswordVisibilityToggle",2),T([v({type:String,reflect:!0})],d.SpectricInput.prototype,"helperText",2),T([v({type:Boolean,reflect:!0})],d.SpectricInput.prototype,"invalid",2),T([v({type:Boolean,reflect:!0})],d.SpectricInput.prototype,"required",2),T([v({type:String,reflect:!0})],d.SpectricInput.prototype,"invalidText",2),T([v()],d.SpectricInput.prototype,"name",2),T([v()],d.SpectricInput.prototype,"pattern",2),T([v({type:Number,reflect:!0})],d.SpectricInput.prototype,"maxCount",2),T([v({reflect:!0})],d.SpectricInput.prototype,"autocomplete",2),T([v({reflect:!0})],d.SpectricInput.prototype,"value",1),T([be("input")],d.SpectricInput.prototype,"_input",2),d.SpectricInput=T([L("spectric-input")],d.SpectricInput);const me=o=>Lt(o===""?void 0:o??void 0),Js="end of input",eo={fieldName:"field name",value:"value",literal:"literal",whitespace:"whitespace"};class jr extends Error{constructor(r,s){let i=r.message;if(r.expected){const u=r.expected.map(m=>eo[m.description]||m.description).join(", ");let g=r.found?`"${r.found}"`:Js;i=`Expected ${u} but ${g} found.`}const a=[i,s,"-".repeat(r.location.start.offset)+"^"].join(`
724
+ `);super(a),this.name="DQLSyntaxError",this.shortMessage=i}}function ye(o){return{type:"literal",value:o}}function Nt(o){return o.value}const to=Object.freeze(Object.defineProperty({__proto__:null,buildNode:ye,toOpenSearchQuery:Nt},Symbol.toStringTag,{value:"Module"})),{SyntaxError:vc,parse:it}=function(){function o(i,a){function e(){this.constructor=i}e.prototype=a.prototype,i.prototype=new e}function r(i,a,e,u){this.message=i,this.expected=a,this.found=e,this.location=u,this.name="SyntaxError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,r)}o(r,Error);function s(i){var a=arguments.length>1?arguments[1]:{},e={},u={start:Fi,Literal:sr},g=Fi,m=function(t,n){return n.type==="cursor"?{...n,suggestionTypes:["conjunction"]}:t!==null?t:he.function.buildNode("is","*","*")},w=function(){return pc},x=function(t,n){const l=[t,n].find(p=>p.type==="cursor");return l||V("or",[t,n])},S=function(t,n){const l=[t,n].find(p=>p.type==="cursor");return l||V("and",[t,n])},C=function(t){return t.type==="cursor"?t:V("not",[t])},k="(",N={type:"literal",value:"(",description:'"("'},at=")",ie={type:"literal",value:")",description:'")"'},H=function(t,n){return n.type==="cursor"?{...n,suggestionTypes:["conjunction"]}:t},q=":",B={type:"literal",value:":",description:'":"'},Se="{",Ht={type:"literal",value:"{",description:'"{"'},qt="}",Wt={type:"literal",value:"}",description:'"}"'},Bn=function(t,n,l){return n.type==="cursor"?{...n,nestedPath:n.nestedPath?`${t.value}.${n.nestedPath}`:t.value}:l.type==="cursor"?{...l,suggestionTypes:["conjunction"]}:V("nested",[t,n])},Rn={type:"other",description:"fieldName"},Mn=function(t,n,l){if(l.type==="cursor")return{...l,suggestionTypes:["conjunction"]};const p=gc(n,l);return V("range",[t,p])},Un=function(t,n){return n.type==="cursor"?{...n,fieldName:t.value,suggestionTypes:["value","conjunction"]}:n(t)},In=function(t){if(t.type==="cursor"){const l=`${t.prefix}${t.suffix}`.trim();return{...t,fieldName:l,suggestionTypes:["field","operator","conjunction"]}}const n=se(null);return t(n)},Fn=function(t,n){return n.type==="cursor"?{...n,suggestionTypes:["conjunction"]}:t},Qn=function(t,n){const l=[t,n].find(p=>p.type==="cursor");return l?{...l,suggestionTypes:["value"]}:p=>V("or",[t(p),n(p)])},Hn=function(t,n){const l=[t,n].find(p=>p.type==="cursor");return l?{...l,suggestionTypes:["value"]}:p=>V("and",[t(p),n(p)])},qn=function(t){return t.type==="cursor"?{...list,suggestionTypes:["value"]}:n=>V("not",[t(n)])},Wn={type:"other",description:"value"},Vn=function(t){if(t.type==="cursor")return t;const n=se(!0);return l=>V("is",[l,t,n])},Yn=function(t){if(t.type==="cursor")return t;!hc&&t.type==="wildcard"&&he.wildcard.hasLeadingWildcard(t)&&M("Leading wildcards are disabled. See query:allowLeadingWildcards in Advanced Settings.");const n=se(!1);return l=>V("is",[l,t,n])},Kn={type:"other",description:"OR"},ei="or",ti={type:"literal",value:"or",description:'"or"'},Zn={type:"other",description:"AND"},ri="and",ii={type:"literal",value:"and",description:'"and"'},Xn={type:"other",description:"NOT"},si="not",oi={type:"literal",value:"not",description:'"not"'},Gn={type:"other",description:"literal"},Me='"',Ue={type:"literal",value:'"',description:'"\\""'},Vt=function(t,n,l){const{start:p,end:f}=Fa();return{type:"cursor",start:p.offset,end:f.offset-n.length,prefix:t.join(""),suffix:l.join(""),text:Ia().replace(n,"")}},Jn=function(t){return se(t.join(""))},Ie="\\",Fe={type:"literal",value:"\\",description:'"\\\\"'},ea=/^[\\"]/,ta={type:"class",value:'[\\\\"]',description:'[\\\\"]'},ct=function(t){return t},ra=/^[^"]/,ia={type:"class",value:'[^"]',description:'[^"]'},sa=function(t){const n=t.join("").trim();return n==="null"?se(null):n==="true"?se(!0):n==="false"?se(!1):t.includes(ss)?fc(n):se(/^(-?[1-9]+\d*([.]\d+)?)$|^(-?0[.]\d*[1-9]+)$|^0$|^0.0$|^[.]\d{1,}$/.test(n)?isFinite(n)&&(n>Number.MAX_SAFE_INTEGER||n<Number.MIN_SAFE_INTEGER)?BigInt(n):Number(n):n)},ni={type:"any",description:"any character"},lt="*",pt={type:"literal",value:"*",description:'"*"'},oa=function(){return ss},ai="\\t",na={type:"literal",value:"\\t",description:'"\\\\t"'},aa=function(){return" "},ci="\\r",ca={type:"literal",value:"\\r",description:'"\\\\r"'},la=function(){return"\r"},li="\\n",pa={type:"literal",value:"\\n",description:'"\\\\n"'},ua=function(){return`
725
+ `},da=function(t){return t},ha=/^[\\():<>"*{}]/,fa={type:"class",value:'[\\\\():<>"*{}]',description:'[\\\\():<>"*{}]'},pi="<=",ga={type:"literal",value:"<=",description:'"<="'},ba=function(){return"lte"},ui=">=",va={type:"literal",value:">=",description:'">="'},ma=function(){return"gte"},di="<",hi={type:"literal",value:"<",description:'"<"'},ya=function(){return"lt"},fi=">",gi={type:"literal",value:">",description:'">"'},$a=function(){return"gt"},_a={type:"other",description:"whitespace"},wa=/^[ \t\r\n]/,Sa={type:"class",value:"[\\ \\t\\r\\n]",description:"[\\ \\t\\r\\n]"},Aa=function(){return uc},bi="@kuery-cursor@",xa={type:"literal",value:"@kuery-cursor@",description:'"@kuery-cursor@"'},ka=function(){return dc},vi="||",Ea={type:"literal",value:"||",description:'"||"'},Ca=function(){M("LuceneOr")},mi="&&",Pa={type:"literal",value:"&&",description:'"&&"'},yi=function(){M("LuceneAnd")},$i="+",_i={type:"literal",value:"+",description:'"+"'},wi="-",Si={type:"literal",value:"-",description:'"-"'},Ai=function(){M("LuceneNot")},xi="!",ki={type:"literal",value:"!",description:'"!"'},Ei="_exists_",Ta={type:"literal",value:"_exists_",description:'"_exists_"'},Oa=function(){M("LuceneExists")},Ci=function(){M("LuceneRange")},Pi="?",Ti={type:"literal",value:"?",description:'"?"'},La=function(){M("LuceneWildcard")},Yt="/",Kt={type:"literal",value:"/",description:'"/"'},Oi=/^[^\/]/,Li={type:"class",value:"[^/]",description:"[^/]"},Da=function(){M("LuceneRegex")},Zt="~",Xt={type:"literal",value:"~",description:'"~"'},Ae=/^[0-9]/,xe={type:"class",value:"[0-9]",description:"[0-9]"},Na=function(){M("LuceneFuzzy")},ja=function(){M("LuceneProximity")},Di="^",Ni={type:"literal",value:"^",description:'"^"'},za=function(){M("LuceneBoost")},Ba=function(){return char},Ra="=",Ma={type:"literal",value:"=",description:'"="'},ji="[",zi={type:"literal",value:"[",description:'"["'},Bi="]",Ri={type:"literal",value:"]",description:'"]"'},Mi="TO",Ua={type:"literal",value:"TO",description:'"TO"'},c=0,_=0,ut=[{line:1,column:1,seenCR:!1}],W=0,Gt=[],h=0,dt;if("startRule"in a){if(!(a.startRule in u))throw new Error(`Can't start parsing from rule "`+a.startRule+'".');g=u[a.startRule]}function Ia(){return i.substring(_,c)}function Fa(){return ht(_,c)}function M(t){throw Ii(t,null,i.substring(_,c),ht(_,c))}function Ui(t){var n=ut[t],l,p;if(n)return n;for(l=t-1;!ut[l];)l--;for(n=ut[l],n={line:n.line,column:n.column,seenCR:n.seenCR};l<t;)p=i.charAt(l),p===`
726
+ `?(n.seenCR||n.line++,n.column=1,n.seenCR=!1):p==="\r"||p==="\u2028"||p==="\u2029"?(n.line++,n.column=1,n.seenCR=!0):(n.column++,n.seenCR=!1),l++;return ut[t]=n,n}function ht(t,n){var l=Ui(t),p=Ui(n);return{start:{offset:t,line:l.line,column:l.column},end:{offset:n,line:p.line,column:p.column}}}function b(t){c<W||(c>W&&(W=c,Gt=[]),Gt.push(t))}function Ii(t,n,l,p){function f(O){var D=1;for(O.sort(function(oe,U){return oe.description<U.description?-1:oe.description>U.description?1:0});D<O.length;)O[D-1]===O[D]?O.splice(D,1):D++}function $(O,D){function oe(bc){function $t(Z){return Z.charCodeAt(0).toString(16).toUpperCase()}return bc.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\x08/g,"\\b").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\f/g,"\\f").replace(/\r/g,"\\r").replace(/[\x00-\x07\x0B\x0E\x0F]/g,function(Z){return"\\x0"+$t(Z)}).replace(/[\x10-\x1F\x80-\xFF]/g,function(Z){return"\\x"+$t(Z)}).replace(/[\u0100-\u0FFF]/g,function(Z){return"\\u0"+$t(Z)}).replace(/[\u1000-\uFFFF]/g,function(Z){return"\\u"+$t(Z)})}var U=new Array(O.length),os,ns,He;for(He=0;He<O.length;He++)U[He]=O[He].description;return os=O.length>1?U.slice(0,-1).join(", ")+" or "+U[O.length-1]:U[0],ns=D?'"'+oe(D)+'"':"end of input","Expected "+os+" but "+ns+" found."}return n!==null&&f(n),new r(t!==null?t:$(n,l),n,l,p)}function Fi(){var t,n,l,p;for(t=c,n=[],l=y();l!==e;)n.push(l),l=y();return n!==e?(l=ft(),l===e&&(l=null),l!==e?(p=mt(),p!==e?(_=t,n=m(l,p),t=n):(c=t,t=e)):(c=t,t=e)):(c=t,t=e),t}function ft(){var t,n,l,p;return t=c,_=c,n=w(),n?n=void 0:n=e,n!==e?(l=Ga(),l!==e?(n=[n,l],t=n):(c=t,t=e)):(c=t,t=e),t===e&&(t=c,n=Jt(),n!==e?(l=gt(),l!==e?(p=ft(),p!==e?(_=t,n=x(n,p),t=n):(c=t,t=e)):(c=t,t=e)):(c=t,t=e),t===e&&(t=Jt())),t}function Jt(){var t,n,l,p;return t=c,n=Qi(),n!==e?(l=bt(),l!==e?(p=Jt(),p!==e?(_=t,n=S(n,p),t=n):(c=t,t=e)):(c=t,t=e)):(c=t,t=e),t===e&&(t=Qi()),t}function Qi(){var t,n,l;return t=c,n=ir(),n!==e?(l=Hi(),l!==e?(_=t,n=C(l),t=n):(c=t,t=e)):(c=t,t=e),t===e&&(t=Hi()),t}function Hi(){var t,n,l,p,f,$;if(t=c,i.charCodeAt(c)===40?(n=k,c++):(n=e,h===0&&b(N)),n!==e){for(l=[],p=y();p!==e;)l.push(p),p=y();l!==e?(p=ft(),p!==e?(f=mt(),f!==e?(i.charCodeAt(c)===41?($=at,c++):($=e,h===0&&b(ie)),$!==e?(_=t,n=H(p,f),t=n):(c=t,t=e)):(c=t,t=e)):(c=t,t=e)):(c=t,t=e)}else c=t,t=e;return t===e&&(t=Qa()),t}function Qa(){var t,n,l,p,f,$,O,D,oe,U;if(t=c,n=er(),n!==e){for(l=[],p=y();p!==e;)l.push(p),p=y();if(l!==e)if(i.charCodeAt(c)===58?(p=q,c++):(p=e,h===0&&b(B)),p!==e){for(f=[],$=y();$!==e;)f.push($),$=y();if(f!==e)if(i.charCodeAt(c)===123?($=Se,c++):($=e,h===0&&b(Ht)),$!==e){for(O=[],D=y();D!==e;)O.push(D),D=y();O!==e?(D=ft(),D!==e?(oe=mt(),oe!==e?(i.charCodeAt(c)===125?(U=qt,c++):(U=e,h===0&&b(Wt)),U!==e?(_=t,n=Bn(n,D,oe),t=n):(c=t,t=e)):(c=t,t=e)):(c=t,t=e)):(c=t,t=e)}else c=t,t=e;else c=t,t=e}else c=t,t=e;else c=t,t=e}else c=t,t=e;return t===e&&(t=Ha()),t}function Ha(){var t;return t=qa(),t===e&&(t=Wa(),t===e&&(t=Va())),t}function er(){var t;return h++,t=sr(),h--,t===e&&h===0&&b(Rn),t}function qa(){var t,n,l,p,f,$;if(t=c,n=er(),n!==e){for(l=[],p=y();p!==e;)l.push(p),p=y();if(l!==e)if(p=Zi(),p!==e){for(f=[],$=y();$!==e;)f.push($),$=y();f!==e?($=sr(),$!==e?(_=t,n=Mn(n,p,$),t=n):(c=t,t=e)):(c=t,t=e)}else c=t,t=e;else c=t,t=e}else c=t,t=e;return t}function Wa(){var t,n,l,p,f,$;if(t=c,n=er(),n!==e){for(l=[],p=y();p!==e;)l.push(p),p=y();if(l!==e)if(i.charCodeAt(c)===58?(p=q,c++):(p=e,h===0&&b(B)),p!==e){for(f=[],$=y();$!==e;)f.push($),$=y();f!==e?($=tr(),$!==e?(_=t,n=Un(n,$),t=n):(c=t,t=e)):(c=t,t=e)}else c=t,t=e;else c=t,t=e}else c=t,t=e;return t}function Va(){var t,n;return t=c,n=Vi(),n!==e&&(_=t,n=In(n)),t=n,t}function tr(){var t,n,l,p,f,$;if(t=c,i.charCodeAt(c)===40?(n=k,c++):(n=e,h===0&&b(N)),n!==e){for(l=[],p=y();p!==e;)l.push(p),p=y();l!==e?(p=qi(),p!==e?(f=mt(),f!==e?(i.charCodeAt(c)===41?($=at,c++):($=e,h===0&&b(ie)),$!==e?(_=t,n=Fn(p,f),t=n):(c=t,t=e)):(c=t,t=e)):(c=t,t=e)):(c=t,t=e)}else c=t,t=e;return t===e&&(t=Vi()),t}function qi(){var t,n,l,p;return t=c,n=rr(),n!==e?(l=gt(),l!==e?(p=qi(),p!==e?(_=t,n=Qn(n,p),t=n):(c=t,t=e)):(c=t,t=e)):(c=t,t=e),t===e&&(t=rr()),t}function rr(){var t,n,l,p;return t=c,n=Wi(),n!==e?(l=bt(),l!==e?(p=rr(),p!==e?(_=t,n=Hn(n,p),t=n):(c=t,t=e)):(c=t,t=e)):(c=t,t=e),t===e&&(t=Wi()),t}function Wi(){var t,n,l;return t=c,n=ir(),n!==e?(l=tr(),l!==e?(_=t,n=qn(l),t=n):(c=t,t=e)):(c=t,t=e),t===e&&(t=tr()),t}function Vi(){var t,n;return h++,t=c,n=vt(),n!==e&&(_=t,n=Vn(n)),t=n,t===e&&(t=c,n=Yi(),n!==e&&(_=t,n=Yn(n)),t=n),h--,t===e&&(n=e,h===0&&b(Wn)),t}function gt(){var t,n,l,p,f;if(h++,t=c,n=[],l=y(),l!==e)for(;l!==e;)n.push(l),l=y();else n=e;if(n!==e)if(i.substr(c,2).toLowerCase()===ei?(l=i.substr(c,2),c+=2):(l=e,h===0&&b(ti)),l!==e){if(p=[],f=y(),f!==e)for(;f!==e;)p.push(f),f=y();else p=e;p!==e?(n=[n,l,p],t=n):(c=t,t=e)}else c=t,t=e;else c=t,t=e;return t===e&&(t=c,_=c,n=w(),n?n=void 0:n=e,n!==e?(l=Xi(),l!==e?(n=[n,l],t=n):(c=t,t=e)):(c=t,t=e)),h--,t===e&&(n=e,h===0&&b(Kn)),t}function bt(){var t,n,l,p,f;if(h++,t=c,n=[],l=y(),l!==e)for(;l!==e;)n.push(l),l=y();else n=e;if(n!==e)if(i.substr(c,3).toLowerCase()===ri?(l=i.substr(c,3),c+=3):(l=e,h===0&&b(ii)),l!==e){if(p=[],f=y(),f!==e)for(;f!==e;)p.push(f),f=y();else p=e;p!==e?(n=[n,l,p],t=n):(c=t,t=e)}else c=t,t=e;else c=t,t=e;return t===e&&(t=c,_=c,n=w(),n?n=void 0:n=e,n!==e?(l=Gi(),l!==e?(n=[n,l],t=n):(c=t,t=e)):(c=t,t=e)),h--,t===e&&(n=e,h===0&&b(Zn)),t}function ir(){var t,n,l,p;if(h++,t=c,i.substr(c,3).toLowerCase()===si?(n=i.substr(c,3),c+=3):(n=e,h===0&&b(oi)),n!==e){if(l=[],p=y(),p!==e)for(;p!==e;)l.push(p),p=y();else l=e;l!==e?(n=[n,l],t=n):(c=t,t=e)}else c=t,t=e;return t===e&&(t=c,_=c,n=w(),n?n=void 0:n=e,n!==e?(l=Ji(),l!==e?(n=[n,l],t=n):(c=t,t=e)):(c=t,t=e)),h--,t===e&&(n=e,h===0&&b(Xn)),t}function sr(){var t;return h++,t=vt(),t===e&&(t=Yi()),h--,t===e&&h===0&&b(Gn),t}function vt(){var t,n,l,p,f,$;if(t=c,i.charCodeAt(c)===34?(n=Me,c++):(n=e,h===0&&b(Ue)),n!==e){for(l=[],p=ke();p!==e;)l.push(p),p=ke();if(l!==e)if(p=Qe(),p!==e){for(f=[],$=ke();$!==e;)f.push($),$=ke();f!==e?(i.charCodeAt(c)===34?($=Me,c++):($=e,h===0&&b(Ue)),$!==e?(_=t,n=Vt(l,p,f),t=n):(c=t,t=e)):(c=t,t=e)}else c=t,t=e;else c=t,t=e}else c=t,t=e;if(t===e)if(t=c,i.charCodeAt(c)===34?(n=Me,c++):(n=e,h===0&&b(Ue)),n!==e){for(l=[],p=ke();p!==e;)l.push(p),p=ke();l!==e?(i.charCodeAt(c)===34?(p=Me,c++):(p=e,h===0&&b(Ue)),p!==e?(_=t,n=Jn(l),t=n):(c=t,t=e)):(c=t,t=e)}else c=t,t=e;return t}function ke(){var t,n,l;return t=or(),t===e&&(t=c,i.charCodeAt(c)===92?(n=Ie,c++):(n=e,h===0&&b(Fe)),n!==e?(ea.test(i.charAt(c))?(l=i.charAt(c),c++):(l=e,h===0&&b(ta)),l!==e?(_=t,n=ct(l),t=n):(c=t,t=e)):(c=t,t=e),t===e&&(t=c,n=c,h++,l=Qe(),h--,l===e?n=void 0:(c=n,n=e),n!==e?(ra.test(i.charAt(c))?(l=i.charAt(c),c++):(l=e,h===0&&b(ia)),l!==e?(_=t,n=ct(l),t=n):(c=t,t=e)):(c=t,t=e))),t}function Yi(){var t,n,l,p,f;for(t=c,n=[],l=Ee();l!==e;)n.push(l),l=Ee();if(n!==e)if(l=Qe(),l!==e){for(p=[],f=Ee();f!==e;)p.push(f),f=Ee();p!==e?(_=t,n=Vt(n,l,p),t=n):(c=t,t=e)}else c=t,t=e;else c=t,t=e;if(t===e){if(t=c,n=[],l=Ee(),l!==e)for(;l!==e;)n.push(l),l=Ee();else n=e;n!==e&&(_=t,n=sa(n)),t=n}return t}function Ee(){var t,n,l,p,f;return t=or(),t===e&&(t=Ka(),t===e&&(t=Za(),t===e&&(t=Ya(),t===e&&(t=c,n=c,h++,l=Ki(),h--,l===e?n=void 0:(c=n,n=e),n!==e?(l=c,h++,p=Xa(),h--,p===e?l=void 0:(c=l,l=e),l!==e?(p=c,h++,f=Qe(),h--,f===e?p=void 0:(c=p,p=e),p!==e?(i.length>c?(f=i.charAt(c),c++):(f=e,h===0&&b(ni)),f!==e?(_=t,n=ct(f),t=n):(c=t,t=e)):(c=t,t=e)):(c=t,t=e)):(c=t,t=e))))),t}function Ya(){var t,n;return t=c,i.charCodeAt(c)===42?(n=lt,c++):(n=e,h===0&&b(pt)),n!==e&&(_=t,n=oa()),t=n,t}function mt(){var t,n,l,p,f;for(t=c,n=[],l=y();l!==e;)n.push(l),l=y();if(n!==e)if(l=Qe(),l!==e){for(p=[],f=y();f!==e;)p.push(f),f=y();p!==e?(_=t,n=Vt(n,l,p),t=n):(c=t,t=e)}else c=t,t=e;else c=t,t=e;if(t===e)for(t=[],n=y();n!==e;)t.push(n),n=y();return t}function or(){var t,n;return t=c,i.substr(c,2)===ai?(n=ai,c+=2):(n=e,h===0&&b(na)),n!==e&&(_=t,n=aa()),t=n,t===e&&(t=c,i.substr(c,2)===ci?(n=ci,c+=2):(n=e,h===0&&b(ca)),n!==e&&(_=t,n=la()),t=n,t===e&&(t=c,i.substr(c,2)===li?(n=li,c+=2):(n=e,h===0&&b(pa)),n!==e&&(_=t,n=ua()),t=n)),t}function Ka(){var t,n,l;return t=c,i.charCodeAt(c)===92?(n=Ie,c++):(n=e,h===0&&b(Fe)),n!==e?(l=Ki(),l!==e?(_=t,n=ct(l),t=n):(c=t,t=e)):(c=t,t=e),t}function Za(){var t,n,l;return t=c,i.charCodeAt(c)===92?(n=Ie,c++):(n=e,h===0&&b(Fe)),n!==e?(i.substr(c,2).toLowerCase()===ei?(l=i.substr(c,2),c+=2):(l=e,h===0&&b(ti)),l===e&&(i.substr(c,3).toLowerCase()===ri?(l=i.substr(c,3),c+=3):(l=e,h===0&&b(ii)),l===e&&(i.substr(c,3).toLowerCase()===si?(l=i.substr(c,3),c+=3):(l=e,h===0&&b(oi)))),l!==e?(_=t,n=da(l),t=n):(c=t,t=e)):(c=t,t=e),t}function Xa(){var t;return t=gt(),t===e&&(t=bt(),t===e&&(t=ir())),t}function Ki(){var t;return ha.test(i.charAt(c))?(t=i.charAt(c),c++):(t=e,h===0&&b(fa)),t}function Zi(){var t,n;return t=c,i.substr(c,2)===pi?(n=pi,c+=2):(n=e,h===0&&b(ga)),n!==e&&(_=t,n=ba()),t=n,t===e&&(t=c,i.substr(c,2)===ui?(n=ui,c+=2):(n=e,h===0&&b(va)),n!==e&&(_=t,n=ma()),t=n,t===e&&(t=c,i.charCodeAt(c)===60?(n=di,c++):(n=e,h===0&&b(hi)),n!==e&&(_=t,n=ya()),t=n,t===e&&(t=c,i.charCodeAt(c)===62?(n=fi,c++):(n=e,h===0&&b(gi)),n!==e&&(_=t,n=$a()),t=n))),t}function y(){var t;return h++,wa.test(i.charAt(c))?(t=i.charAt(c),c++):(t=e,h===0&&b(Sa)),h--,t===e&&h===0&&b(_a),t}function Qe(){var t,n,l;return t=c,_=c,n=Aa(),n?n=void 0:n=e,n!==e?(i.substr(c,14)===bi?(l=bi,c+=14):(l=e,h===0&&b(xa)),l!==e?(_=t,n=ka(),t=n):(c=t,t=e)):(c=t,t=e),t}function Xi(){var t,n,l,p,f;for(t=c,n=[],l=y();l!==e;)n.push(l),l=y();if(n!==e)if(i.substr(c,2)===vi?(l=vi,c+=2):(l=e,h===0&&b(Ea)),l!==e){for(p=[],f=y();f!==e;)p.push(f),f=y();p!==e?(_=t,n=Ca(),t=n):(c=t,t=e)}else c=t,t=e;else c=t,t=e;return t}function Gi(){var t,n,l,p,f;for(t=c,n=[],l=y();l!==e;)n.push(l),l=y();if(n!==e)if(i.substr(c,2)===mi?(l=mi,c+=2):(l=e,h===0&&b(Pa)),l!==e){for(p=[],f=y();f!==e;)p.push(f),f=y();p!==e?(_=t,n=yi(),t=n):(c=t,t=e)}else c=t,t=e;else c=t,t=e;return t===e&&(t=c,i.charCodeAt(c)===43?(n=$i,c++):(n=e,h===0&&b(_i)),n!==e&&(_=t,n=yi()),t=n),t}function Ji(){var t,n;return t=c,i.charCodeAt(c)===45?(n=wi,c++):(n=e,h===0&&b(Si)),n!==e&&(_=t,n=Ai()),t=n,t===e&&(t=c,i.charCodeAt(c)===33?(n=xi,c++):(n=e,h===0&&b(ki)),n!==e&&(_=t,n=Ai()),t=n),t}function Ga(){var t;return t=Ja(),t===e&&(t=es(),t===e&&(t=ec())),t}function Ja(){var t,n,l,p,f,$;if(t=c,n=Ce(),n!==e){for(l=[],p=y();p!==e;)l.push(p),p=y();if(l!==e)if(i.charCodeAt(c)===58?(p=q,c++):(p=e,h===0&&b(B)),p!==e){for(f=[],$=y();$!==e;)f.push($),$=y();f!==e?($=es(),$!==e?(n=[n,l,p,f,$],t=n):(c=t,t=e)):(c=t,t=e)}else c=t,t=e;else c=t,t=e}else c=t,t=e;return t}function es(){var t;return t=tc(),t===e&&(t=nr(),t===e&&(t=rc(),t===e&&(t=ic(),t===e&&(t=sc(),t===e&&(t=oc()))))),t}function ec(){var t,n,l,p,f,$;if(t=c,i.substr(c,8)===Ei?(n=Ei,c+=8):(n=e,h===0&&b(Ta)),n!==e){for(l=[],p=y();p!==e;)l.push(p),p=y();if(l!==e)if(i.charCodeAt(c)===58?(p=q,c++):(p=e,h===0&&b(B)),p!==e){for(f=[],$=y();$!==e;)f.push($),$=y();f!==e?($=Ce(),$!==e?(_=t,n=Oa(),t=n):(c=t,t=e)):(c=t,t=e)}else c=t,t=e;else c=t,t=e}else c=t,t=e;return t}function tc(){var t,n,l,p,f,$,O;if(t=c,n=Zi(),n!==e){for(l=[],p=y();p!==e;)l.push(p),p=y();l!==e?(p=Ce(),p!==e?(_=t,n=Ci(),t=n):(c=t,t=e)):(c=t,t=e)}else c=t,t=e;if(t===e)if(t=c,n=cc(),n!==e){for(l=[],p=y();p!==e;)l.push(p),p=y();l!==e?(p=Ce(),p!==e?(f=is(),f!==e?($=Ce(),$!==e?(O=lc(),O!==e?(_=t,n=Ci(),t=n):(c=t,t=e)):(c=t,t=e)):(c=t,t=e)):(c=t,t=e)):(c=t,t=e)}else c=t,t=e;return t}function nr(){var t,n,l,p,f;for(t=c,n=[],l=yt(),l===e&&(i.charCodeAt(c)===42?(l=lt,c++):(l=e,h===0&&b(pt)));l!==e;)n.push(l),l=yt(),l===e&&(i.charCodeAt(c)===42?(l=lt,c++):(l=e,h===0&&b(pt)));if(n!==e)if(i.charCodeAt(c)===63?(l=Pi,c++):(l=e,h===0&&b(Ti)),l!==e){for(p=[],f=nr();f!==e;)p.push(f),f=nr();p!==e?(_=t,n=La(),t=n):(c=t,t=e)}else c=t,t=e;else c=t,t=e;return t}function rc(){var t,n,l,p;if(t=c,i.charCodeAt(c)===47?(n=Yt,c++):(n=e,h===0&&b(Kt)),n!==e){for(l=[],Oi.test(i.charAt(c))?(p=i.charAt(c),c++):(p=e,h===0&&b(Li));p!==e;)l.push(p),Oi.test(i.charAt(c))?(p=i.charAt(c),c++):(p=e,h===0&&b(Li));l!==e?(i.charCodeAt(c)===47?(p=Yt,c++):(p=e,h===0&&b(Kt)),p!==e?(_=t,n=Da(),t=n):(c=t,t=e)):(c=t,t=e)}else c=t,t=e;return t}function ic(){var t,n,l,p,f;if(t=c,n=ts(),n!==e)if(i.charCodeAt(c)===126?(l=Zt,c++):(l=e,h===0&&b(Xt)),l!==e){for(p=[],Ae.test(i.charAt(c))?(f=i.charAt(c),c++):(f=e,h===0&&b(xe));f!==e;)p.push(f),Ae.test(i.charAt(c))?(f=i.charAt(c),c++):(f=e,h===0&&b(xe));p!==e?(_=t,n=Na(),t=n):(c=t,t=e)}else c=t,t=e;else c=t,t=e;return t}function sc(){var t,n,l,p,f;if(t=c,n=vt(),n!==e)if(i.charCodeAt(c)===126?(l=Zt,c++):(l=e,h===0&&b(Xt)),l!==e){for(p=[],Ae.test(i.charAt(c))?(f=i.charAt(c),c++):(f=e,h===0&&b(xe));f!==e;)p.push(f),Ae.test(i.charAt(c))?(f=i.charAt(c),c++):(f=e,h===0&&b(xe));p!==e?(_=t,n=ja(),t=n):(c=t,t=e)}else c=t,t=e;else c=t,t=e;return t}function oc(){var t,n,l,p,f;if(t=c,n=Ce(),n!==e)if(i.charCodeAt(c)===94?(l=Di,c++):(l=e,h===0&&b(Ni)),l!==e){for(p=[],Ae.test(i.charAt(c))?(f=i.charAt(c),c++):(f=e,h===0&&b(xe));f!==e;)p.push(f),Ae.test(i.charAt(c))?(f=i.charAt(c),c++):(f=e,h===0&&b(xe));p!==e?(_=t,n=za(),t=n):(c=t,t=e)}else c=t,t=e;else c=t,t=e;return t}function Ce(){var t;return t=vt(),t===e&&(t=ts()),t}function ts(){var t,n;if(t=[],n=yt(),n!==e)for(;n!==e;)t.push(n),n=yt();else t=e;return t}function yt(){var t,n,l,p;return t=or(),t===e&&(t=ac(),t===e&&(t=c,n=c,h++,l=rs(),h--,l===e?n=void 0:(c=n,n=e),n!==e?(l=c,h++,p=nc(),h--,p===e?l=void 0:(c=l,l=e),l!==e?(i.length>c?(p=i.charAt(c),c++):(p=e,h===0&&b(ni)),p!==e?(n=[n,l,p],t=n):(c=t,t=e)):(c=t,t=e)):(c=t,t=e))),t}function nc(){var t;return t=gt(),t===e&&(t=bt(),t===e&&(t=Xi(),t===e&&(t=Gi(),t===e&&(t=Ji(),t===e&&(t=is()))))),t}function ac(){var t,n,l;return t=c,i.charCodeAt(c)===92?(n=Ie,c++):(n=e,h===0&&b(Fe)),n!==e?(l=rs(),l!==e?(_=t,n=Ba(),t=n):(c=t,t=e)):(c=t,t=e),t}function rs(){var t;return i.charCodeAt(c)===43?(t=$i,c++):(t=e,h===0&&b(_i)),t===e&&(i.charCodeAt(c)===45?(t=wi,c++):(t=e,h===0&&b(Si)),t===e&&(i.charCodeAt(c)===61?(t=Ra,c++):(t=e,h===0&&b(Ma)),t===e&&(i.charCodeAt(c)===62?(t=fi,c++):(t=e,h===0&&b(gi)),t===e&&(i.charCodeAt(c)===60?(t=di,c++):(t=e,h===0&&b(hi)),t===e&&(i.charCodeAt(c)===33?(t=xi,c++):(t=e,h===0&&b(ki)),t===e&&(i.charCodeAt(c)===40?(t=k,c++):(t=e,h===0&&b(N)),t===e&&(i.charCodeAt(c)===41?(t=at,c++):(t=e,h===0&&b(ie)),t===e&&(i.charCodeAt(c)===123?(t=Se,c++):(t=e,h===0&&b(Ht)),t===e&&(i.charCodeAt(c)===125?(t=qt,c++):(t=e,h===0&&b(Wt)),t===e&&(i.charCodeAt(c)===91?(t=ji,c++):(t=e,h===0&&b(zi)),t===e&&(i.charCodeAt(c)===93?(t=Bi,c++):(t=e,h===0&&b(Ri)),t===e&&(i.charCodeAt(c)===94?(t=Di,c++):(t=e,h===0&&b(Ni)),t===e&&(i.charCodeAt(c)===34?(t=Me,c++):(t=e,h===0&&b(Ue)),t===e&&(i.charCodeAt(c)===126?(t=Zt,c++):(t=e,h===0&&b(Xt)),t===e&&(i.charCodeAt(c)===42?(t=lt,c++):(t=e,h===0&&b(pt)),t===e&&(i.charCodeAt(c)===63?(t=Pi,c++):(t=e,h===0&&b(Ti)),t===e&&(i.charCodeAt(c)===58?(t=q,c++):(t=e,h===0&&b(B)),t===e&&(i.charCodeAt(c)===92?(t=Ie,c++):(t=e,h===0&&b(Fe)),t===e&&(i.charCodeAt(c)===47?(t=Yt,c++):(t=e,h===0&&b(Kt))))))))))))))))))))),t}function is(){var t,n,l,p,f;if(t=c,n=[],l=y(),l!==e)for(;l!==e;)n.push(l),l=y();else n=e;if(n!==e)if(i.substr(c,2)===Mi?(l=Mi,c+=2):(l=e,h===0&&b(Ua)),l!==e){if(p=[],f=y(),f!==e)for(;f!==e;)p.push(f),f=y();else p=e;p!==e?(n=[n,l,p],t=n):(c=t,t=e)}else c=t,t=e;else c=t,t=e;return t}function cc(){var t;return i.charCodeAt(c)===91?(t=ji,c++):(t=e,h===0&&b(zi)),t===e&&(i.charCodeAt(c)===123?(t=Se,c++):(t=e,h===0&&b(Ht))),t}function lc(){var t;return i.charCodeAt(c)===93?(t=Bi,c++):(t=e,h===0&&b(Ri)),t===e&&(i.charCodeAt(c)===125?(t=qt,c++):(t=e,h===0&&b(Wt))),t}const{errorOnLuceneSyntax:pc,parseCursor:uc,cursorSymbol:dc,allowLeadingWildcards:hc=!0,helpers:{nodeTypes:he}}=a,V=he.function.buildNodeWithArgumentNodes,se=he.literal.buildNode,fc=he.wildcard.buildNode,gc=he.namedArg.buildNode,{wildcardSymbol:ss}=he.wildcard;if(dt=g(),dt!==e&&c===i.length)return dt;throw dt!==e&&c<i.length&&b({type:"end",description:"end of input"}),Ii(null,Gt,W<i.length?i.charAt(W):null,W<i.length?ht(W,W+1):ht(W,W))}return{SyntaxError:r,parse:s}}(),jt=(o,r={},s=it)=>{if(typeof o>"u")throw new Error("expression must be a string, got undefined instead");return s(o,{...r,helpers:{nodeTypes:K}})},$e=(o,r={})=>jt(o,{...r,startRule:"Literal"},it),st=(o,r={})=>{try{return jt(o,r,it)}catch(s){throw s.name==="SyntaxError"?new jr(s,o):s}},ro=o=>{try{return jt(o,{errorOnLuceneSyntax:!0},it),!1}catch(r){return r.message.startsWith("Lucene")}},j=(o,r,s,i)=>(r=void 0,!o||!o.type||!K[o.type]?j(K.function.buildNode("and",[]),r):K[o.type].toOpenSearchQuery(o,r,s,i)),Y="@kuery-wildcard@";function io(o){return o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function so(o){return o.replace(/[+-=&|><!(){}[\]^"~*?:\\/]/g,"\\$&")}function oo(o){return o.includes(Y)?{type:"wildcard",value:o}:$e(o)}function zr(o,r){const{value:s}=o,i=s.split(Y).map(io).join("[\\s\\S]*");return new RegExp(`^${i}$`).test(r)}function no(o){const{value:r}=o;return r.split(Y).join("*")}function zt(o){const{value:r}=o;return r.split(Y).map(so).join("*")}function ao(o){const{value:r}=o;return r.startsWith(Y)&&r.replace(Y,"").length>0}const co=Object.freeze(Object.defineProperty({__proto__:null,buildNode:oo,hasLeadingWildcard:ao,test:zr,toOpenSearchQuery:no,toQueryStringQuery:zt,wildcardSymbol:Y},Symbol.toStringTag,{value:"Module"}));function Bt(o,r){if(!r)return[];if(o.type==="literal"){const s=Nt(o),i=r.fields.find(a=>a.name===s);return i?[i]:[]}else if(o.type==="wildcard")return r.fields.filter(i=>zr(o,i.name))}function mc(o){return o}function Br(o,r,s){const i={...o,value:s?`${s}.${o.value}`:o.value};if(!r||i.type==="wildcard"&&!s)return i;const e=Bt(i,r).reduce((u,g)=>{const m=g.subType&&g.subType.nested?g.subType.nested.path:void 0;return s&&!m?[...u,`${g.name} is not a nested field but is in nested group "${s}" in the DQL expression.`]:m&&!s?[...u,`${g.name} is a nested field, but is not in a nested group in the DQL expression.`]:m!==s?[...u,`Nested field ${g.name} is being queried with the incorrect nested path. The correct path is ${g.subType.nested.path}.`]:u},[]);if(e.length>0)throw new Error(e.join(`
727
+ `));return i}function lo(o,r,s=!1){if(o===void 0)throw new Error("fieldName is a required argument");if(r===void 0)throw new Error("value is a required argument");const i=typeof o=="string"?$e(o):ye(o),a=typeof r=="string"?$e(r):ye(r),e=ye(s);return{arguments:[i,a,e]}}function po(o,r,s={},i={}){const{arguments:[a,e,u]}=o,g=Br(a,r,i!=null&&i.nested?i.nested.path:void 0),m=j(g),w=e!==void 0?j(e):e,x=u.value?"phrase":"best_fields";if(g.value===null)return e.type==="wildcard"?{query_string:{query:zt(e)}}:{multi_match:{type:x,query:w,lenient:!0}};const S=r?Bt(g,r):[];S&&S.length===0&&S.push({name:j(g),scripted:!1,type:""});const C=e.type==="wildcard"&&w==="*",k=g.type==="wildcard"&&m==="*"||S&&r&&S.length===r.fields.length;return C&&k?{match_all:{}}:{bool:{should:S.reduce((ie,H)=>{const q=B=>{var Se;return g.type!=="wildcard"||!((Se=H.subType)!=null&&Se.nested)||i!=null&&i.nested?B:{nested:{path:H.subType.nested.path,query:B,score_mode:"none"}}};if(H.scripted)return[];if(C)return[...ie,q({exists:{field:H.name}})];if(e.type==="wildcard")return[...ie,q({query_string:{fields:[H.name],query:zt(e)}})];if(H.type==="date"){const B=s.dateFormatTZ?{time_zone:s.dateFormatTZ}:{};return[...ie,q({range:{[H.name]:{gte:w,lte:w,...B}}})]}else{const B=x==="phrase"?"match_phrase":"match";return[...ie,q({[B]:{[H.name]:w}})]}},[])||[],minimum_should_match:1}}}const uo=Object.freeze(Object.defineProperty({__proto__:null,buildNodeParams:lo,toOpenSearchQuery:po},Symbol.toStringTag,{value:"Module"}));function ho(o){return{arguments:o}}function fo(o,r,s={},i={}){return{bool:{filter:(o.arguments||[]).map(e=>j(e,r,s,i))}}}const go=Object.freeze(Object.defineProperty({__proto__:null,buildNodeParams:ho,toOpenSearchQuery:fo},Symbol.toStringTag,{value:"Module"}));function bo(o){return{arguments:o}}function vo(o,r,s={},i={}){return{bool:{should:(o.arguments||[]).map(e=>j(e,r,s,i)),minimum_should_match:1}}}const mo=Object.freeze(Object.defineProperty({__proto__:null,buildNodeParams:bo,toOpenSearchQuery:vo},Symbol.toStringTag,{value:"Module"}));function yo(o){return{arguments:[o]}}function $o(o,r,s={},i={}){const[a]=o.arguments;return{bool:{must_not:j(a,r,s,i)}}}const _o=Object.freeze(Object.defineProperty({__proto__:null,buildNodeParams:yo,toOpenSearchQuery:$o},Symbol.toStringTag,{value:"Module"}));function wo(o,...r){let s={};for(let i of r)s[i]=o[i];return s}function So(o,r){const s=wo(r,"gt","lt","gte","lte","format"),i=typeof o=="string"?$e(o):K.literal.buildNode(o),a=Object.entries(s).map(e=>{let[u,g]=e;return K.namedArg.buildNode(u,g)});return{arguments:[i,...a]}}function Ao(o,r,s={},i={}){const[a,...e]=o.arguments,u=Br(a,r,i!=null&&i.nested?i.nested.path:void 0),g=r?Bt(u,r):[],m=xo(e),w=Object.fromEntries(Object.entries(m).map(([S,C])=>[S,j(C)]));return g&&g.length===0&&g.push({name:j(u),scripted:!1,type:""}),{bool:{should:g.map(S=>{const C=k=>{var N;return u.type!=="wildcard"||!((N=S.subType)!=null&&N.nested)||i.nested?k:{nested:{path:S.subType.nested.path,query:k,score_mode:"none"}}};if(S.scripted)return{};if(S.type==="date"){const k=s.dateFormatTZ?{time_zone:s.dateFormatTZ}:{};return C({range:{[S.name]:{...w,...k}}})}return C({range:{[S.name]:w}})}),minimum_should_match:1}}}function xo(o){if(o.gt&&o.gte||o.lt&&o.lte)throw new Error("range ends cannot be both inclusive and exclusive");const r=["gte","lte","format"];return o.reduce((s,i,a)=>(i.type==="namedArg"?s[i.name]=i.value:s[r[a]]=i,s),{})}const ko=Object.freeze(Object.defineProperty({__proto__:null,buildNodeParams:So,toOpenSearchQuery:Ao},Symbol.toStringTag,{value:"Module"}));function Eo(o){return{arguments:[ye(o)]}}function Co(o,r,s={},i={}){const{arguments:[a]}=o,e={...a,value:i!=null&&i.nested?`${i.nested.path}.${a.value}`:a.value},u=Nt(e),g=((r==null?void 0:r.fields)||[]).find(m=>m.name===u);if(g&&g.scripted)throw new Error("Exists query does not support scripted fields");return{exists:{field:u}}}const Po=Object.freeze(Object.defineProperty({__proto__:null,buildNodeParams:Eo,toOpenSearchQuery:Co},Symbol.toStringTag,{value:"Module"}));function To(o,r){return{arguments:[typeof o=="string"?$e(o):ye(o),r]}}function Oo(o,r,s={},i={}){var m;const[a,e]=o.arguments,u=j(a),g=(m=i==null?void 0:i.nested)!=null&&m.path?`${i.nested.path}.${u}`:u;return{nested:{path:g,query:j(e,r,s,{...i,nested:{path:g}}),score_mode:"none"}}}const Rt={is:uo,and:go,or:mo,not:_o,range:ko,exists:Po,nested:Object.freeze(Object.defineProperty({__proto__:null,buildNodeParams:To,toOpenSearchQuery:Oo},Symbol.toStringTag,{value:"Module"}))};function Lo(o,...r){const s=Rt[o];if(s===void 0)throw new Error(`Unknown function "${o}"`);return{type:"function",function:o,...s.buildNodeParams(...r)}}function Do(o,r){if(Rt[o]===void 0)throw new Error(`Unknown function "${o}"`);return{type:"function",function:o,arguments:r}}function No(o,r,s,i){return Rt[o.function].toOpenSearchQuery(o,r,s,i)}const jo=Object.freeze(Object.defineProperty({__proto__:null,buildNode:Lo,buildNodeWithArgumentNodes:Do,toOpenSearchQuery:No},Symbol.toStringTag,{value:"Module"}));function zo(o,r){const s=r.type==="literal"?r:K.literal.buildNode(r);return{type:"namedArg",name:o,value:s}}function Bo(o){return j(o.value)}const K={function:jo,literal:to,namedArg:Object.freeze(Object.defineProperty({__proto__:null,buildNode:zo,toOpenSearchQuery:Bo},Symbol.toStringTag,{value:"Module"})),wildcard:co},Ro=Y,Mo=(o,r)=>"("+(o.arguments||[]).map(i=>de(i,r)).join(" AND ")+")",Uo=(o,r)=>{var{arguments:[s,i,a]}=o;let e="=";i.type==="wildcard"&&(e="");let u=de(i);a=a.value||typeof u=="string",i.type==="literal"&&a&&(u=`'${u}'`),i.type==="literal"&&!a&&(u=`${u}`);let g=de(s);return g==null?r&&a?`(${r.filter(m=>m.type==="string").map(m=>`${m.name} ILIKE '%${i.value}%'`).join(" OR ")})`:r&&!a&&(i.value===!0||i.value===!1)?`(${r.filter(m=>m.type==="boolean").map(m=>`${m.name}=${i.value}`).join(" OR ")})`:"":g+e+u},Io=(o,r)=>"("+(o.arguments||[]).map(i=>de(i,r)).join(" OR ")+")",Fo=(o,r)=>{const[s]=o.arguments;return"NOT ("+de(s,r)+")"},Qo={gt:">",lt:"<",gte:">=",lte:"<="},Ho={is:Uo,and:Mo,or:Io,not:Fo,range:o=>{const[r,s]=o.arguments;let i=s.value;const a=Qo[s.name];let e=de(i);return i.type==="literal"&&(e=`${e}`),`${r.value} ${a} ${e}`},exists:o=>{const[r]=o.arguments;return`${r.value} IS NOT NULL`},nested:o=>(console.warn("Nested types dont exist in CQL",o),"")},qo={function:(o,r)=>Ho[o.function](o,r),literal:o=>o.value,wildcard:o=>{const{value:r}=o;return` LIKE '${r.split(Ro).join("%")}'`}},de=(o,r)=>{const s=qo[o.type];return s(o,r)},Wo=Y,Vo=o=>({$and:(o.arguments||[]).map(i=>ee(i))}),Yo=o=>{const{arguments:[r,s]}=o;let i=ee(s);if(s.type==="wildcard"&&s.value==="@kuery-wildcard@")return Rr(o);let e={};return e[ee(r)]={$eq:i},e},Ko=o=>({$or:(o.arguments||[]).map(s=>ee(s))}),Zo=o=>{const[r]=o.arguments;let s={};return s={$ne:ee(r)},s},Xo={gt:"$gt",lt:"$lt",gte:"$gte",lte:"$lte"},Go=o=>{const[r,s]=o.arguments;let i=s.value;const a=Xo[s.name];let e=ee(i),u={};return u[r.value]={},u[r.value][a]=e,u},Rr=o=>{const[r]=o.arguments;return{[ee(r)]:{$ne:null}}},Jo={is:Yo,and:Vo,or:Ko,not:Zo,range:Go,exists:Rr,nested:o=>(console.warn("TODO Implement nested search",o),"")},en={function:o=>Jo[o.function](o),literal:o=>o.value,wildcard:o=>{const{value:r}=o;return`/${r.split(Wo).join(".*")}/`}},ee=(o,r)=>{const s=en[o.type];return s(o,r)},tn=Object.freeze(Object.defineProperty({__proto__:null,DQLSyntaxError:jr,doesKueryExpressionHaveLuceneSyntaxError:ro,fromKueryExpression:st,fromLiteralExpression:$e,nodeTypes:K,parse:st,toCql:de,toDSL:j,toMongo:ee,toOpenSearchQuery:j},Symbol.toStringTag,{value:"Module"})),rn=R`
637
728
  :host {
638
729
  --dialog-padding: var(--spectric-dialog-padding, 5px);
639
730
  --dialog-background:var(--spectric-background,rgb(246, 249, 252));
@@ -680,11 +771,11 @@ spectric-button{
680
771
  right: 0;
681
772
  top: 0;
682
773
  }
683
- `;var Ho=Object.defineProperty,qo=Object.getOwnPropertyDescriptor,ee=(n,r,s,i)=>{for(var a=i>1?void 0:i?qo(r,s):r,t=n.length-1,p;t>=0;t--)(p=n[t])&&(a=(i?p(r,s,a):p(a))||a);return i&&a&&Ho(r,s,a),a};const Lt="spectric-dialog";d.DialogElement=class extends N{constructor(){super(...arguments),this.open=!1,this.dismissable=!0,this.hideBackdrop=!1,this.title="",this.closeOnEscape=!0,this.closeOnOutsideClick=!0,this.clickHandler=async r=>{const s=await this.dialogElement;!this.dismissable||!this.closeOnOutsideClick||s===r.target&&(this.open=!1)},this._handleKeyDown=r=>{this.closeOnEscape||r.preventDefault(),this.open&&this.closeOnEscape&&r.key==="Escape"&&(this.open=!1)},this._onClose=r=>{r.preventDefault(),r.stopPropagation(),this.open=!1,this.dispatchEvent(new CustomEvent("close",{bubbles:!0,composed:!0}))}}static display(r,s){let i=document.createElement(Lt);i.addEventListener("close",()=>{i.remove()});for(let t in r)i[t]=r[t];let a=document.createDocumentFragment();return fr(s,a),i.appendChild(a),i.open=!0,document.body.appendChild(i),i}connectedCallback(){super.connectedCallback(),this.dialogElement.then(r=>r.addEventListener("keydown",this._handleKeyDown))}disconnectedCallback(){super.disconnectedCallback(),this.dialogElement.then(r=>r.removeEventListener("keydown",this._handleKeyDown))}updated(r){r.has("open")&&this.dialogElement.then(s=>{this.open?s.showModal():s.close()})}render(){return k`
774
+ `;var sn=Object.defineProperty,on=Object.getOwnPropertyDescriptor,te=(o,r,s,i)=>{for(var a=i>1?void 0:i?on(r,s):r,e=o.length-1,u;e>=0;e--)(u=o[e])&&(a=(i?u(r,s,a):u(a))||a);return i&&a&&sn(r,s,a),a};const Mt="spectric-dialog";d.DialogElement=class extends P{constructor(){super(...arguments),this.open=!1,this.dismissable=!0,this.hideBackdrop=!1,this.title="",this.closeOnEscape=!0,this.closeOnOutsideClick=!0,this.clickHandler=async r=>{const s=await this.dialogElement;!this.dismissable||!this.closeOnOutsideClick||s===r.target&&(this.open=!1)},this._handleKeyDown=r=>{this.closeOnEscape||r.preventDefault(),this.open&&this.closeOnEscape&&r.key==="Escape"&&(this.open=!1)},this._onClose=r=>{r.preventDefault(),r.stopPropagation(),this.open=!1,this.dispatchEvent(new CustomEvent("close",{bubbles:!0,composed:!0}))}}static display(r,s){let i=document.createElement(Mt);i.addEventListener("close",()=>{i.remove()});for(let e in r)i[e]=r[e];let a=document.createDocumentFragment();return Ct(s,a),i.appendChild(a),i.open=!0,document.body.appendChild(i),i}connectedCallback(){super.connectedCallback(),this.dialogElement.then(r=>r.addEventListener("keydown",this._handleKeyDown))}disconnectedCallback(){super.disconnectedCallback(),this.dialogElement.then(r=>r.removeEventListener("keydown",this._handleKeyDown))}updated(r){r.has("open")&&this.dialogElement.then(s=>{this.open?s.showModal():s.close()})}render(){return A`
684
775
  <dialog class=${this.hideBackdrop?"":"backdrop"} @close=${this._onClose} @click=${this.clickHandler}>
685
776
  <spectric-panel>
686
777
  <div class="modal">
687
- ${this.dismissable?k`<spectric-button variant="text" size="small" @click=${()=>{this.open=!1}}>X</spectric-button>`:null}
778
+ ${this.dismissable?A`<spectric-button variant="text" size="small" @click=${()=>{this.open=!1}}>X</spectric-button>`:null}
688
779
  <h3 >
689
780
  <slot name="title">
690
781
  ${this.title.length?this.title:null}
@@ -696,17 +787,17 @@ spectric-button{
696
787
  </div>
697
788
  </spectric-panel>
698
789
  </dialog>
699
- `}},d.DialogElement.styles=Fo,ee([y({type:Boolean,reflect:!0})],d.DialogElement.prototype,"open",2),ee([y({type:Boolean,reflect:!0})],d.DialogElement.prototype,"dismissable",2),ee([y({type:Boolean,reflect:!0})],d.DialogElement.prototype,"hideBackdrop",2),ee([y({type:String,reflect:!0})],d.DialogElement.prototype,"title",2),ee([y({type:Boolean,reflect:!0})],d.DialogElement.prototype,"closeOnEscape",2),ee([y({type:Boolean,reflect:!0})],d.DialogElement.prototype,"closeOnOutsideClick",2),ee([He("dialog")],d.DialogElement.prototype,"dialogElement",2),d.DialogElement=ee([R(Lt)],d.DialogElement);var Wo=Object.defineProperty,Yo=Object.getOwnPropertyDescriptor,Q=(n,r,s,i)=>{for(var a=i>1?void 0:i?Yo(r,s):r,t=n.length-1,p;t>=0;t--)(p=n[t])&&(a=(i?p(r,s,a):p(a))||a);return i&&a&&Wo(r,s,a),a},Tr=(n=>(n.MONGO="toMongo",n.CQL="toCql",n.DSL="toDSL",n.AST="AST",n))(Tr||{});const Lr={eq:{value:" : ",label:" equals some value"},gt:{value:" > ",label:" is greater than some value"},lt:{value:" < ",label:" is less than some value"},gte:{value:" >= ",label:" is greater than or equal to some value"},lte:{value:" <= ",label:" is less than or equal to some value"}},Vo={eq:{value:": ",label:" equals some value"},exists:{value:": *",label:" exists in any form"}},Ko=[{value:": true",label:" value is true"},{value:": false",label:"value is false"}],Zo=Object.fromEntries(Object.entries(Lr).map(([n,r])=>[n,{value:r.value,label:(r.label||"").replace("value","date-time")}]));d.SpectricQuery=class extends N{constructor(){super(),this.placeholder="",this._value="",this.value="",this.outputLanguage="AST",this.completions=[],this.completionIndex=0,this.fields=[],this._parseQuery=(r=void 0)=>{let s;if(r&&(r!=null&&r.currentTarget)&&r.currentTarget.value&&(this.value=r.currentTarget.value),this.value=="")return;try{r&&r.data=="("&&(this.value=this.value+" )",this._input.setSelectionRange(this.value.length-2,this.value.length-2));let t=this.value;this._input.selectionStart!==null&&(t=t.substring(0,this._input.selectionStart)+"@kuery-cursor@"+t.substring(this._input.selectionStart));let p=Je(t,{parseCursor:!0,cursorSymbol:"@kuery-cursor@",allowLeadingWildcards:!1});this.autoComplete(p),s=Je(this.value,{allowLeadingWildcards:!1})}catch{return}let i;this.outputLanguage=="AST"?i=s:i=Qo[this.outputLanguage](s,this.fields);let a=new CustomEvent("change",{detail:i});this.dispatchEvent(a)},this.getValuesForField=async(r,s)=>(console.log("getValuesForField isn't set no values returned",r,s),[]),this._selectCompletion=async()=>{if(!this.suggestion)return;let r=this.completions[this.completionIndex],s=this.value.substring(0,r.start)+r.value,i=s.length,a=this.value.substring(r.end);if(r.value.includes(a)?this.value=s:this.value=s+this.value.substring(r.end),this._input.setSelectionRange(i,i),r.onSelect){let t=await r.onSelect();t!==void 0&&(this.value+=t,setTimeout(()=>{this._input.focus()}))}this.completionIndex=0,this.completions=[],this._parseQuery()},this._handleArrows=r=>{var s;r.key==="Escape"&&(this.completions=[]),(r.key=="ArrowLeft"||r.key==="ArrowRight")&&setTimeout(this._parseQuery,100),this.completions.length&&["ArrowUp","ArrowDown","Enter","Tab"].includes(r.key)&&this.suggestion&&(r.preventDefault(),(r.key==="ArrowDown"||r.key==="Tab")&&(this.completionIndex+=1,this.completionIndex>this.completions.length-1&&(this.completionIndex=0)),r.key==="ArrowUp"&&(this.completionIndex-=1,this.completionIndex<0&&(this.completionIndex=this.completions.length-1)),(s=this._asyncAutocomplete)==null||s.then(i=>{let a=i.querySelector(".option.active");a&&a.scrollIntoView({block:"nearest"})}),r.key==="Enter"&&this._selectCompletion())},this.uuid=crypto.randomUUID()}createRenderRoot(){return this}async autoComplete(r){if(this.completions=[],r.type!=="cursor")return;let s=[];this.suggestion=r;let{start:i,end:a}=r;for(let t of r.suggestionTypes){if(t=="conjunction"&&r.text.endsWith(" ")&&s.push(...["and ","or "].map(p=>({type:t,value:p,start:a,end:a}))),t==="field"){let p=this.fields.filter(g=>g.name.includes(r.fieldName)||g.name.includes(r.prefix)).map(g=>[{type:t,value:g.name,start:i,end:a}]).flat();s.push(...p)}if(t==="operator"){let p=this.fields.find(g=>g.name===r.fieldName);p&&(p.type==="number"?s.push(...Object.values(Lr).map(g=>({type:t,...g,start:a,end:a}))):p.type==="string"?p.format==="date-time"?s.push(...Object.values(Zo).map(g=>({type:t,...g,start:a,end:a,onSelect:async()=>{let v=await this.getValuesForField(r.fieldName,r.prefix);v.length===0&&(v=["now-1m","now-1d","now-1M"]);let _,A=We();return await new Promise(S=>{let E=d.DialogElement.display({},k`
790
+ `}},d.DialogElement.styles=rn,te([v({type:Boolean,reflect:!0})],d.DialogElement.prototype,"open",2),te([v({type:Boolean,reflect:!0})],d.DialogElement.prototype,"dismissable",2),te([v({type:Boolean,reflect:!0})],d.DialogElement.prototype,"hideBackdrop",2),te([v({type:String,reflect:!0})],d.DialogElement.prototype,"title",2),te([v({type:Boolean,reflect:!0})],d.DialogElement.prototype,"closeOnEscape",2),te([v({type:Boolean,reflect:!0})],d.DialogElement.prototype,"closeOnOutsideClick",2),te([Ye("dialog")],d.DialogElement.prototype,"dialogElement",2),d.DialogElement=te([L(Mt)],d.DialogElement);var nn=Object.defineProperty,an=Object.getOwnPropertyDescriptor,Q=(o,r,s,i)=>{for(var a=i>1?void 0:i?an(r,s):r,e=o.length-1,u;e>=0;e--)(u=o[e])&&(a=(i?u(r,s,a):u(a))||a);return i&&a&&nn(r,s,a),a},Mr=(o=>(o.MONGO="toMongo",o.CQL="toCql",o.DSL="toDSL",o.AST="AST",o))(Mr||{});const Ur={eq:{value:" : ",label:" equals some value"},gt:{value:" > ",label:" is greater than some value"},lt:{value:" < ",label:" is less than some value"},gte:{value:" >= ",label:" is greater than or equal to some value"},lte:{value:" <= ",label:" is less than or equal to some value"}},cn={eq:{value:": ",label:" equals some value"},exists:{value:": *",label:" exists in any form"}},ln=[{value:": true",label:" value is true"},{value:": false",label:"value is false"}],pn=Object.fromEntries(Object.entries(Ur).map(([o,r])=>[o,{value:r.value,label:(r.label||"").replace("value","date-time")}]));d.SpectricQuery=class extends P{constructor(){super(),this.placeholder="",this._value="",this.value="",this.outputLanguage="AST",this.completions=[],this.completionIndex=0,this.fields=[],this._parseQuery=(r=void 0)=>{let s;if(r&&(r!=null&&r.currentTarget)&&r.currentTarget.value&&(this.value=r.currentTarget.value),this.value=="")return;try{r&&r.data=="("&&(this.value=this.value+" )",this._input.setSelectionRange(this.value.length-2,this.value.length-2));let e=this.value;this._input.selectionStart!==null&&(e=e.substring(0,this._input.selectionStart)+"@kuery-cursor@"+e.substring(this._input.selectionStart));let u=st(e,{parseCursor:!0,cursorSymbol:"@kuery-cursor@",allowLeadingWildcards:!1});this.autoComplete(u),s=st(this.value,{allowLeadingWildcards:!1})}catch{return}let i;this.outputLanguage=="AST"?i=s:i=tn[this.outputLanguage](s,this.fields);let a=new CustomEvent("change",{detail:i});this.dispatchEvent(a)},this.getValuesForField=async(r,s)=>(console.log("getValuesForField isn't set no values returned",r,s),[]),this._selectCompletion=async()=>{if(!this.suggestion)return;let r=this.completions[this.completionIndex],s=this.value.substring(0,r.start)+r.value,i=s.length,a=this.value.substring(r.end);if(r.value.includes(a)?this.value=s:this.value=s+this.value.substring(r.end),this._input.setSelectionRange(i,i),r.onSelect){let e=await r.onSelect();e!==void 0&&(this.value+=e,setTimeout(()=>{this._input.focus()}))}this.completionIndex=0,this.completions=[],this._parseQuery()},this._handleArrows=r=>{var s;r.key==="Escape"&&(this.completions=[]),(r.key=="ArrowLeft"||r.key==="ArrowRight")&&setTimeout(this._parseQuery,100),this.completions.length&&["ArrowUp","ArrowDown","Enter","Tab"].includes(r.key)&&this.suggestion&&(r.preventDefault(),(r.key==="ArrowDown"||r.key==="Tab")&&(this.completionIndex+=1,this.completionIndex>this.completions.length-1&&(this.completionIndex=0)),r.key==="ArrowUp"&&(this.completionIndex-=1,this.completionIndex<0&&(this.completionIndex=this.completions.length-1)),(s=this._asyncAutocomplete)==null||s.then(i=>{let a=i.querySelector(".option.active");a&&a.scrollIntoView({block:"nearest"})}),r.key==="Enter"&&this._selectCompletion())},this.uuid=crypto.randomUUID()}createRenderRoot(){return this}async autoComplete(r){if(this.completions=[],r.type!=="cursor")return;let s=[];this.suggestion=r;let{start:i,end:a}=r;for(let e of r.suggestionTypes){if(e=="conjunction"&&r.text.endsWith(" ")&&s.push(...["and ","or "].map(u=>({type:e,value:u,start:a,end:a}))),e==="field"){let u=this.fields.filter(g=>g.name.includes(r.fieldName)||g.name.includes(r.prefix)).map(g=>[{type:e,value:g.name,start:i,end:a}]).flat();s.push(...u)}if(e==="operator"){let u=this.fields.find(g=>g.name===r.fieldName);u&&(u.type==="number"?s.push(...Object.values(Ur).map(g=>({type:e,...g,start:a,end:a}))):u.type==="string"?u.format==="date-time"?s.push(...Object.values(pn).map(g=>({type:e,...g,start:a,end:a,onSelect:async()=>{let m=await this.getValuesForField(r.fieldName,r.prefix);m.length===0&&(m=["now-1m","now-1d","now-1M"]);let w,x=Ze();return await new Promise(S=>{let C=d.DialogElement.display({},A`
700
791
  <div class="query-bar-date-quick-select">
701
- ${v.map(x=>k`<a href="#" @click=${L=>{L.preventDefault(),_=`"${x}"`,S(_),E.open=!1}}>${x}</a>`)}
792
+ ${m.map(k=>A`<a href="#" @click=${N=>{N.preventDefault(),w=`"${k}"`,S(w),C.open=!1}}>${k}</a>`)}
702
793
  </div>
703
- <spectric-input variant="datetime-local" @change=${x=>{if(!x.target)return;_=`"${new Date(x.target.value+":00.000Z").toISOString()}"`,A.value.disabled=_===void 0}}></spectric-input>
704
- <spectric-button ${Ye(A)} .disabled=${!0} @click=${()=>{S(_),E.open=!1}}>Submit</spectric-button>
705
- `)}),_}}))):s.push(...Object.values(Vo).map(g=>({type:t,...g,start:a,end:a}))):p.type==="boolean"&&s.push(...Ko.map(g=>({type:t,...g,start:a,end:a}))))}if(t==="value"){let p=this.fields.find(g=>g.name===r.fieldName);if(p&&p.type=="boolean")s.push({type:t,value:"true",start:i,end:a},{type:t,value:"false",start:i,end:a});else{console.log(`invoke callback to get values for ${r.fieldName}`);let g=await this.getValuesForField(r.fieldName,r.prefix);(p==null?void 0:p.type)==="string"&&(g=g.map(v=>`"${v}"`)),s.push(...g.map(v=>({type:t,value:v,start:i,end:a})))}}}if(this.completions=s,this.completions.length&&this._autocomplete){let{width:t,left:p,bottom:g}=this._input.getBoundingClientRect();this._autocomplete.showPopover(),"anchorName"in document.documentElement.style||(this._autocomplete.style.left=`${p+3.75}px`,this._autocomplete.style.top=`${g}px`),this._autocomplete.style.width=`${t-15}px`}}updated(r){r.has("outputLanguage")&&this._parseQuery()}render(){return k`
794
+ <spectric-input variant="datetime-local" @change=${k=>{if(!k.target)return;w=`"${new Date(k.target.value+":00.000Z").toISOString()}"`,x.value.disabled=w===void 0}}></spectric-input>
795
+ <spectric-button ${Xe(x)} .disabled=${!0} @click=${()=>{S(w),C.open=!1}}>Submit</spectric-button>
796
+ `)}),w}}))):s.push(...Object.values(cn).map(g=>({type:e,...g,start:a,end:a}))):u.type==="boolean"&&s.push(...ln.map(g=>({type:e,...g,start:a,end:a}))))}if(e==="value"){let u=this.fields.find(g=>g.name===r.fieldName);if(u&&u.type=="boolean")s.push({type:e,value:"true",start:i,end:a},{type:e,value:"false",start:i,end:a});else{console.log(`invoke callback to get values for ${r.fieldName}`);let g=await this.getValuesForField(r.fieldName,r.prefix);(u==null?void 0:u.type)==="string"&&(g=g.map(m=>`"${m}"`)),s.push(...g.map(m=>({type:e,value:m,start:i,end:a})))}}}if(this.completions=s,this.completions.length&&this._autocomplete){let{width:e,left:u,bottom:g}=this._input.getBoundingClientRect();this._autocomplete.showPopover(),"anchorName"in document.documentElement.style||(this._autocomplete.style.left=`${u+3.75}px`,this._autocomplete.style.top=`${g}px`),this._autocomplete.style.width=`${e-15}px`}}updated(r){r.has("outputLanguage")&&this._parseQuery()}render(){return A`
706
797
  <spectric-input .value=${this.value} .placeholder=${this.placeholder} style=${`anchor-name:--${this.uuid};`} autocomplete="off" @input=${this._parseQuery} @keydown=${this._handleArrows} @change=${r=>r.stopPropagation()}></spectric-input>
707
798
  <div class="autocomplete" popover style=${`position-anchor: --${this.uuid};`}>
708
- ${this.completions.map((r,s)=>k`<div @click=${()=>{this.completionIndex=s,this._selectCompletion()}} class=${this.completionIndex==s?"option active":"option"}><span class="optiontype ${r.type}">${r.type}</span> <span class="value">${r.value}</span> <span class="label">${r.label}</span></span> </div></div>`)}
709
- </div>`}},Q([y({type:String,reflect:!0})],d.SpectricQuery.prototype,"placeholder",2),Q([y({type:String,reflect:!0})],d.SpectricQuery.prototype,"value",2),Q([y({type:String,reflect:!0})],d.SpectricQuery.prototype,"outputLanguage",2),Q([Fe()],d.SpectricQuery.prototype,"completions",2),Q([Fe()],d.SpectricQuery.prototype,"completionIndex",2),Q([y({type:Array,reflect:!0})],d.SpectricQuery.prototype,"fields",2),Q([Le(".autocomplete")],d.SpectricQuery.prototype,"_autocomplete",2),Q([He(".autocomplete")],d.SpectricQuery.prototype,"_asyncAutocomplete",2),Q([Le("spectric-input")],d.SpectricQuery.prototype,"_input",2),d.SpectricQuery=Q([R("spectric-query")],d.SpectricQuery);const Nr=z`
799
+ ${this.completions.map((r,s)=>A`<div @click=${()=>{this.completionIndex=s,this._selectCompletion()}} class=${this.completionIndex==s?"option active":"option"}><span class="optiontype ${r.type}">${r.type}</span> <span class="value">${r.value}</span> <span class="label">${r.label}</span></span> </div></div>`)}
800
+ </div>`}},Q([v({type:String,reflect:!0})],d.SpectricQuery.prototype,"placeholder",2),Q([v({type:String,reflect:!0})],d.SpectricQuery.prototype,"value",2),Q([v({type:String,reflect:!0})],d.SpectricQuery.prototype,"outputLanguage",2),Q([ze()],d.SpectricQuery.prototype,"completions",2),Q([ze()],d.SpectricQuery.prototype,"completionIndex",2),Q([v({type:Array,reflect:!0})],d.SpectricQuery.prototype,"fields",2),Q([be(".autocomplete")],d.SpectricQuery.prototype,"_autocomplete",2),Q([Ye(".autocomplete")],d.SpectricQuery.prototype,"_asyncAutocomplete",2),Q([be("spectric-input")],d.SpectricQuery.prototype,"_input",2),d.SpectricQuery=Q([L("spectric-query")],d.SpectricQuery);const Ir=R`
710
801
  border-color: color-mix(in hsl, var(--panel-color, #0b0b0b), var(--spectric-input-color, #000000) 3%);
711
802
  background-color: var(--panel-color,#0b0b0b);
712
803
  --spectric-input-color: var(--spectric-background);
@@ -714,7 +805,7 @@ spectric-button{
714
805
  --spectric-text-primary:var(--text-primary);
715
806
  --spectric-text-secondary:var(--text-secondary);
716
807
  filter: drop-shadow(0px 1px 3px color-mix(in srgb, var(--text-secondary, #3c4c5b), transparent 50%));
717
- `,Dr=z`
808
+ `,Fr=R`
718
809
  border-color: color-mix(in hsl, var(--panel-color-inverse,#f4f4f4), var(--spectric-input-color, #000000) 3%);
719
810
  background-color: var(--panel-color-inverse,#0b0b0b);
720
811
  color:var(--text-primary,#3c4c5b);
@@ -722,7 +813,7 @@ spectric-button{
722
813
  --spectric-text-primary:var(--text-secondary);
723
814
  --spectric-text-secondary:var(--text-primary);
724
815
  filter: drop-shadow(0px 1px 3px color-mix(in srgb, var(--text-primary, #3c4c5b), transparent 70%));
725
- `,Xo=z`
816
+ `,un=R`
726
817
  :host{
727
818
  display:block;
728
819
  border:2px solid black;
@@ -732,20 +823,20 @@ spectric-button{
732
823
 
733
824
  }
734
825
  :host(spectric-panel[level='0']) {
735
- ${Nr};
826
+ ${Ir};
736
827
  }
737
828
 
738
829
  :host(spectric-panel[level='1']) {
739
- ${Dr};
830
+ ${Fr};
740
831
  }
741
832
 
742
833
  :host(spectric-panel[level='2']) {
743
- ${Nr};
834
+ ${Ir};
744
835
  }
745
836
  :host(spectric-panel[level='3']) {
746
- ${Dr};
837
+ ${Fr};
747
838
  }
748
- `;var Go=Object.defineProperty,Jo=Object.getOwnPropertyDescriptor,Nt=(n,r,s,i)=>{for(var a=i>1?void 0:i?Jo(r,s):r,t=n.length-1,p;t>=0;t--)(p=n[t])&&(a=(i?p(r,s,a):p(a))||a);return i&&a&&Go(r,s,a),a};d.SpectricPanel=class extends N{constructor(){super(...arguments),this.level=0}updated(){this.layers||(this.layers=this.querySelectorAll("spectric-panel")),this.layers.forEach(r=>{r.setAttribute("level",((this.level+1)%4).toString())}),this.dispatchEvent(new CustomEvent("use-layer",{bubbles:!0,cancelable:!0,composed:!0,detail:{layer:this,level:this.level}}))}render(){return k` <slot></slot> `}},d.SpectricPanel.styles=Xo,Nt([y({type:Number,reflect:!0})],d.SpectricPanel.prototype,"level",2),Nt([y({attribute:!1})],d.SpectricPanel.prototype,"layers",2),d.SpectricPanel=Nt([R("spectric-panel")],d.SpectricPanel);var en=Object.defineProperty,tn=Object.getOwnPropertyDescriptor,Br=(n,r,s,i)=>{for(var a=i>1?void 0:i?tn(r,s):r,t=n.length-1,p;t>=0;t--)(p=n[t])&&(a=(i?p(r,s,a):p(a))||a);return i&&a&&en(r,s,a),a};const rn={"--primary":{control:"color"},"--secondary":{control:"color"},"--tertiary":{control:"color"},"--disabled":{control:"color"},"--background":{control:"color"},"--background-inverse":{control:"color"},"--text-primary":{control:"color"},"--text-secondary":{control:"color"},"--text-on-color":{control:"color"},"--border-radius":{control:"text"}},jr={"--secondary":"#77878b","--tertiary":"#c7c7c7","--disabled":"#000000","--text-primary":"#cccccc","--text-secondary":"#cccccc","--text-on-color":"#ededed","--background":"#181818","--background-inverse":"#37373d"},Rr={...jr,"--primary":"#ffd45a","--text-on-color":"#4f4f4f"},Dt={undefined:{},light:{},dark:jr,spectric:Rr,spectricFlat:{...Rr,"--border-radius":"1px"}},sn=Object.fromEntries(Object.keys(Dt).map(n=>[n,n])),on=`
839
+ `;var dn=Object.defineProperty,hn=Object.getOwnPropertyDescriptor,Ut=(o,r,s,i)=>{for(var a=i>1?void 0:i?hn(r,s):r,e=o.length-1,u;e>=0;e--)(u=o[e])&&(a=(i?u(r,s,a):u(a))||a);return i&&a&&dn(r,s,a),a};d.SpectricPanel=class extends P{constructor(){super(...arguments),this.level=0}updated(){this.layers||(this.layers=this.querySelectorAll("spectric-panel")),this.layers.forEach(r=>{r.setAttribute("level",((this.level+1)%4).toString())}),this.dispatchEvent(new CustomEvent("use-layer",{bubbles:!0,cancelable:!0,composed:!0,detail:{layer:this,level:this.level}}))}render(){return A` <slot></slot> `}},d.SpectricPanel.styles=un,Ut([v({type:Number,reflect:!0})],d.SpectricPanel.prototype,"level",2),Ut([v({attribute:!1})],d.SpectricPanel.prototype,"layers",2),d.SpectricPanel=Ut([L("spectric-panel")],d.SpectricPanel);var fn=Object.defineProperty,gn=Object.getOwnPropertyDescriptor,Qr=(o,r,s,i)=>{for(var a=i>1?void 0:i?gn(r,s):r,e=o.length-1,u;e>=0;e--)(u=o[e])&&(a=(i?u(r,s,a):u(a))||a);return i&&a&&fn(r,s,a),a};const bn={"--primary":{control:"color"},"--secondary":{control:"color"},"--tertiary":{control:"color"},"--disabled":{control:"color"},"--background":{control:"color"},"--background-inverse":{control:"color"},"--text-primary":{control:"color"},"--text-secondary":{control:"color"},"--text-on-color":{control:"color"},"--border-radius":{control:"text"}},Hr={"--secondary":"#77878b","--tertiary":"#c7c7c7","--disabled":"#000000","--text-primary":"#cccccc","--text-secondary":"#cccccc","--text-on-color":"#ededed","--background":"#181818","--background-inverse":"#37373d"},qr={...Hr,"--primary":"#ffd45a","--text-on-color":"#4f4f4f"},It={undefined:{},light:{},dark:Hr,spectric:qr,spectricFlat:{...qr,"--border-radius":"1px"}},vn=Object.fromEntries(Object.keys(It).map(o=>[o,o])),mn=`
749
840
  --spectric-background: var(--background,#ffffff);
750
841
  --spectric-background-hover:var(--background-hover,rgba(141, 141, 141, 0.12));
751
842
  --spectric-background-inverse: var(--background-inverse,#f4f4f4);
@@ -788,12 +879,12 @@ spectric-button{
788
879
  --spectric-text-on-color-disabled: var(--disabled,#c6c6c6)
789
880
  --spectric-button-disabled: #c6c6c6;
790
881
  color: var(--spectric-text-primary);
791
- `;d.SpectricThemeProvider=class extends N{constructor(){super(...arguments),this.theme="undefined"}updated(r){if(r.has("theme")&&this.theme!=r.get("theme")){const s={old:r.get("theme"),new:this.theme};this.dispatchEvent(new CustomEvent("theme-change",{detail:s,bubbles:!0,composed:!0}))}}render(){let r=Object.keys(Dt).includes(this.theme)?this.theme:"undefined",s=Object.entries(Dt[r]).map(i=>`${i[0]}:${i[1]};`).join(`
792
- `);return k`
793
- ${this.theme&&this.theme!=="light"?k`
882
+ `;d.SpectricThemeProvider=class extends P{constructor(){super(...arguments),this.theme="undefined"}updated(r){if(r.has("theme")&&this.theme!=r.get("theme")){const s={old:r.get("theme"),new:this.theme};this.dispatchEvent(new CustomEvent("theme-change",{detail:s,bubbles:!0,composed:!0}))}}render(){let r=Object.keys(It).includes(this.theme)?this.theme:"undefined",s=Object.entries(It[r]).map(i=>`${i[0]}:${i[1]};`).join(`
883
+ `);return A`
884
+ ${this.theme&&this.theme!=="light"?A`
794
885
  <style>:host{
795
886
  ${s};
796
- ${on}
887
+ ${mn}
797
888
  }
798
889
  /* Webkit psudo elements don't pick up variables defined by the host */
799
890
  ::-webkit-scrollbar-thumb {
@@ -864,9 +955,9 @@ spectric-button{
864
955
  }
865
956
  </style>`:null}
866
957
  <slot></slot>
867
- `}},d.SpectricThemeProvider.styles=z`:host{
958
+ `}},d.SpectricThemeProvider.styles=R`:host{
868
959
  display:contents;
869
- }`,Br([y({reflect:!0})],d.SpectricThemeProvider.prototype,"theme",2),d.SpectricThemeProvider=Br([R("spectric-theme")],d.SpectricThemeProvider);const nn=z`
960
+ }`,Qr([v({reflect:!0})],d.SpectricThemeProvider.prototype,"theme",2),d.SpectricThemeProvider=Qr([L("spectric-theme")],d.SpectricThemeProvider);const yn=R`
870
961
  :host {
871
962
  display: block;
872
963
  height: 100%;
@@ -929,7 +1020,7 @@ spectric-button{
929
1020
  width: 5px;
930
1021
  cursor: ew-resize;
931
1022
  }
932
- `;var cn=Object.defineProperty,an=Object.getOwnPropertyDescriptor,B=(n,r,s,i)=>{for(var a=i>1?void 0:i?an(r,s):r,t=n.length-1,p;t>=0;t--)(p=n[t])&&(a=(i?p(r,s,a):p(a))||a);return i&&a&&cn(r,s,a),a},Ur=(n=>(n.horizontal="horizontal",n.vertical="vertical",n))(Ur||{});const Mr="spectric-splitview";d.SplitView=class extends Ar{constructor(){super(),this.orientation="horizontal",this.percentage=50,this.invisible=!1,this.min=10,this.max=90,this.useSavedState=!0,this.isDragging=!1,this._error=!1,this._emitChange=()=>{let{percentage:s,orientation:i,invisible:a,min:t,max:p,useSavedState:g}=this,v=this.getAttribute("id");v&&this.useSavedState&&localStorage.setItem(`splitview-${v}`,String(s)),this.dispatchEvent(new CustomEvent("change",{detail:{orientation:i,percentage:s,invisible:a,min:t,max:p,useSavedState:g}}))},this._onMouseMove=kr(s=>{if(this.isDragging){const i=this.getBoundingClientRect();let a,t;this.orientation==="horizontal"?(a=s.clientX-i.left,t=a/i.width*100):(a=s.clientY-i.top,t=a/i.height*100),t=Math.min(Math.max(t,this.min),this.max),this.percentage=t,this._emitChange()}}),this._assignSlot=s=>{if(!s.target)return;let a=s.target.assignedNodes().filter(t=>t instanceof HTMLElement);a.length>2&&console.log("cannot assign more than 2 elements to a split view"),a.forEach(t=>{if(this._panel1.assignedNodes().length===0){t.slot="panel1";return}if(this._panel2.assignedNodes().length===0){t.slot="panel2";return}this._error="Too many element assigned to split view splitter can only have a maximum of 2 children",console.warn("Too many element assigned to split view splitter can only have a maximum of 2 children")})};let r=this.getAttribute("id");if(r&&this.useSavedState){let s=localStorage.getItem(`splitview-${r}`);s&&(this.percentage=parseFloat(s))}this.addDisposableListener(this._splitter,"mousedown",()=>{this.isDragging=!0}),this.addDisposableListener(this._splitter,"dblclick",()=>{this.percentage=50,this._emitChange()}),this.addDisposableListener(document.body,"mousemove",this._onMouseMove),this.addDisposableListener(document.body,"mouseup",()=>{this.isDragging=!1})}updated(r){r.has("percentage")&&(this.percentage=Math.min(Math.max(Number(this.percentage),this.min),this.max))}render(){return k`
1023
+ `;var $n=Object.defineProperty,_n=Object.getOwnPropertyDescriptor,z=(o,r,s,i)=>{for(var a=i>1?void 0:i?_n(r,s):r,e=o.length-1,u;e>=0;e--)(u=o[e])&&(a=(i?u(r,s,a):u(a))||a);return i&&a&&$n(r,s,a),a},Wr=(o=>(o.horizontal="horizontal",o.vertical="vertical",o))(Wr||{});const Vr="spectric-splitview";d.SplitView=class extends Lr{constructor(){super(),this.orientation="horizontal",this.percentage=50,this.invisible=!1,this.min=10,this.max=90,this.useSavedState=!0,this.isDragging=!1,this._error=!1,this._emitChange=()=>{let{percentage:s,orientation:i,invisible:a,min:e,max:u,useSavedState:g}=this,m=this.getAttribute("id");m&&this.useSavedState&&localStorage.setItem(`splitview-${m}`,String(s)),this.dispatchEvent(new CustomEvent("change",{detail:{orientation:i,percentage:s,invisible:a,min:e,max:u,useSavedState:g}}))},this._onMouseMove=Dr(s=>{if(this.isDragging){const i=this.getBoundingClientRect();let a,e;this.orientation==="horizontal"?(a=s.clientX-i.left,e=a/i.width*100):(a=s.clientY-i.top,e=a/i.height*100),e=Math.min(Math.max(e,this.min),this.max),this.percentage=e,this._emitChange()}}),this._assignSlot=s=>{if(!s.target)return;let a=s.target.assignedNodes().filter(e=>e instanceof HTMLElement);a.length>2&&console.log("cannot assign more than 2 elements to a split view"),a.forEach(e=>{if(this._panel1.assignedNodes().length===0){e.slot="panel1";return}if(this._panel2.assignedNodes().length===0){e.slot="panel2";return}this._error="Too many element assigned to split view splitter can only have a maximum of 2 children",console.warn("Too many element assigned to split view splitter can only have a maximum of 2 children")})};let r=this.getAttribute("id");if(r&&this.useSavedState){let s=localStorage.getItem(`splitview-${r}`);s&&(this.percentage=parseFloat(s))}this.addDisposableListener(this._splitter,"mousedown",()=>{this.isDragging=!0}),this.addDisposableListener(this._splitter,"dblclick",()=>{this.percentage=50,this._emitChange()}),this.addDisposableListener(document.body,"mousemove",this._onMouseMove),this.addDisposableListener(document.body,"mouseup",()=>{this.isDragging=!1})}updated(r){r.has("percentage")&&(this.percentage=Math.min(Math.max(Number(this.percentage),this.min),this.max))}render(){return A`
933
1024
  <div class="split-view ${this.orientation} ${this._error?"error":""} ${this.isDragging?"active":""}" style="--split-percentage: ${this.percentage}%;">
934
1025
  <span class="error-display">${this._error}</span>
935
1026
  <div class="panel" style="${this.orientation==="horizontal"?"flex: var(--split-percentage, 50%)":"max-height: var(--split-percentage, 50%)"}">
@@ -941,5 +1032,53 @@ spectric-button{
941
1032
  </div>
942
1033
  </div>
943
1034
  <slot @slotchange=${this._assignSlot} style="display:none"></slot>
944
- `}},d.SplitView.styles=nn,B([y({type:String})],d.SplitView.prototype,"orientation",2),B([y({type:Number,reflect:!0})],d.SplitView.prototype,"percentage",2),B([y({type:Boolean})],d.SplitView.prototype,"invisible",2),B([y({type:Number,reflect:!0})],d.SplitView.prototype,"min",2),B([y({type:Number,reflect:!0})],d.SplitView.prototype,"max",2),B([y({type:Boolean,reflect:!0})],d.SplitView.prototype,"useSavedState",2),B([Fe()],d.SplitView.prototype,"isDragging",2),B([Fe()],d.SplitView.prototype,"_error",2),B([He(".splitter")],d.SplitView.prototype,"_splitter",2),B([Le("slot[name='panel1']")],d.SplitView.prototype,"_panel1",2),B([Le("slot[name='panel2']")],d.SplitView.prototype,"_panel2",2),d.SplitView=B([R(Mr)],d.SplitView),d.ButtonSizes=mr,d.ButtonVariants=$r,d.CSSPropsControls=rn,d.DialogElementTag=Lt,d.ElementTag=Mr,d.InputVariants=xr,d.Orientations=Ur,d.SupportedLanguages=Tr,d.ThemeSelections=sn,d.nodeTypes=V,Object.defineProperty(d,Symbol.toStringTag,{value:"Module"})});
1035
+ `}},d.SplitView.styles=yn,z([v({type:String})],d.SplitView.prototype,"orientation",2),z([v({type:Number,reflect:!0})],d.SplitView.prototype,"percentage",2),z([v({type:Boolean})],d.SplitView.prototype,"invisible",2),z([v({type:Number,reflect:!0})],d.SplitView.prototype,"min",2),z([v({type:Number,reflect:!0})],d.SplitView.prototype,"max",2),z([v({type:Boolean,reflect:!0})],d.SplitView.prototype,"useSavedState",2),z([ze()],d.SplitView.prototype,"isDragging",2),z([ze()],d.SplitView.prototype,"_error",2),z([Ye(".splitter")],d.SplitView.prototype,"_splitter",2),z([be("slot[name='panel1']")],d.SplitView.prototype,"_panel1",2),z([be("slot[name='panel2']")],d.SplitView.prototype,"_panel2",2),d.SplitView=z([L(Vr)],d.SplitView);var wn=Object.defineProperty,Sn=Object.getOwnPropertyDescriptor,_e=(o,r,s,i)=>{for(var a=i>1?void 0:i?Sn(r,s):r,e=o.length-1,u;e>=0;e--)(u=o[e])&&(a=(i?u(r,s,a):u(a))||a);return i&&a&&wn(r,s,a),a};const Yr="spectric-pagination";console.log("Pagination"),d.PaginationElement=class extends P{constructor(){super(...arguments),this.page=1,this.pageSize=10,this.pageSizeOptions=[10,20,50,100,1e3],this.size="xsmall",this._handlePageUp=()=>{this.page+=1,this._emitChange()},this._handlePageDown=()=>{this.page-=1,this._emitChange()},this._handleSizeChange=r=>{let s=parseInt(r.target.value);this.pageSize=s,this._emitChange()},this._emitChange=()=>{let{page:r,pageSize:s}=this;this.dispatchEvent(new CustomEvent("change",{detail:{page:r,pageSize:s}}))}}createRenderRoot(){return this}updated(r){r.has("pageSize")&&!this.pageSizeOptions.includes(this.pageSize)&&(this.pageSizeOptions=[...this.pageSizeOptions,this.pageSize].sort((s,i)=>s-i))}render(){let r=this.page*this.pageSize,s=!0;this.totalItems&&r<this.totalItems&&(s=!1);let i="";return this.totalItems&&(i=`${this.page} of ${Math.ceil(this.totalItems/this.pageSize)}`),A`
1036
+ <div class="spectric-pagination-container">
1037
+ <div>
1038
+ <!-- TODO/FIXME Make a select component and use it for cross browser styling-->
1039
+ <select @change=${this._handleSizeChange} .value=${String(this.pageSize)}>
1040
+ ${this.pageSizeOptions.map(a=>A`<option .value=${String(a)} class=${String(a)===String(this.pageSize)?"selected":""}>${a}</option>`)}
1041
+ </select>
1042
+ </div>
1043
+ ${this.totalItems?A`
1044
+ <div class="spectric-pagination-text">${`Items ${(this.page-1)*this.pageSize}-${Math.min(this.page*this.pageSize,this.totalItems)} of ${this.totalItems}`}</div>
1045
+ <div class="spectric-pagination-container">
1046
+ <div>
1047
+ ${i}
1048
+ </div>
1049
+ <div>
1050
+ <spectric-button size=${this.size} ?disabled=${this.page===1} @click=${this._handlePageDown} icon><</spectric-button>
1051
+ <spectric-button size=${this.size} ?disabled=${s} @click=${this._handlePageUp} icon>></spectric-button>
1052
+ </div>
1053
+ </div>
1054
+ `:null}
1055
+ </div>
1056
+ `}},_e([v({type:Number,reflect:!0})],d.PaginationElement.prototype,"page",2),_e([v({type:Number,reflect:!0})],d.PaginationElement.prototype,"pageSize",2),_e([v({type:Number,reflect:!0})],d.PaginationElement.prototype,"totalItems",2),_e([v({type:Array})],d.PaginationElement.prototype,"pageSizeOptions",2),_e([v({type:String,reflect:!0})],d.PaginationElement.prototype,"size",2),d.PaginationElement=_e([L(Yr)],d.PaginationElement);var An=Object.defineProperty,xn=Object.getOwnPropertyDescriptor,Kr=(o,r,s,i)=>{for(var a=i>1?void 0:i?xn(r,s):r,e=o.length-1,u;e>=0;e--)(u=o[e])&&(a=(i?u(r,s,a):u(a))||a);return i&&a&&An(r,s,a),a};const kn="spectric-table-header";let Ft=class extends P{constructor(){super(...arguments),this.columns=[]}createRenderRoot(){return this}render(){return A`
1057
+ <tr>
1058
+ ${this.columns.map(o=>{let r=["header-contents"];return o.filterable,A`<td><div class=${r.join(" ")}>${o.title||o.key}</div></td>`})}
1059
+ </tr>
1060
+ `}};Kr([v({type:Array,attribute:!1})],Ft.prototype,"columns",2),Ft=Kr([L(kn)],Ft);var En=Object.defineProperty,Cn=Object.getOwnPropertyDescriptor,ot=(o,r,s,i)=>{for(var a=i>1?void 0:i?Cn(r,s):r,e=o.length-1,u;e>=0;e--)(u=o[e])&&(a=(i?u(r,s,a):u(a))||a);return i&&a&&En(r,s,a),a};const Pn="spectric-table-cell";let Re=class extends P{constructor(){super(),this._handleFilterOut=()=>{let o;this.column.key&&typeof this.row=="object"&&(o=this.row[this.column.key]),this.dispatchEvent(new CustomEvent("filter",{composed:!0,bubbles:!0,detail:{include:!1,row:this.row,value:o,column:this.column}}))},this._handleFilterFor=()=>{let o;this.column.key&&typeof this.row=="object"&&(o=this.row[this.column.key]),this.dispatchEvent(new CustomEvent("filter",{composed:!0,bubbles:!0,detail:{include:!0,row:this.row,value:o,column:this.column}}))},this.styleRules=document.createElement("span").style}updated(o){Object.assign(this.td.style,this.styleRules)}createRenderRoot(){return this}render(){let o;this.column.render?o=this.column.render(this.row,this.table):this.column.key&&typeof this.row=="object"?o=this.row[this.column.key]:o=A`error`;let r=["cell-contents"];this.column.filterable&&r.push("filterable");let s=A`<div class="table-cell-actions">
1061
+ <spectric-button @click=${this._handleFilterOut} size="tiny" variant="text" icon tooltip="Filter Out Value">-</spectric-button>
1062
+ <spectric-button @click=${this._handleFilterFor} size="tiny" variant="text" icon tooltip="Filter For Value">+</spectric-button></div>`;return this.styleRules={...this.styleRules,width:this.column.width?this.column.width+"px":"",whiteSpace:this.column.whiteSpace||""},A`
1063
+ <td>
1064
+ ${this.column.filterable?s:null}
1065
+ <div class=${r.join(" ")}>${o}</div>
1066
+ </td>
1067
+ `}};ot([v({type:Object,attribute:!1})],Re.prototype,"row",2),ot([v({type:Object,attribute:!1})],Re.prototype,"column",2),ot([be("td")],Re.prototype,"td",2),Re=ot([L(Pn)],Re);var Tn=Object.defineProperty,On=Object.getOwnPropertyDescriptor,Qt=(o,r,s,i)=>{for(var a=i>1?void 0:i?On(r,s):r,e=o.length-1,u;e>=0;e--)(u=o[e])&&(a=(i?u(r,s,a):u(a))||a);return i&&a&&Tn(r,s,a),a};const Ln="spectric-table-body";let nt=class extends P{constructor(){super(...arguments),this.data=[],this.columns=[]}createRenderRoot(){return this}render(){return A`
1068
+ <body>
1069
+ ${this.data.map(o=>A`<tr>${this.columns.map(r=>A`<spectric-table-cell .column=${r} .row=${o} .columns=${this.columns}></spectric-table-cell>`)}</tr>`)}
1070
+ </body>
1071
+ `}};Qt([v({type:Array,attribute:!1})],nt.prototype,"data",2),Qt([v({type:Array,attribute:!1})],nt.prototype,"columns",2),nt=Qt([L(Ln)],nt);var Dn=Object.defineProperty,Nn=Object.getOwnPropertyDescriptor,we=(o,r,s,i)=>{for(var a=i>1?void 0:i?Nn(r,s):r,e=o.length-1,u;e>=0;e--)(u=o[e])&&(a=(i?u(r,s,a):u(a))||a);return i&&a&&Dn(r,s,a),a};const Zr="spectric-table";d.TableElement=class extends P{constructor(){super(...arguments),this.data=[],this.columns=[],this._handlePaginationChange=r=>{r.preventDefault(),r.stopPropagation(),this.pagination&&(this.pagination.size,this.pagination={...this.pagination,...r.detail}),this._emitChange()},this._emitChange=()=>{let{pagination:r}=this;this.dispatchEvent(new CustomEvent("change",{detail:{pagination:r}}))},this.__DO_NOT_USE_filter=()=>{this.dispatchEvent(new CustomEvent("filter"))},this.selected=[],this._handleSelectAllChange=r=>{r.stopPropagation(),r.target.checked?this.selected=[...this.data]:this.selected=[],this.dispatchEvent(new CustomEvent("select",{detail:this.selected}))}}createRenderRoot(){return this}render(){let r=this.columns.filter(s=>!s.hidden);return this.select&&r.unshift({title:this.select==="multi"?A`<spectric-input variant="checkbox" @change=${this._handleSelectAllChange} .helperText=${"Select All"}></spectric-input>`:null,render:s=>A`<spectric-input variant="checkbox" .checked=${this.selected.includes(s)} @change=${i=>{if(i.stopPropagation(),this.select==="single"&&(this.selected=[]),i.target.checked)this.selected.push(s),this.dispatchEvent(new CustomEvent("select",{detail:this.selected}));else{let a=this.selected.findIndex(e=>e===s);a!==-1&&(this.selected.splice(a,1),this.dispatchEvent(new CustomEvent("select",{detail:this.selected})))}}}></spectric-input>`}),A`
1072
+ <div role="table">
1073
+ <spectric-table-header .columns=${r}></spectric-table-header>
1074
+ <spectric-table-body .columns=${r} .data=${this.data} .table=${this}></spectric-table-body>
1075
+ </div>
1076
+ ${this.pagination?A`<spectric-pagination ${tt(this.pagination)} @change=${this._handlePaginationChange}></spectric-pagination>`:null}
1077
+ `}},we([v({type:Array,attribute:!1})],d.TableElement.prototype,"data",2),we([v({type:Object,attribute:!1})],d.TableElement.prototype,"pagination",2),we([v({attribute:!1})],d.TableElement.prototype,"columns",2),we([v({type:String,reflect:!1})],d.TableElement.prototype,"select",2),we([ze()],d.TableElement.prototype,"selected",2),d.TableElement=we([L(Zr)],d.TableElement);var jn=Object.defineProperty,zn=Object.getOwnPropertyDescriptor,re=(o,r,s,i)=>{for(var a=i>1?void 0:i?zn(r,s):r,e=o.length-1,u;e>=0;e--)(u=o[e])&&(a=(i?u(r,s,a):u(a))||a);return i&&a&&jn(r,s,a),a};const Xr="spectric-tooltip";var Gr=(o=>(o.top="top",o.bottom="bottom",o.left="left",o.right="right",o.mouse="mouse",o))(Gr||{});d.TooltipElement=class extends P{constructor(){super(...arguments),this.delay=100,this.animationDuration=0,this.text="",this.position="right",this.maxWidth=300,this.portalElement=document.createElement("div"),this.portalTarget=document.body,this.open=!1,this._getMousePosition=r=>{this.mouseLocation={left:r.clientX,top:r.clientY},this.position=="mouse"&&this.open&&!this.mouseframe&&(this.mouseframe=requestAnimationFrame(()=>this.positionTooltip()))},this._hideTooltip=()=>{this.timer&&clearTimeout(this.timer),this.open=!1,this.portalElement.remove()},this.showToolTip=async()=>{this.timer&&clearTimeout(this.timer),await new Promise(s=>{this.timer=window.setTimeout(s,this.delay)}),this.portalElement.style.pointerEvents="none",this.portalElement.className=`spectric-tooltip-portal ${this.position}`;const r=A`<div class="tooltip-container">
1078
+ <span class="tooltip-caret"></span>
1079
+ <div class="tooltip-content">${this.text}</div>
1080
+ </div>`;Ct(r,this.portalElement),!(!this.target||!this.target.checkVisibility())&&(this.portalTarget.appendChild(this.portalElement),this.open=!0,requestAnimationFrame(this.positionTooltip))},this.applyStyle=r=>{Object.entries(r).forEach(([s,i])=>{this.portalElement.style.setProperty(s,i)})},this.positionTooltip=()=>{if(!this.target)return;let r=getComputedStyle(this),s={"--spectric-primary":r.getPropertyValue("--spectric-primary"),"--spectric-background-inverse":r.getPropertyValue("--spectric-background-inverse"),"--spectric-background-hover":r.getPropertyValue("--spectric-background-hover"),"--spectric-text-on-color":r.getPropertyValue("--spectric-text-on-color"),"--spectric-border-radius":r.getPropertyValue("--spectric-border-radius")};const i=this.target.getBoundingClientRect(),a=this.portalElement.getBoundingClientRect();if(this.target!==document.body&&this.maxWidth&&this.maxWidth>0&&(a.width=Math.min(a.width,this.maxWidth)),this.position==="mouse"&&this.mouseLocation){this.mouseframe=void 0;const e={left:this.mouseLocation.left+10+"px",top:this.mouseLocation.top-a.height/2+"px"};this.applyStyle({...s,...e})}else if(this.position==="top"){const e={top:i.top-a.height+"px",left:i.left+i.width/2-a.width/2+"px"};this.applyStyle({...s,...e})}else if(this.position==="bottom"){const e={top:i.bottom+"px",left:i.left+i.width/2-a.width/2+"px"};this.applyStyle({...s,...e})}else if(this.position==="left"){const e={top:Math.max(0,i.top+i.height/2-a.height/2)+"px",left:i.left-a.width+"px"};this.applyStyle({...s,...e})}else if(this.position==="right"){const e={top:Math.max(0,i.top+i.height/2-a.height/2)+"px",left:i.right+"px"};this.applyStyle({...s,...e})}this.position!=="mouse"&&this.portalElement.animate({opacity:[0,1]},{duration:this.animationDuration})}}get target(){return this.triggerTarget||this.parentElement}connectedCallback(){super.connectedCallback(),this.target&&(this.target.addEventListener("mousemove",this._getMousePosition),this.target.addEventListener("mouseover",this.showToolTip),this.target.addEventListener("mouseleave",this._hideTooltip))}disconnectedCallback(){var r,s,i;super.connectedCallback(),(r=this.target)==null||r.removeEventListener("mousemove",this._getMousePosition),(s=this.target)==null||s.removeEventListener("mouseover",this.showToolTip),(i=this.target)==null||i.removeEventListener("mouseleave",this._hideTooltip),this.portalElement.remove()}render(){}},d.TooltipElement.styles=R`:host{max-height: 0px;
1081
+ max-width: 0px;
1082
+ display: none;
1083
+ pointer-events:none;}`,re([v({type:Number,reflect:!0})],d.TooltipElement.prototype,"delay",2),re([v({type:Number,reflect:!0})],d.TooltipElement.prototype,"animationDuration",2),re([v({type:String,reflect:!1})],d.TooltipElement.prototype,"text",2),re([v({type:String,reflect:!0})],d.TooltipElement.prototype,"position",2),re([v({type:Number,reflect:!0})],d.TooltipElement.prototype,"maxWidth",2),re([v({attribute:!1})],d.TooltipElement.prototype,"portalTarget",2),re([v({attribute:!1})],d.TooltipElement.prototype,"triggerTarget",2),d.TooltipElement=re([L(Xr)],d.TooltipElement),d.ButtonSizes=Er,d.ButtonVariants=Cr,d.CSSPropsControls=bn,d.DialogElementTag=Mt,d.ElementTag=Vr,d.InputVariants=Nr,d.Orientations=Wr,d.PaginationElementTag=Yr,d.SupportedLanguages=Mr,d.TableElementTag=Zr,d.ThemeSelections=vn,d.TooltipElementTag=Xr,d.TooltipPostions=Gr,d.nodeTypes=K,Object.defineProperty(d,Symbol.toStringTag,{value:"Module"})});
945
1084
  //# sourceMappingURL=index.umd.js.map