nish-ui 1.8.0 → 2.0.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 (152) hide show
  1. package/README.md +223 -61
  2. package/dist/base-tailwind.css +1757 -0
  3. package/dist/base.css +1590 -1445
  4. package/dist/chart.d.ts +4 -1
  5. package/dist/chart.js +122 -49
  6. package/dist/elements-all.d.ts +8 -0
  7. package/dist/elements-all.js +178 -0
  8. package/dist/elements-charts.d.ts +124 -2
  9. package/dist/elements-charts.js +131 -1
  10. package/dist/elements-data.d.ts +166 -2
  11. package/dist/elements-data.js +46 -1
  12. package/dist/elements-forms.d.ts +71 -0
  13. package/dist/elements-forms.js +24 -25
  14. package/dist/elements.d.ts +71 -0
  15. package/dist/elements.js +4 -5
  16. package/dist/esm/chart-values.js +58 -0
  17. package/dist/esm/chart.js +10 -0
  18. package/dist/esm/cn.js +19 -0
  19. package/dist/esm/combobox-filter.js +13 -0
  20. package/dist/esm/components/accordion.js +166 -0
  21. package/dist/esm/components/app-shell.js +198 -0
  22. package/dist/esm/components/avatar-classes.js +28 -0
  23. package/dist/esm/components/avatar.js +113 -0
  24. package/dist/esm/components/breadcrumbs.js +154 -0
  25. package/dist/esm/components/canvas/follow-caption.js +32 -0
  26. package/dist/esm/components/canvas/follow.js +119 -0
  27. package/dist/esm/components/canvas/icons.js +70 -0
  28. package/dist/esm/components/canvas/index.js +10 -0
  29. package/dist/esm/components/canvas/layout.js +258 -0
  30. package/dist/esm/components/canvas/legend.js +93 -0
  31. package/dist/esm/components/canvas/minimap.js +127 -0
  32. package/dist/esm/components/canvas/node.js +87 -0
  33. package/dist/esm/components/canvas/route.js +262 -0
  34. package/dist/esm/components/canvas/system-canvas.js +837 -0
  35. package/dist/esm/components/canvas/types.js +10 -0
  36. package/dist/esm/components/canvas/view.js +47 -0
  37. package/dist/esm/components/chart-hooks.js +19 -0
  38. package/dist/esm/components/charts.js +467 -0
  39. package/dist/esm/components/client.js +24 -0
  40. package/dist/esm/components/combobox.js +343 -0
  41. package/dist/esm/components/command.js +403 -0
  42. package/dist/esm/components/data-classes.js +159 -0
  43. package/dist/esm/components/data.js +517 -0
  44. package/dist/esm/components/display-classes.js +130 -0
  45. package/dist/esm/components/display.js +755 -0
  46. package/dist/esm/components/error-boundary.js +64 -0
  47. package/dist/esm/components/feedback.js +136 -0
  48. package/dist/esm/components/file-dropzone.js +184 -0
  49. package/dist/esm/components/filters.js +108 -0
  50. package/dist/esm/components/flow.js +746 -0
  51. package/dist/esm/components/forms-classes.js +43 -0
  52. package/dist/esm/components/forms.js +581 -0
  53. package/dist/esm/components/hooks-classes.js +9 -0
  54. package/dist/esm/components/hooks.js +236 -0
  55. package/dist/esm/components/icons.js +96 -0
  56. package/dist/esm/components/inbox-classes.js +29 -0
  57. package/dist/esm/components/inbox.js +257 -0
  58. package/dist/esm/components/latest.js +13 -0
  59. package/dist/esm/components/layout-vars.js +96 -0
  60. package/dist/esm/components/layout.js +272 -0
  61. package/dist/esm/components/media.js +143 -0
  62. package/dist/esm/components/nav.js +614 -0
  63. package/dist/esm/components/overlay-classes.js +66 -0
  64. package/dist/esm/components/overlay.js +1447 -0
  65. package/dist/esm/components/pagination-classes.js +29 -0
  66. package/dist/esm/components/pagination.js +154 -0
  67. package/dist/esm/components/portal.js +16 -0
  68. package/dist/esm/components/primitives-classes.js +198 -0
  69. package/dist/esm/components/primitives.js +268 -0
  70. package/dist/esm/components/progress.js +77 -0
  71. package/dist/esm/components/provider.js +32 -0
  72. package/dist/esm/components/radio-group.js +186 -0
  73. package/dist/esm/components/resource-classes.js +133 -0
  74. package/dist/esm/components/resource.js +209 -0
  75. package/dist/esm/components/segmented.js +178 -0
  76. package/dist/esm/components/separator.js +38 -0
  77. package/dist/esm/components/service-tokens.js +221 -0
  78. package/dist/esm/components/settings.js +301 -0
  79. package/dist/esm/components/slider.js +262 -0
  80. package/dist/esm/components/split-classes.js +8 -0
  81. package/dist/esm/components/split.js +411 -0
  82. package/dist/esm/components/strings.js +119 -0
  83. package/dist/esm/components/table.js +144 -0
  84. package/dist/esm/components/tabs-classes.js +21 -0
  85. package/dist/esm/components/tabs.js +201 -0
  86. package/dist/esm/components/tag-input.js +257 -0
  87. package/dist/esm/components/theme-toggle.js +177 -0
  88. package/dist/esm/components/toast.js +361 -0
  89. package/dist/esm/components/url-state.js +118 -0
  90. package/dist/esm/components/visually-hidden.js +20 -0
  91. package/dist/esm/format.js +320 -0
  92. package/dist/esm/inbox-client.js +2 -0
  93. package/dist/esm/inbox-types.js +2 -0
  94. package/dist/esm/index.js +320 -0
  95. package/dist/esm/runtime.js +37 -0
  96. package/dist/esm/server/inbox/client.js +297 -0
  97. package/dist/esm/server/inbox/types.js +24 -0
  98. package/dist/esm/sparkline-path.js +59 -0
  99. package/dist/esm/split-layout.js +419 -0
  100. package/dist/esm/system-canvas.js +2 -0
  101. package/dist/esm/theme.js +804 -0
  102. package/dist/esm/tokens.mjs +425 -0
  103. package/dist/esm/url.js +20 -0
  104. package/dist/files.json +5 -1
  105. package/dist/fonts/LICENSE-Inter.txt +93 -0
  106. package/dist/format.d.ts +32 -18
  107. package/dist/format.js +227 -82
  108. package/dist/inbox-client.js +3 -1
  109. package/dist/index.d.ts +1689 -667
  110. package/dist/nish-components.css +4701 -3169
  111. package/dist/nish-components.min.css +1 -0
  112. package/dist/nish.css +1603 -1450
  113. package/dist/nish.min.css +1 -0
  114. package/dist/node/eslint.js +29 -14
  115. package/dist/node/th-check.js +29 -14
  116. package/dist/node/vite.d.ts +12 -0
  117. package/dist/node/vite.js +12 -2
  118. package/dist/server/hono.d.ts +15 -6
  119. package/dist/server/hono.js +30 -25
  120. package/dist/server/index.d.ts +3 -10
  121. package/dist/server/index.js +71 -38
  122. package/dist/{spa-DuVB5O7S.d.ts → spa-BLlMc0eI.d.ts} +38 -5
  123. package/dist/system-canvas-BLuWd69H.d.ts +183 -0
  124. package/dist/system-canvas.d.ts +2 -168
  125. package/dist/tailwind-core.css +114 -0
  126. package/dist/tailwind.css +3 -7
  127. package/dist/theme-init.js +23 -9
  128. package/dist/theme-init.sha256 +1 -0
  129. package/dist/theme.d.ts +246 -4
  130. package/dist/theme.global.js +357 -90
  131. package/dist/theme.js +338 -68
  132. package/dist/tokens.css +14 -6
  133. package/dist/tokens.dtcg.json +1513 -0
  134. package/dist/tokens.js +29 -14
  135. package/dist/tokens.json +512 -0
  136. package/package.json +51 -13
  137. package/dist/chart.js.map +0 -1
  138. package/dist/elements-charts.js.map +0 -1
  139. package/dist/elements-data.js.map +0 -1
  140. package/dist/elements-forms.js.map +0 -1
  141. package/dist/elements.js.map +0 -1
  142. package/dist/format.js.map +0 -1
  143. package/dist/inbox-client.js.map +0 -1
  144. package/dist/index.js +0 -10260
  145. package/dist/index.js.map +0 -1
  146. package/dist/server/hono.js.map +0 -1
  147. package/dist/server/index.js.map +0 -1
  148. package/dist/split-layout.js.map +0 -1
  149. package/dist/system-canvas.js +0 -2204
  150. package/dist/system-canvas.js.map +0 -1
  151. package/dist/theme.global.js.map +0 -1
  152. package/dist/theme.js.map +0 -1
