@servicetitan/anvil2 1.2.8 → 1.3.1

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 (262) hide show
  1. package/{Alert-2e4d9ed5.js → Alert-012e475c.js} +23 -23
  2. package/Alert-012e475c.js.map +1 -0
  3. package/Alert-066f00f2.cjs +2 -0
  4. package/Alert-066f00f2.cjs.map +1 -0
  5. package/Alert.cjs +1 -1
  6. package/Alert.js +1 -1
  7. package/Announcement-cd9602ed.cjs +2 -0
  8. package/Announcement-cd9602ed.cjs.map +1 -0
  9. package/{Announcement-1db4ac33.js → Announcement-f9b09ba3.js} +6 -6
  10. package/Announcement-f9b09ba3.js.map +1 -0
  11. package/Announcement.cjs +1 -1
  12. package/Announcement.js +1 -1
  13. package/Avatar.cjs +1 -1
  14. package/Avatar.js +1 -1
  15. package/Button.cjs +1 -1
  16. package/Button.cjs.map +1 -1
  17. package/Button.js +25 -24
  18. package/Button.js.map +1 -1
  19. package/ButtonCompound.cjs +1 -1
  20. package/ButtonCompound.cjs.map +1 -1
  21. package/ButtonCompound.js +25 -24
  22. package/ButtonCompound.js.map +1 -1
  23. package/ButtonLink.cjs +1 -1
  24. package/ButtonLink.cjs.map +1 -1
  25. package/ButtonLink.js +25 -24
  26. package/ButtonLink.js.map +1 -1
  27. package/ButtonToggle.cjs +1 -1
  28. package/ButtonToggle.cjs.map +1 -1
  29. package/ButtonToggle.js +25 -24
  30. package/ButtonToggle.js.map +1 -1
  31. package/{Calendar-cbfe3c06.js → Calendar-31bcb381.js} +2 -2
  32. package/{Calendar-cbfe3c06.js.map → Calendar-31bcb381.js.map} +1 -1
  33. package/Calendar-d0baf4b1.cjs +2 -0
  34. package/{Calendar-ec151b3b.cjs.map → Calendar-d0baf4b1.cjs.map} +1 -1
  35. package/Calendar.cjs +1 -1
  36. package/Calendar.js +1 -1
  37. package/{Checkbox-d325d851.cjs → Checkbox-28412a96.cjs} +2 -2
  38. package/{Checkbox-d325d851.cjs.map → Checkbox-28412a96.cjs.map} +1 -1
  39. package/{Checkbox-3de9628c.js → Checkbox-54ecbd70.js} +2 -2
  40. package/{Checkbox-3de9628c.js.map → Checkbox-54ecbd70.js.map} +1 -1
  41. package/Checkbox.cjs +1 -1
  42. package/Checkbox.js +1 -1
  43. package/Chip-6dbdbc2e.js +91 -0
  44. package/Chip-6dbdbc2e.js.map +1 -0
  45. package/Chip-de78e3f6.cjs +2 -0
  46. package/Chip-de78e3f6.cjs.map +1 -0
  47. package/Chip.cjs +1 -1
  48. package/Chip.css +1 -1
  49. package/Chip.js +1 -1
  50. package/Combobox.cjs +1 -1
  51. package/Combobox.cjs.map +1 -1
  52. package/Combobox.js +25 -24
  53. package/Combobox.js.map +1 -1
  54. package/Details.cjs +1 -1
  55. package/Details.cjs.map +1 -1
  56. package/Details.js +25 -24
  57. package/Details.js.map +1 -1
  58. package/Dialog-90efe88c.js +214 -0
  59. package/Dialog-90efe88c.js.map +1 -0
  60. package/Dialog-c83d0c0f.cjs +2 -0
  61. package/Dialog-c83d0c0f.cjs.map +1 -0
  62. package/Dialog.cjs +1 -1
  63. package/Dialog.cjs.map +1 -1
  64. package/Dialog.css +1 -0
  65. package/Dialog.js +40 -39
  66. package/Dialog.js.map +1 -1
  67. package/{Drawer-21c36b46.js → Drawer-4567c00e.js} +14 -14
  68. package/Drawer-4567c00e.js.map +1 -0
  69. package/Drawer-96b74d51.cjs +2 -0
  70. package/Drawer-96b74d51.cjs.map +1 -0
  71. package/Drawer.cjs +1 -1
  72. package/Drawer.js +1 -1
  73. package/{Helper-74a1f07f-60547798.js → Helper-74a1f07f-092263c4.js} +2 -2
  74. package/{Helper-74a1f07f-60547798.js.map → Helper-74a1f07f-092263c4.js.map} +1 -1
  75. package/{Helper-74a1f07f-30e4fd46.cjs → Helper-74a1f07f-61317df2.cjs} +2 -2
  76. package/{Helper-74a1f07f-30e4fd46.cjs.map → Helper-74a1f07f-61317df2.cjs.map} +1 -1
  77. package/Icon-57c31c9b.cjs +2 -0
  78. package/Icon-57c31c9b.cjs.map +1 -0
  79. package/{Icon-b443eea4.js → Icon-b94f924c.js} +8 -8
  80. package/Icon-b94f924c.js.map +1 -0
  81. package/Icon.cjs +1 -1
  82. package/Icon.css +1 -1
  83. package/Icon.js +1 -1
  84. package/Link.cjs +1 -1
  85. package/Link.cjs.map +1 -1
  86. package/Link.js +25 -24
  87. package/Link.js.map +1 -1
  88. package/{ListView-482c54ad.js → ListView-ad64a337.js} +3 -3
  89. package/{ListView-482c54ad.js.map → ListView-ad64a337.js.map} +1 -1
  90. package/{ListView-43bbc290.cjs → ListView-fcd88dd1.cjs} +2 -2
  91. package/{ListView-43bbc290.cjs.map → ListView-fcd88dd1.cjs.map} +1 -1
  92. package/ListView.cjs +1 -1
  93. package/ListView.js +1 -1
  94. package/{Listbox-b110c64d.js → Listbox-030b2993.js} +2 -2
  95. package/{Listbox-b110c64d.js.map → Listbox-030b2993.js.map} +1 -1
  96. package/{Listbox-8c610bf2.cjs → Listbox-cd5c4185.cjs} +2 -2
  97. package/{Listbox-8c610bf2.cjs.map → Listbox-cd5c4185.cjs.map} +1 -1
  98. package/Listbox.cjs +1 -1
  99. package/Listbox.js +1 -1
  100. package/Menu.cjs +1 -1
  101. package/Menu.cjs.map +1 -1
  102. package/Menu.js +1 -1
  103. package/Overflow.cjs +1 -1
  104. package/Overflow.cjs.map +1 -1
  105. package/Overflow.js +25 -24
  106. package/Overflow.js.map +1 -1
  107. package/Popover.cjs +1 -1
  108. package/Popover.cjs.map +1 -1
  109. package/Popover.js +31 -30
  110. package/Popover.js.map +1 -1
  111. package/PortalProvider.cjs +2 -0
  112. package/PortalProvider.cjs.map +1 -0
  113. package/PortalProvider.d.ts +15 -0
  114. package/PortalProvider.js +16 -0
  115. package/PortalProvider.js.map +1 -0
  116. package/ProgressBar-3ebc4be2.cjs +2 -0
  117. package/ProgressBar-3ebc4be2.cjs.map +1 -0
  118. package/ProgressBar-f0102cb6.js +303 -0
  119. package/ProgressBar-f0102cb6.js.map +1 -0
  120. package/ProgressBar.cjs +1 -1
  121. package/ProgressBar.js +1 -1
  122. package/{Radio-ed00ea9d.cjs → Radio-845d1fe6.cjs} +2 -2
  123. package/{Radio-ed00ea9d.cjs.map → Radio-845d1fe6.cjs.map} +1 -1
  124. package/{Radio-a747c89a.js → Radio-8f8e771e.js} +2 -2
  125. package/{Radio-a747c89a.js.map → Radio-8f8e771e.js.map} +1 -1
  126. package/Radio.cjs +1 -1
  127. package/Radio.js +1 -1
  128. package/{SegmentedControl-384bd212.js → SegmentedControl-d223643c.js} +2 -2
  129. package/{SegmentedControl-384bd212.js.map → SegmentedControl-d223643c.js.map} +1 -1
  130. package/{SegmentedControl-5d284f09.cjs → SegmentedControl-e5e48c23.cjs} +2 -2
  131. package/{SegmentedControl-5d284f09.cjs.map → SegmentedControl-e5e48c23.cjs.map} +1 -1
  132. package/SegmentedControl.cjs +1 -1
  133. package/SegmentedControl.js +1 -1
  134. package/{SideNav-2a75e772.cjs → SideNav-47435e45.cjs} +2 -2
  135. package/{SideNav-2a75e772.cjs.map → SideNav-47435e45.cjs.map} +1 -1
  136. package/{SideNav-693494e5.js → SideNav-80e5ce2f.js} +2 -2
  137. package/{SideNav-693494e5.js.map → SideNav-80e5ce2f.js.map} +1 -1
  138. package/SideNav.cjs +1 -1
  139. package/SideNav.js +1 -1
  140. package/Stepper-42ecb7db.js +633 -0
  141. package/Stepper-42ecb7db.js.map +1 -0
  142. package/Stepper-8675700c.cjs +2 -0
  143. package/Stepper-8675700c.cjs.map +1 -0
  144. package/Stepper.cjs +1 -1
  145. package/Stepper.css +1 -1
  146. package/Stepper.d.ts +2 -2
  147. package/Stepper.js +10 -10
  148. package/{Switch-c0bea091.cjs → Switch-7bfb6be6.cjs} +2 -2
  149. package/{Switch-c0bea091.cjs.map → Switch-7bfb6be6.cjs.map} +1 -1
  150. package/{Switch-39010760.js → Switch-917c699a.js} +2 -2
  151. package/{Switch-39010760.js.map → Switch-917c699a.js.map} +1 -1
  152. package/Switch.cjs +1 -1
  153. package/Switch.js +1 -1
  154. package/{Tab-f636d6c5.js → Tab-68267c78.js} +2 -2
  155. package/{Tab-f636d6c5.js.map → Tab-68267c78.js.map} +1 -1
  156. package/{Tab-0bcbe9c7.cjs → Tab-9d3d7922.cjs} +2 -2
  157. package/{Tab-0bcbe9c7.cjs.map → Tab-9d3d7922.cjs.map} +1 -1
  158. package/Tab.cjs +1 -1
  159. package/Tab.js +1 -1
  160. package/TextField.cjs +1 -1
  161. package/TextField.cjs.map +1 -1
  162. package/TextField.js +25 -24
  163. package/TextField.js.map +1 -1
  164. package/Textarea.cjs +1 -1
  165. package/Textarea.cjs.map +1 -1
  166. package/Textarea.js +25 -24
  167. package/Textarea.js.map +1 -1
  168. package/Toast-32a4ab22.cjs +9 -0
  169. package/Toast-32a4ab22.cjs.map +1 -0
  170. package/{Toast-36679136.js → Toast-596af2d7.js} +57 -57
  171. package/Toast-596af2d7.js.map +1 -0
  172. package/Toast.cjs +1 -1
  173. package/Toast.js +1 -1
  174. package/Tooltip.cjs +1 -1
  175. package/Tooltip.cjs.map +1 -1
  176. package/Tooltip.js +30 -29
  177. package/Tooltip.js.map +1 -1
  178. package/anvil2.cjs +1 -1
  179. package/anvil2.d.ts +2 -2
  180. package/anvil2.js +178 -177
  181. package/anvil2.js.map +1 -1
  182. package/{Button-3b93bd5d.js → index-3a4e28a9-3d7ba14f.js} +91 -91
  183. package/index-3a4e28a9-3d7ba14f.js.map +1 -0
  184. package/index-3a4e28a9-b649e635.cjs +2 -0
  185. package/index-3a4e28a9-b649e635.cjs.map +1 -0
  186. package/index-54458227.cjs +23 -0
  187. package/index-54458227.cjs.map +1 -0
  188. package/index-d661e4bf-ed0b2ea3.js +318 -0
  189. package/index-d661e4bf-ed0b2ea3.js.map +1 -0
  190. package/index-d661e4bf-f77d0503.cjs +2 -0
  191. package/index-d661e4bf-f77d0503.cjs.map +1 -0
  192. package/index-d661e4bf.css +1 -0
  193. package/index-dc8d970c.js +4228 -0
  194. package/index-dc8d970c.js.map +1 -0
  195. package/index-f7658447-d8b2b888.js +121 -0
  196. package/index-f7658447-d8b2b888.js.map +1 -0
  197. package/index-f7658447-d9ca2747.cjs +2 -0
  198. package/index-f7658447-d9ca2747.cjs.map +1 -0
  199. package/index-f7658447.css +1 -0
  200. package/index3.css +1 -1
  201. package/package.json +2 -2
  202. package/useAccessibleColor.cjs +1 -1
  203. package/useAccessibleColor.js +25 -24
  204. package/useAccessibleColor.js.map +1 -1
  205. package/useLinkStyles.cjs +1 -1
  206. package/useLinkStyles.js +24 -23
  207. package/useLinkStyles.js.map +1 -1
  208. package/useMergeRefs.cjs +1 -1
  209. package/useMergeRefs.js +25 -24
  210. package/useMergeRefs.js.map +1 -1
  211. package/usePrefersColorScheme.cjs +1 -1
  212. package/usePrefersColorScheme.js +25 -24
  213. package/usePrefersColorScheme.js.map +1 -1
  214. package/useSwipe.cjs +1 -1
  215. package/useSwipe.js +25 -24
  216. package/useSwipe.js.map +1 -1
  217. package/Alert-2e4d9ed5.js.map +0 -1
  218. package/Alert-94c37437.cjs +0 -2
  219. package/Alert-94c37437.cjs.map +0 -1
  220. package/Announcement-1db4ac33.js.map +0 -1
  221. package/Announcement-2058bd02.cjs +0 -2
  222. package/Announcement-2058bd02.cjs.map +0 -1
  223. package/Button-30b35802.cjs +0 -2
  224. package/Button-30b35802.cjs.map +0 -1
  225. package/Button-3b93bd5d.js.map +0 -1
  226. package/Calendar-ec151b3b.cjs +0 -2
  227. package/Chip-95370241.cjs +0 -2
  228. package/Chip-95370241.cjs.map +0 -1
  229. package/Chip-c0f71a26.js +0 -90
  230. package/Chip-c0f71a26.js.map +0 -1
  231. package/Drawer-21c36b46.js.map +0 -1
  232. package/Drawer-d332b2da.cjs +0 -2
  233. package/Drawer-d332b2da.cjs.map +0 -1
  234. package/Icon-43ce0e6c.cjs +0 -2
  235. package/Icon-43ce0e6c.cjs.map +0 -1
  236. package/Icon-b443eea4.js.map +0 -1
  237. package/ProgressBar-33e4f5d9.js +0 -297
  238. package/ProgressBar-33e4f5d9.js.map +0 -1
  239. package/ProgressBar-9632fe6e.cjs +0 -2
  240. package/ProgressBar-9632fe6e.cjs.map +0 -1
  241. package/Stepper-7c787b24.js +0 -391
  242. package/Stepper-7c787b24.js.map +0 -1
  243. package/Stepper-e08b9998.cjs +0 -2
  244. package/Stepper-e08b9998.cjs.map +0 -1
  245. package/Toast-36679136.js.map +0 -1
  246. package/Toast-44e3ff94.cjs +0 -9
  247. package/Toast-44e3ff94.cjs.map +0 -1
  248. package/index-845dea53-710c1e0d.cjs +0 -2
  249. package/index-845dea53-710c1e0d.cjs.map +0 -1
  250. package/index-845dea53-dce876ab.js +0 -521
  251. package/index-845dea53-dce876ab.js.map +0 -1
  252. package/index-845dea53.css +0 -1
  253. package/index-cfd364c0.js +0 -4457
  254. package/index-cfd364c0.js.map +0 -1
  255. package/index-f3c3ec15.cjs +0 -23
  256. package/index-f3c3ec15.cjs.map +0 -1
  257. package/index-f91265d9-04a0345c.cjs +0 -2
  258. package/index-f91265d9-04a0345c.cjs.map +0 -1
  259. package/index-f91265d9-3d747651.js +0 -121
  260. package/index-f91265d9-3d747651.js.map +0 -1
  261. package/index-f91265d9.css +0 -1
  262. /package/{Button.css → index-3a4e28a9.css} +0 -0
