@timlassiter11/yatl 1.0.5 → 1.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/index.d.mts +21 -28
- package/dist/index.d.ts +21 -28
- package/dist/index.js +80 -62
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +78 -62
- package/dist/index.mjs.map +1 -1
- package/dist/yatl.min.global.js +20 -19
- package/dist/yatl.min.global.js.map +1 -1
- package/package.json +1 -1
package/dist/yatl.min.global.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
"use strict";var yatl=(()=>{var dt=Object.defineProperty;var ue=Object.getOwnPropertyDescriptor;var ii=Object.getOwnPropertyNames;var si=Object.prototype.hasOwnProperty;var Ht=(n,e)=>()=>(n&&(e=n(n=0)),e);var de=(n,e)=>{for(var t in e)dt(n,t,{get:e[t],enumerable:!0})},ri=(n,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of ii(e))!si.call(n,s)&&s!==t&&dt(n,s,{get:()=>e[s],enumerable:!(i=ue(e,s))||i.enumerable});return n};var ni=n=>ri(dt({},"__esModule",{value:!0}),n),_=(n,e,t,i)=>{for(var s=i>1?void 0:i?ue(e,t):e,r=n.length-1,o;r>=0;r--)(o=n[r])&&(s=(i?o(e,t,s):o(s))||s);return i&&s&&dt(e,t,s),s};var ct,Ke=Ht(()=>{"use strict";ct=class{constructor(e){this._map=new Map,this._roundAverageSize=!1,this.totalSize=0,e?.roundAverageSize===!0&&(this._roundAverageSize=!0)}set(e,t){let i=this._map.get(e)||0;this._map.set(e,t),this.totalSize+=t-i}get averageSize(){if(this._map.size>0){let e=this.totalSize/this._map.size;return this._roundAverageSize?Math.round(e):e}return 0}getSize(e){return this._map.get(e)}clear(){this._map.clear(),this.totalSize=0}}});function ne(n){return n==="horizontal"?"width":"height"}var Vt,We=Ht(()=>{"use strict";Vt=class{_getDefaultConfig(){return{direction:"vertical"}}constructor(e,t){this._latestCoords={left:0,top:0},this._direction=null,this._viewportSize={width:0,height:0},this.totalScrollSize={width:0,height:0},this.offsetWithinScroller={left:0,top:0},this._pendingReflow=!1,this._pendingLayoutUpdate=!1,this._pin=null,this._firstVisible=0,this._lastVisible=0,this._physicalMin=0,this._physicalMax=0,this._first=-1,this._last=-1,this._sizeDim="height",this._secondarySizeDim="width",this._positionDim="top",this._secondaryPositionDim="left",this._scrollPosition=0,this._scrollError=0,this._items=[],this._scrollSize=1,this._overhang=1e3,this._hostSink=e,Promise.resolve().then(()=>this.config=t||this._getDefaultConfig())}set config(e){Object.assign(this,Object.assign({},this._getDefaultConfig(),e))}get config(){return{direction:this.direction}}get items(){return this._items}set items(e){this._setItems(e)}_setItems(e){e!==this._items&&(this._items=e,this._scheduleReflow())}get direction(){return this._direction}set direction(e){e=e==="horizontal"?e:"vertical",e!==this._direction&&(this._direction=e,this._sizeDim=e==="horizontal"?"width":"height",this._secondarySizeDim=e==="horizontal"?"height":"width",this._positionDim=e==="horizontal"?"left":"top",this._secondaryPositionDim=e==="horizontal"?"top":"left",this._triggerReflow())}get viewportSize(){return this._viewportSize}set viewportSize(e){let{_viewDim1:t,_viewDim2:i}=this;Object.assign(this._viewportSize,e),i!==this._viewDim2?this._scheduleLayoutUpdate():t!==this._viewDim1&&this._checkThresholds()}get viewportScroll(){return this._latestCoords}set viewportScroll(e){Object.assign(this._latestCoords,e);let t=this._scrollPosition;this._scrollPosition=this._latestCoords[this._positionDim],Math.abs(t-this._scrollPosition)>=1&&this._checkThresholds()}reflowIfNeeded(e=!1){(e||this._pendingReflow)&&(this._pendingReflow=!1,this._reflow())}set pin(e){this._pin=e,this._triggerReflow()}get pin(){if(this._pin!==null){let{index:e,block:t}=this._pin;return{index:Math.max(0,Math.min(e,this.items.length-1)),block:t}}return null}_clampScrollPosition(e){return Math.max(-this.offsetWithinScroller[this._positionDim],Math.min(e,this.totalScrollSize[ne(this.direction)]-this._viewDim1))}unpin(){this._pin!==null&&(this._sendUnpinnedMessage(),this._pin=null)}_updateLayout(){}get _viewDim1(){return this._viewportSize[this._sizeDim]}get _viewDim2(){return this._viewportSize[this._secondarySizeDim]}_scheduleReflow(){this._pendingReflow=!0}_scheduleLayoutUpdate(){this._pendingLayoutUpdate=!0,this._scheduleReflow()}_triggerReflow(){this._scheduleLayoutUpdate(),Promise.resolve().then(()=>this.reflowIfNeeded())}_reflow(){this._pendingLayoutUpdate&&(this._updateLayout(),this._pendingLayoutUpdate=!1),this._updateScrollSize(),this._setPositionFromPin(),this._getActiveItems(),this._updateVisibleIndices(),this._sendStateChangedMessage()}_setPositionFromPin(){if(this.pin!==null){let e=this._scrollPosition,{index:t,block:i}=this.pin;this._scrollPosition=this._calculateScrollIntoViewPosition({index:t,block:i||"start"})-this.offsetWithinScroller[this._positionDim],this._scrollError=e-this._scrollPosition}}_calculateScrollIntoViewPosition(e){let{block:t}=e,i=Math.min(this.items.length,Math.max(0,e.index)),s=this._getItemPosition(i)[this._positionDim],r=s;if(t!=="start"){let o=this._getItemSize(i)[this._sizeDim];if(t==="center")r=s-.5*this._viewDim1+.5*o;else{let l=s-this._viewDim1+o;if(t==="end")r=l;else{let a=this._scrollPosition;r=Math.abs(a-s)<Math.abs(a-l)?s:l}}}return r+=this.offsetWithinScroller[this._positionDim],this._clampScrollPosition(r)}getScrollIntoViewCoordinates(e){return{[this._positionDim]:this._calculateScrollIntoViewPosition(e)}}_sendUnpinnedMessage(){this._hostSink({type:"unpinned"})}_sendVisibilityChangedMessage(){this._hostSink({type:"visibilityChanged",firstVisible:this._firstVisible,lastVisible:this._lastVisible})}_sendStateChangedMessage(){let e=new Map;if(this._first!==-1&&this._last!==-1)for(let i=this._first;i<=this._last;i++)e.set(i,this._getItemPosition(i));let t={type:"stateChanged",scrollSize:{[this._sizeDim]:this._scrollSize,[this._secondarySizeDim]:null},range:{first:this._first,last:this._last,firstVisible:this._firstVisible,lastVisible:this._lastVisible},childPositions:e};this._scrollError&&(t.scrollError={[this._positionDim]:this._scrollError,[this._secondaryPositionDim]:0},this._scrollError=0),this._hostSink(t)}get _num(){return this._first===-1||this._last===-1?0:this._last-this._first+1}_checkThresholds(){if(this._viewDim1===0&&this._num>0||this._pin!==null)this._scheduleReflow();else{let e=Math.max(0,this._scrollPosition-this._overhang),t=Math.min(this._scrollSize,this._scrollPosition+this._viewDim1+this._overhang);this._physicalMin>e||this._physicalMax<t?this._scheduleReflow():this._updateVisibleIndices({emit:!0})}}_updateVisibleIndices(e){if(this._first===-1||this._last===-1)return;let t=this._first;for(;t<this._last&&Math.round(this._getItemPosition(t)[this._positionDim]+this._getItemSize(t)[this._sizeDim])<=Math.round(this._scrollPosition);)t++;let i=this._last;for(;i>this._first&&Math.round(this._getItemPosition(i)[this._positionDim])>=Math.round(this._scrollPosition+this._viewDim1);)i--;(t!==this._firstVisible||i!==this._lastVisible)&&(this._firstVisible=t,this._lastVisible=i,e&&e.emit&&this._sendVisibilityChangedMessage())}}});var Qe={};de(Qe,{FlowLayout:()=>Lt,flow:()=>Ti});function qe(n){return n==="horizontal"?"marginLeft":"marginTop"}function $i(n){return n==="horizontal"?"marginRight":"marginBottom"}function zi(n){return n==="horizontal"?"xOffset":"yOffset"}function Oi(n,e){let t=[n,e].sort();return t[1]<=0?Math.min(...t):t[0]>=0?Math.max(...t):t[0]+t[1]}var Ti,oe,Lt,Ge=Ht(()=>{"use strict";Ke();We();Ti=n=>Object.assign({type:Lt},n);oe=class{constructor(){this._childSizeCache=new ct,this._marginSizeCache=new ct,this._metricsCache=new Map}update(e,t){let i=new Set;Object.keys(e).forEach(s=>{let r=Number(s);this._metricsCache.set(r,e[r]),this._childSizeCache.set(r,e[r][ne(t)]),i.add(r),i.add(r+1)});for(let s of i){let r=this._metricsCache.get(s)?.[qe(t)]||0,o=this._metricsCache.get(s-1)?.[$i(t)]||0;this._marginSizeCache.set(s,Oi(r,o))}}get averageChildSize(){return this._childSizeCache.averageSize}get totalChildSize(){return this._childSizeCache.totalSize}get averageMarginSize(){return this._marginSizeCache.averageSize}get totalMarginSize(){return this._marginSizeCache.totalSize}getLeadingMarginValue(e,t){return this._metricsCache.get(e)?.[qe(t)]||0}getChildSize(e){return this._childSizeCache.getSize(e)}getMarginSize(e){return this._marginSizeCache.getSize(e)}clear(){this._childSizeCache.clear(),this._marginSizeCache.clear(),this._metricsCache.clear()}},Lt=class extends Vt{constructor(){super(...arguments),this._itemSize={width:100,height:100},this._physicalItems=new Map,this._newPhysicalItems=new Map,this._metricsCache=new oe,this._anchorIdx=null,this._anchorPos=null,this._stable=!0,this._measureChildren=!0,this._estimate=!0}get measureChildren(){return this._measureChildren}updateItemSizes(e){this._metricsCache.update(e,this.direction),this._scheduleReflow()}_getPhysicalItem(e){return this._newPhysicalItems.get(e)??this._physicalItems.get(e)}_getSize(e){return this._getPhysicalItem(e)&&this._metricsCache.getChildSize(e)}_getAverageSize(){return this._metricsCache.averageChildSize||this._itemSize[this._sizeDim]}_estimatePosition(e){let t=this._metricsCache;if(this._first===-1||this._last===-1)return t.averageMarginSize+e*(t.averageMarginSize+this._getAverageSize());if(e<this._first){let i=this._first-e;return this._getPhysicalItem(this._first).pos-(t.getMarginSize(this._first-1)||t.averageMarginSize)-(i*t.averageChildSize+(i-1)*t.averageMarginSize)}else{let i=e-this._last;return this._getPhysicalItem(this._last).pos+(t.getChildSize(this._last)||t.averageChildSize)+(t.getMarginSize(this._last)||t.averageMarginSize)+i*(t.averageChildSize+t.averageMarginSize)}}_getPosition(e){let t=this._getPhysicalItem(e),{averageMarginSize:i}=this._metricsCache;return e===0?this._metricsCache.getMarginSize(0)??i:t?t.pos:this._estimatePosition(e)}_calculateAnchor(e,t){return e<=0?0:t>this._scrollSize-this._viewDim1?this.items.length-1:Math.max(0,Math.min(this.items.length-1,Math.floor((e+t)/2/this._delta)))}_getAnchor(e,t){if(this._physicalItems.size===0)return this._calculateAnchor(e,t);if(this._first<0)return this._calculateAnchor(e,t);if(this._last<0)return this._calculateAnchor(e,t);let i=this._getPhysicalItem(this._first),s=this._getPhysicalItem(this._last),r=i.pos;if(s.pos+this._metricsCache.getChildSize(this._last)<e)return this._calculateAnchor(e,t);if(r>t)return this._calculateAnchor(e,t);let a=this._firstVisible-1,h=-1/0;for(;h<e;)h=this._getPhysicalItem(++a).pos+this._metricsCache.getChildSize(a);return a}_getActiveItems(){this._viewDim1===0||this.items.length===0?this._clearItems():this._getItems()}_clearItems(){this._first=-1,this._last=-1,this._physicalMin=0,this._physicalMax=0;let e=this._newPhysicalItems;this._newPhysicalItems=this._physicalItems,this._newPhysicalItems.clear(),this._physicalItems=e,this._stable=!0}_getItems(){let e=this._newPhysicalItems;this._stable=!0;let t,i;if(this.pin!==null){let{index:h}=this.pin;this._anchorIdx=h,this._anchorPos=this._getPosition(h)}if(t=this._scrollPosition-this._overhang,i=this._scrollPosition+this._viewDim1+this._overhang,i<0||t>this._scrollSize){this._clearItems();return}(this._anchorIdx===null||this._anchorPos===null)&&(this._anchorIdx=this._getAnchor(t,i),this._anchorPos=this._getPosition(this._anchorIdx));let s=this._getSize(this._anchorIdx);s===void 0&&(this._stable=!1,s=this._getAverageSize());let r=this._metricsCache.getMarginSize(this._anchorIdx)??this._metricsCache.averageMarginSize,o=this._metricsCache.getMarginSize(this._anchorIdx+1)??this._metricsCache.averageMarginSize;this._anchorIdx===0&&(this._anchorPos=r),this._anchorIdx===this.items.length-1&&(this._anchorPos=this._scrollSize-o-s);let l=0;for(this._anchorPos+s+o<t&&(l=t-(this._anchorPos+s+o)),this._anchorPos-r>i&&(l=i-(this._anchorPos-r)),l&&(this._scrollPosition-=l,t-=l,i-=l,this._scrollError+=l),e.set(this._anchorIdx,{pos:this._anchorPos,size:s}),this._first=this._last=this._anchorIdx,this._physicalMin=this._anchorPos-r,this._physicalMax=this._anchorPos+s+o;this._physicalMin>t&&this._first>0;){let h=this._getSize(--this._first);h===void 0&&(this._stable=!1,h=this._getAverageSize());let u=this._metricsCache.getMarginSize(this._first);u===void 0&&(this._stable=!1,u=this._metricsCache.averageMarginSize),this._physicalMin-=h;let c=this._physicalMin;if(e.set(this._first,{pos:c,size:h}),this._physicalMin-=u,this._stable===!1&&this._estimate===!1)break}for(;this._physicalMax<i&&this._last<this.items.length-1;){let h=this._getSize(++this._last);h===void 0&&(this._stable=!1,h=this._getAverageSize());let u=this._metricsCache.getMarginSize(this._last);u===void 0&&(this._stable=!1,u=this._metricsCache.averageMarginSize);let c=this._physicalMax;if(e.set(this._last,{pos:c,size:h}),this._physicalMax+=h+u,!this._stable&&!this._estimate)break}let a=this._calculateError();a&&(this._physicalMin-=a,this._physicalMax-=a,this._anchorPos-=a,this._scrollPosition-=a,e.forEach(h=>h.pos-=a),this._scrollError+=a),this._stable&&(this._newPhysicalItems=this._physicalItems,this._newPhysicalItems.clear(),this._physicalItems=e)}_calculateError(){return this._first===0?this._physicalMin:this._physicalMin<=0?this._physicalMin-this._first*this._delta:this._last===this.items.length-1?this._physicalMax-this._scrollSize:this._physicalMax>=this._scrollSize?this._physicalMax-this._scrollSize+(this.items.length-1-this._last)*this._delta:0}_reflow(){let{_first:e,_last:t}=this;super._reflow(),(this._first===-1&&this._last==-1||this._first===e&&this._last===t)&&this._resetReflowState()}_resetReflowState(){this._anchorIdx=null,this._anchorPos=null,this._stable=!0}_updateScrollSize(){let{averageMarginSize:e}=this._metricsCache;this._scrollSize=Math.max(1,this.items.length*(e+this._getAverageSize())+e)}get _delta(){let{averageMarginSize:e}=this._metricsCache;return this._getAverageSize()+e}_getItemPosition(e){return{[this._positionDim]:this._getPosition(e),[this._secondaryPositionDim]:0,[zi(this.direction)]:-(this._metricsCache.getLeadingMarginValue(e,this.direction)??this._metricsCache.averageMarginSize)}}_getItemSize(e){return{[this._sizeDim]:this._getSize(e)||this._getAverageSize(),[this._secondarySizeDim]:this._itemSize[this._secondarySizeDim]}}_viewDim2Changed(){this._metricsCache.clear(),this._scheduleReflow()}}});var ki={};de(ki,{YatlChangeEvent:()=>q,YatlColumnReorderEvent:()=>J,YatlColumnResizeEvent:()=>X,YatlColumnToggleEvent:()=>G,YatlEvent:()=>w,YatlRowClickEvent:()=>W,YatlSearchEvent:()=>Bt,YatlSortEvent:()=>Q,YatlStateChangeEvent:()=>Z,YatlTable:()=>m,createRegexTokenizer:()=>Zt,whitespaceTokenizer:()=>Yt});var w=class extends CustomEvent{constructor(e,t,i={}){super(e,{bubbles:!0,composed:!0,cancelable:!1,...i,detail:t})}},ft=class ft extends w{constructor(e,t,i,s){super(ft.EVENT_NAME,{row:e,index:t,field:i,originalEvent:s})}};ft.EVENT_NAME="yatl-row-click";var W=ft,pt=class pt extends w{constructor(e){super(pt.EVENT_NAME,{data:e})}};pt.EVENT_NAME="yatl-change";var q=pt,mt=class mt extends w{constructor(e,t){super(mt.EVENT_NAME,{field:e,order:t},{cancelable:!0})}};mt.EVENT_NAME="yatl-sort";var Q=mt,_t=class _t extends w{constructor(e,t){super(_t.EVENT_NAME,{field:e,visible:t},{cancelable:!0})}};_t.EVENT_NAME="yatl-column-toggle";var G=_t,gt=class gt extends w{constructor(e,t){super(gt.EVENT_NAME,{field:e,width:t})}};gt.EVENT_NAME="yatl-column-resize";var X=gt,yt=class yt extends w{constructor(e,t,i){super(yt.EVENT_NAME,{draggedColumn:e,droppedColumn:t,order:i},{cancelable:!0})}};yt.EVENT_NAME="yatl-column-reorder";var J=yt,bt=class bt extends w{constructor(e){super(bt.EVENT_NAME,{query:e})}};bt.EVENT_NAME="yatl-search";var Bt=bt,vt=class vt extends w{constructor(t,i){super(vt.EVENT_NAME,{state:t,triggers:i});this.triggers=i}};vt.EVENT_NAME="yatl-state-change";var Z=vt;var St=globalThis,wt=St.ShadowRoot&&(St.ShadyCSS===void 0||St.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Ft=Symbol(),fe=new WeakMap,Y=class{constructor(e,t,i){if(this._$cssResult$=!0,i!==Ft)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o,t=this.t;if(wt&&e===void 0){let i=t!==void 0&&t.length===1;i&&(e=fe.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),i&&fe.set(t,e))}return e}toString(){return this.cssText}},pe=n=>new Y(typeof n=="string"?n:n+"",void 0,Ft),Kt=(n,...e)=>{let t=n.length===1?n[0]:e.reduce((i,s,r)=>i+(o=>{if(o._$cssResult$===!0)return o.cssText;if(typeof o=="number")return o;throw Error("Value passed to 'css' function must be a 'css' function result: "+o+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(s)+n[r+1],n[0]);return new Y(t,n,Ft)},me=(n,e)=>{if(wt)n.adoptedStyleSheets=e.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(let t of e){let i=document.createElement("style"),s=St.litNonce;s!==void 0&&i.setAttribute("nonce",s),i.textContent=t.cssText,n.appendChild(i)}},Wt=wt?n=>n:n=>n instanceof CSSStyleSheet?(e=>{let t="";for(let i of e.cssRules)t+=i.cssText;return pe(t)})(n):n;var{is:oi,defineProperty:li,getOwnPropertyDescriptor:ai,getOwnPropertyNames:hi,getOwnPropertySymbols:ci,getPrototypeOf:ui}=Object,M=globalThis,_e=M.trustedTypes,di=_e?_e.emptyScript:"",fi=M.reactiveElementPolyfillSupport,tt=(n,e)=>n,et={toAttribute(n,e){switch(e){case Boolean:n=n?di:null;break;case Object:case Array:n=n==null?n:JSON.stringify(n)}return n},fromAttribute(n,e){let t=n;switch(e){case Boolean:t=n!==null;break;case Number:t=n===null?null:Number(n);break;case Object:case Array:try{t=JSON.parse(n)}catch{t=null}}return t}},Ct=(n,e)=>!oi(n,e),ge={attribute:!0,type:String,converter:et,reflect:!1,useDefault:!1,hasChanged:Ct};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),M.litPropertyMetadata??(M.litPropertyMetadata=new WeakMap);var $=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??(this.l=[])).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=ge){if(t.state&&(t.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(e,t),!t.noAccessor){let i=Symbol(),s=this.getPropertyDescriptor(e,i,t);s!==void 0&&li(this.prototype,e,s)}}static getPropertyDescriptor(e,t,i){let{get:s,set:r}=ai(this.prototype,e)??{get(){return this[t]},set(o){this[t]=o}};return{get:s,set(o){let l=s?.call(this);r?.call(this,o),this.requestUpdate(e,l,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??ge}static _$Ei(){if(this.hasOwnProperty(tt("elementProperties")))return;let e=ui(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(tt("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(tt("properties"))){let t=this.properties,i=[...hi(t),...ci(t)];for(let s of i)this.createProperty(s,t[s])}let e=this[Symbol.metadata];if(e!==null){let t=litPropertyMetadata.get(e);if(t!==void 0)for(let[i,s]of t)this.elementProperties.set(i,s)}this._$Eh=new Map;for(let[t,i]of this.elementProperties){let s=this._$Eu(t,i);s!==void 0&&this._$Eh.set(s,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){let t=[];if(Array.isArray(e)){let i=new Set(e.flat(1/0).reverse());for(let s of i)t.unshift(Wt(s))}else e!==void 0&&t.push(Wt(e));return t}static _$Eu(e,t){let i=t.attribute;return i===!1?void 0:typeof i=="string"?i:typeof e=="string"?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(e=>e(this))}addController(e){(this._$EO??(this._$EO=new Set)).add(e),this.renderRoot!==void 0&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){let e=new Map,t=this.constructor.elementProperties;for(let i of t.keys())this.hasOwnProperty(i)&&(e.set(i,this[i]),delete this[i]);e.size>0&&(this._$Ep=e)}createRenderRoot(){let e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return me(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),this._$EO?.forEach(e=>e.hostConnected?.())}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach(e=>e.hostDisconnected?.())}attributeChangedCallback(e,t,i){this._$AK(e,i)}_$ET(e,t){let i=this.constructor.elementProperties.get(e),s=this.constructor._$Eu(e,i);if(s!==void 0&&i.reflect===!0){let r=(i.converter?.toAttribute!==void 0?i.converter:et).toAttribute(t,i.type);this._$Em=e,r==null?this.removeAttribute(s):this.setAttribute(s,r),this._$Em=null}}_$AK(e,t){let i=this.constructor,s=i._$Eh.get(e);if(s!==void 0&&this._$Em!==s){let r=i.getPropertyOptions(s),o=typeof r.converter=="function"?{fromAttribute:r.converter}:r.converter?.fromAttribute!==void 0?r.converter:et;this._$Em=s;let l=o.fromAttribute(t,r.type);this[s]=l??this._$Ej?.get(s)??l,this._$Em=null}}requestUpdate(e,t,i,s=!1,r){if(e!==void 0){let o=this.constructor;if(s===!1&&(r=this[e]),i??(i=o.getPropertyOptions(e)),!((i.hasChanged??Ct)(r,t)||i.useDefault&&i.reflect&&r===this._$Ej?.get(e)&&!this.hasAttribute(o._$Eu(e,i))))return;this.C(e,t,i)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(e,t,{useDefault:i,reflect:s,wrapped:r},o){i&&!(this._$Ej??(this._$Ej=new Map)).has(e)&&(this._$Ej.set(e,o??t??this[e]),r!==!0||o!==void 0)||(this._$AL.has(e)||(this.hasUpdated||i||(t=void 0),this._$AL.set(e,t)),s===!0&&this._$Em!==e&&(this._$Eq??(this._$Eq=new Set)).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}let e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(let[s,r]of this._$Ep)this[s]=r;this._$Ep=void 0}let i=this.constructor.elementProperties;if(i.size>0)for(let[s,r]of i){let{wrapped:o}=r,l=this[s];o!==!0||this._$AL.has(s)||l===void 0||this.C(s,void 0,r,l)}}let e=!1,t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),this._$EO?.forEach(i=>i.hostUpdate?.()),this.update(t)):this._$EM()}catch(i){throw e=!1,this._$EM(),i}e&&this._$AE(t)}willUpdate(e){}_$AE(e){this._$EO?.forEach(t=>t.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&(this._$Eq=this._$Eq.forEach(t=>this._$ET(t,this[t]))),this._$EM()}updated(e){}firstUpdated(e){}};$.elementStyles=[],$.shadowRootOptions={mode:"open"},$[tt("elementProperties")]=new Map,$[tt("finalized")]=new Map,fi?.({ReactiveElement:$}),(M.reactiveElementVersions??(M.reactiveElementVersions=[])).push("2.1.2");var st=globalThis,ye=n=>n,Et=st.trustedTypes,be=Et?Et.createPolicy("lit-html",{createHTML:n=>n}):void 0,Qt="$lit$",z=`lit$${Math.random().toFixed(9).slice(2)}$`,Gt="?"+z,pi=`<${Gt}>`,I=document,rt=()=>I.createComment(""),nt=n=>n===null||typeof n!="object"&&typeof n!="function",Xt=Array.isArray,xe=n=>Xt(n)||typeof n?.[Symbol.iterator]=="function",qt=`[
|
|
2
|
-
\f\r]`,it=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,
|
|
3
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),we=/'/g,Ce=/"/g,Te=/^(?:script|style|textarea|title)$/i,Jt=n=>(e,...t)=>({_$litType$:n,strings:e,values:t}),b=Jt(1),Hi=Jt(2),Bi=Jt(3),S=Symbol.for("lit-noChange"),g=Symbol.for("lit-nothing"),Ee=new WeakMap,k=I.createTreeWalker(I,129);function $e(n,e){if(!Xt(n)||!n.hasOwnProperty("raw"))throw Error("invalid template strings array");return be!==void 0?be.createHTML(e):e}var ze=(n,e)=>{let t=n.length-1,i=[],s,r=e===2?"<svg>":e===3?"<math>":"",o=it;for(let l=0;l<t;l++){let a=n[l],h,u,c=-1,f=0;for(;f<a.length&&(o.lastIndex=f,u=o.exec(a),u!==null);)f=o.lastIndex,o===it?u[1]==="!--"?o=ve:u[1]!==void 0?o=Se:u[2]!==void 0?(Te.test(u[2])&&(s=RegExp("</"+u[2],"g")),o=D):u[3]!==void 0&&(o=D):o===D?u[0]===">"?(o=s??it,c=-1):u[1]===void 0?c=-2:(c=o.lastIndex-u[2].length,h=u[1],o=u[3]===void 0?D:u[3]==='"'?Ce:we):o===Ce||o===we?o=D:o===ve||o===Se?o=it:(o=D,s=void 0);let d=o===D&&n[l+1].startsWith("/>")?" ":"";r+=o===it?a+pi:c>=0?(i.push(h),a.slice(0,c)+Qt+a.slice(c)+z+d):a+z+(c===-2?l:d)}return[$e(n,r+(n[t]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),i]},ot=class n{constructor({strings:e,_$litType$:t},i){let s;this.parts=[];let r=0,o=0,l=e.length-1,a=this.parts,[h,u]=ze(e,t);if(this.el=n.createElement(h,i),k.currentNode=this.el.content,t===2||t===3){let c=this.el.content.firstChild;c.replaceWith(...c.childNodes)}for(;(s=k.nextNode())!==null&&a.length<l;){if(s.nodeType===1){if(s.hasAttributes())for(let c of s.getAttributeNames())if(c.endsWith(Qt)){let f=u[o++],d=s.getAttribute(c).split(z),y=/([.?@])?(.*)/.exec(f);a.push({type:1,index:r,name:y[2],strings:d,ctor:y[1]==="."?Tt:y[1]==="?"?$t:y[1]==="@"?zt:L}),s.removeAttribute(c)}else c.startsWith(z)&&(a.push({type:6,index:r}),s.removeAttribute(c));if(Te.test(s.tagName)){let c=s.textContent.split(z),f=c.length-1;if(f>0){s.textContent=Et?Et.emptyScript:"";for(let d=0;d<f;d++)s.append(c[d],rt()),k.nextNode(),a.push({type:2,index:++r});s.append(c[f],rt())}}}else if(s.nodeType===8)if(s.data===Gt)a.push({type:2,index:r});else{let c=-1;for(;(c=s.data.indexOf(z,c+1))!==-1;)a.push({type:7,index:r}),c+=z.length-1}r++}}static createElement(e,t){let i=I.createElement("template");return i.innerHTML=e,i}};function V(n,e,t=n,i){if(e===S)return e;let s=i!==void 0?t._$Co?.[i]:t._$Cl,r=nt(e)?void 0:e._$litDirective$;return s?.constructor!==r&&(s?._$AO?.(!1),r===void 0?s=void 0:(s=new r(n),s._$AT(n,t,i)),i!==void 0?(t._$Co??(t._$Co=[]))[i]=s:t._$Cl=s),s!==void 0&&(e=V(n,s._$AS(n,e.values),s,i)),e}var xt=class{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){let{el:{content:t},parts:i}=this._$AD,s=(e?.creationScope??I).importNode(t,!0);k.currentNode=s;let r=k.nextNode(),o=0,l=0,a=i[0];for(;a!==void 0;){if(o===a.index){let h;a.type===2?h=new j(r,r.nextSibling,this,e):a.type===1?h=new a.ctor(r,a.name,a.strings,this,e):a.type===6&&(h=new Ot(r,this,e)),this._$AV.push(h),a=i[++l]}o!==a?.index&&(r=k.nextNode(),o++)}return k.currentNode=I,s}p(e){let t=0;for(let i of this._$AV)i!==void 0&&(i.strings!==void 0?(i._$AI(e,i,t),t+=i.strings.length-2):i._$AI(e[t])),t++}},j=class n{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,t,i,s){this.type=2,this._$AH=g,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=i,this.options=s,this._$Cv=s?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode,t=this._$AM;return t!==void 0&&e?.nodeType===11&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=V(this,e,t),nt(e)?e===g||e==null||e===""?(this._$AH!==g&&this._$AR(),this._$AH=g):e!==this._$AH&&e!==S&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):xe(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==g&&nt(this._$AH)?this._$AA.nextSibling.data=e:this.T(I.createTextNode(e)),this._$AH=e}$(e){let{values:t,_$litType$:i}=e,s=typeof i=="number"?this._$AC(e):(i.el===void 0&&(i.el=ot.createElement($e(i.h,i.h[0]),this.options)),i);if(this._$AH?._$AD===s)this._$AH.p(t);else{let r=new xt(s,this),o=r.u(this.options);r.p(t),this.T(o),this._$AH=r}}_$AC(e){let t=Ee.get(e.strings);return t===void 0&&Ee.set(e.strings,t=new ot(e)),t}k(e){Xt(this._$AH)||(this._$AH=[],this._$AR());let t=this._$AH,i,s=0;for(let r of e)s===t.length?t.push(i=new n(this.O(rt()),this.O(rt()),this,this.options)):i=t[s],i._$AI(r),s++;s<t.length&&(this._$AR(i&&i._$AB.nextSibling,s),t.length=s)}_$AR(e=this._$AA.nextSibling,t){for(this._$AP?.(!1,!0,t);e!==this._$AB;){let i=ye(e).nextSibling;ye(e).remove(),e=i}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e))}},L=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,i,s,r){this.type=1,this._$AH=g,this._$AN=void 0,this.element=e,this.name=t,this._$AM=s,this.options=r,i.length>2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=g}_$AI(e,t=this,i,s){let r=this.strings,o=!1;if(r===void 0)e=V(this,e,t,0),o=!nt(e)||e!==this._$AH&&e!==S,o&&(this._$AH=e);else{let l=e,a,h;for(e=r[0],a=0;a<r.length-1;a++)h=V(this,l[i+a],t,a),h===S&&(h=this._$AH[a]),o||(o=!nt(h)||h!==this._$AH[a]),h===g?e=g:e!==g&&(e+=(h??"")+r[a+1]),this._$AH[a]=h}o&&!s&&this.j(e)}j(e){e===g?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}},Tt=class extends L{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===g?void 0:e}},$t=class extends L{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==g)}},zt=class extends L{constructor(e,t,i,s,r){super(e,t,i,s,r),this.type=5}_$AI(e,t=this){if((e=V(this,e,t,0)??g)===S)return;let i=this._$AH,s=e===g&&i!==g||e.capture!==i.capture||e.once!==i.once||e.passive!==i.passive,r=e!==g&&(i===g||s);s&&this.element.removeEventListener(this.name,this,i),r&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}},Ot=class{constructor(e,t,i){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(e){V(this,e)}},Oe={M:Qt,P:z,A:Gt,C:1,L:ze,R:xt,D:xe,V,I:j,H:L,N:$t,U:zt,B:Tt,F:Ot},mi=st.litHtmlPolyfillSupport;mi?.(ot,j),(st.litHtmlVersions??(st.litHtmlVersions=[])).push("3.3.2");var Ae=(n,e,t)=>{let i=t?.renderBefore??e,s=i._$litPart$;if(s===void 0){let r=t?.renderBefore??null;i._$litPart$=s=new j(e.insertBefore(rt(),r),r,void 0,t??{})}return s._$AI(n),s};var lt=globalThis,C=class extends ${constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t;let e=super.createRenderRoot();return(t=this.renderOptions).renderBefore??(t.renderBefore=e.firstChild),e}update(e){let t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=Ae(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return S}};C._$litElement$=!0,C.finalized=!0,lt.litElementHydrateSupport?.({LitElement:C});var _i=lt.litElementPolyfillSupport;_i?.({LitElement:C});(lt.litElementVersions??(lt.litElementVersions=[])).push("4.2.2");var Me=n=>n.replace(/_/g," ").replace(/([a-z])([A-Z])/g,"$1 $2").replace(/\b\w/g,e=>e.toUpperCase()),Zt=(n="\\S+")=>{let e=new RegExp(`"[^"]*"|${n}`,"g");return t=>(t.match(e)||[]).map(s=>(s=s.toLocaleLowerCase().trim(),s.startsWith('"')&&s.endsWith('"')?{value:s.slice(1,-1),quoted:!0}:{value:s,quoted:!1}))},Yt=Zt();function gi(n,e){return n in e}function R(n,e){let t=e.split("."),i=n;for(let s of t)if(i&&gi(s,i))i=i[s];else return;return i}function At(n,e){return e.find(t=>t.field===n)}function Re(n,e){if(!n||!e||e.length===0)return n;let t=[...e].sort((l,a)=>l[0]-a[0]),i=[],s=t[0];for(let l=1;l<t.length;l++){let a=t[l];a[0]<s[1]?s[1]=Math.max(s[1],a[1]):(i.push(s),s=a)}i.push(s);let r=[],o=0;for(let[l,a]of i){let h=Math.max(0,Math.min(l,n.length)),u=Math.max(0,Math.min(a,n.length));h>o&&r.push(n.slice(o,h)),r.push(b`<mark class="highlight">${n.slice(h,u)}</mark>`),o=u}return o<n.length&&r.push(n.slice(o)),b`${r}`}function te(n,e="1fr"){return n.map(t=>t?`${t}px`:e)}function Pe(n){return typeof n=="string"||typeof n=="number"||typeof n=="boolean"||n instanceof Date}function ee(n){return n?.role!=="internal"}var De=n=>(e,t)=>{t!==void 0?t.addInitializer(()=>{customElements.define(n,e)}):customElements.define(n,e)};var yi={attribute:!0,type:String,converter:et,reflect:!1,hasChanged:Ct},bi=(n=yi,e,t)=>{let{kind:i,metadata:s}=t,r=globalThis.litPropertyMetadata.get(s);if(r===void 0&&globalThis.litPropertyMetadata.set(s,r=new Map),i==="setter"&&((n=Object.create(n)).wrapped=!0),r.set(t.name,n),i==="accessor"){let{name:o}=t;return{set(l){let a=e.get.call(this);e.set.call(this,l),this.requestUpdate(o,a,n,!0,l)},init(l){return l!==void 0&&this.C(o,void 0,n,l),l}}}if(i==="setter"){let{name:o}=t;return function(l){let a=this[o];e.call(this,l),this.requestUpdate(o,a,n,!0,l)}}throw Error("Unsupported decorator location: "+i)};function p(n){return(e,t)=>typeof t=="object"?bi(n,e,t):((i,s,r)=>{let o=s.hasOwnProperty(r);return s.constructor.createProperty(r,i),o?Object.getOwnPropertyDescriptor(s,r):void 0})(n,e,t)}function ke(n){return p({...n,state:!0,attribute:!1})}var N=(n,e,t)=>(t.configurable=!0,t.enumerable=!0,Reflect.decorate&&typeof e!="object"&&Object.defineProperty(n,e,t),t);function ie(n,e){return(t,i,s)=>{let r=o=>o.renderRoot?.querySelector(n)??null;if(e){let{get:o,set:l}=typeof i=="object"?t:s??(()=>{let a=Symbol();return{get(){return this[a]},set(h){this[a]=h}}})();return N(t,i,{get(){let a=o.call(this);return a===void 0&&(a=r(this),(a!==null||this.hasUpdated)&&l.call(this,a)),a}})}return N(t,i,{get(){return r(this)}})}}var x={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},O=n=>(...e)=>({_$litDirective$:n,values:e}),E=class{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,i){this._$Ct=e,this._$AM=t,this._$Ci=i}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}};var Mt=O(class extends E{constructor(n){if(super(n),n.type!==x.ATTRIBUTE||n.name!=="class"||n.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(n){return" "+Object.keys(n).filter(e=>n[e]).join(" ")+" "}update(n,[e]){if(this.st===void 0){this.st=new Set,n.strings!==void 0&&(this.nt=new Set(n.strings.join(" ").split(/\s/).filter(i=>i!=="")));for(let i in e)e[i]&&!this.nt?.has(i)&&this.st.add(i);return this.render(e)}let t=n.element.classList;for(let i of this.st)i in e||(t.remove(i),this.st.delete(i));for(let i in e){let s=!!e[i];s===this.st.has(i)||this.nt?.has(i)||(s?(t.add(i),this.st.add(i)):(t.remove(i),this.st.delete(i)))}return S}});var se=n=>n??g;var{I:vi}=Oe,Ie=n=>n;var Le=n=>n.strings===void 0,Ve=()=>document.createComment(""),U=(n,e,t)=>{let i=n._$AA.parentNode,s=e===void 0?n._$AB:e._$AA;if(t===void 0){let r=i.insertBefore(Ve(),s),o=i.insertBefore(Ve(),s);t=new vi(r,o,n,n.options)}else{let r=t._$AB.nextSibling,o=t._$AM,l=o!==n;if(l){let a;t._$AQ?.(n),t._$AM=n,t._$AP!==void 0&&(a=n._$AU)!==o._$AU&&t._$AP(a)}if(r!==s||l){let a=t._$AA;for(;a!==r;){let h=Ie(a).nextSibling;Ie(i).insertBefore(a,s),a=h}}}return t},P=(n,e,t=n)=>(n._$AI(e,t),n),Si={},Ne=(n,e=Si)=>n._$AH=e,je=n=>n._$AH,Rt=n=>{n._$AR(),n._$AA.remove()};var Ue=(n,e,t)=>{let i=new Map;for(let s=e;s<=t;s++)i.set(n[s],s);return i},Pt=O(class extends E{constructor(n){if(super(n),n.type!==x.CHILD)throw Error("repeat() can only be used in text expressions")}dt(n,e,t){let i;t===void 0?t=e:e!==void 0&&(i=e);let s=[],r=[],o=0;for(let l of n)s[o]=i?i(l,o):o,r[o]=t(l,o),o++;return{values:r,keys:s}}render(n,e,t){return this.dt(n,e,t).values}update(n,[e,t,i]){let s=je(n),{values:r,keys:o}=this.dt(e,t,i);if(!Array.isArray(s))return this.ut=o,r;let l=this.ut??(this.ut=[]),a=[],h,u,c=0,f=s.length-1,d=0,y=r.length-1;for(;c<=f&&d<=y;)if(s[c]===null)c++;else if(s[f]===null)f--;else if(l[c]===o[d])a[d]=P(s[c],r[d]),c++,d++;else if(l[f]===o[y])a[y]=P(s[f],r[y]),f--,y--;else if(l[c]===o[y])a[y]=P(s[c],r[y]),U(n,a[y+1],s[c]),c++,y--;else if(l[f]===o[d])a[d]=P(s[f],r[d]),U(n,s[c],s[f]),f--,d++;else if(h===void 0&&(h=Ue(o,d,y),u=Ue(l,c,f)),h.has(l[c]))if(h.has(l[f])){let v=u.get(o[d]),K=v!==void 0?s[v]:null;if(K===null){let T=U(n,s[c]);P(T,r[d]),a[d]=T}else a[d]=P(K,r[d]),U(n,s[c],K),s[v]=null;d++}else Rt(s[f]),f--;else Rt(s[c]),c++;for(;d<=y;){let v=U(n,a[y+1]);P(v,r[d]),a[d++]=v}for(;c<=f;){let v=s[c++];v!==null&&Rt(v)}return this.ut=o,Ne(n,a),S}});var He="important",wi=" !"+He,Be=O(class extends E{constructor(n){if(super(n),n.type!==x.ATTRIBUTE||n.name!=="style"||n.strings?.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((e,t)=>{let i=n[t];return i==null?e:e+`${t=t.includes("-")?t:t.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${i};`},"")}update(n,[e]){let{style:t}=n.element;if(this.ft===void 0)return this.ft=new Set(Object.keys(e)),this.render(e);for(let i of this.ft)e[i]==null&&(this.ft.delete(i),i.includes("-")?t.removeProperty(i):t[i]=null);for(let i in e){let s=e[i];if(s!=null){this.ft.add(i);let r=typeof s=="string"&&s.endsWith(wi);i.includes("-")||r?t.setProperty(i,r?s.slice(0,-11):s,r?He:""):t[i]=s}}return S}});function H(n,e,t,i){var s=arguments.length,r=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(n,e,t,i);else for(var l=n.length-1;l>=0;l--)(o=n[l])&&(r=(s<3?o(r):s>3?o(e,t,r):o(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r}var at=(n,e)=>{let t=n._$AN;if(t===void 0)return!1;for(let i of t)i._$AO?.(e,!1),at(i,e);return!0},Dt=n=>{let e,t;do{if((e=n._$AM)===void 0)break;t=e._$AN,t.delete(n),n=e}while(t?.size===0)},Fe=n=>{for(let e;e=n._$AM;n=e){let t=e._$AN;if(t===void 0)e._$AN=t=new Set;else if(t.has(n))break;t.add(n),xi(e)}};function Ci(n){this._$AN!==void 0?(Dt(this),this._$AM=n,Fe(this)):this._$AM=n}function Ei(n,e=!1,t=0){let i=this._$AH,s=this._$AN;if(s!==void 0&&s.size!==0)if(e)if(Array.isArray(i))for(let r=t;r<i.length;r++)at(i[r],!1),Dt(i[r]);else i!=null&&(at(i,!1),Dt(i));else at(this,n)}var xi=n=>{n.type==x.CHILD&&(n._$AP??(n._$AP=Ei),n._$AQ??(n._$AQ=Ci))},kt=class extends E{constructor(){super(...arguments),this._$AN=void 0}_$AT(e,t,i){super._$AT(e,t,i),Fe(this),this.isConnected=e._$AU}_$AO(e,t=!0){e!==this.isConnected&&(this.isConnected=e,e?this.reconnected?.():this.disconnected?.()),t&&(at(this,e),Dt(this))}setValue(e){if(Le(this._$Ct))this._$Ct._$AI(e,this);else{let t=[...this._$Ct._$AH];t[this._$Ci]=e,this._$Ct._$AI(t,this,0)}}disconnected(){}reconnected(){}};var B=class n extends Event{constructor(e){super(n.eventName,{bubbles:!1}),this.first=e.first,this.last=e.last}};B.eventName="rangeChanged";var F=class n extends Event{constructor(e){super(n.eventName,{bubbles:!1}),this.first=e.first,this.last=e.last}};F.eventName="visibilityChanged";var ht=class n extends Event{constructor(){super(n.eventName,{bubbles:!1})}};ht.eventName="unpinned";var re=class{constructor(e){this._element=null;let t=e??window;this._node=t,e&&(this._element=e)}get element(){return this._element||document.scrollingElement||document.documentElement}get scrollTop(){return this.element.scrollTop||window.scrollY}get scrollLeft(){return this.element.scrollLeft||window.scrollX}get scrollHeight(){return this.element.scrollHeight}get scrollWidth(){return this.element.scrollWidth}get viewportHeight(){return this._element?this._element.getBoundingClientRect().height:window.innerHeight}get viewportWidth(){return this._element?this._element.getBoundingClientRect().width:window.innerWidth}get maxScrollTop(){return this.scrollHeight-this.viewportHeight}get maxScrollLeft(){return this.scrollWidth-this.viewportWidth}},It=class extends re{constructor(e,t){super(t),this._clients=new Set,this._retarget=null,this._end=null,this.__destination=null,this.correctingScrollError=!1,this._checkForArrival=this._checkForArrival.bind(this),this._updateManagedScrollTo=this._updateManagedScrollTo.bind(this),this.scrollTo=this.scrollTo.bind(this),this.scrollBy=this.scrollBy.bind(this);let i=this._node;this._originalScrollTo=i.scrollTo,this._originalScrollBy=i.scrollBy,this._originalScroll=i.scroll,this._attach(e)}get _destination(){return this.__destination}get scrolling(){return this._destination!==null}scrollTo(e,t){let i=typeof e=="number"&&typeof t=="number"?{left:e,top:t}:e;this._scrollTo(i)}scrollBy(e,t){let i=typeof e=="number"&&typeof t=="number"?{left:e,top:t}:e;i.top!==void 0&&(i.top+=this.scrollTop),i.left!==void 0&&(i.left+=this.scrollLeft),this._scrollTo(i)}_nativeScrollTo(e){this._originalScrollTo.bind(this._element||window)(e)}_scrollTo(e,t=null,i=null){this._end!==null&&this._end(),e.behavior==="smooth"?(this._setDestination(e),this._retarget=t,this._end=i):this._resetScrollState(),this._nativeScrollTo(e)}_setDestination(e){let{top:t,left:i}=e;return t=t===void 0?void 0:Math.max(0,Math.min(t,this.maxScrollTop)),i=i===void 0?void 0:Math.max(0,Math.min(i,this.maxScrollLeft)),this._destination!==null&&i===this._destination.left&&t===this._destination.top?!1:(this.__destination={top:t,left:i,behavior:"smooth"},!0)}_resetScrollState(){this.__destination=null,this._retarget=null,this._end=null}_updateManagedScrollTo(e){this._destination&&this._setDestination(e)&&this._nativeScrollTo(this._destination)}managedScrollTo(e,t,i){return this._scrollTo(e,t,i),this._updateManagedScrollTo}correctScrollError(e){this.correctingScrollError=!0,requestAnimationFrame(()=>requestAnimationFrame(()=>this.correctingScrollError=!1)),this._nativeScrollTo(e),this._retarget&&this._setDestination(this._retarget()),this._destination&&this._nativeScrollTo(this._destination)}_checkForArrival(){if(this._destination!==null){let{scrollTop:e,scrollLeft:t}=this,{top:i,left:s}=this._destination;i=Math.min(i||0,this.maxScrollTop),s=Math.min(s||0,this.maxScrollLeft);let r=Math.abs(i-e),o=Math.abs(s-t);r<1&&o<1&&(this._end&&this._end(),this._resetScrollState())}}detach(e){return this._clients.delete(e),this._clients.size===0&&(this._node.scrollTo=this._originalScrollTo,this._node.scrollBy=this._originalScrollBy,this._node.scroll=this._originalScroll,this._node.removeEventListener("scroll",this._checkForArrival)),null}_attach(e){this._clients.add(e),this._clients.size===1&&(this._node.scrollTo=this.scrollTo,this._node.scrollBy=this.scrollBy,this._node.scroll=this.scrollTo,this._node.addEventListener("scroll",this._checkForArrival))}};var Xe=typeof window<"u"?window.ResizeObserver:void 0;var ut=Symbol("virtualizerRef"),Nt="virtualizer-sizer",Je,Ut=class{constructor(e){if(this._benchmarkStart=null,this._layout=null,this._clippingAncestors=[],this._scrollSize=null,this._scrollError=null,this._childrenPos=null,this._childMeasurements=null,this._toBeMeasured=new Map,this._rangeChanged=!0,this._itemsChanged=!0,this._visibilityChanged=!0,this._scrollerController=null,this._isScroller=!1,this._sizer=null,this._hostElementRO=null,this._childrenRO=null,this._mutationObserver=null,this._scrollEventListeners=[],this._scrollEventListenerOptions={passive:!0},this._loadListener=this._childLoaded.bind(this),this._scrollIntoViewTarget=null,this._updateScrollIntoViewCoordinates=null,this._items=[],this._first=-1,this._last=-1,this._firstVisible=-1,this._lastVisible=-1,this._scheduled=new WeakSet,this._measureCallback=null,this._measureChildOverride=null,this._layoutCompletePromise=null,this._layoutCompleteResolver=null,this._layoutCompleteRejecter=null,this._pendingLayoutComplete=null,this._layoutInitialized=null,this._connected=!1,!e)throw new Error("Virtualizer constructor requires a configuration object");if(e.hostElement)this._init(e);else throw new Error('Virtualizer configuration requires the "hostElement" property')}set items(e){Array.isArray(e)&&e!==this._items&&(this._itemsChanged=!0,this._items=e,this._schedule(this._updateLayout))}_init(e){this._isScroller=!!e.scroller,this._initHostElement(e);let t=e.layout||{};this._layoutInitialized=this._initLayout(t)}_initObservers(){this._mutationObserver=new MutationObserver(this._finishDOMUpdate.bind(this)),this._hostElementRO=new Xe(()=>this._hostElementSizeChanged()),this._childrenRO=new Xe(this._childrenSizeChanged.bind(this))}_initHostElement(e){let t=this._hostElement=e.hostElement;this._applyVirtualizerStyles(),t[ut]=this}connected(){this._initObservers();let e=this._isScroller;this._clippingAncestors=Ri(this._hostElement,e),this._scrollerController=new It(this,this._clippingAncestors[0]),this._schedule(this._updateLayout),this._observeAndListen(),this._connected=!0}_observeAndListen(){this._mutationObserver.observe(this._hostElement,{childList:!0}),this._hostElementRO.observe(this._hostElement),this._scrollEventListeners.push(window),window.addEventListener("scroll",this,this._scrollEventListenerOptions),this._clippingAncestors.forEach(e=>{e.addEventListener("scroll",this,this._scrollEventListenerOptions),this._scrollEventListeners.push(e),this._hostElementRO.observe(e)}),this._hostElementRO.observe(this._scrollerController.element),this._children.forEach(e=>this._childrenRO.observe(e)),this._scrollEventListeners.forEach(e=>e.addEventListener("scroll",this,this._scrollEventListenerOptions))}disconnected(){this._scrollEventListeners.forEach(e=>e.removeEventListener("scroll",this,this._scrollEventListenerOptions)),this._scrollEventListeners=[],this._clippingAncestors=[],this._scrollerController?.detach(this),this._scrollerController=null,this._mutationObserver?.disconnect(),this._mutationObserver=null,this._hostElementRO?.disconnect(),this._hostElementRO=null,this._childrenRO?.disconnect(),this._childrenRO=null,this._rejectLayoutCompletePromise("disconnected"),this._connected=!1}_applyVirtualizerStyles(){let t=this._hostElement.style;t.display=t.display||"block",t.position=t.position||"relative",t.contain=t.contain||"size layout",this._isScroller&&(t.overflow=t.overflow||"auto",t.minHeight=t.minHeight||"150px")}_getSizer(){let e=this._hostElement;if(!this._sizer){let t=e.querySelector(`[${Nt}]`);t||(t=document.createElement("div"),t.setAttribute(Nt,""),e.appendChild(t)),Object.assign(t.style,{position:"absolute",margin:"-2px 0 0 0",padding:0,visibility:"hidden",fontSize:"2px"}),t.textContent=" ",t.setAttribute(Nt,""),this._sizer=t}return this._sizer}async updateLayoutConfig(e){await this._layoutInitialized;let t=e.type||Je;if(typeof t=="function"&&this._layout instanceof t){let i={...e};return delete i.type,this._layout.config=i,!0}return!1}async _initLayout(e){let t,i;if(typeof e.type=="function"){i=e.type;let s={...e};delete s.type,t=s}else t=e;i===void 0&&(Je=i=(await Promise.resolve().then(()=>(Ge(),Qe))).FlowLayout),this._layout=new i(s=>this._handleLayoutMessage(s),t),this._layout.measureChildren&&typeof this._layout.updateItemSizes=="function"&&(typeof this._layout.measureChildren=="function"&&(this._measureChildOverride=this._layout.measureChildren),this._measureCallback=this._layout.updateItemSizes.bind(this._layout)),this._layout.listenForChildLoadEvents&&this._hostElement.addEventListener("load",this._loadListener,!0),this._schedule(this._updateLayout)}startBenchmarking(){this._benchmarkStart===null&&(this._benchmarkStart=window.performance.now())}stopBenchmarking(){if(this._benchmarkStart!==null){let e=window.performance.now(),t=e-this._benchmarkStart,s=performance.getEntriesByName("uv-virtualizing","measure").filter(r=>r.startTime>=this._benchmarkStart&&r.startTime<e).reduce((r,o)=>r+o.duration,0);return this._benchmarkStart=null,{timeElapsed:t,virtualizationTime:s}}return null}_measureChildren(){let e={},t=this._children,i=this._measureChildOverride||this._measureChild;for(let s=0;s<t.length;s++){let r=t[s],o=this._first+s;(this._itemsChanged||this._toBeMeasured.has(r))&&(e[o]=i.call(this,r,this._items[o]))}this._childMeasurements=e,this._schedule(this._updateLayout),this._toBeMeasured.clear()}_measureChild(e){let{width:t,height:i}=e.getBoundingClientRect();return Object.assign({width:t,height:i},Ai(e))}async _schedule(e){this._scheduled.has(e)||(this._scheduled.add(e),await Promise.resolve(),this._scheduled.delete(e),e.call(this))}async _updateDOM(e){this._scrollSize=e.scrollSize,this._adjustRange(e.range),this._childrenPos=e.childPositions,this._scrollError=e.scrollError||null;let{_rangeChanged:t,_itemsChanged:i}=this;this._visibilityChanged&&(this._notifyVisibility(),this._visibilityChanged=!1),(t||i)&&(this._notifyRange(),this._rangeChanged=!1),this._finishDOMUpdate()}_finishDOMUpdate(){this._connected&&(this._children.forEach(e=>this._childrenRO.observe(e)),this._checkScrollIntoViewTarget(this._childrenPos),this._positionChildren(this._childrenPos),this._sizeHostElement(this._scrollSize),this._correctScrollError(),this._benchmarkStart&&"mark"in window.performance&&window.performance.mark("uv-end"))}_updateLayout(){this._layout&&this._connected&&(this._layout.items=this._items,this._updateView(),this._childMeasurements!==null&&(this._measureCallback&&this._measureCallback(this._childMeasurements),this._childMeasurements=null),this._layout.reflowIfNeeded(),this._benchmarkStart&&"mark"in window.performance&&window.performance.mark("uv-end"))}_handleScrollEvent(){if(this._benchmarkStart&&"mark"in window.performance){try{window.performance.measure("uv-virtualizing","uv-start","uv-end")}catch(e){console.warn("Error measuring performance data: ",e)}window.performance.mark("uv-start")}this._scrollerController.correctingScrollError===!1&&this._layout?.unpin(),this._schedule(this._updateLayout)}handleEvent(e){switch(e.type){case"scroll":(e.currentTarget===window||this._clippingAncestors.includes(e.currentTarget))&&this._handleScrollEvent();break;default:console.warn("event not handled",e)}}_handleLayoutMessage(e){e.type==="stateChanged"?this._updateDOM(e):e.type==="visibilityChanged"?(this._firstVisible=e.firstVisible,this._lastVisible=e.lastVisible,this._notifyVisibility()):e.type==="unpinned"&&this._hostElement.dispatchEvent(new ht)}get _children(){let e=[],t=this._hostElement.firstElementChild;for(;t;)t.hasAttribute(Nt)||e.push(t),t=t.nextElementSibling;return e}_updateView(){let e=this._hostElement,t=this._scrollerController?.element,i=this._layout;if(e&&t&&i){let s,r,o,l,a=e.getBoundingClientRect();s=0,r=0,o=window.innerHeight,l=window.innerWidth;let h=this._clippingAncestors.map(T=>T.getBoundingClientRect());h.unshift(a);for(let T of h)s=Math.max(s,T.top),r=Math.max(r,T.left),o=Math.min(o,T.bottom),l=Math.min(l,T.right);let u=t.getBoundingClientRect(),c={left:a.left-u.left,top:a.top-u.top},f={width:t.scrollWidth,height:t.scrollHeight},d=s-a.top+e.scrollTop,y=r-a.left+e.scrollLeft,v=Math.max(0,o-s),K=Math.max(0,l-r);i.viewportSize={width:K,height:v},i.viewportScroll={top:d,left:y},i.totalScrollSize=f,i.offsetWithinScroller=c}}_sizeHostElement(e){let i=e&&e.width!==null?Math.min(82e5,e.width):0,s=e&&e.height!==null?Math.min(82e5,e.height):0;if(this._isScroller)this._getSizer().style.transform=`translate(${i}px, ${s}px)`;else{let r=this._hostElement.style;r.minWidth=i?`${i}px`:"100%",r.minHeight=s?`${s}px`:"100%"}}_positionChildren(e){e&&e.forEach(({top:t,left:i,width:s,height:r,xOffset:o,yOffset:l},a)=>{let h=this._children[a-this._first];h&&(h.style.position="absolute",h.style.boxSizing="border-box",h.style.transform=`translate(${i}px, ${t}px)`,s!==void 0&&(h.style.width=s+"px"),r!==void 0&&(h.style.height=r+"px"),h.style.left=o===void 0?null:o+"px",h.style.top=l===void 0?null:l+"px")})}async _adjustRange(e){let{_first:t,_last:i,_firstVisible:s,_lastVisible:r}=this;this._first=e.first,this._last=e.last,this._firstVisible=e.firstVisible,this._lastVisible=e.lastVisible,this._rangeChanged=this._rangeChanged||this._first!==t||this._last!==i,this._visibilityChanged=this._visibilityChanged||this._firstVisible!==s||this._lastVisible!==r}_correctScrollError(){if(this._scrollError){let{scrollTop:e,scrollLeft:t}=this._scrollerController,{top:i,left:s}=this._scrollError;this._scrollError=null,this._scrollerController.correctScrollError({top:e-i,left:t-s})}}element(e){return e===1/0&&(e=this._items.length-1),this._items?.[e]===void 0?void 0:{scrollIntoView:(t={})=>this._scrollElementIntoView({...t,index:e})}}_scrollElementIntoView(e){if(e.index>=this._first&&e.index<=this._last)this._children[e.index-this._first].scrollIntoView(e);else if(e.index=Math.min(e.index,this._items.length-1),e.behavior==="smooth"){let t=this._layout.getScrollIntoViewCoordinates(e),{behavior:i}=e;this._updateScrollIntoViewCoordinates=this._scrollerController.managedScrollTo(Object.assign(t,{behavior:i}),()=>this._layout.getScrollIntoViewCoordinates(e),()=>this._scrollIntoViewTarget=null),this._scrollIntoViewTarget=e}else this._layout.pin=e}_checkScrollIntoViewTarget(e){let{index:t}=this._scrollIntoViewTarget||{};t&&e?.has(t)&&this._updateScrollIntoViewCoordinates(this._layout.getScrollIntoViewCoordinates(this._scrollIntoViewTarget))}_notifyRange(){this._hostElement.dispatchEvent(new B({first:this._first,last:this._last}))}_notifyVisibility(){this._hostElement.dispatchEvent(new F({first:this._firstVisible,last:this._lastVisible}))}get layoutComplete(){return this._layoutCompletePromise||(this._layoutCompletePromise=new Promise((e,t)=>{this._layoutCompleteResolver=e,this._layoutCompleteRejecter=t})),this._layoutCompletePromise}_rejectLayoutCompletePromise(e){this._layoutCompleteRejecter!==null&&this._layoutCompleteRejecter(e),this._resetLayoutCompleteState()}_scheduleLayoutComplete(){this._layoutCompletePromise&&this._pendingLayoutComplete===null&&(this._pendingLayoutComplete=requestAnimationFrame(()=>requestAnimationFrame(()=>this._resolveLayoutCompletePromise())))}_resolveLayoutCompletePromise(){this._layoutCompleteResolver!==null&&this._layoutCompleteResolver(),this._resetLayoutCompleteState()}_resetLayoutCompleteState(){this._layoutCompletePromise=null,this._layoutCompleteResolver=null,this._layoutCompleteRejecter=null,this._pendingLayoutComplete=null}_hostElementSizeChanged(){this._schedule(this._updateLayout)}_childLoaded(){}_childrenSizeChanged(e){if(this._layout?.measureChildren){for(let t of e)this._toBeMeasured.set(t.target,t.contentRect);this._measureChildren()}this._scheduleLayoutComplete(),this._itemsChanged=!1,this._rangeChanged=!1}};function Ai(n){let e=window.getComputedStyle(n);return{marginTop:jt(e.marginTop),marginRight:jt(e.marginRight),marginBottom:jt(e.marginBottom),marginLeft:jt(e.marginLeft)}}function jt(n){let e=n?parseFloat(n):NaN;return Number.isNaN(e)?0:e}function Ze(n){if(n.assignedSlot!==null)return n.assignedSlot;if(n.parentElement!==null)return n.parentElement;let e=n.parentNode;return e&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&e.host||null}function Mi(n,e=!1){let t=[],i=e?n:Ze(n);for(;i!==null;)t.push(i),i=Ze(i);return t}function Ri(n,e=!1){let t=!1;return Mi(n,e).filter(i=>{if(t)return!1;let s=getComputedStyle(i);return t=s.position==="fixed",s.overflow!=="visible"})}var ae=n=>n,he=(n,e)=>b`${e}: ${JSON.stringify(n,null,2)}`,le=class extends kt{constructor(e){if(super(e),this._virtualizer=null,this._first=0,this._last=-1,this._renderItem=(t,i)=>he(t,i+this._first),this._keyFunction=(t,i)=>ae(t,i+this._first),this._items=[],e.type!==x.CHILD)throw new Error("The virtualize directive can only be used in child expressions")}render(e){e&&this._setFunctions(e);let t=[];if(this._first>=0&&this._last>=this._first)for(let i=this._first;i<=this._last;i++)t.push(this._items[i]);return Pt(t,this._keyFunction,this._renderItem)}update(e,[t]){this._setFunctions(t);let i=this._items!==t.items;return this._items=t.items||[],this._virtualizer?this._updateVirtualizerConfig(e,t):this._initialize(e,t),i?S:this.render()}async _updateVirtualizerConfig(e,t){if(!await this._virtualizer.updateLayoutConfig(t.layout||{})){let s=e.parentNode;this._makeVirtualizer(s,t)}this._virtualizer.items=this._items}_setFunctions(e){let{renderItem:t,keyFunction:i}=e;t&&(this._renderItem=(s,r)=>t(s,r+this._first)),i&&(this._keyFunction=(s,r)=>i(s,r+this._first))}_makeVirtualizer(e,t){this._virtualizer&&this._virtualizer.disconnected();let{layout:i,scroller:s,items:r}=t;this._virtualizer=new Ut({hostElement:e,layout:i,scroller:s}),this._virtualizer.items=r,this._virtualizer.connected()}_initialize(e,t){let i=e.parentNode;i&&i.nodeType===1&&(i.addEventListener("rangeChanged",s=>{this._first=s.first,this._last=s.last,this.setValue(this.render())}),this._makeVirtualizer(i,t))}disconnected(){this._virtualizer?.disconnected()}reconnected(){this._virtualizer?.connected()}},Ye=O(le);var A=class extends C{constructor(){super(...arguments),this.items=[],this.renderItem=he,this.keyFunction=ae,this.layout={},this.scroller=!1}createRenderRoot(){return this}render(){let{items:e,renderItem:t,keyFunction:i,layout:s,scroller:r}=this;return b`${Ye({items:e,renderItem:t,keyFunction:i,layout:s,scroller:r})}`}element(e){return this[ut]?.element(e)}get layoutComplete(){return this[ut]?.layoutComplete}scrollToIndex(e,t="start"){this.element(e)?.scrollIntoView({block:t})}};H([p({attribute:!1})],A.prototype,"items",void 0);H([p()],A.prototype,"renderItem",void 0);H([p()],A.prototype,"keyFunction",void 0);H([p({attribute:!1})],A.prototype,"layout",void 0);H([p({reflect:!0,type:Boolean})],A.prototype,"scroller",void 0);customElements.define("lit-virtualizer",A);var ti=Kt`
|
|
1
|
+
"use strict";var yatl=(()=>{var ft=Object.defineProperty;var ce=Object.getOwnPropertyDescriptor;var ii=Object.getOwnPropertyNames;var si=Object.prototype.hasOwnProperty;var Ht=(r,e)=>()=>(r&&(e=r(r=0)),e);var ue=(r,e)=>{for(var t in e)ft(r,t,{get:e[t],enumerable:!0})},ri=(r,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of ii(e))!si.call(r,s)&&s!==t&&ft(r,s,{get:()=>e[s],enumerable:!(i=ce(e,s))||i.enumerable});return r};var ni=r=>ri(ft({},"__esModule",{value:!0}),r),_=(r,e,t,i)=>{for(var s=i>1?void 0:i?ce(e,t):e,n=r.length-1,o;n>=0;n--)(o=r[n])&&(s=(i?o(e,t,s):o(s))||s);return i&&s&&ft(e,t,s),s};var ut,Ke=Ht(()=>{"use strict";ut=class{constructor(e){this._map=new Map,this._roundAverageSize=!1,this.totalSize=0,e?.roundAverageSize===!0&&(this._roundAverageSize=!0)}set(e,t){let i=this._map.get(e)||0;this._map.set(e,t),this.totalSize+=t-i}get averageSize(){if(this._map.size>0){let e=this.totalSize/this._map.size;return this._roundAverageSize?Math.round(e):e}return 0}getSize(e){return this._map.get(e)}clear(){this._map.clear(),this.totalSize=0}}});function re(r){return r==="horizontal"?"width":"height"}var Vt,We=Ht(()=>{"use strict";Vt=class{_getDefaultConfig(){return{direction:"vertical"}}constructor(e,t){this._latestCoords={left:0,top:0},this._direction=null,this._viewportSize={width:0,height:0},this.totalScrollSize={width:0,height:0},this.offsetWithinScroller={left:0,top:0},this._pendingReflow=!1,this._pendingLayoutUpdate=!1,this._pin=null,this._firstVisible=0,this._lastVisible=0,this._physicalMin=0,this._physicalMax=0,this._first=-1,this._last=-1,this._sizeDim="height",this._secondarySizeDim="width",this._positionDim="top",this._secondaryPositionDim="left",this._scrollPosition=0,this._scrollError=0,this._items=[],this._scrollSize=1,this._overhang=1e3,this._hostSink=e,Promise.resolve().then(()=>this.config=t||this._getDefaultConfig())}set config(e){Object.assign(this,Object.assign({},this._getDefaultConfig(),e))}get config(){return{direction:this.direction}}get items(){return this._items}set items(e){this._setItems(e)}_setItems(e){e!==this._items&&(this._items=e,this._scheduleReflow())}get direction(){return this._direction}set direction(e){e=e==="horizontal"?e:"vertical",e!==this._direction&&(this._direction=e,this._sizeDim=e==="horizontal"?"width":"height",this._secondarySizeDim=e==="horizontal"?"height":"width",this._positionDim=e==="horizontal"?"left":"top",this._secondaryPositionDim=e==="horizontal"?"top":"left",this._triggerReflow())}get viewportSize(){return this._viewportSize}set viewportSize(e){let{_viewDim1:t,_viewDim2:i}=this;Object.assign(this._viewportSize,e),i!==this._viewDim2?this._scheduleLayoutUpdate():t!==this._viewDim1&&this._checkThresholds()}get viewportScroll(){return this._latestCoords}set viewportScroll(e){Object.assign(this._latestCoords,e);let t=this._scrollPosition;this._scrollPosition=this._latestCoords[this._positionDim],Math.abs(t-this._scrollPosition)>=1&&this._checkThresholds()}reflowIfNeeded(e=!1){(e||this._pendingReflow)&&(this._pendingReflow=!1,this._reflow())}set pin(e){this._pin=e,this._triggerReflow()}get pin(){if(this._pin!==null){let{index:e,block:t}=this._pin;return{index:Math.max(0,Math.min(e,this.items.length-1)),block:t}}return null}_clampScrollPosition(e){return Math.max(-this.offsetWithinScroller[this._positionDim],Math.min(e,this.totalScrollSize[re(this.direction)]-this._viewDim1))}unpin(){this._pin!==null&&(this._sendUnpinnedMessage(),this._pin=null)}_updateLayout(){}get _viewDim1(){return this._viewportSize[this._sizeDim]}get _viewDim2(){return this._viewportSize[this._secondarySizeDim]}_scheduleReflow(){this._pendingReflow=!0}_scheduleLayoutUpdate(){this._pendingLayoutUpdate=!0,this._scheduleReflow()}_triggerReflow(){this._scheduleLayoutUpdate(),Promise.resolve().then(()=>this.reflowIfNeeded())}_reflow(){this._pendingLayoutUpdate&&(this._updateLayout(),this._pendingLayoutUpdate=!1),this._updateScrollSize(),this._setPositionFromPin(),this._getActiveItems(),this._updateVisibleIndices(),this._sendStateChangedMessage()}_setPositionFromPin(){if(this.pin!==null){let e=this._scrollPosition,{index:t,block:i}=this.pin;this._scrollPosition=this._calculateScrollIntoViewPosition({index:t,block:i||"start"})-this.offsetWithinScroller[this._positionDim],this._scrollError=e-this._scrollPosition}}_calculateScrollIntoViewPosition(e){let{block:t}=e,i=Math.min(this.items.length,Math.max(0,e.index)),s=this._getItemPosition(i)[this._positionDim],n=s;if(t!=="start"){let o=this._getItemSize(i)[this._sizeDim];if(t==="center")n=s-.5*this._viewDim1+.5*o;else{let l=s-this._viewDim1+o;if(t==="end")n=l;else{let a=this._scrollPosition;n=Math.abs(a-s)<Math.abs(a-l)?s:l}}}return n+=this.offsetWithinScroller[this._positionDim],this._clampScrollPosition(n)}getScrollIntoViewCoordinates(e){return{[this._positionDim]:this._calculateScrollIntoViewPosition(e)}}_sendUnpinnedMessage(){this._hostSink({type:"unpinned"})}_sendVisibilityChangedMessage(){this._hostSink({type:"visibilityChanged",firstVisible:this._firstVisible,lastVisible:this._lastVisible})}_sendStateChangedMessage(){let e=new Map;if(this._first!==-1&&this._last!==-1)for(let i=this._first;i<=this._last;i++)e.set(i,this._getItemPosition(i));let t={type:"stateChanged",scrollSize:{[this._sizeDim]:this._scrollSize,[this._secondarySizeDim]:null},range:{first:this._first,last:this._last,firstVisible:this._firstVisible,lastVisible:this._lastVisible},childPositions:e};this._scrollError&&(t.scrollError={[this._positionDim]:this._scrollError,[this._secondaryPositionDim]:0},this._scrollError=0),this._hostSink(t)}get _num(){return this._first===-1||this._last===-1?0:this._last-this._first+1}_checkThresholds(){if(this._viewDim1===0&&this._num>0||this._pin!==null)this._scheduleReflow();else{let e=Math.max(0,this._scrollPosition-this._overhang),t=Math.min(this._scrollSize,this._scrollPosition+this._viewDim1+this._overhang);this._physicalMin>e||this._physicalMax<t?this._scheduleReflow():this._updateVisibleIndices({emit:!0})}}_updateVisibleIndices(e){if(this._first===-1||this._last===-1)return;let t=this._first;for(;t<this._last&&Math.round(this._getItemPosition(t)[this._positionDim]+this._getItemSize(t)[this._sizeDim])<=Math.round(this._scrollPosition);)t++;let i=this._last;for(;i>this._first&&Math.round(this._getItemPosition(i)[this._positionDim])>=Math.round(this._scrollPosition+this._viewDim1);)i--;(t!==this._firstVisible||i!==this._lastVisible)&&(this._firstVisible=t,this._lastVisible=i,e&&e.emit&&this._sendVisibilityChangedMessage())}}});var Qe={};ue(Qe,{FlowLayout:()=>Lt,flow:()=>Ti});function qe(r){return r==="horizontal"?"marginLeft":"marginTop"}function $i(r){return r==="horizontal"?"marginRight":"marginBottom"}function Oi(r){return r==="horizontal"?"xOffset":"yOffset"}function zi(r,e){let t=[r,e].sort();return t[1]<=0?Math.min(...t):t[0]>=0?Math.max(...t):t[0]+t[1]}var Ti,ne,Lt,Ge=Ht(()=>{"use strict";Ke();We();Ti=r=>Object.assign({type:Lt},r);ne=class{constructor(){this._childSizeCache=new ut,this._marginSizeCache=new ut,this._metricsCache=new Map}update(e,t){let i=new Set;Object.keys(e).forEach(s=>{let n=Number(s);this._metricsCache.set(n,e[n]),this._childSizeCache.set(n,e[n][re(t)]),i.add(n),i.add(n+1)});for(let s of i){let n=this._metricsCache.get(s)?.[qe(t)]||0,o=this._metricsCache.get(s-1)?.[$i(t)]||0;this._marginSizeCache.set(s,zi(n,o))}}get averageChildSize(){return this._childSizeCache.averageSize}get totalChildSize(){return this._childSizeCache.totalSize}get averageMarginSize(){return this._marginSizeCache.averageSize}get totalMarginSize(){return this._marginSizeCache.totalSize}getLeadingMarginValue(e,t){return this._metricsCache.get(e)?.[qe(t)]||0}getChildSize(e){return this._childSizeCache.getSize(e)}getMarginSize(e){return this._marginSizeCache.getSize(e)}clear(){this._childSizeCache.clear(),this._marginSizeCache.clear(),this._metricsCache.clear()}},Lt=class extends Vt{constructor(){super(...arguments),this._itemSize={width:100,height:100},this._physicalItems=new Map,this._newPhysicalItems=new Map,this._metricsCache=new ne,this._anchorIdx=null,this._anchorPos=null,this._stable=!0,this._measureChildren=!0,this._estimate=!0}get measureChildren(){return this._measureChildren}updateItemSizes(e){this._metricsCache.update(e,this.direction),this._scheduleReflow()}_getPhysicalItem(e){return this._newPhysicalItems.get(e)??this._physicalItems.get(e)}_getSize(e){return this._getPhysicalItem(e)&&this._metricsCache.getChildSize(e)}_getAverageSize(){return this._metricsCache.averageChildSize||this._itemSize[this._sizeDim]}_estimatePosition(e){let t=this._metricsCache;if(this._first===-1||this._last===-1)return t.averageMarginSize+e*(t.averageMarginSize+this._getAverageSize());if(e<this._first){let i=this._first-e;return this._getPhysicalItem(this._first).pos-(t.getMarginSize(this._first-1)||t.averageMarginSize)-(i*t.averageChildSize+(i-1)*t.averageMarginSize)}else{let i=e-this._last;return this._getPhysicalItem(this._last).pos+(t.getChildSize(this._last)||t.averageChildSize)+(t.getMarginSize(this._last)||t.averageMarginSize)+i*(t.averageChildSize+t.averageMarginSize)}}_getPosition(e){let t=this._getPhysicalItem(e),{averageMarginSize:i}=this._metricsCache;return e===0?this._metricsCache.getMarginSize(0)??i:t?t.pos:this._estimatePosition(e)}_calculateAnchor(e,t){return e<=0?0:t>this._scrollSize-this._viewDim1?this.items.length-1:Math.max(0,Math.min(this.items.length-1,Math.floor((e+t)/2/this._delta)))}_getAnchor(e,t){if(this._physicalItems.size===0)return this._calculateAnchor(e,t);if(this._first<0)return this._calculateAnchor(e,t);if(this._last<0)return this._calculateAnchor(e,t);let i=this._getPhysicalItem(this._first),s=this._getPhysicalItem(this._last),n=i.pos;if(s.pos+this._metricsCache.getChildSize(this._last)<e)return this._calculateAnchor(e,t);if(n>t)return this._calculateAnchor(e,t);let a=this._firstVisible-1,h=-1/0;for(;h<e;)h=this._getPhysicalItem(++a).pos+this._metricsCache.getChildSize(a);return a}_getActiveItems(){this._viewDim1===0||this.items.length===0?this._clearItems():this._getItems()}_clearItems(){this._first=-1,this._last=-1,this._physicalMin=0,this._physicalMax=0;let e=this._newPhysicalItems;this._newPhysicalItems=this._physicalItems,this._newPhysicalItems.clear(),this._physicalItems=e,this._stable=!0}_getItems(){let e=this._newPhysicalItems;this._stable=!0;let t,i;if(this.pin!==null){let{index:h}=this.pin;this._anchorIdx=h,this._anchorPos=this._getPosition(h)}if(t=this._scrollPosition-this._overhang,i=this._scrollPosition+this._viewDim1+this._overhang,i<0||t>this._scrollSize){this._clearItems();return}(this._anchorIdx===null||this._anchorPos===null)&&(this._anchorIdx=this._getAnchor(t,i),this._anchorPos=this._getPosition(this._anchorIdx));let s=this._getSize(this._anchorIdx);s===void 0&&(this._stable=!1,s=this._getAverageSize());let n=this._metricsCache.getMarginSize(this._anchorIdx)??this._metricsCache.averageMarginSize,o=this._metricsCache.getMarginSize(this._anchorIdx+1)??this._metricsCache.averageMarginSize;this._anchorIdx===0&&(this._anchorPos=n),this._anchorIdx===this.items.length-1&&(this._anchorPos=this._scrollSize-o-s);let l=0;for(this._anchorPos+s+o<t&&(l=t-(this._anchorPos+s+o)),this._anchorPos-n>i&&(l=i-(this._anchorPos-n)),l&&(this._scrollPosition-=l,t-=l,i-=l,this._scrollError+=l),e.set(this._anchorIdx,{pos:this._anchorPos,size:s}),this._first=this._last=this._anchorIdx,this._physicalMin=this._anchorPos-n,this._physicalMax=this._anchorPos+s+o;this._physicalMin>t&&this._first>0;){let h=this._getSize(--this._first);h===void 0&&(this._stable=!1,h=this._getAverageSize());let u=this._metricsCache.getMarginSize(this._first);u===void 0&&(this._stable=!1,u=this._metricsCache.averageMarginSize),this._physicalMin-=h;let c=this._physicalMin;if(e.set(this._first,{pos:c,size:h}),this._physicalMin-=u,this._stable===!1&&this._estimate===!1)break}for(;this._physicalMax<i&&this._last<this.items.length-1;){let h=this._getSize(++this._last);h===void 0&&(this._stable=!1,h=this._getAverageSize());let u=this._metricsCache.getMarginSize(this._last);u===void 0&&(this._stable=!1,u=this._metricsCache.averageMarginSize);let c=this._physicalMax;if(e.set(this._last,{pos:c,size:h}),this._physicalMax+=h+u,!this._stable&&!this._estimate)break}let a=this._calculateError();a&&(this._physicalMin-=a,this._physicalMax-=a,this._anchorPos-=a,this._scrollPosition-=a,e.forEach(h=>h.pos-=a),this._scrollError+=a),this._stable&&(this._newPhysicalItems=this._physicalItems,this._newPhysicalItems.clear(),this._physicalItems=e)}_calculateError(){return this._first===0?this._physicalMin:this._physicalMin<=0?this._physicalMin-this._first*this._delta:this._last===this.items.length-1?this._physicalMax-this._scrollSize:this._physicalMax>=this._scrollSize?this._physicalMax-this._scrollSize+(this.items.length-1-this._last)*this._delta:0}_reflow(){let{_first:e,_last:t}=this;super._reflow(),(this._first===-1&&this._last==-1||this._first===e&&this._last===t)&&this._resetReflowState()}_resetReflowState(){this._anchorIdx=null,this._anchorPos=null,this._stable=!0}_updateScrollSize(){let{averageMarginSize:e}=this._metricsCache;this._scrollSize=Math.max(1,this.items.length*(e+this._getAverageSize())+e)}get _delta(){let{averageMarginSize:e}=this._metricsCache;return this._getAverageSize()+e}_getItemPosition(e){return{[this._positionDim]:this._getPosition(e),[this._secondaryPositionDim]:0,[Oi(this.direction)]:-(this._metricsCache.getLeadingMarginValue(e,this.direction)??this._metricsCache.averageMarginSize)}}_getItemSize(e){return{[this._sizeDim]:this._getSize(e)||this._getAverageSize(),[this._secondarySizeDim]:this._itemSize[this._secondarySizeDim]}}_viewDim2Changed(){this._metricsCache.clear(),this._scheduleReflow()}}});var ki={};ue(ki,{YatlChangeEvent:()=>q,YatlColumnReorderEvent:()=>J,YatlColumnResizeEvent:()=>X,YatlColumnToggleEvent:()=>G,YatlEvent:()=>w,YatlRowClickEvent:()=>W,YatlSearchEvent:()=>Bt,YatlSortEvent:()=>Q,YatlStateChangeEvent:()=>Z,YatlTable:()=>m,createRegexTokenizer:()=>Zt,isDisplayColumn:()=>at,isInternalColumn:()=>Pe,whitespaceTokenizer:()=>Yt});var w=class extends CustomEvent{constructor(e,t,i={}){super(e,{bubbles:!0,composed:!0,cancelable:!1,...i,detail:t})}},pt=class pt extends w{constructor(e,t,i,s){super(pt.EVENT_NAME,{row:e,index:t,field:i,originalEvent:s})}};pt.EVENT_NAME="yatl-row-click";var W=pt,mt=class mt extends w{constructor(e){super(mt.EVENT_NAME,{data:e})}};mt.EVENT_NAME="yatl-change";var q=mt,_t=class _t extends w{constructor(e,t){super(_t.EVENT_NAME,{field:e,order:t},{cancelable:!0})}};_t.EVENT_NAME="yatl-sort";var Q=_t,gt=class gt extends w{constructor(e,t){super(gt.EVENT_NAME,{field:e,visible:t},{cancelable:!0})}};gt.EVENT_NAME="yatl-column-toggle";var G=gt,yt=class yt extends w{constructor(e,t){super(yt.EVENT_NAME,{field:e,width:t})}};yt.EVENT_NAME="yatl-column-resize";var X=yt,bt=class bt extends w{constructor(e,t,i){super(bt.EVENT_NAME,{draggedColumn:e,droppedColumn:t,order:i},{cancelable:!0})}};bt.EVENT_NAME="yatl-column-reorder";var J=bt,vt=class vt extends w{constructor(e){super(vt.EVENT_NAME,{query:e})}};vt.EVENT_NAME="yatl-search";var Bt=vt,St=class St extends w{constructor(t,i){super(St.EVENT_NAME,{state:t,triggers:i});this.triggers=i}};St.EVENT_NAME="yatl-state-change";var Z=St;var wt=globalThis,Ct=wt.ShadowRoot&&(wt.ShadyCSS===void 0||wt.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Ft=Symbol(),de=new WeakMap,Y=class{constructor(e,t,i){if(this._$cssResult$=!0,i!==Ft)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o,t=this.t;if(Ct&&e===void 0){let i=t!==void 0&&t.length===1;i&&(e=de.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),i&&de.set(t,e))}return e}toString(){return this.cssText}},fe=r=>new Y(typeof r=="string"?r:r+"",void 0,Ft),Kt=(r,...e)=>{let t=r.length===1?r[0]:e.reduce((i,s,n)=>i+(o=>{if(o._$cssResult$===!0)return o.cssText;if(typeof o=="number")return o;throw Error("Value passed to 'css' function must be a 'css' function result: "+o+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(s)+r[n+1],r[0]);return new Y(t,r,Ft)},pe=(r,e)=>{if(Ct)r.adoptedStyleSheets=e.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(let t of e){let i=document.createElement("style"),s=wt.litNonce;s!==void 0&&i.setAttribute("nonce",s),i.textContent=t.cssText,r.appendChild(i)}},Wt=Ct?r=>r:r=>r instanceof CSSStyleSheet?(e=>{let t="";for(let i of e.cssRules)t+=i.cssText;return fe(t)})(r):r;var{is:oi,defineProperty:li,getOwnPropertyDescriptor:ai,getOwnPropertyNames:hi,getOwnPropertySymbols:ci,getPrototypeOf:ui}=Object,M=globalThis,me=M.trustedTypes,di=me?me.emptyScript:"",fi=M.reactiveElementPolyfillSupport,tt=(r,e)=>r,et={toAttribute(r,e){switch(e){case Boolean:r=r?di:null;break;case Object:case Array:r=r==null?r:JSON.stringify(r)}return r},fromAttribute(r,e){let t=r;switch(e){case Boolean:t=r!==null;break;case Number:t=r===null?null:Number(r);break;case Object:case Array:try{t=JSON.parse(r)}catch{t=null}}return t}},Et=(r,e)=>!oi(r,e),_e={attribute:!0,type:String,converter:et,reflect:!1,useDefault:!1,hasChanged:Et};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),M.litPropertyMetadata??(M.litPropertyMetadata=new WeakMap);var $=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??(this.l=[])).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=_e){if(t.state&&(t.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(e,t),!t.noAccessor){let i=Symbol(),s=this.getPropertyDescriptor(e,i,t);s!==void 0&&li(this.prototype,e,s)}}static getPropertyDescriptor(e,t,i){let{get:s,set:n}=ai(this.prototype,e)??{get(){return this[t]},set(o){this[t]=o}};return{get:s,set(o){let l=s?.call(this);n?.call(this,o),this.requestUpdate(e,l,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??_e}static _$Ei(){if(this.hasOwnProperty(tt("elementProperties")))return;let e=ui(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(tt("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(tt("properties"))){let t=this.properties,i=[...hi(t),...ci(t)];for(let s of i)this.createProperty(s,t[s])}let e=this[Symbol.metadata];if(e!==null){let t=litPropertyMetadata.get(e);if(t!==void 0)for(let[i,s]of t)this.elementProperties.set(i,s)}this._$Eh=new Map;for(let[t,i]of this.elementProperties){let s=this._$Eu(t,i);s!==void 0&&this._$Eh.set(s,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){let t=[];if(Array.isArray(e)){let i=new Set(e.flat(1/0).reverse());for(let s of i)t.unshift(Wt(s))}else e!==void 0&&t.push(Wt(e));return t}static _$Eu(e,t){let i=t.attribute;return i===!1?void 0:typeof i=="string"?i:typeof e=="string"?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(e=>e(this))}addController(e){(this._$EO??(this._$EO=new Set)).add(e),this.renderRoot!==void 0&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){let e=new Map,t=this.constructor.elementProperties;for(let i of t.keys())this.hasOwnProperty(i)&&(e.set(i,this[i]),delete this[i]);e.size>0&&(this._$Ep=e)}createRenderRoot(){let e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return pe(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),this._$EO?.forEach(e=>e.hostConnected?.())}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach(e=>e.hostDisconnected?.())}attributeChangedCallback(e,t,i){this._$AK(e,i)}_$ET(e,t){let i=this.constructor.elementProperties.get(e),s=this.constructor._$Eu(e,i);if(s!==void 0&&i.reflect===!0){let n=(i.converter?.toAttribute!==void 0?i.converter:et).toAttribute(t,i.type);this._$Em=e,n==null?this.removeAttribute(s):this.setAttribute(s,n),this._$Em=null}}_$AK(e,t){let i=this.constructor,s=i._$Eh.get(e);if(s!==void 0&&this._$Em!==s){let n=i.getPropertyOptions(s),o=typeof n.converter=="function"?{fromAttribute:n.converter}:n.converter?.fromAttribute!==void 0?n.converter:et;this._$Em=s;let l=o.fromAttribute(t,n.type);this[s]=l??this._$Ej?.get(s)??l,this._$Em=null}}requestUpdate(e,t,i,s=!1,n){if(e!==void 0){let o=this.constructor;if(s===!1&&(n=this[e]),i??(i=o.getPropertyOptions(e)),!((i.hasChanged??Et)(n,t)||i.useDefault&&i.reflect&&n===this._$Ej?.get(e)&&!this.hasAttribute(o._$Eu(e,i))))return;this.C(e,t,i)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(e,t,{useDefault:i,reflect:s,wrapped:n},o){i&&!(this._$Ej??(this._$Ej=new Map)).has(e)&&(this._$Ej.set(e,o??t??this[e]),n!==!0||o!==void 0)||(this._$AL.has(e)||(this.hasUpdated||i||(t=void 0),this._$AL.set(e,t)),s===!0&&this._$Em!==e&&(this._$Eq??(this._$Eq=new Set)).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}let e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(let[s,n]of this._$Ep)this[s]=n;this._$Ep=void 0}let i=this.constructor.elementProperties;if(i.size>0)for(let[s,n]of i){let{wrapped:o}=n,l=this[s];o!==!0||this._$AL.has(s)||l===void 0||this.C(s,void 0,n,l)}}let e=!1,t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),this._$EO?.forEach(i=>i.hostUpdate?.()),this.update(t)):this._$EM()}catch(i){throw e=!1,this._$EM(),i}e&&this._$AE(t)}willUpdate(e){}_$AE(e){this._$EO?.forEach(t=>t.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&(this._$Eq=this._$Eq.forEach(t=>this._$ET(t,this[t]))),this._$EM()}updated(e){}firstUpdated(e){}};$.elementStyles=[],$.shadowRootOptions={mode:"open"},$[tt("elementProperties")]=new Map,$[tt("finalized")]=new Map,fi?.({ReactiveElement:$}),(M.reactiveElementVersions??(M.reactiveElementVersions=[])).push("2.1.2");var st=globalThis,ge=r=>r,xt=st.trustedTypes,ye=xt?xt.createPolicy("lit-html",{createHTML:r=>r}):void 0,Qt="$lit$",O=`lit$${Math.random().toFixed(9).slice(2)}$`,Gt="?"+O,pi=`<${Gt}>`,I=document,rt=()=>I.createComment(""),nt=r=>r===null||typeof r!="object"&&typeof r!="function",Xt=Array.isArray,Ee=r=>Xt(r)||typeof r?.[Symbol.iterator]=="function",qt=`[
|
|
2
|
+
\f\r]`,it=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,be=/-->/g,ve=/>/g,D=RegExp(`>|${qt}(?:([^\\s"'>=/]+)(${qt}*=${qt}*(?:[^
|
|
3
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),Se=/'/g,we=/"/g,xe=/^(?:script|style|textarea|title)$/i,Jt=r=>(e,...t)=>({_$litType$:r,strings:e,values:t}),b=Jt(1),Hi=Jt(2),Bi=Jt(3),S=Symbol.for("lit-noChange"),g=Symbol.for("lit-nothing"),Ce=new WeakMap,k=I.createTreeWalker(I,129);function Te(r,e){if(!Xt(r)||!r.hasOwnProperty("raw"))throw Error("invalid template strings array");return ye!==void 0?ye.createHTML(e):e}var $e=(r,e)=>{let t=r.length-1,i=[],s,n=e===2?"<svg>":e===3?"<math>":"",o=it;for(let l=0;l<t;l++){let a=r[l],h,u,c=-1,f=0;for(;f<a.length&&(o.lastIndex=f,u=o.exec(a),u!==null);)f=o.lastIndex,o===it?u[1]==="!--"?o=be:u[1]!==void 0?o=ve:u[2]!==void 0?(xe.test(u[2])&&(s=RegExp("</"+u[2],"g")),o=D):u[3]!==void 0&&(o=D):o===D?u[0]===">"?(o=s??it,c=-1):u[1]===void 0?c=-2:(c=o.lastIndex-u[2].length,h=u[1],o=u[3]===void 0?D:u[3]==='"'?we:Se):o===we||o===Se?o=D:o===be||o===ve?o=it:(o=D,s=void 0);let d=o===D&&r[l+1].startsWith("/>")?" ":"";n+=o===it?a+pi:c>=0?(i.push(h),a.slice(0,c)+Qt+a.slice(c)+O+d):a+O+(c===-2?l:d)}return[Te(r,n+(r[t]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),i]},ot=class r{constructor({strings:e,_$litType$:t},i){let s;this.parts=[];let n=0,o=0,l=e.length-1,a=this.parts,[h,u]=$e(e,t);if(this.el=r.createElement(h,i),k.currentNode=this.el.content,t===2||t===3){let c=this.el.content.firstChild;c.replaceWith(...c.childNodes)}for(;(s=k.nextNode())!==null&&a.length<l;){if(s.nodeType===1){if(s.hasAttributes())for(let c of s.getAttributeNames())if(c.endsWith(Qt)){let f=u[o++],d=s.getAttribute(c).split(O),y=/([.?@])?(.*)/.exec(f);a.push({type:1,index:n,name:y[2],strings:d,ctor:y[1]==="."?$t:y[1]==="?"?Ot:y[1]==="@"?zt:L}),s.removeAttribute(c)}else c.startsWith(O)&&(a.push({type:6,index:n}),s.removeAttribute(c));if(xe.test(s.tagName)){let c=s.textContent.split(O),f=c.length-1;if(f>0){s.textContent=xt?xt.emptyScript:"";for(let d=0;d<f;d++)s.append(c[d],rt()),k.nextNode(),a.push({type:2,index:++n});s.append(c[f],rt())}}}else if(s.nodeType===8)if(s.data===Gt)a.push({type:2,index:n});else{let c=-1;for(;(c=s.data.indexOf(O,c+1))!==-1;)a.push({type:7,index:n}),c+=O.length-1}n++}}static createElement(e,t){let i=I.createElement("template");return i.innerHTML=e,i}};function V(r,e,t=r,i){if(e===S)return e;let s=i!==void 0?t._$Co?.[i]:t._$Cl,n=nt(e)?void 0:e._$litDirective$;return s?.constructor!==n&&(s?._$AO?.(!1),n===void 0?s=void 0:(s=new n(r),s._$AT(r,t,i)),i!==void 0?(t._$Co??(t._$Co=[]))[i]=s:t._$Cl=s),s!==void 0&&(e=V(r,s._$AS(r,e.values),s,i)),e}var Tt=class{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){let{el:{content:t},parts:i}=this._$AD,s=(e?.creationScope??I).importNode(t,!0);k.currentNode=s;let n=k.nextNode(),o=0,l=0,a=i[0];for(;a!==void 0;){if(o===a.index){let h;a.type===2?h=new j(n,n.nextSibling,this,e):a.type===1?h=new a.ctor(n,a.name,a.strings,this,e):a.type===6&&(h=new At(n,this,e)),this._$AV.push(h),a=i[++l]}o!==a?.index&&(n=k.nextNode(),o++)}return k.currentNode=I,s}p(e){let t=0;for(let i of this._$AV)i!==void 0&&(i.strings!==void 0?(i._$AI(e,i,t),t+=i.strings.length-2):i._$AI(e[t])),t++}},j=class r{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,t,i,s){this.type=2,this._$AH=g,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=i,this.options=s,this._$Cv=s?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode,t=this._$AM;return t!==void 0&&e?.nodeType===11&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=V(this,e,t),nt(e)?e===g||e==null||e===""?(this._$AH!==g&&this._$AR(),this._$AH=g):e!==this._$AH&&e!==S&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):Ee(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==g&&nt(this._$AH)?this._$AA.nextSibling.data=e:this.T(I.createTextNode(e)),this._$AH=e}$(e){let{values:t,_$litType$:i}=e,s=typeof i=="number"?this._$AC(e):(i.el===void 0&&(i.el=ot.createElement(Te(i.h,i.h[0]),this.options)),i);if(this._$AH?._$AD===s)this._$AH.p(t);else{let n=new Tt(s,this),o=n.u(this.options);n.p(t),this.T(o),this._$AH=n}}_$AC(e){let t=Ce.get(e.strings);return t===void 0&&Ce.set(e.strings,t=new ot(e)),t}k(e){Xt(this._$AH)||(this._$AH=[],this._$AR());let t=this._$AH,i,s=0;for(let n of e)s===t.length?t.push(i=new r(this.O(rt()),this.O(rt()),this,this.options)):i=t[s],i._$AI(n),s++;s<t.length&&(this._$AR(i&&i._$AB.nextSibling,s),t.length=s)}_$AR(e=this._$AA.nextSibling,t){for(this._$AP?.(!1,!0,t);e!==this._$AB;){let i=ge(e).nextSibling;ge(e).remove(),e=i}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e))}},L=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,i,s,n){this.type=1,this._$AH=g,this._$AN=void 0,this.element=e,this.name=t,this._$AM=s,this.options=n,i.length>2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=g}_$AI(e,t=this,i,s){let n=this.strings,o=!1;if(n===void 0)e=V(this,e,t,0),o=!nt(e)||e!==this._$AH&&e!==S,o&&(this._$AH=e);else{let l=e,a,h;for(e=n[0],a=0;a<n.length-1;a++)h=V(this,l[i+a],t,a),h===S&&(h=this._$AH[a]),o||(o=!nt(h)||h!==this._$AH[a]),h===g?e=g:e!==g&&(e+=(h??"")+n[a+1]),this._$AH[a]=h}o&&!s&&this.j(e)}j(e){e===g?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}},$t=class extends L{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===g?void 0:e}},Ot=class extends L{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==g)}},zt=class extends L{constructor(e,t,i,s,n){super(e,t,i,s,n),this.type=5}_$AI(e,t=this){if((e=V(this,e,t,0)??g)===S)return;let i=this._$AH,s=e===g&&i!==g||e.capture!==i.capture||e.once!==i.once||e.passive!==i.passive,n=e!==g&&(i===g||s);s&&this.element.removeEventListener(this.name,this,i),n&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}},At=class{constructor(e,t,i){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(e){V(this,e)}},Oe={M:Qt,P:O,A:Gt,C:1,L:$e,R:Tt,D:Ee,V,I:j,H:L,N:Ot,U:zt,B:$t,F:At},mi=st.litHtmlPolyfillSupport;mi?.(ot,j),(st.litHtmlVersions??(st.litHtmlVersions=[])).push("3.3.2");var ze=(r,e,t)=>{let i=t?.renderBefore??e,s=i._$litPart$;if(s===void 0){let n=t?.renderBefore??null;i._$litPart$=s=new j(e.insertBefore(rt(),n),n,void 0,t??{})}return s._$AI(r),s};var lt=globalThis,C=class extends ${constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t;let e=super.createRenderRoot();return(t=this.renderOptions).renderBefore??(t.renderBefore=e.firstChild),e}update(e){let t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=ze(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return S}};C._$litElement$=!0,C.finalized=!0,lt.litElementHydrateSupport?.({LitElement:C});var _i=lt.litElementPolyfillSupport;_i?.({LitElement:C});(lt.litElementVersions??(lt.litElementVersions=[])).push("4.2.2");var Ae=r=>r.replace(/_/g," ").replace(/([a-z])([A-Z])/g,"$1 $2").replace(/\b\w/g,e=>e.toUpperCase()),Zt=(r="\\S+")=>{let e=new RegExp(`"[^"]*"|${r}`,"g");return t=>(t.match(e)||[]).map(s=>(s=s.toLocaleLowerCase().trim(),s.startsWith('"')&&s.endsWith('"')?{value:s.slice(1,-1),quoted:!0}:{value:s,quoted:!1}))},Yt=Zt();function gi(r,e){return r in e}function R(r,e){let t=e.split("."),i=r;for(let s of t)if(i&&gi(s,i))i=i[s];else return;return i}function Me(r,e){if(!r||!e||e.length===0)return r;let t=[...e].sort((l,a)=>l[0]-a[0]),i=[],s=t[0];for(let l=1;l<t.length;l++){let a=t[l];a[0]<s[1]?s[1]=Math.max(s[1],a[1]):(i.push(s),s=a)}i.push(s);let n=[],o=0;for(let[l,a]of i){let h=Math.max(0,Math.min(l,r.length)),u=Math.max(0,Math.min(a,r.length));h>o&&n.push(r.slice(o,h)),n.push(b`<mark class="highlight">${r.slice(h,u)}</mark>`),o=u}return o<r.length&&n.push(r.slice(o)),b`${n}`}function te(r,e="1fr"){return r.map(t=>t?`${t}px`:e)}function Re(r){return typeof r=="string"||typeof r=="number"||typeof r=="boolean"||r instanceof Date}function Pe(r){return r?.role==="internal"}function at(r){return r?.role!=="internal"}var De=r=>(e,t)=>{t!==void 0?t.addInitializer(()=>{customElements.define(r,e)}):customElements.define(r,e)};var yi={attribute:!0,type:String,converter:et,reflect:!1,hasChanged:Et},bi=(r=yi,e,t)=>{let{kind:i,metadata:s}=t,n=globalThis.litPropertyMetadata.get(s);if(n===void 0&&globalThis.litPropertyMetadata.set(s,n=new Map),i==="setter"&&((r=Object.create(r)).wrapped=!0),n.set(t.name,r),i==="accessor"){let{name:o}=t;return{set(l){let a=e.get.call(this);e.set.call(this,l),this.requestUpdate(o,a,r,!0,l)},init(l){return l!==void 0&&this.C(o,void 0,r,l),l}}}if(i==="setter"){let{name:o}=t;return function(l){let a=this[o];e.call(this,l),this.requestUpdate(o,a,r,!0,l)}}throw Error("Unsupported decorator location: "+i)};function p(r){return(e,t)=>typeof t=="object"?bi(r,e,t):((i,s,n)=>{let o=s.hasOwnProperty(n);return s.constructor.createProperty(n,i),o?Object.getOwnPropertyDescriptor(s,n):void 0})(r,e,t)}function ke(r){return p({...r,state:!0,attribute:!1})}var N=(r,e,t)=>(t.configurable=!0,t.enumerable=!0,Reflect.decorate&&typeof e!="object"&&Object.defineProperty(r,e,t),t);function ee(r,e){return(t,i,s)=>{let n=o=>o.renderRoot?.querySelector(r)??null;if(e){let{get:o,set:l}=typeof i=="object"?t:s??(()=>{let a=Symbol();return{get(){return this[a]},set(h){this[a]=h}}})();return N(t,i,{get(){let a=o.call(this);return a===void 0&&(a=n(this),(a!==null||this.hasUpdated)&&l.call(this,a)),a}})}return N(t,i,{get(){return n(this)}})}}var x={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},z=r=>(...e)=>({_$litDirective$:r,values:e}),E=class{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,i){this._$Ct=e,this._$AM=t,this._$Ci=i}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}};var Mt=z(class extends E{constructor(r){if(super(r),r.type!==x.ATTRIBUTE||r.name!=="class"||r.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(r){return" "+Object.keys(r).filter(e=>r[e]).join(" ")+" "}update(r,[e]){if(this.st===void 0){this.st=new Set,r.strings!==void 0&&(this.nt=new Set(r.strings.join(" ").split(/\s/).filter(i=>i!=="")));for(let i in e)e[i]&&!this.nt?.has(i)&&this.st.add(i);return this.render(e)}let t=r.element.classList;for(let i of this.st)i in e||(t.remove(i),this.st.delete(i));for(let i in e){let s=!!e[i];s===this.st.has(i)||this.nt?.has(i)||(s?(t.add(i),this.st.add(i)):(t.remove(i),this.st.delete(i)))}return S}});var ie=r=>r??g;var{I:vi}=Oe,Ie=r=>r;var Le=r=>r.strings===void 0,Ve=()=>document.createComment(""),U=(r,e,t)=>{let i=r._$AA.parentNode,s=e===void 0?r._$AB:e._$AA;if(t===void 0){let n=i.insertBefore(Ve(),s),o=i.insertBefore(Ve(),s);t=new vi(n,o,r,r.options)}else{let n=t._$AB.nextSibling,o=t._$AM,l=o!==r;if(l){let a;t._$AQ?.(r),t._$AM=r,t._$AP!==void 0&&(a=r._$AU)!==o._$AU&&t._$AP(a)}if(n!==s||l){let a=t._$AA;for(;a!==n;){let h=Ie(a).nextSibling;Ie(i).insertBefore(a,s),a=h}}}return t},P=(r,e,t=r)=>(r._$AI(e,t),r),Si={},Ne=(r,e=Si)=>r._$AH=e,je=r=>r._$AH,Rt=r=>{r._$AR(),r._$AA.remove()};var Ue=(r,e,t)=>{let i=new Map;for(let s=e;s<=t;s++)i.set(r[s],s);return i},Pt=z(class extends E{constructor(r){if(super(r),r.type!==x.CHILD)throw Error("repeat() can only be used in text expressions")}dt(r,e,t){let i;t===void 0?t=e:e!==void 0&&(i=e);let s=[],n=[],o=0;for(let l of r)s[o]=i?i(l,o):o,n[o]=t(l,o),o++;return{values:n,keys:s}}render(r,e,t){return this.dt(r,e,t).values}update(r,[e,t,i]){let s=je(r),{values:n,keys:o}=this.dt(e,t,i);if(!Array.isArray(s))return this.ut=o,n;let l=this.ut??(this.ut=[]),a=[],h,u,c=0,f=s.length-1,d=0,y=n.length-1;for(;c<=f&&d<=y;)if(s[c]===null)c++;else if(s[f]===null)f--;else if(l[c]===o[d])a[d]=P(s[c],n[d]),c++,d++;else if(l[f]===o[y])a[y]=P(s[f],n[y]),f--,y--;else if(l[c]===o[y])a[y]=P(s[c],n[y]),U(r,a[y+1],s[c]),c++,y--;else if(l[f]===o[d])a[d]=P(s[f],n[d]),U(r,s[c],s[f]),f--,d++;else if(h===void 0&&(h=Ue(o,d,y),u=Ue(l,c,f)),h.has(l[c]))if(h.has(l[f])){let v=u.get(o[d]),K=v!==void 0?s[v]:null;if(K===null){let T=U(r,s[c]);P(T,n[d]),a[d]=T}else a[d]=P(K,n[d]),U(r,s[c],K),s[v]=null;d++}else Rt(s[f]),f--;else Rt(s[c]),c++;for(;d<=y;){let v=U(r,a[y+1]);P(v,n[d]),a[d++]=v}for(;c<=f;){let v=s[c++];v!==null&&Rt(v)}return this.ut=o,Ne(r,a),S}});var He="important",wi=" !"+He,Be=z(class extends E{constructor(r){if(super(r),r.type!==x.ATTRIBUTE||r.name!=="style"||r.strings?.length>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(r){return Object.keys(r).reduce((e,t)=>{let i=r[t];return i==null?e:e+`${t=t.includes("-")?t:t.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${i};`},"")}update(r,[e]){let{style:t}=r.element;if(this.ft===void 0)return this.ft=new Set(Object.keys(e)),this.render(e);for(let i of this.ft)e[i]==null&&(this.ft.delete(i),i.includes("-")?t.removeProperty(i):t[i]=null);for(let i in e){let s=e[i];if(s!=null){this.ft.add(i);let n=typeof s=="string"&&s.endsWith(wi);i.includes("-")||n?t.setProperty(i,n?s.slice(0,-11):s,n?He:""):t[i]=s}}return S}});function H(r,e,t,i){var s=arguments.length,n=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(r,e,t,i);else for(var l=r.length-1;l>=0;l--)(o=r[l])&&(n=(s<3?o(n):s>3?o(e,t,n):o(e,t))||n);return s>3&&n&&Object.defineProperty(e,t,n),n}var ht=(r,e)=>{let t=r._$AN;if(t===void 0)return!1;for(let i of t)i._$AO?.(e,!1),ht(i,e);return!0},Dt=r=>{let e,t;do{if((e=r._$AM)===void 0)break;t=e._$AN,t.delete(r),r=e}while(t?.size===0)},Fe=r=>{for(let e;e=r._$AM;r=e){let t=e._$AN;if(t===void 0)e._$AN=t=new Set;else if(t.has(r))break;t.add(r),xi(e)}};function Ci(r){this._$AN!==void 0?(Dt(this),this._$AM=r,Fe(this)):this._$AM=r}function Ei(r,e=!1,t=0){let i=this._$AH,s=this._$AN;if(s!==void 0&&s.size!==0)if(e)if(Array.isArray(i))for(let n=t;n<i.length;n++)ht(i[n],!1),Dt(i[n]);else i!=null&&(ht(i,!1),Dt(i));else ht(this,r)}var xi=r=>{r.type==x.CHILD&&(r._$AP??(r._$AP=Ei),r._$AQ??(r._$AQ=Ci))},kt=class extends E{constructor(){super(...arguments),this._$AN=void 0}_$AT(e,t,i){super._$AT(e,t,i),Fe(this),this.isConnected=e._$AU}_$AO(e,t=!0){e!==this.isConnected&&(this.isConnected=e,e?this.reconnected?.():this.disconnected?.()),t&&(ht(this,e),Dt(this))}setValue(e){if(Le(this._$Ct))this._$Ct._$AI(e,this);else{let t=[...this._$Ct._$AH];t[this._$Ci]=e,this._$Ct._$AI(t,this,0)}}disconnected(){}reconnected(){}};var B=class r extends Event{constructor(e){super(r.eventName,{bubbles:!1}),this.first=e.first,this.last=e.last}};B.eventName="rangeChanged";var F=class r extends Event{constructor(e){super(r.eventName,{bubbles:!1}),this.first=e.first,this.last=e.last}};F.eventName="visibilityChanged";var ct=class r extends Event{constructor(){super(r.eventName,{bubbles:!1})}};ct.eventName="unpinned";var se=class{constructor(e){this._element=null;let t=e??window;this._node=t,e&&(this._element=e)}get element(){return this._element||document.scrollingElement||document.documentElement}get scrollTop(){return this.element.scrollTop||window.scrollY}get scrollLeft(){return this.element.scrollLeft||window.scrollX}get scrollHeight(){return this.element.scrollHeight}get scrollWidth(){return this.element.scrollWidth}get viewportHeight(){return this._element?this._element.getBoundingClientRect().height:window.innerHeight}get viewportWidth(){return this._element?this._element.getBoundingClientRect().width:window.innerWidth}get maxScrollTop(){return this.scrollHeight-this.viewportHeight}get maxScrollLeft(){return this.scrollWidth-this.viewportWidth}},It=class extends se{constructor(e,t){super(t),this._clients=new Set,this._retarget=null,this._end=null,this.__destination=null,this.correctingScrollError=!1,this._checkForArrival=this._checkForArrival.bind(this),this._updateManagedScrollTo=this._updateManagedScrollTo.bind(this),this.scrollTo=this.scrollTo.bind(this),this.scrollBy=this.scrollBy.bind(this);let i=this._node;this._originalScrollTo=i.scrollTo,this._originalScrollBy=i.scrollBy,this._originalScroll=i.scroll,this._attach(e)}get _destination(){return this.__destination}get scrolling(){return this._destination!==null}scrollTo(e,t){let i=typeof e=="number"&&typeof t=="number"?{left:e,top:t}:e;this._scrollTo(i)}scrollBy(e,t){let i=typeof e=="number"&&typeof t=="number"?{left:e,top:t}:e;i.top!==void 0&&(i.top+=this.scrollTop),i.left!==void 0&&(i.left+=this.scrollLeft),this._scrollTo(i)}_nativeScrollTo(e){this._originalScrollTo.bind(this._element||window)(e)}_scrollTo(e,t=null,i=null){this._end!==null&&this._end(),e.behavior==="smooth"?(this._setDestination(e),this._retarget=t,this._end=i):this._resetScrollState(),this._nativeScrollTo(e)}_setDestination(e){let{top:t,left:i}=e;return t=t===void 0?void 0:Math.max(0,Math.min(t,this.maxScrollTop)),i=i===void 0?void 0:Math.max(0,Math.min(i,this.maxScrollLeft)),this._destination!==null&&i===this._destination.left&&t===this._destination.top?!1:(this.__destination={top:t,left:i,behavior:"smooth"},!0)}_resetScrollState(){this.__destination=null,this._retarget=null,this._end=null}_updateManagedScrollTo(e){this._destination&&this._setDestination(e)&&this._nativeScrollTo(this._destination)}managedScrollTo(e,t,i){return this._scrollTo(e,t,i),this._updateManagedScrollTo}correctScrollError(e){this.correctingScrollError=!0,requestAnimationFrame(()=>requestAnimationFrame(()=>this.correctingScrollError=!1)),this._nativeScrollTo(e),this._retarget&&this._setDestination(this._retarget()),this._destination&&this._nativeScrollTo(this._destination)}_checkForArrival(){if(this._destination!==null){let{scrollTop:e,scrollLeft:t}=this,{top:i,left:s}=this._destination;i=Math.min(i||0,this.maxScrollTop),s=Math.min(s||0,this.maxScrollLeft);let n=Math.abs(i-e),o=Math.abs(s-t);n<1&&o<1&&(this._end&&this._end(),this._resetScrollState())}}detach(e){return this._clients.delete(e),this._clients.size===0&&(this._node.scrollTo=this._originalScrollTo,this._node.scrollBy=this._originalScrollBy,this._node.scroll=this._originalScroll,this._node.removeEventListener("scroll",this._checkForArrival)),null}_attach(e){this._clients.add(e),this._clients.size===1&&(this._node.scrollTo=this.scrollTo,this._node.scrollBy=this.scrollBy,this._node.scroll=this.scrollTo,this._node.addEventListener("scroll",this._checkForArrival))}};var Xe=typeof window<"u"?window.ResizeObserver:void 0;var dt=Symbol("virtualizerRef"),Nt="virtualizer-sizer",Je,Ut=class{constructor(e){if(this._benchmarkStart=null,this._layout=null,this._clippingAncestors=[],this._scrollSize=null,this._scrollError=null,this._childrenPos=null,this._childMeasurements=null,this._toBeMeasured=new Map,this._rangeChanged=!0,this._itemsChanged=!0,this._visibilityChanged=!0,this._scrollerController=null,this._isScroller=!1,this._sizer=null,this._hostElementRO=null,this._childrenRO=null,this._mutationObserver=null,this._scrollEventListeners=[],this._scrollEventListenerOptions={passive:!0},this._loadListener=this._childLoaded.bind(this),this._scrollIntoViewTarget=null,this._updateScrollIntoViewCoordinates=null,this._items=[],this._first=-1,this._last=-1,this._firstVisible=-1,this._lastVisible=-1,this._scheduled=new WeakSet,this._measureCallback=null,this._measureChildOverride=null,this._layoutCompletePromise=null,this._layoutCompleteResolver=null,this._layoutCompleteRejecter=null,this._pendingLayoutComplete=null,this._layoutInitialized=null,this._connected=!1,!e)throw new Error("Virtualizer constructor requires a configuration object");if(e.hostElement)this._init(e);else throw new Error('Virtualizer configuration requires the "hostElement" property')}set items(e){Array.isArray(e)&&e!==this._items&&(this._itemsChanged=!0,this._items=e,this._schedule(this._updateLayout))}_init(e){this._isScroller=!!e.scroller,this._initHostElement(e);let t=e.layout||{};this._layoutInitialized=this._initLayout(t)}_initObservers(){this._mutationObserver=new MutationObserver(this._finishDOMUpdate.bind(this)),this._hostElementRO=new Xe(()=>this._hostElementSizeChanged()),this._childrenRO=new Xe(this._childrenSizeChanged.bind(this))}_initHostElement(e){let t=this._hostElement=e.hostElement;this._applyVirtualizerStyles(),t[dt]=this}connected(){this._initObservers();let e=this._isScroller;this._clippingAncestors=Ri(this._hostElement,e),this._scrollerController=new It(this,this._clippingAncestors[0]),this._schedule(this._updateLayout),this._observeAndListen(),this._connected=!0}_observeAndListen(){this._mutationObserver.observe(this._hostElement,{childList:!0}),this._hostElementRO.observe(this._hostElement),this._scrollEventListeners.push(window),window.addEventListener("scroll",this,this._scrollEventListenerOptions),this._clippingAncestors.forEach(e=>{e.addEventListener("scroll",this,this._scrollEventListenerOptions),this._scrollEventListeners.push(e),this._hostElementRO.observe(e)}),this._hostElementRO.observe(this._scrollerController.element),this._children.forEach(e=>this._childrenRO.observe(e)),this._scrollEventListeners.forEach(e=>e.addEventListener("scroll",this,this._scrollEventListenerOptions))}disconnected(){this._scrollEventListeners.forEach(e=>e.removeEventListener("scroll",this,this._scrollEventListenerOptions)),this._scrollEventListeners=[],this._clippingAncestors=[],this._scrollerController?.detach(this),this._scrollerController=null,this._mutationObserver?.disconnect(),this._mutationObserver=null,this._hostElementRO?.disconnect(),this._hostElementRO=null,this._childrenRO?.disconnect(),this._childrenRO=null,this._rejectLayoutCompletePromise("disconnected"),this._connected=!1}_applyVirtualizerStyles(){let t=this._hostElement.style;t.display=t.display||"block",t.position=t.position||"relative",t.contain=t.contain||"size layout",this._isScroller&&(t.overflow=t.overflow||"auto",t.minHeight=t.minHeight||"150px")}_getSizer(){let e=this._hostElement;if(!this._sizer){let t=e.querySelector(`[${Nt}]`);t||(t=document.createElement("div"),t.setAttribute(Nt,""),e.appendChild(t)),Object.assign(t.style,{position:"absolute",margin:"-2px 0 0 0",padding:0,visibility:"hidden",fontSize:"2px"}),t.textContent=" ",t.setAttribute(Nt,""),this._sizer=t}return this._sizer}async updateLayoutConfig(e){await this._layoutInitialized;let t=e.type||Je;if(typeof t=="function"&&this._layout instanceof t){let i={...e};return delete i.type,this._layout.config=i,!0}return!1}async _initLayout(e){let t,i;if(typeof e.type=="function"){i=e.type;let s={...e};delete s.type,t=s}else t=e;i===void 0&&(Je=i=(await Promise.resolve().then(()=>(Ge(),Qe))).FlowLayout),this._layout=new i(s=>this._handleLayoutMessage(s),t),this._layout.measureChildren&&typeof this._layout.updateItemSizes=="function"&&(typeof this._layout.measureChildren=="function"&&(this._measureChildOverride=this._layout.measureChildren),this._measureCallback=this._layout.updateItemSizes.bind(this._layout)),this._layout.listenForChildLoadEvents&&this._hostElement.addEventListener("load",this._loadListener,!0),this._schedule(this._updateLayout)}startBenchmarking(){this._benchmarkStart===null&&(this._benchmarkStart=window.performance.now())}stopBenchmarking(){if(this._benchmarkStart!==null){let e=window.performance.now(),t=e-this._benchmarkStart,s=performance.getEntriesByName("uv-virtualizing","measure").filter(n=>n.startTime>=this._benchmarkStart&&n.startTime<e).reduce((n,o)=>n+o.duration,0);return this._benchmarkStart=null,{timeElapsed:t,virtualizationTime:s}}return null}_measureChildren(){let e={},t=this._children,i=this._measureChildOverride||this._measureChild;for(let s=0;s<t.length;s++){let n=t[s],o=this._first+s;(this._itemsChanged||this._toBeMeasured.has(n))&&(e[o]=i.call(this,n,this._items[o]))}this._childMeasurements=e,this._schedule(this._updateLayout),this._toBeMeasured.clear()}_measureChild(e){let{width:t,height:i}=e.getBoundingClientRect();return Object.assign({width:t,height:i},Ai(e))}async _schedule(e){this._scheduled.has(e)||(this._scheduled.add(e),await Promise.resolve(),this._scheduled.delete(e),e.call(this))}async _updateDOM(e){this._scrollSize=e.scrollSize,this._adjustRange(e.range),this._childrenPos=e.childPositions,this._scrollError=e.scrollError||null;let{_rangeChanged:t,_itemsChanged:i}=this;this._visibilityChanged&&(this._notifyVisibility(),this._visibilityChanged=!1),(t||i)&&(this._notifyRange(),this._rangeChanged=!1),this._finishDOMUpdate()}_finishDOMUpdate(){this._connected&&(this._children.forEach(e=>this._childrenRO.observe(e)),this._checkScrollIntoViewTarget(this._childrenPos),this._positionChildren(this._childrenPos),this._sizeHostElement(this._scrollSize),this._correctScrollError(),this._benchmarkStart&&"mark"in window.performance&&window.performance.mark("uv-end"))}_updateLayout(){this._layout&&this._connected&&(this._layout.items=this._items,this._updateView(),this._childMeasurements!==null&&(this._measureCallback&&this._measureCallback(this._childMeasurements),this._childMeasurements=null),this._layout.reflowIfNeeded(),this._benchmarkStart&&"mark"in window.performance&&window.performance.mark("uv-end"))}_handleScrollEvent(){if(this._benchmarkStart&&"mark"in window.performance){try{window.performance.measure("uv-virtualizing","uv-start","uv-end")}catch(e){console.warn("Error measuring performance data: ",e)}window.performance.mark("uv-start")}this._scrollerController.correctingScrollError===!1&&this._layout?.unpin(),this._schedule(this._updateLayout)}handleEvent(e){switch(e.type){case"scroll":(e.currentTarget===window||this._clippingAncestors.includes(e.currentTarget))&&this._handleScrollEvent();break;default:console.warn("event not handled",e)}}_handleLayoutMessage(e){e.type==="stateChanged"?this._updateDOM(e):e.type==="visibilityChanged"?(this._firstVisible=e.firstVisible,this._lastVisible=e.lastVisible,this._notifyVisibility()):e.type==="unpinned"&&this._hostElement.dispatchEvent(new ct)}get _children(){let e=[],t=this._hostElement.firstElementChild;for(;t;)t.hasAttribute(Nt)||e.push(t),t=t.nextElementSibling;return e}_updateView(){let e=this._hostElement,t=this._scrollerController?.element,i=this._layout;if(e&&t&&i){let s,n,o,l,a=e.getBoundingClientRect();s=0,n=0,o=window.innerHeight,l=window.innerWidth;let h=this._clippingAncestors.map(T=>T.getBoundingClientRect());h.unshift(a);for(let T of h)s=Math.max(s,T.top),n=Math.max(n,T.left),o=Math.min(o,T.bottom),l=Math.min(l,T.right);let u=t.getBoundingClientRect(),c={left:a.left-u.left,top:a.top-u.top},f={width:t.scrollWidth,height:t.scrollHeight},d=s-a.top+e.scrollTop,y=n-a.left+e.scrollLeft,v=Math.max(0,o-s),K=Math.max(0,l-n);i.viewportSize={width:K,height:v},i.viewportScroll={top:d,left:y},i.totalScrollSize=f,i.offsetWithinScroller=c}}_sizeHostElement(e){let i=e&&e.width!==null?Math.min(82e5,e.width):0,s=e&&e.height!==null?Math.min(82e5,e.height):0;if(this._isScroller)this._getSizer().style.transform=`translate(${i}px, ${s}px)`;else{let n=this._hostElement.style;n.minWidth=i?`${i}px`:"100%",n.minHeight=s?`${s}px`:"100%"}}_positionChildren(e){e&&e.forEach(({top:t,left:i,width:s,height:n,xOffset:o,yOffset:l},a)=>{let h=this._children[a-this._first];h&&(h.style.position="absolute",h.style.boxSizing="border-box",h.style.transform=`translate(${i}px, ${t}px)`,s!==void 0&&(h.style.width=s+"px"),n!==void 0&&(h.style.height=n+"px"),h.style.left=o===void 0?null:o+"px",h.style.top=l===void 0?null:l+"px")})}async _adjustRange(e){let{_first:t,_last:i,_firstVisible:s,_lastVisible:n}=this;this._first=e.first,this._last=e.last,this._firstVisible=e.firstVisible,this._lastVisible=e.lastVisible,this._rangeChanged=this._rangeChanged||this._first!==t||this._last!==i,this._visibilityChanged=this._visibilityChanged||this._firstVisible!==s||this._lastVisible!==n}_correctScrollError(){if(this._scrollError){let{scrollTop:e,scrollLeft:t}=this._scrollerController,{top:i,left:s}=this._scrollError;this._scrollError=null,this._scrollerController.correctScrollError({top:e-i,left:t-s})}}element(e){return e===1/0&&(e=this._items.length-1),this._items?.[e]===void 0?void 0:{scrollIntoView:(t={})=>this._scrollElementIntoView({...t,index:e})}}_scrollElementIntoView(e){if(e.index>=this._first&&e.index<=this._last)this._children[e.index-this._first].scrollIntoView(e);else if(e.index=Math.min(e.index,this._items.length-1),e.behavior==="smooth"){let t=this._layout.getScrollIntoViewCoordinates(e),{behavior:i}=e;this._updateScrollIntoViewCoordinates=this._scrollerController.managedScrollTo(Object.assign(t,{behavior:i}),()=>this._layout.getScrollIntoViewCoordinates(e),()=>this._scrollIntoViewTarget=null),this._scrollIntoViewTarget=e}else this._layout.pin=e}_checkScrollIntoViewTarget(e){let{index:t}=this._scrollIntoViewTarget||{};t&&e?.has(t)&&this._updateScrollIntoViewCoordinates(this._layout.getScrollIntoViewCoordinates(this._scrollIntoViewTarget))}_notifyRange(){this._hostElement.dispatchEvent(new B({first:this._first,last:this._last}))}_notifyVisibility(){this._hostElement.dispatchEvent(new F({first:this._firstVisible,last:this._lastVisible}))}get layoutComplete(){return this._layoutCompletePromise||(this._layoutCompletePromise=new Promise((e,t)=>{this._layoutCompleteResolver=e,this._layoutCompleteRejecter=t})),this._layoutCompletePromise}_rejectLayoutCompletePromise(e){this._layoutCompleteRejecter!==null&&this._layoutCompleteRejecter(e),this._resetLayoutCompleteState()}_scheduleLayoutComplete(){this._layoutCompletePromise&&this._pendingLayoutComplete===null&&(this._pendingLayoutComplete=requestAnimationFrame(()=>requestAnimationFrame(()=>this._resolveLayoutCompletePromise())))}_resolveLayoutCompletePromise(){this._layoutCompleteResolver!==null&&this._layoutCompleteResolver(),this._resetLayoutCompleteState()}_resetLayoutCompleteState(){this._layoutCompletePromise=null,this._layoutCompleteResolver=null,this._layoutCompleteRejecter=null,this._pendingLayoutComplete=null}_hostElementSizeChanged(){this._schedule(this._updateLayout)}_childLoaded(){}_childrenSizeChanged(e){if(this._layout?.measureChildren){for(let t of e)this._toBeMeasured.set(t.target,t.contentRect);this._measureChildren()}this._scheduleLayoutComplete(),this._itemsChanged=!1,this._rangeChanged=!1}};function Ai(r){let e=window.getComputedStyle(r);return{marginTop:jt(e.marginTop),marginRight:jt(e.marginRight),marginBottom:jt(e.marginBottom),marginLeft:jt(e.marginLeft)}}function jt(r){let e=r?parseFloat(r):NaN;return Number.isNaN(e)?0:e}function Ze(r){if(r.assignedSlot!==null)return r.assignedSlot;if(r.parentElement!==null)return r.parentElement;let e=r.parentNode;return e&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&e.host||null}function Mi(r,e=!1){let t=[],i=e?r:Ze(r);for(;i!==null;)t.push(i),i=Ze(i);return t}function Ri(r,e=!1){let t=!1;return Mi(r,e).filter(i=>{if(t)return!1;let s=getComputedStyle(i);return t=s.position==="fixed",s.overflow!=="visible"})}var le=r=>r,ae=(r,e)=>b`${e}: ${JSON.stringify(r,null,2)}`,oe=class extends kt{constructor(e){if(super(e),this._virtualizer=null,this._first=0,this._last=-1,this._renderItem=(t,i)=>ae(t,i+this._first),this._keyFunction=(t,i)=>le(t,i+this._first),this._items=[],e.type!==x.CHILD)throw new Error("The virtualize directive can only be used in child expressions")}render(e){e&&this._setFunctions(e);let t=[];if(this._first>=0&&this._last>=this._first)for(let i=this._first;i<=this._last;i++)t.push(this._items[i]);return Pt(t,this._keyFunction,this._renderItem)}update(e,[t]){this._setFunctions(t);let i=this._items!==t.items;return this._items=t.items||[],this._virtualizer?this._updateVirtualizerConfig(e,t):this._initialize(e,t),i?S:this.render()}async _updateVirtualizerConfig(e,t){if(!await this._virtualizer.updateLayoutConfig(t.layout||{})){let s=e.parentNode;this._makeVirtualizer(s,t)}this._virtualizer.items=this._items}_setFunctions(e){let{renderItem:t,keyFunction:i}=e;t&&(this._renderItem=(s,n)=>t(s,n+this._first)),i&&(this._keyFunction=(s,n)=>i(s,n+this._first))}_makeVirtualizer(e,t){this._virtualizer&&this._virtualizer.disconnected();let{layout:i,scroller:s,items:n}=t;this._virtualizer=new Ut({hostElement:e,layout:i,scroller:s}),this._virtualizer.items=n,this._virtualizer.connected()}_initialize(e,t){let i=e.parentNode;i&&i.nodeType===1&&(i.addEventListener("rangeChanged",s=>{this._first=s.first,this._last=s.last,this.setValue(this.render())}),this._makeVirtualizer(i,t))}disconnected(){this._virtualizer?.disconnected()}reconnected(){this._virtualizer?.connected()}},Ye=z(oe);var A=class extends C{constructor(){super(...arguments),this.items=[],this.renderItem=ae,this.keyFunction=le,this.layout={},this.scroller=!1}createRenderRoot(){return this}render(){let{items:e,renderItem:t,keyFunction:i,layout:s,scroller:n}=this;return b`${Ye({items:e,renderItem:t,keyFunction:i,layout:s,scroller:n})}`}element(e){return this[dt]?.element(e)}get layoutComplete(){return this[dt]?.layoutComplete}scrollToIndex(e,t="start"){this.element(e)?.scrollIntoView({block:t})}};H([p({attribute:!1})],A.prototype,"items",void 0);H([p()],A.prototype,"renderItem",void 0);H([p()],A.prototype,"keyFunction",void 0);H([p({attribute:!1})],A.prototype,"layout",void 0);H([p({reflect:!0,type:Boolean})],A.prototype,"scroller",void 0);customElements.define("lit-virtualizer",A);var ti=Kt`
|
|
4
4
|
/* Style declarations */
|
|
5
5
|
:host {
|
|
6
6
|
/* Typography */
|
|
@@ -298,7 +298,7 @@
|
|
|
298
298
|
overflow: hidden;
|
|
299
299
|
text-overflow: ellipsis;
|
|
300
300
|
}
|
|
301
|
-
`;var Pi=1e3,ei={storage:"local",saveColumnSortOrders:!0,saveColumnVisibility:!0,saveColumnWidths:!0,saveColumnOrder:!0},Di=new Set(["searchQuery","filters","columns","columnSort","columnOrder","columnVisibility","columnWidths","storageOptions"]),
|
|
301
|
+
`;var Pi=1e3,ei={storage:"local",saveColumnSortOrders:!0,saveColumnVisibility:!0,saveColumnWidths:!0,saveColumnOrder:!0},Di=new Set(["searchQuery","filters","columns","columnSort","columnOrder","columnVisibility","columnWidths","storageOptions"]),he={EXACT:100,PREFIX:50,SUBSTRING:10},m=class extends C{constructor(){super(...arguments);this._enableSearchTokenization=!1;this._enableSearchScoring=!1;this._columns=[];this._columnDefinitionMap=new Map;this._columnStateMap=new Map;this._columnOrder=[];this._storageOptions=null;this._data=[];this._searchQuery="";this._searchTokenizer=Yt;this._filters=null;this._filteredData=[];this.hasRestoredState=!1;this.saveTimer=0;this.filterDirty=!1;this.sortDirty=!1;this.dataLastUpdate=null;this.rowMetadata=new WeakMap;this.queryTokens=null;this.resizeState=null;this.dragColumn=null;this.sortable=!1;this.resizable=!1;this.enableVirtualScroll=!1;this.enableSearchHighlight=!0;this.enableColumnReorder=!0;this.enableFooter=!1;this.nullValuePlaceholder="-";this.emptyMessage="No records to display";this.noResultsMessage="No matching records found";this.rowParts=null;this.handleHeaderClicked=(t,i)=>{if(this.resizeState)return;let s=t.shiftKey,n=this.getOrCreateColumnState(i.field);n?.sort?n.sort.order==="asc"?this.sort(i.field,"desc",!s):n.sort.order&&this.sort(i.field,null,!s):this.sort(i.field,"asc",!s)};this.handleCellClick=(t,i,s)=>{if(window.getSelection()?.toString())return;let n=this.rowMetadata.get(i).index;this.dispatchEvent(new W(i,n,s,t))};this.handleResizeMouseMove=t=>{this.resizeState?.active&&requestAnimationFrame(()=>{if(!this.resizeState?.active)return;let i=t.pageX-this.resizeState.startX,s=Math.max(50,this.resizeState.startWidth+i);this.resizeState.currentWidths[this.resizeState.columnIndex]=`${s}px`,this.tableElement.style.setProperty("--grid-template",this.resizeState.currentWidths.join(" "))})};this.handleResizeMouseUp=t=>{if(window.removeEventListener("mousemove",this.handleResizeMouseMove),window.removeEventListener("mouseup",this.handleResizeMouseUp),document.body.style.cursor="",this.resizeState?.active){t.preventDefault(),t.stopPropagation();let i=parseFloat(this.resizeState.currentWidths[this.resizeState.columnIndex]),s=this.columnWidths;s[this.resizeState.columnField]=i,this.columnWidths={...s},this.dispatchEvent(new X(this.resizeState.columnField,i))}setTimeout(()=>{this.resizeState=null})};this.handleDragColumnStart=(t,i)=>{if(t.target?.classList.contains("resizer")){t.preventDefault();return}t.dataTransfer&&(t.dataTransfer.effectAllowed="move",t.dataTransfer.setData("text/plain",i),this.dragColumn=i)};this.handleDragColumnEnter=t=>{t.currentTarget.querySelector(".drop-indicator")?.classList.add("active")};this.handleDragColumnLeave=t=>{let i=t.currentTarget,s=t.relatedTarget;i.contains(s)||i.querySelector(".drop-indicator")?.classList.remove("active")};this.handleDragColumnOver=t=>{t.preventDefault(),t.dataTransfer&&(t.dataTransfer.dropEffect="move")};this.handleDragColumnDrop=(t,i)=>{if(!this.dragColumn||this.dragColumn===i)return;t.preventDefault(),t.stopPropagation();let s=[...this.columnOrder],n=s.findIndex(l=>l===this.dragColumn),o=s.findIndex(l=>l===i);if(n>-1&&o>-1){let[l]=s.splice(n,1),a=this.getColumn(i);if(!a)return;s.splice(o,0,l);let h=new J(l,a.field,s);if(!this.dispatchEvent(h))return;this.columnOrder=[...s]}};this.handleDragColumnEnd=()=>{this.dragColumn=null,this.tableElement.querySelectorAll(".drop-indicator.active").forEach(t=>t.classList.remove("active"))}}get enableSearchTokenization(){return this._enableSearchTokenization}set enableSearchTokenization(t){if(this._enableSearchTokenization===t)return;let i=this._enableSearchTokenization;this._enableSearchTokenization=t,this.updateInternalQuery(),this.filterDirty=!0,this.requestUpdate("enableSearchTokenization",i)}get enableSearchScoring(){return this._enableSearchScoring}set enableSearchScoring(t){if(this._enableSearchScoring===t)return;let i=this._enableSearchScoring;this._enableSearchScoring=t,this.filterDirty=!0,this.requestUpdate("enableSearchScoring",i)}get columns(){return this._columns}set columns(t){if(this._columns===t)return;let i=this._columns;this._columns=t,this.filterDirty=!0,this._columnDefinitionMap=new Map;for(let s of this.columns)this._columnDefinitionMap.set(s.field,s);this.requestUpdate("columns",i)}get displayColumns(){return this.columnOrder.map(t=>this._columnDefinitionMap.get(t)).filter(at)}get columnOrder(){let t=new Set;for(let i of this._columnOrder)this.getDisplayColumn(i)&&t.add(i);for(let i of this.columns)at(i)&&!t.has(i.field)&&t.add(i.field);return[...t]}set columnOrder(t){if(this._columnOrder===t)return;let i=this._columnOrder;this._columnOrder=[...t],this.requestUpdate("columnOrder",i)}get columnVisibility(){let t={};for(let i of this.columnOrder)t[i]=this.getOrCreateColumnState(i).visible;return t}set columnVisibility(t){let i=this.columnVisibility,s=!1,n=Object.entries(t);for(let[o,l]of n){let a=this.getOrCreateColumnState(o);a.visible!==l&&(s=!0,a.visible=l)}s&&this.requestUpdate("columnVisibility",i)}get columnSort(){let t={};for(let i of this.columnOrder){let s=this.getOrCreateColumnState(i).sort;t[i]=s?{...s}:null}return t}set columnSort(t){let i=this.columnSort,s=!1,n=Object.entries(t);for(let[o,l]of n){let a=this.getOrCreateColumnState(o);a&&(a.sort?.order!==l?.order||a.sort?.priority!==l?.priority)&&(s=!0,a.sort=l)}s&&(this.sortDirty=!0,this.requestUpdate("columnSort",i))}get columnWidths(){let t={};for(let i of this.columnOrder)t[i]=this.getOrCreateColumnState(i).width;return t}set columnWidths(t){let i=this.columnWidths,s=!1,n=Object.entries(t);for(let[o,l]of n){let a=this.getOrCreateColumnState(o);a.width!==l&&(s=!0,a.width=l)}s&&this.requestUpdate("columnWidths",i)}get searchQuery(){return this._searchQuery}set searchQuery(t){if(this._searchQuery===t)return;let i=this._searchQuery;this._searchQuery=t,this.updateInternalQuery(),this.filterDirty=!0,this.requestUpdate("searchQuery",i)}get searchTokenizer(){return this._searchTokenizer}set searchTokenizer(t){if(this._searchTokenizer===t)return;let i=this._searchTokenizer;this._searchTokenizer=t,this.filterDirty=!0,this.requestUpdate("searchTokenizer",i)}get filters(){return this._filters}set filters(t){if(this._filters===t)return;let i=this._filters;this._filters=t,this.filterDirty=!0,this.requestUpdate("filters",i)}get storageOptions(){return this._storageOptions}set storageOptions(t){if(this._storageOptions===t)return;let i=this._storageOptions;this._storageOptions=t,this.hasRestoredState||this.loadStateFromStorage(),this.requestUpdate("storageOptions",i)}get data(){return this._data}set data(t){let i=this._data;this._data=t,this.dataLastUpdate=new Date,this.createMetadata(),this.filterDirty=!0,this.requestUpdate("data",i)}get filteredData(){return this.filterDirty?this.filterRows():this.sortDirty&&this.sortRows(),this.filterDirty=!1,this.sortDirty=!1,[...this._filteredData]}getColumn(t){return this._columnDefinitionMap.get(t)}getDisplayColumn(t){let i=this._columnDefinitionMap.get(t);if(i&&at(i))return i}getState(){return{searchQuery:this.searchQuery,filters:this.filters,columnOrder:this.columnOrder,columns:this.columns.map(t=>{let i=this.getOrCreateColumnState(t.field);return{field:t.field,visible:i.visible,sort:i.sort,width:i.width}})}}restoreState(t){if("searchQuery"in t&&t.searchQuery!==void 0&&(this.searchQuery=t.searchQuery),"filters"in t&&t.filters!==void 0&&(this.filters=t.filters),"columnOrder"in t&&t.columnOrder!==void 0&&(this.columnOrder=t.columnOrder),"columns"in t&&t.columns!==void 0){for(let i of t.columns){let s=this.getOrCreateColumnState(i.field);i&&("visible"in i&&i.visible!==void 0&&(s.visible=i.visible),"sort"in i&&i.sort!==void 0&&(s.sort=i.sort),"width"in i&&i.width!==void 0&&(s.width=i.width))}this.requestUpdate()}}sort(t,i,s=!0){let n=this.columnSort,o=n[t];if(o===void 0)throw new Error(`Cannot get options for non-existent column "${t}"`);if(i!==o?.order&&this.dispatchEvent(new Q(t,i))){if(i&&!o){let l=[...this._columnStateMap.values()].map(u=>u.sort?.priority).filter(u=>u!==void 0),a=this.columns.length+1,h=Math.min(a,...l)-1;o={order:i,priority:h}}else i&&o?o.order=i:o=null;if(n[t]=o,s)for(let l of this.columnOrder)l!==t&&(n[l]=null);this.columnSort={...n}}}setColumnVisibility(t,i){let s=this.columnVisibility,n=s[t];if(n===void 0)throw new Error(`Cannot get options for non-existent column "${t}"`);n!==i&&this.dispatchEvent(new G(t,i))&&(s[t]=i,this.columnVisibility={...s})}toggleColumnVisibility(t){let i=this.getOrCreateColumnState(t);this.setColumnVisibility(t,!i.visible)}showColumn(t){this.setColumnVisibility(t,!0)}hideColumn(t){this.setColumnVisibility(t,!1)}export(t,i=!1){let s=i?this.data:this.filteredData,n=this.displayColumns,o=n.filter(c=>i||this.getOrCreateColumnState(c.field).visible).map(c=>`"${c.title}"`).join(","),l=s.map(c=>{let f=[];for(let d of n){let y=this.getOrCreateColumnState(d.field),v=R(c,d.field);(i||y.visible)&&(typeof d.valueFormatter=="function"&&(v=d.valueFormatter(v,c)),v=String(v).replace('"','""'),f.push(`"${v}"`))}return f.join(",")}).join(`
|
|
302
302
|
`),a=o+`
|
|
303
303
|
`+l,h=new Blob([a],{type:"text/csv;charset=utf-8,"}),u=document.createElement("a");u.style.display="none",u.href=URL.createObjectURL(h),u.download=`${t}.csv`,document.body.append(u),u.click(),u.remove()}scrollToRow(t){let i=this.data.findIndex(s=>s===t);if(typeof i=="number")return this.scrollToOriginalIndex(i);throw new Error("Row not in table")}scrollToOriginalIndex(t){let i=this.data[t];if(i){let s=this.filteredData.indexOf(i);if(s>=0)return this.scrollToFilteredIndex(s);throw new Error("Cannot scroll to filtered out row")}else throw new RangeError(`Row index ${t} out of range`)}async scrollToFilteredIndex(t){if(!this.filteredData[t])throw new RangeError(`Row index ${t} out of range`);await this.updateComplete,this.virtualizer?this.virtualizer.element(t)?.scrollIntoView({block:"start",behavior:"instant"}):this.tableElement.querySelector(`.row[data-filtered-index="${t}"]`)?.scrollIntoView({block:"start",behavior:"smooth"})}async scrollToPx(t){await this.updateComplete,this.virtualizer?this.virtualizer.scrollTop=t:this.tableElement.scrollTop=t}findRow(t,i){return this.data.find(s=>R(s,t)===i)}findRowIndex(t,i){let s=this.findRow(t,i);return s?this.rowMetadata.get(s).index:-1}updateRow(t,i){let s=this.data[t];s&&(Object.assign(s,i),this.requestUpdate("data"))}deleteRow(t){this.data=this.data.toSpliced(t,1)}renderColumnSortIcon(t,i){return t.sortable??this.sortable?b`<div
|
|
304
304
|
part="header-sort-icon"
|
|
@@ -312,19 +312,19 @@
|
|
|
312
312
|
<div
|
|
313
313
|
part="cell header-cell"
|
|
314
314
|
class=${Mt({cell:!0,sortable:i.sortable??this.sortable})}
|
|
315
|
-
draggable=${
|
|
315
|
+
draggable=${ie(this.enableColumnReorder?!0:void 0)}
|
|
316
316
|
data-field=${i.field}
|
|
317
|
-
@dragstart=${
|
|
317
|
+
@dragstart=${n=>this.handleDragColumnStart(n,i.field)}
|
|
318
318
|
@dragenter=${this.handleDragColumnEnter}
|
|
319
319
|
@dragleave=${this.handleDragColumnLeave}
|
|
320
320
|
@dragover=${this.handleDragColumnOver}
|
|
321
|
-
@drop=${
|
|
321
|
+
@drop=${n=>this.handleDragColumnDrop(n,i.field)}
|
|
322
322
|
@dragend=${this.handleDragColumnEnd}
|
|
323
|
-
@click=${
|
|
323
|
+
@click=${n=>this.handleHeaderClicked(n,i)}
|
|
324
324
|
>
|
|
325
325
|
<div class="header-content">
|
|
326
326
|
<span class="header-title truncate" part="header-title">
|
|
327
|
-
${i.title??
|
|
327
|
+
${i.title??Ae(i.field)}
|
|
328
328
|
</span>
|
|
329
329
|
${this.renderColumnSortIcon(i,s)}
|
|
330
330
|
</div>
|
|
@@ -335,30 +335,28 @@
|
|
|
335
335
|
<div part="header" class=${Mt(t)}>
|
|
336
336
|
${this.columnOrder.map(i=>this.renderHeaderCell(i))}
|
|
337
337
|
</div>
|
|
338
|
-
`}renderCellContents(t,i,s){if(i.cellRenderer)return i.cellRenderer(t,i.field,s);if(t==null)return this.nullValuePlaceholder;let
|
|
338
|
+
`}renderCellContents(t,i,s){if(i.cellRenderer)return i.cellRenderer(t,i.field,s);if(t==null)return this.nullValuePlaceholder;let n=this.rowMetadata.get(s).highlightIndices;return this.enableSearchHighlight&&n?Me(String(t),n[i.field]):t}renderCell(t,i){let s=this.getDisplayColumn(t);if(!s)return g;if(!this.getOrCreateColumnState(t).visible)return;let o=R(i,s.field),l=s.cellParts?.call(this,o,s.field,i);return Array.isArray(l)&&(l=l.join(" ")),typeof s.valueFormatter=="function"&&(o=s.valueFormatter(o,i)),b`
|
|
339
339
|
<div
|
|
340
340
|
part="cell body-cell cell-${s.field} ${l}"
|
|
341
341
|
data-field=${s.field}
|
|
342
342
|
class="cell"
|
|
343
|
-
title=${
|
|
343
|
+
title=${ie(o?String(o):void 0)}
|
|
344
344
|
@click=${a=>this.handleCellClick(a,i,s.field)}
|
|
345
345
|
>
|
|
346
346
|
<span class="truncate">
|
|
347
347
|
${this.renderCellContents(o,s,i)}
|
|
348
348
|
</span>
|
|
349
349
|
</div>
|
|
350
|
-
`}renderRow(t,i){let s=this.rowMetadata.get(t),
|
|
350
|
+
`}renderRow(t,i){let s=this.rowMetadata.get(t),n=this.rowParts?.(t)??"";return Array.isArray(n)&&(n=n.join(" ")),b`
|
|
351
351
|
<div
|
|
352
|
-
part=${"row "+
|
|
352
|
+
part=${"row "+n}
|
|
353
353
|
class="row"
|
|
354
354
|
data-index=${s.index}
|
|
355
355
|
data-filtered-index=${i}
|
|
356
356
|
>
|
|
357
357
|
${this.columnOrder.map(o=>this.renderCell(o,t))}
|
|
358
358
|
</div>
|
|
359
|
-
`}renderBody(){return this.
|
|
360
|
-
<div part="message" class="message">No visible columns.</div>
|
|
361
|
-
`:this.data.length===0?b`<div part="message" class="message">
|
|
359
|
+
`}renderBody(){return this.hasVisibleColumn()?this.data.length===0?b`<div part="message" class="message">
|
|
362
360
|
${this.emptyMessage}
|
|
363
361
|
</div>`:this.filteredData.length===0?b`<div part="message" class="message">
|
|
364
362
|
${this.noResultsMessage}
|
|
@@ -369,7 +367,9 @@
|
|
|
369
367
|
></lit-virtualizer>
|
|
370
368
|
`:b`
|
|
371
369
|
${Pt(this.filteredData,t=>this.rowMetadata.get(t).index,(t,i)=>this.renderRow(t,i))}
|
|
372
|
-
|
|
370
|
+
`:b`
|
|
371
|
+
<div part="message" class="message">No visible columns.</div>
|
|
372
|
+
`}renderFooter(){if(!this.enableFooter)return g;let t=this.data.length,i=this.filteredData.length,s=new Intl.NumberFormat(void 0),n=s.format(t),o=s.format(i),l=t!==i?`Showing ${o} of ${n} records`:`Total records: ${n}`,a=Intl.DateTimeFormat(void 0,{dateStyle:"short",timeStyle:"short"}),h=this.dataLastUpdate?a.format(this.dataLastUpdate):"Never";return b`
|
|
373
373
|
<div part="footer" class="footer">
|
|
374
374
|
<slot name="footer">
|
|
375
375
|
<span part="row-count">${l}</span>
|
|
@@ -382,9 +382,10 @@
|
|
|
382
382
|
class="table"
|
|
383
383
|
style=${Be({"--grid-template":i})}
|
|
384
384
|
>
|
|
385
|
-
${this.renderHeader()}
|
|
385
|
+
${this.renderHeader()}
|
|
386
|
+
<slot> ${this.renderBody()} ${this.renderFooter()} </slot>
|
|
386
387
|
</div>
|
|
387
|
-
`}updated(t){super.updated(t),super.updated(t);let s=["columnOrder","columnVisibility","columnSort","columnWidths","searchQuery","filters"].filter(
|
|
388
|
+
`}updated(t){super.updated(t),super.updated(t);let s=["columnOrder","columnVisibility","columnSort","columnWidths","searchQuery","filters"].filter(n=>t.has(n));s.length&&this.dispatchEvent(new Z(this.getState(),s)),this.storageOptions?.key&&Array.from(t.keys()).some(o=>Di.has(o))&&this.scheduleSave()}disconnectedCallback(){super.disconnectedCallback(),window.addEventListener("mousemove",this.handleResizeMouseMove),window.addEventListener("mouseup",this.handleResizeMouseUp)}calculateSearchScore(t,i){let s={score:0,ranges:[]};if(!t||!i)return s;let n=0,o=0;if(i===t)o=he.EXACT,n=t.length,s.ranges.push([0,i.length]);else if(i.startsWith(t))o=he.PREFIX,n=t.length,s.ranges.push([0,t.length]);else{let h=i.indexOf(t);if(h!==-1){o=he.SUBSTRING,n=t.length;let u=h;for(;u!==-1;)s.ranges.push([u,u+t.length]),u=i.indexOf(t,u+1)}else return s}let a=1/(1+(i.length-t.length));return s.score=n*o*a,s}searchField(t,i,s){let n={score:0,ranges:[]},o=l=>{let a=i.indexOf(l);for(;a!==-1;)n.ranges.push([a,a+l.length]),a=i.indexOf(l,a+1)};if(t.quoted||!s){if(!this.enableSearchScoring)i.includes(t.value)&&(n.score=1,o(t.value));else{let l=this.calculateSearchScore(t.value,i);n.score=l.score,n.ranges=l.ranges}return n}if(!this.enableSearchScoring)return s.some(a=>a.includes(t.value))&&(n.score=1,o(t.value)),n;for(let l of s){let a=this.calculateSearchScore(t.value,l);a.score>0&&(n.score+=a.score,o(t.value))}return n}filterField(t,i,s=null){return Array.isArray(i)?i.length===0?!0:i.some(n=>this.filterField(t,n,s)):Array.isArray(t)?t.length===0?!1:t.some(n=>this.filterField(n,i,s)):typeof s=="function"?s(t,i):i instanceof RegExp?i.test(String(t)):i===t}filterRow(t,i){if(!this.filters)return!0;if(typeof this.filters=="function")return this.filters(t,i);for(let s in this.filters){let n=R(this.filters,s),o=R(t,s);if(typeof n=="function"){if(!n(o))return!1}else{let l=this.getColumn(s),a=l?l.filter:void 0;if(!this.filterField(o,n,a))return!1}}return!0}filterRows(){let i=[...this.columns].filter(s=>s.searchable).map(s=>s.field);this._filteredData=this.data.filter((s,n)=>{let o=this.rowMetadata.get(s);if(o.searchScore=0,o.highlightIndices={},!this.filterRow(s,n))return!1;if(!this.queryTokens)return!0;for(let l of i){let a=R(s,l),h=o.searchValues[l],u=o.searchTokens[l];if(typeof a!="string"||typeof h!="string")continue;let c={score:0,ranges:[]};for(let f of this.queryTokens){let d=this.searchField(f,h,u);c.score+=d.score,c.ranges.push(...d.ranges)}c.score>0&&(o.searchScore+=c.score,o.highlightIndices[l]=c.ranges)}return o.searchScore>0}),this.filterDirty=!1,this.sortRows(),this.dispatchEvent(new q(this.data))}compareRows(t,i,s){let n,o,l=this.getOrCreateColumnState(s);if(!l.sort)return 0;let a=this.rowMetadata.get(t),h=this.rowMetadata.get(i);l.sort?.order==="asc"?(n=a.sortValues[s],o=h.sortValues[s]):(n=h.sortValues[s],o=a.sortValues[s]);let u=n==null,c=o==null;return u&&!c?-1:c&&!u?1:n<o?-1:n>o?1:0}sortRows(){if(this.filterDirty){this.filterRows();return}let t=[...this._columnStateMap.values()].filter(i=>i.visible&&i.sort).sort((i,s)=>s.sort.priority-i.sort.priority);this._filteredData=this._filteredData.toSorted((i,s)=>{let n=this.rowMetadata.get(i),o=this.rowMetadata.get(s);if(this.enableSearchScoring&&this.queryTokens){let l=n.searchScore||0,a=o.searchScore||0;if(l>a)return-1;if(l<a)return 1}for(let l of t){let a=this.compareRows(i,s,l.field);if(a!==0)return a}return n.index-o.index}),this.sortDirty=!1}createMetadata(){this.rowMetadata=new WeakMap;let t=0;for(let i of this.data){let s={index:t++,searchTokens:{},searchValues:{},sortValues:{}};this.rowMetadata.set(i,s);for(let n of this.columns){let o=R(i,n.field);if(typeof n.sorter=="function"?s.sortValues[n.field]=n.sorter(o):typeof o=="string"?s.sortValues[n.field]=o.toLocaleLowerCase():Re(o)?s.sortValues[n.field]=o:s.sortValues[n.field]=String(o),typeof o=="string"&&(s.searchValues[n.field]=o.toLocaleLowerCase()),n.searchable&&n.tokenize&&o){let l=n.searchTokenizer??this.searchTokenizer;s.searchTokens[n.field]=l(String(o)).map(a=>a.value)}}}}updateInternalQuery(){if(this.searchQuery.length===0){this.queryTokens=null;return}this.queryTokens=[{value:this.searchQuery.toLocaleLowerCase(),quoted:!0}],this.enableSearchTokenization&&this.queryTokens.push(...this.searchTokenizer(this.searchQuery))}hasVisibleColumn(){return this.columnOrder.map(t=>this.getOrCreateColumnState(t)).filter(t=>t.visible).length>0}getGridWidths(){return this.columnOrder.map(t=>this.getOrCreateColumnState(t)).filter(t=>t.visible).map(t=>t.width)}scheduleSave(){window.clearTimeout(this.saveTimer),this.saveTimer=window.setTimeout(()=>{this.saveStateToStorage()},Pi)}getOrCreateColumnState(t){let i=this._columnStateMap.get(t);return i||(i={field:t,visible:!0,width:null,sort:null},this._columnStateMap.set(t,i)),i}saveStateToStorage(){if(!this.storageOptions)return;let t={...ei,...this.storageOptions},i={columns:[]},s=this.getState();t.saveColumnOrder&&(i.columnOrder=s.columnOrder);for(let o of s.columns){let l={field:o.field};t.saveColumnSortOrders&&(l.sort=o.sort),t.saveColumnVisibility&&(l.visible=o.visible),t.saveColumnWidths&&(l.width=o.width),i.columns?.push(l)}let n=t.storage==="session"?sessionStorage:localStorage;try{n.setItem(t.key,JSON.stringify(i))}catch(o){console.warn("Failed to save table state",o)}}loadStateFromStorage(){if(!this.storageOptions)return;let t={...ei,...this.storageOptions},i=localStorage.getItem(t.key);if(i)try{let s=JSON.parse(i),n={};if(t.saveColumnOrder&&(n.columnOrder=s.columnOrder),s.columns){n.columns=[];for(let o of s.columns){let l={field:o.field};t.saveColumnVisibility&&(l.visible=o.visible),t.saveColumnWidths&&(l.width=o.width),t.saveColumnSortOrders&&(l.sort=o.sort),n.columns.push(l)}}this.restoreState(n),this.hasRestoredState=!0}catch(s){console.error("Failed to restore DataTable state:",s)}}handleResizeMouseDown(t,i){t.preventDefault(),t.stopPropagation();let n=t.target.closest(".cell");if(!n)return;let o=this.columnOrder.findIndex(l=>l===i);o<0||(this.tableElement.querySelectorAll(".header .cell").forEach(l=>{let a=l.dataset.field;if(a){let h=this.getOrCreateColumnState(a);h&&(h.width=l.getBoundingClientRect().width)}}),this.resizeState={active:!0,startX:t.pageX,startWidth:n.getBoundingClientRect().width,columnIndex:o,columnField:i,currentWidths:te(this.getGridWidths())},this.tableElement.style.setProperty("--grid-template",this.resizeState.currentWidths.join(" ")),window.addEventListener("mousemove",this.handleResizeMouseMove),window.addEventListener("mouseup",this.handleResizeMouseUp),document.body.style.cursor="col-resize")}addEventListener(t,i,s){super.addEventListener(t,i,s)}removeEventListener(t,i,s){super.removeEventListener(t,i,s)}dispatchEvent(t){return super.dispatchEvent(t)}};m.styles=[ti],_([ee(".table")],m.prototype,"tableElement",2),_([ee("lit-virtualizer")],m.prototype,"virtualizer",2),_([ke()],m.prototype,"_filteredData",2),_([p({type:Boolean,attribute:"sortable"})],m.prototype,"sortable",2),_([p({type:Boolean,attribute:"resizable"})],m.prototype,"resizable",2),_([p({type:Boolean,attribute:"enable-virtual-scroll"})],m.prototype,"enableVirtualScroll",2),_([p({type:Boolean,attribute:"enable-search-highlight"})],m.prototype,"enableSearchHighlight",2),_([p({type:Boolean,attribute:"enable-search-tokenization"})],m.prototype,"enableSearchTokenization",1),_([p({type:Boolean,attribute:"enable-search-scoring"})],m.prototype,"enableSearchScoring",1),_([p({type:Boolean,attribute:"enable-column-reorder"})],m.prototype,"enableColumnReorder",2),_([p({type:Boolean,attribute:"enable-footer"})],m.prototype,"enableFooter",2),_([p({type:String,attribute:"null-value-placeholder"})],m.prototype,"nullValuePlaceholder",2),_([p({type:String,attribute:"empty-message"})],m.prototype,"emptyMessage",2),_([p({type:String,attribute:"no-results-message"})],m.prototype,"noResultsMessage",2),_([p({attribute:!1})],m.prototype,"columns",1),_([p({attribute:!1})],m.prototype,"columnOrder",1),_([p({attribute:!1})],m.prototype,"columnVisibility",1),_([p({attribute:!1})],m.prototype,"columnSort",1),_([p({attribute:!1})],m.prototype,"columnWidths",1),_([p({type:String,attribute:"search-query"})],m.prototype,"searchQuery",1),_([p({attribute:!1})],m.prototype,"searchTokenizer",1),_([p({attribute:!1})],m.prototype,"filters",1),_([p({attribute:!1})],m.prototype,"rowParts",2),_([p({type:Object,attribute:"storage-options"})],m.prototype,"storageOptions",1),_([p({attribute:!1})],m.prototype,"data",1),m=_([De("yatl-table")],m);return ni(ki);})();
|
|
388
389
|
/*! Bundled license information:
|
|
389
390
|
|
|
390
391
|
@lit-labs/virtualizer/layouts/shared/SizeCache.js:
|