nish-ui 3.2.0 → 3.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (95) hide show
  1. package/README.md +7 -3
  2. package/dist/base-tailwind.css +30 -15
  3. package/dist/base.css +30 -15
  4. package/dist/elements-all.js +78 -78
  5. package/dist/elements-charts.js +39 -38
  6. package/dist/elements-data.d.ts +10 -0
  7. package/dist/elements-data.js +4 -5
  8. package/dist/elements-forms.js +5 -5
  9. package/dist/elements.d.ts +1 -0
  10. package/dist/elements.js +4 -4
  11. package/dist/esm/command-filter.js +55 -4
  12. package/dist/esm/components/accordion.js +3 -2
  13. package/dist/esm/components/app-shell.js +8 -4
  14. package/dist/esm/components/breadcrumbs.js +7 -3
  15. package/dist/esm/components/calendar-base.js +32 -5
  16. package/dist/esm/components/calendar-classes.js +14 -2
  17. package/dist/esm/components/canvas/follow-caption.js +31 -21
  18. package/dist/esm/components/canvas/follow.js +5 -6
  19. package/dist/esm/components/canvas/minimap.js +3 -3
  20. package/dist/esm/components/canvas/system-canvas.js +3 -1
  21. package/dist/esm/components/canvas/view.js +0 -2
  22. package/dist/esm/components/carousel.js +2 -3
  23. package/dist/esm/components/charts.js +18 -7
  24. package/dist/esm/components/combobox.js +18 -7
  25. package/dist/esm/components/command.js +23 -61
  26. package/dist/esm/components/context-menu.js +2 -1
  27. package/dist/esm/components/data-classes.js +5 -4
  28. package/dist/esm/components/data.js +19 -10
  29. package/dist/esm/components/display.js +20 -11
  30. package/dist/esm/components/drawer.js +17 -4
  31. package/dist/esm/components/error-boundary.js +3 -3
  32. package/dist/esm/components/feedback.js +3 -3
  33. package/dist/esm/components/file-dropzone.js +16 -6
  34. package/dist/esm/components/filters.js +42 -1
  35. package/dist/esm/components/flow.js +8 -5
  36. package/dist/esm/components/forms-classes.js +2 -0
  37. package/dist/esm/components/forms.js +2 -2
  38. package/dist/esm/components/hooks.js +47 -13
  39. package/dist/esm/components/hover-card.js +2 -1
  40. package/dist/esm/components/inbox.js +5 -1
  41. package/dist/esm/components/latest.js +4 -2
  42. package/dist/esm/components/layout.js +7 -4
  43. package/dist/esm/components/menu.js +10 -1
  44. package/dist/esm/components/modal.js +17 -4
  45. package/dist/esm/components/multi-select.js +5 -5
  46. package/dist/esm/components/nav.js +30 -11
  47. package/dist/esm/components/navigate.js +1 -1
  48. package/dist/esm/components/overlay-dialog.js +35 -1
  49. package/dist/esm/components/pagination.js +1 -1
  50. package/dist/esm/components/primitives.js +17 -4
  51. package/dist/esm/components/progress.js +2 -1
  52. package/dist/esm/components/resource.js +14 -4
  53. package/dist/esm/components/segmented.js +2 -0
  54. package/dist/esm/components/separator.js +6 -1
  55. package/dist/esm/components/service-tokens.js +18 -7
  56. package/dist/esm/components/settings.js +16 -0
  57. package/dist/esm/components/slider.js +5 -1
  58. package/dist/esm/components/split.js +4 -2
  59. package/dist/esm/components/strings.js +17 -4
  60. package/dist/esm/components/table.js +15 -3
  61. package/dist/esm/components/tag-input.js +5 -1
  62. package/dist/esm/components/time-field.js +15 -7
  63. package/dist/esm/components/toast-card.js +5 -3
  64. package/dist/esm/components/toast.js +4 -1
  65. package/dist/esm/components/tooltip.js +3 -2
  66. package/dist/esm/components/url-state.js +3 -1
  67. package/dist/esm/components/virtual-table.js +2 -2
  68. package/dist/esm/components/virtual.js +8 -4
  69. package/dist/esm/format.js +3 -2
  70. package/dist/esm/runtime.js +1 -1
  71. package/dist/esm/server/inbox/client.js +4 -0
  72. package/dist/esm/theme.js +38 -15
  73. package/dist/esm/tokens.mjs +1 -1
  74. package/dist/format.d.ts +5 -3
  75. package/dist/format.js +4 -3
  76. package/dist/inbox-client.d.ts +1 -1
  77. package/dist/inbox-client.js +4 -0
  78. package/dist/index.d.ts +61 -29
  79. package/dist/nish-components.css +59 -21
  80. package/dist/nish-components.min.css +1 -1
  81. package/dist/nish.css +30 -15
  82. package/dist/nish.min.css +1 -1
  83. package/dist/node/vite.js +1 -1
  84. package/dist/server/hono.d.ts +9 -2
  85. package/dist/server/hono.js +17 -4
  86. package/dist/server/index.d.ts +3 -3
  87. package/dist/server/index.js +7 -2
  88. package/dist/service-tokens.d.ts +4 -4
  89. package/dist/{spa-BfRDo38r.d.ts → spa-FwS7yZ8p.d.ts} +4 -3
  90. package/dist/system-canvas.d.ts +11 -10
  91. package/dist/theme.d.ts +30 -2
  92. package/dist/theme.global.js +45 -18
  93. package/dist/theme.js +45 -18
  94. package/package.json +3 -2
  95. package/dist/tokens.js +0 -425
