@boostdev/design-system-components 1.0.3 → 1.1.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 (225) hide show
  1. package/AGENTS.md +5 -5
  2. package/dist/client.cjs +236 -153
  3. package/dist/client.css +547 -483
  4. package/dist/client.d.cts +53 -94
  5. package/dist/client.d.ts +53 -94
  6. package/dist/client.js +237 -163
  7. package/dist/index.cjs +236 -153
  8. package/dist/index.css +547 -483
  9. package/dist/index.d.cts +53 -94
  10. package/dist/index.d.ts +53 -94
  11. package/dist/index.js +237 -163
  12. package/dist/native/index.cjs +991 -0
  13. package/dist/native/index.d.cts +208 -0
  14. package/dist/native/index.d.ts +208 -0
  15. package/dist/native/index.js +968 -0
  16. package/dist/web-components.d.ts +303 -0
  17. package/dist/web-components.js +1968 -0
  18. package/package.json +27 -5
  19. package/src/components/interaction/Button/Button.module.css +10 -7
  20. package/src/components/interaction/Button/Button.native.spec.tsx +35 -0
  21. package/src/components/interaction/Button/Button.native.stories.tsx +42 -0
  22. package/src/components/interaction/Button/Button.native.tsx +95 -0
  23. package/src/components/interaction/Button/Button.stories.tsx +1 -1
  24. package/src/components/interaction/Button/Button.tsx +2 -2
  25. package/src/components/interaction/Command/Command.mdx +16 -0
  26. package/src/components/interaction/Command/Command.stories.tsx +1 -1
  27. package/src/components/interaction/Command/Command.tsx +2 -2
  28. package/src/components/interaction/Dialog/Dialog.stories.tsx +1 -1
  29. package/src/components/interaction/Dialog/Dialog.tsx +2 -2
  30. package/src/components/interaction/Drawer/Drawer.mdx +14 -0
  31. package/src/components/interaction/Drawer/Drawer.stories.tsx +1 -1
  32. package/src/components/interaction/Drawer/Drawer.tsx +2 -2
  33. package/src/components/interaction/DropdownMenu/DropdownMenu.stories.tsx +1 -1
  34. package/src/components/interaction/DropdownMenu/DropdownMenu.tsx +2 -2
  35. package/src/components/interaction/Popover/Popover.mdx +17 -0
  36. package/src/components/interaction/Popover/Popover.module.css +70 -13
  37. package/src/components/interaction/Popover/Popover.spec.tsx +68 -4
  38. package/src/components/interaction/Popover/Popover.stories.tsx +1 -1
  39. package/src/components/interaction/Popover/Popover.tsx +76 -20
  40. package/src/components/interaction/Rating/Rating.stories.tsx +1 -1
  41. package/src/components/interaction/Rating/Rating.tsx +2 -2
  42. package/src/components/interaction/Toast/Toast.module.css +6 -1
  43. package/src/components/interaction/Toast/Toast.spec.tsx +21 -0
  44. package/src/components/interaction/Toast/Toast.stories.tsx +1 -1
  45. package/src/components/interaction/Toast/Toast.tsx +22 -2
  46. package/src/components/interaction/form/Checkbox/Checkbox.mdx +2 -2
  47. package/src/components/interaction/form/Checkbox/Checkbox.module.css +3 -3
  48. package/src/components/interaction/form/Checkbox/Checkbox.native.spec.tsx +42 -0
  49. package/src/components/interaction/form/Checkbox/Checkbox.native.stories.tsx +36 -0
  50. package/src/components/interaction/form/Checkbox/Checkbox.native.tsx +80 -0
  51. package/src/components/interaction/form/Checkbox/Checkbox.stories.tsx +1 -1
  52. package/src/components/interaction/form/Checkbox/Checkbox.tsx +2 -2
  53. package/src/components/interaction/form/CheckboxGroup/CheckboxGroup.mdx +44 -0
  54. package/src/components/interaction/form/CheckboxGroup/CheckboxGroup.stories.tsx +1 -1
  55. package/src/components/interaction/form/CheckboxGroup/CheckboxGroup.tsx +2 -2
  56. package/src/components/interaction/form/Combobox/Combobox.mdx +21 -0
  57. package/src/components/interaction/form/Combobox/Combobox.module.css +1 -1
  58. package/src/components/interaction/form/Combobox/Combobox.stories.tsx +1 -1
  59. package/src/components/interaction/form/Combobox/Combobox.tsx +2 -2
  60. package/src/components/interaction/form/FileInput/FileInput.mdx +14 -0
  61. package/src/components/interaction/form/FileInput/FileInput.module.css +1 -1
  62. package/src/components/interaction/form/FileInput/FileInput.stories.tsx +1 -1
  63. package/src/components/interaction/form/FileInput/FileInput.tsx +2 -2
  64. package/src/components/interaction/form/FormInput/FormInput.stories.tsx +1 -1
  65. package/src/components/interaction/form/FormInput/FormInput.tsx +2 -2
  66. package/src/components/interaction/form/NumberInput/NumberInput.mdx +16 -0
  67. package/src/components/interaction/form/NumberInput/NumberInput.stories.tsx +1 -1
  68. package/src/components/interaction/form/NumberInput/NumberInput.tsx +2 -2
  69. package/src/components/interaction/form/Radio/Radio.mdx +3 -3
  70. package/src/components/interaction/form/Radio/Radio.module.css +3 -3
  71. package/src/components/interaction/form/Radio/Radio.native.stories.tsx +46 -0
  72. package/src/components/interaction/form/Radio/Radio.native.tsx +79 -0
  73. package/src/components/interaction/form/Radio/Radio.stories.tsx +1 -1
  74. package/src/components/interaction/form/Radio/Radio.tsx +2 -2
  75. package/src/components/interaction/form/RadioGroup/RadioGroup.mdx +45 -0
  76. package/src/components/interaction/form/RadioGroup/RadioGroup.stories.tsx +1 -1
  77. package/src/components/interaction/form/RadioGroup/RadioGroup.tsx +2 -2
  78. package/src/components/interaction/form/SegmentedControl/SegmentedControl.stories.tsx +1 -1
  79. package/src/components/interaction/form/SegmentedControl/SegmentedControl.tsx +2 -2
  80. package/src/components/interaction/form/Select/Select.stories.tsx +1 -1
  81. package/src/components/interaction/form/Select/Select.tsx +2 -2
  82. package/src/components/interaction/form/Slider/Slider.mdx +1 -1
  83. package/src/components/interaction/form/Slider/Slider.module.css +4 -4
  84. package/src/components/interaction/form/Slider/Slider.stories.tsx +1 -1
  85. package/src/components/interaction/form/Slider/Slider.tsx +2 -2
  86. package/src/components/interaction/form/Switch/Switch.mdx +4 -4
  87. package/src/components/interaction/form/Switch/Switch.module.css +3 -3
  88. package/src/components/interaction/form/Switch/Switch.native.spec.tsx +60 -0
  89. package/src/components/interaction/form/Switch/Switch.native.stories.tsx +35 -0
  90. package/src/components/interaction/form/Switch/Switch.native.tsx +59 -0
  91. package/src/components/interaction/form/Switch/Switch.stories.tsx +1 -1
  92. package/src/components/interaction/form/Switch/Switch.tsx +2 -2
  93. package/src/components/interaction/form/Textarea/Textarea.mdx +17 -0
  94. package/src/components/interaction/form/Textarea/Textarea.stories.tsx +1 -1
  95. package/src/components/interaction/form/Textarea/Textarea.tsx +2 -2
  96. package/src/components/interaction/form/atoms/InputContainer.tsx +2 -1
  97. package/src/components/interaction/form/atoms/Label.native.stories.tsx +18 -0
  98. package/src/components/interaction/form/atoms/Label.native.tsx +29 -0
  99. package/src/components/interaction/form/atoms/Label.tsx +5 -3
  100. package/src/components/interaction/form/atoms/Message.native.spec.tsx +30 -0
  101. package/src/components/interaction/form/atoms/Message.native.stories.tsx +22 -0
  102. package/src/components/interaction/form/atoms/Message.native.tsx +34 -0
  103. package/src/components/interaction/form/atoms/Message.tsx +5 -3
  104. package/src/components/layout/ButtonGroup/ButtonGroup.native.stories.tsx +50 -0
  105. package/src/components/layout/ButtonGroup/ButtonGroup.native.tsx +34 -0
  106. package/src/components/layout/ButtonGroup/ButtonGroup.stories.tsx +1 -1
  107. package/src/components/layout/ButtonGroup/ButtonGroup.tsx +2 -2
  108. package/src/components/layout/Card/Card.native.stories.tsx +53 -0
  109. package/src/components/layout/Card/Card.native.tsx +89 -0
  110. package/src/components/layout/Card/Card.stories.tsx +1 -1
  111. package/src/components/layout/Card/Card.tsx +2 -2
  112. package/src/components/layout/IconWrapper/IconWrapper.mdx +2 -2
  113. package/src/components/layout/IconWrapper/IconWrapper.native.spec.tsx +39 -0
  114. package/src/components/layout/IconWrapper/IconWrapper.native.stories.tsx +41 -0
  115. package/src/components/layout/IconWrapper/IconWrapper.native.tsx +20 -0
  116. package/src/components/layout/IconWrapper/IconWrapper.stories.tsx +1 -1
  117. package/src/components/layout/IconWrapper/IconWrapper.tsx +2 -2
  118. package/src/components/layout/SectionHeader/SectionHeader.mdx +13 -0
  119. package/src/components/layout/SectionHeader/SectionHeader.native.stories.tsx +38 -0
  120. package/src/components/layout/SectionHeader/SectionHeader.native.tsx +79 -0
  121. package/src/components/layout/SectionHeader/SectionHeader.stories.tsx +1 -1
  122. package/src/components/layout/SectionHeader/SectionHeader.tsx +2 -2
  123. package/src/components/ui/Accordion/Accordion.mdx +14 -0
  124. package/src/components/ui/Accordion/Accordion.stories.tsx +1 -1
  125. package/src/components/ui/Accordion/Accordion.tsx +2 -2
  126. package/src/components/ui/Alert/Alert.native.stories.tsx +43 -0
  127. package/src/components/ui/Alert/Alert.native.tsx +94 -0
  128. package/src/components/ui/Alert/Alert.stories.tsx +1 -1
  129. package/src/components/ui/Alert/Alert.tsx +2 -2
  130. package/src/components/ui/Avatar/Avatar.native.spec.tsx +47 -0
  131. package/src/components/ui/Avatar/Avatar.native.stories.tsx +34 -0
  132. package/src/components/ui/Avatar/Avatar.native.tsx +85 -0
  133. package/src/components/ui/Avatar/Avatar.stories.tsx +1 -1
  134. package/src/components/ui/Avatar/Avatar.tsx +2 -2
  135. package/src/components/ui/Badge/Badge.mdx +2 -2
  136. package/src/components/ui/Badge/Badge.native.stories.tsx +36 -0
  137. package/src/components/ui/Badge/Badge.native.tsx +50 -0
  138. package/src/components/ui/Badge/Badge.stories.tsx +1 -1
  139. package/src/components/ui/Badge/Badge.tsx +2 -2
  140. package/src/components/ui/Breadcrumb/Breadcrumb.stories.tsx +1 -1
  141. package/src/components/ui/Breadcrumb/Breadcrumb.tsx +2 -2
  142. package/src/components/ui/Calendar/Calendar.mdx +16 -0
  143. package/src/components/ui/Calendar/Calendar.stories.tsx +1 -1
  144. package/src/components/ui/Calendar/Calendar.tsx +2 -2
  145. package/src/components/ui/Carousel/Carousel.stories.tsx +1 -1
  146. package/src/components/ui/Carousel/Carousel.tsx +2 -2
  147. package/src/components/ui/Collapsible/Collapsible.stories.tsx +1 -1
  148. package/src/components/ui/Collapsible/Collapsible.tsx +2 -2
  149. package/src/components/ui/DescriptionList/DescriptionList.stories.tsx +1 -1
  150. package/src/components/ui/DescriptionList/DescriptionList.tsx +2 -2
  151. package/src/components/ui/Link/Link.mdx +14 -0
  152. package/src/components/ui/Link/Link.stories.tsx +1 -1
  153. package/src/components/ui/Link/Link.tsx +2 -2
  154. package/src/components/ui/Loading/Loading.native.spec.tsx +24 -0
  155. package/src/components/ui/Loading/Loading.native.stories.tsx +33 -0
  156. package/src/components/ui/Loading/Loading.native.tsx +29 -0
  157. package/src/components/ui/Loading/Loading.stories.tsx +1 -1
  158. package/src/components/ui/Loading/Loading.tsx +2 -2
  159. package/src/components/ui/NotificationBanner/NotificationBanner.native.stories.tsx +39 -0
  160. package/src/components/ui/NotificationBanner/NotificationBanner.native.tsx +76 -0
  161. package/src/components/ui/NotificationBanner/NotificationBanner.stories.tsx +1 -1
  162. package/src/components/ui/NotificationBanner/NotificationBanner.tsx +2 -2
  163. package/src/components/ui/Pagination/Pagination.module.css +1 -1
  164. package/src/components/ui/Pagination/Pagination.stories.tsx +1 -1
  165. package/src/components/ui/Pagination/Pagination.tsx +2 -2
  166. package/src/components/ui/Progress/Progress.mdx +1 -1
  167. package/src/components/ui/Progress/Progress.module.css +1 -1
  168. package/src/components/ui/Progress/Progress.native.stories.tsx +34 -0
  169. package/src/components/ui/Progress/Progress.native.tsx +84 -0
  170. package/src/components/ui/Progress/Progress.stories.tsx +1 -1
  171. package/src/components/ui/Progress/Progress.tsx +2 -2
  172. package/src/components/ui/ProgressCircle/ProgressCircle.module.css +1 -1
  173. package/src/components/ui/ProgressCircle/ProgressCircle.stories.tsx +1 -1
  174. package/src/components/ui/ProgressCircle/ProgressCircle.tsx +2 -2
  175. package/src/components/ui/Separator/Separator.mdx +14 -0
  176. package/src/components/ui/Separator/Separator.native.stories.tsx +42 -0
  177. package/src/components/ui/Separator/Separator.native.tsx +32 -0
  178. package/src/components/ui/Separator/Separator.stories.tsx +1 -1
  179. package/src/components/ui/Separator/Separator.tsx +2 -2
  180. package/src/components/ui/Skeleton/Skeleton.native.stories.tsx +33 -0
  181. package/src/components/ui/Skeleton/Skeleton.native.tsx +41 -0
  182. package/src/components/ui/Skeleton/Skeleton.stories.tsx +1 -1
  183. package/src/components/ui/Skeleton/Skeleton.tsx +2 -3
  184. package/src/components/ui/SkipLink/SkipLink.stories.tsx +1 -1
  185. package/src/components/ui/SkipLink/SkipLink.tsx +5 -3
  186. package/src/components/ui/Table/Table.mdx +14 -0
  187. package/src/components/ui/Table/Table.stories.tsx +1 -1
  188. package/src/components/ui/Table/Table.tsx +2 -2
  189. package/src/components/ui/Tabs/Tabs.stories.tsx +1 -1
  190. package/src/components/ui/Tabs/Tabs.tsx +2 -2
  191. package/src/components/ui/Tooltip/Tooltip.mdx +14 -0
  192. package/src/components/ui/Tooltip/Tooltip.stories.tsx +1 -1
  193. package/src/components/ui/Tooltip/Tooltip.tsx +2 -2
  194. package/src/components/ui/Typography/Typography.mdx +13 -0
  195. package/src/components/ui/Typography/Typography.native.stories.tsx +38 -0
  196. package/src/components/ui/Typography/Typography.native.tsx +65 -0
  197. package/src/components/ui/Typography/Typography.stories.tsx +1 -1
  198. package/src/components/ui/Typography/Typography.tsx +2 -2
  199. package/src/css/bdc.css +8 -0
  200. package/src/index.ts +1 -0
  201. package/src/native/ThemeContext.tsx +28 -0
  202. package/src/native/tokens.ts +13 -0
  203. package/src/native.ts +39 -0
  204. package/src/react-augment.d.ts +13 -0
  205. package/src/stories/DesignSystem/DarkMode.mdx +130 -0
  206. package/src/types.ts +2 -0
  207. package/src/typings.d.ts +3 -0
  208. package/src/web-components/globals.ts +61 -0
  209. package/src/web-components/index.ts +12 -0
  210. package/src/web-components/interaction/BdsButton.stories.tsx +60 -0
  211. package/src/web-components/interaction/BdsPopover.stories.tsx +70 -0
  212. package/src/web-components/interaction/BdsToastProvider.stories.tsx +73 -0
  213. package/src/web-components/interaction/bds-button.spec.ts +95 -0
  214. package/src/web-components/interaction/bds-button.ts +293 -0
  215. package/src/web-components/interaction/bds-popover.spec.ts +126 -0
  216. package/src/web-components/interaction/bds-popover.ts +217 -0
  217. package/src/web-components/interaction/bds-toast-provider.spec.ts +122 -0
  218. package/src/web-components/interaction/bds-toast-provider.ts +211 -0
  219. package/src/web-components/test/helpers.ts +14 -0
  220. package/src/web-components/ui/BdsAlert.stories.tsx +60 -0
  221. package/src/web-components/ui/BdsBadge.stories.tsx +37 -0
  222. package/src/web-components/ui/bds-alert.spec.ts +109 -0
  223. package/src/web-components/ui/bds-alert.ts +209 -0
  224. package/src/web-components/ui/bds-badge.spec.ts +51 -0
  225. package/src/web-components/ui/bds-badge.ts +88 -0