@@ -1,2 +1,124 @@
1
- // Hand-written public types for dist/elements-charts.d.ts: filled in by later tasks (no lit import).
2
- export {};
1
+ // The published types of nish-ui/elements/charts (copied to dist/elements-charts.d.ts by
2
+ // tsup.config.ts). Hand-written so the package never imports 'lit' (a devDependency) and every
3
+ // element stays an HTMLElement for consumers. Keep it in step with the classes in this folder.
4
+
5
+ /** Base of every nish-ui element (light DOM). */
6
+ export declare class NishElement extends HTMLElement {
7
+ readonly updateComplete: Promise<boolean>;
8
+ requestUpdate(): void;
9
+ }
10
+
11
+ /** The words the custom elements show. Key names match `NishStrings` (the React side) where the
12
+ * same text exists there. */
13
+ export interface NishElementStrings {
14
+ /** nish-command-palette, nish-filter-bar: close button label. */
15
+ close: string;
16
+ /** nish-search (default placeholder and aria-label), nish-command-palette (dialog name). */
17
+ search: string;
18
+ /** nish-command-palette: input placeholder and its accessible name. */
19
+ searchPlaceholder: string;
20
+ /** nish-command-palette: nothing found. */
21
+ noResults: string;
22
+ /** nish-command-palette: listbox label. */
23
+ results: string;
24
+ /** nish-command-palette, nish-combobox: live-region text for a count of matches. */
25
+ resultCount: (count: number) => string;
26
+ /** nish-combobox: empty list. */
27
+ noMatches: string;
28
+ /** nish-combobox: loading row and live-region text. */
29
+ searching: string;
30
+ /** nish-search, nish-combobox, nish-filter-bar: clear button. */
31
+ clear: string;
32
+ /** nish-copy-button: idle label. */
33
+ copy: string;
34
+ /** nish-copy-button: label after copying. */
35
+ copied: string;
36
+ /** nish-copy-button: label while the clipboard is refused and the text is selected. */
37
+ copyManual: string;
38
+ /** nish-field: tag for a non-required field. */
39
+ optional: string;
40
+ /** nish-bottom-nav, nish-nav-rail, nish-section-nav: default landmark label. */
41
+ sections: string;
42
+ /** nish-filter-bar: sheet title and the button that opens it. */
43
+ filters: string;
44
+ /** nish-filter-bar: wide-layout clear button. */
45
+ clearFilters: string;
46
+ /** nish-filter-bar: sheet button that closes it. */
47
+ showResults: string;
48
+ /** nish-filter-bar: label of the active-filter count badge. */
49
+ activeCount: (count: number) => string;
50
+ /** nish-chip-group: remove button without a chip name. */
51
+ remove: string;
52
+ /** nish-chip-group: remove button for a named chip. */
53
+ removeNamed: (name: string) => string;
54
+ /** nish-split: divider label in a row split. */
55
+ resizeColumns: string;
56
+ /** nish-split: divider label in a column split. */
57
+ resizeRows: string;
58
+ /** nish-line-chart: legend landmark. */
59
+ legend: string;
60
+ /** nish-line-chart, nish-bar-chart: text of the empty state. */
61
+ noDataYet: string;
62
+ /** nish-line-chart, nish-bar-chart, nish-sparkline: accessible name of a chart with no data. */
63
+ noDataNamed: (label: string) => string;
64
+ /** nish-line-chart: name of a series without a label (1-based position). */
65
+ seriesNumber: (n: number) => string;
66
+ /** nish-sparkline: accessible name when no `label` is set. */
67
+ trend: string;
68
+ /** nish-theme-toggle: name of the system mode. */
69
+ themeSystem: string;
70
+ /** nish-theme-toggle: name of the light mode. */
71
+ themeLight: string;
72
+ /** nish-theme-toggle: name of the dark mode. */
73
+ themeDark: string;
74
+ }
75
+
76
+ /** Set the words the elements show, once, for the whole page (one store shared by every entry and
77
+ * every copy of the package). Keys you leave out keep their current value (English by default).
78
+ * Elements already on the page update at once. A per-element attribute (`label`, `placeholder`,
79
+ * `empty-text`, ...) always wins over a configured string. */
80
+ export declare function configureStrings(partial: Partial<NishElementStrings>): void;
81
+
82
+ /** Register a custom element unless the tag is already defined. */
83
+ export declare function define(tag: string, ctor: CustomElementConstructor): void;
84
+
85
+ declare class NishChartBase extends NishElement {
86
+ /** The chart's `aria-label` (required). */
87
+ label: string;
88
+ /** Plot height in pixels (200 when unset). */
89
+ height: number;
90
+ /** A color tone such as `chart-2`, `ok` or `loss`. */
91
+ tone: string;
92
+ /** Text shown when there is no data (default "No data yet"). */
93
+ empty: string;
94
+ /** `number`, `percent`, `currency:USD`, `date` or `time`. */
95
+ yFormat: string;
96
+ xFormat: string;
97
+ }
98
+
99
+ export declare class NishLineChart extends NishChartBase {
100
+ /** `[{x,y}]`, `[[x,y]]` or plain numbers. A JSON attribute or a property. */
101
+ data: unknown[];
102
+ /** Several lines. Two or more draw a legend. A JSON attribute or a property. */
103
+ series: unknown[];
104
+ area: boolean;
105
+ baseline: number | undefined;
106
+ yTicks: number;
107
+ xTicks: number;
108
+ }
109
+
110
+ export declare class NishBarChart extends NishChartBase {
111
+ /** `[{label,value}]`, `[[label,value]]` or plain numbers. A JSON attribute or a property. */
112
+ data: unknown[];
113
+ /** `ends` or `all`. */
114
+ xTicks: string;
115
+ /** Print every value on its bar (touch screens do by default). */
116
+ showValues: boolean;
117
+ }
118
+
119
+ declare global {
120
+ interface HTMLElementTagNameMap {
121
+ 'nish-line-chart': NishLineChart;
122
+ 'nish-bar-chart': NishBarChart;
123
+ }
124
+ }
@@ -1 +1,131 @@
1
- //# sourceMappingURL=elements-charts.js.map
1
+ var be=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,Vt,ht,Ct,q,ct,W,Nt,ve;var b={__proto__:null};b.enumerable=!0;Object.freeze(b);var Gt=(W=class{constructor(t,e={}){if(nt.set(this,!1),Tt.set(this,!1),Mt.set(this,!1),lt.set(this,!1),Vt.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,Vt,"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,Vt=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(Gt.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 $e=(ve=class extends Gt{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,ve);Object.defineProperties($e.prototype,{detail:b});var U=Gt,Yt=$e;var R;var Ss=(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??=Yt;var qt=Symbol(),Se=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=Se(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=Se(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),_=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,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,we,Cn]}};var Ee=new WeakMap,ut=n=>{let t=Ee.get(n);return t===void 0&&Ee.set(n,t=new Map),t},dt=class extends Ot{getRootNode(t){return t?.composed?Kt:this.__host?.__shadowRoot??Kt}};var xe=class extends dt{get adoptedStyleSheets(){return[]}createTreeWalker(){return{}}createTextNode(){return{}}createElement(){return{}}};var we=new xe,Kt=we;var Ae=class extends dt{constructor(t){if(super(),t!==qt)throw new TypeError("Illegal constructor");Object.assign(this,globalThis,{CustomElementRegistry:Pt,customElements:Xt,document:Kt,Document:xe,Element:Re,EventTarget:Ot,HTMLElement:Te,Node:dt,ShadowRoot:Me,window:this,Window:Ae})}};var Re=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 Me(qt,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 be(this);return this.__internals=t,t}getAttribute(t){return ut(this).get(t)??null}};var Te=class extends Re{},Jt=Te;var Me=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 Jt,"localName",{get(){return"lit-server-root"}});function Tn(){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=Tn(),this.__pendingWhenDefineds.set(t,s)),s.promise}},Mn=Pt;var Xt=new Mn,Cn=new Ae(qt);var pt=globalThis,Dt=pt.ShadowRoot&&(pt.ShadyCSS===void 0||pt.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Ne=Symbol(),Ce=new WeakMap,Lt=class{constructor(t,e,s){if(this._$cssResult$=!0,s!==Ne)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=Ce.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),s&&Ce.set(e,t))}return t}toString(){return this.cssText}},Oe=n=>new Lt(typeof n=="string"?n:n+"",void 0,Ne);var Pe=(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)}},Zt=Dt||pt.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:Nn,defineProperty:On,getOwnPropertyDescriptor:Pn,getOwnPropertyNames:Ln,getOwnPropertySymbols:Dn,getPrototypeOf:In}=Object,ft=globalThis;ft.customElements??=Xt;var Le=ft.trustedTypes,kn=Le?Le.emptyScript:"",Un=ft.reactiveElementPolyfillSupport,mt=(n,t)=>n,Qt={toAttribute(n,t){switch(t){case Boolean:n=n?kn: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}},Ie=(n,t)=>!Nn(n,t),De={attribute:!0,type:String,converter:Qt,reflect:!1,useDefault:!1,hasChanged:Ie};Symbol.metadata??=Symbol("metadata"),ft.litPropertyMetadata??=new WeakMap;var H=class extends(globalThis.HTMLElement??Jt){static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=De){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&&On(this.prototype,t,r)}}static getPropertyDescriptor(t,e,s){let{get:r,set:i}=Pn(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)??De}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=[...Ln(e),...Dn(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(Zt(r))}else t!==void 0&&e.push(Zt(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 Pe(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:Qt).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:Qt;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??Ie)(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,Un?.({ReactiveElement:H}),(ft.reactiveElementVersions??=[]).push("2.1.2");var kt=globalThis,ke=n=>n,It=kt.trustedTypes,Ue=It?It.createPolicy("lit-html",{createHTML:n=>n}):void 0,je="$lit$",j=`lit$${Math.random().toFixed(9).slice(2)}$`,Ve="?"+j,Fn=`<${Ve}>`,Z=kt.document===void 0?{createTreeWalker:()=>({})}:document,yt=()=>Z.createComment(""),_t=n=>n===null||typeof n!="object"&&typeof n!="function",oe=Array.isArray,Hn=n=>oe(n)||typeof n?.[Symbol.iterator]=="function",te=`[
3
+ \f\r]`,gt=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Fe=/-->/g,He=/>/g,J=RegExp(`>|${te}(?:([^\\s"'>=/]+)(${te}*=${te}*(?:[^
4
+ \f\r"'\`<>=]|("|')|))|$)`,"g"),Be=/'/g,ze=/"/g,Ge=/^(?:script|style|textarea|title)$/i,ae=n=>(t,...e)=>({_$litType$:n,strings:t,values:e}),w=ae(1),T=ae(2),nr=ae(3),Q=Symbol.for("lit-noChange"),f=Symbol.for("lit-nothing"),We=new WeakMap,X=Z.createTreeWalker(Z,129);function Ye(n,t){if(!oe(n)||!n.hasOwnProperty("raw"))throw Error("invalid template strings array");return Ue!==void 0?Ue.createHTML(t):t}var Bn=(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=Fe:g[1]!==void 0?o=He:g[2]!==void 0?(Ge.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]==='"'?ze:Be):o===ze||o===Be?o=J:o===Fe||o===He?o=gt:(o=J,r=void 0);let _=o===J&&n[h+1].startsWith("/>")?" ":"";i+=o===gt?l+Fn:c>=0?(s.push(u),l.slice(0,c)+je+l.slice(c)+j+_):l+j+(c===-2?h:_)}return[Ye(n,i+(n[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),s]},bt=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]=Bn(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(je)){let y=g[o++],_=r.getAttribute(c).split(j),$=/([.?@])?(.*)/.exec(y);l.push({type:1,index:i,name:$[2],strings:_,ctor:$[1]==="."?ne:$[1]==="?"?se:$[1]==="@"?re:rt}),r.removeAttribute(c)}else c.startsWith(j)&&(l.push({type:6,index:i}),r.removeAttribute(c));if(Ge.test(r.tagName)){let c=r.textContent.split(j),y=c.length-1;if(y>0){r.textContent=It?It.emptyScript:"";for(let _=0;_<y;_++)r.append(c[_],yt()),X.nextNode(),l.push({type:2,index:++i});r.append(c[y],yt())}}}else if(r.nodeType===8)if(r.data===Ve)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=_t(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 ee=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 ie(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),_t(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):Hn(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&&_t(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=bt.createElement(Ye(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===r)this._$AH.p(e);else{let i=new ee(r,this),o=i.u(this.options);i.p(e),this.T(o),this._$AH=i}}_$AC(t){let e=We.get(t.strings);return e===void 0&&We.set(t.strings,e=new bt(t)),e}k(t){oe(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=ke(t).nextSibling;ke(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=!_t(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||=!_t(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??"")}},ne=class extends rt{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===f?void 0:t}},se=class extends rt{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==f)}},re=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)}},ie=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 zn=kt.litHtmlPolyfillSupport;zn?.(bt,vt),(kt.litHtmlVersions??=[]).push("3.3.3");var Ke=(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 le=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=Ke(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,le.litElementHydrateSupport?.({LitElement:V});var Wn=le.litElementPolyfillSupport;Wn?.({LitElement:V});(le.litElementVersions??=[]).push("4.2.2");var jn="2.0.0";var Vn=Symbol.for("nish-ui.runtime.v1");function Gn(){let n=globalThis;return n[Vn]??={versions:new Set,slots:{}}}function Yn(n){n.versions.add(jn),n.versions.size>1&&!n.warned&&globalThis.process?.env?.NODE_ENV!=="production"&&(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 qe=!1;function Ut(n,t){let e=Gn();return qe||(qe=!0,Yn(e)),n in e.slots||(e.slots[n]=t()),e.slots[n]}var Je={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",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"};function he(){return Ut("element-strings",()=>({values:{...Je},listeners:new Set}))}function Kn(n){let t=he(),e={...t.values};for(let[s,r]of Object.entries(n))r!==void 0&&Object.hasOwn(Je,s)&&(e[s]=r);t.values=e;for(let s of Array.from(t.listeners))s()}function it(){return he().values}function Xe(n){let t=he().listeners;return t.add(n),()=>{t.delete(n)}}var $t=class extends V{#t=null;createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.#t??=Xe(()=>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",de="\u2212",ue="en-US",qn=Ut("format",()=>({locale:ue})),Ze=new Map;function Jn(n){let t=Ze.get(n);if(t===void 0){try{t=Intl.getCanonicalLocales(n)[0]??ue}catch{t=ue}Ze.set(n,t)}return t}function xt(n){return n?.locale?Jn(n.locale):qn.locale}function en(n){return n==="en"||n==="en-US"}var Qe=new Map;function nn(n,t){let e=Qe.get(n);return e===void 0&&(e=t(),Qe.set(n,e)),e}function Xn(n,t,e){return nn(`n|${n}|${t}|${e}`,()=>new Intl.NumberFormat(n,{minimumFractionDigits:t,maximumFractionDigits:e}))}function tt(n,t,e,s){return nn(`d|${n}|${t}|${s??""}`,()=>new Intl.DateTimeFormat(n,s?{...e,timeZone:s}:e))}function pe(n){return typeof n=="number"&&Number.isFinite(n)}function G(n,t,e,s){return Xn(s,t,e).format(n)}var ce=[[1e12,"T"],[1e9,"B"],[1e6,"M"],[1e3,"k"]];function sn(n,t,e){for(let s=0;s<ce.length;s++){let[r,i]=ce[s];if(!(n<r)){if(s>0&&Number((n/r).toFixed(t))>=1e3){let[o,h]=ce[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 rn(n,t){return Number(Math.abs(n).toFixed(t))===0}var tn=new Map;function Zn(n,t){let e=`${t}|${n}`,s=tn.get(e);if(s===void 0){try{s=new Intl.NumberFormat(t,{style:"currency",currency:n,currencyDisplay:"narrowSymbol"}).formatToParts(0).find(i=>i.type==="currency")?.value??n}catch{s=n+" "}tn.set(e,s)}return s}function Qn(n,t,e){let s=Zn(t.currency??"USD",e);if(t.compact&&n>=1e3)return s+sn(n,1,e);let r=t.cents??"auto",i=Math.round(n*100)%100!==0,o=r==="always"||r==="auto"&&(n<1e3||i);return s+(o?G(n,2,2,e):G(n,0,0,e))}function on(n,t={}){if(!pe(n))return Et;let e=Qn(Math.abs(n),t,xt(t));return n<0&&Math.round(Math.abs(n)*100)>0?de+e:e}function an(n,t={}){if(!pe(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 rn(s,e)?r:s<0?de+r:t.signed?"+"+r:r}function ln(n,t={}){if(!pe(n))return Et;let e=xt(t),s=n<0&&!rn(n,t.digits??2)?de:"",r=Math.abs(n);return t.compact&&r>=1e3?s+sn(r,t.digits??1,e):s+(t.digits===void 0?G(r,0,2,e):G(r,t.digits,t.digits,e))}var ts=/^(\d{4})-(\d{2})-(\d{2})$/;function hn(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=ts.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 cn(n,t){return n.dayOnly?void 0:t.timeZone}function Ft(n){return n.replace(/[\u202f\u00a0]/g," ")}var Sr=[[60,"minute","m"],[3600,"hour","h"],[86400,"day","d"],[86400*30,"month","mo"],[86400*365,"year","y"]];var es={month:"short",day:"numeric",year:"numeric"},ns={weekday:"long",month:"long",day:"numeric",year:"numeric"},ss={month:"short",day:"numeric"},rs={weekday:"short"},is={month:"numeric",day:"numeric"},os={hour:"numeric",minute:"2-digit"},as={hour:"numeric",minute:"2-digit",hour12:!0},ls={year:"numeric",month:"numeric",day:"numeric"};function hs(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",ls,t).formatToParts(n))(s.type==="year"||s.type==="month"||s.type==="day")&&(e[s.type]=Number(s.value));return e}function cs(n,t,e,s){let r=cn(n,e);switch(t){case"medium":return Ft(tt(s,"medium",es,r).format(n.d));case"long":return Ft(tt(s,"long",ns,r).format(n.d));case"weekday":{let i=tt(s,"weekday",rs,r).format(n.d);if(!en(s))return`${i} ${tt(s,"md",is,r).format(n.d)}`;let o=hs(n.d,r);return`${i} ${o.month}/${o.day}`}default:return Ft(tt(s,"short",ss,r).format(n.d))}}function un(n,t="short",e={}){let s=hn(n);return s?cs(s,t,e,xt(e)):Et}function us(n,t,e){let s=en(e);return Ft(tt(e,s?"time12":"time",s?as:os,cn(n,t)).format(n.d))}function dn(n,t={}){let e=hn(n);return e?us(e,t,xt(t)):Et}var pn={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(pn,n)?pn[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)"},mn,ds=n=>Math.abs(n)<1e3?String(Math.round(n*100)/100):(mn??=new Intl.NumberFormat("en-US",{maximumFractionDigits:0}),mn.format(n));function ot(n,t=ds){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=>ln(o);case"percent":{let o=i!==""&&Number.isInteger(Number(i))&&Number(i)>=0&&Number(i)<=10?Number(i):1;return h=>an(h,{digits:o})}case"currency":return o=>on(o,{currency:i||"USD"});case"date":{let o=i==="medium"||i==="long"||i==="weekday"?i:"short";return h=>un(h,o)}case"time":return o=>dn(o);default:return t}}function me(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 gn(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 yn(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 fe(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:fe(s.points??s.data)}}):[]}function bn(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}},fn=0;function vn(){return fn+=1,`nish-chart-${fn}`}var Ht="position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0";var $n=18,ps=22,Bt=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=bn(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">
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),_=c-y||1,$=Math.max(0,s-$n-ps),C=$n+c/_*$,m=l/r.length,A=Math.max(1,m*.72),S=this.showValues,N=S||this.coarse,et=this.xTicks==="all",I=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
7
+ width=${l}
8
+ height=${s}
9
+ role="img"
10
+ tabindex="0"
11
+ aria-label=${e}
12
+ style="display:block;touch-action:pan-y"
13
+ @pointerdown=${O}
14
+ @pointermove=${d=>{(d.pointerType==="mouse"||d.buttons)&&O(d)}}
15
+ @pointerleave=${d=>{d.pointerType==="mouse"&&(this.selected=null)}}
16
+ @keydown=${at}
17
+ >
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)/_*$),z=d<0?C:C-M,P=v*m+(m-A)/2,k=I===v,Rt=k||N&&(S||m>=26);return T`<g>
20
+ <rect x=${P} y=${z} width=${A} height=${M} rx="2" fill=${u} opacity=${I==null||k?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}
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>`})}
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)">${I!=null?`${h(r[I].label)}: ${i(g[I])}`:""}</div>
27
+ <table style=${Ht}>
28
+ <caption>${e}</caption>
29
+ <tbody>
30
+ ${r.map((d,v)=>w`<tr><th scope="row">${h(d.label)}</th><td>${i(g[v])}</td></tr>`)}
31
+ </tbody>
32
+ </table>
33
+ </div>`}};St("nish-bar-chart",Bt);var zt=10,ms=24,fs=12,gs="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",Wt=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=vn();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=fe(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=yn(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">
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 _=this.baseline!=null&&Number.isFinite(this.baseline)?this.baseline:void 0;_!==void 0&&(c=Math.min(c,_),y=Math.max(y,_)),[c,y]=gn(c,y);let $=u[0],C=u[u.length-1]===$?$+1:u[u.length-1],m=this.width,A=me(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-fs),et=Math.max(0,s-zt-ms),I=a=>S+(a-$)/(C-$)*N,O=a=>zt+(1-(a-c)/(y-c))*et,at=zt+et,At=r.map(a=>{let p=[],E=[];for(let jt of[...a.points].sort((An,Rn)=>An.x-Rn.x))h(jt)?E.push([Number(I(jt.x).toFixed(1)),Number(O(jt.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=me($,C,v),z=this.active!=null&&this.active<u.length?this.active:null,P=z!=null?u[z]:null,k=P!=null?I(P):0,Rt=P!=null?r.map((a,p)=>({s:a,i:p,y:g[p].get(P)})).filter(a=>a.y!=null):[],Sn=k<m/2,ge=a=>{this.fromKey=!1,this.moveTo(a.clientX,a.currentTarget,u,S,N,$,C)},En=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)},ye=r[0],_e=B(ye?.tone,0),xn=m>0?w`<svg
36
+ width=${m}
37
+ height=${s}
38
+ role="img"
39
+ tabindex="0"
40
+ aria-label=${e}
41
+ style="display:block;touch-action:pan-y"
42
+ @pointerdown=${ge}
43
+ @pointermove=${ge}
44
+ @pointerleave=${a=>{a.pointerType==="mouse"&&(this.active=null)}}
45
+ @keydown=${En}
46
+ @blur=${()=>{this.fromKey&&(this.active=null)}}
47
+ >
48
+ ${this.area&&ye?T`<defs><linearGradient id=${this.gradId} x1="0" y1="0" x2="0" y2="1"><stop offset="0%" stop-color=${_e} stop-opacity="0.2"></stop><stop offset="100%" stop-color=${_e} stop-opacity="0"></stop></linearGradient></defs>`:f}
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>
52
+ </g>`)}
53
+ ${M.map((a,p)=>T`<text class="nish-chart-axis" x=${I(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
+ ${_!==void 0?T`<line x1=${S} x2=${S+N} y1=${O(_)} y2=${O(_)} 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">
58
+ <line x1=${k} x2=${k} y1=${zt} y2=${at} stroke=${D.axis} stroke-width="1"></line>
59
+ ${Rt.map(a=>T`<circle cx=${k} cy=${O(a.y)} r="4" fill=${B(a.s.tone,a.i)} stroke="var(--nish-surface)" stroke-width="2"></circle>`)}
60
+ </g>`:f}
61
+ </svg>`:f,wn=P!=null&&m>0?w`<div class="nish-chart-tooltip" style="${gs};${Sn?`left:${k+10}px`:`right:${m-k+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">
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>
67
+ </div>`)}
68
+ </div>`:f;return w`<div class="nish-chart" style="position:relative;width:100%;user-select:none">
69
+ <div style="position:relative;height:${s}px">
70
+ ${xn}${wn}
71
+ <table style=${Ht}>
72
+ <caption>${e}</caption>
73
+ <thead>
74
+ <tr>
75
+ <th scope="col">x</th>
76
+ ${r.map(a=>w`<th scope="col">${a.label}</th>`)}
77
+ </tr>
78
+ </thead>
79
+ <tbody>
80
+ ${u.slice(0,200).map(a=>w`<tr>
81
+ <th scope="row">${o(a)}</th>
82
+ ${r.map((p,E)=>w`<td>${g[E].has(a)?i(g[E].get(a)):""}</td>`)}
83
+ </tr>`)}
84
+ </tbody>
85
+ </table>
86
+ </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>`)}
89
+ </ul>`:f}
90
+ </div>`}};St("nish-line-chart",Wt);export{Bt as NishBarChart,$t as NishElement,Wt as NishLineChart,Kn as configureStrings,St as define};
91
+ /*! Bundled license information:
92
+
93
+ @lit-labs/ssr-dom-shim/lib/element-internals.js:
94
+ @lit-labs/ssr-dom-shim/lib/events.js:
95
+ (**
96
+ * @license
97
+ * Copyright 2023 Google LLC
98
+ * SPDX-License-Identifier: BSD-3-Clause
99
+ *)
100
+
101
+ @lit-labs/ssr-dom-shim/lib/css.js:
102
+ @lit-labs/ssr-dom-shim/lib/observers.js:
103
+ (**
104
+ * @license
105
+ * Copyright 2024 Google LLC
106
+ * SPDX-License-Identifier: BSD-3-Clause
107
+ *)
108
+
109
+ @lit-labs/ssr-dom-shim/index.js:
110
+ @lit/reactive-element/node/css-tag.js:
111
+ (**
112
+ * @license
113
+ * Copyright 2019 Google LLC
114
+ * SPDX-License-Identifier: BSD-3-Clause
115
+ *)
116
+
117
+ lit-html/node/lit-html.js:
118
+ lit-element/lit-element.js:
119
+ (**
120
+ * @license
121
+ * Copyright 2017 Google LLC
122
+ * SPDX-License-Identifier: BSD-3-Clause
123
+ *)
124
+
125
+ lit-html/node/is-server.js:
126
+ (**
127
+ * @license
128
+ * Copyright 2022 Google LLC
129
+ * SPDX-License-Identifier: BSD-3-Clause
130
+ *)
131
+ */
@@ -1,2 +1,166 @@
1
- // Hand-written public types for dist/elements-data.d.ts: filled in by later tasks (no lit import).
2
- export {};
1
+ // The published types of nish-ui/elements/data (copied to dist/elements-data.d.ts by
2
+ // tsup.config.ts). Hand-written so the package never imports 'lit' (a devDependency) and every
3
+ // element stays an HTMLElement for consumers. Keep it in step with the classes in this folder.
4
+
5
+ /** Base of every nish-ui element (light DOM). */
6
+ export declare class NishElement extends HTMLElement {
7
+ readonly updateComplete: Promise<boolean>;
8
+ requestUpdate(): void;
9
+ }
10
+
11
+ /** The words the custom elements show. Key names match `NishStrings` (the React side) where the
12
+ * same text exists there. */
13
+ export interface NishElementStrings {
14
+ /** nish-command-palette, nish-filter-bar: close button label. */
15
+ close: string;
16
+ /** nish-search (default placeholder and aria-label), nish-command-palette (dialog name). */
17
+ search: string;
18
+ /** nish-command-palette: input placeholder and its accessible name. */
19
+ searchPlaceholder: string;
20
+ /** nish-command-palette: nothing found. */
21
+ noResults: string;
22
+ /** nish-command-palette: listbox label. */
23
+ results: string;
24
+ /** nish-command-palette, nish-combobox: live-region text for a count of matches. */
25
+ resultCount: (count: number) => string;
26
+ /** nish-combobox: empty list. */
27
+ noMatches: string;
28
+ /** nish-combobox: loading row and live-region text. */
29
+ searching: string;
30
+ /** nish-search, nish-combobox, nish-filter-bar: clear button. */
31
+ clear: string;
32
+ /** nish-copy-button: idle label. */
33
+ copy: string;
34
+ /** nish-copy-button: label after copying. */
35
+ copied: string;
36
+ /** nish-copy-button: label while the clipboard is refused and the text is selected. */
37
+ copyManual: string;
38
+ /** nish-field: tag for a non-required field. */
39
+ optional: string;
40
+ /** nish-bottom-nav, nish-nav-rail, nish-section-nav: default landmark label. */
41
+ sections: string;
42
+ /** nish-filter-bar: sheet title and the button that opens it. */
43
+ filters: string;
44
+ /** nish-filter-bar: wide-layout clear button. */
45
+ clearFilters: string;
46
+ /** nish-filter-bar: sheet button that closes it. */
47
+ showResults: string;
48
+ /** nish-filter-bar: label of the active-filter count badge. */
49
+ activeCount: (count: number) => string;
50
+ /** nish-chip-group: remove button without a chip name. */
51
+ remove: string;
52
+ /** nish-chip-group: remove button for a named chip. */
53
+ removeNamed: (name: string) => string;
54
+ /** nish-split: divider label in a row split. */
55
+ resizeColumns: string;
56
+ /** nish-split: divider label in a column split. */
57
+ resizeRows: string;
58
+ /** nish-line-chart: legend landmark. */
59
+ legend: string;
60
+ /** nish-line-chart, nish-bar-chart: text of the empty state. */
61
+ noDataYet: string;
62
+ /** nish-line-chart, nish-bar-chart, nish-sparkline: accessible name of a chart with no data. */
63
+ noDataNamed: (label: string) => string;
64
+ /** nish-line-chart: name of a series without a label (1-based position). */
65
+ seriesNumber: (n: number) => string;
66
+ /** nish-sparkline: accessible name when no `label` is set. */
67
+ trend: string;
68
+ /** nish-theme-toggle: name of the system mode. */
69
+ themeSystem: string;
70
+ /** nish-theme-toggle: name of the light mode. */
71
+ themeLight: string;
72
+ /** nish-theme-toggle: name of the dark mode. */
73
+ themeDark: string;
74
+ }
75
+
76
+ /** Set the words the elements show, once, for the whole page (one store shared by every entry and
77
+ * every copy of the package). Keys you leave out keep their current value (English by default).
78
+ * Elements already on the page update at once. A per-element attribute (`label`, `placeholder`,
79
+ * `empty-text`, ...) always wins over a configured string. */
80
+ export declare function configureStrings(partial: Partial<NishElementStrings>): void;
81
+
82
+ /** Register a custom element unless the tag is already defined. */
83
+ export declare function define(tag: string, ctor: CustomElementConstructor): void;
84
+
85
+ export interface NishResizeDetail {
86
+ /** Each pane's share in percent, summing to 100. */
87
+ sizes: number[];
88
+ }
89
+
90
+ export interface NishCommandItem {
91
+ id: string;
92
+ label: string;
93
+ group?: string;
94
+ hint?: string;
95
+ keywords?: string[];
96
+ href?: string;
97
+ }
98
+
99
+ export interface NishCommandSelectDetail {
100
+ id: string;
101
+ }
102
+
103
+ export declare class NishTableSort extends NishElement {
104
+ /** Only fire `nish-sort` (the server sorts); the rows are not reordered. */
105
+ manual: boolean;
106
+ }
107
+
108
+ export declare class NishFilterBar extends NishElement {
109
+ activeCount: number;
110
+ sheetTitle: string;
111
+ /** `md` (default) or `lg`: the width below which the filters move into a sheet. */
112
+ sheetBelow: 'md' | 'lg';
113
+ sticky: boolean;
114
+ }
115
+
116
+ export declare class NishSplit extends NishElement {
117
+ /** `row` (default) or `column`. */
118
+ orientation: 'row' | 'column';
119
+ /** Each pane's share in percent; the attribute is a comma list: `50,50`. */
120
+ sizes: number[] | null;
121
+ /** Smallest pane length in pixels. */
122
+ min: number;
123
+ storageKey: string | null;
124
+ }
125
+
126
+ export declare class NishNavRail extends NishElement {
127
+ label: string;
128
+ }
129
+
130
+ export declare class NishScrollRow extends NishElement {
131
+ label: string;
132
+ bleed: boolean;
133
+ snap: boolean;
134
+ /** On by default; `fade="false"` turns the edge fades off. */
135
+ fade: boolean;
136
+ }
137
+
138
+ export declare class NishSectionNav extends NishElement {
139
+ label: string;
140
+ /** On by default; `sticky="false"` turns it off. */
141
+ sticky: boolean;
142
+ /** On by default; `update-hash="false"` leaves the URL alone. */
143
+ updateHash: boolean;
144
+ }
145
+
146
+ export declare class NishCommandPalette extends NishElement {
147
+ open: boolean;
148
+ hotkey: boolean;
149
+ placeholder: string;
150
+ emptyText: string;
151
+ items: NishCommandItem[];
152
+ show(): void;
153
+ close(): void;
154
+ }
155
+
156
+ declare global {
157
+ interface HTMLElementTagNameMap {
158
+ 'nish-table-sort': NishTableSort;
159
+ 'nish-filter-bar': NishFilterBar;
160
+ 'nish-split': NishSplit;
161
+ 'nish-nav-rail': NishNavRail;
162
+ 'nish-scroll-row': NishScrollRow;
163
+ 'nish-section-nav': NishSectionNav;
164
+ 'nish-command-palette': NishCommandPalette;
165
+ }
166
+ }