jynko-kit 0.0.0-stage → 1.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 (180) hide show
  1. package/README.md +110 -2
  2. package/dist/components/atoms/AAvatar/AAvatar.d.ts +12 -0
  3. package/dist/components/atoms/AAvatar/AAvatar.d.ts.map +1 -0
  4. package/dist/components/atoms/AAvatar/AAvatar.styles.d.ts +7 -0
  5. package/dist/components/atoms/AAvatar/AAvatar.styles.d.ts.map +1 -0
  6. package/dist/components/atoms/AAvatar/index.d.ts +3 -0
  7. package/dist/components/atoms/AAvatar/index.d.ts.map +1 -0
  8. package/dist/components/atoms/AAvatar/types.d.ts +2 -0
  9. package/dist/components/atoms/AAvatar/types.d.ts.map +1 -0
  10. package/dist/components/atoms/ABadge/ABadge.d.ts +10 -0
  11. package/dist/components/atoms/ABadge/ABadge.d.ts.map +1 -0
  12. package/dist/components/atoms/ABadge/ABadge.styles.d.ts +8 -0
  13. package/dist/components/atoms/ABadge/ABadge.styles.d.ts.map +1 -0
  14. package/dist/components/atoms/ABadge/index.d.ts +3 -0
  15. package/dist/components/atoms/ABadge/index.d.ts.map +1 -0
  16. package/dist/components/atoms/ABadge/types.d.ts +3 -0
  17. package/dist/components/atoms/ABadge/types.d.ts.map +1 -0
  18. package/dist/components/atoms/AButton/AButton.d.ts +10 -0
  19. package/dist/components/atoms/AButton/AButton.d.ts.map +1 -0
  20. package/dist/components/atoms/AButton/AButton.styles.d.ts +15 -0
  21. package/dist/components/atoms/AButton/AButton.styles.d.ts.map +1 -0
  22. package/dist/components/atoms/AButton/index.d.ts +3 -0
  23. package/dist/components/atoms/AButton/index.d.ts.map +1 -0
  24. package/dist/components/atoms/AButton/types.d.ts +2 -0
  25. package/dist/components/atoms/AButton/types.d.ts.map +1 -0
  26. package/dist/components/atoms/AIcon/AIcon.d.ts +12 -0
  27. package/dist/components/atoms/AIcon/AIcon.d.ts.map +1 -0
  28. package/dist/components/atoms/AIcon/AIcon.styles.d.ts +8 -0
  29. package/dist/components/atoms/AIcon/AIcon.styles.d.ts.map +1 -0
  30. package/dist/components/atoms/AIcon/index.d.ts +3 -0
  31. package/dist/components/atoms/AIcon/index.d.ts.map +1 -0
  32. package/dist/components/atoms/AIconButton/AIconButton.d.ts +17 -0
  33. package/dist/components/atoms/AIconButton/AIconButton.d.ts.map +1 -0
  34. package/dist/components/atoms/AIconButton/AIconButton.styles.d.ts +11 -0
  35. package/dist/components/atoms/AIconButton/AIconButton.styles.d.ts.map +1 -0
  36. package/dist/components/atoms/AIconButton/index.d.ts +3 -0
  37. package/dist/components/atoms/AIconButton/index.d.ts.map +1 -0
  38. package/dist/components/atoms/AIconLink/AIconLink.d.ts +17 -0
  39. package/dist/components/atoms/AIconLink/AIconLink.d.ts.map +1 -0
  40. package/dist/components/atoms/AIconLink/AIconLink.styles.d.ts +11 -0
  41. package/dist/components/atoms/AIconLink/AIconLink.styles.d.ts.map +1 -0
  42. package/dist/components/atoms/AIconLink/index.d.ts +3 -0
  43. package/dist/components/atoms/AIconLink/index.d.ts.map +1 -0
  44. package/dist/components/atoms/AInput/AInput.d.ts +11 -0
  45. package/dist/components/atoms/AInput/AInput.d.ts.map +1 -0
  46. package/dist/components/atoms/AInput/AInput.styles.d.ts +26 -0
  47. package/dist/components/atoms/AInput/AInput.styles.d.ts.map +1 -0
  48. package/dist/components/atoms/AInput/index.d.ts +3 -0
  49. package/dist/components/atoms/AInput/index.d.ts.map +1 -0
  50. package/dist/components/atoms/ALink/ALink.d.ts +11 -0
  51. package/dist/components/atoms/ALink/ALink.d.ts.map +1 -0
  52. package/dist/components/atoms/ALink/ALink.styles.d.ts +8 -0
  53. package/dist/components/atoms/ALink/ALink.styles.d.ts.map +1 -0
  54. package/dist/components/atoms/ALink/index.d.ts +3 -0
  55. package/dist/components/atoms/ALink/index.d.ts.map +1 -0
  56. package/dist/components/atoms/ALogo/ALogo.d.ts +4 -0
  57. package/dist/components/atoms/ALogo/ALogo.d.ts.map +1 -0
  58. package/dist/components/atoms/ALogo/ALogo.styles.d.ts +9 -0
  59. package/dist/components/atoms/ALogo/ALogo.styles.d.ts.map +1 -0
  60. package/dist/components/atoms/ALogo/index.d.ts +3 -0
  61. package/dist/components/atoms/ALogo/index.d.ts.map +1 -0
  62. package/dist/components/atoms/ALogo/types.d.ts +8 -0
  63. package/dist/components/atoms/ALogo/types.d.ts.map +1 -0
  64. package/dist/components/atoms/ASearchInput/ASearchInput.d.ts +16 -0
  65. package/dist/components/atoms/ASearchInput/ASearchInput.d.ts.map +1 -0
  66. package/dist/components/atoms/ASearchInput/ASearchInput.styles.d.ts +22 -0
  67. package/dist/components/atoms/ASearchInput/ASearchInput.styles.d.ts.map +1 -0
  68. package/dist/components/atoms/ASearchInput/index.d.ts +3 -0
  69. package/dist/components/atoms/ASearchInput/index.d.ts.map +1 -0
  70. package/dist/components/atoms/ASection/ASection.d.ts +6 -0
  71. package/dist/components/atoms/ASection/ASection.d.ts.map +1 -0
  72. package/dist/components/atoms/ASection/ASection.styles.d.ts +6 -0
  73. package/dist/components/atoms/ASection/ASection.styles.d.ts.map +1 -0
  74. package/dist/components/atoms/ASection/index.d.ts +3 -0
  75. package/dist/components/atoms/ASection/index.d.ts.map +1 -0
  76. package/dist/components/atoms/ASelect/ASelect.d.ts +19 -0
  77. package/dist/components/atoms/ASelect/ASelect.d.ts.map +1 -0
  78. package/dist/components/atoms/ASelect/ASelect.styles.d.ts +38 -0
  79. package/dist/components/atoms/ASelect/ASelect.styles.d.ts.map +1 -0
  80. package/dist/components/atoms/ASelect/index.d.ts +3 -0
  81. package/dist/components/atoms/ASelect/index.d.ts.map +1 -0
  82. package/dist/components/atoms/ATextarea/ATextarea.d.ts +11 -0
  83. package/dist/components/atoms/ATextarea/ATextarea.d.ts.map +1 -0
  84. package/dist/components/atoms/ATextarea/ATextarea.styles.d.ts +20 -0
  85. package/dist/components/atoms/ATextarea/ATextarea.styles.d.ts.map +1 -0
  86. package/dist/components/atoms/ATextarea/index.d.ts +3 -0
  87. package/dist/components/atoms/ATextarea/index.d.ts.map +1 -0
  88. package/dist/components/atoms/ATypography/ATypography.d.ts +8 -0
  89. package/dist/components/atoms/ATypography/ATypography.d.ts.map +1 -0
  90. package/dist/components/atoms/ATypography/ATypography.styles.d.ts +8 -0
  91. package/dist/components/atoms/ATypography/ATypography.styles.d.ts.map +1 -0
  92. package/dist/components/atoms/ATypography/index.d.ts +3 -0
  93. package/dist/components/atoms/ATypography/index.d.ts.map +1 -0
  94. package/dist/components/atoms/index.d.ts +29 -0
  95. package/dist/components/atoms/index.d.ts.map +1 -0
  96. package/dist/components/index.d.ts +7 -0
  97. package/dist/components/index.d.ts.map +1 -0
  98. package/dist/components/molecules/MModal/MModal.d.ts +4 -0
  99. package/dist/components/molecules/MModal/MModal.d.ts.map +1 -0
  100. package/dist/components/molecules/MModal/MModal.styles.d.ts +19 -0
  101. package/dist/components/molecules/MModal/MModal.styles.d.ts.map +1 -0
  102. package/dist/components/molecules/MModal/index.d.ts +3 -0
  103. package/dist/components/molecules/MModal/index.d.ts.map +1 -0
  104. package/dist/components/molecules/MModal/types.d.ts +10 -0
  105. package/dist/components/molecules/MModal/types.d.ts.map +1 -0
  106. package/dist/components/molecules/MNavLinks/MNavLinks.d.ts +8 -0
  107. package/dist/components/molecules/MNavLinks/MNavLinks.d.ts.map +1 -0
  108. package/dist/components/molecules/MNavLinks/MNavLinks.styles.d.ts +7 -0
  109. package/dist/components/molecules/MNavLinks/MNavLinks.styles.d.ts.map +1 -0
  110. package/dist/components/molecules/MNavLinks/index.d.ts +3 -0
  111. package/dist/components/molecules/MNavLinks/index.d.ts.map +1 -0
  112. package/dist/components/molecules/MNavLinks/types.d.ts +22 -0
  113. package/dist/components/molecules/MNavLinks/types.d.ts.map +1 -0
  114. package/dist/components/molecules/MUserBadge/MUserBadge.d.ts +4 -0
  115. package/dist/components/molecules/MUserBadge/MUserBadge.d.ts.map +1 -0
  116. package/dist/components/molecules/MUserBadge/MUserBadge.styles.d.ts +4 -0
  117. package/dist/components/molecules/MUserBadge/MUserBadge.styles.d.ts.map +1 -0
  118. package/dist/components/molecules/MUserBadge/index.d.ts +3 -0
  119. package/dist/components/molecules/MUserBadge/index.d.ts.map +1 -0
  120. package/dist/components/molecules/MUserBadge/types.d.ts +11 -0
  121. package/dist/components/molecules/MUserBadge/types.d.ts.map +1 -0
  122. package/dist/components/molecules/index.d.ts +7 -0
  123. package/dist/components/molecules/index.d.ts.map +1 -0
  124. package/dist/components/organisms/OSidebar/OSidebar.d.ts +13 -0
  125. package/dist/components/organisms/OSidebar/OSidebar.d.ts.map +1 -0
  126. package/dist/components/organisms/OSidebar/OSidebar.styles.d.ts +22 -0
  127. package/dist/components/organisms/OSidebar/OSidebar.styles.d.ts.map +1 -0
  128. package/dist/components/organisms/OSidebar/index.d.ts +3 -0
  129. package/dist/components/organisms/OSidebar/index.d.ts.map +1 -0
  130. package/dist/components/organisms/OSidebar/types.d.ts +9 -0
  131. package/dist/components/organisms/OSidebar/types.d.ts.map +1 -0
  132. package/dist/components/organisms/OUserCamera/OUserCamera.d.ts +4 -0
  133. package/dist/components/organisms/OUserCamera/OUserCamera.d.ts.map +1 -0
  134. package/dist/components/organisms/OUserCamera/OUserCamera.styles.d.ts +20 -0
  135. package/dist/components/organisms/OUserCamera/OUserCamera.styles.d.ts.map +1 -0
  136. package/dist/components/organisms/OUserCamera/index.d.ts +3 -0
  137. package/dist/components/organisms/OUserCamera/index.d.ts.map +1 -0
  138. package/dist/components/organisms/OUserCamera/types.d.ts +12 -0
  139. package/dist/components/organisms/OUserCamera/types.d.ts.map +1 -0
  140. package/dist/components/organisms/index.d.ts +5 -0
  141. package/dist/components/organisms/index.d.ts.map +1 -0
  142. package/dist/index.cjs +932 -0
  143. package/dist/index.cjs.map +1 -0
  144. package/dist/index.d.ts +7 -0
  145. package/dist/index.d.ts.map +1 -0
  146. package/dist/index.js +3234 -0
  147. package/dist/index.js.map +1 -0
  148. package/dist/providers/JynkoProvider/JynkoProvider.d.ts +8 -0
  149. package/dist/providers/JynkoProvider/JynkoProvider.d.ts.map +1 -0
  150. package/dist/providers/JynkoProvider/index.d.ts +3 -0
  151. package/dist/providers/JynkoProvider/index.d.ts.map +1 -0
  152. package/dist/providers/index.d.ts +3 -0
  153. package/dist/providers/index.d.ts.map +1 -0
  154. package/dist/shared/hooks/index.d.ts +2 -0
  155. package/dist/shared/hooks/index.d.ts.map +1 -0
  156. package/dist/shared/hooks/usePressState.d.ts +19 -0
  157. package/dist/shared/hooks/usePressState.d.ts.map +1 -0
  158. package/dist/shared/index.d.ts +6 -0
  159. package/dist/shared/index.d.ts.map +1 -0
  160. package/dist/shared/styles/GlobalStyles.d.ts +2 -0
  161. package/dist/shared/styles/GlobalStyles.d.ts.map +1 -0
  162. package/dist/shared/styles/componentMetrics.d.ts +11 -0
  163. package/dist/shared/styles/componentMetrics.d.ts.map +1 -0
  164. package/dist/shared/styles/index.d.ts +4 -0
  165. package/dist/shared/styles/index.d.ts.map +1 -0
  166. package/dist/shared/styles/theme.d.ts +254 -0
  167. package/dist/shared/styles/theme.d.ts.map +1 -0
  168. package/dist/shared/types/button.d.ts +3 -0
  169. package/dist/shared/types/button.d.ts.map +1 -0
  170. package/dist/shared/types/index.d.ts +2 -0
  171. package/dist/shared/types/index.d.ts.map +1 -0
  172. package/dist/shared/types/link.d.ts +3 -0
  173. package/dist/shared/types/link.d.ts.map +1 -0
  174. package/dist/shared/utils/color.d.ts +2 -0
  175. package/dist/shared/utils/color.d.ts.map +1 -0
  176. package/dist/shared/utils/index.d.ts +3 -0
  177. package/dist/shared/utils/index.d.ts.map +1 -0
  178. package/dist/shared/utils/tokens.d.ts +3 -0
  179. package/dist/shared/utils/tokens.d.ts.map +1 -0
  180. package/package.json +116 -4