@@ -0,0 +1,1968 @@
1
+ // node_modules/.pnpm/@lit-labs+ssr-dom-shim@1.5.1/node_modules/@lit-labs/ssr-dom-shim/lib/element-internals.js
2
+ var ElementInternalsShim = class ElementInternals {
3
+ get shadowRoot() {
4
+ return this.__host.__shadowRoot;
5
+ }
6
+ constructor(_host) {
7
+ this.ariaActiveDescendantElement = null;
8
+ this.ariaAtomic = "";
9
+ this.ariaAutoComplete = "";
10
+ this.ariaBrailleLabel = "";
11
+ this.ariaBrailleRoleDescription = "";
12
+ this.ariaBusy = "";
13
+ this.ariaChecked = "";
14
+ this.ariaColCount = "";
15
+ this.ariaColIndex = "";
16
+ this.ariaColIndexText = "";
17
+ this.ariaColSpan = "";
18
+ this.ariaControlsElements = null;
19
+ this.ariaCurrent = "";
20
+ this.ariaDescribedByElements = null;
21
+ this.ariaDescription = "";
22
+ this.ariaDetailsElements = null;
23
+ this.ariaDisabled = "";
24
+ this.ariaErrorMessageElements = null;
25
+ this.ariaExpanded = "";
26
+ this.ariaFlowToElements = null;
27
+ this.ariaHasPopup = "";
28
+ this.ariaHidden = "";
29
+ this.ariaInvalid = "";
30
+ this.ariaKeyShortcuts = "";
31
+ this.ariaLabel = "";
32
+ this.ariaLabelledByElements = null;
33
+ this.ariaLevel = "";
34
+ this.ariaLive = "";
35
+ this.ariaModal = "";
36
+ this.ariaMultiLine = "";
37
+ this.ariaMultiSelectable = "";
38
+ this.ariaOrientation = "";
39
+ this.ariaOwnsElements = null;
40
+ this.ariaPlaceholder = "";
41
+ this.ariaPosInSet = "";
42
+ this.ariaPressed = "";
43
+ this.ariaReadOnly = "";
44
+ this.ariaRelevant = "";
45
+ this.ariaRequired = "";
46
+ this.ariaRoleDescription = "";
47
+ this.ariaRowCount = "";
48
+ this.ariaRowIndex = "";
49
+ this.ariaRowIndexText = "";
50
+ this.ariaRowSpan = "";
51
+ this.ariaSelected = "";
52
+ this.ariaSetSize = "";
53
+ this.ariaSort = "";
54
+ this.ariaValueMax = "";
55
+ this.ariaValueMin = "";
56
+ this.ariaValueNow = "";
57
+ this.ariaValueText = "";
58
+ this.role = "";
59
+ this.form = null;
60
+ this.labels = [];
61
+ this.states = /* @__PURE__ */ new Set();
62
+ this.validationMessage = "";
63
+ this.validity = {};
64
+ this.willValidate = true;
65
+ this.__host = _host;
66
+ }
67
+ checkValidity() {
68
+ console.warn("`ElementInternals.checkValidity()` was called on the server.This method always returns true.");
69
+ return true;
70
+ }
71
+ reportValidity() {
72
+ return true;
73
+ }
74
+ setFormValue() {
75
+ }
76
+ setValidity() {
77
+ }
78
+ };
79
+
80
+ // node_modules/.pnpm/@lit-labs+ssr-dom-shim@1.5.1/node_modules/@lit-labs/ssr-dom-shim/lib/events.js
81
+ var __classPrivateFieldSet = function(receiver, state, value, kind, f3) {
82
+ if (kind === "m") throw new TypeError("Private method is not writable");
83
+ if (kind === "a" && !f3) throw new TypeError("Private accessor was defined without a setter");
84
+ if (typeof state === "function" ? receiver !== state || !f3 : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
85
+ return kind === "a" ? f3.call(receiver, value) : f3 ? f3.value = value : state.set(receiver, value), value;
86
+ };
87
+ var __classPrivateFieldGet = function(receiver, state, kind, f3) {
88
+ if (kind === "a" && !f3) throw new TypeError("Private accessor was defined without a getter");
89
+ if (typeof state === "function" ? receiver !== state || !f3 : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
90
+ return kind === "m" ? f3 : kind === "a" ? f3.call(receiver) : f3 ? f3.value : state.get(receiver);
91
+ };
92
+ var _Event_cancelable;
93
+ var _Event_bubbles;
94
+ var _Event_composed;
95
+ var _Event_defaultPrevented;
96
+ var _Event_timestamp;
97
+ var _Event_propagationStopped;
98
+ var _Event_type;
99
+ var _Event_target;
100
+ var _Event_isBeingDispatched;
101
+ var _a;
102
+ var _CustomEvent_detail;
103
+ var _b;
104
+ var isCaptureEventListener = (options) => typeof options === "boolean" ? options : options?.capture ?? false;
105
+ var NONE = 0;
106
+ var CAPTURING_PHASE = 1;
107
+ var AT_TARGET = 2;
108
+ var BUBBLING_PHASE = 3;
109
+ var EventTarget = class {
110
+ constructor() {
111
+ this.__eventListeners = /* @__PURE__ */ new Map();
112
+ this.__captureEventListeners = /* @__PURE__ */ new Map();
113
+ }
114
+ addEventListener(type, callback, options) {
115
+ if (callback === void 0 || callback === null) {
116
+ return;
117
+ }
118
+ const eventListenersMap = isCaptureEventListener(options) ? this.__captureEventListeners : this.__eventListeners;
119
+ let eventListeners = eventListenersMap.get(type);
120
+ if (eventListeners === void 0) {
121
+ eventListeners = /* @__PURE__ */ new Map();
122
+ eventListenersMap.set(type, eventListeners);
123
+ } else if (eventListeners.has(callback)) {
124
+ return;
125
+ }
126
+ const normalizedOptions = typeof options === "object" && options ? options : {};
127
+ normalizedOptions.signal?.addEventListener("abort", () => this.removeEventListener(type, callback, options));
128
+ eventListeners.set(callback, normalizedOptions ?? {});
129
+ }
130
+ removeEventListener(type, callback, options) {
131
+ if (callback === void 0 || callback === null) {
132
+ return;
133
+ }
134
+ const eventListenersMap = isCaptureEventListener(options) ? this.__captureEventListeners : this.__eventListeners;
135
+ const eventListeners = eventListenersMap.get(type);
136
+ if (eventListeners !== void 0) {
137
+ eventListeners.delete(callback);
138
+ if (!eventListeners.size) {
139
+ eventListenersMap.delete(type);
140
+ }
141
+ }
142
+ }
143
+ dispatchEvent(event) {
144
+ const composedPath = [this];
145
+ let parent = this.__eventTargetParent;
146
+ if (event.composed) {
147
+ while (parent) {
148
+ composedPath.push(parent);
149
+ parent = parent.__eventTargetParent;
150
+ }
151
+ } else {
152
+ while (parent && parent !== this.__host) {
153
+ composedPath.push(parent);
154
+ parent = parent.__eventTargetParent;
155
+ }
156
+ }
157
+ let stopPropagation = false;
158
+ let stopImmediatePropagation = false;
159
+ let eventPhase = NONE;
160
+ let target = null;
161
+ let tmpTarget = null;
162
+ let currentTarget = null;
163
+ const originalStopPropagation = event.stopPropagation;
164
+ const originalStopImmediatePropagation = event.stopImmediatePropagation;
165
+ Object.defineProperties(event, {
166
+ target: {
167
+ get() {
168
+ return target ?? tmpTarget;
169
+ },
170
+ ...enumerableProperty
171
+ },
172
+ srcElement: {
173
+ get() {
174
+ return event.target;
175
+ },
176
+ ...enumerableProperty
177
+ },
178
+ currentTarget: {
179
+ get() {
180
+ return currentTarget;
181
+ },
182
+ ...enumerableProperty
183
+ },
184
+ eventPhase: {
185
+ get() {
186
+ return eventPhase;
187
+ },
188
+ ...enumerableProperty
189
+ },
190
+ composedPath: {
191
+ value: () => composedPath,
192
+ ...enumerableProperty
193
+ },
194
+ stopPropagation: {
195
+ value: () => {
196
+ stopPropagation = true;
197
+ originalStopPropagation.call(event);
198
+ },
199
+ ...enumerableProperty
200
+ },
201
+ stopImmediatePropagation: {
202
+ value: () => {
203
+ stopImmediatePropagation = true;
204
+ originalStopImmediatePropagation.call(event);
205
+ },
206
+ ...enumerableProperty
207
+ }
208
+ });
209
+ const invokeEventListener = (listener, options, eventListenerMap) => {
210
+ if (typeof listener === "function") {
211
+ listener(event);
212
+ } else if (typeof listener?.handleEvent === "function") {
213
+ listener.handleEvent(event);
214
+ }
215
+ if (options.once) {
216
+ eventListenerMap.delete(listener);
217
+ }
218
+ };
219
+ const finishDispatch = () => {
220
+ currentTarget = null;
221
+ eventPhase = NONE;
222
+ return !event.defaultPrevented;
223
+ };
224
+ const captureEventPath = composedPath.slice().reverse();
225
+ target = !this.__host || !event.composed ? this : null;
226
+ const retarget = (eventTargets) => {
227
+ tmpTarget = this;
228
+ while (tmpTarget.__host && eventTargets.includes(tmpTarget.__host)) {
229
+ tmpTarget = tmpTarget.__host;
230
+ }
231
+ };
232
+ for (const eventTarget of captureEventPath) {
233
+ if (!target && (!tmpTarget || tmpTarget === eventTarget.__host)) {
234
+ retarget(captureEventPath.slice(captureEventPath.indexOf(eventTarget)));
235
+ }
236
+ currentTarget = eventTarget;
237
+ eventPhase = eventTarget === event.target ? AT_TARGET : CAPTURING_PHASE;
238
+ const captureEventListeners = eventTarget.__captureEventListeners.get(event.type);
239
+ if (captureEventListeners) {
240
+ for (const [listener, options] of captureEventListeners) {
241
+ invokeEventListener(listener, options, captureEventListeners);
242
+ if (stopImmediatePropagation) {
243
+ return finishDispatch();
244
+ }
245
+ }
246
+ }
247
+ if (stopPropagation) {
248
+ return finishDispatch();
249
+ }
250
+ }
251
+ const bubbleEventPath = event.bubbles ? composedPath : [this];
252
+ tmpTarget = null;
253
+ for (const eventTarget of bubbleEventPath) {
254
+ if (!target && (!tmpTarget || eventTarget === tmpTarget.__host)) {
255
+ retarget(bubbleEventPath.slice(0, bubbleEventPath.indexOf(eventTarget) + 1));
256
+ }
257
+ currentTarget = eventTarget;
258
+ eventPhase = eventTarget === event.target ? AT_TARGET : BUBBLING_PHASE;
259
+ const captureEventListeners = eventTarget.__eventListeners.get(event.type);
260
+ if (captureEventListeners) {
261
+ for (const [listener, options] of captureEventListeners) {
262
+ invokeEventListener(listener, options, captureEventListeners);
263
+ if (stopImmediatePropagation) {
264
+ return finishDispatch();
265
+ }
266
+ }
267
+ }
268
+ if (stopPropagation) {
269
+ return finishDispatch();
270
+ }
271
+ }
272
+ return finishDispatch();
273
+ }
274
+ };
275
+ var EventTargetShimWithRealType = EventTarget;
276
+ var enumerableProperty = { __proto__: null };
277
+ enumerableProperty.enumerable = true;
278
+ Object.freeze(enumerableProperty);
279
+ var EventShim = (_a = class Event {
280
+ constructor(type, options = {}) {
281
+ _Event_cancelable.set(this, false);
282
+ _Event_bubbles.set(this, false);
283
+ _Event_composed.set(this, false);
284
+ _Event_defaultPrevented.set(this, false);
285
+ _Event_timestamp.set(this, Date.now());
286
+ _Event_propagationStopped.set(this, false);
287
+ _Event_type.set(this, void 0);
288
+ _Event_target.set(this, void 0);
289
+ _Event_isBeingDispatched.set(this, void 0);
290
+ this.NONE = NONE;
291
+ this.CAPTURING_PHASE = CAPTURING_PHASE;
292
+ this.AT_TARGET = AT_TARGET;
293
+ this.BUBBLING_PHASE = BUBBLING_PHASE;
294
+ if (arguments.length === 0)
295
+ throw new Error(`The type argument must be specified`);
296
+ if (typeof options !== "object" || !options) {
297
+ throw new Error(`The "options" argument must be an object`);
298
+ }
299
+ const { bubbles, cancelable, composed } = options;
300
+ __classPrivateFieldSet(this, _Event_cancelable, !!cancelable, "f");
301
+ __classPrivateFieldSet(this, _Event_bubbles, !!bubbles, "f");
302
+ __classPrivateFieldSet(this, _Event_composed, !!composed, "f");
303
+ __classPrivateFieldSet(this, _Event_type, `${type}`, "f");
304
+ __classPrivateFieldSet(this, _Event_target, null, "f");
305
+ __classPrivateFieldSet(this, _Event_isBeingDispatched, false, "f");
306
+ }
307
+ initEvent(_type, _bubbles, _cancelable) {
308
+ throw new Error("Method not implemented.");
309
+ }
310
+ stopImmediatePropagation() {
311
+ this.stopPropagation();
312
+ }
313
+ preventDefault() {
314
+ __classPrivateFieldSet(this, _Event_defaultPrevented, true, "f");
315
+ }
316
+ get target() {
317
+ return __classPrivateFieldGet(this, _Event_target, "f");
318
+ }
319
+ get currentTarget() {
320
+ return __classPrivateFieldGet(this, _Event_target, "f");
321
+ }
322
+ get srcElement() {
323
+ return __classPrivateFieldGet(this, _Event_target, "f");
324
+ }
325
+ get type() {
326
+ return __classPrivateFieldGet(this, _Event_type, "f");
327
+ }
328
+ get cancelable() {
329
+ return __classPrivateFieldGet(this, _Event_cancelable, "f");
330
+ }
331
+ get defaultPrevented() {
332
+ return __classPrivateFieldGet(this, _Event_cancelable, "f") && __classPrivateFieldGet(this, _Event_defaultPrevented, "f");
333
+ }
334
+ get timeStamp() {
335
+ return __classPrivateFieldGet(this, _Event_timestamp, "f");
336
+ }
337
+ composedPath() {
338
+ return __classPrivateFieldGet(this, _Event_isBeingDispatched, "f") ? [__classPrivateFieldGet(this, _Event_target, "f")] : [];
339
+ }
340
+ get returnValue() {
341
+ return !__classPrivateFieldGet(this, _Event_cancelable, "f") || !__classPrivateFieldGet(this, _Event_defaultPrevented, "f");
342
+ }
343
+ get bubbles() {
344
+ return __classPrivateFieldGet(this, _Event_bubbles, "f");
345
+ }
346
+ get composed() {
347
+ return __classPrivateFieldGet(this, _Event_composed, "f");
348
+ }
349
+ get eventPhase() {
350
+ return __classPrivateFieldGet(this, _Event_isBeingDispatched, "f") ? _a.AT_TARGET : _a.NONE;
351
+ }
352
+ get cancelBubble() {
353
+ return __classPrivateFieldGet(this, _Event_propagationStopped, "f");
354
+ }
355
+ set cancelBubble(value) {
356
+ if (value) {
357
+ __classPrivateFieldSet(this, _Event_propagationStopped, true, "f");
358
+ }
359
+ }
360
+ stopPropagation() {
361
+ __classPrivateFieldSet(this, _Event_propagationStopped, true, "f");
362
+ }
363
+ get isTrusted() {
364
+ return false;
365
+ }
366
+ }, _Event_cancelable = /* @__PURE__ */ new WeakMap(), _Event_bubbles = /* @__PURE__ */ new WeakMap(), _Event_composed = /* @__PURE__ */ new WeakMap(), _Event_defaultPrevented = /* @__PURE__ */ new WeakMap(), _Event_timestamp = /* @__PURE__ */ new WeakMap(), _Event_propagationStopped = /* @__PURE__ */ new WeakMap(), _Event_type = /* @__PURE__ */ new WeakMap(), _Event_target = /* @__PURE__ */ new WeakMap(), _Event_isBeingDispatched = /* @__PURE__ */ new WeakMap(), _a.NONE = NONE, _a.CAPTURING_PHASE = CAPTURING_PHASE, _a.AT_TARGET = AT_TARGET, _a.BUBBLING_PHASE = BUBBLING_PHASE, _a);
367
+ Object.defineProperties(EventShim.prototype, {
368
+ initEvent: enumerableProperty,
369
+ stopImmediatePropagation: enumerableProperty,
370
+ preventDefault: enumerableProperty,
371
+ target: enumerableProperty,
372
+ currentTarget: enumerableProperty,
373
+ srcElement: enumerableProperty,
374
+ type: enumerableProperty,
375
+ cancelable: enumerableProperty,
376
+ defaultPrevented: enumerableProperty,
377
+ timeStamp: enumerableProperty,
378
+ composedPath: enumerableProperty,
379
+ returnValue: enumerableProperty,
380
+ bubbles: enumerableProperty,
381
+ composed: enumerableProperty,
382
+ eventPhase: enumerableProperty,
383
+ cancelBubble: enumerableProperty,
384
+ stopPropagation: enumerableProperty,
385
+ isTrusted: enumerableProperty
386
+ });
387
+ var CustomEventShim = (_b = class CustomEvent2 extends EventShim {
388
+ constructor(type, options = {}) {
389
+ super(type, options);
390
+ _CustomEvent_detail.set(this, void 0);
391
+ __classPrivateFieldSet(this, _CustomEvent_detail, options?.detail ?? null, "f");
392
+ }
393
+ initCustomEvent(_type, _bubbles, _cancelable, _detail) {
394
+ throw new Error("Method not implemented.");
395
+ }
396
+ get detail() {
397
+ return __classPrivateFieldGet(this, _CustomEvent_detail, "f");
398
+ }
399
+ }, _CustomEvent_detail = /* @__PURE__ */ new WeakMap(), _b);
400
+ Object.defineProperties(CustomEventShim.prototype, {
401
+ detail: enumerableProperty
402
+ });
403
+ var EventShimWithRealType = EventShim;
404
+ var CustomEventShimWithRealType = CustomEventShim;
405
+
406
+ // node_modules/.pnpm/@lit-labs+ssr-dom-shim@1.5.1/node_modules/@lit-labs/ssr-dom-shim/lib/css.js
407
+ var _a2;
408
+ var CSSRuleShim = (_a2 = class CSSRule {
409
+ constructor() {
410
+ this.STYLE_RULE = 1;
411
+ this.CHARSET_RULE = 2;
412
+ this.IMPORT_RULE = 3;
413
+ this.MEDIA_RULE = 4;
414
+ this.FONT_FACE_RULE = 5;
415
+ this.PAGE_RULE = 6;
416
+ this.NAMESPACE_RULE = 10;
417
+ this.KEYFRAMES_RULE = 7;
418
+ this.KEYFRAME_RULE = 8;
419
+ this.SUPPORTS_RULE = 12;
420
+ this.COUNTER_STYLE_RULE = 11;
421
+ this.FONT_FEATURE_VALUES_RULE = 14;
422
+ this.__parentStyleSheet = null;
423
+ this.cssText = "";
424
+ }
425
+ get parentRule() {
426
+ return null;
427
+ }
428
+ get parentStyleSheet() {
429
+ return this.__parentStyleSheet;
430
+ }
431
+ get type() {
432
+ return 0;
433
+ }
434
+ }, _a2.STYLE_RULE = 1, _a2.CHARSET_RULE = 2, _a2.IMPORT_RULE = 3, _a2.MEDIA_RULE = 4, _a2.FONT_FACE_RULE = 5, _a2.PAGE_RULE = 6, _a2.NAMESPACE_RULE = 10, _a2.KEYFRAMES_RULE = 7, _a2.KEYFRAME_RULE = 8, _a2.SUPPORTS_RULE = 12, _a2.COUNTER_STYLE_RULE = 11, _a2.FONT_FEATURE_VALUES_RULE = 14, _a2);
435
+
436
+ // node_modules/.pnpm/@lit-labs+ssr-dom-shim@1.5.1/node_modules/@lit-labs/ssr-dom-shim/index.js
437
+ globalThis.Event ??= EventShimWithRealType;
438
+ globalThis.CustomEvent ??= CustomEventShimWithRealType;
439
+ var attributes = /* @__PURE__ */ new WeakMap();
440
+ var attributesForElement = (element) => {
441
+ let attrs = attributes.get(element);
442
+ if (attrs === void 0) {
443
+ attributes.set(element, attrs = /* @__PURE__ */ new Map());
444
+ }
445
+ return attrs;
446
+ };
447
+ var ElementShim = class Element extends EventTargetShimWithRealType {
448
+ constructor() {
449
+ super(...arguments);
450
+ this.__shadowRootMode = null;
451
+ this.__shadowRoot = null;
452
+ this.__internals = null;
453
+ }
454
+ get attributes() {
455
+ return Array.from(attributesForElement(this)).map(([name, value]) => ({
456
+ name,
457
+ value
458
+ }));
459
+ }
460
+ get shadowRoot() {
461
+ if (this.__shadowRootMode === "closed") {
462
+ return null;
463
+ }
464
+ return this.__shadowRoot;
465
+ }
466
+ get localName() {
467
+ return this.constructor.__localName;
468
+ }
469
+ get tagName() {
470
+ return this.localName?.toUpperCase();
471
+ }
472
+ setAttribute(name, value) {
473
+ attributesForElement(this).set(name, String(value));
474
+ }
475
+ removeAttribute(name) {
476
+ attributesForElement(this).delete(name);
477
+ }
478
+ toggleAttribute(name, force) {
479
+ if (this.hasAttribute(name)) {
480
+ if (force === void 0 || !force) {
481
+ this.removeAttribute(name);
482
+ return false;
483
+ }
484
+ } else {
485
+ if (force === void 0 || force) {
486
+ this.setAttribute(name, "");
487
+ return true;
488
+ } else {
489
+ return false;
490
+ }
491
+ }
492
+ return true;
493
+ }
494
+ hasAttribute(name) {
495
+ return attributesForElement(this).has(name);
496
+ }
497
+ attachShadow(init) {
498
+ const shadowRoot = { host: this };
499
+ this.__shadowRootMode = init.mode;
500
+ if (init && init.mode === "open") {
501
+ this.__shadowRoot = shadowRoot;
502
+ }
503
+ return shadowRoot;
504
+ }
505
+ attachInternals() {
506
+ if (this.__internals !== null) {
507
+ throw new Error(`Failed to execute 'attachInternals' on 'HTMLElement': ElementInternals for the specified element was already attached.`);
508
+ }
509
+ const internals = new ElementInternalsShim(this);
510
+ this.__internals = internals;
511
+ return internals;
512
+ }
513
+ getAttribute(name) {
514
+ const value = attributesForElement(this).get(name);
515
+ return value ?? null;
516
+ }
517
+ };
518
+ var HTMLElementShim = class HTMLElement extends ElementShim {
519
+ };
520
+ var HTMLElementShimWithRealType = HTMLElementShim;
521
+ globalThis.litServerRoot ??= Object.defineProperty(new HTMLElementShimWithRealType(), "localName", {
522
+ // Patch localName (and tagName) to return a unique name.
523
+ get() {
524
+ return "lit-server-root";
525
+ }
526
+ });
527
+ function promiseWithResolvers() {
528
+ let resolve;
529
+ let reject;
530
+ const promise = new Promise((res, rej) => {
531
+ resolve = res;
532
+ reject = rej;
533
+ });
534
+ return { promise, resolve, reject };
535
+ }
536
+ var CustomElementRegistry = class {
537
+ constructor() {
538
+ this.__definitions = /* @__PURE__ */ new Map();
539
+ this.__reverseDefinitions = /* @__PURE__ */ new Map();
540
+ this.__pendingWhenDefineds = /* @__PURE__ */ new Map();
541
+ }
542
+ define(name, ctor) {
543
+ if (this.__definitions.has(name)) {
544
+ if (process.env.NODE_ENV === "development") {
545
+ console.warn(`'CustomElementRegistry' already has "${name}" defined. This may have been caused by live reload or hot module replacement in which case it can be safely ignored.
546
+ Make sure to test your application with a production build as repeat registrations will throw in production.`);
547
+ } else {
548
+ throw new Error(`Failed to execute 'define' on 'CustomElementRegistry': the name "${name}" has already been used with this registry`);
549
+ }
550
+ }
551
+ if (this.__reverseDefinitions.has(ctor)) {
552
+ 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(ctor)}`);
553
+ }
554
+ ctor.__localName = name;
555
+ this.__definitions.set(name, {
556
+ ctor,
557
+ // Note it's important we read `observedAttributes` in case it is a getter
558
+ // with side-effects, as is the case in Lit, where it triggers class
559
+ // finalization.
560
+ //
561
+ // TODO(aomarks) To be spec compliant, we should also capture the
562
+ // registration-time lifecycle methods like `connectedCallback`. For them
563
+ // to be actually accessible to e.g. the Lit SSR element renderer, though,
564
+ // we'd need to introduce a new API for accessing them (since `get` only
565
+ // returns the constructor).
566
+ observedAttributes: ctor.observedAttributes ?? []
567
+ });
568
+ this.__reverseDefinitions.set(ctor, name);
569
+ this.__pendingWhenDefineds.get(name)?.resolve(ctor);
570
+ this.__pendingWhenDefineds.delete(name);
571
+ }
572
+ get(name) {
573
+ const definition = this.__definitions.get(name);
574
+ return definition?.ctor;
575
+ }
576
+ getName(ctor) {
577
+ return this.__reverseDefinitions.get(ctor) ?? null;
578
+ }
579
+ upgrade(_element) {
580
+ throw new Error(`customElements.upgrade is not currently supported in SSR. Please file a bug if you need it.`);
581
+ }
582
+ async whenDefined(name) {
583
+ const definition = this.__definitions.get(name);
584
+ if (definition) {
585
+ return definition.ctor;
586
+ }
587
+ let withResolvers = this.__pendingWhenDefineds.get(name);
588
+ if (!withResolvers) {
589
+ withResolvers = promiseWithResolvers();
590
+ this.__pendingWhenDefineds.set(name, withResolvers);
591
+ }
592
+ return withResolvers.promise;
593
+ }
594
+ };
595
+ var CustomElementRegistryShimWithRealType = CustomElementRegistry;
596
+ var customElements2 = new CustomElementRegistryShimWithRealType();
597
+
598
+ // node_modules/.pnpm/@lit+reactive-element@2.1.2/node_modules/@lit/reactive-element/node/css-tag.js
599
+ var t = globalThis;
600
+ var e = t.ShadowRoot && (void 0 === t.ShadyCSS || t.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype;
601
+ var s = /* @__PURE__ */ Symbol();
602
+ var o = /* @__PURE__ */ new WeakMap();
603
+ var n = class {
604
+ constructor(t3, e3, o5) {
605
+ if (this._$cssResult$ = true, o5 !== s) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
606
+ this.cssText = t3, this.t = e3;
607
+ }
608
+ get styleSheet() {
609
+ let t3 = this.o;
610
+ const s4 = this.t;
611
+ if (e && void 0 === t3) {
612
+ const e3 = void 0 !== s4 && 1 === s4.length;
613
+ e3 && (t3 = o.get(s4)), void 0 === t3 && ((this.o = t3 = new CSSStyleSheet()).replaceSync(this.cssText), e3 && o.set(s4, t3));
614
+ }
615
+ return t3;
616
+ }
617
+ toString() {
618
+ return this.cssText;
619
+ }
620
+ };
621
+ var r = (t3) => new n("string" == typeof t3 ? t3 : t3 + "", void 0, s);
622
+ var i = (t3, ...e3) => {
623
+ const o5 = 1 === t3.length ? t3[0] : e3.reduce((e4, s4, o6) => e4 + ((t4) => {
624
+ if (true === t4._$cssResult$) return t4.cssText;
625
+ if ("number" == typeof t4) return t4;
626
+ throw Error("Value passed to 'css' function must be a 'css' function result: " + t4 + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
627
+ })(s4) + t3[o6 + 1], t3[0]);
628
+ return new n(o5, t3, s);
629
+ };
630
+ var S = (s4, o5) => {
631
+ if (e) s4.adoptedStyleSheets = o5.map((t3) => t3 instanceof CSSStyleSheet ? t3 : t3.styleSheet);
632
+ else for (const e3 of o5) {
633
+ const o6 = document.createElement("style"), n4 = t.litNonce;
634
+ void 0 !== n4 && o6.setAttribute("nonce", n4), o6.textContent = e3.cssText, s4.appendChild(o6);
635
+ }
636
+ };
637
+ var c = e || void 0 === t.CSSStyleSheet ? (t3) => t3 : (t3) => t3 instanceof CSSStyleSheet ? ((t4) => {
638
+ let e3 = "";
639
+ for (const s4 of t4.cssRules) e3 += s4.cssText;
640
+ return r(e3);
641
+ })(t3) : t3;
642
+
643
+ // node_modules/.pnpm/@lit+reactive-element@2.1.2/node_modules/@lit/reactive-element/node/reactive-element.js
644
+ var { is: h, defineProperty: r2, getOwnPropertyDescriptor: o2, getOwnPropertyNames: n2, getOwnPropertySymbols: a, getPrototypeOf: c2 } = Object;
645
+ var l = globalThis;
646
+ l.customElements ??= customElements2;
647
+ var p = l.trustedTypes;
648
+ var d = p ? p.emptyScript : "";
649
+ var u = l.reactiveElementPolyfillSupport;
650
+ var f = (t3, s4) => t3;
651
+ var b = { toAttribute(t3, s4) {
652
+ switch (s4) {
653
+ case Boolean:
654
+ t3 = t3 ? d : null;
655
+ break;
656
+ case Object:
657
+ case Array:
658
+ t3 = null == t3 ? t3 : JSON.stringify(t3);
659
+ }
660
+ return t3;
661
+ }, fromAttribute(t3, s4) {
662
+ let i4 = t3;
663
+ switch (s4) {
664
+ case Boolean:
665
+ i4 = null !== t3;
666
+ break;
667
+ case Number:
668
+ i4 = null === t3 ? null : Number(t3);
669
+ break;
670
+ case Object:
671
+ case Array:
672
+ try {
673
+ i4 = JSON.parse(t3);
674
+ } catch (t4) {
675
+ i4 = null;
676
+ }
677
+ }
678
+ return i4;
679
+ } };
680
+ var m = (t3, s4) => !h(t3, s4);
681
+ var y = { attribute: true, type: String, converter: b, reflect: false, useDefault: false, hasChanged: m };
682
+ Symbol.metadata ??= /* @__PURE__ */ Symbol("metadata"), l.litPropertyMetadata ??= /* @__PURE__ */ new WeakMap();
683
+ var g = class extends (globalThis.HTMLElement ?? HTMLElementShimWithRealType) {
684
+ static addInitializer(t3) {
685
+ this._$Ei(), (this.l ??= []).push(t3);
686
+ }
687
+ static get observedAttributes() {
688
+ return this.finalize(), this._$Eh && [...this._$Eh.keys()];
689
+ }
690
+ static createProperty(t3, s4 = y) {
691
+ if (s4.state && (s4.attribute = false), this._$Ei(), this.prototype.hasOwnProperty(t3) && ((s4 = Object.create(s4)).wrapped = true), this.elementProperties.set(t3, s4), !s4.noAccessor) {
692
+ const i4 = /* @__PURE__ */ Symbol(), e3 = this.getPropertyDescriptor(t3, i4, s4);
693
+ void 0 !== e3 && r2(this.prototype, t3, e3);
694
+ }
695
+ }
696
+ static getPropertyDescriptor(t3, s4, i4) {
697
+ const { get: e3, set: h3 } = o2(this.prototype, t3) ?? { get() {
698
+ return this[s4];
699
+ }, set(t4) {
700
+ this[s4] = t4;
701
+ } };
702
+ return { get: e3, set(s5) {
703
+ const r4 = e3?.call(this);
704
+ h3?.call(this, s5), this.requestUpdate(t3, r4, i4);
705
+ }, configurable: true, enumerable: true };
706
+ }
707
+ static getPropertyOptions(t3) {
708
+ return this.elementProperties.get(t3) ?? y;
709
+ }
710
+ static _$Ei() {
711
+ if (this.hasOwnProperty(f("elementProperties"))) return;
712
+ const t3 = c2(this);
713
+ t3.finalize(), void 0 !== t3.l && (this.l = [...t3.l]), this.elementProperties = new Map(t3.elementProperties);
714
+ }
715
+ static finalize() {
716
+ if (this.hasOwnProperty(f("finalized"))) return;
717
+ if (this.finalized = true, this._$Ei(), this.hasOwnProperty(f("properties"))) {
718
+ const t4 = this.properties, s4 = [...n2(t4), ...a(t4)];
719
+ for (const i4 of s4) this.createProperty(i4, t4[i4]);
720
+ }
721
+ const t3 = this[Symbol.metadata];
722
+ if (null !== t3) {
723
+ const s4 = litPropertyMetadata.get(t3);
724
+ if (void 0 !== s4) for (const [t4, i4] of s4) this.elementProperties.set(t4, i4);
725
+ }
726
+ this._$Eh = /* @__PURE__ */ new Map();
727
+ for (const [t4, s4] of this.elementProperties) {
728
+ const i4 = this._$Eu(t4, s4);
729
+ void 0 !== i4 && this._$Eh.set(i4, t4);
730
+ }
731
+ this.elementStyles = this.finalizeStyles(this.styles);
732
+ }
733
+ static finalizeStyles(t3) {
734
+ const s4 = [];
735
+ if (Array.isArray(t3)) {
736
+ const e3 = new Set(t3.flat(1 / 0).reverse());
737
+ for (const t4 of e3) s4.unshift(c(t4));
738
+ } else void 0 !== t3 && s4.push(c(t3));
739
+ return s4;
740
+ }
741
+ static _$Eu(t3, s4) {
742
+ const i4 = s4.attribute;
743
+ return false === i4 ? void 0 : "string" == typeof i4 ? i4 : "string" == typeof t3 ? t3.toLowerCase() : void 0;
744
+ }
745
+ constructor() {
746
+ super(), this._$Ep = void 0, this.isUpdatePending = false, this.hasUpdated = false, this._$Em = null, this._$Ev();
747
+ }
748
+ _$Ev() {
749
+ this._$ES = new Promise((t3) => this.enableUpdating = t3), this._$AL = /* @__PURE__ */ new Map(), this._$E_(), this.requestUpdate(), this.constructor.l?.forEach((t3) => t3(this));
750
+ }
751
+ addController(t3) {
752
+ (this._$EO ??= /* @__PURE__ */ new Set()).add(t3), void 0 !== this.renderRoot && this.isConnected && t3.hostConnected?.();
753
+ }
754
+ removeController(t3) {
755
+ this._$EO?.delete(t3);
756
+ }
757
+ _$E_() {
758
+ const t3 = /* @__PURE__ */ new Map(), s4 = this.constructor.elementProperties;
759
+ for (const i4 of s4.keys()) this.hasOwnProperty(i4) && (t3.set(i4, this[i4]), delete this[i4]);
760
+ t3.size > 0 && (this._$Ep = t3);
761
+ }
762
+ createRenderRoot() {
763
+ const t3 = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
764
+ return S(t3, this.constructor.elementStyles), t3;
765
+ }
766
+ connectedCallback() {
767
+ this.renderRoot ??= this.createRenderRoot(), this.enableUpdating(true), this._$EO?.forEach((t3) => t3.hostConnected?.());
768
+ }
769
+ enableUpdating(t3) {
770
+ }
771
+ disconnectedCallback() {
772
+ this._$EO?.forEach((t3) => t3.hostDisconnected?.());
773
+ }
774
+ attributeChangedCallback(t3, s4, i4) {
775
+ this._$AK(t3, i4);
776
+ }
777
+ _$ET(t3, s4) {
778
+ const i4 = this.constructor.elementProperties.get(t3), e3 = this.constructor._$Eu(t3, i4);
779
+ if (void 0 !== e3 && true === i4.reflect) {
780
+ const h3 = (void 0 !== i4.converter?.toAttribute ? i4.converter : b).toAttribute(s4, i4.type);
781
+ this._$Em = t3, null == h3 ? this.removeAttribute(e3) : this.setAttribute(e3, h3), this._$Em = null;
782
+ }
783
+ }
784
+ _$AK(t3, s4) {
785
+ const i4 = this.constructor, e3 = i4._$Eh.get(t3);
786
+ if (void 0 !== e3 && this._$Em !== e3) {
787
+ const t4 = i4.getPropertyOptions(e3), h3 = "function" == typeof t4.converter ? { fromAttribute: t4.converter } : void 0 !== t4.converter?.fromAttribute ? t4.converter : b;
788
+ this._$Em = e3;
789
+ const r4 = h3.fromAttribute(s4, t4.type);
790
+ this[e3] = r4 ?? this._$Ej?.get(e3) ?? r4, this._$Em = null;
791
+ }
792
+ }
793
+ requestUpdate(t3, s4, i4, e3 = false, h3) {
794
+ if (void 0 !== t3) {
795
+ const r4 = this.constructor;
796
+ if (false === e3 && (h3 = this[t3]), i4 ??= r4.getPropertyOptions(t3), !((i4.hasChanged ?? m)(h3, s4) || i4.useDefault && i4.reflect && h3 === this._$Ej?.get(t3) && !this.hasAttribute(r4._$Eu(t3, i4)))) return;
797
+ this.C(t3, s4, i4);
798
+ }
799
+ false === this.isUpdatePending && (this._$ES = this._$EP());
800
+ }
801
+ C(t3, s4, { useDefault: i4, reflect: e3, wrapped: h3 }, r4) {
802
+ i4 && !(this._$Ej ??= /* @__PURE__ */ new Map()).has(t3) && (this._$Ej.set(t3, r4 ?? s4 ?? this[t3]), true !== h3 || void 0 !== r4) || (this._$AL.has(t3) || (this.hasUpdated || i4 || (s4 = void 0), this._$AL.set(t3, s4)), true === e3 && this._$Em !== t3 && (this._$Eq ??= /* @__PURE__ */ new Set()).add(t3));
803
+ }
804
+ async _$EP() {
805
+ this.isUpdatePending = true;
806
+ try {
807
+ await this._$ES;
808
+ } catch (t4) {
809
+ Promise.reject(t4);
810
+ }
811
+ const t3 = this.scheduleUpdate();
812
+ return null != t3 && await t3, !this.isUpdatePending;
813
+ }
814
+ scheduleUpdate() {
815
+ return this.performUpdate();
816
+ }
817
+ performUpdate() {
818
+ if (!this.isUpdatePending) return;
819
+ if (!this.hasUpdated) {
820
+ if (this.renderRoot ??= this.createRenderRoot(), this._$Ep) {
821
+ for (const [t5, s5] of this._$Ep) this[t5] = s5;
822
+ this._$Ep = void 0;
823
+ }
824
+ const t4 = this.constructor.elementProperties;
825
+ if (t4.size > 0) for (const [s5, i4] of t4) {
826
+ const { wrapped: t5 } = i4, e3 = this[s5];
827
+ true !== t5 || this._$AL.has(s5) || void 0 === e3 || this.C(s5, void 0, i4, e3);
828
+ }
829
+ }
830
+ let t3 = false;
831
+ const s4 = this._$AL;
832
+ try {
833
+ t3 = this.shouldUpdate(s4), t3 ? (this.willUpdate(s4), this._$EO?.forEach((t4) => t4.hostUpdate?.()), this.update(s4)) : this._$EM();
834
+ } catch (s5) {
835
+ throw t3 = false, this._$EM(), s5;
836
+ }
837
+ t3 && this._$AE(s4);
838
+ }
839
+ willUpdate(t3) {
840
+ }
841
+ _$AE(t3) {
842
+ this._$EO?.forEach((t4) => t4.hostUpdated?.()), this.hasUpdated || (this.hasUpdated = true, this.firstUpdated(t3)), this.updated(t3);
843
+ }
844
+ _$EM() {
845
+ this._$AL = /* @__PURE__ */ new Map(), this.isUpdatePending = false;
846
+ }
847
+ get updateComplete() {
848
+ return this.getUpdateComplete();
849
+ }
850
+ getUpdateComplete() {
851
+ return this._$ES;
852
+ }
853
+ shouldUpdate(t3) {
854
+ return true;
855
+ }
856
+ update(t3) {
857
+ this._$Eq &&= this._$Eq.forEach((t4) => this._$ET(t4, this[t4])), this._$EM();
858
+ }
859
+ updated(t3) {
860
+ }
861
+ firstUpdated(t3) {
862
+ }
863
+ };
864
+ g.elementStyles = [], g.shadowRootOptions = { mode: "open" }, g[f("elementProperties")] = /* @__PURE__ */ new Map(), g[f("finalized")] = /* @__PURE__ */ new Map(), u?.({ ReactiveElement: g }), (l.reactiveElementVersions ??= []).push("2.1.2");
865
+
866
+ // node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/node/lit-html.js
867
+ var t2 = globalThis;
868
+ var i2 = (t3) => t3;
869
+ var s2 = t2.trustedTypes;
870
+ var e2 = s2 ? s2.createPolicy("lit-html", { createHTML: (t3) => t3 }) : void 0;
871
+ var h2 = "$lit$";
872
+ var o3 = `lit$${Math.random().toFixed(9).slice(2)}$`;
873
+ var n3 = "?" + o3;
874
+ var r3 = `<${n3}>`;
875
+ var l2 = void 0 === t2.document ? { createTreeWalker: () => ({}) } : document;
876
+ var c3 = () => l2.createComment("");
877
+ var a2 = (t3) => null === t3 || "object" != typeof t3 && "function" != typeof t3;
878
+ var u2 = Array.isArray;
879
+ var d2 = (t3) => u2(t3) || "function" == typeof t3?.[Symbol.iterator];
880
+ var f2 = "[ \n\f\r]";
881
+ var v = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g;
882
+ var _ = /-->/g;
883
+ var m2 = />/g;
884
+ var p2 = RegExp(`>|${f2}(?:([^\\s"'>=/]+)(${f2}*=${f2}*(?:[^
885
+ \f\r"'\`<>=]|("|')|))|$)`, "g");
886
+ var g2 = /'/g;
887
+ var $ = /"/g;
888
+ var y2 = /^(?:script|style|textarea|title)$/i;
889
+ var x = (t3) => (i4, ...s4) => ({ _$litType$: t3, strings: i4, values: s4 });
890
+ var T = x(1);
891
+ var b2 = x(2);
892
+ var w = x(3);
893
+ var E = /* @__PURE__ */ Symbol.for("lit-noChange");
894
+ var A = /* @__PURE__ */ Symbol.for("lit-nothing");
895
+ var C = /* @__PURE__ */ new WeakMap();
896
+ var P = l2.createTreeWalker(l2, 129);
897
+ function V(t3, i4) {
898
+ if (!u2(t3) || !t3.hasOwnProperty("raw")) throw Error("invalid template strings array");
899
+ return void 0 !== e2 ? e2.createHTML(i4) : i4;
900
+ }
901
+ var N = (t3, i4) => {
902
+ const s4 = t3.length - 1, e3 = [];
903
+ let n4, l3 = 2 === i4 ? "<svg>" : 3 === i4 ? "<math>" : "", c4 = v;
904
+ for (let i5 = 0; i5 < s4; i5++) {
905
+ const s5 = t3[i5];
906
+ let a3, u3, d3 = -1, f3 = 0;
907
+ for (; f3 < s5.length && (c4.lastIndex = f3, u3 = c4.exec(s5), null !== u3); ) f3 = c4.lastIndex, c4 === v ? "!--" === u3[1] ? c4 = _ : void 0 !== u3[1] ? c4 = m2 : void 0 !== u3[2] ? (y2.test(u3[2]) && (n4 = RegExp("</" + u3[2], "g")), c4 = p2) : void 0 !== u3[3] && (c4 = p2) : c4 === p2 ? ">" === u3[0] ? (c4 = n4 ?? v, d3 = -1) : void 0 === u3[1] ? d3 = -2 : (d3 = c4.lastIndex - u3[2].length, a3 = u3[1], c4 = void 0 === u3[3] ? p2 : '"' === u3[3] ? $ : g2) : c4 === $ || c4 === g2 ? c4 = p2 : c4 === _ || c4 === m2 ? c4 = v : (c4 = p2, n4 = void 0);
908
+ const x2 = c4 === p2 && t3[i5 + 1].startsWith("/>") ? " " : "";
909
+ l3 += c4 === v ? s5 + r3 : d3 >= 0 ? (e3.push(a3), s5.slice(0, d3) + h2 + s5.slice(d3) + o3 + x2) : s5 + o3 + (-2 === d3 ? i5 : x2);
910
+ }
911
+ return [V(t3, l3 + (t3[s4] || "<?>") + (2 === i4 ? "</svg>" : 3 === i4 ? "</math>" : "")), e3];
912
+ };
913
+ var S2 = class _S {
914
+ constructor({ strings: t3, _$litType$: i4 }, e3) {
915
+ let r4;
916
+ this.parts = [];
917
+ let l3 = 0, a3 = 0;
918
+ const u3 = t3.length - 1, d3 = this.parts, [f3, v2] = N(t3, i4);
919
+ if (this.el = _S.createElement(f3, e3), P.currentNode = this.el.content, 2 === i4 || 3 === i4) {
920
+ const t4 = this.el.content.firstChild;
921
+ t4.replaceWith(...t4.childNodes);
922
+ }
923
+ for (; null !== (r4 = P.nextNode()) && d3.length < u3; ) {
924
+ if (1 === r4.nodeType) {
925
+ if (r4.hasAttributes()) for (const t4 of r4.getAttributeNames()) if (t4.endsWith(h2)) {
926
+ const i5 = v2[a3++], s4 = r4.getAttribute(t4).split(o3), e4 = /([.?@])?(.*)/.exec(i5);
927
+ d3.push({ type: 1, index: l3, name: e4[2], strings: s4, ctor: "." === e4[1] ? I : "?" === e4[1] ? L : "@" === e4[1] ? z : H }), r4.removeAttribute(t4);
928
+ } else t4.startsWith(o3) && (d3.push({ type: 6, index: l3 }), r4.removeAttribute(t4));
929
+ if (y2.test(r4.tagName)) {
930
+ const t4 = r4.textContent.split(o3), i5 = t4.length - 1;
931
+ if (i5 > 0) {
932
+ r4.textContent = s2 ? s2.emptyScript : "";
933
+ for (let s4 = 0; s4 < i5; s4++) r4.append(t4[s4], c3()), P.nextNode(), d3.push({ type: 2, index: ++l3 });
934
+ r4.append(t4[i5], c3());
935
+ }
936
+ }
937
+ } else if (8 === r4.nodeType) if (r4.data === n3) d3.push({ type: 2, index: l3 });
938
+ else {
939
+ let t4 = -1;
940
+ for (; -1 !== (t4 = r4.data.indexOf(o3, t4 + 1)); ) d3.push({ type: 7, index: l3 }), t4 += o3.length - 1;
941
+ }
942
+ l3++;
943
+ }
944
+ }
945
+ static createElement(t3, i4) {
946
+ const s4 = l2.createElement("template");
947
+ return s4.innerHTML = t3, s4;
948
+ }
949
+ };
950
+ function M(t3, i4, s4 = t3, e3) {
951
+ if (i4 === E) return i4;
952
+ let h3 = void 0 !== e3 ? s4._$Co?.[e3] : s4._$Cl;
953
+ const o5 = a2(i4) ? void 0 : i4._$litDirective$;
954
+ return h3?.constructor !== o5 && (h3?._$AO?.(false), void 0 === o5 ? h3 = void 0 : (h3 = new o5(t3), h3._$AT(t3, s4, e3)), void 0 !== e3 ? (s4._$Co ??= [])[e3] = h3 : s4._$Cl = h3), void 0 !== h3 && (i4 = M(t3, h3._$AS(t3, i4.values), h3, e3)), i4;
955
+ }
956
+ var k = class {
957
+ constructor(t3, i4) {
958
+ this._$AV = [], this._$AN = void 0, this._$AD = t3, this._$AM = i4;
959
+ }
960
+ get parentNode() {
961
+ return this._$AM.parentNode;
962
+ }
963
+ get _$AU() {
964
+ return this._$AM._$AU;
965
+ }
966
+ u(t3) {
967
+ const { el: { content: i4 }, parts: s4 } = this._$AD, e3 = (t3?.creationScope ?? l2).importNode(i4, true);
968
+ P.currentNode = e3;
969
+ let h3 = P.nextNode(), o5 = 0, n4 = 0, r4 = s4[0];
970
+ for (; void 0 !== r4; ) {
971
+ if (o5 === r4.index) {
972
+ let i5;
973
+ 2 === r4.type ? i5 = new R(h3, h3.nextSibling, this, t3) : 1 === r4.type ? i5 = new r4.ctor(h3, r4.name, r4.strings, this, t3) : 6 === r4.type && (i5 = new W(h3, this, t3)), this._$AV.push(i5), r4 = s4[++n4];
974
+ }
975
+ o5 !== r4?.index && (h3 = P.nextNode(), o5++);
976
+ }
977
+ return P.currentNode = l2, e3;
978
+ }
979
+ p(t3) {
980
+ let i4 = 0;
981
+ for (const s4 of this._$AV) void 0 !== s4 && (void 0 !== s4.strings ? (s4._$AI(t3, s4, i4), i4 += s4.strings.length - 2) : s4._$AI(t3[i4])), i4++;
982
+ }
983
+ };
984
+ var R = class _R {
985
+ get _$AU() {
986
+ return this._$AM?._$AU ?? this._$Cv;
987
+ }
988
+ constructor(t3, i4, s4, e3) {
989
+ this.type = 2, this._$AH = A, this._$AN = void 0, this._$AA = t3, this._$AB = i4, this._$AM = s4, this.options = e3, this._$Cv = e3?.isConnected ?? true;
990
+ }
991
+ get parentNode() {
992
+ let t3 = this._$AA.parentNode;
993
+ const i4 = this._$AM;
994
+ return void 0 !== i4 && 11 === t3?.nodeType && (t3 = i4.parentNode), t3;
995
+ }
996
+ get startNode() {
997
+ return this._$AA;
998
+ }
999
+ get endNode() {
1000
+ return this._$AB;
1001
+ }
1002
+ _$AI(t3, i4 = this) {
1003
+ t3 = M(this, t3, i4), a2(t3) ? t3 === A || null == t3 || "" === t3 ? (this._$AH !== A && this._$AR(), this._$AH = A) : t3 !== this._$AH && t3 !== E && this._(t3) : void 0 !== t3._$litType$ ? this.$(t3) : void 0 !== t3.nodeType ? this.T(t3) : d2(t3) ? this.k(t3) : this._(t3);
1004
+ }
1005
+ O(t3) {
1006
+ return this._$AA.parentNode.insertBefore(t3, this._$AB);
1007
+ }
1008
+ T(t3) {
1009
+ this._$AH !== t3 && (this._$AR(), this._$AH = this.O(t3));
1010
+ }
1011
+ _(t3) {
1012
+ this._$AH !== A && a2(this._$AH) ? this._$AA.nextSibling.data = t3 : this.T(l2.createTextNode(t3)), this._$AH = t3;
1013
+ }
1014
+ $(t3) {
1015
+ const { values: i4, _$litType$: s4 } = t3, e3 = "number" == typeof s4 ? this._$AC(t3) : (void 0 === s4.el && (s4.el = S2.createElement(V(s4.h, s4.h[0]), this.options)), s4);
1016
+ if (this._$AH?._$AD === e3) this._$AH.p(i4);
1017
+ else {
1018
+ const t4 = new k(e3, this), s5 = t4.u(this.options);
1019
+ t4.p(i4), this.T(s5), this._$AH = t4;
1020
+ }
1021
+ }
1022
+ _$AC(t3) {
1023
+ let i4 = C.get(t3.strings);
1024
+ return void 0 === i4 && C.set(t3.strings, i4 = new S2(t3)), i4;
1025
+ }
1026
+ k(t3) {
1027
+ u2(this._$AH) || (this._$AH = [], this._$AR());
1028
+ const i4 = this._$AH;
1029
+ let s4, e3 = 0;
1030
+ for (const h3 of t3) e3 === i4.length ? i4.push(s4 = new _R(this.O(c3()), this.O(c3()), this, this.options)) : s4 = i4[e3], s4._$AI(h3), e3++;
1031
+ e3 < i4.length && (this._$AR(s4 && s4._$AB.nextSibling, e3), i4.length = e3);
1032
+ }
1033
+ _$AR(t3 = this._$AA.nextSibling, s4) {
1034
+ for (this._$AP?.(false, true, s4); t3 !== this._$AB; ) {
1035
+ const s5 = i2(t3).nextSibling;
1036
+ i2(t3).remove(), t3 = s5;
1037
+ }
1038
+ }
1039
+ setConnected(t3) {
1040
+ void 0 === this._$AM && (this._$Cv = t3, this._$AP?.(t3));
1041
+ }
1042
+ };
1043
+ var H = class {
1044
+ get tagName() {
1045
+ return this.element.tagName;
1046
+ }
1047
+ get _$AU() {
1048
+ return this._$AM._$AU;
1049
+ }
1050
+ constructor(t3, i4, s4, e3, h3) {
1051
+ this.type = 1, this._$AH = A, this._$AN = void 0, this.element = t3, this.name = i4, this._$AM = e3, this.options = h3, s4.length > 2 || "" !== s4[0] || "" !== s4[1] ? (this._$AH = Array(s4.length - 1).fill(new String()), this.strings = s4) : this._$AH = A;
1052
+ }
1053
+ _$AI(t3, i4 = this, s4, e3) {
1054
+ const h3 = this.strings;
1055
+ let o5 = false;
1056
+ if (void 0 === h3) t3 = M(this, t3, i4, 0), o5 = !a2(t3) || t3 !== this._$AH && t3 !== E, o5 && (this._$AH = t3);
1057
+ else {
1058
+ const e4 = t3;
1059
+ let n4, r4;
1060
+ for (t3 = h3[0], n4 = 0; n4 < h3.length - 1; n4++) r4 = M(this, e4[s4 + n4], i4, n4), r4 === E && (r4 = this._$AH[n4]), o5 ||= !a2(r4) || r4 !== this._$AH[n4], r4 === A ? t3 = A : t3 !== A && (t3 += (r4 ?? "") + h3[n4 + 1]), this._$AH[n4] = r4;
1061
+ }
1062
+ o5 && !e3 && this.j(t3);
1063
+ }
1064
+ j(t3) {
1065
+ t3 === A ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t3 ?? "");
1066
+ }
1067
+ };
1068
+ var I = class extends H {
1069
+ constructor() {
1070
+ super(...arguments), this.type = 3;
1071
+ }
1072
+ j(t3) {
1073
+ this.element[this.name] = t3 === A ? void 0 : t3;
1074
+ }
1075
+ };
1076
+ var L = class extends H {
1077
+ constructor() {
1078
+ super(...arguments), this.type = 4;
1079
+ }
1080
+ j(t3) {
1081
+ this.element.toggleAttribute(this.name, !!t3 && t3 !== A);
1082
+ }
1083
+ };
1084
+ var z = class extends H {
1085
+ constructor(t3, i4, s4, e3, h3) {
1086
+ super(t3, i4, s4, e3, h3), this.type = 5;
1087
+ }
1088
+ _$AI(t3, i4 = this) {
1089
+ if ((t3 = M(this, t3, i4, 0) ?? A) === E) return;
1090
+ const s4 = this._$AH, e3 = t3 === A && s4 !== A || t3.capture !== s4.capture || t3.once !== s4.once || t3.passive !== s4.passive, h3 = t3 !== A && (s4 === A || e3);
1091
+ e3 && this.element.removeEventListener(this.name, this, s4), h3 && this.element.addEventListener(this.name, this, t3), this._$AH = t3;
1092
+ }
1093
+ handleEvent(t3) {
1094
+ "function" == typeof this._$AH ? this._$AH.call(this.options?.host ?? this.element, t3) : this._$AH.handleEvent(t3);
1095
+ }
1096
+ };
1097
+ var W = class {
1098
+ constructor(t3, i4, s4) {
1099
+ this.element = t3, this.type = 6, this._$AN = void 0, this._$AM = i4, this.options = s4;
1100
+ }
1101
+ get _$AU() {
1102
+ return this._$AM._$AU;
1103
+ }
1104
+ _$AI(t3) {
1105
+ M(this, t3);
1106
+ }
1107
+ };
1108
+ var j = t2.litHtmlPolyfillSupport;
1109
+ j?.(S2, R), (t2.litHtmlVersions ??= []).push("3.3.2");
1110
+ var B = (t3, i4, s4) => {
1111
+ const e3 = s4?.renderBefore ?? i4;
1112
+ let h3 = e3._$litPart$;
1113
+ if (void 0 === h3) {
1114
+ const t4 = s4?.renderBefore ?? null;
1115
+ e3._$litPart$ = h3 = new R(i4.insertBefore(c3(), t4), t4, void 0, s4 ?? {});
1116
+ }
1117
+ return h3._$AI(t3), h3;
1118
+ };
1119
+
1120
+ // node_modules/.pnpm/lit-element@4.2.2/node_modules/lit-element/lit-element.js
1121
+ var s3 = globalThis;
1122
+ var i3 = class extends g {
1123
+ constructor() {
1124
+ super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
1125
+ }
1126
+ createRenderRoot() {
1127
+ const t3 = super.createRenderRoot();
1128
+ return this.renderOptions.renderBefore ??= t3.firstChild, t3;
1129
+ }
1130
+ update(t3) {
1131
+ const r4 = this.render();
1132
+ this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t3), this._$Do = B(r4, this.renderRoot, this.renderOptions);
1133
+ }
1134
+ connectedCallback() {
1135
+ super.connectedCallback(), this._$Do?.setConnected(true);
1136
+ }
1137
+ disconnectedCallback() {
1138
+ super.disconnectedCallback(), this._$Do?.setConnected(false);
1139
+ }
1140
+ render() {
1141
+ return E;
1142
+ }
1143
+ };
1144
+ i3._$litElement$ = true, i3["finalized"] = true, s3.litElementHydrateSupport?.({ LitElement: i3 });
1145
+ var o4 = s3.litElementPolyfillSupport;
1146
+ o4?.({ LitElement: i3 });
1147
+ (s3.litElementVersions ??= []).push("4.2.2");
1148
+
1149
+ // src/web-components/ui/bds-badge.ts
1150
+ var BdsBadge = class extends i3 {
1151
+ static styles = i`
1152
+ :host {
1153
+ display: inline-flex;
1154
+ }
1155
+
1156
+ .badge {
1157
+ display: inline-flex;
1158
+ align-items: center;
1159
+ justify-content: center;
1160
+ padding: var(--bds-space_xxs) var(--bds-space_xs);
1161
+ border-radius: var(--badge_radius, 2em);
1162
+ font-size: var(--badge_font-size, var(--bds-font_size--body--s));
1163
+ font-weight: var(--bds-font_weight--semibold);
1164
+ line-height: 1;
1165
+ white-space: nowrap;
1166
+ background-color: var(--badge_bg, var(--bds-color_blue));
1167
+ color: var(--badge_text, var(--bds-color_on-blue));
1168
+ }
1169
+
1170
+ /* Variant overrides */
1171
+ :host([variant='primary']) .badge {
1172
+ --badge_bg: var(--bds-color_interactive);
1173
+ --badge_text: var(--bds-color_on-interactive);
1174
+ }
1175
+
1176
+ :host([variant='secondary']) .badge {
1177
+ --badge_bg: var(--bds-color_bg);
1178
+ --badge_text: var(--bds-color_on-bg);
1179
+ }
1180
+
1181
+ :host([variant='success']) .badge {
1182
+ --badge_bg: var(--bds-color_success);
1183
+ --badge_text: var(--bds-color_on-success);
1184
+ }
1185
+
1186
+ :host([variant='error']) .badge {
1187
+ --badge_bg: var(--bds-color_error);
1188
+ --badge_text: var(--bds-color_on-error);
1189
+ }
1190
+
1191
+ :host([variant='warning']) .badge {
1192
+ --badge_bg: var(--bds-color_warning);
1193
+ --badge_text: var(--bds-color_on-warning);
1194
+ }
1195
+ `;
1196
+ static properties = {
1197
+ variant: { type: String, reflect: true }
1198
+ };
1199
+ constructor() {
1200
+ super();
1201
+ this.variant = "primary";
1202
+ }
1203
+ render() {
1204
+ return T`<span class="badge"><slot></slot></span>`;
1205
+ }
1206
+ };
1207
+ customElements.define("bds-badge", BdsBadge);
1208
+
1209
+ // src/web-components/interaction/bds-button.ts
1210
+ var BdsButton = class extends i3 {
1211
+ static styles = i`
1212
+ @keyframes fadeZoom {
1213
+ 0%, 100% { opacity: 1; transform: scale(1); }
1214
+ 50% { opacity: 0.75; transform: scale(1.15); }
1215
+ }
1216
+
1217
+ @keyframes pulse {
1218
+ 0% { transform: scale(1); box-shadow: 0 0 0 0 rgb(from var(--button_pulse-color, var(--button_color, var(--bds-color_green))) r g b / 50%); }
1219
+ 70% { transform: scale(1.01); box-shadow: 0 0 0 var(--bds-space_m) rgb(from var(--button_pulse-color, var(--button_color, var(--bds-color_green))) r g b / 0%); }
1220
+ 100% { transform: scale(1); box-shadow: 0 0 0 0 rgb(from var(--button_pulse-color, var(--button_color, var(--bds-color_green))) r g b / 0%); }
1221
+ }
1222
+
1223
+ :host {
1224
+ display: inline-flex;
1225
+ }
1226
+
1227
+ .button,
1228
+ .button[href] {
1229
+ all: unset;
1230
+ position: relative;
1231
+ font: inherit;
1232
+ padding-inline: var(--bds-space_l);
1233
+ display: inline-flex;
1234
+ gap: var(--bds-space_xs);
1235
+ border-radius: var(--button_border_radius--s, var(--bds-border_radius--s));
1236
+ align-items: center;
1237
+ cursor: pointer;
1238
+ justify-content: center;
1239
+ height: var(--button_height, 3em);
1240
+ font-size: var(--button_font-size, inherit);
1241
+ white-space: nowrap;
1242
+ line-height: 1;
1243
+
1244
+ --button_color: var(--bds-color_green);
1245
+ --button_on-color: var(--bds-color_on-green);
1246
+
1247
+ background-color: var(--button_bg, var(--button_color));
1248
+ color: var(--button_text, var(--button_on-color));
1249
+ border: var(--button_border, none);
1250
+ --bdc_color: transparent;
1251
+
1252
+ outline: var(--bdc-outline_width) solid var(--bdc_color);
1253
+ outline-offset: var(--bdc-outline_offset);
1254
+ transition: var(--bds-animation_transition),
1255
+ --bdc_color var(--bds-animation_transition-duration) var(--bds-animation_easing);
1256
+ }
1257
+
1258
+ .button[href] {
1259
+ text-decoration: none;
1260
+ }
1261
+
1262
+ /* Variants */
1263
+ .button.ghost {
1264
+ --button_bg: transparent;
1265
+ --button_text: var(--button_color);
1266
+ --bdc_color: var(--button_color);
1267
+ }
1268
+
1269
+ /* Sizes */
1270
+ .button.small {
1271
+ --button_height: 2.25em;
1272
+ --button_font-size: var(--bds-font_size--body--s);
1273
+ --button_border_radius--s: var(--bds-border_radius--xs);
1274
+ padding-inline: var(--bds-space_m);
1275
+ }
1276
+
1277
+ .button.medium {
1278
+ --button_height: 3em;
1279
+ padding-inline: var(--bds-space_l);
1280
+ }
1281
+
1282
+ .button.large {
1283
+ --button_font-size: var(--bds-font_size--heading-3);
1284
+ --button_border_radius--s: var(--bds-border_radius--m);
1285
+ padding-inline: var(--bds-space_xl);
1286
+ }
1287
+
1288
+ /* Pulse */
1289
+ .button.has-pulse {
1290
+ animation: pulse 3s infinite;
1291
+ }
1292
+
1293
+ /* SVG icon colour */
1294
+ .button svg {
1295
+ --icon__stroke: currentcolor;
1296
+ fill: currentcolor;
1297
+ color: currentcolor;
1298
+ flex-shrink: 0;
1299
+ }
1300
+
1301
+ /* Icon slots — hidden by default, shown when slot has content */
1302
+ .icon-start,
1303
+ .icon-end {
1304
+ display: none;
1305
+ align-items: center;
1306
+ }
1307
+
1308
+ .icon-start.has-content {
1309
+ display: flex;
1310
+ margin-inline-start: calc(var(--bds-space_s) * -1);
1311
+ transition: var(--bds-animation_transition);
1312
+ }
1313
+
1314
+ .icon-end.has-content {
1315
+ display: flex;
1316
+ margin-inline-end: calc(var(--bds-space_s) * -1);
1317
+ transition: var(--bds-animation_transition);
1318
+ }
1319
+
1320
+ /* Hover icon animation */
1321
+ @media (hover: hover) and (pointer: fine) {
1322
+ .button:hover .icon-start svg,
1323
+ .button:hover .icon-end svg {
1324
+ animation: fadeZoom 2s ease-out infinite;
1325
+ }
1326
+
1327
+ /* Default hover */
1328
+ .button.default:hover {
1329
+ --button_bg: var(--bds-color_bg);
1330
+ --button_text: var(--bds-color_interactive);
1331
+ --button_pulse-color: var(--bds-color_interactive);
1332
+ --bdc_color: currentcolor;
1333
+ }
1334
+
1335
+ /* Ghost hover */
1336
+ .button.ghost:hover {
1337
+ --button_bg: var(--button_color);
1338
+ --button_text: var(--button_on-color);
1339
+ --bdc_color: transparent;
1340
+ }
1341
+ }
1342
+
1343
+ /* Focus visible */
1344
+ .button:focus-visible {
1345
+ outline: var(--bds-outline_default);
1346
+ outline-offset: var(--bds-outline_offset);
1347
+ border-radius: var(--bds-border_radius--s);
1348
+ }
1349
+
1350
+ /* Disabled */
1351
+ .button:disabled,
1352
+ .button[aria-disabled='true'] {
1353
+ opacity: 0.5;
1354
+ cursor: not-allowed;
1355
+ pointer-events: none;
1356
+ }
1357
+ `;
1358
+ static properties = {
1359
+ variant: { type: String, reflect: true },
1360
+ size: { type: String, reflect: true },
1361
+ disabled: { type: Boolean, reflect: true },
1362
+ href: { type: String },
1363
+ target: { type: String },
1364
+ rel: { type: String },
1365
+ hasPulse: { type: Boolean, attribute: "has-pulse", reflect: true },
1366
+ type: { type: String },
1367
+ ariaLabel: { type: String, attribute: "aria-label" },
1368
+ // Internal state
1369
+ _iconStartFilled: { state: true },
1370
+ _iconEndFilled: { state: true }
1371
+ };
1372
+ constructor() {
1373
+ super();
1374
+ this.variant = "default";
1375
+ this.size = "medium";
1376
+ this.disabled = false;
1377
+ this.hasPulse = false;
1378
+ this.type = "button";
1379
+ this.ariaLabel = null;
1380
+ this._iconStartFilled = false;
1381
+ this._iconEndFilled = false;
1382
+ }
1383
+ _onIconSlotChange(e3, position) {
1384
+ const slot = e3.target;
1385
+ const filled = slot.assignedNodes({ flatten: true }).length > 0;
1386
+ if (position === "start") {
1387
+ this._iconStartFilled = filled;
1388
+ } else {
1389
+ this._iconEndFilled = filled;
1390
+ }
1391
+ }
1392
+ get _classes() {
1393
+ return `button ${this.variant} ${this.size}${this.hasPulse ? " has-pulse" : ""}`;
1394
+ }
1395
+ _handleAnchorClick(e3) {
1396
+ if (this.disabled) {
1397
+ e3.preventDefault();
1398
+ }
1399
+ }
1400
+ _iconSlot(position) {
1401
+ const filled = position === "start" ? this._iconStartFilled : this._iconEndFilled;
1402
+ return T`
1403
+ <span class="icon-${position} ${filled ? "has-content" : ""}">
1404
+ <slot name="icon-${position}" @slotchange=${(e3) => this._onIconSlotChange(e3, position)}></slot>
1405
+ </span>
1406
+ `;
1407
+ }
1408
+ render() {
1409
+ if (this.href) {
1410
+ return T`
1411
+ <a
1412
+ class=${this._classes}
1413
+ href=${this.disabled ? A : this.href}
1414
+ target=${this.target ?? A}
1415
+ rel=${this.rel ?? A}
1416
+ aria-disabled=${this.disabled ? "true" : A}
1417
+ tabindex=${this.disabled ? "-1" : A}
1418
+ aria-label=${this.ariaLabel ?? A}
1419
+ @click=${this._handleAnchorClick}
1420
+ >
1421
+ ${this._iconSlot("start")}
1422
+ <slot></slot>
1423
+ ${this._iconSlot("end")}
1424
+ </a>
1425
+ `;
1426
+ }
1427
+ return T`
1428
+ <button
1429
+ class=${this._classes}
1430
+ type=${this.type}
1431
+ ?disabled=${this.disabled}
1432
+ aria-label=${this.ariaLabel ?? A}
1433
+ >
1434
+ ${this._iconSlot("start")}
1435
+ <slot></slot>
1436
+ ${this._iconSlot("end")}
1437
+ </button>
1438
+ `;
1439
+ }
1440
+ };
1441
+ customElements.define("bds-button", BdsButton);
1442
+
1443
+ // src/web-components/ui/bds-alert.ts
1444
+ var BdsAlert = class extends i3 {
1445
+ static styles = i`
1446
+ :host {
1447
+ display: block;
1448
+ }
1449
+
1450
+ .alert {
1451
+ display: flex;
1452
+ align-items: flex-start;
1453
+ gap: var(--bds-space_s);
1454
+ padding: var(--bds-space_m);
1455
+ border-radius: var(--bds-border_radius--s);
1456
+ border-inline-start: var(--bds-space_s) solid var(--alert_border, var(--bds-color_blue));
1457
+ background-color: var(--alert_bg, var(--bds-color_blue--subtle));
1458
+ color: var(--alert_text, var(--bds-color_on-blue--subtle));
1459
+ font-size: var(--bds-font_size--body);
1460
+ line-height: var(--bds-font_line-height--body);
1461
+ }
1462
+
1463
+ /* Variant colours */
1464
+ :host([variant='info']) .alert {
1465
+ --alert_bg: var(--bds-color_blue--subtle);
1466
+ --alert_text: var(--bds-color_on-blue--subtle);
1467
+ --alert_border: var(--bds-color_blue);
1468
+ }
1469
+
1470
+ :host([variant='success']) .alert {
1471
+ --alert_bg: var(--bds-color_success--subtle);
1472
+ --alert_text: var(--bds-color_on-success--subtle);
1473
+ --alert_border: var(--bds-color_success);
1474
+ }
1475
+
1476
+ :host([variant='warning']) .alert {
1477
+ --alert_bg: var(--bds-color_orange--subtle);
1478
+ --alert_text: var(--bds-color_on-orange--subtle);
1479
+ --alert_border: var(--bds-color_warning);
1480
+ }
1481
+
1482
+ :host([variant='error']) .alert {
1483
+ --alert_bg: rgb(from var(--bds-color_error) r g b / 12%);
1484
+ --alert_text: var(--bds-color_on-bg);
1485
+ --alert_border: var(--bds-color_error);
1486
+ }
1487
+
1488
+ /* Icon slot wrapper — hidden unless slot has content */
1489
+ .icon {
1490
+ display: none;
1491
+ align-items: center;
1492
+ flex-shrink: 0;
1493
+ margin-block-start: 0.1em;
1494
+ }
1495
+
1496
+ .icon.has-content {
1497
+ display: flex;
1498
+ }
1499
+
1500
+ /* Content area */
1501
+ .content {
1502
+ flex: 1;
1503
+ display: flex;
1504
+ flex-direction: column;
1505
+ gap: var(--bds-space_xxs);
1506
+ }
1507
+
1508
+ .title {
1509
+ font-weight: var(--bds-font_weight--semibold);
1510
+ font-size: var(--bds-font_size--body);
1511
+ }
1512
+
1513
+ /* Dismiss button */
1514
+ .dismiss {
1515
+ all: unset;
1516
+ display: flex;
1517
+ align-items: center;
1518
+ justify-content: center;
1519
+ flex-shrink: 0;
1520
+ cursor: pointer;
1521
+ color: currentcolor;
1522
+ transition: var(--bds-animation_transition);
1523
+ border-radius: 50%;
1524
+ --bdc_color: currentcolor;
1525
+ outline: var(--bdc-outline_width) solid var(--bdc_color);
1526
+ outline-offset: var(--bdc-outline_offset);
1527
+ }
1528
+
1529
+ .dismiss svg {
1530
+ width: 1rem;
1531
+ height: 1rem;
1532
+ }
1533
+
1534
+ .dismiss:focus-visible {
1535
+ outline: var(--bds-outline_default);
1536
+ outline-offset: var(--bds-outline_offset);
1537
+ }
1538
+
1539
+ @media (hover: hover) and (pointer: fine) {
1540
+ .dismiss:hover {
1541
+ opacity: 0.7;
1542
+ }
1543
+ }
1544
+ `;
1545
+ static properties = {
1546
+ variant: { type: String, reflect: true },
1547
+ title: { type: String },
1548
+ dismissible: { type: Boolean, reflect: true },
1549
+ _iconFilled: { state: true }
1550
+ };
1551
+ constructor() {
1552
+ super();
1553
+ this.variant = "info";
1554
+ this.title = "";
1555
+ this.dismissible = false;
1556
+ this._iconFilled = false;
1557
+ }
1558
+ _onIconSlotChange(e3) {
1559
+ const slot = e3.target;
1560
+ this._iconFilled = slot.assignedNodes({ flatten: true }).length > 0;
1561
+ }
1562
+ get _isUrgent() {
1563
+ return this.variant === "error" || this.variant === "warning";
1564
+ }
1565
+ _handleDismiss() {
1566
+ this.dispatchEvent(new CustomEvent("bds-dismiss", { bubbles: true, composed: true }));
1567
+ }
1568
+ render() {
1569
+ return T`
1570
+ <div
1571
+ class="alert"
1572
+ role=${this._isUrgent ? "alert" : "status"}
1573
+ aria-live=${this._isUrgent ? "assertive" : "polite"}
1574
+ aria-atomic="true"
1575
+ >
1576
+ <span class="icon ${this._iconFilled ? "has-content" : ""}" aria-hidden="true">
1577
+ <slot name="icon" @slotchange=${this._onIconSlotChange}></slot>
1578
+ </span>
1579
+ <div class="content">
1580
+ ${this.title ? T`<strong class="title">${this.title}</strong>` : A}
1581
+ <div><slot></slot></div>
1582
+ </div>
1583
+ ${this.dismissible ? T`
1584
+ <button
1585
+ type="button"
1586
+ class="dismiss"
1587
+ @click=${this._handleDismiss}
1588
+ aria-label="Dismiss alert"
1589
+ >
1590
+ <svg aria-hidden="true" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
1591
+ <path stroke-linecap="round" stroke-linejoin="round" d="M18 6L6 18M6 6l12 12" />
1592
+ </svg>
1593
+ </button>
1594
+ ` : A}
1595
+ </div>
1596
+ `;
1597
+ }
1598
+ };
1599
+ customElements.define("bds-alert", BdsAlert);
1600
+
1601
+ // src/web-components/interaction/bds-popover.ts
1602
+ var BdsPopover = class extends i3 {
1603
+ static styles = i`
1604
+ :host {
1605
+ display: inline-flex;
1606
+ position: relative;
1607
+ }
1608
+
1609
+ /* The wrapper IS the CSS anchor — anchor-name resolves via the custom
1610
+ property injected on :host in connectedCallback(), so each instance
1611
+ gets its own unique name without colliding with siblings. */
1612
+ .wrapper {
1613
+ display: inline-flex;
1614
+ anchor-name: var(--bds-popover-anchor);
1615
+ }
1616
+
1617
+ .panel {
1618
+ display: none;
1619
+ position: absolute;
1620
+ position-anchor: var(--bds-popover-anchor);
1621
+ margin: 0;
1622
+ overflow-y: auto;
1623
+ z-index: var(--popover_z-index, 100);
1624
+ min-width: 12rem;
1625
+ padding: var(--bds-space_m);
1626
+ border-radius: var(--bds-border_radius--s);
1627
+ background-color: var(--popover_color, var(--bds-color_bg));
1628
+ box-shadow: var(--popover_shadow, var(--bds-shadow_m));
1629
+ color: var(--popover_on-color, var(--bds-color_on-bg));
1630
+ font-size: var(--bds-font_size--body);
1631
+ }
1632
+
1633
+ .panel.open {
1634
+ display: block;
1635
+ }
1636
+
1637
+ /* Primary placements */
1638
+
1639
+ .panel[data-placement='bottom'] {
1640
+ top: anchor(bottom);
1641
+ left: anchor(left);
1642
+ margin-top: var(--bds-space_xs, 8px);
1643
+ position-try-fallbacks: --bds-popover-top, --bds-popover-right, --bds-popover-left;
1644
+ }
1645
+
1646
+ .panel[data-placement='top'] {
1647
+ bottom: anchor(top);
1648
+ left: anchor(left);
1649
+ margin-bottom: var(--bds-space_xs, 8px);
1650
+ position-try-fallbacks: --bds-popover-bottom, --bds-popover-right, --bds-popover-left;
1651
+ }
1652
+
1653
+ .panel[data-placement='right'] {
1654
+ top: anchor(top);
1655
+ left: anchor(right);
1656
+ margin-left: var(--bds-space_xs, 8px);
1657
+ position-try-fallbacks: --bds-popover-left, --bds-popover-bottom, --bds-popover-top;
1658
+ }
1659
+
1660
+ .panel[data-placement='left'] {
1661
+ top: anchor(top);
1662
+ right: anchor(left);
1663
+ margin-right: var(--bds-space_xs, 8px);
1664
+ position-try-fallbacks: --bds-popover-right, --bds-popover-bottom, --bds-popover-top;
1665
+ }
1666
+
1667
+ /* Fallback placements */
1668
+
1669
+ @position-try --bds-popover-bottom {
1670
+ top: anchor(bottom);
1671
+ right: unset;
1672
+ bottom: unset;
1673
+ left: anchor(left);
1674
+ margin: 0;
1675
+ margin-top: var(--bds-space_xs, 8px);
1676
+ }
1677
+
1678
+ @position-try --bds-popover-top {
1679
+ top: unset;
1680
+ right: unset;
1681
+ bottom: anchor(top);
1682
+ left: anchor(left);
1683
+ margin: 0;
1684
+ margin-bottom: var(--bds-space_xs, 8px);
1685
+ }
1686
+
1687
+ @position-try --bds-popover-right {
1688
+ top: anchor(top);
1689
+ right: unset;
1690
+ bottom: unset;
1691
+ left: anchor(right);
1692
+ margin: 0;
1693
+ margin-left: var(--bds-space_xs, 8px);
1694
+ }
1695
+
1696
+ @position-try --bds-popover-left {
1697
+ top: anchor(top);
1698
+ right: anchor(left);
1699
+ bottom: unset;
1700
+ left: unset;
1701
+ margin: 0;
1702
+ margin-right: var(--bds-space_xs, 8px);
1703
+ }
1704
+ `;
1705
+ static properties = {
1706
+ placement: { type: String, reflect: true },
1707
+ open: { type: Boolean, reflect: true }
1708
+ };
1709
+ _anchorName;
1710
+ constructor() {
1711
+ super();
1712
+ this.placement = "bottom";
1713
+ this.open = false;
1714
+ const uid = Math.random().toString(36).slice(2, 8);
1715
+ this._anchorName = `--bds-popover-${uid}`;
1716
+ }
1717
+ connectedCallback() {
1718
+ super.connectedCallback();
1719
+ this.style.setProperty("--bds-popover-anchor", this._anchorName);
1720
+ document.addEventListener("keydown", this._onKeydown);
1721
+ document.addEventListener("mousedown", this._onOutsideClick);
1722
+ }
1723
+ disconnectedCallback() {
1724
+ super.disconnectedCallback();
1725
+ document.removeEventListener("keydown", this._onKeydown);
1726
+ document.removeEventListener("mousedown", this._onOutsideClick);
1727
+ }
1728
+ _onKeydown = (e3) => {
1729
+ if (this.open && e3.key === "Escape") this._close();
1730
+ };
1731
+ _onOutsideClick = (e3) => {
1732
+ if (this.open && !this.contains(e3.target)) this._close();
1733
+ };
1734
+ _toggle() {
1735
+ if (this.open) {
1736
+ this._close();
1737
+ } else {
1738
+ this._open();
1739
+ }
1740
+ }
1741
+ _open() {
1742
+ this.open = true;
1743
+ this.dispatchEvent(new CustomEvent("bds-open", { bubbles: true, composed: true }));
1744
+ }
1745
+ _close() {
1746
+ this.open = false;
1747
+ this.dispatchEvent(new CustomEvent("bds-close", { bubbles: true, composed: true }));
1748
+ }
1749
+ render() {
1750
+ return T`
1751
+ <span class="wrapper">
1752
+ <slot name="trigger" @click=${this._toggle}></slot>
1753
+ </span>
1754
+ <div
1755
+ class="panel ${this.open ? "open" : ""}"
1756
+ data-placement=${this.placement}
1757
+ role="region"
1758
+ aria-label="Popover"
1759
+ >
1760
+ <slot></slot>
1761
+ </div>
1762
+ `;
1763
+ }
1764
+ };
1765
+ customElements.define("bds-popover", BdsPopover);
1766
+
1767
+ // src/web-components/interaction/bds-toast-provider.ts
1768
+ var BdsToastProvider = class extends i3 {
1769
+ static styles = i`
1770
+ :host {
1771
+ display: contents;
1772
+ }
1773
+
1774
+ .container {
1775
+ /* Reset UA popover defaults */
1776
+ position: fixed;
1777
+ inset: unset;
1778
+ bottom: var(--bds-space_xl, 2rem);
1779
+ right: var(--bds-space_xl, 2rem);
1780
+ display: flex;
1781
+ flex-direction: column;
1782
+ gap: var(--bds-space_m, 1rem);
1783
+ border: none;
1784
+ padding: 0;
1785
+ background: transparent;
1786
+ }
1787
+
1788
+ .toast {
1789
+ padding: var(--bds-space_m) var(--bds-space_l);
1790
+ background-color: var(--toast_color, var(--bds-color_bg));
1791
+ color: var(--toast_on-color, var(--bds-color_on-bg));
1792
+ border-radius: var(--bds-border_radius--s);
1793
+ box-shadow: var(--bds-shadow_s);
1794
+ display: flex;
1795
+ align-items: center;
1796
+ gap: var(--bds-space_m);
1797
+ min-width: 300px;
1798
+ }
1799
+
1800
+ .toast.--variant_success {
1801
+ --toast_color: var(--bds-color_success);
1802
+ --toast_on-color: var(--bds-color_on-success);
1803
+ }
1804
+
1805
+ .toast.--variant_warning {
1806
+ --toast_color: var(--bds-color_warning);
1807
+ --toast_on-color: var(--bds-color_on-warning);
1808
+ }
1809
+
1810
+ .toast.--variant_info {
1811
+ --toast_color: var(--bds-color_bg--subtle);
1812
+ --toast_on-color: var(--bds-color_on-bg--subtle);
1813
+ }
1814
+
1815
+ .toast.--variant_error {
1816
+ --toast_color: var(--bds-color_error);
1817
+ --toast_on-color: var(--bds-color_on-error);
1818
+ }
1819
+
1820
+ .message {
1821
+ flex: 1;
1822
+ }
1823
+
1824
+ .close {
1825
+ display: flex;
1826
+ align-items: center;
1827
+ justify-content: center;
1828
+ flex-shrink: 0;
1829
+ width: 1.25rem;
1830
+ height: 1.25rem;
1831
+ padding: 0;
1832
+ background: none;
1833
+ border: none;
1834
+ cursor: pointer;
1835
+ color: var(--toast_on-color);
1836
+ }
1837
+
1838
+ .close svg {
1839
+ width: 1rem;
1840
+ height: 1rem;
1841
+ }
1842
+ `;
1843
+ static properties = {
1844
+ _toasts: { state: true }
1845
+ };
1846
+ constructor() {
1847
+ super();
1848
+ this._toasts = [];
1849
+ }
1850
+ connectedCallback() {
1851
+ super.connectedCallback();
1852
+ document.addEventListener("bds-show-toast", this._onShowToastEvent);
1853
+ }
1854
+ disconnectedCallback() {
1855
+ super.disconnectedCallback();
1856
+ document.removeEventListener("bds-show-toast", this._onShowToastEvent);
1857
+ }
1858
+ // Sync the popover's top-layer visibility with the toast queue —
1859
+ // mirrors Toast.tsx's useEffect([toasts.length]).
1860
+ updated() {
1861
+ const container = this.shadowRoot?.querySelector("[popover]");
1862
+ if (!container) return;
1863
+ if (this._toasts.length > 0) {
1864
+ container.showPopover?.();
1865
+ } else {
1866
+ try {
1867
+ container.hidePopover?.();
1868
+ } catch {
1869
+ }
1870
+ }
1871
+ }
1872
+ showToast(message, variant = "info") {
1873
+ const id = Math.random().toString(36).slice(2, 9);
1874
+ this._toasts = [...this._toasts, { id, message, variant }];
1875
+ setTimeout(() => this._removeToast(id), 5e3);
1876
+ }
1877
+ _removeToast(id) {
1878
+ this._toasts = this._toasts.filter((t3) => t3.id !== id);
1879
+ }
1880
+ _onShowToastEvent = (e3) => {
1881
+ const { message, variant } = e3.detail ?? {};
1882
+ if (message) this.showToast(message, variant);
1883
+ };
1884
+ static show(message, variant) {
1885
+ const provider = document.querySelector("bds-toast-provider");
1886
+ provider?.showToast(message, variant ?? "info");
1887
+ }
1888
+ render() {
1889
+ return T`
1890
+ <slot></slot>
1891
+ <div
1892
+ popover="manual"
1893
+ role="region"
1894
+ aria-label="Notifications"
1895
+ class="container"
1896
+ >
1897
+ ${this._toasts.map((t3) => T`
1898
+ <div
1899
+ class="toast --variant_${t3.variant}"
1900
+ role="status"
1901
+ aria-live="polite"
1902
+ aria-atomic="true"
1903
+ >
1904
+ <span class="message">${t3.message}</span>
1905
+ <button
1906
+ type="button"
1907
+ class="close"
1908
+ @click=${() => this._removeToast(t3.id)}
1909
+ aria-label="Dismiss"
1910
+ >
1911
+ <svg aria-hidden="true" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
1912
+ <path stroke-linecap="round" stroke-linejoin="round" d="M18 6L6 18M6 6l12 12" />
1913
+ </svg>
1914
+ </button>
1915
+ </div>
1916
+ `)}
1917
+ </div>
1918
+ `;
1919
+ }
1920
+ };
1921
+ customElements.define("bds-toast-provider", BdsToastProvider);
1922
+ export {
1923
+ BdsAlert,
1924
+ BdsBadge,
1925
+ BdsButton,
1926
+ BdsPopover,
1927
+ BdsToastProvider
1928
+ };
1929
+ /*! Bundled license information:
1930
+
1931
+ @lit-labs/ssr-dom-shim/lib/element-internals.js:
1932
+ @lit-labs/ssr-dom-shim/lib/events.js:
1933
+ (**
1934
+ * @license
1935
+ * Copyright 2023 Google LLC
1936
+ * SPDX-License-Identifier: BSD-3-Clause
1937
+ *)
1938
+
1939
+ @lit-labs/ssr-dom-shim/lib/css.js:
1940
+ (**
1941
+ * @license
1942
+ * Copyright 2024 Google LLC
1943
+ * SPDX-License-Identifier: BSD-3-Clause
1944
+ *)
1945
+
1946
+ @lit-labs/ssr-dom-shim/index.js:
1947
+ @lit/reactive-element/node/css-tag.js:
1948
+ (**
1949
+ * @license
1950
+ * Copyright 2019 Google LLC
1951
+ * SPDX-License-Identifier: BSD-3-Clause
1952
+ *)
1953
+
1954
+ lit-html/node/lit-html.js:
1955
+ lit-element/lit-element.js:
1956
+ (**
1957
+ * @license
1958
+ * Copyright 2017 Google LLC
1959
+ * SPDX-License-Identifier: BSD-3-Clause
1960
+ *)
1961
+
1962
+ lit-html/node/is-server.js:
1963
+ (**
1964
+ * @license
1965
+ * Copyright 2022 Google LLC
1966
+ * SPDX-License-Identifier: BSD-3-Clause
1967
+ *)
1968
+ */