@slotted/react 0.1.0-beta.3 → 0.1.0-beta.5

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 (245) hide show
  1. package/README.md +16 -1
  2. package/dist/{accordion-D-YuMJzk.js → accordion-lCqrmQ3w.js} +43 -43
  3. package/dist/accordion.js +1 -1
  4. package/dist/{action-bar-OACchRZw.js → action-bar-ti3e6FK1.js} +1 -1
  5. package/dist/action-bar.js +1 -1
  6. package/dist/{app-shell-CmYvnu_7.js → app-shell-nnSP44OO.js} +271 -267
  7. package/dist/app-shell.js +1 -1
  8. package/dist/bin/slotted-agent-docs.mjs +297 -0
  9. package/dist/calendar-BZ6PP7Ke.js +436 -0
  10. package/dist/calendar.js +1 -1
  11. package/dist/{cascader-D1AhTyBL.js → cascader-Cn2Acpcv.js} +227 -210
  12. package/dist/cascader.js +1 -1
  13. package/dist/chart-04i6NZQA.js +968 -0
  14. package/dist/chart.js +1 -1
  15. package/dist/{checkbox-DfxFHZaU.js → checkbox-B4Sb1eXj.js} +3 -3
  16. package/dist/{checkbox-group-9sDgrV5Z.js → checkbox-group-LpGMuq9w.js} +2 -2
  17. package/dist/checkbox-group.js +1 -1
  18. package/dist/checkbox.js +1 -1
  19. package/dist/{code-block-CFHf8uTm.js → code-block-CTNiyt0U.js} +1 -1
  20. package/dist/code-block.js +1 -1
  21. package/dist/{collapsible-CGo49NNW.js → collapsible-F-K36XbF.js} +17 -17
  22. package/dist/collapsible.js +1 -1
  23. package/dist/{color-picker-CwbWzCKg.js → color-picker-BcRCeISx.js} +4 -4
  24. package/dist/color-picker.js +1 -1
  25. package/dist/{column-manager-CTtizVhm.js → column-manager-BtkYLs5G.js} +4 -4
  26. package/dist/column-manager.js +1 -1
  27. package/dist/{combobox-BVMI9lg8.js → combobox-C1D5doWM.js} +227 -198
  28. package/dist/combobox.js +1 -1
  29. package/dist/{context-menu-BuST6W94.js → context-menu-B00UIBVC.js} +1 -1
  30. package/dist/context-menu.js +1 -1
  31. package/dist/{currency-field-DD9A5U3D.js → currency-field-Dti9JFu0.js} +1 -1
  32. package/dist/currency-field.js +1 -1
  33. package/dist/{dashboard-grid-CBMP_-JV.js → dashboard-grid-CoLKLvYL.js} +1 -1
  34. package/dist/dashboard-grid.js +1 -1
  35. package/dist/{data-grid-BKaGMqIm.js → data-grid-DX95Y7mY.js} +18 -18
  36. package/dist/data-grid.js +1 -1
  37. package/dist/{data-list-oICmxGkA.js → data-list-CWYTPNm-.js} +2 -2
  38. package/dist/data-list.js +1 -1
  39. package/dist/date-field-BxEpqAPg.js +290 -0
  40. package/dist/date-field.js +1 -1
  41. package/dist/date-picker-DRk9SZp1.js +308 -0
  42. package/dist/date-picker.js +1 -1
  43. package/dist/date-range-picker-6Yz7avTS.js +483 -0
  44. package/dist/date-range-picker.js +1 -1
  45. package/dist/{datetime-field-B8TrmsDK.js → datetime-field-D2f9u6im.js} +1 -1
  46. package/dist/datetime-field.js +1 -1
  47. package/dist/datetime-picker-STqSWMkH.js +645 -0
  48. package/dist/datetime-picker.js +1 -1
  49. package/dist/datetime-range-picker-DQNQwr3K.js +1000 -0
  50. package/dist/datetime-range-picker.js +1 -1
  51. package/dist/{detail-panel-qOJiNuzr.js → detail-panel-z6WGleP4.js} +3 -3
  52. package/dist/detail-panel.js +1 -1
  53. package/dist/docs/AGENTS.snippet.md +2 -0
  54. package/dist/docs/app-shell.examples.md +1 -1
  55. package/dist/docs/app-shell.json +4 -4
  56. package/dist/docs/app-shell.md +2 -2
  57. package/dist/docs/calendar.json +7 -0
  58. package/dist/docs/calendar.md +1 -0
  59. package/dist/docs/collapsible.json +1 -1
  60. package/dist/docs/collapsible.md +1 -1
  61. package/dist/docs/date-field.json +8 -1
  62. package/dist/docs/date-field.md +2 -1
  63. package/dist/docs/date-picker.examples.md +29 -0
  64. package/dist/docs/date-picker.json +16 -1
  65. package/dist/docs/date-picker.md +2 -1
  66. package/dist/docs/guidelines/README.md +2 -2
  67. package/dist/docs/guidelines/composition.md +10 -0
  68. package/dist/docs/guidelines/index.md +3 -1
  69. package/dist/docs/guidelines/list-pages.md +12 -1
  70. package/dist/docs/guidelines/own-elements.md +1 -1
  71. package/dist/docs/page-header.json +1 -0
  72. package/dist/docs/page-header.md +1 -1
  73. package/dist/docs/page.json +1 -0
  74. package/dist/docs/page.md +1 -0
  75. package/dist/docs/select.json +1 -1
  76. package/dist/docs/select.md +1 -1
  77. package/dist/docs/skills/build-own-element/SKILL.md +6 -6
  78. package/dist/docs/skills/compose-screen/SKILL.md +13 -6
  79. package/dist/docs/skills/review-screen/SKILL.md +6 -6
  80. package/dist/docs/skills/theme-app/SKILL.md +1 -1
  81. package/dist/docs/skills/waiting-states/SKILL.md +2 -2
  82. package/dist/docs/table.json +13 -0
  83. package/dist/docs/table.md +3 -1
  84. package/dist/docs/tabs.json +22 -4
  85. package/dist/docs/tabs.md +6 -3
  86. package/dist/docs/text-field.json +1 -1
  87. package/dist/docs/text-field.md +1 -1
  88. package/dist/{entity-picker-CPDd73JR.js → entity-picker-BdySwW8F.js} +274 -256
  89. package/dist/entity-picker.js +1 -1
  90. package/dist/{event-calendar-CnF3iIZD.js → event-calendar-CiphPXdV.js} +4 -4
  91. package/dist/event-calendar.js +1 -1
  92. package/dist/{field-NJaCxl2h.js → field-BxQFpOXS.js} +1 -1
  93. package/dist/{field-group-hAzVa2O9.js → field-group-DcN_hiZN.js} +1 -1
  94. package/dist/field-group.js +1 -1
  95. package/dist/field.js +1 -1
  96. package/dist/{filter-bar-D_xDcAp2.js → filter-bar-C_dXljI_.js} +10 -10
  97. package/dist/filter-bar.js +1 -1
  98. package/dist/{hover-card-BJE5dtaQ.js → hover-card-DpVzwvDJ.js} +1 -1
  99. package/dist/hover-card.js +1 -1
  100. package/dist/{import-export-center-DpY2DGBZ.js → import-export-center-BQnMJz4g.js} +3 -3
  101. package/dist/import-export-center.js +1 -1
  102. package/dist/index.js +68 -68
  103. package/dist/{listbox-Dv856z9I.js → listbox-D0MJcAMm.js} +1 -1
  104. package/dist/listbox.js +1 -1
  105. package/dist/{markdown-CeG8mUbI.js → markdown-IiVoh6yi.js} +2 -2
  106. package/dist/markdown.js +1 -1
  107. package/dist/menu-parts-D6v_mz6O.js +809 -0
  108. package/dist/menu.js +1 -1
  109. package/dist/{menubar-b2CruimJ.js → menubar-DApIg1eR.js} +1 -1
  110. package/dist/menubar.js +1 -1
  111. package/dist/{multi-select-DQ5ds0fX.js → multi-select-B8z6ApgW.js} +286 -257
  112. package/dist/multi-select.js +1 -1
  113. package/dist/{notification-center-Sz54IziY.js → notification-center-CGEEHcRA.js} +2 -2
  114. package/dist/notification-center.js +1 -1
  115. package/dist/{number-field-BFIAmv-z.js → number-field-DXk1TAXA.js} +1 -1
  116. package/dist/number-field.js +1 -1
  117. package/dist/{otp-input-BNQhuKaT.js → otp-input-CI-kdNgx.js} +1 -1
  118. package/dist/otp-input.js +1 -1
  119. package/dist/{page-kQgLctsA.js → page-IiYXk1sz.js} +32 -32
  120. package/dist/{page-header-CWEBfMGq.js → page-header-Bn4nIGfF.js} +1 -1
  121. package/dist/page-header.js +1 -1
  122. package/dist/page.js +1 -1
  123. package/dist/{popover-Be7JWbGJ.js → popover-DEp8Bf3e.js} +186 -166
  124. package/dist/popover.js +1 -1
  125. package/dist/{prompt-composer-BxpdkTpZ.js → prompt-composer-DdcU3S3L.js} +1 -1
  126. package/dist/prompt-composer.js +1 -1
  127. package/dist/{radio-group-BaVIP9UH.js → radio-group-D8csBZ8Z.js} +2 -2
  128. package/dist/radio-group.js +1 -1
  129. package/dist/{rating-DYBQBzwB.js → rating-rI3b5zII.js} +1 -1
  130. package/dist/rating.js +1 -1
  131. package/dist/{saved-views-DlE_--Z9.js → saved-views-B3brBTD9.js} +4 -4
  132. package/dist/saved-views.js +1 -1
  133. package/dist/scroll-area-DQ_ansLu.js +112 -0
  134. package/dist/scroll-area.js +1 -1
  135. package/dist/{segmented-control-DmuOGiu6.js → segmented-control-C-PzkTtg.js} +2 -2
  136. package/dist/segmented-control.js +1 -1
  137. package/dist/{select-DOFqPy26.js → select-BUylPwpb.js} +309 -258
  138. package/dist/select.js +1 -1
  139. package/dist/{side-navigation-CBLtCzuJ.js → side-navigation-Bm-BZma1.js} +156 -140
  140. package/dist/side-navigation.js +1 -1
  141. package/dist/{slider-DTes4HLF.js → slider-fp7kyg-6.js} +1 -1
  142. package/dist/slider.js +1 -1
  143. package/dist/{split-button-CPgHiy9G.js → split-button-DKRm0j5c.js} +1 -1
  144. package/dist/split-button.js +1 -1
  145. package/dist/styles.css +1 -1
  146. package/dist/{switch-DQzuIhPX.js → switch-aVoc4C2F.js} +1 -1
  147. package/dist/switch.js +1 -1
  148. package/dist/{table-Cipi2c5X.js → table-BYEvFr4P.js} +206 -203
  149. package/dist/table.js +1 -1
  150. package/dist/tabs-HWmvOKM4.js +355 -0
  151. package/dist/tabs.js +1 -1
  152. package/dist/{tags-input-CcOkm0AW.js → tags-input-pbv6x1Pi.js} +1 -1
  153. package/dist/tags-input.js +1 -1
  154. package/dist/{text-field-DLfIZ0fk.js → text-field-CbQ6UCAP.js} +1 -1
  155. package/dist/text-field.js +1 -1
  156. package/dist/{textarea-CBJBJBi6.js → textarea-DJSfhrXH.js} +1 -1
  157. package/dist/textarea.js +1 -1
  158. package/dist/{time-field-DrhiCtUl.js → time-field-BI9n607q.js} +1 -1
  159. package/dist/time-field.js +1 -1
  160. package/dist/time-picker-D6SlQWNF.js +402 -0
  161. package/dist/time-picker.js +1 -1
  162. package/dist/time-range-picker-CcV3_45h.js +751 -0
  163. package/dist/time-range-picker.js +1 -1
  164. package/dist/{toggle-group-7iBR9Rn1.js → toggle-group-i7JPO8BM.js} +1 -1
  165. package/dist/toggle-group.js +1 -1
  166. package/dist/{toolbar-DDZpEftQ.js → toolbar-B9knmgHA.js} +1 -1
  167. package/dist/toolbar.js +1 -1
  168. package/dist/tooltip-CgjIROUy.js +410 -0
  169. package/dist/tooltip.js +1 -1
  170. package/dist/{top-navigation-e-tWMGNr.js → top-navigation-DiG2PF5W.js} +2 -2
  171. package/dist/top-navigation.js +1 -1
  172. package/dist/{transfer-CqZOTLMP.js → transfer--UOQVeKE.js} +5 -5
  173. package/dist/transfer.js +1 -1
  174. package/dist/types/accordion/accordion.d.ts.map +1 -1
  175. package/dist/types/app-shell/app-shell-parts.d.ts +6 -4
  176. package/dist/types/app-shell/app-shell-parts.d.ts.map +1 -1
  177. package/dist/types/app-shell/app-shell.d.ts.map +1 -1
  178. package/dist/types/calendar/calendar.d.ts +1 -1
  179. package/dist/types/calendar/calendar.d.ts.map +1 -1
  180. package/dist/types/calendar/calendar.types.d.ts +9 -0
  181. package/dist/types/calendar/calendar.types.d.ts.map +1 -1
  182. package/dist/types/calendar/index.d.ts +1 -1
  183. package/dist/types/calendar/index.d.ts.map +1 -1
  184. package/dist/types/cascader/cascader.d.ts.map +1 -1
  185. package/dist/types/chart/chart.d.ts.map +1 -1
  186. package/dist/types/collapsible/collapsible-parts.d.ts.map +1 -1
  187. package/dist/types/combobox/combobox-parts.d.ts.map +1 -1
  188. package/dist/types/date-field/date-field.d.ts +1 -1
  189. package/dist/types/date-field/date-field.d.ts.map +1 -1
  190. package/dist/types/date-field/date-field.types.d.ts +7 -0
  191. package/dist/types/date-field/date-field.types.d.ts.map +1 -1
  192. package/dist/types/date-picker/date-picker.d.ts +5 -1
  193. package/dist/types/date-picker/date-picker.d.ts.map +1 -1
  194. package/dist/types/date-picker/date-picker.types.d.ts +20 -2
  195. package/dist/types/date-picker/date-picker.types.d.ts.map +1 -1
  196. package/dist/types/date-picker/index.d.ts +1 -1
  197. package/dist/types/date-picker/index.d.ts.map +1 -1
  198. package/dist/types/date-range-picker/date-range-picker.d.ts.map +1 -1
  199. package/dist/types/datetime-picker/datetime-picker.d.ts.map +1 -1
  200. package/dist/types/datetime-range-picker/datetime-range-picker.d.ts.map +1 -1
  201. package/dist/types/entity-picker/entity-picker-popup.d.ts.map +1 -1
  202. package/dist/types/menu/menu-parts.d.ts.map +1 -1
  203. package/dist/types/multi-select/multi-select-parts.d.ts.map +1 -1
  204. package/dist/types/page/page.d.ts.map +1 -1
  205. package/dist/types/popover/popover-parts.d.ts.map +1 -1
  206. package/dist/types/scroll-area/scroll-area.d.ts.map +1 -1
  207. package/dist/types/select/select-items.d.ts.map +1 -1
  208. package/dist/types/select/select-parts.d.ts.map +1 -1
  209. package/dist/types/select/select.d.ts.map +1 -1
  210. package/dist/types/side-navigation/side-navigation-parts.d.ts.map +1 -1
  211. package/dist/types/stat-card/stat-card.types.d.ts +2 -2
  212. package/dist/types/stat-card/stat-card.types.d.ts.map +1 -1
  213. package/dist/types/table/index.d.ts +1 -1
  214. package/dist/types/table/index.d.ts.map +1 -1
  215. package/dist/types/table/table-content.d.ts.map +1 -1
  216. package/dist/types/table/table-defaults.d.ts.map +1 -1
  217. package/dist/types/table/table.d.ts +1 -1
  218. package/dist/types/table/table.d.ts.map +1 -1
  219. package/dist/types/table/table.types.d.ts +15 -0
  220. package/dist/types/table/table.types.d.ts.map +1 -1
  221. package/dist/types/tabs/tabs-parts.d.ts +2 -4
  222. package/dist/types/tabs/tabs-parts.d.ts.map +1 -1
  223. package/dist/types/tabs/tabs.d.ts +1 -1
  224. package/dist/types/tabs/tabs.d.ts.map +1 -1
  225. package/dist/types/tabs/tabs.types.d.ts +18 -0
  226. package/dist/types/tabs/tabs.types.d.ts.map +1 -1
  227. package/dist/types/time-picker/time-picker.d.ts.map +1 -1
  228. package/dist/types/time-range-picker/time-range-picker.d.ts.map +1 -1
  229. package/dist/types/tooltip/tooltip-parts.d.ts.map +1 -1
  230. package/dist/{upload-DjnlVR8y.js → upload-CLX5cURk.js} +1 -1
  231. package/dist/upload.js +1 -1
  232. package/package.json +10 -7
  233. package/dist/calendar-B3mio8iQ.js +0 -387
  234. package/dist/chart-O0ZhkzJe.js +0 -966
  235. package/dist/date-field-CYcN6diW.js +0 -279
  236. package/dist/date-picker-4X-_2ltN.js +0 -264
  237. package/dist/date-range-picker-CNOAtHwU.js +0 -471
  238. package/dist/datetime-picker-HDVlUhzy.js +0 -629
  239. package/dist/datetime-range-picker-IqOFJtdW.js +0 -994
  240. package/dist/menu-parts-W58pVNUt.js +0 -786
  241. package/dist/scroll-area-BriwmvYY.js +0 -111
  242. package/dist/tabs-DQ36APY-.js +0 -343
  243. package/dist/time-picker-CRQsMJbQ.js +0 -396
  244. package/dist/time-range-picker-DlZJsj1e.js +0 -745
  245. package/dist/tooltip-DbKTPe_i.js +0 -392