package/dist/index.js ADDED
@@ -0,0 +1,3234 @@
1
+ import * as e from "react";
2
+ import { useEffect as t, useId as n, useRef as r, useState as i } from "react";
3
+ import { ThemeProvider as a, createGlobalStyle as o, css as s, styled as c } from "styled-components";
4
+ import { jsx as l, jsxs as u } from "react/jsx-runtime";
5
+ import { createPortal as d } from "react-dom";
6
+ // src/shared/utils/color.ts
7
+ function f(e, t) {
8
+ return `color-mix(in srgb, ${e} 88%, ${t})`;
9
+ }
10
+ // src/shared/styles/theme.ts
11
+ var p = {
12
+ bg: "#0f172a",
13
+ surface: "#1e293b",
14
+ background: "#edf7f6",
15
+ text: "#0f172a",
16
+ muted: "#94a3b8",
17
+ primary: "#38bdf8",
18
+ primaryHover: "#7dd3fc",
19
+ primaryText: "#0f172a",
20
+ secondary: "#334155",
21
+ secondaryHover: "#475569",
22
+ ink: "#000000",
23
+ error: "#dc2626",
24
+ success: "#16a34a",
25
+ warning: "#d97706"
26
+ }, m = "30px", h = {
27
+ width: "3px",
28
+ offset: "2px",
29
+ colorMix: "45%"
30
+ }, g = {
31
+ regular: 400,
32
+ semibold: 600,
33
+ bold: 700
34
+ }, _ = {
35
+ colors: p,
36
+ opacity: {
37
+ disabled: .6,
38
+ disabledButton: .55
39
+ },
40
+ radius: {
41
+ sm: "6px",
42
+ md: "10px",
43
+ lg: "16px",
44
+ full: "9999px"
45
+ },
46
+ space: {
47
+ xs: "0.25rem",
48
+ sm: "0.5rem",
49
+ md: "0.75rem",
50
+ lg: "1rem",
51
+ inset: "10px",
52
+ components: {
53
+ button: {
54
+ sm: "0.25rem",
55
+ md: "0.5rem",
56
+ lg: "0.75rem"
57
+ },
58
+ badge: {
59
+ sm: "0.25rem",
60
+ md: "0.5rem",
61
+ lg: "0.75rem"
62
+ },
63
+ link: {
64
+ sm: "0.25rem",
65
+ md: "0.5rem",
66
+ lg: "0.75rem"
67
+ },
68
+ iconButton: {
69
+ sm: "0.25rem",
70
+ md: "0.5rem",
71
+ lg: "0.75rem"
72
+ },
73
+ iconLink: {
74
+ sm: "0.25rem",
75
+ md: "0.5rem",
76
+ lg: "0.75rem"
77
+ }
78
+ }
79
+ },
80
+ font: {
81
+ sans: "'Segoe UI', system-ui, -apple-system, sans-serif",
82
+ weight: g
83
+ },
84
+ typography: {
85
+ fallback: "1rem",
86
+ h1: "2.5rem",
87
+ h2: "2rem",
88
+ h3: "1.75rem",
89
+ h4: "1.5rem",
90
+ h5: "1.25rem",
91
+ h6: "1.125rem",
92
+ small: "0.875rem",
93
+ sub: "0.75rem",
94
+ sup: "0.75rem"
95
+ },
96
+ avatar: {
97
+ border: `2px solid ${p.ink}`,
98
+ borderRadius: "50%",
99
+ fontWeight: g.semibold,
100
+ sizes: {
101
+ sm: {
102
+ diameter: "32px",
103
+ fontSize: "12px"
104
+ },
105
+ md: {
106
+ diameter: "40px",
107
+ fontSize: "14px"
108
+ },
109
+ lg: {
110
+ diameter: "48px",
111
+ fontSize: "16px"
112
+ }
113
+ }
114
+ },
115
+ icon: { sizes: {
116
+ sm: "1rem",
117
+ md: "1.25rem",
118
+ lg: "1.5rem"
119
+ } },
120
+ logo: {
121
+ size: "36px",
122
+ fontSize: "1rem",
123
+ fontWeight: g.bold,
124
+ whiteSpace: "nowrap"
125
+ },
126
+ sidebar: {
127
+ width: {
128
+ compact: "64px",
129
+ extended: "240px"
130
+ },
131
+ height: {
132
+ fallback: "100vh",
133
+ dynamic: "100dvh"
134
+ },
135
+ border: `2px solid ${p.ink}`,
136
+ borderRadius: "16px"
137
+ },
138
+ camera: {
139
+ border: `2px solid ${p.ink}`,
140
+ borderRadius: "12px",
141
+ nameBorderRadius: "4px",
142
+ nameMaxWidthOffset: "64px",
143
+ fallbackFontSize: "clamp(2rem, 8vw, 5rem)",
144
+ fallbackFontWeight: g.bold
145
+ },
146
+ shadow: {
147
+ offsetX: "2px",
148
+ offsetY: "3px",
149
+ button: `2px 3px 0 0 ${p.ink}`,
150
+ link: `2px 3px 0 0 ${p.ink}`,
151
+ navLinks: `2px 3px 0 0 ${p.ink}`,
152
+ section: `3px 5px 0 0 ${p.ink}`,
153
+ modal: `3px 5px 0 0 ${p.ink}`,
154
+ sidebar: `3px 5px 0 0 ${p.ink}`
155
+ },
156
+ button: {
157
+ border: `2px solid ${p.ink}`,
158
+ borderRadius: "8px",
159
+ focus: h,
160
+ padding: "16px",
161
+ fontSize: "14px",
162
+ textDecoration: "none",
163
+ textTransform: "uppercase"
164
+ },
165
+ iconButton: {
166
+ border: `2px solid ${p.ink}`,
167
+ borderRadius: "8px",
168
+ focus: h
169
+ },
170
+ iconLink: {
171
+ border: `2px solid ${p.ink}`,
172
+ borderRadius: "8px",
173
+ focus: h
174
+ },
175
+ badge: {
176
+ border: `2px solid ${p.ink}`,
177
+ borderRadius: "8px",
178
+ fontSize: "14px",
179
+ textTransform: "uppercase"
180
+ },
181
+ link: {
182
+ border: `2px solid ${p.ink}`,
183
+ borderRadius: "8px",
184
+ focus: h,
185
+ padding: "16px",
186
+ fontSize: "14px",
187
+ textDecoration: "none",
188
+ textTransform: "uppercase"
189
+ },
190
+ navLinks: {
191
+ border: `2px solid ${p.ink}`,
192
+ borderRadius: "8px",
193
+ focus: h,
194
+ padding: "0",
195
+ fontSize: "14px",
196
+ textDecoration: "none",
197
+ textTransform: "uppercase",
198
+ itemPadding: "16px"
199
+ },
200
+ formControl: {
201
+ border: `2px solid ${p.ink}`,
202
+ borderRadius: "8px",
203
+ padding: "16px",
204
+ height: "3.5rem",
205
+ textareaHeight: "3rem",
206
+ dropdownBorder: `2px solid ${p.ink}`,
207
+ optionListMaxHeight: "16rem",
208
+ focus: h,
209
+ trailingActionPadding: "3.25rem",
210
+ fontSize: "14px",
211
+ optionTextTransform: "none"
212
+ },
213
+ userBadge: {
214
+ focus: h,
215
+ textDecoration: "none"
216
+ },
217
+ section: {
218
+ border: `2px solid ${p.ink}`,
219
+ borderRadius: "16px",
220
+ padding: m
221
+ },
222
+ modal: {
223
+ padding: m,
224
+ maxWidth: "720px",
225
+ maxHeight: "80vh",
226
+ border: `2px solid ${p.ink}`,
227
+ borderRadius: "16px",
228
+ title: {
229
+ fontSize: "1.25rem",
230
+ fontWeight: g.semibold
231
+ },
232
+ body: { fontSize: "1rem" }
233
+ }
234
+ };
235
+ // src/shared/utils/tokens.ts
236
+ function v(e) {
237
+ return e?.colors ? e : _;
238
+ }
239
+ // src/components/atoms/AAvatar/AAvatar.styles.ts
240
+ var y = c.span`
241
+ display: inline-flex;
242
+ flex: 0 0 auto;
243
+ align-items: center;
244
+ justify-content: center;
245
+ overflow: hidden;
246
+ border: ${({ theme: e }) => v(e).avatar.border};
247
+ border-radius: ${({ theme: e }) => v(e).avatar.borderRadius};
248
+ background: ${({ theme: e }) => v(e).colors.secondary};
249
+ color: ${({ theme: e }) => v(e).colors.text};
250
+ font-family: ${({ theme: e }) => v(e).font.sans};
251
+ font-weight: ${({ theme: e }) => v(e).avatar.fontWeight};
252
+ width: ${({ $size: e, theme: t }) => v(t).avatar.sizes[e].diameter};
253
+ height: ${({ $size: e, theme: t }) => v(t).avatar.sizes[e].diameter};
254
+ font-size: ${({ $size: e, theme: t }) => v(t).avatar.sizes[e].fontSize};
255
+
256
+ & > img {
257
+ width: 100%;
258
+ height: 100%;
259
+ object-fit: cover;
260
+ }
261
+ `;
262
+ // src/components/atoms/AAvatar/AAvatar.tsx
263
+ function b({ firstName: e, lastName: t, src: n, alt: r, size: a = "md", ...o }) {
264
+ let [s, c] = i(), u = `${e} ${t}`.trim(), d = r ?? u, f = `${e.charAt(0)}${t.charAt(0)}`.toUpperCase(), p = !!(n && s !== n);
265
+ return /* @__PURE__ */ l(y, {
266
+ $size: a,
267
+ role: p ? void 0 : "img",
268
+ "aria-label": p ? void 0 : d,
269
+ ...o,
270
+ children: p ? /* @__PURE__ */ l("img", {
271
+ src: n,
272
+ alt: d,
273
+ onError: () => {
274
+ c(n);
275
+ }
276
+ }) : f
277
+ });
278
+ }
279
+ // src/shared/styles/componentMetrics.ts
280
+ var x = s`
281
+ display: grid;
282
+ gap: ${({ theme: e }) => v(e).space.sm};
283
+ width: 100%;
284
+ `, S = (e) => ({
285
+ sm: s`
286
+ padding: ${({ theme: t }) => v(t).space.components[e].sm};
287
+ `,
288
+ md: s`
289
+ padding: ${({ theme: t }) => v(t).space.components[e].md};
290
+ `,
291
+ lg: s`
292
+ padding: ${({ theme: t }) => v(t).space.components[e].lg};
293
+ `
294
+ }), C = s`
295
+ padding: ${({ theme: e }) => `${v(e).space.md} ${v(e).space.lg}`};
296
+ `, w = (e) => s`
297
+ &:focus-visible {
298
+ outline: ${({ theme: t }) => `${v(t)[e].focus.width} solid color-mix(in srgb, ${v(t).colors.primary} ${v(t)[e].focus.colorMix}, transparent)`};
299
+ outline-offset: ${({ theme: t }) => v(t)[e].focus.offset};
300
+ }
301
+ `, T = S("badge"), E = {
302
+ default: s`
303
+ background: ${({ theme: e }) => v(e).colors.secondary};
304
+ color: ${({ theme: e }) => v(e).colors.text};
305
+ `,
306
+ info: s`
307
+ background: ${({ theme: e }) => v(e).colors.primary};
308
+ color: ${({ theme: e }) => v(e).colors.primaryText};
309
+ `,
310
+ success: s`
311
+ background: ${({ theme: e }) => v(e).colors.success};
312
+ color: ${({ theme: e }) => v(e).colors.text};
313
+ `,
314
+ warning: s`
315
+ background: ${({ theme: e }) => v(e).colors.warning};
316
+ color: ${({ theme: e }) => v(e).colors.text};
317
+ `,
318
+ error: s`
319
+ background: ${({ theme: e }) => v(e).colors.error};
320
+ color: ${({ theme: e }) => v(e).colors.text};
321
+ `
322
+ }, D = c.span`
323
+ display: inline-flex;
324
+ align-items: center;
325
+ justify-content: center;
326
+ gap: ${({ theme: e }) => v(e).space.sm};
327
+ border: ${({ theme: e }) => v(e).badge.border};
328
+ border-radius: ${({ theme: e }) => v(e).badge.borderRadius};
329
+ font-family: ${({ theme: e }) => v(e).font.sans};
330
+ font-size: ${({ theme: e }) => v(e).badge.fontSize};
331
+ font-weight: ${({ theme: e }) => v(e).font.weight.semibold};
332
+ text-transform: ${({ theme: e }) => v(e).badge.textTransform};
333
+
334
+ ${({ $size: e }) => T[e]}
335
+ ${({ $variant: e }) => E[e]}
336
+ `;
337
+ // src/components/atoms/ABadge/ABadge.tsx
338
+ function O({ children: e, size: t = "md", variant: n = "default", ...r }) {
339
+ return /* @__PURE__ */ l(D, {
340
+ $size: t,
341
+ $variant: n,
342
+ ...r,
343
+ children: e
344
+ });
345
+ }
346
+ // src/shared/hooks/usePressState.ts
347
+ var k = 150;
348
+ function A({ disabled: e, onPointerDown: n, onPointerUp: a, onPointerCancel: o, onLostPointerCapture: s }) {
349
+ let [c, l] = i(!1), u = r(0), d = r(null);
350
+ t(() => () => {
351
+ d.current && clearTimeout(d.current);
352
+ }, []);
353
+ let f = () => {
354
+ d.current && clearTimeout(d.current);
355
+ }, p = () => {
356
+ if (!u.current) return;
357
+ let e = performance.now() - u.current, t = Math.max(0, k - e);
358
+ f(), d.current = setTimeout(() => {
359
+ l(!1), u.current = 0, d.current = null;
360
+ }, t);
361
+ };
362
+ return {
363
+ pressed: c,
364
+ pressHandlers: {
365
+ onPointerDown: (t) => {
366
+ n?.(t), t.defaultPrevented || e || t.button !== 0 || (t.currentTarget.setPointerCapture(t.pointerId), f(), u.current = performance.now(), l(!0));
367
+ },
368
+ onPointerUp: (e) => {
369
+ a?.(e), p();
370
+ },
371
+ onPointerCancel: (e) => {
372
+ o?.(e), p();
373
+ },
374
+ onLostPointerCapture: (e) => {
375
+ s?.(e), p();
376
+ }
377
+ }
378
+ };
379
+ }
380
+ // src/components/atoms/AButton/AButton.styles.ts
381
+ var j = S("button"), ee = {
382
+ primary: s`
383
+ background: ${({ theme: e }) => v(e).colors.primary};
384
+ color: ${({ theme: e }) => v(e).colors.primaryText};
385
+
386
+ &:hover:not(:disabled) {
387
+ background: ${({ theme: e }) => f(v(e).colors.primary, v(e).colors.ink)};
388
+ }
389
+ `,
390
+ secondary: s`
391
+ background: ${({ theme: e }) => v(e).colors.secondary};
392
+ color: ${({ theme: e }) => v(e).colors.text};
393
+
394
+ &:hover:not(:disabled) {
395
+ background: ${({ theme: e }) => f(v(e).colors.secondary, v(e).colors.ink)};
396
+ }
397
+ `
398
+ }, M = s`
399
+ display: inline-flex;
400
+ align-items: center;
401
+ justify-content: center;
402
+ gap: ${({ theme: e }) => v(e).space.sm};
403
+ font-family: ${({ theme: e }) => v(e).font.sans};
404
+ font-size: ${({ theme: e }) => v(e).button.fontSize};
405
+ font-weight: ${({ theme: e }) => v(e).font.weight.semibold};
406
+ text-transform: ${({ theme: e }) => v(e).button.textTransform};
407
+ cursor: pointer;
408
+ transition:
409
+ background-color 0.15s ease,
410
+ transform 0.15s ease,
411
+ box-shadow 0.15s ease;
412
+ white-space: nowrap;
413
+
414
+ ${w("button")}
415
+
416
+ &:disabled {
417
+ opacity: ${({ theme: e }) => v(e).opacity.disabledButton};
418
+ cursor: not-allowed;
419
+ }
420
+ `, N = s`
421
+ border: ${({ theme: e }) => v(e).button.border};
422
+ box-shadow: ${({ theme: e }) => v(e).shadow.button};
423
+
424
+ &:active:not(:disabled),
425
+ &[data-pressed='true']:not(:disabled),
426
+ &:disabled {
427
+ transform: ${({ theme: e }) => `translate(${v(e).shadow.offsetX}, ${v(e).shadow.offsetY})`};
428
+ box-shadow: none;
429
+ }
430
+ `, P = s`
431
+ border-radius: ${({ theme: e }) => v(e).button.borderRadius};
432
+ `, F = s`
433
+ padding: ${({ theme: e }) => v(e).button.padding};
434
+ `, te = c.button`
435
+ ${M}
436
+ ${N}
437
+ ${P}
438
+ ${F}
439
+ ${({ $variant: e }) => ee[e]}
440
+ ${({ $size: e }) => j[e]}
441
+ `;
442
+ // src/components/atoms/AButton/AButton.tsx
443
+ function I({ children: e, variant: t = "primary", size: n = "md", type: r = "button", disabled: i, onPointerDown: a, onPointerUp: o, onPointerCancel: s, onLostPointerCapture: c, ...u }) {
444
+ let { pressed: d, pressHandlers: f } = A({
445
+ disabled: i,
446
+ onPointerDown: a,
447
+ onPointerUp: o,
448
+ onPointerCancel: s,
449
+ onLostPointerCapture: c
450
+ });
451
+ return /* @__PURE__ */ l(te, {
452
+ $size: n,
453
+ $variant: t,
454
+ type: r,
455
+ disabled: i,
456
+ "data-pressed": d ? "true" : void 0,
457
+ ...u,
458
+ ...f,
459
+ children: e
460
+ });
461
+ }
462
+ // src/components/atoms/AIcon/AIcon.styles.ts
463
+ var ne = {
464
+ default: (e) => v(e).colors.text,
465
+ error: (e) => v(e).colors.error,
466
+ success: (e) => v(e).colors.success,
467
+ warning: (e) => v(e).colors.warning
468
+ }, re = c.span`
469
+ display: inline-flex;
470
+ width: ${({ $size: e, theme: t }) => v(t).icon.sizes[e]};
471
+ height: ${({ $size: e, theme: t }) => v(t).icon.sizes[e]};
472
+ flex: 0 0 auto;
473
+ align-items: center;
474
+ justify-content: center;
475
+ color: ${({ $type: e, theme: t }) => ne[e](t)};
476
+
477
+ & > svg {
478
+ display: block;
479
+ width: 100%;
480
+ height: 100%;
481
+ }
482
+ `;
483
+ // src/components/atoms/AIcon/AIcon.tsx
484
+ function L({ children: e, size: t = "md", type: n = "default", title: r, "aria-label": i, ...a }) {
485
+ let o = r ?? i;
486
+ return /* @__PURE__ */ l(re, {
487
+ $size: t,
488
+ $type: n,
489
+ "aria-hidden": !o || void 0,
490
+ "aria-label": o,
491
+ role: o ? "img" : void 0,
492
+ title: r,
493
+ ...a,
494
+ children: e
495
+ });
496
+ }
497
+ // src/components/atoms/AIconButton/AIconButton.styles.ts
498
+ var ie = S("iconButton"), ae = {
499
+ primary: s`
500
+ background: ${({ theme: e }) => v(e).colors.primary};
501
+ color: ${({ theme: e }) => v(e).colors.primaryText};
502
+
503
+ &:hover:not(:disabled) {
504
+ background: ${({ theme: e }) => f(v(e).colors.primary, v(e).colors.ink)};
505
+ }
506
+ `,
507
+ secondary: s`
508
+ background: ${({ theme: e }) => v(e).colors.secondary};
509
+ color: ${({ theme: e }) => v(e).colors.text};
510
+
511
+ &:hover:not(:disabled) {
512
+ background: ${({ theme: e }) => f(v(e).colors.secondary, v(e).colors.ink)};
513
+ }
514
+ `
515
+ }, oe = s`
516
+ display: inline-flex;
517
+ align-items: center;
518
+ justify-content: center;
519
+ gap: ${({ theme: e }) => v(e).space.sm};
520
+ font-family: ${({ theme: e }) => v(e).font.sans};
521
+ font-size: ${({ theme: e }) => v(e).button.fontSize};
522
+ font-weight: ${({ theme: e }) => v(e).font.weight.semibold};
523
+ text-transform: ${({ theme: e }) => v(e).button.textTransform};
524
+ cursor: pointer;
525
+ transition:
526
+ background-color 0.15s ease,
527
+ transform 0.15s ease,
528
+ box-shadow 0.15s ease;
529
+
530
+ ${w("iconButton")}
531
+
532
+ &:disabled {
533
+ opacity: ${({ theme: e }) => v(e).opacity.disabledButton};
534
+ cursor: not-allowed;
535
+ }
536
+ `, se = s`
537
+ border: ${({ theme: e }) => v(e).iconButton.border};
538
+ box-shadow: ${({ theme: e }) => v(e).shadow.button};
539
+
540
+ &:active:not(:disabled),
541
+ &[data-pressed='true']:not(:disabled),
542
+ &:disabled {
543
+ transform: ${({ theme: e }) => `translate(${v(e).shadow.offsetX}, ${v(e).shadow.offsetY})`};
544
+ box-shadow: none;
545
+ }
546
+ `, ce = {
547
+ square: s`
548
+ border-radius: ${({ theme: e }) => v(e).iconButton.borderRadius};
549
+ `,
550
+ rounded: s`
551
+ border-radius: ${({ theme: e }) => v(e).radius.full};
552
+ `
553
+ }, le = s`
554
+ background: transparent;
555
+ border: none;
556
+ box-shadow: none;
557
+ transform: none;
558
+
559
+ &:active:not(:disabled),
560
+ &[data-pressed='true']:not(:disabled) {
561
+ transform: none;
562
+ box-shadow: none;
563
+ }
564
+ `;
565
+ function ue(e, t) {
566
+ return `color-mix(in srgb, ${e} ${t}, transparent)`;
567
+ }
568
+ var de = {
569
+ primary: s`
570
+ color: ${({ theme: e }) => v(e).colors.primary};
571
+
572
+ &:hover:not(:disabled) {
573
+ background: ${({ theme: e }) => ue(v(e).colors.primary, "18%")};
574
+ }
575
+
576
+ &:active:not(:disabled),
577
+ &[data-pressed='true']:not(:disabled) {
578
+ background: ${({ theme: e }) => f(ue(v(e).colors.primary, "18%"), v(e).colors.ink)};
579
+ }
580
+ `,
581
+ secondary: s`
582
+ color: ${({ theme: e }) => v(e).colors.text};
583
+
584
+ &:hover:not(:disabled) {
585
+ background: ${({ theme: e }) => ue(v(e).colors.text, "12%")};
586
+ }
587
+
588
+ &:active:not(:disabled),
589
+ &[data-pressed='true']:not(:disabled) {
590
+ background: ${({ theme: e }) => f(ue(v(e).colors.text, "12%"), v(e).colors.ink)};
591
+ }
592
+ `
593
+ }, fe = c.button`
594
+ ${oe}
595
+ padding: 0;
596
+ flex-shrink: 0;
597
+
598
+ ${({ $size: e }) => ie[e]}
599
+ ${({ $shape: e }) => ce[e]}
600
+ ${({ $ghost: e, $variant: t }) => e ? s`
601
+ ${le}
602
+ ${de[t]}
603
+ ` : s`
604
+ ${se}
605
+ ${ae[t]}
606
+ `}
607
+ `;
608
+ // src/components/atoms/AIconButton/AIconButton.tsx
609
+ function R({ children: e, variant: t = "primary", size: n = "md", shape: r = "square", ghost: i = !1, type: a = "button", disabled: o, ref: s, onPointerDown: c, onPointerUp: u, onPointerCancel: d, onLostPointerCapture: f, ...p }) {
610
+ let { pressed: m, pressHandlers: h } = A({
611
+ disabled: o,
612
+ onPointerDown: c,
613
+ onPointerUp: u,
614
+ onPointerCancel: d,
615
+ onLostPointerCapture: f
616
+ });
617
+ return /* @__PURE__ */ l(fe, {
618
+ $ghost: i,
619
+ $shape: r,
620
+ $size: n,
621
+ $variant: t,
622
+ type: a,
623
+ disabled: o,
624
+ "data-pressed": m ? "true" : void 0,
625
+ ref: s,
626
+ ...p,
627
+ ...h,
628
+ children: /* @__PURE__ */ l(L, {
629
+ size: n,
630
+ style: { color: "inherit" },
631
+ children: e
632
+ })
633
+ });
634
+ }
635
+ // src/components/atoms/AIconLink/AIconLink.styles.ts
636
+ var pe = S("iconLink"), me = {
637
+ primary: s`
638
+ background: ${({ theme: e }) => v(e).colors.primary};
639
+ color: ${({ theme: e }) => v(e).colors.primaryText};
640
+
641
+ &:hover {
642
+ background: ${({ theme: e }) => f(v(e).colors.primary, v(e).colors.ink)};
643
+ }
644
+ `,
645
+ secondary: s`
646
+ background: ${({ theme: e }) => v(e).colors.secondary};
647
+ color: ${({ theme: e }) => v(e).colors.text};
648
+
649
+ &:hover {
650
+ background: ${({ theme: e }) => f(v(e).colors.secondary, v(e).colors.ink)};
651
+ }
652
+ `
653
+ }, he = {
654
+ square: s`
655
+ border-radius: ${({ theme: e }) => v(e).iconLink.borderRadius};
656
+ `,
657
+ rounded: s`
658
+ border-radius: ${({ theme: e }) => v(e).radius.full};
659
+ `
660
+ }, ge = s`
661
+ background: transparent;
662
+ border: none;
663
+ box-shadow: none;
664
+ transform: none;
665
+
666
+ &:active,
667
+ &[data-pressed='true'] {
668
+ transform: none;
669
+ box-shadow: none;
670
+ }
671
+ `;
672
+ function _e(e, t) {
673
+ return `color-mix(in srgb, ${e} ${t}, transparent)`;
674
+ }
675
+ var ve = {
676
+ primary: s`
677
+ color: ${({ theme: e }) => v(e).colors.primary};
678
+
679
+ &:hover {
680
+ background: ${({ theme: e }) => _e(v(e).colors.primary, "18%")};
681
+ }
682
+
683
+ &:active,
684
+ &[data-pressed='true'] {
685
+ background: ${({ theme: e }) => f(_e(v(e).colors.primary, "18%"), v(e).colors.ink)};
686
+ }
687
+ `,
688
+ secondary: s`
689
+ color: ${({ theme: e }) => v(e).colors.text};
690
+
691
+ &:hover {
692
+ background: ${({ theme: e }) => _e(v(e).colors.text, "12%")};
693
+ }
694
+
695
+ &:active,
696
+ &[data-pressed='true'] {
697
+ background: ${({ theme: e }) => f(_e(v(e).colors.text, "12%"), v(e).colors.ink)};
698
+ }
699
+ `
700
+ }, ye = c.a`
701
+ display: inline-flex;
702
+ align-items: center;
703
+ justify-content: center;
704
+ gap: ${({ theme: e }) => v(e).space.sm};
705
+ font-family: ${({ theme: e }) => v(e).font.sans};
706
+ font-size: ${({ theme: e }) => v(e).button.fontSize};
707
+ font-weight: ${({ theme: e }) => v(e).font.weight.semibold};
708
+ text-transform: ${({ theme: e }) => v(e).button.textTransform};
709
+ text-decoration: ${({ theme: e }) => v(e).button.textDecoration};
710
+ cursor: pointer;
711
+ transition:
712
+ background-color 0.15s ease,
713
+ transform 0.15s ease,
714
+ box-shadow 0.15s ease;
715
+
716
+ ${w("iconLink")}
717
+
718
+ border: ${({ theme: e }) => v(e).iconLink.border};
719
+ box-shadow: ${({ theme: e }) => v(e).shadow.button};
720
+
721
+ &:active,
722
+ &[data-pressed='true'] {
723
+ transform: ${({ theme: e }) => `translate(${v(e).shadow.offsetX}, ${v(e).shadow.offsetY})`};
724
+ box-shadow: none;
725
+ }
726
+
727
+ ${({ $size: e }) => pe[e]}
728
+ ${({ $shape: e }) => he[e]}
729
+ ${({ $ghost: e, $variant: t }) => e ? s`
730
+ ${ge}
731
+ ${ve[t]}
732
+ ` : me[t]}
733
+ `;
734
+ // src/components/atoms/AIconLink/AIconLink.tsx
735
+ function be({ children: e, variant: t = "primary", size: n = "md", shape: r = "square", ghost: i = !1, onPointerDown: a, onPointerUp: o, onPointerCancel: s, onLostPointerCapture: c, ...u }) {
736
+ let { pressed: d, pressHandlers: f } = A({
737
+ onPointerDown: a,
738
+ onPointerUp: o,
739
+ onPointerCancel: s,
740
+ onLostPointerCapture: c
741
+ });
742
+ return /* @__PURE__ */ l(ye, {
743
+ $ghost: i,
744
+ $shape: r,
745
+ $size: n,
746
+ $variant: t,
747
+ "data-pressed": d ? "true" : void 0,
748
+ ...u,
749
+ ...f,
750
+ children: /* @__PURE__ */ l(L, {
751
+ size: n,
752
+ style: { color: "inherit" },
753
+ children: e
754
+ })
755
+ });
756
+ }
757
+ // src/components/atoms/AInput/AInput.styles.ts
758
+ var xe = s`
759
+ color: ${({ theme: e }) => v(e).colors.text};
760
+ font-size: ${({ theme: e }) => v(e).typography.small};
761
+ font-weight: ${({ theme: e }) => v(e).font.weight.semibold};
762
+ `, Se = s`
763
+ box-sizing: border-box;
764
+ width: 100%;
765
+ height: ${({ theme: e }) => v(e).formControl.height};
766
+ border: ${({ theme: e }) => v(e).formControl.border};
767
+ border-radius: ${({ theme: e }) => v(e).formControl.borderRadius};
768
+ padding: ${({ theme: e, $hasTrailingAction: t }) => t ? `${v(e).formControl.padding} ${v(e).formControl.trailingActionPadding} ${v(e).formControl.padding} ${v(e).formControl.padding}` : v(e).formControl.padding};
769
+ background: ${({ theme: e }) => v(e).colors.background};
770
+ color: ${({ theme: e }) => v(e).colors.text};
771
+ font: inherit;
772
+ font-size: ${({ theme: e }) => v(e).formControl.fontSize};
773
+
774
+ ${w("formControl")}
775
+
776
+ &:disabled {
777
+ cursor: not-allowed;
778
+ opacity: ${({ theme: e }) => v(e).opacity.disabled};
779
+ }
780
+
781
+ ${({ $invalid: e, theme: t }) => e && s`
782
+ border-color: ${v(t).colors.error};
783
+ `}
784
+
785
+ ${({ $invalid: e, $warning: t, theme: n }) => !e && t && s`
786
+ border-color: ${v(n).colors.warning};
787
+ `}
788
+ `, Ce = s`
789
+ color: ${({ theme: e, $type: t }) => v(e).colors[t]};
790
+ font-size: ${({ theme: e }) => v(e).typography.small};
791
+ `, we = c.div`
792
+ ${x}
793
+ `, Te = c.label`
794
+ ${xe}
795
+ `, Ee = c.div`
796
+ position: relative;
797
+ `, De = c.input`
798
+ ${Se}
799
+
800
+ &:focus,
801
+ &:focus-visible {
802
+ ${({ $invalid: e, $warning: t, theme: n }) => e ? s`
803
+ border-color: ${v(n).colors.error};
804
+ ` : t ? s`
805
+ border-color: ${v(n).colors.warning};
806
+ ` : ""}
807
+ /* TODO: This prevents the outline from appearing when navigating with the Tab key */
808
+ outline: none;
809
+ }
810
+ `, Oe = c(R)`
811
+ position: absolute;
812
+ top: 50%;
813
+ right: ${({ theme: e }) => v(e).space.md};
814
+ translate: 0 -50%;
815
+ `, ke = c.div`
816
+ ${Ce}
817
+ `;
818
+ // src/components/atoms/AInput/AInput.tsx
819
+ function Ae({ visible: e }) {
820
+ return /* @__PURE__ */ u("svg", {
821
+ fill: "none",
822
+ viewBox: "0 0 24 24",
823
+ children: [/* @__PURE__ */ l("path", {
824
+ d: "M2.5 12s3.25-6 9.5-6 9.5 6 9.5 6-3.25 6-9.5 6-9.5-6-9.5-6Z",
825
+ stroke: "currentColor",
826
+ strokeLinecap: "round",
827
+ strokeLinejoin: "round",
828
+ strokeWidth: "1.8"
829
+ }), e ? /* @__PURE__ */ l("path", {
830
+ d: "m3 3 18 18M10.6 10.6a2 2 0 0 0 2.8 2.8",
831
+ stroke: "currentColor",
832
+ strokeLinecap: "round",
833
+ strokeWidth: "1.8"
834
+ }) : /* @__PURE__ */ l("circle", {
835
+ cx: "12",
836
+ cy: "12",
837
+ r: "2.5",
838
+ stroke: "currentColor",
839
+ strokeWidth: "1.8"
840
+ })]
841
+ });
842
+ }
843
+ function je({ type: e = "text", id: t, label: r, error: a, warning: o, disabled: s, ref: c, "aria-describedby": d, "aria-invalid": f, ...p }) {
844
+ let m = n(), h = t ?? m, g = `${h}-error`, _ = `${h}-warning`, [v, y] = i(!1), b = !!a || f === !0 || f === "true", x = [
845
+ d,
846
+ a ? g : void 0,
847
+ o ? _ : void 0
848
+ ].filter(Boolean).join(" ") || void 0;
849
+ return /* @__PURE__ */ u(we, { children: [
850
+ r ? /* @__PURE__ */ l(Te, {
851
+ htmlFor: h,
852
+ children: r
853
+ }) : null,
854
+ /* @__PURE__ */ u(Ee, { children: [/* @__PURE__ */ l(De, {
855
+ ...p,
856
+ $hasTrailingAction: e === "password",
857
+ $invalid: b,
858
+ $warning: !!o,
859
+ "aria-describedby": x,
860
+ "aria-invalid": b || void 0,
861
+ disabled: s,
862
+ id: h,
863
+ ref: c,
864
+ type: e === "password" && v ? "text" : e
865
+ }), e === "password" ? /* @__PURE__ */ l(Oe, {
866
+ "aria-label": v ? "Hide password" : "Show password",
867
+ "aria-pressed": v,
868
+ disabled: s,
869
+ ghost: !0,
870
+ onClick: () => {
871
+ y((e) => !e);
872
+ },
873
+ shape: "rounded",
874
+ size: "md",
875
+ type: "button",
876
+ variant: "primary",
877
+ children: /* @__PURE__ */ l(L, {
878
+ size: "md",
879
+ style: { color: "inherit" },
880
+ title: v ? "Hide password" : "Show password",
881
+ children: /* @__PURE__ */ l(Ae, { visible: v })
882
+ })
883
+ }) : null] }),
884
+ a ? /* @__PURE__ */ l(ke, {
885
+ $type: "error",
886
+ id: g,
887
+ role: "alert",
888
+ children: a
889
+ }) : null,
890
+ o ? /* @__PURE__ */ l(ke, {
891
+ $type: "warning",
892
+ id: _,
893
+ role: "status",
894
+ children: o
895
+ }) : null
896
+ ] });
897
+ }
898
+ // src/components/atoms/ALink/ALink.styles.ts
899
+ var Me = S("link"), Ne = {
900
+ primary: s`
901
+ background: ${({ theme: e }) => v(e).colors.primary};
902
+ color: ${({ theme: e }) => v(e).colors.primaryText};
903
+
904
+ &:hover:not(:disabled) {
905
+ background: ${({ theme: e }) => f(v(e).colors.primary, v(e).colors.ink)};
906
+ }
907
+ `,
908
+ secondary: s`
909
+ background: ${({ theme: e }) => v(e).colors.secondary};
910
+ color: ${({ theme: e }) => v(e).colors.text};
911
+
912
+ &:hover:not(:disabled) {
913
+ background: ${({ theme: e }) => f(v(e).colors.secondary, v(e).colors.ink)};
914
+ }
915
+ `
916
+ }, Pe = c.a`
917
+ display: inline-flex;
918
+ align-items: center;
919
+ justify-content: center;
920
+ gap: ${({ theme: e }) => v(e).space.sm};
921
+ font-family: ${({ theme: e }) => v(e).font.sans};
922
+ font-size: ${({ theme: e }) => v(e).link.fontSize};
923
+ font-weight: ${({ theme: e }) => v(e).font.weight.semibold};
924
+ text-transform: ${({ theme: e }) => v(e).link.textTransform};
925
+ text-decoration: ${({ theme: e }) => v(e).link.textDecoration};
926
+ cursor: pointer;
927
+ transition:
928
+ background-color 0.15s ease,
929
+ transform 0.15s ease,
930
+ box-shadow 0.15s ease;
931
+
932
+ ${w("link")}
933
+
934
+ border: ${({ theme: e }) => v(e).link.border};
935
+ box-shadow: ${({ theme: e }) => v(e).shadow.link};
936
+ border-radius: ${({ theme: e }) => v(e).link.borderRadius};
937
+ padding: ${({ theme: e }) => v(e).link.padding};
938
+
939
+ white-space: nowrap;
940
+
941
+ &:active,
942
+ &[data-pressed='true'] {
943
+ transform: ${({ theme: e }) => `translate(${v(e).shadow.offsetX}, ${v(e).shadow.offsetY})`};
944
+ box-shadow: none;
945
+ }
946
+
947
+ ${({ $variant: e }) => Ne[e]}
948
+ ${({ $size: e }) => Me[e]}
949
+ `;
950
+ // src/components/atoms/ALink/ALink.tsx
951
+ function Fe({ children: e, variant: t = "primary", size: n = "md", onPointerDown: r, onPointerUp: i, onPointerCancel: a, onLostPointerCapture: o, ...s }) {
952
+ let { pressed: c, pressHandlers: u } = A({
953
+ onPointerDown: r,
954
+ onPointerUp: i,
955
+ onPointerCancel: a,
956
+ onLostPointerCapture: o
957
+ });
958
+ return /* @__PURE__ */ l(Pe, {
959
+ $size: n,
960
+ $variant: t,
961
+ "data-pressed": c ? "true" : void 0,
962
+ ...s,
963
+ ...u,
964
+ children: e
965
+ });
966
+ }
967
+ // src/components/atoms/ALogo/ALogo.styles.ts
968
+ var Ie = c.div`
969
+ --logo-size: ${({ theme: e }) => v(e).logo.size};
970
+
971
+ display: inline-flex;
972
+ align-items: center;
973
+ justify-content: center;
974
+ gap: ${({ theme: e }) => v(e).space.sm};
975
+ min-width: 0;
976
+ color: ${({ theme: e }) => v(e).colors.text};
977
+ font-family: ${({ theme: e }) => v(e).font.sans};
978
+ font-size: ${({ theme: e }) => v(e).logo.fontSize};
979
+ font-weight: ${({ theme: e }) => v(e).logo.fontWeight};
980
+ white-space: ${({ theme: e }) => v(e).logo.whiteSpace};
981
+
982
+ & > span:first-child > svg,
983
+ & > span:first-child img {
984
+ display: block;
985
+ width: var(--logo-size);
986
+ height: var(--logo-size);
987
+ flex: 0 0 var(--logo-size);
988
+ object-fit: contain;
989
+ }
990
+
991
+ ${({ $variant: e, theme: t }) => e === "icon" && s`
992
+ width: ${v(t).logo.size};
993
+ height: ${v(t).logo.size};
994
+ `}
995
+ `, Le = c.span`
996
+ overflow: hidden;
997
+ text-overflow: ellipsis;
998
+ `;
999
+ // src/components/atoms/ALogo/ALogo.tsx
1000
+ function Re({ logo: e, name: t, variant: n = "full", ...r }) {
1001
+ return /* @__PURE__ */ u(Ie, {
1002
+ ...r,
1003
+ $variant: n,
1004
+ role: n === "icon" ? "img" : void 0,
1005
+ "aria-label": n === "icon" ? t : r["aria-label"],
1006
+ children: [/* @__PURE__ */ l("span", {
1007
+ "aria-hidden": "true",
1008
+ children: e
1009
+ }), n === "full" ? /* @__PURE__ */ l(Le, { children: t }) : null]
1010
+ });
1011
+ }
1012
+ // src/components/atoms/ASearchInput/ASearchInput.styles.ts
1013
+ var ze = s`
1014
+ box-sizing: border-box;
1015
+ width: 100%;
1016
+ height: ${({ theme: e }) => v(e).formControl.height};
1017
+ border: ${({ theme: e }) => v(e).formControl.border};
1018
+ border-radius: ${({ theme: e }) => v(e).formControl.borderRadius};
1019
+ padding: ${({ theme: e }) => v(e).formControl.padding};
1020
+ background: ${({ theme: e }) => v(e).colors.background};
1021
+ color: ${({ theme: e }) => v(e).colors.text};
1022
+ font: inherit;
1023
+ font-size: ${({ theme: e }) => v(e).formControl.fontSize};
1024
+ `, Be = c.div`
1025
+ ${x}
1026
+ `, Ve = c.div`
1027
+ position: relative;
1028
+ `, He = c.input`
1029
+ ${ze}
1030
+ padding-right: ${({ theme: e }) => v(e).formControl.trailingActionPadding};
1031
+
1032
+ /* TODO: Outline styles should be implemented for each form ui elements */
1033
+
1034
+ &:disabled {
1035
+ cursor: not-allowed;
1036
+ opacity: ${({ theme: e }) => v(e).opacity.disabled};
1037
+ }
1038
+ `, Ue = c(R)`
1039
+ position: absolute;
1040
+ top: 50%;
1041
+ right: ${({ theme: e }) => v(e).space.md};
1042
+ translate: 0 -50%;
1043
+ `, We = c.ul`
1044
+ position: absolute;
1045
+ z-index: 10;
1046
+ top: 100%;
1047
+ right: 0;
1048
+ left: 0;
1049
+ max-height: ${({ theme: e }) => v(e).formControl.optionListMaxHeight};
1050
+ margin: 0;
1051
+ padding: 0;
1052
+ overflow: auto;
1053
+ border: ${({ theme: e }) => v(e).formControl.dropdownBorder};
1054
+ border-radius: ${({ theme: e }) => v(e).formControl.borderRadius};
1055
+ background: ${({ theme: e }) => v(e).colors.background};
1056
+ list-style: none;
1057
+ `, Ge = c.li`
1058
+ ${C}
1059
+ background: ${({ theme: e, $active: t }) => t ? v(e).colors.secondaryHover : "transparent"};
1060
+ color: ${({ theme: e }) => v(e).colors.text};
1061
+ cursor: pointer;
1062
+ `;
1063
+ // src/components/atoms/ASearchInput/ASearchInput.tsx
1064
+ function Ke() {
1065
+ return /* @__PURE__ */ u("svg", {
1066
+ fill: "none",
1067
+ viewBox: "0 0 24 24",
1068
+ children: [/* @__PURE__ */ l("circle", {
1069
+ cx: "10.8",
1070
+ cy: "10.8",
1071
+ r: "6.3",
1072
+ stroke: "currentColor",
1073
+ strokeWidth: "1.8"
1074
+ }), /* @__PURE__ */ l("path", {
1075
+ d: "m15.5 15.5 4 4",
1076
+ stroke: "currentColor",
1077
+ strokeLinecap: "round",
1078
+ strokeWidth: "1.8"
1079
+ })]
1080
+ });
1081
+ }
1082
+ function qe({ options: e, value: a, defaultValue: o = "", debounceMs: s = 300, onSearch: c, onSelect: d, onChange: f, onFocus: p, onBlur: m, id: h, disabled: g, ref: _, ...v }) {
1083
+ let y = n(), b = h ?? y, x = `${b}-options`, S = r(null), C = r(!1), w = r(null), [T, E] = i(o), [D, O] = i(!1), [k, A] = i(-1), j = a ?? T, ee = a !== void 0, M = j.trim().toLocaleLowerCase(), N = M ? e.filter((e) => e.label.toLocaleLowerCase().includes(M) || String(e.value).toLocaleLowerCase().includes(M)) : [], P = D && N.length > 0;
1084
+ t(() => {
1085
+ if (!C.current) {
1086
+ C.current = !0;
1087
+ return;
1088
+ }
1089
+ if (!c) return;
1090
+ let e = setTimeout(() => {
1091
+ w.current = null, c(j);
1092
+ }, s);
1093
+ return w.current = e, () => {
1094
+ clearTimeout(e), w.current === e && (w.current = null);
1095
+ };
1096
+ }, [
1097
+ s,
1098
+ c,
1099
+ j
1100
+ ]);
1101
+ let F = (e) => {
1102
+ ee || E(e.currentTarget.value), A(-1), f?.(e);
1103
+ }, te = (e) => {
1104
+ e.relatedTarget instanceof Node && S.current?.querySelector("[role=\"listbox\"]")?.contains(e.relatedTarget) || (O(!1), A(-1), m?.(e));
1105
+ }, I = (e) => {
1106
+ ee || E(e.label), d?.(e), O(!1);
1107
+ }, ne = (e) => {
1108
+ e.key === "ArrowDown" && N.length > 0 ? (e.preventDefault(), O(!0), A((e) => (e + 1) % N.length)) : e.key === "ArrowUp" && N.length > 0 ? (e.preventDefault(), O(!0), A((e) => e <= 0 ? N.length - 1 : e - 1)) : e.key === "Enter" && P && N[k] ? (e.preventDefault(), I(N[k])) : e.key === "Escape" && (O(!1), A(-1)), v.onKeyDown?.(e);
1109
+ };
1110
+ return /* @__PURE__ */ l(Be, {
1111
+ ref: S,
1112
+ children: /* @__PURE__ */ u(Ve, { children: [
1113
+ /* @__PURE__ */ l(He, {
1114
+ ...v,
1115
+ "aria-activedescendant": P && k >= 0 ? `${x}-option-${String(k)}` : void 0,
1116
+ "aria-autocomplete": "list",
1117
+ "aria-controls": P ? x : void 0,
1118
+ "aria-expanded": P,
1119
+ "aria-haspopup": "listbox",
1120
+ autoComplete: "off",
1121
+ disabled: g,
1122
+ id: b,
1123
+ onBlur: te,
1124
+ onChange: F,
1125
+ onFocus: (e) => {
1126
+ O(!0), p && p(e);
1127
+ },
1128
+ onKeyDown: ne,
1129
+ ref: _,
1130
+ role: "combobox",
1131
+ value: j
1132
+ }),
1133
+ /* @__PURE__ */ l(Ue, {
1134
+ "aria-label": "Search",
1135
+ disabled: g,
1136
+ ghost: !0,
1137
+ onClick: () => {
1138
+ w.current &&= (clearTimeout(w.current), null), c?.(j);
1139
+ },
1140
+ shape: "rounded",
1141
+ size: "md",
1142
+ type: "button",
1143
+ variant: "primary",
1144
+ children: /* @__PURE__ */ l(L, {
1145
+ size: "md",
1146
+ style: { color: "inherit" },
1147
+ title: "Search",
1148
+ children: /* @__PURE__ */ l(Ke, {})
1149
+ })
1150
+ }),
1151
+ P ? /* @__PURE__ */ l(We, {
1152
+ id: x,
1153
+ role: "listbox",
1154
+ children: N.map((e, t) => /* @__PURE__ */ l(Ge, {
1155
+ "aria-selected": t === k,
1156
+ id: `${x}-option-${String(t)}`,
1157
+ onClick: () => {
1158
+ I(e);
1159
+ },
1160
+ onMouseDown: (e) => {
1161
+ e.preventDefault();
1162
+ },
1163
+ role: "option",
1164
+ $active: t === k,
1165
+ children: e.label
1166
+ }, `${String(e.value)}-${e.label}`))
1167
+ }) : null
1168
+ ] })
1169
+ });
1170
+ }
1171
+ // src/components/atoms/ASection/ASection.styles.ts
1172
+ var Je = c.section`
1173
+ border: ${({ theme: e }) => v(e).section.border};
1174
+ border-radius: ${({ theme: e }) => v(e).section.borderRadius};
1175
+ padding: ${({ theme: e }) => v(e).section.padding};
1176
+ background-color: ${({ theme: e }) => v(e).colors.surface};
1177
+ box-shadow: ${({ $shadow: e, theme: t }) => e ? v(t).shadow.section : "none"};
1178
+ `;
1179
+ // src/components/atoms/ASection/ASection.tsx
1180
+ function Ye({ children: e, shadow: t = !1, ...n }) {
1181
+ return /* @__PURE__ */ l(Je, {
1182
+ $shadow: t,
1183
+ ...n,
1184
+ children: e
1185
+ });
1186
+ }
1187
+ // src/components/atoms/ASelect/ASelect.styles.ts
1188
+ var Xe = s`
1189
+ color: ${({ theme: e }) => v(e).colors.text};
1190
+ font-size: ${({ theme: e }) => v(e).typography.small};
1191
+ font-weight: ${({ theme: e }) => v(e).font.weight.semibold};
1192
+ `, Ze = s`
1193
+ box-sizing: border-box;
1194
+ width: 100%;
1195
+ height: ${({ theme: e }) => v(e).formControl.height};
1196
+ border: ${({ theme: e }) => v(e).formControl.border};
1197
+ border-radius: ${({ theme: e }) => v(e).formControl.borderRadius};
1198
+ padding: ${({ theme: e, $hasTrailingAction: t }) => t ? `${v(e).formControl.padding} ${v(e).formControl.trailingActionPadding} ${v(e).formControl.padding} ${v(e).formControl.padding}` : v(e).formControl.padding};
1199
+ background: ${({ theme: e }) => v(e).colors.background};
1200
+ color: ${({ theme: e }) => v(e).colors.text};
1201
+ font: inherit;
1202
+ font-size: ${({ theme: e }) => v(e).formControl.fontSize};
1203
+
1204
+ ${w("formControl")}
1205
+
1206
+ &:disabled {
1207
+ cursor: not-allowed;
1208
+ opacity: ${({ theme: e }) => v(e).opacity.disabled};
1209
+ }
1210
+
1211
+ ${({ $invalid: e, theme: t }) => e && s`
1212
+ border-color: ${v(t).colors.error};
1213
+ `}
1214
+
1215
+ ${({ $invalid: e, $warning: t, theme: n }) => !e && t && s`
1216
+ border-color: ${v(n).colors.warning};
1217
+ `}
1218
+ `, Qe = s`
1219
+ color: ${({ theme: e, $type: t }) => v(e).colors[t]};
1220
+ font-size: ${({ theme: e }) => v(e).typography.small};
1221
+ `, $e = c.div`
1222
+ ${x}
1223
+ `, et = c.div`
1224
+ position: relative;
1225
+ `, tt = c.label`
1226
+ ${Xe}
1227
+ `, nt = c.div`
1228
+ ${Ze}
1229
+ display: flex;
1230
+ align-items: center;
1231
+ justify-content: space-between;
1232
+ gap: ${({ theme: e }) => v(e).space.lg};
1233
+ text-align: left;
1234
+ cursor: ${({ $disabled: e }) => e ? "not-allowed" : "pointer"};
1235
+
1236
+ ${({ $disabled: e }) => e && s`
1237
+ opacity: ${({ theme: e }) => v(e).opacity.disabled};
1238
+ `}
1239
+ `, rt = c.div`
1240
+ position: absolute;
1241
+ z-index: 10;
1242
+ top: 100%;
1243
+ right: 0;
1244
+ left: 0;
1245
+ max-height: ${({ theme: e }) => v(e).formControl.optionListMaxHeight};
1246
+ overflow: auto;
1247
+ border: ${({ theme: e }) => v(e).formControl.dropdownBorder};
1248
+ border-radius: ${({ theme: e }) => v(e).formControl.borderRadius};
1249
+ background: ${({ theme: e }) => v(e).colors.background};
1250
+ `, it = c.button`
1251
+ display: block;
1252
+ width: 100%;
1253
+ ${C}
1254
+ border: 0;
1255
+ border-radius: 0;
1256
+ background: ${({ theme: e, $selected: t }) => t ? v(e).colors.secondary : "transparent"};
1257
+ color: ${({ theme: e }) => v(e).colors.text};
1258
+ font: inherit;
1259
+ text-align: left;
1260
+ text-transform: ${({ theme: e }) => v(e).formControl.optionTextTransform};
1261
+ cursor: pointer;
1262
+
1263
+ &:hover,
1264
+ &:focus-visible {
1265
+ background: ${({ theme: e }) => v(e).colors.secondaryHover};
1266
+ outline: none;
1267
+ }
1268
+ `, at = c.select`
1269
+ position: absolute;
1270
+ width: 1px;
1271
+ height: 1px;
1272
+ padding: 0;
1273
+ overflow: hidden;
1274
+ clip: rect(0, 0, 0, 0);
1275
+ white-space: nowrap;
1276
+ border: 0;
1277
+ `, ot = c.span`
1278
+ overflow: hidden;
1279
+ color: ${({ theme: e, $placeholder: t }) => t ? v(e).colors.muted : "inherit"};
1280
+ text-overflow: ellipsis;
1281
+ white-space: nowrap;
1282
+ `, st = c.div`
1283
+ ${Qe}
1284
+ `;
1285
+ // src/components/atoms/ASelect/ASelect.tsx
1286
+ function ct({ options: e, value: a, defaultValue: o, onChange: s, onValueChange: c, onBlur: d, id: f, name: p, label: m, placeholder: h = "Select an option", error: g, warning: _, disabled: v, required: y, ref: b, "aria-describedby": x, "aria-invalid": S, ...C }) {
1287
+ let w = n(), T = f ?? w, E = `${T}-options`, D = `${T}-error`, O = `${T}-warning`, k = r(null), A = r(null), j = r(null), [ee, M] = i(o), [N, P] = i(!1), F = a ?? ee, te = e.find((e) => String(e.value) === String(F)), I = !!g || S === !0 || S === "true", ne = [
1288
+ x,
1289
+ g ? D : void 0,
1290
+ _ ? O : void 0
1291
+ ].filter(Boolean).join(" ") || void 0, re = (e) => {
1292
+ s?.(e);
1293
+ };
1294
+ t(() => {
1295
+ if (!N) return;
1296
+ let e = (e) => {
1297
+ e.target instanceof Node && k.current?.contains(e.target) || P(!1);
1298
+ };
1299
+ return document.addEventListener("pointerdown", e), () => {
1300
+ document.removeEventListener("pointerdown", e);
1301
+ };
1302
+ }, [N]), t(() => {
1303
+ N && (k.current?.querySelector("[role=\"option\"][aria-selected=\"true\"]") ?? k.current?.querySelector("[role=\"option\"]"))?.focus();
1304
+ }, [N]);
1305
+ let L = (e) => {
1306
+ a === void 0 && M(e), c?.(e);
1307
+ let t = A.current;
1308
+ t && (t.value = String(e), t.dispatchEvent(new Event("change", { bubbles: !0 })));
1309
+ }, ie = (e) => {
1310
+ k.current?.contains(e.relatedTarget) || (P(!1), A.current?.dispatchEvent(new FocusEvent("focusout", { bubbles: !0 })));
1311
+ }, ae = (t, n) => {
1312
+ let r;
1313
+ t.key === "ArrowDown" && (r = (n + 1) % e.length), t.key === "ArrowUp" && (r = (n - 1 + e.length) % e.length), t.key === "Home" && (r = 0), t.key === "End" && (r = e.length - 1), t.key === "Escape" ? (t.preventDefault(), P(!1), j.current?.focus()) : r !== void 0 && (t.preventDefault(), k.current?.querySelectorAll("[role=\"option\"]")[r]?.focus());
1314
+ };
1315
+ return /* @__PURE__ */ u($e, {
1316
+ ref: k,
1317
+ children: [
1318
+ m ? /* @__PURE__ */ l(tt, {
1319
+ htmlFor: T,
1320
+ children: m
1321
+ }) : null,
1322
+ /* @__PURE__ */ u(et, { children: [
1323
+ /* @__PURE__ */ u(at, {
1324
+ ...C,
1325
+ "aria-hidden": "true",
1326
+ "aria-invalid": I || void 0,
1327
+ disabled: v,
1328
+ id: `${T}-native`,
1329
+ name: p,
1330
+ onBlur: d,
1331
+ onChange: re,
1332
+ ref: (e) => {
1333
+ A.current = e, typeof b == "function" ? b(e) : b && (b.current = e);
1334
+ },
1335
+ required: y,
1336
+ tabIndex: -1,
1337
+ value: F === void 0 ? "" : String(F),
1338
+ children: [/* @__PURE__ */ l("option", {
1339
+ value: "",
1340
+ children: h
1341
+ }), e.map((e) => /* @__PURE__ */ l("option", {
1342
+ value: String(e.value),
1343
+ children: e.label
1344
+ }, String(e.value)))]
1345
+ }),
1346
+ /* @__PURE__ */ u(nt, {
1347
+ onClick: () => {
1348
+ v || P((e) => !e);
1349
+ },
1350
+ $disabled: !!v,
1351
+ $invalid: I,
1352
+ $warning: !!_,
1353
+ children: [/* @__PURE__ */ l(ot, {
1354
+ $placeholder: !te,
1355
+ children: te?.label ?? h
1356
+ }), /* @__PURE__ */ l(R, {
1357
+ "aria-controls": E,
1358
+ "aria-describedby": ne,
1359
+ "aria-expanded": N,
1360
+ "aria-haspopup": "listbox",
1361
+ "aria-invalid": I || void 0,
1362
+ "aria-label": m ?? h,
1363
+ disabled: v,
1364
+ ghost: !0,
1365
+ id: T,
1366
+ onBlur: ie,
1367
+ onClick: (e) => {
1368
+ e.stopPropagation(), P((e) => !e);
1369
+ },
1370
+ onKeyDown: (e) => {
1371
+ e.key === "Escape" ? P(!1) : N || e.key !== "ArrowDown" && e.key !== "Enter" && e.key !== " " || (e.preventDefault(), P(!0));
1372
+ },
1373
+ ref: j,
1374
+ shape: "rounded",
1375
+ size: "md",
1376
+ type: "button",
1377
+ variant: "primary",
1378
+ children: /* @__PURE__ */ l("svg", {
1379
+ fill: "none",
1380
+ style: {
1381
+ transform: N ? "rotate(180deg)" : "rotate(0)",
1382
+ transition: "transform 120ms ease"
1383
+ },
1384
+ viewBox: "0 0 24 24",
1385
+ children: /* @__PURE__ */ l("path", {
1386
+ d: "m6 9 6 6 6-6",
1387
+ stroke: "currentColor",
1388
+ strokeLinecap: "round",
1389
+ strokeLinejoin: "round",
1390
+ strokeWidth: "2"
1391
+ })
1392
+ })
1393
+ })]
1394
+ }),
1395
+ N ? /* @__PURE__ */ l(rt, {
1396
+ id: E,
1397
+ role: "listbox",
1398
+ "aria-label": m,
1399
+ children: e.map((e, t) => {
1400
+ let n = String(e.value) === String(F ?? "");
1401
+ return /* @__PURE__ */ l(it, {
1402
+ "aria-selected": n,
1403
+ onClick: () => {
1404
+ L(e.value), P(!1), j.current?.focus();
1405
+ },
1406
+ onBlur: ie,
1407
+ onKeyDown: (e) => {
1408
+ ae(e, t);
1409
+ },
1410
+ role: "option",
1411
+ tabIndex: -1,
1412
+ type: "button",
1413
+ $selected: n,
1414
+ children: e.label
1415
+ }, String(e.value));
1416
+ })
1417
+ }) : null
1418
+ ] }),
1419
+ g ? /* @__PURE__ */ l(st, {
1420
+ $type: "error",
1421
+ id: D,
1422
+ role: "alert",
1423
+ children: g
1424
+ }) : null,
1425
+ _ ? /* @__PURE__ */ l(st, {
1426
+ $type: "warning",
1427
+ id: O,
1428
+ role: "status",
1429
+ children: _
1430
+ }) : null
1431
+ ]
1432
+ });
1433
+ }
1434
+ // src/components/atoms/ATextarea/ATextarea.styles.ts
1435
+ var lt = c.div`
1436
+ ${x}
1437
+ `, ut = c.label`
1438
+ color: ${({ theme: e }) => v(e).colors.text};
1439
+ font-size: ${({ theme: e }) => v(e).typography.small};
1440
+ font-weight: ${({ theme: e }) => v(e).font.weight.semibold};
1441
+ `, dt = c.textarea`
1442
+ box-sizing: border-box;
1443
+ width: 100%;
1444
+ height: ${({ $height: e, theme: t }) => e == null ? v(t).formControl.textareaHeight : typeof e == "number" ? `${e.toString()}px` : e};
1445
+ min-height: ${({ theme: e }) => v(e).formControl.textareaHeight};
1446
+ border: ${({ theme: e }) => v(e).formControl.border};
1447
+ border-radius: ${({ theme: e }) => v(e).formControl.borderRadius};
1448
+ padding: ${({ theme: e }) => v(e).formControl.padding};
1449
+ background: ${({ theme: e }) => v(e).colors.background};
1450
+ color: ${({ theme: e }) => v(e).colors.text};
1451
+ font: inherit;
1452
+ font-size: ${({ theme: e }) => v(e).formControl.fontSize};
1453
+ resize: ${({ $resizable: e }) => e ? "vertical" : "none"};
1454
+
1455
+ ${w("formControl")}
1456
+
1457
+ &:disabled {
1458
+ cursor: not-allowed;
1459
+ opacity: ${({ theme: e }) => v(e).opacity.disabled};
1460
+ }
1461
+
1462
+ ${({ $invalid: e, theme: t }) => e && s`
1463
+ border-color: ${v(t).colors.error};
1464
+ `}
1465
+
1466
+ ${({ $invalid: e, $warning: t, theme: n }) => !e && t && s`
1467
+ border-color: ${v(n).colors.warning};
1468
+ `}
1469
+
1470
+ &:focus,
1471
+ &:focus-visible {
1472
+ ${({ $invalid: e, $warning: t, theme: n }) => e ? s`
1473
+ border-color: ${v(n).colors.error};
1474
+ ` : t ? s`
1475
+ border-color: ${v(n).colors.warning};
1476
+ ` : ""}
1477
+ outline: none;
1478
+ }
1479
+ `, ft = c.div`
1480
+ color: ${({ theme: e, $type: t }) => v(e).colors[t]};
1481
+ font-size: ${({ theme: e }) => v(e).typography.small};
1482
+ `;
1483
+ // src/components/atoms/ATextarea/ATextarea.tsx
1484
+ function pt({ id: e, label: t, error: r, warning: i, height: a, resizable: o = !1, ref: s, "aria-describedby": c, "aria-invalid": d, ...f }) {
1485
+ let p = n(), m = e ?? p, h = `${m}-error`, g = `${m}-warning`, _ = !!r || d === !0 || d === "true", v = [
1486
+ c,
1487
+ r ? h : void 0,
1488
+ i ? g : void 0
1489
+ ].filter(Boolean).join(" ") || void 0;
1490
+ return /* @__PURE__ */ u(lt, { children: [
1491
+ t ? /* @__PURE__ */ l(ut, {
1492
+ htmlFor: m,
1493
+ children: t
1494
+ }) : null,
1495
+ /* @__PURE__ */ l(dt, {
1496
+ ...f,
1497
+ $height: a,
1498
+ $invalid: _,
1499
+ $resizable: o,
1500
+ $warning: !!i,
1501
+ "aria-describedby": v,
1502
+ "aria-invalid": _ || void 0,
1503
+ id: m,
1504
+ ref: s
1505
+ }),
1506
+ r ? /* @__PURE__ */ l(ft, {
1507
+ $type: "error",
1508
+ id: h,
1509
+ role: "alert",
1510
+ children: r
1511
+ }) : null,
1512
+ i ? /* @__PURE__ */ l(ft, {
1513
+ $type: "warning",
1514
+ id: g,
1515
+ role: "status",
1516
+ children: i
1517
+ }) : null
1518
+ ] });
1519
+ }
1520
+ // src/components/atoms/ATypography/ATypography.styles.ts
1521
+ var mt = c.p`
1522
+ color: ${({ theme: e }) => v(e).colors.text};
1523
+ font-family: ${({ theme: e }) => v(e).font.sans};
1524
+ font-size: ${({ theme: e, $fontSize: t, $tag: n }) => {
1525
+ if (t !== void 0) return t;
1526
+ let r = v(e).typography;
1527
+ return n && Object.hasOwn(r, n) ? r[n] : r.fallback;
1528
+ }};
1529
+ `;
1530
+ // src/components/atoms/ATypography/ATypography.tsx
1531
+ function ht({ tag: e, as: t, fontSize: n, ...r }) {
1532
+ let i = e ?? t ?? "p";
1533
+ return /* @__PURE__ */ l(mt, {
1534
+ $tag: typeof i == "string" ? i : void 0,
1535
+ $fontSize: n,
1536
+ as: i,
1537
+ ...r
1538
+ });
1539
+ }
1540
+ // src/components/molecules/MModal/MModal.styles.ts
1541
+ var gt = s`
1542
+ position: fixed;
1543
+ inset: 0;
1544
+ z-index: 1000;
1545
+ display: flex;
1546
+ align-items: center;
1547
+ justify-content: center;
1548
+ padding: ${({ theme: e }) => v(e).space.lg};
1549
+ `, _t = s`
1550
+ position: absolute;
1551
+ inset: 0;
1552
+ border: none;
1553
+ padding: 0;
1554
+ cursor: pointer;
1555
+ background: color-mix(
1556
+ in srgb,
1557
+ ${({ theme: e }) => v(e).colors.bg} 25%,
1558
+ transparent
1559
+ );
1560
+ `, vt = s`
1561
+ position: relative;
1562
+ z-index: 1;
1563
+ box-sizing: border-box;
1564
+ display: flex;
1565
+ flex-direction: column;
1566
+ width: 100%;
1567
+ max-width: ${({ theme: e }) => v(e).modal.maxWidth};
1568
+ max-height: ${({ theme: e }) => v(e).modal.maxHeight};
1569
+ padding: ${({ theme: e }) => v(e).modal.padding};
1570
+ overflow: hidden;
1571
+ background-color: ${({ theme: e }) => v(e).colors.surface};
1572
+ border: ${({ theme: e }) => v(e).modal.border};
1573
+ border-radius: ${({ theme: e }) => v(e).modal.borderRadius};
1574
+ box-shadow: ${({ theme: e }) => v(e).shadow.modal};
1575
+ `, yt = s`
1576
+ display: flex;
1577
+ align-items: center;
1578
+ justify-content: space-between;
1579
+ gap: ${({ theme: e }) => v(e).space.md};
1580
+ flex-shrink: 0;
1581
+ `, bt = s`
1582
+ margin: 0;
1583
+ min-width: 0;
1584
+ flex: 1;
1585
+ font-family: ${({ theme: e }) => v(e).font.sans};
1586
+ font-size: ${({ theme: e }) => v(e).modal.title.fontSize};
1587
+ font-weight: ${({ theme: e }) => v(e).modal.title.fontWeight};
1588
+ color: ${({ theme: e }) => v(e).colors.text};
1589
+ `, xt = s`
1590
+ flex: 1;
1591
+ min-height: 0;
1592
+ margin-top: ${({ theme: e }) => v(e).space.lg};
1593
+ overflow-x: hidden;
1594
+ overflow-y: auto;
1595
+ font-family: ${({ theme: e }) => v(e).font.sans};
1596
+ font-size: ${({ theme: e }) => v(e).modal.body.fontSize};
1597
+ color: ${({ theme: e }) => v(e).colors.text};
1598
+ `, St = c.div`
1599
+ ${gt}
1600
+ `, Ct = c.button`
1601
+ ${_t}
1602
+ `, wt = c.div`
1603
+ ${vt}
1604
+ `, Tt = c.div`
1605
+ ${yt}
1606
+ `, Et = c.h2`
1607
+ ${bt}
1608
+ `, Dt = c.div`
1609
+ ${xt}
1610
+ `;
1611
+ // src/components/molecules/MModal/MModal.tsx
1612
+ function Ot() {
1613
+ return /* @__PURE__ */ l("svg", {
1614
+ viewBox: "0 0 24 24",
1615
+ children: /* @__PURE__ */ l("path", {
1616
+ fill: "currentColor",
1617
+ d: "M18.3 5.71a1 1 0 0 0-1.41 0L12 10.59 7.11 5.7A1 1 0 0 0 5.7 7.11L10.59 12l-4.9 4.89a1 1 0 1 0 1.42 1.42L12 13.41l4.89 4.9a1 1 0 0 0 1.42-1.42L13.41 12l4.9-4.89a1 1 0 0 0-.01-1.4Z"
1618
+ })
1619
+ });
1620
+ }
1621
+ function kt({ open: e, onClose: i, title: a, children: o, closeLabel: s = "Close" }) {
1622
+ let c = n(), f = r(null);
1623
+ return t(() => {
1624
+ if (!e) return;
1625
+ f.current?.focus();
1626
+ let t = document.body.style.overflow;
1627
+ document.body.style.overflow = "hidden";
1628
+ let n = (e) => {
1629
+ e.key === "Escape" && i();
1630
+ };
1631
+ return document.addEventListener("keydown", n), () => {
1632
+ document.body.style.overflow = t, document.removeEventListener("keydown", n);
1633
+ };
1634
+ }, [e, i]), !e || typeof document > "u" ? null : d(/* @__PURE__ */ u(St, { children: [/* @__PURE__ */ l(Ct, {
1635
+ type: "button",
1636
+ "aria-label": "Close overlay",
1637
+ onClick: i
1638
+ }), /* @__PURE__ */ u(wt, {
1639
+ ref: f,
1640
+ role: "dialog",
1641
+ "aria-modal": "true",
1642
+ "aria-labelledby": c,
1643
+ tabIndex: -1,
1644
+ children: [/* @__PURE__ */ u(Tt, { children: [/* @__PURE__ */ l(Et, {
1645
+ id: c,
1646
+ children: a
1647
+ }), /* @__PURE__ */ l(R, {
1648
+ "aria-label": s,
1649
+ ghost: !0,
1650
+ onClick: i,
1651
+ shape: "rounded",
1652
+ size: "md",
1653
+ variant: "primary",
1654
+ children: /* @__PURE__ */ l(Ot, {})
1655
+ })] }), o == null ? null : /* @__PURE__ */ l(Dt, { children: o })]
1656
+ })] }), document.body);
1657
+ }
1658
+ // node_modules/react-router/dist/development/chunk-6KYCQHYJ.mjs
1659
+ var At = /^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i, jt = /^[\\/]{2}/;
1660
+ function Mt(e, t) {
1661
+ return t + e.replace(/\\/g, "/");
1662
+ }
1663
+ function z(e, t) {
1664
+ if (e === !1 || e == null) throw Error(t);
1665
+ }
1666
+ function B(e, t) {
1667
+ if (!e) {
1668
+ typeof console < "u" && console.warn(t);
1669
+ try {
1670
+ throw Error(t);
1671
+ } catch {}
1672
+ }
1673
+ }
1674
+ function V({ pathname: e = "/", search: t = "", hash: n = "" }) {
1675
+ return t && t !== "?" && (e += t.charAt(0) === "?" ? t : "?" + t), n && n !== "#" && (e += n.charAt(0) === "#" ? n : "#" + n), e;
1676
+ }
1677
+ function H(e) {
1678
+ let t = {};
1679
+ if (e) {
1680
+ let n = e.indexOf("#");
1681
+ n >= 0 && (t.hash = e.substring(n), e = e.substring(0, n));
1682
+ let r = e.indexOf("?");
1683
+ r >= 0 && (t.search = e.substring(r), e = e.substring(0, r)), e && (t.pathname = e);
1684
+ }
1685
+ return t;
1686
+ }
1687
+ function Nt(e, t, n = "/") {
1688
+ return Pt(e, t, n, !1);
1689
+ }
1690
+ function Pt(e, t, n, r, i) {
1691
+ let a = W((typeof t == "string" ? H(t) : t).pathname || "/", n);
1692
+ if (a == null) return null;
1693
+ let o = i ?? Ft(e), s = null, c = Zt(a);
1694
+ for (let e = 0; s == null && e < o.length; ++e) s = Jt(o[e], c, r);
1695
+ return s;
1696
+ }
1697
+ function Ft(e) {
1698
+ let t = It(e);
1699
+ return Rt(t), t;
1700
+ }
1701
+ function It(e, t = [], n = [], r = "", i = !1) {
1702
+ let a = (e, a, o = i, s) => {
1703
+ let c = {
1704
+ relativePath: s === void 0 ? e.path || "" : s,
1705
+ caseSensitive: e.caseSensitive === !0,
1706
+ childrenIndex: a,
1707
+ route: e
1708
+ };
1709
+ if (c.relativePath.startsWith("/")) {
1710
+ if (!c.relativePath.startsWith(r) && o) return;
1711
+ z(c.relativePath.startsWith(r), `Absolute route path "${c.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`), c.relativePath = c.relativePath.slice(r.length);
1712
+ }
1713
+ let l = G([r, c.relativePath]), u = n.concat(c);
1714
+ e.children && e.children.length > 0 && (z(e.index !== !0, `Index routes must not have child routes. Please remove all child routes from route path "${l}".`), It(e.children, t, u, l, o)), (e.path != null || e.index) && t.push({
1715
+ path: l,
1716
+ score: Kt(l, e.index),
1717
+ routesMeta: u.map((e, t) => {
1718
+ let [n, r] = Xt(e.relativePath, e.caseSensitive, t === u.length - 1);
1719
+ return {
1720
+ ...e,
1721
+ matcher: n,
1722
+ compiledParams: r
1723
+ };
1724
+ })
1725
+ });
1726
+ };
1727
+ return e.forEach((e, t) => {
1728
+ if (e.path === "" || !e.path?.includes("?")) a(e, t);
1729
+ else for (let n of Lt(e.path)) a(e, t, !0, n);
1730
+ }), t;
1731
+ }
1732
+ function Lt(e) {
1733
+ let t = e.split("/");
1734
+ if (t.length === 0) return [];
1735
+ let [n, ...r] = t, i = n.endsWith("?"), a = n.replace(/\?$/, "");
1736
+ if (r.length === 0) return i ? [a, ""] : [a];
1737
+ let o = Lt(r.join("/")), s = [];
1738
+ return s.push(...o.map((e) => e === "" ? a : [a, e].join("/"))), i && s.push(...o), s.map((t) => e.startsWith("/") && t === "" ? "/" : t);
1739
+ }
1740
+ function Rt(e) {
1741
+ e.sort((e, t) => e.score === t.score ? qt(e.routesMeta.map((e) => e.childrenIndex), t.routesMeta.map((e) => e.childrenIndex)) : t.score - e.score);
1742
+ }
1743
+ var zt = /^:[\w-]+$/, Bt = 3, Vt = 2, Ht = 1, Ut = 10, Wt = -2, Gt = (e) => e === "*";
1744
+ function Kt(e, t) {
1745
+ let n = e.split("/"), r = n.length;
1746
+ return n.some(Gt) && (r += Wt), t && (r += Vt), n.filter((e) => !Gt(e)).reduce((e, t) => e + (zt.test(t) ? Bt : t === "" ? Ht : Ut), r);
1747
+ }
1748
+ function qt(e, t) {
1749
+ return e.length === t.length && e.slice(0, -1).every((e, n) => e === t[n]) ? e[e.length - 1] - t[t.length - 1] : 0;
1750
+ }
1751
+ function Jt(e, t, n = !1) {
1752
+ let { routesMeta: r } = e, i = {}, a = "/", o = [];
1753
+ for (let e = 0; e < r.length; ++e) {
1754
+ let s = r[e], c = e === r.length - 1, l = a === "/" ? t : t.slice(a.length) || "/", u = {
1755
+ path: s.relativePath,
1756
+ caseSensitive: s.caseSensitive,
1757
+ end: c
1758
+ }, d = s.matcher && s.compiledParams ? Yt(u, l, s.matcher, s.compiledParams) : U(u, l), f = s.route;
1759
+ if (!d && c && n && !r[r.length - 1].route.index && (d = U({
1760
+ path: s.relativePath,
1761
+ caseSensitive: s.caseSensitive,
1762
+ end: !1
1763
+ }, l)), !d) return null;
1764
+ Object.assign(i, d.params), o.push({
1765
+ params: i,
1766
+ pathname: G([a, d.pathname]),
1767
+ pathnameBase: on(G([a, d.pathnameBase])),
1768
+ route: f
1769
+ }), d.pathnameBase !== "/" && (a = G([a, d.pathnameBase]));
1770
+ }
1771
+ return o;
1772
+ }
1773
+ function U(e, t) {
1774
+ typeof e == "string" && (e = {
1775
+ path: e,
1776
+ caseSensitive: !1,
1777
+ end: !0
1778
+ });
1779
+ let [n, r] = Xt(e.path, e.caseSensitive, e.end);
1780
+ return Yt(e, t, n, r);
1781
+ }
1782
+ function Yt(e, t, n, r) {
1783
+ let i = t.match(n);
1784
+ if (!i) return null;
1785
+ let a = i[0], o = K(a, 1), s = i.slice(1);
1786
+ return {
1787
+ params: r.reduce((e, { paramName: t, isOptional: n }, r) => {
1788
+ if (t === "*") {
1789
+ let e = s[r] || "";
1790
+ o = K(a.slice(0, a.length - e.length), 1);
1791
+ }
1792
+ let i = s[r];
1793
+ return e[t] = n && !i ? void 0 : (i || "").replace(/%2F/g, "/"), e;
1794
+ }, {}),
1795
+ pathname: a,
1796
+ pathnameBase: o,
1797
+ pattern: e
1798
+ };
1799
+ }
1800
+ function Xt(e, t = !1, n = !0) {
1801
+ B(e === "*" || !e.endsWith("*") || e.endsWith("/*"), `Route path "${e}" will be treated as if it were "${e.replace(/\*$/, "/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/, "/*")}".`);
1802
+ let r = [], i = "^" + e.replace(/\/*\*?$/, "").replace(/^\/*/, "/").replace(/[\\.*+^${}|()[\]]/g, "\\$&").replace(/\/:([\w-]+)(\?)?/g, (e, t, n, i, a) => {
1803
+ if (r.push({
1804
+ paramName: t,
1805
+ isOptional: n != null
1806
+ }), n) {
1807
+ let t = a.charAt(i + e.length);
1808
+ return t && t !== "/" ? "/([^\\/]*)" : "(?:/([^\\/]*))?";
1809
+ }
1810
+ return "/([^\\/]+)";
1811
+ }).replace(/\/([\w-]+)\?(\/|$)/g, "(/$1)?$2");
1812
+ return e.endsWith("*") ? (r.push({ paramName: "*" }), i += e === "*" || e === "/*" ? "(.*)$" : "(?:\\/(.+)|\\/*)$") : n ? i += "\\/*$" : e !== "" && e !== "/" && (i += "(?:(?=\\/|$))"), [new RegExp(i, t ? void 0 : "i"), r];
1813
+ }
1814
+ function Zt(e) {
1815
+ try {
1816
+ return e.split("/").map((e) => decodeURIComponent(e).replace(/\//g, "%2F")).join("/");
1817
+ } catch (t) {
1818
+ return B(!1, `The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`), e;
1819
+ }
1820
+ }
1821
+ function W(e, t) {
1822
+ if (t === "/") return e;
1823
+ if (!e.toLowerCase().startsWith(t.toLowerCase())) return null;
1824
+ let n = t.endsWith("/") ? t.length - 1 : t.length, r = e.charAt(n);
1825
+ return r && r !== "/" ? null : e.slice(n) || "/";
1826
+ }
1827
+ function Qt(e, t = "/") {
1828
+ let { pathname: n, search: r = "", hash: i = "" } = typeof e == "string" ? H(e) : e, a;
1829
+ return n ? (n = an(n), a = n.startsWith("/") || n.startsWith("\\") ? $t(n.substring(1), "/") : $t(n, t)) : a = t, {
1830
+ pathname: a,
1831
+ search: sn(r),
1832
+ hash: cn(i)
1833
+ };
1834
+ }
1835
+ function $t(e, t) {
1836
+ let n = K(t).split("/");
1837
+ return e.split("/").forEach((e) => {
1838
+ e === ".." ? n.length > 1 && n.pop() : e !== "." && n.push(e);
1839
+ }), n.length > 1 ? n.join("/") : "/";
1840
+ }
1841
+ function en(e, t, n, r) {
1842
+ return `Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`;
1843
+ }
1844
+ function tn(e) {
1845
+ return e.filter((e, t) => t === 0 || e.route.path && e.route.path.length > 0);
1846
+ }
1847
+ function nn(e) {
1848
+ let t = tn(e);
1849
+ return t.map((e, n) => n === t.length - 1 ? e.pathname : e.pathnameBase);
1850
+ }
1851
+ function rn(e, t, n, r = !1) {
1852
+ let i;
1853
+ typeof e == "string" ? i = H(e) : (i = { ...e }, z(!i.pathname || !i.pathname.includes("?"), en("?", "pathname", "search", i)), z(!i.pathname || !i.pathname.includes("#"), en("#", "pathname", "hash", i)), z(!i.search || !i.search.includes("#"), en("#", "search", "hash", i)));
1854
+ let a = e === "" || i.pathname === "", o = a ? "/" : i.pathname, s;
1855
+ if (o == null) s = n;
1856
+ else {
1857
+ let e = t.length - 1;
1858
+ if (!r && o.startsWith("..")) {
1859
+ let t = o.split("/");
1860
+ for (; t[0] === "..";) t.shift(), --e;
1861
+ i.pathname = t.join("/");
1862
+ }
1863
+ s = e >= 0 ? t[e] : "/";
1864
+ }
1865
+ let c = Qt(i, s), l = o && o !== "/" && o.endsWith("/"), u = (a || o === ".") && n.endsWith("/");
1866
+ return !c.pathname.endsWith("/") && (l || u) && (c.pathname += "/"), c;
1867
+ }
1868
+ var an = (e) => e.replace(/[\\/]{2,}/g, "/"), G = (e) => an(e.join("/"));
1869
+ function K(e, t = 0) {
1870
+ let n = e.length;
1871
+ for (; n > t && e.charCodeAt(n - 1) === 47;) n--;
1872
+ return n === e.length ? e : e.slice(0, n);
1873
+ }
1874
+ var on = (e) => K(e).replace(/^\/*/, "/"), sn = (e) => !e || e === "?" ? "" : e.startsWith("?") ? e : "?" + e, cn = (e) => !e || e === "#" ? "" : e.startsWith("#") ? e : "#" + e, ln = class {
1875
+ constructor(e, t, n, r = !1) {
1876
+ this.status = e, this.statusText = t || "", this.internal = r, n instanceof Error ? (this.data = n.toString(), this.error = n) : this.data = n;
1877
+ }
1878
+ };
1879
+ function un(e) {
1880
+ return e != null && typeof e.status == "number" && typeof e.statusText == "string" && typeof e.internal == "boolean" && "data" in e;
1881
+ }
1882
+ function dn(e) {
1883
+ return G(e.map((e) => e.route.path).filter(Boolean)) || "/";
1884
+ }
1885
+ var fn = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0;
1886
+ function pn(e, t) {
1887
+ let n = e;
1888
+ if (typeof n != "string" || !At.test(n)) return {
1889
+ absoluteURL: void 0,
1890
+ isExternal: !1,
1891
+ to: n
1892
+ };
1893
+ let r = n, i = !1;
1894
+ if (fn) try {
1895
+ let e = new URL(window.location.href), r = jt.test(n) ? new URL(Mt(n, e.protocol)) : new URL(n), a = W(r.pathname, t);
1896
+ r.origin === e.origin && a != null ? n = a + r.search + r.hash : i = !0;
1897
+ } catch {
1898
+ B(!1, `<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`);
1899
+ }
1900
+ return {
1901
+ absoluteURL: r,
1902
+ isExternal: i,
1903
+ to: n
1904
+ };
1905
+ }
1906
+ Object.getOwnPropertyNames(Object.prototype).sort().join("\0");
1907
+ var mn = new URL("http://localhost");
1908
+ function hn(e) {
1909
+ if (e.createURL) return e.createURL("/");
1910
+ try {
1911
+ return new URL(e.createHref("/"), mn);
1912
+ } catch {
1913
+ return mn;
1914
+ }
1915
+ }
1916
+ function gn(e, t) {
1917
+ return e.origin === t.origin && (e.origin !== "null" || e.protocol === t.protocol && e.host === t.host);
1918
+ }
1919
+ function _n(e, t) {
1920
+ if (e.startsWith("//")) return !0;
1921
+ let n = t.protocol.toLowerCase();
1922
+ return e.toLowerCase().startsWith(n) ? t.host === "" || e.slice(n.length).startsWith("//") : !1;
1923
+ }
1924
+ function vn(e, t, n, r) {
1925
+ let i = null;
1926
+ try {
1927
+ i = e == null ? null : new URL(e, n);
1928
+ } catch {}
1929
+ let a = new URL(t, n), o = i != null && !gn(i, n), s = !gn(a, n);
1930
+ if (r === "reject") {
1931
+ if (o || s) throw Error("External navigation is not allowed");
1932
+ } else if (s && (i == null || !_n(e, i) || !gn(i, a))) throw Error("External navigation is not allowed");
1933
+ }
1934
+ var yn = [
1935
+ "POST",
1936
+ "PUT",
1937
+ "PATCH",
1938
+ "DELETE"
1939
+ ];
1940
+ new Set(yn);
1941
+ var bn = ["GET", ...yn];
1942
+ new Set(bn);
1943
+ var xn = [
1944
+ "about:",
1945
+ "blob:",
1946
+ "chrome:",
1947
+ "chrome-untrusted:",
1948
+ "content:",
1949
+ "data:",
1950
+ "devtools:",
1951
+ "file:",
1952
+ "filesystem:",
1953
+ "javascript:"
1954
+ ];
1955
+ function Sn(e) {
1956
+ try {
1957
+ return xn.includes(new URL(e).protocol);
1958
+ } catch {
1959
+ return !1;
1960
+ }
1961
+ }
1962
+ var q = e.createContext(null);
1963
+ q.displayName = "DataRouter";
1964
+ var Cn = e.createContext(null);
1965
+ Cn.displayName = "DataRouterState";
1966
+ var wn = e.createContext(!1);
1967
+ function Tn() {
1968
+ return e.useContext(wn);
1969
+ }
1970
+ var En = e.createContext({ isTransitioning: !1 });
1971
+ En.displayName = "ViewTransition";
1972
+ var Dn = e.createContext(/* @__PURE__ */ new Map());
1973
+ Dn.displayName = "Fetchers";
1974
+ var On = e.createContext(null);
1975
+ On.displayName = "Await";
1976
+ var J = e.createContext(null);
1977
+ J.displayName = "Navigation";
1978
+ var kn = e.createContext(null);
1979
+ kn.displayName = "Location";
1980
+ var Y = e.createContext({
1981
+ outlet: null,
1982
+ matches: [],
1983
+ isDataRoute: !1
1984
+ });
1985
+ Y.displayName = "Route";
1986
+ var An = e.createContext(null);
1987
+ An.displayName = "RouteError";
1988
+ var jn = "REACT_ROUTER_ERROR", Mn = "REDIRECT", Nn = "ROUTE_ERROR_RESPONSE";
1989
+ function Pn(e) {
1990
+ if (e.startsWith(`${jn}:${Mn}:{`)) try {
1991
+ let t = JSON.parse(e.slice(28));
1992
+ if (typeof t == "object" && t && typeof t.status == "number" && typeof t.statusText == "string" && typeof t.location == "string" && typeof t.reloadDocument == "boolean" && typeof t.replace == "boolean") return t;
1993
+ } catch {}
1994
+ }
1995
+ function Fn(e) {
1996
+ if (e.startsWith(`${jn}:${Nn}:{`)) try {
1997
+ let t = JSON.parse(e.slice(40));
1998
+ if (typeof t == "object" && t && typeof t.status == "number" && typeof t.statusText == "string") return new ln(t.status, t.statusText, t.data);
1999
+ } catch {}
2000
+ }
2001
+ function In(t, { relative: n } = {}) {
2002
+ z(Ln(), "useHref() may be used only in the context of a <Router> component.");
2003
+ let { basename: r, navigator: i } = e.useContext(J), { hash: a, pathname: o, search: s } = Z(t, { relative: n }), c = o;
2004
+ return r !== "/" && (c = o === "/" ? r : G([r, o])), i.createHref({
2005
+ pathname: c,
2006
+ search: s,
2007
+ hash: a
2008
+ });
2009
+ }
2010
+ function Ln() {
2011
+ return e.useContext(kn) != null;
2012
+ }
2013
+ function X() {
2014
+ return z(Ln(), "useLocation() may be used only in the context of a <Router> component."), e.useContext(kn).location;
2015
+ }
2016
+ var Rn = "You should call navigate() in a React.useEffect(), not when your component is first rendered.";
2017
+ function zn(t) {
2018
+ e.useContext(J).static || e.useLayoutEffect(t);
2019
+ }
2020
+ function Bn() {
2021
+ let { isDataRoute: t } = e.useContext(Y);
2022
+ return t ? rr() : Vn();
2023
+ }
2024
+ function Vn() {
2025
+ z(Ln(), "useNavigate() may be used only in the context of a <Router> component.");
2026
+ let t = e.useContext(q), { basename: n, navigator: r } = e.useContext(J), { matches: i } = e.useContext(Y), { pathname: a } = X(), o = JSON.stringify(nn(i)), s = e.useRef(!1);
2027
+ return zn(() => {
2028
+ s.current = !0;
2029
+ }), e.useCallback((e, i = {}) => {
2030
+ if (B(s.current, Rn), !s.current) return;
2031
+ if (typeof e == "number") {
2032
+ r.go(e);
2033
+ return;
2034
+ }
2035
+ let c = rn(e, JSON.parse(o), a, i.relative === "path");
2036
+ t == null && n !== "/" && (c.pathname = c.pathname === "/" ? n : G([n, c.pathname])), vn(typeof e == "string" ? e : V(e), r.createHref(c), hn(r), "reject"), (i.replace ? r.replace : r.push)(c, i.state, i);
2037
+ }, [
2038
+ n,
2039
+ r,
2040
+ o,
2041
+ a,
2042
+ t
2043
+ ]);
2044
+ }
2045
+ e.createContext(null);
2046
+ function Z(t, { relative: n } = {}) {
2047
+ let { matches: r } = e.useContext(Y), { pathname: i } = X(), a = JSON.stringify(nn(r));
2048
+ return e.useMemo(() => rn(t, JSON.parse(a), i, n === "path"), [
2049
+ t,
2050
+ a,
2051
+ i,
2052
+ n
2053
+ ]);
2054
+ }
2055
+ function Hn(t, n, r) {
2056
+ z(Ln(), "useRoutes() may be used only in the context of a <Router> component.");
2057
+ let { navigator: i } = e.useContext(J), { matches: a } = e.useContext(Y), o = a[a.length - 1], s = o ? o.params : {}, c = o ? o.pathname : "/", l = o ? o.pathnameBase : "/", u = o && o.route;
2058
+ {
2059
+ let e = u && u.path || "";
2060
+ ar(c, !u || e.endsWith("*") || e.endsWith("*?"), `You rendered descendant <Routes> (or called \`useRoutes()\`) at "${c}" (under <Route path="${e}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
2061
+
2062
+ Please change the parent <Route path="${e}"> to <Route path="${e === "/" ? "*" : `${e}/*`}">.`);
2063
+ }
2064
+ let d = X(), f;
2065
+ if (n) {
2066
+ let e = typeof n == "string" ? H(n) : n;
2067
+ z(l === "/" || e.pathname?.startsWith(l), `When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${l}" but pathname "${e.pathname}" was given in the \`location\` prop.`), f = e;
2068
+ } else f = d;
2069
+ let p = f.pathname || "/", m = p;
2070
+ if (l !== "/") {
2071
+ let e = l.replace(/^\//, "").split("/");
2072
+ m = "/" + p.replace(/^\//, "").split("/").slice(e.length).join("/");
2073
+ }
2074
+ let h = r && r.state.matches.length ? r.state.matches.map((e) => Object.assign(e, { route: r.manifest[e.route.id] || e.route })) : Nt(t, { pathname: m });
2075
+ B(u || h != null, `No routes matched location "${f.pathname}${f.search}${f.hash}" `), B(h == null || h[h.length - 1].route.element !== void 0 || h[h.length - 1].route.Component !== void 0 || h[h.length - 1].route.lazy !== void 0, `Matched leaf route at location "${f.pathname}${f.search}${f.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);
2076
+ let g = Yn(h && h.map((e) => Object.assign({}, e, {
2077
+ params: Object.assign({}, s, e.params),
2078
+ pathname: G([l, i.encodeLocation ? i.encodeLocation(e.pathname.replace(/%/g, "%25").replace(/\?/g, "%3F").replace(/#/g, "%23")).pathname : e.pathname]),
2079
+ pathnameBase: e.pathnameBase === "/" ? l : G([l, i.encodeLocation ? i.encodeLocation(e.pathnameBase.replace(/%/g, "%25").replace(/\?/g, "%3F").replace(/#/g, "%23")).pathname : e.pathnameBase])
2080
+ })), a, r);
2081
+ return n && g ? /* @__PURE__ */ e.createElement(kn.Provider, { value: {
2082
+ location: {
2083
+ pathname: "/",
2084
+ search: "",
2085
+ hash: "",
2086
+ state: null,
2087
+ key: "default",
2088
+ mask: void 0,
2089
+ ...f
2090
+ },
2091
+ navigationType: "POP"
2092
+ } }, g) : g;
2093
+ }
2094
+ function Un() {
2095
+ let t = nr(), n = un(t) ? `${t.status} ${t.statusText}` : t instanceof Error ? t.message : JSON.stringify(t), r = t instanceof Error ? t.stack : null, i = "rgba(200,200,200, 0.5)", a = {
2096
+ padding: "0.5rem",
2097
+ backgroundColor: i
2098
+ }, o = {
2099
+ padding: "2px 4px",
2100
+ backgroundColor: i
2101
+ }, s = null;
2102
+ return console.error("Error handled by React Router default ErrorBoundary:", t), s = /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("p", null, "💿 Hey developer 👋"), /* @__PURE__ */ e.createElement("p", null, "You can provide a way better UX than this when your app throws errors by providing your own ", /* @__PURE__ */ e.createElement("code", { style: o }, "ErrorBoundary"), " or", " ", /* @__PURE__ */ e.createElement("code", { style: o }, "errorElement"), " prop on your route.")), /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("h2", null, "Unexpected Application Error!"), /* @__PURE__ */ e.createElement("h3", { style: { fontStyle: "italic" } }, n), r ? /* @__PURE__ */ e.createElement("pre", { style: a }, r) : null, s);
2103
+ }
2104
+ var Wn = /* @__PURE__ */ e.createElement(Un, null), Gn = class extends e.Component {
2105
+ constructor(e) {
2106
+ super(e), this.state = {
2107
+ location: e.location,
2108
+ revalidation: e.revalidation,
2109
+ error: e.error
2110
+ };
2111
+ }
2112
+ static getDerivedStateFromError(e) {
2113
+ return { error: e };
2114
+ }
2115
+ static getDerivedStateFromProps(e, t) {
2116
+ return t.location !== e.location || t.revalidation !== "idle" && e.revalidation === "idle" ? {
2117
+ error: e.error,
2118
+ location: e.location,
2119
+ revalidation: e.revalidation
2120
+ } : {
2121
+ error: e.error === void 0 ? t.error : e.error,
2122
+ location: t.location,
2123
+ revalidation: e.revalidation || t.revalidation
2124
+ };
2125
+ }
2126
+ componentDidCatch(e, t) {
2127
+ this.props.onError ? this.props.onError(e, t) : console.error("React Router caught the following error during render", e);
2128
+ }
2129
+ render() {
2130
+ let t = this.state.error;
2131
+ if (this.context && typeof t == "object" && t && "digest" in t && typeof t.digest == "string") {
2132
+ let e = Fn(t.digest);
2133
+ e && (t = e);
2134
+ }
2135
+ let n = t === void 0 ? this.props.children : /* @__PURE__ */ e.createElement(Y.Provider, { value: this.props.routeContext }, /* @__PURE__ */ e.createElement(An.Provider, {
2136
+ value: t,
2137
+ children: this.props.component
2138
+ }));
2139
+ return this.context ? /* @__PURE__ */ e.createElement(qn, { error: t }, n) : n;
2140
+ }
2141
+ };
2142
+ Gn.contextType = wn;
2143
+ var Kn = /* @__PURE__ */ new WeakMap();
2144
+ function qn({ children: t, error: n }) {
2145
+ let { basename: r, navigator: i } = e.useContext(J);
2146
+ if (typeof n == "object" && n && "digest" in n && typeof n.digest == "string") {
2147
+ let t = Pn(n.digest);
2148
+ if (t) {
2149
+ let a = Kn.get(n);
2150
+ if (a) throw a;
2151
+ let o = pn(t.location, r), s = o.absoluteURL || o.to;
2152
+ if (vn(t.location, s, hn(i), "allow-explicit"), Sn(s)) throw Error("Invalid redirect location");
2153
+ if (fn && !Kn.get(n)) {
2154
+ if (o.isExternal || t.reloadDocument) window.location.href = s;
2155
+ else {
2156
+ let e = Promise.resolve().then(() => window.__reactRouterDataRouter.navigate(o.to, { replace: t.replace }));
2157
+ throw Kn.set(n, e), e;
2158
+ }
2159
+ }
2160
+ return /* @__PURE__ */ e.createElement("meta", {
2161
+ httpEquiv: "refresh",
2162
+ content: `0;url=${s}`
2163
+ });
2164
+ }
2165
+ }
2166
+ return t;
2167
+ }
2168
+ function Jn({ routeContext: t, match: n, children: r }) {
2169
+ let i = e.useContext(q);
2170
+ return i && i.static && i.staticContext && (n.route.errorElement || n.route.ErrorBoundary) && (i.staticContext._deepestRenderedBoundaryId = n.route.id), /* @__PURE__ */ e.createElement(Y.Provider, { value: t }, r);
2171
+ }
2172
+ function Yn(t, n = [], r) {
2173
+ let i = r?.state;
2174
+ if (t == null) {
2175
+ if (!i) return null;
2176
+ if (i.errors) t = i.matches;
2177
+ else if (n.length === 0 && !i.initialized && i.matches.length > 0) t = i.matches;
2178
+ else return null;
2179
+ }
2180
+ let a = t, o = i?.errors;
2181
+ if (o != null) {
2182
+ let e = a.findIndex((e) => e.route.id && o?.[e.route.id] !== void 0);
2183
+ z(e >= 0, `Could not find a matching route for errors on route IDs: ${Object.keys(o).join(",")}`), a = a.slice(0, Math.min(a.length, e + 1));
2184
+ }
2185
+ let s = !1, c = -1;
2186
+ if (r && i) {
2187
+ s = i.renderFallback;
2188
+ for (let e = 0; e < a.length; e++) {
2189
+ let t = a[e];
2190
+ if ((t.route.HydrateFallback || t.route.hydrateFallbackElement) && (c = e), t.route.id) {
2191
+ let { loaderData: e, errors: n } = i, o = t.route.loader && !e.hasOwnProperty(t.route.id) && (!n || n[t.route.id] === void 0);
2192
+ if (t.route.lazy || o) {
2193
+ r.isStatic && (s = !0), a = c >= 0 ? a.slice(0, c + 1) : [a[0]];
2194
+ break;
2195
+ }
2196
+ }
2197
+ }
2198
+ }
2199
+ let l = r?.onError, u = i && l ? (e, t) => {
2200
+ l(e, {
2201
+ location: i.location,
2202
+ params: i.matches?.[0]?.params ?? {},
2203
+ pattern: dn(i.matches),
2204
+ errorInfo: t
2205
+ });
2206
+ } : void 0;
2207
+ return a.reduceRight((t, r, l) => {
2208
+ let d, f = !1, p = null, m = null;
2209
+ i && (d = o && r.route.id ? o[r.route.id] : void 0, p = r.route.errorElement || Wn, s && (c < 0 && l === 0 ? (ar("route-fallback", !1, "No `HydrateFallback` element provided to render during initial hydration"), f = !0, m = null) : c === l && (f = !0, m = r.route.hydrateFallbackElement || null)));
2210
+ let h = n.concat(a.slice(0, l + 1)), g = () => {
2211
+ let n;
2212
+ return n = d ? p : f ? m : r.route.Component ? /* @__PURE__ */ e.createElement(r.route.Component, null) : r.route.element ? r.route.element : t, /* @__PURE__ */ e.createElement(Jn, {
2213
+ match: r,
2214
+ routeContext: {
2215
+ outlet: t,
2216
+ matches: h,
2217
+ isDataRoute: i != null
2218
+ },
2219
+ children: n
2220
+ });
2221
+ };
2222
+ return i && (r.route.ErrorBoundary || r.route.errorElement || l === 0) ? /* @__PURE__ */ e.createElement(Gn, {
2223
+ location: i.location,
2224
+ revalidation: i.revalidation,
2225
+ component: p,
2226
+ error: d,
2227
+ children: g(),
2228
+ routeContext: {
2229
+ outlet: null,
2230
+ matches: h,
2231
+ isDataRoute: !0
2232
+ },
2233
+ onError: u
2234
+ }) : g();
2235
+ }, null);
2236
+ }
2237
+ function Xn(e) {
2238
+ return `${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`;
2239
+ }
2240
+ function Zn(t) {
2241
+ let n = e.useContext(q);
2242
+ return z(n, Xn(t)), n;
2243
+ }
2244
+ function Qn(t) {
2245
+ let n = e.useContext(Cn);
2246
+ return z(n, Xn(t)), n;
2247
+ }
2248
+ function $n(t) {
2249
+ let n = e.useContext(Y);
2250
+ return z(n, Xn(t)), n;
2251
+ }
2252
+ function er(e) {
2253
+ let t = $n(e), n = t.matches[t.matches.length - 1];
2254
+ return z(n.route.id, `${e} can only be used on routes that contain a unique "id"`), n.route.id;
2255
+ }
2256
+ function tr() {
2257
+ return er("useRouteId");
2258
+ }
2259
+ function nr() {
2260
+ let t = e.useContext(An), n = Qn("useRouteError"), r = er("useRouteError");
2261
+ return t === void 0 ? n.errors?.[r] : t;
2262
+ }
2263
+ function rr() {
2264
+ let { router: t } = Zn("useNavigate"), n = er("useNavigate"), r = e.useRef(!1);
2265
+ return zn(() => {
2266
+ r.current = !0;
2267
+ }), e.useCallback(async (e, i = {}) => {
2268
+ B(r.current, Rn), r.current && (typeof e == "number" ? await t.navigate(e) : await t.navigate(e, {
2269
+ fromRouteId: n,
2270
+ ...i
2271
+ }));
2272
+ }, [t, n]);
2273
+ }
2274
+ var ir = {};
2275
+ function ar(e, t, n) {
2276
+ !t && !ir[e] && (ir[e] = !0, B(!1, n));
2277
+ }
2278
+ e.memo(or);
2279
+ function or({ routes: e, manifest: t, future: n, state: r, isStatic: i, onError: a }) {
2280
+ return Hn(e, void 0, {
2281
+ manifest: t,
2282
+ state: r,
2283
+ isStatic: i,
2284
+ onError: a,
2285
+ future: n
2286
+ });
2287
+ }
2288
+ e.Component;
2289
+ var sr = "get", cr = "application/x-www-form-urlencoded";
2290
+ function lr(e) {
2291
+ return typeof HTMLElement < "u" && e instanceof HTMLElement;
2292
+ }
2293
+ function ur(e) {
2294
+ return lr(e) && e.tagName.toLowerCase() === "button";
2295
+ }
2296
+ function dr(e) {
2297
+ return lr(e) && e.tagName.toLowerCase() === "form";
2298
+ }
2299
+ function fr(e) {
2300
+ return lr(e) && e.tagName.toLowerCase() === "input";
2301
+ }
2302
+ function pr(e) {
2303
+ return !!(e.metaKey || e.altKey || e.ctrlKey || e.shiftKey);
2304
+ }
2305
+ function mr(e, t) {
2306
+ return e.button === 0 && (!t || t === "_self") && !pr(e);
2307
+ }
2308
+ var hr = null;
2309
+ function gr() {
2310
+ if (hr === null) try {
2311
+ new FormData(document.createElement("form"), 0), hr = !1;
2312
+ } catch {
2313
+ hr = !0;
2314
+ }
2315
+ return hr;
2316
+ }
2317
+ var _r = /* @__PURE__ */ new Set([
2318
+ "application/x-www-form-urlencoded",
2319
+ "multipart/form-data",
2320
+ "text/plain"
2321
+ ]);
2322
+ function vr(e) {
2323
+ return e != null && !_r.has(e) ? (B(!1, `"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${cr}"`), null) : e;
2324
+ }
2325
+ function yr(e, t) {
2326
+ let n, r, i, a, o;
2327
+ if (dr(e)) {
2328
+ let o = e.getAttribute("action");
2329
+ r = o ? W(o, t) : null, n = e.getAttribute("method") || sr, i = vr(e.getAttribute("enctype")) || cr, a = new FormData(e);
2330
+ } else if (ur(e) || fr(e) && (e.type === "submit" || e.type === "image")) {
2331
+ let o = e.form;
2332
+ if (o == null) throw Error("Cannot submit a <button> or <input type=\"submit\"> without a <form>");
2333
+ let s = e.getAttribute("formaction") || o.getAttribute("action");
2334
+ if (r = s ? W(s, t) : null, n = e.getAttribute("formmethod") || o.getAttribute("method") || sr, i = vr(e.getAttribute("formenctype")) || vr(o.getAttribute("enctype")) || cr, a = new FormData(o, e), !gr()) {
2335
+ let { name: t, type: n, value: r } = e;
2336
+ if (n === "image") {
2337
+ let e = t ? `${t}.` : "";
2338
+ a.append(`${e}x`, "0"), a.append(`${e}y`, "0");
2339
+ } else t && a.append(t, r);
2340
+ }
2341
+ } else if (lr(e)) throw Error("Cannot submit element that is not <form>, <button>, or <input type=\"submit|image\">");
2342
+ else n = sr, r = null, i = cr, o = e;
2343
+ return a && i === "text/plain" && (o = a, a = void 0), {
2344
+ action: r,
2345
+ method: n.toLowerCase(),
2346
+ encType: i,
2347
+ formData: a,
2348
+ body: o
2349
+ };
2350
+ }
2351
+ Object.getOwnPropertyNames(Object.prototype).sort().join("\0");
2352
+ function br(e, t) {
2353
+ if (e === !1 || e == null) throw Error(t);
2354
+ }
2355
+ function xr(e, t, n, r) {
2356
+ let i = typeof e == "string" ? new URL(e, typeof window > "u" ? "server://singlefetch/" : window.location.origin) : e;
2357
+ return i.pathname = n ? i.pathname.endsWith("/") ? `${i.pathname}_.${r}` : `${i.pathname}.${r}` : i.pathname === "/" ? `_root.${r}` : t && W(i.pathname, t) === "/" ? `${K(t)}/_root.${r}` : `${K(i.pathname)}.${r}`, i;
2358
+ }
2359
+ async function Sr(e, t) {
2360
+ if (e.id in t) return t[e.id];
2361
+ try {
2362
+ let n = await import(
2363
+ /* @vite-ignore */
2364
+ /* webpackIgnore: true */
2365
+ e.module
2366
+ );
2367
+ return t[e.id] = n, n;
2368
+ } catch (t) {
2369
+ return console.error(`Error loading route module \`${e.module}\`, reloading page...`), console.error(t), window.__reactRouterContext && window.__reactRouterContext.isSpaMode, window.location.reload(), new Promise(() => {});
2370
+ }
2371
+ }
2372
+ function Cr(e) {
2373
+ return e != null && typeof e.page == "string";
2374
+ }
2375
+ function wr(e) {
2376
+ return e == null ? !1 : e.href == null ? e.rel === "preload" && typeof e.imageSrcSet == "string" && typeof e.imageSizes == "string" : typeof e.rel == "string" && typeof e.href == "string";
2377
+ }
2378
+ async function Tr(e, t, n) {
2379
+ return Ar((await Promise.all(e.map(async (e) => {
2380
+ let r = t.routes[e.route.id];
2381
+ if (r) {
2382
+ let e = await Sr(r, n);
2383
+ return e.links ? e.links() : [];
2384
+ }
2385
+ return [];
2386
+ }))).flat(1).filter(wr).filter((e) => e.rel === "stylesheet" || e.rel === "preload").map((e) => e.rel === "stylesheet" ? {
2387
+ ...e,
2388
+ rel: "prefetch",
2389
+ as: "style"
2390
+ } : {
2391
+ ...e,
2392
+ rel: "prefetch"
2393
+ }));
2394
+ }
2395
+ function Er(e, t, n, r, i, a) {
2396
+ let o = (e, t) => !n[t] || e.route.id !== n[t].route.id, s = (e, t) => n[t].pathname !== e.pathname || n[t].route.path?.endsWith("*") && n[t].params["*"] !== e.params["*"];
2397
+ return a === "assets" ? t.filter((e, t) => o(e, t) || s(e, t)) : a === "data" ? t.filter((t, a) => {
2398
+ let c = r.routes[t.route.id];
2399
+ if (!c || !c.hasLoader) return !1;
2400
+ if (o(t, a) || s(t, a)) return !0;
2401
+ if (t.route.shouldRevalidate) {
2402
+ let r = t.route.shouldRevalidate({
2403
+ currentUrl: new URL(i.pathname + i.search + i.hash, window.origin),
2404
+ currentParams: n[0]?.params || {},
2405
+ nextUrl: new URL(e, window.origin),
2406
+ nextParams: t.params,
2407
+ defaultShouldRevalidate: !0
2408
+ });
2409
+ if (typeof r == "boolean") return r;
2410
+ }
2411
+ return !0;
2412
+ }) : [];
2413
+ }
2414
+ function Dr(e, t, { includeHydrateFallback: n } = {}) {
2415
+ return Or(e.map((e) => {
2416
+ let r = t.routes[e.route.id];
2417
+ if (!r) return [];
2418
+ let i = [r.module];
2419
+ return r.clientActionModule && (i = i.concat(r.clientActionModule)), r.clientLoaderModule && (i = i.concat(r.clientLoaderModule)), n && r.hydrateFallbackModule && (i = i.concat(r.hydrateFallbackModule)), r.imports && (i = i.concat(r.imports)), i;
2420
+ }).flat(1));
2421
+ }
2422
+ function Or(e) {
2423
+ return [...new Set(e)];
2424
+ }
2425
+ function kr(e) {
2426
+ let t = {}, n = Object.keys(e).sort();
2427
+ for (let r of n) t[r] = e[r];
2428
+ return t;
2429
+ }
2430
+ function Ar(e, t) {
2431
+ let n = /* @__PURE__ */ new Set(), r = new Set(t);
2432
+ return e.reduce((e, i) => {
2433
+ if (t && !Cr(i) && i.as === "script" && i.href && r.has(i.href)) return e;
2434
+ let a = JSON.stringify(kr(i));
2435
+ return n.has(a) || (n.add(a), e.push({
2436
+ key: a,
2437
+ link: i
2438
+ })), e;
2439
+ }, []);
2440
+ }
2441
+ function jr() {
2442
+ let t = e.useContext(q);
2443
+ return br(t, "You must render this element inside a <DataRouterContext.Provider> element"), t;
2444
+ }
2445
+ function Mr() {
2446
+ let t = e.useContext(Cn);
2447
+ return br(t, "You must render this element inside a <DataRouterStateContext.Provider> element"), t;
2448
+ }
2449
+ var Nr = e.createContext(void 0);
2450
+ Nr.displayName = "FrameworkContext";
2451
+ function Q() {
2452
+ let t = e.useContext(Nr);
2453
+ return br(t, "You must render this element inside a <HydratedRouter> element"), t;
2454
+ }
2455
+ function Pr(t, n) {
2456
+ let r = e.useContext(Nr), [i, a] = e.useState(!1), [o, s] = e.useState(!1), { onFocus: c, onBlur: l, onMouseEnter: u, onMouseLeave: d, onTouchStart: f } = n, p = e.useRef(null);
2457
+ e.useEffect(() => {
2458
+ if (t === "render" && s(!0), t === "viewport") {
2459
+ let e = new IntersectionObserver((e) => {
2460
+ e.forEach((e) => {
2461
+ s(e.isIntersecting);
2462
+ });
2463
+ }, { threshold: .5 });
2464
+ return p.current && e.observe(p.current), () => {
2465
+ e.disconnect();
2466
+ };
2467
+ }
2468
+ }, [t]), e.useEffect(() => {
2469
+ if (i) {
2470
+ let e = setTimeout(() => {
2471
+ s(!0);
2472
+ }, 100);
2473
+ return () => {
2474
+ clearTimeout(e);
2475
+ };
2476
+ }
2477
+ }, [i]);
2478
+ let m = () => {
2479
+ a(!0);
2480
+ }, h = () => {
2481
+ a(!1), s(!1);
2482
+ };
2483
+ return r ? t === "intent" ? [
2484
+ o,
2485
+ p,
2486
+ {
2487
+ onFocus: $(c, m),
2488
+ onBlur: $(l, h),
2489
+ onMouseEnter: $(u, m),
2490
+ onMouseLeave: $(d, h),
2491
+ onTouchStart: $(f, m)
2492
+ }
2493
+ ] : [
2494
+ o,
2495
+ p,
2496
+ {}
2497
+ ] : [
2498
+ !1,
2499
+ p,
2500
+ {}
2501
+ ];
2502
+ }
2503
+ function $(e, t) {
2504
+ return (n) => {
2505
+ e && e(n), n.defaultPrevented || t(n);
2506
+ };
2507
+ }
2508
+ function Fr({ page: t, ...n }) {
2509
+ let r = Tn(), { nonce: i } = Q(), { router: a } = jr(), o = e.useMemo(() => Nt(a.routes, t, a.basename), [
2510
+ a.routes,
2511
+ t,
2512
+ a.basename
2513
+ ]);
2514
+ return o ? (n.nonce == null && i && (n = {
2515
+ ...n,
2516
+ nonce: i
2517
+ }), r ? /* @__PURE__ */ e.createElement(Lr, {
2518
+ page: t,
2519
+ matches: o,
2520
+ ...n
2521
+ }) : /* @__PURE__ */ e.createElement(Rr, {
2522
+ page: t,
2523
+ matches: o,
2524
+ ...n
2525
+ })) : null;
2526
+ }
2527
+ function Ir(t) {
2528
+ let { manifest: n, routeModules: r } = Q(), [i, a] = e.useState([]);
2529
+ return e.useEffect(() => {
2530
+ let e = !1;
2531
+ return Tr(t, n, r).then((t) => {
2532
+ e || a(t);
2533
+ }), () => {
2534
+ e = !0;
2535
+ };
2536
+ }, [
2537
+ t,
2538
+ n,
2539
+ r
2540
+ ]), i;
2541
+ }
2542
+ function Lr({ page: t, matches: n, ...r }) {
2543
+ let i = X(), { future: a } = Q(), { basename: o } = jr(), s = e.useMemo(() => {
2544
+ if (t === i.pathname + i.search + i.hash) return [];
2545
+ let e = xr(t, o, a.v8_trailingSlashAwareDataRequests, "rsc"), r = !1, s = [];
2546
+ for (let e of n) typeof e.route.shouldRevalidate == "function" ? r = !0 : s.push(e.route.id);
2547
+ return r && s.length > 0 && e.searchParams.set("_routes", s.join(",")), [e.pathname + e.search];
2548
+ }, [
2549
+ o,
2550
+ a.v8_trailingSlashAwareDataRequests,
2551
+ t,
2552
+ i,
2553
+ n
2554
+ ]);
2555
+ return /* @__PURE__ */ e.createElement(e.Fragment, null, s.map((t) => /* @__PURE__ */ e.createElement("link", {
2556
+ key: t,
2557
+ rel: "prefetch",
2558
+ as: "fetch",
2559
+ href: t,
2560
+ ...r
2561
+ })));
2562
+ }
2563
+ function Rr({ page: t, matches: n, ...r }) {
2564
+ let i = X(), { future: a, manifest: o, routeModules: s } = Q(), { basename: c } = jr(), { loaderData: l, matches: u } = Mr(), d = e.useMemo(() => Er(t, n, u, o, i, "data"), [
2565
+ t,
2566
+ n,
2567
+ u,
2568
+ o,
2569
+ i
2570
+ ]), f = e.useMemo(() => Er(t, n, u, o, i, "assets"), [
2571
+ t,
2572
+ n,
2573
+ u,
2574
+ o,
2575
+ i
2576
+ ]), p = e.useMemo(() => {
2577
+ if (t === i.pathname + i.search + i.hash) return [];
2578
+ let e = /* @__PURE__ */ new Set(), r = !1;
2579
+ if (n.forEach((t) => {
2580
+ let n = o.routes[t.route.id];
2581
+ n && n.hasLoader && (!d.some((e) => e.route.id === t.route.id) && t.route.id in l && s[t.route.id]?.shouldRevalidate || n.hasClientLoader ? r = !0 : e.add(t.route.id));
2582
+ }), e.size === 0) return [];
2583
+ let u = xr(t, c, a.v8_trailingSlashAwareDataRequests, "data");
2584
+ return r && e.size > 0 && u.searchParams.set("_routes", n.filter((t) => e.has(t.route.id)).map((e) => e.route.id).join(",")), [u.pathname + u.search];
2585
+ }, [
2586
+ c,
2587
+ a.v8_trailingSlashAwareDataRequests,
2588
+ l,
2589
+ i,
2590
+ o,
2591
+ d,
2592
+ n,
2593
+ t,
2594
+ s
2595
+ ]), m = e.useMemo(() => Dr(f, o), [f, o]), h = Ir(f);
2596
+ return /* @__PURE__ */ e.createElement(e.Fragment, null, p.map((t) => /* @__PURE__ */ e.createElement("link", {
2597
+ key: t,
2598
+ rel: "prefetch",
2599
+ as: "fetch",
2600
+ href: t,
2601
+ ...r
2602
+ })), m.map((t) => /* @__PURE__ */ e.createElement("link", {
2603
+ key: t,
2604
+ rel: "modulepreload",
2605
+ href: t,
2606
+ ...r
2607
+ })), h.map(({ key: t, link: n }) => /* @__PURE__ */ e.createElement("link", {
2608
+ key: t,
2609
+ nonce: r.nonce,
2610
+ ...n,
2611
+ crossOrigin: n.crossOrigin ?? r.crossOrigin
2612
+ })));
2613
+ }
2614
+ function zr(...e) {
2615
+ return (t) => {
2616
+ e.forEach((e) => {
2617
+ typeof e == "function" ? e(t) : e != null && (e.current = t);
2618
+ });
2619
+ };
2620
+ }
2621
+ e.Component;
2622
+ var Br = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0;
2623
+ try {
2624
+ Br && (window.__reactRouterVersion = "7.18.5");
2625
+ } catch {}
2626
+ var Vr = e.forwardRef(function({ onClick: t, discover: n = "render", prefetch: r = "none", relative: i, reloadDocument: a, replace: o, mask: s, state: c, target: l, to: u, preventScrollReset: d, viewTransition: f, defaultShouldRevalidate: p, ...m }, h) {
2627
+ let { basename: g, navigator: _, useTransitions: v } = e.useContext(J), y = typeof u == "string" && At.test(u), b = pn(u, g);
2628
+ u = b.to;
2629
+ let x = In(u, { relative: i }), S = X(), C = null;
2630
+ if (s) {
2631
+ let e = rn(s, [], S.mask ? S.mask.pathname : "/", !0);
2632
+ g !== "/" && (e.pathname = e.pathname === "/" ? g : G([g, e.pathname])), C = _.createHref(e);
2633
+ }
2634
+ let [w, T, E] = Pr(r, m), D = Kr(u, {
2635
+ replace: o,
2636
+ mask: s,
2637
+ state: c,
2638
+ target: l,
2639
+ preventScrollReset: d,
2640
+ relative: i,
2641
+ viewTransition: f,
2642
+ defaultShouldRevalidate: p,
2643
+ useTransitions: v
2644
+ });
2645
+ function O(e) {
2646
+ t && t(e), e.defaultPrevented || D(e);
2647
+ }
2648
+ let k = !(b.isExternal || a), A = /* @__PURE__ */ e.createElement("a", {
2649
+ ...m,
2650
+ ...E,
2651
+ href: (k ? C : void 0) || b.absoluteURL || x,
2652
+ onClick: k ? O : t,
2653
+ ref: zr(h, T),
2654
+ target: l,
2655
+ "data-discover": !y && n === "render" ? "true" : void 0
2656
+ });
2657
+ return w && !y ? /* @__PURE__ */ e.createElement(e.Fragment, null, A, /* @__PURE__ */ e.createElement(Fr, { page: x })) : A;
2658
+ });
2659
+ Vr.displayName = "Link";
2660
+ var Hr = e.forwardRef(function({ "aria-current": t = "page", caseSensitive: n = !1, className: r = "", end: i = !1, style: a, to: o, viewTransition: s, children: c, ...l }, u) {
2661
+ let d = Z(o, { relative: l.relative }), f = X(), p = e.useContext(Cn), { navigator: m, basename: h } = e.useContext(J), g = p != null && Zr(d) && s === !0, _ = m.encodeLocation ? m.encodeLocation(d).pathname : d.pathname, v = f.pathname, y = p && p.navigation && p.navigation.location ? p.navigation.location.pathname : null;
2662
+ n || (v = v.toLowerCase(), y = y ? y.toLowerCase() : null, _ = _.toLowerCase()), y && h && (y = W(y, h) || y);
2663
+ let b = _ !== "/" && _.endsWith("/") ? _.length - 1 : _.length, x = v === _ || !i && v.startsWith(_) && v.charAt(b) === "/", S = y != null && (y === _ || !i && y.startsWith(_) && y.charAt(_.length) === "/"), C = {
2664
+ isActive: x,
2665
+ isPending: S,
2666
+ isTransitioning: g
2667
+ }, w = x ? t : void 0, T;
2668
+ T = typeof r == "function" ? r(C) : [
2669
+ r,
2670
+ x ? "active" : null,
2671
+ S ? "pending" : null,
2672
+ g ? "transitioning" : null
2673
+ ].filter(Boolean).join(" ");
2674
+ let E = typeof a == "function" ? a(C) : a;
2675
+ return /* @__PURE__ */ e.createElement(Vr, {
2676
+ ...l,
2677
+ "aria-current": w,
2678
+ className: T,
2679
+ ref: u,
2680
+ style: E,
2681
+ to: o,
2682
+ viewTransition: s
2683
+ }, typeof c == "function" ? c(C) : c);
2684
+ });
2685
+ Hr.displayName = "NavLink";
2686
+ var Ur = e.forwardRef(({ discover: t = "render", fetcherKey: n, navigate: r, reloadDocument: i, replace: a, state: o, method: s = sr, action: c, onSubmit: l, relative: u, preventScrollReset: d, viewTransition: f, defaultShouldRevalidate: p, ...m }, h) => {
2687
+ let { useTransitions: g } = e.useContext(J), _ = Yr(), v = Xr(c, { relative: u }), y = s.toLowerCase() === "get" ? "get" : "post", b = typeof c == "string" && At.test(c);
2688
+ return /* @__PURE__ */ e.createElement("form", {
2689
+ ref: h,
2690
+ method: y,
2691
+ action: v,
2692
+ onSubmit: i ? l : (t) => {
2693
+ if (l && l(t), t.defaultPrevented) return;
2694
+ t.preventDefault();
2695
+ let i = t.nativeEvent.submitter, c = i?.getAttribute("formmethod") || s, m = () => _(i || t.currentTarget, {
2696
+ fetcherKey: n,
2697
+ method: c,
2698
+ navigate: r,
2699
+ replace: a,
2700
+ state: o,
2701
+ relative: u,
2702
+ preventScrollReset: d,
2703
+ viewTransition: f,
2704
+ defaultShouldRevalidate: p
2705
+ });
2706
+ g && r !== !1 ? e.startTransition(() => m()) : m();
2707
+ },
2708
+ ...m,
2709
+ "data-discover": !b && t === "render" ? "true" : void 0
2710
+ });
2711
+ });
2712
+ Ur.displayName = "Form";
2713
+ function Wr(e) {
2714
+ return `${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`;
2715
+ }
2716
+ function Gr(t) {
2717
+ let n = e.useContext(q);
2718
+ return z(n, Wr(t)), n;
2719
+ }
2720
+ function Kr(t, { target: n, replace: r, mask: i, state: a, preventScrollReset: o, relative: s, viewTransition: c, defaultShouldRevalidate: l, useTransitions: u } = {}) {
2721
+ let d = Bn(), f = X(), p = Z(t, { relative: s });
2722
+ return e.useCallback((m) => {
2723
+ if (mr(m, n)) {
2724
+ m.preventDefault();
2725
+ let n = r === void 0 ? V(f) === V(p) : r, h = () => d(t, {
2726
+ replace: n,
2727
+ mask: i,
2728
+ state: a,
2729
+ preventScrollReset: o,
2730
+ relative: s,
2731
+ viewTransition: c,
2732
+ defaultShouldRevalidate: l
2733
+ });
2734
+ u ? e.startTransition(() => h()) : h();
2735
+ }
2736
+ }, [
2737
+ f,
2738
+ d,
2739
+ p,
2740
+ r,
2741
+ i,
2742
+ a,
2743
+ n,
2744
+ t,
2745
+ o,
2746
+ s,
2747
+ c,
2748
+ l,
2749
+ u
2750
+ ]);
2751
+ }
2752
+ var qr = 0, Jr = () => `__${String(++qr)}__`;
2753
+ function Yr() {
2754
+ let { router: t } = Gr("useSubmit"), { basename: n } = e.useContext(J), r = tr(), i = t.fetch, a = t.navigate;
2755
+ return e.useCallback(async (e, t = {}) => {
2756
+ let { action: o, method: s, encType: c, formData: l, body: u } = yr(e, n);
2757
+ if (t.navigate === !1) {
2758
+ let e = t.fetcherKey || Jr();
2759
+ await i(e, r, t.action || o, {
2760
+ defaultShouldRevalidate: t.defaultShouldRevalidate,
2761
+ preventScrollReset: t.preventScrollReset,
2762
+ formData: l,
2763
+ body: u,
2764
+ formMethod: t.method || s,
2765
+ formEncType: t.encType || c,
2766
+ flushSync: t.flushSync
2767
+ });
2768
+ } else await a(t.action || o, {
2769
+ defaultShouldRevalidate: t.defaultShouldRevalidate,
2770
+ preventScrollReset: t.preventScrollReset,
2771
+ formData: l,
2772
+ body: u,
2773
+ formMethod: t.method || s,
2774
+ formEncType: t.encType || c,
2775
+ replace: t.replace,
2776
+ state: t.state,
2777
+ fromRouteId: r,
2778
+ flushSync: t.flushSync,
2779
+ viewTransition: t.viewTransition
2780
+ });
2781
+ }, [
2782
+ i,
2783
+ a,
2784
+ n,
2785
+ r
2786
+ ]);
2787
+ }
2788
+ function Xr(t, { relative: n } = {}) {
2789
+ let { basename: r } = e.useContext(J), i = e.useContext(Y);
2790
+ z(i, "useFormAction must be used inside a RouteContext");
2791
+ let [a] = i.matches.slice(-1), o = { ...Z(t || ".", { relative: n }) }, s = X();
2792
+ if (t == null) {
2793
+ o.search = s.search;
2794
+ let e = new URLSearchParams(o.search), t = e.getAll("index");
2795
+ if (t.some((e) => e === "")) {
2796
+ e.delete("index"), t.filter((e) => e).forEach((t) => e.append("index", t));
2797
+ let n = e.toString();
2798
+ o.search = n ? `?${n}` : "";
2799
+ }
2800
+ }
2801
+ return (!t || t === ".") && a.route.index && (o.search = o.search ? o.search.replace(/^\?/, "?index&") : "?index"), r !== "/" && (o.pathname = o.pathname === "/" ? r : G([r, o.pathname])), V(o);
2802
+ }
2803
+ function Zr(t, { relative: n } = {}) {
2804
+ let r = e.useContext(En);
2805
+ z(r != null, "`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");
2806
+ let { basename: i } = Gr("useViewTransitionState"), a = Z(t, { relative: n });
2807
+ if (!r.isTransitioning) return !1;
2808
+ let o = W(r.currentLocation.pathname, i) || r.currentLocation.pathname, s = W(r.nextLocation.pathname, i) || r.nextLocation.pathname;
2809
+ return U(a.pathname, s) != null || U(a.pathname, o) != null;
2810
+ }
2811
+ // src/components/molecules/MNavLinks/MNavLinks.styles.ts
2812
+ var Qr = s`
2813
+ display: inline-flex;
2814
+ align-items: center;
2815
+ justify-content: center;
2816
+ border: 0;
2817
+ padding: ${({ theme: e }) => v(e).navLinks.itemPadding};
2818
+ box-shadow: ${({ theme: e }) => v(e).shadow.link};
2819
+ background: ${({ theme: e }) => v(e).colors.primary};
2820
+ color: ${({ theme: e }) => v(e).colors.primaryText};
2821
+ font-family: ${({ theme: e }) => v(e).font.sans};
2822
+ font-size: ${({ theme: e }) => v(e).navLinks.fontSize};
2823
+ font-weight: ${({ theme: e }) => v(e).font.weight.semibold};
2824
+ text-decoration: ${({ theme: e }) => v(e).navLinks.textDecoration};
2825
+ text-transform: ${({ theme: e }) => v(e).navLinks.textTransform};
2826
+ cursor: pointer;
2827
+ position: relative;
2828
+ z-index: 1;
2829
+ transition:
2830
+ background-color 0.15s ease,
2831
+ box-shadow 0.15s ease,
2832
+ color 0.15s ease,
2833
+ transform 0.15s ease;
2834
+
2835
+ &:hover:not(:disabled) {
2836
+ background: ${({ theme: e }) => f(v(e).colors.primary, v(e).colors.ink)};
2837
+ }
2838
+
2839
+ &:first-child {
2840
+ border-top-left-radius: ${({ theme: e }) => v(e).navLinks.borderRadius};
2841
+ border-bottom-left-radius: ${({ theme: e }) => v(e).navLinks.borderRadius};
2842
+ }
2843
+
2844
+ &:last-child {
2845
+ border-top-right-radius: ${({ theme: e }) => v(e).navLinks.borderRadius};
2846
+ border-bottom-right-radius: ${({ theme: e }) => v(e).navLinks.borderRadius};
2847
+ }
2848
+
2849
+ ${w("navLinks")}
2850
+
2851
+ &:disabled {
2852
+ opacity: ${({ theme: e }) => v(e).opacity.disabledButton};
2853
+ cursor: not-allowed;
2854
+ }
2855
+ `, $r = c.nav`
2856
+ display: inline-flex;
2857
+ align-items: center;
2858
+ border-radius: ${({ theme: e }) => v(e).navLinks.borderRadius};
2859
+ padding: 0;
2860
+ box-shadow: ${({ theme: e }) => v(e).shadow.navLinks};
2861
+ font-family: ${({ theme: e }) => v(e).font.sans};
2862
+ font-size: ${({ theme: e }) => v(e).navLinks.fontSize};
2863
+ text-transform: ${({ theme: e }) => v(e).navLinks.textTransform};
2864
+
2865
+ & > a {
2866
+ ${Qr}
2867
+
2868
+ border: ${({ theme: e }) => v(e).navLinks.border};
2869
+
2870
+ &:active,
2871
+ &[aria-current='page'] {
2872
+ z-index: 0;
2873
+ box-shadow: none;
2874
+ transform: translate(
2875
+ calc(0px + ${({ theme: e }) => v(e).shadow.offsetX}),
2876
+ ${({ theme: e }) => v(e).shadow.offsetY}
2877
+ );
2878
+ }
2879
+ }
2880
+ `, ei = c.button`
2881
+ ${Qr}
2882
+ `;
2883
+ // src/components/molecules/MNavLinks/MNavLinks.tsx
2884
+ function ti({ links: e, ...t }) {
2885
+ return /* @__PURE__ */ l($r, {
2886
+ ...t,
2887
+ children: e.map((e) => "href" in e && e.href !== void 0 ? /* @__PURE__ */ l(Hr, {
2888
+ to: e.href,
2889
+ className: e.className,
2890
+ style: e.style,
2891
+ end: e.end,
2892
+ caseSensitive: e.caseSensitive,
2893
+ children: e.label
2894
+ }, e.id) : /* @__PURE__ */ l(ei, {
2895
+ type: "button",
2896
+ disabled: e.disabled,
2897
+ onClick: e.onClick,
2898
+ children: e.label
2899
+ }, e.id))
2900
+ });
2901
+ }
2902
+ // src/components/molecules/MUserBadge/MUserBadge.styles.ts
2903
+ var ni = c.a`
2904
+ display: inline-flex;
2905
+ align-items: center;
2906
+ gap: ${({ theme: e }) => v(e).space.sm};
2907
+ color: inherit;
2908
+ font-family: ${({ theme: e }) => v(e).font.sans};
2909
+ text-decoration: ${({ theme: e }) => v(e).userBadge.textDecoration};
2910
+
2911
+ ${w("userBadge")}
2912
+ `;
2913
+ // src/components/molecules/MUserBadge/MUserBadge.tsx
2914
+ function ri({ to: e, firstName: t, lastName: n, avatarSrc: r, size: i = "md", showName: a = !0, ...o }) {
2915
+ let s = `${t} ${n}`.trim();
2916
+ return /* @__PURE__ */ u(ni, {
2917
+ as: Vr,
2918
+ to: e,
2919
+ ...o,
2920
+ children: [/* @__PURE__ */ l(b, {
2921
+ firstName: t,
2922
+ lastName: n,
2923
+ src: r,
2924
+ alt: a ? "" : s,
2925
+ size: i,
2926
+ "aria-hidden": a ? !0 : void 0
2927
+ }), a ? /* @__PURE__ */ l("span", { children: s }) : null]
2928
+ });
2929
+ }
2930
+ // src/components/organisms/OSidebar/OSidebar.styles.ts
2931
+ var ii = c.aside`
2932
+ box-sizing: border-box;
2933
+ display: flex;
2934
+ flex: 0 0
2935
+ ${({ $extended: e, theme: t }) => e ? v(t).sidebar.width.extended : v(t).sidebar.width.compact};
2936
+ flex-direction: column;
2937
+ gap: ${({ theme: e }) => v(e).space.sm};
2938
+ width: ${({ $extended: e, theme: t }) => e ? v(t).sidebar.width.extended : v(t).sidebar.width.compact};
2939
+ height: ${({ theme: e }) => v(e).sidebar.height.fallback};
2940
+ height: ${({ theme: e }) => v(e).sidebar.height.dynamic};
2941
+ min-height: 0;
2942
+ overflow: hidden;
2943
+ padding: ${({ theme: e }) => v(e).space.inset};
2944
+ border: ${({ theme: e }) => v(e).sidebar.border};
2945
+ border-radius: ${({ theme: e }) => v(e).sidebar.borderRadius};
2946
+ background: ${({ theme: e }) => v(e).colors.surface};
2947
+ box-shadow: ${({ theme: e }) => v(e).shadow.sidebar};
2948
+ transition:
2949
+ width 0.2s ease,
2950
+ flex-basis 0.2s ease;
2951
+ `, ai = c.div`
2952
+ display: flex;
2953
+ flex-direction: column;
2954
+ align-items: center;
2955
+ gap: ${({ theme: e }) => v(e).space.sm};
2956
+ align-items: ${({ $extended: e }) => e ? "flex-end" : "center"};
2957
+ `, oi = c.nav`
2958
+ display: flex;
2959
+ min-height: 0;
2960
+ flex: 1;
2961
+ flex-direction: column;
2962
+ align-items: stretch;
2963
+ gap: ${({ theme: e }) => v(e).space.sm};
2964
+ margin-inline: ${({ theme: e }) => `-${v(e).space.xs}`};
2965
+ padding-inline: ${({ theme: e }) => v(e).space.xs};
2966
+ overflow-y: auto;
2967
+ overflow-x: hidden;
2968
+ `, si = c.div`
2969
+ display: flex;
2970
+ width: 100%;
2971
+ min-width: 0;
2972
+
2973
+ & > a {
2974
+ box-sizing: border-box;
2975
+ width: 100%;
2976
+ min-width: 0;
2977
+ justify-content: ${({ $extended: e }) => e ? "flex-start" : "center"};
2978
+ }
2979
+ `, ci = c.div`
2980
+ display: flex;
2981
+ flex-direction: column;
2982
+ gap: ${({ theme: e }) => v(e).space.sm};
2983
+ `;
2984
+ // src/components/organisms/OSidebar/OSidebar.tsx
2985
+ function li({ extended: e }) {
2986
+ return /* @__PURE__ */ l("svg", {
2987
+ viewBox: "0 0 24 24",
2988
+ fill: "none",
2989
+ "aria-hidden": "true",
2990
+ children: e ? /* @__PURE__ */ l("path", {
2991
+ d: "m15 18-6-6 6-6",
2992
+ stroke: "currentColor",
2993
+ strokeWidth: "2",
2994
+ strokeLinecap: "round",
2995
+ strokeLinejoin: "round"
2996
+ }) : /* @__PURE__ */ l("path", {
2997
+ d: "m9 18 6-6-6-6",
2998
+ stroke: "currentColor",
2999
+ strokeWidth: "2",
3000
+ strokeLinecap: "round",
3001
+ strokeLinejoin: "round"
3002
+ })
3003
+ });
3004
+ }
3005
+ function ui({ links: e, logout: t, extended: n, defaultExtended: r = !1, onExtendedChange: a, navigationLabel: o = "Primary navigation", "aria-label": s = "Application sidebar", ...c }) {
3006
+ let [d, f] = i(r), p = n ?? d, [m, h] = i(p);
3007
+ function g() {
3008
+ let e = !p;
3009
+ e || h(!0), n === void 0 && f(e), a?.(e);
3010
+ }
3011
+ function _(e) {
3012
+ e.target === e.currentTarget && e.propertyName === "width" && h(p);
3013
+ }
3014
+ function v(e) {
3015
+ return /* @__PURE__ */ l(si, {
3016
+ $extended: m,
3017
+ children: m ? /* @__PURE__ */ u(Fe, {
3018
+ href: e.href,
3019
+ children: [/* @__PURE__ */ l(L, {
3020
+ size: "md",
3021
+ style: { color: "inherit" },
3022
+ children: e.icon
3023
+ }), e.label]
3024
+ }) : /* @__PURE__ */ l(be, {
3025
+ href: e.href,
3026
+ "aria-label": e.label,
3027
+ title: e.label,
3028
+ children: e.icon
3029
+ })
3030
+ }, e.id);
3031
+ }
3032
+ return /* @__PURE__ */ u(ii, {
3033
+ ...c,
3034
+ $extended: p,
3035
+ "aria-label": s,
3036
+ "data-extended": p,
3037
+ onTransitionEnd: _,
3038
+ children: [
3039
+ /* @__PURE__ */ l(ai, {
3040
+ $extended: p,
3041
+ children: /* @__PURE__ */ l(R, {
3042
+ "aria-label": p ? "Collapse sidebar" : "Expand sidebar",
3043
+ "aria-expanded": p,
3044
+ onClick: g,
3045
+ size: "sm",
3046
+ ghost: !0,
3047
+ children: /* @__PURE__ */ l(li, { extended: p })
3048
+ })
3049
+ }),
3050
+ /* @__PURE__ */ l(oi, {
3051
+ "aria-label": o,
3052
+ children: e.map((e) => v(e))
3053
+ }),
3054
+ /* @__PURE__ */ l(ci, { children: v(t) })
3055
+ ]
3056
+ });
3057
+ }
3058
+ // src/components/organisms/OUserCamera/OUserCamera.styles.ts
3059
+ var di = c.div`
3060
+ position: relative;
3061
+ display: block;
3062
+ width: 100%;
3063
+ min-width: 0;
3064
+ aspect-ratio: ${({ $aspectRatio: e }) => e};
3065
+ box-sizing: border-box;
3066
+ overflow: hidden;
3067
+ padding: ${({ theme: e }) => v(e).space.inset};
3068
+ border: ${({ theme: e }) => v(e).camera.border};
3069
+ border-radius: ${({ theme: e }) => v(e).camera.borderRadius};
3070
+ background: ${({ theme: e }) => v(e).colors.surface};
3071
+ color: ${({ theme: e }) => v(e).colors.text};
3072
+ `, fi = c.video`
3073
+ position: absolute;
3074
+ inset: 0;
3075
+ width: 100%;
3076
+ height: 100%;
3077
+ object-fit: cover;
3078
+ `, pi = c.div`
3079
+ position: absolute;
3080
+ inset: 0;
3081
+ display: flex;
3082
+ align-items: center;
3083
+ justify-content: center;
3084
+ background: ${({ theme: e }) => v(e).colors.secondary};
3085
+ color: ${({ theme: e }) => v(e).colors.primary};
3086
+ font-family: ${({ theme: e }) => v(e).font.sans};
3087
+ font-size: ${({ theme: e }) => v(e).camera.fallbackFontSize};
3088
+ font-weight: ${({ theme: e }) => v(e).camera.fallbackFontWeight};
3089
+ `, mi = c.div`
3090
+ position: absolute;
3091
+ z-index: 1;
3092
+ ${({ $placement: e }) => e === "top-right" ? s`
3093
+ top: ${({ theme: e }) => v(e).space.inset};
3094
+ right: ${({ theme: e }) => v(e).space.inset};
3095
+ ` : s`
3096
+ right: ${({ theme: e }) => v(e).space.inset};
3097
+ bottom: ${({ theme: e }) => v(e).space.inset};
3098
+ `}
3099
+ `, hi = c.span`
3100
+ position: absolute;
3101
+ z-index: 1;
3102
+ bottom: ${({ theme: e }) => v(e).space.inset};
3103
+ left: ${({ theme: e }) => v(e).space.inset};
3104
+ max-width: ${({ theme: e }) => `calc(100% - ${v(e).camera.nameMaxWidthOffset})`};
3105
+ overflow: hidden;
3106
+ padding: ${({ theme: e }) => `${v(e).space.xs} ${v(e).space.sm}`};
3107
+ border-radius: ${({ theme: e }) => v(e).camera.nameBorderRadius};
3108
+ background: ${({ theme: e }) => `color-mix(in srgb, ${v(e).colors.ink} 65%, transparent)`};
3109
+ color: ${({ theme: e }) => v(e).colors.muted};
3110
+ font-family: ${({ theme: e }) => v(e).font.sans};
3111
+ font-size: ${({ theme: e }) => v(e).typography.small};
3112
+ text-overflow: ellipsis;
3113
+ white-space: nowrap;
3114
+ `;
3115
+ // src/components/organisms/OUserCamera/OUserCamera.tsx
3116
+ function gi({ disabled: e }) {
3117
+ return /* @__PURE__ */ u("svg", {
3118
+ viewBox: "0 0 24 24",
3119
+ fill: "none",
3120
+ "aria-hidden": "true",
3121
+ children: [/* @__PURE__ */ l("path", {
3122
+ d: "M4 7.5h11.5A1.5 1.5 0 0 1 17 9v1.5l4-2.5v8l-4-2.5V15a1.5 1.5 0 0 1-1.5 1.5H5.5A1.5 1.5 0 0 1 4 15V7.5Z",
3123
+ stroke: "currentColor",
3124
+ strokeWidth: "2",
3125
+ strokeLinecap: "round",
3126
+ strokeLinejoin: "round"
3127
+ }), e ? /* @__PURE__ */ l("path", {
3128
+ d: "m3 3 18 18",
3129
+ stroke: "currentColor",
3130
+ strokeWidth: "2",
3131
+ strokeLinecap: "round"
3132
+ }) : null]
3133
+ });
3134
+ }
3135
+ function _i({ disabled: e }) {
3136
+ return /* @__PURE__ */ u("svg", {
3137
+ viewBox: "0 0 24 24",
3138
+ fill: "none",
3139
+ "aria-hidden": "true",
3140
+ children: [/* @__PURE__ */ l("path", {
3141
+ d: "M12 15a3 3 0 0 0 3-3V6a3 3 0 0 0-6 0v6a3 3 0 0 0 3 3Zm0 0v5m-4 0h8m-11-8a7 7 0 0 0 14 0",
3142
+ stroke: "currentColor",
3143
+ strokeWidth: "2",
3144
+ strokeLinecap: "round",
3145
+ strokeLinejoin: "round"
3146
+ }), e ? /* @__PURE__ */ l("path", {
3147
+ d: "m3 3 18 18",
3148
+ stroke: "currentColor",
3149
+ strokeWidth: "2",
3150
+ strokeLinecap: "round"
3151
+ }) : null]
3152
+ });
3153
+ }
3154
+ function vi({ firstName: e, lastName: n, stream: i, cameraEnabled: a, audioEnabled: o, onCameraToggle: s, onAudioToggle: c, aspectRatio: d = 16 / 9, ...f }) {
3155
+ let p = r(null), m = `${e} ${n}`.trim(), h = `${e.charAt(0)}${n.charAt(0)}`.toUpperCase(), g = a && !!i;
3156
+ return t(() => {
3157
+ let e = p.current;
3158
+ if (e) return e.srcObject = g ? i ?? null : null, () => {
3159
+ e.srcObject = null;
3160
+ };
3161
+ }, [g, i]), /* @__PURE__ */ u(di, {
3162
+ ...f,
3163
+ $aspectRatio: Number.isFinite(d) && d > 0 ? d : 16 / 9,
3164
+ role: "group",
3165
+ "aria-label": `${m} camera`,
3166
+ children: [
3167
+ g ? /* @__PURE__ */ l(fi, {
3168
+ ref: p,
3169
+ autoPlay: !0,
3170
+ muted: !0,
3171
+ playsInline: !0
3172
+ }) : /* @__PURE__ */ l(pi, {
3173
+ "aria-hidden": "true",
3174
+ children: h
3175
+ }),
3176
+ /* @__PURE__ */ l(mi, {
3177
+ $placement: "top-right",
3178
+ children: /* @__PURE__ */ l(R, {
3179
+ "aria-label": `Turn camera ${a ? "off" : "on"}`,
3180
+ "aria-pressed": a,
3181
+ variant: "primary",
3182
+ size: "md",
3183
+ shape: "rounded",
3184
+ ghost: !0,
3185
+ onClick: s,
3186
+ children: /* @__PURE__ */ l(gi, { disabled: !a })
3187
+ })
3188
+ }),
3189
+ /* @__PURE__ */ l(mi, {
3190
+ $placement: "bottom-right",
3191
+ children: /* @__PURE__ */ l(R, {
3192
+ "aria-label": `Turn audio ${o ? "off" : "on"}`,
3193
+ "aria-pressed": o,
3194
+ variant: "primary",
3195
+ size: "md",
3196
+ shape: "rounded",
3197
+ ghost: !0,
3198
+ onClick: c,
3199
+ children: /* @__PURE__ */ l(_i, { disabled: !o })
3200
+ })
3201
+ }),
3202
+ /* @__PURE__ */ l(hi, { children: m })
3203
+ ]
3204
+ });
3205
+ }
3206
+ // src/shared/styles/GlobalStyles.ts
3207
+ var yi = o`
3208
+ :root {
3209
+ --jynko-shadow-solid: ${({ theme: e }) => v(e).shadow.button};
3210
+ --jynko-modal-padding: ${({ theme: e }) => v(e).modal.padding};
3211
+ --jynko-modal-max-width: ${({ theme: e }) => v(e).modal.maxWidth};
3212
+ --jynko-modal-max-height: ${({ theme: e }) => v(e).modal.maxHeight};
3213
+ --jynko-modal-border-radius: ${({ theme: e }) => v(e).modal.borderRadius};
3214
+ --jynko-modal-box-shadow: ${({ theme: e }) => v(e).shadow.modal};
3215
+ }
3216
+
3217
+ button {
3218
+ border: ${({ theme: e }) => v(e).button.border};
3219
+ border-radius: ${({ theme: e }) => v(e).button.borderRadius};
3220
+ padding: ${({ theme: e }) => v(e).button.padding};
3221
+ font-size: ${({ theme: e }) => v(e).button.fontSize};
3222
+ text-transform: ${({ theme: e }) => v(e).button.textTransform};
3223
+ }
3224
+ `;
3225
+ // src/providers/JynkoProvider/JynkoProvider.tsx
3226
+ function bi({ children: e, theme: t = _ }) {
3227
+ return /* @__PURE__ */ u(a, {
3228
+ theme: t,
3229
+ children: [/* @__PURE__ */ l(yi, {}), e]
3230
+ });
3231
+ }
3232
+ export { b as AAvatar, O as ABadge, I as AButton, L as AIcon, R as AIconButton, be as AIconLink, je as AInput, Fe as ALink, Re as ALogo, qe as ASearchInput, Ye as ASection, ct as ASelect, pt as ATextarea, ht as ATypography, bi as JynkoProvider, kt as MModal, ti as MNavLinks, ri as MUserBadge, ui as OSidebar, vi as OUserCamera, _ as theme };
3233
+
3234
+ //# sourceMappingURL=index.js.map