package/index-cfd364c0.js DELETED
@@ -1,4457 +0,0 @@
1
- import "./index3.css";
2
- import "./Alert-2e4d9ed5.js";
3
- import "./Announcement-1db4ac33.js";
4
- import "./index-f91265d9-3d747651.js";
5
- import "./Badge-df96f15a.js";
6
- import { B as ot, l as Sr } from "./Button-3b93bd5d.js";
7
- import "./Calendar-cbfe3c06.js";
8
- import "./Card-bb358803.js";
9
- import { r as Or } from "./Checkbox-3de9628c.js";
10
- import { $ as an } from "./Chip-c0f71a26.js";
11
- import { K as Nr } from "./index-845dea53-dce876ab.js";
12
- import "./Divider-b3bff73a.js";
13
- import "./Drawer-21c36b46.js";
14
- import { j as gt } from "./Flex-d338e855.js";
15
- import "./Grid-5bad450f.js";
16
- import { C as It } from "./Icon-b443eea4.js";
17
- import { j as yt } from "./ProgressBar-33e4f5d9.js";
18
- import { i as Pn } from "./Listbox-b110c64d.js";
19
- import { t as mt } from "./ListView-482c54ad.js";
20
- import "./Radio-a747c89a.js";
21
- import "./SegmentedControl-384bd212.js";
22
- import { P as _, _ as $, b as me, a as Dr } from "./SideNav-693494e5.js";
23
- import { p as Mn } from "./SrOnly-864bd4cb.js";
24
- import { f as y } from "./jsx-runtime-944c88e2-e73fa629.js";
25
- import { c as de } from "./index-e0f6271a.js";
26
- import "./Stepper-7c787b24.js";
27
- import "./Switch-39010760.js";
28
- import "./Tab-f636d6c5.js";
29
- import { $ as Rr } from "./Text-465104f6.js";
30
- import "./Toast-36679136.js";
31
- import "./index-06c0bdf0.js";
32
- import { J as Ce } from "./useLayoutPropsUtil-e307abc7-cbe2fb6d.js";
33
- import { U as Pr, T as Mr } from "./index-d46fa8de-8695742b.js";
34
- import "./usePrefersColorScheme-129544ad-cab6fc3f.js";
35
- import * as ve from "react";
36
- import it, { useRef as Z, useCallback as ee, useEffect as ue, useMemo as Ke, cloneElement as kr, Component as Tr, useLayoutEffect as xt, useReducer as Vr, createContext as bt, forwardRef as _e, useContext as ke, useState as X, useId as ye } from "react";
37
- import "./index-439b5871.js";
38
- import "./LocalizationProvider.js";
39
- import { u as qe, v as Ar, w as Hr, z as jr, e as Kr, h as $r, o as Fr, g as Lr, f as Br, s as Ur, l as zr, B as Wr, k as qr, i as Yr, j as Gr, n as Xr, m as Jr, r as Qr } from "./floating-ui.react-8d61182d.js";
40
- import { g as Zr } from "./_commonjsHelpers-c5d32002.js";
41
- import { a as eo } from "./close-064c8acc-7e0b4df7.js";
42
- import { a as to } from "./check-5f087ea0-b5474547.js";
43
- import { v as wt } from "./Helper-74a1f07f-60547798.js";
44
- /* empty css */import "./useSwipe-82769b09-835234e6.js";
45
- function ln(e) {
46
- if (e === void 0)
47
- throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
48
- return e;
49
- }
50
- var vt = { exports: {} }, Y = {};
51
- /**
52
- * @license React
53
- * react-is.production.min.js
54
- *
55
- * Copyright (c) Facebook, Inc. and its affiliates.
56
- *
57
- * This source code is licensed under the MIT license found in the
58
- * LICENSE file in the root directory of this source tree.
59
- */
60
- var un;
61
- function no() {
62
- if (un)
63
- return Y;
64
- un = 1;
65
- var e = Symbol.for("react.element"), n = Symbol.for("react.portal"), r = Symbol.for("react.fragment"), i = Symbol.for("react.strict_mode"), o = Symbol.for("react.profiler"), t = Symbol.for("react.provider"), s = Symbol.for("react.context"), l = Symbol.for("react.server_context"), d = Symbol.for("react.forward_ref"), u = Symbol.for("react.suspense"), a = Symbol.for("react.suspense_list"), g = Symbol.for("react.memo"), b = Symbol.for("react.lazy"), v = Symbol.for("react.offscreen"), x;
66
- x = Symbol.for("react.module.reference");
67
- function O(h) {
68
- if (typeof h == "object" && h !== null) {
69
- var D = h.$$typeof;
70
- switch (D) {
71
- case e:
72
- switch (h = h.type, h) {
73
- case r:
74
- case o:
75
- case i:
76
- case u:
77
- case a:
78
- return h;
79
- default:
80
- switch (h = h && h.$$typeof, h) {
81
- case l:
82
- case s:
83
- case d:
84
- case b:
85
- case g:
86
- case t:
87
- return h;
88
- default:
89
- return D;
90
- }
91
- }
92
- case n:
93
- return D;
94
- }
95
- }
96
- }
97
- return Y.ContextConsumer = s, Y.ContextProvider = t, Y.Element = e, Y.ForwardRef = d, Y.Fragment = r, Y.Lazy = b, Y.Memo = g, Y.Portal = n, Y.Profiler = o, Y.StrictMode = i, Y.Suspense = u, Y.SuspenseList = a, Y.isAsyncMode = function() {
98
- return !1;
99
- }, Y.isConcurrentMode = function() {
100
- return !1;
101
- }, Y.isContextConsumer = function(h) {
102
- return O(h) === s;
103
- }, Y.isContextProvider = function(h) {
104
- return O(h) === t;
105
- }, Y.isElement = function(h) {
106
- return typeof h == "object" && h !== null && h.$$typeof === e;
107
- }, Y.isForwardRef = function(h) {
108
- return O(h) === d;
109
- }, Y.isFragment = function(h) {
110
- return O(h) === r;
111
- }, Y.isLazy = function(h) {
112
- return O(h) === b;
113
- }, Y.isMemo = function(h) {
114
- return O(h) === g;
115
- }, Y.isPortal = function(h) {
116
- return O(h) === n;
117
- }, Y.isProfiler = function(h) {
118
- return O(h) === o;
119
- }, Y.isStrictMode = function(h) {
120
- return O(h) === i;
121
- }, Y.isSuspense = function(h) {
122
- return O(h) === u;
123
- }, Y.isSuspenseList = function(h) {
124
- return O(h) === a;
125
- }, Y.isValidElementType = function(h) {
126
- return typeof h == "string" || typeof h == "function" || h === r || h === o || h === i || h === u || h === a || h === v || typeof h == "object" && h !== null && (h.$$typeof === b || h.$$typeof === g || h.$$typeof === t || h.$$typeof === s || h.$$typeof === d || h.$$typeof === x || h.getModuleId !== void 0);
127
- }, Y.typeOf = O, Y;
128
- }
129
- var G = {};
130
- /**
131
- * @license React
132
- * react-is.development.js
133
- *
134
- * Copyright (c) Facebook, Inc. and its affiliates.
135
- *
136
- * This source code is licensed under the MIT license found in the
137
- * LICENSE file in the root directory of this source tree.
138
- */
139
- var dn;
140
- function ro() {
141
- return dn || (dn = 1, process.env.NODE_ENV !== "production" && function() {
142
- var e = Symbol.for("react.element"), n = Symbol.for("react.portal"), r = Symbol.for("react.fragment"), i = Symbol.for("react.strict_mode"), o = Symbol.for("react.profiler"), t = Symbol.for("react.provider"), s = Symbol.for("react.context"), l = Symbol.for("react.server_context"), d = Symbol.for("react.forward_ref"), u = Symbol.for("react.suspense"), a = Symbol.for("react.suspense_list"), g = Symbol.for("react.memo"), b = Symbol.for("react.lazy"), v = Symbol.for("react.offscreen"), x = !1, O = !1, h = !1, D = !1, c = !1, f;
143
- f = Symbol.for("react.module.reference");
144
- function p(E) {
145
- return !!(typeof E == "string" || typeof E == "function" || E === r || E === o || c || E === i || E === u || E === a || D || E === v || x || O || h || typeof E == "object" && E !== null && (E.$$typeof === b || E.$$typeof === g || E.$$typeof === t || E.$$typeof === s || E.$$typeof === d || // This needs to include all possible module reference object
146
- // types supported by any Flight configuration anywhere since
147
- // we don't know which Flight build this will end up being used
148
- // with.
149
- E.$$typeof === f || E.getModuleId !== void 0));
150
- }
151
- function I(E) {
152
- if (typeof E == "object" && E !== null) {
153
- var fe = E.$$typeof;
154
- switch (fe) {
155
- case e:
156
- var ie = E.type;
157
- switch (ie) {
158
- case r:
159
- case o:
160
- case i:
161
- case u:
162
- case a:
163
- return ie;
164
- default:
165
- var Te = ie && ie.$$typeof;
166
- switch (Te) {
167
- case l:
168
- case s:
169
- case d:
170
- case b:
171
- case g:
172
- case t:
173
- return Te;
174
- default:
175
- return fe;
176
- }
177
- }
178
- case n:
179
- return fe;
180
- }
181
- }
182
- }
183
- var m = s, N = t, C = e, H = d, M = r, S = b, R = g, V = n, j = o, B = i, U = u, K = a, J = !1, Q = !1;
184
- function A(E) {
185
- return J || (J = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")), !1;
186
- }
187
- function z(E) {
188
- return Q || (Q = !0, console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")), !1;
189
- }
190
- function q(E) {
191
- return I(E) === s;
192
- }
193
- function oe(E) {
194
- return I(E) === t;
195
- }
196
- function P(E) {
197
- return typeof E == "object" && E !== null && E.$$typeof === e;
198
- }
199
- function k(E) {
200
- return I(E) === d;
201
- }
202
- function w(E) {
203
- return I(E) === r;
204
- }
205
- function T(E) {
206
- return I(E) === b;
207
- }
208
- function L(E) {
209
- return I(E) === g;
210
- }
211
- function W(E) {
212
- return I(E) === n;
213
- }
214
- function F(E) {
215
- return I(E) === o;
216
- }
217
- function se(E) {
218
- return I(E) === i;
219
- }
220
- function ae(E) {
221
- return I(E) === u;
222
- }
223
- function le(E) {
224
- return I(E) === a;
225
- }
226
- G.ContextConsumer = m, G.ContextProvider = N, G.Element = C, G.ForwardRef = H, G.Fragment = M, G.Lazy = S, G.Memo = R, G.Portal = V, G.Profiler = j, G.StrictMode = B, G.Suspense = U, G.SuspenseList = K, G.isAsyncMode = A, G.isConcurrentMode = z, G.isContextConsumer = q, G.isContextProvider = oe, G.isElement = P, G.isForwardRef = k, G.isFragment = w, G.isLazy = T, G.isMemo = L, G.isPortal = W, G.isProfiler = F, G.isStrictMode = se, G.isSuspense = ae, G.isSuspenseList = le, G.isValidElementType = p, G.typeOf = I;
227
- }()), G;
228
- }
229
- process.env.NODE_ENV === "production" ? vt.exports = no() : vt.exports = ro();
230
- var cn = vt.exports;
231
- const pn = (e) => typeof e == "object" && e != null && e.nodeType === 1, fn = (e, n) => (!n || e !== "hidden") && e !== "visible" && e !== "clip", ft = (e, n) => {
232
- if (e.clientHeight < e.scrollHeight || e.clientWidth < e.scrollWidth) {
233
- const r = getComputedStyle(e, null);
234
- return fn(r.overflowY, n) || fn(r.overflowX, n) || ((i) => {
235
- const o = ((t) => {
236
- if (!t.ownerDocument || !t.ownerDocument.defaultView)
237
- return null;
238
- try {
239
- return t.ownerDocument.defaultView.frameElement;
240
- } catch {
241
- return null;
242
- }
243
- })(i);
244
- return !!o && (o.clientHeight < i.scrollHeight || o.clientWidth < i.scrollWidth);
245
- })(e);
246
- }
247
- return !1;
248
- }, et = (e, n, r, i, o, t, s, l) => t < e && s > n || t > e && s < n ? 0 : t <= e && l <= r || s >= n && l >= r ? t - e - i : s > n && l < r || t < e && l > r ? s - n + o : 0, oo = (e) => {
249
- const n = e.parentElement;
250
- return n ?? (e.getRootNode().host || null);
251
- }, io = (e, n) => {
252
- var r, i, o, t;
253
- if (typeof document > "u")
254
- return [];
255
- const { scrollMode: s, block: l, inline: d, boundary: u, skipOverflowHiddenElements: a } = n, g = typeof u == "function" ? u : (U) => U !== u;
256
- if (!pn(e))
257
- throw new TypeError("Invalid target");
258
- const b = document.scrollingElement || document.documentElement, v = [];
259
- let x = e;
260
- for (; pn(x) && g(x); ) {
261
- if (x = oo(x), x === b) {
262
- v.push(x);
263
- break;
264
- }
265
- x != null && x === document.body && ft(x) && !ft(document.documentElement) || x != null && ft(x, a) && v.push(x);
266
- }
267
- const O = (i = (r = window.visualViewport) == null ? void 0 : r.width) != null ? i : innerWidth, h = (t = (o = window.visualViewport) == null ? void 0 : o.height) != null ? t : innerHeight, { scrollX: D, scrollY: c } = window, { height: f, width: p, top: I, right: m, bottom: N, left: C } = e.getBoundingClientRect(), { top: H, right: M, bottom: S, left: R } = ((U) => {
268
- const K = window.getComputedStyle(U);
269
- return { top: parseFloat(K.scrollMarginTop) || 0, right: parseFloat(K.scrollMarginRight) || 0, bottom: parseFloat(K.scrollMarginBottom) || 0, left: parseFloat(K.scrollMarginLeft) || 0 };
270
- })(e);
271
- let V = l === "start" || l === "nearest" ? I - H : l === "end" ? N + S : I + f / 2 - H + S, j = d === "center" ? C + p / 2 - R + M : d === "end" ? m + M : C - R;
272
- const B = [];
273
- for (let U = 0; U < v.length; U++) {
274
- const K = v[U], { height: J, width: Q, top: A, right: z, bottom: q, left: oe } = K.getBoundingClientRect();
275
- if (s === "if-needed" && I >= 0 && C >= 0 && N <= h && m <= O && I >= A && N <= q && C >= oe && m <= z)
276
- return B;
277
- const P = getComputedStyle(K), k = parseInt(P.borderLeftWidth, 10), w = parseInt(P.borderTopWidth, 10), T = parseInt(P.borderRightWidth, 10), L = parseInt(P.borderBottomWidth, 10);
278
- let W = 0, F = 0;
279
- const se = "offsetWidth" in K ? K.offsetWidth - K.clientWidth - k - T : 0, ae = "offsetHeight" in K ? K.offsetHeight - K.clientHeight - w - L : 0, le = "offsetWidth" in K ? K.offsetWidth === 0 ? 0 : Q / K.offsetWidth : 0, E = "offsetHeight" in K ? K.offsetHeight === 0 ? 0 : J / K.offsetHeight : 0;
280
- if (b === K)
281
- W = l === "start" ? V : l === "end" ? V - h : l === "nearest" ? et(c, c + h, h, w, L, c + V, c + V + f, f) : V - h / 2, F = d === "start" ? j : d === "center" ? j - O / 2 : d === "end" ? j - O : et(D, D + O, O, k, T, D + j, D + j + p, p), W = Math.max(0, W + c), F = Math.max(0, F + D);
282
- else {
283
- W = l === "start" ? V - A - w : l === "end" ? V - q + L + ae : l === "nearest" ? et(A, q, J, w, L + ae, V, V + f, f) : V - (A + J / 2) + ae / 2, F = d === "start" ? j - oe - k : d === "center" ? j - (oe + Q / 2) + se / 2 : d === "end" ? j - z + T + se : et(oe, z, Q, k, T + se, j, j + p, p);
284
- const { scrollLeft: fe, scrollTop: ie } = K;
285
- W = E === 0 ? 0 : Math.max(0, Math.min(ie + W / E, K.scrollHeight - J / E + ae)), F = le === 0 ? 0 : Math.max(0, Math.min(fe + F / le, K.scrollWidth - Q / le + se)), V += ie - W, j += fe - F;
286
- }
287
- B.push({ el: K, top: W, left: F });
288
- }
289
- return B;
290
- };
291
- var $e = function() {
292
- return $e = Object.assign || function(n) {
293
- for (var r, i = 1, o = arguments.length; i < o; i++) {
294
- r = arguments[i];
295
- for (var t in r)
296
- Object.prototype.hasOwnProperty.call(r, t) && (n[t] = r[t]);
297
- }
298
- return n;
299
- }, $e.apply(this, arguments);
300
- };
301
- var so = 0;
302
- function hn(e) {
303
- return typeof e == "function" ? e : ge;
304
- }
305
- function ge() {
306
- }
307
- function kn(e, n) {
308
- if (e) {
309
- var r = io(e, {
310
- boundary: n,
311
- block: "nearest",
312
- scrollMode: "if-needed"
313
- });
314
- r.forEach(function(i) {
315
- var o = i.el, t = i.top, s = i.left;
316
- o.scrollTop = t, o.scrollLeft = s;
317
- });
318
- }
319
- }
320
- function gn(e, n, r) {
321
- var i = e === n || n instanceof r.Node && e.contains && e.contains(n);
322
- return i;
323
- }
324
- function Et(e, n) {
325
- var r;
326
- function i() {
327
- r && clearTimeout(r);
328
- }
329
- function o() {
330
- for (var t = arguments.length, s = new Array(t), l = 0; l < t; l++)
331
- s[l] = arguments[l];
332
- i(), r = setTimeout(function() {
333
- r = null, e.apply(void 0, s);
334
- }, n);
335
- }
336
- return o.cancel = i, o;
337
- }
338
- function re() {
339
- for (var e = arguments.length, n = new Array(e), r = 0; r < e; r++)
340
- n[r] = arguments[r];
341
- return function(i) {
342
- for (var o = arguments.length, t = new Array(o > 1 ? o - 1 : 0), s = 1; s < o; s++)
343
- t[s - 1] = arguments[s];
344
- return n.some(function(l) {
345
- return l && l.apply(void 0, [i].concat(t)), i.preventDownshiftDefault || i.hasOwnProperty("nativeEvent") && i.nativeEvent.preventDownshiftDefault;
346
- });
347
- };
348
- }
349
- function De() {
350
- for (var e = arguments.length, n = new Array(e), r = 0; r < e; r++)
351
- n[r] = arguments[r];
352
- return function(i) {
353
- n.forEach(function(o) {
354
- typeof o == "function" ? o(i) : o && (o.current = i);
355
- });
356
- };
357
- }
358
- function Tn() {
359
- return String(so++);
360
- }
361
- function Vn(e) {
362
- var n = e.isOpen, r = e.resultCount, i = e.previousResultCount;
363
- return n ? r ? r !== i ? r + " result" + (r === 1 ? " is" : "s are") + " available, use up and down arrow keys to navigate. Press Enter key to select." : "" : "No results are available." : "";
364
- }
365
- function mn(e, n) {
366
- return e = Array.isArray(e) ? (
367
- /* istanbul ignore next (preact) */
368
- e[0]
369
- ) : e, !e && n ? n : e;
370
- }
371
- function An(e) {
372
- return typeof e.type == "string";
373
- }
374
- function Hn(e) {
375
- return e.props;
376
- }
377
- function ao(e, n) {
378
- console.error('The property "' + n + '" is required in "' + e + '"');
379
- }
380
- var lo = ["highlightedIndex", "inputValue", "isOpen", "selectedItem", "type"];
381
- function tt(e) {
382
- e === void 0 && (e = {});
383
- var n = {};
384
- return lo.forEach(function(r) {
385
- e.hasOwnProperty(r) && (n[r] = e[r]);
386
- }), n;
387
- }
388
- function ze(e, n) {
389
- return !e || !n ? e : Object.keys(e).reduce(function(r, i) {
390
- return r[i] = st(n, i) ? n[i] : e[i], r;
391
- }, {});
392
- }
393
- function st(e, n) {
394
- return e[n] !== void 0;
395
- }
396
- function We(e) {
397
- var n = e.key, r = e.keyCode;
398
- return r >= 37 && r <= 40 && n.indexOf("Arrow") !== 0 ? "Arrow" + n : n;
399
- }
400
- function uo(e) {
401
- return Object.prototype.toString.call(e) === "[object Object]";
402
- }
403
- function Pe(e, n, r, i, o) {
404
- o === void 0 && (o = !1);
405
- var t = r.length;
406
- if (t === 0)
407
- return -1;
408
- var s = t - 1;
409
- (typeof e != "number" || e < 0 || e > s) && (e = n > 0 ? -1 : s + 1);
410
- var l = e + n;
411
- l < 0 ? l = o ? s : 0 : l > s && (l = o ? 0 : s);
412
- var d = Fe(l, n < 0, r, i, o);
413
- return d === -1 ? e >= t ? -1 : e : d;
414
- }
415
- function Fe(e, n, r, i, o) {
416
- o === void 0 && (o = !1);
417
- var t = r.length;
418
- if (n) {
419
- for (var s = e; s >= 0; s--)
420
- if (!i(r[s], s))
421
- return s;
422
- } else
423
- for (var l = e; l < t; l++)
424
- if (!i(r[l], l))
425
- return l;
426
- return o ? Fe(n ? t - 1 : 0, n, r, i) : -1;
427
- }
428
- function at(e, n, r, i) {
429
- return i === void 0 && (i = !0), r && n.some(function(o) {
430
- return o && (gn(o, e, r) || i && gn(o, r.document.activeElement, r));
431
- });
432
- }
433
- var Ct = ge;
434
- process.env.NODE_ENV !== "production" && (Ct = function(n, r, i) {
435
- var o = "This prop should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled Downshift element for the lifetime of the component. More info: https://github.com/downshift-js/downshift#control-props";
436
- Object.keys(n).forEach(function(t) {
437
- r[t] !== void 0 && i[t] === void 0 ? console.error('downshift: A component has changed the controlled prop "' + t + '" to be uncontrolled. ' + o) : r[t] === void 0 && i[t] !== void 0 && console.error('downshift: A component has changed the uncontrolled prop "' + t + '" to be controlled. ' + o);
438
- });
439
- });
440
- var co = Et(function(e) {
441
- jn(e).textContent = "";
442
- }, 500);
443
- function jn(e) {
444
- var n = e.getElementById("a11y-status-message");
445
- return n || (n = e.createElement("div"), n.setAttribute("id", "a11y-status-message"), n.setAttribute("role", "status"), n.setAttribute("aria-live", "polite"), n.setAttribute("aria-relevant", "additions text"), Object.assign(n.style, {
446
- border: "0",
447
- clip: "rect(0 0 0 0)",
448
- height: "1px",
449
- margin: "-1px",
450
- overflow: "hidden",
451
- padding: "0",
452
- position: "absolute",
453
- width: "1px"
454
- }), e.body.appendChild(n), n);
455
- }
456
- function St(e, n) {
457
- if (!(!e || !n)) {
458
- var r = jn(n);
459
- r.textContent = e, co(n);
460
- }
461
- }
462
- var Kn = process.env.NODE_ENV !== "production" ? "__autocomplete_unknown__" : 0, $n = process.env.NODE_ENV !== "production" ? "__autocomplete_mouseup__" : 1, Fn = process.env.NODE_ENV !== "production" ? "__autocomplete_item_mouseenter__" : 2, nt = process.env.NODE_ENV !== "production" ? "__autocomplete_keydown_arrow_up__" : 3, rt = process.env.NODE_ENV !== "production" ? "__autocomplete_keydown_arrow_down__" : 4, Ln = process.env.NODE_ENV !== "production" ? "__autocomplete_keydown_escape__" : 5, Bn = process.env.NODE_ENV !== "production" ? "__autocomplete_keydown_enter__" : 6, Un = process.env.NODE_ENV !== "production" ? "__autocomplete_keydown_home__" : 7, zn = process.env.NODE_ENV !== "production" ? "__autocomplete_keydown_end__" : 8, Wn = process.env.NODE_ENV !== "production" ? "__autocomplete_click_item__" : 9, qn = process.env.NODE_ENV !== "production" ? "__autocomplete_blur_input__" : 10, Yn = process.env.NODE_ENV !== "production" ? "__autocomplete_change_input__" : 11, Gn = process.env.NODE_ENV !== "production" ? "__autocomplete_keydown_space_button__" : 12, _t = process.env.NODE_ENV !== "production" ? "__autocomplete_click_button__" : 13, Xn = process.env.NODE_ENV !== "production" ? "__autocomplete_blur_button__" : 14, Jn = process.env.NODE_ENV !== "production" ? "__autocomplete_controlled_prop_updated_selected_item__" : 15, Qn = process.env.NODE_ENV !== "production" ? "__autocomplete_touchend__" : 16, po = /* @__PURE__ */ Object.freeze({
463
- __proto__: null,
464
- unknown: Kn,
465
- mouseUp: $n,
466
- itemMouseEnter: Fn,
467
- keyDownArrowUp: nt,
468
- keyDownArrowDown: rt,
469
- keyDownEscape: Ln,
470
- keyDownEnter: Bn,
471
- keyDownHome: Un,
472
- keyDownEnd: zn,
473
- clickItem: Wn,
474
- blurInput: qn,
475
- changeInput: Yn,
476
- keyDownSpaceButton: Gn,
477
- clickButton: _t,
478
- blurButton: Xn,
479
- controlledPropUpdatedSelectedItem: Jn,
480
- touchEnd: Qn
481
- }), fo = ["refKey", "ref"], ho = ["onClick", "onPress", "onKeyDown", "onKeyUp", "onBlur"], go = ["onKeyDown", "onBlur", "onChange", "onInput", "onChangeText"], mo = ["refKey", "ref"], vo = ["onMouseMove", "onMouseDown", "onClick", "onPress", "index", "item"], _o = /* @__PURE__ */ function() {
482
- var e = /* @__PURE__ */ function(n) {
483
- Dr(r, n);
484
- function r(o) {
485
- var t;
486
- t = n.call(this, o) || this, t.id = t.props.id || "downshift-" + Tn(), t.menuId = t.props.menuId || t.id + "-menu", t.labelId = t.props.labelId || t.id + "-label", t.inputId = t.props.inputId || t.id + "-input", t.getItemId = t.props.getItemId || function(c) {
487
- return t.id + "-item-" + c;
488
- }, t.items = [], t.itemCount = null, t.previousResultCount = 0, t.timeoutIds = [], t.internalSetTimeout = function(c, f) {
489
- var p = setTimeout(function() {
490
- t.timeoutIds = t.timeoutIds.filter(function(I) {
491
- return I !== p;
492
- }), c();
493
- }, f);
494
- t.timeoutIds.push(p);
495
- }, t.setItemCount = function(c) {
496
- t.itemCount = c;
497
- }, t.unsetItemCount = function() {
498
- t.itemCount = null;
499
- }, t.isItemDisabled = function(c, f) {
500
- var p = t.getItemNodeFromIndex(f);
501
- return p && p.hasAttribute("disabled");
502
- }, t.setHighlightedIndex = function(c, f) {
503
- c === void 0 && (c = t.props.defaultHighlightedIndex), f === void 0 && (f = {}), f = tt(f), t.internalSetState($({
504
- highlightedIndex: c
505
- }, f));
506
- }, t.clearSelection = function(c) {
507
- t.internalSetState({
508
- selectedItem: null,
509
- inputValue: "",
510
- highlightedIndex: t.props.defaultHighlightedIndex,
511
- isOpen: t.props.defaultIsOpen
512
- }, c);
513
- }, t.selectItem = function(c, f, p) {
514
- f = tt(f), t.internalSetState($({
515
- isOpen: t.props.defaultIsOpen,
516
- highlightedIndex: t.props.defaultHighlightedIndex,
517
- selectedItem: c,
518
- inputValue: t.props.itemToString(c)
519
- }, f), p);
520
- }, t.selectItemAtIndex = function(c, f, p) {
521
- var I = t.items[c];
522
- I != null && t.selectItem(I, f, p);
523
- }, t.selectHighlightedItem = function(c, f) {
524
- return t.selectItemAtIndex(t.getState().highlightedIndex, c, f);
525
- }, t.internalSetState = function(c, f) {
526
- var p, I, m = {}, N = typeof c == "function";
527
- return !N && c.hasOwnProperty("inputValue") && t.props.onInputValueChange(c.inputValue, $({}, t.getStateAndHelpers(), c)), t.setState(function(C) {
528
- var H;
529
- C = t.getState(C);
530
- var M = N ? c(C) : c;
531
- M = t.props.stateReducer(C, M), p = M.hasOwnProperty("selectedItem");
532
- var S = {};
533
- return p && M.selectedItem !== C.selectedItem && (I = M.selectedItem), (H = M).type || (H.type = Kn), Object.keys(M).forEach(function(R) {
534
- C[R] !== M[R] && (m[R] = M[R]), R !== "type" && (M[R], st(t.props, R) || (S[R] = M[R]));
535
- }), N && M.hasOwnProperty("inputValue") && t.props.onInputValueChange(M.inputValue, $({}, t.getStateAndHelpers(), M)), S;
536
- }, function() {
537
- hn(f)();
538
- var C = Object.keys(m).length > 1;
539
- C && t.props.onStateChange(m, t.getStateAndHelpers()), p && t.props.onSelect(c.selectedItem, t.getStateAndHelpers()), I !== void 0 && t.props.onChange(I, t.getStateAndHelpers()), t.props.onUserAction(m, t.getStateAndHelpers());
540
- });
541
- }, t.rootRef = function(c) {
542
- return t._rootNode = c;
543
- }, t.getRootProps = function(c, f) {
544
- var p, I = c === void 0 ? {} : c, m = I.refKey, N = m === void 0 ? "ref" : m, C = I.ref, H = me(I, fo), M = f === void 0 ? {} : f, S = M.suppressRefError, R = S === void 0 ? !1 : S;
545
- t.getRootProps.called = !0, t.getRootProps.refKey = N, t.getRootProps.suppressRefError = R;
546
- var V = t.getState(), j = V.isOpen;
547
- return $((p = {}, p[N] = De(C, t.rootRef), p.role = "combobox", p["aria-expanded"] = j, p["aria-haspopup"] = "listbox", p["aria-owns"] = j ? t.menuId : void 0, p["aria-labelledby"] = t.labelId, p), H);
548
- }, t.keyDownHandlers = {
549
- ArrowDown: function(f) {
550
- var p = this;
551
- if (f.preventDefault(), this.getState().isOpen) {
552
- var I = f.shiftKey ? 5 : 1;
553
- this.moveHighlightedIndex(I, {
554
- type: rt
555
- });
556
- } else
557
- this.internalSetState({
558
- isOpen: !0,
559
- type: rt
560
- }, function() {
561
- var m = p.getItemCount();
562
- if (m > 0) {
563
- var N = p.getState(), C = N.highlightedIndex, H = Pe(C, 1, {
564
- length: m
565
- }, p.isItemDisabled, !0);
566
- p.setHighlightedIndex(H, {
567
- type: rt
568
- });
569
- }
570
- });
571
- },
572
- ArrowUp: function(f) {
573
- var p = this;
574
- if (f.preventDefault(), this.getState().isOpen) {
575
- var I = f.shiftKey ? -5 : -1;
576
- this.moveHighlightedIndex(I, {
577
- type: nt
578
- });
579
- } else
580
- this.internalSetState({
581
- isOpen: !0,
582
- type: nt
583
- }, function() {
584
- var m = p.getItemCount();
585
- if (m > 0) {
586
- var N = p.getState(), C = N.highlightedIndex, H = Pe(C, -1, {
587
- length: m
588
- }, p.isItemDisabled, !0);
589
- p.setHighlightedIndex(H, {
590
- type: nt
591
- });
592
- }
593
- });
594
- },
595
- Enter: function(f) {
596
- if (f.which !== 229) {
597
- var p = this.getState(), I = p.isOpen, m = p.highlightedIndex;
598
- if (I && m != null) {
599
- f.preventDefault();
600
- var N = this.items[m], C = this.getItemNodeFromIndex(m);
601
- if (N == null || C && C.hasAttribute("disabled"))
602
- return;
603
- this.selectHighlightedItem({
604
- type: Bn
605
- });
606
- }
607
- }
608
- },
609
- Escape: function(f) {
610
- f.preventDefault(), this.reset($({
611
- type: Ln
612
- }, !this.state.isOpen && {
613
- selectedItem: null,
614
- inputValue: ""
615
- }));
616
- }
617
- }, t.buttonKeyDownHandlers = $({}, t.keyDownHandlers, {
618
- " ": function(f) {
619
- f.preventDefault(), this.toggleMenu({
620
- type: Gn
621
- });
622
- }
623
- }), t.inputKeyDownHandlers = $({}, t.keyDownHandlers, {
624
- Home: function(f) {
625
- var p = this.getState(), I = p.isOpen;
626
- if (I) {
627
- f.preventDefault();
628
- var m = this.getItemCount();
629
- if (!(m <= 0 || !I)) {
630
- var N = Fe(0, !1, {
631
- length: m
632
- }, this.isItemDisabled);
633
- this.setHighlightedIndex(N, {
634
- type: Un
635
- });
636
- }
637
- }
638
- },
639
- End: function(f) {
640
- var p = this.getState(), I = p.isOpen;
641
- if (I) {
642
- f.preventDefault();
643
- var m = this.getItemCount();
644
- if (!(m <= 0 || !I)) {
645
- var N = Fe(m - 1, !0, {
646
- length: m
647
- }, this.isItemDisabled);
648
- this.setHighlightedIndex(N, {
649
- type: zn
650
- });
651
- }
652
- }
653
- }
654
- }), t.getToggleButtonProps = function(c) {
655
- var f = c === void 0 ? {} : c, p = f.onClick;
656
- f.onPress;
657
- var I = f.onKeyDown, m = f.onKeyUp, N = f.onBlur, C = me(f, ho), H = t.getState(), M = H.isOpen, S = {
658
- onClick: re(p, t.buttonHandleClick),
659
- onKeyDown: re(I, t.buttonHandleKeyDown),
660
- onKeyUp: re(m, t.buttonHandleKeyUp),
661
- onBlur: re(N, t.buttonHandleBlur)
662
- }, R = C.disabled ? {} : S;
663
- return $({
664
- type: "button",
665
- role: "button",
666
- "aria-label": M ? "close menu" : "open menu",
667
- "aria-haspopup": !0,
668
- "data-toggle": !0
669
- }, R, C);
670
- }, t.buttonHandleKeyUp = function(c) {
671
- c.preventDefault();
672
- }, t.buttonHandleKeyDown = function(c) {
673
- var f = We(c);
674
- t.buttonKeyDownHandlers[f] && t.buttonKeyDownHandlers[f].call(ln(t), c);
675
- }, t.buttonHandleClick = function(c) {
676
- if (c.preventDefault(), t.props.environment) {
677
- var f = t.props.environment.document, p = f.body, I = f.activeElement;
678
- p && p === I && c.target.focus();
679
- }
680
- process.env.NODE_ENV === "test" ? t.toggleMenu({
681
- type: _t
682
- }) : t.internalSetTimeout(function() {
683
- return t.toggleMenu({
684
- type: _t
685
- });
686
- });
687
- }, t.buttonHandleBlur = function(c) {
688
- var f = c.target;
689
- t.internalSetTimeout(function() {
690
- if (!(t.isMouseDown || !t.props.environment)) {
691
- var p = t.props.environment.document.activeElement;
692
- (p == null || p.id !== t.inputId) && p !== f && t.reset({
693
- type: Xn
694
- });
695
- }
696
- });
697
- }, t.getLabelProps = function(c) {
698
- return $({
699
- htmlFor: t.inputId,
700
- id: t.labelId
701
- }, c);
702
- }, t.getInputProps = function(c) {
703
- var f = c === void 0 ? {} : c, p = f.onKeyDown, I = f.onBlur, m = f.onChange, N = f.onInput;
704
- f.onChangeText;
705
- var C = me(f, go), H, M = {};
706
- H = "onChange";
707
- var S = t.getState(), R = S.inputValue, V = S.isOpen, j = S.highlightedIndex;
708
- if (!C.disabled) {
709
- var B;
710
- M = (B = {}, B[H] = re(m, N, t.inputHandleChange), B.onKeyDown = re(p, t.inputHandleKeyDown), B.onBlur = re(I, t.inputHandleBlur), B);
711
- }
712
- return $({
713
- "aria-autocomplete": "list",
714
- "aria-activedescendant": V && typeof j == "number" && j >= 0 ? t.getItemId(j) : void 0,
715
- "aria-controls": V ? t.menuId : void 0,
716
- "aria-labelledby": C && C["aria-label"] ? void 0 : t.labelId,
717
- // https://developer.mozilla.org/en-US/docs/Web/Security/Securing_your_site/Turning_off_form_autocompletion
718
- // revert back since autocomplete="nope" is ignored on latest Chrome and Opera
719
- autoComplete: "off",
720
- value: R,
721
- id: t.inputId
722
- }, M, C);
723
- }, t.inputHandleKeyDown = function(c) {
724
- var f = We(c);
725
- f && t.inputKeyDownHandlers[f] && t.inputKeyDownHandlers[f].call(ln(t), c);
726
- }, t.inputHandleChange = function(c) {
727
- t.internalSetState({
728
- type: Yn,
729
- isOpen: !0,
730
- inputValue: c.target.value,
731
- highlightedIndex: t.props.defaultHighlightedIndex
732
- });
733
- }, t.inputHandleBlur = function() {
734
- t.internalSetTimeout(function() {
735
- var c;
736
- if (!(t.isMouseDown || !t.props.environment)) {
737
- var f = t.props.environment.document.activeElement, p = (f == null || (c = f.dataset) == null ? void 0 : c.toggle) && t._rootNode && t._rootNode.contains(f);
738
- p || t.reset({
739
- type: qn
740
- });
741
- }
742
- });
743
- }, t.menuRef = function(c) {
744
- t._menuNode = c;
745
- }, t.getMenuProps = function(c, f) {
746
- var p, I = c === void 0 ? {} : c, m = I.refKey, N = m === void 0 ? "ref" : m, C = I.ref, H = me(I, mo), M = f === void 0 ? {} : f, S = M.suppressRefError, R = S === void 0 ? !1 : S;
747
- return t.getMenuProps.called = !0, t.getMenuProps.refKey = N, t.getMenuProps.suppressRefError = R, $((p = {}, p[N] = De(C, t.menuRef), p.role = "listbox", p["aria-labelledby"] = H && H["aria-label"] ? void 0 : t.labelId, p.id = t.menuId, p), H);
748
- }, t.getItemProps = function(c) {
749
- var f, p = c === void 0 ? {} : c, I = p.onMouseMove, m = p.onMouseDown, N = p.onClick;
750
- p.onPress;
751
- var C = p.index, H = p.item, M = H === void 0 ? process.env.NODE_ENV === "production" ? (
752
- /* istanbul ignore next */
753
- void 0
754
- ) : ao("getItemProps", "item") : H, S = me(p, vo);
755
- C === void 0 ? (t.items.push(M), C = t.items.indexOf(M)) : t.items[C] = M;
756
- var R = "onClick", V = N, j = (f = {
757
- // onMouseMove is used over onMouseEnter here. onMouseMove
758
- // is only triggered on actual mouse movement while onMouseEnter
759
- // can fire on DOM changes, interrupting keyboard navigation
760
- onMouseMove: re(I, function() {
761
- C !== t.getState().highlightedIndex && (t.setHighlightedIndex(C, {
762
- type: Fn
763
- }), t.avoidScrolling = !0, t.internalSetTimeout(function() {
764
- return t.avoidScrolling = !1;
765
- }, 250));
766
- }),
767
- onMouseDown: re(m, function(U) {
768
- U.preventDefault();
769
- })
770
- }, f[R] = re(V, function() {
771
- t.selectItemAtIndex(C, {
772
- type: Wn
773
- });
774
- }), f), B = S.disabled ? {
775
- onMouseDown: j.onMouseDown
776
- } : j;
777
- return $({
778
- id: t.getItemId(C),
779
- role: "option",
780
- "aria-selected": t.getState().highlightedIndex === C
781
- }, B, S);
782
- }, t.clearItems = function() {
783
- t.items = [];
784
- }, t.reset = function(c, f) {
785
- c === void 0 && (c = {}), c = tt(c), t.internalSetState(function(p) {
786
- var I = p.selectedItem;
787
- return $({
788
- isOpen: t.props.defaultIsOpen,
789
- highlightedIndex: t.props.defaultHighlightedIndex,
790
- inputValue: t.props.itemToString(I)
791
- }, c);
792
- }, f);
793
- }, t.toggleMenu = function(c, f) {
794
- c === void 0 && (c = {}), c = tt(c), t.internalSetState(function(p) {
795
- var I = p.isOpen;
796
- return $({
797
- isOpen: !I
798
- }, I && {
799
- highlightedIndex: t.props.defaultHighlightedIndex
800
- }, c);
801
- }, function() {
802
- var p = t.getState(), I = p.isOpen, m = p.highlightedIndex;
803
- I && t.getItemCount() > 0 && typeof m == "number" && t.setHighlightedIndex(m, c), hn(f)();
804
- });
805
- }, t.openMenu = function(c) {
806
- t.internalSetState({
807
- isOpen: !0
808
- }, c);
809
- }, t.closeMenu = function(c) {
810
- t.internalSetState({
811
- isOpen: !1
812
- }, c);
813
- }, t.updateStatus = Et(function() {
814
- var c;
815
- if ((c = t.props) != null && (c = c.environment) != null && c.document) {
816
- var f = t.getState(), p = t.items[f.highlightedIndex], I = t.getItemCount(), m = t.props.getA11yStatusMessage($({
817
- itemToString: t.props.itemToString,
818
- previousResultCount: t.previousResultCount,
819
- resultCount: I,
820
- highlightedItem: p
821
- }, f));
822
- t.previousResultCount = I, St(m, t.props.environment.document);
823
- }
824
- }, 200);
825
- var s = t.props, l = s.defaultHighlightedIndex, d = s.initialHighlightedIndex, u = d === void 0 ? l : d, a = s.defaultIsOpen, g = s.initialIsOpen, b = g === void 0 ? a : g, v = s.initialInputValue, x = v === void 0 ? "" : v, O = s.initialSelectedItem, h = O === void 0 ? null : O, D = t.getState({
826
- highlightedIndex: u,
827
- isOpen: b,
828
- inputValue: x,
829
- selectedItem: h
830
- });
831
- return D.selectedItem != null && t.props.initialInputValue === void 0 && (D.inputValue = t.props.itemToString(D.selectedItem)), t.state = D, t;
832
- }
833
- var i = r.prototype;
834
- return i.internalClearTimeouts = function() {
835
- this.timeoutIds.forEach(function(t) {
836
- clearTimeout(t);
837
- }), this.timeoutIds = [];
838
- }, i.getState = function(t) {
839
- return t === void 0 && (t = this.state), ze(t, this.props);
840
- }, i.getItemCount = function() {
841
- var t = this.items.length;
842
- return this.itemCount != null ? t = this.itemCount : this.props.itemCount !== void 0 && (t = this.props.itemCount), t;
843
- }, i.getItemNodeFromIndex = function(t) {
844
- return this.props.environment ? this.props.environment.document.getElementById(this.getItemId(t)) : null;
845
- }, i.scrollHighlightedItemIntoView = function() {
846
- {
847
- var t = this.getItemNodeFromIndex(this.getState().highlightedIndex);
848
- this.props.scrollIntoView(t, this._menuNode);
849
- }
850
- }, i.moveHighlightedIndex = function(t, s) {
851
- var l = this.getItemCount(), d = this.getState(), u = d.highlightedIndex;
852
- if (l > 0) {
853
- var a = Pe(u, t, {
854
- length: l
855
- }, this.isItemDisabled, !0);
856
- this.setHighlightedIndex(a, s);
857
- }
858
- }, i.getStateAndHelpers = function() {
859
- var t = this.getState(), s = t.highlightedIndex, l = t.inputValue, d = t.selectedItem, u = t.isOpen, a = this.props.itemToString, g = this.id, b = this.getRootProps, v = this.getToggleButtonProps, x = this.getLabelProps, O = this.getMenuProps, h = this.getInputProps, D = this.getItemProps, c = this.openMenu, f = this.closeMenu, p = this.toggleMenu, I = this.selectItem, m = this.selectItemAtIndex, N = this.selectHighlightedItem, C = this.setHighlightedIndex, H = this.clearSelection, M = this.clearItems, S = this.reset, R = this.setItemCount, V = this.unsetItemCount, j = this.internalSetState;
860
- return {
861
- // prop getters
862
- getRootProps: b,
863
- getToggleButtonProps: v,
864
- getLabelProps: x,
865
- getMenuProps: O,
866
- getInputProps: h,
867
- getItemProps: D,
868
- // actions
869
- reset: S,
870
- openMenu: c,
871
- closeMenu: f,
872
- toggleMenu: p,
873
- selectItem: I,
874
- selectItemAtIndex: m,
875
- selectHighlightedItem: N,
876
- setHighlightedIndex: C,
877
- clearSelection: H,
878
- clearItems: M,
879
- setItemCount: R,
880
- unsetItemCount: V,
881
- setState: j,
882
- // props
883
- itemToString: a,
884
- // derived
885
- id: g,
886
- // state
887
- highlightedIndex: s,
888
- inputValue: l,
889
- isOpen: u,
890
- selectedItem: d
891
- };
892
- }, i.componentDidMount = function() {
893
- var t = this;
894
- if (process.env.NODE_ENV !== "production" && this.getMenuProps.called && !this.getMenuProps.suppressRefError && vn(this._menuNode, this.getMenuProps), !this.props.environment)
895
- this.cleanup = function() {
896
- t.internalClearTimeouts();
897
- };
898
- else {
899
- var s = function() {
900
- t.isMouseDown = !0;
901
- }, l = function(v) {
902
- t.isMouseDown = !1;
903
- var x = at(v.target, [t._rootNode, t._menuNode], t.props.environment);
904
- !x && t.getState().isOpen && t.reset({
905
- type: $n
906
- }, function() {
907
- return t.props.onOuterClick(t.getStateAndHelpers());
908
- });
909
- }, d = function() {
910
- t.isTouchMove = !1;
911
- }, u = function() {
912
- t.isTouchMove = !0;
913
- }, a = function(v) {
914
- var x = at(v.target, [t._rootNode, t._menuNode], t.props.environment, !1);
915
- !t.isTouchMove && !x && t.getState().isOpen && t.reset({
916
- type: Qn
917
- }, function() {
918
- return t.props.onOuterClick(t.getStateAndHelpers());
919
- });
920
- }, g = this.props.environment;
921
- g.addEventListener("mousedown", s), g.addEventListener("mouseup", l), g.addEventListener("touchstart", d), g.addEventListener("touchmove", u), g.addEventListener("touchend", a), this.cleanup = function() {
922
- t.internalClearTimeouts(), t.updateStatus.cancel(), g.removeEventListener("mousedown", s), g.removeEventListener("mouseup", l), g.removeEventListener("touchstart", d), g.removeEventListener("touchmove", u), g.removeEventListener("touchend", a);
923
- };
924
- }
925
- }, i.shouldScroll = function(t, s) {
926
- var l = this.props.highlightedIndex === void 0 ? this.getState() : this.props, d = l.highlightedIndex, u = s.highlightedIndex === void 0 ? t : s, a = u.highlightedIndex, g = d && this.getState().isOpen && !t.isOpen, b = d !== a;
927
- return g || b;
928
- }, i.componentDidUpdate = function(t, s) {
929
- process.env.NODE_ENV !== "production" && (Ct(this.state, t, this.props), this.getMenuProps.called && !this.getMenuProps.suppressRefError && vn(this._menuNode, this.getMenuProps)), st(this.props, "selectedItem") && this.props.selectedItemChanged(t.selectedItem, this.props.selectedItem) && this.internalSetState({
930
- type: Jn,
931
- inputValue: this.props.itemToString(this.props.selectedItem)
932
- }), !this.avoidScrolling && this.shouldScroll(s, t) && this.scrollHighlightedItemIntoView(), this.updateStatus();
933
- }, i.componentWillUnmount = function() {
934
- this.cleanup();
935
- }, i.render = function() {
936
- var t = mn(this.props.children, ge);
937
- this.clearItems(), this.getRootProps.called = !1, this.getRootProps.refKey = void 0, this.getRootProps.suppressRefError = void 0, this.getMenuProps.called = !1, this.getMenuProps.refKey = void 0, this.getMenuProps.suppressRefError = void 0, this.getLabelProps.called = !1, this.getInputProps.called = !1;
938
- var s = mn(t(this.getStateAndHelpers()));
939
- if (!s)
940
- return null;
941
- if (this.getRootProps.called || this.props.suppressRefError)
942
- return process.env.NODE_ENV !== "production" && !this.getRootProps.suppressRefError && !this.props.suppressRefError && Io(s, this.getRootProps), s;
943
- if (An(s))
944
- return /* @__PURE__ */ kr(s, this.getRootProps(Hn(s)));
945
- if (process.env.NODE_ENV !== "production")
946
- throw new Error("downshift: If you return a non-DOM element, you must apply the getRootProps function");
947
- }, r;
948
- }(Tr);
949
- return e.defaultProps = {
950
- defaultHighlightedIndex: null,
951
- defaultIsOpen: !1,
952
- getA11yStatusMessage: Vn,
953
- itemToString: function(r) {
954
- return r == null ? "" : (process.env.NODE_ENV !== "production" && uo(r) && !r.hasOwnProperty("toString") && console.warn("downshift: An object was passed to the default implementation of `itemToString`. You should probably provide your own `itemToString` implementation. Please refer to the `itemToString` API documentation.", "The object that was passed:", r), String(r));
955
- },
956
- onStateChange: ge,
957
- onInputValueChange: ge,
958
- onUserAction: ge,
959
- onChange: ge,
960
- onSelect: ge,
961
- onOuterClick: ge,
962
- selectedItemChanged: function(r, i) {
963
- return r !== i;
964
- },
965
- environment: (
966
- /* istanbul ignore next (ssr) */
967
- typeof window > "u" ? void 0 : window
968
- ),
969
- stateReducer: function(r, i) {
970
- return i;
971
- },
972
- suppressRefError: !1,
973
- scrollIntoView: kn
974
- }, e.stateChangeTypes = po, e;
975
- }();
976
- process.env.NODE_ENV !== "production" && (_o.propTypes = {
977
- children: _.func,
978
- defaultHighlightedIndex: _.number,
979
- defaultIsOpen: _.bool,
980
- initialHighlightedIndex: _.number,
981
- initialSelectedItem: _.any,
982
- initialInputValue: _.string,
983
- initialIsOpen: _.bool,
984
- getA11yStatusMessage: _.func,
985
- itemToString: _.func,
986
- onChange: _.func,
987
- onSelect: _.func,
988
- onStateChange: _.func,
989
- onInputValueChange: _.func,
990
- onUserAction: _.func,
991
- onOuterClick: _.func,
992
- selectedItemChanged: _.func,
993
- stateReducer: _.func,
994
- itemCount: _.number,
995
- id: _.string,
996
- environment: _.shape({
997
- addEventListener: _.func.isRequired,
998
- removeEventListener: _.func.isRequired,
999
- document: _.shape({
1000
- createElement: _.func.isRequired,
1001
- getElementById: _.func.isRequired,
1002
- activeElement: _.any.isRequired,
1003
- body: _.any.isRequired
1004
- }).isRequired,
1005
- Node: _.func.isRequired
1006
- }),
1007
- suppressRefError: _.bool,
1008
- scrollIntoView: _.func,
1009
- // things we keep in state for uncontrolled components
1010
- // but can accept as props for controlled components
1011
- /* eslint-disable react/no-unused-prop-types */
1012
- selectedItem: _.any,
1013
- isOpen: _.bool,
1014
- inputValue: _.string,
1015
- highlightedIndex: _.number,
1016
- labelId: _.string,
1017
- inputId: _.string,
1018
- menuId: _.string,
1019
- getItemId: _.func
1020
- /* eslint-enable react/no-unused-prop-types */
1021
- });
1022
- function vn(e, n) {
1023
- var r = n.refKey;
1024
- e || console.error('downshift: The ref prop "' + r + '" from getMenuProps was not applied correctly on your menu element.');
1025
- }
1026
- function Io(e, n) {
1027
- var r = n.refKey, i = r !== "ref", o = !An(e);
1028
- o && !i && !cn.isForwardRef(e) ? console.error("downshift: You returned a non-DOM element. You must specify a refKey in getRootProps") : !o && i && console.error('downshift: You returned a DOM element. You should not specify a refKey in getRootProps. You specified "' + r + '"'), !cn.isForwardRef(e) && !Hn(e)[r] && console.error('downshift: You must apply the ref prop "' + r + '" from getRootProps onto your root element.');
1029
- }
1030
- var yo = ["highlightedIndex", "items", "environment"], Zn = {
1031
- highlightedIndex: -1,
1032
- isOpen: !1,
1033
- selectedItem: null,
1034
- inputValue: ""
1035
- };
1036
- function xo(e, n, r) {
1037
- var i = e.props, o = e.type, t = {};
1038
- Object.keys(n).forEach(function(s) {
1039
- bo(s, e, n, r), r[s] !== n[s] && (t[s] = r[s]);
1040
- }), i.onStateChange && Object.keys(t).length && i.onStateChange($({
1041
- type: o
1042
- }, t));
1043
- }
1044
- function bo(e, n, r, i) {
1045
- var o = n.props, t = n.type, s = "on" + Ot(e) + "Change";
1046
- o[s] && i[e] !== void 0 && i[e] !== r[e] && o[s]($({
1047
- type: t
1048
- }, i));
1049
- }
1050
- function wo(e, n) {
1051
- return n.changes;
1052
- }
1053
- function Eo(e) {
1054
- var n = e.selectedItem, r = e.itemToString;
1055
- return n ? r(n) + " has been selected." : "";
1056
- }
1057
- var Co = Et(function(e, n) {
1058
- St(e(), n);
1059
- }, 200), So = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u" ? xt : ue, Oo = "useId" in it ? function(n) {
1060
- var r = n.id, i = n.labelId, o = n.menuId, t = n.getItemId, s = n.toggleButtonId, l = n.inputId, d = "downshift-" + it.useId();
1061
- r || (r = d);
1062
- var u = Z({
1063
- labelId: i || r + "-label",
1064
- menuId: o || r + "-menu",
1065
- getItemId: t || function(a) {
1066
- return r + "-item-" + a;
1067
- },
1068
- toggleButtonId: s || r + "-toggle-button",
1069
- inputId: l || r + "-input"
1070
- });
1071
- return u.current;
1072
- } : function(n) {
1073
- var r = n.id, i = r === void 0 ? "downshift-" + Tn() : r, o = n.labelId, t = n.menuId, s = n.getItemId, l = n.toggleButtonId, d = n.inputId, u = Z({
1074
- labelId: o || i + "-label",
1075
- menuId: t || i + "-menu",
1076
- getItemId: s || function(a) {
1077
- return i + "-item-" + a;
1078
- },
1079
- toggleButtonId: l || i + "-toggle-button",
1080
- inputId: d || i + "-input"
1081
- });
1082
- return u.current;
1083
- };
1084
- function er(e, n, r, i) {
1085
- var o, t;
1086
- if (e === void 0) {
1087
- if (n === void 0)
1088
- throw new Error(i);
1089
- o = r[n], t = n;
1090
- } else
1091
- t = n === void 0 ? r.indexOf(e) : n, o = e;
1092
- return [o, t];
1093
- }
1094
- function Ot(e) {
1095
- return "" + e.slice(0, 1).toUpperCase() + e.slice(1);
1096
- }
1097
- function Nt(e) {
1098
- var n = Z(e);
1099
- return n.current = e, n;
1100
- }
1101
- function tr(e, n, r, i) {
1102
- var o = Z(), t = Z(), s = ee(function(v, x) {
1103
- t.current = x, v = ze(v, x.props);
1104
- var O = e(v, x), h = x.props.stateReducer(v, $({}, x, {
1105
- changes: O
1106
- }));
1107
- return h;
1108
- }, [e]), l = Vr(s, n, r), d = l[0], u = l[1], a = Nt(n), g = ee(function(v) {
1109
- return u($({
1110
- props: a.current
1111
- }, v));
1112
- }, [a]), b = t.current;
1113
- return ue(function() {
1114
- var v = ze(o.current, b == null ? void 0 : b.props), x = b && o.current && !i(v, d);
1115
- x && xo(b, v, d), o.current = d;
1116
- }, [d, b, i]), [d, g];
1117
- }
1118
- function No(e, n, r, i) {
1119
- var o = tr(e, n, r, i), t = o[0], s = o[1];
1120
- return [ze(t, n), s];
1121
- }
1122
- var Ae = {
1123
- itemToString: function(n) {
1124
- return n ? String(n) : "";
1125
- },
1126
- itemToKey: function(n) {
1127
- return n;
1128
- },
1129
- stateReducer: wo,
1130
- getA11ySelectionMessage: Eo,
1131
- scrollIntoView: kn,
1132
- environment: (
1133
- /* istanbul ignore next (ssr) */
1134
- typeof window > "u" ? void 0 : window
1135
- )
1136
- };
1137
- function xe(e, n, r) {
1138
- r === void 0 && (r = Zn);
1139
- var i = e["default" + Ot(n)];
1140
- return i !== void 0 ? i : r[n];
1141
- }
1142
- function He(e, n, r) {
1143
- r === void 0 && (r = Zn);
1144
- var i = e[n];
1145
- if (i !== void 0)
1146
- return i;
1147
- var o = e["initial" + Ot(n)];
1148
- return o !== void 0 ? o : xe(e, n, r);
1149
- }
1150
- function Do(e) {
1151
- var n = He(e, "selectedItem"), r = He(e, "isOpen"), i = He(e, "highlightedIndex"), o = He(e, "inputValue");
1152
- return {
1153
- highlightedIndex: i < 0 && n && r ? e.items.findIndex(function(t) {
1154
- return e.itemToKey(t) === e.itemToKey(n);
1155
- }) : i,
1156
- isOpen: r,
1157
- selectedItem: n,
1158
- inputValue: o
1159
- };
1160
- }
1161
- function Ue(e, n, r) {
1162
- var i = e.items, o = e.initialHighlightedIndex, t = e.defaultHighlightedIndex, s = e.itemToKey, l = n.selectedItem, d = n.highlightedIndex;
1163
- return i.length === 0 ? -1 : o !== void 0 && d === o ? o : t !== void 0 ? t : l ? i.findIndex(function(u) {
1164
- return s(l) === s(u);
1165
- }) : r === 0 ? -1 : r < 0 ? i.length - 1 : 0;
1166
- }
1167
- function Ro(e, n, r) {
1168
- var i = Z({
1169
- isMouseDown: !1,
1170
- isTouchMove: !1,
1171
- isTouchEnd: !1
1172
- });
1173
- return ue(function() {
1174
- if (!e)
1175
- return ge;
1176
- var o = n.map(function(a) {
1177
- return a.current;
1178
- });
1179
- function t() {
1180
- i.current.isTouchEnd = !1, i.current.isMouseDown = !0;
1181
- }
1182
- function s(a) {
1183
- i.current.isMouseDown = !1, at(a.target, o, e) || r();
1184
- }
1185
- function l() {
1186
- i.current.isTouchEnd = !1, i.current.isTouchMove = !1;
1187
- }
1188
- function d() {
1189
- i.current.isTouchMove = !0;
1190
- }
1191
- function u(a) {
1192
- i.current.isTouchEnd = !0, !i.current.isTouchMove && !at(a.target, o, e, !1) && r();
1193
- }
1194
- return e.addEventListener("mousedown", t), e.addEventListener("mouseup", s), e.addEventListener("touchstart", l), e.addEventListener("touchmove", d), e.addEventListener("touchend", u), function() {
1195
- e.removeEventListener("mousedown", t), e.removeEventListener("mouseup", s), e.removeEventListener("touchstart", l), e.removeEventListener("touchmove", d), e.removeEventListener("touchend", u);
1196
- };
1197
- }, [e, r]), i.current;
1198
- }
1199
- var Dt = function() {
1200
- return ge;
1201
- };
1202
- process.env.NODE_ENV !== "production" && (Dt = function() {
1203
- for (var n = Z(!0), r = arguments.length, i = new Array(r), o = 0; o < r; o++)
1204
- i[o] = arguments[o];
1205
- var t = Z(i.reduce(function(l, d) {
1206
- return l[d] = {}, l;
1207
- }, {}));
1208
- ue(function() {
1209
- Object.keys(t.current).forEach(function(l) {
1210
- var d = t.current[l];
1211
- if (n.current && !Object.keys(d).length) {
1212
- console.error("downshift: You forgot to call the " + l + " getter function on your component / element.");
1213
- return;
1214
- }
1215
- var u = d.suppressRefError, a = d.refKey, g = d.elementRef;
1216
- (!g || !g.current) && !u && console.error('downshift: The ref prop "' + a + '" from ' + l + " was not applied correctly on your element.");
1217
- }), n.current = !1;
1218
- });
1219
- var s = ee(function(l, d, u, a) {
1220
- t.current[l] = {
1221
- suppressRefError: d,
1222
- refKey: u,
1223
- elementRef: a
1224
- };
1225
- }, []);
1226
- return s;
1227
- });
1228
- function _n(e, n, r) {
1229
- var i = r.highlightedIndex, o = r.items, t = r.environment, s = me(r, yo), l = Ye();
1230
- ue(function() {
1231
- l || !(t != null && t.document) || Co(function() {
1232
- return e($({
1233
- highlightedIndex: i,
1234
- highlightedItem: o[i],
1235
- resultCount: o.length
1236
- }, s));
1237
- }, t.document);
1238
- }, n);
1239
- }
1240
- function Po(e) {
1241
- var n = e.highlightedIndex, r = e.isOpen, i = e.itemRefs, o = e.getItemNodeFromIndex, t = e.menuElement, s = e.scrollIntoView, l = Z(!0);
1242
- return So(function() {
1243
- n < 0 || !r || !Object.keys(i.current).length || (l.current === !1 ? l.current = !0 : s(o(n), t));
1244
- }, [n]), l;
1245
- }
1246
- var Rt = ge;
1247
- process.env.NODE_ENV !== "production" && (Rt = function(n) {
1248
- var r = n.props, i = n.state, o = Z(r), t = Ye();
1249
- ue(function() {
1250
- t || (Ct(i, o.current, r), o.current = r);
1251
- }, [i, r, t]);
1252
- });
1253
- function In(e, n, r) {
1254
- var i;
1255
- r === void 0 && (r = !0);
1256
- var o = ((i = e.items) == null ? void 0 : i.length) && n >= 0;
1257
- return $({
1258
- isOpen: !1,
1259
- highlightedIndex: -1
1260
- }, o && $({
1261
- selectedItem: e.items[n],
1262
- isOpen: xe(e, "isOpen"),
1263
- highlightedIndex: xe(e, "highlightedIndex")
1264
- }, r && {
1265
- inputValue: e.itemToString(e.items[n])
1266
- }));
1267
- }
1268
- function Mo(e, n) {
1269
- return e.isOpen === n.isOpen && e.inputValue === n.inputValue && e.highlightedIndex === n.highlightedIndex && e.selectedItem === n.selectedItem;
1270
- }
1271
- function Ye() {
1272
- var e = it.useRef(!0);
1273
- return it.useEffect(function() {
1274
- return e.current = !1, function() {
1275
- e.current = !0;
1276
- };
1277
- }, []), e.current;
1278
- }
1279
- var nr = {
1280
- environment: _.shape({
1281
- addEventListener: _.func.isRequired,
1282
- removeEventListener: _.func.isRequired,
1283
- document: _.shape({
1284
- createElement: _.func.isRequired,
1285
- getElementById: _.func.isRequired,
1286
- activeElement: _.any.isRequired,
1287
- body: _.any.isRequired
1288
- }).isRequired,
1289
- Node: _.func.isRequired
1290
- }),
1291
- itemToString: _.func,
1292
- itemToKey: _.func,
1293
- stateReducer: _.func
1294
- }, rr = $({}, nr, {
1295
- getA11yStatusMessage: _.func,
1296
- highlightedIndex: _.number,
1297
- defaultHighlightedIndex: _.number,
1298
- initialHighlightedIndex: _.number,
1299
- isOpen: _.bool,
1300
- defaultIsOpen: _.bool,
1301
- initialIsOpen: _.bool,
1302
- selectedItem: _.any,
1303
- initialSelectedItem: _.any,
1304
- defaultSelectedItem: _.any,
1305
- id: _.string,
1306
- labelId: _.string,
1307
- menuId: _.string,
1308
- getItemId: _.func,
1309
- toggleButtonId: _.string,
1310
- onSelectedItemChange: _.func,
1311
- onHighlightedIndexChange: _.func,
1312
- onStateChange: _.func,
1313
- onIsOpenChange: _.func,
1314
- scrollIntoView: _.func
1315
- });
1316
- function ko(e, n, r) {
1317
- var i = n.type, o = n.props, t;
1318
- switch (i) {
1319
- case r.ItemMouseMove:
1320
- t = {
1321
- highlightedIndex: n.disabled ? -1 : n.index
1322
- };
1323
- break;
1324
- case r.MenuMouseLeave:
1325
- t = {
1326
- highlightedIndex: -1
1327
- };
1328
- break;
1329
- case r.ToggleButtonClick:
1330
- case r.FunctionToggleMenu:
1331
- t = {
1332
- isOpen: !e.isOpen,
1333
- highlightedIndex: e.isOpen ? -1 : Ue(o, e, 0)
1334
- };
1335
- break;
1336
- case r.FunctionOpenMenu:
1337
- t = {
1338
- isOpen: !0,
1339
- highlightedIndex: Ue(o, e, 0)
1340
- };
1341
- break;
1342
- case r.FunctionCloseMenu:
1343
- t = {
1344
- isOpen: !1
1345
- };
1346
- break;
1347
- case r.FunctionSetHighlightedIndex:
1348
- t = {
1349
- highlightedIndex: n.highlightedIndex
1350
- };
1351
- break;
1352
- case r.FunctionSetInputValue:
1353
- t = {
1354
- inputValue: n.inputValue
1355
- };
1356
- break;
1357
- case r.FunctionReset:
1358
- t = {
1359
- highlightedIndex: xe(o, "highlightedIndex"),
1360
- isOpen: xe(o, "isOpen"),
1361
- selectedItem: xe(o, "selectedItem"),
1362
- inputValue: xe(o, "inputValue")
1363
- };
1364
- break;
1365
- default:
1366
- throw new Error("Reducer called without proper action type.");
1367
- }
1368
- return $({}, e, t);
1369
- }
1370
- $e($e({}, rr), { items: _.array.isRequired, isItemDisabled: _.func, getA11ySelectionMessage: _.func });
1371
- function To(e) {
1372
- var n = e.isOpen, r = e.resultCount, i = e.previousResultCount;
1373
- return n ? r ? r !== i ? "".concat(r, " result").concat(r === 1 ? " is" : "s are", " available, use up and down arrow keys to navigate. Press Enter or Space Bar keys to select.") : "" : "No results are available." : "";
1374
- }
1375
- $e($e({}, Ae), { getA11yStatusMessage: To, isItemDisabled: function() {
1376
- return !1;
1377
- } });
1378
- process.env.NODE_ENV;
1379
- process.env.NODE_ENV;
1380
- process.env.NODE_ENV;
1381
- process.env.NODE_ENV;
1382
- process.env.NODE_ENV;
1383
- process.env.NODE_ENV;
1384
- process.env.NODE_ENV;
1385
- process.env.NODE_ENV;
1386
- process.env.NODE_ENV;
1387
- process.env.NODE_ENV;
1388
- process.env.NODE_ENV;
1389
- process.env.NODE_ENV;
1390
- process.env.NODE_ENV;
1391
- process.env.NODE_ENV;
1392
- process.env.NODE_ENV;
1393
- process.env.NODE_ENV;
1394
- process.env.NODE_ENV;
1395
- process.env.NODE_ENV;
1396
- process.env.NODE_ENV;
1397
- process.env.NODE_ENV;
1398
- process.env.NODE_ENV;
1399
- process.env.NODE_ENV;
1400
- process.env.NODE_ENV;
1401
- var Pt = process.env.NODE_ENV !== "production" ? "__input_keydown_arrow_down__" : 0, Mt = process.env.NODE_ENV !== "production" ? "__input_keydown_arrow_up__" : 1, kt = process.env.NODE_ENV !== "production" ? "__input_keydown_escape__" : 2, Tt = process.env.NODE_ENV !== "production" ? "__input_keydown_home__" : 3, Vt = process.env.NODE_ENV !== "production" ? "__input_keydown_end__" : 4, At = process.env.NODE_ENV !== "production" ? "__input_keydown_page_up__" : 5, Ht = process.env.NODE_ENV !== "production" ? "__input_keydown_page_down__" : 6, jt = process.env.NODE_ENV !== "production" ? "__input_keydown_enter__" : 7, Kt = process.env.NODE_ENV !== "production" ? "__input_change__" : 8, lt = process.env.NODE_ENV !== "production" ? "__input_blur__" : 9, $t = process.env.NODE_ENV !== "production" ? "__input_click__" : 10, or = process.env.NODE_ENV !== "production" ? "__menu_mouse_leave__" : 11, ir = process.env.NODE_ENV !== "production" ? "__item_mouse_move__" : 12, Ft = process.env.NODE_ENV !== "production" ? "__item_click__" : 13, sr = process.env.NODE_ENV !== "production" ? "__togglebutton_click__" : 14, ar = process.env.NODE_ENV !== "production" ? "__function_toggle_menu__" : 15, lr = process.env.NODE_ENV !== "production" ? "__function_open_menu__" : 16, ur = process.env.NODE_ENV !== "production" ? "__function_close_menu__" : 17, dr = process.env.NODE_ENV !== "production" ? "__function_set_highlighted_index__" : 18, Lt = process.env.NODE_ENV !== "production" ? "__function_select_item__" : 19, cr = process.env.NODE_ENV !== "production" ? "__function_set_input_value__" : 20, pr = process.env.NODE_ENV !== "production" ? "__function_reset__" : 21, Bt = process.env.NODE_ENV !== "production" ? "__controlled_prop_updated_selected_item__" : 22, fr = /* @__PURE__ */ Object.freeze({
1402
- __proto__: null,
1403
- InputKeyDownArrowDown: Pt,
1404
- InputKeyDownArrowUp: Mt,
1405
- InputKeyDownEscape: kt,
1406
- InputKeyDownHome: Tt,
1407
- InputKeyDownEnd: Vt,
1408
- InputKeyDownPageUp: At,
1409
- InputKeyDownPageDown: Ht,
1410
- InputKeyDownEnter: jt,
1411
- InputChange: Kt,
1412
- InputBlur: lt,
1413
- InputClick: $t,
1414
- MenuMouseLeave: or,
1415
- ItemMouseMove: ir,
1416
- ItemClick: Ft,
1417
- ToggleButtonClick: sr,
1418
- FunctionToggleMenu: ar,
1419
- FunctionOpenMenu: lr,
1420
- FunctionCloseMenu: ur,
1421
- FunctionSetHighlightedIndex: dr,
1422
- FunctionSelectItem: Lt,
1423
- FunctionSetInputValue: cr,
1424
- FunctionReset: pr,
1425
- ControlledPropUpdatedSelectedItem: Bt
1426
- });
1427
- function Vo(e) {
1428
- var n = Do(e), r = n.selectedItem, i = n.inputValue;
1429
- return i === "" && r && e.defaultInputValue === void 0 && e.initialInputValue === void 0 && e.inputValue === void 0 && (i = e.itemToString(r)), $({}, n, {
1430
- inputValue: i
1431
- });
1432
- }
1433
- var Ao = $({}, rr, {
1434
- items: _.array.isRequired,
1435
- isItemDisabled: _.func,
1436
- selectedItemChanged: _.func,
1437
- getA11ySelectionMessage: _.func,
1438
- inputValue: _.string,
1439
- defaultInputValue: _.string,
1440
- initialInputValue: _.string,
1441
- inputId: _.string,
1442
- onInputValueChange: _.func
1443
- });
1444
- function Ho(e, n, r, i) {
1445
- var o = Z(), t = tr(e, n, r, i), s = t[0], l = t[1], d = Ye();
1446
- return ue(function() {
1447
- if (st(n, "selectedItem")) {
1448
- if (!d) {
1449
- var u;
1450
- n.selectedItemChanged === void 0 ? u = n.itemToKey(n.selectedItem) !== n.itemToKey(o.current) : (console.warn('The "selectedItemChanged" is deprecated. Please use "itemToKey instead". https://github.com/downshift-js/downshift/blob/master/src/hooks/useCombobox/README.md#selecteditemchanged'), u = n.selectedItemChanged(o.current, n.selectedItem)), u && l({
1451
- type: Bt,
1452
- inputValue: n.itemToString(n.selectedItem)
1453
- });
1454
- }
1455
- o.current = s.selectedItem === o.current ? n.selectedItem : s.selectedItem;
1456
- }
1457
- }, [s.selectedItem, n.selectedItem]), [ze(s, n), l];
1458
- }
1459
- var hr = ge;
1460
- process.env.NODE_ENV !== "production" && (hr = function(n, r) {
1461
- _.checkPropTypes(Ao, n, "prop", r.name);
1462
- });
1463
- var jo = $({}, Ae, {
1464
- getA11yStatusMessage: Vn,
1465
- isItemDisabled: function() {
1466
- return !1;
1467
- }
1468
- });
1469
- function Ko(e, n) {
1470
- var r, i = n.type, o = n.props, t = n.altKey, s;
1471
- switch (i) {
1472
- case Ft:
1473
- s = {
1474
- isOpen: xe(o, "isOpen"),
1475
- highlightedIndex: xe(o, "highlightedIndex"),
1476
- selectedItem: o.items[n.index],
1477
- inputValue: o.itemToString(o.items[n.index])
1478
- };
1479
- break;
1480
- case Pt:
1481
- e.isOpen ? s = {
1482
- highlightedIndex: Pe(e.highlightedIndex, 1, o.items, o.isItemDisabled, !0)
1483
- } : s = {
1484
- highlightedIndex: t && e.selectedItem == null ? -1 : Ue(o, e, 1),
1485
- isOpen: o.items.length >= 0
1486
- };
1487
- break;
1488
- case Mt:
1489
- e.isOpen ? t ? s = In(o, e.highlightedIndex) : s = {
1490
- highlightedIndex: Pe(e.highlightedIndex, -1, o.items, o.isItemDisabled, !0)
1491
- } : s = {
1492
- highlightedIndex: Ue(o, e, -1),
1493
- isOpen: o.items.length >= 0
1494
- };
1495
- break;
1496
- case jt:
1497
- s = In(o, e.highlightedIndex);
1498
- break;
1499
- case kt:
1500
- s = $({
1501
- isOpen: !1,
1502
- highlightedIndex: -1
1503
- }, !e.isOpen && {
1504
- selectedItem: null,
1505
- inputValue: ""
1506
- });
1507
- break;
1508
- case At:
1509
- s = {
1510
- highlightedIndex: Pe(e.highlightedIndex, -10, o.items, o.isItemDisabled, !0)
1511
- };
1512
- break;
1513
- case Ht:
1514
- s = {
1515
- highlightedIndex: Pe(e.highlightedIndex, 10, o.items, o.isItemDisabled, !0)
1516
- };
1517
- break;
1518
- case Tt:
1519
- s = {
1520
- highlightedIndex: Fe(0, !1, o.items, o.isItemDisabled)
1521
- };
1522
- break;
1523
- case Vt:
1524
- s = {
1525
- highlightedIndex: Fe(o.items.length - 1, !0, o.items, o.isItemDisabled)
1526
- };
1527
- break;
1528
- case lt:
1529
- s = $({
1530
- isOpen: !1,
1531
- highlightedIndex: -1
1532
- }, e.highlightedIndex >= 0 && ((r = o.items) == null ? void 0 : r.length) && n.selectItem && {
1533
- selectedItem: o.items[e.highlightedIndex],
1534
- inputValue: o.itemToString(o.items[e.highlightedIndex])
1535
- });
1536
- break;
1537
- case Kt:
1538
- s = {
1539
- isOpen: !0,
1540
- highlightedIndex: xe(o, "highlightedIndex"),
1541
- inputValue: n.inputValue
1542
- };
1543
- break;
1544
- case $t:
1545
- s = {
1546
- isOpen: !e.isOpen,
1547
- highlightedIndex: e.isOpen ? -1 : Ue(o, e, 0)
1548
- };
1549
- break;
1550
- case Lt:
1551
- s = {
1552
- selectedItem: n.selectedItem,
1553
- inputValue: o.itemToString(n.selectedItem)
1554
- };
1555
- break;
1556
- case Bt:
1557
- s = {
1558
- inputValue: n.inputValue
1559
- };
1560
- break;
1561
- default:
1562
- return ko(e, n, fr);
1563
- }
1564
- return $({}, e, s);
1565
- }
1566
- var $o = ["onMouseLeave", "refKey", "ref"], Fo = ["item", "index", "refKey", "ref", "onMouseMove", "onMouseDown", "onClick", "onPress", "disabled"], Lo = ["onClick", "onPress", "refKey", "ref"], Bo = ["onKeyDown", "onChange", "onInput", "onBlur", "onChangeText", "onClick", "refKey", "ref"];
1567
- he.stateChangeTypes = fr;
1568
- function he(e) {
1569
- e === void 0 && (e = {}), hr(e, he);
1570
- var n = $({}, jo, e), r = n.items, i = n.scrollIntoView, o = n.environment, t = n.getA11yStatusMessage, s = n.getA11ySelectionMessage, l = n.itemToString, d = Ho(Ko, n, Vo, Mo), u = d[0], a = d[1], g = u.isOpen, b = u.highlightedIndex, v = u.selectedItem, x = u.inputValue, O = Z(null), h = Z({}), D = Z(null), c = Z(null), f = Ye(), p = Oo(n), I = Z(), m = Nt({
1571
- state: u,
1572
- props: n
1573
- }), N = ee(function(P) {
1574
- return h.current[p.getItemId(P)];
1575
- }, [p]);
1576
- _n(t, [g, b, x, r], $({
1577
- previousResultCount: I.current,
1578
- items: r,
1579
- environment: o,
1580
- itemToString: l
1581
- }, u)), _n(s, [v], $({
1582
- previousResultCount: I.current,
1583
- items: r,
1584
- environment: o,
1585
- itemToString: l
1586
- }, u));
1587
- var C = Po({
1588
- menuElement: O.current,
1589
- highlightedIndex: b,
1590
- isOpen: g,
1591
- itemRefs: h,
1592
- scrollIntoView: i,
1593
- getItemNodeFromIndex: N
1594
- });
1595
- Rt({
1596
- props: n,
1597
- state: u
1598
- }), ue(function() {
1599
- var P = He(n, "isOpen");
1600
- P && D.current && D.current.focus();
1601
- }, []), ue(function() {
1602
- f || (I.current = r.length);
1603
- });
1604
- var H = Ro(o, [c, O, D], ee(function() {
1605
- m.current.state.isOpen && a({
1606
- type: lt,
1607
- selectItem: !1
1608
- });
1609
- }, [a, m])), M = Dt("getInputProps", "getMenuProps");
1610
- ue(function() {
1611
- g || (h.current = {});
1612
- }, [g]), ue(function() {
1613
- var P;
1614
- !g || !(o != null && o.document) || !(D != null && (P = D.current) != null && P.focus) || o.document.activeElement !== D.current && D.current.focus();
1615
- }, [g, o]);
1616
- var S = Ke(function() {
1617
- return {
1618
- ArrowDown: function(k) {
1619
- k.preventDefault(), a({
1620
- type: Pt,
1621
- altKey: k.altKey
1622
- });
1623
- },
1624
- ArrowUp: function(k) {
1625
- k.preventDefault(), a({
1626
- type: Mt,
1627
- altKey: k.altKey
1628
- });
1629
- },
1630
- Home: function(k) {
1631
- m.current.state.isOpen && (k.preventDefault(), a({
1632
- type: Tt
1633
- }));
1634
- },
1635
- End: function(k) {
1636
- m.current.state.isOpen && (k.preventDefault(), a({
1637
- type: Vt
1638
- }));
1639
- },
1640
- Escape: function(k) {
1641
- var w = m.current.state;
1642
- (w.isOpen || w.inputValue || w.selectedItem || w.highlightedIndex > -1) && (k.preventDefault(), a({
1643
- type: kt
1644
- }));
1645
- },
1646
- Enter: function(k) {
1647
- var w = m.current.state;
1648
- !w.isOpen || k.which === 229 || (k.preventDefault(), a({
1649
- type: jt
1650
- }));
1651
- },
1652
- PageUp: function(k) {
1653
- m.current.state.isOpen && (k.preventDefault(), a({
1654
- type: At
1655
- }));
1656
- },
1657
- PageDown: function(k) {
1658
- m.current.state.isOpen && (k.preventDefault(), a({
1659
- type: Ht
1660
- }));
1661
- }
1662
- };
1663
- }, [a, m]), R = ee(function(P) {
1664
- return $({
1665
- id: p.labelId,
1666
- htmlFor: p.inputId
1667
- }, P);
1668
- }, [p]), V = ee(function(P, k) {
1669
- var w, T = P === void 0 ? {} : P, L = T.onMouseLeave, W = T.refKey, F = W === void 0 ? "ref" : W, se = T.ref, ae = me(T, $o), le = k === void 0 ? {} : k, E = le.suppressRefError, fe = E === void 0 ? !1 : E;
1670
- return M("getMenuProps", fe, F, O), $((w = {}, w[F] = De(se, function(ie) {
1671
- O.current = ie;
1672
- }), w.id = p.menuId, w.role = "listbox", w["aria-labelledby"] = ae && ae["aria-label"] ? void 0 : "" + p.labelId, w.onMouseLeave = re(L, function() {
1673
- a({
1674
- type: or
1675
- });
1676
- }), w), ae);
1677
- }, [a, M, p]), j = ee(function(P) {
1678
- var k, w, T = P === void 0 ? {} : P, L = T.item, W = T.index, F = T.refKey, se = F === void 0 ? "ref" : F, ae = T.ref, le = T.onMouseMove, E = T.onMouseDown, fe = T.onClick;
1679
- T.onPress;
1680
- var ie = T.disabled, Te = me(T, Fo);
1681
- ie !== void 0 && console.warn('Passing "disabled" as an argument to getItemProps is not supported anymore. Please use the isItemDisabled prop from useCombobox.');
1682
- var Le = m.current, Je = Le.props, be = Le.state, Qe = er(L, W, Je.items, "Pass either item or index to getItemProps!"), ct = Qe[0], we = Qe[1], Be = Je.isItemDisabled(ct, we), pt = "onClick", Ze = fe, Se = function() {
1683
- H.isTouchEnd || we === be.highlightedIndex || (C.current = !1, a({
1684
- type: ir,
1685
- index: we,
1686
- disabled: Be
1687
- }));
1688
- }, Re = function() {
1689
- a({
1690
- type: Ft,
1691
- index: we
1692
- });
1693
- }, Oe = function(Cr) {
1694
- return Cr.preventDefault();
1695
- };
1696
- return $((k = {}, k[se] = De(ae, function(Ie) {
1697
- Ie && (h.current[p.getItemId(we)] = Ie);
1698
- }), k["aria-disabled"] = Be, k["aria-selected"] = "" + (we === be.highlightedIndex), k.id = p.getItemId(we), k.role = "option", k), !Be && (w = {}, w[pt] = re(Ze, Re), w), {
1699
- onMouseMove: re(le, Se),
1700
- onMouseDown: re(E, Oe)
1701
- }, Te);
1702
- }, [a, p, m, H, C]), B = ee(function(P) {
1703
- var k, w = P === void 0 ? {} : P, T = w.onClick;
1704
- w.onPress;
1705
- var L = w.refKey, W = L === void 0 ? "ref" : L, F = w.ref, se = me(w, Lo), ae = m.current.state, le = function() {
1706
- a({
1707
- type: sr
1708
- });
1709
- };
1710
- return $((k = {}, k[W] = De(F, function(E) {
1711
- c.current = E;
1712
- }), k["aria-controls"] = p.menuId, k["aria-expanded"] = ae.isOpen, k.id = p.toggleButtonId, k.tabIndex = -1, k), !se.disabled && $({}, {
1713
- onClick: re(T, le)
1714
- }), se);
1715
- }, [a, m, p]), U = ee(function(P, k) {
1716
- var w, T = P === void 0 ? {} : P, L = T.onKeyDown, W = T.onChange, F = T.onInput, se = T.onBlur;
1717
- T.onChangeText;
1718
- var ae = T.onClick, le = T.refKey, E = le === void 0 ? "ref" : le, fe = T.ref, ie = me(T, Bo), Te = k === void 0 ? {} : k, Le = Te.suppressRefError, Je = Le === void 0 ? !1 : Le;
1719
- M("getInputProps", Je, E, D);
1720
- var be = m.current.state, Qe = function(Oe) {
1721
- var Ie = We(Oe);
1722
- Ie && S[Ie] && S[Ie](Oe);
1723
- }, ct = function(Oe) {
1724
- a({
1725
- type: Kt,
1726
- inputValue: Oe.target.value
1727
- });
1728
- }, we = function(Oe) {
1729
- if (o != null && o.document && be.isOpen && !H.isMouseDown) {
1730
- var Ie = Oe.relatedTarget === null && o.document.activeElement !== o.document.body;
1731
- a({
1732
- type: lt,
1733
- selectItem: !Ie
1734
- });
1735
- }
1736
- }, Be = function() {
1737
- a({
1738
- type: $t
1739
- });
1740
- }, pt = "onChange", Ze = {};
1741
- if (!ie.disabled) {
1742
- var Se;
1743
- Ze = (Se = {}, Se[pt] = re(W, F, ct), Se.onKeyDown = re(L, Qe), Se.onBlur = re(se, we), Se.onClick = re(ae, Be), Se);
1744
- }
1745
- return $((w = {}, w[E] = De(fe, function(Re) {
1746
- D.current = Re;
1747
- }), w["aria-activedescendant"] = be.isOpen && be.highlightedIndex > -1 ? p.getItemId(be.highlightedIndex) : "", w["aria-autocomplete"] = "list", w["aria-controls"] = p.menuId, w["aria-expanded"] = be.isOpen, w["aria-labelledby"] = ie && ie["aria-label"] ? void 0 : p.labelId, w.autoComplete = "off", w.id = p.inputId, w.role = "combobox", w.value = be.inputValue, w), Ze, ie);
1748
- }, [a, p, o, S, m, H, M]), K = ee(function() {
1749
- a({
1750
- type: ar
1751
- });
1752
- }, [a]), J = ee(function() {
1753
- a({
1754
- type: ur
1755
- });
1756
- }, [a]), Q = ee(function() {
1757
- a({
1758
- type: lr
1759
- });
1760
- }, [a]), A = ee(function(P) {
1761
- a({
1762
- type: dr,
1763
- highlightedIndex: P
1764
- });
1765
- }, [a]), z = ee(function(P) {
1766
- a({
1767
- type: Lt,
1768
- selectedItem: P
1769
- });
1770
- }, [a]), q = ee(function(P) {
1771
- a({
1772
- type: cr,
1773
- inputValue: P
1774
- });
1775
- }, [a]), oe = ee(function() {
1776
- a({
1777
- type: pr
1778
- });
1779
- }, [a]);
1780
- return {
1781
- // prop getters.
1782
- getItemProps: j,
1783
- getLabelProps: R,
1784
- getMenuProps: V,
1785
- getInputProps: U,
1786
- getToggleButtonProps: B,
1787
- // actions.
1788
- toggleMenu: K,
1789
- openMenu: Q,
1790
- closeMenu: J,
1791
- setHighlightedIndex: A,
1792
- setInputValue: q,
1793
- selectItem: z,
1794
- reset: oe,
1795
- // state.
1796
- highlightedIndex: b,
1797
- isOpen: g,
1798
- selectedItem: v,
1799
- inputValue: x
1800
- };
1801
- }
1802
- var gr = {
1803
- activeIndex: -1,
1804
- selectedItems: []
1805
- };
1806
- function yn(e, n) {
1807
- return He(e, n, gr);
1808
- }
1809
- function xn(e, n) {
1810
- return xe(e, n, gr);
1811
- }
1812
- function Uo(e) {
1813
- var n = yn(e, "activeIndex"), r = yn(e, "selectedItems");
1814
- return {
1815
- activeIndex: n,
1816
- selectedItems: r
1817
- };
1818
- }
1819
- function bn(e) {
1820
- if (e.shiftKey || e.metaKey || e.ctrlKey || e.altKey)
1821
- return !1;
1822
- var n = e.target;
1823
- return !(n instanceof HTMLInputElement && // if element is a text input
1824
- n.value !== "" && // and we have text in it
1825
- // and cursor is either not at the start or is currently highlighting text.
1826
- (n.selectionStart !== 0 || n.selectionEnd !== 0));
1827
- }
1828
- function zo(e) {
1829
- var n = e.removedSelectedItem, r = e.itemToString;
1830
- return r(n) + " has been removed.";
1831
- }
1832
- function Wo(e, n) {
1833
- return e.selectedItems === n.selectedItems && e.activeIndex === n.activeIndex;
1834
- }
1835
- var qo = $({}, nr, {
1836
- selectedItems: _.array,
1837
- initialSelectedItems: _.array,
1838
- defaultSelectedItems: _.array,
1839
- getA11yRemovalMessage: _.func,
1840
- activeIndex: _.number,
1841
- initialActiveIndex: _.number,
1842
- defaultActiveIndex: _.number,
1843
- onActiveIndexChange: _.func,
1844
- onSelectedItemsChange: _.func,
1845
- keyNavigationNext: _.string,
1846
- keyNavigationPrevious: _.string
1847
- }), Yo = {
1848
- itemToString: Ae.itemToString,
1849
- itemToKey: Ae.itemToKey,
1850
- stateReducer: Ae.stateReducer,
1851
- environment: Ae.environment,
1852
- getA11yRemovalMessage: zo,
1853
- keyNavigationNext: "ArrowRight",
1854
- keyNavigationPrevious: "ArrowLeft"
1855
- }, mr = ge;
1856
- process.env.NODE_ENV !== "production" && (mr = function(n, r) {
1857
- _.checkPropTypes(qo, n, "prop", r.name);
1858
- });
1859
- var Ut = process.env.NODE_ENV !== "production" ? "__selected_item_click__" : 0, zt = process.env.NODE_ENV !== "production" ? "__selected_item_keydown_delete__" : 1, Wt = process.env.NODE_ENV !== "production" ? "__selected_item_keydown_backspace__" : 2, qt = process.env.NODE_ENV !== "production" ? "__selected_item_keydown_navigation_next__" : 3, Yt = process.env.NODE_ENV !== "production" ? "__selected_item_keydown_navigation_previous__" : 4, Gt = process.env.NODE_ENV !== "production" ? "__dropdown_keydown_navigation_previous__" : 5, Xt = process.env.NODE_ENV !== "production" ? "__dropdown_keydown_backspace__" : 6, Jt = process.env.NODE_ENV !== "production" ? "__dropdown_click__" : 7, Qt = process.env.NODE_ENV !== "production" ? "__function_add_selected_item__" : 8, Zt = process.env.NODE_ENV !== "production" ? "__function_remove_selected_item__" : 9, en = process.env.NODE_ENV !== "production" ? "__function_set_selected_items__" : 10, tn = process.env.NODE_ENV !== "production" ? "__function_set_active_index__" : 11, nn = process.env.NODE_ENV !== "production" ? "__function_reset__" : 12, Go = /* @__PURE__ */ Object.freeze({
1860
- __proto__: null,
1861
- SelectedItemClick: Ut,
1862
- SelectedItemKeyDownDelete: zt,
1863
- SelectedItemKeyDownBackspace: Wt,
1864
- SelectedItemKeyDownNavigationNext: qt,
1865
- SelectedItemKeyDownNavigationPrevious: Yt,
1866
- DropdownKeyDownNavigationPrevious: Gt,
1867
- DropdownKeyDownBackspace: Xt,
1868
- DropdownClick: Jt,
1869
- FunctionAddSelectedItem: Qt,
1870
- FunctionRemoveSelectedItem: Zt,
1871
- FunctionSetSelectedItems: en,
1872
- FunctionSetActiveIndex: tn,
1873
- FunctionReset: nn
1874
- });
1875
- function Xo(e, n) {
1876
- var r = n.type, i = n.index, o = n.props, t = n.selectedItem, s = e.activeIndex, l = e.selectedItems, d;
1877
- switch (r) {
1878
- case Ut:
1879
- d = {
1880
- activeIndex: i
1881
- };
1882
- break;
1883
- case Yt:
1884
- d = {
1885
- activeIndex: s - 1 < 0 ? 0 : s - 1
1886
- };
1887
- break;
1888
- case qt:
1889
- d = {
1890
- activeIndex: s + 1 >= l.length ? -1 : s + 1
1891
- };
1892
- break;
1893
- case Wt:
1894
- case zt: {
1895
- if (s < 0)
1896
- break;
1897
- var u = s;
1898
- l.length === 1 ? u = -1 : s === l.length - 1 && (u = l.length - 2), d = $({
1899
- selectedItems: [].concat(l.slice(0, s), l.slice(s + 1))
1900
- }, {
1901
- activeIndex: u
1902
- });
1903
- break;
1904
- }
1905
- case Gt:
1906
- d = {
1907
- activeIndex: l.length - 1
1908
- };
1909
- break;
1910
- case Xt:
1911
- d = {
1912
- selectedItems: l.slice(0, l.length - 1)
1913
- };
1914
- break;
1915
- case Qt:
1916
- d = {
1917
- selectedItems: [].concat(l, [t])
1918
- };
1919
- break;
1920
- case Jt:
1921
- d = {
1922
- activeIndex: -1
1923
- };
1924
- break;
1925
- case Zt: {
1926
- var a = s, g = l.findIndex(function(x) {
1927
- return o.itemToKey(x) === o.itemToKey(t);
1928
- });
1929
- if (g < 0)
1930
- break;
1931
- l.length === 1 ? a = -1 : g === l.length - 1 && (a = l.length - 2), d = {
1932
- selectedItems: [].concat(l.slice(0, g), l.slice(g + 1)),
1933
- activeIndex: a
1934
- };
1935
- break;
1936
- }
1937
- case en: {
1938
- var b = n.selectedItems;
1939
- d = {
1940
- selectedItems: b
1941
- };
1942
- break;
1943
- }
1944
- case tn: {
1945
- var v = n.activeIndex;
1946
- d = {
1947
- activeIndex: v
1948
- };
1949
- break;
1950
- }
1951
- case nn:
1952
- d = {
1953
- activeIndex: xn(o, "activeIndex"),
1954
- selectedItems: xn(o, "selectedItems")
1955
- };
1956
- break;
1957
- default:
1958
- throw new Error("Reducer called without proper action type.");
1959
- }
1960
- return $({}, e, d);
1961
- }
1962
- var Jo = ["refKey", "ref", "onClick", "onKeyDown", "selectedItem", "index"], Qo = ["refKey", "ref", "onKeyDown", "onClick", "preventKeyAction"];
1963
- Ne.stateChangeTypes = Go;
1964
- function Ne(e) {
1965
- e === void 0 && (e = {}), mr(e, Ne);
1966
- var n = $({}, Yo, e), r = n.getA11yRemovalMessage, i = n.itemToString, o = n.environment, t = n.keyNavigationNext, s = n.keyNavigationPrevious, l = No(Xo, n, Uo, Wo), d = l[0], u = l[1], a = d.activeIndex, g = d.selectedItems, b = Ye(), v = Z(null), x = Z(g), O = Z();
1967
- O.current = [];
1968
- var h = Nt({
1969
- state: d,
1970
- props: n
1971
- });
1972
- ue(function() {
1973
- if (!(b || !(o != null && o.document))) {
1974
- if (g.length < x.current.length) {
1975
- var S = x.current.find(function(R) {
1976
- return g.findIndex(function(V) {
1977
- return n.itemToKey(V) === n.itemToKey(R);
1978
- }) < 0;
1979
- });
1980
- St(r({
1981
- itemToString: i,
1982
- resultCount: g.length,
1983
- removedSelectedItem: S,
1984
- activeIndex: a,
1985
- activeSelectedItem: g[a]
1986
- }), o.document);
1987
- }
1988
- x.current = g;
1989
- }
1990
- }, [g.length]), ue(function() {
1991
- b || (a === -1 && v.current ? v.current.focus() : O.current[a] && O.current[a].focus());
1992
- }, [a]), Rt({
1993
- props: n,
1994
- state: d
1995
- });
1996
- var D = Dt("getDropdownProps"), c = Ke(function() {
1997
- var S;
1998
- return S = {}, S[s] = function() {
1999
- u({
2000
- type: Yt
2001
- });
2002
- }, S[t] = function() {
2003
- u({
2004
- type: qt
2005
- });
2006
- }, S.Delete = function() {
2007
- u({
2008
- type: zt
2009
- });
2010
- }, S.Backspace = function() {
2011
- u({
2012
- type: Wt
2013
- });
2014
- }, S;
2015
- }, [u, t, s]), f = Ke(function() {
2016
- var S;
2017
- return S = {}, S[s] = function(R) {
2018
- bn(R) && u({
2019
- type: Gt
2020
- });
2021
- }, S.Backspace = function(V) {
2022
- bn(V) && u({
2023
- type: Xt
2024
- });
2025
- }, S;
2026
- }, [u, s]), p = ee(function(S) {
2027
- var R, V = S === void 0 ? {} : S, j = V.refKey, B = j === void 0 ? "ref" : j, U = V.ref, K = V.onClick, J = V.onKeyDown, Q = V.selectedItem, A = V.index, z = me(V, Jo), q = h.current.state, oe = er(Q, A, q.selectedItems, "Pass either item or index to getSelectedItemProps!"), P = oe[1], k = P > -1 && P === q.activeIndex, w = function() {
2028
- u({
2029
- type: Ut,
2030
- index: P
2031
- });
2032
- }, T = function(W) {
2033
- var F = We(W);
2034
- F && c[F] && c[F](W);
2035
- };
2036
- return $((R = {}, R[B] = De(U, function(L) {
2037
- L && O.current.push(L);
2038
- }), R.tabIndex = k ? 0 : -1, R.onClick = re(K, w), R.onKeyDown = re(J, T), R), z);
2039
- }, [u, h, c]), I = ee(function(S, R) {
2040
- var V, j = S === void 0 ? {} : S, B = j.refKey, U = B === void 0 ? "ref" : B, K = j.ref, J = j.onKeyDown, Q = j.onClick, A = j.preventKeyAction, z = A === void 0 ? !1 : A, q = me(j, Qo), oe = R === void 0 ? {} : R, P = oe.suppressRefError, k = P === void 0 ? !1 : P;
2041
- D("getDropdownProps", k, U, v);
2042
- var w = function(W) {
2043
- var F = We(W);
2044
- F && f[F] && f[F](W);
2045
- }, T = function() {
2046
- u({
2047
- type: Jt
2048
- });
2049
- };
2050
- return $((V = {}, V[U] = De(K, function(L) {
2051
- L && (v.current = L);
2052
- }), V), !z && {
2053
- onKeyDown: re(J, w),
2054
- onClick: re(Q, T)
2055
- }, q);
2056
- }, [u, f, D]), m = ee(function(S) {
2057
- u({
2058
- type: Qt,
2059
- selectedItem: S
2060
- });
2061
- }, [u]), N = ee(function(S) {
2062
- u({
2063
- type: Zt,
2064
- selectedItem: S
2065
- });
2066
- }, [u]), C = ee(function(S) {
2067
- u({
2068
- type: en,
2069
- selectedItems: S
2070
- });
2071
- }, [u]), H = ee(function(S) {
2072
- u({
2073
- type: tn,
2074
- activeIndex: S
2075
- });
2076
- }, [u]), M = ee(function() {
2077
- u({
2078
- type: nn
2079
- });
2080
- }, [u]);
2081
- return {
2082
- getSelectedItemProps: p,
2083
- getDropdownProps: I,
2084
- addSelectedItem: m,
2085
- removeSelectedItem: N,
2086
- setSelectedItems: C,
2087
- setActiveIndex: H,
2088
- reset: M,
2089
- selectedItems: g,
2090
- activeIndex: a
2091
- };
2092
- }
2093
- var ut = { exports: {} }, vr = {
2094
- À: "A",
2095
- Á: "A",
2096
- Â: "A",
2097
- Ã: "A",
2098
- Ä: "A",
2099
- Å: "A",
2100
- Ấ: "A",
2101
- Ắ: "A",
2102
- Ẳ: "A",
2103
- Ẵ: "A",
2104
- Ặ: "A",
2105
- Æ: "AE",
2106
- Ầ: "A",
2107
- Ằ: "A",
2108
- Ȃ: "A",
2109
- Ả: "A",
2110
- Ạ: "A",
2111
- Ẩ: "A",
2112
- Ẫ: "A",
2113
- Ậ: "A",
2114
- Ç: "C",
2115
- Ḉ: "C",
2116
- È: "E",
2117
- É: "E",
2118
- Ê: "E",
2119
- Ë: "E",
2120
- Ế: "E",
2121
- Ḗ: "E",
2122
- Ề: "E",
2123
- Ḕ: "E",
2124
- Ḝ: "E",
2125
- Ȇ: "E",
2126
- Ẻ: "E",
2127
- Ẽ: "E",
2128
- Ẹ: "E",
2129
- Ể: "E",
2130
- Ễ: "E",
2131
- Ệ: "E",
2132
- Ì: "I",
2133
- Í: "I",
2134
- Î: "I",
2135
- Ï: "I",
2136
- Ḯ: "I",
2137
- Ȋ: "I",
2138
- Ỉ: "I",
2139
- Ị: "I",
2140
- Ð: "D",
2141
- Ñ: "N",
2142
- Ò: "O",
2143
- Ó: "O",
2144
- Ô: "O",
2145
- Õ: "O",
2146
- Ö: "O",
2147
- Ø: "O",
2148
- Ố: "O",
2149
- Ṍ: "O",
2150
- Ṓ: "O",
2151
- Ȏ: "O",
2152
- Ỏ: "O",
2153
- Ọ: "O",
2154
- Ổ: "O",
2155
- Ỗ: "O",
2156
- Ộ: "O",
2157
- Ờ: "O",
2158
- Ở: "O",
2159
- Ỡ: "O",
2160
- Ớ: "O",
2161
- Ợ: "O",
2162
- Ù: "U",
2163
- Ú: "U",
2164
- Û: "U",
2165
- Ü: "U",
2166
- Ủ: "U",
2167
- Ụ: "U",
2168
- Ử: "U",
2169
- Ữ: "U",
2170
- Ự: "U",
2171
- Ý: "Y",
2172
- à: "a",
2173
- á: "a",
2174
- â: "a",
2175
- ã: "a",
2176
- ä: "a",
2177
- å: "a",
2178
- ấ: "a",
2179
- ắ: "a",
2180
- ẳ: "a",
2181
- ẵ: "a",
2182
- ặ: "a",
2183
- æ: "ae",
2184
- ầ: "a",
2185
- ằ: "a",
2186
- ȃ: "a",
2187
- ả: "a",
2188
- ạ: "a",
2189
- ẩ: "a",
2190
- ẫ: "a",
2191
- ậ: "a",
2192
- ç: "c",
2193
- ḉ: "c",
2194
- è: "e",
2195
- é: "e",
2196
- ê: "e",
2197
- ë: "e",
2198
- ế: "e",
2199
- ḗ: "e",
2200
- ề: "e",
2201
- ḕ: "e",
2202
- ḝ: "e",
2203
- ȇ: "e",
2204
- ẻ: "e",
2205
- ẽ: "e",
2206
- ẹ: "e",
2207
- ể: "e",
2208
- ễ: "e",
2209
- ệ: "e",
2210
- ì: "i",
2211
- í: "i",
2212
- î: "i",
2213
- ï: "i",
2214
- ḯ: "i",
2215
- ȋ: "i",
2216
- ỉ: "i",
2217
- ị: "i",
2218
- ð: "d",
2219
- ñ: "n",
2220
- ò: "o",
2221
- ó: "o",
2222
- ô: "o",
2223
- õ: "o",
2224
- ö: "o",
2225
- ø: "o",
2226
- ố: "o",
2227
- ṍ: "o",
2228
- ṓ: "o",
2229
- ȏ: "o",
2230
- ỏ: "o",
2231
- ọ: "o",
2232
- ổ: "o",
2233
- ỗ: "o",
2234
- ộ: "o",
2235
- ờ: "o",
2236
- ở: "o",
2237
- ỡ: "o",
2238
- ớ: "o",
2239
- ợ: "o",
2240
- ù: "u",
2241
- ú: "u",
2242
- û: "u",
2243
- ü: "u",
2244
- ủ: "u",
2245
- ụ: "u",
2246
- ử: "u",
2247
- ữ: "u",
2248
- ự: "u",
2249
- ý: "y",
2250
- ÿ: "y",
2251
- Ā: "A",
2252
- ā: "a",
2253
- Ă: "A",
2254
- ă: "a",
2255
- Ą: "A",
2256
- ą: "a",
2257
- Ć: "C",
2258
- ć: "c",
2259
- Ĉ: "C",
2260
- ĉ: "c",
2261
- Ċ: "C",
2262
- ċ: "c",
2263
- Č: "C",
2264
- č: "c",
2265
- C̆: "C",
2266
- c̆: "c",
2267
- Ď: "D",
2268
- ď: "d",
2269
- Đ: "D",
2270
- đ: "d",
2271
- Ē: "E",
2272
- ē: "e",
2273
- Ĕ: "E",
2274
- ĕ: "e",
2275
- Ė: "E",
2276
- ė: "e",
2277
- Ę: "E",
2278
- ę: "e",
2279
- Ě: "E",
2280
- ě: "e",
2281
- Ĝ: "G",
2282
- Ǵ: "G",
2283
- ĝ: "g",
2284
- ǵ: "g",
2285
- Ğ: "G",
2286
- ğ: "g",
2287
- Ġ: "G",
2288
- ġ: "g",
2289
- Ģ: "G",
2290
- ģ: "g",
2291
- Ĥ: "H",
2292
- ĥ: "h",
2293
- Ħ: "H",
2294
- ħ: "h",
2295
- Ḫ: "H",
2296
- ḫ: "h",
2297
- Ĩ: "I",
2298
- ĩ: "i",
2299
- Ī: "I",
2300
- ī: "i",
2301
- Ĭ: "I",
2302
- ĭ: "i",
2303
- Į: "I",
2304
- į: "i",
2305
- İ: "I",
2306
- ı: "i",
2307
- IJ: "IJ",
2308
- ij: "ij",
2309
- Ĵ: "J",
2310
- ĵ: "j",
2311
- Ķ: "K",
2312
- ķ: "k",
2313
- Ḱ: "K",
2314
- ḱ: "k",
2315
- K̆: "K",
2316
- k̆: "k",
2317
- Ĺ: "L",
2318
- ĺ: "l",
2319
- Ļ: "L",
2320
- ļ: "l",
2321
- Ľ: "L",
2322
- ľ: "l",
2323
- Ŀ: "L",
2324
- ŀ: "l",
2325
- Ł: "l",
2326
- ł: "l",
2327
- Ḿ: "M",
2328
- ḿ: "m",
2329
- M̆: "M",
2330
- m̆: "m",
2331
- Ń: "N",
2332
- ń: "n",
2333
- Ņ: "N",
2334
- ņ: "n",
2335
- Ň: "N",
2336
- ň: "n",
2337
- ʼn: "n",
2338
- N̆: "N",
2339
- n̆: "n",
2340
- Ō: "O",
2341
- ō: "o",
2342
- Ŏ: "O",
2343
- ŏ: "o",
2344
- Ő: "O",
2345
- ő: "o",
2346
- Œ: "OE",
2347
- œ: "oe",
2348
- P̆: "P",
2349
- p̆: "p",
2350
- Ŕ: "R",
2351
- ŕ: "r",
2352
- Ŗ: "R",
2353
- ŗ: "r",
2354
- Ř: "R",
2355
- ř: "r",
2356
- R̆: "R",
2357
- r̆: "r",
2358
- Ȓ: "R",
2359
- ȓ: "r",
2360
- Ś: "S",
2361
- ś: "s",
2362
- Ŝ: "S",
2363
- ŝ: "s",
2364
- Ş: "S",
2365
- Ș: "S",
2366
- ș: "s",
2367
- ş: "s",
2368
- Š: "S",
2369
- š: "s",
2370
- Ţ: "T",
2371
- ţ: "t",
2372
- ț: "t",
2373
- Ț: "T",
2374
- Ť: "T",
2375
- ť: "t",
2376
- Ŧ: "T",
2377
- ŧ: "t",
2378
- T̆: "T",
2379
- t̆: "t",
2380
- Ũ: "U",
2381
- ũ: "u",
2382
- Ū: "U",
2383
- ū: "u",
2384
- Ŭ: "U",
2385
- ŭ: "u",
2386
- Ů: "U",
2387
- ů: "u",
2388
- Ű: "U",
2389
- ű: "u",
2390
- Ų: "U",
2391
- ų: "u",
2392
- Ȗ: "U",
2393
- ȗ: "u",
2394
- V̆: "V",
2395
- v̆: "v",
2396
- Ŵ: "W",
2397
- ŵ: "w",
2398
- Ẃ: "W",
2399
- ẃ: "w",
2400
- X̆: "X",
2401
- x̆: "x",
2402
- Ŷ: "Y",
2403
- ŷ: "y",
2404
- Ÿ: "Y",
2405
- Y̆: "Y",
2406
- y̆: "y",
2407
- Ź: "Z",
2408
- ź: "z",
2409
- Ż: "Z",
2410
- ż: "z",
2411
- Ž: "Z",
2412
- ž: "z",
2413
- ſ: "s",
2414
- ƒ: "f",
2415
- Ơ: "O",
2416
- ơ: "o",
2417
- Ư: "U",
2418
- ư: "u",
2419
- Ǎ: "A",
2420
- ǎ: "a",
2421
- Ǐ: "I",
2422
- ǐ: "i",
2423
- Ǒ: "O",
2424
- ǒ: "o",
2425
- Ǔ: "U",
2426
- ǔ: "u",
2427
- Ǖ: "U",
2428
- ǖ: "u",
2429
- Ǘ: "U",
2430
- ǘ: "u",
2431
- Ǚ: "U",
2432
- ǚ: "u",
2433
- Ǜ: "U",
2434
- ǜ: "u",
2435
- Ứ: "U",
2436
- ứ: "u",
2437
- Ṹ: "U",
2438
- ṹ: "u",
2439
- Ǻ: "A",
2440
- ǻ: "a",
2441
- Ǽ: "AE",
2442
- ǽ: "ae",
2443
- Ǿ: "O",
2444
- ǿ: "o",
2445
- Þ: "TH",
2446
- þ: "th",
2447
- Ṕ: "P",
2448
- ṕ: "p",
2449
- Ṥ: "S",
2450
- ṥ: "s",
2451
- X́: "X",
2452
- x́: "x",
2453
- Ѓ: "Г",
2454
- ѓ: "г",
2455
- Ќ: "К",
2456
- ќ: "к",
2457
- A̋: "A",
2458
- a̋: "a",
2459
- E̋: "E",
2460
- e̋: "e",
2461
- I̋: "I",
2462
- i̋: "i",
2463
- Ǹ: "N",
2464
- ǹ: "n",
2465
- Ồ: "O",
2466
- ồ: "o",
2467
- Ṑ: "O",
2468
- ṑ: "o",
2469
- Ừ: "U",
2470
- ừ: "u",
2471
- Ẁ: "W",
2472
- ẁ: "w",
2473
- Ỳ: "Y",
2474
- ỳ: "y",
2475
- Ȁ: "A",
2476
- ȁ: "a",
2477
- Ȅ: "E",
2478
- ȅ: "e",
2479
- Ȉ: "I",
2480
- ȉ: "i",
2481
- Ȍ: "O",
2482
- ȍ: "o",
2483
- Ȑ: "R",
2484
- ȑ: "r",
2485
- Ȕ: "U",
2486
- ȕ: "u",
2487
- B̌: "B",
2488
- b̌: "b",
2489
- Č̣: "C",
2490
- č̣: "c",
2491
- Ê̌: "E",
2492
- ê̌: "e",
2493
- F̌: "F",
2494
- f̌: "f",
2495
- Ǧ: "G",
2496
- ǧ: "g",
2497
- Ȟ: "H",
2498
- ȟ: "h",
2499
- J̌: "J",
2500
- ǰ: "j",
2501
- Ǩ: "K",
2502
- ǩ: "k",
2503
- M̌: "M",
2504
- m̌: "m",
2505
- P̌: "P",
2506
- p̌: "p",
2507
- Q̌: "Q",
2508
- q̌: "q",
2509
- Ř̩: "R",
2510
- ř̩: "r",
2511
- Ṧ: "S",
2512
- ṧ: "s",
2513
- V̌: "V",
2514
- v̌: "v",
2515
- W̌: "W",
2516
- w̌: "w",
2517
- X̌: "X",
2518
- x̌: "x",
2519
- Y̌: "Y",
2520
- y̌: "y",
2521
- A̧: "A",
2522
- a̧: "a",
2523
- B̧: "B",
2524
- b̧: "b",
2525
- Ḑ: "D",
2526
- ḑ: "d",
2527
- Ȩ: "E",
2528
- ȩ: "e",
2529
- Ɛ̧: "E",
2530
- ɛ̧: "e",
2531
- Ḩ: "H",
2532
- ḩ: "h",
2533
- I̧: "I",
2534
- i̧: "i",
2535
- Ɨ̧: "I",
2536
- ɨ̧: "i",
2537
- M̧: "M",
2538
- m̧: "m",
2539
- O̧: "O",
2540
- o̧: "o",
2541
- Q̧: "Q",
2542
- q̧: "q",
2543
- U̧: "U",
2544
- u̧: "u",
2545
- X̧: "X",
2546
- x̧: "x",
2547
- Z̧: "Z",
2548
- z̧: "z",
2549
- й: "и",
2550
- Й: "И",
2551
- ё: "е",
2552
- Ё: "Е"
2553
- }, _r = Object.keys(vr).join("|"), Zo = new RegExp(_r, "g"), ei = new RegExp(_r, "");
2554
- function ti(e) {
2555
- return vr[e];
2556
- }
2557
- var Ir = function(e) {
2558
- return e.replace(Zo, ti);
2559
- }, ni = function(e) {
2560
- return !!e.match(ei);
2561
- };
2562
- ut.exports = Ir;
2563
- ut.exports.has = ni;
2564
- ut.exports.remove = Ir;
2565
- var ri = ut.exports;
2566
- const oi = /* @__PURE__ */ Zr(ri);
2567
- /**
2568
- * @name match-sorter
2569
- * @license MIT license.
2570
- * @copyright (c) 2020 Kent C. Dodds
2571
- * @author Kent C. Dodds <me@kentcdodds.com> (https://kentcdodds.com)
2572
- */
2573
- const pe = {
2574
- CASE_SENSITIVE_EQUAL: 7,
2575
- EQUAL: 6,
2576
- STARTS_WITH: 5,
2577
- WORD_STARTS_WITH: 4,
2578
- CONTAINS: 3,
2579
- ACRONYM: 2,
2580
- MATCHES: 1,
2581
- NO_MATCH: 0
2582
- }, ii = (e, n) => String(e.rankedValue).localeCompare(String(n.rankedValue));
2583
- function rn(e, n, r) {
2584
- r === void 0 && (r = {});
2585
- const {
2586
- keys: i,
2587
- threshold: o = pe.MATCHES,
2588
- baseSort: t = ii,
2589
- sorter: s = (u) => u.sort((a, g) => ui(a, g, t))
2590
- } = r, l = e.reduce(d, []);
2591
- return s(l).map((u) => {
2592
- let {
2593
- item: a
2594
- } = u;
2595
- return a;
2596
- });
2597
- function d(u, a, g) {
2598
- const b = si(a, i, n, r), {
2599
- rank: v,
2600
- keyThreshold: x = o
2601
- } = b;
2602
- return v >= x && u.push({
2603
- ...b,
2604
- item: a,
2605
- index: g
2606
- }), u;
2607
- }
2608
- }
2609
- rn.rankings = pe;
2610
- function si(e, n, r, i) {
2611
- if (!n) {
2612
- const t = e;
2613
- return {
2614
- // ends up being duplicate of 'item' in matches but consistent
2615
- rankedValue: t,
2616
- rank: wn(t, r, i),
2617
- keyIndex: -1,
2618
- keyThreshold: i.threshold
2619
- };
2620
- }
2621
- return pi(e, n).reduce((t, s, l) => {
2622
- let {
2623
- rank: d,
2624
- rankedValue: u,
2625
- keyIndex: a,
2626
- keyThreshold: g
2627
- } = t, {
2628
- itemValue: b,
2629
- attributes: v
2630
- } = s, x = wn(b, r, i), O = u;
2631
- const {
2632
- minRanking: h,
2633
- maxRanking: D,
2634
- threshold: c
2635
- } = v;
2636
- return x < h && x >= pe.MATCHES ? x = h : x > D && (x = D), x > d && (d = x, a = l, g = c, O = b), {
2637
- rankedValue: O,
2638
- rank: d,
2639
- keyIndex: a,
2640
- keyThreshold: g
2641
- };
2642
- }, {
2643
- rankedValue: e,
2644
- rank: pe.NO_MATCH,
2645
- keyIndex: -1,
2646
- keyThreshold: i.threshold
2647
- });
2648
- }
2649
- function wn(e, n, r) {
2650
- return e = En(e, r), n = En(n, r), n.length > e.length ? pe.NO_MATCH : e === n ? pe.CASE_SENSITIVE_EQUAL : (e = e.toLowerCase(), n = n.toLowerCase(), e === n ? pe.EQUAL : e.startsWith(n) ? pe.STARTS_WITH : e.includes(` ${n}`) ? pe.WORD_STARTS_WITH : e.includes(n) ? pe.CONTAINS : n.length === 1 ? pe.NO_MATCH : ai(e).includes(n) ? pe.ACRONYM : li(e, n));
2651
- }
2652
- function ai(e) {
2653
- let n = "";
2654
- return e.split(" ").forEach((i) => {
2655
- i.split("-").forEach((t) => {
2656
- n += t.substr(0, 1);
2657
- });
2658
- }), n;
2659
- }
2660
- function li(e, n) {
2661
- let r = 0, i = 0;
2662
- function o(d, u, a) {
2663
- for (let g = a, b = u.length; g < b; g++)
2664
- if (u[g] === d)
2665
- return r += 1, g + 1;
2666
- return -1;
2667
- }
2668
- function t(d) {
2669
- const u = 1 / d, a = r / n.length;
2670
- return pe.MATCHES + a * u;
2671
- }
2672
- const s = o(n[0], e, 0);
2673
- if (s < 0)
2674
- return pe.NO_MATCH;
2675
- i = s;
2676
- for (let d = 1, u = n.length; d < u; d++) {
2677
- const a = n[d];
2678
- if (i = o(a, e, i), !(i > -1))
2679
- return pe.NO_MATCH;
2680
- }
2681
- const l = i - s;
2682
- return t(l);
2683
- }
2684
- function ui(e, n, r) {
2685
- const {
2686
- rank: t,
2687
- keyIndex: s
2688
- } = e, {
2689
- rank: l,
2690
- keyIndex: d
2691
- } = n;
2692
- return t === l ? s === d ? r(e, n) : s < d ? -1 : 1 : t > l ? -1 : 1;
2693
- }
2694
- function En(e, n) {
2695
- let {
2696
- keepDiacritics: r
2697
- } = n;
2698
- return e = `${e}`, r || (e = oi(e)), e;
2699
- }
2700
- function di(e, n) {
2701
- typeof n == "object" && (n = n.key);
2702
- let r;
2703
- if (typeof n == "function")
2704
- r = n(e);
2705
- else if (e == null)
2706
- r = null;
2707
- else if (Object.hasOwnProperty.call(e, n))
2708
- r = e[n];
2709
- else {
2710
- if (n.includes("."))
2711
- return ci(n, e);
2712
- r = null;
2713
- }
2714
- return r == null ? [] : Array.isArray(r) ? r : [String(r)];
2715
- }
2716
- function ci(e, n) {
2717
- const r = e.split(".");
2718
- let i = [n];
2719
- for (let o = 0, t = r.length; o < t; o++) {
2720
- const s = r[o];
2721
- let l = [];
2722
- for (let d = 0, u = i.length; d < u; d++) {
2723
- const a = i[d];
2724
- if (a != null)
2725
- if (Object.hasOwnProperty.call(a, s)) {
2726
- const g = a[s];
2727
- g != null && l.push(g);
2728
- } else
2729
- s === "*" && (l = l.concat(a));
2730
- }
2731
- i = l;
2732
- }
2733
- return Array.isArray(i[0]) ? [].concat(...i) : i;
2734
- }
2735
- function pi(e, n) {
2736
- const r = [];
2737
- for (let i = 0, o = n.length; i < o; i++) {
2738
- const t = n[i], s = fi(t), l = di(e, t);
2739
- for (let d = 0, u = l.length; d < u; d++)
2740
- r.push({
2741
- itemValue: l[d],
2742
- attributes: s
2743
- });
2744
- }
2745
- return r;
2746
- }
2747
- const Cn = {
2748
- maxRanking: 1 / 0,
2749
- minRanking: -1 / 0
2750
- };
2751
- function fi(e) {
2752
- return typeof e == "string" ? Cn : {
2753
- ...Cn,
2754
- ...e
2755
- };
2756
- }
2757
- function hi({
2758
- defaultOpen: e,
2759
- placement: n = "bottom",
2760
- modal: r,
2761
- open: i,
2762
- onOpenChange: o,
2763
- onClose: t,
2764
- disableCloseOnClickOutside: s,
2765
- disableCloseOnEscape: l,
2766
- openOnHover: d,
2767
- fillAvailableHeight: u,
2768
- matchReferenceWidth: a,
2769
- fixedWidth: g,
2770
- disableCaret: b,
2771
- noPadding: v,
2772
- disableShift: x,
2773
- disableFlip: O,
2774
- disableFlipFallback: h,
2775
- disableAutoUpdate: D,
2776
- disableFocusLock: c
2777
- } = {}) {
2778
- const [f, p] = X(e), [I, m] = X(), [N, C] = X(), H = i ?? f, M = o ?? p, S = Z(null), R = Kr({
2779
- placement: n,
2780
- open: H,
2781
- onOpenChange: M,
2782
- whileElementsMounted: D ? void 0 : $r,
2783
- middleware: [
2784
- Fr(8),
2785
- Lr({
2786
- padding: 5,
2787
- apply({ rects: Q, availableHeight: A, elements: z }) {
2788
- Object.assign(z.floating.style, {
2789
- ...a ? { width: `${Q.reference.width}px` } : g ? { width: "40dvw" } : {},
2790
- ...u ? (
2791
- // { maxHeight: "60dvh" }
2792
- // Minimum height is 236px before flip
2793
- { maxHeight: `${Math.max(236, A - 20)}px` }
2794
- ) : {},
2795
- zIndex: 1
2796
- });
2797
- }
2798
- }),
2799
- Br({
2800
- mainAxis: !O,
2801
- crossAxis: !1,
2802
- fallbackAxisSideDirection: h ? "none" : "end",
2803
- padding: 5
2804
- }),
2805
- Ur({
2806
- padding: 5,
2807
- mainAxis: !x,
2808
- crossAxis: !1,
2809
- limiter: zr({
2810
- mainAxis: !x
2811
- })
2812
- }),
2813
- Wr({ element: b ? null : S, padding: 5 })
2814
- ]
2815
- }), V = R.context, j = qr(V, {
2816
- enabled: i == null && !d
2817
- }), B = Yr(V, {
2818
- enabled: i == null && !!d,
2819
- handleClose: Gr()
2820
- }), U = Xr(V, {
2821
- escapeKey: !l,
2822
- outsidePress: () => s ? !1 : (t == null || t(), !0)
2823
- }), K = Jr(V), J = Qr([j, B, U, K]);
2824
- return Ke(
2825
- () => ({
2826
- open: H,
2827
- setOpen: M,
2828
- onClose: t,
2829
- ...J,
2830
- ...R,
2831
- modal: r,
2832
- labelId: I,
2833
- descriptionId: N,
2834
- setLabelId: m,
2835
- setDescriptionId: C,
2836
- arrowRef: S,
2837
- disableCaret: b,
2838
- noPadding: v,
2839
- fillAvailableHeight: u,
2840
- matchReferenceWidth: a,
2841
- fixedWidth: g,
2842
- disableFlipFallback: h,
2843
- disableAutoUpdate: D,
2844
- disableFocusLock: c
2845
- }),
2846
- [
2847
- H,
2848
- M,
2849
- t,
2850
- J,
2851
- R,
2852
- r,
2853
- I,
2854
- N,
2855
- b,
2856
- v,
2857
- u,
2858
- a,
2859
- g,
2860
- h,
2861
- D,
2862
- c
2863
- ]
2864
- );
2865
- }
2866
- const yr = bt(null), Ge = () => {
2867
- const e = ke(yr);
2868
- if (e == null)
2869
- throw new Error("Popover components must be wrapped in <Popover />");
2870
- return e;
2871
- }, gi = function(e) {
2872
- const { children: n } = e, r = Ge(), i = Z(null), o = qe([r.refs.setReference, i]);
2873
- return n({
2874
- "data-state": r.open ? "open" : "closed",
2875
- "data-anv": "popover-trigger",
2876
- ...r.getReferenceProps({ ref: o })
2877
- });
2878
- }, mi = "_content_x4y1q_4", vi = "_arrow_x4y1q_26", ht = {
2879
- content: mi,
2880
- arrow: vi,
2881
- "no-padding": "_no-padding_x4y1q_37"
2882
- }, _i = _e(
2883
- function({ className: e, style: n, ...r }, i) {
2884
- var o, t;
2885
- const {
2886
- context: s,
2887
- theme: l,
2888
- mode: d,
2889
- disableCaret: u,
2890
- noPadding: a,
2891
- onClose: g,
2892
- disableFocusLock: b,
2893
- ...v
2894
- } = Ge(), x = ke(Nr), O = qe([v.refs.setFloating, i]);
2895
- if (!s.open || x && !((o = x == null ? void 0 : x.ref) != null && o.current))
2896
- return null;
2897
- const h = de(e, ht.content, {
2898
- [ht["no-padding"]]: a
2899
- }), D = (c) => {
2900
- c.code === "Escape" && (g == null || g());
2901
- };
2902
- return /* @__PURE__ */ y.jsx(Ar, { root: (t = x == null ? void 0 : x.ref) == null ? void 0 : t.current, children: /* @__PURE__ */ y.jsx(
2903
- Hr,
2904
- {
2905
- context: s,
2906
- modal: v.modal,
2907
- order: ["reference", "content"],
2908
- disabled: b,
2909
- children: /* @__PURE__ */ y.jsx(Pr, { theme: l, mode: d, children: /* @__PURE__ */ y.jsxs(
2910
- "div",
2911
- {
2912
- ref: O,
2913
- "data-anv": "popover-content",
2914
- style: { ...v.floatingStyles, ...n },
2915
- "aria-labelledby": v.labelId,
2916
- "aria-describedby": v.descriptionId,
2917
- className: h,
2918
- ...v.getFloatingProps(r),
2919
- onKeyDown: D,
2920
- role: "presentation",
2921
- children: [
2922
- !u && /* @__PURE__ */ y.jsx(
2923
- jr,
2924
- {
2925
- ref: v.arrowRef,
2926
- context: s,
2927
- className: ht.arrow
2928
- }
2929
- ),
2930
- r.children
2931
- ]
2932
- }
2933
- ) })
2934
- }
2935
- ) });
2936
- }
2937
- ), Ii = _e(
2938
- function(e, n) {
2939
- const { setOpen: r, onClose: i } = Ge();
2940
- return /* @__PURE__ */ y.jsx(
2941
- ot,
2942
- {
2943
- ref: n,
2944
- "data-anv": "popover-close",
2945
- ...e,
2946
- onClick: (o) => {
2947
- var t;
2948
- (t = e.onClick) == null || t.call(e, o), i == null || i(), r(!1);
2949
- }
2950
- }
2951
- );
2952
- }
2953
- ), yi = _e(
2954
- function(e, n) {
2955
- const { children: r, size: i, ...o } = e, t = Ge(), s = r.ref, l = qe([
2956
- t.refs.setReference,
2957
- n,
2958
- s
2959
- ]);
2960
- return /* @__PURE__ */ y.jsx(
2961
- ot,
2962
- {
2963
- ref: l,
2964
- size: i,
2965
- "data-state": t.open ? "open" : "closed",
2966
- "data-anv": "popover-button",
2967
- ...t.getReferenceProps(o),
2968
- children: r
2969
- }
2970
- );
2971
- }
2972
- );
2973
- function xi({
2974
- children: e,
2975
- modal: n,
2976
- ...r
2977
- }) {
2978
- const i = hi({ modal: n, ...r }), { theme: o, mode: t = "light" } = ke(Mr), s = Ke(
2979
- () => ({ ...i, theme: o, mode: t }),
2980
- [t, i, o]
2981
- );
2982
- return /* @__PURE__ */ y.jsx(yr.Provider, { value: s, children: e });
2983
- }
2984
- const on = Object.assign(xi, {
2985
- Trigger: gi,
2986
- Close: Ii,
2987
- Content: _i,
2988
- Button: yi
2989
- }), xr = (e) => /* @__PURE__ */ ve.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", ...e }, /* @__PURE__ */ ve.createElement("path", { d: "M9.29 6.71a.996.996 0 0 0 0 1.41L13.17 12l-3.88 3.88a.996.996 0 1 0 1.41 1.41l4.59-4.59a.996.996 0 0 0 0-1.41L10.7 6.7c-.38-.38-1.02-.38-1.41.01z" })), bi = "_combobox_1jt3w_2", wi = "_input_1jt3w_30", Ei = "_error_1jt3w_61", Ci = "_small_1jt3w_86", Si = "_large_1jt3w_89", Oi = "_disabled_1jt3w_113", Ni = "_chip_1jt3w_162", Di = "_prefix_1jt3w_217", Ri = "_suffix_1jt3w_218", Pi = "_empty_1jt3w_260", te = {
2990
- combobox: bi,
2991
- "search-field": "_search-field_1jt3w_6",
2992
- "popover-content": "_popover-content_1jt3w_21",
2993
- "input-wrapper": "_input-wrapper_1jt3w_30",
2994
- input: wi,
2995
- error: Ei,
2996
- "buttons-wrapper": "_buttons-wrapper_1jt3w_69",
2997
- small: Ci,
2998
- large: Si,
2999
- "close-button-wrapper": "_close-button-wrapper_1jt3w_93",
3000
- "close-button": "_close-button_1jt3w_93",
3001
- "loading-infinite": "_loading-infinite_1jt3w_113",
3002
- "loading-progress": "_loading-progress_1jt3w_113",
3003
- disabled: Oi,
3004
- "toggle-button-wrapper": "_toggle-button-wrapper_1jt3w_117",
3005
- "toggle-button": "_toggle-button_1jt3w_117",
3006
- "rows-wrapper": "_rows-wrapper_1jt3w_151",
3007
- "chip-wrapper": "_chip-wrapper_1jt3w_162",
3008
- chip: Ni,
3009
- prefix: Di,
3010
- suffix: Ri,
3011
- "listview-option": "_listview-option_1jt3w_255",
3012
- empty: Pi
3013
- }, sn = bt(null), Xe = function() {
3014
- const e = ke(
3015
- sn
3016
- );
3017
- if (e == null)
3018
- throw new Error("useCombobox must be wrapped in <Combobox />");
3019
- return e;
3020
- }, Mi = function(e) {
3021
- const { multiple: n = !1, ...r } = e;
3022
- return n ? /* @__PURE__ */ y.jsx(Ti, { ...r }) : /* @__PURE__ */ y.jsx(ki, { ...r });
3023
- }, ki = function(e) {
3024
- const { layoutStyles: n, componentProps: r } = Ce(e), {
3025
- className: i,
3026
- style: o,
3027
- children: t,
3028
- open: s,
3029
- items: l,
3030
- itemToString: d,
3031
- onChange: u,
3032
- onSelectedItemChange: a,
3033
- disableCloseOnClickOutside: g = !1,
3034
- filterOptions: b,
3035
- ...v
3036
- } = r, [x, O] = X(l), [h, D] = X(!1), [c, f] = X(!1), [p, I] = X(!1), [m, N] = X([]);
3037
- function C(A) {
3038
- return d && A ? d(A) : A ? String(A) : "";
3039
- }
3040
- const {
3041
- isOpen: H,
3042
- getLabelProps: M,
3043
- getInputProps: S,
3044
- getToggleButtonProps: R,
3045
- getMenuProps: V,
3046
- getItemProps: j,
3047
- highlightedIndex: B,
3048
- selectedItem: U,
3049
- selectItem: K,
3050
- setInputValue: J,
3051
- inputValue: Q
3052
- } = he({
3053
- ...v,
3054
- items: x,
3055
- itemToString(A) {
3056
- return C(A);
3057
- },
3058
- onInputValueChange({ inputValue: A, type: z }) {
3059
- z === he.stateChangeTypes.InputKeyDownEnter || z === he.stateChangeTypes.ItemClick ? O(l) : A != null && A !== "" ? O(rn(l, A, b)) : O(l);
3060
- },
3061
- onSelectedItemChange({ selectedItem: A, ...z }) {
3062
- u != null && u(A || null), a != null && a({ selectedItem: A, ...z });
3063
- },
3064
- onIsOpenChange({ isOpen: A, inputValue: z, selectedItem: q }) {
3065
- A === !1 && z === "" ? K(null) : A === !1 && J(q != null ? C(q) : "");
3066
- },
3067
- stateReducer(A, { type: z, changes: q }) {
3068
- switch (z) {
3069
- case he.stateChangeTypes.InputBlur:
3070
- return g ? {
3071
- ...q,
3072
- isOpen: A.isOpen,
3073
- highlightedIndex: A.highlightedIndex
3074
- } : q;
3075
- default:
3076
- return q;
3077
- }
3078
- },
3079
- isItemDisabled(A) {
3080
- return h || !!(A && A instanceof Object && "disabled" in A && A.disabled || A && A instanceof Object && "readOnly" in A && A.readOnly || m.includes(A));
3081
- }
3082
- });
3083
- return /* @__PURE__ */ y.jsx(
3084
- sn.Provider,
3085
- {
3086
- value: {
3087
- multiple: !1,
3088
- items: x,
3089
- itemToString: C,
3090
- isOpen: H,
3091
- getLabelProps: M,
3092
- getInputProps: S,
3093
- getToggleButtonProps: R,
3094
- getMenuProps: V,
3095
- getItemProps: j,
3096
- highlightedIndex: B,
3097
- selectedItem: U,
3098
- selectedItems: [],
3099
- disabledItems: m,
3100
- setDisabledItems: N,
3101
- getSelectedItemProps: void 0,
3102
- getDropdownProps: void 0,
3103
- reset: void 0,
3104
- removeSelectedItem: void 0,
3105
- selectItem: K,
3106
- inputValue: Q,
3107
- isDisabledOrReadOnly: h,
3108
- setIsDisabledOrReadOnly: D,
3109
- hasDisabledPopover: c,
3110
- setHasDisabledPopover: f,
3111
- hasEmpty: p,
3112
- setHasEmpty: I
3113
- },
3114
- children: /* @__PURE__ */ y.jsx(
3115
- "div",
3116
- {
3117
- className: i,
3118
- "data-anv": "combobox",
3119
- style: { ...o, ...n },
3120
- children: /* @__PURE__ */ y.jsx(
3121
- on,
3122
- {
3123
- open: s === !0 ? s : H,
3124
- noPadding: !0,
3125
- disableCaret: !0,
3126
- fillAvailableHeight: !0,
3127
- disableFlipFallback: !0,
3128
- matchReferenceWidth: !0,
3129
- children: t
3130
- }
3131
- )
3132
- }
3133
- )
3134
- }
3135
- );
3136
- }, Ti = function(e) {
3137
- const { layoutStyles: n, componentProps: r } = Ce(e), {
3138
- className: i,
3139
- style: o,
3140
- children: t,
3141
- open: s,
3142
- items: l,
3143
- itemToString: d,
3144
- onChange: u,
3145
- onSelectedItemChange: a,
3146
- disableCloseOnClickOutside: g = !1,
3147
- filterOptions: b,
3148
- ...v
3149
- } = r, [x, O] = X(l), [h, D] = X(!1), [c, f] = X(!1), [p, I] = X(!1), [m, N] = X(""), [C, H] = X([]), [M, S] = X([]), { getSelectedItemProps: R, getDropdownProps: V, reset: j, removeSelectedItem: B } = Ne({
3150
- selectedItems: C,
3151
- onStateChange({ selectedItems: w, type: T }) {
3152
- switch (T) {
3153
- case Ne.stateChangeTypes.SelectedItemKeyDownBackspace:
3154
- case Ne.stateChangeTypes.SelectedItemKeyDownDelete:
3155
- case Ne.stateChangeTypes.DropdownKeyDownBackspace:
3156
- case Ne.stateChangeTypes.FunctionRemoveSelectedItem:
3157
- u != null && u(w ?? []), H(w ?? []);
3158
- break;
3159
- case Ne.stateChangeTypes.FunctionReset:
3160
- u != null && u([]), H([]), N("");
3161
- break;
3162
- }
3163
- }
3164
- });
3165
- function U(w) {
3166
- return d && w ? d(w) : w ? String(w) : "";
3167
- }
3168
- const {
3169
- isOpen: K,
3170
- getLabelProps: J,
3171
- getInputProps: Q,
3172
- getToggleButtonProps: A,
3173
- getMenuProps: z,
3174
- getItemProps: q,
3175
- highlightedIndex: oe,
3176
- selectedItem: P,
3177
- selectItem: k
3178
- } = he({
3179
- ...v,
3180
- items: x,
3181
- itemToString(w) {
3182
- return U(w);
3183
- },
3184
- selectedItem: null,
3185
- inputValue: m,
3186
- onInputValueChange({ inputValue: w, type: T }) {
3187
- T === he.stateChangeTypes.InputKeyDownEnter || T === he.stateChangeTypes.ItemClick ? O(l) : w != null && w !== "" ? O(rn(l, w, b)) : O(l);
3188
- },
3189
- onIsOpenChange({ isOpen: w }) {
3190
- w === !1 && N("");
3191
- },
3192
- stateReducer(w, { type: T, changes: L }) {
3193
- switch (T) {
3194
- case he.stateChangeTypes.InputBlur:
3195
- return g ? {
3196
- ...L,
3197
- isOpen: w.isOpen,
3198
- highlightedIndex: w.highlightedIndex
3199
- } : L;
3200
- default:
3201
- return L;
3202
- }
3203
- },
3204
- isItemDisabled(w) {
3205
- return h || !!(w && w instanceof Object && "disabled" in w && w.disabled || w && w instanceof Object && "readOnly" in w && w.readOnly || M.includes(w));
3206
- },
3207
- onStateChange({
3208
- inputValue: w = "",
3209
- type: T,
3210
- selectedItem: L
3211
- }) {
3212
- switch (T) {
3213
- case he.stateChangeTypes.InputKeyDownEnter:
3214
- case he.stateChangeTypes.ItemClick:
3215
- case he.stateChangeTypes.InputBlur:
3216
- if (L) {
3217
- const W = C.includes(L) ? C.filter((F) => F !== L) : [...C, L];
3218
- u != null && u(W), H(W), N("");
3219
- }
3220
- break;
3221
- case he.stateChangeTypes.InputChange:
3222
- N(w);
3223
- break;
3224
- }
3225
- }
3226
- });
3227
- return /* @__PURE__ */ y.jsx(
3228
- sn.Provider,
3229
- {
3230
- value: {
3231
- multiple: !0,
3232
- items: x,
3233
- itemToString: U,
3234
- isOpen: K,
3235
- getLabelProps: J,
3236
- getInputProps: Q,
3237
- getToggleButtonProps: A,
3238
- getMenuProps: z,
3239
- getItemProps: q,
3240
- highlightedIndex: oe,
3241
- selectedItem: P,
3242
- selectedItems: C,
3243
- disabledItems: M,
3244
- setDisabledItems: S,
3245
- getSelectedItemProps: R,
3246
- getDropdownProps: V,
3247
- reset: j,
3248
- removeSelectedItem: B,
3249
- selectItem: k,
3250
- inputValue: m,
3251
- isDisabledOrReadOnly: h,
3252
- setIsDisabledOrReadOnly: D,
3253
- hasDisabledPopover: c,
3254
- setHasDisabledPopover: f,
3255
- hasEmpty: p,
3256
- setHasEmpty: I
3257
- },
3258
- children: /* @__PURE__ */ y.jsx("div", { className: i, style: { ...o, ...n }, children: /* @__PURE__ */ y.jsx(
3259
- on,
3260
- {
3261
- open: s === !0 ? s : K,
3262
- noPadding: !0,
3263
- disableCaret: !0,
3264
- fillAvailableHeight: !0,
3265
- disableFlipFallback: !0,
3266
- matchReferenceWidth: !0,
3267
- children: t
3268
- }
3269
- ) })
3270
- }
3271
- );
3272
- }, Vi = ({
3273
- className: e,
3274
- label: n,
3275
- size: r,
3276
- error: i,
3277
- hint: o,
3278
- description: t,
3279
- required: s,
3280
- moreInfo: l,
3281
- openMoreInfo: d,
3282
- disabled: u,
3283
- readOnly: a,
3284
- prefix: g,
3285
- suffix: b,
3286
- maxRows: v,
3287
- ...x
3288
- }) => {
3289
- const {
3290
- isOpen: O,
3291
- itemToString: h,
3292
- getLabelProps: D,
3293
- getInputProps: c,
3294
- getToggleButtonProps: f,
3295
- selectedItems: p,
3296
- getSelectedItemProps: I,
3297
- getDropdownProps: m,
3298
- reset: N,
3299
- removeSelectedItem: C,
3300
- selectItem: H,
3301
- inputValue: M,
3302
- setIsDisabledOrReadOnly: S,
3303
- hasDisabledPopover: R
3304
- } = Xe(), V = Ge(), j = de(te["input-wrapper"], {
3305
- [te.small]: r === "small",
3306
- [te.large]: r === "large"
3307
- }), B = ye(), U = ye(), K = de(te.input, e, {
3308
- [te.error]: i
3309
- });
3310
- ue(() => (S(!!(u || a)), () => {
3311
- S(!1);
3312
- }), [u, a, S]);
3313
- let J = `label${B} `;
3314
- J += ` helper${U}`;
3315
- const Q = typeof i != "boolean" ? i : void 0, A = Z(null), [z, q] = X(!1), [oe, P] = X(!1), [k, w] = X(
3316
- null
3317
- ), [T, L] = X(0);
3318
- xt(() => {
3319
- var F, se;
3320
- if (v !== void 0) {
3321
- if (z === !1)
3322
- q(!0), P(!1), w(null), L((ae) => ae + 1);
3323
- else if ((F = A == null ? void 0 : A.current) != null && F.children) {
3324
- const ae = (se = A == null ? void 0 : A.current) == null ? void 0 : se.children, le = Array.from(ae).reduce(
3325
- (E, fe) => {
3326
- const ie = fe.getBoundingClientRect().top;
3327
- return E.length ? E[E.length - 1].top === ie ? [
3328
- ...E.slice(0, -1),
3329
- { count: E[E.length - 1].count + 1, top: ie }
3330
- ] : E[E.length - 1].top !== ie ? [...E, { count: 1, top: ie }] : E : [{ count: 1, top: ie }];
3331
- },
3332
- []
3333
- );
3334
- if (!le[1] || k === 0)
3335
- q(!1);
3336
- else {
3337
- if (P(!0), k == null) {
3338
- const E = Math.max(
3339
- le[0].count + le[1].count - 2,
3340
- 0
3341
- );
3342
- w(E);
3343
- } else
3344
- w(k - 1);
3345
- L((E) => E + 1);
3346
- }
3347
- }
3348
- }
3349
- }, [p.length, v, T]);
3350
- const W = oe && v != null && k !== null ? k : p.length;
3351
- return /* @__PURE__ */ y.jsxs("div", { className: te["search-field"], "data-anv": "combobox-searchfield", children: [
3352
- /* @__PURE__ */ y.jsxs("div", { children: [
3353
- /* @__PURE__ */ y.jsx(
3354
- yt,
3355
- {
3356
- ...D({
3357
- id: B,
3358
- required: s,
3359
- moreInfo: l,
3360
- openMoreInfo: d
3361
- }),
3362
- children: n
3363
- }
3364
- ),
3365
- /* @__PURE__ */ y.jsxs(
3366
- "div",
3367
- {
3368
- className: j,
3369
- ref: V.refs.setReference,
3370
- children: [
3371
- /* @__PURE__ */ y.jsxs("div", { className: te["buttons-wrapper"], children: [
3372
- M || p.length ? /* @__PURE__ */ y.jsx("div", { className: te["close-button-wrapper"], children: /* @__PURE__ */ y.jsx(
3373
- ot,
3374
- {
3375
- "aria-label": "clear selection",
3376
- appearance: "ghost",
3377
- size: "small",
3378
- icon: eo,
3379
- className: te["close-button"],
3380
- onClick: () => {
3381
- N != null ? N() : H(null);
3382
- },
3383
- tabIndex: -1,
3384
- disabled: u || a
3385
- }
3386
- ) }) : null,
3387
- R ? null : /* @__PURE__ */ y.jsx("div", { className: te["toggle-button-wrapper"], children: /* @__PURE__ */ y.jsx(
3388
- ot,
3389
- {
3390
- "aria-label": "toggle menu",
3391
- ...f({
3392
- icon: xr,
3393
- className: te["toggle-button"],
3394
- disabled: u || a
3395
- }),
3396
- appearance: "ghost",
3397
- size: "small"
3398
- }
3399
- ) })
3400
- ] }),
3401
- /* @__PURE__ */ y.jsxs("div", { className: te["rows-wrapper"], ref: A, children: [
3402
- p.length && C != null && I != null ? p.slice(0, W).map((F, se) => {
3403
- const { onClick: ae, ...le } = I({
3404
- selectedItem: F,
3405
- index: se
3406
- });
3407
- return /* @__PURE__ */ y.jsx(
3408
- "div",
3409
- {
3410
- className: te["chip-wrapper"],
3411
- children: /* @__PURE__ */ y.jsx(
3412
- an,
3413
- {
3414
- ...le,
3415
- label: h(F),
3416
- onClose: () => C(F),
3417
- className: te.chip,
3418
- title: h(F)
3419
- }
3420
- )
3421
- },
3422
- `selected-item-${se}`
3423
- );
3424
- }) : null,
3425
- oe && v != null ? /* @__PURE__ */ y.jsx("div", { className: te["chip-wrapper"], children: /* @__PURE__ */ y.jsx(
3426
- an,
3427
- {
3428
- label: `+${p.length - W}`,
3429
- className: te.chip,
3430
- title: p.slice(W).map((F) => h(F)).join(", ")
3431
- }
3432
- ) }) : null,
3433
- /* @__PURE__ */ y.jsxs(
3434
- gt,
3435
- {
3436
- flex: "1 1 100px",
3437
- alignItems: "center",
3438
- style: { width: "100px" },
3439
- children: [
3440
- g ? /* @__PURE__ */ y.jsx("div", { className: te.prefix, children: g }) : null,
3441
- /* @__PURE__ */ y.jsx(
3442
- "input",
3443
- {
3444
- ...m != null ? c(
3445
- m({
3446
- ...x,
3447
- className: K,
3448
- disabled: u,
3449
- readOnly: a,
3450
- required: s,
3451
- autoComplete: "off",
3452
- "aria-labelledby": J,
3453
- preventKeyAction: O
3454
- })
3455
- ) : c({
3456
- ...x,
3457
- className: K,
3458
- disabled: u,
3459
- readOnly: a,
3460
- required: s,
3461
- autoComplete: "off",
3462
- "aria-labelledby": J
3463
- })
3464
- }
3465
- ),
3466
- b ? /* @__PURE__ */ y.jsx("div", { className: te.suffix, children: b }) : null
3467
- ]
3468
- }
3469
- )
3470
- ] })
3471
- ]
3472
- }
3473
- )
3474
- ] }),
3475
- o || Q || t ? /* @__PURE__ */ y.jsx(
3476
- wt,
3477
- {
3478
- id: U,
3479
- errorMessage: Q,
3480
- hint: o,
3481
- description: t
3482
- }
3483
- ) : null
3484
- ] });
3485
- }, Ai = function({
3486
- children: e,
3487
- className: n,
3488
- disablePopover: r = !1,
3489
- ...i
3490
- }) {
3491
- const {
3492
- items: o,
3493
- highlightedIndex: t,
3494
- selectedItem: s,
3495
- selectedItems: l,
3496
- setHasDisabledPopover: d,
3497
- getMenuProps: u,
3498
- getItemProps: a,
3499
- isDisabledOrReadOnly: g
3500
- } = Xe(), b = de(
3501
- te["popover-content"],
3502
- n
3503
- );
3504
- return ue(() => (d(r), () => {
3505
- d(!1);
3506
- }), [r, d]), r ? /* @__PURE__ */ y.jsx("div", { ...i, className: b, children: e ? e({
3507
- items: o,
3508
- highlightedIndex: t,
3509
- selectedItem: s,
3510
- getMenuProps: u,
3511
- getItemProps: a,
3512
- listProps: {
3513
- ...u({}, { suppressRefError: !0 }),
3514
- style: {
3515
- display: o.length ? "" : "none",
3516
- overflow: "auto"
3517
- }
3518
- },
3519
- options: o.map((v, x) => ({
3520
- optionProps: {
3521
- ...a({
3522
- item: v,
3523
- index: x
3524
- }),
3525
- selected: s === v || l.includes(v),
3526
- disabled: g
3527
- // also see "isItemDisabled" function
3528
- },
3529
- item: v,
3530
- index: x
3531
- }))
3532
- }) : null }) : /* @__PURE__ */ y.jsx(
3533
- on.Content,
3534
- {
3535
- "data-anv": "combobox-content",
3536
- ...i,
3537
- className: b,
3538
- children: e ? e({
3539
- items: o,
3540
- highlightedIndex: t,
3541
- selectedItem: s,
3542
- getMenuProps: u,
3543
- getItemProps: a,
3544
- listProps: {
3545
- ...u({}, { suppressRefError: !0 }),
3546
- style: {
3547
- display: o.length ? void 0 : "none",
3548
- overflow: "auto"
3549
- }
3550
- },
3551
- options: o.map((v, x) => ({
3552
- optionProps: {
3553
- ...a({
3554
- item: v,
3555
- index: x
3556
- }),
3557
- selected: s === v || l.includes(v),
3558
- disabled: g
3559
- // also see "isItemDisabled" function
3560
- },
3561
- item: v,
3562
- index: x
3563
- }))
3564
- }) : null
3565
- }
3566
- );
3567
- }, Hi = function({
3568
- children: e,
3569
- ...n
3570
- }) {
3571
- const { getMenuProps: r, multiple: i, items: o, hasEmpty: t } = Xe();
3572
- return i ? /* @__PURE__ */ y.jsx(
3573
- "div",
3574
- {
3575
- ...r(n),
3576
- "data-anv": "combobox-list",
3577
- className: mt.listview,
3578
- style: {
3579
- display: o.length ? void 0 : "none",
3580
- overflow: "scroll"
3581
- },
3582
- children: e
3583
- }
3584
- ) : /* @__PURE__ */ y.jsxs(y.Fragment, { children: [
3585
- /* @__PURE__ */ y.jsx(
3586
- "ul",
3587
- {
3588
- ...r(n),
3589
- className: Pn.listbox,
3590
- style: {
3591
- display: o.length ? void 0 : "none",
3592
- overflow: "scroll"
3593
- },
3594
- children: e
3595
- }
3596
- ),
3597
- !o.length && !t ? /* @__PURE__ */ y.jsx("div", { className: te.empty, children: /* @__PURE__ */ y.jsx(Rr, { subdued: !0, size: "small", children: "No results found" }) }) : null
3598
- ] });
3599
- }, ji = function({
3600
- children: e,
3601
- disabled: n,
3602
- item: r,
3603
- index: i,
3604
- ...o
3605
- }) {
3606
- const {
3607
- getItemProps: t,
3608
- multiple: s,
3609
- selectedItem: l,
3610
- selectedItems: d,
3611
- disabledItems: u,
3612
- setDisabledItems: a
3613
- } = Xe(), g = n || r && r instanceof Object && "disabled" in r && r.disabled;
3614
- return ue(() => (n && !u.includes(r) ? a([...u, r]) : u.includes(r) && a(u.filter((b) => b === r)), () => {
3615
- u.includes(r) && a(u.filter((b) => b === r));
3616
- }), [r, n, a]), s ? /* @__PURE__ */ y.jsx(
3617
- "div",
3618
- {
3619
- "data-anv": "combobox-item",
3620
- ...t({
3621
- item: r,
3622
- index: i,
3623
- ...o
3624
- }),
3625
- className: de(
3626
- te["listview-option"],
3627
- mt["listview-option"]
3628
- ),
3629
- children: /* @__PURE__ */ y.jsxs("div", { className: de(te.cell, mt.cell), children: [
3630
- /* @__PURE__ */ y.jsx(
3631
- Or,
3632
- {
3633
- checked: d.includes(r),
3634
- "aria-label": "Select",
3635
- ...g ? { disabled: !0 } : {}
3636
- }
3637
- ),
3638
- e
3639
- ] })
3640
- }
3641
- ) : /* @__PURE__ */ y.jsxs(
3642
- "li",
3643
- {
3644
- ...t({
3645
- item: r,
3646
- index: i,
3647
- ...o
3648
- }),
3649
- className: Pn.option,
3650
- ...g ? { "aria-disabled": !0 } : {},
3651
- children: [
3652
- /* @__PURE__ */ y.jsx("span", { children: e }),
3653
- /* @__PURE__ */ y.jsx(
3654
- It,
3655
- {
3656
- "aria-hidden": !0,
3657
- svg: to,
3658
- inherit: !0,
3659
- className: te.Icon,
3660
- style: { opacity: l === r ? 1 : 0 }
3661
- }
3662
- )
3663
- ]
3664
- }
3665
- );
3666
- }, Ki = function({
3667
- children: e
3668
- }) {
3669
- const { items: n, setHasEmpty: r } = Xe();
3670
- return ue(() => (r(!0), () => {
3671
- r(!1);
3672
- })), n.length ? null : e;
3673
- }, Ea = Object.assign(Mi, {
3674
- SearchField: Vi,
3675
- Content: Ai,
3676
- List: Hi,
3677
- Item: ji,
3678
- Empty: Ki
3679
- });
3680
- const $i = "_details_1sjr5_4", Fi = "_summary_1sjr5_17", Li = "_arrow_1sjr5_66", Bi = "_content_1sjr5_30", Ui = "_expanded_1sjr5_111", Me = {
3681
- details: $i,
3682
- summary: Fi,
3683
- "content-wrapper": "_content-wrapper_1sjr5_30",
3684
- arrow: Li,
3685
- content: Bi,
3686
- "is-expanded": "_is-expanded_1sjr5_108",
3687
- expanded: Ui
3688
- }, dt = bt({
3689
- id: "",
3690
- isExpanded: !1,
3691
- expanded: () => {
3692
- },
3693
- close: () => {
3694
- },
3695
- toggle: () => {
3696
- }
3697
- }), zi = _e(
3698
- function(e, n) {
3699
- const { layoutStyles: r, componentProps: i } = Ce(e), {
3700
- children: o,
3701
- id: t,
3702
- expanded: s,
3703
- defaultExpanded: l = !1,
3704
- style: d,
3705
- className: u,
3706
- ...a
3707
- } = i, g = ye(), [b, v] = X(l);
3708
- function x() {
3709
- v(!0);
3710
- }
3711
- function O() {
3712
- v(!1);
3713
- }
3714
- function h() {
3715
- v((f) => !f);
3716
- }
3717
- const D = {
3718
- ...d,
3719
- ...r
3720
- }, c = Ke(
3721
- () => ({
3722
- id: t ?? g,
3723
- isExpanded: s ?? b,
3724
- expanded: x,
3725
- close: O,
3726
- toggle: h
3727
- }),
3728
- [g, t, b, s]
3729
- );
3730
- return /* @__PURE__ */ y.jsx(dt.Provider, { value: c, children: /* @__PURE__ */ y.jsx(
3731
- "div",
3732
- {
3733
- "data-anv": "details",
3734
- ref: n,
3735
- className: de(Me.details, u),
3736
- style: D,
3737
- ...a,
3738
- children: o
3739
- }
3740
- ) });
3741
- }
3742
- ), Wi = _e(function({ children: e, onClick: n, className: r, ...i }, o) {
3743
- const { id: t, isExpanded: s, toggle: l } = ke(dt), d = (...a) => {
3744
- n == null || n(...a), l();
3745
- }, u = de(Me.summary, r);
3746
- return /* @__PURE__ */ y.jsxs(
3747
- "button",
3748
- {
3749
- "data-anv": "details-summary",
3750
- "aria-controls": t,
3751
- "aria-expanded": s,
3752
- className: u,
3753
- onClick: d,
3754
- ref: o,
3755
- ...i,
3756
- children: [
3757
- /* @__PURE__ */ y.jsx(qi, {}),
3758
- " ",
3759
- /* @__PURE__ */ y.jsx("span", { children: e })
3760
- ]
3761
- }
3762
- );
3763
- }), qi = _e(
3764
- function({ className: e, ...n }, r) {
3765
- const { isExpanded: i } = ke(dt), o = de(
3766
- Me.arrow,
3767
- { [Me["is-expanded"]]: i },
3768
- e
3769
- );
3770
- return /* @__PURE__ */ y.jsx("span", { className: o, ref: r, ...n, children: /* @__PURE__ */ y.jsx(It, { size: "large", svg: xr }) });
3771
- }
3772
- ), Yi = _e(
3773
- function({
3774
- className: e,
3775
- children: n,
3776
- height: r,
3777
- maxHeight: i,
3778
- style: o,
3779
- ...t
3780
- }, s) {
3781
- const { id: l, isExpanded: d } = ke(dt), u = {
3782
- height: r,
3783
- maxHeight: i,
3784
- ...r || i ? { overflow: "auto" } : {},
3785
- ...o
3786
- };
3787
- return /* @__PURE__ */ y.jsx(
3788
- "div",
3789
- {
3790
- "data-anv": "details-content",
3791
- id: l,
3792
- className: de(Me["content-wrapper"], {
3793
- [Me.expanded]: d
3794
- }),
3795
- ref: s,
3796
- children: /* @__PURE__ */ y.jsx("div", { className: Me.content, children: /* @__PURE__ */ y.jsx("div", { className: e, style: u, ...t, children: n }) })
3797
- }
3798
- );
3799
- }
3800
- ), Ca = Object.assign(zi, {
3801
- Summary: Wi,
3802
- Content: Yi
3803
- });
3804
- const Gi = "_link_1ur2o_4", Xi = "_secondary_1ur2o_36", Ji = "_quiet_1ur2o_45", je = {
3805
- link: Gi,
3806
- secondary: Xi,
3807
- quiet: Ji
3808
- }, Qi = (e) => /* @__PURE__ */ ve.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", ...e }, /* @__PURE__ */ ve.createElement("path", { d: "M18 19H6c-.55 0-1-.45-1-1V6c0-.55.45-1 1-1h5c.55 0 1-.45 1-1s-.45-1-1-1H5a2 2 0 0 0-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-6c0-.55-.45-1-1-1s-1 .45-1 1v5c0 .55-.45 1-1 1zM14 4c0 .55.45 1 1 1h2.59l-9.13 9.13a.996.996 0 1 0 1.41 1.41L19 6.41V9c0 .55.45 1 1 1s1-.45 1-1V4c0-.55-.45-1-1-1h-5c-.55 0-1 .45-1 1z" })), Zi = _e((e, n) => {
3809
- const { layoutStyles: r, componentProps: i } = Ce(e), {
3810
- children: o,
3811
- className: t,
3812
- appearance: s = "primary",
3813
- quiet: l,
3814
- style: d,
3815
- ...u
3816
- } = i, a = de([je.link], t, {
3817
- [je.quiet]: l,
3818
- [je.secondary]: s === "secondary"
3819
- }), g = {
3820
- ...d,
3821
- ...r
3822
- };
3823
- return /* @__PURE__ */ y.jsxs(
3824
- "a",
3825
- {
3826
- className: a,
3827
- rel: "noopener noreferrer",
3828
- "data-anv": "link",
3829
- ref: n,
3830
- style: g,
3831
- ...u,
3832
- children: [
3833
- o,
3834
- u.target === "_blank" && /* @__PURE__ */ y.jsx(It, { inherit: !0, svg: Qi })
3835
- ]
3836
- }
3837
- );
3838
- });
3839
- Zi.displayName = "Link";
3840
- const Sa = (e) => {
3841
- const { layoutStyles: n, componentProps: r } = Ce(e), { className: i, appearance: o = "primary", quiet: t, style: s } = r, l = de([je.link], i, {
3842
- [je.quiet]: t,
3843
- [je.secondary]: o === "secondary"
3844
- }), d = Object.assign({}, s, n);
3845
- return { linkClassNames: l, styleCombined: d };
3846
- };
3847
- const es = "_overflow_l5ucx_2", ts = "_expanded_l5ucx_2", ns = "_content_l5ucx_55", rs = "_horizontal_l5ucx_96", os = "_truncate_l5ucx_99", ne = {
3848
- overflow: es,
3849
- expanded: ts,
3850
- "shadow-top": "_shadow-top_l5ucx_2",
3851
- "shadow-right": "_shadow-right_l5ucx_6",
3852
- "shadow-bottom": "_shadow-bottom_l5ucx_10",
3853
- "shadow-left": "_shadow-left_l5ucx_14",
3854
- "overflow-text": "_overflow-text_l5ucx_21",
3855
- "expand-button": "_expand-button_l5ucx_34",
3856
- content: ns,
3857
- horizontal: rs,
3858
- truncate: os
3859
- }, br = _e(
3860
- (e, n) => {
3861
- const { rows: r = 1, ...i } = e, { layoutStyles: o, componentProps: t } = Ce(i), [s, l] = X(!1), { className: d, style: u, children: a, ...g } = t, b = {
3862
- ...u,
3863
- ...o,
3864
- "--overflow-text-row": s ? "initial" : r
3865
- };
3866
- if ("expandable" in e && e.expandable === !0) {
3867
- const {
3868
- expandable: x,
3869
- expandText: O,
3870
- collapseText: h,
3871
- onExpand: D,
3872
- onCollapse: c,
3873
- ...f
3874
- } = g, p = O ?? "Show more...", I = h ?? "Show less...", m = (C) => {
3875
- if (l((H) => !H), s) {
3876
- c == null || c(C);
3877
- return;
3878
- }
3879
- D == null || D(C);
3880
- }, N = de(
3881
- [ne["overflow-text"]],
3882
- [ne.expandable],
3883
- {
3884
- [ne.expanded]: s
3885
- }
3886
- );
3887
- return /* @__PURE__ */ y.jsxs(
3888
- "div",
3889
- {
3890
- ref: n,
3891
- className: N,
3892
- style: b,
3893
- "data-anv": "overflow-text",
3894
- ...f,
3895
- children: [
3896
- /* @__PURE__ */ y.jsx("div", { className: ne.content, children: a }),
3897
- /* @__PURE__ */ y.jsx(
3898
- "button",
3899
- {
3900
- className: ne["expand-button"],
3901
- onClick: m,
3902
- "aria-hidden": !0,
3903
- children: s ? I : p
3904
- }
3905
- )
3906
- ]
3907
- }
3908
- );
3909
- }
3910
- const v = de([ne["overflow-text"]]);
3911
- return /* @__PURE__ */ y.jsx(
3912
- "div",
3913
- {
3914
- ref: n,
3915
- className: v,
3916
- style: b,
3917
- "data-anv": "overflow-text",
3918
- ...g,
3919
- children: /* @__PURE__ */ y.jsx("div", { className: ne.content, children: a })
3920
- }
3921
- );
3922
- }
3923
- );
3924
- br.displayName = "OverflowText";
3925
- const wr = _e(
3926
- (e, n) => {
3927
- const { layoutStyles: r, componentProps: i } = Ce(e), {
3928
- children: o,
3929
- className: t,
3930
- direction: s = "column",
3931
- style: l,
3932
- height: d,
3933
- width: u,
3934
- truncate: a,
3935
- gap: g,
3936
- ...b
3937
- } = i, v = Z(null), [x, O] = X(!1), [h, D] = X({
3938
- left: !1,
3939
- right: !1,
3940
- top: !1,
3941
- bottom: !1
3942
- });
3943
- ue(() => {
3944
- if (!v.current)
3945
- return;
3946
- if (s === "row") {
3947
- const N = v.current.offsetWidth < v.current.scrollWidth;
3948
- D((C) => ({
3949
- ...C,
3950
- right: N
3951
- }));
3952
- return;
3953
- }
3954
- const m = v.current.offsetHeight < v.current.scrollHeight;
3955
- D((N) => ({
3956
- ...N,
3957
- bottom: m
3958
- }));
3959
- }, [s]);
3960
- const c = () => {
3961
- if (!v.current)
3962
- return;
3963
- const m = v.current;
3964
- if (s === "row") {
3965
- const H = m.scrollLeft > 0, M = m.scrollLeft < m.scrollWidth - m.offsetWidth;
3966
- D({
3967
- left: H,
3968
- right: M,
3969
- top: !1,
3970
- bottom: !1
3971
- });
3972
- return;
3973
- }
3974
- const N = m.scrollTop > 0, C = m.scrollTop < m.scrollHeight - m.offsetHeight;
3975
- D({
3976
- top: N,
3977
- bottom: C,
3978
- left: !1,
3979
- right: !1
3980
- });
3981
- }, f = de([ne.overflow], {
3982
- [ne.vertical]: s === "column",
3983
- [ne.horizontal]: s === "row",
3984
- [ne.truncate]: !!a,
3985
- [ne.expanded]: x
3986
- });
3987
- if (a) {
3988
- const m = {
3989
- ...l,
3990
- ...r
3991
- }, N = {
3992
- minHeight: d ?? void 0
3993
- }, C = typeof a == "object" ? a.expandText : "Show more...", H = typeof a == "object" ? a.collapseText : "Show less...", M = (S) => {
3994
- var R, V;
3995
- if (O((j) => !j), setTimeout(() => {
3996
- c();
3997
- }, 100), typeof a == "object") {
3998
- if (x) {
3999
- (R = a.onCollapse) == null || R.call(a, S);
4000
- return;
4001
- }
4002
- (V = a.onExpand) == null || V.call(a, S);
4003
- }
4004
- };
4005
- return /* @__PURE__ */ y.jsxs(
4006
- "div",
4007
- {
4008
- ref: n,
4009
- style: m,
4010
- className: f,
4011
- "data-anv": "overflow",
4012
- ...b,
4013
- children: [
4014
- h.top && !a ? /* @__PURE__ */ y.jsx("div", { className: ne["shadow-top"] }) : null,
4015
- h.left && !a ? /* @__PURE__ */ y.jsx("div", { className: ne["shadow-left"] }) : null,
4016
- /* @__PURE__ */ y.jsx(
4017
- gt,
4018
- {
4019
- className: ne.content,
4020
- onScroll: c,
4021
- style: N,
4022
- ref: v,
4023
- direction: s,
4024
- gap: g,
4025
- tabIndex: 0,
4026
- children: o
4027
- }
4028
- ),
4029
- h.bottom && !a ? /* @__PURE__ */ y.jsx("div", { className: ne["shadow-bottom"] }) : null,
4030
- h.right && !a ? /* @__PURE__ */ y.jsx("div", { className: ne["shadow-right"] }) : null,
4031
- /* @__PURE__ */ y.jsx(
4032
- "button",
4033
- {
4034
- className: ne["expand-button"],
4035
- onClick: M,
4036
- children: x ? H : C
4037
- }
4038
- )
4039
- ]
4040
- }
4041
- );
4042
- }
4043
- const p = {
4044
- ...l,
4045
- ...r
4046
- }, I = {
4047
- minHeight: d ?? void 0
4048
- };
4049
- return /* @__PURE__ */ y.jsxs(
4050
- "div",
4051
- {
4052
- ref: n,
4053
- style: p,
4054
- className: f,
4055
- "data-anv": "overflow",
4056
- ...b,
4057
- children: [
4058
- h.left ? /* @__PURE__ */ y.jsx("div", { className: ne["shadow-left"] }) : null,
4059
- h.top ? /* @__PURE__ */ y.jsx("div", { className: ne["shadow-top"] }) : null,
4060
- /* @__PURE__ */ y.jsx(
4061
- gt,
4062
- {
4063
- className: ne.content,
4064
- onScroll: c,
4065
- ref: v,
4066
- style: I,
4067
- direction: s,
4068
- gap: g,
4069
- tabIndex: 0,
4070
- children: o
4071
- }
4072
- ),
4073
- h.bottom ? /* @__PURE__ */ y.jsx("div", { className: ne["shadow-bottom"] }) : null,
4074
- h.right ? /* @__PURE__ */ y.jsx("div", { className: ne["shadow-right"] }) : null
4075
- ]
4076
- }
4077
- );
4078
- }
4079
- );
4080
- wr.displayName = "Overflow";
4081
- const Oa = Object.assign(wr, {
4082
- Text: br
4083
- });
4084
- var is = xt, ss = function(n) {
4085
- var r = ve.useRef(n);
4086
- return is(function() {
4087
- r.current = n;
4088
- }), r;
4089
- }, Sn = function(n, r) {
4090
- if (typeof n == "function") {
4091
- n(r);
4092
- return;
4093
- }
4094
- n.current = r;
4095
- }, as = function(n, r) {
4096
- var i = Z();
4097
- return ee(function(o) {
4098
- n.current = o, i.current && Sn(i.current, null), i.current = r, r && Sn(r, o);
4099
- }, [r]);
4100
- }, On = {
4101
- "min-height": "0",
4102
- "max-height": "none",
4103
- height: "0",
4104
- visibility: "hidden",
4105
- overflow: "hidden",
4106
- position: "absolute",
4107
- "z-index": "-1000",
4108
- top: "0",
4109
- right: "0"
4110
- }, ls = function(n) {
4111
- Object.keys(On).forEach(function(r) {
4112
- n.style.setProperty(r, On[r], "important");
4113
- });
4114
- }, Nn = ls, ce = null, Dn = function(n, r) {
4115
- var i = n.scrollHeight;
4116
- return r.sizingStyle.boxSizing === "border-box" ? i + r.borderSize : i - r.paddingSize;
4117
- };
4118
- function us(e, n, r, i) {
4119
- r === void 0 && (r = 1), i === void 0 && (i = 1 / 0), ce || (ce = document.createElement("textarea"), ce.setAttribute("tabindex", "-1"), ce.setAttribute("aria-hidden", "true"), Nn(ce)), ce.parentNode === null && document.body.appendChild(ce);
4120
- var o = e.paddingSize, t = e.borderSize, s = e.sizingStyle, l = s.boxSizing;
4121
- Object.keys(s).forEach(function(b) {
4122
- var v = b;
4123
- ce.style[v] = s[v];
4124
- }), Nn(ce), ce.value = n;
4125
- var d = Dn(ce, e);
4126
- ce.value = n, d = Dn(ce, e), ce.value = "x";
4127
- var u = ce.scrollHeight - o, a = u * r;
4128
- l === "border-box" && (a = a + o + t), d = Math.max(a, d);
4129
- var g = u * i;
4130
- return l === "border-box" && (g = g + o + t), d = Math.min(g, d), [d, u];
4131
- }
4132
- var Rn = function() {
4133
- }, ds = function(n, r) {
4134
- return n.reduce(function(i, o) {
4135
- return i[o] = r[o], i;
4136
- }, {});
4137
- }, cs = [
4138
- "borderBottomWidth",
4139
- "borderLeftWidth",
4140
- "borderRightWidth",
4141
- "borderTopWidth",
4142
- "boxSizing",
4143
- "fontFamily",
4144
- "fontSize",
4145
- "fontStyle",
4146
- "fontWeight",
4147
- "letterSpacing",
4148
- "lineHeight",
4149
- "paddingBottom",
4150
- "paddingLeft",
4151
- "paddingRight",
4152
- "paddingTop",
4153
- // non-standard
4154
- "tabSize",
4155
- "textIndent",
4156
- // non-standard
4157
- "textRendering",
4158
- "textTransform",
4159
- "width",
4160
- "wordBreak"
4161
- ], ps = !!document.documentElement.currentStyle, fs = function(n) {
4162
- var r = window.getComputedStyle(n);
4163
- if (r === null)
4164
- return null;
4165
- var i = ds(cs, r), o = i.boxSizing;
4166
- if (o === "")
4167
- return null;
4168
- ps && o === "border-box" && (i.width = parseFloat(i.width) + parseFloat(i.borderRightWidth) + parseFloat(i.borderLeftWidth) + parseFloat(i.paddingRight) + parseFloat(i.paddingLeft) + "px");
4169
- var t = parseFloat(i.paddingBottom) + parseFloat(i.paddingTop), s = parseFloat(i.borderBottomWidth) + parseFloat(i.borderTopWidth);
4170
- return {
4171
- sizingStyle: i,
4172
- paddingSize: t,
4173
- borderSize: s
4174
- };
4175
- }, hs = fs;
4176
- function Er(e, n, r) {
4177
- var i = ss(r);
4178
- ve.useLayoutEffect(function() {
4179
- var o = function(s) {
4180
- return i.current(s);
4181
- };
4182
- if (e)
4183
- return e.addEventListener(n, o), function() {
4184
- return e.removeEventListener(n, o);
4185
- };
4186
- }, []);
4187
- }
4188
- var gs = function(n) {
4189
- Er(window, "resize", n);
4190
- }, ms = function(n) {
4191
- Er(document.fonts, "loadingdone", n);
4192
- }, vs = ["cacheMeasurements", "maxRows", "minRows", "onChange", "onHeightChange"], _s = function(n, r) {
4193
- var i = n.cacheMeasurements, o = n.maxRows, t = n.minRows, s = n.onChange, l = s === void 0 ? Rn : s, d = n.onHeightChange, u = d === void 0 ? Rn : d, a = me(n, vs), g = a.value !== void 0, b = ve.useRef(null), v = as(b, r), x = ve.useRef(0), O = ve.useRef(), h = function() {
4194
- var f = b.current, p = i && O.current ? O.current : hs(f);
4195
- if (p) {
4196
- O.current = p;
4197
- var I = us(p, f.value || f.placeholder || "x", t, o), m = I[0], N = I[1];
4198
- x.current !== m && (x.current = m, f.style.setProperty("height", m + "px", "important"), u(m, {
4199
- rowHeight: N
4200
- }));
4201
- }
4202
- }, D = function(f) {
4203
- g || h(), l(f);
4204
- };
4205
- return ve.useLayoutEffect(h), gs(h), ms(h), /* @__PURE__ */ ve.createElement("textarea", $({}, a, {
4206
- onChange: D,
4207
- ref: v
4208
- }));
4209
- }, Is = /* @__PURE__ */ ve.forwardRef(_s);
4210
- const ys = "_textarea_1bgqi_4", xs = "_counter_1bgqi_50", bs = "_error_1bgqi_62", ws = "_disabled_1bgqi_69", Es = "_readonly_1bgqi_79", Ve = {
4211
- textarea: ys,
4212
- "has-cols": "_has-cols_1bgqi_23",
4213
- counter: xs,
4214
- error: bs,
4215
- disabled: ws,
4216
- "disable-resize": "_disable-resize_1bgqi_76",
4217
- readonly: Es
4218
- }, Cs = _e(
4219
- (e, n) => {
4220
- const { layoutStyles: r, componentProps: i } = Ce(e), {
4221
- className: o,
4222
- disableResize: t,
4223
- error: s,
4224
- // errorAriaLive: errorAriaLiveProp = "assertive",
4225
- hint: l,
4226
- description: d,
4227
- label: u,
4228
- moreInfo: a,
4229
- onChange: g,
4230
- required: b,
4231
- showCounter: v,
4232
- onFocus: x,
4233
- onBlur: O,
4234
- id: h,
4235
- maxLength: D,
4236
- autoHeight: c,
4237
- labelProps: f,
4238
- placeholder: p,
4239
- style: I,
4240
- ...m
4241
- } = i, N = Z(null), [C, H] = X(0), [M, S] = X(!1), [R, V] = X(!1), [j, B] = X("off");
4242
- ue(() => {
4243
- var T;
4244
- H(((T = N.current) == null ? void 0 : T.defaultValue.length) ?? 0);
4245
- }, []);
4246
- const U = (T) => {
4247
- g == null || g(T, { value: T.target.value }), C !== T.target.value.length && S(!0), H(T.target.value.length);
4248
- }, K = (T) => {
4249
- x == null || x(T), V(!0);
4250
- }, J = (T) => {
4251
- O == null || O(T), V(!1), B("off"), S(!1);
4252
- }, Q = ye(), A = h ?? Q, z = ye(), q = ye(), oe = typeof s != "boolean" ? s : void 0, P = de([Ve.textarea], o, {
4253
- [Ve.error]: s,
4254
- [Ve["disable-resize"]]: t,
4255
- [Ve.disabled]: m.disabled,
4256
- [Ve.readonly]: m.readOnly,
4257
- [Ve["has-cols"]]: m.cols != null
4258
- }), k = { ...I, ...r }, w = c ? Is : "textarea";
4259
- return /* @__PURE__ */ y.jsxs(
4260
- "div",
4261
- {
4262
- className: P,
4263
- "data-anv": "textarea",
4264
- style: k,
4265
- children: [
4266
- u ? /* @__PURE__ */ y.jsx(
4267
- yt,
4268
- {
4269
- htmlFor: A,
4270
- moreInfo: a,
4271
- openMoreInfo: R,
4272
- required: b,
4273
- ...f,
4274
- children: u
4275
- }
4276
- ) : null,
4277
- /* @__PURE__ */ y.jsx(
4278
- w,
4279
- {
4280
- rows: 3,
4281
- onChange: U,
4282
- onFocus: K,
4283
- onBlur: J,
4284
- ref: qe([n, N]),
4285
- required: b,
4286
- maxLength: D,
4287
- id: A,
4288
- placeholder: p,
4289
- ...m,
4290
- "aria-describedby": [q, z].join(" "),
4291
- "aria-invalid": s ? !!s : void 0
4292
- }
4293
- ),
4294
- l || v || oe || d ? /* @__PURE__ */ y.jsx(
4295
- wt,
4296
- {
4297
- id: z,
4298
- hint: l,
4299
- maxLength: D,
4300
- inputLength: C,
4301
- isTyping: M,
4302
- showCounter: v,
4303
- errorMessage: oe,
4304
- errorAriaLive: j,
4305
- description: d
4306
- }
4307
- ) : null,
4308
- /* @__PURE__ */ y.jsx(Mn, { "aria-hidden": !0, id: q, children: p })
4309
- ]
4310
- }
4311
- );
4312
- }
4313
- );
4314
- Cs.displayName = "Textarea";
4315
- const Ss = "_textfield_1acx5_4", Os = "_input_1acx5_17", Ns = "_prefix_1acx5_43", Ds = "_suffix_1acx5_44", Rs = "_small_1acx5_101", Ps = "_large_1acx5_104", Ms = "_error_1acx5_113", Ee = {
4316
- textfield: Ss,
4317
- input: Os,
4318
- "input-wrapper": "_input-wrapper_1acx5_30",
4319
- prefix: Ns,
4320
- suffix: Ds,
4321
- "loading-spinner": "_loading-spinner_1acx5_63",
4322
- small: Rs,
4323
- large: Ps,
4324
- error: Ms
4325
- }, ks = _e(
4326
- function(e, n) {
4327
- const { layoutStyles: r, componentProps: i } = Ce(e), {
4328
- className: o,
4329
- error: t,
4330
- errorAriaLive: s = "assertive",
4331
- label: l,
4332
- moreInfo: d,
4333
- prefix: u,
4334
- suffix: a,
4335
- size: g,
4336
- type: b = "text",
4337
- required: v,
4338
- onFocus: x,
4339
- onBlur: O,
4340
- id: h,
4341
- description: D,
4342
- hint: c,
4343
- loading: f,
4344
- disabled: p,
4345
- labelProps: I,
4346
- style: m,
4347
- placeholder: N,
4348
- ...C
4349
- } = i, [H, M] = X(!1), [S, R] = X("off"), V = (P) => {
4350
- x == null || x(P), M(!0), R(s);
4351
- }, j = (P) => {
4352
- O == null || O(P), M(!1), R("off");
4353
- }, B = ye(), U = h ?? B, K = ye(), J = ye(), Q = ye(), A = ye(), z = Z(null), q = typeof t != "boolean" ? t : void 0, oe = { ...m, ...r };
4354
- return /* @__PURE__ */ y.jsxs(
4355
- "div",
4356
- {
4357
- className: de(Ee.textfield, o),
4358
- "data-anv": "textfield",
4359
- style: oe,
4360
- children: [
4361
- l ? /* @__PURE__ */ y.jsx(
4362
- yt,
4363
- {
4364
- moreInfo: d,
4365
- openMoreInfo: H,
4366
- required: v,
4367
- htmlFor: U,
4368
- ...I,
4369
- children: l
4370
- }
4371
- ) : null,
4372
- /* @__PURE__ */ y.jsxs(
4373
- "div",
4374
- {
4375
- className: de(Ee["input-wrapper"], {
4376
- [Ee.small]: g === "small",
4377
- [Ee.large]: g === "large"
4378
- }),
4379
- role: "presentation",
4380
- onClick: () => {
4381
- var P;
4382
- return (P = z.current) == null ? void 0 : P.focus();
4383
- },
4384
- children: [
4385
- u ? /* @__PURE__ */ y.jsx(
4386
- "div",
4387
- {
4388
- "aria-hidden": !0,
4389
- className: Ee.prefix,
4390
- id: `prefix${K}`,
4391
- children: u
4392
- }
4393
- ) : null,
4394
- /* @__PURE__ */ y.jsx(
4395
- "input",
4396
- {
4397
- id: U,
4398
- className: de(Ee.input, {
4399
- [Ee.error]: t
4400
- }),
4401
- onFocus: V,
4402
- onBlur: j,
4403
- ref: qe([n, z]),
4404
- required: v,
4405
- placeholder: N,
4406
- type: b,
4407
- disabled: p,
4408
- ...C,
4409
- "aria-describedby": [A, Q].join(" "),
4410
- "aria-invalid": t ? !!t : void 0
4411
- }
4412
- ),
4413
- f ? /* @__PURE__ */ y.jsx(Sr, { className: Ee["loading-spinner"] }) : null,
4414
- a ? /* @__PURE__ */ y.jsx(
4415
- "div",
4416
- {
4417
- className: Ee.suffix,
4418
- "aria-hidden": !0,
4419
- id: `suffix${J}`,
4420
- children: a
4421
- }
4422
- ) : null
4423
- ]
4424
- }
4425
- ),
4426
- c || q || D ? /* @__PURE__ */ y.jsx(
4427
- wt,
4428
- {
4429
- id: Q,
4430
- hint: c,
4431
- errorMessage: q,
4432
- errorAriaLive: S,
4433
- description: D
4434
- }
4435
- ) : null,
4436
- /* @__PURE__ */ y.jsx(Mn, { "aria-hidden": !0, id: A, children: N })
4437
- ]
4438
- }
4439
- );
4440
- }
4441
- ), Na = Object.assign(ks, {});
4442
- export {
4443
- on as A,
4444
- Ea as C,
4445
- Ca as H,
4446
- br as I,
4447
- gi as P,
4448
- yi as R,
4449
- Sa as V,
4450
- Na as b,
4451
- Cs as d,
4452
- Ii as j,
4453
- Oa as o,
4454
- Zi as q,
4455
- _i as y
4456
- };
4457
- //# sourceMappingURL=index-cfd364c0.js.map