@@ -3,26 +3,26 @@ import { n, r } from "./i18n-DpW8lqJ1.js";
3
3
  /* empty css */
4
4
  import { t as i } from "./avatar-BnlE5jjr.js";
5
5
  /* empty css */
6
- import { b as a } from "./field-NJaCxl2h.js";
6
+ import { b as a } from "./field-BxQFpOXS.js";
7
7
  /* empty css */
8
8
  import { t as o } from "./highlight-0Qw23QPp.js";
9
- import { c as s, i as c, n as l, o as ee, s as te } from "./select-DOFqPy26.js";
10
- import { createArrowNavigation as ne, createRemovalFocus as re } from "@slotted/core/focus";
11
- import { createControllable as u } from "@slotted/core/state";
12
- import { createContext as ie, useCallback as d, useContext as f, useEffect as p, useId as ae, useImperativeHandle as oe, useLayoutEffect as se, useMemo as m, useRef as h, useState as g } from "react";
13
- import { Fragment as ce, jsx as _, jsxs as v } from "react/jsx-runtime";
14
- import { createCollapse as y } from "@slotted/core/overflow";
15
- import { createPresence as le } from "@slotted/core/presence";
16
- import { createPortalRoot as ue } from "@slotted/core/portal";
17
- import { createDismissableLayer as de, pressOrigin as fe } from "@slotted/core/dismissable-layer";
18
- import { createPositioner as pe } from "@slotted/core/positioner";
19
- import { createPortal as me } from "react-dom";
20
- import { entityPickerMessages as he } from "@slotted/core/i18n";
21
- import { getLiveAnnouncer as ge } from "@slotted/core/live-announcer";
22
- import { moveIndex as _e } from "@slotted/core/collection";
23
- import { CREATE_OPTION as b, CREATE_OPTION as x, RETRY_OPTION as ve, RETRY_OPTION as S, createEntityCache as ye, createEntityResolver as be, createEntitySearch as xe, entityInitials as Se, entityName as C, entityOptions as Ce, entityPickerKey as we, entitySections as Te, localEntitySource as Ee, localEntitySource as De, offersCreation as Oe, rememberRecent as ke } from "@slotted/core/entity-picker";
9
+ import { c as s, i as c, n as l, o as ee, s as u } from "./select-BUylPwpb.js";
10
+ import { createArrowNavigation as te, createRemovalFocus as ne } from "@slotted/core/focus";
11
+ import { createControllable as d } from "@slotted/core/state";
12
+ import { createContext as f, useCallback as p, useContext as re, useEffect as m, useId as ie, useImperativeHandle as h, useLayoutEffect as g, useMemo as _, useRef as v, useState as y } from "react";
13
+ import { Fragment as ae, jsx as b, jsxs as x } from "react/jsx-runtime";
14
+ import { createCollapse as S } from "@slotted/core/overflow";
15
+ import { createPresence as oe } from "@slotted/core/presence";
16
+ import { createPortalRoot as se } from "@slotted/core/portal";
17
+ import { createDismissableLayer as ce, pressOrigin as le } from "@slotted/core/dismissable-layer";
18
+ import { createPositioner as ue } from "@slotted/core/positioner";
19
+ import { createPortal as de } from "react-dom";
20
+ import { entityPickerMessages as fe } from "@slotted/core/i18n";
21
+ import { getLiveAnnouncer as pe } from "@slotted/core/live-announcer";
22
+ import { moveIndex as me } from "@slotted/core/collection";
23
+ import { CREATE_OPTION as C, CREATE_OPTION as he, RETRY_OPTION as ge, RETRY_OPTION as w, createEntityCache as T, createEntityResolver as _e, createEntitySearch as ve, entityInitials as ye, entityName as be, entityOptions as xe, entityPickerKey as Se, entitySections as Ce, localEntitySource as we, localEntitySource as Te, offersCreation as Ee, rememberRecent as De } from "@slotted/core/entity-picker";
24
24
  //#region src/entity-picker/entity-picker-defaults.tsx