@@ -1,93 +1,94 @@
1
- var $e=class{get shadowRoot(){return this.__host.__shadowRoot}constructor(t){this.ariaActiveDescendantElement=null,this.ariaAtomic="",this.ariaAutoComplete="",this.ariaBrailleLabel="",this.ariaBrailleRoleDescription="",this.ariaBusy="",this.ariaChecked="",this.ariaColCount="",this.ariaColIndex="",this.ariaColIndexText="",this.ariaColSpan="",this.ariaControlsElements=null,this.ariaCurrent="",this.ariaDescribedByElements=null,this.ariaDescription="",this.ariaDetailsElements=null,this.ariaDisabled="",this.ariaErrorMessageElements=null,this.ariaExpanded="",this.ariaFlowToElements=null,this.ariaHasPopup="",this.ariaHidden="",this.ariaInvalid="",this.ariaKeyShortcuts="",this.ariaLabel="",this.ariaLabelledByElements=null,this.ariaLevel="",this.ariaLive="",this.ariaModal="",this.ariaMultiLine="",this.ariaMultiSelectable="",this.ariaOrientation="",this.ariaOwnsElements=null,this.ariaPlaceholder="",this.ariaPosInSet="",this.ariaPressed="",this.ariaReadOnly="",this.ariaRelevant="",this.ariaRequired="",this.ariaRoleDescription="",this.ariaRowCount="",this.ariaRowIndex="",this.ariaRowIndexText="",this.ariaRowSpan="",this.ariaSelected="",this.ariaSetSize="",this.ariaSort="",this.ariaValueMax="",this.ariaValueMin="",this.ariaValueNow="",this.ariaValueText="",this.role="",this.form=null,this.labels=[],this.states=new Set,this.validationMessage="",this.validity={},this.willValidate=!0,this.__host=t}checkValidity(){return console.warn("`ElementInternals.checkValidity()` was called on the server.This method always returns true."),!0}reportValidity(){return!0}setFormValue(){}setValidity(){}};var L=function(n,t,e,s,r){if(s==="m")throw new TypeError("Private method is not writable");if(s==="a"&&!r)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?n!==t||!r:!t.has(n))throw new TypeError("Cannot write private member to an object whose class did not declare it");return s==="a"?r.call(n,e):r?r.value=e:t.set(n,e),e},x=function(n,t,e,s){if(e==="a"&&!s)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?n!==t||!s:!t.has(n))throw new TypeError("Cannot read private member from an object whose class did not declare it");return e==="m"?s:e==="a"?s.call(n):s?s.value:t.get(n)},nt,Tt,Mt,lt,Yt,ht,Ct,q,ct,W,Nt,Se;var _={__proto__:null};_.enumerable=!0;Object.freeze(_);var Kt=(W=class{constructor(t,e={}){if(nt.set(this,!1),Tt.set(this,!1),Mt.set(this,!1),lt.set(this,!1),Yt.set(this,Date.now()),ht.set(this,!1),Ct.set(this,void 0),q.set(this,void 0),ct.set(this,void 0),this.NONE=0,this.CAPTURING_PHASE=1,this.AT_TARGET=2,this.BUBBLING_PHASE=3,arguments.length===0)throw new Error("The type argument must be specified");if(typeof e!="object"||!e)throw new Error('The "options" argument must be an object');let{bubbles:s,cancelable:r,composed:i}=e;L(this,nt,!!r,"f"),L(this,Tt,!!s,"f"),L(this,Mt,!!i,"f"),L(this,Ct,`${t}`,"f"),L(this,q,null,"f"),L(this,ct,!1,"f")}initEvent(t,e,s){throw new Error("Method not implemented.")}stopImmediatePropagation(){this.stopPropagation()}preventDefault(){L(this,lt,!0,"f")}get target(){return x(this,q,"f")}get currentTarget(){return x(this,q,"f")}get srcElement(){return x(this,q,"f")}get type(){return x(this,Ct,"f")}get cancelable(){return x(this,nt,"f")}get defaultPrevented(){return x(this,nt,"f")&&x(this,lt,"f")}get timeStamp(){return x(this,Yt,"f")}composedPath(){return x(this,ct,"f")?[x(this,q,"f")]:[]}get returnValue(){return!x(this,nt,"f")||!x(this,lt,"f")}get bubbles(){return x(this,Tt,"f")}get composed(){return x(this,Mt,"f")}get eventPhase(){return x(this,ct,"f")?W.AT_TARGET:W.NONE}get cancelBubble(){return x(this,ht,"f")}set cancelBubble(t){t&&L(this,ht,!0,"f")}stopPropagation(){L(this,ht,!0,"f")}get isTrusted(){return!1}},nt=new WeakMap,Tt=new WeakMap,Mt=new WeakMap,lt=new WeakMap,Yt=new WeakMap,ht=new WeakMap,Ct=new WeakMap,q=new WeakMap,ct=new WeakMap,W.NONE=0,W.CAPTURING_PHASE=1,W.AT_TARGET=2,W.BUBBLING_PHASE=3,W);Object.defineProperties(Kt.prototype,{initEvent:_,stopImmediatePropagation:_,preventDefault:_,target:_,currentTarget:_,srcElement:_,type:_,cancelable:_,defaultPrevented:_,timeStamp:_,composedPath:_,returnValue:_,bubbles:_,composed:_,eventPhase:_,cancelBubble:_,stopPropagation:_,isTrusted:_});var Ee=(Se=class extends Kt{constructor(t,e={}){super(t,e),Nt.set(this,void 0),L(this,Nt,e?.detail??null,"f")}initCustomEvent(t,e,s,r){throw new Error("Method not implemented.")}get detail(){return x(this,Nt,"f")}},Nt=new WeakMap,Se);Object.defineProperties(Ee.prototype,{detail:_});var U=Kt,qt=Ee;var R;var ws=(R=class{constructor(){this.STYLE_RULE=1,this.CHARSET_RULE=2,this.IMPORT_RULE=3,this.MEDIA_RULE=4,this.FONT_FACE_RULE=5,this.PAGE_RULE=6,this.NAMESPACE_RULE=10,this.KEYFRAMES_RULE=7,this.KEYFRAME_RULE=8,this.SUPPORTS_RULE=12,this.COUNTER_STYLE_RULE=11,this.FONT_FEATURE_VALUES_RULE=14,this.MARGIN_RULE=9,this.__parentStyleSheet=null,this.cssText=""}get parentRule(){return null}get parentStyleSheet(){return this.__parentStyleSheet}get type(){return 0}},R.STYLE_RULE=1,R.CHARSET_RULE=2,R.IMPORT_RULE=3,R.MEDIA_RULE=4,R.FONT_FACE_RULE=5,R.PAGE_RULE=6,R.NAMESPACE_RULE=10,R.KEYFRAMES_RULE=7,R.KEYFRAME_RULE=8,R.SUPPORTS_RULE=12,R.COUNTER_STYLE_RULE=11,R.FONT_FEATURE_VALUES_RULE=14,R.MARGIN_RULE=9,R);globalThis.Event??=U;globalThis.CustomEvent??=qt;var Xt=Symbol(),xe=n=>typeof n=="boolean"?n:n?.capture??!1,F={__proto__:null};F.enumerable=!0;Object.freeze(F);var Ot=class{constructor(){this.__eventListeners=new Map,this.__captureEventListeners=new Map}addEventListener(t,e,s){if(e==null)return;let r=xe(s)?this.__captureEventListeners:this.__eventListeners,i=r.get(t);if(i===void 0)i=new Map,r.set(t,i);else if(i.has(e))return;let o=typeof s=="object"&&s?s:{};o.signal?.addEventListener("abort",()=>this.removeEventListener(t,e,s)),i.set(e,o??{})}removeEventListener(t,e,s){if(e==null)return;let r=xe(s)?this.__captureEventListeners:this.__eventListeners,i=r.get(t);i!==void 0&&(i.delete(e),i.size||r.delete(t))}dispatchEvent(t){let e=this.__resolveFullEventPath();!t.composed&&this.__host&&(e=e.slice(0,e.indexOf(this.__host)));let s=!1,r=!1,i=U.NONE,o=null,h=null,l=null,u=t.stopPropagation,g=t.stopImmediatePropagation;Object.defineProperties(t,{target:{get(){return o??h},...F},srcElement:{get(){return t.target},...F},currentTarget:{get(){return l},...F},eventPhase:{get(){return i},...F},composedPath:{value:()=>e,...F},stopPropagation:{value:()=>{s=!0,u.call(t)},...F},stopImmediatePropagation:{value:()=>{r=!0,g.call(t)},...F}});let c=(m,A,S)=>{typeof m=="function"?m(t):typeof m?.handleEvent=="function"&&m.handleEvent(t),A.once&&S.delete(m)},y=()=>(l=null,i=U.NONE,!t.defaultPrevented),b=e.slice().reverse();o=!this.__host||!t.composed?this:null;let $=m=>{for(h=this;h.__host&&m.includes(h.__host);)h=h.__host};for(let m of b){!o&&(!h||h===m.__host)&&$(b.slice(b.indexOf(m))),l=m,i=m===t.target?U.AT_TARGET:U.CAPTURING_PHASE;let A=m.__captureEventListeners.get(t.type);if(A){for(let[S,N]of A)if(c(S,N,A),r)return y()}if(s)return y()}let C=t.bubbles?e:[this];h=null;for(let m of C){!o&&(!h||m===h.__host)&&$(C.slice(0,C.indexOf(m)+1)),l=m,i=m===t.target?U.AT_TARGET:U.BUBBLING_PHASE;let A=m.__eventListeners.get(t.type);if(A){for(let[S,N]of A)if(c(S,N,A),r)return y()}if(s)return y()}return y()}__resolveFullEventPath(){return this.__eventPathCache?this.__eventPathCache:this.__eventTargetParent?this.__eventPathCache=[this,...this.__eventTargetParent.__resolveFullEventPath()]:this.__eventPathCache=[this,Re,Nn]}};var we=new WeakMap,ut=n=>{let t=we.get(n);return t===void 0&&we.set(n,t=new Map),t},dt=class extends Ot{getRootNode(t){return t?.composed?Jt:this.__host?.__shadowRoot??Jt}};var Ae=class extends dt{get adoptedStyleSheets(){return[]}createTreeWalker(){return{}}createTextNode(){return{}}createElement(){return{}}};var Re=new Ae,Jt=Re;var Te=class extends dt{constructor(t){if(super(),t!==Xt)throw new TypeError("Illegal constructor");Object.assign(this,globalThis,{CustomElementRegistry:Pt,customElements:Qt,document:Jt,Document:Ae,Element:Me,EventTarget:Ot,HTMLElement:Ce,Node:dt,ShadowRoot:Ne,window:this,Window:Te})}};var Me=class extends dt{constructor(){super(...arguments),this.__shadowRootMode=null,this.__shadowRoot=null,this.__internals=null}get attributes(){return Array.from(ut(this)).map(([t,e])=>({name:t,value:e}))}get shadowRoot(){return this.__shadowRootMode==="closed"?null:this.__shadowRoot}get localName(){return this.constructor.__localName}get tagName(){return this.localName?.toUpperCase()}setAttribute(t,e){ut(this).set(t,String(e))}removeAttribute(t){ut(this).delete(t)}toggleAttribute(t,e){if(this.hasAttribute(t)){if(e===void 0||!e)return this.removeAttribute(t),!1}else return e===void 0||e?(this.setAttribute(t,""),!0):!1;return!0}hasAttribute(t){return ut(this).has(t)}attachShadow(t){this.__shadowRootMode=t.mode;let e=new Ne(Xt,t);return e.__eventTargetParent=this,e.__host=this,this.__shadowRoot=e}attachInternals(){if(this.__internals!==null)throw new Error("Failed to execute 'attachInternals' on 'HTMLElement': ElementInternals for the specified element was already attached.");let t=new $e(this);return this.__internals=t,t}getAttribute(t){return ut(this).get(t)??null}};var Ce=class extends Me{},Zt=Ce;var Ne=class extends dt{get host(){return this.__host}constructor(t,e){if(super(),t!==t)throw new TypeError("Illegal constructor");this.mode=e.mode}};globalThis.litServerRoot??=Object.defineProperty(new Zt,"localName",{get(){return"lit-server-root"}});function Mn(){let n,t;return{promise:new Promise((s,r)=>{n=s,t=r}),resolve:n,reject:t}}var Pt=class{constructor(){this.__definitions=new Map,this.__reverseDefinitions=new Map,this.__pendingWhenDefineds=new Map}define(t,e){if(this.__definitions.has(t))if(process.env.NODE_ENV==="development")console.warn(`'CustomElementRegistry' already has "${t}" defined. This may have been caused by live reload or hot module replacement in which case it can be safely ignored.
2
- Make sure to test your application with a production build as repeat registrations will throw in production.`);else throw new Error(`Failed to execute 'define' on 'CustomElementRegistry': the name "${t}" has already been used with this registry`);if(this.__reverseDefinitions.has(e))throw new Error(`Failed to execute 'define' on 'CustomElementRegistry': the constructor has already been used with this registry for the tag name ${this.__reverseDefinitions.get(e)}`);e.__localName=t,this.__definitions.set(t,{ctor:e,observedAttributes:e.observedAttributes??[]}),this.__reverseDefinitions.set(e,t),this.__pendingWhenDefineds.get(t)?.resolve(e),this.__pendingWhenDefineds.delete(t)}get(t){return this.__definitions.get(t)?.ctor}getName(t){return this.__reverseDefinitions.get(t)??null}initialize(t){throw new Error("customElements.initialize is not currently supported in SSR. Please file a bug if you need it.")}upgrade(t){throw new Error("customElements.upgrade is not currently supported in SSR. Please file a bug if you need it.")}async whenDefined(t){let e=this.__definitions.get(t);if(e)return e.ctor;let s=this.__pendingWhenDefineds.get(t);return s||(s=Mn(),this.__pendingWhenDefineds.set(t,s)),s.promise}},Cn=Pt;var Qt=new Cn,Nn=new Te(Xt);var pt=globalThis,Dt=pt.ShadowRoot&&(pt.ShadyCSS===void 0||pt.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Pe=Symbol(),Oe=new WeakMap,Lt=class{constructor(t,e,s){if(this._$cssResult$=!0,s!==Pe)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o,e=this.t;if(Dt&&t===void 0){let s=e!==void 0&&e.length===1;s&&(t=Oe.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),s&&Oe.set(e,t))}return t}toString(){return this.cssText}},Le=n=>new Lt(typeof n=="string"?n:n+"",void 0,Pe);var De=(n,t)=>{if(Dt)n.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(let e of t){let s=document.createElement("style"),r=pt.litNonce;r!==void 0&&s.setAttribute("nonce",r),s.textContent=e.cssText,n.appendChild(s)}},te=Dt||pt.CSSStyleSheet===void 0?n=>n:n=>n instanceof CSSStyleSheet?(t=>{let e="";for(let s of t.cssRules)e+=s.cssText;return Le(e)})(n):n;var{is:On,defineProperty:Pn,getOwnPropertyDescriptor:Ln,getOwnPropertyNames:Dn,getOwnPropertySymbols:kn,getPrototypeOf:In}=Object,ft=globalThis;ft.customElements??=Qt;var ke=ft.trustedTypes,Un=ke?ke.emptyScript:"",Fn=ft.reactiveElementPolyfillSupport,mt=(n,t)=>n,ee={toAttribute(n,t){switch(t){case Boolean:n=n?Un:null;break;case Object:case Array:n=n==null?n:JSON.stringify(n)}return n},fromAttribute(n,t){let e=n;switch(t){case Boolean:e=n!==null;break;case Number:e=n===null?null:Number(n);break;case Object:case Array:try{e=JSON.parse(n)}catch{e=null}}return e}},Ue=(n,t)=>!On(n,t),Ie={attribute:!0,type:String,converter:ee,reflect:!1,useDefault:!1,hasChanged:Ue};Symbol.metadata??=Symbol("metadata"),ft.litPropertyMetadata??=new WeakMap;var H=class extends(globalThis.HTMLElement??Zt){static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=Ie){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){let s=Symbol(),r=this.getPropertyDescriptor(t,s,e);r!==void 0&&Pn(this.prototype,t,r)}}static getPropertyDescriptor(t,e,s){let{get:r,set:i}=Ln(this.prototype,t)??{get(){return this[e]},set(o){this[e]=o}};return{get:r,set(o){let h=r?.call(this);i?.call(this,o),this.requestUpdate(t,h,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??Ie}static _$Ei(){if(this.hasOwnProperty(mt("elementProperties")))return;let t=In(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(mt("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(mt("properties"))){let e=this.properties,s=[...Dn(e),...kn(e)];for(let r of s)this.createProperty(r,e[r])}let t=this[Symbol.metadata];if(t!==null){let e=litPropertyMetadata.get(t);if(e!==void 0)for(let[s,r]of e)this.elementProperties.set(s,r)}this._$Eh=new Map;for(let[e,s]of this.elementProperties){let r=this._$Eu(e,s);r!==void 0&&this._$Eh.set(r,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){let e=[];if(Array.isArray(t)){let s=new Set(t.flat(1/0).reverse());for(let r of s)e.unshift(te(r))}else t!==void 0&&e.push(te(t));return e}static _$Eu(t,e){let s=e.attribute;return s===!1?void 0:typeof s=="string"?s:typeof t=="string"?t.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(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(t=>t(this))}addController(t){(this._$EO??=new Set).add(t),this.renderRoot!==void 0&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){let t=new Map,e=this.constructor.elementProperties;for(let s of e.keys())this.hasOwnProperty(s)&&(t.set(s,this[s]),delete this[s]);t.size>0&&(this._$Ep=t)}createRenderRoot(){let t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return De(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(t=>t.hostConnected?.())}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach(t=>t.hostDisconnected?.())}attributeChangedCallback(t,e,s){this._$AK(t,s)}_$ET(t,e){let s=this.constructor.elementProperties.get(t),r=this.constructor._$Eu(t,s);if(r!==void 0&&s.reflect===!0){let i=(s.converter?.toAttribute!==void 0?s.converter:ee).toAttribute(e,s.type);this._$Em=t,i==null?this.removeAttribute(r):this.setAttribute(r,i),this._$Em=null}}_$AK(t,e){let s=this.constructor,r=s._$Eh.get(t);if(r!==void 0&&this._$Em!==r){let i=s.getPropertyOptions(r),o=typeof i.converter=="function"?{fromAttribute:i.converter}:i.converter?.fromAttribute!==void 0?i.converter:ee;this._$Em=r;let h=o.fromAttribute(e,i.type);this[r]=h??this._$Ej?.get(r)??h,this._$Em=null}}requestUpdate(t,e,s,r=!1,i){if(t!==void 0){let o=this.constructor;if(r===!1&&(i=this[t]),s??=o.getPropertyOptions(t),!((s.hasChanged??Ue)(i,e)||s.useDefault&&s.reflect&&i===this._$Ej?.get(t)&&!this.hasAttribute(o._$Eu(t,s))))return;this.C(t,e,s)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(t,e,{useDefault:s,reflect:r,wrapped:i},o){s&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,o??e??this[t]),i!==!0||o!==void 0)||(this._$AL.has(t)||(this.hasUpdated||s||(e=void 0),this._$AL.set(t,e)),r===!0&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}let t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[r,i]of this._$Ep)this[r]=i;this._$Ep=void 0}let s=this.constructor.elementProperties;if(s.size>0)for(let[r,i]of s){let{wrapped:o}=i,h=this[r];o!==!0||this._$AL.has(r)||h===void 0||this.C(r,void 0,i,h)}}let t=!1,e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach(s=>s.hostUpdate?.()),this.update(e)):this._$EM()}catch(s){throw t=!1,this._$EM(),s}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach(e=>e.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach(e=>this._$ET(e,this[e])),this._$EM()}updated(t){}firstUpdated(t){}};H.elementStyles=[],H.shadowRootOptions={mode:"open"},H[mt("elementProperties")]=new Map,H[mt("finalized")]=new Map,Fn?.({ReactiveElement:H}),(ft.reactiveElementVersions??=[]).push("2.1.2");var It=globalThis,Fe=n=>n,kt=It.trustedTypes,He=kt?kt.createPolicy("lit-html",{createHTML:n=>n}):void 0,Ge="$lit$",j=`lit$${Math.random().toFixed(9).slice(2)}$`,Ye="?"+j,Hn=`<${Ye}>`,Z=It.document===void 0?{createTreeWalker:()=>({})}:document,yt=()=>Z.createComment(""),bt=n=>n===null||typeof n!="object"&&typeof n!="function",le=Array.isArray,Bn=n=>le(n)||typeof n?.[Symbol.iterator]=="function",ne=`[
3
- \f\r]`,gt=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Be=/-->/g,ze=/>/g,J=RegExp(`>|${ne}(?:([^\\s"'>=/]+)(${ne}*=${ne}*(?:[^
4
- \f\r"'\`<>=]|("|')|))|$)`,"g"),We=/'/g,je=/"/g,Ke=/^(?:script|style|textarea|title)$/i,he=n=>(t,...e)=>({_$litType$:n,strings:t,values:e}),w=he(1),T=he(2),ir=he(3),Q=Symbol.for("lit-noChange"),f=Symbol.for("lit-nothing"),Ve=new WeakMap,X=Z.createTreeWalker(Z,129);function qe(n,t){if(!le(n)||!n.hasOwnProperty("raw"))throw Error("invalid template strings array");return He!==void 0?He.createHTML(t):t}var zn=(n,t)=>{let e=n.length-1,s=[],r,i=t===2?"<svg>":t===3?"<math>":"",o=gt;for(let h=0;h<e;h++){let l=n[h],u,g,c=-1,y=0;for(;y<l.length&&(o.lastIndex=y,g=o.exec(l),g!==null);)y=o.lastIndex,o===gt?g[1]==="!--"?o=Be:g[1]!==void 0?o=ze:g[2]!==void 0?(Ke.test(g[2])&&(r=RegExp("</"+g[2],"g")),o=J):g[3]!==void 0&&(o=J):o===J?g[0]===">"?(o=r??gt,c=-1):g[1]===void 0?c=-2:(c=o.lastIndex-g[2].length,u=g[1],o=g[3]===void 0?J:g[3]==='"'?je:We):o===je||o===We?o=J:o===Be||o===ze?o=gt:(o=J,r=void 0);let b=o===J&&n[h+1].startsWith("/>")?" ":"";i+=o===gt?l+Hn:c>=0?(s.push(u),l.slice(0,c)+Ge+l.slice(c)+j+b):l+j+(c===-2?h:b)}return[qe(n,i+(n[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),s]},_t=class n{constructor({strings:t,_$litType$:e},s){let r;this.parts=[];let i=0,o=0,h=t.length-1,l=this.parts,[u,g]=zn(t,e);if(this.el=n.createElement(u,s),X.currentNode=this.el.content,e===2||e===3){let c=this.el.content.firstChild;c.replaceWith(...c.childNodes)}for(;(r=X.nextNode())!==null&&l.length<h;){if(r.nodeType===1){if(r.hasAttributes())for(let c of r.getAttributeNames())if(c.endsWith(Ge)){let y=g[o++],b=r.getAttribute(c).split(j),$=/([.?@])?(.*)/.exec(y);l.push({type:1,index:i,name:$[2],strings:b,ctor:$[1]==="."?re:$[1]==="?"?ie:$[1]==="@"?oe:rt}),r.removeAttribute(c)}else c.startsWith(j)&&(l.push({type:6,index:i}),r.removeAttribute(c));if(Ke.test(r.tagName)){let c=r.textContent.split(j),y=c.length-1;if(y>0){r.textContent=kt?kt.emptyScript:"";for(let b=0;b<y;b++)r.append(c[b],yt()),X.nextNode(),l.push({type:2,index:++i});r.append(c[y],yt())}}}else if(r.nodeType===8)if(r.data===Ye)l.push({type:2,index:i});else{let c=-1;for(;(c=r.data.indexOf(j,c+1))!==-1;)l.push({type:7,index:i}),c+=j.length-1}i++}}static createElement(t,e){let s=Z.createElement("template");return s.innerHTML=t,s}};function st(n,t,e=n,s){if(t===Q)return t;let r=s!==void 0?e._$Co?.[s]:e._$Cl,i=bt(t)?void 0:t._$litDirective$;return r?.constructor!==i&&(r?._$AO?.(!1),i===void 0?r=void 0:(r=new i(n),r._$AT(n,e,s)),s!==void 0?(e._$Co??=[])[s]=r:e._$Cl=r),r!==void 0&&(t=st(n,r._$AS(n,t.values),r,s)),t}var se=class{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){let{el:{content:e},parts:s}=this._$AD,r=(t?.creationScope??Z).importNode(e,!0);X.currentNode=r;let i=X.nextNode(),o=0,h=0,l=s[0];for(;l!==void 0;){if(o===l.index){let u;l.type===2?u=new vt(i,i.nextSibling,this,t):l.type===1?u=new l.ctor(i,l.name,l.strings,this,t):l.type===6&&(u=new ae(i,this,t)),this._$AV.push(u),l=s[++h]}o!==l?.index&&(i=X.nextNode(),o++)}return X.currentNode=Z,r}p(t){let e=0;for(let s of this._$AV)s!==void 0&&(s.strings!==void 0?(s._$AI(t,s,e),e+=s.strings.length-2):s._$AI(t[e])),e++}},vt=class n{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,s,r){this.type=2,this._$AH=f,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=s,this.options=r,this._$Cv=r?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode,e=this._$AM;return e!==void 0&&t?.nodeType===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=st(this,t,e),bt(t)?t===f||t==null||t===""?(this._$AH!==f&&this._$AR(),this._$AH=f):t!==this._$AH&&t!==Q&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):Bn(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==f&&bt(this._$AH)?this._$AA.nextSibling.data=t:this.T(Z.createTextNode(t)),this._$AH=t}$(t){let{values:e,_$litType$:s}=t,r=typeof s=="number"?this._$AC(t):(s.el===void 0&&(s.el=_t.createElement(qe(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===r)this._$AH.p(e);else{let i=new se(r,this),o=i.u(this.options);i.p(e),this.T(o),this._$AH=i}}_$AC(t){let e=Ve.get(t.strings);return e===void 0&&Ve.set(t.strings,e=new _t(t)),e}k(t){le(this._$AH)||(this._$AH=[],this._$AR());let e=this._$AH,s,r=0;for(let i of t)r===e.length?e.push(s=new n(this.O(yt()),this.O(yt()),this,this.options)):s=e[r],s._$AI(i),r++;r<e.length&&(this._$AR(s&&s._$AB.nextSibling,r),e.length=r)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t!==this._$AB;){let s=Fe(t).nextSibling;Fe(t).remove(),t=s}}setConnected(t){this._$AM===void 0&&(this._$Cv=t,this._$AP?.(t))}},rt=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,s,r,i){this.type=1,this._$AH=f,this._$AN=void 0,this.element=t,this.name=e,this._$AM=r,this.options=i,s.length>2||s[0]!==""||s[1]!==""?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=f}_$AI(t,e=this,s,r){let i=this.strings,o=!1;if(i===void 0)t=st(this,t,e,0),o=!bt(t)||t!==this._$AH&&t!==Q,o&&(this._$AH=t);else{let h=t,l,u;for(t=i[0],l=0;l<i.length-1;l++)u=st(this,h[s+l],e,l),u===Q&&(u=this._$AH[l]),o||=!bt(u)||u!==this._$AH[l],u===f?t=f:t!==f&&(t+=(u??"")+i[l+1]),this._$AH[l]=u}o&&!r&&this.j(t)}j(t){t===f?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},re=class extends rt{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===f?void 0:t}},ie=class extends rt{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==f)}},oe=class extends rt{constructor(t,e,s,r,i){super(t,e,s,r,i),this.type=5}_$AI(t,e=this){if((t=st(this,t,e,0)??f)===Q)return;let s=this._$AH,r=t===f&&s!==f||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,i=t!==f&&(s===f||r);r&&this.element.removeEventListener(this.name,this,s),i&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}},ae=class{constructor(t,e,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){st(this,t)}};var Wn=It.litHtmlPolyfillSupport;Wn?.(_t,vt),(It.litHtmlVersions??=[]).push("3.3.3");var Je=(n,t,e)=>{let s=e?.renderBefore??t,r=s._$litPart$;if(r===void 0){let i=e?.renderBefore??null;s._$litPart$=r=new vt(t.insertBefore(yt(),i),i,void 0,e??{})}return r._$AI(n),r};var ce=globalThis,V=class extends H{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){let e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=Je(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return Q}};V._$litElement$=!0,V.finalized=!0,ce.litElementHydrateSupport?.({LitElement:V});var jn=ce.litElementPolyfillSupport;jn?.({LitElement:V});(ce.litElementVersions??=[]).push("4.2.2");var Vn="3.2.0";var Gn=Symbol.for("nish-ui.runtime.v1");function Yn(){let n=globalThis;return n[Gn]??={versions:new Set,slots:{}}}function Kn(){try{return process.env.NODE_ENV!=="production"}catch{return!1}}function qn(n){n.versions.add(Vn),n.versions.size>1&&!n.warned&&Kn()&&(n.warned=!0,console.warn(`nish-ui: two versions are loaded on this page (${[...n.versions].join(", ")}). Overlays, toasts and theme state are shared, but mixing versions is unsupported.`))}var Xe=!1;function Ut(n,t){let e=Yn();return Xe||(Xe=!0,qn(e)),n in e.slots||(e.slots[n]=t()),e.slots[n]}var Ft={close:"Close",search:"Search",searchPlaceholder:"Search\u2026",noResults:"No results",results:"Results",resultCount:n=>`${n} result${n===1?"":"s"}`,noMatches:"No matches",searching:"Searching\u2026",clear:"Clear",copy:"Copy",copied:"Copied",copyManual:"Press Ctrl+C",optional:"Optional",sections:"Sections",onThisPage:"On this page",filters:"Filters",clearFilters:"Clear filters",showResults:"Show results",activeCount:n=>`${n} active`,remove:"Remove",removeNamed:n=>`Remove ${n}`,resizeColumns:"Resize columns",resizeRows:"Resize rows",legend:"Legend",noDataYet:"No data yet",noDataNamed:n=>`${n}: no data`,seriesNumber:n=>`Series ${n}`,trend:"Trend",themeSystem:"System",themeLight:"Light",themeDark:"Dark",themeToggleLabel:(n,t)=>`Theme: ${n}. Switch to ${t}`,themeElsewhere:"set on another site"};function ue(){return Ut("element-strings",()=>({values:{...Ft},listeners:new Set}))}function Jn(n){let t=ue(),e={...t.values};for(let[s,r]of Object.entries(n))r!==void 0&&Object.hasOwn(Ft,s)&&(e[s]=r);t.values=e;for(let s of Array.from(t.listeners))s()}function it(){let n=ue(),t=n.values;return Object.keys(Ft).some(s=>t[s]===void 0)&&(n.values={...Ft,...Object.fromEntries(Object.entries(t).filter(([,s])=>s!==void 0))}),n.values}function Ze(n){let t=ue().listeners;return t.add(n),()=>{t.delete(n)}}var $t=class extends V{#t=null;createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.#t??=Ze(()=>this.stringsChanged())}disconnectedCallback(){super.disconnectedCallback(),this.#t?.(),this.#t=null}stringsChanged(){this.requestUpdate()}};function St(n,t){customElements.get(n)||customElements.define(n,t)}var Et="\u2013",me="\u2212",pe="en-US",Xn=Ut("format",()=>({locale:pe})),Qe=new Map;function Zn(n){let t=Qe.get(n);if(t===void 0){try{t=Intl.getCanonicalLocales(n)[0]??pe}catch{t=pe}Qe.set(n,t)}return t}function xt(n){return n?.locale?Zn(n.locale):Xn.locale}function nn(n){return n==="en"||n==="en-US"}var tn=new Map;function sn(n,t){let e=tn.get(n);return e===void 0&&(e=t(),tn.set(n,e)),e}function Qn(n,t,e){return sn(`n|${n}|${t}|${e}`,()=>new Intl.NumberFormat(n,{minimumFractionDigits:t,maximumFractionDigits:e}))}var Ht=new Map;function ts(n){if(!n)return;let t=Ht.get(n);if(t===void 0){try{new Intl.DateTimeFormat("en-US",{timeZone:n}),t=!0}catch{t=!1}Ht.size>=64&&Ht.clear(),Ht.set(n,t)}return t?n:void 0}function tt(n,t,e,s){let r=ts(s);return sn(`d|${n}|${t}|${r??""}`,()=>new Intl.DateTimeFormat(n,r?{...e,timeZone:r}:e))}function fe(n){return typeof n=="number"&&Number.isFinite(n)}function G(n,t,e,s){return Qn(s,t,e).format(n)}var de=[[1e12,"T"],[1e9,"B"],[1e6,"M"],[1e3,"k"]];function rn(n,t,e){for(let s=0;s<de.length;s++){let[r,i]=de[s];if(!(n<r)){if(s>0&&Number((n/r).toFixed(t))>=1e3){let[o,h]=de[s-1];return G(n/o,0,t,e)+h}return G(n/r,0,t,e)+i}}return G(n,0,t,e)}function on(n,t){return Number(Math.abs(n).toFixed(t))===0}var en=new Map;function es(n,t){let e=`${t}|${n}`,s=en.get(e);if(s===void 0){try{let r=new Intl.NumberFormat(t,{style:"currency",currency:n,currencyDisplay:"narrowSymbol"}),i=r.formatToParts(0).find(o=>o.type==="currency")?.value??n;/\p{L}$/u.test(i)&&(i+="\xA0"),s={symbol:i,digits:r.resolvedOptions().maximumFractionDigits??2}}catch{s={symbol:n+" ",digits:2}}en.set(e,s)}return s}function ns(n,t,e){let{symbol:s,digits:r}=es(t.currency??"USD",e);if(t.compact&&n>=1e3)return s+rn(n,1,e);let i=t.cents??"auto",o=10**r,h=Math.round(n*o)%o!==0,l=r>0&&(i==="always"||i==="auto"&&(n<1e3||h));return s+(l?G(n,r,r,e):G(n,0,0,e))}function an(n,t={}){if(!fe(n))return Et;let e=ns(Math.abs(n),t,xt(t));return n<0&&Math.round(Math.abs(n)*100)>0?me+e:e}function ln(n,t={}){if(!fe(n))return Et;let e=t.digits??1,s=t.fromRatio??!0?n*100:n,r=G(Math.abs(s),e,e,xt(t))+"%";return on(s,e)?r:s<0?me+r:t.signed?"+"+r:r}function hn(n,t={}){if(!fe(n))return Et;let e=xt(t),s=n<0&&!on(n,t.digits??2)?me:"",r=Math.abs(n);return t.compact&&r>=1e3?s+rn(r,t.digits??1,e):s+(t.digits===void 0?G(r,0,2,e):G(r,t.digits,t.digits,e))}var ss=/^(\d{4})-(\d{2})-(\d{2})$/;function cn(n){if(n==null)return null;let t,e=!1;if(n instanceof Date)t=n;else if(typeof n=="number")t=new Date(n);else{let s=ss.exec(n.trim());e=!!s,t=s?new Date(Number(s[1]),Number(s[2])-1,Number(s[3])):new Date(n)}return Number.isNaN(t.getTime())?null:{d:t,dayOnly:e}}function un(n,t){return n.dayOnly?void 0:t.timeZone}function Bt(n){return n.replace(/[\u202f\u00a0]/g," ")}var wr=[[60,"minute","m"],[3600,"hour","h"],[86400,"day","d"],[86400*30,"month","mo"],[86400*365,"year","y"]];var rs={month:"short",day:"numeric",year:"numeric"},is={weekday:"long",month:"long",day:"numeric",year:"numeric"},os={month:"short",day:"numeric"},as={weekday:"short"},ls={month:"numeric",day:"numeric"},hs={hour:"numeric",minute:"2-digit"},cs={hour:"numeric",minute:"2-digit",hour12:!0},us={year:"numeric",month:"numeric",day:"numeric"};function ds(n,t){if(!t)return{year:n.getFullYear(),month:n.getMonth()+1,day:n.getDate()};let e={year:0,month:0,day:0};for(let s of tt("en-US","ymd",us,t).formatToParts(n))(s.type==="year"||s.type==="month"||s.type==="day")&&(e[s.type]=Number(s.value));return e}function ps(n,t,e,s){let r=un(n,e);switch(t){case"medium":return Bt(tt(s,"medium",rs,r).format(n.d));case"long":return Bt(tt(s,"long",is,r).format(n.d));case"weekday":{let i=tt(s,"weekday",as,r).format(n.d);if(!nn(s))return`${i} ${tt(s,"md",ls,r).format(n.d)}`;let o=ds(n.d,r);return`${i} ${o.month}/${o.day}`}default:return Bt(tt(s,"short",os,r).format(n.d))}}function dn(n,t="short",e={}){let s=cn(n);return s?ps(s,t,e,xt(e)):Et}function ms(n,t,e){let s=nn(e);return Bt(tt(e,s?"time12":"time",s?cs:hs,un(n,t)).format(n.d))}function pn(n,t={}){let e=cn(n);return e?ms(e,t,xt(t)):Et}var mn={ok:"var(--nish-ok-fill)",warn:"var(--nish-warn-fill)",loss:"var(--nish-loss-fill)",info:"var(--nish-info-fill)",accent:"var(--nish-accent)"};function B(n,t){return n&&Object.hasOwn(mn,n)?mn[n]:n&&/^chart-[1-8]$/.test(n)?`var(--nish-${n})`:`var(--nish-chart-${(Math.trunc(t)%8+8)%8+1})`}var D={grid:"var(--nish-line)",axis:"var(--nish-line-strong)",zero:"var(--nish-hi3)",text:"var(--nish-hi3)"},fn,fs=n=>Math.abs(n)<1e3?String(Math.round(n*100)/100):(fn??=new Intl.NumberFormat("en-US",{maximumFractionDigits:0}),fn.format(n));function ot(n,t=fs){let e=(n??"").trim();if(!e)return t;let s=e.indexOf(":"),r=(s<0?e:e.slice(0,s)).toLowerCase(),i=s<0?"":e.slice(s+1).trim();switch(r){case"number":return o=>hn(o);case"percent":{let o=i!==""&&Number.isInteger(Number(i))&&Number(i)>=0&&Number(i)<=10?Number(i):1;return h=>ln(h,{digits:o})}case"currency":return o=>an(o,{currency:i||"USD"});case"date":{let o=i==="medium"||i==="long"||i==="weekday"?i:"short";return h=>dn(h,o)}case"time":return o=>pn(o);default:return t}}function ge(n,t,e){let s=Math.max(2,Math.floor(e));return Array.from({length:s},(r,i)=>n+(t-n)*i/(s-1))}function yn(n,t){if(n===t){let s=Math.abs(n)*.05||1;return[n-s,t+s]}let e=(t-n)*.06;return[n-e,t+e]}function bn(n,t){let e=0,s=n.length-1;for(;s-e>1;){let r=e+s>>1;n[r]<t?e=r:s=r}return Math.abs(n[e]-t)<=Math.abs(n[s]-t)?e:s}function Y(n){if(n==null||n==="")return null;let t=typeof n=="number"?n:Number(n);return Number.isFinite(t)?t:null}function ye(n){if(!Array.isArray(n))return[];let t=[];return n.forEach((e,s)=>{if(Array.isArray(e)){let r=Y(e[0]);r!==null&&t.push({x:r,y:Y(e[1])})}else if(e&&typeof e=="object"){let r=e,i=Y(r.x);i!==null&&t.push({x:i,y:Y(r.y)})}else t.push({x:s,y:Y(e)})}),t}function _n(n){return Array.isArray(n)?n.map((t,e)=>{let s=t&&typeof t=="object"?t:{};return{label:typeof s.label=="string"&&s.label?s.label:it().seriesNumber(e+1),tone:typeof s.tone=="string"?s.tone:void 0,points:ye(s.points??s.data)}}):[]}function vn(n){return Array.isArray(n)?n.map((t,e)=>{if(Array.isArray(t))return{label:String(t[0]??""),value:Y(t[1])??0};if(t&&typeof t=="object"){let s=t;return{label:s.label==null?String(e+1):String(s.label),value:Y(s.value)??0}}return{label:String(e+1),value:Y(t)??0}}):[]}var wt={fromAttribute(n){if(!n)return[];try{let t=JSON.parse(n);return Array.isArray(t)?t:[]}catch{return[]}},toAttribute(n){try{return JSON.stringify(n)}catch{return""}}},K=class extends $t{static properties={label:{type:String,reflect:!0},height:{type:Number,reflect:!0},tone:{type:String,reflect:!0},empty:{type:String,reflect:!0},yFormat:{type:String,attribute:"y-format",reflect:!0},xFormat:{type:String,attribute:"x-format",reflect:!0},width:{state:!0}};ro=null;themeObserver=null;constructor(){super(),this.label="",this.tone="",this.empty="",this.yFormat="",this.xFormat="",this.width=0}connectedCallback(){super.connectedCallback(),getComputedStyle(this).display==="inline"&&(this.style.display="block"),this.width=this.clientWidth,typeof ResizeObserver<"u"&&(this.ro=new ResizeObserver(()=>{this.clientWidth!==this.width&&(this.width=this.clientWidth)}),this.ro.observe(this)),this.themeObserver=new MutationObserver(()=>this.requestUpdate()),this.themeObserver.observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme","class"]})}disconnectedCallback(){super.disconnectedCallback(),this.ro?.disconnect(),this.ro=null,this.themeObserver?.disconnect(),this.themeObserver=null}get plotHeight(){return this.height>0?this.height:200}},gn=0;function $n(){return gn+=1,`nish-chart-${gn}`}var zt="position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0";var Sn=18,gs=22,Wt=class extends K{static properties={...K.properties,data:{converter:wt},xTicks:{type:String,attribute:"x-ticks",reflect:!0},showValues:{type:Boolean,attribute:"show-values",reflect:!0},selected:{state:!0},coarse:{state:!0}};mq=null;onCoarse=()=>{this.coarse=!!this.mq?.matches};constructor(){super(),this.data=[],this.height=140,this.xTicks="ends",this.showValues=!1,this.selected=null,this.coarse=!1}connectedCallback(){super.connectedCallback(),typeof window<"u"&&window.matchMedia&&(this.mq=window.matchMedia("(pointer: coarse)"),this.coarse=this.mq.matches,this.mq.addEventListener("change",this.onCoarse))}disconnectedCallback(){super.disconnectedCallback(),this.mq?.removeEventListener("change",this.onCoarse),this.mq=null}render(){let t=it(),e=this.label,s=this.height>0?this.height:140,r=vn(this.data),i=ot(this.yFormat),o=ot(this.xFormat,d=>String(d)),h=d=>this.xFormat&&d.trim()!==""&&Number.isFinite(Number(d))?o(Number(d)):d;if(!r.length)return w`<div class="nish-chart">
1
+ var $e=class{get shadowRoot(){return this.__host.__shadowRoot}constructor(t){this.ariaActiveDescendantElement=null,this.ariaAtomic="",this.ariaAutoComplete="",this.ariaBrailleLabel="",this.ariaBrailleRoleDescription="",this.ariaBusy="",this.ariaChecked="",this.ariaColCount="",this.ariaColIndex="",this.ariaColIndexText="",this.ariaColSpan="",this.ariaControlsElements=null,this.ariaCurrent="",this.ariaDescribedByElements=null,this.ariaDescription="",this.ariaDetailsElements=null,this.ariaDisabled="",this.ariaErrorMessageElements=null,this.ariaExpanded="",this.ariaFlowToElements=null,this.ariaHasPopup="",this.ariaHidden="",this.ariaInvalid="",this.ariaKeyShortcuts="",this.ariaLabel="",this.ariaLabelledByElements=null,this.ariaLevel="",this.ariaLive="",this.ariaModal="",this.ariaMultiLine="",this.ariaMultiSelectable="",this.ariaOrientation="",this.ariaOwnsElements=null,this.ariaPlaceholder="",this.ariaPosInSet="",this.ariaPressed="",this.ariaReadOnly="",this.ariaRelevant="",this.ariaRequired="",this.ariaRoleDescription="",this.ariaRowCount="",this.ariaRowIndex="",this.ariaRowIndexText="",this.ariaRowSpan="",this.ariaSelected="",this.ariaSetSize="",this.ariaSort="",this.ariaValueMax="",this.ariaValueMin="",this.ariaValueNow="",this.ariaValueText="",this.role="",this.form=null,this.labels=[],this.states=new Set,this.validationMessage="",this.validity={},this.willValidate=!0,this.__host=t}checkValidity(){return console.warn("`ElementInternals.checkValidity()` was called on the server.This method always returns true."),!0}reportValidity(){return!0}setFormValue(){}setValidity(){}};var O=function(n,t,e,s,i){if(s==="m")throw new TypeError("Private method is not writable");if(s==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?n!==t||!i:!t.has(n))throw new TypeError("Cannot write private member to an object whose class did not declare it");return s==="a"?i.call(n,e):i?i.value=e:t.set(n,e),e},x=function(n,t,e,s){if(e==="a"&&!s)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?n!==t||!s:!t.has(n))throw new TypeError("Cannot read private member from an object whose class did not declare it");return e==="m"?s:e==="a"?s.call(n):s?s.value:t.get(n)},nt,Mt,Ct,ht,Yt,ct,Nt,q,ut,W,Pt,Se;var b={__proto__:null};b.enumerable=!0;Object.freeze(b);var Kt=(W=class{constructor(t,e={}){if(nt.set(this,!1),Mt.set(this,!1),Ct.set(this,!1),ht.set(this,!1),Yt.set(this,Date.now()),ct.set(this,!1),Nt.set(this,void 0),q.set(this,void 0),ut.set(this,void 0),this.NONE=0,this.CAPTURING_PHASE=1,this.AT_TARGET=2,this.BUBBLING_PHASE=3,arguments.length===0)throw new Error("The type argument must be specified");if(typeof e!="object"||!e)throw new Error('The "options" argument must be an object');let{bubbles:s,cancelable:i,composed:r}=e;O(this,nt,!!i,"f"),O(this,Mt,!!s,"f"),O(this,Ct,!!r,"f"),O(this,Nt,`${t}`,"f"),O(this,q,null,"f"),O(this,ut,!1,"f")}initEvent(t,e,s){throw new Error("Method not implemented.")}stopImmediatePropagation(){this.stopPropagation()}preventDefault(){O(this,ht,!0,"f")}get target(){return x(this,q,"f")}get currentTarget(){return x(this,q,"f")}get srcElement(){return x(this,q,"f")}get type(){return x(this,Nt,"f")}get cancelable(){return x(this,nt,"f")}get defaultPrevented(){return x(this,nt,"f")&&x(this,ht,"f")}get timeStamp(){return x(this,Yt,"f")}composedPath(){return x(this,ut,"f")?[x(this,q,"f")]:[]}get returnValue(){return!x(this,nt,"f")||!x(this,ht,"f")}get bubbles(){return x(this,Mt,"f")}get composed(){return x(this,Ct,"f")}get eventPhase(){return x(this,ut,"f")?W.AT_TARGET:W.NONE}get cancelBubble(){return x(this,ct,"f")}set cancelBubble(t){t&&O(this,ct,!0,"f")}stopPropagation(){O(this,ct,!0,"f")}get isTrusted(){return!1}},nt=new WeakMap,Mt=new WeakMap,Ct=new WeakMap,ht=new WeakMap,Yt=new WeakMap,ct=new WeakMap,Nt=new WeakMap,q=new WeakMap,ut=new WeakMap,W.NONE=0,W.CAPTURING_PHASE=1,W.AT_TARGET=2,W.BUBBLING_PHASE=3,W);Object.defineProperties(Kt.prototype,{initEvent:b,stopImmediatePropagation:b,preventDefault:b,target:b,currentTarget:b,srcElement:b,type:b,cancelable:b,defaultPrevented:b,timeStamp:b,composedPath:b,returnValue:b,bubbles:b,composed:b,eventPhase:b,cancelBubble:b,stopPropagation:b,isTrusted:b});var Ee=(Se=class extends Kt{constructor(t,e={}){super(t,e),Pt.set(this,void 0),O(this,Pt,e?.detail??null,"f")}initCustomEvent(t,e,s,i){throw new Error("Method not implemented.")}get detail(){return x(this,Pt,"f")}},Pt=new WeakMap,Se);Object.defineProperties(Ee.prototype,{detail:b});var U=Kt,qt=Ee;var R;var ws=(R=class{constructor(){this.STYLE_RULE=1,this.CHARSET_RULE=2,this.IMPORT_RULE=3,this.MEDIA_RULE=4,this.FONT_FACE_RULE=5,this.PAGE_RULE=6,this.NAMESPACE_RULE=10,this.KEYFRAMES_RULE=7,this.KEYFRAME_RULE=8,this.SUPPORTS_RULE=12,this.COUNTER_STYLE_RULE=11,this.FONT_FEATURE_VALUES_RULE=14,this.MARGIN_RULE=9,this.__parentStyleSheet=null,this.cssText=""}get parentRule(){return null}get parentStyleSheet(){return this.__parentStyleSheet}get type(){return 0}},R.STYLE_RULE=1,R.CHARSET_RULE=2,R.IMPORT_RULE=3,R.MEDIA_RULE=4,R.FONT_FACE_RULE=5,R.PAGE_RULE=6,R.NAMESPACE_RULE=10,R.KEYFRAMES_RULE=7,R.KEYFRAME_RULE=8,R.SUPPORTS_RULE=12,R.COUNTER_STYLE_RULE=11,R.FONT_FEATURE_VALUES_RULE=14,R.MARGIN_RULE=9,R);globalThis.Event??=U;globalThis.CustomEvent??=qt;var Xt=Symbol(),xe=n=>typeof n=="boolean"?n:n?.capture??!1,F={__proto__:null};F.enumerable=!0;Object.freeze(F);var Lt=class{constructor(){this.__eventListeners=new Map,this.__captureEventListeners=new Map}addEventListener(t,e,s){if(e==null)return;let i=xe(s)?this.__captureEventListeners:this.__eventListeners,r=i.get(t);if(r===void 0)r=new Map,i.set(t,r);else if(r.has(e))return;let o=typeof s=="object"&&s?s:{};o.signal?.addEventListener("abort",()=>this.removeEventListener(t,e,s)),r.set(e,o??{})}removeEventListener(t,e,s){if(e==null)return;let i=xe(s)?this.__captureEventListeners:this.__eventListeners,r=i.get(t);r!==void 0&&(r.delete(e),r.size||i.delete(t))}dispatchEvent(t){let e=this.__resolveFullEventPath();!t.composed&&this.__host&&(e=e.slice(0,e.indexOf(this.__host)));let s=!1,i=!1,r=U.NONE,o=null,h=null,l=null,u=t.stopPropagation,g=t.stopImmediatePropagation;Object.defineProperties(t,{target:{get(){return o??h},...F},srcElement:{get(){return t.target},...F},currentTarget:{get(){return l},...F},eventPhase:{get(){return r},...F},composedPath:{value:()=>e,...F},stopPropagation:{value:()=>{s=!0,u.call(t)},...F},stopImmediatePropagation:{value:()=>{i=!0,g.call(t)},...F}});let c=(m,A,S)=>{typeof m=="function"?m(t):typeof m?.handleEvent=="function"&&m.handleEvent(t),A.once&&S.delete(m)},y=()=>(l=null,r=U.NONE,!t.defaultPrevented),_=e.slice().reverse();o=!this.__host||!t.composed?this:null;let $=m=>{for(h=this;h.__host&&m.includes(h.__host);)h=h.__host};for(let m of _){!o&&(!h||h===m.__host)&&$(_.slice(_.indexOf(m))),l=m,r=m===t.target?U.AT_TARGET:U.CAPTURING_PHASE;let A=m.__captureEventListeners.get(t.type);if(A){for(let[S,P]of A)if(c(S,P,A),i)return y()}if(s)return y()}let C=t.bubbles?e:[this];h=null;for(let m of C){!o&&(!h||m===h.__host)&&$(C.slice(0,C.indexOf(m)+1)),l=m,r=m===t.target?U.AT_TARGET:U.BUBBLING_PHASE;let A=m.__eventListeners.get(t.type);if(A){for(let[S,P]of A)if(c(S,P,A),i)return y()}if(s)return y()}return y()}__resolveFullEventPath(){return this.__eventPathCache?this.__eventPathCache:this.__eventTargetParent?this.__eventPathCache=[this,...this.__eventTargetParent.__resolveFullEventPath()]:this.__eventPathCache=[this,Re,Nn]}};var we=new WeakMap,dt=n=>{let t=we.get(n);return t===void 0&&we.set(n,t=new Map),t},pt=class extends Lt{getRootNode(t){return t?.composed?Jt:this.__host?.__shadowRoot??Jt}};var Ae=class extends pt{get adoptedStyleSheets(){return[]}createTreeWalker(){return{}}createTextNode(){return{}}createElement(){return{}}};var Re=new Ae,Jt=Re;var Te=class extends pt{constructor(t){if(super(),t!==Xt)throw new TypeError("Illegal constructor");Object.assign(this,globalThis,{CustomElementRegistry:Ot,customElements:Qt,document:Jt,Document:Ae,Element:Me,EventTarget:Lt,HTMLElement:Ce,Node:pt,ShadowRoot:Ne,window:this,Window:Te})}};var Me=class extends pt{constructor(){super(...arguments),this.__shadowRootMode=null,this.__shadowRoot=null,this.__internals=null}get attributes(){return Array.from(dt(this)).map(([t,e])=>({name:t,value:e}))}get shadowRoot(){return this.__shadowRootMode==="closed"?null:this.__shadowRoot}get localName(){return this.constructor.__localName}get tagName(){return this.localName?.toUpperCase()}setAttribute(t,e){dt(this).set(t,String(e))}removeAttribute(t){dt(this).delete(t)}toggleAttribute(t,e){if(this.hasAttribute(t)){if(e===void 0||!e)return this.removeAttribute(t),!1}else return e===void 0||e?(this.setAttribute(t,""),!0):!1;return!0}hasAttribute(t){return dt(this).has(t)}attachShadow(t){this.__shadowRootMode=t.mode;let e=new Ne(Xt,t);return e.__eventTargetParent=this,e.__host=this,this.__shadowRoot=e}attachInternals(){if(this.__internals!==null)throw new Error("Failed to execute 'attachInternals' on 'HTMLElement': ElementInternals for the specified element was already attached.");let t=new $e(this);return this.__internals=t,t}getAttribute(t){return dt(this).get(t)??null}};var Ce=class extends Me{},Zt=Ce;var Ne=class extends pt{get host(){return this.__host}constructor(t,e){if(super(),t!==t)throw new TypeError("Illegal constructor");this.mode=e.mode}};globalThis.litServerRoot??=Object.defineProperty(new Zt,"localName",{get(){return"lit-server-root"}});function Mn(){let n,t;return{promise:new Promise((s,i)=>{n=s,t=i}),resolve:n,reject:t}}var Ot=class{constructor(){this.__definitions=new Map,this.__reverseDefinitions=new Map,this.__pendingWhenDefineds=new Map}define(t,e){if(this.__definitions.has(t))if(process.env.NODE_ENV==="development")console.warn(`'CustomElementRegistry' already has "${t}" defined. This may have been caused by live reload or hot module replacement in which case it can be safely ignored.
2
+ Make sure to test your application with a production build as repeat registrations will throw in production.`);else throw new Error(`Failed to execute 'define' on 'CustomElementRegistry': the name "${t}" has already been used with this registry`);if(this.__reverseDefinitions.has(e))throw new Error(`Failed to execute 'define' on 'CustomElementRegistry': the constructor has already been used with this registry for the tag name ${this.__reverseDefinitions.get(e)}`);e.__localName=t,this.__definitions.set(t,{ctor:e,observedAttributes:e.observedAttributes??[]}),this.__reverseDefinitions.set(e,t),this.__pendingWhenDefineds.get(t)?.resolve(e),this.__pendingWhenDefineds.delete(t)}get(t){return this.__definitions.get(t)?.ctor}getName(t){return this.__reverseDefinitions.get(t)??null}initialize(t){throw new Error("customElements.initialize is not currently supported in SSR. Please file a bug if you need it.")}upgrade(t){throw new Error("customElements.upgrade is not currently supported in SSR. Please file a bug if you need it.")}async whenDefined(t){let e=this.__definitions.get(t);if(e)return e.ctor;let s=this.__pendingWhenDefineds.get(t);return s||(s=Mn(),this.__pendingWhenDefineds.set(t,s)),s.promise}},Cn=Ot;var Qt=new Cn,Nn=new Te(Xt);var mt=globalThis,kt=mt.ShadowRoot&&(mt.ShadyCSS===void 0||mt.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Le=Symbol(),Pe=new WeakMap,Dt=class{constructor(t,e,s){if(this._$cssResult$=!0,s!==Le)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o,e=this.t;if(kt&&t===void 0){let s=e!==void 0&&e.length===1;s&&(t=Pe.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),s&&Pe.set(e,t))}return t}toString(){return this.cssText}},Oe=n=>new Dt(typeof n=="string"?n:n+"",void 0,Le);var De=(n,t)=>{if(kt)n.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(let e of t){let s=document.createElement("style"),i=mt.litNonce;i!==void 0&&s.setAttribute("nonce",i),s.textContent=e.cssText,n.appendChild(s)}},te=kt||mt.CSSStyleSheet===void 0?n=>n:n=>n instanceof CSSStyleSheet?(t=>{let e="";for(let s of t.cssRules)e+=s.cssText;return Oe(e)})(n):n;var{is:Pn,defineProperty:Ln,getOwnPropertyDescriptor:On,getOwnPropertyNames:Dn,getOwnPropertySymbols:kn,getPrototypeOf:In}=Object,gt=globalThis;gt.customElements??=Qt;var ke=gt.trustedTypes,Un=ke?ke.emptyScript:"",Fn=gt.reactiveElementPolyfillSupport,ft=(n,t)=>n,ee={toAttribute(n,t){switch(t){case Boolean:n=n?Un:null;break;case Object:case Array:n=n==null?n:JSON.stringify(n)}return n},fromAttribute(n,t){let e=n;switch(t){case Boolean:e=n!==null;break;case Number:e=n===null?null:Number(n);break;case Object:case Array:try{e=JSON.parse(n)}catch{e=null}}return e}},Ue=(n,t)=>!Pn(n,t),Ie={attribute:!0,type:String,converter:ee,reflect:!1,useDefault:!1,hasChanged:Ue};Symbol.metadata??=Symbol("metadata"),gt.litPropertyMetadata??=new WeakMap;var H=class extends(globalThis.HTMLElement??Zt){static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=Ie){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){let s=Symbol(),i=this.getPropertyDescriptor(t,s,e);i!==void 0&&Ln(this.prototype,t,i)}}static getPropertyDescriptor(t,e,s){let{get:i,set:r}=On(this.prototype,t)??{get(){return this[e]},set(o){this[e]=o}};return{get:i,set(o){let h=i?.call(this);r?.call(this,o),this.requestUpdate(t,h,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??Ie}static _$Ei(){if(this.hasOwnProperty(ft("elementProperties")))return;let t=In(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(ft("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(ft("properties"))){let e=this.properties,s=[...Dn(e),...kn(e)];for(let i of s)this.createProperty(i,e[i])}let t=this[Symbol.metadata];if(t!==null){let e=litPropertyMetadata.get(t);if(e!==void 0)for(let[s,i]of e)this.elementProperties.set(s,i)}this._$Eh=new Map;for(let[e,s]of this.elementProperties){let i=this._$Eu(e,s);i!==void 0&&this._$Eh.set(i,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){let e=[];if(Array.isArray(t)){let s=new Set(t.flat(1/0).reverse());for(let i of s)e.unshift(te(i))}else t!==void 0&&e.push(te(t));return e}static _$Eu(t,e){let s=e.attribute;return s===!1?void 0:typeof s=="string"?s:typeof t=="string"?t.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(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(t=>t(this))}addController(t){(this._$EO??=new Set).add(t),this.renderRoot!==void 0&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){let t=new Map,e=this.constructor.elementProperties;for(let s of e.keys())this.hasOwnProperty(s)&&(t.set(s,this[s]),delete this[s]);t.size>0&&(this._$Ep=t)}createRenderRoot(){let t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return De(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(t=>t.hostConnected?.())}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach(t=>t.hostDisconnected?.())}attributeChangedCallback(t,e,s){this._$AK(t,s)}_$ET(t,e){let s=this.constructor.elementProperties.get(t),i=this.constructor._$Eu(t,s);if(i!==void 0&&s.reflect===!0){let r=(s.converter?.toAttribute!==void 0?s.converter:ee).toAttribute(e,s.type);this._$Em=t,r==null?this.removeAttribute(i):this.setAttribute(i,r),this._$Em=null}}_$AK(t,e){let s=this.constructor,i=s._$Eh.get(t);if(i!==void 0&&this._$Em!==i){let r=s.getPropertyOptions(i),o=typeof r.converter=="function"?{fromAttribute:r.converter}:r.converter?.fromAttribute!==void 0?r.converter:ee;this._$Em=i;let h=o.fromAttribute(e,r.type);this[i]=h??this._$Ej?.get(i)??h,this._$Em=null}}requestUpdate(t,e,s,i=!1,r){if(t!==void 0){let o=this.constructor;if(i===!1&&(r=this[t]),s??=o.getPropertyOptions(t),!((s.hasChanged??Ue)(r,e)||s.useDefault&&s.reflect&&r===this._$Ej?.get(t)&&!this.hasAttribute(o._$Eu(t,s))))return;this.C(t,e,s)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(t,e,{useDefault:s,reflect:i,wrapped:r},o){s&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,o??e??this[t]),r!==!0||o!==void 0)||(this._$AL.has(t)||(this.hasUpdated||s||(e=void 0),this._$AL.set(t,e)),i===!0&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}let t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[i,r]of this._$Ep)this[i]=r;this._$Ep=void 0}let s=this.constructor.elementProperties;if(s.size>0)for(let[i,r]of s){let{wrapped:o}=r,h=this[i];o!==!0||this._$AL.has(i)||h===void 0||this.C(i,void 0,r,h)}}let t=!1,e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach(s=>s.hostUpdate?.()),this.update(e)):this._$EM()}catch(s){throw t=!1,this._$EM(),s}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach(e=>e.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach(e=>this._$ET(e,this[e])),this._$EM()}updated(t){}firstUpdated(t){}};H.elementStyles=[],H.shadowRootOptions={mode:"open"},H[ft("elementProperties")]=new Map,H[ft("finalized")]=new Map,Fn?.({ReactiveElement:H}),(gt.reactiveElementVersions??=[]).push("2.1.2");var Ut=globalThis,Fe=n=>n,It=Ut.trustedTypes,He=It?It.createPolicy("lit-html",{createHTML:n=>n}):void 0,Ge="$lit$",j=`lit$${Math.random().toFixed(9).slice(2)}$`,Ye="?"+j,Hn=`<${Ye}>`,Z=Ut.document===void 0?{createTreeWalker:()=>({})}:document,_t=()=>Z.createComment(""),bt=n=>n===null||typeof n!="object"&&typeof n!="function",le=Array.isArray,Bn=n=>le(n)||typeof n?.[Symbol.iterator]=="function",ne=`[
3
+ \f\r]`,yt=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Be=/-->/g,ze=/>/g,J=RegExp(`>|${ne}(?:([^\\s"'>=/]+)(${ne}*=${ne}*(?:[^
4
+ \f\r"'\`<>=]|("|')|))|$)`,"g"),We=/'/g,je=/"/g,Ke=/^(?:script|style|textarea|title)$/i,he=n=>(t,...e)=>({_$litType$:n,strings:t,values:e}),w=he(1),T=he(2),ri=he(3),Q=Symbol.for("lit-noChange"),f=Symbol.for("lit-nothing"),Ve=new WeakMap,X=Z.createTreeWalker(Z,129);function qe(n,t){if(!le(n)||!n.hasOwnProperty("raw"))throw Error("invalid template strings array");return He!==void 0?He.createHTML(t):t}var zn=(n,t)=>{let e=n.length-1,s=[],i,r=t===2?"<svg>":t===3?"<math>":"",o=yt;for(let h=0;h<e;h++){let l=n[h],u,g,c=-1,y=0;for(;y<l.length&&(o.lastIndex=y,g=o.exec(l),g!==null);)y=o.lastIndex,o===yt?g[1]==="!--"?o=Be:g[1]!==void 0?o=ze:g[2]!==void 0?(Ke.test(g[2])&&(i=RegExp("</"+g[2],"g")),o=J):g[3]!==void 0&&(o=J):o===J?g[0]===">"?(o=i??yt,c=-1):g[1]===void 0?c=-2:(c=o.lastIndex-g[2].length,u=g[1],o=g[3]===void 0?J:g[3]==='"'?je:We):o===je||o===We?o=J:o===Be||o===ze?o=yt:(o=J,i=void 0);let _=o===J&&n[h+1].startsWith("/>")?" ":"";r+=o===yt?l+Hn:c>=0?(s.push(u),l.slice(0,c)+Ge+l.slice(c)+j+_):l+j+(c===-2?h:_)}return[qe(n,r+(n[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),s]},vt=class n{constructor({strings:t,_$litType$:e},s){let i;this.parts=[];let r=0,o=0,h=t.length-1,l=this.parts,[u,g]=zn(t,e);if(this.el=n.createElement(u,s),X.currentNode=this.el.content,e===2||e===3){let c=this.el.content.firstChild;c.replaceWith(...c.childNodes)}for(;(i=X.nextNode())!==null&&l.length<h;){if(i.nodeType===1){if(i.hasAttributes())for(let c of i.getAttributeNames())if(c.endsWith(Ge)){let y=g[o++],_=i.getAttribute(c).split(j),$=/([.?@])?(.*)/.exec(y);l.push({type:1,index:r,name:$[2],strings:_,ctor:$[1]==="."?ie:$[1]==="?"?re:$[1]==="@"?oe:it}),i.removeAttribute(c)}else c.startsWith(j)&&(l.push({type:6,index:r}),i.removeAttribute(c));if(Ke.test(i.tagName)){let c=i.textContent.split(j),y=c.length-1;if(y>0){i.textContent=It?It.emptyScript:"";for(let _=0;_<y;_++)i.append(c[_],_t()),X.nextNode(),l.push({type:2,index:++r});i.append(c[y],_t())}}}else if(i.nodeType===8)if(i.data===Ye)l.push({type:2,index:r});else{let c=-1;for(;(c=i.data.indexOf(j,c+1))!==-1;)l.push({type:7,index:r}),c+=j.length-1}r++}}static createElement(t,e){let s=Z.createElement("template");return s.innerHTML=t,s}};function st(n,t,e=n,s){if(t===Q)return t;let i=s!==void 0?e._$Co?.[s]:e._$Cl,r=bt(t)?void 0:t._$litDirective$;return i?.constructor!==r&&(i?._$AO?.(!1),r===void 0?i=void 0:(i=new r(n),i._$AT(n,e,s)),s!==void 0?(e._$Co??=[])[s]=i:e._$Cl=i),i!==void 0&&(t=st(n,i._$AS(n,t.values),i,s)),t}var se=class{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){let{el:{content:e},parts:s}=this._$AD,i=(t?.creationScope??Z).importNode(e,!0);X.currentNode=i;let r=X.nextNode(),o=0,h=0,l=s[0];for(;l!==void 0;){if(o===l.index){let u;l.type===2?u=new $t(r,r.nextSibling,this,t):l.type===1?u=new l.ctor(r,l.name,l.strings,this,t):l.type===6&&(u=new ae(r,this,t)),this._$AV.push(u),l=s[++h]}o!==l?.index&&(r=X.nextNode(),o++)}return X.currentNode=Z,i}p(t){let e=0;for(let s of this._$AV)s!==void 0&&(s.strings!==void 0?(s._$AI(t,s,e),e+=s.strings.length-2):s._$AI(t[e])),e++}},$t=class n{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,s,i){this.type=2,this._$AH=f,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=s,this.options=i,this._$Cv=i?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode,e=this._$AM;return e!==void 0&&t?.nodeType===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=st(this,t,e),bt(t)?t===f||t==null||t===""?(this._$AH!==f&&this._$AR(),this._$AH=f):t!==this._$AH&&t!==Q&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):Bn(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==f&&bt(this._$AH)?this._$AA.nextSibling.data=t:this.T(Z.createTextNode(t)),this._$AH=t}$(t){let{values:e,_$litType$:s}=t,i=typeof s=="number"?this._$AC(t):(s.el===void 0&&(s.el=vt.createElement(qe(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===i)this._$AH.p(e);else{let r=new se(i,this),o=r.u(this.options);r.p(e),this.T(o),this._$AH=r}}_$AC(t){let e=Ve.get(t.strings);return e===void 0&&Ve.set(t.strings,e=new vt(t)),e}k(t){le(this._$AH)||(this._$AH=[],this._$AR());let e=this._$AH,s,i=0;for(let r of t)i===e.length?e.push(s=new n(this.O(_t()),this.O(_t()),this,this.options)):s=e[i],s._$AI(r),i++;i<e.length&&(this._$AR(s&&s._$AB.nextSibling,i),e.length=i)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t!==this._$AB;){let s=Fe(t).nextSibling;Fe(t).remove(),t=s}}setConnected(t){this._$AM===void 0&&(this._$Cv=t,this._$AP?.(t))}},it=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,s,i,r){this.type=1,this._$AH=f,this._$AN=void 0,this.element=t,this.name=e,this._$AM=i,this.options=r,s.length>2||s[0]!==""||s[1]!==""?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=f}_$AI(t,e=this,s,i){let r=this.strings,o=!1;if(r===void 0)t=st(this,t,e,0),o=!bt(t)||t!==this._$AH&&t!==Q,o&&(this._$AH=t);else{let h=t,l,u;for(t=r[0],l=0;l<r.length-1;l++)u=st(this,h[s+l],e,l),u===Q&&(u=this._$AH[l]),o||=!bt(u)||u!==this._$AH[l],u===f?t=f:t!==f&&(t+=(u??"")+r[l+1]),this._$AH[l]=u}o&&!i&&this.j(t)}j(t){t===f?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},ie=class extends it{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===f?void 0:t}},re=class extends it{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==f)}},oe=class extends it{constructor(t,e,s,i,r){super(t,e,s,i,r),this.type=5}_$AI(t,e=this){if((t=st(this,t,e,0)??f)===Q)return;let s=this._$AH,i=t===f&&s!==f||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,r=t!==f&&(s===f||i);i&&this.element.removeEventListener(this.name,this,s),r&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}},ae=class{constructor(t,e,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){st(this,t)}};var Wn=Ut.litHtmlPolyfillSupport;Wn?.(vt,$t),(Ut.litHtmlVersions??=[]).push("3.3.3");var Je=(n,t,e)=>{let s=e?.renderBefore??t,i=s._$litPart$;if(i===void 0){let r=e?.renderBefore??null;s._$litPart$=i=new $t(t.insertBefore(_t(),r),r,void 0,e??{})}return i._$AI(n),i};var ce=globalThis,V=class extends H{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){let e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=Je(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return Q}};V._$litElement$=!0,V.finalized=!0,ce.litElementHydrateSupport?.({LitElement:V});var jn=ce.litElementPolyfillSupport;jn?.({LitElement:V});(ce.litElementVersions??=[]).push("4.2.2");var Vn="3.3.0";var Gn=Symbol.for("nish-ui.runtime.v1");function Yn(){let n=globalThis;return n[Gn]??={versions:new Set,slots:{}}}function Kn(){try{return process.env.NODE_ENV!=="production"}catch{return!1}}function qn(n){n.versions.add(Vn),n.versions.size>1&&!n.warned&&Kn()&&(n.warned=!0,console.warn(`nish-ui: two versions are loaded on this page (${[...n.versions].join(", ")}). Overlays, toasts and theme state are shared, but mixing versions is unsupported.`))}var Xe=!1;function Ft(n,t){let e=Yn();return Xe||(Xe=!0,qn(e)),n in e.slots||(e.slots[n]=t()),e.slots[n]}var Ht={close:"Close",search:"Search",searchPlaceholder:"Search\u2026",noResults:"No results",results:"Results",resultCount:n=>`${n} result${n===1?"":"s"}`,noMatches:"No matches",searching:"Searching\u2026",clear:"Clear",copy:"Copy",copied:"Copied",copyManual:"Press Ctrl+C",optional:"Optional",sections:"Sections",onThisPage:"On this page",filters:"Filters",clearFilters:"Clear filters",showResults:"Show results",activeCount:n=>`${n} active`,remove:"Remove",removeNamed:n=>`Remove ${n}`,resizeColumns:"Resize columns",resizeRows:"Resize rows",legend:"Legend",noDataYet:"No data yet",noDataNamed:n=>`${n}: no data`,seriesNumber:n=>`Series ${n}`,trend:"Trend",themeSystem:"System",themeLight:"Light",themeDark:"Dark",themeToggleLabel:(n,t)=>`Theme: ${n}. Switch to ${t}`,themeElsewhere:"set on another site"};function ue(){return Ft("element-strings",()=>({values:{...Ht},listeners:new Set}))}function Jn(n){let t=ue(),e={...t.values};for(let[s,i]of Object.entries(n))i!==void 0&&Object.hasOwn(Ht,s)&&(e[s]=i);t.values=e;for(let s of Array.from(t.listeners))s()}function rt(){let n=ue(),t=n.values;return Object.keys(Ht).some(s=>t[s]===void 0)&&(n.values={...Ht,...Object.fromEntries(Object.entries(t).filter(([,s])=>s!==void 0))}),n.values}function Ze(n){let t=ue().listeners;return t.add(n),()=>{t.delete(n)}}var St=class extends V{#t=null;createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.#t??=Ze(()=>this.stringsChanged())}disconnectedCallback(){super.disconnectedCallback(),this.#t?.(),this.#t=null}stringsChanged(){this.requestUpdate()}};function Et(n,t){customElements.get(n)||customElements.define(n,t)}var xt="\u2013",me="\u2212",pe="en-US",Xn=Ft("format",()=>({locale:pe})),Qe=new Map;function Zn(n){let t=Qe.get(n);if(t===void 0){try{t=Intl.getCanonicalLocales(n)[0]??pe}catch{t=pe}Qe.set(n,t)}return t}function wt(n){return n?.locale?Zn(n.locale):Xn.locale}function nn(n){return n==="en"||n==="en-US"}var tn=new Map;function sn(n,t){let e=tn.get(n);return e===void 0&&(e=t(),tn.set(n,e)),e}function Qn(n,t,e){return sn(`n|${n}|${t}|${e}`,()=>new Intl.NumberFormat(n,{minimumFractionDigits:t,maximumFractionDigits:e}))}var Bt=new Map;function ts(n){if(!n)return;let t=Bt.get(n);if(t===void 0){try{new Intl.DateTimeFormat("en-US",{timeZone:n}),t=!0}catch{t=!1}Bt.size>=64&&Bt.clear(),Bt.set(n,t)}return t?n:void 0}function tt(n,t,e,s){let i=ts(s);return sn(`d|${n}|${t}|${i??""}`,()=>new Intl.DateTimeFormat(n,i?{...e,timeZone:i}:e))}function fe(n){return typeof n=="number"&&Number.isFinite(n)}function G(n,t,e,s){return Qn(s,t,e).format(n)}var de=[[1e12,"T"],[1e9,"B"],[1e6,"M"],[1e3,"k"]];function rn(n,t,e){for(let s=0;s<de.length;s++){let[i,r]=de[s];if(!(n<i)){if(s>0&&Number((n/i).toFixed(t))>=1e3){let[o,h]=de[s-1];return G(n/o,0,t,e)+h}return G(n/i,0,t,e)+r}}return G(n,0,t,e)}function on(n,t){return Number(Math.abs(n).toFixed(t))===0}var en=new Map;function es(n,t){let e=`${t}|${n}`,s=en.get(e);if(s===void 0){try{let i=new Intl.NumberFormat(t,{style:"currency",currency:n,currencyDisplay:"narrowSymbol"}),r=i.formatToParts(0).find(o=>o.type==="currency")?.value??n;/\p{L}$/u.test(r)&&(r+="\xA0"),s={symbol:r,digits:i.resolvedOptions().maximumFractionDigits??2}}catch{s={symbol:n+" ",digits:2}}en.set(e,s)}return s}function ns(n,t,e){let{symbol:s,digits:i}=es(t.currency??"USD",e);if(t.compact&&n>=1e3)return s+rn(n,1,e);let r=t.cents??"auto",o=10**i,h=Math.round(n*o)%o!==0,l=i>0&&(r==="always"||r==="auto"&&(n<1e3||h));return s+(l?G(n,i,i,e):G(n,0,0,e))}function an(n,t={}){if(!fe(n))return xt;let e=ns(Math.abs(n),t,wt(t));return n<0&&Math.round(Math.abs(n)*100)>0?me+e:e}function ln(n,t={}){if(!fe(n))return xt;let e=t.digits??1,s=t.fromRatio??!0?n*100:n,i=G(Math.abs(s),e,e,wt(t))+"%";return on(s,e)?i:s<0?me+i:t.signed?"+"+i:i}function hn(n,t={}){if(!fe(n))return xt;let e=wt(t),s=n<0&&!on(n,t.digits??2)?me:"",i=Math.abs(n);return t.compact&&i>=1e3?s+rn(i,t.digits??1,e):s+(t.digits===void 0?G(i,0,2,e):G(i,t.digits,t.digits,e))}var ss=/^(\d{4})-(\d{2})-(\d{2})$/;function cn(n){if(n==null)return null;let t,e=!1;if(n instanceof Date)t=n;else if(typeof n=="number")t=new Date(n);else{let s=ss.exec(n.trim());e=!!s,t=s?new Date(Number(s[1]),Number(s[2])-1,Number(s[3])):new Date(n)}return Number.isNaN(t.getTime())?null:{d:t,dayOnly:e}}function un(n,t){return n.dayOnly?void 0:t.timeZone}function zt(n){return n.replace(/[\u202f\u00a0]/g," ")}var wi=[[60,"minute","m"],[3600,"hour","h"],[86400,"day","d"],[86400*30,"month","mo"],[86400*365,"year","y"]];var is={month:"short",day:"numeric",year:"numeric"},rs={weekday:"long",month:"long",day:"numeric",year:"numeric"},os={month:"short",day:"numeric"},as={weekday:"short"},ls={month:"numeric",day:"numeric"},hs={hour:"numeric",minute:"2-digit"},cs={hour:"numeric",minute:"2-digit",hour12:!0},us={year:"numeric",month:"numeric",day:"numeric"};function ds(n,t){if(!t)return{year:n.getFullYear(),month:n.getMonth()+1,day:n.getDate()};let e={year:0,month:0,day:0};for(let s of tt("en-US","ymd",us,t).formatToParts(n))(s.type==="year"||s.type==="month"||s.type==="day")&&(e[s.type]=Number(s.value));return e}function ps(n,t,e,s){let i=un(n,e);switch(t){case"medium":return zt(tt(s,"medium",is,i).format(n.d));case"long":return zt(tt(s,"long",rs,i).format(n.d));case"weekday":{let r=tt(s,"weekday",as,i).format(n.d);if(!nn(s))return`${r} ${tt(s,"md",ls,i).format(n.d)}`;let o=ds(n.d,i);return`${r} ${o.month}/${o.day}`}default:return zt(tt(s,"short",os,i).format(n.d))}}function dn(n,t="short",e={}){let s=cn(n);return s?ps(s,t,e,wt(e)):xt}function ms(n,t,e){let s=nn(e);return zt(tt(e,s?"time12":"time",s?cs:hs,un(n,t)).format(n.d))}function pn(n,t={}){let e=cn(n);return e?ms(e,t,wt(t)):xt}var mn={ok:"var(--nish-ok-fill)",warn:"var(--nish-warn-fill)",loss:"var(--nish-loss-fill)",info:"var(--nish-info-fill)",accent:"var(--nish-accent)"};function B(n,t){return n&&Object.hasOwn(mn,n)?mn[n]:n&&/^chart-[1-8]$/.test(n)?`var(--nish-${n})`:`var(--nish-chart-${(Math.trunc(t)%8+8)%8+1})`}var D={grid:"var(--nish-line)",axis:"var(--nish-line-strong)",zero:"var(--nish-hi3)",text:"var(--nish-hi3)"},fn,fs=n=>Math.abs(n)<1e3?String(Math.round(n*100)/100):(fn??=new Intl.NumberFormat("en-US",{maximumFractionDigits:0}),fn.format(n));function ot(n,t=fs){let e=(n??"").trim();if(!e)return t;let s=e.indexOf(":"),i=(s<0?e:e.slice(0,s)).toLowerCase(),r=s<0?"":e.slice(s+1).trim();switch(i){case"number":return o=>hn(o);case"percent":{let o=r!==""&&Number.isInteger(Number(r))&&Number(r)>=0&&Number(r)<=10?Number(r):1;return h=>ln(h,{digits:o})}case"currency":return o=>an(o,{currency:r||"USD"});case"date":{let o=r==="medium"||r==="long"||r==="weekday"?r:"short";return h=>dn(h,o)}case"time":return o=>pn(o);default:return t}}function ge(n,t,e){let s=Math.max(2,Math.floor(e));return Array.from({length:s},(i,r)=>n+(t-n)*r/(s-1))}function yn(n,t){if(n===t){let s=Math.abs(n)*.05||1;return[n-s,t+s]}let e=(t-n)*.06;return[n-e,t+e]}function _n(n,t){let e=0,s=n.length-1;for(;s-e>1;){let i=e+s>>1;n[i]<t?e=i:s=i}return Math.abs(n[e]-t)<=Math.abs(n[s]-t)?e:s}function Y(n){if(n==null||n==="")return null;let t=typeof n=="number"?n:Number(n);return Number.isFinite(t)?t:null}function ye(n){if(!Array.isArray(n))return[];let t=[];return n.forEach((e,s)=>{if(Array.isArray(e)){let i=Y(e[0]);i!==null&&t.push({x:i,y:Y(e[1])})}else if(e&&typeof e=="object"){let i=e,r=Y(i.x);r!==null&&t.push({x:r,y:Y(i.y)})}else t.push({x:s,y:Y(e)})}),t}function bn(n){return Array.isArray(n)?n.map((t,e)=>{let s=t&&typeof t=="object"?t:{};return{label:typeof s.label=="string"&&s.label?s.label:rt().seriesNumber(e+1),tone:typeof s.tone=="string"?s.tone:void 0,points:ye(s.points??s.data)}}):[]}function vn(n){return Array.isArray(n)?n.map((t,e)=>{if(Array.isArray(t))return{label:String(t[0]??""),value:Y(t[1])??0};if(t&&typeof t=="object"){let s=t;return{label:s.label==null?String(e+1):String(s.label),value:Y(s.value)??0}}return{label:String(e+1),value:Y(t)??0}}):[]}var At={fromAttribute(n){if(!n)return[];try{let t=JSON.parse(n);return Array.isArray(t)?t:[]}catch{return[]}},toAttribute(n){try{return JSON.stringify(n)}catch{return""}}},K=class extends St{static properties={label:{type:String,reflect:!0},height:{type:Number,reflect:!0},tone:{type:String,reflect:!0},empty:{type:String,reflect:!0},yFormat:{type:String,attribute:"y-format",reflect:!0},xFormat:{type:String,attribute:"x-format",reflect:!0},width:{state:!0}};ro=null;constructor(){super(),this.label="",this.tone="",this.empty="",this.yFormat="",this.xFormat="",this.width=0}connectedCallback(){super.connectedCallback(),getComputedStyle(this).display==="inline"&&(this.style.display="block"),this.width=this.clientWidth,typeof ResizeObserver<"u"&&(this.ro=new ResizeObserver(()=>{this.clientWidth!==this.width&&(this.width=this.clientWidth)}),this.ro.observe(this))}disconnectedCallback(){super.disconnectedCallback(),this.ro?.disconnect(),this.ro=null}get plotHeight(){return this.height>0?this.height:200}},gn=0;function $n(){return gn+=1,`nish-chart-${gn}`}var Rt="position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0";var Sn=18,gs=22,Wt=class extends K{static properties={...K.properties,data:{converter:At},xTicks:{type:String,attribute:"x-ticks",reflect:!0},showValues:{type:Boolean,attribute:"show-values",reflect:!0},selected:{state:!0},coarse:{state:!0}};mq=null;onCoarse=()=>{this.coarse=!!this.mq?.matches};constructor(){super(),this.data=[],this.height=140,this.xTicks="ends",this.showValues=!1,this.selected=null,this.coarse=!1}connectedCallback(){super.connectedCallback(),typeof window<"u"&&window.matchMedia&&(this.mq=window.matchMedia("(pointer: coarse)"),this.coarse=this.mq.matches,this.mq.addEventListener("change",this.onCoarse))}disconnectedCallback(){super.disconnectedCallback(),this.mq?.removeEventListener("change",this.onCoarse),this.mq=null}render(){let t=rt(),e=this.label,s=this.height>0?this.height:140,i=vn(this.data),r=ot(this.yFormat),o=ot(this.xFormat,d=>String(d)),h=d=>this.xFormat&&d.trim()!==""&&Number.isFinite(Number(d))?o(Number(d)):d;if(!i.length)return w`<div class="nish-chart">
5
5
  <div class="nish-empty" role="img" aria-label=${t.noDataNamed(e)} style="height:${s}px;box-sizing:border-box">${this.empty||t.noDataYet}</div>
6
- </div>`;let l=this.width,u=B(this.tone,0),g=r.map(d=>Number.isFinite(d.value)?d.value:0),c=Math.max(0,...g),y=Math.min(0,...g),b=c-y||1,$=Math.max(0,s-Sn-gs),C=Sn+c/b*$,m=l/r.length,A=Math.max(1,m*.72),S=this.showValues,N=S||this.coarse,et=this.xTicks==="all",k=this.selected!=null&&this.selected<r.length?this.selected:null,O=d=>{let v=d.currentTarget.getBoundingClientRect(),M=Math.floor((d.clientX-v.left)/(v.width||1)*r.length);this.selected=Math.min(r.length-1,Math.max(0,M))},at=d=>{if(d.key==="ArrowLeft"||d.key==="ArrowRight"){d.preventDefault();let v=d.key==="ArrowRight"?1:-1,M=this.selected;this.selected=M==null?v>0?0:r.length-1:Math.min(r.length-1,Math.max(0,M+v))}else d.key==="Escape"&&(this.selected=null)},At=l>0?w`<svg
6
+ </div>`;let l=this.width,u=B(this.tone,0),g=i.map(d=>Number.isFinite(d.value)?d.value:0),c=Math.max(0,...g),y=Math.min(0,...g),_=c-y||1,$=Math.max(0,s-Sn-gs),C=Sn+c/_*$,m=l/i.length,A=Math.max(1,m*.72),S=this.showValues,P=S||this.coarse,et=this.xTicks==="all",k=this.selected!=null&&this.selected<i.length?this.selected:null,L=d=>{let v=d.currentTarget.getBoundingClientRect(),M=Math.floor((d.clientX-v.left)/(v.width||1)*i.length);this.selected=Math.min(i.length-1,Math.max(0,M))},at=d=>{if(d.key==="ArrowLeft"||d.key==="ArrowRight"){d.preventDefault();let v=d.key==="ArrowRight"?1:-1,M=this.selected;this.selected=M==null?v>0?0:i.length-1:Math.min(i.length-1,Math.max(0,M+v))}else d.key==="Escape"&&(this.selected=null)},Tt=l>0?w`<svg
7
7
  width=${l}
8
8
  height=${s}
9
9
  role="img"
10
10
  tabindex="0"
11
11
  aria-label=${e}
12
12
  style="display:block;touch-action:pan-y"
13
- @pointerdown=${O}
14
- @pointermove=${d=>{(d.pointerType==="mouse"||d.buttons)&&O(d)}}
13
+ @pointerdown=${L}
14
+ @pointermove=${d=>{(d.pointerType==="mouse"||d.buttons)&&L(d)}}
15
15
  @pointerleave=${d=>{d.pointerType==="mouse"&&(this.selected=null)}}
16
16
  @keydown=${at}
17
17
  >
18
18
  <line class="nish-chart-grid" x1="0" x2=${l} y1=${C} y2=${C} stroke=${D.grid} stroke-width="1"></line>
19
- ${g.map((d,v)=>{let M=Math.max(2,Math.abs(d)/b*$),z=d<0?C:C-M,P=v*m+(m-A)/2,I=k===v,Rt=I||N&&(S||m>=26);return T`<g>
20
- <rect x=${P} y=${z} width=${A} height=${M} rx="2" fill=${u} opacity=${k==null||I?1:.55}></rect>
21
- ${Rt?T`<text class="nish-chart-axis" x=${P+A/2} y=${d<0?z+M+11:Math.max(11,z-4)} text-anchor="middle" font-size="11" fill=${D.text} style="font-variant-numeric:tabular-nums">${i(d)}</text>`:f}
19
+ ${g.map((d,v)=>{let M=Math.max(2,Math.abs(d)/_*$),z=d<0?C:C-M,N=v*m+(m-A)/2,I=k===v,lt=I||P&&(S||m>=26);return T`<g>
20
+ <rect x=${N} y=${z} width=${A} height=${M} rx="2" fill=${u} opacity=${k==null||I?1:.55}></rect>
21
+ ${lt?T`<text class="nish-chart-axis" x=${N+A/2} y=${d<0?z+M+11:Math.max(11,z-4)} text-anchor="middle" font-size="11" fill=${D.text} style="font-variant-numeric:tabular-nums">${r(d)}</text>`:f}
22
22
  </g>`})}
23
- ${r.map((d,v)=>{if(!(et||v===0||v===r.length-1))return f;let M=et?"middle":v===0?"start":"end",z=et?v*m+m/2:v===0?0:l;return T`<text class="nish-chart-axis" x=${z} y=${s-6} text-anchor=${M} font-size="11" fill=${D.text}>${h(d.label)}</text>`})}
23
+ ${i.map((d,v)=>{if(!(et||v===0||v===i.length-1))return f;let M=et?"middle":v===0?"start":"end",z=et?v*m+m/2:v===0?0:l;return T`<text class="nish-chart-axis" x=${z} y=${s-6} text-anchor=${M} font-size="11" fill=${D.text}>${h(d.label)}</text>`})}
24
24
  </svg>`:f;return w`<div class="nish-chart" style="position:relative;width:100%">
25
- ${At}
26
- <div aria-live="polite" style="margin-top:4px;min-height:20px;font-size:14px;font-variant-numeric:tabular-nums;color:var(--nish-hi2)">${k!=null?`${h(r[k].label)}: ${i(g[k])}`:""}</div>
27
- <table style=${zt}>
25
+ ${Tt}
26
+ <div aria-live="polite" style="margin-top:4px;min-height:20px;font-size:14px;font-variant-numeric:tabular-nums;color:var(--nish-hi2)">${k!=null?`${h(i[k].label)}: ${r(g[k])}`:""}</div>
27
+ <table style=${Rt}>
28
28
  <caption>${e}</caption>
29
29
  <tbody>
30
- ${r.map((d,v)=>w`<tr><th scope="row">${h(d.label)}</th><td>${i(g[v])}</td></tr>`)}
30
+ ${i.map((d,v)=>w`<tr><th scope="row">${h(d.label)}</th><td>${r(g[v])}</td></tr>`)}
31
31
  </tbody>
32
32
  </table>
33
- </div>`}};St("nish-bar-chart",Wt);var jt=10,ys=24,bs=12,_s="position:absolute;top:4px;z-index:10;pointer-events:none;white-space:nowrap;padding:4px 8px;font-variant-numeric:tabular-nums;background:var(--nish-elevated);border:1px solid var(--nish-line-strong);border-radius:var(--nish-radius-sm);box-shadow:var(--nish-shadow-pop);color:var(--nish-hi);font-size:12px",Vt=class extends K{static properties={...K.properties,data:{converter:wt},series:{converter:wt},area:{type:Boolean,reflect:!0},baseline:{type:Number,reflect:!0},yTicks:{type:Number,attribute:"y-ticks",reflect:!0},xTicks:{type:Number,attribute:"x-ticks",reflect:!0},active:{state:!0}};fromKey=!1;listening=!1;gradId=$n();constructor(){super(),this.data=[],this.series=[],this.area=!1,this.height=200,this.yTicks=4,this.xTicks=4,this.active=null}onDocPointerDown=t=>{this.contains(t.target)||(this.active=null)};disconnectedCallback(){super.disconnectedCallback(),this.stopListening()}stopListening(){this.listening&&(document.removeEventListener("pointerdown",this.onDocPointerDown),this.listening=!1)}updated(){this.active!=null&&!this.listening?(document.addEventListener("pointerdown",this.onDocPointerDown),this.listening=!0):this.active==null&&this.stopListening()}lines(){let t=_n(this.series);if(t.length)return t;let e=ye(this.data);return e.length?[{label:this.label,tone:this.tone||void 0,points:e}]:[]}moveTo(t,e,s,r,i,o,h){let l=e.getBoundingClientRect(),u=o+(t-l.left-r)/(i||1)*(h-o);this.active=bn(s,u)}render(){let t=it(),e=this.label,s=this.plotHeight,r=this.lines(),i=ot(this.yFormat),o=ot(this.xFormat),h=a=>a.y!=null&&Number.isFinite(a.y)&&Number.isFinite(a.x),l=new Set;for(let a of r)for(let p of a.points)h(p)&&l.add(p.x);let u=[...l].sort((a,p)=>a-p);if(!u.length)return w`<div class="nish-chart">
33
+ </div>`}};Et("nish-bar-chart",Wt);var jt=10,ys=24,_s=12,bs="position:absolute;top:4px;z-index:10;pointer-events:none;white-space:nowrap;padding:4px 8px;font-variant-numeric:tabular-nums;background:var(--nish-elevated);border:1px solid var(--nish-line-strong);border-radius:var(--nish-radius-sm);box-shadow:var(--nish-shadow-pop);color:var(--nish-hi);font-size:12px",Vt=class extends K{static properties={...K.properties,data:{converter:At},series:{converter:At},area:{type:Boolean,reflect:!0},baseline:{type:Number,reflect:!0},yTicks:{type:Number,attribute:"y-ticks",reflect:!0},xTicks:{type:Number,attribute:"x-ticks",reflect:!0},active:{state:!0}};fromKey=!1;listening=!1;gradId=$n();constructor(){super(),this.data=[],this.series=[],this.area=!1,this.height=200,this.yTicks=4,this.xTicks=4,this.active=null}onDocPointerDown=t=>{this.contains(t.target)||(this.active=null)};disconnectedCallback(){super.disconnectedCallback(),this.stopListening()}stopListening(){this.listening&&(document.removeEventListener("pointerdown",this.onDocPointerDown),this.listening=!1)}updated(){this.active!=null&&!this.listening?(document.addEventListener("pointerdown",this.onDocPointerDown),this.listening=!0):this.active==null&&this.stopListening()}lines(){let t=bn(this.series);if(t.length)return t;let e=ye(this.data);return e.length?[{label:this.label,tone:this.tone||void 0,points:e}]:[]}moveTo(t,e,s,i,r,o,h){let l=e.getBoundingClientRect(),u=o+(t-l.left-i)/(r||1)*(h-o);this.active=_n(s,u)}render(){let t=rt(),e=this.label,s=this.plotHeight,i=this.lines(),r=ot(this.yFormat),o=ot(this.xFormat),h=a=>a.y!=null&&Number.isFinite(a.y)&&Number.isFinite(a.x),l=new Set;for(let a of i)for(let p of a.points)h(p)&&l.add(p.x);let u=[...l].sort((a,p)=>a-p);if(!u.length)return w`<div class="nish-chart">
34
34
  <div class="nish-empty" role="img" aria-label=${t.noDataNamed(e)} style="height:${s}px;box-sizing:border-box">${this.empty||t.noDataYet}</div>
35
- </div>`;let g=r.map(a=>new Map(a.points.filter(h).map(p=>[p.x,p.y]))),c=1/0,y=-1/0;for(let a of r)for(let p of a.points)h(p)&&(c=Math.min(c,p.y),y=Math.max(y,p.y));let b=this.baseline!=null&&Number.isFinite(this.baseline)?this.baseline:void 0;b!==void 0&&(c=Math.min(c,b),y=Math.max(y,b)),[c,y]=yn(c,y);let $=u[0],C=u[u.length-1]===$?$+1:u[u.length-1],m=this.width,A=ge(c,y,this.yTicks||4).map(a=>({v:a,text:i(a)})),S=Math.ceil(Math.max(...A.map(a=>a.text.length))*6.6)+10,N=Math.max(0,m-S-bs),et=Math.max(0,s-jt-ys),k=a=>S+(a-$)/(C-$)*N,O=a=>jt+(1-(a-c)/(y-c))*et,at=jt+et,At=r.map(a=>{let p=[],E=[];for(let Gt of[...a.points].sort((Rn,Tn)=>Rn.x-Tn.x))h(Gt)?E.push([Number(k(Gt.x).toFixed(1)),Number(O(Gt.y).toFixed(1))]):(E.length&&p.push(E),E=[]);return E.length&&p.push(E),p}),d=a=>a.map(p=>`${p[0]},${p[1]}`).join(" "),v=Math.min(this.xTicks||4,Math.max(2,Math.floor(N/72))),M=ge($,C,v),z=this.active!=null&&this.active<u.length?this.active:null,P=z!=null?u[z]:null,I=P!=null?k(P):0,Rt=P!=null?r.map((a,p)=>({s:a,i:p,y:g[p].get(P)})).filter(a=>a.y!=null):[],En=I<m/2,be=a=>{this.fromKey=!1,this.moveTo(a.clientX,a.currentTarget,u,S,N,$,C)},xn=a=>{if(a.key==="ArrowLeft"||a.key==="ArrowRight"){a.preventDefault(),this.fromKey=!0;let p=a.key==="ArrowRight"?1:-1,E=this.active;this.active=E==null?p>0?0:u.length-1:Math.min(u.length-1,Math.max(0,E+p))}else a.key==="Escape"&&(this.active=null)},_e=r[0],ve=B(_e?.tone,0),wn=m>0?w`<svg
35
+ </div>`;let g=i.map(a=>new Map(a.points.filter(h).map(p=>[p.x,p.y]))),c=1/0,y=-1/0;for(let a of i)for(let p of a.points)h(p)&&(c=Math.min(c,p.y),y=Math.max(y,p.y));let _=this.baseline!=null&&Number.isFinite(this.baseline)?this.baseline:void 0;_!==void 0&&(c=Math.min(c,_),y=Math.max(y,_)),[c,y]=yn(c,y);let $=u[0],C=u[u.length-1]===$?$+1:u[u.length-1],m=this.width,A=ge(c,y,this.yTicks||4).map(a=>({v:a,text:r(a)})),S=Math.ceil(Math.max(...A.map(a=>a.text.length))*6.6)+10,P=Math.max(0,m-S-_s),et=Math.max(0,s-jt-ys),k=a=>S+(a-$)/(C-$)*P,L=a=>jt+(1-(a-c)/(y-c))*et,at=jt+et,Tt=i.map(a=>{let p=[],E=[];for(let Gt of[...a.points].sort((Rn,Tn)=>Rn.x-Tn.x))h(Gt)?E.push([Number(k(Gt.x).toFixed(1)),Number(L(Gt.y).toFixed(1))]):(E.length&&p.push(E),E=[]);return E.length&&p.push(E),p}),d=a=>a.map(p=>`${p[0]},${p[1]}`).join(" "),v=Math.min(this.xTicks||4,Math.max(2,Math.floor(P/72))),M=ge($,C,v),z=this.active!=null&&this.active<u.length?this.active:null,N=z!=null?u[z]:null,I=N!=null?k(N):0,lt=N!=null?i.map((a,p)=>({s:a,i:p,y:g[p].get(N)})).filter(a=>a.y!=null):[],En=I<m/2,_e=a=>{this.fromKey=!1,this.moveTo(a.clientX,a.currentTarget,u,S,P,$,C)},xn=a=>{if(a.key==="ArrowLeft"||a.key==="ArrowRight"){a.preventDefault(),this.fromKey=!0;let p=a.key==="ArrowRight"?1:-1,E=this.active;this.active=E==null?p>0?0:u.length-1:Math.min(u.length-1,Math.max(0,E+p))}else a.key==="Escape"&&(this.active=null)},be=i[0],ve=B(be?.tone,0),wn=m>0?w`<svg
36
36
  width=${m}
37
37
  height=${s}
38
38
  role="img"
39
39
  tabindex="0"
40
40
  aria-label=${e}
41
41
  style="display:block;touch-action:pan-y"
42
- @pointerdown=${be}
43
- @pointermove=${be}
42
+ @pointerdown=${_e}
43
+ @pointermove=${_e}
44
44
  @pointerleave=${a=>{a.pointerType==="mouse"&&(this.active=null)}}
45
45
  @keydown=${xn}
46
46
  @blur=${()=>{this.fromKey&&(this.active=null)}}
47
47
  >
48
- ${this.area&&_e?T`<defs><linearGradient id=${this.gradId} x1="0" y1="0" x2="0" y2="1"><stop offset="0%" stop-color=${ve} stop-opacity="0.2"></stop><stop offset="100%" stop-color=${ve} stop-opacity="0"></stop></linearGradient></defs>`:f}
48
+ ${this.area&&be?T`<defs><linearGradient id=${this.gradId} x1="0" y1="0" x2="0" y2="1"><stop offset="0%" stop-color=${ve} stop-opacity="0.2"></stop><stop offset="100%" stop-color=${ve} stop-opacity="0"></stop></linearGradient></defs>`:f}
49
49
  ${A.map(a=>T`<g>
50
- <line class="nish-chart-grid" x1=${S} x2=${S+N} y1=${O(a.v)} y2=${O(a.v)} stroke=${D.grid} stroke-width="1"></line>
51
- <text class="nish-chart-axis" x=${S-6} y=${O(a.v)} text-anchor="end" dominant-baseline="middle" font-size="11" fill=${D.text} style="font-variant-numeric:tabular-nums">${a.text}</text>
50
+ <line class="nish-chart-grid" x1=${S} x2=${S+P} y1=${L(a.v)} y2=${L(a.v)} stroke=${D.grid} stroke-width="1"></line>
51
+ <text class="nish-chart-axis" x=${S-6} y=${L(a.v)} text-anchor="end" dominant-baseline="middle" font-size="11" fill=${D.text} style="font-variant-numeric:tabular-nums">${a.text}</text>
52
52
  </g>`)}
53
53
  ${M.map((a,p)=>T`<text class="nish-chart-axis" x=${k(a)} y=${s-6} text-anchor=${p===0?"start":p===M.length-1?"end":"middle"} font-size="11" fill=${D.text} style="font-variant-numeric:tabular-nums">${o(a)}</text>`)}
54
- ${b!==void 0?T`<line x1=${S} x2=${S+N} y1=${O(b)} y2=${O(b)} stroke=${D.zero} stroke-width="1" stroke-dasharray="4 4"></line>`:f}
55
- ${this.area?(At[0]??[]).map(a=>T`<polygon points="${a[0][0]},${at} ${d(a)} ${a[a.length-1][0]},${at}" fill="url(#${this.gradId})"></polygon>`):f}
56
- ${At.map((a,p)=>a.map(E=>E.length===1?T`<circle cx=${E[0][0]} cy=${E[0][1]} r="2" fill=${B(r[p].tone,p)}></circle>`:T`<polyline points=${d(E)} fill="none" stroke=${B(r[p].tone,p)} stroke-width="2" stroke-linejoin="round" stroke-linecap="round"></polyline>`))}
57
- ${P!=null?T`<g pointer-events="none">
54
+ ${_!==void 0?T`<line x1=${S} x2=${S+P} y1=${L(_)} y2=${L(_)} stroke=${D.zero} stroke-width="1" stroke-dasharray="4 4"></line>`:f}
55
+ ${this.area?(Tt[0]??[]).map(a=>T`<polygon points="${a[0][0]},${at} ${d(a)} ${a[a.length-1][0]},${at}" fill="url(#${this.gradId})"></polygon>`):f}
56
+ ${Tt.map((a,p)=>a.map(E=>E.length===1?T`<circle cx=${E[0][0]} cy=${E[0][1]} r="2" fill=${B(i[p].tone,p)}></circle>`:T`<polyline points=${d(E)} fill="none" stroke=${B(i[p].tone,p)} stroke-width="2" stroke-linejoin="round" stroke-linecap="round"></polyline>`))}
57
+ ${N!=null?T`<g pointer-events="none">
58
58
  <line x1=${I} x2=${I} y1=${jt} y2=${at} stroke=${D.axis} stroke-width="1"></line>
59
- ${Rt.map(a=>T`<circle cx=${I} cy=${O(a.y)} r="4" fill=${B(a.s.tone,a.i)} stroke="var(--nish-surface)" stroke-width="2"></circle>`)}
59
+ ${lt.map(a=>T`<circle cx=${I} cy=${L(a.y)} r="4" fill=${B(a.s.tone,a.i)} stroke="var(--nish-surface)" stroke-width="2"></circle>`)}
60
60
  </g>`:f}
61
- </svg>`:f,An=P!=null&&m>0?w`<div class="nish-chart-tooltip" style="${_s};${En?`left:${I+10}px`:`right:${m-I+10}px`}">
62
- <div style="color:var(--nish-hi3)">${o(P)}</div>
63
- ${Rt.map(a=>w`<div style="display:flex;align-items:center;gap:6px">
61
+ </svg>`:f,An=N!=null&&m>0?w`<div class="nish-chart-tooltip" style="${bs};${En?`left:${I+10}px`:`right:${m-I+10}px`}">
62
+ <div style="color:var(--nish-hi3)">${o(N)}</div>
63
+ ${lt.map(a=>w`<div style="display:flex;align-items:center;gap:6px">
64
64
  <span aria-hidden="true" style="display:inline-block;width:8px;height:8px;border-radius:50%;background:${B(a.s.tone,a.i)}"></span>
65
- ${r.length>1?w`<span style="color:var(--nish-hi3)">${a.s.label}</span>`:f}
66
- <span style="font-weight:500">${i(a.y)}</span>
65
+ ${i.length>1?w`<span style="color:var(--nish-hi3)">${a.s.label}</span>`:f}
66
+ <span style="font-weight:500">${r(a.y)}</span>
67
67
  </div>`)}
68
68
  </div>`:f;return w`<div class="nish-chart" style="position:relative;width:100%;user-select:none">
69
69
  <div style="position:relative;height:${s}px">
70
70
  ${wn}${An}
71
- <table style=${zt}>
71
+ <div aria-live="polite" style=${Rt}>${this.fromKey&&N!=null?`${o(N)}: ${lt.map(a=>`${i.length>1?`${a.s.label} `:""}${r(a.y)}`).join(", ")}`:""}</div>
72
+ <table style=${Rt}>
72
73
  <caption>${e}</caption>
73
74
  <thead>
74
75
  <tr>
75
76
  <th scope="col">x</th>
76
- ${r.map(a=>w`<th scope="col">${a.label}</th>`)}
77
+ ${i.map(a=>w`<th scope="col">${a.label}</th>`)}
77
78
  </tr>
78
79
  </thead>
79
80
  <tbody>
80
81
  ${u.slice(0,200).map(a=>w`<tr>
81
82
  <th scope="row">${o(a)}</th>
82
- ${r.map((p,E)=>w`<td>${g[E].has(a)?i(g[E].get(a)):""}</td>`)}
83
+ ${i.map((p,E)=>w`<td>${g[E].has(a)?r(g[E].get(a)):""}</td>`)}
83
84
  </tr>`)}
84
85
  </tbody>
85
86
  </table>
86
87
  </div>
87
- ${r.length>1?w`<ul class="nish-legend" aria-label=${t.legend}>
88
- ${r.map((a,p)=>w`<li class="nish-legend-item" style="--c: ${B(a.tone,p)}"><i class="nish-legend-swatch" aria-hidden="true"></i>${a.label}</li>`)}
88
+ ${i.length>1?w`<ul class="nish-legend" aria-label=${t.legend}>
89
+ ${i.map((a,p)=>w`<li class="nish-legend-item" style="--c: ${B(a.tone,p)}"><i class="nish-legend-swatch" aria-hidden="true"></i>${a.label}</li>`)}
89
90
  </ul>`:f}
90
- </div>`}};St("nish-line-chart",Vt);export{Wt as NishBarChart,$t as NishElement,Vt as NishLineChart,Jn as configureStrings,St as define};
91
+ </div>`}};Et("nish-line-chart",Vt);export{Wt as NishBarChart,St as NishElement,Vt as NishLineChart,Jn as configureStrings,Et as define};
91
92
  /*! Bundled license information:
92
93
 
93
94
  @lit-labs/ssr-dom-shim/lib/element-internals.js:
@@ -106,6 +106,15 @@ export interface NishCommandSelectDetail {
106
106
  id: string;
107
107
  }
108
108
 
109
+ export declare class NishSheet extends NishElement {
110
+ open: boolean;
111
+ label: string | null;
112
+ /** The wrapping <dialog>, once children are moved in. */
113
+ dialog: HTMLDialogElement | null;
114
+ show(): void;
115
+ close(): void;
116
+ }
117
+
109
118
  export declare class NishTableSort extends NishElement {
110
119
  /** Only fire `nish-sort` (the server sorts); the rows are not reordered. */
111
120
  manual: boolean;
@@ -161,6 +170,7 @@ export declare class NishCommandPalette extends NishElement {
161
170
 
162
171
  declare global {
163
172
  interface HTMLElementTagNameMap {
173
+ 'nish-sheet': NishSheet;
164
174
  'nish-table-sort': NishTableSort;
165
175
  'nish-filter-bar': NishFilterBar;
166
176
  'nish-split': NishSplit;