25
- var w = {
25
+ var Oe = {
26
26
  clearable: !0,
27
27
  disabled: !1,
28
28
  fullWidth: !0,
@@ -42,22 +42,22 @@ var w = {
42
42
  strategy: "absolute",
43
43
  variant: "outline",
44
44
  width: "content"
45
- }, Ae = ie(w);
46
- function je() {
47
- return f(Ae);
45
+ }, ke = f(Oe);
46
+ function Ae() {
47
+ return re(ke);
48
48
  }
49
- function Me({ children: e, ...t }) {
50
- let n = { ...je() };
49
+ function je({ children: e, ...t }) {
50
+ let n = { ...Ae() };
51
51
  for (let [e, r] of Object.entries(t)) r !== void 0 && (n[e] = r);
52
- return /* @__PURE__ */ _(Ae.Provider, {
52
+ return /* @__PURE__ */ b(ke.Provider, {
53
53
  value: n,
54
54
  children: e
55
55
  });
56
56
  }
57
57
  //#endregion
58
58
  //#region src/entity-picker/entity-picker-control.tsx
59
- var Ne = "[data-part='chips'] > [data-ui='tag']:not([data-count])";
60
- function T(e, t) {
59
+ var Me = "[data-part='chips'] > [data-ui='tag']:not([data-count])";
60
+ function Ne(e, t) {
61
61
  return (n) => {
62
62
  e?.(n), n.defaultPrevented || t(n);
63
63
  };
@@ -77,9 +77,9 @@ var Fe = {
77
77
  width: "1px"
78
78
  };
79
79
  function Ie({ entity: e, locale: t }) {
80
- return e.avatar === null ? null : /* @__PURE__ */ _(i, {
80
+ return e.avatar === null ? null : /* @__PURE__ */ b(i, {
81
81
  decorative: !0,
82
- initials: Se(e),
82
+ initials: ye(e),
83
83
  locale: t,
84
84
  name: e.avatar?.name ?? e.label,
85
85
  shape: e.avatar?.shape ?? "circle",
@@ -88,12 +88,12 @@ function Ie({ entity: e, locale: t }) {
88
88
  });
89
89
  }
90
90
  function Le() {
91
- let n = k(), r = a(), { props: i } = n, { "aria-describedby": o, "aria-label": u, form: ie, id: f, name: ae, onBlur: oe, onClick: m, onFocus: le, onKeyDown: ue, placeholder: de, ref: pe, render: me, source: he, items: ge, entities: b, favorites: x, recent: ve, scopes: S, scope: ye, defaultScope: be, onScopeChange: xe, inputValue: Se, defaultInputValue: C, onInputValueChange: Ce, open: Te, defaultOpen: Ee, onOpenChange: De, highlightedValue: Oe, defaultHighlightedValue: ke, onHighlightedValueChange: w, onCreate: Ae, renderOption: je, renderChip: Me, handleRef: Le, locale: D, max: O, clearable: Re, disabled: ze, fullWidth: A, highlightMatch: Be, invalid: Ve, messages: He, loop: Ue, media: We, minQueryLength: Ge, openOn: j, overflow: Ke, portal: qe, readOnly: Je, required: Ye, searchDelay: Xe, side: Ze, size: Qe, strategy: $e, variant: et, width: M, selectionMode: tt, value: N, defaultValue: nt, onValueChange: rt, ...it } = i, { t: P, multiple: F } = n, I = n.chosen, at = h(null), L = h(null), [ot, st] = g(0), ct = d((e) => {
92
- n.setInputNode(e), Pe(e, pe);
93
- }, [pe]), lt = (e, t) => {
91
+ let n = k(), r = a(), { props: i } = n, { "aria-describedby": o, "aria-label": d, form: f, id: re, name: ie, onBlur: h, onClick: _, onFocus: oe, onKeyDown: se, placeholder: ce, ref: ue, render: de, source: fe, items: pe, entities: C, favorites: he, recent: ge, scopes: w, scope: T, defaultScope: _e, onScopeChange: ve, inputValue: ye, defaultInputValue: be, onInputValueChange: xe, open: Ce, defaultOpen: we, onOpenChange: Te, highlightedValue: Ee, defaultHighlightedValue: De, onHighlightedValueChange: Oe, onCreate: ke, renderOption: Ae, renderChip: je, handleRef: Le, locale: D, max: O, clearable: Re, disabled: ze, fullWidth: A, highlightMatch: Be, invalid: Ve, messages: He, loop: Ue, media: We, minQueryLength: Ge, openOn: j, overflow: Ke, portal: qe, readOnly: Je, required: Ye, searchDelay: Xe, side: Ze, size: Qe, strategy: $e, variant: et, width: M, selectionMode: tt, value: N, defaultValue: nt, onValueChange: rt, ...it } = i, { t: P, multiple: F } = n, I = n.chosen, at = v(null), L = v(null), [ot, st] = y(0), ct = p((e) => {
92
+ n.setInputNode(e), Pe(e, ue);
93
+ }, [ue]), lt = (e, t) => {
94
94
  n.entry.current = e, n.setOpen(!0, "keyboard", t);
95
95
  }, ut = (e, t) => {
96
- let r = n.options, i = r.findIndex((e) => e.key === n.highlighted), a = _e({
96
+ let r = n.options, i = r.findIndex((e) => e.key === n.highlighted), a = me({
97
97
  enabled: r.map((e) => !e.disabled),
98
98
  from: i,
99
99
  intent: e,
@@ -102,7 +102,7 @@ function Le() {
102
102
  a >= 0 && n.setHighlighted(r[a].key, "keyboard", t);
103
103
  }, dt = (e) => {
104
104
  if (n.disabled) return;
105
- let t = e.currentTarget, r = we({
105
+ let t = e.currentTarget, r = Se({
106
106
  key: e.key,
107
107
  altKey: e.altKey,
108
108
  ctrlKey: e.ctrlKey,
@@ -141,7 +141,7 @@ function Le() {
141
141
  return;
142
142
  case "focusChip": {
143
143
  e.preventDefault();
144
- let t = [...at.current?.querySelectorAll(Ne) ?? []].filter((e) => !e.hidden);
144
+ let t = [...at.current?.querySelectorAll(Me) ?? []].filter((e) => !e.hidden);
145
145
  t[t.length - 1]?.focus({ preventScroll: !0 });
146
146
  return;
147
147
  }
@@ -155,18 +155,18 @@ function Le() {
155
155
  }, ht = (e) => {
156
156
  let t = e.relatedTarget, r = n.inputNode?.ownerDocument.getElementById(n.contentId) ?? null;
157
157
  if (n.controlNode?.parentElement, t instanceof Node && (r?.contains(t) || n.controlNode?.contains(t))) return;
158
- let i = fe(n.inputNode?.ownerDocument);
158
+ let i = le(n.inputNode?.ownerDocument);
159
159
  i instanceof Node && r?.contains(i) === !0 || (n.settle(e), n.open && n.setOpen(!1, "blur"));
160
160
  }, gt = (e) => {
161
161
  n.disabled || n.readOnly || (n.entry.current = F ? "keep" : "selected", n.setOpen(!n.open, "pointer", e.nativeEvent), n.inputNode?.focus({ preventScroll: !0 }));
162
162
  }, R = (e) => {
163
163
  n.clear(e.nativeEvent), n.inputNode?.focus({ preventScroll: !0 });
164
164
  };
165
- p(() => {
165
+ m(() => {
166
166
  let e = at.current;
167
167
  if (e === null) return;
168
- let t = ne(e, {
169
- itemSelector: `${Ne}, [data-part='field'] > [data-part='input']`,
168
+ let t = te(e, {
169
+ itemSelector: `${Me}, [data-part='field'] > [data-part='input']`,
170
170
  loop: !1,
171
171
  ownedKeys: (e) => e instanceof HTMLInputElement && e.value !== "" ? [
172
172
  "ArrowLeft",
@@ -174,22 +174,22 @@ function Le() {
174
174
  "Home",
175
175
  "End"
176
176
  ] : []
177
- }), r = re(e, {
178
- itemSelector: Ne,
177
+ }), r = ne(e, {
178
+ itemSelector: Me,
179
179
  fallback: () => n.inputNode
180
180
  });
181
181
  return () => {
182
182
  t.destroy(), r.destroy();
183
183
  };
184
184
  }, [F, n.inputNode]);
185
- let z = F && n.overflow === "collapse", B = h(null);
186
- p(() => {
185
+ let z = F && n.overflow === "collapse", B = v(null);
186
+ m(() => {
187
187
  let e = at.current;
188
188
  if (e === null || !z) {
189
189
  st(0);
190
190
  return;
191
191
  }
192
- let t = y(e, {
192
+ let t = S(e, {
193
193
  collapsible: (e) => e.dataset.part !== "field",
194
194
  fixedSize: (e) => e.dataset.part === "field" ? Number.parseFloat(getComputedStyle(e).minInlineSize) || 0 : void 0,
195
195
  onChange: (e) => st(e.length),
@@ -199,10 +199,10 @@ function Le() {
199
199
  return B.current = t, () => {
200
200
  t.destroy(), B.current = null;
201
201
  };
202
- }, [z]), se(() => {
202
+ }, [z]), g(() => {
203
203
  B.current?.refresh();
204
204
  }, [I, n.version]);
205
- let V = [o, r?.describedBy].filter(Boolean).join(" "), H = f ?? r?.ids.control ?? n.inputId, _t = !F && I.length > 0 && n.resolver.status(I[0]) === "pending", vt = n.search.indicator || _t, yt = n.clearable && !n.disabled && !n.readOnly && (I.length > 0 || n.inputValue !== ""), U = /* @__PURE__ */ _("input", {
205
+ let V = [o, r?.describedBy].filter(Boolean).join(" "), H = re ?? r?.ids.control ?? n.inputId, _t = !F && I.length > 0 && n.resolver.status(I[0]) === "pending", vt = n.search.indicator || _t, yt = n.clearable && !n.disabled && !n.readOnly && (I.length > 0 || n.inputValue !== ""), U = /* @__PURE__ */ b("input", {
206
206
  ...it,
207
207
  "aria-activedescendant": n.open && n.highlighted !== null ? n.optionId(n.highlighted) : void 0,
208
208
  "aria-autocomplete": "list",
@@ -211,18 +211,18 @@ function Le() {
211
211
  "aria-describedby": V === "" ? void 0 : V,
212
212
  "aria-expanded": n.open,
213
213
  "aria-invalid": n.invalid ? !0 : void 0,
214
- "aria-label": u,
214
+ "aria-label": d,
215
215
  "aria-readonly": n.readOnly ? !0 : void 0,
216
216
  autoComplete: "off",
217
217
  "data-part": "input",
218
218
  disabled: n.disabled,
219
219
  id: H,
220
- onBlur: T(oe, ht),
220
+ onBlur: Ne(h, ht),
221
221
  onChange: ft,
222
- onClick: T(m, mt),
223
- onFocus: T(le, pt),
224
- onKeyDown: T(ue, dt),
225
- placeholder: de,
222
+ onClick: Ne(_, mt),
223
+ onFocus: Ne(oe, pt),
224
+ onKeyDown: Ne(se, dt),
225
+ placeholder: ce,
226
226
  readOnly: n.readOnly,
227
227
  ref: ct,
228
228
  required: n.required && I.length === 0,
@@ -244,19 +244,19 @@ function Le() {
244
244
  ...n.required ? { "data-required": "" } : {},
245
245
  ...vt ? { "data-loading": "" } : {},
246
246
  ...n.max !== null && I.length >= n.max ? { "data-complete": "" } : {},
247
- ...S !== void 0 && S.length > 0 ? {
247
+ ...w !== void 0 && w.length > 0 ? {
248
248
  role: "group",
249
- ...r?.ids.label === void 0 ? u === void 0 ? {} : { "aria-label": u } : { "aria-labelledby": r.ids.label }
249
+ ...r?.ids.label === void 0 ? d === void 0 ? {} : { "aria-label": d } : { "aria-labelledby": r.ids.label }
250
250
  } : {}
251
251
  }, bt = P("chips", {
252
- label: u ?? "",
252
+ label: d ?? "",
253
253
  count: I.length
254
- }).replace(/^, /, ""), K = /* @__PURE__ */ v(ce, { children: [
255
- S !== void 0 && S.length > 0 ? /* @__PURE__ */ _("div", {
254
+ }).replace(/^, /, ""), K = /* @__PURE__ */ x(ae, { children: [
255
+ w !== void 0 && w.length > 0 ? /* @__PURE__ */ b("div", {
256
256
  "data-part": "scope",
257
- children: /* @__PURE__ */ v(s, {
257
+ children: /* @__PURE__ */ x(s, {
258
258
  disabled: n.disabled || n.readOnly,
259
- items: S.map((e) => ({
259
+ items: w.map((e) => ({
260
260
  value: e.id,
261
261
  label: e.label
262
262
  })),
@@ -264,41 +264,41 @@ function Le() {
264
264
  size: n.size,
265
265
  value: n.scope,
266
266
  variant: n.variant === "plain" ? "plain" : n.variant,
267
- children: [/* @__PURE__ */ _(ee, {
267
+ children: [/* @__PURE__ */ b(ee, {
268
268
  "aria-label": P("scope"),
269
- children: /* @__PURE__ */ _(te, {})
270
- }), /* @__PURE__ */ _(c, { children: S.map((e) => /* @__PURE__ */ _(l, {
269
+ children: /* @__PURE__ */ b(u, {})
270
+ }), /* @__PURE__ */ b(c, { children: w.map((e) => /* @__PURE__ */ b(l, {
271
271
  value: e.id,
272
272
  children: e.label
273
273
  }, e.id)) })]
274
274
  })
275
275
  }) : null,
276
- /* @__PURE__ */ v("div", {
276
+ /* @__PURE__ */ x("div", {
277
277
  "data-part": "control",
278
278
  ref: n.setControlNode,
279
279
  children: [
280
- !F && W !== void 0 && W.avatar !== null && n.media === "avatar" && n.inputValue === W.label ? /* @__PURE__ */ _("span", {
280
+ !F && W !== void 0 && W.avatar !== null && n.media === "avatar" && n.inputValue === W.label ? /* @__PURE__ */ b("span", {
281
281
  "aria-hidden": "true",
282
282
  "data-part": "selection",
283
- children: /* @__PURE__ */ _(Ie, {
283
+ children: /* @__PURE__ */ b(Ie, {
284
284
  entity: W,
285
285
  locale: n.locale
286
286
  })
287
287
  }) : null,
288
- F ? /* @__PURE__ */ _("div", {
288
+ F ? /* @__PURE__ */ b("div", {
289
289
  "aria-label": bt,
290
290
  "data-part": "values",
291
291
  role: "grid",
292
- children: /* @__PURE__ */ v("div", {
292
+ children: /* @__PURE__ */ x("div", {
293
293
  "data-part": "chips",
294
294
  ref: at,
295
295
  role: "row",
296
296
  children: [
297
- I.map((e) => /* @__PURE__ */ _(E, {
297
+ I.map((e) => /* @__PURE__ */ b(E, {
298
298
  id: e,
299
- renderChip: Me
299
+ renderChip: je
300
300
  }, e)),
301
- z ? /* @__PURE__ */ _("span", {
301
+ z ? /* @__PURE__ */ b("span", {
302
302
  "aria-label": P("moreLabel", { count: Math.max(ot, 1) }),
303
303
  "data-count": "",
304
304
  "data-part": "root",
@@ -313,15 +313,15 @@ function Le() {
313
313
  ref: L,
314
314
  role: "gridcell",
315
315
  tabIndex: -1,
316
- children: /* @__PURE__ */ _("span", {
316
+ children: /* @__PURE__ */ b("span", {
317
317
  "data-part": "body",
318
- children: /* @__PURE__ */ _("span", {
318
+ children: /* @__PURE__ */ b("span", {
319
319
  "data-part": "label",
320
320
  children: P("more", { count: Math.max(ot, 1) })
321
321
  })
322
322
  })
323
323
  }) : null,
324
- /* @__PURE__ */ _("span", {
324
+ /* @__PURE__ */ b("span", {
325
325
  "data-part": "field",
326
326
  role: "gridcell",
327
327
  children: U
@@ -329,35 +329,35 @@ function Le() {
329
329
  ]
330
330
  })
331
331
  }) : U,
332
- yt ? /* @__PURE__ */ _("button", {
332
+ yt ? /* @__PURE__ */ b("button", {
333
333
  "aria-label": P("clear"),
334
334
  "data-part": "clear",
335
335
  onClick: R,
336
336
  type: "button",
337
- children: /* @__PURE__ */ _(t, { children: /* @__PURE__ */ _(e, { name: "x" }) })
337
+ children: /* @__PURE__ */ b(t, { children: /* @__PURE__ */ b(e, { name: "x" }) })
338
338
  }) : null,
339
- /* @__PURE__ */ _("button", {
339
+ /* @__PURE__ */ b("button", {
340
340
  "aria-label": P("trigger"),
341
341
  "data-part": "trigger",
342
342
  disabled: n.disabled,
343
343
  onClick: gt,
344
344
  tabIndex: -1,
345
345
  type: "button",
346
- children: vt ? /* @__PURE__ */ _("span", {
346
+ children: vt ? /* @__PURE__ */ b("span", {
347
347
  "aria-hidden": "true",
348
348
  "data-part": "busy",
349
349
  "data-ui": "spinner"
350
- }) : /* @__PURE__ */ _("span", {
350
+ }) : /* @__PURE__ */ b("span", {
351
351
  "data-part": "arrow",
352
- children: /* @__PURE__ */ _(t, { children: /* @__PURE__ */ _(e, { name: "chevron-down" }) })
352
+ children: /* @__PURE__ */ b(t, { children: /* @__PURE__ */ b(e, { name: "chevron-down" }) })
353
353
  })
354
354
  })
355
355
  ]
356
356
  }),
357
- ae === void 0 ? null : (I.length === 0 ? [""] : I).map((e, t) => /* @__PURE__ */ _("input", {
357
+ ie === void 0 ? null : (I.length === 0 ? [""] : I).map((e, t) => /* @__PURE__ */ b("input", {
358
358
  "aria-hidden": "true",
359
- form: ie,
360
- name: ae,
359
+ form: f,
360
+ name: ie,
361
361
  readOnly: !0,
362
362
  required: t === 0 && n.required,
363
363
  style: Fe,
@@ -366,16 +366,16 @@ function Le() {
366
366
  value: e
367
367
  }, `${e}-${t}`))
368
368
  ] });
369
- return me === void 0 ? /* @__PURE__ */ _("div", {
369
+ return de === void 0 ? /* @__PURE__ */ b("div", {
370
370
  ...G,
371
371
  children: K
372
- }) : me({
372
+ }) : de({
373
373
  ...G,
374
374
  children: K
375
375
  });
376
376
  }
377
377
  function E({ id: n, renderChip: r }) {
378
- let i = k(), { t: a } = i, o = i.cache.get(n), s = i.resolver.status(n), c = o === void 0 && s === "pending", l = o === void 0 && s === "missing", ee = i.readOnly || i.disabled, te = o === void 0 ? a(l ? "unresolvedChip" : "loadingChip", { id: n }) : C(o), ne = o?.label ?? (l ? a("unresolved") : n), re = (e) => {
378
+ let i = k(), { t: a } = i, o = i.cache.get(n), s = i.resolver.status(n), c = o === void 0 && s === "pending", l = o === void 0 && s === "missing", ee = i.readOnly || i.disabled, u = o === void 0 ? a(l ? "unresolvedChip" : "loadingChip", { id: n }) : be(o), te = o?.label ?? (l ? a("unresolved") : n), ne = (e) => {
379
379
  if (!e.defaultPrevented) switch (e.key) {
380
380
  case "Delete":
381
381
  case "Backspace":
@@ -387,56 +387,56 @@ function E({ id: n, renderChip: r }) {
387
387
  return;
388
388
  default: e.key.length === 1 && !e.ctrlKey && !e.metaKey && !e.altKey && i.inputNode?.focus({ preventScroll: !0 });
389
389
  }
390
- }, u = (e) => {
390
+ }, d = (e) => {
391
391
  e.stopPropagation(), i.remove(n, e.nativeEvent), i.inputNode?.focus({ preventScroll: !0 });
392
392
  };
393
- return /* @__PURE__ */ v("span", {
393
+ return /* @__PURE__ */ x("span", {
394
394
  "aria-busy": c ? !0 : void 0,
395
- "aria-label": te,
395
+ "aria-label": u,
396
396
  "data-part": "root",
397
397
  "data-size": "sm",
398
398
  "data-tone": "secondary",
399
399
  "data-ui": "tag",
400
400
  "data-value": n,
401
401
  "data-variant": l || c ? "outline" : "soft",
402
- onKeyDown: re,
402
+ onKeyDown: ne,
403
403
  role: "gridcell",
404
404
  tabIndex: -1,
405
405
  ...c ? { "data-loading": "" } : {},
406
406
  ...l ? { "data-unresolved": "" } : {},
407
407
  ...i.disabled ? { "data-disabled": "" } : {},
408
- children: [/* @__PURE__ */ v("span", {
408
+ children: [/* @__PURE__ */ x("span", {
409
409
  "data-part": "body",
410
- children: [i.media === "avatar" && o?.avatar !== null ? /* @__PURE__ */ _("span", {
410
+ children: [i.media === "avatar" && o?.avatar !== null ? /* @__PURE__ */ b("span", {
411
411
  "data-part": "start",
412
- children: o === void 0 ? c ? /* @__PURE__ */ _("span", {
412
+ children: o === void 0 ? c ? /* @__PURE__ */ b("span", {
413
413
  "aria-hidden": "true",
414
414
  "data-loading": "",
415
415
  "data-part": "root",
416
416
  "data-shape": "circle",
417
417
  "data-size": "xs",
418
418
  "data-ui": "skeleton"
419
- }) : l ? /* @__PURE__ */ _(t, { children: /* @__PURE__ */ _(e, { name: "circle-alert" }) }) : null : /* @__PURE__ */ _(Ie, {
419
+ }) : l ? /* @__PURE__ */ b(t, { children: /* @__PURE__ */ b(e, { name: "circle-alert" }) }) : null : /* @__PURE__ */ b(Ie, {
420
420
  entity: o,
421
421
  locale: i.locale
422
422
  })
423
- }) : null, /* @__PURE__ */ _("span", {
423
+ }) : null, /* @__PURE__ */ b("span", {
424
424
  "data-part": "label",
425
- children: c ? /* @__PURE__ */ _("span", {
425
+ children: c ? /* @__PURE__ */ b("span", {
426
426
  "aria-hidden": "true",
427
427
  "data-loading": "",
428
428
  "data-part": "root",
429
429
  "data-shape": "text",
430
430
  "data-ui": "skeleton"
431
- }) : o !== void 0 && r !== void 0 ? r(o) : ne
431
+ }) : o !== void 0 && r !== void 0 ? r(o) : te
432
432
  })]
433
- }), ee ? null : /* @__PURE__ */ _("button", {
434
- "aria-label": a("remove", { label: o?.label ?? ne }),
433
+ }), ee ? null : /* @__PURE__ */ b("button", {
434
+ "aria-label": a("remove", { label: o?.label ?? te }),
435
435
  "data-part": "remove",
436
- onClick: u,
436
+ onClick: d,
437
437
  tabIndex: -1,
438
438
  type: "button",
439
- children: /* @__PURE__ */ _(t, { children: /* @__PURE__ */ _(e, { name: "x" }) })
439
+ children: /* @__PURE__ */ b(t, { children: /* @__PURE__ */ b(e, { name: "x" }) })
440
440
  })]
441
441
  });
442
442
  }
@@ -446,21 +446,21 @@ function D(e) {
446
446
  e.defaultPrevented || e.preventDefault();
447
447
  }
448
448
  function O() {
449
- return /* @__PURE__ */ v("div", { children: [
450
- /* @__PURE__ */ _("span", {
449
+ return /* @__PURE__ */ x("div", { children: [
450
+ /* @__PURE__ */ b("span", {
451
451
  "data-loading": "",
452
452
  "data-part": "root",
453
453
  "data-shape": "circle",
454
454
  "data-size": "xs",
455
455
  "data-ui": "skeleton"
456
456
  }),
457
- /* @__PURE__ */ _("span", {
457
+ /* @__PURE__ */ b("span", {
458
458
  "data-loading": "",
459
459
  "data-part": "root",
460
460
  "data-shape": "text",
461
461
  "data-ui": "skeleton"
462
462
  }),
463
- /* @__PURE__ */ _("span", {
463
+ /* @__PURE__ */ b("span", {
464
464
  "data-loading": "",
465
465
  "data-part": "root",
466
466
  "data-shape": "text",
@@ -469,80 +469,99 @@ function O() {
469
469
  ] });
470
470
  }
471
471
  function Re() {
472
- let n = k(), { t: r, search: i } = n, a = ae(), [s, c] = g(null), [l, ee] = g(null), [te, ne] = g(null), [re, u] = g("unmounted"), [ie, d] = g(!1), f = h(null), oe = h(null), m = h(n);
473
- m.current = n, p(() => {
474
- let e = le({
475
- present: m.current.open,
476
- onStatusChange: u
472
+ let n = k(), { t: r, search: i } = n, a = ie(), [s, c] = y(null), [l, ee] = y(null), [u, te] = y(null), [ne, d] = y("unmounted"), [f, re] = y(!1), h = v(null), _ = v(null), S = v(n);
473
+ S.current = n, m(() => {
474
+ let e = oe({
475
+ present: S.current.open,
476
+ onStatusChange: d
477
477
  });
478
- return f.current = e, u(e.status), () => {
479
- e.destroy(), f.current = null;
478
+ return h.current = e, d(e.status), () => {
479
+ e.destroy(), h.current = null;
480
+ };
481
+ }, []), m(() => h.current?.sync(n.open), [n.open]), m(() => h.current?.setNode(s), [s]);
482
+ let le = n.open || ne !== "unmounted";
483
+ m(() => {
484
+ let e = n.inputNode;
485
+ if (e === null || f) return;
486
+ let t = () => re(!0);
487
+ return e.addEventListener("focusin", t), e.addEventListener("pointerdown", t), () => {
488
+ e.removeEventListener("focusin", t), e.removeEventListener("pointerdown", t);
480
489
  };
481
- }, []), p(() => f.current?.sync(n.open), [n.open]), p(() => f.current?.setNode(s), [s]);
482
- let y = re !== "unmounted";
483
- p(() => {
484
- if (!y) {
485
- ne(null);
490
+ }, [n.inputNode, f]);
491
+ let fe = le || f;
492
+ g(() => {
493
+ if (!fe) {
494
+ te(null);
486
495
  return;
487
496
  }
488
- let e = ue({
497
+ let e = se({
489
498
  origin: n.inputNode,
490
499
  disabled: !n.portal
491
500
  });
492
- return ne(e.container), () => e.release();
501
+ return te(e.container), () => e.release();
493
502
  }, [
494
- y,
503
+ fe,
495
504
  n.inputNode,
496
505
  n.portal
497
506
  ]);
498
- let { side: fe, strategy: he, width: _e, controlNode: x } = n;
499
- p(() => {
500
- if (s === null || x === null) return;
501
- let e = !0, t = pe(x, s, {
507
+ let { side: me, strategy: he, width: w, controlNode: T } = n, _e = v(null), ve = p((e, t) => {
508
+ e.update().then(() => {
509
+ _e.current === e && S.current.open && t.setAttribute("data-open", "");
510
+ });
511
+ }, []);
512
+ g(() => {
513
+ if (s === null || T === null) return;
514
+ let e = ue(T, s, {
502
515
  align: "start",
503
516
  alignOffset: 0,
504
517
  boundaryPadding: 8,
505
518
  flip: !0,
506
519
  hideWhenDetached: !0,
507
- matchWidth: _e === "anchor",
520
+ matchWidth: w === "anchor",
508
521
  shift: !0,
509
- side: fe,
522
+ side: me,
510
523
  sideOffset: 4,
511
524
  strategy: he
512
525
  });
513
- return t.update().then(() => {
514
- e && d(!0);
515
- }), () => {
516
- e = !1, t.destroy(), d(!1);
526
+ return _e.current = e, S.current.open && ve(e, s), () => {
527
+ e.destroy(), _e.current = null, s.removeAttribute("data-open");
517
528
  };
518
529
  }, [
519
- x,
530
+ T,
520
531
  s,
521
- fe,
532
+ ve,
533
+ me,
522
534
  he,
523
- _e
524
- ]), p(() => {
525
- if (s === null || !n.open || x === null) return;
526
- let e = de(s, {
527
- branches: [x],
535
+ w
536
+ ]), g(() => {
537
+ let e = _e.current;
538
+ e !== null && s !== null && (n.open ? ve(e, s) : s.removeAttribute("data-open"));
539
+ }, [
540
+ s,
541
+ n.open,
542
+ ve
543
+ ]), m(() => {
544
+ if (s === null || !n.open || T === null) return;
545
+ let e = ce(s, {
546
+ branches: [T],
528
547
  escape: !0,
529
548
  focusOutside: !1,
530
549
  modal: !1,
531
550
  outsidePress: !0,
532
551
  scrollLock: !1,
533
552
  onDismiss: (e) => {
534
- m.current.setOpen(!1, e.reason === "escape" ? "escape" : "outsidePress", e.source);
553
+ S.current.setOpen(!1, e.reason === "escape" ? "escape" : "outsidePress", e.source);
535
554
  }
536
555
  });
537
556
  return () => e.destroy();
538
557
  }, [
539
- x,
558
+ T,
540
559
  s,
541
560
  n.open
542
561
  ]);
543
- let S = n.options.map((e) => e.key).join("");
544
- se(() => {
545
- let e = m.current;
562
+ let ye = n.options.map((e) => e.key).join("");
563
+ g(() => {
564
+ let e = S.current;
546
565
  if (!e.open) return;
547
566
  let t = e.options, n = e.entry.current;
548
567
  if (n !== "keep") {
@@ -551,7 +570,7 @@ function Re() {
551
570
  return;
552
571
  }
553
572
  e.highlighted !== null && !t.some((t) => t.key === e.highlighted) && e.setHighlighted(null, "keyboard");
554
- }, [S, n.open]), p(() => {
573
+ }, [ye, n.open]), m(() => {
555
574
  if (l === null || n.highlighted === null) return;
556
575
  let e = l.ownerDocument.getElementById(n.optionId(n.highlighted));
557
576
  typeof e?.scrollIntoView == "function" && e.scrollIntoView({ block: "nearest" });
@@ -560,38 +579,38 @@ function Re() {
560
579
  n.highlighted,
561
580
  l
562
581
  ]);
563
- let ye = i.status === "error";
564
- if (p(() => {
565
- ye && m.current.open && ge(m.current.inputNode?.ownerDocument).announce(m.current.t("error"), { repeat: !0 });
566
- }, [ye]), p(() => {
567
- let e = oe.current, t = l;
582
+ let be = i.status === "error";
583
+ if (m(() => {
584
+ be && S.current.open && pe(S.current.inputNode?.ownerDocument).announce(S.current.t("error"), { repeat: !0 });
585
+ }, [be]), m(() => {
586
+ let e = _.current, t = l;
568
587
  if (e === null || t === null || !i.hasMore || typeof IntersectionObserver != "function") return;
569
588
  let n = new IntersectionObserver((e) => {
570
- e.some((e) => e.isIntersecting) && m.current.session.more();
589
+ e.some((e) => e.isIntersecting) && S.current.session.more();
571
590
  }, { root: t });
572
591
  return n.observe(e), () => n.disconnect();
573
592
  }, [
574
593
  i.hasMore,
575
594
  i.items.length,
576
595
  l
577
- ]), !y) return null;
578
- let be = n.options.filter((e) => e.key !== b && e.key !== ve).length, xe = i.status === "loading" && i.items.length === 0, Se = i.status === "loading" && i.items.length > 0 && i.indicator, C = i.status === "error", Ce = be === 0 && !n.offerCreate && !C && !xe && i.status !== "waiting" && i.status !== "short", we = i.status === "short" ? r("minQuery", { count: n.props.minQueryLength ?? 0 }) : C ? null : i.indicator && (xe || i.loadingMore) ? r("loading") : i.status === "ready" && n.query !== "" ? r("count", { count: i.total ?? i.items.length }) : null, Te = (r) => {
596
+ ]), !le) return null;
597
+ let xe = n.options.filter((e) => e.key !== C && e.key !== ge).length, Se = i.status === "loading" && i.items.length === 0, Ce = i.status === "loading" && i.items.length > 0 && i.indicator, we = i.status === "error", Te = xe === 0 && !n.offerCreate && !we && !Se && i.status !== "waiting" && i.status !== "short", Ee = i.status === "short" ? r("minQuery", { count: n.props.minQueryLength ?? 0 }) : we ? null : i.indicator && (Se || i.loadingMore) ? r("loading") : i.status === "ready" && n.query !== "" ? r("count", { count: i.total ?? i.items.length }) : null, De = (r) => {
579
598
  let i = r.id, a = n.chosen.includes(i), s = n.highlighted === i, c = n.options.find((e) => e.key === i)?.disabled ?? r.disabled === !0, l = (e) => {
580
599
  c || (n.activate(i, "pointer", e.nativeEvent), n.inputNode?.focus({ preventScroll: !0 }));
581
- }, ee = n.props.renderOption === void 0 ? /* @__PURE__ */ v(ce, { children: [
582
- /* @__PURE__ */ _("span", {
600
+ }, ee = n.props.renderOption === void 0 ? /* @__PURE__ */ x(ae, { children: [
601
+ /* @__PURE__ */ b("span", {
583
602
  "data-part": "label",
584
- children: n.highlightMatch && n.query !== "" ? /* @__PURE__ */ _(o, {
603
+ children: n.highlightMatch && n.query !== "" ? /* @__PURE__ */ b(o, {
585
604
  locale: n.locale,
586
605
  query: n.query,
587
606
  text: r.label
588
607
  }) : r.label
589
608
  }),
590
- r.description === void 0 ? null : /* @__PURE__ */ _("span", {
609
+ r.description === void 0 ? null : /* @__PURE__ */ b("span", {
591
610
  "data-part": "description",
592
611
  children: r.description
593
612
  }),
594
- r.meta === void 0 ? null : /* @__PURE__ */ _("span", {
613
+ r.meta === void 0 ? null : /* @__PURE__ */ b("span", {
595
614
  "data-part": "meta",
596
615
  children: r.meta
597
616
  })
@@ -601,7 +620,7 @@ function Re() {
601
620
  query: n.query,
602
621
  selected: a
603
622
  });
604
- return /* @__PURE__ */ v("div", {
623
+ return /* @__PURE__ */ x("div", {
605
624
  "aria-disabled": c ? !0 : void 0,
606
625
  "aria-selected": a,
607
626
  "data-part": "item",
@@ -617,21 +636,21 @@ function Re() {
617
636
  ...a ? { "data-selected": "" } : {},
618
637
  ...c ? { "data-disabled": "" } : {},
619
638
  children: [
620
- n.media === "avatar" && r.avatar !== null ? /* @__PURE__ */ _("span", {
639
+ n.media === "avatar" && r.avatar !== null ? /* @__PURE__ */ b("span", {
621
640
  "data-part": "media",
622
- children: /* @__PURE__ */ _(Ie, {
641
+ children: /* @__PURE__ */ b(Ie, {
623
642
  entity: r,
624
643
  locale: n.locale
625
644
  })
626
645
  }) : null,
627
646
  ee,
628
- /* @__PURE__ */ _("span", {
647
+ /* @__PURE__ */ b("span", {
629
648
  "data-part": "indicator",
630
- children: /* @__PURE__ */ _(t, { children: /* @__PURE__ */ _(e, { name: "check" }) })
649
+ children: /* @__PURE__ */ b(t, { children: /* @__PURE__ */ b(e, { name: "check" }) })
631
650
  })
632
651
  ]
633
652
  }, i);
634
- }, Ee = (r, i, a) => /* @__PURE__ */ v("div", {
653
+ }, Oe = (r, i, a) => /* @__PURE__ */ x("div", {
635
654
  "aria-selected": !1,
636
655
  "data-part": "item",
637
656
  "data-value": r,
@@ -640,18 +659,18 @@ function Re() {
640
659
  onPointerDown: D,
641
660
  onPointerEnter: (e) => n.setHighlighted(r, "pointer", e.nativeEvent),
642
661
  role: "option",
643
- ...r === b ? { "data-create": "" } : { "data-retry": "" },
662
+ ...r === C ? { "data-create": "" } : { "data-retry": "" },
644
663
  ...n.highlighted === r ? { "data-current": "" } : {},
645
- ...n.creating && r === b ? { "data-loading": "" } : {},
646
- children: [/* @__PURE__ */ _("span", {
664
+ ...n.creating && r === C ? { "data-loading": "" } : {},
665
+ children: [/* @__PURE__ */ b("span", {
647
666
  "aria-hidden": "true",
648
667
  "data-part": "media",
649
- children: /* @__PURE__ */ _(t, { children: /* @__PURE__ */ _(e, { name: r === b ? "plus" : "rotate-ccw" }) })
650
- }), /* @__PURE__ */ _("span", {
668
+ children: /* @__PURE__ */ b(t, { children: /* @__PURE__ */ b(e, { name: r === C ? "plus" : "rotate-ccw" }) })
669
+ }), /* @__PURE__ */ b("span", {
651
670
  "data-part": "label",
652
671
  children: i
653
672
  })]
654
- }), { sections: De, headings: Oe } = n.sections, ke = !(C && i.items.length === 0), w = /* @__PURE__ */ _("div", {
673
+ }), { sections: ke, headings: Ae } = n.sections, je = !(we && i.items.length === 0), Me = /* @__PURE__ */ b("div", {
655
674
  "data-align": "start",
656
675
  "data-part": "positioner",
657
676
  "data-size": n.size,
@@ -659,8 +678,7 @@ function Re() {
659
678
  "data-width": n.width,
660
679
  ref: c,
661
680
  ...n.open ? {} : { inert: !0 },
662
- ...n.open && ie ? { "data-open": "" } : {},
663
- children: /* @__PURE__ */ v("div", {
681
+ children: /* @__PURE__ */ x("div", {
664
682
  "aria-busy": i.status === "loading" || void 0,
665
683
  "aria-label": n.props["aria-label"],
666
684
  "data-part": "content",
@@ -668,61 +686,61 @@ function Re() {
668
686
  ref: ee,
669
687
  role: "listbox",
670
688
  ...n.multiple ? { "aria-multiselectable": !0 } : {},
671
- ...Se ? { "data-loading": "" } : {},
689
+ ...Ce ? { "data-loading": "" } : {},
672
690
  children: [
673
- ke ? De.map((e) => Oe ? /* @__PURE__ */ v("div", {
691
+ je ? ke.map((e) => Ae ? /* @__PURE__ */ x("div", {
674
692
  "aria-labelledby": `${a}${e.key}`,
675
693
  "data-part": "group",
676
694
  role: "group",
677
- children: [/* @__PURE__ */ _("div", {
695
+ children: [/* @__PURE__ */ b("div", {
678
696
  "data-part": "group-label",
679
697
  id: `${a}${e.key}`,
680
698
  children: e.label
681
- }), e.entities.map(Te)]
682
- }, e.key) : e.entities.map(Te)) : null,
683
- xe && i.indicator ? /* @__PURE__ */ v("div", {
699
+ }), e.entities.map(De)]
700
+ }, e.key) : e.entities.map(De)) : null,
701
+ Se && i.indicator ? /* @__PURE__ */ x("div", {
684
702
  "aria-hidden": "true",
685
703
  "data-part": "placeholder",
686
704
  children: [
687
- /* @__PURE__ */ _(O, {}),
688
- /* @__PURE__ */ _(O, {}),
689
- /* @__PURE__ */ _(O, {})
705
+ /* @__PURE__ */ b(O, {}),
706
+ /* @__PURE__ */ b(O, {}),
707
+ /* @__PURE__ */ b(O, {})
690
708
  ]
691
709
  }) : null,
692
- i.loadingMore && i.indicator ? /* @__PURE__ */ _("div", {
710
+ i.loadingMore && i.indicator ? /* @__PURE__ */ b("div", {
693
711
  "aria-hidden": "true",
694
712
  "data-part": "more",
695
- children: /* @__PURE__ */ _(O, {})
713
+ children: /* @__PURE__ */ b(O, {})
696
714
  }) : null,
697
- /* @__PURE__ */ _("div", { ref: oe }),
698
- n.offerCreate ? Ee(b, r("create", { query: n.query.trim() }), (e) => n.activate(b, "pointer", e.nativeEvent)) : null,
699
- C ? /* @__PURE__ */ v("div", {
715
+ /* @__PURE__ */ b("div", { ref: _ }),
716
+ n.offerCreate ? Oe(C, r("create", { query: n.query.trim() }), (e) => n.activate(C, "pointer", e.nativeEvent)) : null,
717
+ we ? /* @__PURE__ */ x("div", {
700
718
  "data-part": "error",
701
- children: [/* @__PURE__ */ _(t, { children: /* @__PURE__ */ _(e, { name: "circle-alert" }) }), r("error")]
719
+ children: [/* @__PURE__ */ b(t, { children: /* @__PURE__ */ b(e, { name: "circle-alert" }) }), r("error")]
702
720
  }) : null,
703
- C ? Ee(ve, r("retry"), () => {
721
+ we ? Oe(ge, r("retry"), () => {
704
722
  n.retry(), n.inputNode?.focus({ preventScroll: !0 });
705
723
  }) : null,
706
- Ce ? /* @__PURE__ */ _("div", {
724
+ Te ? /* @__PURE__ */ b("div", {
707
725
  "data-part": "empty",
708
726
  children: r("empty")
709
727
  }) : null,
710
- /* @__PURE__ */ _("div", {
728
+ /* @__PURE__ */ b("div", {
711
729
  "aria-live": "polite",
712
730
  "data-part": "status",
713
731
  role: "status",
714
- children: we
732
+ children: Ee
715
733
  })
716
734
  ]
717
735
  })
718
736
  });
719
- return te === null ? w : me(w, te);
737
+ return u === null ? Me : de(Me, u);
720
738
  }
721
739
  //#endregion
722
740
  //#region src/entity-picker/entity-picker.tsx
723
- var ze = ie(void 0);
741
+ var ze = f(void 0);
724
742
  function k() {
725
- let e = f(ze);
743
+ let e = re(ze);
726
744
  if (e === void 0) throw Error("An entity picker part is outside an EntityPicker.");
727
745
  return e;
728
746
  }
@@ -755,26 +773,26 @@ function He(e) {
755
773
  return Array.isArray(e) ? e : typeof e == "string" ? [e] : [];
756
774
  }
757
775
  function Ue(e) {
758
- let { clearable: t, defaultHighlightedValue: i = null, defaultInputValue: o, defaultOpen: s = !1, defaultScope: c = null, disabled: l, entities: ee = A, favorites: te = A, fullWidth: ne, handleRef: re, highlightMatch: ie, highlightedValue: f, inputValue: se, invalid: ce, items: y, locale: le, messages: ue, loop: de, max: fe, media: pe, minQueryLength: me, onCreate: _e, open: x, openOn: S, overflow: Se, portal: C, readOnly: we, recent: De = A, required: ke, scope: w, searchDelay: Ae, side: Me, size: Ne, source: T, strategy: Pe, variant: Fe, width: Ie } = e, E = e.selectionMode === "multiple", D = je(), O = a(), k = ae(), Ue = `${k}listbox`, We = `${k}input`, Ge = d((e) => `${k}option-${encodeURIComponent(e)}`, [k]), j = r(he, ue), Ke = n(), qe = le ?? Ke, Je = l ?? O?.disabled ?? D.disabled, Ye = we ?? O?.readOnly ?? D.readOnly, Xe = me ?? D.minQueryLength, [Ze, Qe] = g(0), $e = d(() => Qe((e) => e + 1), []), et = h(null);
759
- et.current === null && (et.current = ye());
776
+ let { clearable: t, defaultHighlightedValue: i = null, defaultInputValue: o, defaultOpen: s = !1, defaultScope: c = null, disabled: l, entities: ee = A, favorites: u = A, fullWidth: te, handleRef: ne, highlightMatch: f, highlightedValue: re, inputValue: g, invalid: ae, items: S, locale: oe, messages: se, loop: ce, max: le, media: ue, minQueryLength: de, onCreate: me, open: he, openOn: w, overflow: ye, portal: be, readOnly: Se, recent: Te = A, required: De, scope: Oe, searchDelay: ke, side: je, size: Me, source: Ne, strategy: Pe, variant: Fe, width: Ie } = e, E = e.selectionMode === "multiple", D = Ae(), O = a(), k = ie(), Ue = `${k}listbox`, We = `${k}input`, Ge = p((e) => `${k}option-${encodeURIComponent(e)}`, [k]), j = r(fe, se), Ke = n(), qe = oe ?? Ke, Je = l ?? O?.disabled ?? D.disabled, Ye = Se ?? O?.readOnly ?? D.readOnly, Xe = de ?? D.minQueryLength, [Ze, Qe] = y(0), $e = p(() => Qe((e) => e + 1), []), et = v(null);
777
+ et.current === null && (et.current = T());
760
778
  let M = et.current;
761
- M.remember(ee), M.remember(te), M.remember(De);
762
- let tt = m(() => T ?? Ee(y ?? A, { locale: qe }), [
763
- y,
779
+ M.remember(ee), M.remember(u), M.remember(Te);
780
+ let tt = _(() => Ne ?? we(S ?? A, { locale: qe }), [
781
+ S,
764
782
  qe,
765
- T
766
- ]), N = h(tt);
783
+ Ne
784
+ ]), N = v(tt);
767
785
  N.current = tt;
768
- let nt = m(() => ({
786
+ let nt = _(() => ({
769
787
  search: (e, t) => N.current.search(e, t),
770
788
  resolve: (e, t) => N.current.resolve === void 0 ? Promise.resolve([]) : N.current.resolve(e, t)
771
- }), []), [rt, it] = g(null), P = h(Xe);
789
+ }), []), [rt, it] = y(null), P = v(Xe);
772
790
  P.current = Xe;
773
- let F = h(Ae ?? D.searchDelay);
774
- F.current = Ae ?? D.searchDelay;
775
- let [I, at] = g(null);
776
- p(() => {
777
- let e = xe({
791
+ let F = v(ke ?? D.searchDelay);
792
+ F.current = ke ?? D.searchDelay;
793
+ let [I, at] = y(null);
794
+ m(() => {
795
+ let e = ve({
778
796
  source: nt,
779
797
  get delay() {
780
798
  return F.current;
@@ -784,7 +802,7 @@ function Ue(e) {
784
802
  },
785
803
  onChange: it,
786
804
  onResults: (e) => M.remember(e)
787
- }), t = be({
805
+ }), t = _e({
788
806
  source: {
789
807
  search: nt.search,
790
808
  resolve: (e, t) => N.current.resolve === void 0 ? Promise.reject(/* @__PURE__ */ Error("no resolve")) : N.current.resolve(e, t)
@@ -803,7 +821,7 @@ function Ue(e) {
803
821
  M,
804
822
  nt
805
823
  ]);
806
- let L = I?.session ?? Be, ot = I?.resolver ?? Ve, st = He(e.defaultValue), [ct, lt] = g(st), [ut, dt] = g(s), [ft, pt] = g(i), [mt, ht] = g(c), gt = e.value, R = gt === void 0 ? ct : He(gt), z = (x ?? ut) && !Je, B = f === void 0 ? ft : f, V = w === void 0 ? mt : w, H = (e) => e === void 0 ? "" : M.get(e)?.label ?? "", [_t, vt] = g(() => o ?? (E ? "" : H(st[0]))), yt = se ?? _t, [U, W] = g(!1), G = E || U ? yt : "", bt = h("keep"), [K, xt] = g(null), [St, Ct] = g(null), q = h({
824
+ let L = I?.session ?? Be, ot = I?.resolver ?? Ve, st = He(e.defaultValue), [ct, lt] = y(st), [ut, dt] = y(s), [ft, pt] = y(i), [mt, ht] = y(c), gt = e.value, R = gt === void 0 ? ct : He(gt), z = (he ?? ut) && !Je, B = re === void 0 ? ft : re, V = Oe === void 0 ? mt : Oe, H = (e) => e === void 0 ? "" : M.get(e)?.label ?? "", [_t, vt] = y(() => o ?? (E ? "" : H(st[0]))), yt = g ?? _t, [U, W] = y(!1), G = E || U ? yt : "", bt = v("keep"), [K, xt] = y(null), [St, Ct] = y(null), q = v({
807
825
  props: e,
808
826
  currentIds: R,
809
827
  currentOpen: z,
@@ -821,12 +839,12 @@ function Ue(e) {
821
839
  currentScope: V,
822
840
  typed: U
823
841
  };
824
- let J = d((e) => {
825
- ge(K?.ownerDocument).announce(e, { repeat: !0 });
826
- }, [K]), Y = d((e, t, n) => {
842
+ let J = p((e) => {
843
+ pe(K?.ownerDocument).announce(e, { repeat: !0 });
844
+ }, [K]), Y = p((e, t, n) => {
827
845
  let r = q.current, i = r.currentIds;
828
846
  if (e.length === i.length && e.every((e, t) => e === i[t])) return !1;
829
- let a = r.props.selectionMode === "multiple", o = (e) => a ? e : e[0] ?? null, s = u({
847
+ let a = r.props.selectionMode === "multiple", o = (e) => a ? e : e[0] ?? null, s = d({
830
848
  controlled: r.props.value,
831
849
  initial: o(i),
832
850
  equals: (e, t) => JSON.stringify(e) === JSON.stringify(t),
@@ -836,39 +854,39 @@ function Ue(e) {
836
854
  }
837
855
  }).request(o(e), t, n);
838
856
  return s && lt(e), s || r.props.value !== void 0;
839
- }, [M]), X = d((e, t, n) => {
857
+ }, [M]), X = p((e, t, n) => {
840
858
  let r = q.current;
841
- e !== r.currentInput && u({
859
+ e !== r.currentInput && d({
842
860
  controlled: r.props.inputValue,
843
861
  initial: r.currentInput,
844
862
  onRequest: (e) => r.props.onInputValueChange?.(e.value, e)
845
863
  }).request(e, t, n) && vt(e);
846
- }, []), Z = d((e, t, n) => {
864
+ }, []), Z = p((e, t, n) => {
847
865
  let r = q.current;
848
- e !== r.currentOpen && u({
866
+ e !== r.currentOpen && d({
849
867
  controlled: r.props.open,
850
868
  initial: r.currentOpen,
851
869
  onRequest: (e) => r.props.onOpenChange?.(e.value, e)
852
870
  }).request(e, t, n) && (dt(e), e || (pt(null), bt.current = "keep"));
853
- }, []), wt = d((e, t, n) => {
871
+ }, []), wt = p((e, t, n) => {
854
872
  let r = q.current;
855
- e !== r.currentHighlighted && u({
873
+ e !== r.currentHighlighted && d({
856
874
  controlled: r.props.highlightedValue,
857
875
  initial: r.currentHighlighted,
858
876
  onRequest: (e) => r.props.onHighlightedValueChange?.(e.value, e)
859
877
  }).request(e, t, n) && pt(e);
860
- }, []), Tt = d((e, t, n) => {
878
+ }, []), Tt = p((e, t, n) => {
861
879
  let r = q.current;
862
- e !== r.currentScope && u({
880
+ e !== r.currentScope && d({
863
881
  controlled: r.props.scope,
864
882
  initial: r.currentScope,
865
883
  onRequest: (e) => r.props.onScopeChange?.(e.value, e)
866
884
  }).request(e, t, n) && ht(e);
867
- }, []), Et = d((e, t) => {
885
+ }, []), Et = p((e, t) => {
868
886
  W(!0), X(e, "keyboard", t);
869
- }, [X]), Dt = d((e, t, n) => {
887
+ }, [X]), Dt = p((e, t, n) => {
870
888
  Y(e === null ? [] : [e], t, n), W(!1), X(e === null ? "" : H(e), "select", n);
871
- }, [Y, X]), Q = E ? fe ?? null : null, Ot = d((e, t, n) => {
889
+ }, [Y, X]), Q = E ? le ?? null : null, Ot = p((e, t, n) => {
872
890
  let r = q.current.currentIds, i = H(e);
873
891
  if (r.includes(e)) {
874
892
  let a = r.filter((t) => t !== e);
@@ -891,7 +909,7 @@ function Ue(e) {
891
909
  Y,
892
910
  X,
893
911
  j
894
- ]), kt = d((e, t) => {
912
+ ]), kt = p((e, t) => {
895
913
  let n = q.current.currentIds.filter((t) => t !== e);
896
914
  Y(n, "remove", t) && J(j("removed", {
897
915
  label: H(e) || j("unresolved"),
@@ -901,9 +919,9 @@ function Ue(e) {
901
919
  J,
902
920
  Y,
903
921
  j
904
- ]), At = d((e) => {
922
+ ]), At = p((e) => {
905
923
  Y([], "clear", e), W(!1), X("", "clear", e);
906
- }, [Y, X]), [jt, Mt] = g(!1), Nt = d((e, t) => {
924
+ }, [Y, X]), [jt, Mt] = y(!1), Nt = p((e, t) => {
907
925
  let n = q.current, r = n.currentInput.trim(), i = n.props.onCreate;
908
926
  if (i === void 0 || r === "") return;
909
927
  let a = (e) => {
@@ -926,12 +944,12 @@ function Ue(e) {
926
944
  Y,
927
945
  X,
928
946
  j
929
- ]), Pt = d((e, t, n) => {
930
- if (e === ve) {
947
+ ]), Pt = p((e, t, n) => {
948
+ if (e === ge) {
931
949
  L.retry();
932
950
  return;
933
951
  }
934
- if (e === b) {
952
+ if (e === C) {
935
953
  Nt(t, n), E || Z(!1, "select", n);
936
954
  return;
937
955
  }
@@ -950,7 +968,7 @@ function Ue(e) {
950
968
  L,
951
969
  Z,
952
970
  Ot
953
- ]), Ft = d((e) => {
971
+ ]), Ft = p((e) => {
954
972
  let t = q.current;
955
973
  if (t.props.selectionMode !== "multiple" && t.typed) {
956
974
  if (t.currentInput.trim() === "") {
@@ -959,7 +977,7 @@ function Ue(e) {
959
977
  }
960
978
  W(!1), X(H(t.currentIds[0]), "blur", e);
961
979
  }
962
- }, [Y, X]), It = d((e) => {
980
+ }, [Y, X]), It = p((e) => {
963
981
  let t = q.current, n = H(t.currentIds[0]);
964
982
  if (t.currentIds.length === 0) {
965
983
  W(!1), X("", "programmatic", e);
@@ -970,8 +988,8 @@ function Ue(e) {
970
988
  return;
971
989
  }
972
990
  W(!1), X(n, "programmatic", e);
973
- }, [At, X]), Lt = d((e) => X("", "clear", e), [X]);
974
- p(() => {
991
+ }, [At, X]), Lt = p((e) => X("", "clear", e), [X]);
992
+ m(() => {
975
993
  ot.require(R);
976
994
  }, [
977
995
  R,
@@ -979,14 +997,14 @@ function Ue(e) {
979
997
  Ze
980
998
  ]);
981
999
  let Rt = E ? "" : H(R[0]);
982
- p(() => {
1000
+ m(() => {
983
1001
  E || U || q.current.currentInput !== Rt && X(Rt, "programmatic");
984
1002
  }, [
985
1003
  Rt,
986
1004
  E,
987
1005
  X,
988
1006
  U
989
- ]), p(() => {
1007
+ ]), m(() => {
990
1008
  z && L.search({
991
1009
  query: G,
992
1010
  scope: V,
@@ -997,7 +1015,7 @@ function Ue(e) {
997
1015
  V,
998
1016
  G,
999
1017
  L
1000
- ]), oe(re, () => ({
1018
+ ]), h(ne, () => ({
1001
1019
  close: () => Z(!1, "programmatic"),
1002
1020
  focus: () => K?.focus({ preventScroll: !0 }),
1003
1021
  open: () => Z(!0, "programmatic"),
@@ -1007,12 +1025,12 @@ function Ue(e) {
1007
1025
  L,
1008
1026
  Z
1009
1027
  ]);
1010
- let $ = rt ?? L.state, zt = $.answered || $.status === "loading" ? $.items : A, Bt = Te({
1028
+ let $ = rt ?? L.state, zt = $.answered || $.status === "loading" ? $.items : A, Bt = Ce({
1011
1029
  query: G,
1012
1030
  scope: V,
1013
1031
  chosen: E ? M.pick(R) : A,
1014
- favorites: te,
1015
- recent: De,
1032
+ favorites: u,
1033
+ recent: Te,
1016
1034
  results: $.status === "error" || $.status === "short" ? $.items : zt,
1017
1035
  searchedEmpty: Xe === 0,
1018
1036
  labels: {
@@ -1021,13 +1039,13 @@ function Ue(e) {
1021
1039
  recent: j("recent"),
1022
1040
  results: j("results")
1023
1041
  }
1024
- }), Vt = !jt && Oe({
1025
- enabled: _e !== void 0,
1042
+ }), Vt = !jt && Ee({
1043
+ enabled: me !== void 0,
1026
1044
  query: G,
1027
1045
  answered: $.status === "ready",
1028
1046
  results: $.items,
1029
1047
  locale: qe
1030
- }), Ht = m(() => {
1048
+ }), Ht = _(() => {
1031
1049
  if (Q === null || R.length < Q) return;
1032
1050
  let e = new Set(R);
1033
1051
  return new Set(Bt.sections.flatMap((e) => e.entities).map((e) => e.id).filter((t) => !e.has(t)));
@@ -1035,12 +1053,12 @@ function Ue(e) {
1035
1053
  R,
1036
1054
  Q,
1037
1055
  Bt
1038
- ]), Ut = Ce({
1056
+ ]), Ut = xe({
1039
1057
  sections: Bt.sections,
1040
1058
  create: Vt,
1041
1059
  ...Ht === void 0 ? {} : { blocked: Ht }
1042
- }), Wt = $.status === "error" ? [...Ut.filter((e) => e.key !== b), {
1043
- key: ve,
1060
+ }), Wt = $.status === "error" ? [...Ut.filter((e) => e.key !== C), {
1061
+ key: ge,
1044
1062
  disabled: !1
1045
1063
  }] : Ut, Gt = {
1046
1064
  activate: Pt,
@@ -1055,30 +1073,30 @@ function Ue(e) {
1055
1073
  creating: jt,
1056
1074
  disabled: Je,
1057
1075
  entry: bt,
1058
- fullWidth: ne ?? D.fullWidth,
1059
- highlightMatch: ie ?? D.highlightMatch,
1076
+ fullWidth: te ?? D.fullWidth,
1077
+ highlightMatch: f ?? D.highlightMatch,
1060
1078
  highlighted: B,
1061
1079
  inputId: We,
1062
1080
  inputNode: K,
1063
1081
  inputValue: yt,
1064
- invalid: ce ?? O?.invalid ?? D.invalid,
1082
+ invalid: ae ?? O?.invalid ?? D.invalid,
1065
1083
  locale: qe,
1066
- loop: de ?? D.loop,
1084
+ loop: ce ?? D.loop,
1067
1085
  max: Q,
1068
- media: pe ?? D.media,
1086
+ media: ue ?? D.media,
1069
1087
  multiple: E,
1070
1088
  offerCreate: Vt,
1071
1089
  open: z,
1072
- openOn: S ?? D.openOn,
1090
+ openOn: w ?? D.openOn,
1073
1091
  optionId: Ge,
1074
1092
  options: Wt,
1075
- overflow: Se ?? D.overflow,
1076
- portal: C ?? D.portal,
1093
+ overflow: ye ?? D.overflow,
1094
+ portal: be ?? D.portal,
1077
1095
  props: e,
1078
1096
  query: G,
1079
1097
  readOnly: Ye,
1080
1098
  remove: kt,
1081
- required: ke ?? O?.required ?? D.required,
1099
+ required: De ?? O?.required ?? D.required,
1082
1100
  resolver: ot,
1083
1101
  retry: () => L.retry(),
1084
1102
  revert: It,
@@ -1093,18 +1111,18 @@ function Ue(e) {
1093
1111
  setScope: Tt,
1094
1112
  setTyped: Et,
1095
1113
  settle: Ft,
1096
- side: Me ?? D.side,
1097
- size: Ne ?? O?.size ?? D.size,
1114
+ side: je ?? D.side,
1115
+ size: Me ?? O?.size ?? D.size,
1098
1116
  strategy: Pe ?? D.strategy,
1099
1117
  t: j,
1100
1118
  variant: Fe ?? D.variant,
1101
1119
  version: Ze,
1102
1120
  width: Ie ?? D.width
1103
1121
  };
1104
- return /* @__PURE__ */ v(ze.Provider, {
1122
+ return /* @__PURE__ */ x(ze.Provider, {
1105
1123
  value: Gt,
1106
- children: [/* @__PURE__ */ _(Le, {}), /* @__PURE__ */ _(Re, {})]
1124
+ children: [/* @__PURE__ */ b(Le, {}), /* @__PURE__ */ b(Re, {})]
1107
1125
  });
1108
1126
  }
1109
1127
  //#endregion
1110
- export { Ue as a, je as c, ke as i, S as n, w as o, De as r, Me as s, x as t };
1128
+ export { Ue as a, Ae as c, De as i, w as n, Oe as o, Te as r, je as s, he as t };