dawn-ui-react 1.0.0-beta.6 → 1.0.0-beta.7

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 (515) hide show
  1. package/README.md +9 -7
  2. package/dist/index.d.mts +4185 -0
  3. package/dist/index.mjs +9721 -0
  4. package/dist/index.mjs.map +1 -0
  5. package/dist/styles.css +2 -0
  6. package/package.json +42 -56
  7. package/dist/components/accordion/accordion-header.d.ts +0 -2
  8. package/dist/components/accordion/accordion-icon.d.ts +0 -2
  9. package/dist/components/accordion/accordion-item.d.ts +0 -2
  10. package/dist/components/accordion/accordion-panel.d.ts +0 -2
  11. package/dist/components/accordion/accordion-subtitle.d.ts +0 -2
  12. package/dist/components/accordion/accordion-title.d.ts +0 -2
  13. package/dist/components/accordion/accordion.d.ts +0 -2
  14. package/dist/components/accordion/accordion.types.d.ts +0 -19
  15. package/dist/components/accordion/index.d.ts +0 -8
  16. package/dist/components/alert/alert-action.d.ts +0 -2
  17. package/dist/components/alert/alert-description.d.ts +0 -2
  18. package/dist/components/alert/alert-icon.d.ts +0 -2
  19. package/dist/components/alert/alert-title.d.ts +0 -2
  20. package/dist/components/alert/alert.d.ts +0 -2
  21. package/dist/components/alert/alert.types.d.ts +0 -9
  22. package/dist/components/alert/index.d.ts +0 -6
  23. package/dist/components/alert-dialog/alert-dialog-close.d.ts +0 -2
  24. package/dist/components/alert-dialog/alert-dialog-confirm.d.ts +0 -2
  25. package/dist/components/alert-dialog/alert-dialog-context.d.ts +0 -10
  26. package/dist/components/alert-dialog/alert-dialog-description.d.ts +0 -2
  27. package/dist/components/alert-dialog/alert-dialog-footer.d.ts +0 -2
  28. package/dist/components/alert-dialog/alert-dialog-header.d.ts +0 -2
  29. package/dist/components/alert-dialog/alert-dialog-icon.d.ts +0 -2
  30. package/dist/components/alert-dialog/alert-dialog-popup.d.ts +0 -2
  31. package/dist/components/alert-dialog/alert-dialog-title.d.ts +0 -2
  32. package/dist/components/alert-dialog/alert-dialog-trigger.d.ts +0 -2
  33. package/dist/components/alert-dialog/alert-dialog.d.ts +0 -2
  34. package/dist/components/alert-dialog/alert-dialog.types.d.ts +0 -16
  35. package/dist/components/alert-dialog/index.d.ts +0 -11
  36. package/dist/components/autocomplete/autocomplete-collection.d.ts +0 -2
  37. package/dist/components/autocomplete/autocomplete-content.d.ts +0 -2
  38. package/dist/components/autocomplete/autocomplete-grid-content.d.ts +0 -2
  39. package/dist/components/autocomplete/autocomplete-grid-item.d.ts +0 -2
  40. package/dist/components/autocomplete/autocomplete-group-label.d.ts +0 -2
  41. package/dist/components/autocomplete/autocomplete-group.d.ts +0 -2
  42. package/dist/components/autocomplete/autocomplete-input-group-addon.d.ts +0 -2
  43. package/dist/components/autocomplete/autocomplete-input-group-input.d.ts +0 -2
  44. package/dist/components/autocomplete/autocomplete-input-group.d.ts +0 -2
  45. package/dist/components/autocomplete/autocomplete-item.d.ts +0 -2
  46. package/dist/components/autocomplete/autocomplete-row.d.ts +0 -2
  47. package/dist/components/autocomplete/autocomplete-status.d.ts +0 -2
  48. package/dist/components/autocomplete/autocomplete-trigger.d.ts +0 -2
  49. package/dist/components/autocomplete/autocomplete.d.ts +0 -2
  50. package/dist/components/autocomplete/autocomplete.types.d.ts +0 -23
  51. package/dist/components/autocomplete/index.d.ts +0 -15
  52. package/dist/components/avatar/avatar-badge.d.ts +0 -2
  53. package/dist/components/avatar/avatar-fallback.d.ts +0 -2
  54. package/dist/components/avatar/avatar-image.d.ts +0 -3
  55. package/dist/components/avatar/avatar.d.ts +0 -2
  56. package/dist/components/avatar/avatar.types.d.ts +0 -14
  57. package/dist/components/avatar/index.d.ts +0 -5
  58. package/dist/components/badge/badge.d.ts +0 -2
  59. package/dist/components/badge/badge.types.d.ts +0 -8
  60. package/dist/components/badge/index.d.ts +0 -2
  61. package/dist/components/bento-box/bento-box-action.d.ts +0 -2
  62. package/dist/components/bento-box/bento-box-content.d.ts +0 -2
  63. package/dist/components/bento-box/bento-box-description.d.ts +0 -2
  64. package/dist/components/bento-box/bento-box-footer.d.ts +0 -2
  65. package/dist/components/bento-box/bento-box-header.d.ts +0 -2
  66. package/dist/components/bento-box/bento-box-title.d.ts +0 -2
  67. package/dist/components/bento-box/bento-box.d.ts +0 -2
  68. package/dist/components/bento-box/bento-box.types.d.ts +0 -11
  69. package/dist/components/bento-box/index.d.ts +0 -8
  70. package/dist/components/breadcrumb/breadcrumb-ellipsis.d.ts +0 -2
  71. package/dist/components/breadcrumb/breadcrumb-item.d.ts +0 -2
  72. package/dist/components/breadcrumb/breadcrumb-link.d.ts +0 -2
  73. package/dist/components/breadcrumb/breadcrumb-separator.d.ts +0 -2
  74. package/dist/components/breadcrumb/breadcrumb.d.ts +0 -2
  75. package/dist/components/breadcrumb/breadcrumb.types.d.ts +0 -5
  76. package/dist/components/breadcrumb/index.d.ts +0 -6
  77. package/dist/components/button/button.d.ts +0 -2
  78. package/dist/components/button/button.types.d.ts +0 -8
  79. package/dist/components/button/index.d.ts +0 -2
  80. package/dist/components/button-group/button-group.d.ts +0 -2
  81. package/dist/components/button-group/button-group.types.d.ts +0 -8
  82. package/dist/components/button-group/index.d.ts +0 -2
  83. package/dist/components/chart/chart-container.d.ts +0 -5
  84. package/dist/components/chart/chart-legend-content.d.ts +0 -8
  85. package/dist/components/chart/chart-legend-icon.d.ts +0 -2
  86. package/dist/components/chart/chart-legend-indicator.d.ts +0 -2
  87. package/dist/components/chart/chart-legend-label.d.ts +0 -2
  88. package/dist/components/chart/chart-legend.d.ts +0 -2
  89. package/dist/components/chart/chart-linear-gradient.d.ts +0 -2
  90. package/dist/components/chart/chart-tooltip-content.d.ts +0 -4
  91. package/dist/components/chart/chart-tooltip-icon.d.ts +0 -2
  92. package/dist/components/chart/chart-tooltip-indicator.d.ts +0 -2
  93. package/dist/components/chart/chart-tooltip-label.d.ts +0 -2
  94. package/dist/components/chart/chart-tooltip-name.d.ts +0 -2
  95. package/dist/components/chart/chart-tooltip-payload.d.ts +0 -5
  96. package/dist/components/chart/chart-tooltip-value.d.ts +0 -2
  97. package/dist/components/chart/chart-tooltip.d.ts +0 -2
  98. package/dist/components/chart/chart.types.d.ts +0 -50
  99. package/dist/components/chart/chart.utils.d.ts +0 -11
  100. package/dist/components/chart/index.d.ts +0 -19
  101. package/dist/components/checkbox/checkbox-indicator.d.ts +0 -2
  102. package/dist/components/checkbox/checkbox.d.ts +0 -2
  103. package/dist/components/checkbox/checkbox.types.d.ts +0 -10
  104. package/dist/components/checkbox/index.d.ts +0 -3
  105. package/dist/components/checkbox-group/checkbox-group.d.ts +0 -3
  106. package/dist/components/checkbox-group/checkbox-group.types.d.ts +0 -2
  107. package/dist/components/checkbox-group/index.d.ts +0 -2
  108. package/dist/components/code-block/code-block-actions.d.ts +0 -2
  109. package/dist/components/code-block/code-block-copy.d.ts +0 -3
  110. package/dist/components/code-block/code-block-download.d.ts +0 -3
  111. package/dist/components/code-block/code-block-header.d.ts +0 -3
  112. package/dist/components/code-block/code-block-name.d.ts +0 -2
  113. package/dist/components/code-block/code-block-select.d.ts +0 -2
  114. package/dist/components/code-block/code-block-tabs.d.ts +0 -2
  115. package/dist/components/code-block/code-block-window.d.ts +0 -2
  116. package/dist/components/code-block/code-block.d.ts +0 -4
  117. package/dist/components/code-block/code-block.types.d.ts +0 -26
  118. package/dist/components/code-block/index.d.ts +0 -10
  119. package/dist/components/collapsible/collapsible-panel.d.ts +0 -2
  120. package/dist/components/collapsible/collapsible-trigger.d.ts +0 -2
  121. package/dist/components/collapsible/collapsible.d.ts +0 -2
  122. package/dist/components/collapsible/collapsible.types.d.ts +0 -5
  123. package/dist/components/collapsible/index.d.ts +0 -4
  124. package/dist/components/color-channel-slider/color-channel-slider.d.ts +0 -2
  125. package/dist/components/color-channel-slider/color-channel-slider.types.d.ts +0 -8
  126. package/dist/components/color-channel-slider/color-channel-slider.utils.d.ts +0 -4
  127. package/dist/components/color-channel-slider/index.d.ts +0 -2
  128. package/dist/components/color-picker/color-picker-area.d.ts +0 -2
  129. package/dist/components/color-picker/color-picker-group.d.ts +0 -2
  130. package/dist/components/color-picker/color-picker-hue-slider.d.ts +0 -2
  131. package/dist/components/color-picker/color-picker-input.d.ts +0 -3
  132. package/dist/components/color-picker/color-picker-label.d.ts +0 -2
  133. package/dist/components/color-picker/color-picker-lightness-slider.d.ts +0 -2
  134. package/dist/components/color-picker/color-picker-palette-add.d.ts +0 -2
  135. package/dist/components/color-picker/color-picker-palette-limit.d.ts +0 -2
  136. package/dist/components/color-picker/color-picker-palette-list.d.ts +0 -2
  137. package/dist/components/color-picker/color-picker-palette-swatch.d.ts +0 -2
  138. package/dist/components/color-picker/color-picker-row.d.ts +0 -2
  139. package/dist/components/color-picker/color-picker-transparency-slider.d.ts +0 -2
  140. package/dist/components/color-picker/color-picker-value-type.d.ts +0 -2
  141. package/dist/components/color-picker/color-picker.d.ts +0 -4
  142. package/dist/components/color-picker/color-picker.types.d.ts +0 -111
  143. package/dist/components/color-picker/index.d.ts +0 -14
  144. package/dist/components/combobox/combobox-chip.d.ts +0 -2
  145. package/dist/components/combobox/combobox-chips.d.ts +0 -2
  146. package/dist/components/combobox/combobox-collection.d.ts +0 -2
  147. package/dist/components/combobox/combobox-empty.d.ts +0 -2
  148. package/dist/components/combobox/combobox-group-label.d.ts +0 -2
  149. package/dist/components/combobox/combobox-group.d.ts +0 -2
  150. package/dist/components/combobox/combobox-input.d.ts +0 -3
  151. package/dist/components/combobox/combobox-item.d.ts +0 -2
  152. package/dist/components/combobox/combobox-list.d.ts +0 -2
  153. package/dist/components/combobox/combobox-popup.d.ts +0 -2
  154. package/dist/components/combobox/combobox-status.d.ts +0 -2
  155. package/dist/components/combobox/combobox-trigger.d.ts +0 -2
  156. package/dist/components/combobox/combobox-value.d.ts +0 -2
  157. package/dist/components/combobox/combobox-virtualized-list.d.ts +0 -3
  158. package/dist/components/combobox/combobox.d.ts +0 -2
  159. package/dist/components/combobox/combobox.types.d.ts +0 -31
  160. package/dist/components/combobox/index.d.ts +0 -16
  161. package/dist/components/context-menu/context-menu-checkbox-item.d.ts +0 -2
  162. package/dist/components/context-menu/context-menu-group-label.d.ts +0 -2
  163. package/dist/components/context-menu/context-menu-group.d.ts +0 -2
  164. package/dist/components/context-menu/context-menu-item.d.ts +0 -2
  165. package/dist/components/context-menu/context-menu-popup.d.ts +0 -2
  166. package/dist/components/context-menu/context-menu-radio-group.d.ts +0 -2
  167. package/dist/components/context-menu/context-menu-radio-item.d.ts +0 -2
  168. package/dist/components/context-menu/context-menu-separator.d.ts +0 -2
  169. package/dist/components/context-menu/context-menu-shortcut.d.ts +0 -2
  170. package/dist/components/context-menu/context-menu-submenu-trigger.d.ts +0 -2
  171. package/dist/components/context-menu/context-menu-submenu.d.ts +0 -2
  172. package/dist/components/context-menu/context-menu-trigger.d.ts +0 -2
  173. package/dist/components/context-menu/context-menu.d.ts +0 -2
  174. package/dist/components/context-menu/context-menu.types.d.ts +0 -21
  175. package/dist/components/context-menu/index.d.ts +0 -14
  176. package/dist/components/dialog/dialog-close.d.ts +0 -2
  177. package/dist/components/dialog/dialog-content.d.ts +0 -2
  178. package/dist/components/dialog/dialog-description.d.ts +0 -2
  179. package/dist/components/dialog/dialog-footer.d.ts +0 -2
  180. package/dist/components/dialog/dialog-header.d.ts +0 -2
  181. package/dist/components/dialog/dialog-icon.d.ts +0 -2
  182. package/dist/components/dialog/dialog-popup.d.ts +0 -2
  183. package/dist/components/dialog/dialog-title.d.ts +0 -2
  184. package/dist/components/dialog/dialog-trigger.d.ts +0 -2
  185. package/dist/components/dialog/dialog.d.ts +0 -2
  186. package/dist/components/dialog/dialog.types.d.ts +0 -13
  187. package/dist/components/dialog/index.d.ts +0 -12
  188. package/dist/components/drawer/drawer-close.d.ts +0 -2
  189. package/dist/components/drawer/drawer-content.d.ts +0 -2
  190. package/dist/components/drawer/drawer-description.d.ts +0 -2
  191. package/dist/components/drawer/drawer-header.d.ts +0 -2
  192. package/dist/components/drawer/drawer-popup.d.ts +0 -2
  193. package/dist/components/drawer/drawer-provider.d.ts +0 -2
  194. package/dist/components/drawer/drawer-title.d.ts +0 -2
  195. package/dist/components/drawer/drawer-trigger.d.ts +0 -2
  196. package/dist/components/drawer/drawer.d.ts +0 -2
  197. package/dist/components/drawer/drawer.types.d.ts +0 -10
  198. package/dist/components/drawer/index.d.ts +0 -10
  199. package/dist/components/dropzone/dropzone-actions.d.ts +0 -2
  200. package/dist/components/dropzone/dropzone-clear.d.ts +0 -2
  201. package/dist/components/dropzone/dropzone-confirm.d.ts +0 -2
  202. package/dist/components/dropzone/dropzone-container.d.ts +0 -2
  203. package/dist/components/dropzone/dropzone-error.d.ts +0 -2
  204. package/dist/components/dropzone/dropzone-file-limit.d.ts +0 -2
  205. package/dist/components/dropzone/dropzone-file-size-limit.d.ts +0 -2
  206. package/dist/components/dropzone/dropzone-files-header.d.ts +0 -2
  207. package/dist/components/dropzone/dropzone-files-list.d.ts +0 -2
  208. package/dist/components/dropzone/dropzone-files-title.d.ts +0 -2
  209. package/dist/components/dropzone/dropzone-files.d.ts +0 -2
  210. package/dist/components/dropzone/dropzone-formats.d.ts +0 -2
  211. package/dist/components/dropzone/dropzone-heading.d.ts +0 -2
  212. package/dist/components/dropzone/dropzone-icon.d.ts +0 -2
  213. package/dist/components/dropzone/dropzone-info.d.ts +0 -2
  214. package/dist/components/dropzone/dropzone-subtitle.d.ts +0 -2
  215. package/dist/components/dropzone/dropzone-trigger.d.ts +0 -2
  216. package/dist/components/dropzone/dropzone.d.ts +0 -24
  217. package/dist/components/dropzone/dropzone.types.d.ts +0 -30
  218. package/dist/components/dropzone/dropzone.utils.d.ts +0 -3
  219. package/dist/components/dropzone/index.d.ts +0 -18
  220. package/dist/components/field/field-checkbox.d.ts +0 -2
  221. package/dist/components/field/field-description.d.ts +0 -2
  222. package/dist/components/field/field-errors.d.ts +0 -2
  223. package/dist/components/field/field-input-group-input.d.ts +0 -2
  224. package/dist/components/field/field-input-group.d.ts +0 -2
  225. package/dist/components/field/field-input.d.ts +0 -2
  226. package/dist/components/field/field-label.d.ts +0 -2
  227. package/dist/components/field/field-radio-group.d.ts +0 -2
  228. package/dist/components/field/field-radio.d.ts +0 -2
  229. package/dist/components/field/field-row.d.ts +0 -2
  230. package/dist/components/field/field-select.d.ts +0 -2
  231. package/dist/components/field/field-set.d.ts +0 -2
  232. package/dist/components/field/field-slider.d.ts +0 -2
  233. package/dist/components/field/field-switch.d.ts +0 -2
  234. package/dist/components/field/field-text-area.d.ts +0 -2
  235. package/dist/components/field/field-toggle.d.ts +0 -2
  236. package/dist/components/field/field.d.ts +0 -2
  237. package/dist/components/field/field.types.d.ts +0 -33
  238. package/dist/components/field/index.d.ts +0 -18
  239. package/dist/components/form/form-context.d.ts +0 -182
  240. package/dist/components/form/form-contexts.d.ts +0 -1
  241. package/dist/components/form/form-errors.d.ts +0 -2
  242. package/dist/components/form/form-footer.d.ts +0 -2
  243. package/dist/components/form/form-reset.d.ts +0 -2
  244. package/dist/components/form/form-set-content.d.ts +0 -2
  245. package/dist/components/form/form-set-heading.d.ts +0 -2
  246. package/dist/components/form/form-set.d.ts +0 -2
  247. package/dist/components/form/form-submit.d.ts +0 -2
  248. package/dist/components/form/form.d.ts +0 -3
  249. package/dist/components/form/form.types.d.ts +0 -17
  250. package/dist/components/form/index.d.ts +0 -10
  251. package/dist/components/index.d.ts +0 -57
  252. package/dist/components/input/index.d.ts +0 -2
  253. package/dist/components/input/input.d.ts +0 -2
  254. package/dist/components/input/input.types.d.ts +0 -19
  255. package/dist/components/input-group/index.d.ts +0 -5
  256. package/dist/components/input-group/input-group-addon.d.ts +0 -2
  257. package/dist/components/input-group/input-group-input.d.ts +0 -2
  258. package/dist/components/input-group/input-group-separator.d.ts +0 -2
  259. package/dist/components/input-group/input-group.d.ts +0 -2
  260. package/dist/components/input-group/input-group.types.d.ts +0 -11
  261. package/dist/components/input-otp/index.d.ts +0 -4
  262. package/dist/components/input-otp/input-otp-separator.d.ts +0 -2
  263. package/dist/components/input-otp/input-otp-slot.d.ts +0 -2
  264. package/dist/components/input-otp/input-otp.d.ts +0 -3
  265. package/dist/components/input-otp/input-otp.types.d.ts +0 -4
  266. package/dist/components/kbd/index.d.ts +0 -2
  267. package/dist/components/kbd/kbd-group.d.ts +0 -2
  268. package/dist/components/kbd/kbd.d.ts +0 -2
  269. package/dist/components/kbd/kbd.types.d.ts +0 -2
  270. package/dist/components/label/index.d.ts +0 -2
  271. package/dist/components/label/label.d.ts +0 -2
  272. package/dist/components/label/label.types.d.ts +0 -5
  273. package/dist/components/layer-tree/index.d.ts +0 -18
  274. package/dist/components/layer-tree/layer-tree-body.d.ts +0 -2
  275. package/dist/components/layer-tree/layer-tree-context.d.ts +0 -377
  276. package/dist/components/layer-tree/layer-tree-expand-all.d.ts +0 -2
  277. package/dist/components/layer-tree/layer-tree-footer.d.ts +0 -2
  278. package/dist/components/layer-tree/layer-tree-icon-cell.d.ts +0 -2
  279. package/dist/components/layer-tree/layer-tree-locked-all.d.ts +0 -2
  280. package/dist/components/layer-tree/layer-tree-locked-cell.d.ts +0 -2
  281. package/dist/components/layer-tree/layer-tree-node-icon.d.ts +0 -2
  282. package/dist/components/layer-tree/layer-tree-row.d.ts +0 -2
  283. package/dist/components/layer-tree/layer-tree-search.d.ts +0 -2
  284. package/dist/components/layer-tree/layer-tree-sort.d.ts +0 -2
  285. package/dist/components/layer-tree/layer-tree-text-cell.d.ts +0 -2
  286. package/dist/components/layer-tree/layer-tree-trigger-cell.d.ts +0 -3
  287. package/dist/components/layer-tree/layer-tree-utils.d.ts +0 -86
  288. package/dist/components/layer-tree/layer-tree-visibility-all.d.ts +0 -2
  289. package/dist/components/layer-tree/layer-tree-visibility-cell.d.ts +0 -2
  290. package/dist/components/layer-tree/layer-tree.d.ts +0 -8
  291. package/dist/components/layer-tree/layer-tree.types.d.ts +0 -110
  292. package/dist/components/menu/index.d.ts +0 -14
  293. package/dist/components/menu/menu-checkbox-item.d.ts +0 -2
  294. package/dist/components/menu/menu-group-label.d.ts +0 -2
  295. package/dist/components/menu/menu-group.d.ts +0 -2
  296. package/dist/components/menu/menu-item.d.ts +0 -2
  297. package/dist/components/menu/menu-popup.d.ts +0 -2
  298. package/dist/components/menu/menu-radio-group.d.ts +0 -2
  299. package/dist/components/menu/menu-radio-item.d.ts +0 -2
  300. package/dist/components/menu/menu-separator.d.ts +0 -2
  301. package/dist/components/menu/menu-shortcut.d.ts +0 -2
  302. package/dist/components/menu/menu-submenu-trigger.d.ts +0 -2
  303. package/dist/components/menu/menu-submenu.d.ts +0 -2
  304. package/dist/components/menu/menu-trigger.d.ts +0 -2
  305. package/dist/components/menu/menu.d.ts +0 -2
  306. package/dist/components/menu/menu.types.d.ts +0 -21
  307. package/dist/components/meter/index.d.ts +0 -9
  308. package/dist/components/meter/meter-footer.d.ts +0 -2
  309. package/dist/components/meter/meter-header.d.ts +0 -2
  310. package/dist/components/meter/meter-indicator.d.ts +0 -2
  311. package/dist/components/meter/meter-label.d.ts +0 -2
  312. package/dist/components/meter/meter-subtitle.d.ts +0 -2
  313. package/dist/components/meter/meter-track.d.ts +0 -2
  314. package/dist/components/meter/meter-value.d.ts +0 -2
  315. package/dist/components/meter/meter.d.ts +0 -2
  316. package/dist/components/meter/meter.types.d.ts +0 -15
  317. package/dist/components/nav-bar/index.d.ts +0 -5
  318. package/dist/components/nav-bar/nav-bar-item-icon.d.ts +0 -2
  319. package/dist/components/nav-bar/nav-bar-item-label.d.ts +0 -2
  320. package/dist/components/nav-bar/nav-bar-item.d.ts +0 -2
  321. package/dist/components/nav-bar/nav-bar.d.ts +0 -2
  322. package/dist/components/nav-bar/nav-bar.types.d.ts +0 -15
  323. package/dist/components/navigation-menu/index.d.ts +0 -9
  324. package/dist/components/navigation-menu/navigation-menu-content.d.ts +0 -2
  325. package/dist/components/navigation-menu/navigation-menu-icon.d.ts +0 -2
  326. package/dist/components/navigation-menu/navigation-menu-item.d.ts +0 -2
  327. package/dist/components/navigation-menu/navigation-menu-link.d.ts +0 -2
  328. package/dist/components/navigation-menu/navigation-menu-list.d.ts +0 -2
  329. package/dist/components/navigation-menu/navigation-menu-popup.d.ts +0 -2
  330. package/dist/components/navigation-menu/navigation-menu-trigger.d.ts +0 -6
  331. package/dist/components/navigation-menu/navigation-menu.d.ts +0 -2
  332. package/dist/components/navigation-menu/navigation-menu.types.d.ts +0 -16
  333. package/dist/components/number-field/index.d.ts +0 -2
  334. package/dist/components/number-field/number-field.d.ts +0 -3
  335. package/dist/components/number-field/number-field.types.d.ts +0 -10
  336. package/dist/components/popover/index.d.ts +0 -10
  337. package/dist/components/popover/popover-button.d.ts +0 -2
  338. package/dist/components/popover/popover-content.d.ts +0 -2
  339. package/dist/components/popover/popover-description.d.ts +0 -2
  340. package/dist/components/popover/popover-header.d.ts +0 -2
  341. package/dist/components/popover/popover-panel.d.ts +0 -2
  342. package/dist/components/popover/popover-title.d.ts +0 -2
  343. package/dist/components/popover/popover-trigger.d.ts +0 -2
  344. package/dist/components/popover/popover.d.ts +0 -2
  345. package/dist/components/popover/popover.types.d.ts +0 -15
  346. package/dist/components/preview-card/index.d.ts +0 -4
  347. package/dist/components/preview-card/preview-card-popup.d.ts +0 -2
  348. package/dist/components/preview-card/preview-card-trigger.d.ts +0 -2
  349. package/dist/components/preview-card/preview-card.d.ts +0 -2
  350. package/dist/components/preview-card/preview-card.types.d.ts +0 -4
  351. package/dist/components/profile/index.d.ts +0 -6
  352. package/dist/components/profile/profile-action.d.ts +0 -2
  353. package/dist/components/profile/profile-content.d.ts +0 -2
  354. package/dist/components/profile/profile-name.d.ts +0 -2
  355. package/dist/components/profile/profile-subname.d.ts +0 -2
  356. package/dist/components/profile/profile.d.ts +0 -2
  357. package/dist/components/profile/profile.types.d.ts +0 -8
  358. package/dist/components/progress/index.d.ts +0 -4
  359. package/dist/components/progress/progress-bar.d.ts +0 -2
  360. package/dist/components/progress/progress-indicator.d.ts +0 -2
  361. package/dist/components/progress/progress.d.ts +0 -2
  362. package/dist/components/progress/progress.types.d.ts +0 -8
  363. package/dist/components/radar-ping/index.d.ts +0 -2
  364. package/dist/components/radar-ping/radar-ping.d.ts +0 -2
  365. package/dist/components/radar-ping/radar-ping.types.d.ts +0 -8
  366. package/dist/components/radio-group/index.d.ts +0 -3
  367. package/dist/components/radio-group/radio-group.d.ts +0 -3
  368. package/dist/components/radio-group/radio-group.types.d.ts +0 -7
  369. package/dist/components/radio-group/radio.d.ts +0 -2
  370. package/dist/components/resizeable/index.d.ts +0 -4
  371. package/dist/components/resizeable/resizeable-handle.d.ts +0 -2
  372. package/dist/components/resizeable/resizeable-panel-group.d.ts +0 -2
  373. package/dist/components/resizeable/resizeable-panel.d.ts +0 -2
  374. package/dist/components/resizeable/resizeable.types.d.ts +0 -6
  375. package/dist/components/scroll-area/index.d.ts +0 -2
  376. package/dist/components/scroll-area/scroll-area.d.ts +0 -2
  377. package/dist/components/scroll-area/scroll-area.types.d.ts +0 -10
  378. package/dist/components/select/index.d.ts +0 -12
  379. package/dist/components/select/select-description.d.ts +0 -2
  380. package/dist/components/select/select-group-label.d.ts +0 -2
  381. package/dist/components/select/select-group.d.ts +0 -2
  382. package/dist/components/select/select-icon.d.ts +0 -2
  383. package/dist/components/select/select-item.d.ts +0 -2
  384. package/dist/components/select/select-list.d.ts +0 -2
  385. package/dist/components/select/select-popup.d.ts +0 -2
  386. package/dist/components/select/select-title.d.ts +0 -2
  387. package/dist/components/select/select-trigger.d.ts +0 -2
  388. package/dist/components/select/select-value.d.ts +0 -2
  389. package/dist/components/select/select.d.ts +0 -2
  390. package/dist/components/select/select.types.d.ts +0 -22
  391. package/dist/components/separator/index.d.ts +0 -2
  392. package/dist/components/separator/separator.d.ts +0 -2
  393. package/dist/components/separator/separator.types.d.ts +0 -11
  394. package/dist/components/sidebar/index.d.ts +0 -18
  395. package/dist/components/sidebar/sidebar-content.d.ts +0 -2
  396. package/dist/components/sidebar/sidebar-footer.d.ts +0 -2
  397. package/dist/components/sidebar/sidebar-group-content.d.ts +0 -2
  398. package/dist/components/sidebar/sidebar-group-label.d.ts +0 -2
  399. package/dist/components/sidebar/sidebar-group.d.ts +0 -2
  400. package/dist/components/sidebar/sidebar-header.d.ts +0 -2
  401. package/dist/components/sidebar/sidebar-menu-badge.d.ts +0 -2
  402. package/dist/components/sidebar/sidebar-menu-button.d.ts +0 -2
  403. package/dist/components/sidebar/sidebar-menu-collapsible-panel.d.ts +0 -2
  404. package/dist/components/sidebar/sidebar-menu-collapsible-trigger.d.ts +0 -2
  405. package/dist/components/sidebar/sidebar-menu-collapsible.d.ts +0 -2
  406. package/dist/components/sidebar/sidebar-menu-item.d.ts +0 -2
  407. package/dist/components/sidebar/sidebar-menu.d.ts +0 -2
  408. package/dist/components/sidebar/sidebar-provider.d.ts +0 -14
  409. package/dist/components/sidebar/sidebar-toggle.d.ts +0 -2
  410. package/dist/components/sidebar/sidebar.d.ts +0 -3
  411. package/dist/components/sidebar/sidebar.types.d.ts +0 -29
  412. package/dist/components/sidebar/sidebar.utils.d.ts +0 -1
  413. package/dist/components/skeleton/index.d.ts +0 -2
  414. package/dist/components/skeleton/skeleton.d.ts +0 -2
  415. package/dist/components/skeleton/skeleton.types.d.ts +0 -1
  416. package/dist/components/slider/index.d.ts +0 -3
  417. package/dist/components/slider/slider-group-context.d.ts +0 -5
  418. package/dist/components/slider/slider-group.d.ts +0 -3
  419. package/dist/components/slider/slider-thumb.d.ts +0 -3
  420. package/dist/components/slider/slider.d.ts +0 -2
  421. package/dist/components/slider/slider.types.d.ts +0 -15
  422. package/dist/components/slider-group/index.d.ts +0 -9
  423. package/dist/components/slider-group/slider-description.d.ts +0 -2
  424. package/dist/components/slider-group/slider-group-context.d.ts +0 -5
  425. package/dist/components/slider-group/slider-group-slider.d.ts +0 -3
  426. package/dist/components/slider-group/slider-group.d.ts +0 -3
  427. package/dist/components/slider-group/slider-group.types.d.ts +0 -27
  428. package/dist/components/slider-group/slider-icon.d.ts +0 -2
  429. package/dist/components/slider-group/slider-input.d.ts +0 -2
  430. package/dist/components/slider-group/slider-label.d.ts +0 -2
  431. package/dist/components/slider-group/slider-value.d.ts +0 -2
  432. package/dist/components/switch/index.d.ts +0 -2
  433. package/dist/components/switch/switch.d.ts +0 -2
  434. package/dist/components/switch/switch.types.d.ts +0 -4
  435. package/dist/components/table/index.d.ts +0 -39
  436. package/dist/components/table/table-badge-cell.d.ts +0 -2
  437. package/dist/components/table/table-body.d.ts +0 -2
  438. package/dist/components/table/table-checkbox-cell.d.ts +0 -2
  439. package/dist/components/table/table-column-toggle.d.ts +0 -2
  440. package/dist/components/table/table-container.d.ts +0 -2
  441. package/dist/components/table/table-context.d.ts +0 -414
  442. package/dist/components/table/table-date-cell.d.ts +0 -2
  443. package/dist/components/table/table-date-filter-chip.d.ts +0 -3
  444. package/dist/components/table/table-date-filter-form.d.ts +0 -3
  445. package/dist/components/table/table-filter-list.d.ts +0 -2
  446. package/dist/components/table/table-filter-menu.d.ts +0 -2
  447. package/dist/components/table/table-first-page.d.ts +0 -2
  448. package/dist/components/table/table-footer.d.ts +0 -2
  449. package/dist/components/table/table-header.d.ts +0 -2
  450. package/dist/components/table/table-image-cell.d.ts +0 -2
  451. package/dist/components/table/table-last-page.d.ts +0 -2
  452. package/dist/components/table/table-nav.d.ts +0 -2
  453. package/dist/components/table/table-next-page.d.ts +0 -2
  454. package/dist/components/table/table-number-cell.d.ts +0 -2
  455. package/dist/components/table/table-number-filter-chip.d.ts +0 -3
  456. package/dist/components/table/table-number-filter-form.d.ts +0 -3
  457. package/dist/components/table/table-pagination.d.ts +0 -2
  458. package/dist/components/table/table-paging.d.ts +0 -2
  459. package/dist/components/table/table-previous-page.d.ts +0 -2
  460. package/dist/components/table/table-results.d.ts +0 -3
  461. package/dist/components/table/table-search.d.ts +0 -3
  462. package/dist/components/table/table-select-filter-chip.d.ts +0 -3
  463. package/dist/components/table/table-select-filter-form.d.ts +0 -3
  464. package/dist/components/table/table-select-header.d.ts +0 -2
  465. package/dist/components/table/table-sort-chip.d.ts +0 -3
  466. package/dist/components/table/table-sort-list.d.ts +0 -2
  467. package/dist/components/table/table-sort-menu.d.ts +0 -2
  468. package/dist/components/table/table-string-filter-chip.d.ts +0 -3
  469. package/dist/components/table/table-string-filter-form.d.ts +0 -3
  470. package/dist/components/table/table-text-cell.d.ts +0 -2
  471. package/dist/components/table/table-toolbar.d.ts +0 -2
  472. package/dist/components/table/table-view-mode-toggle.d.ts +0 -2
  473. package/dist/components/table/table-viewport.d.ts +0 -2
  474. package/dist/components/table/table.types.d.ts +0 -169
  475. package/dist/components/table/table.utils.d.ts +0 -30
  476. package/dist/components/tabs/index.d.ts +0 -6
  477. package/dist/components/tabs/tabs-indicator.d.ts +0 -2
  478. package/dist/components/tabs/tabs-list.d.ts +0 -2
  479. package/dist/components/tabs/tabs-panel.d.ts +0 -2
  480. package/dist/components/tabs/tabs-tab.d.ts +0 -2
  481. package/dist/components/tabs/tabs.d.ts +0 -2
  482. package/dist/components/tabs/tabs.types.d.ts +0 -15
  483. package/dist/components/text-area/index.d.ts +0 -2
  484. package/dist/components/text-area/text-area.d.ts +0 -3
  485. package/dist/components/text-area/text-area.types.d.ts +0 -5
  486. package/dist/components/toast/anchored-toast-item.d.ts +0 -2
  487. package/dist/components/toast/anchored-toasts.d.ts +0 -2
  488. package/dist/components/toast/index.d.ts +0 -27
  489. package/dist/components/toast/stack-toast-item.d.ts +0 -3
  490. package/dist/components/toast/stack-toasts.d.ts +0 -2
  491. package/dist/components/toast/toast-manager.d.ts +0 -19
  492. package/dist/components/toast/toast-provider.d.ts +0 -2
  493. package/dist/components/toast/toast.types.d.ts +0 -21
  494. package/dist/components/toggle/index.d.ts +0 -2
  495. package/dist/components/toggle/toggle.d.ts +0 -2
  496. package/dist/components/toggle/toggle.types.d.ts +0 -9
  497. package/dist/components/toggle-group/index.d.ts +0 -2
  498. package/dist/components/toggle-group/toggle-group-context.d.ts +0 -5
  499. package/dist/components/toggle-group/toggle-group.d.ts +0 -2
  500. package/dist/components/toggle-group/toggle-group.types.d.ts +0 -7
  501. package/dist/components/tooltip/index.d.ts +0 -4
  502. package/dist/components/tooltip/tooltip-context.d.ts +0 -2
  503. package/dist/components/tooltip/tooltip-trigger.d.ts +0 -2
  504. package/dist/components/tooltip/tooltip.d.ts +0 -2
  505. package/dist/components/tooltip/tooltip.types.d.ts +0 -9
  506. package/dist/dawn-ui-react.js +0 -59801
  507. package/dist/dawn-ui-react.umd.cjs +0 -228
  508. package/dist/hooks/index.d.ts +0 -2
  509. package/dist/hooks/theme/constants.d.ts +0 -4
  510. package/dist/hooks/theme/index.d.ts +0 -3
  511. package/dist/hooks/theme/types.d.ts +0 -16
  512. package/dist/hooks/theme/use-theme.d.ts +0 -3
  513. package/dist/hooks/use-media-query.d.ts +0 -6
  514. package/dist/index.d.ts +0 -3
  515. package/dist/utils/cn.d.ts +0 -2
@@ -1,228 +0,0 @@
1
- (function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports):typeof define==`function`&&define.amd?define([`exports`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e.dawnUIReact={}))})(this,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=Object.create,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,a=Object.getPrototypeOf,o=Object.prototype.hasOwnProperty,s=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),c=(e,t)=>{let r={};for(var i in e)n(r,i,{get:e[i],enumerable:!0});return t||n(r,Symbol.toStringTag,{value:`Module`}),r},l=(e,t,a,s)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var c=i(t),l=0,u=c.length,d;l<u;l++)d=c[l],!o.call(e,d)&&d!==a&&n(e,d,{get:(e=>t[e]).bind(null,d),enumerable:!(s=r(t,d))||s.enumerable});return e},u=(e,r,i)=>(i=e==null?{}:t(a(e)),l(r||!e||!e.__esModule||!o.call(e,`default`)?n(i,`default`,{value:e,enumerable:!0}):i,e)),d=s((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.for(`react.view_transition`),m=Symbol.iterator;function h(e){return typeof e!=`object`||!e?null:(e=m&&e[m]||e[`@@iterator`],typeof e==`function`?e:null)}var g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,v={};function y(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||g}y.prototype.isReactComponent={},y.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},y.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function b(){}b.prototype=y.prototype;function x(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||g}var S=x.prototype=new b;S.constructor=x,_(S,y.prototype),S.isPureReactComponent=!0;var C=Array.isArray;function w(){}var T={H:null,A:null,T:null,S:null},E=Object.prototype.hasOwnProperty;function D(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function O(e,t){return D(e.type,t,e.props)}function k(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function A(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var j=/\/+/g;function M(e,t){return typeof e==`object`&&e&&e.key!=null?A(``+e.key):t.toString(36)}function N(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(w,w):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function P(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,P(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+M(e,0):a,C(o)?(i=``,c!=null&&(i=c.replace(j,`$&/`)+`/`),P(o,r,i,``,function(e){return e})):o!=null&&(k(o)&&(o=O(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(j,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(C(e))for(var u=0;u<e.length;u++)a=e[u],s=l+M(a,u),c+=P(a,r,i,s,o);else if(u=h(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+M(a,u++),c+=P(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return P(N(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function F(e,t,n){if(e==null)return e;var r=[],i=0;return P(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function I(e){if(e._status===-1){var t=e._result,n=t();n.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t,n.status===void 0&&(n.status=`fulfilled`,n.value=t))},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t,n.status===void 0&&(n.status=`rejected`,n.reason=t))}),e._status===-1&&(e._status=0,e._result=n)}if(e._status===1)return e._result.default;throw e._result}var L=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)};function R(e){var t=T.T,n={};n.types=t===null?null:t.types,T.T=n;try{var r=e(),i=T.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(w,L)}catch(e){L(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),T.T=t}}function z(e){var t=T.T;if(t!==null){var n=t.types;n===null?t.types=[e]:n.indexOf(e)===-1&&n.push(e)}else R(z.bind(null,e))}var B={map:F,forEach:function(e,t,n){F(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return F(e,function(){t++}),t},toArray:function(e){return F(e,function(e){return e})||[]},only:function(e){if(!k(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=B,e.Component=y,e.Fragment=r,e.Profiler=a,e.PureComponent=x,e.StrictMode=i,e.Suspense=l,e.ViewTransition=p,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=T,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return T.H.useMemoCache(e)}},e.addTransitionType=z,e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=_({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!E.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return D(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)E.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return D(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=k,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:I}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=R,e.unstable_useCacheRefresh=function(){return T.H.useCacheRefresh()},e.use=function(e){return T.H.use(e)},e.useActionState=function(e,t,n){return T.H.useActionState(e,t,n)},e.useCallback=function(e,t){return T.H.useCallback(e,t)},e.useContext=function(e){return T.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return T.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return T.H.useEffect(e,t)},e.useEffectEvent=function(e){return T.H.useEffectEvent(e)},e.useId=function(){return T.H.useId()},e.useImperativeHandle=function(e,t,n){return T.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return T.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return T.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return T.H.useMemo(e,t)},e.useOptimistic=function(e,t){return T.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return T.H.useReducer(e,t,n)},e.useRef=function(e){return T.H.useRef(e)},e.useState=function(e){return T.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return T.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return T.H.useTransition()},e.version=`19.3.0`})),f=s(((e,t)=>{process.env.NODE_ENV!==`production`&&(function(){function n(e,t){Object.defineProperty(a.prototype,e,{get:function(){console.warn(`%s(...) is deprecated in plain JavaScript React classes. %s`,t[0],t[1])}})}function r(e){return typeof e!=`object`||!e?null:(e=te&&e[te]||e[`@@iterator`],typeof e==`function`?e:null)}function i(e,t){e=(e=e.constructor)&&(e.displayName||e.name)||`ReactClass`;var n=e+`.`+t;ne[n]||(console.error("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.",t,e),ne[n]=!0)}function a(e,t,n){this.props=e,this.context=t,this.refs=ae,this.updater=n||re}function o(){}function s(e,t,n){this.props=e,this.context=t,this.refs=ae,this.updater=n||re}function c(){}function l(e){return``+e}function u(e){try{l(e);var t=!1}catch{t=!0}if(t){t=console;var n=t.error,r=typeof Symbol==`function`&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||`Object`;return n.call(t,`The provided key is an unsupported type %s. This value must be coerced to a string before using it here.`,r),l(e)}}function d(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===ce?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case z:return`Fragment`;case V:return`Profiler`;case B:return`StrictMode`;case G:return`Suspense`;case K:return`SuspenseList`;case ee:return`Activity`;case Y:return`ViewTransition`}if(typeof e==`object`)switch(typeof e.tag==`number`&&console.error(`Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.`),e.$$typeof){case R:return`Portal`;case U:return e.displayName||`Context`;case H:return(e._context.displayName||`Context`)+`.Consumer`;case W:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case q:return t=e.displayName||null,t===null?d(e.type)||`Memo`:t;case J:t=e._payload,e=e._init;try{return d(e(t))}catch{}}return null}function f(e){if(e===z)return`<>`;if(typeof e==`object`&&e&&e.$$typeof===J)return`<...>`;try{var t=d(e);return t?`<`+t+`>`:`<...>`}catch{return`<...>`}}function p(){var e=le.A;return e===null?null:e.getOwner()}function m(){return Error(`react-stack-top-frame`)}function h(e){if(ue.call(e,`key`)){var t=Object.getOwnPropertyDescriptor(e,`key`).get;if(t&&t.isReactWarning)return!1}return e.key!==void 0}function g(e,t){function n(){fe||(fe=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",t))}n.isReactWarning=!0,Object.defineProperty(e,"key",{get:n,configurable:!0})}function _(){var e=d(this.type);return me[e]||(me[e]=!0,console.error(`Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.`)),e=this.props.ref,e===void 0?null:e}function v(e,t,n,r,i,a){var o=n.ref;return e={$$typeof:L,type:e,key:t,props:n,_owner:r},(o===void 0?null:o)===null?Object.defineProperty(e,"ref",{enumerable:!1,value:null}):Object.defineProperty(e,"ref",{enumerable:!1,get:_}),e._store={},Object.defineProperty(e._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(e,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(e,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:i}),Object.defineProperty(e,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:a}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}function y(e,t){return t=v(e.type,t,e.props,e._owner,e._debugStack,e._debugTask),e._store&&(t._store.validated=e._store.validated),t}function b(e){x(e)?e._store&&(e._store.validated=1):typeof e==`object`&&e&&e.$$typeof===J&&(e._payload.status===`fulfilled`?x(e._payload.value)&&e._payload.value._store&&(e._payload.value._store.validated=1):e._store&&(e._store.validated=1))}function x(e){return typeof e==`object`&&!!e&&e.$$typeof===L}function S(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}function C(e,t){return typeof e==`object`&&e&&e.key!=null?(u(e.key),S(``+e.key)):t.toString(36)}function w(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(c,c):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function T(e,t,n,i,a){var o=typeof e;(o===`undefined`||o===`boolean`)&&(e=null);var s=!1;if(e===null)s=!0;else switch(o){case`bigint`:case`string`:case`number`:s=!0;break;case`object`:switch(e.$$typeof){case L:case R:s=!0;break;case J:return s=e._init,T(s(e._payload),t,n,i,a)}}if(s){s=e,a=a(s);var c=i===``?`.`+C(s,0):i;return se(a)?(n=``,c!=null&&(n=c.replace(ve,`$&/`)+`/`),T(a,t,n,``,function(e){return e})):a!=null&&(x(a)&&(a.key!=null&&(s&&s.key===a.key||u(a.key)),n=y(a,n+(a.key==null||s&&s.key===a.key?``:(``+a.key).replace(ve,`$&/`)+`/`)+c),i!==``&&s!=null&&x(s)&&s.key==null&&s._store&&!s._store.validated&&(n._store.validated=2),a=n),t.push(a)),1}if(s=0,c=i===``?`.`:i+`:`,se(e))for(var l=0;l<e.length;l++)i=e[l],o=c+C(i,l),s+=T(i,t,n,o,a);else if(l=r(e),typeof l==`function`)for(l===e.entries&&(_e||console.warn(`Using Maps as children is not supported. Use an array of keyed ReactElements instead.`),_e=!0),e=l.call(e),l=0;!(i=e.next()).done;)i=i.value,o=c+C(i,l++),s+=T(i,t,n,o,a);else if(o===`object`){if(typeof e.then==`function`)return T(w(e),t,n,i,a);throw t=String(e),Error(`Objects are not valid as a React child (found: `+(t===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:t)+`). If you meant to render a collection of children, use an array instead.`)}return s}function E(e,t,n){if(e==null)return e;var r=[],i=0;return T(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function D(e){if(e._status===-1){var t=null,n=null,r=e._ioInfo;r!=null&&(r.start=r.end=performance.now(),r.value=new Promise(function(e,r){t=e,n=r})),r=e._result;var i=r();if(i.then(function(n){if(e._status===0||e._status===-1){e._status=1,e._result=n;var r=e._ioInfo;if(r!=null){r.end=performance.now();var a=n?.default;t(a),r.value.status=`fulfilled`,r.value.value=a}i.status===void 0&&(i.status=`fulfilled`,i.value=n)}},function(t){if(e._status===0||e._status===-1){e._status=2,e._result=t;var r=e._ioInfo;r!=null&&(r.end=performance.now(),r.value.then(c,c),n(t),r.value.status=`rejected`,r.value.reason=t),i.status===void 0&&(i.status=`rejected`,i.reason=t)}}),r=e._ioInfo,r!=null){var a=i.displayName;typeof a==`string`&&(r.name=a)}e._status===-1&&(e._status=0,e._result=i)}if(e._status===1)return r=e._result,r===void 0&&console.error(`lazy: Expected the result of a dynamic import() call. Instead received: %s
2
-
3
- Your code should look like:
4
- const MyComponent = lazy(() => import('./MyComponent'))
5
-
6
- Did you accidentally put curly braces around the import?`,r),`default`in r||console.error(`lazy: Expected the result of a dynamic import() call. Instead received: %s
7
-
8
- Your code should look like:
9
- const MyComponent = lazy(() => import('./MyComponent'))`,r),r.default;throw e._result}function O(){var e=le.H;return e===null&&console.error(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
10
- 1. You might have mismatching versions of React and the renderer (such as React DOM)
11
- 2. You might be breaking the Rules of Hooks
12
- 3. You might have more than one copy of React in the same app
13
- See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`),e}function k(){le.asyncTransitions--}function A(e){var t=le.T,n={};n.types=t===null?null:t.types,n._updatedFibers=new Set,le.T=n;try{var r=e(),i=le.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&(le.asyncTransitions++,r.then(k,k),r.then(c,ye))}catch(e){ye(e)}finally{t===null&&n._updatedFibers&&(e=n._updatedFibers.size,n._updatedFibers.clear(),10<e&&console.warn(`Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table.`)),t!==null&&n.types!==null&&(t.types!==null&&t.types!==n.types&&console.error(`We expected inner Transitions to have transferred the outer types set and that you cannot add to the outer Transition while inside the inner.This is a bug in React.`),t.types=n.types),le.T=t}}function j(e){var t=le.T;if(t!==null){var n=t.types;n===null?t.types=[e]:n.indexOf(e)===-1&&n.push(e)}else le.asyncTransitions===0&&console.error("addTransitionType can only be called inside a `startTransition()` callback. It must be associated with a specific Transition."),A(j.bind(null,e))}function M(e){if(xe===null)try{var n=(`require`+Math.random()).slice(0,7);xe=(t&&t[n]).call(t,`timers`).setImmediate}catch{xe=function(e){!1===be&&(be=!0,typeof MessageChannel>`u`&&console.error(`This browser does not have a MessageChannel implementation, so enqueuing tasks via await act(async () => ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning.`));var t=new MessageChannel;t.port1.onmessage=e,t.port2.postMessage(void 0)}}return xe(e)}function N(e){return 1<e.length&&typeof AggregateError==`function`?AggregateError(e):e[0]}function P(e,t){t!==Se-1&&console.error(`You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. `),Se=t}function F(e,t,n){var r=le.actQueue;if(r!==null){if(r.length!==0)try{I(r),M(function(){return F(e,t,n)});return}catch(e){le.thrownErrors.push(e)}else le.actQueue=null}0<le.thrownErrors.length?(r=N(le.thrownErrors),le.thrownErrors.length=0,n(r)):t(e)}function I(e){if(!we){we=!0;var t=0;try{for(;t<e.length;t++){var n=e[t];do{le.didUsePromise=!1;var r=n(!1);if(r!==null){if(le.didUsePromise){e[t]=n,e.splice(0,t);return}n=r}else break}while(1)}e.length=0}catch(n){e.splice(0,t+1),le.thrownErrors.push(n)}finally{we=!1}}}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart==`function`&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var L=Symbol.for(`react.transitional.element`),R=Symbol.for(`react.portal`),z=Symbol.for(`react.fragment`),B=Symbol.for(`react.strict_mode`),V=Symbol.for(`react.profiler`),H=Symbol.for(`react.consumer`),U=Symbol.for(`react.context`),W=Symbol.for(`react.forward_ref`),G=Symbol.for(`react.suspense`),K=Symbol.for(`react.suspense_list`),q=Symbol.for(`react.memo`),J=Symbol.for(`react.lazy`),ee=Symbol.for(`react.activity`),Y=Symbol.for(`react.view_transition`),te=Symbol.iterator,ne={},re={isMounted:function(){return!1},enqueueForceUpdate:function(e){i(e,`forceUpdate`)},enqueueReplaceState:function(e){i(e,`replaceState`)},enqueueSetState:function(e){i(e,`setState`)}},ie=Object.assign,ae={};Object.freeze(ae),a.prototype.isReactComponent={},a.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},a.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};var oe={isMounted:[`isMounted`,`Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks.`],replaceState:[`replaceState`,`Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236).`]};for(Ee in oe)oe.hasOwnProperty(Ee)&&n(Ee,oe[Ee]);o.prototype=a.prototype,oe=s.prototype=new o,oe.constructor=s,ie(oe,a.prototype),oe.isPureReactComponent=!0;var se=Array.isArray,ce=Symbol.for(`react.client.reference`),le={H:null,A:null,T:null,S:null,actQueue:null,asyncTransitions:0,isBatchingLegacy:!1,didScheduleLegacyUpdate:!1,didUsePromise:!1,thrownErrors:[],getCurrentStack:null,recentlyCreatedOwnerStacks:0},ue=Object.prototype.hasOwnProperty,de=console.createTask?console.createTask:function(){return null};oe={react_stack_bottom_frame:function(e){return e()}};var fe,pe,me={},he=oe.react_stack_bottom_frame.bind(oe,m)(),ge=de(f(m)),_e=!1,ve=/\/+/g,ye=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},be=!1,xe=null,Se=0,Ce=!1,we=!1,Te=typeof queueMicrotask==`function`?function(e){queueMicrotask(function(){return queueMicrotask(e)})}:M;oe=Object.freeze({__proto__:null,c:function(e){return O().useMemoCache(e)}});var Ee={map:E,forEach:function(e,t,n){E(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return E(e,function(){t++}),t},toArray:function(e){return E(e,function(e){return e})||[]},only:function(e){if(!x(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=ee,e.Children=Ee,e.Component=a,e.Fragment=z,e.Profiler=V,e.PureComponent=s,e.StrictMode=B,e.Suspense=G,e.ViewTransition=Y,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=le,e.__COMPILER_RUNTIME=oe,e.act=function(e){var t=le.actQueue,n=Se;Se++;var r=le.actQueue=t===null?[]:t,i=!1;try{var a=e()}catch(e){le.thrownErrors.push(e)}if(0<le.thrownErrors.length)throw P(t,n),e=N(le.thrownErrors),le.thrownErrors.length=0,e;if(typeof a==`object`&&a&&typeof a.then==`function`){var o=a;return Te(function(){i||Ce||(Ce=!0,console.error(`You called act(async () => ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);`))}),{then:function(e,a){i=!0,o.then(function(i){if(P(t,n),n===0){try{I(r),M(function(){return F(i,e,a)})}catch(e){le.thrownErrors.push(e)}if(0<le.thrownErrors.length){var o=N(le.thrownErrors);le.thrownErrors.length=0,a(o)}}else e(i)},function(e){P(t,n),0<le.thrownErrors.length?(e=N(le.thrownErrors),le.thrownErrors.length=0,a(e)):a(e)})}}}var s=a;if(P(t,n),n===0&&(I(r),r.length!==0&&Te(function(){i||Ce||(Ce=!0,console.error("A component suspended inside an `act` scope, but the `act` call was not awaited. When testing React components that depend on asynchronous data, you must await the result:\n\nawait act(() => ...)"))}),le.actQueue=null),0<le.thrownErrors.length)throw e=N(le.thrownErrors),le.thrownErrors.length=0,e;return{then:function(e,t){i=!0,n===0?(le.actQueue=r,M(function(){return F(s,e,t)})):e(s)}}},e.addTransitionType=j,e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.captureOwnerStack=function(){var e=le.getCurrentStack;return e===null?null:e()},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=ie({},e.props),i=e.key,a=e._owner;if(t!=null){var o;a:{if(ue.call(t,`ref`)&&(o=Object.getOwnPropertyDescriptor(t,`ref`).get)&&o.isReactWarning){o=!1;break a}o=t.ref!==void 0}for(s in o&&(a=p()),h(t)&&(u(t.key),i=``+t.key),t)!ue.call(t,s)||s===`key`||s===`__self`||s===`__source`||s===`ref`&&t.ref===void 0||(r[s]=t[s])}var s=arguments.length-2;if(s===1)r.children=n;else if(1<s){o=Array(s);for(var c=0;c<s;c++)o[c]=arguments[c+2];r.children=o}for(r=v(e.type,i,r,a,e._debugStack,e._debugTask),i=2;i<arguments.length;i++)b(arguments[i]);return r},e.createContext=function(e){return e={$$typeof:U,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:H,_context:e},e._currentRenderer=null,e._currentRenderer2=null,e},e.createElement=function(e,t,n){for(var r=2;r<arguments.length;r++)b(arguments[r]);var i;r={};var a=null;if(t!=null)for(i in pe||!(`__self`in t)||`key`in t||(pe=!0,console.warn(`Your app (or one of its dependencies) is using an outdated JSX transform. Update to the modern JSX transform for faster performance: https://react.dev/link/new-jsx-transform`)),h(t)&&(u(t.key),a=``+t.key),t)ue.call(t,i)&&i!==`key`&&i!==`__self`&&i!==`__source`&&(r[i]=t[i]);var o=arguments.length-2;if(o===1)r.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];Object.freeze&&Object.freeze(s),r.children=s}if(e&&e.defaultProps)for(i in o=e.defaultProps,o)r[i]===void 0&&(r[i]=o[i]);return a&&g(r,typeof e==`function`?e.displayName||e.name||`Unknown`:e),(i=1e4>le.recentlyCreatedOwnerStacks++)?(s=Error.stackTraceLimit,Error.stackTraceLimit=10,o=Error(`react-stack-top-frame`),Error.stackTraceLimit=s):o=he,v(e,a,r,p(),o,i?de(f(e)):ge)},e.createRef=function(){var e={current:null};return Object.seal(e),e},e.forwardRef=function(e){e!=null&&e.$$typeof===q?console.error("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."):typeof e==`function`?e.length!==0&&e.length!==2&&console.error(`forwardRef render functions accept exactly two parameters: props and ref. %s`,e.length===1?`Did you forget to use the ref parameter?`:`Any additional parameter will be undefined.`):console.error(`forwardRef requires a render function but was given %s.`,e===null?`null`:typeof e),e!=null&&e.defaultProps!=null&&console.error(`forwardRef render functions do not support defaultProps. Did you accidentally pass a React component?`);var t={$$typeof:W,render:e},n;return Object.defineProperty(t,"displayName",{enumerable:!1,configurable:!0,get:function(){return n},set:function(t){n=t,e.name||e.displayName||(Object.defineProperty(e,"name",{value:t}),e.displayName=t)}}),t},e.isValidElement=x,e.lazy=function(e){e={_status:-1,_result:e};var t={$$typeof:J,_payload:e,_init:D},n={name:`lazy`,start:-1,end:-1,value:null,owner:null,debugStack:Error(`react-stack-top-frame`),debugTask:console.createTask?console.createTask(`lazy()`):null};return e._ioInfo=n,t._debugInfo=[{awaited:n}],t},e.memo=function(e,t){e??console.error(`memo: The first argument must be a component. Instead received: %s`,e===null?`null`:typeof e),t={$$typeof:q,type:e,compare:t===void 0?null:t};var n;return Object.defineProperty(t,"displayName",{enumerable:!1,configurable:!0,get:function(){return n},set:function(t){n=t,e.name||e.displayName||(Object.defineProperty(e,"name",{value:t}),e.displayName=t)}}),t},e.startTransition=A,e.unstable_useCacheRefresh=function(){return O().useCacheRefresh()},e.use=function(e){return O().use(e)},e.useActionState=function(e,t,n){return O().useActionState(e,t,n)},e.useCallback=function(e,t){return O().useCallback(e,t)},e.useContext=function(e){var t=O();return e.$$typeof===H&&console.error(`Calling useContext(Context.Consumer) is not supported and will cause bugs. Did you mean to call useContext(Context) instead?`),t.useContext(e)},e.useDebugValue=function(e,t){return O().useDebugValue(e,t)},e.useDeferredValue=function(e,t){return O().useDeferredValue(e,t)},e.useEffect=function(e,t){return e??console.warn(`React Hook useEffect requires an effect callback. Did you forget to pass a callback to the hook?`),O().useEffect(e,t)},e.useEffectEvent=function(e){return O().useEffectEvent(e)},e.useId=function(){return O().useId()},e.useImperativeHandle=function(e,t,n){return O().useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return e??console.warn(`React Hook useInsertionEffect requires an effect callback. Did you forget to pass a callback to the hook?`),O().useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return e??console.warn(`React Hook useLayoutEffect requires an effect callback. Did you forget to pass a callback to the hook?`),O().useLayoutEffect(e,t)},e.useMemo=function(e,t){return O().useMemo(e,t)},e.useOptimistic=function(e,t){return O().useOptimistic(e,t)},e.useReducer=function(e,t,n){return O().useReducer(e,t,n)},e.useRef=function(e){return O().useRef(e)},e.useState=function(e){return O().useState(e)},e.useSyncExternalStore=function(e,t,n){return O().useSyncExternalStore(e,t,n)},e.useTransition=function(){return O().useTransition()},e.version=`19.3.0`,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop==`function`&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()})),p=s(((e,t)=>{t.exports=process.env.NODE_ENV===`production`?d():f()})),m;process.env.NODE_ENV!==`production`&&(m=new Set);function h(e,t){return function(...n){if(process.env.NODE_ENV!==`production`){let r=n.join(` `),i=t?`${t}: ${r}`:r,a=`${e}:${i}`;m.has(a)||(m.add(a),e===`warn`?console.warn(i):console.error(i))}}}var g=h(`error`,`Base UI`),_=u(p(),1);function v({controlled:e,default:t,name:n,state:r=`value`}){let{current:i}=_.useRef(e!==void 0),[a,o]=_.useState(t),s=i&&e!==void 0?e:a;if(process.env.NODE_ENV!==`production`){_.useEffect(()=>{i!==(e!==void 0)&&g([`A component is changing the ${i?``:`un`}controlled ${r} state of ${n} to be ${i?`un`:``}controlled.`,`Elements should not switch from uncontrolled to controlled (or vice versa).`,`Decide between using a controlled or uncontrolled ${n} element for the lifetime of the component.`,"The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.",`More info: https://fb.me/react-controlled-components`].join(`
14
- `))},[r,n,e]);let{current:a}=_.useRef(t);_.useEffect(()=>{!i&&y(a)!==y(t)&&g([`A component is changing the default ${r} state of an uncontrolled ${n} after being initialized. To suppress this warning opt to use a controlled ${n}.`].join(`
15
- `))},[t])}return[s,_.useCallback(e=>{i||o(e)},[])]}function y(e){let t=0,n=new WeakMap;try{return JSON.stringify(e,function(e,r){if(!(e===`_owner`&&this!=null&&typeof this==`object`&&`$$typeof`in this)){if(typeof r==`bigint`)return`__bigint__:${r}`;if(typeof r==`object`&&r){let e=n.get(r);if(e!==void 0)return`__object__:${e}`;n.set(r,t),t+=1}return r}})??`__top__:${typeof e}`}catch{return`__unserializable__`}}var b={..._},x={};function S(e,t){let n=_.useRef(x);return n.current===x&&(n.current=e(t)),n}var C=b.useInsertionEffect,w=C&&C!==b.useLayoutEffect?C:e=>e();function T(e){let t=S(E).current;return t.next=e,w(t.effect),t.trampoline}function E(){let e={next:void 0,callback:D,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function D(){if(process.env.NODE_ENV!==`production`)throw Error(`Base UI: Cannot call an event handler while rendering.`)}var O=h(`warn`,`Base UI`);function k(){}var A=Object.freeze([]),j=Object.freeze({}),M=typeof document<`u`?_.useLayoutEffect:()=>{},N=_.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},nextIndexRef:{current:0}});process.env.NODE_ENV!==`production`&&(N.displayName=`CompositeListContext`);function P(){return _.useContext(N)}var F=s((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),I=s((e=>{process.env.NODE_ENV!==`production`&&(function(){function t(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===A?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case v:return`Fragment`;case b:return`Profiler`;case y:return`StrictMode`;case w:return`Suspense`;case T:return`SuspenseList`;case O:return`Activity`;case k:return`ViewTransition`}if(typeof e==`object`)switch(typeof e.tag==`number`&&console.error(`Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.`),e.$$typeof){case _:return`Portal`;case S:return e.displayName||`Context`;case x:return(e._context.displayName||`Context`)+`.Consumer`;case C:var n=e.render;return e=e.displayName,e||=(e=n.displayName||n.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case E:return n=e.displayName||null,n===null?t(e.type)||`Memo`:n;case D:n=e._payload,e=e._init;try{return t(e(n))}catch{}}return null}function n(e){return``+e}function r(e){try{n(e);var t=!1}catch{t=!0}if(t){t=console;var r=t.error,i=typeof Symbol==`function`&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||`Object`;return r.call(t,`The provided key is an unsupported type %s. This value must be coerced to a string before using it here.`,i),n(e)}}function i(e){if(e===v)return`<>`;if(typeof e==`object`&&e&&e.$$typeof===D)return`<...>`;try{var n=t(e);return n?`<`+n+`>`:`<...>`}catch{return`<...>`}}function a(){var e=j.A;return e===null?null:e.getOwner()}function o(){return Error(`react-stack-top-frame`)}function s(e){if(M.call(e,`key`)){var t=Object.getOwnPropertyDescriptor(e,`key`).get;if(t&&t.isReactWarning)return!1}return e.key!==void 0}function c(e,t){function n(){F||(F=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",t))}n.isReactWarning=!0,Object.defineProperty(e,"key",{get:n,configurable:!0})}function l(){var e=t(this.type);return I[e]||(I[e]=!0,console.error(`Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.`)),e=this.props.ref,e===void 0?null:e}function u(e,t,n,r,i,a){var o=n.ref;return e={$$typeof:g,type:e,key:t,props:n,_owner:r},(o===void 0?null:o)===null?Object.defineProperty(e,"ref",{enumerable:!1,value:null}):Object.defineProperty(e,"ref",{enumerable:!1,get:l}),e._store={},Object.defineProperty(e._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(e,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(e,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:i}),Object.defineProperty(e,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:a}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}function d(e,n,i,o,l,d){var p=n.children;if(p!==void 0){if(o){if(N(p)){for(o=0;o<p.length;o++)f(p[o]);Object.freeze&&Object.freeze(p)}else console.error(`React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.`)}else f(p)}if(M.call(n,`key`)){p=t(e);var m=Object.keys(n).filter(function(e){return e!==`key`});o=0<m.length?`{key: someKey, `+m.join(`: ..., `)+`: ...}`:`{key: someKey}`,z[p+o]||(m=0<m.length?`{`+m.join(`: ..., `)+`: ...}`:`{}`,console.error(`A props object containing a "key" prop is being spread into JSX:
16
- let props = %s;
17
- <%s {...props} />
18
- React keys must be passed directly to JSX without using spread:
19
- let props = %s;
20
- <%s key={someKey} {...props} />`,o,p,m,p),z[p+o]=!0)}if(p=null,i!==void 0&&(r(i),p=``+i),s(n)&&(r(n.key),p=``+n.key),`key`in n)for(var h in i={},n)h!==`key`&&(i[h]=n[h]);else i=n;return p&&c(i,typeof e==`function`?e.displayName||e.name||`Unknown`:e),u(e,p,i,a(),l,d)}function f(e){m(e)?e._store&&(e._store.validated=1):typeof e==`object`&&e&&e.$$typeof===D&&(e._payload.status===`fulfilled`?m(e._payload.value)&&e._payload.value._store&&(e._payload.value._store.validated=1):e._store&&(e._store.validated=1))}function m(e){return typeof e==`object`&&!!e&&e.$$typeof===g}var h=p(),g=Symbol.for(`react.transitional.element`),_=Symbol.for(`react.portal`),v=Symbol.for(`react.fragment`),y=Symbol.for(`react.strict_mode`),b=Symbol.for(`react.profiler`),x=Symbol.for(`react.consumer`),S=Symbol.for(`react.context`),C=Symbol.for(`react.forward_ref`),w=Symbol.for(`react.suspense`),T=Symbol.for(`react.suspense_list`),E=Symbol.for(`react.memo`),D=Symbol.for(`react.lazy`),O=Symbol.for(`react.activity`),k=Symbol.for(`react.view_transition`),A=Symbol.for(`react.client.reference`),j=h.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,M=Object.prototype.hasOwnProperty,N=Array.isArray,P=console.createTask?console.createTask:function(){return null};h={react_stack_bottom_frame:function(e){return e()}};var F,I={},L=h.react_stack_bottom_frame.bind(h,o)(),R=P(i(o)),z={};e.Fragment=v,e.jsx=function(e,t,n){var r=1e4>j.recentlyCreatedOwnerStacks++;if(r){var a=Error.stackTraceLimit;Error.stackTraceLimit=10;var o=Error(`react-stack-top-frame`);Error.stackTraceLimit=a}else o=L;return d(e,t,n,!1,o,r?P(i(e)):R)},e.jsxs=function(e,t,n){var r=1e4>j.recentlyCreatedOwnerStacks++;if(r){var a=Error.stackTraceLimit;Error.stackTraceLimit=10;var o=Error(`react-stack-top-frame`);Error.stackTraceLimit=a}else o=L;return d(e,t,n,!0,o,r?P(i(e)):R)}})()})),L=s(((e,t)=>{t.exports=process.env.NODE_ENV===`production`?F():I()}))();function R(e){let{children:t,elementsRef:n,labelsRef:r,onMapChange:i}=e,a=T(i),[,o]=_.useState(!1),s=S(B).current,c=S(z).current,l=_.useRef(0),u=_.useRef(!0),d=_.useRef(null),f=_.useRef(null),p=T(()=>{u.current||(u.current=!0,o(e=>!e))}),m=T((e,t)=>{c.set(e,t),p()}),h=T(e=>{c.delete(e),p()}),g=T(e=>{let t=new Map;return n.current.length=0,r&&(r.current.length=0),e.forEach(e=>{t.set(e.element,{...e.registration.metadata??{},index:e.index}),n.current[e.index]=e.element,r&&(r.current[e.index]=e.registration.label===void 0?e.registration.textRef?.current?.textContent??e.element.textContent:e.registration.label)}),l.current=n.current.length,t});function v(e){if(f.current?.disconnect(),f.current=null,typeof MutationObserver!=`function`||e.length<2)return;let t=new MutationObserver(n=>{if(!U(n))return;let r=null;for(let n of e)if(n.isConnected){if(r&&W(r,n)>0){t.disconnect(),p();return}r=n}});f.current=t;let n=new Set;for(let t=1;t<e.length;t+=1){let r=H(e[t-1],e[t]);r&&n.add(r)}n.forEach(e=>t.observe(e,{childList:!0}))}let y=T(()=>{let[e,t]=V(c),n=g(e),r=d.current,i=!r||r.length!==e.length||e.some((e,t)=>{let n=r[t];return e.index!==n.index||e.element!==n.element||e.registration.index!==n.registration.index||e.registration.metadata!==n.registration.metadata});v(t),d.current=e,u.current=!1,i&&(s.forEach(e=>e(n)),a(n))});M(()=>(!u.current&&d.current&&g(d.current),()=>{n.current=[],r&&(r.current=[])}),[n,r,g]),M(()=>{u.current&&y()}),M(()=>()=>{f.current?.disconnect(),u.current=!0},[]);let b=T(e=>(s.add(e),()=>{s.delete(e)})),x=_.useMemo(()=>({register:m,unregister:h,subscribeMapChange:b,nextIndexRef:l}),[m,h,b,l]);return(0,L.jsx)(N.Provider,{value:x,children:t})}function z(){return new Map}function B(){return new Set}function V(e){let t=new Set,n=[],r=[];e.forEach((e,i)=>{if(!i.isConnected)return;let a=e.index,o={index:a??-1,element:i,registration:e};a===null?r.push(o):a>=0&&(t.add(a),n.push(o))});let i=0;return r.sort((e,t)=>W(e.element,t.element)),r.forEach(e=>{for(;t.has(i);)i+=1;e.index=i,n.push(e),i+=1}),t.size>0&&n.sort((e,t)=>e.index-t.index),[n,r.map(e=>e.element)]}function H(e,t){let n=e.parentElement;for(;n&&!n.contains(t);)n=n.parentElement;return n}function U(e){for(let t of e)for(let e=0;e<t.removedNodes.length;e+=1)if(t.removedNodes[e].isConnected)return!0;return!1}function W(e,t){return e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1}function G(e,t){return function(n,...r){let i=new URL(e);return i.searchParams.set(`code`,n.toString()),r.forEach(e=>i.searchParams.append(`args[]`,e)),`${t} error #${n}; visit ${i} for the full message.`}}var K=G(`https://base-ui.com/production-error`,`Base UI`),q=_.createContext(void 0);process.env.NODE_ENV!==`production`&&(q.displayName=`AccordionRootContext`);function J(){let e=_.useContext(q);if(e===void 0)throw Error(process.env.NODE_ENV===`production`?K(10):`Base UI: AccordionRootContext is missing. Accordion parts must be placed within <Accordion.Root>.`);return e}function ee(e,t,n,r){let i=S(te).current;return ne(i,e,t,n,r)&&ie(i,[e,t,n,r]),i.callback}function Y(e){let t=S(te).current;return re(t,e)&&ie(t,e),t.callback}function te(){return{callback:null,cleanup:null,refs:[]}}function ne(e,t,n,r,i){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==i}function re(e,t){return e.refs.length!==t.length||e.refs.some((e,n)=>e!==t[n])}function ie(e,t){if(e.refs=t,t.every(e=>e==null)){e.callback=null;return}e.callback=n=>{if(e.cleanup&&=(e.cleanup(),null),n!=null){let r=Array(t.length).fill(null);for(let e=0;e<t.length;e+=1){let i=t[e];if(i!=null)switch(typeof i){case`function`:{let t=i(n);typeof t==`function`&&(r[e]=t);break}case`object`:i.current=n}}e.cleanup=()=>{for(let e=0;e<t.length;e+=1){let n=t[e];if(n!=null)switch(typeof n){case`function`:{let t=r[e];typeof t==`function`?t():n(null);break}case`object`:n.current=null}}}}}}var ae=19;function oe(e){return ae>=e}function se(e){if(!_.isValidElement(e))return null;let t=e,n=t.props;return(oe(19)?n?.ref:t.ref)??null}function ce(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function le(e,t){let n={};for(let r in e){let i=e[r];if(t?.hasOwnProperty(r)){let e=t[r](i);e!=null&&Object.assign(n,e);continue}i===!0?n[`data-${r.toLowerCase()}`]=``:i&&(n[`data-${r.toLowerCase()}`]=i.toString())}return n}function ue(e,t){return typeof e==`function`?e(t):e}function de(e,t){return typeof e==`function`?e(t):e}var fe={};function pe(e,t,n,r,i){if(!n&&!r&&!i&&!e)return he(t);let a=he(e);return t&&(a=ge(a,t)),n&&(a=ge(a,n)),r&&(a=ge(a,r)),i&&(a=ge(a,i)),a}function me(e){if(e.length===0)return fe;if(e.length===1)return he(e[0]);let t=he(e[0]);for(let n=1;n<e.length;n+=1)t=ge(t,e[n]);return t}function he(e){return be(e)?{...xe(e,fe)}:_e(e)}function ge(e,t){return be(t)?xe(t,e):ve(e,t)}function _e(e){let t={...e};for(let e in t){let n=t[e];ye(e,n)&&(t[e]=Ce(n))}return t}function ve(e,t){if(!t)return e;for(let n in t){let r=t[n];switch(n){case`style`:e[n]=ce(e.style,r);break;case`className`:e[n]=Te(e.className,r);break;default:e[n]=ye(n,r)?Se(e[n],r):r}}return e}function ye(e,t){let n=e.charCodeAt(0),r=e.charCodeAt(1),i=e.charCodeAt(2);return n===111&&r===110&&i>=65&&i<=90&&(typeof t==`function`||t===void 0)}function be(e){return typeof e==`function`}function xe(e,t){return be(e)?e(t):e??fe}function Se(e,t){return t?e?(...n)=>{let r=n[0];if(Ee(r)){let i=r;we(i);let a=t(...n);return i.baseUIHandlerPrevented||e?.(...n),a}let i=t(...n);return e?.(...n),i}:Ce(t):e}function Ce(e){return e&&((...t)=>{let n=t[0];return Ee(n)&&we(n),e(...t)})}function we(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function Te(e,t){return t?e?t+` `+e:t:e}function Ee(e){return typeof e==`object`&&!!e&&`nativeEvent`in e}function X(e,t,n={}){let r=t.render;n.enabled!==!1&&(r=Me(r));let i=De(t,n,r);if(n.enabled===!1)return null;let a=n.state??j;return Ne(e,r,i,a)}function De(e,t,n){let{className:r,style:i}=e,{state:a=j,ref:o,props:s,stateAttributesMapping:c,enabled:l=!0}=t,u=l?ue(r,a):void 0,d=l?de(i,a):void 0,f=l?le(a,c):j,p=l&&s?Oe(s):void 0,m=l?ce(f,p)??{}:j;return typeof document<`u`&&(l?m.ref=Array.isArray(o)?Y([m.ref,se(n),...o]):ee(m.ref,se(n),o):ee(null,null)),l?(u!==void 0&&(m.className=Te(m.className,u)),d!==void 0&&(m.style=ce(m.style,d)),m):j}function Oe(e){return Array.isArray(e)?me(e):pe(void 0,e)}var ke=Symbol.for(`react.lazy`),Ae=/^[A-Z][A-Za-z0-9$]*$/,je=/[a-z]/;function Me(e){if(e?.$$typeof!==ke)return e;let t=_.Children.toArray(e)[0];return _.isValidElement(t)?t:e}function Ne(e,t,n,r){if(t){if(typeof t==`function`)return process.env.NODE_ENV!==`production`&&Pe(t),t(n,r);let e=pe(n,t.props);if(e.ref=n.ref,process.env.NODE_ENV!==`production`&&!_.isValidElement(t))throw Error(["Base UI: The `render` prop was provided an invalid React element as `React.isValidElement(render)` is `false`.","A valid React element must be provided to the `render` prop because it is cloned with props to replace the default element.",`https://base-ui.com/r/invalid-render-prop`].join(`
21
- `));return _.cloneElement(t,e)}if(e&&typeof e==`string`)return Fe(e,n);throw Error(process.env.NODE_ENV===`production`?K(8):`Base UI: Render element or function are not defined.`)}function Pe(e){let t=e.name;t.length!==0&&Ae.test(t)&&je.test(t)&&O(`The \`render\` prop received a function named \`${t}\` that starts with an uppercase letter.`,"This usually means a React component was passed directly as `render={Component}`.","Base UI calls `render` as a plain function, which can break the Rules of Hooks during reconciliation.",`If this is an intentional render callback, rename it to start with a lowercase letter.`,"Use `render={<Component />}` or `render={(props) => <Component {...props} />}` instead.",`https://base-ui.com/r/invalid-render-prop`)}function Fe(e,t){return e===`button`?(0,_.createElement)(`button`,{type:`button`,...t,key:t.key}):e===`img`?(0,_.createElement)(`img`,{alt:``,...t,key:t.key}):_.createElement(e,t)}var Ie={value:()=>null},Le=_.forwardRef(function(e,t){let{render:n,className:r,disabled:i=!1,hiddenUntilFound:a,keepMounted:o,loopFocus:s,onValueChange:c,multiple:l=!1,orientation:u=`vertical`,value:d,defaultValue:f,style:p,...m}=e,h=f??A;process.env.NODE_ENV!==`production`&&_.useEffect(()=>{a&&o===!1&&O("The `keepMounted={false}` prop on `Accordion.Root` is ignored when `hiddenUntilFound` is enabled, since panels must remain mounted while closed.")},[a,o]);let g=_.useRef([]),[y,b]=v({controlled:d,default:h,name:`Accordion`,state:`value`}),x=T((e,t,n)=>{if(!l){let t=y[0]===e?[]:[e];if(c?.(t,n),n.isCanceled)return;b(t)}else if(t){let t=y.slice();if(t.push(e),c?.(t,n),n.isCanceled)return;b(t)}else{let t=y.filter(t=>t!==e);if(c?.(t,n),n.isCanceled)return;b(t)}}),S=_.useMemo(()=>({value:y,disabled:i,orientation:u}),[y,i,u]),C=_.useMemo(()=>({disabled:i,handleValueChange:x,hiddenUntilFound:a??!1,keepMounted:o??!1,state:S,value:y}),[i,x,a,o,S,y]),w=X(`div`,e,{state:S,ref:t,props:m,stateAttributesMapping:Ie});return(0,L.jsx)(q.Provider,{value:C,children:(0,L.jsx)(R,{elementsRef:g,children:w})})});process.env.NODE_ENV!==`production`&&(Le.displayName=`AccordionRoot`);var Re=0;function ze(e,t=`mui`){let[n,r]=_.useState(e),i=e||n;return _.useEffect(()=>{n??(Re+=1,r(`${t}-${Re}`))},[n,t]),i}var Be=b.useId;function Ve(e,t){if(Be!==void 0){let n=Be();return e??(t?`${t}-${n}`:n)}return ze(e,t)}function He(e){return Ve(e,`base-ui`)}var Ue=`none`,We=`trigger-press`,Ge=`trigger-hover`,Ke=`trigger-focus`,qe=`outside-press`,Je=`item-press`,Ye=`close-press`,Xe=`clear-press`,Ze=`chip-remove-press`,Qe=`track-press`,$e=`increment-press`,et=`decrement-press`,tt=`input-change`,nt=`input-clear`,rt=`input-blur`,it=`input-paste`,at=`input-press`,ot=`focus-out`,st=`escape-key`,ct=`close-watcher`,lt=`list-navigation`,ut=`keyboard`,dt=`pointer`,ft=`drag`,pt=`wheel`,mt=`scrub`,ht=`cancel-open`,gt=`sibling-open`,_t=`disabled`,vt=`missing`,yt=`initial`,bt=`imperative-action`,xt=`swipe`,St=`window-resize`;function Z(e,t,n,r){let i=!1,a=!1,o=r??j;return{reason:e,event:t??new Event(`base-ui`),cancel(){i=!0},allowPropagation(){a=!0},get isCanceled(){return i},get isPropagationAllowed(){return a},trigger:n,...o}}function Ct(e,t,n){let r=n??j;return{reason:e,event:t??new Event(`base-ui`),...r}}function wt(e){_.useEffect(e,A)}var Tt=null,Et=globalThis.requestAnimationFrame,Dt=new class{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=e=>{this.isScheduled=!1;let t=this.callbacks,n=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,n>0)for(let n=0;n<t.length;n+=1)t[n]?.(e)};request(e){let t=this.nextId;this.nextId+=1,this.callbacks.push(e),this.callbacksCount+=1;let n=process.env.NODE_ENV!==`production`&&Et!==requestAnimationFrame&&(Et=requestAnimationFrame,!0);return(!this.isScheduled||n)&&(requestAnimationFrame(this.tick),this.isScheduled=!0),t}cancel(e){let t=e-this.startId;t<0||t>=this.callbacks.length||this.callbacks[t]!==null&&(this.callbacks[t]=null,--this.callbacksCount)}},Ot=class e{static create(){return new e}static request(e){return Dt.request(e)}static cancel(e){return Dt.cancel(e)}currentId=Tt;request(e){this.cancel(),this.currentId=Dt.request(()=>{this.currentId=Tt,e()})}cancel=()=>{this.currentId!==Tt&&(Dt.cancel(this.currentId),this.currentId=Tt)};disposeEffect=()=>this.cancel};function kt(){let e=S(Ot.create).current;return wt(e.disposeEffect),e}function At(e,t=!1,n=!1,r=!1){let[i,a]=_.useState(e&&t?`idle`:void 0),[o,s]=_.useState(e&&!r);return e&&!o&&(s(!0),a(`starting`)),!e&&o&&i!==`ending`&&!n&&a(`ending`),!e&&!o&&i===`ending`&&a(void 0),M(()=>{if(!e&&o&&i!==`ending`&&n){let e=Ot.request(()=>{a(`ending`)});return()=>{Ot.cancel(e)}}},[e,o,i,n]),M(()=>{if(!e||t)return;let n=Ot.request(()=>{a(void 0)});return()=>{Ot.cancel(n)}},[t,e]),M(()=>{if(!e||!t)return;e&&o&&i!==`idle`&&a(`starting`);let n=Ot.request(()=>{a(`idle`)});return()=>{Ot.cancel(n)}},[t,e,o,i]),{mounted:o,setMounted:s,transitionStatus:i}}function jt(e){let{open:t,defaultOpen:n=!1,onOpenChange:r,disabled:i}=e,[a,o]=v({controlled:t,default:n,name:`Collapsible`,state:`open`}),{mounted:s,setMounted:c,transitionStatus:l}=At(a,!0,!0),u=He(),[d,f]=_.useState(),p=d===null?void 0:d??u,m=T(e=>{let t=!a,n=Z(We,e.nativeEvent);r(t,n),!n.isCanceled&&o(t)});return _.useMemo(()=>({defaultPanelId:u,disabled:i,handleTrigger:m,mounted:s,open:a,panelId:p,setMounted:c,setOpen:o,setPanelIdState:f,transitionStatus:l}),[u,i,m,s,a,p,c,o,f,l])}var Mt=_.createContext(void 0);process.env.NODE_ENV!==`production`&&(Mt.displayName=`CollapsibleRootContext`);function Nt(){let e=_.useContext(Mt);if(e===void 0)throw Error(process.env.NODE_ENV===`production`?K(15):`Base UI: CollapsibleRootContext is missing. Collapsible parts must be placed within <Collapsible.Root>.`);return e}function Pt(e={}){let{guess:t,label:n,metadata:r,textRef:i,index:a}=e,{register:o,unregister:s,subscribeMapChange:c,nextIndexRef:l}=P(),u=_.useRef(-1),[d,f]=_.useState(a==null&&t?()=>{if(u.current===-1){let e=l.current;l.current+=1,u.current=e}return u.current}:-1),p=a??d,m=_.useRef(null),h=_.useCallback(e=>{let t=m.current;t&&s(t),m.current=e,e&&o(e,{metadata:r??null,index:a??null,label:n,textRef:i})},[a,o,s,r,n,i]);return M(()=>{if(a==null)return c(e=>{let t=m.current?e.get(m.current)?.index:null;t!=null&&f(t)})},[a,c]),{ref:h,index:p}}var Ft=_.createContext(void 0);process.env.NODE_ENV!==`production`&&(Ft.displayName=`AccordionItemContext`);function It(){let e=_.useContext(Ft);if(e===void 0)throw Error(process.env.NODE_ENV===`production`?K(9):`Base UI: AccordionItemContext is missing. Accordion parts must be placed within <Accordion.Item>.`);return e}var Lt=`data-starting-style`,Rt=`data-ending-style`,zt={[Lt]:``},Bt={[Rt]:``},Vt={transitionStatus(e){return e===`starting`?zt:e===`ending`?Bt:null}},Ht=`data-open`,Ut=`data-closed`,Wt=Lt,Gt=`data-panel-open`,Kt={[Ht]:``},qt={[Ut]:``},Jt={open(e){return e?{[Gt]:``}:null}},Yt={open(e){return e?Kt:qt}},Xt=`data-index`,Zt={...Yt,index:e=>({[Xt]:String(e)}),...Vt,value:()=>null},Qt=_.forwardRef(function(e,t){let{className:n,disabled:r=!1,onOpenChange:i,render:a,value:o,style:s,...c}=e,{ref:l,index:u}=Pt(),d=ee(t,l),{disabled:f,handleValueChange:p,state:m,value:h}=J(),g=He(),v=o??g,y=r||f,b=h.indexOf(v)!==-1,x=T((e,t)=>{i?.(e,t),!t.isCanceled&&p(v,e,t)}),S=jt({open:b,onOpenChange:x,disabled:y}),C=_.useMemo(()=>({open:S.open,disabled:S.disabled,transitionStatus:S.transitionStatus}),[S.open,S.disabled,S.transitionStatus]),w=_.useMemo(()=>({...S,onOpenChange:x,state:C}),[S,C,x]),E=_.useMemo(()=>({...m,hidden:!b&&!S.mounted,index:u,disabled:y,open:b}),[S.mounted,y,u,b,m]),D=He(),[O,k]=_.useState(),A=O===null?void 0:O??D,j=_.useMemo(()=>({defaultTriggerId:D,open:b,state:E,setTriggerId:k,triggerId:A}),[D,b,E,k,A]),M=X(`div`,e,{state:E,ref:d,props:c,stateAttributesMapping:Zt});return(0,L.jsx)(Mt.Provider,{value:w,children:(0,L.jsx)(Ft.Provider,{value:j,children:M})})});process.env.NODE_ENV!==`production`&&(Qt.displayName=`AccordionItem`);var $t=_.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{state:o}=It();return X(`h3`,e,{state:o,ref:t,props:a,stateAttributesMapping:Zt})});process.env.NODE_ENV!==`production`&&($t.displayName=`AccordionHeader`);function en(){return typeof window<`u`}function tn(e){return an(e)?(e.nodeName||``).toLowerCase():`#document`}function nn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function rn(e){return((an(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function an(e){return en()?e instanceof Node||e instanceof nn(e).Node:!1}function on(e){return en()?e instanceof Element||e instanceof nn(e).Element:!1}function sn(e){return en()?e instanceof HTMLElement||e instanceof nn(e).HTMLElement:!1}function cn(e){return!en()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof nn(e).ShadowRoot}function ln(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=bn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function un(e){return/^(table|td|th)$/.test(tn(e))}function dn(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var fn=/transform|translate|scale|rotate|perspective|filter/,pn=/paint|layout|strict|content/,mn=e=>!!e&&e!==`none`,hn;function gn(e){let t=on(e)?bn(e):e;return mn(t.transform)||mn(t.translate)||mn(t.scale)||mn(t.rotate)||mn(t.perspective)||!vn()&&(mn(t.backdropFilter)||mn(t.filter))||fn.test(t.willChange||``)||pn.test(t.contain||``)}function _n(e){let t=Sn(e);for(;sn(t)&&!yn(t);){if(gn(t))return t;if(dn(t))return null;t=Sn(t)}return null}function vn(){return hn??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),hn}function yn(e){return/^(html|body|#document)$/.test(tn(e))}function bn(e){return nn(e).getComputedStyle(e)}function xn(e){return on(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Sn(e){if(tn(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||cn(e)&&e.host||rn(e);return cn(t)?t.host:t}function Cn(e){let t=Sn(e);return yn(t)?(e.ownerDocument||e).body:sn(t)&&ln(t)?t:Cn(t)}function wn(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=Cn(e),i=r===e.ownerDocument?.body,a=nn(r);if(i){let e=Tn(a);return t.concat(a,a.visualViewport||[],ln(r)?r:[],e&&n?wn(e):[])}return t.concat(r,wn(r,[],n))}function Tn(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}var En=_.createContext(void 0);process.env.NODE_ENV!==`production`&&(En.displayName=`CompositeRootContext`);function Dn(e=!1){let t=_.useContext(En);if(t===void 0&&!e)throw Error(process.env.NODE_ENV===`production`?K(16):`Base UI: CompositeRootContext is missing. Composite parts must be placed within <Composite.Root>.`);return t}function On(e){let{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:i=0,isNativeButton:a}=e,o=r&&t!==!1,s=r&&t===!1;return{props:_.useMemo(()=>{let e={onKeyDown(e){n&&t&&e.key!==`Tab`&&e.preventDefault()}};return r||(e.tabIndex=i,!a&&n&&(e.tabIndex=t?i:-1)),(a&&(t||o)||!a&&n)&&(e[`aria-disabled`]=n),a&&(!t||s)&&(e.disabled=n),e},[r,n,t,o,s,a,i])}}function kn(e){return e?.ownerDocument||document}function An(e,t,{detail:n=0}={}){e.dispatchEvent(new(nn(e)).PointerEvent(`click`,{bubbles:!0,cancelable:!0,composed:!0,detail:n,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,altKey:t.altKey,metaKey:t.metaKey}))}function jn(e={}){let{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:i=!0,composite:a}=e,o=_.useRef(null),s=Dn(!0),c=a??s!==void 0,{props:l}=On({focusableWhenDisabled:n,disabled:t,composite:c,tabIndex:r,isNativeButton:i});process.env.NODE_ENV!==`production`&&_.useEffect(()=>{if(!o.current)return;let e=Mn(o.current);i?e||g(`A component that acts as a button expected a native <button> because the \`nativeButton\` prop is true. Rendering a non-<button> removes native button semantics, which can impact forms and accessibility. Use a real <button> in the \`render\` prop, or set \`nativeButton\` to \`false\`.${b.captureOwnerStack?.()||``}`):e&&g(`A component that acts as a button expected a non-<button> because the \`nativeButton\` prop is false. Rendering a <button> keeps native behavior while Base UI applies non-native attributes and handlers, which can add unintended extra attributes (such as \`role\` or \`aria-disabled\`). Use a non-<button> in the \`render\` prop, or set \`nativeButton\` to \`true\`.${b.captureOwnerStack?.()||``}`)},[i]);let u=_.useCallback(()=>{let e=o.current;Mn(e)&&c&&t&&l.disabled===void 0&&e.disabled&&(e.disabled=!1)},[t,l.disabled,c]);return M(u,[u]),{getButtonProps:_.useCallback((e={})=>{let{onClick:n,onMouseDown:r,onKeyUp:a,onKeyDown:o,onPointerDown:s,...u}=e;return pe({onClick(e){if(t){e.preventDefault();return}n?.(e)},onMouseDown(e){t||r?.(e)},onKeyDown(e){if(t||(we(e),o?.(e),e.baseUIHandlerPrevented))return;let n=e.target===e.currentTarget,r=e.currentTarget,a=Mn(r),s=!i&&eee(r),l=n&&(i?a:!s),u=e.key===`Enter`,d=e.key===` `,f=r.getAttribute(`role`),p=f?.startsWith(`menuitem`)||f===`option`||f===`gridcell`;if(n&&c&&d){if(e.defaultPrevented&&p)return;e.preventDefault(),(!i||a)&&(e.preventBaseUIHandler(),An(r,e));return}if(!l||i||!d&&!u){n&&s&&d&&e.preventDefault();return}e.defaultPrevented||(e.preventDefault(),u&&(e.preventBaseUIHandler(),An(r,e)))},onKeyUp(e){if(!t){if(we(e),a?.(e),e.target===e.currentTarget&&i&&c&&Mn(e.currentTarget)&&e.key===` `){e.preventDefault();return}e.baseUIHandlerPrevented||e.target===e.currentTarget&&!i&&!c&&!e.defaultPrevented&&e.key===` `&&(e.preventBaseUIHandler(),An(e.currentTarget,e))}},onPointerDown(e){if(t){e.preventDefault();return}s?.(e)}},i?{type:`button`}:{role:`button`},l,u)},[t,l,c,i]),buttonRef:T(e=>{o.current=e,u()})}}function Mn(e){return sn(e)&&e.tagName===`BUTTON`}function eee(e){return sn(e)&&e.tagName===`A`&&!!e.href}var Nn=_.forwardRef(function(e,t){let{disabled:n,className:r,id:i,render:a,nativeButton:o=!0,style:s,...c}=e,{panelId:l,open:u,handleTrigger:d,disabled:f}=Nt(),{getButtonProps:p,buttonRef:m}=jn({disabled:n||f,focusableWhenDisabled:!0,native:o}),{defaultTriggerId:h,state:g,setTriggerId:_}=It(),v=i||void 0,y=v??h;return M(()=>(_(e=>v??(e===null?void 0:e)),()=>{_(e=>e===v?null:e)}),[v,_]),X(`button`,e,{state:g,ref:[t,m],props:[{"aria-controls":u?l:void 0,"aria-expanded":u,id:y,onClick:d},c,p],stateAttributesMapping:Jt})});process.env.NODE_ENV!==`production`&&(Nn.displayName=`AccordionTrigger`);function Pn(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function Fn(e){let t=S(tee,e).current;return t.next=e,M(t.effect),t}function tee(e){let t={current:e,next:e,effect:()=>{t.current=t.next}};return t}var nee=s((e=>{var t=p();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function r(){}var i={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for(`react.portal`),o=Symbol.for(`react.recoverable`),s=Symbol.for(`react.optimistic_key`);function c(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:r==null?null:r===s?s:``+r,children:e,containerInfo:t,implementation:n}}var l=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function u(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,e.browser=function(e){return{$$typeof:o,_reason:e}},e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return c(e,t,null,r)},e.flushSync=function(e){var t=l.T,n=i.p;try{if(l.T=null,i.p=2,e)return e()}finally{l.T=t,i.p=n,i.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,i.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&i.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=u(n,t.crossOrigin),a=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?i.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:o}):n===`script`&&i.d.X(e,{crossOrigin:r,integrity:a,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`){if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=u(t.as,t.crossOrigin);i.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0})}}else t??i.d.M(e)}},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=u(n,t.crossOrigin);i.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`){if(t){var n=u(t.as,t.crossOrigin);i.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0})}else i.d.m(e)}},e.requestFormReset=function(e){i.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return l.H.useFormState(e,t,n)},e.useFormStatus=function(){return l.H.useHostTransitionStatus()},e.version=`19.3.0`})),ree=s((e=>{process.env.NODE_ENV!==`production`&&(function(){function t(){}function n(e){return``+e}function r(e,t,r){var i=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;if(i==null)i=null;else if(i===f)i=f;else{try{n(i);var a=!1}catch{a=!0}a&&(console.error(`The provided key is an unsupported type %s. This value must be coerced to a string before using it here.`,typeof Symbol==`function`&&Symbol.toStringTag&&i[Symbol.toStringTag]||i.constructor.name||`Object`),n(i)),i=``+i}return{$$typeof:u,key:i,children:e,containerInfo:t,implementation:r}}function i(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}function a(e){return e===null?"`null`":e===void 0?"`undefined`":e===``?`an empty string`:`something with type "`+typeof e+`"`}function o(e){return e===null?"`null`":e===void 0?"`undefined`":e===``?`an empty string`:typeof e==`string`?JSON.stringify(e):typeof e==`number`?"`"+e+"`":`something with type "`+typeof e+`"`}function s(){var e=m.H;return e===null&&console.error(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
22
- 1. You might have mismatching versions of React and the renderer (such as React DOM)
23
- 2. You might be breaking the Rules of Hooks
24
- 3. You might have more than one copy of React in the same app
25
- See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`),e}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart==`function`&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var c=p(),l={d:{f:t,r:function(){throw Error(`Invalid form element. requestFormReset must be passed a form that was rendered by React.`)},D:t,C:t,L:t,m:t,X:t,S:t,M:t},p:0,findDOMNode:null},u=Symbol.for(`react.portal`),d=Symbol.for(`react.recoverable`),f=Symbol.for(`react.optimistic_key`),m=c.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;typeof Map==`function`&&Map.prototype!=null&&typeof Map.prototype.forEach==`function`&&typeof Set==`function`&&Set.prototype!=null&&typeof Set.prototype.clear==`function`&&typeof Set.prototype.forEach==`function`||console.error(`React depends on Map and Set built-in types. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills`),e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=l,e.browser=function(e){return{$$typeof:d,_reason:e}},e.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(`Target container is not a DOM element.`);return r(e,t,null,n)},e.flushSync=function(e){var t=m.T,n=l.p;try{if(m.T=null,l.p=2,e)return e()}finally{m.T=t,l.p=n,l.d.f()&&console.error(`flushSync was called from inside a lifecycle method. React cannot flush when React is already rendering. Consider moving this call to a scheduler task or micro task.`)}},e.preconnect=function(e,t){typeof e==`string`&&e?t!=null&&typeof t!=`object`?console.error("ReactDOM.preconnect(): Expected the `options` argument (second) to be an object but encountered %s instead. The only supported option at this time is `crossOrigin` which accepts a string.",o(t)):t!=null&&typeof t.crossOrigin!=`string`&&console.error("ReactDOM.preconnect(): Expected the `crossOrigin` option (second argument) to be a string but encountered %s instead. Try removing this option or passing a string value instead.",a(t.crossOrigin)):console.error("ReactDOM.preconnect(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",a(e)),typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,l.d.C(e,t))},e.prefetchDNS=function(e){if(typeof e!=`string`||!e)console.error("ReactDOM.prefetchDNS(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",a(e));else if(1<arguments.length){var t=arguments[1];typeof t==`object`&&t.hasOwnProperty(`crossOrigin`)?console.error("ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. It looks like the you are attempting to set a crossOrigin property for this DNS lookup hint. Browsers do not perform DNS queries using CORS and setting this attribute on the resource hint has no effect. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.",o(t)):console.error("ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.",o(t))}typeof e==`string`&&l.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&e?typeof t!=`object`||!t?console.error("ReactDOM.preinit(): Expected the `options` argument (second) to be an object with an `as` property describing the type of resource to be preinitialized but encountered %s instead.",o(t)):t.as!==`style`&&t.as!==`script`&&console.error('ReactDOM.preinit(): Expected the `as` property in the `options` argument (second) to contain a valid value describing the type of resource to be preinitialized but encountered %s instead. Valid values for `as` are "style" and "script".',o(t.as)):console.error("ReactDOM.preinit(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",a(e)),typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=i(n,t.crossOrigin),s=typeof t.integrity==`string`?t.integrity:void 0,c=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?l.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:s,fetchPriority:c}):n===`script`&&l.d.X(e,{crossOrigin:r,integrity:s,fetchPriority:c,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){var n=``;if(typeof e==`string`&&e||(n+=" The `href` argument encountered was "+a(e)+`.`),t!==void 0&&typeof t!=`object`?n+=" The `options` argument encountered was "+a(t)+`.`:t&&`as`in t&&t.as!==`script`&&(n+=" The `as` option encountered was "+o(t.as)+`.`),n)console.error("ReactDOM.preinitModule(): Expected up to two arguments, a non-empty `href` string and, optionally, an `options` object with a valid `as` property.%s",n);else switch(n=t&&typeof t.as==`string`?t.as:`script`,n){case`script`:break;default:n=o(n),console.error('ReactDOM.preinitModule(): Currently the only supported "as" type for this function is "script" but received "%s" instead. This warning was generated for `href` "%s". In the future other module types will be supported, aligning with the import-attributes proposal. Learn more here: (https://github.com/tc39/proposal-import-attributes)',n,e)}typeof e==`string`&&(typeof t==`object`&&t?(t.as==null||t.as===`script`)&&(n=i(t.as,t.crossOrigin),l.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0})):t??l.d.M(e))},e.preload=function(e,t){var n=``;if(typeof e==`string`&&e||(n+=" The `href` argument encountered was "+a(e)+`.`),typeof t!=`object`||!t?n+=" The `options` argument encountered was "+a(t)+`.`:typeof t.as==`string`&&t.as||(n+=" The `as` option encountered was "+a(t.as)+`.`),n&&console.error('ReactDOM.preload(): Expected two arguments, a non-empty `href` string and an `options` object with an `as` property valid for a `<link rel="preload" as="..." />` tag.%s',n),typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){n=t.as;var r=i(n,t.crossOrigin);l.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){var n=``;typeof e==`string`&&e||(n+=" The `href` argument encountered was "+a(e)+`.`),t!==void 0&&typeof t!=`object`?n+=" The `options` argument encountered was "+a(t)+`.`:t&&`as`in t&&typeof t.as!=`string`&&(n+=" The `as` option encountered was "+a(t.as)+`.`),n&&console.error('ReactDOM.preloadModule(): Expected two arguments, a non-empty `href` string and, optionally, an `options` object with an `as` property valid for a `<link rel="modulepreload" as="..." />` tag.%s',n),typeof e==`string`&&(t?(n=i(t.as,t.crossOrigin),l.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0})):l.d.m(e))},e.requestFormReset=function(e){l.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return s().useFormState(e,t,n)},e.useFormStatus=function(){return s().useHostTransitionStatus()},e.version=`19.3.0`,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop==`function`&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()})),In=s(((e,t)=>{function n(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE==`function`){if(process.env.NODE_ENV!==`production`)throw Error(`^_^`);try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}}process.env.NODE_ENV===`production`?(n(),t.exports=nee()):t.exports=ree()}));function Ln(e){return e==null?e:`current`in e?e.current:e}var Rn=u(In(),1),zn=null;function iee(e){if(!zn){let e=[];zn=e,queueMicrotask(()=>{zn=null,Rn.flushSync(()=>{for(let t of e)t()})})}zn.push(e)}function Bn(e,t=!1,n=!1){let r=kt();return T((i,a=null)=>{r.cancel();let o=Ln(e);if(o==null)return;let s=o,c=()=>{if(!n){Rn.flushSync(i);return}iee(()=>{a?.aborted||i()})};if(typeof s.getAnimations!=`function`||globalThis.BASE_UI_ANIMATIONS_DISABLED){i();return}function l(){Promise.all(s.getAnimations().map(e=>e.finished)).then(()=>{a?.aborted||c()},()=>{if(!a?.aborted){if(s.getAnimations().some(e=>e.pending||e.playState!==`finished`)){l();return}c()}})}if(t){let e=Lt;if(!s.hasAttribute(e)){r.request(l);return}let t=new MutationObserver(()=>{s.hasAttribute(e)||(t.disconnect(),l())});t.observe(s,{attributes:!0,attributeFilter:[e]}),a?.addEventListener(`abort`,()=>t.disconnect(),{once:!0});return}r.request(l)})}function Vn(e){let{enabled:t=!0,open:n,ref:r,batch:i=!1,onComplete:a}=e,o=T(a),s=Bn(r,n,i);_.useEffect(()=>{if(!t)return;let e=new AbortController;return s(o,e.signal),()=>{e.abort()}},[t,n,o,s])}var Hn={height:void 0,width:void 0};function Un(e){let{externalRef:t,hiddenUntilFound:n,id:r,keepMounted:i,mounted:a,onOpenChange:o,open:s,setMounted:c,setOpen:l,transitionStatus:u}=e,d=_.useRef(null),f=_.useRef(null),[p,m]=_.useState(Hn),h=_.useRef(Hn),g=_.useRef(!1),v=_.useRef(s),y=_.useRef(!1),[b,x]=_.useState(!1),S=_.useRef(null),C=ee(t,d),w=Fn(s),E=Bn(d),D=!s&&!a,O=b?`idle`:u,k=s&&(v.current||y.current),A=!s&&a&&f.current===`css-animation`&&p.height===void 0&&p.width===void 0?h.current:p,j=n&&D&&f.current!==`css-animation`,N=T((e,t=!0)=>{t&&(h.current=e),m(e)}),P=T(()=>{S.current?.(),S.current=null}),F=T(e=>{P(),S.current=()=>{S.current=null,e()}}),I=T(()=>{s&&a&&f.current===`css-animation`&&(y.current=!0)});M(()=>{b&&u!==`starting`&&x(!1)},[b,u]),_.useEffect(()=>()=>{I(),P()},[I,P]),M(()=>{let e=d.current;if(!e)return;!s&&S.current&&P();let t=Gn(e,k);if(f.current=t,s&&u===`idle`&&v.current&&t===`css-animation`){h.current=Wn(e);return}if(s&&u===`starting`){let n=g.current;if(g.current=!1,t===`none`){N(Wn(e)),x(!0);return}if(t===`css-transition`){let t=Jn(e);if(N(Wn(e)),!n)return t;let r=qn(e,`transition-duration`,`0s`);return F(r),x(!0),t}N(Wn(e));let r=qn(e,`animation-name`,`none`);if(!n){r();return}let i=qn(e,`animation-duration`,`0s`);r(),F(i),x(!0);return}if(!s&&a&&(u===`idle`||u===`starting`)){if(v.current=!1,y.current=!1,t===`none`){N(Hn,!1),c(!1);return}N(Wn(e));return}if(u!==`ending`)return;if(t===`none`){c(!1);return}let n=Wn(e);if(!(n.height>0||n.width>0)){c(!1);return}N(n),t===`css-animation`&&qn(e,`animation-name`,`none`)()},[a,s,P,N,c,F,k,u]),Vn({enabled:s&&a&&O===`idle`,open:!0,ref:d,onComplete(){s&&N(Hn,!1)}}),_.useEffect(()=>{if(s||!a||O!==`ending`||!d.current)return;let e=new AbortController,t=-1;function n(){w.current||(c(!1),N(Hn,!1))}return t=Ot.request(()=>{E(n,e.signal)}),()=>{Ot.cancel(t),e.abort()}},[w,a,s,O,E,N,c]),M(()=>{let e=d.current;e&&n&&D&&e.setAttribute(`hidden`,`until-found`)},[D,n]),_.useEffect(function(){let e=d.current;if(!e)return;function t(e){let t=Z(Ue,e);o(!0,t),!t.isCanceled&&(g.current=!0,l(!0))}return Pn(e,`beforematch`,t)},[o,l]);let L=i||n||a||s;return{height:A.height,props:{...j?{[Wt]:``}:void 0,hidden:D,id:r},ref:C,shouldPreventOpenAnimation:k,shouldRender:L,transitionStatus:O,width:A.width}}function Wn(e){return{height:e.scrollHeight,width:e.scrollWidth}}function Gn(e,t){let n=nn(e).getComputedStyle(e),r=(n.animationName.split(`,`).map(e=>e.trim()).some(e=>e!==``&&e!==`none`)||t)&&Kn(n.animationDuration),i=Kn(n.transitionDuration);return r&&i?(process.env.NODE_ENV!==`production`&&O(`CSS transitions and CSS animations both detected on Collapsible or Accordion panel.`,`Only one of either animation type should be used.`),`css-transition`):i?`css-transition`:r?`css-animation`:`none`}function Kn(e){return e.split(`,`).map(e=>e.trim()).some(e=>e!==``&&Number.parseFloat(e)>0)}function qn(e,t,n){let r=e.style.getPropertyValue(t),i=e.style.getPropertyPriority(t);return e.style.setProperty(t,n),()=>{if(r===``){e.style.removeProperty(t);return}e.style.setProperty(t,r,i)}}function Jn(e){let t={"justify-content":e.style.justifyContent,"align-items":e.style.alignItems,"align-content":e.style.alignContent,"justify-items":e.style.justifyItems};Object.keys(t).forEach(t=>{e.style.setProperty(t,`initial`,`important`)});function n(){Object.entries(t).forEach(([t,n])=>{if(n===``){e.style.removeProperty(t);return}e.style.setProperty(t,n)})}let r=Ot.request(n);return()=>{Ot.cancel(r),n()}}var Yn=`--accordion-panel-height`,Xn=`--accordion-panel-width`,Zn=_.forwardRef(function(e,t){let{className:n,hiddenUntilFound:r,keepMounted:i,id:a,render:o,style:s,...c}=e,{hiddenUntilFound:l,keepMounted:u}=J(),{defaultPanelId:d,mounted:f,onOpenChange:p,open:m,setMounted:h,setOpen:g,setPanelIdState:v,transitionStatus:y}=Nt(),b=r??l,x=i??u,S=a||void 0,C=a??d;process.env.NODE_ENV!==`production`&&_.useEffect(()=>{i===!1&&b&&O("The `keepMounted={false}` prop on an `Accordion.Panel` is ignored when `hiddenUntilFound` is enabled on the panel or root, since the panel must remain mounted while closed.")},[b,i]),M(()=>(v(e=>S??(e===null?void 0:e)),()=>{v(e=>e===S?null:e)}),[S,v]);let{height:w,props:T,ref:E,shouldPreventOpenAnimation:D,shouldRender:k,transitionStatus:A,width:j}=Un({externalRef:t,hiddenUntilFound:b,id:C,keepMounted:x,mounted:f,onOpenChange:p,open:m,setMounted:h,setOpen:g,transitionStatus:y}),{state:N,triggerId:P}=It(),F={...N,transitionStatus:A},I=de(s,F),L=X(`div`,{...e,style:void 0},{state:F,ref:E,props:[T,{"aria-labelledby":P,role:`region`,style:{[Yn]:w===void 0?`auto`:`${w}px`,[Xn]:j===void 0?`auto`:`${j}px`}},c,I?{style:I}:void 0,D?{style:{animationName:`none`}}:void 0],stateAttributesMapping:Zt});return k?L:null});process.env.NODE_ENV!==`production`&&(Zn.displayName=`AccordionPanel`);function Qn(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`){if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=Qn(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n)}return r}function $n(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Qn(e))&&(r&&(r+=` `),r+=t);return r}var er=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,tr=$n,nr=(e,t)=>n=>{if(t?.variants==null)return tr(e,n?.class,n?.className);let{variants:r,defaultVariants:i}=t,a=Object.keys(r).map(e=>{let t=n?.[e],a=i?.[e];if(t===null)return null;let o=er(t)||er(a);return r[e][o]}),o=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return r===void 0||(e[n]=r),e},{});return tr(e,a,t?.compoundVariants?.reduce((e,t)=>{let{class:n,className:r,...a}=t;return Object.entries(a).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...i,...o}[t]):{...i,...o}[t]===n})?[...e,n,r]:e},[]),n?.class,n?.className)},rr=nr(`flex flex-col justify-center`,{variants:{variant:{ghost:`bg-transparent`,surface:`overflow-hidden rounded-xl bg-surface shadow-2xs`}},defaultVariants:{variant:`surface`}}),aee=nr(`group transition-all data-disabled:pointer-events-none data-disabled:opacity-50`,{variants:{size:{small:`[&_[data-slot=accordion-content]]:gap-x-2xs [&_[data-slot=accordion-down-icon]]:size-xs [&_[data-slot=accordion-subtitle]]:style-text-prose--2 [&_[data-slot=accordion-title]]:style-text-strong--1 [&_[data-slot=accordion-trigger]]:h-xl [&_[data-slot=accordion-trigger]]:gap-xs [&_[data-slot=accordion-trigger]]:px-sm [&_[data-slot=accordion-icon]]:[&>svg]:size-sm`,medium:`[&_[data-slot=accordion-content]]:gap-x-xs [&_[data-slot=accordion-down-icon]]:size-sm [&_[data-slot=accordion-subtitle]]:style-text-prose--1 [&_[data-slot=accordion-title]]:style-text-strong-0 [&_[data-slot=accordion-trigger]]:h-2xl [&_[data-slot=accordion-trigger]]:gap-sm [&_[data-slot=accordion-trigger]]:pr-sm [&_[data-slot=accordion-trigger]]:pl-md [&_[data-slot=accordion-icon]]:[&>svg]:size-md`,large:`[&_[data-slot=accordion-content]]:gap-x-sm [&_[data-slot=accordion-down-icon]]:size-md [&_[data-slot=accordion-subtitle]]:style-text-prose-0 [&_[data-slot=accordion-title]]:style-text-strong-1 [&_[data-slot=accordion-trigger]]:h-3xl [&_[data-slot=accordion-trigger]]:gap-md [&_[data-slot=accordion-trigger]]:pr-sm [&_[data-slot=accordion-trigger]]:pl-lg [&_[data-slot=accordion-icon]]:[&>svg]:size-lg`},tone:{brand:`[&_[data-slot=accordion-icon]]:text-brand-default [&_[data-slot=accordion-subtitle]]:text-brand-muted [&_[data-slot=accordion-title]]:text-brand-default [&:not([data-open])]:hover:bg-brand-container [&:not([data-open])]:hover:[&_[data-slot=accordion-icon]]:text-brand-on-container [&:not([data-open])]:hover:[&_[data-slot=accordion-subtitle]]:text-brand-on-container-muted [&:not([data-open])]:hover:[&_[data-slot=accordion-title]]:text-brand-on-container`,accent:`[&_[data-slot=accordion-icon]]:text-accent-default [&_[data-slot=accordion-subtitle]]:text-accent-muted [&_[data-slot=accordion-title]]:text-accent-default [&:not([data-open])]:hover:bg-accent-container [&:not([data-open])]:hover:[&_[data-slot=accordion-icon]]:text-accent-on-container [&:not([data-open])]:hover:[&_[data-slot=accordion-subtitle]]:text-accent-on-container-muted [&:not([data-open])]:hover:[&_[data-slot=accordion-title]]:text-accent-on-container`,neutral:`[&_[data-slot=accordion-icon]]:text-neutral-default [&_[data-slot=accordion-subtitle]]:text-neutral-muted [&_[data-slot=accordion-title]]:text-neutral-default [&:not([data-open])]:hover:bg-neutral-container [&:not([data-open])]:hover:[&_[data-slot=accordion-icon]]:text-neutral-on-container [&:not([data-open])]:hover:[&_[data-slot=accordion-subtitle]]:text-neutral-on-container-muted [&:not([data-open])]:hover:[&_[data-slot=accordion-title]]:text-neutral-on-container`,error:`[&_[data-slot=accordion-icon]]:text-error-default [&_[data-slot=accordion-subtitle]]:text-error-muted [&_[data-slot=accordion-title]]:text-error-default [&:not([data-open])]:hover:bg-error-container [&:not([data-open])]:hover:[&_[data-slot=accordion-icon]]:text-error-on-container [&:not([data-open])]:hover:[&_[data-slot=accordion-subtitle]]:text-error-on-container-muted [&:not([data-open])]:hover:[&_[data-slot=accordion-title]]:text-error-on-container`,info:`[&_[data-slot=accordion-icon]]:text-info-default [&_[data-slot=accordion-subtitle]]:text-info-muted [&_[data-slot=accordion-title]]:text-info-default [&:not([data-open])]:hover:bg-info-container [&:not([data-open])]:hover:[&_[data-slot=accordion-icon]]:text-info-on-container [&:not([data-open])]:hover:[&_[data-slot=accordion-subtitle]]:text-info-on-container-muted [&:not([data-open])]:hover:[&_[data-slot=accordion-title]]:text-info-on-container`,success:`[&_[data-slot=accordion-icon]]:text-success-default [&_[data-slot=accordion-subtitle]]:text-success-muted [&_[data-slot=accordion-title]]:text-success-default [&:not([data-open])]:hover:bg-success-container [&:not([data-open])]:hover:[&_[data-slot=accordion-icon]]:text-success-on-container [&:not([data-open])]:hover:[&_[data-slot=accordion-subtitle]]:text-success-on-container-muted [&:not([data-open])]:hover:[&_[data-slot=accordion-title]]:text-success-on-container`,warning:`[&_[data-slot=accordion-icon]]:text-warning-default [&_[data-slot=accordion-subtitle]]:text-warning-muted [&_[data-slot=accordion-title]]:text-warning-default [&:not([data-open])]:hover:bg-warning-container [&:not([data-open])]:hover:[&_[data-slot=accordion-icon]]:text-warning-on-container [&:not([data-open])]:hover:[&_[data-slot=accordion-subtitle]]:text-warning-on-container-muted [&:not([data-open])]:hover:[&_[data-slot=accordion-title]]:text-warning-on-container`}},defaultVariants:{size:`medium`,tone:`brand`}}),oee=(e,t)=>{let n=Array(e.length+t.length);for(let t=0;t<e.length;t++)n[t]=e[t];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},see=(e,t)=>({classGroupId:e,validator:t}),ir=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),ar=`-`,or=[],cee=`arbitrary..`,lee=e=>{let t=dee(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return uee(e);let n=e.split(ar);return sr(n,+(n[0]===``&&n.length>1),t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?oee(i,t):t:i||or}return n[e]||or}}},sr=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=sr(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(ar):e.slice(t).join(ar),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},uee=e=>e.slice(1,-1).indexOf(`:`)===-1?void 0:(()=>{let t=e.slice(1,-1),n=t.indexOf(`:`),r=t.slice(0,n);return r?cee+r:void 0})(),dee=e=>{let{theme:t,classGroups:n}=e;return fee(n,t)},fee=(e,t)=>{let n=ir();for(let r in e){let i=e[r];cr(i,n,r,t)}return n},cr=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++){let i=e[a];pee(i,t,n,r)}},pee=(e,t,n,r)=>{if(typeof e==`string`){mee(e,t,n);return}if(typeof e==`function`){hee(e,t,n,r);return}gee(e,t,n,r)},mee=(e,t,n)=>{let r=e===``?t:lr(t,e);r.classGroupId=n},hee=(e,t,n,r)=>{if(ur(e)){cr(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(see(n,e))},gee=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];cr(o,lr(t,a),n,r)}},lr=(e,t)=>{let n=e,r=t.split(ar),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=ir(),n.nextPart.set(t,i)),n=i}return n},ur=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,dr=e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null),i=(i,a)=>{n[i]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(e){let t=n[e];if(t!==void 0)return t;if((t=r[e])!==void 0)return i(e,t),t},set(e,t){e in n?n[e]=t:i(e,t)}}},fr=`!`,pr=`:`,mr=[],hr=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),gr=e=>{let{prefix:t,experimentalParseClassName:n}=e,r=e=>{let t=[],n=0,r=0,i=0,a,o=e.length;for(let s=0;s<o;s++){let o=e[s];if(n===0&&r===0){if(o===pr){t.push(e.slice(i,s)),i=s+1;continue}if(o===`/`){a=s;continue}}o===`[`?n++:o===`]`?n--:o===`(`?r++:o===`)`&&r--}let s=t.length===0?e:e.slice(i),c=s,l=!1;s.endsWith(fr)?(c=s.slice(0,-1),l=!0):s.startsWith(fr)&&(c=s.slice(1),l=!0);let u=a&&a>i?a-i:void 0;return hr(t,l,c,u)};if(t){let e=t+pr,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):hr(mr,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},_r=e=>{let t=new Map;return e.orderSensitiveModifiers.forEach((e,n)=>{t.set(e,1e6+n)}),e=>{let n=[],r=[];for(let i=0;i<e.length;i++){let a=e[i],o=a[0]===`[`,s=t.has(a);o||s?(r.length>0&&(r.sort(),n.push(...r),r=[]),n.push(a)):r.push(a)}return r.length>0&&(r.sort(),n.push(...r)),n}},vr=e=>({cache:dr(e.cacheSize),parseClassName:gr(e),sortModifiers:_r(e),postfixLookupClassGroupIds:_ee(e),...lee(e)}),_ee=e=>{let t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let e=0;e<n.length;e++)t[n[e]]=!0;return t},vee=/\s+/,yee=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a,postfixLookupClassGroupIds:o}=t,s=[],c=e.trim().split(vee),l=``;for(let e=c.length-1;e>=0;--e){let t=c[e],{isExternal:u,modifiers:d,hasImportantModifier:f,baseClassName:p,maybePostfixModifierPosition:m}=n(t);if(u){l=t+(l.length>0?` `+l:l);continue}let h=!!m,g;if(h){g=r(p.substring(0,m));let e=g&&o[g]?r(p):void 0;e&&e!==g&&(g=e,h=!1)}else g=r(p);if(!g){if(!h){l=t+(l.length>0?` `+l:l);continue}if(g=r(p),!g){l=t+(l.length>0?` `+l:l);continue}h=!1}let _=d.length===0?``:d.length===1?d[0]:a(d).join(`:`),v=f?_+fr:_,y=v+g;if(s.indexOf(y)>-1)continue;s.push(y);let b=i(g,h);for(let e=0;e<b.length;++e){let t=b[e];s.push(v+t)}l=t+(l.length>0?` `+l:l)}return l},bee=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=yr(n))&&(i&&(i+=` `),i+=r);return i},yr=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=yr(e[r]))&&(n&&(n+=` `),n+=t);return n},xee=(e,...t)=>{let n,r,i,a,o=o=>(n=vr(t.reduce((e,t)=>t(e),e())),r=n.cache.get,i=n.cache.set,a=s,s(o)),s=e=>{let t=r(e);if(t)return t;let a=yee(e,n);return i(e,a),a};return a=o,(...e)=>a(bee(...e))},See=[],br=e=>{let t=t=>t[e]||See;return t.isThemeGetter=!0,t.themeKey=e,t},xr=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Sr=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Cee=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,wee=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Tee=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Eee=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix|color|light-dark)\(.+\)$/,Dee=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Oee=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Cr=e=>Cee.test(e),wr=e=>!!e&&!Number.isNaN(Number(e)),Tr=e=>!!e&&Number.isInteger(Number(e)),Er=e=>e.endsWith(`%`)&&wr(e.slice(0,-1)),Dr=e=>wee.test(e),Or=()=>!0,kee=e=>Tee.test(e)&&!Eee.test(e),kr=()=>!1,Aee=e=>Dee.test(e),jee=e=>Oee.test(e),Mee=e=>!Ar(e)&&!Rr(e),Nee=e=>e.startsWith(`@container`)&&(e[10]===`/`&&e[11]!==void 0||e[11]===`s`&&e[16]!==void 0&&e.startsWith(`-size/`,10)||e[11]===`n`&&e[18]!==void 0&&e.startsWith(`-normal/`,10)),Pee=e=>Kr(e,Xr,kr),Ar=e=>xr.test(e),jr=e=>Kr(e,Zr,kee),Mr=e=>Kr(e,Qr,wr),Nr=e=>Kr(e,ei,Or),Pr=e=>Kr(e,$r,kr),Fr=e=>Kr(e,Jr,kr),Ir=e=>Kr(e,Yr,jee),Lr=e=>Kr(e,ti,Aee),Rr=e=>Sr.test(e),zr=e=>qr(e,Zr),Br=e=>qr(e,$r),Vr=e=>qr(e,Jr),Hr=e=>qr(e,Xr),Ur=e=>qr(e,Yr),Wr=e=>qr(e,ti,!0),Gr=e=>qr(e,ei,!0),Kr=(e,t,n)=>{let r=xr.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},qr=(e,t,n=!1)=>{let r=Sr.exec(e);return r?r[1]?t(r[1]):n:!1},Jr=e=>e===`position`||e===`percentage`,Yr=e=>e===`image`||e===`url`,Xr=e=>e===`length`||e===`size`||e===`bg-size`,Zr=e=>e===`length`,Qr=e=>e===`number`,$r=e=>e===`family-name`,ei=e=>e===`number`||e===`weight`,ti=e=>e===`shadow`,Fee=xee(()=>{let e=br(`color`),t=br(`font`),n=br(`text`),r=br(`font-weight`),i=br(`tracking`),a=br(`leading`),o=br(`breakpoint`),s=br(`container`),c=br(`spacing`),l=br(`radius`),u=br(`shadow`),d=br(`inset-shadow`),f=br(`text-shadow`),p=br(`drop-shadow`),m=br(`blur`),h=br(`perspective`),g=br(`aspect`),_=br(`ease`),v=br(`animate`),y=()=>[`auto`,`avoid`,`all`,`avoid-page`,`page`,`left`,`right`,`column`],b=()=>[`center`,`top`,`bottom`,`left`,`right`,`top-left`,`left-top`,`top-right`,`right-top`,`bottom-right`,`right-bottom`,`bottom-left`,`left-bottom`],x=()=>[...b(),Rr,Ar],S=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],C=()=>[`auto`,`contain`,`none`],w=()=>[Rr,Ar,c],T=()=>[Cr,`full`,`auto`,...w()],E=()=>[Tr,`none`,`subgrid`,Rr,Ar],D=()=>[`auto`,{span:[`full`,Tr,Rr,Ar]},Tr,Rr,Ar],O=()=>[Tr,`auto`,Rr,Ar],k=()=>[`auto`,`min`,`max`,`fr`,Rr,Ar],A=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`,`baseline`,`center-safe`,`end-safe`],j=()=>[`start`,`end`,`center`,`stretch`,`center-safe`,`end-safe`],M=()=>[`auto`,...w()],N=()=>[Cr,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],P=()=>[s,Cr,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...w()],F=()=>[Cr,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...w()],I=()=>[e,Rr,Ar],L=()=>[...b(),Vr,Fr,{position:[Rr,Ar]}],R=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],z=()=>[`auto`,`cover`,`contain`,Hr,Pee,{size:[Rr,Ar]}],B=()=>[Er,zr,jr],V=()=>[``,`none`,`full`,l,Rr,Ar],H=()=>[``,wr,zr,jr],U=()=>[`solid`,`dashed`,`dotted`,`double`],W=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],G=()=>[wr,Er,Vr,Fr],K=()=>[``,`none`,m,Rr,Ar],q=()=>[`none`,wr,Rr,Ar],J=()=>[`none`,wr,Rr,Ar],ee=()=>[wr,Rr,Ar],Y=()=>[Cr,`full`,...w()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[Dr],breakpoint:[Dr],color:[Or],container:[Dr],"drop-shadow":[Dr],ease:[`in`,`out`,`in-out`],font:[Mee],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[Dr],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[Dr],shadow:[Dr],spacing:[`px`,wr],text:[Dr],"text-shadow":[Dr],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,Cr,Ar,Rr,g]}],container:[`container`],"container-type":[{"@container":[``,`normal`,`size`,Rr,Ar]}],"container-named":[Nee],columns:[{columns:[wr,`auto`,Ar,Rr,s]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"break-inside":[{"break-inside":[`auto`,`avoid`,`avoid-page`,`avoid-column`]}],"box-decoration":[{"box-decoration":[`slice`,`clone`]}],box:[{box:[`border`,`content`]}],display:[`block`,`inline-block`,`inline`,`flex`,`inline-flex`,`table`,`inline-table`,`table-caption`,`table-cell`,`table-column`,`table-column-group`,`table-footer-group`,`table-header-group`,`table-row-group`,`table-row`,`flow-root`,`grid`,`inline-grid`,`contents`,`list-item`,`hidden`],sr:[`sr-only`,`not-sr-only`],float:[{float:[`right`,`left`,`none`,`start`,`end`]}],clear:[{clear:[`left`,`right`,`both`,`none`,`start`,`end`]}],isolation:[`isolate`,`isolation-auto`],"object-fit":[{object:[`contain`,`cover`,`fill`,`none`,`scale-down`]}],"object-position":[{object:x()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:[`static`,`fixed`,`absolute`,`relative`,`sticky`],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{"inset-s":T(),start:T()}],end:[{"inset-e":T(),end:T()}],"inset-bs":[{"inset-bs":T()}],"inset-be":[{"inset-be":T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:[`visible`,`invisible`,`collapse`],z:[{z:[Tr,`auto`,Rr,Ar]}],basis:[{basis:[Cr,`full`,`auto`,s,...w()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[wr,Cr,`auto`,`initial`,`none`,Ar]}],grow:[{grow:[``,wr,Rr,Ar]}],shrink:[{shrink:[``,wr,Rr,Ar]}],order:[{order:[Tr,`first`,`last`,`none`,Rr,Ar]}],"grid-cols":[{"grid-cols":E()}],"col-start-end":[{col:D()}],"col-start":[{"col-start":O()}],"col-end":[{"col-end":O()}],"grid-rows":[{"grid-rows":E()}],"row-start-end":[{row:D()}],"row-start":[{"row-start":O()}],"row-end":[{"row-end":O()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":k()}],"auto-rows":[{"auto-rows":k()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...A(),`normal`]}],"justify-items":[{"justify-items":[...j(),`normal`]}],"justify-self":[{"justify-self":[`auto`,...j()]}],"align-content":[{content:[`normal`,...A()]}],"align-items":[{items:[...j(),{baseline:[``,`last`]}]}],"align-self":[{self:[`auto`,...j(),{baseline:[``,`last`]}]}],"place-content":[{"place-content":A()}],"place-items":[{"place-items":[...j(),`baseline`]}],"place-self":[{"place-self":[`auto`,...j()]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pbs:[{pbs:w()}],pbe:[{pbe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:M()}],mx:[{mx:M()}],my:[{my:M()}],ms:[{ms:M()}],me:[{me:M()}],mbs:[{mbs:M()}],mbe:[{mbe:M()}],mt:[{mt:M()}],mr:[{mr:M()}],mb:[{mb:M()}],ml:[{ml:M()}],"space-x":[{"space-x":w()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":w()}],"space-y-reverse":[`space-y-reverse`],size:[{size:N()}],"inline-size":[{inline:[`auto`,...P()]}],"min-inline-size":[{"min-inline":[`auto`,...P()]}],"max-inline-size":[{"max-inline":[`none`,...P()]}],"block-size":[{block:[`auto`,...F()]}],"min-block-size":[{"min-block":[`auto`,...F()]}],"max-block-size":[{"max-block":[`none`,...F()]}],w:[{w:[s,`screen`,...N()]}],"min-w":[{"min-w":[s,`screen`,`none`,...N()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...N()]}],h:[{h:[`screen`,`lh`,...N()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...N()]}],"max-h":[{"max-h":[`screen`,`lh`,`none`,...N()]}],"font-size":[{text:[`base`,n,zr,jr]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,Gr,Nr]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,Er,Ar]}],"font-family":[{font:[Br,Pr,t]}],"font-features":[{"font-features":[Ar]}],"fvn-normal":[`normal-nums`],"fvn-ordinal":[`ordinal`],"fvn-slashed-zero":[`slashed-zero`],"fvn-figure":[`lining-nums`,`oldstyle-nums`],"fvn-spacing":[`proportional-nums`,`tabular-nums`],"fvn-fraction":[`diagonal-fractions`,`stacked-fractions`],tracking:[{tracking:[i,Rr,Ar]}],"line-clamp":[{"line-clamp":[wr,`none`,Rr,Mr]}],leading:[{leading:[`none`,a,...w()]}],"list-image":[{"list-image":[`none`,Rr,Ar]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,Rr,Ar]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"placeholder-color":[{placeholder:I()}],"text-color":[{text:I()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...U(),`wavy`]}],"text-decoration-thickness":[{decoration:[wr,`from-font`,`auto`,Rr,jr]}],"text-decoration-color":[{decoration:I()}],"underline-offset":[{"underline-offset":[wr,`auto`,Rr,Ar]}],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-overflow":[`truncate`,`text-ellipsis`,`text-clip`],"text-wrap":[{text:[`wrap`,`nowrap`,`balance`,`pretty`]}],indent:[{indent:w()}],"tab-size":[{tab:[Tr,Rr,Ar]}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,Rr,Ar]}],whitespace:[{whitespace:[`normal`,`nowrap`,`pre`,`pre-line`,`pre-wrap`,`break-spaces`]}],break:[{break:[`normal`,`words`,`all`,`keep`]}],wrap:[{wrap:[`break-word`,`anywhere`,`normal`]}],hyphens:[{hyphens:[`none`,`manual`,`auto`]}],content:[{content:[`none`,Rr,Ar]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:L()}],"bg-repeat":[{bg:R()}],"bg-size":[{bg:z()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},Tr,Rr,Ar],radial:[``,Rr,Ar],conic:[``,Tr,Rr,Ar]},Ur,Ir]}],"bg-color":[{bg:I()}],"gradient-from-pos":[{from:B()}],"gradient-via-pos":[{via:B()}],"gradient-to-pos":[{to:B()}],"gradient-from":[{from:I()}],"gradient-via":[{via:I()}],"gradient-to":[{to:I()}],rounded:[{rounded:V()}],"rounded-s":[{"rounded-s":V()}],"rounded-e":[{"rounded-e":V()}],"rounded-t":[{"rounded-t":V()}],"rounded-r":[{"rounded-r":V()}],"rounded-b":[{"rounded-b":V()}],"rounded-l":[{"rounded-l":V()}],"rounded-ss":[{"rounded-ss":V()}],"rounded-se":[{"rounded-se":V()}],"rounded-ee":[{"rounded-ee":V()}],"rounded-es":[{"rounded-es":V()}],"rounded-tl":[{"rounded-tl":V()}],"rounded-tr":[{"rounded-tr":V()}],"rounded-br":[{"rounded-br":V()}],"rounded-bl":[{"rounded-bl":V()}],"border-w":[{border:H()}],"border-w-x":[{"border-x":H()}],"border-w-y":[{"border-y":H()}],"border-w-s":[{"border-s":H()}],"border-w-e":[{"border-e":H()}],"border-w-bs":[{"border-bs":H()}],"border-w-be":[{"border-be":H()}],"border-w-t":[{"border-t":H()}],"border-w-r":[{"border-r":H()}],"border-w-b":[{"border-b":H()}],"border-w-l":[{"border-l":H()}],"divide-x":[{"divide-x":H()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":H()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...U(),`hidden`,`none`]}],"divide-style":[{divide:[...U(),`hidden`,`none`]}],"border-color":[{border:I()}],"border-color-x":[{"border-x":I()}],"border-color-y":[{"border-y":I()}],"border-color-s":[{"border-s":I()}],"border-color-e":[{"border-e":I()}],"border-color-bs":[{"border-bs":I()}],"border-color-be":[{"border-be":I()}],"border-color-t":[{"border-t":I()}],"border-color-r":[{"border-r":I()}],"border-color-b":[{"border-b":I()}],"border-color-l":[{"border-l":I()}],"divide-color":[{divide:I()}],"outline-style":[{outline:[...U(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[wr,Rr,Ar]}],"outline-w":[{outline:[``,wr,zr,jr]}],"outline-color":[{outline:I()}],shadow:[{shadow:[``,`inner`,`none`,u,Wr,Lr]}],"shadow-color":[{shadow:I()}],"inset-shadow":[{"inset-shadow":[`none`,d,Wr,Lr]}],"inset-shadow-color":[{"inset-shadow":I()}],"ring-w":[{ring:H()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:I()}],"ring-offset-w":[{"ring-offset":[wr,jr]}],"ring-offset-color":[{"ring-offset":I()}],"inset-ring-w":[{"inset-ring":H()}],"inset-ring-color":[{"inset-ring":I()}],"text-shadow":[{"text-shadow":[`none`,f,Wr,Lr]}],"text-shadow-color":[{"text-shadow":I()}],opacity:[{opacity:[wr,Rr,Ar]}],"mix-blend":[{"mix-blend":[...W(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":W()}],"mask-clip":[{"mask-clip":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]},`mask-no-clip`],"mask-composite":[{mask:[`add`,`subtract`,`intersect`,`exclude`]}],"mask-image-linear-pos":[{"mask-linear":[wr]}],"mask-image-linear-from-pos":[{"mask-linear-from":G()}],"mask-image-linear-to-pos":[{"mask-linear-to":G()}],"mask-image-linear-from-color":[{"mask-linear-from":I()}],"mask-image-linear-to-color":[{"mask-linear-to":I()}],"mask-image-t-from-pos":[{"mask-t-from":G()}],"mask-image-t-to-pos":[{"mask-t-to":G()}],"mask-image-t-from-color":[{"mask-t-from":I()}],"mask-image-t-to-color":[{"mask-t-to":I()}],"mask-image-r-from-pos":[{"mask-r-from":G()}],"mask-image-r-to-pos":[{"mask-r-to":G()}],"mask-image-r-from-color":[{"mask-r-from":I()}],"mask-image-r-to-color":[{"mask-r-to":I()}],"mask-image-b-from-pos":[{"mask-b-from":G()}],"mask-image-b-to-pos":[{"mask-b-to":G()}],"mask-image-b-from-color":[{"mask-b-from":I()}],"mask-image-b-to-color":[{"mask-b-to":I()}],"mask-image-l-from-pos":[{"mask-l-from":G()}],"mask-image-l-to-pos":[{"mask-l-to":G()}],"mask-image-l-from-color":[{"mask-l-from":I()}],"mask-image-l-to-color":[{"mask-l-to":I()}],"mask-image-x-from-pos":[{"mask-x-from":G()}],"mask-image-x-to-pos":[{"mask-x-to":G()}],"mask-image-x-from-color":[{"mask-x-from":I()}],"mask-image-x-to-color":[{"mask-x-to":I()}],"mask-image-y-from-pos":[{"mask-y-from":G()}],"mask-image-y-to-pos":[{"mask-y-to":G()}],"mask-image-y-from-color":[{"mask-y-from":I()}],"mask-image-y-to-color":[{"mask-y-to":I()}],"mask-image-radial":[{"mask-radial":[Rr,Ar]}],"mask-image-radial-from-pos":[{"mask-radial-from":G()}],"mask-image-radial-to-pos":[{"mask-radial-to":G()}],"mask-image-radial-from-color":[{"mask-radial-from":I()}],"mask-image-radial-to-color":[{"mask-radial-to":I()}],"mask-image-radial-shape":[{"mask-radial":[`circle`,`ellipse`]}],"mask-image-radial-size":[{"mask-radial":[{closest:[`side`,`corner`],farthest:[`side`,`corner`]}]}],"mask-image-radial-pos":[{"mask-radial-at":b()}],"mask-image-conic-pos":[{"mask-conic":[wr]}],"mask-image-conic-from-pos":[{"mask-conic-from":G()}],"mask-image-conic-to-pos":[{"mask-conic-to":G()}],"mask-image-conic-from-color":[{"mask-conic-from":I()}],"mask-image-conic-to-color":[{"mask-conic-to":I()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:L()}],"mask-repeat":[{mask:R()}],"mask-size":[{mask:z()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,Rr,Ar]}],filter:[{filter:[``,`none`,Rr,Ar]}],blur:[{blur:K()}],brightness:[{brightness:[wr,Rr,Ar]}],contrast:[{contrast:[wr,Rr,Ar]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,Wr,Lr]}],"drop-shadow-color":[{"drop-shadow":I()}],grayscale:[{grayscale:[``,wr,Rr,Ar]}],"hue-rotate":[{"hue-rotate":[wr,Rr,Ar]}],invert:[{invert:[``,wr,Rr,Ar]}],saturate:[{saturate:[wr,Rr,Ar]}],sepia:[{sepia:[``,wr,Rr,Ar]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,Rr,Ar]}],"backdrop-blur":[{"backdrop-blur":K()}],"backdrop-brightness":[{"backdrop-brightness":[wr,Rr,Ar]}],"backdrop-contrast":[{"backdrop-contrast":[wr,Rr,Ar]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,wr,Rr,Ar]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[wr,Rr,Ar]}],"backdrop-invert":[{"backdrop-invert":[``,wr,Rr,Ar]}],"backdrop-opacity":[{"backdrop-opacity":[wr,Rr,Ar]}],"backdrop-saturate":[{"backdrop-saturate":[wr,Rr,Ar]}],"backdrop-sepia":[{"backdrop-sepia":[``,wr,Rr,Ar]}],"border-collapse":[{border:[`collapse`,`separate`]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:[`auto`,`fixed`]}],caption:[{caption:[`top`,`bottom`]}],transition:[{transition:[``,`all`,`colors`,`opacity`,`shadow`,`transform`,`none`,Rr,Ar]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[wr,`initial`,Rr,Ar]}],ease:[{ease:[`linear`,`initial`,_,Rr,Ar]}],delay:[{delay:[wr,Rr,Ar]}],animate:[{animate:[`none`,v,Rr,Ar]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[h,Rr,Ar]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:q()}],"rotate-x":[{"rotate-x":q()}],"rotate-y":[{"rotate-y":q()}],"rotate-z":[{"rotate-z":q()}],scale:[{scale:J()}],"scale-x":[{"scale-x":J()}],"scale-y":[{"scale-y":J()}],"scale-z":[{"scale-z":J()}],"scale-3d":[`scale-3d`],skew:[{skew:ee()}],"skew-x":[{"skew-x":ee()}],"skew-y":[{"skew-y":ee()}],transform:[{transform:[Rr,Ar,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:Y()}],"translate-x":[{"translate-x":Y()}],"translate-y":[{"translate-y":Y()}],"translate-z":[{"translate-z":Y()}],"translate-none":[`translate-none`],zoom:[{zoom:[Tr,Rr,Ar]}],accent:[{accent:I()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:I()}],"color-scheme":[{scheme:[`normal`,`dark`,`light`,`light-dark`,`only-dark`,`only-light`]}],cursor:[{cursor:[`auto`,`default`,`pointer`,`wait`,`text`,`move`,`help`,`not-allowed`,`none`,`context-menu`,`progress`,`cell`,`crosshair`,`vertical-text`,`alias`,`copy`,`no-drop`,`grab`,`grabbing`,`all-scroll`,`col-resize`,`row-resize`,`n-resize`,`e-resize`,`s-resize`,`w-resize`,`ne-resize`,`nw-resize`,`se-resize`,`sw-resize`,`ew-resize`,`ns-resize`,`nesw-resize`,`nwse-resize`,`zoom-in`,`zoom-out`,Rr,Ar]}],"field-sizing":[{"field-sizing":[`fixed`,`content`]}],"pointer-events":[{"pointer-events":[`auto`,`none`]}],resize:[{resize:[`none`,``,`y`,`x`]}],"scroll-behavior":[{scroll:[`auto`,`smooth`]}],"scrollbar-thumb-color":[{"scrollbar-thumb":I()}],"scrollbar-track-color":[{"scrollbar-track":I()}],"scrollbar-gutter":[{"scrollbar-gutter":[`auto`,`stable`,`both`]}],"scrollbar-w":[{scrollbar:[`auto`,`thin`,`none`]}],"scroll-m":[{"scroll-m":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mbs":[{"scroll-mbs":w()}],"scroll-mbe":[{"scroll-mbe":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pbs":[{"scroll-pbs":w()}],"scroll-pbe":[{"scroll-pbe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"snap-align":[{snap:[`start`,`end`,`center`,`align-none`]}],"snap-stop":[{snap:[`normal`,`always`]}],"snap-type":[{snap:[`none`,`x`,`y`,`both`]}],"snap-strictness":[{snap:[`mandatory`,`proximity`]}],touch:[{touch:[`auto`,`none`,`manipulation`]}],"touch-x":[{"touch-pan":[`x`,`left`,`right`]}],"touch-y":[{"touch-pan":[`y`,`up`,`down`]}],"touch-pz":[`touch-pinch-zoom`],select:[{select:[`none`,`text`,`all`,`auto`]}],"will-change":[{"will-change":[`auto`,`scroll`,`contents`,`transform`,Rr,Ar]}],fill:[{fill:[`none`,...I()]}],"stroke-w":[{stroke:[wr,zr,jr,Mr]}],stroke:[{stroke:[`none`,...I()]}],"forced-color-adjust":[{"forced-color-adjust":[`auto`,`none`]}]},conflictingClassGroups:{"container-named":[`container-type`],overflow:[`overflow-x`,`overflow-y`],overscroll:[`overscroll-x`,`overscroll-y`],inset:[`inset-x`,`inset-y`,`inset-bs`,`inset-be`,`start`,`end`,`top`,`right`,`bottom`,`left`],"inset-x":[`start`,`end`,`right`,`left`],"inset-y":[`inset-bs`,`inset-be`,`top`,`bottom`],flex:[`basis`,`grow`,`shrink`],gap:[`gap-x`,`gap-y`],p:[`px`,`py`,`ps`,`pe`,`pbs`,`pbe`,`pt`,`pr`,`pb`,`pl`],px:[`ps`,`pe`,`pr`,`pl`],py:[`pbs`,`pbe`,`pt`,`pb`],m:[`mx`,`my`,`ms`,`me`,`mbs`,`mbe`,`mt`,`mr`,`mb`,`ml`],mx:[`ms`,`me`,`mr`,`ml`],my:[`mbs`,`mbe`,`mt`,`mb`],size:[`w`,`h`],"font-size":[`leading`],"fvn-normal":[`fvn-ordinal`,`fvn-slashed-zero`,`fvn-figure`,`fvn-spacing`,`fvn-fraction`],"fvn-ordinal":[`fvn-normal`],"fvn-slashed-zero":[`fvn-normal`],"fvn-figure":[`fvn-normal`],"fvn-spacing":[`fvn-normal`],"fvn-fraction":[`fvn-normal`],"line-clamp":[`display`,`overflow`],rounded:[`rounded-s`,`rounded-e`,`rounded-t`,`rounded-r`,`rounded-b`,`rounded-l`,`rounded-ss`,`rounded-se`,`rounded-ee`,`rounded-es`,`rounded-tl`,`rounded-tr`,`rounded-br`,`rounded-bl`],"rounded-s":[`rounded-ss`,`rounded-es`],"rounded-e":[`rounded-se`,`rounded-ee`],"rounded-t":[`rounded-tl`,`rounded-tr`],"rounded-r":[`rounded-tr`,`rounded-br`],"rounded-b":[`rounded-br`,`rounded-bl`],"rounded-l":[`rounded-tl`,`rounded-bl`],"border-spacing":[`border-spacing-x`,`border-spacing-y`],"border-w":[`border-w-x`,`border-w-y`,`border-w-s`,`border-w-e`,`border-w-bs`,`border-w-be`,`border-w-t`,`border-w-r`,`border-w-b`,`border-w-l`],"border-w-x":[`border-w-s`,`border-w-e`,`border-w-r`,`border-w-l`],"border-w-y":[`border-w-bs`,`border-w-be`,`border-w-t`,`border-w-b`],"border-color":[`border-color-x`,`border-color-y`,`border-color-s`,`border-color-e`,`border-color-bs`,`border-color-be`,`border-color-t`,`border-color-r`,`border-color-b`,`border-color-l`],"border-color-x":[`border-color-s`,`border-color-e`,`border-color-r`,`border-color-l`],"border-color-y":[`border-color-bs`,`border-color-be`,`border-color-t`,`border-color-b`],translate:[`translate-x`,`translate-y`,`translate-none`],"translate-none":[`translate`,`translate-x`,`translate-y`,`translate-z`],"scroll-m":[`scroll-mx`,`scroll-my`,`scroll-ms`,`scroll-me`,`scroll-mbs`,`scroll-mbe`,`scroll-mt`,`scroll-mr`,`scroll-mb`,`scroll-ml`],"scroll-mx":[`scroll-ms`,`scroll-me`,`scroll-mr`,`scroll-ml`],"scroll-my":[`scroll-mbs`,`scroll-mbe`,`scroll-mt`,`scroll-mb`],"scroll-p":[`scroll-px`,`scroll-py`,`scroll-ps`,`scroll-pe`,`scroll-pbs`,`scroll-pbe`,`scroll-pt`,`scroll-pr`,`scroll-pb`,`scroll-pl`],"scroll-px":[`scroll-ps`,`scroll-pe`,`scroll-pr`,`scroll-pl`],"scroll-py":[`scroll-pbs`,`scroll-pbe`,`scroll-pt`,`scroll-pb`],touch:[`touch-x`,`touch-y`,`touch-pz`],"touch-x":[`touch`],"touch-y":[`touch`],"touch-pz":[`touch`]},conflictingClassGroupModifiers:{"font-size":[`leading`]},postfixLookupClassGroups:[`container-type`],orderSensitiveModifiers:[`*`,`**`,`after`,`backdrop`,`before`,`details-content`,`file`,`first-letter`,`first-line`,`marker`,`placeholder`,`selection`]}});function Q(...e){return Fee($n(e))}var Iee=({withSeparator:e=!0,variant:t,className:n,children:r,ref:i,...a})=>(0,L.jsx)(Le,{className:Q(rr({variant:t,className:n}),e&&`divide-y divide-border`),ref:i,...a,children:r}),Lee=new Map([[`bold`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M120.49,167.51a12,12,0,0,1,0,17l-32,32a12,12,0,0,1-17,0l-32-32a12,12,0,1,1,17-17L68,179V48a12,12,0,0,1,24,0V179l11.51-11.52A12,12,0,0,1,120.49,167.51Zm96-96-32-32a12,12,0,0,0-17,0l-32,32a12,12,0,0,0,17,17L164,77V208a12,12,0,0,0,24,0V77l11.51,11.52a12,12,0,0,0,17-17Z`}))],[`duotone`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M176,48V208H80V48Z`,opacity:`0.2`}),_.createElement(`path`,{d:`M117.66,170.34a8,8,0,0,1,0,11.32l-32,32a8,8,0,0,1-11.32,0l-32-32a8,8,0,0,1,11.32-11.32L72,188.69V48a8,8,0,0,1,16,0V188.69l18.34-18.35A8,8,0,0,1,117.66,170.34Zm96-96-32-32a8,8,0,0,0-11.32,0l-32,32a8,8,0,0,0,11.32,11.32L168,67.31V208a8,8,0,0,0,16,0V67.31l18.34,18.35a8,8,0,0,0,11.32-11.32Z`}))],[`fill`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M119.39,172.94a8,8,0,0,1-1.73,8.72l-32,32a8,8,0,0,1-11.32,0l-32-32A8,8,0,0,1,48,168H72V48a8,8,0,0,1,16,0V168h24A8,8,0,0,1,119.39,172.94Zm94.27-98.6-32-32a8,8,0,0,0-11.32,0l-32,32A8,8,0,0,0,144,88h24V208a8,8,0,0,0,16,0V88h24a8,8,0,0,0,5.66-13.66Z`}))],[`light`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M116.24,171.76a6,6,0,0,1,0,8.48l-32,32a6,6,0,0,1-8.48,0l-32-32a6,6,0,0,1,8.48-8.48L74,193.51V48a6,6,0,0,1,12,0V193.51l21.76-21.75A6,6,0,0,1,116.24,171.76Zm96-96-32-32a6,6,0,0,0-8.48,0l-32,32a6,6,0,0,0,8.48,8.48L170,62.49V208a6,6,0,0,0,12,0V62.49l21.76,21.75a6,6,0,0,0,8.48-8.48Z`}))],[`regular`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M117.66,170.34a8,8,0,0,1,0,11.32l-32,32a8,8,0,0,1-11.32,0l-32-32a8,8,0,0,1,11.32-11.32L72,188.69V48a8,8,0,0,1,16,0V188.69l18.34-18.35A8,8,0,0,1,117.66,170.34Zm96-96-32-32a8,8,0,0,0-11.32,0l-32,32a8,8,0,0,0,11.32,11.32L168,67.31V208a8,8,0,0,0,16,0V67.31l18.34,18.35a8,8,0,0,0,11.32-11.32Z`}))],[`thin`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M114.83,173.17a4,4,0,0,1,0,5.66l-32,32a4,4,0,0,1-5.66,0l-32-32a4,4,0,0,1,5.66-5.66L76,198.34V48a4,4,0,0,1,8,0V198.34l25.17-25.17A4,4,0,0,1,114.83,173.17Zm96-96-32-32a4,4,0,0,0-5.66,0l-32,32a4,4,0,0,0,5.66,5.66L172,57.66V208a4,4,0,0,0,8,0V57.66l25.17,25.17a4,4,0,1,0,5.66-5.66Z`}))]]),Ree=new Map([[`bold`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M216.49,104.49l-80,80a12,12,0,0,1-17,0l-80-80a12,12,0,0,1,17-17L128,159l71.51-71.52a12,12,0,0,1,17,17Z`}))],[`duotone`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M208,96l-80,80L48,96Z`,opacity:`0.2`}),_.createElement(`path`,{d:`M215.39,92.94A8,8,0,0,0,208,88H48a8,8,0,0,0-5.66,13.66l80,80a8,8,0,0,0,11.32,0l80-80A8,8,0,0,0,215.39,92.94ZM128,164.69,67.31,104H188.69Z`}))],[`fill`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,48,88H208a8,8,0,0,1,5.66,13.66Z`}))],[`light`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M212.24,100.24l-80,80a6,6,0,0,1-8.48,0l-80-80a6,6,0,0,1,8.48-8.48L128,167.51l75.76-75.75a6,6,0,0,1,8.48,8.48Z`}))],[`regular`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,53.66,90.34L128,164.69l74.34-74.35a8,8,0,0,1,11.32,11.32Z`}))],[`thin`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M210.83,98.83l-80,80a4,4,0,0,1-5.66,0l-80-80a4,4,0,0,1,5.66-5.66L128,170.34l77.17-77.17a4,4,0,1,1,5.66,5.66Z`}))]]),zee=new Map([[`bold`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M168.49,199.51a12,12,0,0,1-17,17l-80-80a12,12,0,0,1,0-17l80-80a12,12,0,0,1,17,17L97,128Z`}))],[`duotone`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M160,48V208L80,128Z`,opacity:`0.2`}),_.createElement(`path`,{d:`M163.06,40.61a8,8,0,0,0-8.72,1.73l-80,80a8,8,0,0,0,0,11.32l80,80A8,8,0,0,0,168,208V48A8,8,0,0,0,163.06,40.61ZM152,188.69,91.31,128,152,67.31Z`}))],[`fill`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M168,48V208a8,8,0,0,1-13.66,5.66l-80-80a8,8,0,0,1,0-11.32l80-80A8,8,0,0,1,168,48Z`}))],[`light`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M164.24,203.76a6,6,0,1,1-8.48,8.48l-80-80a6,6,0,0,1,0-8.48l80-80a6,6,0,0,1,8.48,8.48L88.49,128Z`}))],[`regular`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M165.66,202.34a8,8,0,0,1-11.32,11.32l-80-80a8,8,0,0,1,0-11.32l80-80a8,8,0,0,1,11.32,11.32L91.31,128Z`}))],[`thin`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M162.83,205.17a4,4,0,0,1-5.66,5.66l-80-80a4,4,0,0,1,0-5.66l80-80a4,4,0,1,1,5.66,5.66L85.66,128Z`}))]]),Bee=new Map([[`bold`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M200.49,199.51a12,12,0,0,1-17,17l-80-80a12,12,0,0,1,0-17l80-80a12,12,0,0,1,17,17L129,128ZM72,36A12,12,0,0,0,60,48V208a12,12,0,0,0,24,0V48A12,12,0,0,0,72,36Z`}))],[`duotone`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M192,48V208l-80-80Z`,opacity:`0.2`}),_.createElement(`path`,{d:`M195.06,40.61a8,8,0,0,0-8.72,1.73l-80,80a8,8,0,0,0,0,11.32l80,80A8,8,0,0,0,200,208V48A8,8,0,0,0,195.06,40.61ZM184,188.69,123.31,128,184,67.31ZM80,48V208a8,8,0,0,1-16,0V48a8,8,0,0,1,16,0Z`}))],[`fill`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M200,48V208a8,8,0,0,1-13.66,5.66l-80-80a8,8,0,0,1,0-11.32l80-80A8,8,0,0,1,200,48ZM72,40a8,8,0,0,0-8,8V208a8,8,0,0,0,16,0V48A8,8,0,0,0,72,40Z`}))],[`light`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M196.24,203.76a6,6,0,1,1-8.48,8.48l-80-80a6,6,0,0,1,0-8.48l80-80a6,6,0,0,1,8.48,8.48L120.49,128ZM72,42a6,6,0,0,0-6,6V208a6,6,0,0,0,12,0V48A6,6,0,0,0,72,42Z`}))],[`regular`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M197.66,202.34a8,8,0,0,1-11.32,11.32l-80-80a8,8,0,0,1,0-11.32l80-80a8,8,0,0,1,11.32,11.32L123.31,128ZM72,40a8,8,0,0,0-8,8V208a8,8,0,0,0,16,0V48A8,8,0,0,0,72,40Z`}))],[`thin`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M194.83,205.17a4,4,0,0,1-5.66,5.66l-80-80a4,4,0,0,1,0-5.66l80-80a4,4,0,1,1,5.66,5.66L117.66,128ZM72,44a4,4,0,0,0-4,4V208a4,4,0,0,0,8,0V48A4,4,0,0,0,72,44Z`}))]]),Vee=new Map([[`bold`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M152.49,119.51a12,12,0,0,1,0,17l-80,80a12,12,0,0,1-17-17L127,128,55.51,56.49a12,12,0,0,1,17-17ZM184,36a12,12,0,0,0-12,12V208a12,12,0,0,0,24,0V48A12,12,0,0,0,184,36Z`}))],[`duotone`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M144,128,64,208V48Z`,opacity:`0.2`}),_.createElement(`path`,{d:`M69.66,42.34A8,8,0,0,0,56,48V208a8,8,0,0,0,13.66,5.66l80-80a8,8,0,0,0,0-11.32ZM72,188.69V67.31L132.69,128ZM192,48V208a8,8,0,0,1-16,0V48a8,8,0,0,1,16,0Z`}))],[`fill`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M149.66,122.34a8,8,0,0,1,0,11.32l-80,80A8,8,0,0,1,56,208V48a8,8,0,0,1,13.66-5.66ZM184,40a8,8,0,0,0-8,8V208a8,8,0,0,0,16,0V48A8,8,0,0,0,184,40Z`}))],[`light`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M148.24,123.76a6,6,0,0,1,0,8.48l-80,80a6,6,0,0,1-8.48-8.48L135.51,128,59.76,52.24a6,6,0,0,1,8.48-8.48ZM184,42a6,6,0,0,0-6,6V208a6,6,0,0,0,12,0V48A6,6,0,0,0,184,42Z`}))],[`regular`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M149.66,122.34a8,8,0,0,1,0,11.32l-80,80a8,8,0,0,1-11.32-11.32L132.69,128,58.34,53.66A8,8,0,0,1,69.66,42.34ZM184,40a8,8,0,0,0-8,8V208a8,8,0,0,0,16,0V48A8,8,0,0,0,184,40Z`}))],[`thin`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M146.83,125.17a4,4,0,0,1,0,5.66l-80,80a4,4,0,0,1-5.66-5.66L138.34,128,61.17,50.83a4,4,0,0,1,5.66-5.66ZM184,44a4,4,0,0,0-4,4V208a4,4,0,0,0,8,0V48A4,4,0,0,0,184,44Z`}))]]),Hee=new Map([[`bold`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M184.49,136.49l-80,80a12,12,0,0,1-17-17L159,128,87.51,56.49a12,12,0,1,1,17-17l80,80A12,12,0,0,1,184.49,136.49Z`}))],[`duotone`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M176,128,96,208V48Z`,opacity:`0.2`}),_.createElement(`path`,{d:`M181.66,122.34l-80-80A8,8,0,0,0,88,48V208a8,8,0,0,0,13.66,5.66l80-80A8,8,0,0,0,181.66,122.34ZM104,188.69V67.31L164.69,128Z`}))],[`fill`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M181.66,133.66l-80,80A8,8,0,0,1,88,208V48a8,8,0,0,1,13.66-5.66l80,80A8,8,0,0,1,181.66,133.66Z`}))],[`light`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M180.24,132.24l-80,80a6,6,0,0,1-8.48-8.48L167.51,128,91.76,52.24a6,6,0,0,1,8.48-8.48l80,80A6,6,0,0,1,180.24,132.24Z`}))],[`regular`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M181.66,133.66l-80,80a8,8,0,0,1-11.32-11.32L164.69,128,90.34,53.66a8,8,0,0,1,11.32-11.32l80,80A8,8,0,0,1,181.66,133.66Z`}))],[`thin`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M178.83,130.83l-80,80a4,4,0,0,1-5.66-5.66L170.34,128,93.17,50.83a4,4,0,0,1,5.66-5.66l80,80A4,4,0,0,1,178.83,130.83Z`}))]]),Uee=new Map([[`bold`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M216.49,168.49a12,12,0,0,1-17,0L128,97,56.49,168.49a12,12,0,0,1-17-17l80-80a12,12,0,0,1,17,0l80,80A12,12,0,0,1,216.49,168.49Z`}))],[`duotone`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M208,160H48l80-80Z`,opacity:`0.2`}),_.createElement(`path`,{d:`M213.66,154.34l-80-80a8,8,0,0,0-11.32,0l-80,80A8,8,0,0,0,48,168H208a8,8,0,0,0,5.66-13.66ZM67.31,152,128,91.31,188.69,152Z`}))],[`fill`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M215.39,163.06A8,8,0,0,1,208,168H48a8,8,0,0,1-5.66-13.66l80-80a8,8,0,0,1,11.32,0l80,80A8,8,0,0,1,215.39,163.06Z`}))],[`light`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M212.24,164.24a6,6,0,0,1-8.48,0L128,88.49,52.24,164.24a6,6,0,0,1-8.48-8.48l80-80a6,6,0,0,1,8.48,0l80,80A6,6,0,0,1,212.24,164.24Z`}))],[`regular`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M213.66,165.66a8,8,0,0,1-11.32,0L128,91.31,53.66,165.66a8,8,0,0,1-11.32-11.32l80-80a8,8,0,0,1,11.32,0l80,80A8,8,0,0,1,213.66,165.66Z`}))],[`thin`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M210.83,162.83a4,4,0,0,1-5.66,0L128,85.66,50.83,162.83a4,4,0,0,1-5.66-5.66l80-80a4,4,0,0,1,5.66,0l80,80A4,4,0,0,1,210.83,162.83Z`}))]]),Wee=new Map([[`bold`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M184.49,167.51a12,12,0,0,1,0,17l-48,48a12,12,0,0,1-17,0l-48-48a12,12,0,0,1,17-17L128,207l39.51-39.52A12,12,0,0,1,184.49,167.51Zm-96-79L128,49l39.51,39.52a12,12,0,0,0,17-17l-48-48a12,12,0,0,0-17,0l-48,48a12,12,0,0,0,17,17Z`}))],[`duotone`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M80,176h96l-48,48ZM128,32,80,80h96Z`,opacity:`0.2`}),_.createElement(`path`,{d:`M176,168H80a8,8,0,0,0-5.66,13.66l48,48a8,8,0,0,0,11.32,0l48-48A8,8,0,0,0,176,168Zm-48,44.69L99.31,184h57.38ZM80,88h96a8,8,0,0,0,5.66-13.66l-48-48a8,8,0,0,0-11.32,0l-48,48A8,8,0,0,0,80,88Zm48-44.69L156.69,72H99.31Z`}))],[`fill`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M72.61,83.06a8,8,0,0,1,1.73-8.72l48-48a8,8,0,0,1,11.32,0l48,48A8,8,0,0,1,176,88H80A8,8,0,0,1,72.61,83.06ZM176,168H80a8,8,0,0,0-5.66,13.66l48,48a8,8,0,0,0,11.32,0l48-48A8,8,0,0,0,176,168Z`}))],[`light`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M180.24,171.76a6,6,0,0,1,0,8.48l-48,48a6,6,0,0,1-8.48,0l-48-48a6,6,0,0,1,8.48-8.48L128,215.51l43.76-43.75A6,6,0,0,1,180.24,171.76Zm-96-87.52L128,40.49l43.76,43.75a6,6,0,0,0,8.48-8.48l-48-48a6,6,0,0,0-8.48,0l-48,48a6,6,0,0,0,8.48,8.48Z`}))],[`regular`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M181.66,170.34a8,8,0,0,1,0,11.32l-48,48a8,8,0,0,1-11.32,0l-48-48a8,8,0,0,1,11.32-11.32L128,212.69l42.34-42.35A8,8,0,0,1,181.66,170.34Zm-96-84.68L128,43.31l42.34,42.35a8,8,0,0,0,11.32-11.32l-48-48a8,8,0,0,0-11.32,0l-48,48A8,8,0,0,0,85.66,85.66Z`}))],[`thin`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M178.83,173.17a4,4,0,0,1,0,5.66l-48,48a4,4,0,0,1-5.66,0l-48-48a4,4,0,0,1,5.66-5.66L128,218.34l45.17-45.17A4,4,0,0,1,178.83,173.17Zm-96-90.34L128,37.66l45.17,45.17a4,4,0,1,0,5.66-5.66l-48-48a4,4,0,0,0-5.66,0l-48,48a4,4,0,0,0,5.66,5.66Z`}))]]),Gee=new Map([[`bold`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M232.49,80.49l-128,128a12,12,0,0,1-17,0l-56-56a12,12,0,1,1,17-17L96,183,215.51,63.51a12,12,0,0,1,17,17Z`}))],[`duotone`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M232,56V200a16,16,0,0,1-16,16H40a16,16,0,0,1-16-16V56A16,16,0,0,1,40,40H216A16,16,0,0,1,232,56Z`,opacity:`0.2`}),_.createElement(`path`,{d:`M205.66,85.66l-96,96a8,8,0,0,1-11.32,0l-40-40a8,8,0,0,1,11.32-11.32L104,164.69l90.34-90.35a8,8,0,0,1,11.32,11.32Z`}))],[`fill`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40ZM205.66,85.66l-96,96a8,8,0,0,1-11.32,0l-40-40a8,8,0,0,1,11.32-11.32L104,164.69l90.34-90.35a8,8,0,0,1,11.32,11.32Z`}))],[`light`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M228.24,76.24l-128,128a6,6,0,0,1-8.48,0l-56-56a6,6,0,0,1,8.48-8.48L96,191.51,219.76,67.76a6,6,0,0,1,8.48,8.48Z`}))],[`regular`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M229.66,77.66l-128,128a8,8,0,0,1-11.32,0l-56-56a8,8,0,0,1,11.32-11.32L96,188.69,218.34,66.34a8,8,0,0,1,11.32,11.32Z`}))],[`thin`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M226.83,74.83l-128,128a4,4,0,0,1-5.66,0l-56-56a4,4,0,0,1,5.66-5.66L96,194.34,221.17,69.17a4,4,0,1,1,5.66,5.66Z`}))]]),Kee=new Map([[`bold`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M176.49,95.51a12,12,0,0,1,0,17l-56,56a12,12,0,0,1-17,0l-24-24a12,12,0,1,1,17-17L112,143l47.51-47.52A12,12,0,0,1,176.49,95.51ZM236,128A108,108,0,1,1,128,20,108.12,108.12,0,0,1,236,128Zm-24,0a84,84,0,1,0-84,84A84.09,84.09,0,0,0,212,128Z`}))],[`duotone`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z`,opacity:`0.2`}),_.createElement(`path`,{d:`M173.66,98.34a8,8,0,0,1,0,11.32l-56,56a8,8,0,0,1-11.32,0l-24-24a8,8,0,0,1,11.32-11.32L112,148.69l50.34-50.35A8,8,0,0,1,173.66,98.34ZM232,128A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128Z`}))],[`fill`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm45.66,85.66-56,56a8,8,0,0,1-11.32,0l-24-24a8,8,0,0,1,11.32-11.32L112,148.69l50.34-50.35a8,8,0,0,1,11.32,11.32Z`}))],[`light`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M172.24,99.76a6,6,0,0,1,0,8.48l-56,56a6,6,0,0,1-8.48,0l-24-24a6,6,0,0,1,8.48-8.48L112,151.51l51.76-51.75A6,6,0,0,1,172.24,99.76ZM230,128A102,102,0,1,1,128,26,102.12,102.12,0,0,1,230,128Zm-12,0a90,90,0,1,0-90,90A90.1,90.1,0,0,0,218,128Z`}))],[`regular`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M173.66,98.34a8,8,0,0,1,0,11.32l-56,56a8,8,0,0,1-11.32,0l-24-24a8,8,0,0,1,11.32-11.32L112,148.69l50.34-50.35A8,8,0,0,1,173.66,98.34ZM232,128A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128Z`}))],[`thin`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M170.83,101.17a4,4,0,0,1,0,5.66l-56,56a4,4,0,0,1-5.66,0l-24-24a4,4,0,0,1,5.66-5.66L112,154.34l53.17-53.17A4,4,0,0,1,170.83,101.17ZM228,128A100,100,0,1,1,128,28,100.11,100.11,0,0,1,228,128Zm-8,0a92,92,0,1,0-92,92A92.1,92.1,0,0,0,220,128Z`}))]]),qee=new Map([[`bold`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M236,128a108,108,0,0,1-216,0c0-42.52,24.73-81.34,63-98.9A12,12,0,1,1,93,50.91C63.24,64.57,44,94.83,44,128a84,84,0,0,0,168,0c0-33.17-19.24-63.43-49-77.09A12,12,0,1,1,173,29.1C211.27,46.66,236,85.48,236,128Z`}))],[`duotone`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z`,opacity:`0.2`}),_.createElement(`path`,{d:`M232,128a104,104,0,0,1-208,0c0-41,23.81-78.36,60.66-95.27a8,8,0,0,1,6.68,14.54C60.15,61.59,40,93.27,40,128a88,88,0,0,0,176,0c0-34.73-20.15-66.41-51.34-80.73a8,8,0,0,1,6.68-14.54C208.19,49.64,232,87,232,128Z`}))],[`fill`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,176A72,72,0,0,1,92,65.64a8,8,0,0,1,8,13.85,56,56,0,1,0,56,0,8,8,0,0,1,8-13.85A72,72,0,0,1,128,200Z`}))],[`light`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M230,128a102,102,0,0,1-204,0c0-40.18,23.35-76.86,59.5-93.45a6,6,0,0,1,5,10.9C58.61,60.09,38,92.49,38,128a90,90,0,0,0,180,0c0-35.51-20.61-67.91-52.5-82.55a6,6,0,0,1,5-10.9C206.65,51.14,230,87.82,230,128Z`}))],[`regular`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M232,128a104,104,0,0,1-208,0c0-41,23.81-78.36,60.66-95.27a8,8,0,0,1,6.68,14.54C60.15,61.59,40,93.27,40,128a88,88,0,0,0,176,0c0-34.73-20.15-66.41-51.34-80.73a8,8,0,0,1,6.68-14.54C208.19,49.64,232,87,232,128Z`}))],[`thin`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M228,128a100,100,0,0,1-200,0c0-39.4,22.9-75.37,58.33-91.63a4,4,0,1,1,3.34,7.27C57.07,58.6,36,91.71,36,128a92,92,0,0,0,184,0c0-36.29-21.07-69.4-53.67-84.36a4,4,0,1,1,3.34-7.27C205.1,52.63,228,88.6,228,128Z`}))]]),Jee=new Map([[`bold`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M216,28H88A12,12,0,0,0,76,40V76H40A12,12,0,0,0,28,88V216a12,12,0,0,0,12,12H168a12,12,0,0,0,12-12V180h36a12,12,0,0,0,12-12V40A12,12,0,0,0,216,28ZM156,204H52V100H156Zm48-48H180V88a12,12,0,0,0-12-12H100V52H204Z`}))],[`duotone`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M216,40V168H168V88H88V40Z`,opacity:`0.2`}),_.createElement(`path`,{d:`M216,32H88a8,8,0,0,0-8,8V80H40a8,8,0,0,0-8,8V216a8,8,0,0,0,8,8H168a8,8,0,0,0,8-8V176h40a8,8,0,0,0,8-8V40A8,8,0,0,0,216,32ZM160,208H48V96H160Zm48-48H176V88a8,8,0,0,0-8-8H96V48H208Z`}))],[`fill`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M216,32H88a8,8,0,0,0-8,8V80H40a8,8,0,0,0-8,8V216a8,8,0,0,0,8,8H168a8,8,0,0,0,8-8V176h40a8,8,0,0,0,8-8V40A8,8,0,0,0,216,32Zm-8,128H176V88a8,8,0,0,0-8-8H96V48H208Z`}))],[`light`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M216,34H88a6,6,0,0,0-6,6V82H40a6,6,0,0,0-6,6V216a6,6,0,0,0,6,6H168a6,6,0,0,0,6-6V174h42a6,6,0,0,0,6-6V40A6,6,0,0,0,216,34ZM162,210H46V94H162Zm48-48H174V88a6,6,0,0,0-6-6H94V46H210Z`}))],[`regular`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M216,32H88a8,8,0,0,0-8,8V80H40a8,8,0,0,0-8,8V216a8,8,0,0,0,8,8H168a8,8,0,0,0,8-8V176h40a8,8,0,0,0,8-8V40A8,8,0,0,0,216,32ZM160,208H48V96H160Zm48-48H176V88a8,8,0,0,0-8-8H96V48H208Z`}))],[`thin`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M216,36H88a4,4,0,0,0-4,4V84H40a4,4,0,0,0-4,4V216a4,4,0,0,0,4,4H168a4,4,0,0,0,4-4V172h44a4,4,0,0,0,4-4V40A4,4,0,0,0,216,36ZM164,212H44V92H164Zm48-48H172V88a4,4,0,0,0-4-4H92V44H212Z`}))]]),Yee=new Map([[`bold`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M144,128a16,16,0,1,1-16-16A16,16,0,0,1,144,128ZM60,112a16,16,0,1,0,16,16A16,16,0,0,0,60,112Zm136,0a16,16,0,1,0,16,16A16,16,0,0,0,196,112Z`}))],[`duotone`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M240,96v64a16,16,0,0,1-16,16H32a16,16,0,0,1-16-16V96A16,16,0,0,1,32,80H224A16,16,0,0,1,240,96Z`,opacity:`0.2`}),_.createElement(`path`,{d:`M140,128a12,12,0,1,1-12-12A12,12,0,0,1,140,128Zm56-12a12,12,0,1,0,12,12A12,12,0,0,0,196,116ZM60,116a12,12,0,1,0,12,12A12,12,0,0,0,60,116Z`}))],[`fill`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M224,80H32A16,16,0,0,0,16,96v64a16,16,0,0,0,16,16H224a16,16,0,0,0,16-16V96A16,16,0,0,0,224,80ZM60,140a12,12,0,1,1,12-12A12,12,0,0,1,60,140Zm68,0a12,12,0,1,1,12-12A12,12,0,0,1,128,140Zm68,0a12,12,0,1,1,12-12A12,12,0,0,1,196,140Z`}))],[`light`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M138,128a10,10,0,1,1-10-10A10,10,0,0,1,138,128ZM60,118a10,10,0,1,0,10,10A10,10,0,0,0,60,118Zm136,0a10,10,0,1,0,10,10A10,10,0,0,0,196,118Z`}))],[`regular`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M140,128a12,12,0,1,1-12-12A12,12,0,0,1,140,128Zm56-12a12,12,0,1,0,12,12A12,12,0,0,0,196,116ZM60,116a12,12,0,1,0,12,12A12,12,0,0,0,60,116Z`}))],[`thin`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M136,128a8,8,0,1,1-8-8A8,8,0,0,1,136,128Zm-76-8a8,8,0,1,0,8,8A8,8,0,0,0,60,120Zm136,0a8,8,0,1,0,8,8A8,8,0,0,0,196,120Z`}))]]),Xee=new Map([[`bold`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M71.51,88.49a12,12,0,0,1,17-17L116,99V24a12,12,0,0,1,24,0V99l27.51-27.52a12,12,0,0,1,17,17l-48,48a12,12,0,0,1-17,0ZM224,116H188a12,12,0,0,0,0,24h32v56H36V140H68a12,12,0,0,0,0-24H32a20,20,0,0,0-20,20v64a20,20,0,0,0,20,20H224a20,20,0,0,0,20-20V136A20,20,0,0,0,224,116Zm-20,52a16,16,0,1,0-16,16A16,16,0,0,0,204,168Z`}))],[`duotone`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M232,136v64a8,8,0,0,1-8,8H32a8,8,0,0,1-8-8V136a8,8,0,0,1,8-8H224A8,8,0,0,1,232,136Z`,opacity:`0.2`}),_.createElement(`path`,{d:`M240,136v64a16,16,0,0,1-16,16H32a16,16,0,0,1-16-16V136a16,16,0,0,1,16-16H72a8,8,0,0,1,0,16H32v64H224V136H184a8,8,0,0,1,0-16h40A16,16,0,0,1,240,136Zm-117.66-2.34a8,8,0,0,0,11.32,0l48-48a8,8,0,0,0-11.32-11.32L136,108.69V24a8,8,0,0,0-16,0v84.69L85.66,74.34A8,8,0,0,0,74.34,85.66ZM200,168a12,12,0,1,0-12,12A12,12,0,0,0,200,168Z`}))],[`fill`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M74.34,85.66A8,8,0,0,1,85.66,74.34L120,108.69V24a8,8,0,0,1,16,0v84.69l34.34-34.35a8,8,0,0,1,11.32,11.32l-48,48a8,8,0,0,1-11.32,0ZM240,136v64a16,16,0,0,1-16,16H32a16,16,0,0,1-16-16V136a16,16,0,0,1,16-16H84.4a4,4,0,0,1,2.83,1.17L111,145A24,24,0,0,0,145,145l23.8-23.8A4,4,0,0,1,171.6,120H224A16,16,0,0,1,240,136Zm-40,32a12,12,0,1,0-12,12A12,12,0,0,0,200,168Z`}))],[`light`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M238,136v64a14,14,0,0,1-14,14H32a14,14,0,0,1-14-14V136a14,14,0,0,1,14-14H72a6,6,0,0,1,0,12H32a2,2,0,0,0-2,2v64a2,2,0,0,0,2,2H224a2,2,0,0,0,2-2V136a2,2,0,0,0-2-2H184a6,6,0,0,1,0-12h40A14,14,0,0,1,238,136Zm-114.24-3.76a6,6,0,0,0,8.48,0l48-48a6,6,0,0,0-8.48-8.48L134,113.51V24a6,6,0,0,0-12,0v89.51L84.24,75.76a6,6,0,0,0-8.48,8.48ZM198,168a10,10,0,1,0-10,10A10,10,0,0,0,198,168Z`}))],[`regular`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M240,136v64a16,16,0,0,1-16,16H32a16,16,0,0,1-16-16V136a16,16,0,0,1,16-16H72a8,8,0,0,1,0,16H32v64H224V136H184a8,8,0,0,1,0-16h40A16,16,0,0,1,240,136Zm-117.66-2.34a8,8,0,0,0,11.32,0l48-48a8,8,0,0,0-11.32-11.32L136,108.69V24a8,8,0,0,0-16,0v84.69L85.66,74.34A8,8,0,0,0,74.34,85.66ZM200,168a12,12,0,1,0-12,12A12,12,0,0,0,200,168Z`}))],[`thin`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M236,136v64a12,12,0,0,1-12,12H32a12,12,0,0,1-12-12V136a12,12,0,0,1,12-12H72a4,4,0,0,1,0,8H32a4,4,0,0,0-4,4v64a4,4,0,0,0,4,4H224a4,4,0,0,0,4-4V136a4,4,0,0,0-4-4H184a4,4,0,0,1,0-8h40A12,12,0,0,1,236,136Zm-110.83-5.17a4,4,0,0,0,5.66,0l48-48a4,4,0,1,0-5.66-5.66L132,118.34V24a4,4,0,0,0-8,0v94.34L82.83,77.17a4,4,0,0,0-5.66,5.66ZM196,168a8,8,0,1,0-8,8A8,8,0,0,0,196,168Z`}))]]),Zee=new Map([[`bold`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M251,123.13c-.37-.81-9.13-20.26-28.48-39.61C196.63,57.67,164,44,128,44S59.37,57.67,33.51,83.52C14.16,102.87,5.4,122.32,5,123.13a12.08,12.08,0,0,0,0,9.75c.37.82,9.13,20.26,28.49,39.61C59.37,198.34,92,212,128,212s68.63-13.66,94.48-39.51c19.36-19.35,28.12-38.79,28.49-39.61A12.08,12.08,0,0,0,251,123.13Zm-46.06,33C183.47,177.27,157.59,188,128,188s-55.47-10.73-76.91-31.88A130.36,130.36,0,0,1,29.52,128,130.45,130.45,0,0,1,51.09,99.89C72.54,78.73,98.41,68,128,68s55.46,10.73,76.91,31.89A130.36,130.36,0,0,1,226.48,128,130.45,130.45,0,0,1,204.91,156.12ZM128,84a44,44,0,1,0,44,44A44.05,44.05,0,0,0,128,84Zm0,64a20,20,0,1,1,20-20A20,20,0,0,1,128,148Z`}))],[`duotone`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M128,56C48,56,16,128,16,128s32,72,112,72,112-72,112-72S208,56,128,56Zm0,112a40,40,0,1,1,40-40A40,40,0,0,1,128,168Z`,opacity:`0.2`}),_.createElement(`path`,{d:`M247.31,124.76c-.35-.79-8.82-19.58-27.65-38.41C194.57,61.26,162.88,48,128,48S61.43,61.26,36.34,86.35C17.51,105.18,9,124,8.69,124.76a8,8,0,0,0,0,6.5c.35.79,8.82,19.57,27.65,38.4C61.43,194.74,93.12,208,128,208s66.57-13.26,91.66-38.34c18.83-18.83,27.3-37.61,27.65-38.4A8,8,0,0,0,247.31,124.76ZM128,192c-30.78,0-57.67-11.19-79.93-33.25A133.47,133.47,0,0,1,25,128,133.33,133.33,0,0,1,48.07,97.25C70.33,75.19,97.22,64,128,64s57.67,11.19,79.93,33.25A133.46,133.46,0,0,1,231.05,128C223.84,141.46,192.43,192,128,192Zm0-112a48,48,0,1,0,48,48A48.05,48.05,0,0,0,128,80Zm0,80a32,32,0,1,1,32-32A32,32,0,0,1,128,160Z`}))],[`fill`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M247.31,124.76c-.35-.79-8.82-19.58-27.65-38.41C194.57,61.26,162.88,48,128,48S61.43,61.26,36.34,86.35C17.51,105.18,9,124,8.69,124.76a8,8,0,0,0,0,6.5c.35.79,8.82,19.57,27.65,38.4C61.43,194.74,93.12,208,128,208s66.57-13.26,91.66-38.34c18.83-18.83,27.3-37.61,27.65-38.4A8,8,0,0,0,247.31,124.76ZM128,168a40,40,0,1,1,40-40A40,40,0,0,1,128,168Z`}))],[`light`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M245.48,125.57c-.34-.78-8.66-19.23-27.24-37.81C201,70.54,171.38,50,128,50S55,70.54,37.76,87.76c-18.58,18.58-26.9,37-27.24,37.81a6,6,0,0,0,0,4.88c.34.77,8.66,19.22,27.24,37.8C55,185.47,84.62,206,128,206s73-20.53,90.24-37.75c18.58-18.58,26.9-37,27.24-37.8A6,6,0,0,0,245.48,125.57ZM128,194c-31.38,0-58.78-11.42-81.45-33.93A134.77,134.77,0,0,1,22.69,128,134.56,134.56,0,0,1,46.55,95.94C69.22,73.42,96.62,62,128,62s58.78,11.42,81.45,33.94A134.56,134.56,0,0,1,233.31,128C226.94,140.21,195,194,128,194Zm0-112a46,46,0,1,0,46,46A46.06,46.06,0,0,0,128,82Zm0,80a34,34,0,1,1,34-34A34,34,0,0,1,128,162Z`}))],[`regular`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M247.31,124.76c-.35-.79-8.82-19.58-27.65-38.41C194.57,61.26,162.88,48,128,48S61.43,61.26,36.34,86.35C17.51,105.18,9,124,8.69,124.76a8,8,0,0,0,0,6.5c.35.79,8.82,19.57,27.65,38.4C61.43,194.74,93.12,208,128,208s66.57-13.26,91.66-38.34c18.83-18.83,27.3-37.61,27.65-38.4A8,8,0,0,0,247.31,124.76ZM128,192c-30.78,0-57.67-11.19-79.93-33.25A133.47,133.47,0,0,1,25,128,133.33,133.33,0,0,1,48.07,97.25C70.33,75.19,97.22,64,128,64s57.67,11.19,79.93,33.25A133.46,133.46,0,0,1,231.05,128C223.84,141.46,192.43,192,128,192Zm0-112a48,48,0,1,0,48,48A48.05,48.05,0,0,0,128,80Zm0,80a32,32,0,1,1,32-32A32,32,0,0,1,128,160Z`}))],[`thin`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M243.66,126.38c-.34-.76-8.52-18.89-26.83-37.2C199.87,72.22,170.7,52,128,52S56.13,72.22,39.17,89.18c-18.31,18.31-26.49,36.44-26.83,37.2a4.08,4.08,0,0,0,0,3.25c.34.77,8.52,18.89,26.83,37.2,17,17,46.14,37.17,88.83,37.17s71.87-20.21,88.83-37.17c18.31-18.31,26.49-36.43,26.83-37.2A4.08,4.08,0,0,0,243.66,126.38Zm-32.7,35c-23.07,23-51,34.62-83,34.62s-59.89-11.65-83-34.62A135.71,135.71,0,0,1,20.44,128,135.69,135.69,0,0,1,45,94.62C68.11,71.65,96,60,128,60s59.89,11.65,83,34.62A135.79,135.79,0,0,1,235.56,128,135.71,135.71,0,0,1,211,161.38ZM128,84a44,44,0,1,0,44,44A44.05,44.05,0,0,0,128,84Zm0,80a36,36,0,1,1,36-36A36,36,0,0,1,128,164Z`}))]]),Qee=new Map([[`bold`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M234.42,162A12,12,0,1,1,213.58,174l-16.86-29.5a127.19,127.19,0,0,1-30.17,13.86L171.84,190a12,12,0,0,1-9.87,13.8,11.22,11.22,0,0,1-2,.17,12,12,0,0,1-11.82-10L143,163.17a136.5,136.5,0,0,1-30.06,0L107.84,194A12,12,0,0,1,96,204a11.22,11.22,0,0,1-2-.17A12,12,0,0,1,84.16,190l5.29-31.72a127.19,127.19,0,0,1-30.17-13.86L42.42,174A12,12,0,1,1,21.58,162L40,129.85a159.73,159.73,0,0,1-17.31-18.31A12,12,0,0,1,41.34,96.46C57.38,116.32,85.44,140,128,140s70.62-23.68,86.66-43.54a12,12,0,0,1,18.67,15.08A159.73,159.73,0,0,1,216,129.85Z`}))],[`duotone`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M224,104c-16.81,20.81-47.63,48-96,48s-79.19-27.19-96-48c16.81-20.81,47.63-48,96-48S207.19,83.19,224,104Z`,opacity:`0.2`}),_.createElement(`path`,{d:`M228,175a8,8,0,0,1-10.92-3l-19-33.2A123.23,123.23,0,0,1,162,155.46l5.87,35.22a8,8,0,0,1-6.58,9.21A8.4,8.4,0,0,1,160,200a8,8,0,0,1-7.88-6.69l-5.77-34.58a133.06,133.06,0,0,1-36.68,0l-5.77,34.58A8,8,0,0,1,96,200a8.4,8.4,0,0,1-1.32-.11,8,8,0,0,1-6.58-9.21L94,155.46a123.23,123.23,0,0,1-36.06-16.69L39,172A8,8,0,1,1,25.06,164l20-35a153.47,153.47,0,0,1-19.3-20A8,8,0,1,1,38.22,99c16.6,20.54,45.64,45,89.78,45s73.18-24.49,89.78-45A8,8,0,1,1,230.22,109a153.47,153.47,0,0,1-19.3,20l20,35A8,8,0,0,1,228,175Z`}))],[`fill`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M230.94,164A8,8,0,1,1,217.05,172l-19-33.2A123.23,123.23,0,0,1,162,155.46l5.87,35.22a8,8,0,0,1-6.58,9.21A8.4,8.4,0,0,1,160,200a8,8,0,0,1-7.88-6.69l-5.77-34.58a133.06,133.06,0,0,1-36.68,0l-5.77,34.58A8,8,0,0,1,96,200a8.4,8.4,0,0,1-1.32-.11,8,8,0,0,1-6.58-9.21L94,155.46a123.23,123.23,0,0,1-36.06-16.69L39,172A8,8,0,1,1,25.06,164l20-35a152.8,152.8,0,0,1-19.3-20,8,8,0,0,1,0-10.06C44.56,75.72,77.55,48,128,48s83.44,27.72,102.22,51a8,8,0,0,1,0,10.06,152.8,152.8,0,0,1-19.3,20Z`}))],[`light`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M229.21,165a6,6,0,0,1-10.42,6l-20-35.08a122,122,0,0,1-39,18.09l6.17,37a6,6,0,0,1-4.93,6.91,6.85,6.85,0,0,1-1,.08,6,6,0,0,1-5.91-5L148,156.44a128.86,128.86,0,0,1-40,0L101.92,193A6,6,0,0,1,96,198a6.85,6.85,0,0,1-1-.08A6,6,0,0,1,90.08,191l6.17-37a122,122,0,0,1-39-18.09L37.21,171a6,6,0,1,1-10.42-6l20.85-36.48a152,152,0,0,1-20.31-20.77,6,6,0,0,1,9.34-7.54C53.54,121.11,83.07,146,128,146s74.46-24.89,91.33-45.77a6,6,0,0,1,9.34,7.54,152,152,0,0,1-20.31,20.77Z`}))],[`regular`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M228,175a8,8,0,0,1-10.92-3l-19-33.2A123.23,123.23,0,0,1,162,155.46l5.87,35.22a8,8,0,0,1-6.58,9.21A8.4,8.4,0,0,1,160,200a8,8,0,0,1-7.88-6.69l-5.77-34.58a133.06,133.06,0,0,1-36.68,0l-5.77,34.58A8,8,0,0,1,96,200a8.4,8.4,0,0,1-1.32-.11,8,8,0,0,1-6.58-9.21L94,155.46a123.23,123.23,0,0,1-36.06-16.69L39,172A8,8,0,1,1,25.06,164l20-35a153.47,153.47,0,0,1-19.3-20A8,8,0,1,1,38.22,99c16.6,20.54,45.64,45,89.78,45s73.18-24.49,89.78-45A8,8,0,1,1,230.22,109a153.47,153.47,0,0,1-19.3,20l20,35A8,8,0,0,1,228,175Z`}))],[`thin`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M226,171.47a3.92,3.92,0,0,1-2,.53,4,4,0,0,1-3.47-2l-21.15-37a120,120,0,0,1-41.91,19.53L164,191.34a4,4,0,0,1-3.29,4.6,3.79,3.79,0,0,1-.67.06,4,4,0,0,1-3.94-3.34l-6.41-38.5a128.17,128.17,0,0,1-43.28,0L100,192.66A4,4,0,0,1,96,196a3.88,3.88,0,0,1-.67-.06,4,4,0,0,1-3.29-4.6l6.48-38.83A120,120,0,0,1,56.62,133L35.47,170A4,4,0,0,1,32,172a3.92,3.92,0,0,1-2-.53A4,4,0,0,1,28.53,166l21.68-37.94a148.24,148.24,0,0,1-21.32-21.56,4,4,0,1,1,6.22-5C52.25,122.71,82.29,148,128,148s75.75-25.29,92.89-46.51a4,4,0,1,1,6.22,5,148.24,148.24,0,0,1-21.32,21.56L227.47,166A4,4,0,0,1,226,171.47Z`}))]]),$ee=new Map([[`bold`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M216.49,79.52l-56-56A12,12,0,0,0,152,20H56A20,20,0,0,0,36,40V216a20,20,0,0,0,20,20H200a20,20,0,0,0,20-20V88A12,12,0,0,0,216.49,79.52ZM183,80H160V57ZM60,212V44h76V92a12,12,0,0,0,12,12h48V212Zm100.49-72.49a12,12,0,0,1-17,17L140,153v31a12,12,0,0,1-24,0V153l-3.51,3.52a12,12,0,0,1-17-17l24-24a12,12,0,0,1,17,0Z`}))],[`duotone`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M208,88H152V32Z`,opacity:`0.2`}),_.createElement(`path`,{d:`M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40V216a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V88A8,8,0,0,0,213.66,82.34ZM160,51.31,188.69,80H160ZM200,216H56V40h88V88a8,8,0,0,0,8,8h48V216Zm-42.34-77.66a8,8,0,0,1-11.32,11.32L136,139.31V184a8,8,0,0,1-16,0V139.31l-10.34,10.35a8,8,0,0,1-11.32-11.32l24-24a8,8,0,0,1,11.32,0Z`}))],[`fill`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40V216a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V88A8,8,0,0,0,213.66,82.34Zm-56,67.32a8,8,0,0,1-11.32,0L136,139.31V184a8,8,0,0,1-16,0V139.31l-10.34,10.35a8,8,0,0,1-11.32-11.32l24-24a8,8,0,0,1,11.32,0l24,24A8,8,0,0,1,157.66,149.66ZM152,88V44l44,44Z`}))],[`light`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M212.24,83.76l-56-56A6,6,0,0,0,152,26H56A14,14,0,0,0,42,40V216a14,14,0,0,0,14,14H200a14,14,0,0,0,14-14V88A6,6,0,0,0,212.24,83.76ZM158,46.48,193.52,82H158ZM200,218H56a2,2,0,0,1-2-2V40a2,2,0,0,1,2-2h90V88a6,6,0,0,0,6,6h50V216A2,2,0,0,1,200,218Zm-43.76-78.24a6,6,0,1,1-8.48,8.48L134,134.49V184a6,6,0,0,1-12,0V134.49l-13.76,13.75a6,6,0,0,1-8.48-8.48l24-24a6,6,0,0,1,8.48,0Z`}))],[`regular`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40V216a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V88A8,8,0,0,0,213.66,82.34ZM160,51.31,188.69,80H160ZM200,216H56V40h88V88a8,8,0,0,0,8,8h48V216Zm-42.34-77.66a8,8,0,0,1-11.32,11.32L136,139.31V184a8,8,0,0,1-16,0V139.31l-10.34,10.35a8,8,0,0,1-11.32-11.32l24-24a8,8,0,0,1,11.32,0Z`}))],[`thin`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M210.83,85.17l-56-56A4,4,0,0,0,152,28H56A12,12,0,0,0,44,40V216a12,12,0,0,0,12,12H200a12,12,0,0,0,12-12V88A4,4,0,0,0,210.83,85.17ZM156,41.65,198.34,84H156ZM200,220H56a4,4,0,0,1-4-4V40a4,4,0,0,1,4-4h92V88a4,4,0,0,0,4,4h52V216A4,4,0,0,1,200,220Zm-45.17-78.83a4,4,0,0,1-5.66,5.66L132,129.66V184a4,4,0,0,1-8,0V129.66l-17.17,17.17a4,4,0,0,1-5.66-5.66l24-24a4,4,0,0,1,5.66,0Z`}))]]),ete=new Map([[`bold`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M216,68H133.39l-26-29.29a20,20,0,0,0-15-6.71H40A20,20,0,0,0,20,52V200.62A19.41,19.41,0,0,0,39.38,220H216.89A19.13,19.13,0,0,0,236,200.89V88A20,20,0,0,0,216,68ZM44,56H90.61l10.67,12H44ZM212,196H44V92H212Z`}))],[`duotone`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M128,80H32V56a8,8,0,0,1,8-8H92.69a8,8,0,0,1,5.65,2.34Z`,opacity:`0.2`}),_.createElement(`path`,{d:`M216,72H131.31L104,44.69A15.86,15.86,0,0,0,92.69,40H40A16,16,0,0,0,24,56V200.62A15.4,15.4,0,0,0,39.38,216H216.89A15.13,15.13,0,0,0,232,200.89V88A16,16,0,0,0,216,72ZM92.69,56l16,16H40V56ZM216,200H40V88H216Z`}))],[`fill`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M216,72H131.31L104,44.69A15.88,15.88,0,0,0,92.69,40H40A16,16,0,0,0,24,56V200.62A15.41,15.41,0,0,0,39.39,216h177.5A15.13,15.13,0,0,0,232,200.89V88A16,16,0,0,0,216,72ZM40,56H92.69l16,16H40Z`}))],[`light`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M216,74H130.49l-27.9-27.9a13.94,13.94,0,0,0-9.9-4.1H40A14,14,0,0,0,26,56V200.62A13.39,13.39,0,0,0,39.38,214H216.89A13.12,13.12,0,0,0,230,200.89V88A14,14,0,0,0,216,74ZM40,54H92.69a2,2,0,0,1,1.41.59L113.51,74H38V56A2,2,0,0,1,40,54ZM218,200.89a1.11,1.11,0,0,1-1.11,1.11H39.38A1.4,1.4,0,0,1,38,200.62V86H216a2,2,0,0,1,2,2Z`}))],[`regular`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M216,72H131.31L104,44.69A15.86,15.86,0,0,0,92.69,40H40A16,16,0,0,0,24,56V200.62A15.4,15.4,0,0,0,39.38,216H216.89A15.13,15.13,0,0,0,232,200.89V88A16,16,0,0,0,216,72ZM40,56H92.69l16,16H40ZM216,200H40V88H216Z`}))],[`thin`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M216,76H129.66L101.17,47.52A11.9,11.9,0,0,0,92.69,44H40A12,12,0,0,0,28,56V200.62A11.4,11.4,0,0,0,39.38,212H216.89A11.12,11.12,0,0,0,228,200.89V88A12,12,0,0,0,216,76ZM36,56a4,4,0,0,1,4-4H92.69a4,4,0,0,1,2.82,1.17L118.34,76H36ZM220,200.89a3.12,3.12,0,0,1-3.11,3.11H39.38A3.39,3.39,0,0,1,36,200.62V84H216a4,4,0,0,1,4,4Z`}))]]),tte=new Map([[`bold`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M248.23,112.31A20,20,0,0,0,232,104H220V88a20,20,0,0,0-20-20H132L105.34,48a20.12,20.12,0,0,0-12-4H40A20,20,0,0,0,20,64V208a12,12,0,0,0,12,12H211.1a12,12,0,0,0,11.33-8l28.49-81.47.06-.17A20,20,0,0,0,248.23,112.31ZM92,68l28.8,21.6A12,12,0,0,0,128,92h68v12H69.77a20,20,0,0,0-18.94,13.58L44,137.15V68ZM202.59,196H48.89l23.72-68H226.37Z`}))],[`duotone`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M208,88v24H69.77a8,8,0,0,0-7.59,5.47L32,208V64a8,8,0,0,1,8-8H93.33a8,8,0,0,1,4.8,1.6L128,80h72A8,8,0,0,1,208,88Z`,opacity:`0.2`}),_.createElement(`path`,{d:`M245,110.64A16,16,0,0,0,232,104H216V88a16,16,0,0,0-16-16H130.67L102.94,51.2a16.14,16.14,0,0,0-9.6-3.2H40A16,16,0,0,0,24,64V208a8,8,0,0,0,8,8H211.1a8,8,0,0,0,7.59-5.47l28.49-85.47A16.05,16.05,0,0,0,245,110.64ZM93.34,64,123.2,86.4A8,8,0,0,0,128,88h72v16H69.77a16,16,0,0,0-15.18,10.94L40,158.7V64Zm112,136H43.1l26.67-80H232Z`}))],[`fill`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M245,110.64A16,16,0,0,0,232,104H216V88a16,16,0,0,0-16-16H130.67L102.94,51.2a16.14,16.14,0,0,0-9.6-3.2H40A16,16,0,0,0,24,64V208h0a8,8,0,0,0,8,8H211.1a8,8,0,0,0,7.59-5.47l28.49-85.47A16.05,16.05,0,0,0,245,110.64ZM93.34,64,123.2,86.4A8,8,0,0,0,128,88h72v16H69.77a16,16,0,0,0-15.18,10.94L40,158.7V64Z`}))],[`light`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M243.36,111.81A14,14,0,0,0,232,106H214V88a14,14,0,0,0-14-14H130L101.74,52.8a14.06,14.06,0,0,0-8.4-2.8H40A14,14,0,0,0,26,64V208a6,6,0,0,0,6,6H211.1a6,6,0,0,0,5.69-4.1l28.49-85.47A14,14,0,0,0,243.36,111.81ZM40,62H93.34a2,2,0,0,1,1.2.4L124.4,84.8A6,6,0,0,0,128,86h72a2,2,0,0,1,2,2v18H69.77a14,14,0,0,0-13.28,9.57L38,171V64A2,2,0,0,1,40,62Zm193.9,58.63L206.78,202H40.33l27.54-82.63a2,2,0,0,1,1.9-1.37H232a2,2,0,0,1,1.9,2.63Z`}))],[`regular`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M245,110.64A16,16,0,0,0,232,104H216V88a16,16,0,0,0-16-16H130.67L102.94,51.2a16.14,16.14,0,0,0-9.6-3.2H40A16,16,0,0,0,24,64V208h0a8,8,0,0,0,8,8H211.1a8,8,0,0,0,7.59-5.47l28.49-85.47A16.05,16.05,0,0,0,245,110.64ZM93.34,64,123.2,86.4A8,8,0,0,0,128,88h72v16H69.77a16,16,0,0,0-15.18,10.94L40,158.7V64Zm112,136H43.1l26.67-80H232Z`}))],[`thin`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M241.72,113a11.88,11.88,0,0,0-9.73-5H212V88a12,12,0,0,0-12-12H129.33l-28.8-21.6a12.05,12.05,0,0,0-7.2-2.4H40A12,12,0,0,0,28,64V208a4,4,0,0,0,4,4H211.09a4,4,0,0,0,3.79-2.74l28.49-85.47A11.86,11.86,0,0,0,241.72,113ZM40,60H93.33a4,4,0,0,1,2.4.8L125.6,83.2a4,4,0,0,0,2.4.8h72a4,4,0,0,1,4,4v20H69.76a12,12,0,0,0-11.38,8.21L36,183.35V64A4,4,0,0,1,40,60Zm195.78,61.26L208.2,204H37.55L66,118.74A4,4,0,0,1,69.76,116H232a4,4,0,0,1,3.79,5.26Z`}))]]),nte=new Map([[`bold`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M216,68H132L105.33,48a20.12,20.12,0,0,0-12-4H40A20,20,0,0,0,20,64V200a20,20,0,0,0,20,20H216.89A19.13,19.13,0,0,0,236,200.89V88A20,20,0,0,0,216,68Zm-4,128H44V68H92l28.8,21.6A12,12,0,0,0,128,92h84Z`}))],[`duotone`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M224,88V200.89a7.11,7.11,0,0,1-7.11,7.11H40a8,8,0,0,1-8-8V64a8,8,0,0,1,8-8H93.33a8,8,0,0,1,4.8,1.6L128,80h88A8,8,0,0,1,224,88Z`,opacity:`0.2`}),_.createElement(`path`,{d:`M216,72H130.67L102.93,51.2a16.12,16.12,0,0,0-9.6-3.2H40A16,16,0,0,0,24,64V200a16,16,0,0,0,16,16H216.89A15.13,15.13,0,0,0,232,200.89V88A16,16,0,0,0,216,72Zm0,128H40V64H93.33L123.2,86.4A8,8,0,0,0,128,88h88Z`}))],[`fill`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M232,88V200.89A15.13,15.13,0,0,1,216.89,216H40a16,16,0,0,1-16-16V64A16,16,0,0,1,40,48H93.33a16.12,16.12,0,0,1,9.6,3.2L130.67,72H216A16,16,0,0,1,232,88Z`}))],[`light`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M216,74H130L101.73,52.8a14,14,0,0,0-8.4-2.8H40A14,14,0,0,0,26,64V200a14,14,0,0,0,14,14H216.89A13.12,13.12,0,0,0,230,200.89V88A14,14,0,0,0,216,74Zm2,126.89a1.11,1.11,0,0,1-1.11,1.11H40a2,2,0,0,1-2-2V64a2,2,0,0,1,2-2H93.33a2,2,0,0,1,1.2.4L124.4,84.8A6,6,0,0,0,128,86h88a2,2,0,0,1,2,2Z`}))],[`regular`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M216,72H130.67L102.93,51.2a16.12,16.12,0,0,0-9.6-3.2H40A16,16,0,0,0,24,64V200a16,16,0,0,0,16,16H216.89A15.13,15.13,0,0,0,232,200.89V88A16,16,0,0,0,216,72Zm0,128H40V64H93.33L123.2,86.4A8,8,0,0,0,128,88h88Z`}))],[`thin`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M216,76H129.33l-28.8-21.6a12.05,12.05,0,0,0-7.2-2.4H40A12,12,0,0,0,28,64V200a12,12,0,0,0,12,12H216.89A11.12,11.12,0,0,0,228,200.89V88A12,12,0,0,0,216,76Zm4,124.89a3.12,3.12,0,0,1-3.11,3.11H40a4,4,0,0,1-4-4V64a4,4,0,0,1,4-4H93.33a4,4,0,0,1,2.4.8L125.6,83.2a4,4,0,0,0,2.4.8h88a4,4,0,0,1,4,4Z`}))]]),rte=new Map([[`bold`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M234.29,47.91A20,20,0,0,0,216,36H40A20,20,0,0,0,25.2,69.45l.12.14L92,140.75V216a20,20,0,0,0,31.1,16.64l32-21.33A20,20,0,0,0,164,194.66V140.75l66.67-71.16.12-.14A20,20,0,0,0,234.29,47.91Zm-91,79.89A12,12,0,0,0,140,136v56.52l-24,16V136a12,12,0,0,0-3.25-8.2L49.23,60H206.77Z`}))],[`duotone`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M221.9,61.38,152,136v58.65a8,8,0,0,1-3.56,6.66l-32,21.33A8,8,0,0,1,104,216V136L34.1,61.38A8,8,0,0,1,40,48H216A8,8,0,0,1,221.9,61.38Z`,opacity:`0.2`}),_.createElement(`path`,{d:`M230.6,49.53A15.81,15.81,0,0,0,216,40H40A16,16,0,0,0,28.19,66.76l.08.09L96,139.17V216a16,16,0,0,0,24.87,13.32l32-21.34A16,16,0,0,0,160,194.66V139.17l67.74-72.32.08-.09A15.8,15.8,0,0,0,230.6,49.53ZM40,56h0Zm106.18,74.58A8,8,0,0,0,144,136v58.66L112,216V136a8,8,0,0,0-2.16-5.47L40,56H216Z`}))],[`fill`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M227.81,66.76l-.08.09L160,139.17v55.49A16,16,0,0,1,152.87,208l-32,21.34A16,16,0,0,1,96,216V139.17L28.27,66.85l-.08-.09A16,16,0,0,1,40,40H216a16,16,0,0,1,11.84,26.76Z`}))],[`light`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M228.77,50.34A13.8,13.8,0,0,0,216,42H40A14,14,0,0,0,29.67,65.42l.06.07L98,138.38V216a14,14,0,0,0,21.77,11.64l32-21.33A14,14,0,0,0,158,194.66V138.38l68.33-73A13.82,13.82,0,0,0,228.77,50.34Zm-11.26,6.94L147.62,131.9A6,6,0,0,0,146,136v58.66a2,2,0,0,1-.89,1.67l-32,21.33A2,2,0,0,1,110,216V136a6,6,0,0,0-1.62-4.1L38.53,57.32A2,2,0,0,1,40,54H216a1.9,1.9,0,0,1,1.83,1.19A1.86,1.86,0,0,1,217.51,57.28Z`}))],[`regular`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M230.6,49.53A15.81,15.81,0,0,0,216,40H40A16,16,0,0,0,28.19,66.76l.08.09L96,139.17V216a16,16,0,0,0,24.87,13.32l32-21.34A16,16,0,0,0,160,194.66V139.17l67.74-72.32.08-.09A15.8,15.8,0,0,0,230.6,49.53ZM40,56h0Zm106.18,74.58A8,8,0,0,0,144,136v58.66L112,216V136a8,8,0,0,0-2.16-5.47L40,56H216Z`}))],[`thin`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M227,51.15A11.85,11.85,0,0,0,216,44H40a12,12,0,0,0-8.88,20.07l.05.05L100,137.59V216a12,12,0,0,0,18.66,10l32-21.33a12,12,0,0,0,5.35-10V137.59l68.86-73.52A11.85,11.85,0,0,0,227,51.15Zm-8,7.5-69.9,74.62A4,4,0,0,0,148,136v58.65a4,4,0,0,1-1.78,3.33l-32,21.33A4,4,0,0,1,108,216V136a4,4,0,0,0-1.08-2.74L37.05,58.67A4,4,0,0,1,40,52H216a4,4,0,0,1,3,6.65Z`}))]]),ite=new Map([[`bold`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M204,136a12,12,0,0,1-12,12H64a12,12,0,0,1,0-24H192A12,12,0,0,1,204,136Zm28-60H24a12,12,0,0,0,0,24H232a12,12,0,0,0,0-24Zm-80,96H104a12,12,0,0,0,0,24h48a12,12,0,0,0,0-24Z`}))],[`duotone`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M232,56V200a16,16,0,0,1-16,16H40a16,16,0,0,1-16-16V56A16,16,0,0,1,40,40H216A16,16,0,0,1,232,56Z`,opacity:`0.2`}),_.createElement(`path`,{d:`M200,136a8,8,0,0,1-8,8H64a8,8,0,0,1,0-16H192A8,8,0,0,1,200,136Zm32-56H24a8,8,0,0,0,0,16H232a8,8,0,0,0,0-16Zm-80,96H104a8,8,0,0,0,0,16h48a8,8,0,0,0,0-16Z`}))],[`fill`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40ZM144,176H112a8,8,0,0,1,0-16h32a8,8,0,0,1,0,16Zm32-40H80a8,8,0,0,1,0-16h96a8,8,0,0,1,0,16Zm32-40H48a8,8,0,0,1,0-16H208a8,8,0,0,1,0,16Z`}))],[`light`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M198,136a6,6,0,0,1-6,6H64a6,6,0,0,1,0-12H192A6,6,0,0,1,198,136Zm34-54H24a6,6,0,0,0,0,12H232a6,6,0,0,0,0-12Zm-80,96H104a6,6,0,0,0,0,12h48a6,6,0,0,0,0-12Z`}))],[`regular`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M200,136a8,8,0,0,1-8,8H64a8,8,0,0,1,0-16H192A8,8,0,0,1,200,136Zm32-56H24a8,8,0,0,0,0,16H232a8,8,0,0,0,0-16Zm-80,96H104a8,8,0,0,0,0,16h48a8,8,0,0,0,0-16Z`}))],[`thin`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M196,136a4,4,0,0,1-4,4H64a4,4,0,0,1,0-8H192A4,4,0,0,1,196,136Zm36-52H24a4,4,0,0,0,0,8H232a4,4,0,0,0,0-8Zm-80,96H104a4,4,0,0,0,0,8h48a4,4,0,0,0,0-8Z`}))]]),ate=new Map([[`bold`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M108,84a16,16,0,1,1,16,16A16,16,0,0,1,108,84Zm128,44A108,108,0,1,1,128,20,108.12,108.12,0,0,1,236,128Zm-24,0a84,84,0,1,0-84,84A84.09,84.09,0,0,0,212,128Zm-72,36.68V132a20,20,0,0,0-20-20,12,12,0,0,0-4,23.32V168a20,20,0,0,0,20,20,12,12,0,0,0,4-23.32Z`}))],[`duotone`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z`,opacity:`0.2`}),_.createElement(`path`,{d:`M144,176a8,8,0,0,1-8,8,16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40A8,8,0,0,1,144,176Zm88-48A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128ZM124,96a12,12,0,1,0-12-12A12,12,0,0,0,124,96Z`}))],[`fill`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm-4,48a12,12,0,1,1-12,12A12,12,0,0,1,124,72Zm12,112a16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40a8,8,0,0,1,0,16Z`}))],[`light`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M142,176a6,6,0,0,1-6,6,14,14,0,0,1-14-14V128a2,2,0,0,0-2-2,6,6,0,0,1,0-12,14,14,0,0,1,14,14v40a2,2,0,0,0,2,2A6,6,0,0,1,142,176ZM124,94a10,10,0,1,0-10-10A10,10,0,0,0,124,94Zm106,34A102,102,0,1,1,128,26,102.12,102.12,0,0,1,230,128Zm-12,0a90,90,0,1,0-90,90A90.1,90.1,0,0,0,218,128Z`}))],[`regular`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm16-40a8,8,0,0,1-8,8,16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40A8,8,0,0,1,144,176ZM112,84a12,12,0,1,1,12,12A12,12,0,0,1,112,84Z`}))],[`thin`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M140,176a4,4,0,0,1-4,4,12,12,0,0,1-12-12V128a4,4,0,0,0-4-4,4,4,0,0,1,0-8,12,12,0,0,1,12,12v40a4,4,0,0,0,4,4A4,4,0,0,1,140,176ZM124,92a8,8,0,1,0-8-8A8,8,0,0,0,124,92Zm104,36A100,100,0,1,1,128,28,100.11,100.11,0,0,1,228,128Zm-8,0a92,92,0,1,0-92,92A92.1,92.1,0,0,0,220,128Z`}))]]),ote=new Map([[`bold`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M208,76H180V56A52,52,0,0,0,76,56V76H48A20,20,0,0,0,28,96V208a20,20,0,0,0,20,20H208a20,20,0,0,0,20-20V96A20,20,0,0,0,208,76ZM100,56a28,28,0,0,1,56,0V76H100ZM204,204H52V100H204Z`}))],[`duotone`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M216,96V208a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V96a8,8,0,0,1,8-8H208A8,8,0,0,1,216,96Z`,opacity:`0.2`}),_.createElement(`path`,{d:`M208,80H176V56a48,48,0,0,0-96,0V80H48A16,16,0,0,0,32,96V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V96A16,16,0,0,0,208,80ZM96,56a32,32,0,0,1,64,0V80H96ZM208,208H48V96H208V208Z`}))],[`fill`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M208,80H176V56a48,48,0,0,0-96,0V80H48A16,16,0,0,0,32,96V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V96A16,16,0,0,0,208,80ZM96,56a32,32,0,0,1,64,0V80H96Z`}))],[`light`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M208,82H174V56a46,46,0,0,0-92,0V82H48A14,14,0,0,0,34,96V208a14,14,0,0,0,14,14H208a14,14,0,0,0,14-14V96A14,14,0,0,0,208,82ZM94,56a34,34,0,0,1,68,0V82H94ZM210,208a2,2,0,0,1-2,2H48a2,2,0,0,1-2-2V96a2,2,0,0,1,2-2H208a2,2,0,0,1,2,2Z`}))],[`regular`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M208,80H176V56a48,48,0,0,0-96,0V80H48A16,16,0,0,0,32,96V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V96A16,16,0,0,0,208,80ZM96,56a32,32,0,0,1,64,0V80H96ZM208,208H48V96H208V208Z`}))],[`thin`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M208,84H172V56a44,44,0,0,0-88,0V84H48A12,12,0,0,0,36,96V208a12,12,0,0,0,12,12H208a12,12,0,0,0,12-12V96A12,12,0,0,0,208,84ZM92,56a36,36,0,0,1,72,0V84H92ZM212,208a4,4,0,0,1-4,4H48a4,4,0,0,1-4-4V96a4,4,0,0,1,4-4H208a4,4,0,0,1,4,4Z`}))]]),ste=new Map([[`bold`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M208,76H100V56a28,28,0,0,1,28-28c13.51,0,25.65,9.62,28.24,22.39a12,12,0,1,0,23.52-4.78C174.87,21.5,153.1,4,128,4A52.06,52.06,0,0,0,76,56V76H48A20,20,0,0,0,28,96V208a20,20,0,0,0,20,20H208a20,20,0,0,0,20-20V96A20,20,0,0,0,208,76Zm-4,128H52V100H204Z`}))],[`duotone`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M216,96V208a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V96a8,8,0,0,1,8-8H208A8,8,0,0,1,216,96Z`,opacity:`0.2`}),_.createElement(`path`,{d:`M208,80H96V56a32,32,0,0,1,32-32c15.37,0,29.2,11,32.16,25.59a8,8,0,0,0,15.68-3.18C171.32,24.15,151.2,8,128,8A48.05,48.05,0,0,0,80,56V80H48A16,16,0,0,0,32,96V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V96A16,16,0,0,0,208,80Zm0,128H48V96H208V208Z`}))],[`fill`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M224,96V208a16,16,0,0,1-16,16H48a16,16,0,0,1-16-16V96A16,16,0,0,1,48,80H80V56A48.05,48.05,0,0,1,128,8c23.2,0,43.32,16.15,47.84,38.41a8,8,0,0,1-15.68,3.18C157.2,35,143.37,24,128,24A32,32,0,0,0,96,56V80H208A16,16,0,0,1,224,96Z`}))],[`light`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M208,82H94V56a34,34,0,0,1,34-34c16.3,0,31,11.69,34.12,27.19a6,6,0,0,0,11.76-2.38C169.55,25.48,150.26,10,128,10A46.06,46.06,0,0,0,82,56V82H48A14,14,0,0,0,34,96V208a14,14,0,0,0,14,14H208a14,14,0,0,0,14-14V96A14,14,0,0,0,208,82Zm2,126a2,2,0,0,1-2,2H48a2,2,0,0,1-2-2V96a2,2,0,0,1,2-2H208a2,2,0,0,1,2,2Z`}))],[`regular`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M208,80H96V56a32,32,0,0,1,32-32c15.37,0,29.2,11,32.16,25.59a8,8,0,0,0,15.68-3.18C171.32,24.15,151.2,8,128,8A48.05,48.05,0,0,0,80,56V80H48A16,16,0,0,0,32,96V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V96A16,16,0,0,0,208,80Zm0,128H48V96H208V208Z`}))],[`thin`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M208,84H92V56a36,36,0,0,1,36-36c17.24,0,32.75,12.38,36.08,28.8a4,4,0,1,0,7.84-1.6C167.78,26.81,149.31,12,128,12A44.05,44.05,0,0,0,84,56V84H48A12,12,0,0,0,36,96V208a12,12,0,0,0,12,12H208a12,12,0,0,0,12-12V96A12,12,0,0,0,208,84Zm4,124a4,4,0,0,1-4,4H48a4,4,0,0,1-4-4V96a4,4,0,0,1,4-4H208a4,4,0,0,1,4,4Z`}))]]),cte=new Map([[`bold`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M232.49,215.51,185,168a92.12,92.12,0,1,0-17,17l47.53,47.54a12,12,0,0,0,17-17ZM44,112a68,68,0,1,1,68,68A68.07,68.07,0,0,1,44,112Z`}))],[`duotone`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M192,112a80,80,0,1,1-80-80A80,80,0,0,1,192,112Z`,opacity:`0.2`}),_.createElement(`path`,{d:`M229.66,218.34,179.6,168.28a88.21,88.21,0,1,0-11.32,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM40,112a72,72,0,1,1,72,72A72.08,72.08,0,0,1,40,112Z`}))],[`fill`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M168,112a56,56,0,1,1-56-56A56,56,0,0,1,168,112Zm61.66,117.66a8,8,0,0,1-11.32,0l-50.06-50.07a88,88,0,1,1,11.32-11.31l50.06,50.06A8,8,0,0,1,229.66,229.66ZM112,184a72,72,0,1,0-72-72A72.08,72.08,0,0,0,112,184Z`}))],[`light`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M228.24,219.76l-51.38-51.38a86.15,86.15,0,1,0-8.48,8.48l51.38,51.38a6,6,0,0,0,8.48-8.48ZM38,112a74,74,0,1,1,74,74A74.09,74.09,0,0,1,38,112Z`}))],[`regular`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M229.66,218.34l-50.07-50.06a88.11,88.11,0,1,0-11.31,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM40,112a72,72,0,1,1,72,72A72.08,72.08,0,0,1,40,112Z`}))],[`thin`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M226.83,221.17l-52.7-52.7a84.1,84.1,0,1,0-5.66,5.66l52.7,52.7a4,4,0,0,0,5.66-5.66ZM36,112a76,76,0,1,1,76,76A76.08,76.08,0,0,1,36,112Z`}))]]),lte=new Map([[`bold`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M228,128a12,12,0,0,1-12,12H40a12,12,0,0,1,0-24H216A12,12,0,0,1,228,128Z`}))],[`duotone`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M216,56V200a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V56A16,16,0,0,1,56,40H200A16,16,0,0,1,216,56Z`,opacity:`0.2`}),_.createElement(`path`,{d:`M224,128a8,8,0,0,1-8,8H40a8,8,0,0,1,0-16H216A8,8,0,0,1,224,128Z`}))],[`fill`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM184,136H72a8,8,0,0,1,0-16H184a8,8,0,0,1,0,16Z`}))],[`light`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M222,128a6,6,0,0,1-6,6H40a6,6,0,0,1,0-12H216A6,6,0,0,1,222,128Z`}))],[`regular`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M224,128a8,8,0,0,1-8,8H40a8,8,0,0,1,0-16H216A8,8,0,0,1,224,128Z`}))],[`thin`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M220,128a4,4,0,0,1-4,4H40a4,4,0,0,1,0-8H216A4,4,0,0,1,220,128Z`}))]]),ute=new Map([[`bold`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M208.49,64.47l-144,144a12,12,0,1,1-17-17l144-144a12,12,0,0,1,17,17ZM47.72,104.27A40,40,0,1,1,76,116,39.72,39.72,0,0,1,47.72,104.27ZM60,76a16,16,0,1,0,4.69-11.31A15.87,15.87,0,0,0,60,76ZM220,180a40,40,0,1,1-11.72-28.29A39.71,39.71,0,0,1,220,180Zm-24,0a15.87,15.87,0,0,0-4.69-11.32h0A16,16,0,1,0,196,180Z`}))],[`duotone`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M95.8,56.2a28,28,0,1,1-39.6,0A28,28,0,0,1,95.8,56.2Zm104,104a28,28,0,1,0,0,39.6A28,28,0,0,0,199.8,160.2Z`,opacity:`0.2`}),_.createElement(`path`,{d:`M205.66,61.64l-144,144a8,8,0,0,1-11.32-11.32l144-144a8,8,0,0,1,11.32,11.31ZM50.54,101.44a36,36,0,0,1,50.92-50.91h0a36,36,0,0,1-50.92,50.91ZM56,76A20,20,0,1,0,90.14,61.84h0A20,20,0,0,0,56,76ZM216,180a36,36,0,1,1-10.54-25.46h0A35.76,35.76,0,0,1,216,180Zm-16,0a20,20,0,1,0-5.86,14.14A19.87,19.87,0,0,0,200,180Z`}))],[`fill`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M176,172a12,12,0,1,1-12-12A12,12,0,0,1,176,172ZM92,96A12,12,0,1,0,80,84,12,12,0,0,0,92,96ZM224,48V208a16,16,0,0,1-16,16H48a16,16,0,0,1-16-16V48A16,16,0,0,1,48,32H208A16,16,0,0,1,224,48ZM64,84A28,28,0,1,0,92,56,28,28,0,0,0,64,84Zm128,88a28,28,0,1,0-28,28A28,28,0,0,0,192,172ZM189.66,66.34a8,8,0,0,0-11.32,0l-112,112a8,8,0,0,0,11.32,11.32l112-112A8,8,0,0,0,189.66,66.34Z`}))],[`light`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M204.24,60.23l-144,144a6,6,0,0,1-8.48-8.48l144-144a6,6,0,1,1,8.48,8.49ZM52,100A34,34,0,1,1,76,110,33.78,33.78,0,0,1,52,100Zm2-24a22,22,0,1,0,6.44-15.56A21.86,21.86,0,0,0,54,76ZM214,180A34,34,0,1,1,204,156,33.78,33.78,0,0,1,214,180Zm-12,0a21.87,21.87,0,0,0-6.44-15.56h0A22,22,0,1,0,202,180Z`}))],[`regular`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M205.66,61.64l-144,144a8,8,0,0,1-11.32-11.32l144-144a8,8,0,0,1,11.32,11.31ZM50.54,101.44a36,36,0,0,1,50.92-50.91h0a36,36,0,0,1-50.92,50.91ZM56,76A20,20,0,1,0,90.14,61.84h0A20,20,0,0,0,56,76ZM216,180a36,36,0,1,1-10.54-25.46h0A35.76,35.76,0,0,1,216,180Zm-16,0a20,20,0,1,0-5.86,14.14A19.87,19.87,0,0,0,200,180Z`}))],[`thin`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M202.83,58.81l-144,144a4,4,0,0,1-5.66-5.66l144-144a4,4,0,1,1,5.66,5.65ZM53.37,98.62A32,32,0,1,1,76,108,31.82,31.82,0,0,1,53.37,98.62ZM52,76a24,24,0,1,0,7-17A23.85,23.85,0,0,0,52,76ZM212,180a32,32,0,1,1-9.37-22.63A31.82,31.82,0,0,1,212,180Zm-8,0a24,24,0,1,0-7,17A23.89,23.89,0,0,0,204,180Z`}))]]),dte=new Map([[`bold`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M228,128a12,12,0,0,1-12,12H140v76a12,12,0,0,1-24,0V140H40a12,12,0,0,1,0-24h76V40a12,12,0,0,1,24,0v76h76A12,12,0,0,1,228,128Z`}))],[`duotone`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M216,56V200a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V56A16,16,0,0,1,56,40H200A16,16,0,0,1,216,56Z`,opacity:`0.2`}),_.createElement(`path`,{d:`M224,128a8,8,0,0,1-8,8H136v80a8,8,0,0,1-16,0V136H40a8,8,0,0,1,0-16h80V40a8,8,0,0,1,16,0v80h80A8,8,0,0,1,224,128Z`}))],[`fill`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM184,136H136v48a8,8,0,0,1-16,0V136H72a8,8,0,0,1,0-16h48V72a8,8,0,0,1,16,0v48h48a8,8,0,0,1,0,16Z`}))],[`light`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M222,128a6,6,0,0,1-6,6H134v82a6,6,0,0,1-12,0V134H40a6,6,0,0,1,0-12h82V40a6,6,0,0,1,12,0v82h82A6,6,0,0,1,222,128Z`}))],[`regular`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M224,128a8,8,0,0,1-8,8H136v80a8,8,0,0,1-16,0V136H40a8,8,0,0,1,0-16h80V40a8,8,0,0,1,16,0v80h80A8,8,0,0,1,224,128Z`}))],[`thin`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M220,128a4,4,0,0,1-4,4H132v84a4,4,0,0,1-8,0V132H40a4,4,0,0,1,0-8h84V40a4,4,0,0,1,8,0v84h84A4,4,0,0,1,220,128Z`}))]]),fte=new Map([[`bold`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M128,128a12,12,0,0,1-12,12H48a12,12,0,0,1,0-24h68A12,12,0,0,1,128,128ZM48,76H180a12,12,0,0,0,0-24H48a12,12,0,0,0,0,24Zm52,104H48a12,12,0,0,0,0,24h52a12,12,0,0,0,0-24Zm132.49-20.49a12,12,0,0,0-17,0L196,179V112a12,12,0,0,0-24,0v67l-19.51-19.52a12,12,0,0,0-17,17l40,40a12,12,0,0,0,17,0l40-40A12,12,0,0,0,232.49,159.51Z`}))],[`duotone`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M224,80v88l-24,24H48V64H208A16,16,0,0,1,224,80Z`,opacity:`0.2`}),_.createElement(`path`,{d:`M128,128a8,8,0,0,1-8,8H48a8,8,0,0,1,0-16h72A8,8,0,0,1,128,128ZM48,72H184a8,8,0,0,0,0-16H48a8,8,0,0,0,0,16Zm56,112H48a8,8,0,0,0,0,16h56a8,8,0,0,0,0-16Zm125.66-21.66a8,8,0,0,0-11.32,0L192,188.69V112a8,8,0,0,0-16,0v76.69l-26.34-26.35a8,8,0,0,0-11.32,11.32l40,40a8,8,0,0,0,11.32,0l40-40A8,8,0,0,0,229.66,162.34Z`}))],[`fill`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM72,72h96a8,8,0,0,1,0,16H72a8,8,0,0,1,0-16Zm40,112H72a8,8,0,0,1,0-16h40a8,8,0,0,1,0,16Zm8-48H72a8,8,0,0,1,0-16h48a8,8,0,0,1,0,16Zm77.66,29.66-24,24a8,8,0,0,1-11.32,0l-24-24a8,8,0,0,1,11.32-11.32L160,164.69V120a8,8,0,0,1,16,0v44.69l10.34-10.35a8,8,0,0,1,11.32,11.32Z`}))],[`light`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M126,128a6,6,0,0,1-6,6H48a6,6,0,0,1,0-12h72A6,6,0,0,1,126,128ZM48,70H184a6,6,0,0,0,0-12H48a6,6,0,0,0,0,12Zm56,116H48a6,6,0,0,0,0,12h56a6,6,0,0,0,0-12Zm124.24-22.24a6,6,0,0,0-8.48,0L190,193.51V112a6,6,0,0,0-12,0v81.51l-29.76-29.75a6,6,0,0,0-8.48,8.48l40,40a6,6,0,0,0,8.48,0l40-40A6,6,0,0,0,228.24,163.76Z`}))],[`regular`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M128,128a8,8,0,0,1-8,8H48a8,8,0,0,1,0-16h72A8,8,0,0,1,128,128ZM48,72H184a8,8,0,0,0,0-16H48a8,8,0,0,0,0,16Zm56,112H48a8,8,0,0,0,0,16h56a8,8,0,0,0,0-16Zm125.66-21.66a8,8,0,0,0-11.32,0L192,188.69V112a8,8,0,0,0-16,0v76.69l-26.34-26.35a8,8,0,0,0-11.32,11.32l40,40a8,8,0,0,0,11.32,0l40-40A8,8,0,0,0,229.66,162.34Z`}))],[`thin`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M124,128a4,4,0,0,1-4,4H48a4,4,0,0,1,0-8h72A4,4,0,0,1,124,128ZM48,68H184a4,4,0,0,0,0-8H48a4,4,0,0,0,0,8Zm56,120H48a4,4,0,0,0,0,8h56a4,4,0,0,0,0-8Zm122.83-22.83a4,4,0,0,0-5.66,0L188,198.34V112a4,4,0,0,0-8,0v86.34l-33.17-33.17a4,4,0,0,0-5.66,5.66l40,40a4,4,0,0,0,5.66,0l40-40A4,4,0,0,0,226.83,165.17Z`}))]]),pte=new Map([[`bold`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M36,128a12,12,0,0,1,12-12h68a12,12,0,0,1,0,24H48A12,12,0,0,1,36,128ZM48,76h52a12,12,0,0,0,0-24H48a12,12,0,0,0,0,24ZM180,180H48a12,12,0,0,0,0,24H180a12,12,0,0,0,0-24ZM232.49,79.51l-40-40a12,12,0,0,0-17,0l-40,40a12,12,0,0,0,17,17L172,77v67a12,12,0,0,0,24,0V77l19.51,19.52a12,12,0,0,0,17-17Z`}))],[`duotone`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M224,88v88a16,16,0,0,1-16,16H48V64H200Z`,opacity:`0.2`}),_.createElement(`path`,{d:`M40,128a8,8,0,0,1,8-8h72a8,8,0,0,1,0,16H48A8,8,0,0,1,40,128Zm8-56h56a8,8,0,0,0,0-16H48a8,8,0,0,0,0,16ZM184,184H48a8,8,0,0,0,0,16H184a8,8,0,0,0,0-16ZM229.66,82.34l-40-40a8,8,0,0,0-11.32,0l-40,40a8,8,0,0,0,11.32,11.32L176,67.31V144a8,8,0,0,0,16,0V67.31l26.34,26.35a8,8,0,0,0,11.32-11.32Z`}))],[`fill`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM72,72h40a8,8,0,0,1,0,16H72a8,8,0,0,1,0-16Zm0,48h48a8,8,0,0,1,0,16H72a8,8,0,0,1,0-16Zm96,64H72a8,8,0,0,1,0-16h96a8,8,0,0,1,0,16Zm29.66-82.34a8,8,0,0,1-11.32,0L176,91.31V136a8,8,0,0,1-16,0V91.31l-10.34,10.35a8,8,0,0,1-11.32-11.32l24-24a8,8,0,0,1,11.32,0l24,24A8,8,0,0,1,197.66,101.66Z`}))],[`light`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M42,128a6,6,0,0,1,6-6h72a6,6,0,0,1,0,12H48A6,6,0,0,1,42,128Zm6-58h56a6,6,0,0,0,0-12H48a6,6,0,0,0,0,12ZM184,186H48a6,6,0,0,0,0,12H184a6,6,0,0,0,0-12ZM228.24,83.76l-40-40a6,6,0,0,0-8.48,0l-40,40a6,6,0,0,0,8.48,8.48L178,62.49V144a6,6,0,0,0,12,0V62.49l29.76,29.75a6,6,0,0,0,8.48-8.48Z`}))],[`regular`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M40,128a8,8,0,0,1,8-8h72a8,8,0,0,1,0,16H48A8,8,0,0,1,40,128Zm8-56h56a8,8,0,0,0,0-16H48a8,8,0,0,0,0,16ZM184,184H48a8,8,0,0,0,0,16H184a8,8,0,0,0,0-16ZM229.66,82.34l-40-40a8,8,0,0,0-11.32,0l-40,40a8,8,0,0,0,11.32,11.32L176,67.31V144a8,8,0,0,0,16,0V67.31l26.34,26.35a8,8,0,0,0,11.32-11.32Z`}))],[`thin`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M44,128a4,4,0,0,1,4-4h72a4,4,0,0,1,0,8H48A4,4,0,0,1,44,128Zm4-60h56a4,4,0,0,0,0-8H48a4,4,0,0,0,0,8ZM184,188H48a4,4,0,0,0,0,8H184a4,4,0,0,0,0-8ZM226.83,85.17l-40-40a4,4,0,0,0-5.66,0l-40,40a4,4,0,0,0,5.66,5.66L180,57.66V144a4,4,0,0,0,8,0V57.66l33.17,33.17a4,4,0,1,0,5.66-5.66Z`}))]]),mte=new Map([[`bold`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M216,48H180V36A28,28,0,0,0,152,8H104A28,28,0,0,0,76,36V48H40a12,12,0,0,0,0,24h4V208a20,20,0,0,0,20,20H192a20,20,0,0,0,20-20V72h4a12,12,0,0,0,0-24ZM100,36a4,4,0,0,1,4-4h48a4,4,0,0,1,4,4V48H100Zm88,168H68V72H188ZM116,104v64a12,12,0,0,1-24,0V104a12,12,0,0,1,24,0Zm48,0v64a12,12,0,0,1-24,0V104a12,12,0,0,1,24,0Z`}))],[`duotone`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M200,56V208a8,8,0,0,1-8,8H64a8,8,0,0,1-8-8V56Z`,opacity:`0.2`}),_.createElement(`path`,{d:`M216,48H176V40a24,24,0,0,0-24-24H104A24,24,0,0,0,80,40v8H40a8,8,0,0,0,0,16h8V208a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V64h8a8,8,0,0,0,0-16ZM96,40a8,8,0,0,1,8-8h48a8,8,0,0,1,8,8v8H96Zm96,168H64V64H192ZM112,104v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm48,0v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Z`}))],[`fill`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M216,48H176V40a24,24,0,0,0-24-24H104A24,24,0,0,0,80,40v8H40a8,8,0,0,0,0,16h8V208a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V64h8a8,8,0,0,0,0-16ZM112,168a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm48,0a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm0-120H96V40a8,8,0,0,1,8-8h48a8,8,0,0,1,8,8Z`}))],[`light`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M216,50H174V40a22,22,0,0,0-22-22H104A22,22,0,0,0,82,40V50H40a6,6,0,0,0,0,12H50V208a14,14,0,0,0,14,14H192a14,14,0,0,0,14-14V62h10a6,6,0,0,0,0-12ZM94,40a10,10,0,0,1,10-10h48a10,10,0,0,1,10,10V50H94ZM194,208a2,2,0,0,1-2,2H64a2,2,0,0,1-2-2V62H194ZM110,104v64a6,6,0,0,1-12,0V104a6,6,0,0,1,12,0Zm48,0v64a6,6,0,0,1-12,0V104a6,6,0,0,1,12,0Z`}))],[`regular`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M216,48H176V40a24,24,0,0,0-24-24H104A24,24,0,0,0,80,40v8H40a8,8,0,0,0,0,16h8V208a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V64h8a8,8,0,0,0,0-16ZM96,40a8,8,0,0,1,8-8h48a8,8,0,0,1,8,8v8H96Zm96,168H64V64H192ZM112,104v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm48,0v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Z`}))],[`thin`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M216,52H172V40a20,20,0,0,0-20-20H104A20,20,0,0,0,84,40V52H40a4,4,0,0,0,0,8H52V208a12,12,0,0,0,12,12H192a12,12,0,0,0,12-12V60h12a4,4,0,0,0,0-8ZM92,40a12,12,0,0,1,12-12h48a12,12,0,0,1,12,12V52H92ZM196,208a4,4,0,0,1-4,4H64a4,4,0,0,1-4-4V60H196ZM108,104v64a4,4,0,0,1-8,0V104a4,4,0,0,1,8,0Zm48,0v64a4,4,0,0,1-8,0V104a4,4,0,0,1,8,0Z`}))]]),hte=new Map([[`bold`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M188,184a16,16,0,1,1,16-16A16,16,0,0,1,188,184Zm36-68H180a12,12,0,0,0,0,24h40v56H36V140H76a12,12,0,0,0,0-24H32a20,20,0,0,0-20,20v64a20,20,0,0,0,20,20H224a20,20,0,0,0,20-20V136A20,20,0,0,0,224,116ZM88.49,80.49,116,53v75a12,12,0,0,0,24,0V53l27.51,27.52a12,12,0,1,0,17-17l-48-48a12,12,0,0,0-17,0l-48,48a12,12,0,1,0,17,17Z`}))],[`duotone`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M232,136v64a8,8,0,0,1-8,8H32a8,8,0,0,1-8-8V136a8,8,0,0,1,8-8H224A8,8,0,0,1,232,136Z`,opacity:`0.2`}),_.createElement(`path`,{d:`M240,136v64a16,16,0,0,1-16,16H32a16,16,0,0,1-16-16V136a16,16,0,0,1,16-16H80a8,8,0,0,1,0,16H32v64H224V136H176a8,8,0,0,1,0-16h48A16,16,0,0,1,240,136ZM85.66,77.66,120,43.31V128a8,8,0,0,0,16,0V43.31l34.34,34.35a8,8,0,0,0,11.32-11.32l-48-48a8,8,0,0,0-11.32,0l-48,48A8,8,0,0,0,85.66,77.66ZM200,168a12,12,0,1,0-12,12A12,12,0,0,0,200,168Z`}))],[`fill`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M74.34,77.66a8,8,0,0,1,0-11.32l48-48a8,8,0,0,1,11.32,0l48,48a8,8,0,0,1-11.32,11.32L136,43.31V128a8,8,0,0,1-16,0V43.31L85.66,77.66A8,8,0,0,1,74.34,77.66ZM240,136v64a16,16,0,0,1-16,16H32a16,16,0,0,1-16-16V136a16,16,0,0,1,16-16h68a4,4,0,0,1,4,4v3.46c0,13.45,11,24.79,24.46,24.54A24,24,0,0,0,152,128v-4a4,4,0,0,1,4-4h68A16,16,0,0,1,240,136Zm-40,32a12,12,0,1,0-12,12A12,12,0,0,0,200,168Z`}))],[`light`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M238,136v64a14,14,0,0,1-14,14H32a14,14,0,0,1-14-14V136a14,14,0,0,1,14-14H80a6,6,0,0,1,0,12H32a2,2,0,0,0-2,2v64a2,2,0,0,0,2,2H224a2,2,0,0,0,2-2V136a2,2,0,0,0-2-2H176a6,6,0,0,1,0-12h48A14,14,0,0,1,238,136ZM84.24,76.24,122,38.49V128a6,6,0,0,0,12,0V38.49l37.76,37.75a6,6,0,0,0,8.48-8.48l-48-48a6,6,0,0,0-8.48,0l-48,48a6,6,0,0,0,8.48,8.48ZM198,168a10,10,0,1,0-10,10A10,10,0,0,0,198,168Z`}))],[`regular`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M240,136v64a16,16,0,0,1-16,16H32a16,16,0,0,1-16-16V136a16,16,0,0,1,16-16H80a8,8,0,0,1,0,16H32v64H224V136H176a8,8,0,0,1,0-16h48A16,16,0,0,1,240,136ZM85.66,77.66,120,43.31V128a8,8,0,0,0,16,0V43.31l34.34,34.35a8,8,0,0,0,11.32-11.32l-48-48a8,8,0,0,0-11.32,0l-48,48A8,8,0,0,0,85.66,77.66ZM200,168a12,12,0,1,0-12,12A12,12,0,0,0,200,168Z`}))],[`thin`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M236,136v64a12,12,0,0,1-12,12H32a12,12,0,0,1-12-12V136a12,12,0,0,1,12-12H80a4,4,0,0,1,0,8H32a4,4,0,0,0-4,4v64a4,4,0,0,0,4,4H224a4,4,0,0,0,4-4V136a4,4,0,0,0-4-4H176a4,4,0,0,1,0-8h48A12,12,0,0,1,236,136ZM82.83,74.83,124,33.66V128a4,4,0,0,0,8,0V33.66l41.17,41.17a4,4,0,1,0,5.66-5.66l-48-48a4,4,0,0,0-5.66,0l-48,48a4,4,0,0,0,5.66,5.66ZM196,168a8,8,0,1,0-8,8A8,8,0,0,0,196,168Z`}))]]),ni=new Map([[`bold`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M240.26,186.1,152.81,34.23h0a28.74,28.74,0,0,0-49.62,0L15.74,186.1a27.45,27.45,0,0,0,0,27.71A28.31,28.31,0,0,0,40.55,228h174.9a28.31,28.31,0,0,0,24.79-14.19A27.45,27.45,0,0,0,240.26,186.1Zm-20.8,15.7a4.46,4.46,0,0,1-4,2.2H40.55a4.46,4.46,0,0,1-4-2.2,3.56,3.56,0,0,1,0-3.73L124,46.2a4.77,4.77,0,0,1,8,0l87.44,151.87A3.56,3.56,0,0,1,219.46,201.8ZM116,136V104a12,12,0,0,1,24,0v32a12,12,0,0,1-24,0Zm28,40a16,16,0,1,1-16-16A16,16,0,0,1,144,176Z`}))],[`duotone`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M215.46,216H40.54C27.92,216,20,202.79,26.13,192.09L113.59,40.22c6.3-11,22.52-11,28.82,0l87.46,151.87C236,202.79,228.08,216,215.46,216Z`,opacity:`0.2`}),_.createElement(`path`,{d:`M236.8,188.09,149.35,36.22h0a24.76,24.76,0,0,0-42.7,0L19.2,188.09a23.51,23.51,0,0,0,0,23.72A24.35,24.35,0,0,0,40.55,224h174.9a24.35,24.35,0,0,0,21.33-12.19A23.51,23.51,0,0,0,236.8,188.09ZM222.93,203.8a8.5,8.5,0,0,1-7.48,4.2H40.55a8.5,8.5,0,0,1-7.48-4.2,7.59,7.59,0,0,1,0-7.72L120.52,44.21a8.75,8.75,0,0,1,15,0l87.45,151.87A7.59,7.59,0,0,1,222.93,203.8ZM120,144V104a8,8,0,0,1,16,0v40a8,8,0,0,1-16,0Zm20,36a12,12,0,1,1-12-12A12,12,0,0,1,140,180Z`}))],[`fill`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M236.8,188.09,149.35,36.22h0a24.76,24.76,0,0,0-42.7,0L19.2,188.09a23.51,23.51,0,0,0,0,23.72A24.35,24.35,0,0,0,40.55,224h174.9a24.35,24.35,0,0,0,21.33-12.19A23.51,23.51,0,0,0,236.8,188.09ZM120,104a8,8,0,0,1,16,0v40a8,8,0,0,1-16,0Zm8,88a12,12,0,1,1,12-12A12,12,0,0,1,128,192Z`}))],[`light`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M235.07,189.09,147.61,37.22h0a22.75,22.75,0,0,0-39.22,0L20.93,189.09a21.53,21.53,0,0,0,0,21.72A22.35,22.35,0,0,0,40.55,222h174.9a22.35,22.35,0,0,0,19.6-11.19A21.53,21.53,0,0,0,235.07,189.09ZM224.66,204.8a10.46,10.46,0,0,1-9.21,5.2H40.55a10.46,10.46,0,0,1-9.21-5.2,9.51,9.51,0,0,1,0-9.72L118.79,43.21a10.75,10.75,0,0,1,18.42,0l87.46,151.87A9.51,9.51,0,0,1,224.66,204.8ZM122,144V104a6,6,0,0,1,12,0v40a6,6,0,0,1-12,0Zm16,36a10,10,0,1,1-10-10A10,10,0,0,1,138,180Z`}))],[`regular`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M236.8,188.09,149.35,36.22h0a24.76,24.76,0,0,0-42.7,0L19.2,188.09a23.51,23.51,0,0,0,0,23.72A24.35,24.35,0,0,0,40.55,224h174.9a24.35,24.35,0,0,0,21.33-12.19A23.51,23.51,0,0,0,236.8,188.09ZM222.93,203.8a8.5,8.5,0,0,1-7.48,4.2H40.55a8.5,8.5,0,0,1-7.48-4.2,7.59,7.59,0,0,1,0-7.72L120.52,44.21a8.75,8.75,0,0,1,15,0l87.45,151.87A7.59,7.59,0,0,1,222.93,203.8ZM120,144V104a8,8,0,0,1,16,0v40a8,8,0,0,1-16,0Zm20,36a12,12,0,1,1-12-12A12,12,0,0,1,140,180Z`}))],[`thin`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M233.34,190.09,145.88,38.22h0a20.75,20.75,0,0,0-35.76,0L22.66,190.09a19.52,19.52,0,0,0,0,19.71A20.36,20.36,0,0,0,40.54,220H215.46a20.36,20.36,0,0,0,17.86-10.2A19.52,19.52,0,0,0,233.34,190.09ZM226.4,205.8a12.47,12.47,0,0,1-10.94,6.2H40.54a12.47,12.47,0,0,1-10.94-6.2,11.45,11.45,0,0,1,0-11.72L117.05,42.21a12.76,12.76,0,0,1,21.9,0L226.4,194.08A11.45,11.45,0,0,1,226.4,205.8ZM124,144V104a4,4,0,0,1,8,0v40a4,4,0,0,1-8,0Zm12,36a8,8,0,1,1-8-8A8,8,0,0,1,136,180Z`}))]]),ri=new Map([[`bold`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M128,20A108,108,0,1,0,236,128,108.12,108.12,0,0,0,128,20Zm0,192a84,84,0,1,1,84-84A84.09,84.09,0,0,1,128,212Zm-12-80V80a12,12,0,0,1,24,0v52a12,12,0,0,1-24,0Zm28,40a16,16,0,1,1-16-16A16,16,0,0,1,144,172Z`}))],[`duotone`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z`,opacity:`0.2`}),_.createElement(`path`,{d:`M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm-8-80V80a8,8,0,0,1,16,0v56a8,8,0,0,1-16,0Zm20,36a12,12,0,1,1-12-12A12,12,0,0,1,140,172Z`}))],[`fill`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm-8,56a8,8,0,0,1,16,0v56a8,8,0,0,1-16,0Zm8,104a12,12,0,1,1,12-12A12,12,0,0,1,128,184Z`}))],[`light`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M128,26A102,102,0,1,0,230,128,102.12,102.12,0,0,0,128,26Zm0,192a90,90,0,1,1,90-90A90.1,90.1,0,0,1,128,218Zm-6-82V80a6,6,0,0,1,12,0v56a6,6,0,0,1-12,0Zm16,36a10,10,0,1,1-10-10A10,10,0,0,1,138,172Z`}))],[`regular`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm-8-80V80a8,8,0,0,1,16,0v56a8,8,0,0,1-16,0Zm20,36a12,12,0,1,1-12-12A12,12,0,0,1,140,172Z`}))],[`thin`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M128,28A100,100,0,1,0,228,128,100.11,100.11,0,0,0,128,28Zm0,192a92,92,0,1,1,92-92A92.1,92.1,0,0,1,128,220Zm-4-84V80a4,4,0,0,1,8,0v56a4,4,0,0,1-8,0Zm12,36a8,8,0,1,1-8-8A8,8,0,0,1,136,172Z`}))]]),ii=new Map([[`bold`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M208.49,191.51a12,12,0,0,1-17,17L128,145,64.49,208.49a12,12,0,0,1-17-17L111,128,47.51,64.49a12,12,0,0,1,17-17L128,111l63.51-63.52a12,12,0,0,1,17,17L145,128Z`}))],[`duotone`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M216,56V200a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V56A16,16,0,0,1,56,40H200A16,16,0,0,1,216,56Z`,opacity:`0.2`}),_.createElement(`path`,{d:`M205.66,194.34a8,8,0,0,1-11.32,11.32L128,139.31,61.66,205.66a8,8,0,0,1-11.32-11.32L116.69,128,50.34,61.66A8,8,0,0,1,61.66,50.34L128,116.69l66.34-66.35a8,8,0,0,1,11.32,11.32L139.31,128Z`}))],[`fill`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM181.66,170.34a8,8,0,0,1-11.32,11.32L128,139.31,85.66,181.66a8,8,0,0,1-11.32-11.32L116.69,128,74.34,85.66A8,8,0,0,1,85.66,74.34L128,116.69l42.34-42.35a8,8,0,0,1,11.32,11.32L139.31,128Z`}))],[`light`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M204.24,195.76a6,6,0,1,1-8.48,8.48L128,136.49,60.24,204.24a6,6,0,0,1-8.48-8.48L119.51,128,51.76,60.24a6,6,0,0,1,8.48-8.48L128,119.51l67.76-67.75a6,6,0,0,1,8.48,8.48L136.49,128Z`}))],[`regular`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M205.66,194.34a8,8,0,0,1-11.32,11.32L128,139.31,61.66,205.66a8,8,0,0,1-11.32-11.32L116.69,128,50.34,61.66A8,8,0,0,1,61.66,50.34L128,116.69l66.34-66.35a8,8,0,0,1,11.32,11.32L139.31,128Z`}))],[`thin`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M202.83,197.17a4,4,0,0,1-5.66,5.66L128,133.66,58.83,202.83a4,4,0,0,1-5.66-5.66L122.34,128,53.17,58.83a4,4,0,0,1,5.66-5.66L128,122.34l69.17-69.17a4,4,0,1,1,5.66,5.66L133.66,128Z`}))]]),ai=new Map([[`bold`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M168.49,104.49,145,128l23.52,23.51a12,12,0,0,1-17,17L128,145l-23.51,23.52a12,12,0,0,1-17-17L111,128,87.51,104.49a12,12,0,0,1,17-17L128,111l23.51-23.52a12,12,0,0,1,17,17ZM236,128A108,108,0,1,1,128,20,108.12,108.12,0,0,1,236,128Zm-24,0a84,84,0,1,0-84,84A84.09,84.09,0,0,0,212,128Z`}))],[`duotone`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z`,opacity:`0.2`}),_.createElement(`path`,{d:`M165.66,101.66,139.31,128l26.35,26.34a8,8,0,0,1-11.32,11.32L128,139.31l-26.34,26.35a8,8,0,0,1-11.32-11.32L116.69,128,90.34,101.66a8,8,0,0,1,11.32-11.32L128,116.69l26.34-26.35a8,8,0,0,1,11.32,11.32ZM232,128A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128Z`}))],[`fill`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm37.66,130.34a8,8,0,0,1-11.32,11.32L128,139.31l-26.34,26.35a8,8,0,0,1-11.32-11.32L116.69,128,90.34,101.66a8,8,0,0,1,11.32-11.32L128,116.69l26.34-26.35a8,8,0,0,1,11.32,11.32L139.31,128Z`}))],[`light`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M164.24,100.24,136.48,128l27.76,27.76a6,6,0,1,1-8.48,8.48L128,136.48l-27.76,27.76a6,6,0,0,1-8.48-8.48L119.52,128,91.76,100.24a6,6,0,0,1,8.48-8.48L128,119.52l27.76-27.76a6,6,0,0,1,8.48,8.48ZM230,128A102,102,0,1,1,128,26,102.12,102.12,0,0,1,230,128Zm-12,0a90,90,0,1,0-90,90A90.1,90.1,0,0,0,218,128Z`}))],[`regular`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M165.66,101.66,139.31,128l26.35,26.34a8,8,0,0,1-11.32,11.32L128,139.31l-26.34,26.35a8,8,0,0,1-11.32-11.32L116.69,128,90.34,101.66a8,8,0,0,1,11.32-11.32L128,116.69l26.34-26.35a8,8,0,0,1,11.32,11.32ZM232,128A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128Z`}))],[`thin`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M162.83,98.83,133.66,128l29.17,29.17a4,4,0,0,1-5.66,5.66L128,133.66,98.83,162.83a4,4,0,0,1-5.66-5.66L122.34,128,93.17,98.83a4,4,0,0,1,5.66-5.66L128,122.34l29.17-29.17a4,4,0,1,1,5.66,5.66ZM228,128A100,100,0,1,1,128,28,100.11,100.11,0,0,1,228,128Zm-8,0a92,92,0,1,0-92,92A92.1,92.1,0,0,0,220,128Z`}))]]),gte=(0,_.createContext)({color:`currentColor`,size:`1em`,weight:`regular`,mirrored:!1}),oi=_.forwardRef((e,t)=>{let{alt:n,color:r,size:i,weight:a,mirrored:o,children:s,weights:c,...l}=e,{color:u=`currentColor`,size:d,weight:f=`regular`,mirrored:p=!1,...m}=_.useContext(gte);return _.createElement(`svg`,{ref:t,xmlns:`http://www.w3.org/2000/svg`,width:i??d,height:i??d,fill:r??u,viewBox:`0 0 256 256`,transform:o||p?`scale(-1, 1)`:void 0,...m,...l},!!n&&_.createElement(`title`,null,n),s,c.get(a??f))});oi.displayName=`IconBase`;var si=_.forwardRef((e,t)=>_.createElement(oi,{ref:t,...e,weights:Lee}));si.displayName=`ArrowsDownUpIcon`;var ci=_.forwardRef((e,t)=>_.createElement(oi,{ref:t,...e,weights:Ree}));ci.displayName=`CaretDownIcon`;var li=_.forwardRef((e,t)=>_.createElement(oi,{ref:t,...e,weights:zee}));li.displayName=`CaretLeftIcon`;var ui=_.forwardRef((e,t)=>_.createElement(oi,{ref:t,...e,weights:Bee}));ui.displayName=`CaretLineLeftIcon`;var di=_.forwardRef((e,t)=>_.createElement(oi,{ref:t,...e,weights:Vee}));di.displayName=`CaretLineRightIcon`;var fi=_.forwardRef((e,t)=>_.createElement(oi,{ref:t,...e,weights:Hee}));fi.displayName=`CaretRightIcon`;var pi=_.forwardRef((e,t)=>_.createElement(oi,{ref:t,...e,weights:Uee}));pi.displayName=`CaretUpIcon`;var mi=_.forwardRef((e,t)=>_.createElement(oi,{ref:t,...e,weights:Wee}));mi.displayName=`CaretUpDownIcon`;var hi=_.forwardRef((e,t)=>_.createElement(oi,{ref:t,...e,weights:Gee}));hi.displayName=`CheckIcon`;var gi=_.forwardRef((e,t)=>_.createElement(oi,{ref:t,...e,weights:Kee}));gi.displayName=`CheckCircleIcon`;var _i=_.forwardRef((e,t)=>_.createElement(oi,{ref:t,...e,weights:qee}));_i.displayName=`CircleNotchIcon`;var vi=_.forwardRef((e,t)=>_.createElement(oi,{ref:t,...e,weights:Jee}));vi.displayName=`CopyIcon`;var yi=_.forwardRef((e,t)=>_.createElement(oi,{ref:t,...e,weights:Yee}));yi.displayName=`DotsThreeIcon`;var bi=_.forwardRef((e,t)=>_.createElement(oi,{ref:t,...e,weights:Xee}));bi.displayName=`DownloadIcon`;var xi=_.forwardRef((e,t)=>_.createElement(oi,{ref:t,...e,weights:Zee}));xi.displayName=`EyeIcon`;var Si=_.forwardRef((e,t)=>_.createElement(oi,{ref:t,...e,weights:Qee}));Si.displayName=`EyeClosedIcon`;var Ci=_.forwardRef((e,t)=>_.createElement(oi,{ref:t,...e,weights:$ee}));Ci.displayName=`FileArrowUpIcon`;var wi=_.forwardRef((e,t)=>_.createElement(oi,{ref:t,...e,weights:ete}));wi.displayName=`FolderIcon`;var Ti=_.forwardRef((e,t)=>_.createElement(oi,{ref:t,...e,weights:tte}));Ti.displayName=`FolderOpenIcon`;var Ei=_.forwardRef((e,t)=>_.createElement(oi,{ref:t,...e,weights:nte}));Ei.displayName=`FolderSimpleIcon`;var Di=_.forwardRef((e,t)=>_.createElement(oi,{ref:t,...e,weights:rte}));Di.displayName=`FunnelIcon`;var Oi=_.forwardRef((e,t)=>_.createElement(oi,{ref:t,...e,weights:ite}));Oi.displayName=`FunnelSimpleIcon`;var ki=_.forwardRef((e,t)=>_.createElement(oi,{ref:t,...e,weights:ate}));ki.displayName=`InfoIcon`;var Ai=_.forwardRef((e,t)=>_.createElement(oi,{ref:t,...e,weights:ote}));Ai.displayName=`LockSimpleIcon`;var ji=_.forwardRef((e,t)=>_.createElement(oi,{ref:t,...e,weights:ste}));ji.displayName=`LockSimpleOpenIcon`;var Mi=_.forwardRef((e,t)=>_.createElement(oi,{ref:t,...e,weights:cte}));Mi.displayName=`MagnifyingGlassIcon`;var Ni=_.forwardRef((e,t)=>_.createElement(oi,{ref:t,...e,weights:lte}));Ni.displayName=`MinusIcon`;var Pi=_.forwardRef((e,t)=>_.createElement(oi,{ref:t,...e,weights:ute}));Pi.displayName=`PercentIcon`;var Fi=_.forwardRef((e,t)=>_.createElement(oi,{ref:t,...e,weights:dte}));Fi.displayName=`PlusIcon`;var Ii=_.forwardRef((e,t)=>_.createElement(oi,{ref:t,...e,weights:fte}));Ii.displayName=`SortAscendingIcon`;var Li=_.forwardRef((e,t)=>_.createElement(oi,{ref:t,...e,weights:pte}));Li.displayName=`SortDescendingIcon`;var Ri=_.forwardRef((e,t)=>_.createElement(oi,{ref:t,...e,weights:mte}));Ri.displayName=`TrashIcon`;var zi=_.forwardRef((e,t)=>_.createElement(oi,{ref:t,...e,weights:hte}));zi.displayName=`UploadIcon`;var Bi=_.forwardRef((e,t)=>_.createElement(oi,{ref:t,...e,weights:ni}));Bi.displayName=`WarningIcon`;var Vi=_.forwardRef((e,t)=>_.createElement(oi,{ref:t,...e,weights:ri}));Vi.displayName=`WarningCircleIcon`;var Hi=_.forwardRef((e,t)=>_.createElement(oi,{ref:t,...e,weights:ii}));Hi.displayName=`XIcon`;var Ui=_.forwardRef((e,t)=>_.createElement(oi,{ref:t,...e,weights:ai}));Ui.displayName=`XCircleIcon`;var _te=({className:e,children:t,ref:n,...r})=>(0,L.jsx)($t,{className:Q(``,e),ref:n,...r,children:(0,L.jsxs)(Nn,{"data-slot":`accordion-trigger`,className:Q(`group flex w-full items-center justify-between hover:cursor-pointer`),children:[(0,L.jsx)(`div`,{"data-slot":`accordion-content`,className:`grid auto-rows-min items-center has-data-[slot=accordion-icon]:grid-cols-[auto_1fr] has-data-[slot=accordion-subtitle]:grid-rows-[auto_auto] has-data-[slot=accordion-subtitle]:**:data-[slot=accordion-icon]:row-span-2`,children:t}),(0,L.jsx)(ci,{"data-slot":`accordion-down-icon`,className:`ml-auto shrink-0 text-on-surface-variant transition-transform duration-200 ease-out group-data-panel-open:rotate-180`,weight:`bold`})]})}),vte=({size:e,tone:t,className:n,children:r,ref:i,...a})=>(0,L.jsx)(Qt,{className:Q(aee({className:n,tone:t,size:e})),ref:i,...a,children:r}),yte=({className:e,children:t,ref:n,...r})=>(0,L.jsx)(Zn,{className:Q(`h-(--accordion-panel-height) overflow-hidden transition-all duration-300 ease-out data-ending-style:h-[0px] data-starting-style:h-[0px]`,e),"data-panel":!0,ref:n,...r,children:(0,L.jsx)(`div`,{className:`px-md pb-sm`,children:t})}),bte=({className:e,children:t,ref:n,...r})=>(0,L.jsx)(`div`,{"data-slot":`accordion-subtitle`,className:Q(`text-left transition-colors`,e),ref:n,...r,children:t}),xte=({className:e,children:t,ref:n,...r})=>(0,L.jsx)(`div`,{"data-slot":`accordion-title`,className:Q(`text-left transition-colors [&:not(:has(~_[data-slot=accordion-subtitle]))]:leading-0`,e),ref:n,...r,children:t}),Ste=({className:e,children:t,ref:n,...r})=>(0,L.jsx)(`div`,{"data-slot":`accordion-icon`,className:Q(`col-start-1 row-start-1 self-center transition-colors`,e),ref:n,...r,children:t}),Cte=nr(`group grid auto-rows-min items-center justify-start gap-x-xs rounded-xl border p-xs transition-all has-data-[slot=alert-action]:grid-cols-[1fr_auto] has-data-[slot=alert-description]:grid-rows-[auto_auto] has-data-[slot=alert-icon]:grid-cols-[auto_1fr] has-data-[slot=alert-icon]:has-data-[slot=alert-action]:grid-cols-[auto_1fr_auto] has-data-[slot=alert-description]:**:data-[slot=alert-icon]:row-span-2`,{variants:{tone:{brand:`border-brand-border bg-brand-container [&_[data-slot=alert-description]]:text-brand-on-container-muted [&_[data-slot=alert-icon]]:text-brand-on-container [&_[data-slot=alert-title]]:text-brand-on-container`,accent:`border-accent-border bg-accent-container [&_[data-slot=alert-description]]:text-accent-on-container-muted [&_[data-slot=alert-icon]]:text-accent-on-container [&_[data-slot=alert-title]]:text-accent-on-container`,neutral:`border-neutral-border bg-neutral-container [&_[data-slot=alert-description]]:text-neutral-on-container-muted [&_[data-slot=alert-icon]]:text-neutral-on-container [&_[data-slot=alert-title]]:text-neutral-on-container`,error:`border-error-border bg-error-container [&_[data-slot=alert-description]]:text-error-on-container-muted [&_[data-slot=alert-icon]]:text-error-on-container [&_[data-slot=alert-title]]:text-error-on-container`,info:`border-info-border bg-info-container [&_[data-slot=alert-description]]:text-info-on-container-muted [&_[data-slot=alert-icon]]:text-info-on-container [&_[data-slot=alert-title]]:text-info-on-container`,success:`border-success-border bg-success-container [&_[data-slot=alert-description]]:text-success-on-container-muted [&_[data-slot=alert-icon]]:text-success-on-container [&_[data-slot=alert-title]]:text-success-on-container`,warning:`border-warning-border bg-warning-container [&_[data-slot=alert-description]]:text-warning-on-container-muted [&_[data-slot=alert-icon]]:text-warning-on-container [&_[data-slot=alert-title]]:text-warning-on-container`}},defaultVariants:{tone:`brand`}}),Wi=({tone:e,className:t,children:n,ref:r,...i})=>(0,L.jsx)(`div`,{className:Q(Cte({tone:e,className:t})),ref:r,...i,children:n}),Gi=({className:e,children:t,ref:n,...r})=>(0,L.jsx)(`div`,{"data-slot":`alert-description`,className:Q(`style-text-prose--1`,e),ref:n,...r,children:t}),wte=({className:e,children:t,ref:n,...r})=>(0,L.jsx)(`div`,{"data-slot":`alert-title`,className:Q(`flex items-center gap-2xs style-text-strong-0 [&:not(:has(~_[data-slot=alert-description]))]:leading-0`,e),ref:n,...r,children:t}),Tte=({className:e,children:t,ref:n,...r})=>(0,L.jsx)(`div`,{"data-slot":`alert-action`,className:Q(`col-[-2/-1] row-span-2 row-start-1 ml-md self-start`,e),ref:n,...r,children:t}),Ki=({className:e,children:t,ref:n,...r})=>(0,L.jsx)(`div`,{"data-slot":`alert-icon`,className:Q(`col-start-1 row-start-1 self-start transition-colors [&>svg]:size-md`,e),ref:n,...r,children:t});function Ete(){if(typeof navigator>`u`)return{userAgent:``,platform:``,maxTouchPoints:0};if(process.env.NODE_ENV!==`production`){let e=navigator.userAgentData;if(e&&Array.isArray(e.brands))return{userAgent:e.brands.map(({brand:e,version:t})=>`${e}/${t}`).join(` `),platform:e.platform??navigator.platform??``,maxTouchPoints:navigator.maxTouchPoints??0}}return{userAgent:navigator.userAgent,platform:navigator.platform??``,maxTouchPoints:navigator.maxTouchPoints??0}}var{userAgent:Dte,platform:Ote,maxTouchPoints:kte}=Ete(),qi=Dte.toLowerCase(),Ji=Ote.toLowerCase(),Yi=/^i(os$|p)/.test(Ji)||Ji===`macintel`&&kte>1,Xi=`android`,Zi=Ji===Xi||qi.includes(Xi),Qi=!Yi&&Ji.startsWith(`mac`);Ji.startsWith(`win`),!Zi&&/^(linux|chrome os)/.test(Ji);var $i=Qi||Yi,ea=typeof CSS<`u`&&!!CSS.supports?.(`-webkit-backdrop-filter:none`),ta=!ea&&qi.includes(`firefox`);!ea&&qi.includes(`chrom`);var na=$i,ra=/jsdom|happydom/.test(qi),ia=0,aa=class e{static create(){return new e}currentId=ia;start(e,t){this.clear(),this.currentId=setTimeout(()=>{this.currentId=ia,t()},e)}isStarted(){return this.currentId!==ia}clear=()=>{this.currentId!==ia&&(clearTimeout(this.currentId),this.currentId=ia)};disposeEffect=()=>this.clear};function oa(){let e=S(aa.create).current;return wt(e.disposeEffect),e}var sa={},ca={},la=``;function ua(e,t){return ln(e)?e:t}function da(e,t,n){return/hidden|clip/.test(e.getComputedStyle(ua(t,n)).overflowY)}function fa(e){if(typeof document>`u`)return!1;let t=kn(e);return nn(t).innerWidth-t.documentElement.clientWidth>0}function pa(e){if(!(typeof CSS<`u`&&CSS.supports&&CSS.supports(`scrollbar-gutter`,`stable`))||typeof document>`u`)return!1;let t=kn(e),n=t.documentElement,r=t.body,i=ua(n,r),a=i.style.overflowY,o=n.style.scrollbarGutter;n.style.scrollbarGutter=`stable`,i.style.overflowY=`scroll`;let s=i.offsetWidth;i.style.overflowY=`hidden`;let c=i.offsetWidth;return i.style.overflowY=a,n.style.scrollbarGutter=o,s===c}function Ate(e){let t=kn(e),n=t.documentElement,r=t.body,i=ua(n,r),a={overflowY:i.style.overflowY,overflowX:i.style.overflowX};return Object.assign(i.style,{overflowY:`hidden`,overflowX:`hidden`}),()=>{Object.assign(i.style,a)}}function jte(e){let t=kn(e),n=t.documentElement,r=t.body,i=nn(n),a=0,o=0,s=!1,c=Ot.create();if(ea&&(i.visualViewport?.scale??1)!==1)return()=>{};function l(){let t=i.getComputedStyle(n),c=i.getComputedStyle(r),l=(t.scrollbarGutter||``).includes(`both-edges`)?`stable both-edges`:`stable`;a=n.scrollTop,o=n.scrollLeft,sa={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},la=n.style.scrollBehavior,ca={position:r.style.position,height:r.style.height,width:r.style.width,boxSizing:r.style.boxSizing,overflowY:r.style.overflowY,overflowX:r.style.overflowX,scrollBehavior:r.style.scrollBehavior};let u=n.scrollHeight>n.clientHeight,d=n.scrollWidth>n.clientWidth,f=t.overflowY===`scroll`||c.overflowY===`scroll`,p=t.overflowX===`scroll`||c.overflowX===`scroll`,m=Math.max(0,i.innerWidth-r.clientWidth),h=Math.max(0,i.innerHeight-r.clientHeight),g=parseFloat(c.marginTop)+parseFloat(c.marginBottom),_=parseFloat(c.marginLeft)+parseFloat(c.marginRight),v=ua(n,r);if(s=pa(e),s){n.style.scrollbarGutter=l,v.style.overflowY=`hidden`,v.style.overflowX=`hidden`;return}Object.assign(n.style,{scrollbarGutter:l,overflowY:`hidden`,overflowX:`hidden`}),(u||f)&&(n.style.overflowY=`scroll`),(d||p)&&(n.style.overflowX=`scroll`),Object.assign(r.style,{position:`relative`,height:g||h?`calc(100dvh - ${g+h}px)`:`100dvh`,width:_||m?`calc(100vw - ${_+m}px)`:`100vw`,boxSizing:`border-box`,overflowY:`hidden`,overflowX:`hidden`,scrollBehavior:`unset`}),r.scrollTop=a,r.scrollLeft=o,n.setAttribute(`data-base-ui-scroll-locked`,``),n.style.scrollBehavior=`unset`}function u(){Object.assign(n.style,sa),Object.assign(r.style,ca),s||(n.scrollTop=a,n.scrollLeft=o,n.removeAttribute(`data-base-ui-scroll-locked`),n.style.scrollBehavior=la)}function d(){u(),c.request(l)}l();let f=Pn(i,`resize`,d);return()=>{c.cancel(),u(),typeof i.removeEventListener==`function`&&f()}}var Mte=new class{lockCount=0;restore=null;timeoutLock=aa.create();timeoutUnlock=aa.create();acquire(e){return this.lockCount+=1,this.lockCount===1&&this.restore===null&&this.timeoutLock.start(0,()=>this.lock(e)),this.release}release=()=>{--this.lockCount,this.lockCount===0&&this.restore&&this.timeoutUnlock.start(0,this.unlock)};unlock=()=>{this.lockCount===0&&this.restore&&(this.restore?.(),this.restore=null)};lock(e){if(this.lockCount===0||this.restore!==null)return;let t=kn(e),n=t.documentElement,r=t.body,i=nn(n);if(da(i,n,r)){let t=new i.MutationObserver(()=>{da(i,n,r)||(t.disconnect(),this.restore=null,this.lock(e))}),a={attributes:!0};t.observe(n,a),t.observe(r,a),this.restore=()=>t.disconnect();return}let a=Yi||!fa(e);this.restore=a?Ate(e):jte(e)}};function ma(e=!0,t=null){M(()=>{if(e)return Mte.acquire(t)},[e,t])}function ha(e){e.preventDefault(),e.stopPropagation()}function Nte(e){return`nativeEvent`in e}function ga(e){return e.pointerType===``&&e.isTrusted?!0:Zi&&e.pointerType?e.type===`click`&&e.buttons===1:e.detail===0&&!e.pointerType}function _a(e){return ra?!1:!Zi&&e.width===0&&e.height===0||Zi&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType===`mouse`||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType===`touch`}function va(e,t){let n=[`mouse`,`pen`];return t||n.push(``,void 0),n.includes(e)}function Pte(e){let t=e.type;return t===`click`||t===`mousedown`||t===`keydown`||t===`keyup`}function ya(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function ba(e,t){if(!e||!t)return!1;let n=t.getRootNode?.();if(e.contains(t))return!0;if(n&&cn(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function xa(e){return`composedPath`in e?e.composedPath()[0]??e.target:e.target}var Fte=`data-base-ui-focusable`,Ite=`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`,Sa=`ArrowLeft`,Ca=`ArrowRight`,Lte=`ArrowUp`,Rte=`ArrowDown`,zte=`data-open`,Bte=`data-closed`,Vte=`data-anchor-hidden`,wa=`data-popup-open`,Hte=`data-pressed`,Ute={[wa]:``},Wte={[wa]:``,[Hte]:``},Gte={[zte]:``},Kte={[Bte]:``},qte={[Vte]:``},Ta={open(e){return e?Ute:null}},Ea={open(e){return e?Wte:null}},Da={open(e){return e?Gte:Kte},anchorHidden(e){return e?qte:null}},Oa={...Da,...Vt},ka=`data-trigger-disabled`;function Aa(e,t){if(!on(e))return!1;let n=e;if(t.hasElement(n))return!n.hasAttribute(ka);for(let[,e]of t.entries())if(ba(e,n))return!e.hasAttribute(ka);return!1}function ja(e,t){if(t==null)return!1;if(`composedPath`in e)return e.composedPath().includes(t);let n=e;return n.target!=null&&t.contains(n.target)}function Jte(e){return e.matches(`html,body`)}function Ma(e){return sn(e)&&e.matches(`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`)}function Na(e){return e?.closest(`button,a[href],[role="button"],select,[tabindex]:not([tabindex="-1"]),${Ite}`)!=null}function Pa(e){return e?e.getAttribute(`role`)===`combobox`&&Ma(e):!1}function Fa(e){if(!e||ra)return!0;try{return e.matches(`:focus-visible`)}catch{return!0}}function Ia(e){return e?e.hasAttribute(`data-base-ui-focusable`)?e:e.querySelector(`[data-base-ui-focusable]`)||e:null}function Yte(e,t){return t!=null&&!va(t)?0:typeof e==`function`?e():e}function La(e,t,n){let r=Yte(e,n);return typeof r==`number`?r:r?.[t]}function Ra(e){return typeof e==`function`?e():e}function za(e,t){return t||e===`click`||e===`mousedown`}function Xte(e){return e?.includes(`mouse`)&&e!==`mousedown`}var Ba=_.createContext({hasProvider:!1,timeoutMs:0,delayRef:{current:0},initialDelayRef:{current:0},timeout:new aa,currentIdRef:{current:null},currentContextRef:{current:null}});process.env.NODE_ENV!==`production`&&(Ba.displayName=`FloatingDelayGroupContext`);function Zte(e,t){e.current=t.current}function Qte(e){let{children:t,delay:n,timeoutMs:r=0}=e,i=_.useRef(n),a=_.useRef(n),o=_.useRef(null),s=_.useRef(null),c=oa();return M(()=>{if(a.current=n,!o.current){i.current=n;return}i.current={open:La(i.current,`open`),close:La(n,`close`)}},[n,o,i,a]),(0,L.jsx)(Ba.Provider,{value:_.useMemo(()=>({hasProvider:!0,delayRef:i,initialDelayRef:a,currentIdRef:o,timeoutMs:r,currentContextRef:s,timeout:c}),[r,c]),children:t})}function $te(e,t={open:!1}){let{open:n}=t,r=`rootStore`in e?e.rootStore:e,i=r.useState(`floatingId`),{currentIdRef:a,delayRef:o,timeoutMs:s,initialDelayRef:c,currentContextRef:l,hasProvider:u,timeout:d}=_.useContext(Ba),[f,p]=_.useState(!1),m=_.useRef(n);return M(()=>{m.current=n},[n]),M(()=>{function e(){l.current?.setIsInstantPhase(!1),a.current=null,l.current=null,o.current=c.current,d.clear()}if(a.current&&!n&&a.current===i){if(p(!1),s){let t=i;return d.start(s,()=>{r.select(`open`)||a.current&&a.current!==t||e()}),()=>{(m.current||a.current!==t)&&d.clear()}}e()}},[n,i,a,o,s,c,l,d,r]),M(()=>{if(!n)return;let e=l.current,t=a.current;d.clear(),l.current={onOpenChange:r.setOpen,setIsInstantPhase:p},a.current=i,o.current={open:0,close:La(c.current,`close`)},t!==null&&t!==i?(p(!0),e?.setIsInstantPhase(!0),e?.onOpenChange(!1,Z(Ue))):(p(!1),e?.setIsInstantPhase(!1))},[n,i,r,a,o,c,l,d]),M(()=>()=>{if(a.current===i){if(l.current=null,!m.current)return;a.current=null,Zte(o,c),d.clear()}},[l,a,o,i,c,d]),_.useMemo(()=>({activeIdRef:a,hasProvider:u,delayRef:o,isInstantPhase:f}),[a,u,o,f])}function Va(...e){return()=>{for(let t=0;t<e.length;t+=1){let n=e[t];n&&n()}}}var Ha={clipPath:`inset(50%)`,overflow:`hidden`,whiteSpace:`nowrap`,border:0,padding:0,width:1,height:1,margin:-1},Ua={...Ha,position:`fixed`,top:0,left:0},Wa={...Ha,position:`absolute`},Ga=_.forwardRef(function(e,t){let[n,r]=_.useState();M(()=>{na&&ea&&r(`button`)},[]);let i={tabIndex:0,role:n};return(0,L.jsx)(`span`,{...e,ref:t,style:Ua,"aria-hidden":!n||void 0,...i,"data-base-ui-focus-guard":``})});process.env.NODE_ENV!==`production`&&(Ga.displayName=`FocusGuard`);var Ka=Math.min,qa=Math.max,Ja=Math.round,Ya=Math.floor,Xa=e=>({x:e,y:e}),Za={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function Qa(e,t,n){return qa(e,Ka(t,n))}function $a(e,t){return typeof e==`function`?e(t):e}function eo(e){return e.split(`-`)[0]}function to(e){return e.split(`-`)[1]}function no(e){return e===`x`?`y`:`x`}function ro(e){return e===`y`?`height`:`width`}function io(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function ao(e){return no(io(e))}function oo(e,t,n){n===void 0&&(n=!1);let r=to(e),i=ao(e),a=ro(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=go(o)),[o,go(o)]}function so(e){let t=go(e);return[co(e),t,co(t)]}function co(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var lo=[`left`,`right`],uo=[`right`,`left`],fo=[`top`,`bottom`],po=[`bottom`,`top`];function mo(e,t,n){switch(e){case`top`:case`bottom`:return n?t?uo:lo:t?lo:uo;case`left`:case`right`:return t?fo:po;default:return[]}}function ho(e,t,n,r){let i=to(e),a=mo(eo(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(co)))),a}function go(e){let t=eo(e);return Za[t]+e.slice(t.length)}function _o(e){return{top:e.top??0,right:e.right??0,bottom:e.bottom??0,left:e.left??0}}function vo(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:_o(e)}function yo(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function bo(e,t,n){return Math.floor(e/t)!==n}function xo(e,t){return t<0||t>=e.length}function So(e,t){return wo(e.current,{disabledIndices:t})}function Co(e,t){return wo(e.current,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function wo(e,{startingIndex:t=-1,decrement:n=!1,disabledIndices:r,amount:i=1}={}){let a=t;do a+=n?-i:i;while(a>=0&&a<=e.length-1&&Eo(e,a,r));return a}function To(e,{event:t,orientation:n,loopFocus:r,onLoop:i,rtl:a,cols:o,disabledIndices:s,minIndex:c,maxIndex:l,prevIndex:u,stopEvent:d=!1}){let f=u,p;if(t.key===`ArrowUp`?p=`up`:t.key===`ArrowDown`&&(p=`down`),p){let n=[],a=[],m=!1,h=0;{let t=null,r=-1;e.forEach((e,i)=>{if(e==null)return;h+=1;let o=e.closest(`[role="row"]`);o&&(m=!0),(o!==t||r===-1)&&(t=o,r+=1,n[r]=[]),n[r].push(i),a[i]=r})}let g=!1,_=0;if(m)for(let e of n){let t=e.length;t>_&&(_=t),t!==o&&(g=!0)}let v=g&&h<e.length,y=_||o,b=o=>{if(!g||u===-1)return;let c=a[u];if(c==null)return;let l=n[c].indexOf(u),d=o===`up`?-1:1;for(let o=c+d,f=0;f<n.length;f+=1,o+=d){if(o<0||o>=n.length){if(!r||v)return;if(o=o<0?n.length-1:0,i){let e=Math.min(l,n[o].length-1),r=i(t,u,n[o][e]??n[o][0]);o=a[r]??o}}let c=n[o];for(let t=Math.min(l,c.length-1);t>=0;--t){let n=c[t];if(!Eo(e,n,s))return n}}},x=t=>{if(!v||u===-1)return;let n=u%y,i=t===`up`?-y:y,a=l-l%y,o=Ya(l/y)+1;for(let t=u-n+i,c=0;c<o;c+=1,t+=i){if(t<0||t>l){if(!r)return;t=t<0?a:0}let i=Math.min(t+y-1,l);for(let r=Math.min(t+n,i);r>=t;--r)if(!Eo(e,r,s))return r}};d&&ha(t);let S=b(p)??x(p);if(S!==void 0)f=S;else if(u===-1)f=p===`up`?l:c;else if(f=wo(e,{startingIndex:u,amount:y,decrement:p===`up`,disabledIndices:s}),r){if(p===`up`&&(u-y<c||f<0)){let e=u%y,n=l%y,r=l-(n-e);f=n===e?l:n>e?r:r-y,i&&(f=i(t,u,f))}p===`down`&&u+y>l&&(f=wo(e,{startingIndex:u%y-y,amount:y,disabledIndices:s}),i&&(f=i(t,u,f)))}xo(e,f)&&(f=u)}if(n===`both`){let n=Ya(u/o);t.key===(a?`ArrowLeft`:`ArrowRight`)&&(d&&ha(t),u%o===o-1?r&&(f=wo(e,{startingIndex:u-u%o-1,disabledIndices:s}),i&&(f=i(t,u,f))):(f=wo(e,{startingIndex:u,disabledIndices:s}),r&&bo(f,o,n)&&(f=wo(e,{startingIndex:u-u%o-1,disabledIndices:s}),i&&(f=i(t,u,f)))),bo(f,o,n)&&(f=u)),t.key===(a?`ArrowRight`:`ArrowLeft`)&&(d&&ha(t),u%o===0?r&&(f=wo(e,{startingIndex:u+(o-u%o),decrement:!0,disabledIndices:s}),i&&(f=i(t,u,f))):(f=wo(e,{startingIndex:u,decrement:!0,disabledIndices:s}),r&&bo(f,o,n)&&(f=wo(e,{startingIndex:u+(o-u%o),decrement:!0,disabledIndices:s}),i&&(f=i(t,u,f)))),bo(f,o,n)&&(f=u));let c=Ya(l/o)===n;xo(e,f)&&(r&&c?(f=t.key===(a?`ArrowRight`:`ArrowLeft`)?l:wo(e,{startingIndex:u-u%o-1,disabledIndices:s}),i&&(f=i(t,u,f))):f=u)}return f}function Eo(e,t,n){if(typeof n==`function`?n(t):n?.includes(t)??!1)return!0;let r=e[t];return r?!Oo(r)||r.matches(`:disabled`)?!0:!n&&(r.hasAttribute(`disabled`)||r.getAttribute(`aria-disabled`)===`true`):!1}function Do(e){return e.visibility===`hidden`||e.visibility===`collapse`}function Oo(e,t=e?bn(e):null){return!e||!e.isConnected||!t||Do(t)?!1:typeof e.checkVisibility==`function`?e.checkVisibility():t.display!==`none`&&t.display!==`contents`}var ko=`a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable="false"]),audio[controls],video[controls]`;function Ao(e){let t=e.assignedSlot;if(t)return t;if(e.parentElement)return e.parentElement;let n=e.getRootNode();return cn(n)?n.host:null}function jo(e){for(let t of Array.from(e.children))if(tn(t)===`summary`)return t;return null}function Mo(e,t){let n=jo(t);return!!n&&(e===n||ba(n,e))}function No(e){let t=e?tn(e):``;return e!=null&&e.matches(ko)&&(t!==`summary`||e.parentElement!=null&&tn(e.parentElement)===`details`&&jo(e.parentElement)===e)&&(t!==`details`||jo(e)==null)&&(t!==`input`||e.type!==`hidden`)}function Po(e){if(!No(e)||!e.isConnected||e.matches(`:disabled`))return!1;for(let t=e;t;t=Ao(t)){let n=t!==e,r=tn(t)===`slot`;if(t.hasAttribute(`inert`)||n&&tn(t)===`details`&&!t.open&&!Mo(e,t)||t.hasAttribute(`hidden`)||!r&&!Fo(t,n))return!1}return!0}function Fo(e,t){let n=bn(e);return t?n.display!==`none`:Oo(e,n)}function Io(e){let t=e.tabIndex;if(t<0){let t=tn(e);if(t===`details`||t===`audio`||t===`video`||sn(e)&&e.isContentEditable)return 0}return t}function Lo(e){if(tn(e)!==`input`)return null;let t=e;return t.type===`radio`&&t.name!==``?t:null}function Ro(e,t){let n=Lo(e);if(!n)return!0;let r=t.find(e=>{let t=Lo(e);return t?.name===n.name&&t.form===n.form&&t.checked});return r?r===n:t.find(e=>{let t=Lo(e);return t?.name===n.name&&t.form===n.form})===n}function zo(e){if(sn(e)&&tn(e)===`slot`){let t=e.assignedElements({flatten:!0});if(t.length>0)return t}return sn(e)&&e.shadowRoot?Array.from(e.shadowRoot.children):Array.from(e.children)}function Bo(e,t){zo(e).forEach(e=>{No(e)&&t.push(e),Bo(e,t)})}function Vo(e,t,n){zo(e).forEach(e=>{sn(e)&&e.matches(t)&&n.push(e),Vo(e,t,n)})}function Ho(e){return Po(e)&&Io(e)>=0}function Uo(e){let t=[];return Bo(e,t),t.filter(Po)}function Wo(e){let t=Uo(e);return t.filter(e=>Io(e)>=0&&Ro(e,t))}function Go(e,t){let n=Wo(e),r=n.length;if(r===0)return;let i=ya(kn(e)),a=n.indexOf(i);return n[a===-1?t===1?0:r-1:a+t]}function Ko(e){return Go(kn(e).body,1)||e}function qo(e){return Go(kn(e).body,-1)||e}function Jo(e,t){if(!e)return null;let n=Wo(kn(e).body),r=n.length;if(r===0)return null;let i=n.indexOf(e);return i===-1?null:n[(i+t+r)%r]}function Yo(e){return Jo(e,1)}function Xo(e){return Jo(e,-1)}function Zo(e,t){let n=t||e.currentTarget,r=e.relatedTarget;return!r||!ba(n,r)}function Qo(e){Wo(e).forEach(e=>{e.dataset.tabindex=e.getAttribute(`tabindex`)||``,e.setAttribute(`tabindex`,`-1`)})}function $o(e){let t=[];Vo(e,`[data-tabindex]`,t),t.forEach(e=>{let t=e.dataset.tabindex;delete e.dataset.tabindex,t?e.setAttribute(`tabindex`,t):e.removeAttribute(`tabindex`)})}function es(e,t,n=!0){return e.filter(e=>e.parentId===t).flatMap(t=>[...!n||t.context?.open?[t]:[],...es(e,t.id,n)])}function ts(e,t){let n=[],r=e.find(e=>e.id===t)?.parentId;for(;r;){let t=e.find(e=>e.id===r);r=t?.parentId,t&&(n=n.concat(t))}return n}function ns(e){return`data-base-ui-${e}`}var rs=0;function is(e,t={}){let{preventScroll:n=!1,sync:r=!1,shouldFocus:i}=t;cancelAnimationFrame(rs);function a(){(!i||i())&&e?.focus({preventScroll:n})}if(r)return a(),k;let o=requestAnimationFrame(a);return rs=o,()=>{rs===o&&(cancelAnimationFrame(o),rs=0)}}var as={inert:new WeakMap,"aria-hidden":new WeakMap},os=`data-base-ui-inert`,ss={inert:new WeakSet,"aria-hidden":new WeakSet},cs=new WeakMap,ls=0;function ene(e){return ss[e]}function us(e){return e?cn(e)?e.host:us(e.parentNode):null}var ds=(e,t)=>t.map(t=>{if(e.contains(t))return t;let n=us(t);return e.contains(n)?n:null}).filter(e=>e!=null),fs=e=>{let t=new Set;return e.forEach(e=>{let n=e;for(;n&&!t.has(n);)t.add(n),n=n.parentNode}),t},ps=(e,t,n)=>{let r=[],i=e=>{e&&!n.has(e)&&Array.from(e.children).forEach(e=>{tn(e)!==`script`&&(t.has(e)?i(e):r.push(e))})};return i(e),r};function tne(e,t,n,r,{mark:i=!0}){let a=null;r?a=`inert`:n&&(a=`aria-hidden`);let o=null,s=null,c=ds(t,e),l=i?ps(t,fs(c),new Set(c)):[],u=[],d=[];if(a){let e=as[a],n=ene(a);s=n,o=e;let r=ds(t,Array.from(t.querySelectorAll(`[aria-live]`))),i=c.concat(r);ps(t,fs(i),new Set(i)).forEach(t=>{let r=t.getAttribute(a),i=r!==null&&r!==`false`,o=(e.get(t)||0)+1;e.set(t,o),u.push(t),o===1&&i&&n.add(t),i||t.setAttribute(a,a===`inert`?``:`true`)})}return i&&l.forEach(e=>{let t=(cs.get(e)||0)+1;cs.set(e,t),d.push(e),t===1&&e.setAttribute(os,``)}),ls+=1,()=>{o&&u.forEach(e=>{let t=(o.get(e)||0)-1;o.set(e,t),t||(!s?.has(e)&&a&&e.removeAttribute(a),s?.delete(e))}),i&&d.forEach(e=>{let t=(cs.get(e)||0)-1;cs.set(e,t),t||e.removeAttribute(os)}),--ls,ls||(as.inert=new WeakMap,as[`aria-hidden`]=new WeakMap,ss.inert=new WeakSet,ss[`aria-hidden`]=new WeakSet,cs=new WeakMap)}}function ms(e,t={}){let{ariaHidden:n=!1,inert:r=!1,mark:i=!0}=t,a=kn(e[0]).body;return tne(e,a,n,r,{mark:i})}var nne={style:{transition:`none`}},hs=`data-base-ui-click-trigger`,rne=`data-base-ui-swipe-ignore`,ine=`data-swipe-ignore`,gs=`[${rne}]`,ane=`[${ine}]`,_s={fallbackAxisSide:`none`},vs={fallbackAxisSide:`end`},ys={clipPath:`inset(50%)`,position:`fixed`,top:0,left:0},bs=_.createContext(null);process.env.NODE_ENV!==`production`&&(bs.displayName=`PortalContext`);var xs=()=>_.useContext(bs),one=ns(`portal`);function Ss(e={}){let{ref:t,container:n,componentProps:r=j,elementProps:i}=e,a=Ve(),o=xs()?.portalNode,[s,c]=_.useState(null),[l,u]=_.useState(null),d=T(e=>{e!==null&&u(e)}),f=_.useRef(null);M(()=>{if(n===null){f.current&&(f.current=null,u(null),c(null));return}let e=(n&&(an(n)?n:n.current))??o??document.body;if(e==null){f.current&&(f.current=null,u(null),c(null));return}f.current!==e&&(f.current=e,u(null),c(e))},[n,o]);let p=X(`div`,r,{ref:[t,d],props:[{id:a,[one]:``},i]}),m=s&&p?Rn.createPortal(p,s):null;return{node:l,nodeId:_.isValidElement(p)?p.props.id:void 0,subtree:m}}var Cs=_.forwardRef(function(e,t){let{render:n,className:r,style:i,children:a,container:o,portalOwnerRole:s,...c}=e,{node:l,nodeId:u,subtree:d}=Ss({container:o,ref:t,componentProps:e,elementProps:c}),f=_.useRef(null),p=_.useRef(null),m=_.useRef(null),h=_.useRef(null),[g,v]=_.useState(null),y=_.useRef(!1),b=g?.modal,x=g?.open,S=!!g&&!g.modal&&g.open&&!!l;_.useEffect(()=>{if(!l||b)return;function e(e){l&&e.relatedTarget&&Zo(e)&&(e.type===`focusin`?y.current&&=($o(l),!1):(Qo(l),y.current=!0))}return Va(Pn(l,`focusin`,e,!0),Pn(l,`focusout`,e,!0))},[l,b]),M(()=>{l&&x===!0&&y.current&&($o(l),y.current=!1)},[x,l]);let C=_.useMemo(()=>({beforeOutsideRef:f,afterOutsideRef:p,beforeInsideRef:m,afterInsideRef:h,portalNode:l,setFocusManagerState:v}),[l]);return(0,L.jsxs)(_.Fragment,{children:[d,(0,L.jsxs)(bs.Provider,{value:C,children:[S&&l&&(0,L.jsx)(Ga,{"data-type":`outside`,ref:f,onFocus:e=>{Zo(e,l)?m.current?.focus():qo(g?g.domReference:null)?.focus()}}),S&&l&&(0,L.jsx)(`span`,{role:s,"aria-owns":u,style:ys}),l&&Rn.createPortal(a,l),S&&l&&(0,L.jsx)(Ga,{"data-type":`outside`,ref:p,onFocus:e=>{Zo(e,l)?h.current?.focus():(Ko(g?g.domReference:null)?.focus(),g?.closeOnFocusOut&&g?.onOpenChange(!1,Z(`focus-out`,e.nativeEvent)))}})]})]})});process.env.NODE_ENV!==`production`&&(Cs.displayName=`FloatingPortal`);function ws(){let e=new Map;return{emit(t,n){e.get(t)?.forEach(e=>e(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){e.get(t)?.delete(n)}}}var Ts=class{nodesRef={current:[]};events=ws();addNode(e){this.nodesRef.current.push(e)}removeNode(e){let t=this.nodesRef.current.findIndex(t=>t===e);t!==-1&&this.nodesRef.current.splice(t,1)}},Es=_.createContext(null);process.env.NODE_ENV!==`production`&&(Es.displayName=`FloatingNodeContext`);var Ds=_.createContext(null);process.env.NODE_ENV!==`production`&&(Ds.displayName=`FloatingTreeContext`);var Os=()=>_.useContext(Es)?.id||null,ks=e=>{let t=_.useContext(Ds);return e??t};function As(e){let t=Ve(),n=ks(e),r=Os();return M(()=>{if(!t)return;let e={id:t,parentId:r};return n?.addNode(e),()=>{n?.removeNode(e)}},[n,t,r]),t}function js(e){let{children:t,id:n}=e,r=Os();return(0,L.jsx)(Es.Provider,{value:_.useMemo(()=>({id:n,parentId:r}),[n,r]),children:t})}function Ms(e){let{children:t,externalTree:n}=e,r=S(()=>n??new Ts).current;return(0,L.jsx)(Ds.Provider,{value:r,children:t})}function sne(e,t){let n=nn(xa(e));return e instanceof n.KeyboardEvent?`keyboard`:e instanceof n.FocusEvent?t||`keyboard`:`pointerType`in e?e.pointerType||`keyboard`:`touches`in e?`touch`:e instanceof n.MouseEvent?t||(e.detail===0?`keyboard`:`mouse`):``}var cne=20,Ns=[];function Ps(){Ns=Ns.filter(e=>e.deref()?.isConnected)}function Fs(e){Ps(),e&&tn(e)!==`body`&&(Ns.push(new WeakRef(e)),Ns.length>cne&&(Ns=Ns.slice(-20)))}function Is(){return Ps(),Ns[Ns.length-1]?.deref()}function lne(e){return e?Ho(e)?e:Wo(e)[0]||e:null}function Ls(e){if(e.hasAttribute(`tabindex`)&&!e.hasAttribute(`data-tabindex`)||!e.getAttribute(`role`)?.includes(`dialog`))return;let t=Uo(e).filter(e=>{let t=e.getAttribute(`data-tabindex`)||``;return Ho(e)||e.hasAttribute(`data-tabindex`)&&!t.startsWith(`-`)}),n=e.getAttribute(`tabindex`);t.length===0?n!==`0`&&(e.setAttribute(`tabindex`,`0`),e.setAttribute(`data-tabindex`,`0`)):(n!==`-1`||e.hasAttribute(`data-tabindex`)&&e.getAttribute(`data-tabindex`)!==`-1`)&&(e.setAttribute(`tabindex`,`-1`),e.setAttribute(`data-tabindex`,`-1`))}function Rs(e){let{context:t,children:n,disabled:r=!1,initialFocus:i=!0,returnFocus:a=!0,restoreFocus:o=!1,modal:s=!0,closeOnFocusOut:c=!0,openInteractionType:l=``,nextFocusableElement:u,previousFocusableElement:d,beforeContentFocusGuardRef:f,externalTree:p,getInsideElements:m}=e,h=`rootStore`in t?t.rootStore:t,g=h.useState(`open`),v=h.useState(`domReferenceElement`),y=h.useState(`floatingElement`),{events:b,dataRef:x}=h.context,S=T(()=>x.current.floatingContext?.nodeId),C=i===!1,w=Pa(v)&&C,E=Fn(i),D=Fn(a),O=Fn(l),k=Fn(g),A=ks(p),j=xs(),N=_.useRef(!1),P=_.useRef(!1),F=_.useRef(!1),I=_.useRef(null),R=_.useRef(``),z=_.useRef(``),B=_.useRef(null),V=_.useRef(null),H=ee(B,f,j?.beforeInsideRef),U=ee(V,j?.afterInsideRef),W=oa(),G=oa(),K=kt(),q=j!=null,J=Ia(y),Y=T((e=J)=>e?Wo(e):[]),te=T(()=>m?.().filter(e=>e!=null)??[]);_.useEffect(()=>{if(r||!s)return;function e(e){e.key===`Tab`&&ba(J,ya(kn(J)))&&Y().length===0&&!w&&ha(e)}return Pn(kn(J),`keydown`,e)},[r,J,s,w,Y]),_.useEffect(()=>{if(r||!g)return;let e=kn(J);function t(){F.current=!1}function n(e){let t=xa(e),n=te(),r=ba(y,t)||ba(v,t)||ba(j?.portalNode,t)||n.some(e=>e===t||ba(e,t));F.current=!r,z.current=e.pointerType||`keyboard`,t?.closest(`[data-base-ui-click-trigger]`)&&(P.current=!0,G.start(0,()=>{P.current=!1}))}function i(){z.current=`keyboard`}return Va(Pn(e,`pointerdown`,n,!0),Pn(e,`pointerup`,t,!0),Pn(e,`pointercancel`,t,!0),Pn(e,`keydown`,i,!0),t)},[r,y,v,J,g,j,G,te]),_.useEffect(()=>{if(r||!c)return;let e=kn(J);function t(){P.current=!0,G.start(0,()=>{P.current=!1})}function n(e){let t=xa(e);Ho(t)&&(I.current=t)}function i(t){let n=t.relatedTarget,r=t.currentTarget,i=xa(t);s&&n==null&&i!=null&&ba(y,i)&&Fs(i),queueMicrotask(()=>{let a=S(),c=h.context.triggerElements,l=te(),f=n?.hasAttribute(ns(`focus-guard`))&&[B.current,V.current,j?.beforeInsideRef.current,j?.afterInsideRef.current,j?.beforeOutsideRef.current,j?.afterOutsideRef.current,Ln(d),Ln(u)].includes(n),p=!(ba(v,n)||ba(y,n)||ba(n,y)||ba(j?.portalNode,n)||l.some(e=>e===n||ba(e,n))||c.hasMatchingElement(e=>ba(e,n))||f||A&&(es(A.nodesRef.current,a).find(e=>ba(e.context?.elements.floating,n)||ba(e.context?.elements.domReference,n))||ts(A.nodesRef.current,a).find(e=>[e.context?.elements.floating,Ia(e.context?.elements.floating)].includes(n)||e.context?.elements.domReference===n)));if(r===v&&J&&Ls(J),o&&r!==v&&!Oo(i)&&ya(e)===e.body){if(sn(J)&&(J.focus(),o===`popup`)){K.request(()=>{J.focus()});return}let e=Y(),t=I.current,n=(t&&e.includes(t)?t:null)||e[e.length-1]||J;sn(n)&&n.focus()}if(x.current.insideReactTree){x.current.insideReactTree=!1;return}(w||!s)&&n&&p&&!P.current&&(w||n!==Is())&&(N.current=!0,h.setOpen(!1,Z(ot,t)))})}function a(){F.current||(x.current.insideReactTree=!0,W.start(0,()=>{x.current.insideReactTree=!1}))}let l=sn(v)?v:null;if(y||l)return Va(l&&Pn(l,`focusout`,i),l&&Pn(l,`pointerdown`,t),y&&Pn(y,`focusin`,n),y&&Pn(y,`focusout`,i),y&&j&&Pn(y,`focusout`,a,!0))},[r,v,y,J,s,A,j,h,c,o,Y,w,S,x,W,G,K,u,d,te]),_.useEffect(()=>{if(r||!y||!g)return;let e=Array.from(j?.portalNode?.querySelectorAll(`[${ns(`portal`)}]`)||[]),t=(A?ts(A.nodesRef.current,S()):[]).find(e=>Pa(e.context?.elements.domReference||null))?.context?.elements.domReference,n=ms([y,...e,B.current,V.current,j?.beforeOutsideRef.current,j?.afterOutsideRef.current,...te(),t,Ln(d),Ln(u),w?v:null].filter(e=>e!=null),{ariaHidden:s||w,mark:!1}),i=ms([y,...e].filter(e=>e!=null));return()=>{i(),n()}},[g,r,v,y,s,j,w,A,S,u,d,te]),M(()=>{if(!g||r||!sn(J))return;R.current=``,z.current=``;let e=kn(J),t=ya(e);queueMicrotask(()=>{let n=E.current,r=typeof n==`function`?n(O.current||``):n;if(r===void 0||r===!1||ba(J,t))return;let i=null,a=()=>(i??=Y(J),i[0]||J),o;o=r===!0||r===null?a():Ln(r),o||=a();let s=ba(J,ya(e));is(o,{preventScroll:o===J,shouldFocus(){if(!k.current)return!1;if(s)return!0;let t=ya(e);return!(t!==o&&ba(J,t))}})})},[r,g,J,Y,E,O,k]),M(()=>{if(r||!J)return;let e=kn(J),t=ya(e),n=O.current==null;Fs(t);function i(e){if(e.open||(R.current=sne(e.nativeEvent,z.current)),e.reason===`trigger-hover`&&e.nativeEvent.type===`mouseleave`&&(N.current=!0),e.reason===`outside-press`){if(e.nested)N.current=!1;else if(ga(e.nativeEvent)||_a(e.nativeEvent))N.current=!1;else{let e=!1;kn(J).createElement(`div`).focus({get preventScroll(){return e=!0,!1}}),e?N.current=!1:N.current=!0}}}b.on(`openchange`,i);function a(e){let r=D.current,i=typeof r==`function`?r(e):r;if(i===void 0||i===!1)return null;i===null&&(i=!0);let a=v?.isConnected?v:null,o=t?.isConnected&&tn(t)!==`body`?t:null,s=n?o||a:a||o;return s||=Is()||null,typeof i==`boolean`?s:Ln(i)||s||null}return()=>{b.off(`openchange`,i);let t=ya(e),n=te(),r=ba(y,t)||n.some(e=>e===t||ba(e,t))||A&&es(A.nodesRef.current,S(),!1).some(e=>ba(e.context?.elements.floating,t)),o=D.current,s=R.current,c=a(s);queueMicrotask(()=>{let n=lne(c),i=typeof o!=`boolean`;if(o&&!N.current&&sn(n)&&(i||n===t||t===e.body||r)){let e={preventScroll:!0};s===`keyboard`&&(e.focusVisible=!0),n.focus(e)}N.current=!1})}},[r,y,J,D,O,b,A,v,S,te]),M(()=>{if(!ea||g||!y)return;let e=ya(kn(y));sn(e)&&Ma(e)&&ba(y,e)&&e.blur()},[g,y]),M(()=>{if(!r&&j)return j.setFocusManagerState({modal:s,closeOnFocusOut:c,open:g,onOpenChange:h.setOpen,domReference:v}),()=>{j.setFocusManagerState(null)}},[r,j,s,g,h,c,v]),M(()=>{if(!r&&J)return Ls(J),()=>{queueMicrotask(Ps)}},[r,J]);let ne=!r&&(!s||!w)&&(q||s);return(0,L.jsxs)(_.Fragment,{children:[ne&&(0,L.jsx)(Ga,{"data-type":`inside`,ref:H,onFocus:e=>{if(s){let e=Y();is(e[e.length-1])}else j?.portalNode&&(N.current=!1,Zo(e,j.portalNode)?Ko(v)?.focus():Ln(d??j.beforeOutsideRef)?.focus())}}),n,ne&&(0,L.jsx)(Ga,{"data-type":`inside`,ref:U,onFocus:e=>{s?is(Y()[0]):j?.portalNode&&(c&&(N.current=!0),Zo(e,j.portalNode)?qo(v)?.focus():Ln(u??j.afterOutsideRef)?.focus())}})]})}function zs(e,t={}){let{enabled:n=!0,event:r=`click`,toggle:i=!0,ignoreMouse:a=!1,stickIfOpen:o=!0,touchOpenDelay:s=0,reason:c=We}=t,l=`rootStore`in e?e.rootStore:e,u=l.context.dataRef,d=_.useRef(void 0),f=kt(),p=oa(),m=_.useMemo(()=>{function e(e,t,n,r){let i=Z(c,t,n);e&&r===`touch`&&s>0?p.start(s,()=>{l.setOpen(!0,i)}):l.setOpen(e,i)}function t(e,t,n){let r=u.current.openEvent,a=l.select(`domReferenceElement`)!==t;return e&&a||!e||!i?!0:r&&o?!n(r.type):!1}return{onPointerDown(e){d.current=va(e.pointerType,!0)&&_a(e.nativeEvent)?`virtual`:e.pointerType},onMouseDown(n){let i=d.current,o=n.nativeEvent,s=l.select(`open`);if(n.button!==0||r===`click`||va(i,!0)&&a)return;let c=t(s,n.currentTarget,e=>e===`click`||e===`mousedown`),u=xa(o);if(Ma(u)){e(c,o,u,i);return}let p=n.currentTarget;f.request(()=>{e(c,o,p,i)})},onClick(n){if(r===`mousedown-only`)return;let i=d.current;if(r===`mousedown`&&i){d.current=void 0;return}va(i,!0)&&a||e(t(l.select(`open`),n.currentTarget,e=>e===`click`||e===`mousedown`||e===`keydown`||e===`keyup`),n.nativeEvent,n.currentTarget,i)},onKeyDown(){d.current=void 0}}},[u,r,a,c,l,o,i,f,p,s]);return _.useMemo(()=>n?{reference:m}:j,[n,m])}function une(e,t){let n=null,r=null,i=!1;return{contextElement:e||void 0,getBoundingClientRect(){let a=e?.getBoundingClientRect()||{width:0,height:0,x:0,y:0},o=t.axis===`x`||t.axis===`both`,s=t.axis===`y`||t.axis===`both`,c=[`mouseenter`,`mousemove`].includes(t.dataRef.current.openEvent?.type||``)&&t.pointerType!==`touch`,l=a.width,u=a.height,d=a.x,f=a.y;return n==null&&t.x&&o&&(n=a.x-t.x),r==null&&t.y&&s&&(r=a.y-t.y),d-=n||0,f-=r||0,l=0,u=0,!i||c?(l=t.axis===`y`?a.width:0,u=t.axis===`x`?a.height:0,d=o&&t.x!=null?t.x:d,f=s&&t.y!=null?t.y:f):i&&!c&&(u=t.axis===`x`?a.height:u,l=t.axis===`y`?a.width:l),i=!0,{width:l,height:u,x:d,y:f,top:f,right:d+l,bottom:f+u,left:d}}}}function Bs(e){return e!=null&&e.clientX!=null}function dne(e,t={}){let{enabled:n=!0,axis:r=`both`}=t,i=`rootStore`in e?e.rootStore:e,a=i.useState(`open`),o=i.useState(`floatingElement`),s=i.useState(`domReferenceElement`),c=i.context.dataRef,l=_.useRef(!1),u=_.useRef(null),[d,f]=_.useState(),[p,m]=_.useState([]),h=T(e=>{i.set(`positionReference`,e)}),g=T((e,t,n)=>{l.current||(!c.current.openEvent||Bs(c.current.openEvent))&&i.set(`positionReference`,une(n??s,{x:e,y:t,axis:r,dataRef:c,pointerType:d}))}),v=T(e=>{a?u.current||(g(e.clientX,e.clientY,e.currentTarget),m([])):g(e.clientX,e.clientY,e.currentTarget)}),y=va(d)?o:a;_.useEffect(()=>{if(!n){h(s);return}if(!y)return;function e(){u.current?.(),u.current=null}let t=nn(o);function r(t){let n=xa(t);ba(o,n)?e():g(t.clientX,t.clientY)}return!c.current.openEvent||Bs(c.current.openEvent)?u.current=Pn(t,`mousemove`,r):h(s),e},[y,n,o,c,s,i,g,h,p]),_.useEffect(()=>()=>{i.set(`positionReference`,null)},[i]),_.useEffect(()=>{n&&!o&&(l.current=!1)},[n,o]),_.useEffect(()=>{!n&&a&&(l.current=!0)},[n,a]);let b=_.useMemo(()=>{function e(e){f(e.pointerType)}return{onPointerDown:e,onPointerEnter:e,onMouseMove:v,onMouseEnter:v}},[v]);return _.useMemo(()=>n?{reference:b,trigger:b}:{},[n,b])}function fne(){return!1}function pne(e){return{escapeKey:typeof e==`boolean`?e:e?.escapeKey??!1,outsidePress:typeof e==`boolean`?e:e?.outsidePress??!0}}function Vs(e,t={}){let{enabled:n=!0,escapeKey:r=!0,outsidePress:i=!0,outsidePressEvent:a=`sloppy`,referencePress:o=fne,bubbles:s,externalTree:c}=t,l=`rootStore`in e?e.rootStore:e,u=l.useState(`open`),d=l.useState(`floatingElement`),{dataRef:f,events:p}=l.context,m=ks(c),h=T(typeof i==`function`?i:()=>!1),g=typeof i==`function`?h:i,v=g!==!1,y=T(()=>a),{escapeKey:b,outsidePress:x}=pne(s),S=_.useRef(!1),C=_.useRef(!1),w=_.useRef(!1),E=_.useRef(!1),D=_.useRef(!1),O=_.useRef(``),k=_.useRef(null),A=oa(),j=oa(),M=T(()=>{j.clear(),f.current.insideReactTree=!1}),N=T(e=>{let t=f.current.floatingContext?.nodeId;return(m?es(m.nodesRef.current,t):[]).some(t=>t.context?.open&&!t.context.dataRef.current[e])}),P=T(e=>ja(e,l.select(`floatingElement`))||ja(e,l.select(`domReferenceElement`))),F=T(e=>{o()&&l.setOpen(!1,Z(We,e.nativeEvent))}),I=T(e=>{if(!u||!n||!r||e.key!==`Escape`||D.current||!b&&N(`__escapeKeyBubbles`))return;let t=Z(st,Nte(e)?e.nativeEvent:e);l.setOpen(!1,t),t.isCanceled||e.preventDefault(),!b&&!t.isPropagationAllowed&&e.stopPropagation()}),L=T(()=>{f.current.insideReactTree=!0,j.start(0,M)}),R=T(e=>{if(!u||!n||e.button!==0)return;let t=xa(e.nativeEvent);ba(l.select(`floatingElement`),t)&&(S.current||(S.current=!0,C.current=!1))}),z=T(e=>{u&&n&&(e.defaultPrevented||e.nativeEvent.defaultPrevented)&&S.current&&(C.current=!0)});_.useEffect(()=>{function e(e){e.open||(E.current=!1)}return p.on(`openchange`,e),()=>{p.off(`openchange`,e)}},[p]),_.useEffect(()=>{if(!u||!n)return u||(E.current=!1),M;f.current.__escapeKeyBubbles=b,f.current.__outsidePressBubbles=x;let e=new aa,t=new aa,i=kn(d);function a(){e.clear(),D.current=!0}function o(){e.start(ea?5:0,()=>{D.current=!1})}function s(){w.current=!0,t.start(0,()=>{w.current=!1})}function c(){S.current=!1,C.current=!1}function p(){let e=O.current,t=e===`pen`||!e?`mouse`:e,n=y(),r=typeof n==`function`?n():n;return typeof r==`string`?r:r[t]}function h(e){let t=p();return t===`intentional`&&e.type!==`click`||t===`sloppy`&&e.type===`click`}function _(e){let t=f.current.floatingContext?.nodeId,n=m&&es(m.nodesRef.current,t).some(t=>ja(e,t.context?.elements.floating));return P(e)||n}function T(e){if(h(e)){e.type!==`click`&&!P(e)&&(t.clear(),w.current=!1),M();return}if(f.current.insideReactTree){M();return}let n=xa(e),r=`[${ns(`inert`)}]`,i=on(n)?n.getRootNode():null,a=Array.from((cn(i)?i:kn(l.select(`floatingElement`))).querySelectorAll(r)),o=l.context.triggerElements;if(n&&(o.hasElement(n)||o.hasMatchingElement(e=>ba(e,n))))return;let s=on(n)?n:null;for(;s&&!yn(s);){let e=Sn(s);if(yn(e)||!on(e))break;s=e}if(!(a.length&&on(n)&&!Jte(n)&&!ba(n,l.select(`floatingElement`))&&a.every(e=>!ba(s,e)))){if(sn(n)&&!(`touches`in e)){let t=yn(n),r=bn(n),i=/auto|scroll/,a=t||i.test(r.overflowX),o=t||i.test(r.overflowY),s=a&&n.clientWidth>0&&n.scrollWidth>n.clientWidth,c=o&&n.clientHeight>0&&n.scrollHeight>n.clientHeight,l=r.direction===`rtl`,u=c&&(l?e.offsetX<=n.offsetWidth-n.clientWidth:e.offsetX>n.clientWidth),d=s&&e.offsetY>n.clientHeight;if(u||d)return}if(!_(e)){if(p()===`intentional`){if(e.detail!==0&&!ga(e)&&!E.current)return;if(w.current){t.clear(),w.current=!1;return}}(typeof g!=`function`||g(e))&&(N(`__outsidePressBubbles`)||(l.setOpen(!1,Z(qe,e)),M()))}}}function j(e){p()===`sloppy`&&e.pointerType!==`touch`&&l.select(`open`)&&n&&!P(e)&&T(e)}function F(e){if(p()!==`sloppy`||!l.select(`open`)||!n||P(e))return;let t=e.touches[0];t&&(k.current={startTime:Date.now(),startX:t.clientX,startY:t.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},A.start(1e3,()=>{k.current&&(k.current.dismissOnTouchEnd=!1,k.current.dismissOnMouseDown=!1)}))}function L(e,t){let n=xa(e);if(!n)return;let r=Pn(n,e.type,()=>{t(e),r()})}function R(e){O.current=`touch`,L(e,F)}function z(e){A.clear(),e.type===`pointerdown`&&(e.button===0&&(E.current=!0),O.current=e.pointerType),(e.type!==`mousedown`||!k.current||k.current.dismissOnMouseDown)&&L(e,e=>{e.type===`pointerdown`?j(e):T(e)})}function B(e){if(e.type===`pointercancel`&&(E.current=!1),!S.current)return;let n=C.current;if(c(),p()===`intentional`){if(e.type===`pointercancel`){n&&s();return}if(!_(e)){if(n){s();return}(typeof g!=`function`||g(e))&&(t.clear(),w.current=!0,M())}}}function V(e){if(p()!==`sloppy`||!k.current||P(e))return;let t=e.touches[0];if(!t)return;let n=Math.abs(t.clientX-k.current.startX),r=Math.abs(t.clientY-k.current.startY),i=Math.sqrt(n*n+r*r);i>5&&(k.current.dismissOnTouchEnd=!0),i>10&&(T(e),A.clear(),k.current=null)}function H(e){L(e,V)}function U(e){p()===`sloppy`&&k.current&&!P(e)&&(k.current.dismissOnTouchEnd&&T(e),A.clear(),k.current=null)}function W(e){L(e,U)}let G=Va(r&&Va(Pn(i,`keydown`,I),Pn(i,`compositionstart`,a),Pn(i,`compositionend`,o)),v&&Va(Pn(i,`click`,z,!0),Pn(i,`pointerdown`,z,!0),Pn(i,`pointerup`,B,!0),Pn(i,`pointercancel`,B,!0),Pn(i,`mousedown`,z,!0),Pn(i,`mouseup`,B,!0),Pn(i,`touchstart`,R,{capture:!0,passive:!0}),Pn(i,`touchmove`,H,{capture:!0,passive:!0}),Pn(i,`touchend`,W,{capture:!0,passive:!0})));return()=>{G(),e.clear(),t.clear(),c(),w.current=!1,M()}},[f,d,r,v,g,u,n,b,x,I,M,y,N,P,m,l,A]);let B=_.useMemo(()=>({onKeyDown:I,onPointerDown:F,onClick:F}),[I,F]),V=_.useMemo(()=>({onKeyDown:I,onPointerDown:z,onMouseDown:z,onClickCapture:L,onMouseDownCapture(e){L(),R(e)},onPointerDownCapture(e){L(),R(e)},onMouseUpCapture:L,onTouchEndCapture:L,onTouchMoveCapture:L}),[I,L,R,z]);return _.useMemo(()=>n?{reference:B,floating:V,trigger:B}:{},[n,B,V])}function Hs(e,t,n){let{reference:r,floating:i}=e,a=io(t),o=ao(t),s=ro(o),c=eo(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}let m=to(t);return m&&(p[o]+=f*(m===`end`?1:-1)*(n&&l?-1:1)),p}async function mne(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=$a(t,e),p=vo(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=yo(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=yo(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var hne=50,gne=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:mne},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=Hs(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<hne&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=Hs(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},_ne=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=$a(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=eo(r),_=io(o),v=eo(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[go(o)]:so(o)),x=p!==`none`;!d&&x&&b.push(...ho(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=oo(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(u!==`alignment`||_===io(t)||T.every(e=>io(e.placement)!==_||e.overflows[0]>0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=io(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o}if(r!==n)return{reset:{placement:n}}}return{}}}},Us=new Set([`left`,`top`]);async function vne(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=eo(n),s=to(n),c=io(n)===`y`,l=Us.has(o)?-1:1,u=a&&c?-1:1,d=$a(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var yne=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await vne(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},bne=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=$a(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=io(i),p=no(f),m=u[p],h=u[f],g=(e,t)=>Qa(t+d[e===`y`?`top`:`left`],t,t-d[e===`y`?`bottom`:`right`]);o&&(m=g(p,m)),s&&(h=g(f,h));let _=c.fn({...t,[p]:m,[f]:h});return{..._,data:{x:_.x-n,y:_.y-r,enabled:{[p]:o,[f]:s}}}}}},xne=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=$a(e,t),u={x:n,y:r},d=io(i),f=no(d),p=u[f],m=u[d],h=$a(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:h.mainAxis??0,crossAxis:h.crossAxis??0};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=Us.has(eo(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},Sne=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){let{placement:n,rects:r,platform:i,elements:a}=t,{apply:o=()=>{},...s}=$a(e,t),c=await i.detectOverflow(t,s),l=eo(n),u=to(n),d=io(n)===`y`,{width:f,height:p}=r.floating,m,h;l===`top`||l===`bottom`?(m=l,h=u===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?`start`:`end`)?`left`:`right`):(h=l,m=u===`end`?`top`:`bottom`);let g=p-c.top-c.bottom,_=f-c.left-c.right,v=Ka(p-c[m],g),y=Ka(f-c[h],_),b=t.middlewareData.shift,x=!b,S=v,C=y;b!=null&&b.enabled.x&&(C=_),b!=null&&b.enabled.y&&(S=g),x&&!u&&(d?C=f-2*qa(c.left,c.right):S=p-2*qa(c.top,c.bottom)),await o({...t,availableWidth:C,availableHeight:S});let w=await i.getDimensions(a.floating);return f!==w.width||p!==w.height?{reset:{rects:!0}}:{}}}};function Ws(e){let t=bn(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=sn(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=Ja(n)!==a||Ja(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function Gs(e){return on(e)?e:e.contextElement}function Ks(e){let t=Gs(e);if(!sn(t))return Xa(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=Ws(t),o=(a?Ja(n.width):n.width)/r,s=(a?Ja(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var Cne=Xa(0);function qs(e){let t=nn(e);return!vn()||!t.visualViewport?Cne:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function wne(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===nn(e)}function Js(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=Gs(e),o=Xa(1);t&&(r?on(r)&&(o=Ks(r)):o=Ks(e));let s=wne(a,n,r)?qs(a):Xa(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a&&r){let e=nn(a),t=on(r)?nn(r):r,n=e,i=Tn(n);for(;i&&t!==n;){let e=Ks(i),t=i.getBoundingClientRect(),r=bn(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=nn(i),i=Tn(n)}}return yo({width:u,height:d,x:c,y:l})}function Ys(e,t){let n=xn(e).scrollLeft;return t?t.left+n:Js(rn(e)).left+n}function Xs(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-Ys(e,n),y:n.top+t.scrollTop}}function Tne(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=rn(r),s=t?dn(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=Xa(1),u=Xa(0),d=sn(r);if((d||!a)&&((tn(r)!==`body`||ln(o))&&(c=xn(r)),d)){let e=Js(r);l=Ks(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?Xs(o,c):Xa(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function Ene(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function Dne(e){let t=xn(e),n=e.ownerDocument.body,r=qa(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=qa(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),a=-t.scrollLeft+Ys(e),o=-t.scrollTop;return bn(n).direction===`rtl`&&(a+=qa(e.clientWidth,n.clientWidth)-r),{width:r,height:i,x:a,y:o}}var One=25;function kne(e,t,n){n===void 0&&(n=`viewport`);let r=n===`layoutViewport`,i=nn(e),a=rn(e),o=i.visualViewport,s=a.clientWidth,c=a.clientHeight,l=0,u=0;if(o){let e=!vn()||t===`fixed`;r?e||(l=-o.offsetLeft,u=-o.offsetTop):(s=o.width,c=o.height,e&&(l=o.offsetLeft,u=o.offsetTop))}if(Ys(a)<=0){let e=a.ownerDocument,t=e.body,n=getComputedStyle(t),r=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,i=Math.abs(a.clientWidth-t.clientWidth-r),o=getComputedStyle(a).scrollbarGutter===`stable both-edges`?i/2:i;o<=One&&(s-=o)}return{width:s,height:c,x:l,y:u}}function Ane(e,t){let n=Js(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=Ks(e);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function Zs(e,t,n){let r;if(t===`viewport`||t===`layoutViewport`)r=kne(e,n,t);else if(t===`document`)r=Dne(rn(e));else if(on(t))r=Ane(t,n);else{let n=qs(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return yo(r)}function jne(e,t){let n=t.get(e);if(n)return n;let r=wn(e,[],!1).filter(e=>on(e)&&tn(e)!==`body`),i=null,a=bn(e).position===`fixed`,o=a?Sn(e):e;for(;on(o)&&!yn(o);){let e=bn(o),t=gn(o),n=i?i.position:a?`fixed`:``;!t&&(n===`fixed`||n===`absolute`&&e.position===`static`)?r=r.filter(e=>e!==o):i=e,o=Sn(o)}return t.set(e,r),r}function Mne(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?dn(t)?[]:jne(t,this._c):[].concat(n),r],o=Zs(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=Zs(t,a[e],i);s=qa(n.top,s),c=Ka(n.right,c),l=Ka(n.bottom,l),u=qa(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function Nne(e){let{width:t,height:n}=Ws(e);return{width:t,height:n}}function Pne(e,t,n){let r=sn(t),i=rn(t),a=n===`fixed`,o=Js(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=Xa(0);if((r||!a)&&((tn(t)!==`body`||ln(i))&&(s=xn(t)),r)){let e=Js(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}!r&&i&&(c.x=Ys(i));let l=i&&!r&&!a?Xs(i,s):Xa(0);return{x:o.left+s.scrollLeft-c.x-l.x,y:o.top+s.scrollTop-c.y-l.y,width:o.width,height:o.height}}function Qs(e){return bn(e).position===`static`}function $s(e,t){if(!sn(e)||bn(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return rn(e)===n&&(n=n.ownerDocument.body),n}function ec(e,t){let n=nn(e);if(dn(e))return n;if(!sn(e)){let t=Sn(e);for(;t&&!yn(t);){if(on(t)&&!Qs(t))return t;t=Sn(t)}return n}let r=$s(e,t);for(;r&&un(r)&&Qs(r);)r=$s(r,t);return r&&yn(r)&&Qs(r)&&!gn(r)?n:r||_n(e)||n}var Fne=async function(e){let t=this.getOffsetParent||ec,n=this.getDimensions,r=await n(e.floating);return{reference:Pne(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Ine(e){return bn(e).direction===`rtl`}var tc={convertOffsetParentRelativeRectToViewportRelativeRect:Tne,getDocumentElement:rn,getClippingRect:Mne,getOffsetParent:ec,getElementRects:Fne,getClientRects:Ene,getDimensions:Nne,getScale:Ks,isElement:on,isRTL:Ine};function nc(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Lne(e,t,n){let r=null,i,a=rn(e);function o(){var e;clearTimeout(i),(e=r)==null||e.disconnect(),r=null}function s(n,c){n===void 0&&(n=!1),c===void 0&&(c=1),o();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(n||t(),!f||!p)return;let m=Ya(d),h=Ya(a.clientWidth-(u+f)),g=Ya(a.clientHeight-(d+p)),_=Ya(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:qa(0,Ka(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(!nc(l,e.getBoundingClientRect()))return s();if(n!==c){if(!y)return s();n?s(!1,n):i=setTimeout(()=>{s(!1,1e-7)},1e3)}y=!1}try{r=new IntersectionObserver(b,{...v,root:a.ownerDocument})}catch{r=new IntersectionObserver(b,v)}r.observe(e)}let c=nn(e),l=()=>s(n);return c.addEventListener(`resize`,l),s(!0),()=>{c.removeEventListener(`resize`,l),o()}}function rc(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=Gs(e),u=i||a?[...l?wn(l):[],...t?wn(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n),a&&e.addEventListener(`resize`,n)});let d=l&&s?Lne(l,n,a):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?Js(e):null;c&&g();function g(){let t=Js(e);h&&!nc(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var Rne=yne,zne=bne,Bne=_ne,Vne=Sne,Hne=xne,Une=(e,t,n)=>{let r=new Map,i=n??{},a={...tc,...i.platform,_c:r};return gne(e,t,{...i,platform:a})},ic=typeof document<`u`?_.useLayoutEffect:function(){};function ac(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e==`function`&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!ac(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!ac(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function oc(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function sc(e,t){let n=oc(e);return Math.round(t*n)/n}function cc(e){let t=_.useRef(e);return ic(()=>{t.current=e}),t}function Wne(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=_.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=_.useState(r);ac(f,r)||p(r);let[m,h]=_.useState(null),[g,v]=_.useState(null),y=_.useCallback(e=>{e!==C.current&&(C.current=e,h(e))},[]),b=_.useCallback(e=>{e!==w.current&&(w.current=e,v(e))},[]),x=a||m,S=o||g,C=_.useRef(null),w=_.useRef(null),T=_.useRef(u),E=c!=null,D=cc(c),O=cc(i),k=cc(l),A=_.useCallback(()=>{if(!C.current||!w.current)return;let e={placement:t,strategy:n,middleware:f};O.current&&(e.platform=O.current),Une(C.current,w.current,e).then(e=>{let t={...e,isPositioned:k.current!==!1};j.current&&!ac(T.current,t)&&(T.current=t,Rn.flushSync(()=>{d(t)}))})},[f,t,n,O,k]);ic(()=>{l===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let j=_.useRef(!1);ic(()=>(j.current=!0,()=>{j.current=!1}),[]),ic(()=>{if(x&&(C.current=x),S&&(w.current=S),x&&S){if(D.current)return D.current(x,S,A);A()}},[x,S,A,D,E]);let M=_.useMemo(()=>({reference:C,floating:w,setReference:y,setFloating:b}),[y,b]),N=_.useMemo(()=>({reference:x,floating:S}),[x,S]),P=_.useMemo(()=>{let e={position:n,left:0,top:0};if(!N.floating)return e;let t=sc(N.floating,u.x),r=sc(N.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...oc(N.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,N.floating,u.x,u.y]);return _.useMemo(()=>({...u,update:A,refs:M,elements:N,floatingStyles:P}),[u,A,M,N,P])}var Gne=(e,t)=>{let n=Rne(e);return{name:n.name,fn:n.fn,options:[e,t]}},Kne=(e,t)=>{let n=zne(e);return{name:n.name,fn:n.fn,options:[e,t]}},qne=(e,t)=>({fn:Hne(e).fn,options:[e,t]}),Jne=(e,t)=>{let n=Bne(e);return{name:n.name,fn:n.fn,options:[e,t]}},Yne=(e,t)=>{let n=Vne(e);return{name:n.name,fn:n.fn,options:[e,t]}};function lc(e,t,n,r){return{left:e,top:t,right:n,bottom:r,x:e,y:t,width:n-e,height:r-t}}function Xne(e){return{left:e.left,top:e.top,right:e.right,bottom:e.bottom,width:e.width,height:e.height}}function uc(e){let t=[],n,r=1/0,i=1/0,a=-1/0,o=-1/0;for(let s of Array.from(e).sort((e,t)=>e.top-t.top)){if(r=Math.min(r,s.left),i=Math.min(i,s.top),a=Math.max(a,s.right),o=Math.max(o,s.bottom),!n||s.top-n.top>n.height/2)t.push(Xne(s));else{let e=t[t.length-1];e.left=Math.min(e.left,s.left),e.right=Math.max(e.right,s.right),e.bottom=Math.max(e.bottom,s.bottom),e.width=e.right-e.left,e.height=e.bottom-e.top}n=s}return{lines:t,fallback:lc(r,i,a,o)}}function dc(e,t,n){return e.findIndex(e=>t>e.left-2&&t<e.right+2&&n>e.top-2&&n<e.bottom+2)}function fc(e){return lc(e.left,e.top,e.right,e.bottom)}function Zne(e,t,n){let{lines:r}=uc(e.getClientRects());if(r.length<2)return;let i=dc(r,t,n);return{x:t,y:n,lineIndex:i===-1?void 0:i,element:e}}function Qne(e,t,n){let{lines:r,fallback:i}=uc(e.getClientRects());if(r.length<2)return null;let a=n?.x,o=n?.y,s=t[0];if(n?.lineIndex!=null&&r[n.lineIndex])return fc(r[n.lineIndex]);if(a!=null&&o!=null){let e=dc(r,a,o);if(e!==-1)return fc(r[e])}if(r.length===2&&r[0].left>r[1].right&&a!=null&&o!=null)return i;if(s===`t`||s===`b`){let e=r[0],t=r[r.length-1],n=s===`t`?e:t;return lc(n.left,e.top,n.right,t.bottom)}let c=s===`l`,l=r[0].left,u=r[0].right,d=c?1/0:-1/0,f=r[0],p=r[0];for(let e of r){l=Math.min(l,e.left),u=Math.max(u,e.right);let t=c?e.left:e.right;c&&t<d||!c&&t>d?(d=t,f=e,p=e):t===d&&(p=e)}return lc(l,f.top,u,p.bottom)}function $ne(e){return`contextElement`in e&&e.contextElement?e.contextElement:on(e)?e:void 0}function ere(e,t){function n(t){pc(e,t.currentTarget,t.clientX,t.clientY)}function r(e){t||n(e)}return{onFocus(){e.current=void 0},onMouseEnter:r,onMouseMove:r}}function pc(e,t,n,r){let i=Zne(t,n,r);return e.current=i,i}function tre(e){return{name:`inline`,async fn(t){let n=t.elements.reference;if(typeof n?.getClientRects!=`function`)return{};let r=$ne(n),i=e.current,a=i?.element===n||i?.element===r?i:void 0,o=Qne(n,t.placement,a);if(!o||typeof t.platform.getElementRects!=`function`)return{};let s=await t.platform.getElementRects({reference:{contextElement:r,getBoundingClientRect(){return o}},floating:t.elements.floating,strategy:t.strategy});return t.rects.reference.x===s.reference.x&&t.rects.reference.y===s.reference.y&&t.rects.reference.width===s.reference.width&&t.rects.reference.height===s.reference.height?{}:{reset:{rects:s}}}}}var mc=class{attachedStores=[];attachedStoreValue=null;storeListeners=new Set;constructor(e,t,n=!0){this.fallbackStore=e,this.componentName=t,this.throwOnMissingTrigger=n}get attachedStore(){return this.attachedStoreValue}get store(){return this.attachedStoreValue??this.fallbackStore}get serverStore(){return this.fallbackStore}subscribeStore(e){return this.storeListeners.add(e),()=>{this.storeListeners.delete(e)}}attachStore(e){if(this.attachedStores.push(e),this.setActiveStore(e),process.env.NODE_ENV!==`production`&&this.attachedStores.length>1){let e=this;(e.overlapWarningFrame??=Ot.create()).request(()=>{this.attachedStores.length>1&&console.warn(`Base UI: A handle is attached to more than one mounted root at the same time. The most recently mounted root takes over and the previous one stops being controlled by the handle. A handle should be used by a single root that stays mounted for the lifetime of the handle.`)})}return()=>{let t=this.attachedStores.lastIndexOf(e);t!==-1&&this.attachedStores.splice(t,1),this.setActiveStore(this.attachedStores[this.attachedStores.length-1]??null)}}setActiveStore(e){this.attachedStoreValue!==e&&(this.attachedStoreValue=e,this.storeListeners.forEach(e=>{e()}))}openByTrigger(e){let t=this.attachedStore;if(t===null){process.env.NODE_ENV!==`production`&&console.warn(`Base UI: ${this.componentName}Handle.open() was called while no root using this handle is mounted. The call was ignored; mount a root with this handle before opening it imperatively.`);return}let n;if(e){for(let t=this.attachedStores.length-1;t>=0&&!n;--t)n=this.attachedStores[t].context.triggerElements.getById(e);n??=this.fallbackStore.context.triggerElements.getById(e)}if(e&&!n){if(this.throwOnMissingTrigger)throw Error(process.env.NODE_ENV===`production`?K(99,this.componentName,e,this.componentName):`Base UI: ${this.componentName}Handle.open() was called with the trigger id "${e}", but no matching trigger is registered with this handle. An anchored popup cannot open without a trigger to anchor to. Pass the id of a mounted ${this.componentName}.Trigger that has this handle set on its "handle" prop.`);process.env.NODE_ENV!==`production`&&console.warn(`Base UI: ${this.componentName}Handle.open: No trigger found with id "${e}". The popup will open, but the trigger will not be associated with it.`)}t.setOpen(!0,Z(bt,void 0,n))}closePopup(){let e=this.attachedStore;if(e===null){process.env.NODE_ENV!==`production`&&console.warn(`Base UI: ${this.componentName}Handle.close() was called while no root using this handle is mounted. The call was ignored.`);return}e.setOpen(!1,Z(bt))}},nre=s((e=>{var t=p();function n(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var r=typeof Object.is==`function`?Object.is:n,i=t.useState,a=t.useEffect,o=t.useLayoutEffect,s=t.useDebugValue;function c(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),c=r[0].inst,u=r[1];return o(function(){c.value=n,c.getSnapshot=t,l(c)&&u({inst:c})},[e,n,t]),a(function(){return l(c)&&u({inst:c}),e(function(){l(c)&&u({inst:c})})},[e]),s(n),n}function l(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch{return!0}}function u(e,t){return t()}var d=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?u:c;e.useSyncExternalStore=t.useSyncExternalStore===void 0?d:t.useSyncExternalStore})),rre=s((e=>{process.env.NODE_ENV!==`production`&&(function(){function t(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}function n(e,t){d||a.startTransition===void 0||(d=!0,console.error(`You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release.`));var n=t();if(!f){var i=t();o(n,i)||(console.error(`The result of getSnapshot should be cached to avoid an infinite loop`),f=!0)}i=s({inst:{value:n,getSnapshot:t}});var p=i[0].inst,m=i[1];return l(function(){p.value=n,p.getSnapshot=t,r(p)&&m({inst:p})},[e,n,t]),c(function(){return r(p)&&m({inst:p}),e(function(){r(p)&&m({inst:p})})},[e]),u(n),n}function r(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!o(e,n)}catch{return!0}}function i(e,t){return t()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart==`function`&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var a=p(),o=typeof Object.is==`function`?Object.is:t,s=a.useState,c=a.useEffect,l=a.useLayoutEffect,u=a.useDebugValue,d=!1,f=!1,m=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?i:n;e.useSyncExternalStore=a.useSyncExternalStore===void 0?m:a.useSyncExternalStore,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop==`function`&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()})),hc=s(((e,t)=>{t.exports=process.env.NODE_ENV===`production`?nre():rre()})),ire=s((e=>{var t=p(),n=hc();function r(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var i=typeof Object.is==`function`?Object.is:r,a=n.useSyncExternalStore,o=t.useRef,s=t.useEffect,c=t.useMemo,l=t.useDebugValue;e.useSyncExternalStoreWithSelector=function(e,t,n,r,u){var d=o(null);if(d.current===null){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=c(function(){function e(e){if(!a){if(a=!0,o=e,e=r(e),u!==void 0&&f.hasValue){var t=f.value;if(u(t,e))return s=t}return s=e}if(t=s,i(o,e))return t;var n=r(e);return u!==void 0&&u(t,n)?(o=e,t):(o=e,s=n)}var a=!1,o,s,c=n===void 0?null:n;return[function(){return e(t())},c===null?void 0:function(){return e(c())}]},[t,n,r,u]);var p=a(e,d[0],d[1]);return s(function(){f.hasValue=!0,f.value=p},[p]),l(p),p}})),are=s((e=>{process.env.NODE_ENV!==`production`&&(function(){function t(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart==`function`&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var n=p(),r=hc(),i=typeof Object.is==`function`?Object.is:t,a=r.useSyncExternalStore,o=n.useRef,s=n.useEffect,c=n.useMemo,l=n.useDebugValue;e.useSyncExternalStoreWithSelector=function(e,t,n,r,u){var d=o(null);if(d.current===null){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=c(function(){function e(e){if(!a){if(a=!0,o=e,e=r(e),u!==void 0&&f.hasValue){var t=f.value;if(u(t,e))return s=t}return s=e}if(t=s,i(o,e))return t;var n=r(e);return u!==void 0&&u(t,n)?(o=e,t):(o=e,s=n)}var a=!1,o,s,c=n===void 0?null:n;return[function(){return e(t())},c===null?void 0:function(){return e(c())}]},[t,n,r,u]);var p=a(e,d[0],d[1]);return s(function(){f.hasValue=!0,f.value=p},[p]),l(p),p},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop==`function`&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()})),ore=s(((e,t)=>{t.exports=process.env.NODE_ENV===`production`?ire():are()})),gc=[],_c=void 0;function vc(){return _c}function yc(e){gc.push(e)}function bc(e){let t=(t,n)=>{let r=S(Sc).current,i;try{_c=r;for(let e of gc)e.before(r);i=e(t,n);for(let e of gc)e.after(r);r.didInitialize=!0}finally{_c=void 0}return i};return t.displayName=e.displayName||e.name,t}function xc(e){return _.forwardRef(bc(e))}function Sc(){return{didInitialize:!1}}var Cc=hc(),wc=ore(),Tc=oe(19)?cre:lre;function Ec(e,t,n,r,i){return Tc(e,t,n,r,i)}function sre(e,t,n,r,i){let a=_.useCallback(()=>t(e.getSnapshot(),n,r,i),[e,t,n,r,i]);return(0,Cc.useSyncExternalStore)(e.subscribe,a,a)}yc({before(e){e.syncIndex=0,e.didInitialize||(e.syncTick=1,e.syncHooks=[],e.didChangeStore=!0,e.getSnapshot=()=>{let t=!1;for(let n=0;n<e.syncHooks.length;n+=1){let r=e.syncHooks[n],i=r.selector(r.store.state,r.a1,r.a2,r.a3);Object.is(r.value,i)||(t=!0,r.value=i)}return t&&(e.syncTick+=1),e.syncTick})},after(e){e.syncHooks.length>0&&(e.didChangeStore&&(e.didChangeStore=!1,e.subscribe=t=>{let n=new Set;for(let t of e.syncHooks)n.add(t.store);let r=[];for(let e of n)r.push(e.subscribe(t));return()=>{for(let e of r)e()}}),(0,Cc.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getSnapshot))}});function cre(e,t,n,r,i){let a=vc();if(!a)return sre(e,t,n,r,i);let o=a.syncIndex;a.syncIndex+=1;let s;return a.didInitialize?(s=a.syncHooks[o],(s.store!==e||s.selector!==t||!Object.is(s.a1,n)||!Object.is(s.a2,r)||!Object.is(s.a3,i))&&(s.store!==e&&(a.didChangeStore=!0),s.store=e,s.selector=t,s.a1=n,s.a2=r,s.a3=i,s.value=t(e.getSnapshot(),n,r,i))):(s={store:e,selector:t,a1:n,a2:r,a3:i,value:t(e.getSnapshot(),n,r,i)},a.syncHooks.push(s)),s.value}function lre(e,t,n,r,i){return(0,wc.useSyncExternalStoreWithSelector)(e.subscribe,e.getSnapshot,e.getSnapshot,e=>t(e,n,r,i))}var ure=class{static create(e){return new this(e)}constructor(e){this.state=e,this.listeners=new Set,this.updateTick=0}subscribe=e=>(this.listeners.add(e),()=>{this.listeners.delete(e)});getSnapshot=()=>this.state;setState(e){if(this.state===e)return;this.state=e,this.updateTick+=1;let t=this.updateTick;for(let n of this.listeners){if(t!==this.updateTick)return;n(e)}}update(e){for(let t in e)if(!Object.is(this.state[t],e[t])){this.setState({...this.state,...e});return}}set(e,t){Object.is(this.state[e],t)||this.setState({...this.state,[e]:t})}notifyAll(){let e={...this.state};this.setState(e)}use(e,t,n,r){return Ec(this,e,t,n,r)}},Dc=class extends ure{constructor(e,t={},n){super(e),this.context=t,this.selectors=n}useSyncedValue(e,t){_.useDebugValue(e);let n=this;M(()=>{n.state[e]!==t&&n.set(e,t)},[n,e,t])}useSyncedValueWithCleanup(e,t){let n=this;M(()=>(n.state[e]!==t&&n.set(e,t),()=>{n.set(e,void 0)}),[n,e,t])}useSyncedValues(e){let t=this;if(process.env.NODE_ENV!==`production`){_.useDebugValue(e,e=>Object.keys(e));let t=_.useRef(Object.keys(e)).current,n=Object.keys(e);(t.length!==n.length||t.some((e,t)=>e!==n[t]))&&console.error(`ReactStore.useSyncedValues expects the same prop keys on every render. Keys should be stable.`)}M(()=>{t.update(e)},[t,...Object.values(e)])}useControlledProp(e,t){_.useDebugValue(e);let n=this,r=t!==void 0;if(M(()=>{r&&!Object.is(n.state[e],t)&&n.setState({...n.state,[e]:t})},[n,e,t,r]),process.env.NODE_ENV!==`production`){let t=this.controlledValues??=new Map;t.has(e)||t.set(e,r);let n=t.get(e);n!==void 0&&n!==r&&console.error(`A component is changing the ${r?``:`un`}controlled state of ${e.toString()} to be ${r?`un`:``}controlled. Elements should not switch from uncontrolled to controlled (or vice versa).`)}}select(e,t,n,r){let i=this.selectors[e];return i(this.state,t,n,r)}useState(e,t,n,r){return _.useDebugValue(e),Ec(this,this.selectors[e],t,n,r)}useContextCallback(e,t){_.useDebugValue(e);let n=T(t??k);this.context[e]=n}useStateSetter(e){let t=_.useRef(void 0);return t.current===void 0&&(t.current=t=>{this.set(e,t)}),t.current}observe(e,t){let n;n=typeof e==`function`?e:this.selectors[e];let r=n(this.state);return t(r,r,this),this.subscribe(e=>{let i=n(e);if(!Object.is(r,i)){let e=r;r=i,t(i,e,this)}})}};function Oc(){let[,e]=_.useState({});return _.useCallback(()=>{e({})},[])}var dre={open:e=>e.open,transitionStatus:e=>e.transitionStatus,domReferenceElement:e=>e.domReferenceElement,referenceElement:e=>e.positionReference??e.referenceElement,floatingElement:e=>e.floatingElement,floatingId:e=>e.floatingId},kc=class extends Dc{constructor(e){let{syncOnly:t,nested:n,onOpenChange:r,triggerElements:i,...a}=e;super({...a,positionReference:a.referenceElement,domReferenceElement:a.referenceElement},{onOpenChange:r,dataRef:{current:{}},events:ws(),nested:n,triggerElements:i},dre),this.syncOnly=t}syncOpenEvent=(e,t)=>{(!e||!this.state.open||t!=null&&Pte(t))&&(this.context.dataRef.current.openEvent=e?t:void 0)};dispatchOpenChange=(e,t)=>{this.syncOpenEvent(e,t.event);let n={open:e,reason:t.reason,nativeEvent:t.event,nested:this.context.nested,triggerElement:t.trigger};this.context.events.emit(`openchange`,n)};setOpen=(e,t)=>{if(this.syncOnly){this.context.onOpenChange?.(e,t);return}this.dispatchOpenChange(e,t),this.context.onOpenChange?.(e,t)}};function Ac(e){let{popupStore:t,treatPopupAsFloatingElement:n=!1,floatingRootContext:r,floatingId:i,nested:a,onOpenChange:o}=e,s=t.useState(`open`),c=t.useState(`activeTriggerElement`),l=t.useState(n?`popupElement`:`positionerElement`),u=t.context.triggerElements,d=o,f=_.useRef(null);r===void 0&&f.current===null&&(f.current=new kc({open:s,transitionStatus:void 0,referenceElement:c,floatingElement:l,triggerElements:u,onOpenChange:d,floatingId:i,syncOnly:!0,nested:a}));let p=r??f.current;return t.useSyncedValue(`floatingId`,i),M(()=>{let e={open:s,floatingId:i,referenceElement:c,floatingElement:l};on(c)&&(e.domReferenceElement=c),p.state.positionReference===p.state.referenceElement&&(e.positionReference=c),p.update(e)},[s,i,c,l,p]),p.context.onOpenChange=d,p.context.nested=a,p}var jc={tabIndex:-1,[Fte]:``};function Mc(e){return t=>t!==`touch`||e.current}function Nc(e,t=!1){let n=Ve(),r=Os()!=null,i=S(()=>e(n,r)).current;return Ac({popupStore:i,treatPopupAsFloatingElement:t,floatingRootContext:i.state.floatingRootContext,floatingId:n,nested:r,onOpenChange:i.setOpen}),i}function Pc({handle:e,store:t}){return M(()=>e.attachStore(t),[e,t]),null}function Fc(e){let t=e.context.triggerElements.size;e.select(`open`)&&e.state.triggerCount!==t&&e.set(`triggerCount`,t)}function Ic(e,t){let n=_.useRef(null);return T(r=>{let i=n.current;if(i!==null){if(i.element===r&&i.store===t&&i.id===e)return;n.current=null;let a=i.store;a.context.triggerElements.getById(i.id)===i.element&&(a.context.triggerElements.delete(i.id),Fc(a))}r!==null&&e!==void 0&&(n.current={store:t,id:e,element:r},t.context.triggerElements.add(e,r),Fc(t))})}function Lc(e,t,n,r=!1){let i=e.preventUnmountingOnClose;t?i=!1:r&&(i=!0);let a=n?.id??null,o=e.activeTriggerId,s=e.activeTriggerElement;return(a||t)&&(o=a,s=n??null),{open:t,preventUnmountingOnClose:i,activeTriggerId:o,activeTriggerElement:s}}function Rc(e){let t=!1;return e.preventUnmountOnClose=()=>{t=!0},()=>t}function zc(e,t,n,r={}){let i=n.reason,a=i===Ge,o=t&&i===`trigger-focus`,s=!t&&(i===`trigger-press`||i===`escape-key`),c=Rc(n);if(e.context.onOpenChange?.(t,n),n.isCanceled)return;r.onBeforeDispatch?.(),e.state.floatingRootContext.dispatchOpenChange(t,n);let l=()=>{let i=Lc(e.state,t,n.trigger,c()),l={...r.extraState,...i};o?l.instantType=`focus`:s?l.instantType=`dismiss`:a&&(l.instantType=void 0),e.update(l)};a?Rn.flushSync(l):l()}function Bc(e,t,n,r){let i=n.useState(`isMountedByTrigger`,e),a=Ic(e,n),o=T(t=>{let i=n.select(`open`),a=n.select(`activeTriggerId`);if(a===e){let e={activeTriggerElement:t,...i?r:null};n.update(e);return}if(a==null&&i){let i={activeTriggerId:e??null,activeTriggerElement:t,...r};n.update(i)}}),s=T(e=>{a(e),e&&o(e)});return M(()=>(s(t.current),()=>s(null)),[s,t,n,e]),M(()=>{if(i){let e={activeTriggerElement:t.current,...r};n.update(e)}},[i,n,t,...Object.values(r)]),{registerTrigger:s,isMountedByThisTrigger:i}}function Vc(e,t={}){let{closeOnActiveTriggerUnmount:n=!1}=t,r=_.useRef(null),i=e.useState(`open`);M(()=>{if(!i){r.current=null,e.state.triggerCount!==0&&e.set(`triggerCount`,0);return}let t=e.context.triggerElements.size,a={};e.state.triggerCount!==t&&(a.triggerCount=t);let o=e.select(`activeTriggerId`),s=null;if(o){let t=e.context.triggerElements.getById(o);if(t)r.current=o,t!==e.state.activeTriggerElement&&(a.activeTriggerElement=t);else{for(let[t,n]of e.context.triggerElements.entries())if(n===e.state.activeTriggerElement){a.activeTriggerId=t,a.activeTriggerElement=n,r.current=t;break}a.activeTriggerId===void 0&&(r.current===o?s=o:r.current=null)}}else r.current=null;if(!s&&!o&&t===1){let t=e.context.triggerElements.entries().next();if(!t.done){let[e,n]=t.value;a.activeTriggerId=e,a.activeTriggerElement=n,r.current=e}}(a.triggerCount!==void 0||a.activeTriggerId!==void 0||a.activeTriggerElement!==void 0)&&e.update(a),s&&n&&queueMicrotask(()=>{if(e.select(`open`)&&e.select(`activeTriggerId`)===s&&!e.context.triggerElements.getById(s)){let t=Z(Ue);e.setOpen(!1,t),t.isCanceled||e.update({activeTriggerId:null,activeTriggerElement:null})}})},[i,e,e.useState(`triggerCount`),e.useState(`activeTriggerId`),e.useState(`activeTriggerElement`),n])}function Hc(e,t,n,r){let{mounted:i,setMounted:a,transitionStatus:o}=At(e,!1,!1,r),s=t.useState(`preventUnmountingOnClose`),c=!e&&s;t.useSyncedValues({mounted:i,transitionStatus:o,preventUnmountingOnClose:c});let l=T(()=>{a(!1),t.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1,preventUnmountingOnClose:!1}),n?.(),t.context.onOpenChangeComplete?.(!1)});return Vn({enabled:i&&!e&&!c,open:e,ref:t.context.popupRef,onComplete(){e||l()}}),{forceUnmount:l,transitionStatus:o}}function Uc(e,t){e.useSyncedValues(t),M(()=>()=>{e.update({activeTriggerProps:j,inactiveTriggerProps:j,popupProps:j})},[e])}function Wc(e,t){M(()=>{!t&&e.state.openMethod!==null&&e.set(`openMethod`,null)},[t,e]),M(()=>()=>{e.state.openMethod!==null&&e.set(`openMethod`,null)},[e])}var Gc;function fre(e){Gc??=new WeakMap;let t=Gc.get(e);return t||(t=new WeakMap,Gc.set(e,t)),t}var Kc=class{constructor(){this.idMap=new Map}add(e,t){if(process.env.NODE_ENV!==`production`){let n=fre(this),r=n.get(t);if(r!==void 0&&r!==e)throw Error(`Base UI: A trigger element cannot be registered under multiple IDs in PopupTriggerMap.`);let i=this.idMap.get(e);i!==void 0&&i!==t&&n.delete(i),n.set(t,e)}this.idMap.set(e,t)}delete(e){if(process.env.NODE_ENV!==`production`){let t=this.idMap.get(e);t!==void 0&&Gc?.get(this)?.delete(t)}this.idMap.delete(e)}hasElement(e){for(let t of this.idMap.values())if(t===e)return!0;return!1}hasMatchingElement(e){for(let t of this.idMap.values())if(e(t))return!0;return!1}getById(e){return this.idMap.get(e)}entries(){return this.idMap.entries()}elements(){return this.idMap.values()}get size(){return this.idMap.size}};function qc(e,t,n=!1){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:void 0,floatingRootContext:new kc({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:e,floatingId:t,syncOnly:!0,nested:n,onOpenChange:void 0}),floatingId:t,triggerCount:0,preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:j,inactiveTriggerProps:j,popupProps:j}}var Jc=e=>e.triggerIdProp??e.activeTriggerId,Yc=e=>e.openProp??e.open,Xc=e=>(e.popupElement?.id??e.floatingId)||void 0;function Zc(e,t){return t!==void 0&&Yc(e)&&Jc(e)===t}function Qc(e,t){return Zc(e,t)?!0:t!==void 0&&Yc(e)&&Jc(e)==null&&e.triggerCount===1}var $c={open:Yc,mounted:e=>e.mounted,transitionStatus:e=>e.transitionStatus,floatingRootContext:e=>e.floatingRootContext,triggerCount:e=>e.triggerCount,preventUnmountingOnClose:e=>e.preventUnmountingOnClose,payload:e=>e.payload,activeTriggerId:Jc,activeTriggerElement:e=>e.mounted?e.activeTriggerElement:null,popupId:Xc,isTriggerActive:(e,t)=>t!==void 0&&Jc(e)===t,isOpenedByTrigger:(e,t)=>Zc(e,t),isMountedByTrigger:(e,t)=>t!==void 0&&Jc(e)===t&&e.mounted,triggerProps:(e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps,triggerPopupId:(e,t)=>Qc(e,t)?Xc(e):void 0,popupProps:e=>e.popupProps,popupElement:e=>e.popupElement,positionerElement:e=>e.positionerElement};function el(e){let t=_.useCallback(t=>e===void 0?k:e.subscribeStore(t),[e]),n=_.useCallback(()=>e===void 0?void 0:e.store,[e]);return(0,Cc.useSyncExternalStore)(t,n,()=>e?.serverStore)}function tl(e){let{open:t=!1,onOpenChange:n,elements:r={}}=e,i=Ve(),a=Os()!=null;if(process.env.NODE_ENV!==`production`){let e=r.reference;e&&!on(e)&&console.error("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `context.setPositionReference()`",`instead.`)}let o=S(()=>new kc({open:t,transitionStatus:void 0,onOpenChange:n,referenceElement:r.reference??null,floatingElement:r.floating??null,triggerElements:new Kc,floatingId:i,syncOnly:!1,nested:a})).current;return M(()=>{let e={open:t,floatingId:i};r.reference!==void 0&&(e.referenceElement=r.reference,e.domReferenceElement=on(r.reference)?r.reference:null),r.floating!==void 0&&(e.floatingElement=r.floating),o.update(e)},[t,i,r.reference,r.floating,o]),o.context.onOpenChange=n,o.context.nested=a,o}function pre(e={}){let t=tl(e);return nl(e,e.rootContext||t)}function mre(e){return nl(e,e.rootContext)}function nl(e,t){let{nodeId:n,externalTree:r}=e,i=t.useState(`referenceElement`),a=t.useState(`floatingElement`),o=t.useState(`domReferenceElement`),s=t.useState(`open`),c=t.useState(`floatingId`),[l,u]=_.useState(null),[d,f]=_.useState(void 0),[p,m]=_.useState(void 0),h=_.useRef(null),g=ks(r),v=_.useMemo(()=>({reference:i,floating:a,domReference:o}),[i,a,o]),y=Wne({...e,elements:{...v,...l&&{reference:l}}}),b=on(d)?d:null,x=p===void 0?t.state.floatingElement:p;t.useSyncedValue(`referenceElement`,d??null),t.useSyncedValue(`domReferenceElement`,d===void 0?o:b),t.useSyncedValue(`floatingElement`,x);let S=_.useCallback(e=>{let t=on(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),getClientRects:()=>e.getClientRects(),contextElement:e}:e;u(t),y.refs.setReference(t)},[y.refs]),C=_.useCallback(e=>{(on(e)||e===null)&&(h.current=e,f(e)),(on(y.refs.reference.current)||y.refs.reference.current===null||e!==null&&!on(e))&&y.refs.setReference(e)},[y.refs,f]),w=_.useCallback(e=>{m(e),y.refs.setFloating(e)},[y.refs]),T=_.useMemo(()=>({...y.refs,setReference:C,setFloating:w,setPositionReference:S,domReference:h}),[y.refs,C,w,S]),E=_.useMemo(()=>({...y.elements,domReference:o}),[y.elements,o]),D=_.useMemo(()=>({...y,dataRef:t.context.dataRef,open:s,onOpenChange:t.setOpen,events:t.context.events,floatingId:c,refs:T,elements:E,nodeId:n,rootStore:t}),[y,T,E,n,t,s,c]);return M(()=>{o&&(h.current=o)},[o]),M(()=>{t.context.dataRef.current.floatingContext=D;let e=g?.nodesRef.current.find(e=>e.id===n);e&&(e.context=D)}),_.useMemo(()=>({...y,context:D,refs:T,elements:E,rootStore:t}),[y,T,E,D,t])}var rl=Qi&&ea;function il(e,t={}){let{enabled:n=!0,delay:r}=t,i=`rootStore`in e?e.rootStore:e,{events:a,dataRef:o}=i.context,s=_.useRef(!1),c=_.useRef(null),l=_.useRef(!0),u=oa();_.useEffect(()=>{let e=i.select(`domReferenceElement`);if(!n)return;let t=nn(e);function r(){let e=i.select(`domReferenceElement`);!i.select(`open`)&&sn(e)&&e===ya(kn(e))&&(s.current=!0,c.current=e)}function a(){l.current=!0}function o(){l.current=!1}return Va(Pn(t,`blur`,r),rl&&Pn(t,`keydown`,a,!0),rl&&Pn(t,`pointerdown`,o,!0))},[i,n]),_.useEffect(()=>{if(!n)return;function e(e){if(e.reason===`trigger-press`||e.reason===`escape-key`){let e=i.select(`domReferenceElement`);on(e)&&(c.current=e,s.current=!0)}}return a.on(`openchange`,e),()=>{a.off(`openchange`,e)}},[a,n,i]);let d=_.useMemo(()=>{function e(){s.current=!1,c.current=null}return{onMouseLeave(){e()},onFocus(t){let n=t.currentTarget;if(s.current){if(c.current===n)return;e()}let a=xa(t.nativeEvent);if(on(a)){if(rl&&!t.relatedTarget){if(!l.current&&!Ma(a))return}else if(!Fa(a))return}let o=Aa(t.relatedTarget,i.context.triggerElements),{nativeEvent:d,currentTarget:f}=t,p=typeof r==`function`?r():r;if(i.select(`open`)&&o||p===0||p===void 0){i.setOpen(!0,Z(Ke,d,f));return}u.start(p,()=>{s.current||i.setOpen(!0,Z(Ke,d,f))})},onBlur(t){e();let n=t.relatedTarget,r=t.nativeEvent,a=on(n)&&n.hasAttribute(ns(`focus-guard`))&&n.getAttribute(`data-type`)===`outside`;u.start(0,()=>{let e=i.select(`domReferenceElement`),t=ya(kn(e));(n||t!==e)&&(ba(o.current.floatingContext?.refs.floating.current,t)||ba(e,t)||a||Aa(n??t,i.context.triggerElements)||i.setOpen(!1,Z(Ke,r)))})}}},[o,r,i,u]);return _.useMemo(()=>n?{reference:d,trigger:d}:{},[n,d])}var hre=class e{constructor(){this.pointerType=void 0,this.interactedInside=!1,this.handler=void 0,this.blockMouseMove=!0,this.performedPointerEventsMutation=!1,this.pointerEventsScopeElement=null,this.pointerEventsReferenceElement=null,this.pointerEventsFloatingElement=null,this.restTimeoutPending=!1,this.openChangeTimeout=new aa,this.restTimeout=new aa,this.handleCloseOptions=void 0}static create(){return new e}dispose=()=>{this.openChangeTimeout.clear(),this.restTimeout.clear()};disposeEffect=()=>this.dispose},al=new WeakMap;function ol(e){if(!e.performedPointerEventsMutation)return;let t=e.pointerEventsScopeElement;t&&al.get(t)===e&&(e.pointerEventsScopeElement?.style.removeProperty(`pointer-events`),e.pointerEventsReferenceElement?.style.removeProperty(`pointer-events`),e.pointerEventsFloatingElement?.style.removeProperty(`pointer-events`),al.delete(t)),e.performedPointerEventsMutation=!1,e.pointerEventsScopeElement=null,e.pointerEventsReferenceElement=null,e.pointerEventsFloatingElement=null}function sl(e,t){let{scopeElement:n,referenceElement:r,floatingElement:i}=t,a=al.get(n);a&&a!==e&&ol(a),ol(e),e.performedPointerEventsMutation=!0,e.pointerEventsScopeElement=n,e.pointerEventsReferenceElement=r,e.pointerEventsFloatingElement=i,al.set(n,e),n.style.pointerEvents=`none`,r.style.pointerEvents=`auto`,i.style.pointerEvents=`auto`}function cl(e){let t=e.context.dataRef.current,n=S(()=>t.hoverInteractionState??hre.create()).current;return t.hoverInteractionState||=n,wt(t.hoverInteractionState.disposeEffect),t.hoverInteractionState}function ll(e,t={}){let{enabled:n=!0,closeDelay:r=0,nodeId:i}=t,a=`rootStore`in e?e.rootStore:e,o=a.useState(`open`),s=a.useState(`floatingElement`),c=a.useState(`domReferenceElement`),{dataRef:l}=a.context,u=ks(),d=Os(),f=cl(a),p=oa(),m=T(()=>za(l.current.openEvent?.type,f.interactedInside)),h=T(()=>Xte(l.current.openEvent?.type)),g=T(()=>{ol(f)});M(()=>{o||(f.pointerType=void 0,f.restTimeoutPending=!1,f.interactedInside=!1,g())},[o,f,g]),_.useEffect(()=>g,[g]),M(()=>{if(n&&o&&f.handleCloseOptions?.blockPointerEvents&&h()&&on(c)&&s){let e=c,t=s,n=kn(s),r=u?.nodesRef.current.find(e=>e.id===d)?.context?.elements.floating;r&&(r.style.pointerEvents=``);let i=f.pointerEventsScopeElement===t?null:f.pointerEventsScopeElement,a=r===t?null:r,o=f.handleCloseOptions?.getScope?.()??i??a??e.closest(`[data-rootownerid]`)??n.body;return sl(f,{scopeElement:o,referenceElement:e,floatingElement:t}),()=>{g()}}},[n,o,c,s,f,h,u,d,g]),_.useEffect(()=>{if(!n)return;function e(){return!!(u&&d&&es(u.nodesRef.current,d).length>0)}function t(e){let t=La(r,`close`,f.pointerType),n=()=>{a.setOpen(!1,Z(Ge,e)),u?.events.emit(`floating.closed`,e)};t?f.openChangeTimeout.start(t,n):(f.openChangeTimeout.clear(),n())}function o(e){let t=xa(e);if(!Na(t)){f.interactedInside=!1;return}f.interactedInside=t?.closest(`[aria-haspopup]`)!=null}function c(){f.openChangeTimeout.clear(),p.clear(),u?.events.off(`floating.closed`,v),g()}function _(n){if(e()&&u){u.events.on(`floating.closed`,v);return}if(Aa(n.relatedTarget,a.context.triggerElements))return;let r=l.current.floatingContext?.nodeId??i,o=n.relatedTarget;if(!(u&&r&&on(o)&&es(u.nodesRef.current,r,!1).some(e=>ba(e.context?.elements.floating,o)))){if(f.handler){f.handler(n);return}g(),h()&&!m()&&t(n)}}function v(t){u&&d&&!e()&&p.start(0,()=>{u.events.off(`floating.closed`,v),a.setOpen(!1,Z(Ge,t)),u.events.emit(`floating.closed`,t)})}let y=s;return Va(y&&Pn(y,`mouseenter`,c),y&&Pn(y,`mouseleave`,_),y&&Pn(y,`pointerdown`,o,!0),()=>{u?.events.off(`floating.closed`,v)})},[n,s,a,l,r,i,h,m,g,f,u,d,p])}var gre={current:null};function ul(e,t={}){let{enabled:n=!0,delay:r=0,handleClose:i=null,mouseOnly:a=!1,restMs:o=0,move:s=!0,triggerElementRef:c=gre,externalTree:l,isActiveTrigger:u=!0,getHandleCloseContext:d,isClosing:f,shouldOpen:p,guardStaleOpen:m=!1}=t,h=`rootStore`in e?e.rootStore:e,{dataRef:g,events:v}=h.context,y=ks(l),b=cl(h),x=_.useRef(!1),S=Fn(i),C=Fn(r),w=Fn(o),E=Fn(n),D=Fn(p),O=Fn(f),k=T(()=>za(g.current.openEvent?.type,b.interactedInside)),A=T(()=>D.current?.()!==!1),j=T((e,t,n)=>{let r=h.context.triggerElements;if(r.hasElement(t))return!e||!ba(e,t);if(!on(n))return!1;let i=n;return r.hasMatchingElement(e=>ba(e,i))&&(!e||!ba(e,i))}),M=T(()=>{b.handler&&=(kn(h.select(`domReferenceElement`)).removeEventListener(`mousemove`,b.handler),void 0)}),N=T(()=>{ol(b)});return u&&(b.handleCloseOptions=i?.__options),_.useEffect(()=>M,[M]),_.useEffect(()=>{if(!n)return;function e(e){e.open?x.current=!1:(x.current=e.reason===Ge,M(),b.openChangeTimeout.clear(),b.restTimeout.clear(),b.blockMouseMove=!0,b.restTimeoutPending=!1)}return v.on(`openchange`,e),()=>{v.off(`openchange`,e)}},[n,v,b,M]),_.useEffect(()=>{if(!n)return;function e(e,t=!0){let n=La(C.current,`close`,b.pointerType);n?b.openChangeTimeout.start(n,()=>{h.setOpen(!1,Z(Ge,e)),y?.events.emit(`floating.closed`,e)}):t&&(b.openChangeTimeout.clear(),h.setOpen(!1,Z(Ge,e)),y?.events.emit(`floating.closed`,e))}let t=c.current??(u?h.select(`domReferenceElement`):null);if(!on(t))return;function r(e){if(b.openChangeTimeout.clear(),b.blockMouseMove=!1,a&&!va(b.pointerType))return;let t=Ra(w.current),n=La(C.current,`open`,b.pointerType),r=xa(e),i=e.currentTarget??null,o=h.select(`domReferenceElement`),s=i;if(on(r)&&!h.context.triggerElements.hasElement(r)){for(let e of h.context.triggerElements.elements())if(ba(e,r)){s=e;break}}on(i)&&on(o)&&!h.context.triggerElements.hasElement(i)&&ba(i,o)&&(s=o);let c=s!=null&&j(o,s,r),l=h.select(`open`),u=O.current?.()??h.select(`transitionStatus`)===`ending`,d=!l&&u&&x.current,f=!c&&on(s)&&on(o)&&ba(o,s)&&d,p=t>0&&!n,m=c&&(l||d)||f,g=!l||c;if(m){A()&&h.setOpen(!0,Z(Ge,e,s));return}p||(n?b.openChangeTimeout.start(n,()=>{g&&A()&&h.setOpen(!0,Z(Ge,e,s))}):g&&A()&&h.setOpen(!0,Z(Ge,e,s)))}function i(t){if(k()){N();return}M();let n=kn(h.select(`domReferenceElement`));b.restTimeout.clear(),b.restTimeoutPending=!1;let r=g.current.floatingContext??d?.();if(!Aa(t.relatedTarget,h.context.triggerElements)){if(S.current&&r){h.select(`open`)||b.openChangeTimeout.clear();let i=c.current;b.handler=S.current({...r,tree:y,x:t.clientX,y:t.clientY,onClose(){N(),M(),E.current&&!k()&&i===h.select(`domReferenceElement`)&&e(t,!0)}}),n.addEventListener(`mousemove`,b.handler),b.handler(t);return}(b.pointerType!==`touch`||!ba(h.select(`floatingElement`),t.relatedTarget))&&e(t)}}function o(e){ba(t,e.relatedTarget)||(b.openChangeTimeout.clear(),b.restTimeout.clear(),b.restTimeoutPending=!1)}let l=m?Pn(t,`mouseout`,o):void 0;return s?Va(Pn(t,`mousemove`,r,{once:!0}),Pn(t,`mouseenter`,r),Pn(t,`mouseleave`,i),l):Va(Pn(t,`mouseenter`,r),Pn(t,`mouseleave`,i),l)},[M,N,g,C,h,n,S,b,u,j,k,a,s,w,c,y,E,d,O,A,m]),_.useMemo(()=>{if(!n)return;function e(e){b.pointerType=e.pointerType}return{onPointerDown:e,onPointerEnter:e,onMouseMove(e){let{nativeEvent:t}=e,n=e.currentTarget,r=h.select(`domReferenceElement`),i=h.select(`open`),o=j(r,n,e.target);if(a&&!va(b.pointerType))return;if(i&&o&&b.handleCloseOptions?.blockPointerEvents){let e=h.select(`floatingElement`);if(e){let t=b.handleCloseOptions?.getScope?.()??n.ownerDocument.body;sl(b,{scopeElement:t,referenceElement:n,floatingElement:e})}}let s=Ra(w.current);if(i&&!o||s===0||!o&&b.restTimeoutPending&&e.movementX**2+e.movementY**2<2)return;b.restTimeout.clear();function c(){if(b.restTimeoutPending=!1,k())return;let e=h.select(`open`);!b.blockMouseMove&&(!e||o)&&A()&&h.setOpen(!0,Z(Ge,t,n))}b.pointerType===`touch`?Rn.flushSync(()=>{c()}):o&&i?c():(b.restTimeoutPending=!0,b.restTimeout.start(s,c))}}},[n,b,k,j,a,h,w,A])}var _re=`Escape`;function dl(e){return ea&&e.movementX===0&&e.movementY===0}function fl(e,t,n){switch(e){case`vertical`:return t;case`horizontal`:return n;default:return t||n}}function pl(e,t){return fl(t,e===`ArrowUp`||e===`ArrowDown`,e===`ArrowLeft`||e===`ArrowRight`)}function ml(e,t,n){return fl(t,e===`ArrowDown`,n?e===`ArrowLeft`:e===`ArrowRight`)||e===`Enter`||e===` `||e===``}function vre(e,t,n){return fl(t,n?e===Sa:e===Ca,e===Rte)}function yre(e,t,n,r){return t===`both`||t===`horizontal`&&r?e===_re:fl(t,n?e===Ca:e===Sa,e===Lte)}function hl(e,t){let{listRef:n,activeIndex:r,onNavigate:i=()=>{},enabled:a=!0,selectedIndex:o=null,allowEscape:s=!1,loopFocus:c=!1,nested:l=!1,rtl:u=!1,virtual:d=!1,focusItemOnOpen:f=`auto`,focusItemOnHover:p=!0,openOnArrowKeyDown:m=!0,disabledIndices:h=void 0,orientation:g=`vertical`,parentOrientation:v,id:y,resetOnPointerLeave:b=!0,externalTree:x,grid:S}=t,C=S!=null;process.env.NODE_ENV!==`production`&&(s&&(c||console.warn("`useListNavigation` looping must be enabled to allow escaping."),d||console.warn("`useListNavigation` must be virtual to allow escaping.")),g===`vertical`&&C&&console.warn("In grid list navigation mode, the `orientation` should",`be either "horizontal" or "both".`));let w=`rootStore`in e?e.rootStore:e,E=w.useState(`open`),D=w.useState(`floatingElement`),O=w.useState(`domReferenceElement`),k=w.context.dataRef,A=Ia(D),j=Pa(O),N=Fn(A),P=Os(),F=ks(x),I=_.useRef(f),L=_.useRef(o??-1),R=_.useRef(null),z=_.useRef(!0),B=T(e=>{i(L.current===-1?null:L.current,e)}),V=_.useRef(!!D),H=_.useRef(E),U=_.useRef(!1),W=_.useRef(!1),G=_.useRef(null),K=Fn(h),q=Fn(E),J=Fn(o),ee=Fn(b),Y=kt(),te=kt(),ne=T(()=>{function e(e){d?F?.events.emit(`virtualfocus`,e):G.current=is(e,{sync:U.current,preventScroll:!0})}let t=n.current[L.current],r=W.current;t&&e(t),(U.current?e=>e():e=>Y.request(e))(()=>{let i=n.current[L.current]||t;i&&(t||e(i),ce&&(r||!z.current)&&i.scrollIntoView?.({block:`nearest`,inline:`nearest`}))})});M(()=>{k.current.orientation=g},[k,g]),M(()=>{a&&(E&&D?(L.current=o??-1,I.current&&o!=null&&(W.current=!0,B())):V.current&&(L.current=-1,B()))},[a,E,D,o,B]),M(()=>{if(a){if(!E){U.current=!1;return}if(D){if(r==null){if(U.current=!1,J.current!=null)return;if(V.current&&(L.current=-1,ne()),(!H.current||!V.current)&&I.current&&(R.current!=null||I.current===!0&&R.current==null)){let e=0,t=()=>{n.current[0]==null?(e<2&&(e?e=>te.request(e):queueMicrotask)(t),e+=1):(L.current=R.current==null||ml(R.current,g,u)||l?So(n):Co(n),R.current=null,B())};t()}}else xo(n.current,r)||(L.current=r,ne(),W.current=!1)}}},[a,E,D,r,J,l,n,g,u,B,ne,te]),M(()=>{if(!a||D||!F||d||!V.current)return;let e=F.nodesRef.current,t=e.find(e=>e.id===P)?.context?.elements.floating,n=ya(kn(O??t??null)),r=e.some(e=>e.context&&ba(e.context.elements.floating,n));t&&!r&&z.current&&t.focus({preventScroll:!0})},[a,D,O,F,P,d]),M(()=>{H.current=E,V.current=!!D}),M(()=>{E||(R.current=null,I.current=f)},[E,f]);let re=r!=null,ie=T(e=>{if(!q.current)return;let t=n.current.indexOf(e.currentTarget);t!==-1&&(L.current!==t||r!==t)&&(L.current=t,B(e))}),ae=T(()=>v??F?.nodesRef.current.find(e=>e.id===P)?.context?.dataRef?.current.orientation),oe=T(()=>So(n,K.current)),se=T(e=>{if(z.current=!1,U.current=!0,e.which===229||!q.current&&e.currentTarget===N.current)return;if(l&&yre(e.key,g,u,C)){pl(e.key,ae())||ha(e),w.setOpen(!1,Z(lt,e.nativeEvent)),sn(O)&&(d?F?.events.emit(`virtualfocus`,O):O.focus());return}let t=L.current,r=So(n,h),i=Co(n,h);if(j||(e.key===`Home`&&(ha(e),L.current=r,B(e)),e.key===`End`&&(ha(e),L.current=i,B(e))),S!=null){let t=S(e,L.current,n,g,c,u,h,r,i);if(t!=null&&(L.current=t,B(e)),g===`both`)return}if(pl(e.key,g)){if(ha(e),E&&!d&&ya(e.currentTarget.ownerDocument)===e.currentTarget){L.current=ml(e.key,g,u)?r:i,B(e);return}ml(e.key,g,u)?c?t>=i?s&&t!==n.current.length?L.current=-1:(U.current=!1,L.current=r):L.current=wo(n.current,{startingIndex:t,disabledIndices:h}):L.current=Math.min(i,wo(n.current,{startingIndex:t,disabledIndices:h})):c?t<=r?s&&t!==-1?L.current=n.current.length:(U.current=!1,L.current=i):L.current=wo(n.current,{startingIndex:t,decrement:!0,disabledIndices:h}):L.current=Math.max(r,wo(n.current,{startingIndex:t,decrement:!0,disabledIndices:h})),xo(n.current,L.current)&&(L.current=-1),B(e)}}),ce=_.useMemo(()=>({onFocus(e){U.current=!0,ie(e)},onClick:({currentTarget:e})=>e.focus({preventScroll:!0}),onMouseMove(e){dl(e)||(U.current=!0,W.current=!1,p&&ie(e))},onPointerLeave(e){if(!q.current||!z.current||e.pointerType===`touch`)return;U.current=!0;let t=e.relatedTarget;if(p&&!n.current.includes(t)&&ee.current&&(G.current?.(),G.current=null,L.current=-1,B(e),!d)){let e=N.current,t=ya(kn(e));e&&ba(e,t)&&e.focus({preventScroll:!0})}}}),[ie,q,N,p,n,B,ee,d]),le=_.useMemo(()=>d&&E&&re&&{"aria-activedescendant":`${y}-${r}`},[d,E,re,y,r]),ue=_.useMemo(()=>({...j?{}:le,onKeyDown(e){if(e.key===`Tab`&&e.shiftKey&&E&&!d){let t=xa(e.nativeEvent);if(t&&!ba(N.current,t))return;ha(e),w.setOpen(!1,Z(ot,e.nativeEvent)),sn(O)&&O.focus();return}se(e)},onPointerMove(e){dl(e)||(z.current=!0)}}),[le,se,N,j,w,E,d,O]),de=_.useMemo(()=>{function e(e){w.setOpen(!0,Z(lt,e.nativeEvent,e.currentTarget))}function t(e){f===`auto`&&ga(e.nativeEvent)&&(I.current=!d)}function n(e){I.current=f,f===`auto`&&_a(e.nativeEvent)&&(I.current=!0)}return{onKeyDown(t){let n=w.select(`open`);z.current=!1;let r=t.key.startsWith(`Arrow`),i=vre(t.key,ae(),u),a=pl(t.key,g),o=(l?i:a)||t.key===`Enter`||t.key.trim()===``;if(d&&n)return se(t);if(n||m||!r){if(o){let e=pl(t.key,ae());R.current=l&&e?null:t.key}if(l){i&&(ha(t),n?(L.current=oe(),B(t)):e(t));return}a&&(J.current!=null&&(L.current=J.current),ha(t),!n&&m?e(t):se(t),n&&B(t))}},onFocus(e){w.select(`open`)&&!d&&(L.current=-1,B(e))},onPointerDown:n,onPointerEnter:n,onMouseDown:t,onClick:t}},[se,f,oe,l,B,w,m,g,ae,u,J,d]),fe=_.useMemo(()=>({...le,...de}),[le,de]);return _.useMemo(()=>a?{reference:fe,floating:ue,item:ce,trigger:de}:{},[a,fe,ue,de,ce])}function gl(e,t){let{listRef:n,elementsRef:r,activeIndex:i,onMatch:a,disabledIndices:o,onTyping:s,enabled:c=!0,resetMs:l=750,selectedIndex:u=null}=t,d=`rootStore`in e?e.rootStore:e,f=d.useState(`open`),p=oa(),m=_.useRef(``),h=_.useRef(u??i??-1),g=_.useRef(null),v=T(e=>{function t(e){return r?.current[e]}function c(e){let n=t(e);return n&&!Oo(n)||n?.matches(`:disabled`)?!1:o==null||!Eo(A,e,o)}function d(e,t,n=0){if(e.length===0)return-1;let r=(n%e.length+e.length)%e.length,i=t.toLowerCase();for(let t=0;t<e.length;t+=1){let n=(r+t)%e.length;if(e[n]?.toLowerCase().startsWith(i)&&c(n))return n}return-1}let _=n.current;if(m.current.length>0&&e.key===` `&&(ha(e),s?.(!0)),m.current.length>0&&m.current[0]!==` `&&d(_,m.current)===-1&&e.key!==` `&&s?.(!1),_==null||e.key.length!==1||e.ctrlKey||e.metaKey||e.altKey)return;f&&e.key!==` `&&(ha(e),s?.(!0));let v=m.current===``;v&&(h.current=u??i??-1),_.every((e,t)=>e&&c(t)?e[0]?.toLowerCase()!==e[1]?.toLowerCase():!0)&&m.current===e.key&&(m.current=``,h.current=g.current),m.current+=e.key,p.start(l,()=>{m.current=``,h.current=g.current,s?.(!1)});let y=((v?u??i??-1:h.current)??0)+1,b=d(_,m.current,y);b===-1?e.key!==` `&&(m.current=``,s?.(!1)):(a?.(b),g.current=b)}),y=T(e=>{let t=e.relatedTarget,n=d.select(`domReferenceElement`),r=d.select(`floatingElement`);ba(n,t)||ba(r,t)||(p.clear(),m.current=``,h.current=g.current,s?.(!1))});M(()=>{(f||u===null)&&(p.clear(),g.current=null,m.current!==``&&(m.current=``))},[f,u,p]);let b=_.useMemo(()=>({onKeyDown:v,onBlur:y}),[v,y]);return _.useMemo(()=>c?{reference:b,floating:b}:{},[c,b])}var _l=.1,bre=_l*_l,vl=.5;function yl(e,t,n,r,i,a){return r>=t!=a>=t&&e<=(i-n)*(t-r)/(a-r)+n}function bl(e,t,n,r,i,a,o,s,c,l){let u=!1;return yl(e,t,n,r,i,a)&&(u=!u),yl(e,t,i,a,o,s)&&(u=!u),yl(e,t,o,s,c,l)&&(u=!u),yl(e,t,c,l,n,r)&&(u=!u),u}function xre(e,t,n){return e>=n.x&&e<=n.x+n.width&&t>=n.y&&t<=n.y+n.height}function xl(e,t,n,r,i,a){return e>=Math.min(n,i)&&e<=Math.max(n,i)&&t>=Math.min(r,a)&&t<=Math.max(r,a)}function Sl(e={}){let{blockPointerEvents:t=!1}=e,n=new aa,r=({x:e,y:t,placement:r,elements:i,onClose:a,nodeId:o,tree:s})=>{let c=r?.split(`-`)[0],l=!1,u=null,d=null,f=typeof performance<`u`?performance.now():0;function p(e,t){let n=performance.now(),r=n-f;if(u===null||d===null||r===0)return u=e,d=t,f=n,!1;let i=e-u,a=t-d,o=i*i+a*a,s=r*r*bre;return u=e,d=t,f=n,o<s}function m(){n.clear(),a()}return function(r){n.clear();let a=i.domReference,u=i.floating;if(!a||!u||c==null||e==null||t==null)return;let{clientX:d,clientY:f}=r,h=xa(r),g=r.type===`mouseleave`,_=ba(u,h),v=ba(a,h);if(_&&(l=!0,!g))return;if(v&&(l=!1,!g)){l=!0;return}if(g&&on(r.relatedTarget)&&ba(u,r.relatedTarget))return;function y(){return!!(s&&es(s.nodesRef.current,o).length>0)}function b(){y()||m()}if(y())return;let x=a.getBoundingClientRect(),S=u.getBoundingClientRect(),C=e>S.right-S.width/2,w=t>S.bottom-S.height/2,T=S.width>x.width,E=S.height>x.height,D=(T?x:S).left,O=(T?x:S).right,k=(E?x:S).top,A=(E?x:S).bottom;if(c===`top`&&t>=x.bottom-1||c===`bottom`&&t<=x.top+1||c===`left`&&e>=x.right-1||c===`right`&&e<=x.left+1){b();return}let j=!1;switch(c){case`top`:j=xl(d,f,D,x.top+1,O,S.bottom-1);break;case`bottom`:j=xl(d,f,D,S.top+1,O,x.bottom-1);break;case`left`:j=xl(d,f,S.right-1,A,x.left+1,k);break;case`right`:j=xl(d,f,x.right-1,A,S.left+1,k)}if(j)return;if(l&&!xre(d,f,x)){b();return}if(!g&&p(d,f)){b();return}let M=!1;switch(c){case`top`:{let n=T?vl/2:vl*4,r=T||C?e+n:e-n,i=T?e-n:C?e+n:e-n,a=t+vl+1,o=C||T?S.bottom-vl:S.top,s=C?T?S.bottom-vl:S.top:S.bottom-vl;M=bl(d,f,r,a,i,a,S.left,o,S.right,s);break}case`bottom`:{let n=T?vl/2:vl*4,r=T||C?e+n:e-n,i=T?e-n:C?e+n:e-n,a=t-vl,o=C||T?S.top+vl:S.bottom,s=C?T?S.top+vl:S.bottom:S.top+vl;M=bl(d,f,r,a,i,a,S.left,o,S.right,s);break}case`left`:{let n=E?vl/2:vl*4,r=E||w?t+n:t-n,i=E?t-n:w?t+n:t-n,a=e+vl+1,o=w||E?S.right-vl:S.left,s=w?E?S.right-vl:S.left:S.right-vl;M=bl(d,f,o,S.top,s,S.bottom,a,r,a,i);break}case`right`:{let n=E?vl/2:vl*4,r=E||w?t+n:t-n,i=E?t-n:w?t+n:t-n,a=e-vl,o=w||E?S.left+vl:S.right,s=w?E?S.left+vl:S.right:S.left+vl;M=bl(d,f,a,r,a,i,o,S.top,s,S.bottom);break}}M?l||n.start(40,b):b()}};return r.__options={...e,blockPointerEvents:t},r}function Sre({store:e,parentContext:t,isDrawer:n}){let r=e.useState(`open`),i=e.useState(`disablePointerDismissal`),a=e.useState(`modal`),o=e.useState(`popupElement`),s=e.useState(`floatingRootContext`),[c,l]=_.useState(0),[u,d]=_.useState(0),f=c===0,p=Vs(s,{outsidePressEvent(){return e.context.internalBackdropRef.current||e.context.backdropRef.current?`intentional`:{mouse:a===`trap-focus`?`sloppy`:`intentional`,touch:`sloppy`}},outsidePress(t){if(!e.context.outsidePressEnabledRef.current||`button`in t&&t.button!==0)return!1;if(`touches`in t){if(t.type===`touchend`){if(t.changedTouches.length!==1||t.touches.length!==0)return!1}else if(t.touches.length!==1)return!1}let n=xa(t);if(f&&!i){if(a){let t=e.context.internalBackdropRef.current,r=e.context.backdropRef.current;return t||r?t===n||r===n||ba(n,o)&&!n?.hasAttribute(`data-base-ui-portal`):!0}return!0}return!1},escapeKey:f});return ma(r&&a===!0,o),e.useContextCallback(`onNestedDialogOpen`,(e,t)=>{l(e),d(t)}),M(()=>(t?.onNestedDialogOpen&&(r?t.onNestedDialogOpen(c+1,u+ +!!n):t.onNestedDialogOpen(0,0)),()=>{t?.onNestedDialogOpen&&r&&t.onNestedDialogOpen(0,0)}),[n,r,c,u,t]),Uc(e,{activeTriggerProps:p.reference,inactiveTriggerProps:p.trigger,popupProps:p.floating,nestedOpenDialogCount:c,nestedOpenDrawerCount:u}),null}var Cl=_.createContext(void 0);process.env.NODE_ENV!==`production`&&(Cl.displayName=`DialogRootContext`);function wl(e){let t=_.useContext(Cl);if(!e&&t===void 0)throw Error(process.env.NODE_ENV===`production`?K(27):`Base UI: DialogRootContext is missing. Dialog parts must be placed within <Dialog.Root>.`);return t}var Tl=class extends Dc{setState(e){}update(e){}set(e,t){}notifyAll(){}},El={...$c,modal:e=>e.modal,nested:e=>e.nested,nestedOpenDialogCount:e=>e.nestedOpenDialogCount,nestedOpenDrawerCount:e=>e.nestedOpenDrawerCount,disablePointerDismissal:e=>e.disablePointerDismissal,openMethod:e=>e.openMethod,descriptionElementId:e=>e.descriptionElementId,titleElementId:e=>e.titleElementId,viewportElement:e=>e.viewportElement,role:e=>e.role},Cre=class extends Dc{constructor(e,t,n){let r=new Kc,i=Dl(e,r,t,n);super(i,Ol(r),El)}setOpen=(e,t)=>{t.preventUnmountOnClose=()=>{this.set(`preventUnmountingOnClose`,!0)},!e&&t.trigger==null&&this.state.activeTriggerId!=null&&(t.trigger=this.state.activeTriggerElement??void 0),this.context.onOpenChange?.(e,t),!t.isCanceled&&(this.state.floatingRootContext.dispatchOpenChange(e,t),this.update(Lc(this.state,e,t.trigger)))}};function wre(){let e=new Kc;return new Tl(Object.freeze(Dl(void 0,e)),Object.freeze(Ol(e)),El)}function Dl(e,t,n,r=!1){return{...qc(t,n,r),modal:!0,disablePointerDismissal:!1,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,nestedOpenDrawerCount:0,role:`dialog`,...e}}function Ol(e){return{popupRef:_.createRef(),backdropRef:_.createRef(),internalBackdropRef:_.createRef(),outsidePressEnabledRef:{current:!0},triggerElements:e,onOpenChange:void 0,onOpenChangeComplete:void 0}}function kl(e,t){let{children:n,open:r,defaultOpen:i=!1,onOpenChange:a,onOpenChangeComplete:o,disablePointerDismissal:s=!1,modal:c=!0,actionsRef:l,handle:u,triggerId:d,defaultTriggerId:f=null}=t,p=e===`drawer`,m=e===`alert-dialog`,h=m?!0:c,g=m||s,v=m?`alertdialog`:`dialog`,y=wl(!0),b={modal:h,disablePointerDismissal:g,nested:y!=null,role:v},x=Nc((e,t)=>new Cre({open:i,openProp:r,activeTriggerId:f,triggerIdProp:d,...b},e,t),!0);x.useControlledProp(`openProp`,r),x.useControlledProp(`triggerIdProp`,d),x.useSyncedValues(b),x.useContextCallback(`onOpenChange`,a),x.useContextCallback(`onOpenChangeComplete`,o);let S=x.useState(`open`),C=x.useState(`mounted`),w=x.useState(`payload`);Wc(x,S),Vc(x);let{forceUnmount:T}=Hc(S,x);_.useImperativeHandle(l,()=>({unmount:T,close:()=>x.setOpen(!1,Z(bt))}),[T,x]);let E=S||C;return(0,L.jsxs)(Cl.Provider,{value:x,children:[u&&(0,L.jsx)(Pc,{handle:u,store:x}),E&&(0,L.jsx)(Sre,{store:x,parentContext:y?.context,isDrawer:p}),typeof n==`function`?n({payload:w}):n]})}function Tre(e){return kl(`alert-dialog`,e)}var Al=_.forwardRef(function(e,t){let{render:n,className:r,style:i,forceRender:a=!1,...o}=e,s=wl(),c=s.useState(`open`),l=s.useState(`nested`),u=s.useState(`mounted`);return X(`div`,e,{state:{open:c,transitionStatus:s.useState(`transitionStatus`)},ref:[s.context.backdropRef,t],stateAttributesMapping:Oa,props:[{role:`presentation`,hidden:!u,style:{userSelect:`none`,WebkitUserSelect:`none`}},o],enabled:a||!l})});process.env.NODE_ENV!==`production`&&(Al.displayName=`DialogBackdrop`);var jl=_.forwardRef(function(e,t){let{render:n,className:r,style:i,disabled:a=!1,nativeButton:o=!0,...s}=e,c=wl(),l=c.useState(`open`),{getButtonProps:u,buttonRef:d}=jn({disabled:a,native:o}),f={disabled:a};function p(e){l&&c.setOpen(!1,Z(Ye,e.nativeEvent))}return X(`button`,e,{state:f,ref:[t,d],props:[{onClick:p},s,u]})});process.env.NODE_ENV!==`production`&&(jl.displayName=`DialogClose`);var Ml=_.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,...o}=e,s=wl(),c=He(a);return s.useSyncedValueWithCleanup(`descriptionElementId`,c),X(`p`,e,{ref:t,props:[{id:c},o]})});process.env.NODE_ENV!==`production`&&(Ml.displayName=`DialogDescription`);var Nl=_.createContext(void 0);process.env.NODE_ENV!==`production`&&(Nl.displayName=`DialogPortalContext`);function Pl(){let e=_.useContext(Nl);if(e===void 0)throw Error(process.env.NODE_ENV===`production`?K(26):`Base UI: <Dialog.Portal> is missing.`);return e}var Fl=`ArrowUp`,Il=`ArrowDown`,Ll=`ArrowLeft`,Rl=`ArrowRight`,zl=`Home`,Bl=`PageUp`,Vl=`PageDown`,Hl=new Set([Fl,Il,Ll,Rl,zl,`End`]),Ul=`Shift`,Ere=[Ul,`Control`,`Alt`,`Meta`];function Dre(e){return sn(e)&&e.tagName===`INPUT`}function Wl(e){return!!(Dre(e)&&e.selectionStart!=null||sn(e)&&e.tagName===`TEXTAREA`)}function Gl(e,t,n,r){if(!e||!t||!t.scrollTo)return;let i=e.scrollLeft,a=e.scrollTop,o=e.clientWidth<e.scrollWidth,s=e.clientHeight<e.scrollHeight;if(o&&r!==`vertical`){let r=Kl(e,t,`left`),a=ql(e),o=ql(t);n===`ltr`&&(r+t.offsetWidth+o.scrollMarginRight>e.scrollLeft+e.clientWidth-a.scrollPaddingRight?i=r+t.offsetWidth+o.scrollMarginRight-e.clientWidth+a.scrollPaddingRight:r-o.scrollMarginLeft<e.scrollLeft+a.scrollPaddingLeft&&(i=r-o.scrollMarginLeft-a.scrollPaddingLeft)),n===`rtl`&&(r-o.scrollMarginLeft<e.scrollLeft+a.scrollPaddingLeft?i=r-o.scrollMarginLeft-a.scrollPaddingLeft:r+t.offsetWidth+o.scrollMarginRight>e.scrollLeft+e.clientWidth-a.scrollPaddingRight&&(i=r+t.offsetWidth+o.scrollMarginRight-e.clientWidth+a.scrollPaddingRight))}if(s&&r!==`horizontal`){let n=Kl(e,t,`top`),r=ql(e),i=ql(t);n-i.scrollMarginTop<e.scrollTop+r.scrollPaddingTop?a=n-i.scrollMarginTop-r.scrollPaddingTop:n+t.offsetHeight+i.scrollMarginBottom>e.scrollTop+e.clientHeight-r.scrollPaddingBottom&&(a=n+t.offsetHeight+i.scrollMarginBottom-e.clientHeight+r.scrollPaddingBottom)}e.scrollTo({left:i,top:a,behavior:`auto`})}function Kl(e,t,n){let r=n===`left`?`offsetLeft`:`offsetTop`,i=0;for(;t.offsetParent&&(i+=t[r],t.offsetParent!==e);)t=t.offsetParent;return i}function ql(e){let t=getComputedStyle(e);return{scrollMarginTop:parseFloat(t.scrollMarginTop)||0,scrollMarginRight:parseFloat(t.scrollMarginRight)||0,scrollMarginBottom:parseFloat(t.scrollMarginBottom)||0,scrollMarginLeft:parseFloat(t.scrollMarginLeft)||0,scrollPaddingTop:parseFloat(t.scrollPaddingTop)||0,scrollPaddingRight:parseFloat(t.scrollPaddingRight)||0,scrollPaddingBottom:parseFloat(t.scrollPaddingBottom)||0,scrollPaddingLeft:parseFloat(t.scrollPaddingLeft)||0}}var Ore=`--nested-dialogs`,kre=`data-nested-dialog-open`,Jl={...Da,...Vt,nestedDialogOpen(e){return e?{[kre]:``}:null}},Yl=_.forwardRef(function(e,t){let{render:n,className:r,style:i,finalFocus:a,initialFocus:o,...s}=e,c=wl(),l=c.useState(`descriptionElementId`),u=c.useState(`disablePointerDismissal`),d=c.useState(`floatingRootContext`),f=c.useState(`popupProps`),p=c.useState(`modal`),m=c.useState(`mounted`),h=c.useState(`nested`),g=c.useState(`nestedOpenDialogCount`),_=c.useState(`open`),v=c.useState(`openMethod`),y=c.useState(`titleElementId`),b=c.useState(`transitionStatus`),x=c.useState(`role`),S=d.useState(`floatingId`);Pl(),Vn({open:_,ref:c.context.popupRef,onComplete(){_&&c.context.onOpenChangeComplete?.(!0)}});let C=o===void 0?Mc(c.context.popupRef):o,w=g>0,T=c.useStateSetter(`popupElement`),E=X(`div`,e,{state:{open:_,nested:h,transitionStatus:b,nestedDialogOpen:w},props:[f,{id:S,"aria-labelledby":y,"aria-describedby":l,role:x,...jc,hidden:!m,onKeyDown(e){Hl.has(e.key)&&e.stopPropagation()},style:{[Ore]:g}},s],ref:[t,c.context.popupRef,T],stateAttributesMapping:Jl});return(0,L.jsx)(Rs,{context:d,openInteractionType:v,disabled:!m,closeOnFocusOut:!u,initialFocus:C,returnFocus:a,modal:p!==!1,restoreFocus:`popup`,children:E})});process.env.NODE_ENV!==`production`&&(Yl.displayName=`DialogPopup`);function Xl(e){return oe(19)?e:e?`true`:void 0}var Zl=_.forwardRef(function(e,t){let{cutout:n,...r}=e,i;if(n){let e=n.getBoundingClientRect();i=`polygon(0% 0%,100% 0%,100% 100%,0% 100%,0% 0%,${e.left}px ${e.top}px,${e.left}px ${e.bottom}px,${e.right}px ${e.bottom}px,${e.right}px ${e.top}px,${e.left}px ${e.top}px)`}return(0,L.jsx)(`div`,{ref:t,role:`presentation`,"data-base-ui-inert":``,...r,style:{position:`fixed`,inset:0,userSelect:`none`,WebkitUserSelect:`none`,clipPath:i}})});process.env.NODE_ENV!==`production`&&(Zl.displayName=`InternalBackdrop`);var Ql=_.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e,i=wl(),a=i.useState(`mounted`),o=i.useState(`modal`),s=i.useState(`open`);return a||n?(0,L.jsx)(Nl.Provider,{value:n,children:(0,L.jsxs)(Cs,{ref:t,...r,children:[a&&o===!0&&(0,L.jsx)(Zl,{ref:i.context.internalBackdropRef,inert:Xl(!s)}),e.children]})}):null});process.env.NODE_ENV!==`production`&&(Ql.displayName=`DialogPortal`);var $l=_.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,...o}=e,s=wl(),c=He(a);return s.useSyncedValueWithCleanup(`titleElementId`,c),X(`h2`,e,{ref:t,props:[{id:c},o]})});process.env.NODE_ENV!==`production`&&($l.displayName=`DialogTitle`);function Are(e){let t=_.useRef(``),n=_.useCallback(n=>{n.defaultPrevented||(t.current=n.pointerType,e(n,n.pointerType))},[e]);return{onClick:_.useCallback(n=>{if(n.detail===0){e(n,`keyboard`);return}`pointerType`in n?e(n,n.pointerType):e(n,t.current),t.current=``},[e]),onPointerDown:n}}function eu(e,t){let n=_.useRef(e),r=T(t);M(()=>{n.current!==e&&r(n.current),n.current=e},[e,r])}function tu(e,t){let{onClick:n,onPointerDown:r}=Are(T((n,r)=>{(typeof e==`function`?e():e)||t(r||(Yi?`touch`:``))}));return _.useMemo(()=>({onClick:n,onPointerDown:r}),[n,r])}function nu(e){let[t,n]=_.useState(null),r=tu(e,n);return eu(e,t=>{t&&!e&&n(null)}),_.useMemo(()=>({openMethod:t,triggerProps:r}),[t,r])}var ru=xc(function(e,t){let{render:n,className:r,style:i,disabled:a=!1,nativeButton:o=!0,id:s,payload:c,handle:l,...u}=e,d=wl(!0),f=el(l)??d;if(!f)throw Error(process.env.NODE_ENV===`production`?K(79):`Base UI: <Dialog.Trigger> must be used within <Dialog.Root> or provided with a handle.`);let p=He(s),m=f.useState(`floatingRootContext`),h=f.useState(`isOpenedByTrigger`,p),g=f.useState(`triggerPopupId`,p),v=_.useRef(null),{registerTrigger:y,isMountedByThisTrigger:b}=Bc(p,v,f,{payload:c}),{getButtonProps:x,buttonRef:S}=jn({disabled:a,native:o}),C=zs(m),w=tu(()=>f.select(`open`),e=>{f.set(`openMethod`,e)}),T={disabled:a,open:h},E=f.useState(`triggerProps`,b);return X(`button`,e,{state:T,ref:[S,t,y,v],props:[C.reference,E,w,{[hs]:``,id:p,"aria-haspopup":`dialog`,"aria-expanded":h,"aria-controls":g},u,x],stateAttributesMapping:Ta})});process.env.NODE_ENV!==`production`&&(ru.displayName=`DialogTrigger`);var iu=ru,au=_.forwardRef(function(e,t){let{render:n,className:r,style:i,children:a,...o}=e,s=Pl(),c=wl(),l=c.useState(`open`),u=c.useState(`nested`),d=c.useState(`transitionStatus`),f=c.useState(`nestedOpenDialogCount`),p=c.useState(`mounted`),m=c.useStateSetter(`viewportElement`);return X(`div`,e,{enabled:s||p,state:{open:l,nested:u,transitionStatus:d,nestedDialogOpen:f>0},ref:[t,m],stateAttributesMapping:Jl,props:[{role:`presentation`,hidden:!p,style:{pointerEvents:l?void 0:`none`},children:a},o]})});process.env.NODE_ENV!==`production`&&(au.displayName=`DialogViewport`);var ou=class extends mc{constructor(){super(wre(),`Dialog`,!1)}open(e){this.openByTrigger(e)}openWithPayload(e){let t=this.attachedStore;if(t===null){process.env.NODE_ENV!==`production`&&console.warn(`Base UI: DialogHandle.openWithPayload() was called while no root using this handle is mounted. The call and its payload were ignored; mount a root with this handle before opening it imperatively.`);return}t.set(`payload`,e),t.setOpen(!0,Z(bt))}close(){this.closePopup()}get isOpen(){return this.attachedStore?.select(`open`)??!1}};function su(){return new ou}var cu=class extends ou{};function lu(){return new cu}function uu(e){let t=_.useRef(!0);t.current&&(t.current=!1,e())}function du(e,t,n,r,i,a,o,s,c,l=2){let u=To(n.current,{event:e,orientation:r,loopFocus:i,rtl:a,cols:l,disabledIndices:o,minIndex:s,maxIndex:c,prevIndex:t>c?s:t,stopEvent:!0});return xo(n.current,u)?void 0:u}var fu=_.createContext(void 0);process.env.NODE_ENV!==`production`&&(fu.displayName=`ComboboxRootContext`);var pu=_.createContext(void 0);process.env.NODE_ENV!==`production`&&(pu.displayName=`ComboboxFloatingContext`);var mu=_.createContext(void 0);process.env.NODE_ENV!==`production`&&(mu.displayName=`ComboboxDerivedItemsContext`);var hu=_.createContext(!1);process.env.NODE_ENV!==`production`&&(hu.displayName=`ComboboxHasItemsContext`);var gu=_.createContext(``);process.env.NODE_ENV!==`production`&&(gu.displayName=`ComboboxInputValueContext`);function _u(){let e=_.useContext(fu);if(!e)throw Error(process.env.NODE_ENV===`production`?K(22):`Base UI: ComboboxRootContext is missing. Combobox parts must be placed within <Combobox.Root>.`);return e}function vu(){let e=_.useContext(pu);if(!e)throw Error(process.env.NODE_ENV===`production`?K(23):`Base UI: ComboboxFloatingContext is missing. Combobox parts must be placed within <Combobox.Root>.`);return e}function yu(){let e=_.useContext(mu);if(!e)throw Error(process.env.NODE_ENV===`production`?K(24):`Base UI: ComboboxItemsContext is missing. Combobox parts must be placed within <Combobox.Root>.`);return e}function bu(){return _.useContext(gu)}function xu(){return _.useContext(hu)}function Su(e,t,n=Object.is){let{length:r}=e;if(r!==t.length)return!1;for(let i=0;i<r;i+=1)if(!n(e[i],t[i]))return!1;return!0}var Cu=(e,t)=>Object.is(e,t);function wu(e,t,n){return e==null||t==null?Object.is(e,t):n(e,t)}function Tu(e,t,n){return Array.isArray(e)&&Array.isArray(t)?!Su(e,t,(e,t)=>wu(e,t,n)):e!==t}function Eu(e,t,n){return e?e.some(e=>e!==void 0&&wu(t,e,n)):!1}function Du(e,t,n){return e?e.findIndex(e=>e!==void 0&&wu(e,t,n)):-1}function jre(e,t){if(t!==Cu)return n=>Eu(e,n,t);let n=new Set(e);return n.delete(void 0),t=>n.has(t)&&(t!==0||e.some(e=>Object.is(t,e)))}function Ou(e,t,n,r){let i=r&&Array.isArray(t)?e.findIndex(jre(t,n)):Du(e,t,n);return i===-1?null:i}function ku(e,t,n,r,i,a){return Eu(r,t,i)?a!=null&&e>a&&Eu(r,n[a],i)?a:e:e===a?Ou(n,r,i,!0):a}function Au(e,t,n){return e.filter(e=>!wu(t,e,n))}function ju(e){if(e==null)return``;if(typeof e==`string`)return e;try{return JSON.stringify(e)}catch{return String(e)}}function Mre(e){return typeof e==`object`&&!!e&&Array.isArray(e.items)}function Mu(e){return Mre(e?.[0])}function Nu(e){return Mu(e)?e.flatMap(e=>e.items):e}function Pu(e){if(!Array.isArray(e))return e!=null&&`null`in e;let t=e;if(Mu(t)){for(let e of t)for(let t of e.items)if(t&&t.value==null&&t.label!=null)return!0;return!1}for(let e of t)if(e&&e.value==null&&e.label!=null)return!0;return!1}function Fu(e,t){if(t&&e!=null)return t(e)??``;if(e&&typeof e==`object`){if(`label`in e&&e.label!=null)return String(e.label);if(`value`in e)return String(e.value)}return ju(e)}function Iu(e,t){return t&&e!=null?t(e)??``:e&&typeof e==`object`&&`value`in e&&`label`in e?ju(e.value):ju(e)}function Lu(e,t,n){function r(){return Fu(e,n)}if(n&&e!=null)return n(e);if(e&&typeof e==`object`&&`label`in e&&e.label!=null)return e.label;if(t&&!Array.isArray(t))return(Object.hasOwn(t,e)?t[e]:void 0)??r();if(Array.isArray(t)){let n=Nu(t);if(typeof e!=`object`||!e){let t=n.find(t=>t.value===e);return t&&t.label!=null?t.label:r()}if(`value`in e){let t=n.find(t=>t&&t.value===e.value);if(t&&t.label!=null)return t.label}}return r()}function Ru(e,t,n){return e.reduce((e,r,i)=>(i>0&&e.push(`, `),e.push((0,L.jsx)(_.Fragment,{children:Lu(r,t,n)},i)),e),[])}var Nre={id:e=>e.id,labelId:e=>e.labelId,items:e=>e.items,selectedValue:e=>e.selectedValue,hasSelectionChips:e=>{let t=e.selectedValue;return Array.isArray(t)&&t.length>0},hasSelectedValue:e=>{let{selectedValue:t,selectionMode:n}=e;return t==null?!1:n===`multiple`&&Array.isArray(t)?t.length>0:!0},hasNullItemLabel:(e,t)=>t?Pu(e.items):!1,open:e=>e.open,mounted:e=>e.mounted,forceMounted:e=>e.forceMounted,inline:e=>e.inline,activeIndex:e=>e.activeIndex,selectedIndex:e=>e.selectedIndex,isActive:(e,t)=>e.activeIndex===t,isSelected:(e,t)=>{let n=e.isItemEqualToValue,r=e.selectedValue;return Array.isArray(r)?r.some(e=>wu(t,e,n)):wu(t,r,n)},transitionStatus:e=>e.transitionStatus,popupProps:e=>e.popupProps,listProps:e=>e.listProps,inputProps:e=>e.inputProps,triggerProps:e=>e.triggerProps,itemProps:e=>e.itemProps,positionerElement:e=>e.positionerElement,listElement:e=>e.listElement,popupId:e=>e.popupId,triggerElement:e=>e.triggerElement,inputElement:e=>e.inputElement,inputGroupElement:e=>e.inputGroupElement,popupSide:e=>e.popupSide,openMethod:e=>e.openMethod,inputInsidePopup:e=>e.inputInsidePopup,inputOwnsFormValue:e=>e.inputOwnsFormValue,selectionMode:e=>e.selectionMode,name:e=>e.name,form:e=>e.form,disabled:e=>e.disabled,readOnly:e=>e.readOnly,required:e=>e.required,grid:e=>e.grid,virtualized:e=>e.virtualized,itemToStringLabel:e=>e.itemToStringLabel,isItemEqualToValue:e=>e.isItemEqualToValue,modal:e=>e.modal,autoHighlight:e=>e.autoHighlight},Pre=`data-valid`,Fre=`data-invalid`,zu={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},Bu={valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},Ire={disabled:!1,...Bu},Vu={valid(e){return e===null?null:e?{[Pre]:``}:{[Fre]:``}}},Hu={invalid:void 0,name:void 0,validityData:{state:zu,errors:[],error:``,value:``,initialValue:null},setValidityData:k,disabled:void 0,setTouched:k,setDirty:k,setFilled:k,setFocused:k,validationMode:`onSubmit`,shouldValidateOnChange:()=>!1,state:Ire,registerFieldControl:k,validation:{getValidationProps:(e,t=j)=>t,inputRef:{current:null},registeredInputs:new Map,registerInput:k,getInputControl:()=>null,commit:async()=>{},change:k}},Uu=_.createContext(Hu);process.env.NODE_ENV!==`production`&&(Uu.displayName=`FieldRootContext`);function Wu(e=!0){let t=_.useContext(Uu);if(t.setValidityData===k&&!e)throw Error(process.env.NODE_ENV===`production`?K(28):`Base UI: FieldRootContext is missing. Field parts must be placed within <Field.Root>.`);return t}function Gu(e,t,n,r,i=!0,a){let{registerFieldControl:o}=Wu(),s=S(()=>Symbol());M(()=>{let c=s.current;if(!i){o(c,void 0);return}o(c,{controlRef:e,getValue:r,id:t,name:a,value:n})},[e,i,r,t,a,o,s,n]),M(()=>{let e=s.current;return()=>{o(e,void 0)}},[o,s])}var Ku=_.createContext({elementRef:{current:null},formRef:{current:{fields:new Map}},errors:{},clearErrors:k,validationMode:`onSubmit`,submitCountRef:{current:0}});process.env.NODE_ENV!==`production`&&(Ku.displayName=`FormContext`);function qu(){return _.useContext(Ku)}var Ju=_.createContext({controlId:void 0,registerControlId:k,resetControlId:k,labelId:void 0,setLabelId:k,messageIds:[],setMessageIds:k,getDescriptionProps:e=>e});process.env.NODE_ENV!==`production`&&(Ju.displayName=`LabelableContext`);function Yu(){return _.useContext(Ju)}function Xu(e={}){let{id:t,enabled:n=!0}=e,{controlId:r,registerControlId:i,resetControlId:a}=Yu(),o=He(),s=S(()=>Symbol()),c=_.useRef(!1),l=_.useRef(!1),u=T(()=>{c.current&&i!==k&&(c.current=!1,i(s.current,void 0))});return M(()=>{if(!n||i===k){u();return}let e;if(t!==void 0)l.current=!0,e=t;else if(l.current)e=o;else{a();return}if(e===void 0){u();return}c.current=!0,i(s.current,e)},[t,n,i,a,o,s,u]),M(()=>u,[u]),(n?r:void 0)??t??o}function Zu(e){return e==null?void 0:`${e}-popup`}function Lre(e,t){return(n,r)=>n!=null&&e.contains(n,r,t)}function Qu(e){return Array.isArray(e)?e.map(e=>Qu(e)).join(`,`):e==null?``:String(e)}var $u=new Map;function Rre(e={}){let t={usage:`search`,sensitivity:`base`,ignorePunctuation:!0,...e},n=`${Qu(e.locale)}|${JSON.stringify(t)}`,r=$u.get(n);if(r)return r;let i=new Intl.Collator(e.locale,t),a={contains(e,t,n){if(!t)return!0;let r=Fu(e,n);for(let e=0;e<=r.length-t.length;e+=1)if(i.compare(r.slice(e,e+t.length),t)===0)return!0;return!1},startsWith(e,t,n){if(!t)return!0;let r=Fu(e,n);return i.compare(r.slice(0,t.length),t)===0},endsWith(e,t,n){if(!t)return!0;let r=Fu(e,n),a=t.length;return r.length>=a&&i.compare(r.slice(r.length-a),t)===0}};return $u.set(n,a),a}var ed=Rre;function td(e,t=!1){let{overflowY:n}=bn(e);return n!==`auto`&&n!==`scroll`?!1:t?e.clientHeight>0:e.scrollHeight>e.clientHeight}function zre(e,t=!1){let{overflowX:n}=bn(e);return n!==`auto`&&n!==`scroll`?!1:t?e.clientWidth>0:e.scrollWidth>e.clientWidth}function nd(e,t,n=!1){return t===`vertical`?td(e,n):zre(e,n)}function Bre(e,t,n){let r=e;for(;sn(r)&&r!==t&&!yn(r);){for(let e of n)if(nd(r,e))return!0;r=Sn(r)}return!1}function rd(e,t,n=`vertical`,r=!1){let i=sn(e)?e:null;for(;sn(i)&&i!==t&&!yn(i);){if(nd(i,n,r))return i;i=Sn(i)}return nd(t,n,r)?t:null}var id=Symbol(`none`),ad={value:id,index:-1},od=_.createContext(void 0);process.env.NODE_ENV!==`production`&&(od.displayName=`DirectionContext`);function sd(){return _.useContext(od)?.direction??`ltr`}function Vre(e,t,n){let r=e.get(t);if(r!==void 0||n===Cu)return r;for(let[r,i]of e)if(wu(r,t,n))return i}function cd(e){let{id:t,onOpenChangeComplete:n,defaultSelectedValue:r=null,selectedValue:i,onSelectedValueChange:a,defaultInputValue:o,inputValue:s,open:c,defaultOpen:l=!1,selectionMode:u,onItemHighlighted:d,name:f,form:p,disabled:m=!1,readOnly:h=!1,required:g=!1,inputRef:y,grid:b=!1,items:x,filteredItems:C,filter:w,filterQuery:E,openOnInputClick:D=!0,autoHighlight:O=!1,keepHighlight:N=!1,highlightItemOnHover:P=!0,loopFocus:F=!0,itemToStringLabel:I,itemToStringValue:R,isItemEqualToValue:z=Cu,virtualized:B=!1,inline:V=!1,fillInputOnItemPress:H=!0,modal:U=!1,limit:W=-1,autoComplete:G=`list`,formAutoComplete:q,locale:J,submitOnItemClick:Y=!1}=e,{clearErrors:te}=qu(),{setDirty:ne,validityData:re,setFilled:ie,name:ae,disabled:oe,setTouched:se,setFocused:ce,validationMode:le,validation:ue}=Wu(),de=sd(),fe=Xu({id:t}),me=ed({locale:J}),he=Array.isArray(x)?null:x;if(he&&typeof he.label!=`function`)throw Error(process.env.NODE_ENV===`production`?K(100):"Base UI: the `items` prop received an object that is not a collection, so its items cannot be read. Pass an array of items, an array of groups with items, or the result of `createItems()`. See https://base-ui.com/react/components/combobox#createitems");let ge=he?he.data:x,_e=he?.value,ve=_e?void 0:ge,ye=_.useMemo(()=>{if(!C||!_e)return;let e=Nu(C),t=e.map(_e),n;return{values:t,findItem(r,i){if(!n){n=new Map;for(let r=0;r<t.length;r+=1)n.has(t[r])||n.set(t[r],e[r])}return Vre(n,r,i)}}},[C,_e]),be=_.useMemo(()=>he?e=>he.label(e,z,e=>{let t=ye?.findItem(e,z);return t==null?Fu(e,I):he.itemLabel(t)}):I,[he,I,ye,z]),xe=_.useMemo(()=>he?Object.assign(e=>he.itemLabel(e),{selected:e=>Fu(e,be)}):I,[he,be,I]);function Se(e){return Fu(e,be)}let[Ce,we]=_.useState(!1),[Te,Ee]=_.useState(null),X=_.useRef(Te),De=_.useRef([]),Oe=_.useRef([]),ke=_.useRef(null),Ae=_.useRef(null),je=_.useRef(null),Me=_.useRef(null),Ne=_.useRef(null),Pe=_.useRef(!0),Fe=_.useRef(!1),Ie=_.useRef(null),Le=_.useRef(null),Re=_.useRef(null),ze=_.useRef(ad),Be=_.useRef(null),Ve=_.useRef([]),He=_.useRef(null),We=oe||m,Ge=ae??f,Ke=u===`multiple`,qe=u===`single`,Ye=s!==void 0||o!==void 0,Xe=ge!==void 0,Ze=C!==void 0,Qe;Qe=O===`always`?`always`:O?`input-change`:!1;let[$e,et]=v({controlled:i,default:Ke?r??A:r,name:`Combobox`,state:`selectedValue`}),rt=_.useMemo(()=>w===null?()=>!0:w===void 0?Lre(me,xe):w,[w,me,xe]),it=S(()=>Ye?o??``:qe?Se($e):``).current,[ot,st]=v({controlled:s,default:it,name:`Combobox`,state:`inputValue`}),[ct,lt]=v({controlled:c,default:l,name:`Combobox`,state:`open`}),ft=Mu(ge),pt=!ct&&Te!==null?Te:String(ot).trim(),mt=qe?Se($e):``,ht=qe&&!Ce&&pt!==``&&mt.length===pt.length&&me.contains(mt,pt),gt=ht?``:E??pt,_t=Xe&&Ze&&ht&&(!he||he.hasValue($e,z)),vt=_.useMemo(()=>ge?Nu(ge):A,[ge]),yt=_.useMemo(()=>{if(C&&!_t)return C;if(!ge)return A;if(ft){let e=ge,t=[],n=0;for(let r of e){if(W>-1&&n>=W)break;let e=W>-1?W-n:1/0,i=gt===``?r.items.slice(0,e):[];if(gt!==``)for(let t of r.items){if(i.length>=e)break;rt(t,gt,xe)&&i.push(t)}if(i.length>0){let e={...r,items:i};t.push(e),n+=i.length}}return t}if(gt===``)return W>-1?vt.slice(0,W):vt;let e=[];for(let t of vt){if(W>-1&&e.length>=W)break;rt(t,gt,xe)&&e.push(t)}return e},[C,_t,ge,ft,gt,W,rt,xe,vt]),bt=_.useMemo(()=>{if(ye&&yt===C)return ye.values;let e=Nu(yt);return _e?e.map(e=>_e(e)):e},[yt,C,ye,_e]),xt=S(()=>{let e=null;return V&&ct&&Xe&&u!==`none`&&(e=Ou(bt,$e,z,Ke)),new Dc({id:fe,labelId:void 0,selectedValue:$e,open:ct,items:ve,selectionMode:u,name:Ge,form:p,disabled:We,readOnly:h,required:g,grid:b,virtualized:B,openOnInputClick:D,itemToStringLabel:be,isItemEqualToValue:z,modal:U,autoHighlight:Qe,submitOnItemClick:Y,hasInputValue:Ye,mounted:!1,forceMounted:!1,transitionStatus:`idle`,inline:V,activeIndex:null,selectedIndex:e,popupProps:{},listProps:{},inputProps:{},triggerProps:{},itemProps:j,positionerElement:null,listElement:null,popupId:void 0,triggerElement:null,inputElement:null,inputGroupElement:null,popupSide:null,openMethod:null,inputInsidePopup:!0,inputOwnsFormValue:u===`none`},{onOpenChangeComplete:k,setOpen:k,setInputValue:k,setSelectedValue:k,setIndices:k,handleSelection:k,forceMount:k,requestSubmit:k,listRef:De,labelsRef:Oe,popupRef:ke,emptyRef:Ne,inputRef:Ae,startDismissRef:je,endDismissRef:Me,keyboardActiveRef:Pe,chipsContainerRef:Ie,clearRef:Le,valuesRef:Ve,pointerDownItemRef:He,selectionEventRef:Re},Nre)}).current,St=u===`none`?ot:$e,wt=_.useMemo(()=>u===`none`?St:Array.isArray($e)?$e.map(e=>Iu(e,R)):Iu($e,R),[St,R,u,$e]),Tt=T(d),Et=T(n),Dt=xt.useState(`activeIndex`),Ot=xt.useState(`selectedIndex`),kt=xt.useState(`positionerElement`),jt=xt.useState(`listElement`),Mt=xt.useState(`triggerElement`),Nt=xt.useState(`inputElement`),Pt=xt.useState(`inputGroupElement`),Ft=xt.useState(`inline`),It=xt.useState(`inputInsidePopup`),Lt=xt.useState(`inputOwnsFormValue`),Rt=qe&&!It&&ot===mt,zt=Fn(Mt),{mounted:Bt,setMounted:Vt,transitionStatus:Ht}=At(ct),{openMethod:Ut,triggerProps:Wt}=nu(ct),Gt=T(()=>wt);Gu(It?zt:Ae,fe,St,Gt,!We,f);let Kt=T(()=>{ge?Oe.current=bt.map(Se):xt.set(`forceMounted`,!0)}),qt=T((e,t,n)=>{if(t===-1){if(ze.current===ad)return;ze.current=ad}else ze.current={value:e,index:t};Tt(e,Ct(n,void 0,{index:t}))}),Jt=T(e=>{let t={};e.activeIndex!==void 0&&(t.activeIndex=e.activeIndex),e.selectedIndex!==void 0&&(t.selectedIndex=e.selectedIndex),xt.update(t);let n=e.activeIndex;if(n===void 0)return;let r=e.type||`none`;n===null?qt(void 0,-1,r):qt(Ve.current[n],n,r)}),Yt=T((t,n)=>{if(e.onInputValueChange?.(t,n),!n.isCanceled){if(Fe.current=n.reason===nt,n.reason===`input-change`){ct&&Te!==null&&Ee(null);let e=n.event,r=e.inputType;if(e.type===`compositionend`||r!=null&&r!==``&&r!==`insertReplacementText`){let e=t.trim()!==``;e&&we(!0),Be.current={hasQuery:e};let n=xt.state.listElement;if(!xt.state.virtualized&&n){let e=ke.current;for(let t of wn(n.firstElementChild??n)){if(!sn(t)||(e?!ba(e,t):t.getAttribute(`role`)===`dialog`))break;if(td(t)){t.scrollTop=0;break}}}e&&Qe&&xt.state.activeIndex==null&&(ct||Ft)&&xt.set(`activeIndex`,0)}}else n.reason===`input-clear`&&t===``&&xt.state.inputInsidePopup&&(Be.current={hasQuery:!1,selection:!0});st(t)}}),Xt=T(e=>{let t=!e&&It&&!Ft&&ot!==``&&(String(ot).trim()===Te||ot===mt);!e&&(t||ot===``||Rt)&&we(!1),Ee(null),t&&Yt(``,Z(nt))}),Zt=T((t,n)=>{if(ct!==t&&(n.reason===`escape-key`&&Xe&&bt.length===0&&!Ne.current&&n.allowPropagation(),e.onOpenChange?.(t,n),!n.isCanceled&&(t&&Te!==null&&Xt(n.reason===tt),!t&&Ce&&(qe?(Ft||Ee(pt),pt===``&&we(!1)):Ke&&(Ft||Ee(pt),It&&Jt({activeIndex:null}),(!It||Ft)&&Yt(``,Z(nt,n.event,void 0,{isItemPress:n.reason===Je})))),lt(t),!t&&It&&(n.reason===`focus-out`||n.reason===`outside-press`)&&(se(!0),ce(!1),le===`onBlur`)))){let e=u===`none`?ot:$e;ue.commit(e)}}),Qt=T((e,t)=>{a?.(e,t),!t.isCanceled&&(et(e),(u===`none`&&ke.current&&H||qe&&!xt.state.inputInsidePopup)&&Yt(Se(e),Z(t.reason,t.event)))}),$t=T((e,t)=>{let n=xa(e),r=Re.current??e;Re.current=null;let i=Z(Je,r),a=n?.closest(`a`)?.getAttribute(`href`);if(a){a.startsWith(`#`)&&Zt(!1,i);return}if(Ke){let e=Array.isArray($e)?$e:[],n=Eu(e,t,z),r=n?Au(e,t,z):[...e,t];if(Qt(r,i),i.isCanceled||!(Ae.current&&Ae.current.value.trim()!==``))return;if(xt.state.inputInsidePopup){Yt(``,Z(nt,i.event,void 0,{isItemPress:!0}));let e=Be.current;e&&!n&&(e.toggledValue=t)}else Zt(!1,i)}else{if(Qt(t,i),i.isCanceled)return;Zt(!1,i)}}),en=T(()=>{let e=ue.inputRef.current?.form??xt.state.inputElement?.form;e&&typeof e.requestSubmit==`function`&&e.requestSubmit()}),tn=T(()=>{if(Vt(!1),Et?.(!1),we(!1),Ee(null),Jt(u===`none`?{activeIndex:null,selectedIndex:null}:{activeIndex:null}),Ke&&Ae.current&&Ae.current.value!==``&&!Fe.current&&Yt(``,Z(nt)),qe){if(xt.state.inputInsidePopup)Ae.current&&Ae.current.value!==``&&Yt(``,Z(nt));else{let e=Se($e);Ae.current&&Ae.current.value!==e&&Yt(e,Z(e===``?nt:Ue))}}}),nn=_.useMemo(()=>Ft&&kt?{current:kt.closest(`[role="dialog"]`)}:ke,[Ft,kt]);Vn({enabled:!e.actionsRef,open:ct,ref:nn,onComplete(){ct||tn()}}),_.useImperativeHandle(e.actionsRef,()=>({unmount:tn}),[tn]),M(function(){let e=X.current!==null&&Te===null;if(X.current=Te,ct&&(!e||!Xe)||(ct||(He.current=null),u===`none`))return;let t=Xe?bt:Ve.current;Jt({selectedIndex:Ou(t,$e,z,Ke)})},[ct,Te,$e,u,Ke,Xe,bt,z,Jt]),M(()=>{ge&&(Ve.current=bt,De.current.length=bt.length)},[ge,bt]),M(()=>{let e=Be.current;if(e){let t=ct||Ft||xt.state.positionerElement?.hidden===!1;if(e.hasQuery)Qe&&t&&xt.set(`activeIndex`,0),Be.current=null;else if(String(ot).trim()===``&&(Be.current=null,t)){let t=e.selection;Qe===`always`&&!t&&xt.state.selectionMode===`none`&&xt.set(`activeIndex`,0),queueMicrotask(()=>{if(!xt.state.open&&!xt.state.inline||Ae.current&&Ae.current.value.trim()!==``)return;let n=xt.state.selectedValue,r=xt.state.selectionMode===`multiple`;if(r&&Array.isArray(n)?n.length>0:xt.state.selectionMode!==`none`&&n!=null){let t=Xe||Ze?bt:Ve.current,i=Du(t,e.toggledValue,xt.state.isItemEqualToValue);xt.set(`activeIndex`,i===-1?Ou(t,n,xt.state.isItemEqualToValue,r):i)}else t?xt.set(`activeIndex`,null):Qe===`always`&&xt.set(`activeIndex`,0)})}}if(!ct&&!Ft)return;let t=Xe||Ze?bt:Ve.current,n=xt.state.activeIndex;if(n==null){if(Qe===`always`&&t.length>0){xt.set(`activeIndex`,0);return}qt(void 0,-1,Ue);return}if(n>=t.length){qt(void 0,-1,Ue),xt.set(`activeIndex`,null);return}let r=t[n],i=ze.current.value,a=i!==id&&wu(r,i,xt.state.isItemEqualToValue);(ze.current.index!==n||!a)&&qt(r,n,Ue)},[Dt,Qe,qt,Ze,Xe,bt,Ft,ct,xt,ot]),M(()=>{if(u===`none`){ie(String(ot)!==``);return}ie(Ke?Array.isArray($e)&&$e.length>0:$e!=null)},[ie,u,ot,$e,Ke]),_.useEffect(()=>{Xe&&Qe&&bt.length===0&&Jt({activeIndex:null})},[Xe,Qe,bt.length,Jt]);function rn(){ct&&pt!==``&&pt!==String(it)&&!Rt&&we(!0)}function an(){ct&&Te!==null&&Xt(!1)}let on=!1;function cn(){!on&&ot!==mt&&(on=!0,Yt(mt,Z(Ue)))}function ln(){u!==`none`&&(te(Ge),ne(Tu($e,re.initialValue,z)),ue.change($e),qe&&!Ye&&!It&&cn())}function un(){qe&&!Ye&&!It&&!Ce&&cn()}function dn(){u===`none`&&(te(Ge),ne(ot!==re.initialValue),ue.change(ot))}eu(pt,rn),eu(ct,an),eu($e,ln),eu(mt,un),eu(ge,un),eu(ot,dn);let fn=tl({open:Ft?!0:ct,onOpenChange:Zt,elements:{reference:It?Mt:Nt,floating:kt}}),pn=b?`grid`:`listbox`,mn=ct||Ft,hn=mn?`true`:`false`,gn=_.useMemo(()=>{let e=Nt?.tagName===`INPUT`,t=Nt==null||e,n=t||mn,r=t?{autoComplete:`off`,spellCheck:`false`,autoCorrect:`off`,autoCapitalize:`none`}:{};return n&&(r.role=`combobox`,r[`aria-expanded`]=hn,r[`aria-haspopup`]=pn,r[`aria-controls`]=mn?jt?.id:void 0,r[`aria-autocomplete`]=h?`none`:G),{reference:r,floating:{role:`presentation`}}},[Nt,mn,hn,pn,jt?.id,G,h]),_n=zs(fn,{enabled:!We&&D,event:`mousedown-only`,toggle:!1,touchOpenDelay:It?0:100,reason:at}),vn=Vs(fn,{enabled:!We&&!Ft,outsidePressEvent:{mouse:`sloppy`,touch:`intentional`},bubbles:Ft?!0:void 0,outsidePress(e){let t=xa(e);return!ba(Mt,t)&&!ba(Le.current,t)&&!ba(Ie.current,t)&&!ba(Pt,t)}}),yn=hl(fn,{enabled:!We,id:fe,listRef:De,activeIndex:Dt,selectedIndex:Ot,virtual:!0,loopFocus:F,allowEscape:F&&!Qe,focusItemOnOpen:Ce||u===`none`&&!Qe?!1:`auto`,focusItemOnHover:P,resetOnPointerLeave:!N,orientation:b?`horizontal`:void 0,rtl:de===`rtl`,disabledIndices:A,grid:b?du:void 0,onNavigate(e,t){(t||ct)&&Ht!==`ending`&&Jt(t?{activeIndex:e,type:Pe.current?ut:dt}:{activeIndex:e})}}),bn=_.useMemo(()=>pe(yn.reference,{onKeyDown(e){b&&xt.state.activeIndex==null&&(e.key===`ArrowLeft`||e.key===`ArrowRight`)&&e.preventBaseUIHandler()}},vn.reference,_n.reference,gn.reference),[yn.reference,vn.reference,_n.reference,gn.reference,b,xt]),xn=_.useMemo(()=>pe(jc,vn.floating),[vn.floating]),Sn=_.useMemo(()=>pe(yn.floating,gn.floating),[yn.floating,gn.floating]),Cn=_.useMemo(()=>{let e=yn.item;return e?{...e,onFocus:void 0}:j},[yn.item]);xt.useContextCallback(`setOpen`,Zt),xt.useContextCallback(`setInputValue`,Yt),xt.useContextCallback(`setSelectedValue`,Qt),xt.useContextCallback(`setIndices`,Jt),xt.useContextCallback(`handleSelection`,$t),xt.useContextCallback(`forceMount`,Kt),xt.useContextCallback(`requestSubmit`,en),xt.useContextCallback(`onOpenChangeComplete`,n),uu(()=>{xt.update({inline:V,popupProps:xn,listProps:Sn,inputProps:bn,triggerProps:Wt,itemProps:Cn})});let Tn={id:fe,selectedValue:$e,open:ct,mounted:Bt,transitionStatus:Ht,items:ve,inline:V,popupProps:xn,listProps:Sn,inputProps:bn,triggerProps:Wt,itemProps:Cn,openMethod:Ut,selectionMode:u,name:Ge,form:p,disabled:We,readOnly:h,required:g,grid:b,virtualized:B,openOnInputClick:D,itemToStringLabel:be,modal:U,autoHighlight:Qe,isItemEqualToValue:z,submitOnItemClick:Y,hasInputValue:Ye};M(()=>{xt.update({...Tn,inputOwnsFormValue:u===`none`&&(V||!xt.state.inputInsidePopup)})},[xt,...Object.values(Tn)]);let En=ee(y,ue.inputRef),Dn=_.useMemo(()=>({query:pt,hasItems:Xe,filteredItems:yt,flatFilteredValues:bt}),[pt,Xe,yt,bt]),On=_.useMemo(()=>Array.isArray(St)?``:Iu(St,R),[St,R]),kn=Ke&&Array.isArray($e)&&$e.length>0,An=Ke||u===`none`&&Lt?void 0:Ge,jn=_.useMemo(()=>!Ke||!Array.isArray($e)||!Ge?null:$e.map(e=>{let t=Iu(e,R);return(0,L.jsx)(`input`,{type:`hidden`,form:p,name:Ge,value:t,disabled:We},t)}),[Ke,$e,p,Ge,R,We]),Mn=(0,L.jsxs)(_.Fragment,{children:[e.children,(0,L.jsx)(`input`,{...ue.getValidationProps(We,{onFocus(){if(It){Mt?.focus();return}(Ae.current||Mt)?.focus()},onChange(e){if(e.nativeEvent.defaultPrevented||We||h)return;let t=e.currentTarget.value,n=t.toLowerCase(),r=Z(Ue,e.nativeEvent),i=()=>Ve.current.findIndex(e=>Iu(e,R).toLowerCase()===n||Se(e).toLowerCase()===n);function a(){if(Ke)return;if(u===`none`){Yt(t,r);return}let e=i();e===-1&&(e=Ve.current.findIndex((e,t)=>{let r=Oe.current[t];return r!=null&&r.toLowerCase()===n}));let a=e===-1?void 0:Ve.current[e];a!=null&&Qt?.(a,r)}qe&&(Kt(),ge&&i()===-1&&xt.set(`forceMounted`,!0)),queueMicrotask(a)}}),id:fe&&An==null?`${fe}-hidden-input`:void 0,form:p,name:An,autoComplete:q,disabled:We,required:g&&!kn,readOnly:h,value:On,ref:En,style:An?Wa:Ua,tabIndex:-1,"aria-hidden":!0,suppressHydrationWarning:!0}),jn]});return(0,L.jsx)(fu.Provider,{value:xt,children:(0,L.jsx)(pu.Provider,{value:fn,children:(0,L.jsx)(hu.Provider,{value:Xe,children:(0,L.jsx)(mu.Provider,{value:Dn,children:(0,L.jsx)(gu.Provider,{value:ot,children:Mn})})})})})}function Hre(e){let{openOnInputClick:t=!1,value:n,defaultValue:r,onValueChange:i,mode:a=`list`,itemToStringValue:o,...s}=e,c=(a===`inline`||a===`both`)&&!e.readOnly,l=a===`inline`||a===`none`,u=n!==void 0,[d,f]=_.useState(r??``),[p,m]=_.useState(``);_.useEffect(()=>{(u||!c)&&m(``)},[n,u,c]);let h;h=c&&p!==``?p:u?n??``:d;let g=ed({locale:s.locale}),v=String((u?n:d)??``).trim(),y=l||s.filter===null?null:s.filter??g.contains;function b(e,t){m(``),u||f(e),i?.(e,t)}function x(t,n){e.onItemHighlighted?.(t,n),n.reason!==`pointer`&&m(c&&t!=null?Fu(t,o):``)}return(0,L.jsx)(cd,{...s,itemToStringLabel:o,openOnInputClick:t,selectionMode:`none`,fillInputOnItemPress:!0,filter:y,filterQuery:a===`both`?v:void 0,autoComplete:a,inputValue:h,defaultInputValue:r,onInputValueChange:b,onItemHighlighted:x})}var Ure=`data-popup-side`,Wre=`data-list-empty`,ld={...Ea,...Vu,popupSide:e=>e?{[Ure]:e}:null,listEmpty:e=>e?{[Wre]:``}:null},ud=5;function dd(e,t){let n=Gre(t);return e.clientX>=n.left-ud&&e.clientX<=n.right+ud&&e.clientY>=n.top-ud&&e.clientY<=n.bottom+ud}function Gre(e){let t=e.getBoundingClientRect(),n=nn(e);if(ra)return t;let r=n.getComputedStyle(e,`::before`),i=n.getComputedStyle(e,`::after`);if(r.content===`none`&&i.content===`none`)return t;let a=parseFloat(r.width)||0,o=parseFloat(r.height)||0,s=parseFloat(i.width)||0,c=parseFloat(i.height)||0,l=Math.max(t.width,a,s),u=Math.max(t.height,o,c),d=l-t.width,f=u-t.height;return{left:t.left-d/2,right:t.right+d/2,top:t.top-f/2,bottom:t.bottom+f/2}}function Kre(e){return e==null?void 0:`${e}-label`}function fd(e,t){return e??t}function pd(e){let t=e.useState(`mounted`),n=e.useState(`popupSide`),r=e.useState(`positionerElement`);return t&&r?n:null}function md(){return yu().filteredItems.length===0}function hd(e){return e===`rtl`?[`ArrowRight`,`ArrowLeft`]:[`ArrowLeft`,`ArrowRight`]}function gd(e,t){let n=e>=t-1?t-2:e;return n>=0?n:void 0}function _d(e,t,n){let r=e.context.listRef.current[t];r&&(e.context.selectionEventRef.current=n,r.click(),e.context.selectionEventRef.current=null)}var vd=_.forwardRef(function(e,t){let{render:n,className:r,nativeButton:i=!0,disabled:a=!1,id:o,style:s,...c}=e,{state:l,disabled:u,setTouched:d,setFocused:f,validationMode:p,validation:m}=Wu(),{labelId:h}=Yu(),g=_u(),v=g.useState(`selectionMode`),y=g.useState(`disabled`),b=g.useState(`readOnly`),x=g.useState(`required`),S=g.useState(`positionerElement`),C=g.useState(`listElement`),w=g.useState(`popupId`),E=g.useState(`triggerProps`),D=g.useState(`inputInsidePopup`),O=g.useState(`id`),k=g.useState(`labelId`),A=g.useState(`open`),j=g.useState(`selectedValue`),M=g.useState(`activeIndex`),N=g.useState(`selectedIndex`),P=g.useState(`hasSelectedValue`),F=vu(),I=bu(),L=oa(),R=u||y||a,z=md(),B=pd(g);Xu({id:D?o:void 0});let V=D?o??O:o,H=fd(h,k),U;A&&D?U=w??Zu(O):A&&(U=C?.id);let W=_.useRef(``);function G(e){W.current=e.pointerType}let{reference:K}=gl(F,{enabled:!A&&!b&&!y&&v===`single`,listRef:g.context.labelsRef,activeIndex:M,selectedIndex:N,onMatch(e){let t=g.context.valuesRef.current[e];t!==void 0&&g.context.setSelectedValue(t,Z(Ue))}}),{reference:q}=zs(F,{enabled:!y,event:`mousedown`}),{buttonRef:J,getButtonProps:ee}=jn({native:i,disabled:R}),Y={...l,readOnly:b,open:A,disabled:R,popupSide:B,listEmpty:z,placeholder:v!==`none`&&!P};return X(`button`,e,{ref:[t,J,T(e=>{g.set(`triggerElement`,e)})],state:Y,props:[E,q,K,{id:V,tabIndex:D?0:-1,role:D?`combobox`:void 0,"aria-expanded":A,"aria-haspopup":D?`dialog`:`listbox`,"aria-controls":U,"aria-required":D&&x||void 0,"aria-readonly":D&&b||void 0,"aria-labelledby":H,onPointerDown:G,onPointerEnter:G,onFocus(){f(!0),!R&&L.start(0,g.context.forceMount)},onBlur(e){if(!ba(S,e.relatedTarget)&&(d(!0),f(!1),p===`onBlur`)){let e=v===`none`?I:j;m.commit(e)}},onMouseDown(e){if(R||(D||F.set(`domReferenceElement`,e.currentTarget),g.context.forceMount(),W.current!==`touch`&&(g.context.inputRef.current?.focus(),D||e.preventDefault()),A))return;let t=kn(e.currentTarget);function n(e){let t=g.state.triggerElement;if(!t)return;let n=xa(e),r=g.state.positionerElement,i=g.state.listElement;ba(t,n)||ba(r,n)||ba(i,n)||dd(e,t)||g.context.setOpen(!1,Z(ht,e))}D&&t.addEventListener(`mouseup`,n,{once:!0})},onKeyDown(e){(e.key===`ArrowDown`||e.key===`ArrowUp`)&&(ha(e),g.context.setOpen(!0,Z(lt,e.nativeEvent)),g.context.inputRef.current?.focus())}},m.getValidationProps(R,c),ee],stateAttributesMapping:ld})});process.env.NODE_ENV!==`production`&&(vd.displayName=`ComboboxTrigger`);var qre=vd,yd=_.createContext(void 0);process.env.NODE_ENV!==`production`&&(yd.displayName=`ComboboxChipsContext`);function bd(){return _.useContext(yd)}var xd=_.createContext(void 0);process.env.NODE_ENV!==`production`&&(xd.displayName=`ComboboxPositionerContext`);function Sd(e){let t=_.useContext(xd);if(t===void 0&&!e)throw Error(process.env.NODE_ENV===`production`?K(21):`Base UI: <Combobox.Popup> and <Combobox.Arrow> must be used within the <Combobox.Positioner> component`);return t}var Cd=_.forwardRef(function(e,t){let n=_u(),{buttonRef:r,getButtonProps:i}=jn({native:!1}),a=ee(t,r);function o(e){n.context.setOpen(!1,Z(Ye,e.nativeEvent,e.currentTarget))}let s=i({onClick:o});return(0,L.jsx)(`span`,{ref:a,...s,"aria-label":`Dismiss`,tabIndex:void 0,style:Wa})});process.env.NODE_ENV!==`production`&&(Cd.displayName=`ComboboxInternalDismissButton`);var wd=_.forwardRef(function(e,t){let{render:n,className:r,disabled:i=!1,id:a,style:o,...s}=e,{state:c,disabled:l,setTouched:u,setFocused:d,validationMode:f,validation:p}=Wu(),{labelId:m}=Yu(),h=bd(),g=!!Sd(!0),v=_u(),y=bu(),b=sd(),x=v.useState(`required`),S=v.useState(`disabled`),C=v.useState(`readOnly`),w=v.useState(`name`),E=v.useState(`form`),D=v.useState(`selectionMode`),O=v.useState(`autoHighlight`),k=v.useState(`inputProps`),A=v.useState(`triggerProps`),j=v.useState(`open`),M=v.useState(`mounted`),N=v.useState(`selectedValue`),P=v.useState(`id`),F=v.useState(`inline`),I=v.useState(`modal`),R=!!O,z=pd(v),B=l||S||i,V=md(),H=g||F,U=!H||I,W=He(a??(H?void 0:P)),G=g?Bu:c,[K,q]=_.useState(null),J=_.useRef(!1),ee=_.useRef(null),Y=_.useRef(!1),te=D===`none`&&!g,ne=T(e=>{let t=g||v.state.inline;t&&!v.state.hasInputValue&&v.context.setInputValue(``,Z(Ue)),v.update({inputElement:e,inputInsidePopup:t,inputOwnsFormValue:te})}),re=g?s:p.getValidationProps(B,s);function ie(){v.context.setIndices({activeIndex:null,selectedIndex:null,type:v.context.keyboardActiveRef.current?ut:dt})}function ae(){v.context.keyboardActiveRef.current=!1}let oe={...G,open:j,disabled:B,readOnly:C,popupSide:z,listEmpty:V};function se(e){if(!h)return;let t,{highlightedChipIndex:n}=h,r=h.chipsRef.current.length,[i,a]=hd(b);return n===void 0?(e.key===i&&(e.currentTarget.selectionStart??0)===0&&N.length>0&&(e.preventDefault(),t=r>0?r-1:void 0),t):(e.key===i?(e.preventDefault(),t=n>0?n-1:void 0):e.key===a?(e.preventDefault(),t=n<r-1?n+1:void 0):(e.key===`Backspace`||e.key===`Delete`)&&(e.preventDefault(),t=gd(n,N.length),ie()),t)}let ce=X(`input`,e,{state:oe,ref:[t,v.context.inputRef,ne],props:[k,A,{value:K??y,"aria-readonly":C||void 0,"aria-required":x||void 0,"aria-labelledby":m,disabled:B,readOnly:C,required:D===`none`?x:void 0,form:E,...te&&w&&{name:w},id:W,onFocus(){if(d(!0),!F||!Y.current)return;Y.current=!1;let e=ee.current;e!=null&&Object.hasOwn(v.context.valuesRef.current,e)&&v.context.setIndices({activeIndex:e})},onBlur(){u(!0),d(!1);let e=v.state.activeIndex;if(F&&e!==null&&O!==`always`&&(ee.current=e,Y.current=!0,v.context.setIndices({activeIndex:null})),f===`onBlur`){let e=D===`none`?y:N;p.commit(e)}},onCompositionStart(e){Zi||(J.current=!0,q(e.currentTarget.value))},onCompositionEnd(e){J.current=!1;let t=e.currentTarget.value;q(null),v.context.setInputValue(t,Z(tt,e.nativeEvent))},onChange(e){let t=e.nativeEvent,n=t.inputType,r=!n||n===`insertReplacementText`,i=J.current||!r;function a(e){!C&&!B&&e&&i&&(v.context.setOpen(!0,Z(tt,t)),R||ie())}if(J.current){let n=e.currentTarget.value;q(n),n===``&&!v.state.openOnInputClick&&!v.state.inputInsidePopup&&v.context.setOpen(!1,Z(nt,t));let r=n.trim(),i=R&&r!==``;a(r),j&&v.state.activeIndex!==null&&!i&&ie();return}let o=Z(tt,t);if(v.context.setInputValue(e.currentTarget.value,o),o.isCanceled)return;let s=e.currentTarget.value===``,c=Z(nt,t);s&&!v.state.inputInsidePopup&&(D===`single`&&v.context.setSelectedValue(null,c),v.state.openOnInputClick||v.context.setOpen(!1,c)),a(e.currentTarget.value.trim()),j&&v.state.activeIndex!==null&&!R&&ie()},onKeyDown(e){if(e.ctrlKey||e.shiftKey||e.altKey||e.metaKey)return;if(v.context.keyboardActiveRef.current=!0,B||C){C&&e.key===`Enter`&&j&&v.state.activeIndex!==null&&ha(e);return}let t=e.currentTarget,n=t.scrollWidth-t.clientWidth,r=b===`rtl`;if(e.key===`Home`){ha(e);let n=ta&&r?t.value.length:0;t.setSelectionRange(n,n),t.scrollLeft=0;return}if(e.key===`End`){ha(e);let i=ta&&r?0:t.value.length;t.setSelectionRange(i,i),t.scrollLeft=r?-n:n;return}if(!M&&e.key===`Escape`){let t=D===`multiple`&&Array.isArray(N)?N.length===0:N===null,n=Z(st,e.nativeEvent),r=D===`multiple`?[]:null;v.context.setInputValue(``,n),v.context.setSelectedValue(r,n),!t&&!v.state.inline&&!n.isPropagationAllowed&&e.stopPropagation();return}if(h&&e.key===`Backspace`&&t.value===``&&h.highlightedChipIndex===void 0&&Array.isArray(N)&&N.length>0){let t=h.chipsRef.current.length,n=t>0?t-1:N.length-1,r=N.filter((e,t)=>t!==n);ie(),v.context.setSelectedValue(r,Z(Ue,e.nativeEvent));return}let i=h?.highlightedChipIndex!==void 0,a=se(e);if(h?.setHighlightedChipIndex(a),a===void 0?i&&v.context.inputRef.current?.focus():h?.chipsRef.current[a]?.focus(),e.which!==229&&e.key===`Enter`&&j){let t=v.state.activeIndex,n=e.nativeEvent;if(t===null){if(F)return;v.context.setOpen(!1,Z(Ue,n));return}ha(e),_d(v,t,n)}},onPointerMove:ae,onPointerDown:ae},re],stateAttributesMapping:ld}),le=g?(0,L.jsx)(Uu.Provider,{value:Hu,children:ce}):ce;return(0,L.jsxs)(_.Fragment,{children:[j&&U&&(0,L.jsx)(Cd,{ref:v.context.startDismissRef}),le]})});process.env.NODE_ENV!==`production`&&(wd.displayName=`ComboboxInput`);function Td(e,t,n,r){if(e.baseUIHandlerPrevented)return;let i=xa(e.nativeEvent),a=on(i)?i:null;(a===e.currentTarget||!r?.(a)&&!Na(a))&&(e.preventDefault(),!n&&(t.context.inputRef.current?.focus(),t.state.openOnInputClick&&t.context.setOpen(!0,Z(at,e.nativeEvent))))}var Ed=_.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{state:o}=Wu(),s=_u(),c=s.useState(`open`),l=s.useState(`disabled`),u=s.useState(`readOnly`),d=s.useState(`hasSelectedValue`),f=s.useState(`selectionMode`),p=pd(s),m=l,h=md(),g=f!==`none`&&!d,_={...o,open:c,disabled:m,readOnly:u,popupSide:p,listEmpty:h,placeholder:g};return X(`div`,e,{ref:[t,T(e=>{s.set(`inputGroupElement`,e)})],props:[{role:`group`,onMouseDown(e){Td(e,s,m,e=>ba(s.context.chipsContainerRef.current,e))}},a],state:_,stateAttributesMapping:ld})});process.env.NODE_ENV!==`production`&&(Ed.displayName=`ComboboxInputGroup`);var Dd=_.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e;return X(`span`,e,{ref:t,props:[{"aria-hidden":!0,children:`▼`},a]})});process.env.NODE_ENV!==`production`&&(Dd.displayName=`ComboboxIcon`);var Jre={...Vt,...Ta},Od=_.forwardRef(function(e,t){let{render:n,className:r,disabled:i=!1,nativeButton:a=!0,keepMounted:o=!1,style:s,...c}=e,{disabled:l}=Wu(),u=_u(),d=u.useState(`selectionMode`),f=u.useState(`disabled`),p=u.useState(`readOnly`),m=u.useState(`open`),h=u.useState(`selectedValue`),g=u.useState(`hasSelectionChips`),_=bu(),v=!1;v=d===`none`?_!==``:d===`single`?h!=null:g;let y=l||f||i,{buttonRef:b,getButtonProps:x}=jn({native:a,disabled:y}),{mounted:S,transitionStatus:C,setMounted:w}=At(v),T={disabled:y,visible:v,open:m,transitionStatus:C};Vn({open:v,ref:u.context.clearRef,onComplete(){v||w(!1)}});let E=X(`button`,e,{state:T,ref:[t,b,u.context.clearRef],props:[{tabIndex:-1,children:`x`,onMouseDown(e){e.preventDefault()},onClick(e){if(y||p)return;let t=u.context.keyboardActiveRef.current?ut:dt;u.context.setInputValue(``,Z(Xe,e.nativeEvent)),d===`none`?u.context.setIndices({activeIndex:null,type:t}):(u.context.setSelectedValue(Array.isArray(h)?[]:null,Z(Xe,e.nativeEvent)),u.context.setIndices({activeIndex:null,selectedIndex:null,type:t})),u.context.inputRef.current?.focus()}},c,x],stateAttributesMapping:Jre});return o||S?E:null});process.env.NODE_ENV!==`production`&&(Od.displayName=`ComboboxClear`);var kd=_.createContext(null);process.env.NODE_ENV!==`production`&&(kd.displayName=`GroupCollectionContext`);function Yre(){return _.useContext(kd)}function Xre(e){let{children:t,items:n}=e,r=_.useMemo(()=>({items:n}),[n]);return(0,L.jsx)(kd.Provider,{value:r,children:t})}function Ad(e){let{children:t}=e,{filteredItems:n}=yu(),r=Yre(),i=r?r.items:n;return(0,L.jsx)(_.Fragment,{children:i.map(t)})}var jd=_.forwardRef(function(e,t){var n;let{render:r,className:i,style:a,children:o,...s}=e,c=_u(),l=vu(),u=!!Sd(!0),{filteredItems:d,hasItems:f}=yu(),p=c.useState(`selectionMode`),m=c.useState(`grid`),h=c.useState(`readOnly`),g=c.useState(`listProps`),v=c.useState(`virtualized`),y=c.useState(`forceMounted`),b=p===`multiple`,x=d.length===0,S=T(e=>{c.set(`positionerElement`,e)}),C=T(e=>{c.set(`listElement`,e)}),w=_.useMemo(()=>typeof o==`function`?n||=(0,L.jsx)(Ad,{children:o}):o,[o]),E={empty:x},D=l.useState(`floatingId`),O=X(`div`,e,{state:E,ref:[t,C,u?null:S],props:[g,{children:w,tabIndex:-1,id:D,role:m?`grid`:`listbox`,"aria-multiselectable":b?`true`:void 0,"aria-readonly":!m&&h?!0:void 0,onKeyDown(e){if(!(c.state.disabled||c.state.readOnly)&&e.key===`Enter`){let t=c.state.activeIndex;if(t==null)return;ha(e),_d(c,t,e.nativeEvent)}},onKeyDownCapture(){c.context.keyboardActiveRef.current=!0},onPointerMoveCapture(){c.context.keyboardActiveRef.current=!1}},s]});if(v)return O;let k=f&&!y?void 0:c.context.labelsRef;return(0,L.jsx)(R,{elementsRef:c.context.listRef,labelsRef:k,children:O})});process.env.NODE_ENV!==`production`&&(jd.displayName=`ComboboxList`);var Zre=`⁠`;function Qre(e){let t=e.ownerDocument.createTreeWalker(e,NodeFilter.SHOW_TEXT),n=null;for(;t.nextNode();){let e=t.currentNode;e.nodeValue!==``&&(n=e)}return n}function Md(){let e=oa(),t=_.useRef(null);return _.useEffect(()=>{if(Yi)return;let n=t.current;if(n==null)return;let r=Qre(n);if(r==null)return;let i=r.data,a=`${i}${Zre}`;return r.nodeValue=a,e.start(200,()=>{r.nodeValue===a&&(r.nodeValue=i)}),()=>{e.clear(),r.nodeValue===a&&(r.nodeValue=i)}},[t,e]),t}var Nd=_.forwardRef(function(e,t){let{render:n,className:r,style:i,children:a,...o}=e;return X(`div`,e,{ref:[t,Md()],props:[{children:a,role:`status`,"aria-live":`polite`,"aria-atomic":!0},o]})});process.env.NODE_ENV!==`production`&&(Nd.displayName=`ComboboxStatus`);var Pd=_.createContext(void 0);process.env.NODE_ENV!==`production`&&(Pd.displayName=`ComboboxPortalContext`);function $re(){let e=_.useContext(Pd);if(e===void 0)throw Error(process.env.NODE_ENV===`production`?K(20):`Base UI: <Combobox.Portal> is missing.`);return e}var Fd=_.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e,i=_u(),a=i.useState(`mounted`),o=i.useState(`forceMounted`);return a||n||o?(0,L.jsx)(Pd.Provider,{value:n,children:(0,L.jsx)(Cs,{ref:t,...r})}):null});process.env.NODE_ENV!==`production`&&(Fd.displayName=`ComboboxPortal`);var eie=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0,offsetParent:d=`real`}=$a(e,t)||{};if(l==null)return{};let f=vo(u),p={x:n,y:r},m=ao(i),h=ro(m),g=await o.getDimensions(l),_=m===`y`,v=_?`top`:`left`,y=_?`bottom`:`right`,b=_?`clientHeight`:`clientWidth`,x=a.reference[h]+a.reference[m]-p[m]-a.floating[h],S=p[m]-a.reference[m],C=d===`real`?await o.getOffsetParent?.(l):s.floating,w=s.floating[b]||a.floating[h];(!w||!await o.isElement?.(C))&&(w=s.floating[b]||a.floating[h]);let T=x/2-S/2,E=w/2-g[h]/2-1,D=Math.min(f[v],E),O=Math.min(f[y],E),k=D,A=w-g[h]-O,j=w/2-g[h]/2+T,M=Qa(k,j,A),N=!c.arrow&&to(i)!=null&&j!==M&&a.reference[h]/2-(j<k?D:O)-g[h]/2<0,P=N?j<k?j-k:j-A:0;return{[m]:p[m]+P,data:{[m]:M,centerOffset:j-M-P,...N&&{alignmentOffset:P}},reset:N}}}),tie=(e,t)=>{let{name:n,fn:r}=eie(e);return{name:n,fn:r,options:[e,t]}},nie={name:`hide`,async fn(e){let{width:t,height:n,x:r,y:i}=e.rects.reference,a=t===0&&n===0&&r===0&&i===0,o=await e.platform.detectOverflow(e,{elementContext:`reference`});return{data:{referenceHidden:o.top-n>=0||o.right-t>=0||o.bottom-n>=0||o.left-t>=0||a}}}},Id={sideX:`left`,sideY:`top`},Ld=`--available-width`,Rd=`--available-height`,rie=`--anchor-width`,iie=`--anchor-height`,aie=`--transform-origin`,oie=`--positioner-width`,sie=`--positioner-height`,zd=Ld,Bd=Rd;function Vd(e,t,n){let r=e===`inline-start`||e===`inline-end`;return{top:`top`,right:r?n?`inline-start`:`inline-end`:`right`,bottom:`bottom`,left:r?n?`inline-end`:`inline-start`:`left`}[t]}function Hd(e,t,n){let{rects:r,placement:i}=e;return{side:Vd(t,eo(i),n),align:to(i)||`center`,anchor:{width:r.reference.width,height:r.reference.height},positioner:{width:r.floating.width,height:r.floating.height}}}function Ud(e){return Wd(e,mre)}function Wd(e,t){let{anchor:n,positionMethod:r=`absolute`,side:i=`bottom`,sideOffset:a=0,align:o=`center`,alignOffset:s=0,collisionBoundary:c,collisionPadding:l=5,sticky:u=!1,arrowPadding:d=5,disableAnchorTracking:f=!1,inline:p,keepMounted:m=!1,floatingRootContext:h,mounted:g,collisionAvoidance:v,shift:y,nodeId:b,adaptiveOrigin:x,lazyFlip:S=!1,externalTree:C}=e,[w,E]=_.useState(null);!g&&w!==null&&E(null);let D=v.side||`flip`,O=v.align||`flip`,k=v.fallbackAxisSide||`end`,A=y?.crossAxis??!1,j=y?.rootBoundary,N=typeof n==`function`?n:void 0,P=T(N),F=N?P:n,I=Fn(n),L=Fn(g),R=sd()===`rtl`,z=w||{top:`top`,right:`right`,bottom:`bottom`,left:`left`,"inline-end":R?`left`:`right`,"inline-start":R?`right`:`left`}[i],B=o===`center`?z:`${z}-${o}`,V=l;typeof V==`number`?V={top:V,right:V,bottom:V,left:V}:V&&={top:V.top||0,right:V.right||0,bottom:V.bottom||0,left:V.left||0};let H=+(i===`bottom`),U=+(i===`top`),W=+(i===`right`),G=+(i===`left`),K={boundary:c===`clipping-ancestors`?`clippingAncestors`:c,padding:V},q=_.useRef(null),J=Fn(a),ee=Fn(s),Y=typeof a==`function`?0:a,te=typeof s==`function`?0:s,ne=[];p&&ne.push(p),ne.push(Gne(e=>{let t=Hd(e,i,R),n=typeof J.current==`function`?J.current(t):J.current,r=typeof ee.current==`function`?ee.current(t):ee.current;return{mainAxis:n,crossAxis:r,alignmentAxis:r}},[Y,te,R,i]));let re=O===`none`&&D!==`shift`,ie=!re&&(u||A||D===`shift`),ae=D===`none`?null:Jne({...K,padding:{top:V.top+1+H,right:V.right+1+G,bottom:V.bottom+1+U,left:V.left+1+W},mainAxis:!A&&D===`flip`,crossAxis:O===`flip`&&`alignment`,fallbackAxisSideDirection:k}),oe=re?null:Kne({...K,rootBoundary:j,mainAxis:O!==`none`,crossAxis:ie,limiter:u||A?void 0:qne(e=>{if(!q.current)return{};let{width:t,height:n}=q.current.getBoundingClientRect(),r=io(eo(e.placement)),i=r===`y`?t:n,a=r===`y`?V.left+V.right:V.top+V.bottom;return{offset:i/2+a/2}})},[K,u,A,j,V,O]);D===`shift`||O===`shift`||o===`center`?ne.push(oe,ae):ne.push(ae,oe),ne.push(Yne({...K,apply({elements:{floating:e},availableWidth:t,availableHeight:n,rects:r}){if(!L.current)return;let i=e.style;i.setProperty(zd,`${t}px`),i.setProperty(Bd,`${n}px`);let a=nn(e).devicePixelRatio||1,{x:o,y:s,width:c,height:l}=r.reference,u=(Math.round((o+c)*a)-Math.round(o*a))/a,d=(Math.round((s+l)*a)-Math.round(s*a))/a;i.setProperty(rie,`${u}px`),i.setProperty(iie,`${d}px`)}}),tie(e=>({element:q.current||kn(e.elements.floating).createElement(`div`),padding:q.current?d:0,offsetParent:`floating`}),[d]),{name:`transformOrigin`,fn(e){let{elements:{floating:t},middlewareData:n,placement:r,platform:o,rects:s,y:c}=e,l=eo(r),u=to(r),d=io(l)===`y`,f=q.current,p=typeof a==`function`?a(Hd(e,i,R)):a,m;m=!f&&u&&Math.abs(d?n.shift?.x||0:n.shift?.y||0)<=1?u===`start`===(d&&o.isRTL?.(t)===!0)?`100%`:`0%`:`${(d?n.arrow?.x||0:n.arrow?.y||0)+(d?f?.clientWidth||0:f?.clientHeight||0)/2}px`;let h=l===`top`||l===`left`?`calc(100% + ${p}px)`:`${-p}px`;return ie&&d&&Math.abs(n.shift?.y||0)>p&&(h=`${s.reference.y+s.reference.height/2-c}px`),t.style.setProperty(aie,d?`${m} ${h}`:`${h} ${m}`),{}}},nie,x),M(()=>{!g&&h&&h.update({referenceElement:null,floatingElement:null,domReferenceElement:null,positionReference:null})},[g,h]);let se=_.useMemo(()=>({ancestorScroll:!f,elementResize:!f&&typeof ResizeObserver<`u`,layoutShift:!f&&typeof IntersectionObserver<`u`}),[f]),{refs:ce,elements:le,x:ue,y:de,middlewareData:fe,update:pe,placement:me,context:he,isPositioned:ge,floatingStyles:_e}=t({rootContext:h,open:m?g:void 0,placement:B,middleware:ne,strategy:r,whileElementsMounted:m?void 0:(...e)=>rc(...e,se),nodeId:b,externalTree:C}),{sideX:ve,sideY:ye}=fe.adaptiveOrigin||Id,be=ge?r:`fixed`,xe=_.useMemo(()=>{let e;return e=ge?x?{position:be,[ve]:ue,[ye]:de}:{..._e,position:be}:{position:be,top:0,left:0},e[zd]=`100vw`,e[Bd]=`100vh`,ge||(e.opacity=0),e},[x,be,ve,ue,ye,de,_e,ge]),Se=_.useRef(null);M(()=>{if(!g)return;let e=I.current,t=typeof e==`function`?e():e,n=(Gd(t)?t.current:t)||null;n!==Se.current&&(ce.setPositionReference(n),Se.current=n)},[g,ce,F,I]),_.useEffect(()=>{if(!g)return;let e=I.current;typeof e!=`function`&&Gd(e)&&e.current!==Se.current&&(ce.setPositionReference(e.current),Se.current=e.current)},[g,ce,F,I]),_.useEffect(()=>{if(m&&g&&le.reference&&le.floating)return rc(le.reference,le.floating,pe,se)},[m,g,le,pe,se]);let Ce=eo(me),we=Vd(i,Ce,R),Te=to(me)||`center`,Ee=!!fe.hide?.referenceHidden;M(()=>{S&&g&&ge&&Ce!==z&&E(Ce)},[S,g,ge,Ce,z]);let X=_.useMemo(()=>({position:`absolute`,top:fe.arrow?.y,left:fe.arrow?.x}),[fe.arrow]),De=fe.arrow?.centerOffset!==0;return _.useMemo(()=>({positionerStyles:xe,arrowStyles:X,arrowRef:q,arrowUncentered:De,side:we,align:Te,physicalSide:Ce,anchorHidden:Ee,refs:ce,context:he,isPositioned:ge,update:pe}),[xe,X,q,De,we,Te,Ce,Ee,ce,he,ge,pe])}function Gd(e){return e!=null&&`current`in e}function Kd(e){return e===`starting`?nne:j}function qd(e,t,{styles:n,transitionStatus:r,props:i,refs:a,hidden:o,inert:s=!1}){let c={...n};return s&&(c.pointerEvents=`none`),X(`div`,e,{state:t,ref:a,props:[{role:`presentation`,hidden:o,style:c},Kd(r),i],stateAttributesMapping:Da})}var cie=20;function Jd(e,t,n,r){let[i,a]=_.useState(!1);M(()=>{if(!e||!t||n==null){a(!1);return}let r=kn(n).documentElement.clientWidth,i=n.offsetWidth;a(r>0&&i>0&&i>=r-cie)},[e,t,n]),ma(e&&(!t||i),r)}var Yd=_.forwardRef(function(e,t){let{render:n,className:r,anchor:i,positionMethod:a,side:o,align:s,sideOffset:c,alignOffset:l,collisionBoundary:u=`clipping-ancestors`,collisionPadding:d,arrowPadding:f,sticky:p,disableAnchorTracking:m=!1,collisionAvoidance:h=_s,style:g,..._}=e,v=_u(),y=vu(),b=$re(),x=v.useState(`modal`),S=v.useState(`open`),C=v.useState(`mounted`),w=v.useState(`openMethod`),E=v.useState(`positionerElement`),D=v.useState(`triggerElement`),O=v.useState(`inputElement`),k=v.useState(`inputGroupElement`),A=v.useState(`inputInsidePopup`),j=v.useState(`transitionStatus`),N=md(),P=Ud({anchor:i??(A?D:k??O),floatingRootContext:y,positionMethod:a,mounted:C,side:o,sideOffset:c,align:s,alignOffset:l,arrowPadding:f,collisionBoundary:u,collisionPadding:d,sticky:p,disableAnchorTracking:m,keepMounted:b,collisionAvoidance:h,lazyFlip:!0});Jd(S&&x,w===`touch`,E,D);let F={open:S,side:P.side,align:P.align,anchorHidden:P.anchorHidden,empty:N};M(()=>{v.set(`popupSide`,P.side)},[v,P.side]);let I=T(e=>{v.set(`positionerElement`,e)}),R=qd(e,F,{styles:P.positionerStyles,transitionStatus:j,props:_,refs:[t,I],hidden:!C,inert:!S});return(0,L.jsxs)(xd.Provider,{value:P,children:[C&&x&&(0,L.jsx)(Zl,{inert:Xl(!S),cutout:k??O??D}),R]})});process.env.NODE_ENV!==`production`&&(Yd.displayName=`ComboboxPositioner`);var lie={...Da,...Vt},Xd=_.forwardRef(function(e,t){let{render:n,className:r,style:i,initialFocus:a,finalFocus:o,...s}=e,c=_u(),l=Sd(),u=vu(),d=c.useState(`mounted`),f=c.useState(`open`),p=c.useState(`openMethod`),m=c.useState(`popupProps`),h=c.useState(`transitionStatus`),g=c.useState(`inputInsidePopup`),v=c.useState(`inputElement`),y=c.useState(`modal`),b=c.useState(`id`),x=md(),S=s.id??(g?Zu(b):void 0);M(()=>(c.set(`popupId`,c.context.popupRef.current?.id||S),()=>{c.set(`popupId`,void 0)}),[c,S]),Vn({open:f,ref:c.context.popupRef,onComplete(){f&&c.context.onOpenChangeComplete(!0)}});let C=X(`div`,e,{state:{open:f,side:l.side,align:l.align,anchorHidden:l.anchorHidden,transitionStatus:h,empty:x},ref:[t,c.context.popupRef],props:[m,{id:S,role:g?`dialog`:`presentation`,onFocus(e){let t=xa(e.nativeEvent);p!==`touch`&&(ba(c.state.listElement,t)||t===e.currentTarget)&&c.context.inputRef.current?.focus()}},Kd(h),s],stateAttributesMapping:lie}),w=a===void 0?g?e=>e===`touch`?c.context.popupRef.current:v:!1:a,T;T=o??(g?void 0:!1);let E=!g||y;return(0,L.jsx)(Rs,{context:u,disabled:!d,modal:E,openInteractionType:p,initialFocus:w,returnFocus:T,getInsideElements:()=>[c.context.startDismissRef.current,c.context.endDismissRef.current],children:(0,L.jsxs)(_.Fragment,{children:[C,E&&(0,L.jsx)(Cd,{ref:c.context.endDismissRef})]})})});process.env.NODE_ENV!==`production`&&(Xd.displayName=`ComboboxPopup`);var Zd=_.createContext(void 0);process.env.NODE_ENV!==`production`&&(Zd.displayName=`ComboboxGroupContext`);function uie(){let e=_.useContext(Zd);if(e===void 0)throw Error(process.env.NODE_ENV===`production`?K(18):`Base UI: ComboboxGroupContext is missing. ComboboxGroup parts must be placed within <Combobox.Group>.`);return e}var Qd=_.forwardRef(function(e,t){let{render:n,className:r,style:i,items:a,...o}=e,s=_u().useState(`grid`),[c,l]=_.useState(),u=_.useMemo(()=>({labelId:c,setLabelId:l,items:a}),[c,l,a]),d=X(`div`,e,{ref:t,props:[{role:s?`rowgroup`:`group`,"aria-labelledby":c},o]}),f=(0,L.jsx)(Zd.Provider,{value:u,children:d});return a?(0,L.jsx)(Xre,{items:a,children:f}):f});process.env.NODE_ENV!==`production`&&(Qd.displayName=`ComboboxGroup`);var $d=_.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,...o}=e,{setLabelId:s}=uie(),c=He(a);return M(()=>(s(c),()=>{s(e=>e===c?void 0:e)}),[c,s]),X(`div`,e,{ref:t,props:[{id:c,"aria-hidden":!0},o]})});process.env.NODE_ENV!==`production`&&($d.displayName=`ComboboxGroupLabel`);var ef=_.createContext(void 0);process.env.NODE_ENV!==`production`&&(ef.displayName=`ComboboxItemContext`);function tf(){let e=_.useContext(ef);if(!e)throw Error(process.env.NODE_ENV===`production`?K(19):`Base UI: ComboboxItemContext is missing. ComboboxItem parts must be placed within <Combobox.Item>.`);return e}var nf=_.createContext(!1);process.env.NODE_ENV!==`production`&&(nf.displayName=`ComboboxRowContext`);function die(){return _.useContext(nf)}function rf(e){let{componentProps:t,forwardedRef:n,virtualized:r,indexFromFilter:i}=e,{render:a,className:o,style:s,value:c=null,index:l,disabled:u=!1,nativeButton:d=!1,...f}=t,p=_.useRef(null),m=Pt({guess:!0,index:l,textRef:p}),h=_u(),g=die(),v=xu(),y=h.useState(`selectionMode`),b=h.useState(`disabled`),x=h.useState(`readOnly`),S=h.useState(`isItemEqualToValue`),C=b||u,w=y!==`none`,T=l??i??m.index,E=T!==-1,D=h.useState(`id`),O=h.useState(`isActive`,T),k=h.useState(`isSelected`,c),A=h.useState(`itemProps`),j=_.useRef(null),N=D!=null&&E?`${D}-${T}`:void 0,P=k&&w;M(()=>{if(!E||!r&&l==null)return;let e=h.context.listRef.current;return e[T]=j.current,()=>{delete e[T]}},[E,r,T,l,h]),M(()=>{if(!E||v)return;let e=h.context.valuesRef.current;return e[T]=c,()=>{delete e[T]}},[E,v,T,c,h]),M(()=>{if(!E||v)return;let e=h.state.selectedValue,t=h.state.selectedIndex;h.state.selectionMode===`multiple`&&Array.isArray(e)?t=ku(T,c,h.context.valuesRef.current,e,S,t):wu(c,e,S)&&(t=T),h.set(`selectedIndex`,t)},[E,v,h,T,c,S]);let{getButtonProps:F,buttonRef:I}=jn({disabled:C,focusableWhenDisabled:!0,native:d,composite:!0}),R={disabled:C,selected:P,highlighted:O};function z(e){function t(){h.context.handleSelection(e,c)}h.state.submitOnItemClick?(Rn.flushSync(t),h.context.requestSubmit()):t()}let B={id:N,role:g?`gridcell`:`option`,"aria-selected":w?P:void 0,tabIndex:void 0,onPointerDownCapture(e){e.isPrimary&&(h.context.pointerDownItemRef.current=e.currentTarget),e.preventDefault()},onMouseDown(e){e.preventDefault()},onClick(e){C||x||z(e.nativeEvent)},onMouseUp(e){let t=h.context.pointerDownItemRef.current===e.currentTarget;h.context.pointerDownItemRef.current=null,!(C||x||e.button!==0||t||!O)&&z(e.nativeEvent)}},V=X(`div`,t,{ref:[I,n,m.ref,j],state:R,props:[A,B,f,F]}),H=_.useMemo(()=>({selected:P,textRef:p}),[P,p]);return(0,L.jsx)(ef.Provider,{value:H,children:V})}function fie(e){let{componentProps:t,forwardedRef:n}=e,r=_u().useState(`isItemEqualToValue`),{flatFilteredValues:i}=yu(),a=Du(i,t.value??null,r);return(0,L.jsx)(rf,{componentProps:t,forwardedRef:n,virtualized:!0,indexFromFilter:a})}var af=_.memo(_.forwardRef(function(e,t){let n=_u().useState(`virtualized`);return n&&e.index==null?(0,L.jsx)(fie,{componentProps:e,forwardedRef:t}):(0,L.jsx)(rf,{componentProps:e,forwardedRef:t,virtualized:n,indexFromFilter:void 0})}));process.env.NODE_ENV!==`production`&&(af.displayName=`ComboboxItem`);var of=af,sf=_.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,o=X(`div`,e,{ref:t,props:[{role:`row`},a]});return(0,L.jsx)(nf.Provider,{value:!0,children:o})});process.env.NODE_ENV!==`production`&&(sf.displayName=`ComboboxRow`);var cf=_.forwardRef(function(e,t){let{render:n,className:r,style:i,children:a,...o}=e,{filteredItems:s}=yu(),c=_u(),l=Md(),u=s.length===0?a:null;return X(`div`,e,{ref:[t,c.context.emptyRef,l],props:[{children:u,role:`status`,"aria-live":`polite`,"aria-atomic":!0},o]})});process.env.NODE_ENV!==`production`&&(cf.displayName=`ComboboxEmpty`);function pie(){return yu().filteredItems}var lf=_.createContext(void 0);process.env.NODE_ENV!==`production`&&(lf.displayName=`AvatarRootContext`);function uf(){let e=_.useContext(lf);if(e===void 0)throw Error(process.env.NODE_ENV===`production`?K(13):`Base UI: AvatarRootContext is missing. Avatar parts must be placed within <Avatar.Root>.`);return e}var df={imageLoadingStatus:()=>null},ff=_.forwardRef(function(e,t){let{className:n,render:r,style:i,...a}=e,[o,s]=_.useState(`idle`),c={imageLoadingStatus:o},l=_.useMemo(()=>({imageLoadingStatus:o,setImageLoadingStatus:s}),[o,s]),u=X(`span`,e,{state:c,ref:t,props:a,stateAttributesMapping:df});return(0,L.jsx)(lf.Provider,{value:l,children:u})});process.env.NODE_ENV!==`production`&&(ff.displayName=`AvatarRoot`);function mie(e,{referrerPolicy:t,crossOrigin:n,sizes:r,srcSet:i},a){let o=_.useState(`idle`),s=o[1];return M(()=>{if(!a)return k;if(!e&&!i)return s(`error`),k;let o=!0,c=new window.Image,l=e=>()=>{o&&s(e)};return s(`loading`),c.onload=l(`loaded`),c.onerror=l(`error`),t&&(c.referrerPolicy=t),c.crossOrigin=n??null,r&&(c.sizes=r),i&&(c.srcset=i),e&&(c.src=e),c.complete&&s(c.naturalWidth>0?`loaded`:`error`),()=>{o=!1}},[a,e,i,r,n,t,s]),o}var hie={...df,...Vt},pf=_.forwardRef(function(e,t){let{className:n,render:r,onLoadingStatusChange:i,keepMounted:a=!1,style:o,sizes:s,srcSet:c,src:l,...u}=e,{setImageLoadingStatus:d}=uf(),[f,p]=mie(l,e,!a),m=f===`loaded`,{mounted:h,transitionStatus:g,setMounted:v}=At(m),y=_.useRef(null),b=_.useRef(!0);M(()=>{if(!a)return;let e=b.current;b.current=!1;let t=y.current;if(!t)return;if(!t.complete){p(`loading`);return}let n=t.naturalWidth>0?`loaded`:`error`;p(n),n===`loaded`&&e&&v(!0)},[a,l,c,s,u.crossOrigin,u.referrerPolicy,r,p,v]);let x=a?{"data-loading":f===`loading`?``:void 0,"data-error":f===`error`?``:void 0,"aria-hidden":f!==`loaded`||void 0,onLoad(){p(`loaded`)},onError(){p(`error`)}}:void 0,S=T(e=>{i?.(e),d(e)});M(()=>{f!==`idle`&&S(f)},[f,S]),M(()=>()=>d(`idle`),[d]),Vn({enabled:!m,open:m,ref:y,onComplete(){m||v(!1)}});let C={imageLoadingStatus:f,transitionStatus:a&&g===`ending`?void 0:g},w=a||h,E={};s!==void 0&&(E.sizes=s),c!==void 0&&(E.srcSet=c),l!==void 0&&(E.src=l);let D=X(`img`,e,{state:C,ref:[t,y],props:[x,u,E],stateAttributesMapping:hie,enabled:w});return w?D:null});process.env.NODE_ENV!==`production`&&(pf.displayName=`AvatarImage`);var mf=_.forwardRef(function(e,t){let{className:n,render:r,delay:i=0,style:a,...o}=e,{imageLoadingStatus:s}=uf(),[c,l]=_.useState(i===0),u=oa();return _.useEffect(()=>(i>0?u.start(i,()=>l(!0)):l(!0),u.clear),[u,i]),X(`span`,e,{state:{imageLoadingStatus:s},ref:t,props:o,stateAttributesMapping:df,enabled:s!==`loaded`&&(i===0||c)})});process.env.NODE_ENV!==`production`&&(mf.displayName=`AvatarFallback`);var hf=_.forwardRef(function(e,t){let{render:n,className:r,disabled:i=!1,focusableWhenDisabled:a=!1,nativeButton:o=!0,style:s,...c}=e,{getButtonProps:l,buttonRef:u}=jn({disabled:i,focusableWhenDisabled:a,native:o});return X(`button`,e,{state:{disabled:i},ref:[t,u],props:[c,l]})});process.env.NODE_ENV!==`production`&&(hf.displayName=`Button`);function gie(e){if(!e)return null;for(let t of e.elements){let e=t.tagName;if(e===`BUTTON`||e===`INPUT`){let e=t;if(e.type===`submit`)return e}}return null}var _ie=`data-checked`,vie=`data-unchecked`;function gf(e){return{checked(t){return e.indeterminate?{}:t?{[_ie]:``}:{[vie]:``}},...Vu}}var _f=_.createContext({disabled:!1});process.env.NODE_ENV!==`production`&&(_f.displayName=`FieldItemContext`);function vf(){return _.useContext(_f)}function yf(e,t,n,r=!0,i){let[a,o]=_.useState(),s=He(i?`${i}-label`:void 0),c=e??t??a;return M(()=>{let i=e||t||!r?void 0:yie(n.current,s);a!==i&&o(i)}),c}function yie(e,t){let n=bie(e);if(n)return!n.id&&t&&(n.id=t),n.id||void 0}function bie(e){if(!e)return;let t=e.parentElement;if(t&&t.tagName===`LABEL`)return t;let n=e.id;if(n){let t=e.nextElementSibling;if(t&&t.htmlFor===n)return t}let r=e.labels;return r&&r[0]}var bf=_.createContext(void 0);process.env.NODE_ENV!==`production`&&(bf.displayName=`CheckboxGroupContext`);function xie(){return _.useContext(bf)}var xf=_.createContext(void 0);process.env.NODE_ENV!==`production`&&(xf.displayName=`CheckboxRootContext`);function Sie(){let e=_.useContext(xf);if(e===void 0)throw Error(process.env.NODE_ENV===`production`?K(14):`Base UI: CheckboxRootContext is missing. Checkbox parts must be placed within <Checkbox.Root>.`);return e}var Cie=`data-parent`,Sf=_.forwardRef(function(e,t){let{checked:n,className:r,defaultChecked:i=!1,"aria-labelledby":a,disabled:o=!1,form:s,id:c,indeterminate:l=!1,inputRef:u,name:d,onCheckedChange:f,parent:p=!1,readOnly:m=!1,render:h,required:g=!1,uncheckedValue:y,value:b,nativeButton:x=!1,style:S,...C}=e,{clearErrors:w}=qu(),{disabled:T,name:E,setDirty:D,setFilled:O,setFocused:k,setTouched:A,state:N,validationMode:P,validityData:F,validation:I}=Wu(),R=vf(),{labelId:z,registerControlId:B,getDescriptionProps:V}=Yu(),H=xie(),U=H?.allValues===void 0?void 0:H.parent,W=U!==void 0,G=T||R.disabled||H?.disabled||o,K=E??d,q=b??K,J=He(),Y=H?.registerControlId!==B,te=Xu({id:c||void 0,enabled:Y}),ne=x?te:J,re={};W&&(p?re=U.getParentProps():q!==void 0&&(re=U.getChildProps(q)));let{checked:ie=n,indeterminate:ae=l,onCheckedChange:oe,...se}=re,ce=H?.value,le=_.useRef(null),{getButtonProps:ue,buttonRef:de}=jn({disabled:G,native:x}),fe=H?.validation??I,[me,he]=v({controlled:q!==void 0&&ce!==void 0&&!p?ce.includes(q):ie,default:i,name:`Checkbox`,state:`checked`}),ge=W?!!ie:me,_e=W&&ae||l;Gu(le,J,me,void 0,!H&&!G,d);let ve=U?.registerChildId,ye=_.useRef(null),be=fe.registerInput,xe=H?q:void 0,Se=_.useCallback(e=>be(e,{controlRef:le,value:xe}),[be,xe]),Ce=ee(u,ye,p?void 0:Se),we=yf(a,z,ye,!x,te);M(()=>{ye.current&&(ye.current.indeterminate=_e),H||O(me)},[me,_e,H,O]),eu(me,()=>{H||(w(K),D(me!==F.initialValue),fe.change(me))});let Te=pe({checked:me,disabled:G,form:s,name:p?void 0:K,id:x?void 0:te,required:g,ref:Ce,style:K?Wa:Ua,tabIndex:-1,type:`checkbox`,"aria-hidden":!0,onChange(e){if(e.nativeEvent.defaultPrevented)return;if(m){e.preventDefault();return}let t=e.currentTarget.checked,n=Z(Ue,e.nativeEvent);if(f?.(t,n),!n.isCanceled&&(oe?.(t,n),!n.isCanceled&&(he(t),q!==void 0&&H!==void 0&&!p&&!W))){let e=t?[...H.value,q]:H.value.filter(e=>e!==q);H.setValue(e,n)}},onClick(e){e.stopPropagation()},onFocus(){le.current?.focus()}},b===void 0?j:{value:(H?me&&b:b)||``},V,e=>fe.getValidationProps(G,e));_.useEffect(()=>{if(!U||q===void 0)return;let e=U.disabledStatesRef.current;return e.set(q,G),()=>{e.delete(q)}},[U,G,q]);let Ee=_.useMemo(()=>({...N,checked:ge,disabled:G,readOnly:m,required:g,indeterminate:_e}),[N,ge,G,m,g,_e]),De=gf(Ee),Oe=X(`span`,e,{state:Ee,ref:[de,le,t],props:[{id:ne,role:`checkbox`,"aria-checked":_e?`mixed`:ge,"aria-readonly":m||void 0,"aria-required":g||void 0,"aria-labelledby":we,[Cie]:p?``:void 0,onFocus(){G||k(!0)},onBlur(){let e=ye.current;e&&(A(!0),k(!1),P===`onBlur`&&fe.commit(H?ce:e.checked))},onKeyDown(e){if(e.key!==`Enter`||(e.preventBaseUIHandler(),e.defaultPrevented))return;let t=ye.current?.form??null,n=e.currentTarget,r=e.nativeEvent,i=e.preventDefault,a=r.preventDefault,o=!1;e.preventDefault=()=>{o=!0,i.call(e)},r.preventDefault=()=>{o=!0,a.call(r)},a.call(r),nn(n).queueMicrotask(()=>{e.preventDefault=i,r.preventDefault=a,o||gie(t)?.click()})},onClick(e){if(m||G)return;e.preventDefault();let t=ye.current;t&&An(t,e)}},C,se,ue,V,e=>fe.getValidationProps(G,e)],stateAttributesMapping:De}),ke=Oe.props.id;return M(()=>{if(ve&&!p&&q!==void 0&&ke!==void 0)return ve(q,ke)},[ve,p,q,ke]),(0,L.jsxs)(xf.Provider,{value:Ee,children:[Oe,!me&&!H&&K&&!p&&y!==void 0&&(0,L.jsx)(`input`,{type:`hidden`,form:s,name:K,value:y,disabled:G}),(0,L.jsx)(`input`,{...Te,suppressHydrationWarning:!0})]})});process.env.NODE_ENV!==`production`&&(Sf.displayName=`CheckboxRoot`);var Cf=_.forwardRef(function(e,t){let{render:n,className:r,style:i,keepMounted:a=!1,...o}=e,s=Sie(),c=s.checked||s.indeterminate,{mounted:l,transitionStatus:u,setMounted:d}=At(c),f=_.useRef(null),p={...s,transitionStatus:u};Vn({batch:!0,enabled:!c,open:c,ref:f,onComplete(){c||d(!1)}});let m={...gf(s),...Vt},h=a||l,g=X(`span`,e,{ref:[t,f],state:p,stateAttributesMapping:m,props:o});return h?g:null});process.env.NODE_ENV!==`production`&&(Cf.displayName=`CheckboxIndicator`),Object.keys(zu);function wf(e,t){return e.matches(`:disabled`)?!1:!t||e.form===t||e.form===null&&!e.hasAttribute(`form`)}function wie(e){let{allValues:t=A,value:n,onValueChange:r}=e,i=_.useRef(n),a=_.useRef(new Map),[o,s]=_.useState(`mixed`),[c,l]=_.useState(()=>({registry:new Map})),u=n.length===t.length,d=n.length!==t.length&&n.length>0,f=T(r),p=T((e,t)=>{let n=c.registry,r=n.get(e);return r?.includes(t)||(n.set(e,r?r.concat(t):[t]),l({registry:n})),()=>{let r=n.get(e);if(!r?.includes(t))return;let i=r.filter(e=>e!==t);i.length===0?n.delete(e):n.set(e,i),l({registry:n})}}),m=_.useCallback(()=>({indeterminate:d,checked:u,"aria-controls":t.flatMap(e=>c.registry.get(e)??A).join(` `)||void 0,onCheckedChange(e,r){let c=i.current,l=t.filter(e=>a.current.get(e)&&c.includes(e)),u=t.filter(e=>!a.current.get(e)||c.includes(e));if(c.length===u.length||c.length===0){n.length===u.length?f(l,r):f(u,r);return}let d=`mixed`,p=c;o===`mixed`?(d=`on`,p=u):o===`on`&&(d=`off`,p=l),f(p,r),r.isCanceled||s(d)}}),[t,u,c,d,f,o,n.length]),h=_.useCallback(e=>({checked:n.includes(e),onCheckedChange(t,r){let a=n.slice();t?a.push(e):a.splice(a.indexOf(e),1),f(a,r),r.isCanceled||(i.current=a,s(`mixed`))}}),[f,n]);return _.useMemo(()=>({getParentProps:m,getChildProps:h,registerChildId:p,disabledStatesRef:a}),[m,h,p])}var Tf=_.forwardRef(function(e,t){let{allValues:n,className:r,defaultValue:i,disabled:a=!1,id:o,onValueChange:s,render:c,value:l,style:u,...d}=e,{disabled:f,name:p,state:m,validation:h,setFilled:g,setDirty:y,validityData:b}=Wu(),{labelId:x,registerControlId:S,getDescriptionProps:C}=Yu(),{clearErrors:w,elementRef:E}=qu(),D=f||a,[O,k]=v({controlled:l,default:i??A,name:`CheckboxGroup`,state:`value`}),j=T((e,t)=>{s?.(e,t),!t.isCanceled&&k(e)}),N=wie({allValues:n,value:O,onValueChange:j});Xu({id:null});let P=He(o),F=h.getInputControl;Gu(_.useMemo(()=>({get current(){return F()}}),[F]),P,O,T(()=>{let e=E.current;if(!e)return O;let t=new Set;for(let[n,r]of h.registeredInputs)r.value!==void 0&&n.checked&&wf(n,e)&&t.add(r.value);return O.filter(e=>t.has(e))}),!!p&&!D,p),M(()=>{g(O.length>0)},[O,g]),eu(O,()=>{p&&w(p);let e=Array.isArray(b.initialValue)?b.initialValue:A;y(!Su(O,e)),h.change(O)});let I={...m,disabled:D},R=_.useMemo(()=>({allValues:n,value:O,setValue:j,parent:N,disabled:D,validation:h,registerControlId:S}),[n,O,j,N,D,h,S]),z=X(`div`,e,{state:I,ref:t,props:[{id:o,role:`group`,"aria-labelledby":x},d,C],stateAttributesMapping:Vu});return(0,L.jsx)(bf.Provider,{value:R,children:z})});process.env.NODE_ENV!==`production`&&(Tf.displayName=`CheckboxGroup`);var Ef={...Yt,...Vt},Df=_.forwardRef(function(e,t){let{render:n,className:r,defaultOpen:i=!1,disabled:a=!1,onOpenChange:o,open:s,style:c,...l}=e,u=T(o),d=jt({open:s,defaultOpen:i,onOpenChange:u,disabled:a}),f=_.useMemo(()=>({open:d.open,disabled:d.disabled,transitionStatus:d.transitionStatus}),[d.open,d.disabled,d.transitionStatus]),p=_.useMemo(()=>({...d,onOpenChange:u,state:f}),[d,u,f]),m=X(`div`,e,{state:f,ref:t,props:l,stateAttributesMapping:Ef});return(0,L.jsx)(Mt.Provider,{value:p,children:m})});process.env.NODE_ENV!==`production`&&(Df.displayName=`CollapsibleRoot`);var Tie={...Jt,...Vt},Of=_.forwardRef(function(e,t){let{panelId:n,open:r,handleTrigger:i,state:a,disabled:o}=Nt(),{className:s,disabled:c=o,render:l,nativeButton:u=!0,style:d,...f}=e,{getButtonProps:p,buttonRef:m}=jn({disabled:c,focusableWhenDisabled:!0,native:u});return X(`button`,e,{state:a,ref:[t,m],props:[{"aria-controls":r?n:void 0,"aria-expanded":r,onClick:i},f,p],stateAttributesMapping:Tie})});process.env.NODE_ENV!==`production`&&(Of.displayName=`CollapsibleTrigger`);var Eie=`--collapsible-panel-height`,Die=`--collapsible-panel-width`,kf=_.forwardRef(function(e,t){let{className:n,hiddenUntilFound:r,keepMounted:i,render:a,id:o,style:s,...c}=e;process.env.NODE_ENV!==`production`&&_.useEffect(()=>{r&&i===!1&&O("The `keepMounted={false}` prop on `Collapsible.Panel` is ignored when `hiddenUntilFound` is enabled, since the panel must remain mounted while closed.")},[r,i]);let{defaultPanelId:l,mounted:u,onOpenChange:d,open:f,setMounted:p,setPanelIdState:m,setOpen:h,state:g,transitionStatus:v}=Nt(),y=r??!1,b=i??!1,x=o||void 0,S=x??l;M(()=>(m(e=>x??(e===null?void 0:e)),()=>{m(e=>e===x?null:e)}),[x,m]);let{height:C,props:w,ref:T,shouldPreventOpenAnimation:E,shouldRender:D,transitionStatus:k,width:A}=Un({externalRef:t,hiddenUntilFound:y,id:S,keepMounted:b,mounted:u,onOpenChange:d,open:f,setMounted:p,setOpen:h,transitionStatus:v}),j={...g,transitionStatus:k},N=de(s,j),P=X(`div`,{...e,style:void 0},{state:j,ref:T,props:[w,{style:{[Eie]:C===void 0?`auto`:`${C}px`,[Die]:A===void 0?`auto`:`${A}px`}},c,N?{style:N}:void 0,E?{style:{animationName:`none`}}:void 0],stateAttributesMapping:Ef});return D?P:null});process.env.NODE_ENV!==`production`&&(kf.displayName=`CollapsiblePanel`);function Oie(e){let{multiple:t=!1,defaultValue:n,value:r,onValueChange:i,autoComplete:a,...o}=e;return(0,L.jsx)(cd,{...o,selectionMode:t?`multiple`:`single`,selectedValue:r,defaultSelectedValue:n,onSelectedValueChange:i,formAutoComplete:a})}function kie(e,t){let n=He(e);return M(()=>(t(n),()=>{t(e=>e===n?void 0:e)}),[n,t]),n}function Af(e){let{children:t,placeholder:n}=e,r=_u(),i=r.useState(`itemToStringLabel`),a=r.useState(`selectedValue`),o=r.useState(`items`),s=r.useState(`selectionMode`)===`multiple`,c=r.useState(`hasSelectedValue`),l=!c&&n!=null&&t==null,u=r.useState(`hasNullItemLabel`,l),d=null;return d=typeof t==`function`?t(a):t??(!c&&n!=null&&!u?n:s&&Array.isArray(a)?Ru(a,o,i):Lu(a,o,i)),(0,L.jsx)(_.Fragment,{children:d})}var jf=_.forwardRef(function(e,t){let{selected:n}=tf();return e.keepMounted||n?(0,L.jsx)(Mf,{...e,ref:t}):null});process.env.NODE_ENV!==`production`&&(jf.displayName=`ComboboxItemIndicator`);var Mf=_.memo(_.forwardRef((e,t)=>{let{render:n,className:r,style:i,keepMounted:a,...o}=e,{selected:s}=tf(),c=_.useRef(null),{transitionStatus:l,setMounted:u}=At(s),d=X(`span`,e,{ref:[t,c],state:{selected:s,transitionStatus:l},props:[{"aria-hidden":!0,children:`✔️`},o],stateAttributesMapping:Vt});return Vn({batch:!0,enabled:!s,open:s,ref:c,onComplete(){s||u(!1)}}),d}));process.env.NODE_ENV!==`production`&&(Mf.displayName=`Inner`);var Nf=_.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,o=_u(),s=o.useState(`open`),c=o.useState(`hasSelectionChips`),[l,u]=_.useState(void 0);s&&l!==void 0&&u(void 0);let d=_.useRef([]),f=X(`div`,e,{ref:[t,o.context.chipsContainerRef],props:[c?{role:`toolbar`}:j,{onMouseDown(e){Td(e,o,o.state.disabled)}},a]}),p=_.useMemo(()=>({highlightedChipIndex:l,setHighlightedChipIndex:u,chipsRef:d}),[l,u,d]);return(0,L.jsx)(yd.Provider,{value:p,children:(0,L.jsx)(R,{elementsRef:d,children:f})})});process.env.NODE_ENV!==`production`&&(Nf.displayName=`ComboboxChips`);var Pf=_.createContext(void 0);process.env.NODE_ENV!==`production`&&(Pf.displayName=`ComboboxChipContext`);function Aie(){let e=_.useContext(Pf);if(!e)throw Error(process.env.NODE_ENV===`production`?K(17):`Base UI: ComboboxChipContext is missing. ComboboxChip parts must be placed within <Combobox.Chip>.`);return e}var Ff=_.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,o=_u(),{setHighlightedChipIndex:s,chipsRef:c}=bd(),l=sd(),u=o.useState(`disabled`),d=o.useState(`readOnly`),f=o.useState(`selectedValue`),{ref:p,index:m}=Pt();function h(e){let t=m,[n,r]=hd(l);return e.key===n?(e.preventDefault(),t=m>0?m-1:void 0):e.key===r?(e.preventDefault(),t=m<c.current.length-1?m+1:void 0):e.key===`Backspace`||e.key===`Delete`?(t=gd(m,f.length),ha(e),o.context.setIndices({activeIndex:null,selectedIndex:null,type:ut}),o.context.setSelectedValue(f.filter((e,t)=>t!==m),Z(Ue,e.nativeEvent))):e.key===`Enter`||e.key===` `?(ha(e),t=void 0):e.key===`ArrowDown`||e.key===`ArrowUp`?(ha(e),o.context.setOpen(!0,Z(lt,e.nativeEvent)),t=void 0):e.key.length===1&&!e.ctrlKey&&!e.metaKey&&!e.altKey&&(t=void 0),t}let g=X(`div`,e,{ref:[t,p],state:{disabled:u},props:[{tabIndex:-1,"aria-disabled":u||void 0,"aria-readonly":d||void 0,onKeyDown(e){if(u||d)return;let t=h(e);Rn.flushSync(()=>{s(t)}),t===void 0?o.context.inputRef.current?.focus():c.current[t]?.focus()}},a]}),v=_.useMemo(()=>({index:m}),[m]);return(0,L.jsx)(Pf.Provider,{value:v,children:g})});process.env.NODE_ENV!==`production`&&(Ff.displayName=`ComboboxChip`);var If=_.forwardRef(function(e,t){let{render:n,className:r,disabled:i=!1,nativeButton:a=!0,style:o,...s}=e,c=_u(),{index:l}=Aie(),u=c.useState(`disabled`),d=c.useState(`readOnly`),f=c.useState(`selectedValue`),p=c.useState(`isItemEqualToValue`),m=u||i,{buttonRef:h,getButtonProps:g}=jn({native:a,disabled:m||d,focusableWhenDisabled:!0}),_={disabled:m};function v(e){let t=c.state.activeIndex;if(t==null)return;let n=Du(c.context.valuesRef.current,e,p);n!==-1&&t===n&&c.context.setIndices({activeIndex:null,type:c.context.keyboardActiveRef.current?ut:dt})}function y(e){let t=Z(Ze,e.nativeEvent),n=f[l];return v(n),c.context.setSelectedValue(f.filter((e,t)=>t!==l),t),c.context.inputRef.current?.focus(),t}return X(`button`,e,{ref:[t,h],state:_,props:[{tabIndex:-1,onMouseDown(e){e.preventDefault()},onClick(e){y(e).isPropagationAllowed||e.stopPropagation()},onKeyDown(e){(e.key===`Enter`||e.key===` `)&&(y(e).isPropagationAllowed||ha(e))}},s,g]})});process.env.NODE_ENV!==`production`&&(If.displayName=`ComboboxChipRemove`);var Lf=_.createContext(void 0);process.env.NODE_ENV!==`production`&&(Lf.displayName=`ContextMenuRootContext`);function Rf(e=!0){let t=_.useContext(Lf);if(t===void 0&&!e)throw Error(process.env.NODE_ENV===`production`?K(25):`Base UI: ContextMenuRootContext is missing. ContextMenu parts must be placed within <ContextMenu.Root>.`);return t}var zf=_.createContext(void 0);process.env.NODE_ENV!==`production`&&(zf.displayName=`MenuPositionerContext`);function Bf(e){let t=_.useContext(zf);if(t===void 0&&!e)throw Error(process.env.NODE_ENV===`production`?K(33):`Base UI: MenuPositionerContext is missing. MenuPositioner parts must be placed within <Menu.Positioner>.`);return t}var Vf=_.createContext(void 0);process.env.NODE_ENV!==`production`&&(Vf.displayName=`MenuRootContext`);function Hf(e){let t=_.useContext(Vf);if(t===void 0&&!e)throw Error(process.env.NODE_ENV===`production`?K(36):`Base UI: MenuRootContext is missing. Menu parts must be placed within <Menu.Root>.`);return t}var Uf=_.createContext(void 0);process.env.NODE_ENV!==`production`&&(Uf.displayName=`MenuCheckboxItemContext`);function Wf(){let e=_.useContext(Uf);if(e===void 0)throw Error(process.env.NODE_ENV===`production`?K(30):`Base UI: MenuCheckboxItemContext is missing. MenuCheckboxItem parts must be placed within <Menu.CheckboxItem>.`);return e}function Gf(e){let{closeOnClick:t,highlighted:n,id:r,nodeId:i,store:a,typingRef:o,itemRef:s,itemMetadata:c}=e,{events:l}=a.useState(`floatingTreeRoot`),u=a.useState(`open`),d=Rf(!0),f=d!==void 0;return _.useMemo(()=>({id:r,role:`menuitem`,tabIndex:u&&n?0:-1,onKeyDown(e){e.key===` `&&o?.current&&e.preventDefault()},onMouseMove(e){i&&l.emit(`itemhover`,{nodeId:i,target:e.currentTarget})},onClick(e){t&&l.emit(`close`,{domEvent:e,reason:Je})},onMouseUp(e){if(d){let t=d.initialCursorPointRef.current;if(d.initialCursorPointRef.current=null,f&&t&&Math.abs(e.clientX-t.x)<=1&&Math.abs(e.clientY-t.y)<=1||f&&!Qi&&e.button===2)return}s.current&&a.context.allowMouseUpTriggerRef.current&&(!f||e.button===2)&&c.type===`regular-item`&&An(s.current,e,{detail:1})}}),[t,n,r,l,i,u,a,o,s,d,f,c])}var Kf={type:`regular-item`};function qf(e){let{closeOnClick:t,disabled:n,highlighted:r,id:i,store:a,typingRef:o=a.context.typingRef,nativeButton:s,itemMetadata:c,nodeId:l}=e,u=_.useRef(null),{getButtonProps:d,buttonRef:f}=jn({disabled:n,focusableWhenDisabled:!0,native:s,composite:!0}),p=Gf({closeOnClick:t,highlighted:r,id:i,nodeId:l,store:a,typingRef:o,itemRef:u,itemMetadata:c}),m=_.useCallback(e=>pe(p,{onMouseEnter(){c.type===`submenu-trigger`&&c.setActive()}},e,d),[p,d,c]),h=ee(u,f);return _.useMemo(()=>({getItemProps:m,itemRef:h}),[m,h])}var Jf=`data-checked`,Yf=`data-unchecked`,Xf={checked(e){return e?{[Jf]:``}:{[Yf]:``}},...Vt},Zf=_.forwardRef(function(e,t){let{render:n,className:r,id:i,label:a,nativeButton:o=!1,disabled:s=!1,closeOnClick:c=!1,checked:l,defaultChecked:u,onCheckedChange:d,style:f,...p}=e,m=Pt({guess:!0,label:a}),h=Bf(!0),g=He(i),{store:y}=Hf(),b=y.useState(`disabled`),x=s||b,S=y.useState(`isActive`,m.index),C=y.useState(`itemProps`),[w,T]=v({controlled:l,default:u??!1,name:`MenuCheckboxItem`,state:`checked`}),{getItemProps:E,itemRef:D}=qf({closeOnClick:c,disabled:x,highlighted:S,id:g,store:y,nativeButton:o,nodeId:h?.context.nodeId,itemMetadata:Kf}),O=_.useMemo(()=>({disabled:x,highlighted:S,checked:w}),[x,S,w]);function A(e){let t=Z(Je,e.nativeEvent,void 0,{preventUnmountOnClose:k});d?.(!w,t),!t.isCanceled&&T(e=>!e)}let j=X(`div`,e,{state:O,stateAttributesMapping:Xf,props:[C,{role:`menuitemcheckbox`,"aria-checked":w,onClick:A},p,E],ref:[D,t,m.ref]});return(0,L.jsx)(Uf.Provider,{value:O,children:j})});process.env.NODE_ENV!==`production`&&(Zf.displayName=`MenuCheckboxItem`);var Qf=_.forwardRef(function(e,t){let{render:n,className:r,style:i,keepMounted:a=!1,...o}=e,s=Wf(),c=_.useRef(null),{transitionStatus:l,mounted:u,setMounted:d}=At(s.checked);return Vn({batch:!0,enabled:!s.checked,open:s.checked,ref:c,onComplete(){s.checked||d(!1)}}),X(`span`,e,{state:{checked:s.checked,disabled:s.disabled,highlighted:s.highlighted,transitionStatus:l},ref:[t,c],stateAttributesMapping:Xf,props:{"aria-hidden":!0,...o},enabled:a||u})});process.env.NODE_ENV!==`production`&&(Qf.displayName=`MenuCheckboxItemIndicator`);var $f=_.createContext(void 0);process.env.NODE_ENV!==`production`&&($f.displayName=`MenuGroupContext`);function ep(){let e=_.useContext($f);if(e===void 0)throw Error(process.env.NODE_ENV===`production`?K(31):`Base UI: MenuGroupContext is missing. Menu group parts must be used within <Menu.Group> or <Menu.RadioGroup>.`);return e}var tp=_.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,[o,s]=_.useState(void 0),c=X(`div`,e,{ref:t,props:{role:`group`,"aria-labelledby":o,...a}});return(0,L.jsx)($f.Provider,{value:s,children:c})});process.env.NODE_ENV!==`production`&&(tp.displayName=`MenuGroup`);var np=_.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,...o}=e,s=He(a),c=ep();return M(()=>(c(s),()=>{c(e=>e===s?void 0:e)}),[c,s]),X(`div`,e,{ref:t,props:{id:s,"aria-hidden":!0,...o}})});process.env.NODE_ENV!==`production`&&(np.displayName=`MenuGroupLabel`);var rp=_.forwardRef(function(e,t){let{render:n,className:r,id:i,label:a,nativeButton:o=!1,disabled:s=!1,closeOnClick:c=!0,style:l,...u}=e,d=Pt({guess:!0,label:a}),f=Bf(!0),p=He(i),{store:m}=Hf(),h=m.useState(`disabled`),g=s||h,_=m.useState(`isActive`,d.index),v=m.useState(`itemProps`),{getItemProps:y,itemRef:b}=qf({closeOnClick:c,disabled:g,highlighted:_,id:p,store:m,nativeButton:o,nodeId:f?.context.nodeId,itemMetadata:Kf});return X(`div`,e,{state:{disabled:g,highlighted:_},props:[v,u,y],ref:[b,t,d.ref]})});process.env.NODE_ENV!==`production`&&(rp.displayName=`MenuItem`);var ip=_.createContext(void 0);process.env.NODE_ENV!==`production`&&(ip.displayName=`ToolbarRootContext`);function ap(e){let t=_.useContext(ip);if(t===void 0&&!e)throw Error(process.env.NODE_ENV===`production`?K(69):`Base UI: ToolbarRootContext is missing. Toolbar parts must be placed within <Toolbar.Root>.`);return t}var op=_.forwardRef(function(e,t){let{render:n,className:r,style:i,finalFocus:a,...o}=e,{store:s}=Hf(),{side:c,align:l}=Bf(),u=ap(!0)!=null,d=s.useState(`open`),f=s.useState(`transitionStatus`),p=s.useState(`popupProps`),m=s.useState(`mounted`),h=s.useState(`instantType`),g=s.useState(`activeTriggerElement`),v=s.useState(`parent`),y=s.useState(`lastOpenChangeReason`),b=s.useState(`rootId`),x=s.useState(`floatingRootContext`),S=s.useState(`floatingTreeRoot`),C=s.useState(`closeDelay`),w=s.useState(`hoverEnabled`),T=s.useState(`disabled`),E=s.useState(`openMethod`),D=v.type===`context-menu`;Vn({open:d,ref:s.context.popupRef,onComplete(){d&&s.context.onOpenChangeComplete?.(!0)}}),_.useEffect(()=>{function e(e){s.setOpen(!1,Z(e.reason,e.domEvent))}return S.events.on(`close`,e),()=>{S.events.off(`close`,e)}},[S.events,s]),ll(x,{enabled:w&&!T&&!D&&v.type!==`menubar`,closeDelay:C});let O=s.useStateSetter(`popupElement`),k=X(`div`,e,{state:{transitionStatus:f,side:c,align:l,open:d,nested:v.type===`menu`,instant:h},ref:[t,s.context.popupRef,O],stateAttributesMapping:Oa,props:[p,{onKeyDown(e){u&&Hl.has(e.key)&&e.stopPropagation()}},Kd(f),o,{"data-rootownerid":b}]}),A=v.type===void 0||D;return(g||v.type===`menubar`&&y!==`outside-press`)&&(A=!0),(0,L.jsx)(Rs,{context:x,openInteractionType:E,modal:D,disabled:!m,returnFocus:a===void 0?A:a,initialFocus:v.type!==`menu`,restoreFocus:!0,externalTree:v.type===`menubar`?void 0:S,previousFocusableElement:g,nextFocusableElement:v.type===void 0?s.context.triggerFocusTargetRef:void 0,beforeContentFocusGuardRef:v.type===void 0?s.context.beforeContentFocusGuardRef:void 0,children:k})});process.env.NODE_ENV!==`production`&&(op.displayName=`MenuPopup`);var sp=_.createContext(void 0);process.env.NODE_ENV!==`production`&&(sp.displayName=`MenuPortalContext`);function cp(){let e=_.useContext(sp);if(e===void 0)throw Error(process.env.NODE_ENV===`production`?K(32):`Base UI: <Menu.Portal> is missing.`);return e}var lp=_.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e,{store:i,parent:a}=Hf();if(!(i.useState(`mounted`)||n))return null;let o=a.type===`menu`||a.type===`menubar`?`group`:void 0;return(0,L.jsx)(sp.Provider,{value:n,children:(0,L.jsx)(Cs,{ref:t,...r,portalOwnerRole:o})})});process.env.NODE_ENV!==`production`&&(lp.displayName=`MenuPortal`);var up=_.forwardRef(function(e,t){let{anchor:n,positionMethod:r=`absolute`,className:i,render:a,side:o,align:s,sideOffset:c=0,alignOffset:l=0,collisionBoundary:u=`clipping-ancestors`,collisionPadding:d=5,arrowPadding:f=5,sticky:p=!1,disableAnchorTracking:m=!1,collisionAvoidance:h=_s,style:g,...v}=e,{store:y}=Hf(),b=cp(),x=Rf(!0),S=y.useState(`parent`),C=y.useState(`floatingRootContext`),w=y.useState(`floatingTreeRoot`),T=y.useState(`mounted`),E=y.useState(`open`),D=y.useState(`modal`),O=y.useState(`openMethod`),k=y.useState(`activeTriggerElement`),A=y.useState(`transitionStatus`),j=y.useState(`positionerElement`),N=y.useState(`instantType`),P=y.useState(`adaptiveOrigin`),F=y.useState(`lastOpenChangeReason`),I=y.useState(`floatingNodeId`),z=y.useState(`floatingParentNodeId`),B=C.useState(`domReferenceElement`),V=_.useRef(null),H=Bn(j),U=n,W=c,G=l,K=s,q=h;S.type===`context-menu`&&(U=n??S.context?.anchor,K??=`start`,!o&&K!==`center`&&(G=e.alignOffset??2,W=e.sideOffset??-5));let J=o,ee=K;S.type===`menu`?(J??=`inline-end`,ee??=`start`,q=e.collisionAvoidance??vs):S.type===`menubar`&&(J??=S.context.orientation===`vertical`?`inline-end`:`bottom`,ee??=`start`);let Y=S.type===`context-menu`,te=Ud({anchor:U,floatingRootContext:C,positionMethod:x?`fixed`:r,mounted:T,side:J,sideOffset:W,align:ee,alignOffset:G,arrowPadding:Y?0:f,collisionBoundary:u,collisionPadding:d,sticky:p,nodeId:I,keepMounted:b,disableAnchorTracking:m,collisionAvoidance:q,shift:Y?{crossAxis:!(`side`in q&&q.side===`flip`),rootBoundary:`layoutViewport`}:void 0,externalTree:w,adaptiveOrigin:P});_.useEffect(()=>{function e(e){e.open&&(e.parentNodeId===I&&y.set(`hoverEnabled`,!1),e.nodeId!==I&&e.parentNodeId===y.select(`floatingParentNodeId`)&&y.setOpen(!1,Z(gt)))}return w.events.on(`menuopenchange`,e),()=>{w.events.off(`menuopenchange`,e)}},[y,w.events,I]),_.useEffect(()=>{if(y.select(`floatingParentNodeId`)==null)return;function e(e){if(e.open||e.nodeId!==y.select(`floatingParentNodeId`))return;let t=e.reason??`sibling-open`;y.setOpen(!1,Z(t))}return w.events.on(`menuopenchange`,e),()=>{w.events.off(`menuopenchange`,e)}},[w.events,y]);let ne=oa();_.useEffect(()=>{E||ne.clear()},[E,ne]),_.useEffect(()=>{function e(e){if(E&&e.nodeId===y.select(`floatingParentNodeId`)){if(e.target&&k&&k!==e.target){let e=y.select(`closeDelay`);e>0?ne.isStarted()||ne.start(e,()=>{y.setOpen(!1,Z(gt))}):y.setOpen(!1,Z(gt))}else ne.clear()}}return w.events.on(`itemhover`,e),()=>{w.events.off(`itemhover`,e)}},[w.events,E,k,y,ne]),_.useEffect(()=>{let e={open:E,nodeId:I,parentNodeId:z,reason:y.select(`lastOpenChangeReason`)};w.events.emit(`menuopenchange`,e)},[w.events,E,y,I,z]),M(()=>{let e=B,t=V.current;if(e&&(V.current=e),t&&e&&e!==t){y.set(`instantType`,void 0);let e=new AbortController;return H(()=>{y.set(`instantType`,`trigger-change`)},e.signal),()=>{e.abort()}}},[B,H,y]);let re={open:E,side:te.side,align:te.align,anchorHidden:te.anchorHidden,nested:S.type===`menu`,instant:N},ie=S.type===`menubar`&&S.context.modal;Jd(E&&(ie||D&&F!==`trigger-hover`),O===`touch`,j,k);let ae=qd(e,re,{styles:te.positionerStyles,transitionStatus:A,props:v,refs:[t,y.useStateSetter(`positionerElement`)],hidden:!T,inert:!E}),oe=T&&S.type!==`menu`&&(S.type!==`menubar`&&D&&F!==`trigger-hover`||S.type===`menubar`&&S.context.modal),se=null;return S.type===`menubar`?se=S.context.contentElement:S.type===void 0&&(se=k),(0,L.jsxs)(zf.Provider,{value:te,children:[oe&&(0,L.jsx)(Zl,{ref:S.type===`context-menu`||S.type===`nested-context-menu`?S.context.internalBackdropRef:null,inert:Xl(!E),cutout:se}),(0,L.jsx)(js,{id:I,children:(0,L.jsx)(R,{elementsRef:y.context.itemDomElements,labelsRef:y.context.itemLabels,children:ae})})]})});process.env.NODE_ENV!==`production`&&(up.displayName=`MenuPositioner`);var dp=_.createContext(void 0);process.env.NODE_ENV!==`production`&&(dp.displayName=`MenuRadioGroupContext`);function fp(){let e=_.useContext(dp);if(e===void 0)throw Error(process.env.NODE_ENV===`production`?K(34):`Base UI: MenuRadioGroupContext is missing. MenuRadioGroup parts must be placed within <Menu.RadioGroup>.`);return e}var pp=_.memo(_.forwardRef(function(e,t){let{render:n,className:r,value:i,defaultValue:a,onValueChange:o,disabled:s=!1,style:c,"aria-labelledby":l,...u}=e,[d,f]=_.useState(void 0),[p,m]=v({controlled:i,default:a,name:`MenuRadioGroup`}),h=T((e,t)=>{o?.(e,t),!t.isCanceled&&m(e)}),g=X(`div`,e,{state:{disabled:s},ref:t,props:{role:`group`,"aria-labelledby":l??d,"aria-disabled":s||void 0,...u}}),y=_.useMemo(()=>({value:p,setValue:h,disabled:s}),[p,h,s]);return(0,L.jsx)($f.Provider,{value:f,children:(0,L.jsx)(dp.Provider,{value:y,children:g})})}));process.env.NODE_ENV!==`production`&&(pp.displayName=`MenuRadioGroup`);var mp=_.createContext(void 0);process.env.NODE_ENV!==`production`&&(mp.displayName=`MenuRadioItemContext`);function hp(){let e=_.useContext(mp);if(e===void 0)throw Error(process.env.NODE_ENV===`production`?K(35):`Base UI: MenuRadioItemContext is missing. MenuRadioItem parts must be placed within <Menu.RadioItem>.`);return e}var gp=_.forwardRef(function(e,t){let{render:n,className:r,id:i,label:a,nativeButton:o=!1,disabled:s=!1,closeOnClick:c=!1,value:l,style:u,...d}=e,f=Pt({guess:!0,label:a}),p=Bf(!0),m=He(i),{store:h}=Hf(),g=h.useState(`isActive`,f.index),v=h.useState(`itemProps`),{value:y,setValue:b,disabled:x}=fp(),S=h.useState(`disabled`),C=s||x||S,w=y===l,{getItemProps:T,itemRef:E}=qf({closeOnClick:c,disabled:C,highlighted:g,id:m,store:h,nativeButton:o,nodeId:p?.context.nodeId,itemMetadata:Kf}),D=_.useMemo(()=>({disabled:C,highlighted:g,checked:w}),[C,g,w]);function O(e){let t=Z(Je,e.nativeEvent,void 0,{preventUnmountOnClose:k});b(l,t)}let A=X(`div`,e,{state:D,stateAttributesMapping:Xf,props:[v,{role:`menuitemradio`,"aria-checked":w,onClick:O},d,T],ref:[E,t,f.ref]});return(0,L.jsx)(mp.Provider,{value:D,children:A})});process.env.NODE_ENV!==`production`&&(gp.displayName=`MenuRadioItem`);var _p=_.forwardRef(function(e,t){let{render:n,className:r,style:i,keepMounted:a=!1,...o}=e,s=hp(),c=_.useRef(null),{transitionStatus:l,mounted:u,setMounted:d}=At(s.checked);return Vn({batch:!0,enabled:!s.checked,open:s.checked,ref:c,onComplete(){s.checked||d(!1)}}),X(`span`,e,{state:{checked:s.checked,disabled:s.disabled,highlighted:s.highlighted,transitionStatus:l},stateAttributesMapping:Xf,ref:[t,c],props:{"aria-hidden":!0,...o},enabled:a||u})});process.env.NODE_ENV!==`production`&&(_p.displayName=`MenuRadioItemIndicator`);var vp=_.createContext(null);process.env.NODE_ENV!==`production`&&(vp.displayName=`MenubarContext`);function yp(e){let t=_.useContext(vp);if(t===null&&!e)throw Error(process.env.NODE_ENV===`production`?K(5):`Base UI: MenubarContext is missing. Menubar parts must be placed within <Menubar>.`);return t}var bp={...$c,disabled:e=>e.parent.type===`menubar`&&e.parent.context.disabled||e.disabled,modal:e=>(e.parent.type===void 0||e.parent.type===`context-menu`)&&(e.modal??!0),openMethod:e=>e.openMethod,allowMouseEnter:e=>e.allowMouseEnter,highlightItemOnHover:e=>e.highlightItemOnHover,parent:e=>e.parent,rootId:e=>e.parent.type===`menu`?e.parent.store.select(`rootId`):e.parent.type===void 0?e.rootId:e.parent.context.rootId,activeIndex:e=>e.activeIndex,isActive:(e,t)=>e.activeIndex===t,hoverEnabled:e=>e.hoverEnabled,instantType:e=>e.instantType,lastOpenChangeReason:e=>e.openChangeReason,floatingTreeRoot:e=>e.parent.type===`menu`?e.parent.store.select(`floatingTreeRoot`):e.floatingTreeRoot,floatingNodeId:e=>e.floatingNodeId,floatingParentNodeId:e=>e.floatingParentNodeId,itemProps:e=>e.itemProps,closeDelay:e=>e.closeDelay,adaptiveOrigin:e=>e.adaptiveOrigin,keyboardEventRelay:e=>{if(e.keyboardEventRelay)return e.keyboardEventRelay;if(e.parent.type===`menu`)return e.parent.store.select(`keyboardEventRelay`)}},xp=class extends Dc{constructor(e,t,n=!1){let r=new Kc,i=Cp(r,t,n,e);super(i,Sp(r),bp),this.unsubscribeParentListener=this.observe(`parent`,e=>{if(this.unsubscribeParentListener?.(),e.type===`menu`){let t=e.store.select(`rootId`),n=e.store.select(`floatingTreeRoot`),r=e.store.select(`keyboardEventRelay`);this.unsubscribeParentListener=e.store.subscribe(()=>{let i=e.store.select(`rootId`),a=e.store.select(`floatingTreeRoot`),o=e.store.select(`keyboardEventRelay`);(t!==i||n!==a||r!==o)&&(t=i,n=a,r=o,this.notifyAll())}),this.context.allowMouseUpTriggerRef=e.store.context.allowMouseUpTriggerRef;return}e.type!==void 0&&(this.context.allowMouseUpTriggerRef=e.context.allowMouseUpTriggerRef),this.unsubscribeParentListener=null})}setOpen(e,t){this.state.floatingRootContext.context.events.emit(`setOpen`,{open:e,eventDetails:t})}unsubscribeParentListener=null};function Sp(e){return{positionerRef:_.createRef(),popupRef:_.createRef(),typingRef:{current:!1},itemDomElements:{current:[]},itemLabels:{current:[]},allowMouseUpTriggerRef:{current:!1},triggerFocusTargetRef:_.createRef(),beforeContentFocusGuardRef:_.createRef(),onOpenChangeComplete:void 0,triggerElements:e}}function Cp(e,t,n=!1,r){return{...qc(e,t,n),disabled:!1,modal:!0,openMethod:null,allowMouseEnter:!1,highlightItemOnHover:!0,parent:{type:void 0},rootId:void 0,activeIndex:null,hoverEnabled:!0,instantType:void 0,openChangeReason:null,floatingTreeRoot:new Ts,floatingNodeId:void 0,floatingParentNodeId:null,itemProps:j,keyboardEventRelay:void 0,closeDelay:0,adaptiveOrigin:void 0,...r}}var wp=_.createContext(void 0);process.env.NODE_ENV!==`production`&&(wp.displayName=`MenuSubmenuRootContext`);function Tp(){return _.useContext(wp)}var Ep=bc(function(e){let{children:t,open:n,onOpenChange:r,onOpenChangeComplete:i,defaultOpen:a=!1,disabled:o=!1,modal:s,loopFocus:c=!0,orientation:l=`vertical`,actionsRef:u,closeParentOnEsc:d=!1,handle:f,triggerId:p,defaultTriggerId:m=null,highlightItemOnHover:h=!0}=e,g=Rf(!0),v=Hf(!0),y=yp(!0),b=Tp(),x=_.useMemo(()=>b&&v?{type:`menu`,store:v.store}:y?{type:`menubar`,context:y}:g&&!v?{type:`context-menu`,context:g}:{type:void 0},[g,v,y,b]),C=Ve(),w=Ve(),E=Os(),D=x.type===`menu`?x.store:void 0,O=(n??a)&&D?.state.transitionStatus===`starting`,k=S(()=>O?D?.state.instantType:void 0).current,N=Dp({open:a,openProp:n,activeTriggerId:m,triggerIdProp:p,parent:x,disabled:o,highlightItemOnHover:h,modal:x.type===void 0?s:void 0,rootId:C,instantType:k},w,E!=null);N.useControlledProp(`openProp`,n),N.useControlledProp(`triggerIdProp`,p),N.useContextCallback(`onOpenChangeComplete`,i);let P=N.useState(`floatingTreeRoot`),F=As(P),I=N.useState(`open`),R=N.useState(`activeTriggerElement`),z=N.useState(`positionerElement`),B=N.useState(`hoverEnabled`),V=N.useState(`disabled`),H=N.useState(`lastOpenChangeReason`),U=N.useState(`parent`),W=N.useState(`activeIndex`),G=N.useState(`payload`),K=N.useState(`floatingParentNodeId`),q=_.useRef(null),J=_.useRef(U.type!==`context-menu`),ee=oa(),Y=_.useRef(!0),te=oa(),ne=K!=null;process.env.NODE_ENV!==`production`&&U.type!==void 0&&s!==void 0&&console.warn("Base UI: The `modal` prop is not supported on nested menus. It will be ignored.");let{openMethod:re,triggerProps:ie}=nu(I);N.useSyncedValues({disabled:o,highlightItemOnHover:h,modal:U.type===void 0?s:void 0,openMethod:re,rootId:C}),Vc(N);let{forceUnmount:ae,transitionStatus:oe}=Hc(I,N,()=>{N.set(`allowMouseEnter`,!1)},O),se=Bn(N.context.popupRef);_.useEffect(()=>{if(k===void 0)return;let e=()=>{N.state.instantType===k&&N.set(`instantType`,void 0)};if(!I){e();return}if(oe!==void 0)return;if(N.context.popupRef.current==null){e();return}let t=new AbortController;return se(e,t.signal),()=>{t.abort()}},[k,I,oe,se,N]),M(()=>{g&&!v?N.update({parent:{type:`context-menu`,context:g},floatingNodeId:F,floatingParentNodeId:E}):v&&N.update({floatingNodeId:F,floatingParentNodeId:E})},[g,v,F,E,N]),_.useEffect(()=>{if(I||(q.current=null),U.type===`context-menu`){if(!I){ee.clear(),J.current=!1;return}ee.start(500,()=>{J.current=!0})}},[ee,I,U.type]),M(()=>{!I&&!B&&N.set(`hoverEnabled`,!0)},[I,B,N]);let ce=T((e,t)=>{let n=t.reason;if(!e&&!N.select(`open`)||I===e&&t.trigger===R&&H===n)return;let i=Rc(t);if(!e&&t.trigger==null&&(t.trigger=R??void 0),r?.(e,t),t.isCanceled)return;N.state.floatingRootContext.dispatchOpenChange(e,t);let a=t.event;if(e===!1&&a?.type===`click`&&a.pointerType===`touch`&&!Y.current)return;e&&n===`trigger-focus`?(Y.current=!1,te.start(300,()=>{Y.current=!0})):(Y.current=!0,te.clear());let o=(n===`trigger-press`||n===`item-press`)&&a.detail===0,s=!e&&(n===`escape-key`||n==null);q.current=t.event;let c=Lc(N.state,e,t.trigger,i());c.openChangeReason=n,c.instantType=U.type===`menubar`&&(n===`trigger-focus`||n===`focus-out`||n===`trigger-hover`||n===`list-navigation`||n===`sibling-open`)?`group`:o||s?o?`click`:`dismiss`:void 0,N.update(c)}),le=Ac({popupStore:N,floatingRootContext:N.state.floatingRootContext,floatingId:w,nested:E!=null,onOpenChange:ce}),ue=le.context.events;M(()=>{let e=({open:e,eventDetails:t})=>ce(e,t);return ue.on(`setOpen`,e),()=>{ue?.off(`setOpen`,e)}},[ue,ce]);let de=_.useCallback(()=>{N.setOpen(!1,Z(bt))},[N]);_.useImperativeHandle(u,()=>({unmount:ae,close:de}),[ae,de]);let fe;U.type===`context-menu`&&(fe=U.context),_.useImperativeHandle(fe?.positionerRef,()=>z,[z]),_.useImperativeHandle(fe?.actionsRef,()=>({setOpen:ce}),[ce]);let me=Vs(le,{enabled:!V,bubbles:{escapeKey:d&&U.type===`menu`},outsidePress(){return U.type!==`context-menu`||q.current?.type===`contextmenu`||J.current},externalTree:ne?P:void 0}),he=sd(),ge=_.useCallback(e=>{N.select(`activeIndex`)!==e&&N.set(`activeIndex`,e)},[N]),_e=hl(le,{enabled:!V,listRef:N.context.itemDomElements,activeIndex:W,nested:U.type!==void 0,loopFocus:c,orientation:l,parentOrientation:U.type===`menubar`?U.context.orientation:void 0,rtl:he===`rtl`,disabledIndices:A,onNavigate:ge,openOnArrowKeyDown:U.type!==`context-menu`,externalTree:ne?P:void 0,focusItemOnHover:h}),ve=_.useCallback(e=>{N.context.typingRef.current=e},[N]),ye=gl(le,{enabled:!V,listRef:N.context.itemLabels,elementsRef:N.context.itemDomElements,activeIndex:W,resetMs:500,onMatch:e=>{I&&e!==W&&N.set(`activeIndex`,e)},onTyping:ve}),be=_.useMemo(()=>{let e=pe(ye.reference,_e.reference,me.reference,{onMouseMove(){N.set(`allowMouseEnter`,!0)}},ie);return e[`aria-haspopup`]=`menu`,e[`aria-expanded`]=I,e},[N,ye.reference,_e.reference,me.reference,ie,I]),xe=_.useMemo(()=>{let e=pe(_e.trigger,me.trigger,ie);return e[`aria-haspopup`]=`menu`,e[`aria-expanded`]=!1,e},[_e.trigger,me.trigger,ie]);S(()=>(N.update({inactiveTriggerProps:xe}),null)),Uc(N,{floatingRootContext:le,activeTriggerProps:be,inactiveTriggerProps:xe,popupProps:_.useMemo(()=>pe(jc,{id:w,role:`menu`,"aria-orientation":l===`horizontal`?`horizontal`:void 0,"aria-labelledby":R?.id,onMouseMove(){N.set(`allowMouseEnter`,!0),U.type===`menu`&&N.set(`hoverEnabled`,!1)},onClick(){N.select(`hoverEnabled`)&&N.set(`hoverEnabled`,!1)},onKeyDown(e){let t=N.select(`keyboardEventRelay`);t&&!e.isPropagationStopped()&&t(e)}},ye.floating,_e.floating,me.floating),[R,w,l,U.type,N,ye.floating,_e.floating,me.floating]),itemProps:_e.item??j});let Se=_.useMemo(()=>({store:N,parent:x}),[N,x]),Ce=(0,L.jsxs)(Vf.Provider,{value:Se,children:[f&&(0,L.jsx)(Pc,{handle:f,store:N}),typeof t==`function`?t({payload:G}):t]});return U.type===void 0||U.type===`context-menu`?(0,L.jsx)(Ms,{externalTree:P,children:Ce}):Ce});process.env.NODE_ENV!==`production`&&(Ep.displayName=`MenuRoot`);function Dp(e,t,n){return S(()=>new xp(e,t,n)).current}function Op(e){let t=Hf().store,n=_.useMemo(()=>({parentMenu:t}),[t]);return(0,L.jsx)(wp.Provider,{value:n,children:(0,L.jsx)(Ep,{...e})})}function kp(e={}){let{highlightItemOnHover:t,highlightedIndex:n,onHighlightedIndexChange:r}=Dn(),{ref:i,index:a}=Pt(e),o=n===a,s=_.useRef(null),c=ee(i,s);return{compositeProps:{tabIndex:o?0:-1,onFocus(){r(a)},onMouseMove(){let e=s.current;if(!t||!e)return;let n=e.hasAttribute(`disabled`)||e.ariaDisabled===`true`;!o&&!n&&e.focus()}},compositeRef:c,index:a}}function Ap(e){let{render:t,className:n,style:r,state:i=j,props:a=A,refs:o=A,metadata:s,stateAttributesMapping:c,tag:l=`div`,...u}=e,{compositeProps:d,compositeRef:f}=kp({metadata:s});return X(l,e,{state:i,ref:[f,...o],props:[d,...a,u],stateAttributesMapping:c})}function jp(e){if(sn(e)&&e.hasAttribute(`data-rootownerid`))return e.getAttribute(`data-rootownerid`);if(!yn(e))return jp(Sn(e))}function Mp(e,t){let n=_.useRef(null);function r(t){Rn.flushSync(()=>{e.setOpen(!1,Z(ot,t.nativeEvent,t.currentTarget))}),Xo(n.current)?.focus()}function i(n){let r=e.select(`positionerElement`);if(r&&Zo(n,r))e.context.beforeContentFocusGuardRef.current?.focus();else{Rn.flushSync(()=>{e.setOpen(!1,Z(ot,n.nativeEvent,n.currentTarget))});let i=Yo(e.context.triggerFocusTargetRef.current||t.current);for(;i!==null&&ba(r,i);){let e=i;if(i=Ko(i),i===e)break}i?.focus()}}return{preFocusGuardRef:n,handlePreFocusGuardFocus:r,handleFocusTargetFocus:i}}function Np(e){let{enabled:t=!0,mouseDownAction:n,open:r}=e,i=_.useRef(!1);return _.useMemo(()=>t?{onMouseDown:e=>{(n===`open`&&!r||n===`close`&&r)&&(i.current=!0,kn(e.currentTarget).addEventListener(`click`,()=>{i.current=!1},{once:!0}))},onClick:e=>{i.current&&(i.current=!1,e.preventBaseUIHandler())}}:j,[t,n,r])}var Pp=xc(function(e,t){let{render:n,className:r,style:i,disabled:a=!1,nativeButton:o=!0,id:s,openOnHover:c,delay:l=100,closeDelay:u=0,handle:d,payload:f,...p}=e,m=Hf(!0),h=el(d)??m?.store;if(!h)throw Error(process.env.NODE_ENV===`production`?K(85):`Base UI: <Menu.Trigger> must be either used within a <Menu.Root> component or provided with a handle.`);let g=He(s),v=h.useState(`isTriggerActive`,g),y=h.useState(`floatingRootContext`),b=h.useState(`isOpenedByTrigger`,g),x=h.useState(`triggerPopupId`,g),S=_.useRef(null),C=Ip(),w=Dn(!0),E=ks(),D=_.useMemo(()=>E??new Ts,[E]),{registerTrigger:O,isMountedByThisTrigger:k}=Bc(g,S,h,{payload:f,closeDelay:u,parent:C,floatingTreeRoot:D,floatingNodeId:As(D),floatingParentNodeId:Os(),keyboardEventRelay:w?.relayKeyboardEvent}),A=C.type===`menubar`,M=h.useState(`disabled`),N=a||M||A&&C.context.disabled,{getButtonProps:P,buttonRef:F}=jn({disabled:N,native:o});_.useEffect(()=>{!b&&C.type===void 0&&(h.context.allowMouseUpTriggerRef.current=!1)},[h,b,C.type]);let I=_.useRef(null),R=oa(),z=T(e=>{if(!I.current)return;R.clear(),h.context.allowMouseUpTriggerRef.current=!1;let t=e.target;ba(I.current,t)||ba(h.select(`positionerElement`),t)||t===I.current||(t==null||jp(t)!==h.select(`rootId`))&&(dd(e,I.current)||D.events.emit(`close`,{domEvent:e,reason:ht}))});_.useEffect(()=>{b&&h.select(`lastOpenChangeReason`)===`trigger-hover`&&kn(I.current).addEventListener(`mouseup`,z,{once:!0})},[b,z,h]);let B=A&&C.context.hasSubmenuOpen,V=ul(y,{enabled:(c??B)&&!N&&(!A||B&&!k),handleClose:Sl({blockPointerEvents:!A}),mouseOnly:!0,move:!1,restMs:C.type===void 0?l:void 0,delay:{close:u},triggerElementRef:S,externalTree:D,isActiveTrigger:v,isClosing:()=>h.select(`transitionStatus`)===`ending`}),H=Fp(b,h.select(`lastOpenChangeReason`)),U=zs(y,{enabled:!N,event:b&&A?`click`:`mousedown`,toggle:!0,ignoreMouse:!1,stickIfOpen:C.type===void 0&&H}),W=il(y,{enabled:!N&&B}),G=Np({open:b,enabled:A,mouseDownAction:`open`}),q=_.useMemo(()=>pe(W.reference,U.reference),[W.reference,U.reference]),J=h.useState(`triggerProps`,k),{preFocusGuardRef:ee,handlePreFocusGuardFocus:Y,handleFocusTargetFocus:te}=Mp(h,S),ne={disabled:N,open:b},re=[I,t,F,O,S],ie=[q,V??j,J,{"aria-haspopup":`menu`,"aria-controls":x,id:g,onMouseDown:e=>{h.select(`open`)||(R.start(200,()=>{h.context.allowMouseUpTriggerRef.current=!0}),kn(e.currentTarget).addEventListener(`mouseup`,z,{once:!0}))}},A?{role:`menuitem`}:{},G,p,P],ae=X(`button`,e,{enabled:!A,stateAttributesMapping:Ea,state:ne,ref:re,props:ie});return A?(0,L.jsx)(Ap,{tag:`button`,render:n,className:r,style:i,state:ne,refs:re,props:ie,stateAttributesMapping:Ea}):b?(0,L.jsxs)(_.Fragment,{children:[(0,L.jsx)(Ga,{ref:ee,onFocus:Y},`${g}-pre-focus-guard`),(0,L.jsx)(_.Fragment,{children:ae},g),(0,L.jsx)(Ga,{ref:h.context.triggerFocusTargetRef,onFocus:te},`${g}-post-focus-guard`)]}):(0,L.jsx)(_.Fragment,{children:ae},g)});process.env.NODE_ENV!==`production`&&(Pp.displayName=`MenuTrigger`);function Fp(e,t){let n=oa(),[r,i]=_.useState(!1);return M(()=>{e&&t===`trigger-hover`?(i(!0),n.start(500,()=>{i(!1)})):e||(n.clear(),i(!1))},[e,t,n]),r}function Ip(){let e=yp(!0);return _.useMemo(()=>e?{type:`menubar`,context:e}:{type:void 0},[e])}function Lp(e){let[t,n]=_.useState({current:e,previous:null});return Object.is(e,t.current)||n({current:e,previous:t.current}),t.previous}function Rp(e){let t=bn(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=sn(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r;return(Ja(n)!==a||Ja(r)!==o)&&(n=a,r=o),{width:n,height:r}}var zp=`--popup-width`,Bp=`--popup-height`;function Vp(e){let{popupElement:t,positionerElement:n,content:r,mounted:i,onMeasureLayout:a,onMeasureLayoutComplete:o,side:s,direction:c}=e,l=Bn(t,!0),u=kt(),d=_.useRef(null),f=_.useRef(!0),p=_.useRef(k),m=T(a),h=T(o),g=_.useMemo(()=>Hp(s,c),[s,c]);M(()=>{if(!i){p.current=k,f.current=!0,d.current=null;return}if(!t||!n)return;p.current=Wp(t,g),Gp(t,`auto`);let e=Up(t,`position`,`static`),r=Up(t,`transform`,`none`),a=Up(t,`scale`,`1`),o=Wp(n,{[Ld]:`max-content`,[Rd]:`max-content`});function s(){e(),r(),o()}function c(){s(),a()}if(m?.(),f.current||d.current===null){Kp(n,`max-content`);let e=Rp(t);return d.current=e,Kp(n,e),c(),h?.(null,e),f.current=!1,()=>{p.current(),p.current=k}}Kp(n,`max-content`);let _=d.current,v=Rp(t);d.current=v,Gp(t,_),c(),h?.(_,v),Kp(n,v);let y=new AbortController;return u.request(()=>{Gp(t,v),l(()=>{t.style.setProperty(zp,`auto`),t.style.setProperty(Bp,`auto`)},y.signal)}),()=>{y.abort(),u.cancel(),p.current(),p.current=k}},[r,t,n,l,u,i,m,h,g])}function Hp(e,t){let n=e===`top`,r=e===`left`||e===(t===`rtl`?`inline-end`:`inline-start`);return!n&&!r?j:{position:`absolute`,[n?`bottom`:`top`]:`0`,[r?`right`:`left`]:`0`}}function Up(e,t,n){let r=e.style.getPropertyValue(t);return e.style.setProperty(t,n),()=>{e.style.setProperty(t,r)}}function Wp(e,t){let n=[];for(let[r,i]of Object.entries(t))n.push(Up(e,r,i));return n.length?()=>{n.forEach(e=>e())}:k}function Gp(e,t){let n=t===`auto`?`auto`:`${t.width}px`,r=t===`auto`?`auto`:`${t.height}px`;e.style.setProperty(zp,n),e.style.setProperty(Bp,r)}function Kp(e,t){let n=t===`max-content`?`max-content`:`${t.width}px`,r=t===`max-content`?`max-content`:`${t.height}px`;e.style.setProperty(oie,n),e.style.setProperty(sie,r)}var qp={name:`adaptiveOrigin`,async fn(e){let{x:t,y:n,rects:{floating:r},elements:{floating:i},platform:a,strategy:o,placement:s}=e,c=nn(i),l=c.getComputedStyle(i);if(l.transitionDuration===`0s`||l.transitionDuration===``)return{x:t,y:n,data:Id};let u=await a.getOffsetParent?.(i),d={width:0,height:0};if(o===`fixed`&&c?.visualViewport)d={width:c.visualViewport.width,height:c.visualViewport.height};else if(u===c){let e=kn(i);d={width:e.documentElement.clientWidth,height:e.documentElement.clientHeight}}else await a.isElement?.(u)&&(d=await a.getDimensions(u));let f=eo(s),p=t,m=n;f===`left`&&(p=d.width-(t+r.width)),f===`top`&&(m=d.height-(n+r.height));let h=f===`left`?`right`:Id.sideX,g=f===`top`?`bottom`:Id.sideY;return{x:p,y:m,data:{sideX:h,sideY:g}}}},Jp=`data-activation-direction`,Yp={activationDirection:e=>e?{[Jp]:e}:null};function Xp(e){let{store:t,side:n,children:r}=e,i=sd(),a=t.useState(`activeTriggerElement`),o=t.useState(`activeTriggerId`),s=t.useState(`open`),c=t.useState(`payload`),l=t.useState(`mounted`),u=t.useState(`popupElement`),d=t.useState(`positionerElement`),f=Lp(s?a:null),p=em(o,c),m=_.useRef(null),[h,g]=_.useState(null),[v,y]=_.useState(null),b=_.useRef(null),x=_.useRef(null),S=Bn(b,!0),C=kt(),w=_.useRef(null),[E,D]=_.useState(null),[O,k]=_.useState(!1);M(()=>(t.set(`adaptiveOrigin`,qp),()=>{t.set(`adaptiveOrigin`,void 0)}),[t]);let A=T(()=>{b.current?.style.setProperty(`animation`,`none`),b.current?.style.setProperty(`transition`,`none`),x.current?.style.setProperty(`display`,`none`)}),j=T(e=>{b.current?.style.removeProperty(`animation`),b.current?.style.removeProperty(`transition`),x.current?.style.removeProperty(`display`),e&&D(e)}),N=T(()=>{w.current?.abort();let e=new AbortController;w.current=e,S(()=>{g(null),D(null),m.current=null},e.signal)}),P=_.useRef(null);M(()=>{(!s||!l)&&(P.current=null)},[s,l]),M(()=>{if(a&&f&&a!==f&&P.current!==a&&m.current){g(m.current),k(!0);let e=$p(f,a);y(e),P.current=a}},[a,f]),M(()=>{h!=null&&(w.current?.abort(),k(!0),C.request(()=>{Rn.flushSync(()=>{k(!1)}),N()}))},[p,h,N,C]),M(()=>{let e=b.current;if(!e)return;let t=kn(e).createElement(`div`);for(let n of Array.from(e.childNodes))t.appendChild(n.cloneNode(!0));m.current=t});let F=h!=null,I;I=F?(0,L.jsxs)(_.Fragment,{children:[(0,L.jsx)(`div`,{"data-previous":!0,inert:Xl(!0),ref:x,style:{...E?{[zp]:`${E.width}px`,[Bp]:`${E.height}px`}:null,position:`absolute`},"data-ending-style":O?void 0:``},`previous`),(0,L.jsx)(`div`,{"data-current":!0,ref:b,"data-starting-style":O?``:void 0,children:r},p)]}):(0,L.jsx)(`div`,{"data-current":!0,ref:b,children:r},p),M(()=>{let e=x.current;e&&h&&e.replaceChildren(...Array.from(h.childNodes))},[h]),Vp({popupElement:u,positionerElement:d,mounted:l,content:c,onMeasureLayout:A,onMeasureLayoutComplete:j,side:n,direction:i});let R={activationDirection:Zp(v),transitioning:F};return{children:I,state:R}}function Zp(e){if(e)return`${Qp(e.horizontal,5,`right`,`left`)} ${Qp(e.vertical,5,`down`,`up`)}`}function Qp(e,t,n,r){return e>t?n:e<-t?r:``}function $p(e,t){let n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),i={x:n.left+n.width/2,y:n.top+n.height/2},a={x:r.left+r.width/2,y:r.top+r.height/2};return{horizontal:a.x-i.x,vertical:a.y-i.y}}function em(e,t){let[n,r]=_.useState(0),i=_.useRef(e),a=_.useRef(t),o=_.useRef(!1);return M(()=>{let n=i.current,s=a.current,c=e!==n,l=t!==s;c?(r(e=>e+1),o.current=!l):o.current&&l&&(r(e=>e+1),o.current=!1),i.current=e,a.current=t},[e,t]),`${e??`current`}-${n}`}var tm=_.forwardRef(function(e,t){let{className:n,render:r,orientation:i=`horizontal`,style:a,...o}=e;return X(`div`,e,{state:{orientation:i},ref:t,props:[{role:`separator`,"aria-orientation":i},o]})});process.env.NODE_ENV!==`production`&&(tm.displayName=`Separator`);function nm(e){return e==null||e.hasAttribute(`disabled`)||e.getAttribute(`aria-disabled`)===`true`}var rm={"aria-expanded":void 0},im=_.forwardRef(function(e,t){let{render:n,className:r,style:i,label:a,id:o,nativeButton:s=!1,openOnHover:c=!0,delay:l=100,closeDelay:u=0,disabled:d=!1,...f}=e,p=Tp();if(!p?.parentMenu)throw Error(process.env.NODE_ENV===`production`?K(37):`Base UI: <Menu.SubmenuTrigger> must be placed in <Menu.SubmenuRoot>.`);let m=Pt({guess:!0,label:a}),h=Bf(),{store:g}=Hf(),v=He(o),y=g.useState(`open`),x=g.useState(`floatingRootContext`),S=g.useState(`floatingTreeRoot`),C=g.useState(`triggerPopupId`,v),w=Ic(v,g),E=T(e=>{w(e),e!==null&&g.select(`open`)&&g.select(`activeTriggerId`)==null&&g.update({activeTriggerId:v??null,activeTriggerElement:e,closeDelay:u})}),D=_.useRef(null),k=_.useCallback(e=>{D.current=e,g.set(`activeTriggerElement`,e)},[g]);M(()=>(E(D.current),()=>E(null)),[E,v,g]),g.useSyncedValue(`closeDelay`,u);let A=p.parentMenu,N=g.useState(`disabled`),P=A.useState(`disabled`),F=d||N||P;process.env.NODE_ENV!==`production`&&_.useEffect(()=>{let e=D.current;e&&nm(e)&&!F&&O(`A disabled element was detected on <Menu.SubmenuTrigger>. To properly disable the trigger, use the \`disabled\` prop on the component instead of setting it on the rendered element.${b.captureOwnerStack?.()||``}`)});let I=A.useState(`itemProps`),L=A.useState(`isActive`,m.index),R=_.useMemo(()=>({type:`submenu-trigger`,setActive(){A.select(`highlightItemOnHover`)&&A.set(`activeIndex`,m.index)}}),[A,m.index]),{getItemProps:z,itemRef:B}=qf({closeOnClick:!1,disabled:F,highlighted:L,id:v,store:g,typingRef:A.context.typingRef,nativeButton:s,itemMetadata:R,nodeId:h?.context.nodeId}),V=ul(x,{enabled:g.useState(`hoverEnabled`)&&c&&!F,handleClose:Sl({blockPointerEvents:!0}),mouseOnly:!0,move:!0,restMs:l,delay:{open:l,close:u},shouldOpen:l>0?()=>A.select(`allowMouseEnter`):void 0,triggerElementRef:D,externalTree:S,isClosing:()=>g.select(`transitionStatus`)===`ending`,guardStaleOpen:!0}),H=zs(x,{enabled:!F,event:`mousedown`,toggle:!c,ignoreMouse:c,stickIfOpen:!1}).reference??j,U=g.useState(`triggerProps`,!0);delete U.id;let W={disabled:F,highlighted:L,open:y},G=g.useState(`openMethod`),q=g.useState(`lastOpenChangeReason`)===`list-navigation`||G===`keyboard`;return X(`div`,e,{state:W,stateAttributesMapping:Ta,props:[H,V,U,I,y&&q&&na?rm:void 0,{"aria-controls":C,tabIndex:y||L?0:-1,onBlur(){L&&A.set(`activeIndex`,null)}},f,z],ref:[t,m.ref,B,E,k]})});process.env.NODE_ENV!==`production`&&(im.displayName=`MenuSubmenuTrigger`);function am(e){let[t,n]=_.useState({getBoundingClientRect(){return DOMRect.fromRect({width:0,height:0,x:0,y:0})}}),r=_.useRef(null),i=_.useRef(null),a=_.useRef(null),o=_.useRef(null),s=_.useRef(!0),c=_.useRef(null),l=Ve(),u=_.useMemo(()=>({anchor:t,setAnchor:n,actionsRef:a,backdropRef:r,internalBackdropRef:i,positionerRef:o,allowMouseUpTriggerRef:s,initialCursorPointRef:c,rootId:l}),[t,l]);return(0,L.jsx)(Lf.Provider,{value:u,children:(0,L.jsx)(Vf.Provider,{value:void 0,children:(0,L.jsx)(Ep,{...e})})})}var om=500,sm=_.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{setAnchor:o,actionsRef:s,internalBackdropRef:c,backdropRef:l,positionerRef:u,allowMouseUpTriggerRef:d,initialCursorPointRef:f,rootId:p}=Rf(!1),{store:m}=Hf(!1),h=m.useState(`open`),g=m.useState(`disabled`),v=_.useRef(null),y=_.useRef(null),b=oa(),x=oa(),S=_.useRef(!1),C=_.useRef(null);function w(e,t,n){let r=n.type.startsWith(`touch`);f.current={x:e,y:t},o({getBoundingClientRect(){return DOMRect.fromRect({width:r?10:0,height:r?10:0,x:e,y:t})}}),S.current=!1,s.current?.setOpen(!0,Z(We,n)),x.start(om,()=>{S.current=!0})}function T(e){if(g)return;d.current=!0,ha(e),w(e.clientX,e.clientY,e.nativeEvent);let t=kn(v.current);C.current?.abort();let n=new AbortController;C.current=n,t.addEventListener(`mouseup`,e=>{if(d.current=!1,!S.current)return;x.clear(),S.current=!1;let t=xa(e);ba(u.current,t)||p&&t&&jp(t)===p||s.current?.setOpen(!1,Z(ht,e))},{once:!0,signal:n.signal})}function E(){b.clear(),y.current=null}function D(e){if(g){E();return}if(d.current=!1,e.touches.length!==1){E();return}e.stopPropagation();let t=e.touches[0],n={x:t.clientX,y:t.clientY};y.current=n,b.start(om,()=>{w(n.x,n.y,e.nativeEvent)})}function O(e){if(e.touches.length!==1){E();return}if(b.isStarted()&&y.current){let t=e.touches[0],n=Math.abs(t.clientX-y.current.x),r=Math.abs(t.clientY-y.current.y);(n>10||r>10)&&E()}}return _.useEffect(()=>()=>{C.current?.abort()},[]),_.useEffect(()=>{function e(e){if(g)return;let t=xa(e);(ba(v.current,t)||ba(c.current,t)||ba(l.current,t))&&e.preventDefault()}return Pn(kn(v.current),`contextmenu`,e)},[l,g,c]),X(`div`,e,{state:{open:h},ref:[v,t],props:[{onContextMenu:T,onTouchStart:D,onTouchMove:O,onTouchEnd:E,onTouchCancel:E,style:{WebkitTouchCallout:`none`}},a],stateAttributesMapping:Ea})});process.env.NODE_ENV!==`production`&&(sm.displayName=`ContextMenuTrigger`);var cm=up,lm=_.createContext(void 0);process.env.NODE_ENV!==`production`&&(lm.displayName=`CSPContext`);var um={disableStyleElements:!1};function dm(){return _.useContext(lm)??um}var fm=bc(function(e){return kl(`dialog`,e)});process.env.NODE_ENV!==`production`&&(fm.displayName=`DialogRoot`);var pm=c({Backdrop:()=>Al,Close:()=>jl,Description:()=>Ml,Handle:()=>ou,Popup:()=>Yl,Portal:()=>Ql,Root:()=>fm,Title:()=>$l,Trigger:()=>ru,Viewport:()=>au,createHandle:()=>su}),mm=`--nested-drawers`,hm=`--drawer-height`,gm=`--drawer-frontmost-height`,_m=`--drawer-swipe-movement-x`,vm=`--drawer-swipe-movement-y`,ym=`--drawer-snap-point-offset`,bm=`--drawer-swipe-strength`,xm=`--drawer-swipe-progress`,Sm=_.forwardRef(function(e,t){let{render:n,className:r,style:i,forceRender:a=!1,...o}=e,s=wl(),c=s.useState(`open`),l=s.useState(`nested`),u=s.useState(`mounted`);return X(`div`,e,{state:{open:c,transitionStatus:s.useState(`transitionStatus`)},ref:[s.context.backdropRef,t],stateAttributesMapping:Oa,props:[{role:`presentation`,hidden:!u,style:{pointerEvents:c?void 0:`none`,userSelect:`none`,WebkitUserSelect:`none`,[xm]:`0`,[bm]:`1`}},o],enabled:a||!l})});process.env.NODE_ENV!==`production`&&(Sm.displayName=`DrawerBackdrop`);var Cm=jl,wm=`data-drawer-content`,Tm=_.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e;return wl(),X(`div`,e,{ref:t,props:[{[wm]:``},a]})});process.env.NODE_ENV!==`production`&&(Tm.displayName=`DrawerContent`);var Em=Ml,Dm=_.createContext(void 0);process.env.NODE_ENV!==`production`&&(Dm.displayName=`DrawerProviderContext`);function Om(){return _.useContext(Dm)}var km={active(e){return e?{"data-active":``}:{"data-inactive":``}}},Am=_.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,o=Om(),s=o?.active??!1,c=o?.visualStateStore,l=_.useRef(null);return M(()=>{let e=l.current;if(!e||!c)return;let t=()=>{let{swipeProgress:t,frontmostHeight:n}=c.getSnapshot();t<=0?e.style.setProperty(xm,`0`):e.style.setProperty(xm,`${t}`),n<=0?e.style.removeProperty(hm):e.style.setProperty(hm,`${n}px`)};t();let n=c.subscribe(t);return()=>{n(),e.style.setProperty(xm,`0`),e.style.removeProperty(hm)}},[c]),X(`div`,e,{ref:[t,l],state:{active:s},props:[{style:{[xm]:`0`}},a],stateAttributesMapping:km})});process.env.NODE_ENV!==`production`&&(Am.displayName=`DrawerIndent`);var jm={active(e){return e?{"data-active":``}:{"data-inactive":``}}},Mm=_.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e;return X(`div`,e,{ref:t,state:{active:Om()?.active??!1},props:a,stateAttributesMapping:jm})});process.env.NODE_ENV!==`production`&&(Mm.displayName=`DrawerIndentBackground`);var Nm=`data-expanded`,Pm=`data-nested-drawer-open`,Fm=`data-nested-drawer-swiping`,Im=`data-swipe-dismiss`,Lm=`data-swipe-direction`,Rm=`data-swiping`,zm=_.createContext(void 0);process.env.NODE_ENV!==`production`&&(zm.displayName=`DrawerRootContext`);function Bm(e){let t=_.useContext(zm);if(e!==!0&&t===void 0)throw Error(process.env.NODE_ENV===`production`?K(90):`Base UI: DrawerRootContext is missing. Drawer parts must be placed within <Drawer.Root>.`);return t}function Vm(e,t=-(2**53-1),n=2**53-1){return Math.max(t,Math.min(e,n))}function Hm(e,t){let n=e+t;return n>=0?t:-Math.sqrt(-n)-e}function Um(e,t,n){if(!Number.isFinite(t)||t<=0)return null;if(typeof e==`number`)return Number.isFinite(e)?e<=1?Vm(e,0,1)*t:e:null;let r=e.trim();if(r.endsWith(`px`)){let e=Number.parseFloat(r);return Number.isFinite(e)?e:null}if(r.endsWith(`rem`)){let e=Number.parseFloat(r);return Number.isFinite(e)?e*n:null}return null}function Wm(e,t){let n=-1,r=1/0;for(let i=0;i<e.length;i+=1){let a=Math.abs(e[i]-t);a<r&&(r=a,n=i)}return n}function Gm(){let e=wl(),{snapPoints:t,activeSnapPoint:n,setActiveSnapPoint:r,popupHeight:i}=Bm(),a=e.useState(`viewportElement`),[o,s]=_.useState(0),[c,l]=_.useState(16),u=T(()=>{let e=kn(a).documentElement;s(a?a.offsetHeight:e.clientHeight);let t=parseFloat(getComputedStyle(e).fontSize);Number.isFinite(t)&&l(t)});M(()=>{if(u(),!a||typeof ResizeObserver!=`function`)return;let e=new ResizeObserver(u);return e.observe(a),()=>{e.disconnect()}},[u,a]);let d=_.useMemo(()=>{if(!t||t.length===0||o<=0||i<=0)return[];let e=Math.min(i,o),n=t.map(t=>{let n=Um(t,o,c);if(n===null)return null;let r=Vm(n,0,e);return{value:t,height:r,offset:Math.max(0,i-r)}}).filter(e=>!!e);if(n.length<=1)return n;let r=[],a=[];for(let e=n.length-1;e>=0;--e){let t=n[e];a.some(e=>Math.abs(e-t.height)<=1)||(a.push(t.height),r.push(t))}return r.reverse(),r},[i,c,t,o]);return{snapPoints:t,activeSnapPoint:n,setActiveSnapPoint:r,popupHeight:i,viewportHeight:o,resolvedSnapPoints:d,activeSnapPointOffset:_.useMemo(()=>{if(n===null)return;let e=d.find(e=>Object.is(e.value,n));if(e)return e;let t=Math.min(i,o),r=Um(n,o,c);if(r===null)return;let a=Vm(r,0,t);return d[Wm(d.map(e=>e.height),a)]},[n,i,d,c,o])?.offset??null}}var Km=_.createContext(null);process.env.NODE_ENV!==`production`&&(Km.displayName=`DrawerViewportContext`);function qm(){return _.useContext(Km)}var Jm=!1;function Ym(){Jm||=(typeof CSS<`u`&&`registerProperty`in CSS&&([_m,vm,ym].forEach(e=>{try{CSS.registerProperty({name:e,syntax:`<length>`,inherits:!1,initialValue:`0px`})}catch{}}),[{name:xm,initialValue:`0`},{name:bm,initialValue:`1`}].forEach(({name:e,initialValue:t})=>{try{CSS.registerProperty({name:e,syntax:`<number>`,inherits:!1,initialValue:t})}catch{}})),!0)}var Xm={...Oa,expanded(e){return e?{[Nm]:``}:null},nestedDrawerOpen(e){return e?{[Pm]:``}:null},nestedDrawerSwiping(e){return e?{[Fm]:``}:null},swipeDirection(e){return{[Lm]:e}},swiping(e){return e?{[Rm]:``}:null}},Zm=_.forwardRef(function(e,t){let{render:n,className:r,style:i,finalFocus:a,initialFocus:o,...s}=e,c=wl(),l=c.context.popupRef,{swipeDirection:u,frontmostHeight:d,hasNestedDrawer:f,nestedSwiping:p,nestedSwipeProgressStore:m,onPopupHeightChange:h,notifyParentFrontmostHeight:v,notifyParentHasNestedDrawer:y}=Bm(),x=c.useState(`descriptionElementId`),S=c.useState(`disablePointerDismissal`),C=c.useState(`floatingRootContext`),w=c.useState(`popupProps`),E=c.useState(`modal`),D=c.useState(`mounted`),O=c.useState(`nested`),k=c.useState(`nestedOpenDrawerCount`),A=c.useState(`transitionStatus`),N=c.useState(`open`),P=c.useState(`openMethod`),F=c.useState(`titleElementId`),I=c.useState(`role`),R=C.useState(`floatingId`),z=s.id??R,B=qm();Pl();let{snapPoints:V,activeSnapPoint:H,activeSnapPointOffset:U}=Gm(),W=k>0,G=B?.swiping??!1,K=B?.swipeStrength??null,[q,J]=_.useState(0),ee=_.useRef(0);process.env.NODE_ENV!==`production`&&_.useEffect(()=>{B||g(`<Drawer.Popup> expected to be rendered within <Drawer.Viewport>. Omitting the viewport disables drawer swipe handling and touch scroll locking. Wrap <Drawer.Popup> in <Drawer.Viewport>.${b.captureOwnerStack?.()||``}`)},[B]);let Y=T(()=>{let e=l.current;if(!e)return;let t=e.offsetHeight;if(ee.current>0&&d>ee.current&&t>ee.current)return;if(ee.current>0&&f){let e=ee.current;J(e),h(e);return}let n=t;n!==ee.current&&(ee.current=n,J(n),h(n))});M(()=>{if(!D){ee.current=0,J(0),h(0);return}let e=l.current;if(!e||(Ym(),Y(),typeof ResizeObserver!=`function`))return;let t=new ResizeObserver(Y);return t.observe(e),()=>{t.disconnect()}},[Y,D,W,h,l]),M(()=>{let e=()=>{let e=l.current;if(!e)return;let t=m.getSnapshot();t>0?e.style.setProperty(xm,`${t}`):e.style.setProperty(xm,`0`)};e();let t=m.subscribe(e),n=l.current;return()=>{t(),n&&n.style.setProperty(xm,`0`)}},[m,l]),M(()=>{if(N)return v?.(d),()=>{v?.(0)}},[d,N,v]),M(()=>{if(y)return y(N||A===`ending`),()=>{y(!1)}},[y,N,A]),Vn({open:N,ref:l,onComplete(){N&&c.context.onOpenChangeComplete?.(!0)}});let te=o===void 0?l:o,ne=c.useStateSetter(`popupElement`),re={open:N,nested:O,transitionStatus:A,expanded:H===1,nestedDrawerOpen:W,nestedDrawerSwiping:p,swipeDirection:u,swiping:G},ie;q&&(f||A===`ending`)&&(ie=`${q}px`);let ae=V&&V.length>0&&(u===`down`||u===`up`),oe=null;ae&&U!==null&&(oe=u===`up`?-U:U);let se=B?B.getDragStyles():j;if(ae&&u===`down`){let e=U??0,t=Number.parseFloat(String(se[vm]));se=G&&Number.isFinite(t)?{...se,transform:void 0,[vm]:`${Hm(e,t)}px`}:{...se,transform:void 0}}let ce=X(`div`,e,{state:re,props:[w,{id:z,"aria-labelledby":F,"aria-describedby":x,role:I,...jc,hidden:!D,onKeyDown(e){Hl.has(e.key)&&e.stopPropagation()},style:{...se,[xm]:`0`,[mm]:k,[hm]:ie,[ym]:typeof oe==`number`?`${oe}px`:`0px`,[gm]:d?`${d}px`:void 0,[bm]:typeof K==`number`&&Number.isFinite(K)&&K>0?`${K}`:`1`}},s],ref:[t,l,ne],stateAttributesMapping:Xm});return(0,L.jsx)(Rs,{context:C,openInteractionType:P,disabled:!D,closeOnFocusOut:!S,initialFocus:te,returnFocus:a,modal:E!==!1,restoreFocus:`popup`,children:ce})});process.env.NODE_ENV!==`production`&&(Zm.displayName=`DrawerPopup`);var Qm=Ql;function $m(e){let{children:t}=e,[n,r]=_.useState(()=>new Set),[i]=_.useState(eh),a=T((e,t)=>{r(n=>{if(n.has(e)===t)return n;let r=new Set(n);return t?r.add(e):r.delete(e),r})}),o=T(e=>{a(e,!1)}),s=n.size>0,c=_.useMemo(()=>({setDrawerOpen:a,removeDrawer:o,active:s,visualStateStore:i}),[s,o,a,i]);return(0,L.jsx)(Dm.Provider,{value:c,children:t})}function eh(){let e={swipeProgress:0,frontmostHeight:0},t=new Set;return{getSnapshot:()=>e,set(n){let r=e.swipeProgress;n.swipeProgress!==void 0&&(r=Number.isFinite(n.swipeProgress)?n.swipeProgress:0);let i=e.frontmostHeight;n.frontmostHeight!==void 0&&(i=Number.isFinite(n.frontmostHeight)?n.frontmostHeight:0),(r!==e.swipeProgress||i!==e.frontmostHeight)&&(e={swipeProgress:r,frontmostHeight:i},t.forEach(e=>{e()}))},subscribe(e){return t.add(e),()=>{t.delete(e)}}}}var th,nh;function rh(e){let{children:t,open:n,defaultOpen:r=!1,onOpenChange:i,onOpenChangeComplete:a,disablePointerDismissal:o=!1,modal:s=!0,actionsRef:c,handle:l,triggerId:u,defaultTriggerId:d=null,swipeDirection:f=`down`,snapToSequentialPoints:p=!1,snapPoints:m,snapPoint:h,defaultSnapPoint:g,onSnapPointChange:y}=e,b=Bm(!0),x=b?.onNestedSwipeProgressChange,S=b?.onNestedFrontmostHeightChange,C=b?.onNestedSwipingChange,w=b?.onNestedDrawerPresenceChange,[E,D]=_.useState(0),[O,k]=_.useState(0),[A,j]=_.useState(!1),[M,N]=_.useState(!1),[P]=_.useState(ih),F=g===void 0?m?.[0]??null:g,I=h!==void 0,[R,z]=v({controlled:h,default:F,name:`Drawer`,state:`snapPoint`}),B=_.useRef(!1),V=_.useRef(!1),H=T((e,t)=>{let n=t??Z(`none`);y?.(e,n),!n.isCanceled&&z(e)}),U=_.useMemo(()=>I||!m||m.length===0?R:R===null||!m.some(e=>Object.is(e,R))?F:R,[R,I,F,m]),W=T(e=>{D(e),!B.current&&e>0&&k(e)}),G=T(e=>{if(e>0){B.current=!0,k(e);return}B.current=!1,E>0&&k(E)}),K=T(e=>{j(e)}),q=T(e=>{P.set(e),x?.(e)}),J=T(e=>{N(e),C?.(e)}),ee=T((e,t)=>{i?.(e,t),!t.isCanceled&&!e&&m&&m.length>0&&H(F,Z(t.reason,t.event,t.trigger))}),Y=_.useMemo(()=>({swipeDirection:f,swipeAreaActiveRef:V,snapToSequentialPoints:p,snapPoints:m,activeSnapPoint:U,setActiveSnapPoint:H,frontmostHeight:O,popupHeight:E,hasNestedDrawer:A,nestedSwiping:M,nestedSwipeProgressStore:P,onNestedDrawerPresenceChange:K,onPopupHeightChange:W,onNestedFrontmostHeightChange:G,onNestedSwipingChange:J,onNestedSwipeProgressChange:q,notifyParentFrontmostHeight:S,notifyParentSwipingChange:C,notifyParentSwipeProgressChange:x,notifyParentHasNestedDrawer:w}),[U,O,A,M,P,w,x,C,S,K,G,q,J,W,E,H,m,p,V,f]),te=kl(`drawer`,{open:n,defaultOpen:r,onOpenChange:ee,onOpenChangeComplete:a,disablePointerDismissal:o,modal:s,actionsRef:c,handle:l,triggerId:u,defaultTriggerId:d,children:typeof t==`function`?e=>(0,L.jsxs)(_.Fragment,{children:[th||=(0,L.jsx)(ah,{}),t(e)]}):(0,L.jsxs)(_.Fragment,{children:[nh||=(0,L.jsx)(ah,{}),t]})});return(0,L.jsx)(zm.Provider,{value:Y,children:te})}function ih(){let e=0,t=new Set;return{getSnapshot:()=>e,set(n){let r=Number.isFinite(n)?n:0;r!==e&&(e=r,t.forEach(e=>{e()}))},subscribe(e){return t.add(e),()=>{t.delete(e)}}}}function ah(){let e=Om(),t=wl(!1),n=e?.setDrawerOpen,r=e?.removeDrawer,i=t.useState(`open`),a=t.useState(`nestedOpenDialogCount`),o=t.useState(`popupElement`),s=a===0;return M(()=>{if(r)return()=>{r(t)}},[r,t]),M(()=>{n?.(t,i)},[i,n,t]),_.useEffect(()=>{if(!i||!s||!Zi)return;let e=nn(o).CloseWatcher;if(!e)return;function n(e){t.select(`open`)&&t.setOpen(!1,Z(ct,e))}let r=new e,a=Pn(r,`close`,n);return()=>{a(),r.destroy()}},[t,s,i,o]),null}function oh(e,t,n){return typeof e?.elementFromPoint==`function`?e.elementFromPoint(t,n):null}function sh(e,t){let n=(t??nn(e).getComputedStyle(e)).transform,r=0,i=0,a=1;if(n&&n!==`none`){let e=n.match(/matrix(?:3d)?\(([^)]+)\)/);if(e){let t=e[1].split(`, `).map(parseFloat);t.length===6?(r=t[4],i=t[5],a=Math.sqrt(t[0]*t[0]+t[1]*t[1])):t.length===16&&(r=t[12],i=t[13],a=t[0])}}return{x:r,y:i,scale:a}}var ch=40,lh=10,uh=1,dh=50,fh=16,ph=80,mh=`button,a,input,select,textarea,label,[role="button"]`;function hh(e,t,n){switch(e){case`up`:return-n;case`down`:return n;case`left`:return-t;case`right`:return t;default:return 0}}function gh(e){return Number.isFinite(e)&&e>0?e:null}function _h(e,t){return`translate3d(${e.x}px,${e.y}px,0) scale(${t})`}function vh(e){return e%2==1}function yh(e,t,n){let r=e[n];if(typeof r==`function`)try{r.call(e,t)}catch(e){if(e&&typeof e==`object`&&`name`in e&&e.name===`NotFoundError`)return;throw e}}function bh(e){let{enabled:t,directions:n,elementRef:r,movementCssVars:i,canStart:a,ignoreSelectorWhenTouch:o=!0,ignoreScrollableAncestors:s=!1,swipeThreshold:c,onDismiss:l,onProgress:u,onCancel:d,onSwipeStart:f,onRelease:p,onSwipingChange:m,trackDrag:h=!0}=e,g=mh,v=n.length===1?n[0]:void 0,y=Math.max(0,typeof c==`number`?c:ch),b=n.includes(`left`),x=n.includes(`right`),S=n.includes(`up`),C=n.includes(`down`),w=b||x,E=S||C,D=_.useMemo(()=>{let e=[];return E&&e.push(`vertical`),w&&e.push(`horizontal`),e},[w,E]),[O,k]=_.useState(void 0),[A,j]=_.useState(!1),[M,N]=_.useState(!1),P=_.useRef({x:0,y:0}),F=_.useRef({x:0,y:0}),I=_.useRef(null),L=_.useRef({x:0,y:0,scale:1}),R=_.useRef(void 0),z=_.useRef(0),B=_.useRef(!1),V=_.useRef({x:0,y:0}),H=_.useRef(null),U=_.useRef(!1),W=_.useRef(!1),G=_.useRef(null),K=_.useRef(!1),q=_.useRef(!1),J=_.useRef({width:0,height:0}),ee=_.useRef(0),Y=_.useRef(y),te=_.useRef(null),ne=_.useRef(null),re=_.useRef(null),ie=_.useRef({x:0,y:0}),ae=_.useRef(null),oe=_.useRef(!1),se=_.useRef(null),ce=T(e=>{oe.current!==e&&(oe.current=e,j(e),m?.(e))});function le(e){if(!e)return;let t=r.current,n=te.current;if(!t||!n)return;let i=n({element:t,direction:e});Y.current=Math.max(0,i)}let ue=T((e,t)=>{let n=Number.isFinite(e)?Vm(e,0,1):0,r=n!==ee.current,i=!1;if(t){let e=ae.current;i=!e||e.deltaX!==t.deltaX||e.deltaY!==t.deltaY||e.direction!==t.direction}(r||i)&&(ee.current=n,t?ae.current=t:r&&(ae.current=null),u?.(n,t))}),de=T(e=>{let t=r.current;if(!h||!t){e||(se.current=null);return}let n=t.style,a=se.current;e?(a||(se.current=[n.transition,n.transform]),n.transition=`none`):a&&([n.transition,n.transform]=a,se.current=null);let o=F.current,s=L.current,c=o.x-s.x,l=o.y-s.y;e&&(n.transform=_h(o,s.scale)),n.setProperty(i.x,`${c}px`),n.setProperty(i.y,`${l}px`)});function fe(e,t){if(t===null)return;let n=re.current;if(n&&t>n.time){let r=Math.max(t-n.time,fh);ie.current={x:(e.x-n.x)/r,y:(e.y-n.y)/r}}re.current={x:e.x,y:e.y,time:t}}let pe=_.useCallback(()=>{k(void 0),ce(!1),N(!1),ue(0),Y.current=y,te.current=null,P.current={x:0,y:0},F.current={x:0,y:0},L.current={x:0,y:0,scale:1},R.current=void 0,z.current=0,B.current=!1,V.current={x:0,y:0},H.current=null,U.current=!1,I.current=null,W.current=!1,G.current=null,K.current=!1,q.current=!1,J.current={width:0,height:0},ne.current=null,re.current=null,ie.current={x:0,y:0},ae.current=null,de(!1)},[ce,y,de,ue]);function me(e){if(`touches`in e){let t=e.touches[0];return t?{x:t.clientX,y:t.clientY}:null}return{x:e.clientX,y:e.clientY}}function he(e){return`touches`in e||e.pointerType===`touch`}function ge(e,t){let n=r.current?.getRootNode();return oh(n,e.x,e.y)??xa(t)}function _e(e,t){let n=n=>{let r=rd(e,t,n),i=kn(r);return r===i.body||r===i.documentElement?null:r};return w&&!E?n(`horizontal`):E&&!w?n(`vertical`):n(`vertical`)??n(`horizontal`)}function ve(e,t,n){K.current=!1;let i=he(e),a=ge(t,e.nativeEvent),l=kn(r.current).body,u=i&&l?_e(a,l):null,d=n?.ignoreScrollableTarget??!1;if(u&&!d||(K.current=!!(u&&d),a&&a.closest(g)&&(!i||o)))return!1;let p=r.current;if(s&&p&&a&&D.length>0&&!(n?.ignoreScrollableAncestors??!1)&&Bre(a,p,D))return!1;if(B.current=!1,R.current=void 0,z.current=0,P.current=t,ne.current=gh(e.timeStamp),V.current=t,I.current=t,Y.current=y,te.current=typeof c==`function`?c:null,p){J.current={width:p.offsetWidth,height:p.offsetHeight},le(v);let t=sh(p);L.current=t,F.current={x:t.x,y:t.y},fe({x:t.x,y:t.y},ne.current),`touches`in e||yh(p,e.pointerId,`setPointerCapture`)}return f?.(e.nativeEvent),ce(!0),H.current=null,U.current=!0,ue(0),de(!0),!0}function ye(){be(),K.current=!1,I.current=null}function be(){W.current=!1,G.current=null}function xe(e){if(ye(),!oe.current)return;ce(!1),H.current=null;let t=L.current;F.current={x:t.x,y:t.y},k(void 0),q.current=!1,de(!1);let n=r.current;n&&yh(n,e.pointerId,`releasePointerCapture`),ue(0,{deltaX:0,deltaY:0,direction:void 0}),d?.(e.nativeEvent)}function Se(e,t){let n=e=>Math.sign(e)*Math.abs(e)**.5,r=(e,t,r)=>!t&&e<0||!r&&e>0?n(e):e;return{x:w?r(e,b,x):n(e),y:E?r(t,S,C):n(t)}}function Ce(e,t,n){let r=(e,t,n,r,i)=>e>0&&t<=0&&r||e<0&&t>=Math.max(0,n)&&i,i=Math.abs(t),a=Math.abs(n);return E&&n!==0&&(!w||a>=i)?r(n,e.scrollTop,e.scrollHeight-e.clientHeight,C,S):w&&t!==0&&(!E||i>a)?r(t,e.scrollLeft,e.scrollWidth-e.clientWidth,x,b):null}let we=T(e=>{if(!t||e.defaultPrevented||e.nativeEvent.defaultPrevented||!(`touches`in e)&&e.button!==0)return;let n=me(e);n&&(W.current=!0,G.current=n,K.current=!1,q.current=!(`touches`in e),(!a||a(n,{nativeEvent:e.nativeEvent,direction:v}))&&ve(e,n)&&be())});function Te(e,n,r){if(!t||!oe.current)return;let i=xa(e.nativeEvent);if(he(e)&&!K.current){let t=e.currentTarget;if(_e(i,t))return}if(`touches`in e||e.preventDefault(),U.current&&(U.current=!1,h)){P.current=n;let t=gh(e.timeStamp);t!==null&&(ne.current=t)}let a=n.x,o=n.y,s=r.x,c=r.y;(c<0&&o>V.current.y||c>0&&o<V.current.y)&&(V.current={x:V.current.x,y:o}),(s<0&&a>V.current.x||s>0&&a<V.current.x)&&(V.current={x:a,y:V.current.y});let l=a-P.current.x,u=o-P.current.y,d=o-V.current.y,f=a-V.current.x,p=H.current;p===null&&w&&E&&Math.sqrt(l*l+u*u)>=uh&&(p=Math.abs(l)>Math.abs(u)?`horizontal`:`vertical`,H.current=p);let m;if(!R.current)p===`vertical`?u>0?m=`down`:u<0&&(m=`up`):p===`horizontal`?l>0?m=`right`:l<0&&(m=`left`):m=Math.abs(l)>=Math.abs(u)?l>0?`right`:`left`:u>0?`down`:`up`,m&&(m===`left`&&b||m===`right`&&x||m===`up`&&S||m===`down`&&C)&&(R.current=m,z.current=hh(m,l,u),k(m),le(m));else{let e=R.current,t=hh(e,f,d);t>Y.current?(B.current=!1,k(e)):!(b&&x)&&!(S&&C)&&z.current-t>=lh&&(B.current=!0)}let g=Se(l,u),_=L.current.x,y=L.current.y;p===`horizontal`?w&&(_+=g.x):(p===`vertical`||w&&(_+=g.x),E&&(y+=g.y));let T=F.current,D=_!==T.x||y!==T.y;F.current={x:_,y},D&&de(!0),fe({x:_,y},gh(e.timeStamp));let O=_-L.current.x,A=y-L.current.y,j={deltaX:O,deltaY:A,direction:R.current},M=0,N=v??R.current;if(N){let e=N===`left`||N===`right`?J.current.width:J.current.height,t=L.current.scale||1,n=hh(N,O,A);e>0&&t>0&&n>0&&(M=n/(e*t))}ue(M,j)}let Ee=T(e=>{if(!t)return;let i=F.current,a=L.current,o=i.x-a.x,s=i.y-a.y,c={deltaX:o,deltaY:s,direction:R.current};if(!oe.current){ye(),ue(0,c);return}ce(!1),H.current=null,ye(),q.current=!1;let u=r.current;u&&(`touches`in e||yh(u,e.pointerId,`releasePointerCapture`));let d=o,f=s,m=ne.current,h=gh(e.timeStamp),g=m!==null&&h!==null&&h>m?h-m:0,_=g>0?Math.max(g,dh):0,y=_>0?d/_:0,b=_>0?f/_:0,x=ie.current.x,S=ie.current.y,C=re.current;if(C&&h!==null&&h>=C.time){let e=h-C.time;if(e<=ph){let t=Math.max(e,fh),n=i.x-C.x,r=i.y-C.y,a=n/t,o=r/t;a!==0&&(x=a),o!==0&&(S=o)}else x=0,S=0}let w=p?.({event:e.nativeEvent,direction:R.current,deltaX:d,deltaY:f,velocityX:y,velocityY:b,releaseVelocityX:x,releaseVelocityY:S}),T=typeof w==`boolean`;if(B.current&&!T){F.current={x:a.x,y:a.y},k(void 0),de(!1),ue(0,c);return}let E=!1,D;if(T)E=w,D=R.current??v;else for(let e of n)if(hh(e,d,f)>Y.current){E=!0,D=e;break}E&&D?(k(D),N(!0),de(!1),l?.(e.nativeEvent,{direction:D})):(F.current={x:a.x,y:a.y},k(void 0),de(!1),ue(0,c))}),X=T(e=>{let t=me(e);if(!t)return;let n=!1;if(!(`touches`in e)){let t=vh(e.buttons);if(t&&(q.current=!0),e.buttons!==0&&!t){xe(e);return}if(e.buttons===0&&q.current){if(!oe.current){Ee(e);return}n=!0}}if(!A&&W.current){if(!he(e)&&(e.defaultPrevented||e.nativeEvent.defaultPrevented)){ye();return}if(!a||a(t,{nativeEvent:e.nativeEvent,direction:v})){let n=G.current,i=!1;if(he(e)){let a=r.current;if(n&&a){let r=ge(t,e.nativeEvent),o=kn(a).body,s=o?_e(r,o):null;if(s&&(ba(a,s)||ba(s,a))){let e=Ce(s,t.x-n.x,t.y-n.y);if(e===!1)return;e===!0&&(i=!0)}}}ve(e,t,{ignoreScrollableTarget:i,ignoreScrollableAncestors:i})&&(n&&i?(be(),P.current=n,V.current=n,I.current=n,U.current=!1):(be(),K.current=!1))}}let i=I.current,o=i===null?{x:0,y:0}:{x:t.x-i.x,y:t.y-i.y};I.current=t,Te(e,t,o),n&&!(`touches`in e)&&Ee(e)}),De=T((e,t)=>{X({touches:e.touches,currentTarget:t,nativeEvent:e,defaultPrevented:e.defaultPrevented,timeStamp:e.timeStamp})}),Oe=_.useCallback(()=>{let e=oe.current,t=F.current,n=L.current,r=t.x-n.x,a=t.y-n.y;return!e&&r===0&&a===0&&!M?{[i.x]:`0px`,[i.y]:`0px`}:{transition:e?`none`:void 0,transform:e?_h(t,n.scale):void 0,[i.x]:`${r}px`,[i.y]:`${a}px`}},[M,i]);return{swiping:A,swipeDirection:O,dragDismissed:M,getPointerProps:_.useCallback(()=>t?{onPointerDown:we,onPointerMove:X,onPointerUp:Ee,onPointerCancel:Ee}:{},[t,Ee,X,we]),getTouchProps:_.useCallback(()=>t?{onTouchStart:we,onTouchMove:X,onTouchEnd:Ee,onTouchCancel:Ee}:{},[t,Ee,X,we]),moveNative:De,getDragStyles:Oe,reset:pe}}var xh=$l,Sh=ru,Ch=`data-nested-dialog-open`,wh=_.createContext(void 0);process.env.NODE_ENV!==`production`&&(wh.displayName=`DrawerVirtualKeyboardContext`);function Th(){return _.useContext(wh)}var Eh=10,Dh=.5,Oh=.5,kh=300,Ah=4,jh=.2,Mh=4,Nh=80,Ph=360,Fh=.1,Ih=6,Lh=2,Rh=`[${wm}]`,zh=_.forwardRef(function(e,t){let{render:n,className:r,style:i,children:a,...o}=e,s=wl(),c=s.context.popupRef,l=s.context.backdropRef,{swipeDirection:u,notifyParentSwipingChange:d,notifyParentSwipeProgressChange:f,frontmostHeight:p,snapToSequentialPoints:m,swipeAreaActiveRef:h}=Bm(),g=Om(),{snapPoints:v,resolvedSnapPoints:y,activeSnapPoint:b,activeSnapPointOffset:x,setActiveSnapPoint:S,popupHeight:C}=Gm(),w=s.useState(`open`),E=s.useState(`mounted`),D=s.useState(`nested`),O=s.useState(`nestedOpenDrawerCount`),k=s.useState(`viewportElement`),A=s.useState(`popupElement`),j=g?.visualStateStore,N=O>0,P=u===`left`||u===`right`?`horizontal`:`vertical`,F=P===`vertical`,I=F?`horizontal`:`vertical`,[R,z]=_.useState(null),B=_.useRef(void 0),V=_.useRef(null),H=kt(),U=_.useRef(!1),W=_.useRef(!1),G=_.useRef(``),K=_.useRef(!1),q=_.useRef(!1),J=_.useRef(null),ee=Th(),Y=_.useMemo(()=>{if(!v||v.length<2||y.length<2||u!==`down`&&u!==`up`)return null;let e=y.map(e=>e.offset).sort((e,t)=>e-t),t=e[0];return{minOffset:t,range:e[1]-t}},[y,v,u]),te=_.useMemo(()=>!Y||x===null?null:Vm((x-Y.minOffset)/Y.range,0,1),[x,Y]),ne=_.useMemo(()=>v&&v.length>0&&(u===`down`||u===`up`)?u===`down`?[`down`,`up`]:[`up`,`down`]:[u],[v,u]),re=T(e=>{c.current?.toggleAttribute(Im,e),l.current?.toggleAttribute(Im,e)}),ie=T(()=>{re(!1),c.current?.removeAttribute(Rt),z(null)}),ae=T(()=>{W.current&&(W.current=!1,d?.(!1))}),oe=T((e,t,n)=>{let r=w&&!D&&t,i=r?e:0,a=w&&t?e:0;n&&f&&(f(a),a<=0&&ae()),j?.set({swipeProgress:i,frontmostHeight:i>0?p:0});let o=l.current;if(!o)return;let s=r&&i>0;o.style.setProperty(xm,s?`${i}`:`0`),s&&p>0?o.style.setProperty(hm,`${p}px`):o.style.removeProperty(hm)});function se(e,t,n,r,i,a,o,s){let c=Uh(e,t);if(c<=0)return null;let l=((t===`down`||t===`up`)&&v&&v.length>0?x??0:0)+hh(t,n,r),u=Math.max(0,c-l);if(u<=0)return null;let d=hh(t,o,s),f=Math.abs(d)>0?d:hh(t,i,a);return f<=jh?null:Fh+(Vm(u/Vm(f,jh,Mh),Nh,Ph)-Nh)/280*.9}function ce(e){if(W.current||!e)return;let t=hh(e.direction??u,e.deltaX,e.deltaY);Math.abs(t)<Eh||(W.current=!0,d?.(!0))}let le=bh({enabled:E&&!N,directions:ne,elementRef:s.context.popupRef,ignoreSelectorWhenTouch:!1,ignoreScrollableAncestors:!0,movementCssVars:{x:_m,y:vm},onSwipeStart(e){if(`touches`in e||e.pointerType===`touch`)return;let t=c.current,n=kn(t).getSelection?.();if(!n||n.isCollapsed)return;let r=on(n.anchorNode)?n.anchorNode:n.anchorNode?.parentElement,i=on(n.focusNode)?n.focusNode:n.focusNode?.parentElement;(ba(t,r)||ba(t,i))&&n.removeAllRanges()},onSwipingChange(e){U.current=e,Bh(s.context.backdropRef.current,e),!e&&!f&&ae()},swipeThreshold({element:e,direction:t}){return Wh(e,t)},canStart(e,t){let n=s.context.popupRef.current;if(!n)return!1;let r=n.ownerDocument,i=oh(n.getRootNode(),e.x,e.y);if(!i||!ba(n,i))return!1;let a=t.nativeEvent;return!((`touches`in a||a.pointerType===`touch`)&&Jh(r,n))},onProgress(e,t){let n=U.current;n&&ce(t);let r=!!(v&&v.length>0);if(n&&u===`down`&&r&&t){let e=s.context.popupRef.current;e&&(e.style.removeProperty(`transform`),e.style.setProperty(vm,`${Hm(x??0,t.deltaY)}px`))}let i=e;if(Y&&C>0){let e=x??Y.minOffset;n&&t&&Number.isFinite(t.deltaY)?i=(e=>Vm((e-Y.minOffset)/Y.range,0,1))(Vm(e+t.deltaY,0,C)):te!==null&&(i=te)}n||(f?.(0),ae()),oe(i,!0,n)},onRelease({event:e,deltaX:t,deltaY:n,direction:r,velocityX:i,velocityY:a,releaseVelocityX:o,releaseVelocityY:c}){let l=s.context.popupRef.current;if(!l){ie();return}let d=l;function f(e){ae(),re(!0),d.style.removeProperty(`transition`),d.setAttribute(Rt,``),Rn.flushSync(()=>{z(se(d,e,t,n,i,a,o,c))})}if(!v||v.length===0){if(!r){ie();return}let e=hh(r,t,n);if(e<=0)return ie(),!1;if(hh(r,i,a)>=Dh)return f(r),!0;let o=e>Wh(d,r);return o?f(r):ie(),o}if(u!==`down`&&u!==`up`){ie();return}if(!C)return ie(),!1;if(y.length===0){ie();return}let p=u===`down`?n:-n,h=Math.sign(p),g=u===`down`?c:-c,_=u===`down`?a:-a,w=g;if(h!==0&&Math.abs(p)>=Eh){let e=Math.sign(w);e!==0&&e!==h&&(w=_)}let T=x??0,E=Vm(T+p,0,C),D=Math.abs(w)>=Oh?Vm(w,-4,Ah)*kh:0,O=m?E:Vm(E+D,0,C),k=Z(xt,e),A=()=>(oe(0,!0,!0),ie(),!1),j=e=>(S(e.value,k),A()),M=e=>r?(S(null,k),k.isCanceled?A():(B.current=b,f(u),!0)):j(e);if(m){let e=[...y].sort((e,t)=>e.offset-t.offset),t=e.map(e=>e.offset),n=Wm(t,T),r=e[Wm(t,O)],i=Math.sign(w),a=h!==0&&i!==0&&i===h&&Math.abs(w)>=Oh,o=O;if(a){let t=Vm(n+h,0,e.length-1);if(t!==n){let n=e[t];(h>0?O<n.offset:O>n.offset)&&(r=n,o=n.offset)}else if(h>0)return M(r)}return Math.abs(o-C)<Math.abs(o-r.offset)?M(r):j(r)}let N=y[Wm(y.map(e=>e.offset),O)];return w>=Dh&&p>0||Math.abs(O-C)<Math.abs(O-N.offset)?M(N):j(N)},onDismiss(e){j?.set({swipeProgress:0,frontmostHeight:0});let t=s.context.backdropRef.current;t&&(t.style.setProperty(xm,`0`),t.style.removeProperty(hm));let n=Z(xt,e);if(s.setOpen(!1,n),n.isCanceled){let t=B.current;t!==void 0&&S(t,Z(xt,e)),B.current=void 0,V.current?.(),ie();return}if(s.select(`open`)){let t=e;H.request(()=>{if(s.select(`open`)){let e=B.current;e!==void 0&&S(e,Z(xt,t)),B.current=void 0,ie(),V.current?.()}else B.current=void 0});return}B.current=void 0,re(!0)}}),ue=le.getPointerProps(),de=le.getTouchProps(),{moveNative:fe,reset:me}=le;V.current=me,_.useEffect(()=>{let e=k??A;if(!e)return;let t=e,n=kn(t);function r(e,r,i){let a=F?i.clientY-r.lastY:i.clientX-r.lastX;if(e.touches.length===2||Jh(n,t)||!w||!E||N||Nie(r,e,i,F))return;let o=r.scrollTarget;if(!o||o===n.documentElement||o===n.body){e.cancelable&&e.preventDefault(),e.stopPropagation(),fe(e,t);return}if(!Pie(o,P)){e.cancelable&&e.preventDefault(),e.stopPropagation();return}if(a!==0){let t=Fie(o,P,u,a);r.allowSwipe?e.cancelable&&e.preventDefault():e.cancelable&&t?(r.allowSwipe=!0,e.preventDefault()):r.allowSwipe=!1}r.allowSwipe===!0&&(e.stopPropagation(),fe(e,t))}function i(e){if(ee?.onTouchMove(e),q.current)return;let t=J.current,n=e.touches[0];n&&t&&(r(e,t,n),Mie(t,n))}return Pn(n,`touchmove`,i,{passive:!1,capture:!0})},[E,N,w,A,F,P,u,fe,k,ee]),M(()=>{Y&&!le.swiping&&oe(!w||D?0:te??0,!0,!1)},[oe,p,D,f,w,te,Y,le.swiping,s,j]),M(()=>{if(f)return w||f(0),()=>{f(0)}},[f,w]),M(()=>{w&&(h.current||me(),ie())},[ie,w,me,h]),M(()=>{let e=l.current;return()=>{j?.set({swipeProgress:0,frontmostHeight:0}),Bh(e,!1);let t=l.current;t!==e&&Bh(t,!1),ae()}},[l,ae,j]);let he=_.useMemo(()=>({swiping:le.swiping,getDragStyles:le.getDragStyles,swipeStrength:R??null,setSwipeDismissed:re}),[re,le.getDragStyles,le.swiping,R]);function ge(e){q.current=e,J.current=null}function _e(){ge(!1),G.current=``,K.current=!1}function ve(e){return G.current=``,e.pointerType!==`touch`}return(0,L.jsx)(au,{ref:t,className:r,style:i,render:n,...pe(o,{onPointerDown(e){if(G.current=e.pointerType,K.current=e.pointerType===`pen`,!w||!E||N)return;let t=oh(e.currentTarget.getRootNode(),e.clientX,e.clientY);Vh(t)||Hh(t)||e.pointerType!==`touch`&&ue.onPointerDown?.(e)},onPointerMove(e){e.pointerType!==`touch`&&ue.onPointerMove?.(e)},onPointerUp(e){ve(e)&&ue.onPointerUp?.(e)},onPointerCancel(e){ve(e)&&ue.onPointerCancel?.(e)},onTouchStart(e){if(G.current===`pen`&&K.current){K.current=!1,ge(!1);return}if(!w||!E||N){ge(!1);return}let t=e.touches[0];if(!t)return;if(jie(e)){ge(!1);return}let n=e.currentTarget,r=oh(n.getRootNode(),t.clientX,t.clientY),i=xa(e.nativeEvent),a=on(i)?i:n;if(!ba(n,a)){ge(!0);return}if(ee?.onTouchStart(e),Vh(r)){ge(!0);return}q.current=!1;let o=rd(a,n,P),s=rd(a,n,I)!=null,c=null;o&&(c=Zh(o,P,u)?null:!1),J.current={startX:t.clientX,startY:t.clientY,lastX:t.clientX,lastY:t.clientY,scrollTarget:o,hasCrossAxisScrollableContent:s,allowSwipe:c,preserveNativeCrossAxisScroll:!1,drawerAxisAttributed:!1},de.onTouchStart?.(e)},onTouchEnd(e){ee?.onTouchEnd(e),_e(),de.onTouchEnd?.(e)},onTouchCancel(e){ee?.onTouchCancel(),_e(),de.onTouchCancel?.(e)},[Ch]:void 0}),children:(0,L.jsx)(Km.Provider,{value:he,children:a})})});process.env.NODE_ENV!==`production`&&(zh.displayName=`DrawerViewport`);function Bh(e,t){e?.toggleAttribute(Rm,t)}function Vh(e){return!!e?.closest(gs)}function Hh(e){return!!e?.closest(Rh)}function Uh(e,t){return t===`left`||t===`right`?e.offsetWidth:e.offsetHeight}function Wh(e,t){return Math.max(Uh(e,t)*.5,Eh)}function Gh(e,t){return e instanceof t.HTMLInputElement&&e.type===`range`}function Kh(e){return e.tagName===`INPUT`||e.tagName===`TEXTAREA`}function qh(e,t){let n=on(e.anchorNode)?e.anchorNode:e.anchorNode?.parentElement,r=on(e.focusNode)?e.focusNode:e.focusNode?.parentElement;return e.containsNode(t,!0)||ba(t,n)||ba(t,r)}function Jh(e,t){let n=ya(e);if(n&&ba(t,n)&&Kh(n)){let{selectionStart:e,selectionEnd:t}=n;if(e!=null&&t!=null&&e<t)return!0}let r=e.getSelection?.();return!r||r.isCollapsed?!1:qh(r,t)}function Yh(e,t){return e.composedPath().some(e=>Gh(e,t))}function jie(e){return Yh(e.nativeEvent,nn(e.currentTarget))}function Mie(e,t){e.lastX=t.clientX,e.lastY=t.clientY}function Nie(e,t,n,r){if(e.preserveNativeCrossAxisScroll)return!0;if(e.drawerAxisAttributed||e.allowSwipe===!0||!e.hasCrossAxisScrollableContent)return!1;if(!t.cancelable)return e.preserveNativeCrossAxisScroll=!0,!0;let i=r?n.clientY-e.startY:n.clientX-e.startX,a=r?n.clientX-e.startX:n.clientY-e.startY,o=Math.abs(i),s=Math.abs(a);return s>=Ih&&s>o+Lh?(e.preserveNativeCrossAxisScroll=!0,!0):o>=Ih?(e.drawerAxisAttributed=!0,!1):!0}function Pie(e,t){return Xh(e,t).max>0}function Xh(e,t){if(t===`vertical`){let t=Math.max(0,e.scrollHeight-e.clientHeight);return{offset:e.scrollTop,max:t}}let n=Math.max(0,e.scrollWidth-e.clientWidth);return{offset:e.scrollLeft,max:n}}function Zh(e,t,n){let r=Qh(n,t),{offset:i,max:a}=Xh(e,t);return r?i<=0:i>=a}function Fie(e,t,n,r){return(Qh(n,t)?r>0:r<0)&&Zh(e,t,n)}function Qh(e,t){return t===`vertical`?e===`down`:e===`right`}var $h=_.createContext(void 0);process.env.NODE_ENV!==`production`&&($h.displayName=`FieldsetRootContext`);function Iie(e=!1){let t=_.useContext($h);if(!t&&!e)throw Error(process.env.NODE_ENV===`production`?K(86):`Base UI: FieldsetRootContext is missing. Fieldset parts must be placed within <Fieldset.Root>.`);return t}var eg=_.forwardRef(function(e,t){let{render:n,className:r,id:i,name:a,value:o,disabled:s=!1,onValueChange:c,defaultValue:l,autoFocus:u=!1,style:d,...f}=e,{state:p,name:m,disabled:h,setTouched:g,setDirty:y,validityData:b,setFocused:x,setFilled:S,validationMode:C,validation:w}=Wu(),{clearErrors:E,elementRef:D,submitCountRef:O}=qu(),k=h||s,A=m??a,j={...p,disabled:k},{labelId:N}=Yu(),P=Xu({id:i}),[F]=v({controlled:o,default:l,name:`FieldControl`,state:`value`}),I=o!==void 0,L=I?F:void 0,R=L==null?void 0:String(L),z=T(()=>w.inputRef.current?.value);Gu(w.inputRef,P,R,z,!k,a),M(()=>{let e=R??w.inputRef.current?.value;e!==void 0&&S(e!==``)},[R,w.inputRef,S]),eu(R,()=>{R!==void 0&&(E(A),y(R!==(b.initialValue??``)),w.change(R))});let B=_.useRef(null),V=oa();return M(()=>{u&&B.current===ya(kn(B.current))&&x(!0)},[u,x]),X(`input`,e,{ref:[t,B],state:j,props:[{id:P,disabled:k,name:A,ref:w.inputRef,"aria-labelledby":N,autoFocus:u,...I?{value:L}:{defaultValue:l},onChange(e){let t=e.currentTarget.value,n=Z(Ue,e.nativeEvent);c?.(t,n),!I&&(y(t!==(b.initialValue??``)),S(t!==``),!e.nativeEvent.defaultPrevented&&!n.isCanceled&&(E(A),w.change(t)))},onFocus(){x(!0)},onBlur(e){if(g(!0),x(!1),C===`onBlur`){let t=e.currentTarget.value;w.commit(t),I&&queueMicrotask(()=>{let e=w.inputRef.current?.value;e!==void 0&&e!==t&&e!==(b.initialValue??``)&&w.commit(e)})}},onKeyDown(e){if(e.currentTarget.tagName===`INPUT`&&e.key===`Enter`){g(!0);let t=e.currentTarget.value,n=e.currentTarget.form;if(n&&n===D.current&&!e.defaultPrevented){let t=e.currentTarget,n=O.current;V.start(0,()=>{O.current===n&&w.commit(t.value)})}else w.commit(t)}}},f,e=>w.getValidationProps(k,e)],stateAttributesMapping:Vu})});process.env.NODE_ENV!==`production`&&(eg.displayName=`FieldControl`);var tg=_.forwardRef(function(e,t){return(0,L.jsx)(eg,{ref:t,...e})});process.env.NODE_ENV!==`production`&&(tg.displayName=`Input`);var ng=`data-composite-item-active`;function Lie(e){let{loopFocus:t=!0,orientation:n=`both`,grid:r,onLoop:i,direction:a,highlightedIndex:o,onHighlightedIndexChange:s,rootRef:c,enableHomeAndEndKeys:l=!1,stopEventPropagation:u,disabledIndices:d,modifierKeys:f=A}=e,[p,m]=_.useState(0),h=r!=null,g=_.useRef(null),v=ee(g,c),y=_.useRef([]),b=_.useRef(!1),x=_.useRef(null),S=o??p,C=T((e,t=!1)=>{if(x.current=y.current[e]??null,(s??m)(e),t){let t=y.current[e];Gl(g.current,t,a,n)}}),w=T(e=>{if(e.size===0)return;if(b.current){let e=y.current,t=e.indexOf(x.current);if(t===-1){let t=e[S];!t||Eo(e,S,d)?C(Rie(e,d)):x.current=t}else t!==S&&C(t);return}b.current=!0;let t=Array.from(e.keys()),r=t.find(e=>e?.hasAttribute(`data-composite-item-active`))??null,i=r?e.get(r)?.index??-1:-1;if(i!==-1)C(i);else if(Eo(t,S,d)){let e=wo(t,{disabledIndices:d});xo(t,e)||C(e)}Gl(g.current,r,a,n)});M(()=>{if(d==null||o!=null||!b.current)return;let e=y.current;if(Eo(e,S,d)){let t=wo(e,{disabledIndices:d});xo(e,t)||C(t)}},[d,o,S,y,C]);let E=T((e,t,n)=>i?i(e,t,n,y):n),D=T(e=>{let o=e.key===`Home`||e.key===`End`;if(!Hl.has(e.key)||!l&&o||zie(e,f)||!g.current)return;let s=a===`rtl`,c=s?Ll:Rl,p=s?Rl:Ll,m=n===`vertical`?Il:c,_=n===`vertical`?Fl:p,v=xa(e.nativeEvent);if(v!=null&&Wl(v)&&!nm(v)){let t=v.selectionStart,n=v.selectionEnd,r=v.value;if(t==null||e.shiftKey||t!==n||e.key!==_&&t<r.length||e.key!==m&&t>0)return}let b=S,x=So(y,d),w=Co(y,d);r!=null&&(b=r({disabledIndices:d,elementsRef:y,event:e,highlightedIndex:S,loopFocus:t,maxIndex:w,minIndex:x,onLoop:E,orientation:n,rtl:s}));let T=n!==`vertical`&&e.key===c||n!==`horizontal`&&e.key===`ArrowDown`,D=n!==`vertical`&&e.key===p||n!==`horizontal`&&e.key===`ArrowUp`;l&&(e.key===`Home`?b=x:e.key===`End`&&(b=w)),b===S&&(T||D)&&(t&&b===w&&T?(b=x,i&&(b=i(e,S,b,y))):t&&b===x&&D?(b=w,i&&(b=i(e,S,b,y))):b=wo(y.current,{startingIndex:b,decrement:D,disabledIndices:d})),b!==S&&!xo(y.current,b)&&(u&&e.stopPropagation(),(h||o||T||D)&&e.preventDefault(),C(b,!0),queueMicrotask(()=>{y.current[b]?.focus()}))});return{props:{ref:v,onFocus(e){let t=g.current,n=xa(e.nativeEvent);t&&n!=null&&Wl(n)&&n.setSelectionRange(0,n.value.length)},onKeyDown:D},highlightedIndex:S,onHighlightedIndexChange:C,elementsRef:y,onMapChange:w,relayKeyboardEvent:D}}function Rie(e,t){let n=-1;for(let r=0;r<e.length;r+=1){let i=e[r];if(i&&!Eo(e,r,t)){if(i.hasAttribute(`data-composite-item-active`))return r;n===-1&&(n=r)}}return Math.max(n,0)}function zie(e,t){for(let n of Ere)if(!t.includes(n)&&e.getModifierState(n))return!0;return!1}function rg(e){let{render:t,className:n,style:r,refs:i=A,props:a=A,state:o=j,stateAttributesMapping:s,highlightedIndex:c,onHighlightedIndexChange:l,orientation:u,grid:d,loopFocus:f,onLoop:p,enableHomeAndEndKeys:m,onMapChange:h,stopEventPropagation:g=!0,rootRef:v,disabledIndices:y,modifierKeys:b,highlightItemOnHover:x=!1,tag:S=`div`,...C}=e,{props:w,highlightedIndex:T,onHighlightedIndexChange:E,elementsRef:D,onMapChange:O,relayKeyboardEvent:k}=Lie({grid:d,loopFocus:f,onLoop:p,orientation:u,highlightedIndex:c,onHighlightedIndexChange:l,rootRef:v,stopEventPropagation:g,enableHomeAndEndKeys:m,direction:sd(),disabledIndices:y,modifierKeys:b}),M=X(S,e,{state:o,ref:i,props:[w,...a,C],stateAttributesMapping:s}),N=_.useMemo(()=>({highlightedIndex:T,onHighlightedIndexChange:E,highlightItemOnHover:x,relayKeyboardEvent:k}),[T,E,x,k]);return(0,L.jsx)(En.Provider,{value:N,children:(0,L.jsx)(R,{elementsRef:D,onMapChange:e=>{h?.(e),O(e)},children:M})})}var ig=new Map;function ag(e,t){let n=JSON.stringify({locale:Qu(e),options:t}),r=ig.get(n);if(r)return r;let i=new Intl.NumberFormat(e,t);return ig.set(n,i),i}function og(e,t,n){return e==null?``:ag(t,n).format(e)}var sg=_.createContext(void 0);process.env.NODE_ENV!==`production`&&(sg.displayName=`MeterRootContext`);function cg(){let e=_.useContext(sg);if(e===void 0)throw Error(process.env.NODE_ENV===`production`?K(38):`Base UI: MeterRootContext is missing. Meter parts must be placed within <Meter.Root>.`);return e}function lg(e,t,n){return(e-t)*100/(n-t)}var ug=_.forwardRef(function(e,t){let{format:n,getAriaValueText:r,locale:i,max:a=100,min:o=0,value:s,render:c,className:l,children:u,style:d,...f}=e,[p,m]=_.useState(),h=lg(s,o,a),g=Vm(Number.isNaN(h)?0:h,0,100),v=Vm(Number.isNaN(s)?o:s,o,a),y=n?og(v,i,n):og(g/100,i,{style:`percent`}),b=y;r&&(b=r(y,s));let x={"aria-labelledby":p,"aria-valuemax":a,"aria-valuemin":o,"aria-valuenow":v,"aria-valuetext":b,role:`meter`,children:(0,L.jsxs)(_.Fragment,{children:[u,(0,L.jsx)(`span`,{role:`presentation`,style:Ua,children:`x`})]})},S=_.useMemo(()=>({formattedValue:y,percentageValue:g,setLabelId:m,value:s}),[y,g,m,s]),C=X(`div`,e,{ref:t,props:[x,f]});return(0,L.jsx)(sg.Provider,{value:S,children:C})});process.env.NODE_ENV!==`production`&&(ug.displayName=`MeterRoot`);var dg=_.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e;return X(`div`,e,{ref:t,props:a})});process.env.NODE_ENV!==`production`&&(dg.displayName=`MeterTrack`);var fg=_.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{percentageValue:o}=cg();return X(`div`,e,{ref:t,props:[{style:{insetInlineStart:0,height:`inherit`,width:`${o}%`}},a]})});process.env.NODE_ENV!==`production`&&(fg.displayName=`MeterIndicator`);var pg=_.forwardRef(function(e,t){let{className:n,render:r,children:i,style:a,...o}=e,{value:s,formattedValue:c}=cg();return X(`span`,e,{ref:t,props:[{"aria-hidden":!0,children:typeof i==`function`?i(c,s):c},o]})});process.env.NODE_ENV!==`production`&&(pg.displayName=`MeterValue`);var mg=_.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,...o}=e,{setLabelId:s}=cg();return X(`span`,e,{ref:t,props:[{id:kie(a,s),role:`presentation`},o]})});process.env.NODE_ENV!==`production`&&(mg.displayName=`MeterLabel`);var hg=_.createContext(void 0);process.env.NODE_ENV!==`production`&&(hg.displayName=`NavigationMenuRootContext`),process.env.NODE_ENV!==`production`&&(hg.displayName=`NavigationMenuRootContext`);function gg(e){let t=_.useContext(hg);if(t===void 0&&!e)throw Error(process.env.NODE_ENV===`production`?K(41):`Base UI: NavigationMenuRootContext is missing. Navigation Menu parts must be placed within <NavigationMenu.Root>.`);return t}var _g=_.createContext(void 0);process.env.NODE_ENV!==`production`&&(_g.displayName=`NavigationMenuTreeContext`);function vg(){return _.useContext(_g)}var yg=`--positioner-width`,bg=`--positioner-height`,xg=`--popup-width`,Sg=`--popup-height`;function Cg(e,t,n,r){e.style.setProperty(xg,`${n}px`),e.style.setProperty(Sg,`${r}px`),t.style.setProperty(yg,`${n}px`),t.style.setProperty(bg,`${r}px`)}var Bie=new Set([Ge,qe,ot]);function Vie(e){let t=parseFloat(e.style.getPropertyValue(`--positioner-width`))||0,n=parseFloat(e.style.getPropertyValue(`--positioner-height`))||0;return t<=0||n<=0?null:{width:t,height:n}}var wg=_.forwardRef(function(e,t){let{defaultValue:n=null,value:r,onValueChange:i,actionsRef:a,delay:o=50,closeDelay:s=50,orientation:c=`horizontal`,onOpenChangeComplete:l}=e,u=Os()!=null,d=gg(!0),[f,p]=v({controlled:r,default:n,name:`NavigationMenu`,state:`value`}),m=f!=null,h=_.useRef(void 0),g=_.useRef(null),[y,b]=_.useState(null),[x,S]=_.useState(null),[C,w]=_.useState(null),[E,D]=_.useState(null),[O,k]=_.useState(null),[A,j]=_.useState(void 0),[N,P]=_.useState(!1),F=_.useRef(null),I=_.useRef(null),R=_.useRef(null),z=_.useRef(null),B=_.useRef(null),V=_.useRef(null),H=_.useRef({abortController:null,owner:null}),{mounted:U,setMounted:W,transitionStatus:G}=At(m);M(()=>{if(m||!y||!x)return;let e=Vie(y);e&&Cg(x,y,e.width,e.height)},[m,x,y]),_.useEffect(()=>{P(!1)},[f]);let K=T((e,t)=>{e??(h.current=t.reason),e!==f&&i?.(e,t),!t.isCanceled&&(e??(k(null),j(void 0)),p(e),u&&e==null&&t.reason===`link-press`&&d&&d.setValue(null,t))}),q=T(()=>{let e=ya(kn(g.current));!(h.current&&Bie.has(h.current))&&sn(F.current)&&(e===kn(x).body||ba(x,e))&&x&&(F.current.focus({preventScroll:!0}),F.current=void 0),W(!1),l?.(!1),k(null),j(void 0),I.current=null,h.current=void 0});_.useImperativeHandle(a,()=>({unmount:q}),[q]),Vn({enabled:!a,open:m,ref:{current:x},onComplete(){m||q()}}),Vn({enabled:!a,open:m,ref:{current:E},onComplete(){m||q()}});let J=m?O:null,ee=_.useMemo(()=>({open:m,value:f,setValue:K,mounted:U,transitionStatus:G,positionerElement:y,setPositionerElement:b,popupElement:x,setPopupElement:S,viewportElement:C,setViewportElement:w,viewportTargetElement:E,setViewportTargetElement:D,activationDirection:J,setActivationDirection:k,floatingRootContext:A,setFloatingRootContext:j,currentContentRef:I,nested:u,rootRef:g,beforeInsideRef:R,afterInsideRef:z,beforeOutsideRef:B,afterOutsideRef:V,prevTriggerElementRef:F,popupAutoSizeResetRef:H,delay:o,closeDelay:s,orientation:c,viewportInert:N,setViewportInert:P}),[m,f,K,U,G,y,x,C,E,J,A,u,o,s,c,N]),Y=(0,L.jsx)(hg.Provider,{value:ee,children:(0,L.jsx)(Hie,{componentProps:e,forwardedRef:t,children:e.children})});return u?Y:(0,L.jsx)(Ms,{children:Y})});process.env.NODE_ENV!==`production`&&(wg.displayName=`NavigationMenuRoot`);function Hie(e){let{className:t,render:n,defaultValue:r,value:i,onValueChange:a,actionsRef:o,delay:s,closeDelay:c,orientation:l,onOpenChangeComplete:u,style:d,...f}=e.componentProps,p=As(),{rootRef:m,nested:h,open:g}=gg(),_={open:g,nested:h},v=X(h?`div`:`nav`,e.componentProps,{state:_,ref:[e.forwardedRef,m],props:f});return(0,L.jsx)(_g.Provider,{value:p,children:(0,L.jsx)(js,{id:p,children:v})})}var Tg=`data-base-ui-navigation-menu-trigger`,Eg=_.createContext(void 0);process.env.NODE_ENV!==`production`&&(Eg.displayName=`NavigationMenuDismissContext`);function Uie(){return _.useContext(Eg)}function Dg(){return new kc({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:new Kc,floatingId:void 0,syncOnly:!1,nested:!1,onOpenChange:void 0})}var Og=_.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,o=vg(),{orientation:s,open:c,floatingRootContext:l,positionerElement:u,value:d,closeDelay:f,viewportElement:p,nested:m}=gg(),h=_.useMemo(()=>Dg(),[]),g=l||h,v=u!=null||d==null;ll(g,{enabled:!!l&&(u!=null||p!=null||d==null),closeDelay:f,nodeId:o});let y=Vs(g,{enabled:v,outsidePressEvent:`intentional`,outsidePress(e){return xa(e)?.closest(`[${Tg}]`)===null}}),b=l?y:void 0,x={open:c},S=m?j:{onKeyDown(e){(s===`horizontal`&&(e.key===`ArrowLeft`||e.key===`ArrowRight`)||s===`vertical`&&(e.key===`ArrowUp`||e.key===`ArrowDown`))&&e.stopPropagation()}},C=[b?.floating||j,S,a],w=X(`ul`,e,{state:x,ref:t,props:C,enabled:m});return m?(0,L.jsx)(Eg.Provider,{value:b,children:w}):(0,L.jsx)(Eg.Provider,{value:b,children:(0,L.jsx)(rg,{render:n,className:r,style:i,state:x,refs:[t],props:C,loopFocus:!1,orientation:s,tag:`ul`})})});process.env.NODE_ENV!==`production`&&(Og.displayName=`NavigationMenuList`);var kg=_.createContext(void 0);process.env.NODE_ENV!==`production`&&(kg.displayName=`NavigationMenuItemContext`);function Ag(){let e=_.useContext(kg);if(!e)throw Error(process.env.NODE_ENV===`production`?K(39):`Base UI: NavigationMenuItem parts must be used within a <NavigationMenu.Item>.`);return e}var jg=_.forwardRef(function(e,t){let{render:n,className:r,style:i,value:a,...o}=e,s=He(),c=a??s,l=X(`li`,e,{ref:t,props:o}),u=_.useMemo(()=>({value:c}),[c]);return(0,L.jsx)(kg.Provider,{value:u,children:l})});process.env.NODE_ENV!==`production`&&(jg.displayName=`NavigationMenuItem`);var Wie=`data-activation-direction`,Mg={...Da,...Vt,activationDirection(e){return e?{[Wie]:e}:null}},Ng=_.forwardRef(function(e,t){let{render:n,className:r,style:i,keepMounted:a=!1,...o}=e,{mounted:s,viewportElement:c,value:l,activationDirection:u,currentContentRef:d,viewportTargetElement:f}=gg(),{value:p}=Ag(),m=vg(),h=s&&l===p,g=_.useRef(null),[v,y]=_.useState(!1),[b,x]=_.useState(!1),{mounted:S,setMounted:C,transitionStatus:w}=At(h);S&&!s&&C(!1),Vn({ref:g,open:h,onComplete(){h||C(!1)}}),M(()=>{h&&g.current&&(d.current=g.current)},[h,d]);let E={open:h,transitionStatus:w,activationDirection:u},D=T(e=>{e&&h&&(d.current=e)}),O={onFocus(e){xa(e.nativeEvent)?.hasAttribute(`data-base-ui-focus-guard`)||x(!0)},onBlur(e){ba(e.currentTarget,e.relatedTarget)||x(!1)}},k=!h&&S?{style:{position:`absolute`,top:0,left:0},inert:Xl(!b),...O}:O,A=f||c,N=a&&!S,P=a&&!A&&!v;return a&&A&&!v&&y(!0),P?(0,L.jsx)(rg,{render:n,className:r,style:i,state:E,refs:[t],props:[k,{hidden:!0},o],stateAttributesMapping:Mg}):!A||!S&&!a?null:Rn.createPortal((0,L.jsx)(js,{id:m,children:(0,L.jsx)(rg,{render:n,className:r,style:i,state:E,refs:[t,g,D],props:[k,N?{hidden:!0}:j,o],stateAttributesMapping:Mg})}),A)});process.env.NODE_ENV!==`production`&&(Ng.displayName=`NavigationMenuContent`);function Gie({currentTarget:e,relatedTarget:t},n){let{popupElement:r,rootRef:i,tree:a,nodeId:o}=n,s=a?es(a.nodesRef.current,o).some(e=>ba(e.context?.elements.floating,t)):!1;return r?!ba(r,e)&&!ba(r,t)&&!ba(i.current,t)&&!s:!ba(i.current,t)&&!s}var Pg={width:0,height:0},Fg=_.forwardRef(function(e,t){let{render:n,className:r,style:i,nativeButton:a=!0,disabled:o=!1,...s}=e,{value:c,setValue:l,mounted:u,open:d,positionerElement:f,setActivationDirection:p,setFloatingRootContext:m,popupElement:h,viewportElement:g,transitionStatus:v,rootRef:y,beforeOutsideRef:b,afterOutsideRef:x,afterInsideRef:S,beforeInsideRef:C,prevTriggerElementRef:w,popupAutoSizeResetRef:E,currentContentRef:D,delay:O,closeDelay:k,orientation:j,setViewportInert:N,nested:P}=gg(),{value:F}=Ag(),I=vg(),R=ks(),z=Uie(),B=sd(),V=oa(),H=kt(),U=kt(),W=kt(),[G,K]=_.useState(null),[q,J]=_.useState(!0),[ee,Y]=_.useState(``),te=_.useRef(null),ne=_.useRef(Pg),re=_.useRef(!1),ie=d&&c===F,ae=Fn(ie),oe=(f!=null||c==null)&&!o,se=f||g,ce=(se!=null||c==null)&&!o,le=Bn(h),ue=_.useCallback(e=>{te.current=e,K(e)},[]),de=T((e=!1)=>{(e||E.current.owner===F)&&(E.current.abortController?.abort(),E.current.abortController=null,E.current.owner=null)});M(()=>{ie||(H.cancel(),W.cancel(),de())},[ie,H,W,de]);function fe(e){e.style.setProperty(xg,`auto`),e.style.setProperty(Sg,`auto`)}function me(e,t){e.style.removeProperty(xg),e.style.removeProperty(Sg),t.style.removeProperty(yg),t.style.removeProperty(bg)}function he(e){de(!0);let t=new AbortController;E.current.abortController=t,E.current.owner=F,le(()=>{E.current.abortController=null,E.current.owner=null,fe(e)},t.signal)}let ge=T((e,t,n,r)=>{de(!0),me(e,t);let{width:i,height:a}=Rp(e),o=i||ne.current.width,s=a||ne.current.height;(r===0||n===0)&&(n=o,r=s),e.style.setProperty(xg,`${n}px`),e.style.setProperty(Sg,`${r}px`),t.style.setProperty(yg,`${o}px`),t.style.setProperty(bg,`${s}px`),W.request(()=>{ae.current&&(e.style.setProperty(xg,`${o}px`),e.style.setProperty(Sg,`${s}px`),he(e))})}),_e=T((e,t,n,r)=>{W.cancel(),H.cancel(),de(!0),n!==0&&r!==0&&(Cg(e,t,n,r),H.request(()=>{H.request(()=>{me(e,t);let{width:i,height:a}=Rp(e),o=i||n,s=a||r;Cg(e,t,n,r),W.request(()=>{ae.current&&(Cg(e,t,o,s),he(e))})})}))}),ve=T((e,t)=>{W.cancel(),de(!0),me(e,t);let{width:n,height:r}=Rp(e);n!==0&&r!==0&&(ne.current={width:n,height:r},fe(e),t.style.setProperty(yg,`${n}px`),t.style.setProperty(bg,`${r}px`))}),ye=T(e=>{let t=e.style.getPropertyValue(xg),n=e.style.getPropertyValue(Sg);return t===``||t===`auto`||n===``||n===`auto`?{size:ne.current,syncPositioner:!1}:{size:{width:e.offsetWidth||ne.current.width,height:e.offsetHeight||ne.current.height},syncPositioner:!0}});_.useEffect(()=>{d||(V.clear(),H.cancel(),U.cancel(),W.cancel(),de(!0),re.current=!1,Y(``))},[V,d,H,U,W,de]),_.useEffect(()=>{u||(ne.current=Pg)},[u]),M(()=>{if(!h||typeof ResizeObserver!=`function`)return;let e=new ResizeObserver(()=>{ne.current={width:h.offsetWidth,height:h.offsetHeight}});return e.observe(h),()=>{e.disconnect()}},[h]),_.useEffect(()=>{if(!d||!ie||!h||!f)return;let e=h,t=f,n=nn(t);function r(){U.cancel(),U.request(()=>ve(e,t))}let i=Pn(n,`resize`,r);return()=>{U.cancel(),i()}},[d,ie,h,f,U,ve]),_.useEffect(()=>{let e=D.current;if(!e||!h||!f||!ie||typeof MutationObserver!=`function`)return;let t=new MutationObserver(()=>{if(v===`starting`||h.hasAttribute(`data-starting-style`)){ve(h,f);return}let{size:e,syncPositioner:t}=ye(h);if(t){_e(h,f,e.width,e.height);return}ge(h,f,e.width,e.height)});return t.observe(e,{childList:!0,subtree:!0,characterData:!0,attributes:!0,attributeFilter:[`hidden`]}),()=>{t.disconnect()}},[D,h,f,ie,v,ye,_e,ge,ve]),M(()=>{if(ae.current&&d&&h&&f){if(re.current){re.current=!1;return}let{width:e,height:t}=Rp(h);ge(h,f,e,t)}},[D,ge,ae,d,h,f,v]);function be(e,t){let n=t.reason===Ge;if(!oe||ee===`touch`&&n||!e&&c!==F)return;function r(){n&&(J(!0),V.clear(),V.start(500,()=>{J(!1)})),e?l(F,t):(l(null,t),Y(``))}n?Rn.flushSync(r):r()}let xe=tl({open:d,onOpenChange:be,elements:{reference:G,floating:se}}),Se=cl(xe),Ce=ee!==`touch`;_.useEffect(()=>(d||(xe.context.dataRef.current.openEvent=void 0,Se.pointerType=void 0,Se.interactedInside=!1,Se.restTimeoutPending=!1,Se.openChangeTimeout.clear(),Se.restTimeout.clear()),()=>{ol(Se)}),[xe,Se,d]);let we=T(()=>!P||f||!te.current||!se?null:qie(te.current,se,I));function Te(){return P&&f?null:te.current?.closest(`ul`)??null}let Ee=ul(xe,{enabled:ce,move:!1,handleClose:Sl({blockPointerEvents:Ce,getScope:Te}),restMs:u&&f?0:O,delay:{close:k},triggerElementRef:te,getHandleCloseContext:we}),X=_.useMemo(()=>Ee?{reference:Ee}:void 0,[Ee]),De=zs(xe,{enabled:oe,stickIfOpen:q,toggle:ie}),Oe=_.useMemo(()=>pe(De.reference,X?.reference),[De.reference,X]);M(()=>{ie&&(m(xe),w.current=G)},[ie,xe,m,w,G]);function ke(e){Rn.flushSync(()=>{let t=e.currentTarget,n=w.current?.getBoundingClientRect();if(u&&n&&G){let e=G.getBoundingClientRect(),t=e.left>n.left,r=e.top>n.top;j===`horizontal`&&e.left!==n.left?p(t?`right`:`left`):j===`vertical`&&e.top!==n.top&&p(r?`down`:`up`)}if(e.type!==`click`&&c!=null&&(xe.context.dataRef.current.openEvent=void 0),(ee!==`touch`||e.type===`click`)&&(c!=null&&e.type!==`keydown`&&l(F,Z(e.type===`mouseenter`?Ge:We,e.nativeEvent)),e.type===`mouseenter`&&Ce&&(!P||!f)&&se)){let e=()=>{let e=Te()??t.ownerDocument.body;sl(Se,{scopeElement:e,referenceElement:t,floatingElement:se})};c!=null&&c!==F?queueMicrotask(e):e()}})}let Ae=T(e=>{if(o)return;if(!h||!f){ke(e);return}let{width:t,height:n}=Rp(h),r=c!=null&&c!==F&&(e.type===`click`||ee!==`touch`);ke(e),r&&(re.current=!0),ge(h,f,t,n)}),je={open:ie,disabled:o};function Me(e){Y(e.pointerType)}function Ne(e){Me(e),ol(Se)}let Pe={tabIndex:0,onMouseEnter:Ae,onClick:Ae,onPointerEnter:Me,onPointerDown:Ne,"aria-expanded":ie,"aria-controls":ie?h?.id:void 0,[Tg]:``,onFocus(){ie&&N(!1)},onMouseLeave(){c??ol(Se)},onKeyDown(e){if(P)return;let t=B===`rtl`?`ArrowLeft`:`ArrowRight`,n=j===`horizontal`&&e.key===`ArrowDown`,r=j===`vertical`&&e.key===t;(n||r)&&(l(F,Z(lt,e.nativeEvent)),Ae(e),ha(e))},onBlur(e){f&&h&&Gie({currentTarget:e.currentTarget,relatedTarget:e.relatedTarget},{popupElement:h,rootRef:y,tree:R,nodeId:I})&&l(null,Z(ot,e.nativeEvent))}},{getButtonProps:Fe,buttonRef:Ie}=jn({disabled:o,focusableWhenDisabled:!0,native:a}),Le=se;return(0,L.jsxs)(_.Fragment,{children:[(0,L.jsx)(Ap,{tag:`button`,render:n,className:r,style:i,state:je,stateAttributesMapping:Ea,refs:[t,ue,Ie],props:[Oe,z?.reference||A,Pe,s,Fe]}),ie&&(0,L.jsxs)(_.Fragment,{children:[(0,L.jsx)(Ga,{ref:b,onFocus:e=>{Le&&Zo(e,Le)?C.current?.focus():qo(G)?.focus()}}),(0,L.jsx)(`span`,{"aria-owns":g?.id,style:ys}),(0,L.jsx)(Ga,{ref:x,onFocus:e=>{if(Le&&Zo(e,Le))Rn.flushSync(()=>{N(!1)}),(S.current||G)?.focus();else{let t=Ko(G);P&&!f&&Le&&t&&ba(Le,t)&&(t=Yo(S.current)),t?.focus(),(!P||f)&&!ba(y.current,t)&&l(null,Z(`focus-out`,e.nativeEvent))}}})]})]})});process.env.NODE_ENV!==`production`&&(Fg.displayName=`NavigationMenuTrigger`);function Kie(e,t){let n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),i=n.left+n.width/2,a=n.top+n.height/2,o=r.left+r.width/2,s=r.top+r.height/2,c=o-i,l=s-a;return Math.abs(c)>=Math.abs(l)?c>=0?`right`:`left`:l>=0?`bottom`:`top`}function qie(e,t,n){return{placement:Kie(e,t),elements:{domReference:e,floating:t},nodeId:n}}var Ig=_.createContext(void 0);process.env.NODE_ENV!==`production`&&(Ig.displayName=`NavigationMenuPortalContext`);function Jie(){let e=_.useContext(Ig);if(e===void 0)throw Error(process.env.NODE_ENV===`production`?K(40):`Base UI: <NavigationMenu.Portal> is missing.`);return e}var Lg=_.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e,{mounted:i}=gg();return i||n?(0,L.jsx)(Ig.Provider,{value:n,children:(0,L.jsx)(Cs,{ref:t,...r})}):null});process.env.NODE_ENV!==`production`&&(Lg.displayName=`NavigationMenuPortal`);function Yie(e){return Wd(e,pre)}var Rg=_.createContext(void 0);process.env.NODE_ENV!==`production`&&(Rg.displayName=`NavigationMenuPositionerContext`);function zg(e=!1){let t=_.useContext(Rg);if(!t&&!e)throw Error(process.env.NODE_ENV===`production`?K(42):`Base UI: NavigationMenuPositionerContext is missing. NavigationMenuPositioner parts must be placed within <NavigationMenu.Positioner>.`);return t}var Xie=Dg(),Bg=_.forwardRef(function(e,t){let{open:n,mounted:r,positionerElement:i,setPositionerElement:a,floatingRootContext:o,nested:s,transitionStatus:c}=gg(),{className:l,render:u,anchor:d,positionMethod:f=`absolute`,side:p=`bottom`,align:m=`center`,sideOffset:h=0,alignOffset:g=0,collisionBoundary:v=`clipping-ancestors`,collisionPadding:y=5,collisionAvoidance:b=s?vs:_s,arrowPadding:x=5,sticky:S=!1,disableAnchorTracking:C=!1,style:w,...T}=e,E=Jie(),D=vg(),O=oa(),k=oa(),[A,j]=_.useState(n),M=_.useRef(n);_.useEffect(()=>{if(!i)return;function e(e){i&&Zo(e)&&(e.type===`focusin`?$o:Qo)(i)}return Va(Pn(i,`focusin`,e,!0),Pn(i,`focusout`,e,!0))},[i]);let N=(o||Xie).useState(`domReferenceElement`),P=Yie({anchor:d??N,positionMethod:f,mounted:r,side:p,sideOffset:h,align:m,alignOffset:g,arrowPadding:x,collisionBoundary:v,collisionPadding:y,sticky:S,disableAnchorTracking:C,keepMounted:E,floatingRootContext:o,collisionAvoidance:b,shift:{rootBoundary:`layoutViewport`},nodeId:D,adaptiveOrigin:qp}),F={open:n,side:P.side,align:P.align,anchorHidden:P.anchorHidden,instant:A};_.useEffect(()=>{if(!n)return;M.current&&O.start(0,()=>{M.current=!1,k.isStarted()||j(!1)});function e(){Rn.flushSync(()=>{j(!0)}),k.start(100,()=>{j(!1)})}return Pn(nn(i),`resize`,e)},[n,O,k,i]);let I=qd(e,F,{styles:P.positionerStyles,transitionStatus:c,props:T,refs:[t,a],hidden:!r,inert:!n});return(0,L.jsx)(Rg.Provider,{value:P,children:I})});process.env.NODE_ENV!==`production`&&(Bg.displayName=`NavigationMenuPositioner`);var Zie=Dg();function Vg({children:e}){let{beforeInsideRef:t,beforeOutsideRef:n,afterInsideRef:r,afterOutsideRef:i,positionerElement:a,viewportElement:o,floatingRootContext:s}=gg(),c=!!zg(!0),l=a||o;return!s&&!c?e:(0,L.jsxs)(_.Fragment,{children:[(0,L.jsx)(Ga,{ref:t,onFocus:e=>{l&&Zo(e,l)?Ko(l)?.focus():n.current?.focus()}}),e,(0,L.jsx)(Ga,{ref:r,onFocus:e=>{l&&Zo(e,l)?qo(l)?.focus():i.current?.focus()}})]})}var Hg=_.forwardRef(function(e,t){let{render:n,className:r,style:i,children:a,id:o,...s}=e,c=Ve(o),{setViewportElement:l,setViewportTargetElement:u,floatingRootContext:d,prevTriggerElementRef:f,viewportInert:p,setViewportInert:m}=gg(),h=!!zg(!0),g=(d||Zie).useState(`domReferenceElement`);M(()=>{g&&(f.current=g)},[g,f]);let _=X(`div`,e,{ref:[t,l],props:[{id:c,onBlur(e){let t=e.relatedTarget,n=e.currentTarget;t&&!ba(n,t)&&t!==g&&m(!0)},...!h&&p&&{inert:Xl(!0)},children:h?a:(0,L.jsx)(Vg,{children:(0,L.jsx)(`div`,{ref:u,children:a})})},s]});return h?(0,L.jsx)(Vg,{children:_}):_});process.env.NODE_ENV!==`production`&&(Hg.displayName=`NavigationMenuViewport`);var Ug=_.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,...o}=e,{open:s,transitionStatus:c,setPopupElement:l}=gg(),u=zg(),d=sd(),f=He(a),p={open:s,transitionStatus:c,side:u.side,align:u.align,anchorHidden:u.anchorHidden},m=u.side===`left`;m||=d===`rtl`?u.side===`inline-end`:u.side===`inline-start`;let h=u.side===`top`||m;return X(`nav`,e,{state:p,ref:[t,l],props:[{id:f,tabIndex:-1,style:h?{position:`absolute`,[u.side===`top`?`bottom`:`top`]:`0`,[m?`right`:`left`]:`0`}:{}},Kd(c),o],stateAttributesMapping:Oa})});process.env.NODE_ENV!==`production`&&(Ug.displayName=`NavigationMenuPopup`);var Wg=_.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{open:o,transitionStatus:s}=gg(),{arrowRef:c,side:l,align:u,arrowUncentered:d,arrowStyles:f}=zg();return X(`div`,e,{state:{open:o,side:l,align:u,uncentered:d},ref:[t,c],props:[{style:f,"aria-hidden":!0},Kd(s),a],stateAttributesMapping:Da})});process.env.NODE_ENV!==`production`&&(Wg.displayName=`NavigationMenuArrow`);var Gg=_.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{value:o}=Ag(),{open:s,value:c}=gg();return X(`span`,e,{state:{open:s&&c===o},ref:t,props:[{"aria-hidden":!0,children:`▼`},a],stateAttributesMapping:Ta})});process.env.NODE_ENV!==`production`&&(Gg.displayName=`NavigationMenuIcon`);var Kg=_.createContext(void 0);process.env.NODE_ENV!==`production`&&(Kg.displayName=`NumberFieldRootContext`);function qg(){let e=_.useContext(Kg);if(e===void 0)throw Error(process.env.NODE_ENV===`production`?K(43):`Base UI: NumberFieldRootContext is missing. NumberField parts must be placed within <NumberField.Root>.`);return e}var Jg={inputValue:()=>null,value:()=>null,...Vu},Qie=`零〇一二三四五六七八九`,$ie=/[٠-٩۰-۹0-9]/g,eae=/[零〇一二三四五六七八九]/g,tae=[`%`,`٪`,`%`,`﹪`],nae=[`‰`,`؉`],rae=/[%٪%﹪]/,iae=/[‰؉]/,aae=/[%٪%﹪]/g,oae=/[‰؉]/g,sae=/[٠-٩۰-۹]/,cae=/[零〇一二三四五六七八九]/,lae=/[0-9٠-٩۰-۹0-9零〇一二三四五六七八九]/;function Yg(e){return lae.test(e)}var uae=[`.`,`,`,`.`,`,`,`٫`,`٬`],dae=/\p{Zs}/u,fae=/\p{Cf}/u,pae=/\p{Cf}/gu,mae=[`+`,`+`,`﹢`],hae=[`-`,`−`,`-`,`‒`,`–`,`—`,`﹣`],Xg=e=>e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`);function Zg(e,t){let[n,r=`0`]=String(e).split(`e`);return Number(`${n}e${Number(r)+t}`)}var Qg=/[-−-‒–—﹣]/gu,$g=/[++﹢]/gu,e_=/[-−-‒–—﹣]/,t_=/[++﹢]/,gae=11111.1;function n_(e,t){return ag(e,t).formatToParts(gae)}function r_(e,t){let n=n_(e,t),r={};n.forEach(e=>{r[e.type]=e.value});let i=`.`;return ag(e).formatToParts(.1).forEach(e=>{e.type===`decimal`&&(i=e.value)}),{...r,decimal:i}}function i_(e,t,n){let r=e.replace(pae,``).trim();r=r.replace(Qg,`-`).replace($g,`+`);let i=!1,a=(e,t)=>(t===`-`&&(i=!0),``);r=r.replace(/([+-])\s*$/,a).replace(/^\s*([+-])/,a);let o=t;o===void 0&&(sae.test(r)?o=`ar`:cae.test(r)&&(o=`zh`));let{group:s,decimal:c,currency:l,exponentSeparator:u}=r_(o,n),d=ag(o,n).formatToParts(1).filter(e=>e.type===`unit`).map(e=>Xg(e.value)),f=d.length?new RegExp(d.join(`|`),`g`):null,p=null;s&&(p=/\p{Zs}/u.test(s)?/\p{Zs}/gu:s===`'`||s===`’`?/['’]/g:new RegExp(Xg(s),`g`));let m=[[p,``],[new RegExp(Xg(c),`g`),`.`],[/[.٫]/g,`.`],[/[,٬]/g,``],[l?new RegExp(Xg(l),`g`):null,``],[f,``],[aae,``],[oae,``],[u?new RegExp(Xg(u),`g`):null,`e`],[$ie,e=>String(e.charCodeAt(0)%16)],[eae,e=>String(Math.max(Qie.indexOf(e)-1,0))]].reduce((e,[t,n])=>t?e.replace(t,n):e,r),h=m.lastIndexOf(`.`);if(h!==-1&&(m=`${m.slice(0,h).replace(/\./g,``)}.${m.slice(h+1).replace(/\./g,``)}`),/^[-+]?Infinity$/i.test(r)||r.includes(`∞`))return null;let g=(i?`-`:``)+m,_=parseFloat(g),v=n?.style,y=v===`unit`&&n?.unit===`percent`,b=rae.test(e)||v===`percent`;return iae.test(e)?_=Zg(_,-3):!y&&b&&(_=Zg(_,-2)),Number.isFinite(_)?_:null}var _ae=1e-10,vae=1e-10;function a_(e){return e?.maximumFractionDigits!=null||e?.minimumFractionDigits!=null||e?.maximumSignificantDigits!=null||e?.minimumSignificantDigits!=null||e?.roundingIncrement!=null||e?.roundingMode!=null||e?.roundingPriority!=null}function o_(e,t){if(!Number.isFinite(e))return e;if(!a_(t)){let t=parseFloat(e.toPrecision(15));return Math.abs(t-e)<=Math.min(2**-52*Math.max(1,Math.abs(e)),vae)?t:e}let n=ag(`en-US`,{...t,signDisplay:`auto`,currencySign:`standard`,notation:t.notation===`compact`?`standard`:t.notation,useGrouping:!1}),r=n.format(e),i=i_(r,`en-US`,t);return i===null?e:n.format(i)===r?i:e}function yae(e,t,n,r){let i=Math.abs(n),a=Math.sign(n),o=i*_ae*a,s=e-t+o;return r?t+Math.round(s/n)*n:t+(a>0?Math.floor(s/i):Math.ceil(s/i))*i}function bae(e,t,n,r,i,a,o,s,c){if(e===null)return e;let l=e;if(t!=null&&o&&t!==0&&(l=yae(l,s||n===-(2**53-1)?i:n,t,s)),c&&(l=Vm(l,n,r)),t==null&&!a_(a))return l;let u=o_(l,a);return c?Vm(u,n,r):u}var s_=_.forwardRef(function(e,t){let{id:n,min:r,max:i,smallStep:a=.1,step:o=1,largeStep:s=10,required:c=!1,disabled:l=!1,readOnly:u=!1,form:d,name:f,defaultValue:p=null,value:m,onValueChange:h,onValueCommitted:g,allowWheelScrub:y=!1,snapOnStep:b=!1,allowOutOfRange:x=!1,format:S,locale:C,render:w,className:E,inputRef:D,style:O,...k}=e,{setDirty:A,validityData:j,disabled:N,setFilled:P,name:F,state:I,validation:R}=Wu(),{clearErrors:z}=qu(),B=N||l,V=F??f,H=o===`any`?1:o,[U,W]=_.useState(!1),G=r??-(2**53-1),K=i??2**53-1,q=r??0,J=S?.style,Y=_.useRef(null),te=ee(D,R.inputRef),ne=Xu({id:n}),[re,ie]=v({controlled:m,default:p,name:`NumberField`,state:`value`}),ae=Fn(re);M(()=>{P(re!==null)},[P,re]);let oe=Oc(),se=Fn(S),ce=_.useRef(!1),le=T((e,t)=>{ce.current=!1,g?.(e,t)}),ue=_.useRef(!0),de=_.useRef(null),[fe,pe]=_.useState(()=>og(re,C,S)),[me,he]=_.useState(`numeric`),ge=T(()=>{let e=n_(C,S),t=new Set(uae),n=e=>e.forEach(e=>t.add(e)),r=e.find(e=>e.type===`decimal`)?.value??r_(C,S).decimal;t.add(r),e.forEach(e=>{e.type!==`integer`&&e.type!==`fraction`&&e.type!==`exponentInteger`&&e.type!==`compact`&&(n(Array.from(e.value)),dae.test(e.value)&&t.add(` `))});let i=J===`percent`||J===`unit`&&S?.unit===`percent`,a=J===`percent`||J===`unit`&&S?.unit===`permille`;return i&&n(tae),a&&n(nae),n(mae),(G<0||x)&&n(hae),t}),_e=T(e=>e?.altKey?a:e?.shiftKey?s:H),ve=T((e,t)=>{let n=t.event,r=t.direction,i=t.reason.startsWith(`input-`)||t.reason===`none`,a=!x||!i,o=bae(e,r?_e(n)*r:void 0,G,K,q,se.current,b,n?.altKey??!1,a),s=o!==re||i&&(e!==re||ue.current===!1);if(s){if(h?.(o,t),t.isCanceled)return!1;ie(o),A(o!==j.initialValue),ce.current=!0}return de.current=o,ue.current&&pe(og(o,C,S)),oe(),s}),ye=T((e,{direction:t,currentValue:n,event:r,reason:i})=>{let a=n??ae.current,o=r;return typeof a==`number`?ve(a+e*t,Z(i,o,void 0,{direction:t})):ve(0,Z(i,o))});M(function(){if(!ue.current)return;let e=og(re,C,S);e!==fe&&pe(e)}),M(function(){if(!Yi)return;let e=`text`;G>=0&&(e=`decimal`),he(e)},[G]);let be=T(()=>{let e=Y.current;if(!e)return;let t=e.value.length;e.setSelectionRange(t,t),e.focus()});_.useEffect(function(){let e=Y.current;if(B||u||!y||!e)return;function t(e){if(e.ctrlKey||ya(kn(Y.current))!==Y.current)return;let t=Math.abs(e.deltaX)>Math.abs(e.deltaY),n=e.shiftKey&&t?e.deltaX:e.deltaY;if(n===0||!e.shiftKey&&t)return;e.preventDefault(),ue.current=!0;let r=_e(e);ye(r,{direction:n>0?-1:1,event:e,reason:`wheel`})&&le(de.current,Ct(pt,e))}return Pn(e,`wheel`,t)},[y,ye,B,u,_e,le,de,ae]);let xe=_.useMemo(()=>({...I,disabled:B,readOnly:u,required:c,value:re,inputValue:fe,scrubbing:U}),[I,B,u,c,re,fe,U]),Se=_.useMemo(()=>({inputRef:Y,focusInput:be,minWithDefault:G,maxWithDefault:K,id:ne,setValue:ve,incrementValue:ye,getStepAmount:_e,allowInputSyncRef:ue,formatOptionsRef:se,valueRef:ae,lastChangedValueRef:de,hasPendingCommitRef:ce,name:V,nameProp:f,inputMode:me,getAllowedNonNumericKeys:ge,min:r,max:i,setInputValue:pe,locale:C,setIsScrubbing:W,state:xe,onValueCommitted:le}),[Y,be,G,K,ne,ve,ye,_e,se,ae,V,f,me,ge,r,i,pe,C,xe,le]),Ce=X(`div`,e,{ref:t,state:xe,props:k,stateAttributesMapping:Jg});return(0,L.jsxs)(Kg.Provider,{value:Se,children:[Ce,(0,L.jsx)(`input`,{...R.getValidationProps(B,{onFocus(){be()},onChange(e){if(e.nativeEvent.defaultPrevented||B||u)return;let t=e.currentTarget.valueAsNumber,n=Number.isNaN(t)?null:t,r=Z(Ue,e.nativeEvent);ve(n,r),z(V),R.change(de.current??n)}}),ref:te,type:`number`,form:d,name:V,value:re??``,min:r,max:i,step:o,disabled:B,readOnly:u,required:c,"aria-hidden":!0,tabIndex:-1,style:V?Wa:Ua,suppressHydrationWarning:!0})]})});process.env.NODE_ENV!==`production`&&(s_.displayName=`NumberFieldRoot`);var c_=_.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{state:o}=qg();return X(`div`,e,{ref:t,state:o,props:[{role:`group`},a],stateAttributesMapping:Jg})});process.env.NODE_ENV!==`production`&&(c_.displayName=`NumberFieldGroup`);var l_=0,xae=class e extends aa{static create(){return new e}start(e,t){this.clear(),this.currentId=setInterval(()=>{t()},e)}clear=()=>{this.currentId!==l_&&(clearInterval(this.currentId),this.currentId=l_)}};function Sae(){let e=S(xae.create).current;return wt(e.disposeEffect),e}var Cae=60,wae=400,Tae=8,Eae=50,Dae=3;function u_(e){return e===`touch`||e===`pen`}function Oae(e){let{disabled:t,tick:n,onStop:r,tickDelay:i=Cae,startDelay:a=wae,scrollDistance:o=Tae,elementRef:s}=e,c=oa(),l=Sae(),u=oa(),d=_.useRef(!1),f=_.useRef(0),p=_.useRef({x:0,y:0}),m=_.useRef(!1),h=_.useRef(!1),g=_.useRef(``),v=_.useRef(k),y=_.useRef(k),b=T(()=>{u.clear(),c.clear(),l.clear(),v.current(),f.current=0});function x(e){b();let t=s.current;if(!t)return;let o=nn(t);function u(e){e.preventDefault()}if(v.current=Pn(o,`contextmenu`,u),y.current(),y.current=Pn(o,`pointerup`,e=>{d.current=!1,b(),r?.(e)},{once:!0}),!n(e)){b();return}c.start(a,()=>{l.start(i,()=>{n(e)||b()})})}return _.useEffect(()=>()=>{b(),y.current()},[b]),_.useEffect(()=>{t&&(d.current=!1,m.current=!1,g.current=``,b())},[t,b]),{pointerHandlers:{onTouchStart(){m.current=!0},onTouchEnd(){m.current=!1},onPointerDown(e){e.defaultPrevented||e.button||t||(g.current=e.pointerType,h.current=!1,d.current=!0,p.current={x:e.clientX,y:e.clientY},u_(e.pointerType)?u.start(Eae,()=>{let t=f.current;f.current=0,d.current&&t<Dae?(x(e.nativeEvent),h.current=!0):(h.current=!1,b())}):(e.preventDefault(),x(e.nativeEvent)))},onPointerUp(e){u_(e.pointerType)&&(d.current=!1)},onPointerMove(e){if(t||!u_(e.pointerType)||!d.current)return;f.current+=1;let{x:n,y:r}=p.current,i=n-e.clientX,a=r-e.clientY;i**2+a**2>o**2&&b()},onMouseEnter(e){e.defaultPrevented||t||!d.current||m.current||u_(g.current)||x(e.nativeEvent)},onMouseLeave(){m.current||b()},onMouseUp(){m.current||b()}},shouldSkipClick:T(e=>e.defaultPrevented?!0:u_(g.current)?h.current:e.detail!==0)}}var kae={WebkitUserSelect:`none`,userSelect:`none`};function d_(e,t,n){let{render:r,className:i,disabled:a=!1,nativeButton:o=!0,style:s,...c}=e,{allowInputSyncRef:l,formatOptionsRef:u,getStepAmount:d,id:f,incrementValue:p,inputRef:m,focusInput:h,maxWithDefault:g,minWithDefault:_,setValue:v,state:y,valueRef:b,locale:x,lastChangedValueRef:S,onValueCommitted:C}=qg(),{disabled:w,readOnly:T,value:E,inputValue:D}=y,O=a||w||E!=null&&(n?E>=g:E<=_),k=n?$e:et;function A(e){let t=!l.current;if(l.current=!0,!t){S.current=b.current;return}let n=i_(D,x,u.current);if(n!==null){let t=Z(k,e);v(n,t),t.isCanceled||(b.current=n)}}let{pointerHandlers:j,shouldSkipClick:M}=Oae({disabled:O||T,elementRef:m,tick(e){let t=d(e);return p(t,{direction:n?1:-1,event:e,reason:k})},onStop(e){let t=S.current??b.current;C(t,Ct(k,e))}}),N={disabled:O,"aria-label":n?`Increase`:`Decrease`,"aria-controls":f,tabIndex:-1,style:kae,...j,onClick(e){let t=O||T;if(e.defaultPrevented||t||M(e))return;A(e.nativeEvent);let r=d(e),i=b.current;p(r,{direction:n?1:-1,event:e.nativeEvent,reason:k});let a=S.current??b.current;a!==i&&C(a,Ct(k,e.nativeEvent))},onPointerDown(e){e.defaultPrevented||T||e.button||O||(A(e.nativeEvent),S.current=null,u_(e.pointerType)||h(),j.onPointerDown(e))}},{getButtonProps:P,buttonRef:F}=jn({disabled:O||T,native:o,focusableWhenDisabled:!0}),I={...y,disabled:O};return X(`button`,e,{ref:[t,F],state:I,props:[N,c,P],stateAttributesMapping:Jg})}var f_=_.forwardRef(function(e,t){return d_(e,t,!0)});process.env.NODE_ENV!==`production`&&(f_.displayName=`NumberFieldIncrement`);var p_=_.forwardRef(function(e,t){return d_(e,t,!1)});process.env.NODE_ENV!==`production`&&(p_.displayName=`NumberFieldDecrement`);var Aae=new Set([`Backspace`,`Delete`,`ArrowLeft`,`ArrowRight`,`Tab`,`Enter`,`Escape`]),m_=_.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{allowInputSyncRef:o,formatOptionsRef:s,getAllowedNonNumericKeys:c,getStepAmount:l,id:u,incrementValue:d,inputMode:f,max:p,min:m,name:h,nameProp:g,setValue:v,state:y,setInputValue:x,locale:S,inputRef:C,onValueCommitted:w,lastChangedValueRef:T,hasPendingCommitRef:E,valueRef:D}=qg(),{disabled:k,readOnly:A,required:j,value:N,inputValue:P}=y,{clearErrors:F}=qu(),{validationMode:I,setTouched:L,setFocused:R,invalid:z,shouldValidateOnChange:B,validation:V}=Wu(),{labelId:H}=Yu(),U=_.useRef(!1),W=_.useRef(null);return Gu(C,u,N,void 0,!k,g),M(()=>{if(W.current!=null){let e=W.current;W.current=null,C.current?.setSelectionRange(e,e)}}),eu(N,()=>{if(F(h),U.current&&!B()){U.current=!1;return}V.change(N)}),X(`input`,e,{ref:[t,C],state:y,props:[{id:u,required:j,disabled:k,readOnly:A,inputMode:f,value:P,type:`text`,autoComplete:`off`,autoCorrect:`off`,spellCheck:`false`,"aria-roledescription":`Number field`,"aria-invalid":!k&&z?!0:void 0,"aria-labelledby":H,suppressHydrationWarning:!0,onFocus(e){e.defaultPrevented||k||R(!0)},onBlur(e){if(e.defaultPrevented||k||(L(!0),R(!1),A))return;let t=!o.current,n=E.current;if(o.current=!0,P.trim()===``){let r=Z(nt,e.nativeEvent);if(v(null,r),r.isCanceled)return;I===`onBlur`&&V.commit(null),(t||n||N!==null)&&w(null,Ct(nt,e.nativeEvent));return}let r=s.current,i=i_(P,S,r);if(i===null)return;let a=a_(r),c;c=!t&&!a?N:a?o_(i,r):i;let l=Ct(rt,e.nativeEvent),u=N!==c,d=t||u||n,f=c;if(u){let t=Z(rt,e.nativeEvent);if(U.current=!0,v(c,t),t.isCanceled){U.current=!1;return}f=T.current,f===N&&(U.current=!1)}I===`onBlur`&&V.commit(f),d&&w(f,l);let p=og(f,S,r);P!==p&&x(p)},onChange(e){if(e.nativeEvent.defaultPrevented)return;o.current=!1;let t=e.currentTarget.value;if(t.trim()===``){x(t),v(null,Z(nt,e.nativeEvent));return}let n=c();if(!Array.from(t).every(e=>Yg(e)||e_.test(e)||n.has(e)||fae.test(e)))return;let r=i_(t,S,s.current);x(t),r!==null&&v(r,Z(tt,e.nativeEvent))},onKeyDown(e){if(e.defaultPrevented||A||k)return;let t=e.nativeEvent,n=!o.current,r=c(),i=r.has(e.key),{decimal:a,currency:u,percentSign:f}=r_(S,s.current),h=e.currentTarget.selectionStart,g=e.currentTarget.selectionEnd,_=h===0&&g===P.length,y=e=>h!=null&&g!=null&&e>=h&&e<g;[[e_,Qg],[t_,$g]].forEach(([t,n])=>{if(t.test(e.key)&&Array.from(r).some(e=>t.test(e))){let e=P.search(n),t=e!==-1&&y(e);i=!(e_.test(P)||t_.test(P))||_||t}}),[a,u,f].forEach(t=>{if(e.key===t){let e=P.indexOf(t),n=y(e);i=e===-1||_||n}});let b=Aae.has(e.key),x=e.key===`ArrowUp`||e.key===`ArrowDown`;if(e.which===229||e.altKey&&!x||e.ctrlKey||e.metaKey||i||Yg(e.key)||b)return;let C=null;if(e.key===`Home`&&m!=null?C=m:e.key===`End`&&p!=null&&(C=p),e.key.length>1&&!x&&C===null)return;let E=n?i_(P,S,s.current):null,O=l(e);e.preventDefault(),e.stopPropagation();let j=Ct(ut,t),M=!1;(x||C!==null)&&(o.current=!0),x?(n||(T.current=D.current),M=d(O,{direction:e.key===`ArrowUp`?1:-1,currentValue:E,event:t,reason:ut})):C!==null&&(M=v(C,Z(ut,t))),M&&w(T.current,j)},onPaste(e){if(e.defaultPrevented||A||k)return;let t=``;try{t=e.clipboardData?.getData(`text/plain`)??``}catch{process.env.NODE_ENV!==`production`&&O(`<NumberField.Input> could not read clipboard text during paste handling.`,b.captureOwnerStack?.()||``);return}e.preventDefault();let n=e.currentTarget,r=n.selectionStart,i=n.selectionEnd,a=P.slice(0,r)+t+P.slice(i),c=i_(a,S,s.current);c!==null&&(o.current=!1,W.current=r+t.length,v(c,Z(it,e.nativeEvent)),x(a))}},a,e=>V.getValidationProps(k,e)],stateAttributesMapping:Jg})});process.env.NODE_ENV!==`production`&&(m_.displayName=`NumberFieldInput`);var h_=_.createContext(void 0);process.env.NODE_ENV!==`production`&&(h_.displayName=`NumberFieldScrubAreaContext`);function jae(){let e=_.useContext(h_);if(e===void 0)throw Error(process.env.NODE_ENV===`production`?K(44):`Base UI: NumberFieldScrubAreaContext is missing. NumberFieldScrubArea parts must be placed within <NumberField.ScrubArea>.`);return e}function Mae(e,t){let n=nn(t);if(e!=null){let n=t.getBoundingClientRect();return{left:n.left-e/2,top:n.top-e/2,right:n.right+e/2,bottom:n.bottom+e/2}}let r=n.visualViewport;return r?{left:r.offsetLeft,top:r.offsetTop,right:r.offsetLeft+r.width,bottom:r.offsetTop+r.height}:{left:0,top:0,right:n.document.documentElement.clientWidth,bottom:n.document.documentElement.clientHeight}}var Nae={touchAction:`none`,WebkitUserSelect:`none`,userSelect:`none`},g_=_.forwardRef(function(e,t){let{render:n,className:r,direction:i=`horizontal`,pixelSensitivity:a=2,teleportDistance:o,style:s,...c}=e,{state:l,setIsScrubbing:u,inputRef:d,focusInput:f,incrementValue:p,allowInputSyncRef:m,getStepAmount:h,onValueCommitted:g,lastChangedValueRef:v,valueRef:y}=qg(),{disabled:b,readOnly:x}=l,S=_.useRef(null),C=_.useRef(!1),w=_.useRef(!1),E=_.useRef(null),D=_.useRef(null),O=_.useRef({x:0,y:0}),k=oa(),[A,j]=_.useState(!1),[M,N]=_.useState(!1),[P,F]=_.useState(!1);function I(e,t,n){let r=nn(e).visualViewport?.scale??1;e.style.transform=`translate3d(${t}px,${n}px,0) scale(${1/r})`}let R=T(({movementX:e,movementY:t})=>{let n=D.current,r=S.current;if(!n||!r)return;let i=Mae(o,r),a=O.current,s=(e,t,n,r)=>e+t<n?r-t:e+t>r?n-t:e,c={x:s(Math.round(a.x+e),n.offsetWidth/2,i.left,i.right),y:s(Math.round(a.y+t),n.offsetHeight/2,i.top,i.bottom)};O.current=c,I(n,c.x,c.y)}),z=T((e,{clientX:t,clientY:n})=>{Rn.flushSync(()=>{F(e),u(e)});let r=D.current;if(!r||!e)return;let i={x:t-r.offsetWidth/2,y:n-r.offsetHeight/2};O.current=i,I(r,i.x,i.y)});_.useEffect(function(){if(!d.current||b||x||!P)return;let e=0;function t(e){function t(){try{kn(S.current).exitPointerLock()}catch{}finally{C.current=!1,z(!1,e),g(v.current??y.current,Ct(mt,e));let t=E.current,n=d.current;!w.current&&t!=null&&n&&t.dispatchEvent(new(nn(n)).MouseEvent(`click`,{bubbles:!0,cancelable:!0})),w.current=!1,E.current=null}}ta?k.start(20,t):t()}function n(t){if(!C.current)return;t.preventDefault(),R(t);let{movementX:n,movementY:r}=t;if(e+=i===`vertical`?r:n,Math.abs(e)>=a){e=0,w.current=!0;let a=(i===`vertical`?-r:n)*h(t);a!==0&&(m.current=!0,p(Math.abs(a),{direction:a>=0?1:-1,event:t,reason:mt}))}}let r=nn(d.current),o=Va(Pn(r,`pointerup`,t,!0),Pn(r,`pointermove`,n,!0));return()=>{k.clear(),o()}},[b,x,m,p,P,h,d,z,R,i,a,v,g,y,k]),_.useEffect(()=>()=>{if(C.current){C.current=!1,u(!1);try{kn(S.current).exitPointerLock()}catch{}}},[u]),_.useEffect(function(){let e=S.current;if(!e||b||x)return;function t(e){e.touches.length===1&&e.preventDefault()}return Pn(e,`touchstart`,t)},[b,x]);let B=X(`span`,e,{ref:[t,S],state:l,props:[{role:`presentation`,style:Nae,async onPointerDown(e){if(e.defaultPrevented||x||e.button||b)return;let t=e.pointerType===`touch`;if(j(t),e.pointerType===`mouse`&&(e.preventDefault(),f()),C.current=!0,w.current=!1,E.current=xa(e.nativeEvent),z(!0,e.nativeEvent),!t&&!ea)try{await kn(S.current).body.requestPointerLock(),N(!1)}catch{N(!0)}finally{C.current&&z(!0,e.nativeEvent)}}},c],stateAttributesMapping:Jg}),V=_.useMemo(()=>({isScrubbing:P,isTouchInput:A,isPointerLockDenied:M,scrubAreaCursorRef:D}),[P,A,M]);return(0,L.jsx)(h_.Provider,{value:V,children:B})});process.env.NODE_ENV!==`production`&&(g_.displayName=`NumberFieldScrubArea`);var Pae={position:`fixed`,top:0,left:0,pointerEvents:`none`},__=_.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{state:o}=qg(),{isScrubbing:s,isTouchInput:c,isPointerLockDenied:l,scrubAreaCursorRef:u}=jae(),[d,f]=_.useState(null),p=X(`span`,e,{enabled:s&&!ea&&!c&&!l,ref:[t,u,f],state:o,props:[{role:`presentation`,style:Pae},a],stateAttributesMapping:Jg});return p&&Rn.createPortal(p,kn(d).body)});process.env.NODE_ENV!==`production`&&(__.displayName=`NumberFieldScrubAreaCursor`);var v_=_.createContext(void 0);process.env.NODE_ENV!==`production`&&(v_.displayName=`OTPFieldRootContext`);function Fae(){let e=_.useContext(v_);if(e===void 0)throw Error(process.env.NODE_ENV===`production`?K(98):`Base UI: OTPFieldRootContext is missing. OTPField parts must be placed within <OTPField.Root>.`);return e}function Iae(e,t,n){return{...e,value:t,index:n,filled:t!==``}}var Lae={value:()=>null,length:()=>null,...Vu},Rae={value:()=>null,index:()=>null,...Vu},zae={numeric:{slotPattern:`\\d{1}`,getRootPattern:e=>`\\d{${e}}`,regexp:/[^\d]/g,inputMode:`numeric`},alpha:{slotPattern:`[a-zA-Z]{1}`,getRootPattern:e=>`[a-zA-Z]{${e}}`,regexp:/[^a-zA-Z]/g,inputMode:`text`},alphanumeric:{slotPattern:`[a-zA-Z0-9]{1}`,getRootPattern:e=>`[a-zA-Z0-9]{${e}}`,regexp:/[^a-zA-Z0-9]/g,inputMode:`text`}};function y_(e){return e===`none`?null:zae[e]}function Bae(e){return(e??``).replace(/\s/g,``)}function b_(e,t){return t?e.replace(t.regexp,``):e}function x_(e,t,n,r){let i=Bae(e),a=y_(n),o=b_(i,a),s=i.length>o.length;if(r){let e=r(o);s||=o.length>e.length,o=b_(e,a),s||=e.length>o.length}let c=t<0?0:t,l=Array.from(o);return[l.slice(0,c).join(``),s||l.length>c]}function S_(e,t,n,r){return x_(e,t,n,r)[0]}function C_(e,t,n,r,i,a){let o=S_(n,r,i,a);return S_(`${e.slice(0,t)}${o}${e.slice(t+o.length)}`,r,i,a)}function w_(e,t){return t<0||t>=e.length?e:`${e.slice(0,t)}${e.slice(t+1)}`}var T_=_.forwardRef(function(e,t){let{"aria-describedby":n,"aria-labelledby":r,id:i,autoComplete:a=`one-time-code`,defaultValue:o=``,value:s,onValueChange:c,onValueComplete:l,form:u,length:d,autoSubmit:f=!1,mask:p=!1,inputMode:m,validationType:h=`numeric`,normalizeValue:g,disabled:y=!1,readOnly:b=!1,required:x=!1,name:S,onValueInvalid:C,render:w,className:E,style:D,...O}=e,{setDirty:k,validityData:A,disabled:j,setFilled:N,invalid:P,name:F,state:I,validation:z,validationMode:B,setFocused:V,setTouched:H}=Wu(),{clearErrors:U}=qu(),{getDescriptionProps:W,labelId:G}=Yu(),K=j||y,q=F??S,[J,ee]=v({controlled:s,default:o,name:`OTPField`,state:`value`}),Y=_.useRef(null),te=_.useRef([]),ne=_.useRef(null),re=_.useRef(null),ie=_.useMemo(()=>({get current(){return te.current[0]??null}}),[]),ae=Xu({id:i}),oe=yf(r,G,ie,!0,ae),se=r==null?oe:void 0,ce=Vae(n,W({})[`aria-describedby`]),le=y_(h),ue=le?.slotPattern,de=le?.getRootPattern(d),fe=m??le?.inputMode,pe=Number.isInteger(d)&&d>0,me=S_(J,d,h,g),he=Fn(me),ge=me!==``,[_e,ve]=_.useState(0),[ye,be]=_.useState(()=>Math.min(me.length,d-1)),[xe,Se]=_.useState(!1),Ce=xe?Math.min(ye,Math.max(d-1,0)):Math.min(me.length,d-1);M(()=>{N(ge)},[ge,N]),process.env.NODE_ENV!==`production`&&Hae({inputCount:_e,length:d}),Gu(ie,ae,me,void 0,!K,S);let we=T(e=>{let t=Math.min(Math.max(e,0),Math.max(te.current.length-1,0)),n=te.current[t];n?.focus(),n?.select()}),Te=T((e,t)=>{ne.current={index:e,value:t}});function Ee(){let e=z.inputRef.current?.form??te.current[0]?.form??null;if(u){let t=kn(Y.current).getElementById(u);t?.tagName===`FORM`&&(e=t)}e&&typeof e.requestSubmit==`function`&&e.requestSubmit()}function De(e,t){l?.(e,t),f&&Ee()}eu(me,()=>{U(q),k(me!==A.initialValue),z.change(me);let e=ne.current;e!=null&&(ne.current=null,e.value===me&&we(e.index));let t=re.current;t!=null&&(re.current=null,t.value===me&&De(me,t.eventDetails))});let Oe=T((e,t)=>{let n=S_(e,d,h,g),r=(t.reason===`input-change`||t.reason===`input-paste`)&&n.length===d&&(he.current.length!==d||t.reason===`input-paste`)?Ct(t.reason,t.event):null;return n===he.current?(r!=null&&De(n,r),null):(c?.(n,t),t.isCanceled?null:(ee(n),r==null?n.length!==d&&(re.current=null):re.current={value:n,eventDetails:r},n))}),ke=T((e,t)=>{C?.(e,t)}),Ae=T((e,t)=>{if(e>he.current.length){we(Math.min(he.current.length,d-1));return}be(e),Se(!0),V(!0),t.currentTarget.select()}),je=T(e=>{ba(Y.current,e.relatedTarget)||(H(!0),Se(!1),V(!1),B===`onBlur`&&z.commit(he.current))}),Me=_.useCallback(e=>{if(ae!=null)return e===0?ae:`${ae}-${e+1}`},[ae]),Ne=_.useMemo(()=>({...I,complete:me.length===d,disabled:K,filled:ge,focused:xe,length:d,readOnly:b,required:x,value:me}),[K,I,ge,xe,d,b,x,me]),Pe=_.useMemo(()=>({autoComplete:a,activeIndex:Ce,disabled:K,form:u,focusInput:we,queueFocusInput:Te,getInputId:Me,handleInputBlur:je,handleInputFocus:Ae,inputMode:fe,inputAriaLabelledBy:se,invalid:P,length:d,mask:p,pattern:ue,reportValueInvalid:ke,readOnly:b,required:x,normalizeValue:g,setValue:Oe,state:Ne,validationType:h,value:me}),[Ce,a,K,we,u,Me,je,Ae,fe,se,P,d,p,ue,Te,b,ke,x,g,Oe,Ne,h,me]),Fe=X(`div`,e,{ref:[t,Y],state:Ne,props:[{role:`group`,"aria-describedby":ce,"aria-labelledby":oe},O],stateAttributesMapping:Lae});return(0,L.jsx)(R,{elementsRef:te,onMapChange:e=>{ve(e.size)},children:(0,L.jsxs)(v_.Provider,{value:Pe,children:[Fe,pe&&(0,L.jsx)(`input`,{...z.getValidationProps(K,{onFocus(){we(0)},onChange(e){if(e.nativeEvent.defaultPrevented||K||b)return;let t=e.currentTarget.value,[n,r]=x_(t,d,h,g);r&&ke(t,Ct(`input-change`,e.nativeEvent));let i=Oe(n,Z(`input-change`,e.nativeEvent));i!=null&&i!==``&&Te(i.length-1,i)}}),ref:z.inputRef,type:`text`,id:ae&&q==null?`${ae}-hidden-input`:void 0,form:u,name:q,value:me,autoComplete:a,inputMode:fe,minLength:d,maxLength:d,pattern:de,disabled:K,readOnly:b,required:x,"aria-hidden":!0,tabIndex:-1,style:q?Wa:Ua})]})})});process.env.NODE_ENV!==`production`&&(T_.displayName=`OTPFieldRoot`);function Vae(...e){let t=e.flatMap(e=>e?.split(/\s+/).filter(Boolean)??[]);return t.length>0?Array.from(new Set(t)).join(` `):void 0}function Hae(e){let{inputCount:t,length:n}=e;_.useEffect(()=>{if(!Number.isInteger(n)||n<=0||t===0||t===n)return;let e=b.captureOwnerStack?.()||``;O(`<OTPField.Root> \`length\` must match the number of rendered <OTPField.Input /> parts. Received \`length={${n}}\` but rendered ${t} input${t===1?``:`s`}.`,e)},[t,n]),_.useEffect(()=>{if(Number.isInteger(n)&&n>0)return;let e=b.captureOwnerStack?.()||``;O(`<OTPField.Root> \`length\` must be a positive integer. Received \`length={${String(n)}}\`.`,e)},[n])}var E_=_.forwardRef(function(e,t){let{"aria-label":n,"aria-labelledby":r,render:i,className:a,style:o,...s}=e,{activeIndex:c,autoComplete:l,disabled:u,form:d,focusInput:f,queueFocusInput:p,getInputId:m,handleInputBlur:h,handleInputFocus:g,inputMode:v,inputAriaLabelledBy:y,invalid:x,length:S,mask:C,pattern:w,reportValueInvalid:T,readOnly:E,required:D,normalizeValue:k,setValue:A,state:j,validationType:M,value:N}=Fae(),{ref:P,index:F}=Pt({guess:!0}),I=_.useRef(null),L=sd(),R=N[F]??``,z=Iae(j,R,F),B=n,V=r??y,H=F===0?void 0:B;process.env.NODE_ENV!==`production`&&_.useEffect(()=>{F!==0||B==null||I.current?.labels?.length||O("<OTPField.Input> ignores `aria-label` on the first input. Use a `<label>` or `<Field.Label>` to label the OTP field.",b.captureOwnerStack?.()||``)},[F,B]);let U={id:m(F),value:R,type:C?`password`:`text`,inputMode:v,autoComplete:F===0?l:`off`,autoCorrect:`off`,spellCheck:`false`,enterKeyHint:F===S-1?`done`:`next`,maxLength:F===0?S:void 0,tabIndex:c===F?0:-1,disabled:u,form:d,pattern:w,readOnly:E,required:D,"aria-labelledby":H==null?V:void 0,"aria-invalid":!u&&x?!0:void 0,"aria-label":H,onMouseDown(e){e.defaultPrevented||u||(e.preventDefault(),f(F))},onFocus(e){e.defaultPrevented||u||g(F,e)},onBlur(e){e.defaultPrevented||h(e)},onChange(e){if(e.defaultPrevented||u||E)return;let t=e.currentTarget.value,[n,r]=x_(t,S,M,k);if(r&&T(t,Ct(tt,e.nativeEvent)),n===``){t===``?A(w_(N,F),Z(nt,e.nativeEvent)):R!==``&&(e.currentTarget.value=R,e.currentTarget.select());return}let i=C_(N,F,n,S,M,k),a=A(i,Z(tt,e.nativeEvent));if(a!=null){let e=Math.min(F+n.length,S-1);p(e,a)}},onKeyDown(e){if(e.defaultPrevented||u)return;let t=Math.max(S-1,0),n=Math.min(N.length,t),r=(e.ctrlKey||e.metaKey)&&!e.altKey,i=L===`rtl`,a=i?`ArrowRight`:`ArrowLeft`,o=i?`ArrowLeft`:`ArrowRight`;if(e.key===a){ha(e),f(r?0:Math.max(0,F-1));return}if(e.key===o){ha(e),f(r?n:Math.min(t,F+1));return}if(e.key===`Home`||e.key===`ArrowUp`){ha(e),f(0);return}if(e.key===`End`||e.key===`ArrowDown`){ha(e),f(n);return}if(E)return;function s(t,n){let r=A(t,Z(ut,e.nativeEvent));r!=null&&p(n,r)}if(e.key===`Backspace`&&r){ha(e),s(``,0);return}if(e.key===`Delete`){ha(e),s(w_(N,F),F);return}let c=e.currentTarget.value,l=e.currentTarget.selectionStart===0&&e.currentTarget.selectionEnd===c.length;if(e.key.length===1&&l&&R===e.key){ha(e),F<S-1&&f(F+1);return}if(e.key===`Backspace`){ha(e);let t=Math.max(0,F-1);s(w_(N,R===``?t:F),t)}},onPaste(e){if(e.defaultPrevented||u||E)return;let t=``;try{t=e.clipboardData?.getData(`text/plain`)??``}catch{process.env.NODE_ENV!==`production`&&O(`<OTPField.Input> could not read clipboard text during paste handling.`,b.captureOwnerStack?.()||``);return}e.preventDefault();let[n,r]=x_(t,S,M,k);if(r&&T(t,Ct(it,e.nativeEvent)),n===``)return;let i=A(C_(N,F,n,S,M,k),Z(it,e.nativeEvent));if(i!=null){let e=Math.min(F+n.length,S-1);p(e,i)}}};return X(`input`,e,{ref:[t,P,I],state:z,props:[U,s],stateAttributesMapping:Rae})});process.env.NODE_ENV!==`production`&&(E_.displayName=`OTPFieldInput`);var D_=_.createContext(void 0);process.env.NODE_ENV!==`production`&&(D_.displayName=`PopoverRootContext`);function O_(e){let t=_.useContext(D_);if(t===void 0&&!e)throw Error(process.env.NODE_ENV===`production`?K(47):`Base UI: PopoverRootContext is missing. Popover parts must be placed within <Popover.Root>.`);return t}var k_={...$c,disabled:e=>e.disabled,instantType:e=>e.instantType,openMethod:e=>e.openMethod,openChangeReason:e=>e.openChangeReason,modal:e=>e.modal,focusManagerModal:e=>e.focusManagerModal,stickIfOpen:e=>e.stickIfOpen,titleElementId:e=>e.titleElementId,descriptionElementId:e=>e.descriptionElementId,openOnHover:e=>e.openOnHover,closeDelay:e=>e.closeDelay,adaptiveOrigin:e=>e.adaptiveOrigin},Uae=class extends Dc{constructor(e,t,n){let r=new Kc;super(A_(e,r,t,n),j_(r),k_)}setOpen=(e,t)=>{let n=t.reason===Ge,r=t.reason===`trigger-press`&&t.event.detail===0,i=!e&&(t.reason===`escape-key`||t.reason==null),a=Rc(t),o=this.select(`activeTriggerId`);if(!e&&t.reason===`close-press`&&t.trigger==null&&o!=null&&(t.trigger=this.context.triggerElements.getById(o)??this.select(`activeTriggerElement`)??void 0),this.context.onOpenChange?.(e,t),t.isCanceled)return;this.state.floatingRootContext.dispatchOpenChange(e,t);let s=()=>{let n=Lc(this.state,e,t.trigger,a());n.openChangeReason=t.reason,this.update(n)};n?(this.set(`stickIfOpen`,!0),this.context.stickIfOpenTimeout.start(500,()=>{this.set(`stickIfOpen`,!1)}),Rn.flushSync(s)):s();let c;r?c=`click`:i?c=`dismiss`:t.reason===`focus-out`&&(c=`focus`),this.set(`instantType`,c)}};function Wae(){let e=new Kc,t=new Tl(Object.freeze(A_(void 0,e)),Object.freeze(j_(e)),k_);return Object.assign(t,{setOpen:k})}function A_(e,t,n,r=!1){let i={...qc(t,n,r),disabled:!1,modal:!1,focusManagerModal:!1,instantType:void 0,openMethod:null,openChangeReason:null,titleElementId:void 0,descriptionElementId:void 0,stickIfOpen:!0,openOnHover:!1,closeDelay:0,adaptiveOrigin:void 0,...e};return i.open&&e?.mounted===void 0&&(i.mounted=!0),i}function j_(e){return{popupRef:_.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerFocusTargetRef:_.createRef(),beforeContentFocusGuardRef:_.createRef(),stickIfOpenTimeout:new aa,triggerElements:e}}var M_=bc(function({props:e}){let{children:t,open:n,defaultOpen:r=!1,onOpenChange:i,onOpenChangeComplete:a,modal:o=!1,handle:s,triggerId:c,defaultTriggerId:l=null}=e,u=Kae(s,{modal:o,open:r,openProp:n,activeTriggerId:l,triggerIdProp:c});u.useControlledProp(`openProp`,n),u.useControlledProp(`triggerIdProp`,c);let d=u.useState(`open`),f=u.useState(`mounted`),p=u.useState(`payload`);u.useContextCallback(`onOpenChange`,i),u.useContextCallback(`onOpenChangeComplete`,a),Wc(u,d),Vc(u);let{forceUnmount:m}=Hc(d,u,()=>{u.update({stickIfOpen:!0,openChangeReason:null})});u.useSyncedValues({modal:o}),_.useEffect(()=>{d||u.context.stickIfOpenTimeout.clear()},[u,d]),_.useImperativeHandle(e.actionsRef,()=>({unmount:m,close:()=>u.setOpen(!1,Z(bt))}),[m,u]);let h=d||f;return(0,L.jsxs)(D_.Provider,{value:u,children:[s&&(0,L.jsx)(Pc,{handle:s,store:u}),h&&(0,L.jsx)(qae,{store:u,modal:o}),typeof t==`function`?t({payload:p}):t]})});process.env.NODE_ENV!==`production`&&(M_.displayName=`PopoverRootComponent`);function Gae(e){return O_(!0)?(0,L.jsx)(M_,{props:e}):(0,L.jsx)(Ms,{children:(0,L.jsx)(M_,{props:e})})}function Kae(e,t){let n=Nc((e,n)=>new Uae(t,e,n));return _.useEffect(()=>n.context.stickIfOpenTimeout.disposeEffect(),[n]),n}function qae({store:e,modal:t}){let n=Vs(e.useState(`floatingRootContext`),{outsidePressEvent:{mouse:t===`trap-focus`?`sloppy`:`intentional`,touch:`sloppy`}}),r=n.reference,i=n.floating;return Uc(e,{activeTriggerProps:r,inactiveTriggerProps:r,popupProps:i}),null}var N_=xc(function(e,t){let{render:n,className:r,style:i,disabled:a=!1,nativeButton:o=!0,handle:s,payload:c,openOnHover:l=!1,delay:u=300,closeDelay:d=0,id:f,...p}=e,m=O_(!0),h=el(s)??m;if(!h)throw Error(process.env.NODE_ENV===`production`?K(74):`Base UI: <Popover.Trigger> must be either used within a <Popover.Root> component or provided with a handle.`);let g=He(f),v=h.useState(`isTriggerActive`,g),y=h.useState(`floatingRootContext`),b=h.useState(`isOpenedByTrigger`,g),x=h.useState(`triggerPopupId`,g),S=_.useRef(null),{registerTrigger:C,isMountedByThisTrigger:w}=Bc(g,S,h,{payload:c,disabled:a,openOnHover:l,closeDelay:d}),T=h.useState(`openChangeReason`),E=h.useState(`stickIfOpen`),D=h.useState(`openMethod`),O=h.useState(`focusManagerModal`),k=ul(y,{enabled:!a&&l&&(D!==`touch`||T!==`trigger-press`),mouseOnly:!0,move:!1,handleClose:Sl(),restMs:u,delay:{close:d},triggerElementRef:S,isActiveTrigger:v,isClosing:()=>h.select(`transitionStatus`)===`ending`}),A=zs(y,{stickIfOpen:E}),j=tu(()=>h.select(`open`),e=>{h.set(`openMethod`,e)}),M=h.useState(`triggerProps`,w),{getButtonProps:N,buttonRef:P}=jn({disabled:a,native:o}),F={open(e){return e&&T===`trigger-press`?Ea.open(e):Ta.open(e)}},{preFocusGuardRef:I,handlePreFocusGuardFocus:R,handleFocusTargetFocus:z}=Mp(h,S),B=X(`button`,e,{state:{disabled:a,open:b},ref:[P,t,C,S],props:[A.reference,k,M,j,{[hs]:``,id:g,"aria-haspopup":`dialog`,"aria-expanded":b,"aria-controls":x},p,N],stateAttributesMapping:F}),V=(0,L.jsx)(_.Fragment,{children:B},g);return w&&!O?(0,L.jsxs)(_.Fragment,{children:[(0,L.jsx)(Ga,{ref:I,onFocus:R}),V,(0,L.jsx)(Ga,{ref:h.context.triggerFocusTargetRef,onFocus:z})]}):V});process.env.NODE_ENV!==`production`&&(N_.displayName=`PopoverTrigger`);var P_=_.createContext(void 0);process.env.NODE_ENV!==`production`&&(P_.displayName=`PopoverPortalContext`);function Jae(){let e=_.useContext(P_);if(e===void 0)throw Error(process.env.NODE_ENV===`production`?K(45):`Base UI: <Popover.Portal> is missing.`);return e}var F_=_.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e;return O_().useState(`mounted`)||n?(0,L.jsx)(P_.Provider,{value:n,children:(0,L.jsx)(Cs,{ref:t,...r})}):null});process.env.NODE_ENV!==`production`&&(F_.displayName=`PopoverPortal`);var I_=_.createContext(void 0);process.env.NODE_ENV!==`production`&&(I_.displayName=`PopoverPositionerContext`);function L_(){let e=_.useContext(I_);if(!e)throw Error(process.env.NODE_ENV===`production`?K(46):`Base UI: PopoverPositionerContext is missing. PopoverPositioner parts must be placed within <Popover.Positioner>.`);return e}var R_=_.forwardRef(function(e,t){let{render:n,className:r,style:i,anchor:a,positionMethod:o,side:s,align:c,sideOffset:l,alignOffset:u,collisionBoundary:d=`clipping-ancestors`,collisionPadding:f,arrowPadding:p,sticky:m,disableAnchorTracking:h=!1,collisionAvoidance:g=vs,...v}=e,y=O_(),b=Jae(),x=As(),S=y.useState(`floatingRootContext`),C=y.useState(`mounted`),w=y.useState(`open`),T=y.useState(`openChangeReason`),E=y.useState(`activeTriggerElement`),D=y.useState(`modal`),O=y.useState(`openMethod`),k=y.useState(`positionerElement`),A=y.useState(`instantType`),j=y.useState(`transitionStatus`),N=y.useState(`adaptiveOrigin`),P=_.useRef(null),F=Bn(k),I=Ud({anchor:a,floatingRootContext:S,positionMethod:o,mounted:C,side:s,sideOffset:l,align:c,alignOffset:u,arrowPadding:p,collisionBoundary:d,collisionPadding:f,sticky:m,disableAnchorTracking:h,keepMounted:b,nodeId:x,collisionAvoidance:g,adaptiveOrigin:N}),R=S.useState(`domReferenceElement`);M(()=>{let e=R,t=P.current;if(e&&(P.current=e),t&&e&&e!==t){y.set(`instantType`,void 0);let e=new AbortController;return F(()=>{y.set(`instantType`,`trigger-change`)},e.signal),()=>{e.abort()}}},[R,F,y]);let z=D===!0&&T!==`trigger-hover`;Jd(w&&z,O===`touch`,k,E);let B=y.useStateSetter(`positionerElement`),V=qd(e,{open:w,side:I.side,align:I.align,anchorHidden:I.anchorHidden,instant:A},{styles:I.positionerStyles,transitionStatus:j,props:v,refs:[t,B],hidden:!C,inert:!w});return(0,L.jsxs)(I_.Provider,{value:I,children:[C&&z&&(0,L.jsx)(Zl,{inert:Xl(!w),cutout:E}),(0,L.jsx)(js,{id:x,children:V})]})});process.env.NODE_ENV!==`production`&&(R_.displayName=`PopoverPositioner`);var z_=_.createContext(void 0);process.env.NODE_ENV!==`production`&&(z_.displayName=`ClosePartContext`);function Yae(){let[e,t]=_.useState(0),n=T(()=>(t(e=>e+1),()=>{t(e=>Math.max(0,e-1))}));return{context:_.useMemo(()=>({register:n}),[n]),hasClosePart:e>0}}var B_=_.forwardRef(function(e,t){let{render:n,className:r,style:i,initialFocus:a,finalFocus:o,...s}=e,c=O_(),l=L_(),u=ap(!0)!=null,{context:d,hasClosePart:f}=Yae(),p=c.useState(`open`),m=c.useState(`openMethod`),h=c.useState(`instantType`),g=c.useState(`transitionStatus`),_=c.useState(`popupProps`),v=c.useState(`titleElementId`),y=c.useState(`descriptionElementId`),b=c.useState(`modal`),x=c.useState(`mounted`),S=c.useState(`openChangeReason`),C=c.useState(`activeTriggerElement`),w=c.useState(`floatingRootContext`),T=w.useState(`floatingId`),E=c.useState(`disabled`),D=c.useState(`openOnHover`),O=c.useState(`closeDelay`);Vn({open:p,ref:c.context.popupRef,onComplete(){p&&c.context.onOpenChangeComplete?.(!0)}}),ll(w,{enabled:D&&!E,closeDelay:O});let k=a===void 0?Mc(c.context.popupRef):a,A=b!==!1&&f;c.useSyncedValue(`focusManagerModal`,A);let j=c.useStateSetter(`popupElement`),M=X(`div`,e,{state:{open:p,side:l.side,align:l.align,instant:h,transitionStatus:g},ref:[t,c.context.popupRef,j],props:[_,{id:T,role:`dialog`,...jc,"aria-labelledby":v,"aria-describedby":y,onKeyDown(e){u&&Hl.has(e.key)&&e.stopPropagation()}},Kd(g),s],stateAttributesMapping:Oa});return(0,L.jsx)(Rs,{context:w,openInteractionType:m,modal:A,disabled:!x||S===`trigger-hover`,initialFocus:k,returnFocus:o,restoreFocus:`popup`,previousFocusableElement:sn(C)?C:void 0,nextFocusableElement:c.context.triggerFocusTargetRef,beforeContentFocusGuardRef:c.context.beforeContentFocusGuardRef,children:(0,L.jsx)(z_.Provider,{value:d,children:M})})});process.env.NODE_ENV!==`production`&&(B_.displayName=`PopoverPopup`);var V_=_.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,o=O_().useState(`open`),{arrowRef:s,side:c,align:l,arrowUncentered:u,arrowStyles:d}=L_();return X(`div`,e,{state:{open:o,side:c,align:l,uncentered:u},ref:[t,s],props:[{style:d,"aria-hidden":!0},a],stateAttributesMapping:Da})});process.env.NODE_ENV!==`production`&&(V_.displayName=`PopoverArrow`);var H_=_.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,o=O_(),s=He(a.id);return o.useSyncedValueWithCleanup(`titleElementId`,s),X(`h2`,e,{ref:t,props:[{id:s},a]})});process.env.NODE_ENV!==`production`&&(H_.displayName=`PopoverTitle`);var U_=_.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,o=O_(),s=He(a.id);return o.useSyncedValueWithCleanup(`descriptionElementId`,s),X(`p`,e,{ref:t,props:[{id:s},a]})});process.env.NODE_ENV!==`production`&&(U_.displayName=`PopoverDescription`);var W_=_.forwardRef(function(e,t){let{render:n,className:r,style:i,children:a,...o}=e,s=O_(),{side:c}=L_(),l=s.useState(`instantType`),{children:u,state:d}=Xp({store:s,side:c,children:a});return X(`div`,e,{state:{activationDirection:d.activationDirection,transitioning:d.transitioning,instant:l},ref:t,props:[o,{children:u}],stateAttributesMapping:Yp})});process.env.NODE_ENV!==`production`&&(W_.displayName=`PopoverViewport`);var Xae=class extends mc{constructor(){super(Wae(),`Popover`)}open(e){this.openByTrigger(e)}close(){this.closePopup()}get isOpen(){return this.attachedStore?.select(`open`)??!1}};function Zae(){return new Xae}var G_=_.createContext(void 0);process.env.NODE_ENV!==`production`&&(G_.displayName=`PreviewCardRootContext`);function K_(e){let t=_.useContext(G_);if(t===void 0&&!e)throw Error(process.env.NODE_ENV===`production`?K(50):`Base UI: PreviewCardRootContext is missing. PreviewCard parts must be placed within <PreviewCard.Root>.`);return t}var Qae={...$c,instantType:e=>e.instantType,adaptiveOrigin:e=>e.adaptiveOrigin,closeDelay:e=>e.closeDelay},$ae=class extends Dc{constructor(e,t,n){let r=new Kc;super(eoe(e,r,t,n),toe(r),Qae)}setOpen=(e,t)=>{let{inlineRectCoordsRef:n}=this.context;zc(this,e,t,{onBeforeDispatch(){let r=t.event;e&&t.reason===`trigger-hover`&&t.trigger&&`clientX`in r&&`clientY`in r&&n.current?.element!==t.trigger&&pc(n,t.trigger,r.clientX,r.clientY)}})}};function eoe(e,t,n,r=!1){return{...qc(t,n,r),instantType:void 0,adaptiveOrigin:void 0,closeDelay:300,...e}}function toe(e){return{popupRef:_.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:e,inlineRectCoordsRef:{current:void 0}}}function q_(e){let{open:t,defaultOpen:n=!1,onOpenChange:r,onOpenChangeComplete:i,actionsRef:a,handle:o,triggerId:s,defaultTriggerId:c=null,children:l}=e,u=Nc((e,r)=>new $ae({open:n,openProp:t,activeTriggerId:c,triggerIdProp:s},e,r));u.useControlledProp(`openProp`,t),u.useControlledProp(`triggerIdProp`,s),u.useContextCallback(`onOpenChange`,r),u.useContextCallback(`onOpenChangeComplete`,i);let d=u.useState(`open`),f=u.useState(`activeTriggerId`),p=u.useState(`mounted`),m=u.useState(`payload`);Vc(u,{closeOnActiveTriggerUnmount:!0});let{forceUnmount:h}=Hc(d,u,()=>{u.context.inlineRectCoordsRef.current=void 0});M(()=>{d&&(f??u.set(`payload`,void 0))},[u,f,d]),_.useImperativeHandle(a,()=>({unmount:h,close:()=>u.setOpen(!1,Z(bt))}),[h,u]);let g=d||p;return(0,L.jsxs)(G_.Provider,{value:u,children:[o&&(0,L.jsx)(Pc,{handle:o,store:u}),g&&(0,L.jsx)(noe,{store:u}),typeof l==`function`?l({payload:m}):l]})}function noe({store:e}){let t=Vs(e.useState(`floatingRootContext`));return Uc(e,{activeTriggerProps:t.reference,inactiveTriggerProps:t.trigger,popupProps:t.floating}),null}var J_=bc(function(e){return K_(!0)?(0,L.jsx)(q_,{...e}):(0,L.jsx)(Ms,{children:(0,L.jsx)(q_,{...e})})});process.env.NODE_ENV!==`production`&&(J_.displayName=`PreviewCardRoot`);var Y_=_.createContext(void 0);process.env.NODE_ENV!==`production`&&(Y_.displayName=`PreviewCardPortalContext`);function roe(){let e=_.useContext(Y_);if(e===void 0)throw Error(process.env.NODE_ENV===`production`?K(48):`Base UI: <PreviewCard.Portal> is missing.`);return e}var X_=_.forwardRef(function(e,t){let{children:n,container:r,className:i,render:a,style:o,...s}=e,{node:c,subtree:l}=Ss({container:r,ref:t,componentProps:e,elementProps:s});return!l&&!c?null:(0,L.jsxs)(_.Fragment,{children:[l,c&&Rn.createPortal(n,c)]})});process.env.NODE_ENV!==`production`&&(X_.displayName=`FloatingPortalLite`);var Z_=_.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e;return K_().useState(`mounted`)||n?(0,L.jsx)(Y_.Provider,{value:n,children:(0,L.jsx)(X_,{ref:t,...r})}):null});process.env.NODE_ENV!==`production`&&(Z_.displayName=`PreviewCardPortal`);var Q_=xc(function(e,t){let{render:n,className:r,delay:i,closeDelay:a,id:o,payload:s,handle:c,style:l,...u}=e,d=K_(!0),f=el(c)??d;if(!f)throw Error(process.env.NODE_ENV===`production`?K(89):`Base UI: <PreviewCard.Trigger> must be either used within a <PreviewCard.Root> component or provided with a handle.`);let p=He(o),m=f.useState(`isTriggerActive`,p),h=f.useState(`isOpenedByTrigger`,p),g=f.useState(`floatingRootContext`),v=f.context.inlineRectCoordsRef,y=_.useRef(null),b=i??600,x=a??300,{registerTrigger:S,isMountedByThisTrigger:C}=Bc(p,y,f,{payload:s,closeDelay:x}),w=ul(g,{mouseOnly:!0,move:!1,handleClose:Sl(),delay:()=>({open:b,close:x}),triggerElementRef:y,isActiveTrigger:m,isClosing:()=>f.select(`transitionStatus`)===`ending`}),T=il(g,{delay:b}),E={open:h},D=f.useState(`triggerProps`,C),O=ere(v,h);return X(`a`,e,{state:E,ref:[t,S,y],props:[w,T.reference,D,O,{id:p},u],stateAttributesMapping:Ta})});process.env.NODE_ENV!==`production`&&(Q_.displayName=`PreviewCardTrigger`);var $_=_.createContext(void 0);process.env.NODE_ENV!==`production`&&($_.displayName=`PreviewCardPositionerContext`);function ioe(){let e=_.useContext($_);if(e===void 0)throw Error(process.env.NODE_ENV===`production`?K(49):`Base UI: PreviewCardPositionerContext is missing. PreviewCardPositioner parts must be placed within <PreviewCard.Positioner>.`);return e}var ev=_.forwardRef(function(e,t){let{render:n,className:r,anchor:i,positionMethod:a=`absolute`,side:o=`bottom`,align:s=`center`,sideOffset:c=0,alignOffset:l=0,collisionBoundary:u=`clipping-ancestors`,collisionPadding:d=5,arrowPadding:f=5,sticky:p=!1,disableAnchorTracking:m=!1,collisionAvoidance:h=vs,style:g,..._}=e,v=K_(),y=roe(),b=As(),x=v.useState(`open`),S=v.useState(`mounted`),C=v.useState(`floatingRootContext`),w=v.useState(`instantType`),T=v.useState(`transitionStatus`),E=v.useState(`adaptiveOrigin`),D=v.context.inlineRectCoordsRef,O=Ud({anchor:i,floatingRootContext:C,positionMethod:a,mounted:S,side:o,sideOffset:c,align:s,alignOffset:l,arrowPadding:f,collisionBoundary:u,collisionPadding:d,sticky:p,disableAnchorTracking:m,keepMounted:y,nodeId:b,collisionAvoidance:h,adaptiveOrigin:E,inline:tre(D)}),k=O.update;M(()=>{x&&S&&k()},[x,S,k]);let A=qd(e,{open:x,side:O.side,align:O.align,anchorHidden:O.anchorHidden,instant:w},{styles:O.positionerStyles,transitionStatus:T,props:_,refs:[t,v.useStateSetter(`positionerElement`)],hidden:!S,inert:!x});return(0,L.jsx)($_.Provider,{value:O,children:(0,L.jsx)(js,{id:b,children:A})})});process.env.NODE_ENV!==`production`&&(ev.displayName=`PreviewCardPositioner`);var tv=_.forwardRef(function(e,t){let{className:n,render:r,style:i,...a}=e,o=K_(),{side:s,align:c}=ioe(),l=o.useState(`open`),u=o.useState(`instantType`),d=o.useState(`transitionStatus`),f=o.useState(`popupProps`),p=o.useState(`floatingRootContext`),m=o.useState(`closeDelay`);return Vn({open:l,ref:o.context.popupRef,onComplete(){l&&o.context.onOpenChangeComplete?.(!0)}}),ll(p,{closeDelay:m}),X(`div`,e,{state:{open:l,side:s,align:c,instant:u,transitionStatus:d},ref:[t,o.context.popupRef,o.useStateSetter(`popupElement`)],props:[jc,f,Kd(d),a],stateAttributesMapping:Oa})});process.env.NODE_ENV!==`production`&&(tv.displayName=`PreviewCardPopup`);var aoe=`data-checked`,ooe=`data-unchecked`,nv={checked(e){return e?{[aoe]:``}:{[ooe]:``}},...Vt,...Vu},rv=_.createContext(void 0);process.env.NODE_ENV!==`production`&&(rv.displayName=`RadioGroupContext`);function soe(){return _.useContext(rv)}var iv=_.createContext(void 0);process.env.NODE_ENV!==`production`&&(iv.displayName=`RadioRootContext`);function coe(){let e=_.useContext(iv);if(e===void 0)throw Error(process.env.NODE_ENV===`production`?K(52):`Base UI: RadioRootContext is missing. Radio parts must be placed within <Radio.Root>.`);return e}var av=_.forwardRef(function(e,t){let{render:n,className:r,disabled:i=!1,readOnly:a=!1,required:o=!1,"aria-labelledby":s,value:c,inputRef:l,nativeButton:u=!1,id:d,style:f,...p}=e,m=soe(),{disabled:h,readOnly:g,required:v,form:y,checkedValue:b,touched:x=!1,validation:S,name:C,setCheckedValue:w=k,setTouched:T=k,registerInputRef:E=k}=m??{},{setTouched:D,setFilled:O,state:A,disabled:N}=Wu(),P=vf(),{labelId:F,getDescriptionProps:I}=Yu(),R=N||P.disabled||h||i,z=g||a,B=v||o,V=y,H=m?b===c:c===``,U=_.useRef(null),W=_.useRef(null),G=S?.registerInput,K=ee(l,W,E,_.useCallback(e=>G?.(e,{controlRef:U,value:void 0}),[G]));M(()=>{W.current?.checked&&O(!0)},[O]),M(()=>{if(W.current){if(R&&H){E(null);return}E(W.current)}},[H,R,E]);let q=He(),J=Xu({id:d}),Y=u?void 0:J,te={role:`radio`,"aria-checked":H,"aria-labelledby":yf(s,F,W,!u,Y),[ng]:H?``:void 0,id:u?J:q,onKeyDown(e){e.key===`Enter`&&e.preventDefault()},onClick(e){if(e.defaultPrevented||R||z)return;e.preventDefault();let t=W.current;t&&An(t,e)},onFocus(e){e.defaultPrevented||R||z||!x||(W.current?.click(),T(!1))}},{getButtonProps:ne,buttonRef:re}=jn({disabled:R,native:u,composite:!1}),ie={type:`radio`,ref:K,form:V,id:Y,name:C,tabIndex:-1,style:C?Wa:Ua,"aria-hidden":!0,...c===void 0?j:{value:ju(c)},disabled:R,checked:H,required:B,readOnly:z,onChange(e){if(e.nativeEvent.defaultPrevented||R||z||c===void 0)return;let t=Z(Ue,e.nativeEvent);w(c,t),!t.isCanceled&&D(!0)},onClick(e){e.stopPropagation()},onFocus(){U.current?.focus()}},ae=_.useMemo(()=>({...A,required:B,disabled:R,readOnly:z,checked:H}),[A,R,z,H,B]),oe=ae,se=m!==void 0,ce=[t,U,re],le=[te,p,ne,I,S?e=>S.getValidationProps(R,e):j],ue=X(`span`,e,{enabled:!se,state:ae,ref:ce,props:le,stateAttributesMapping:nv});return(0,L.jsxs)(iv.Provider,{value:oe,children:[se?(0,L.jsx)(Ap,{tag:`span`,render:n,className:r,style:f,state:ae,refs:ce,props:le,stateAttributesMapping:nv}):ue,(0,L.jsx)(`input`,{...ie,suppressHydrationWarning:!0})]})});process.env.NODE_ENV!==`production`&&(av.displayName=`RadioRoot`);var ov=_.forwardRef(function(e,t){let{render:n,className:r,style:i,keepMounted:a=!1,...o}=e,s=coe(),c=s.checked,{mounted:l,transitionStatus:u,setMounted:d}=At(c),f={...s,transitionStatus:u},p=_.useRef(null),m=a||l,h=X(`span`,e,{ref:[t,p],state:f,props:o,stateAttributesMapping:nv});return Vn({batch:!0,enabled:!c,open:c,ref:p,onComplete(){c||d(!1)}}),m?h:null});process.env.NODE_ENV!==`production`&&(ov.displayName=`RadioIndicator`);var loe=[Ul],sv=_.forwardRef(function(e,t){let{render:n,className:r,disabled:i,readOnly:a,required:o,onValueChange:s,value:c,defaultValue:l,form:u,name:d,inputRef:f,id:p,style:m,...h}=e,{setTouched:g,setFocused:y,validationMode:b,name:x,disabled:S,state:C,validation:w,setDirty:E,setFilled:D,validityData:O}=Wu(),{labelId:k}=Yu(),{clearErrors:A,elementRef:j}=qu(),M=Iie(!0),N=S||i,P=x??d,F=He(p),[I,R]=v({controlled:c,default:l,name:`RadioGroup`,state:`value`}),[z,B]=_.useState(!1),V=T((e,t)=>{s?.(e,t),!t.isCanceled&&R(e)}),H=w.getInputControl,U=_.useMemo(()=>({get current(){return H()}}),[H]),W=_.useRef(null),G=_.useRef(null);function K(e){let t;return f&&(typeof f==`function`?t=f(e):f.current=e),W.current=e,t}let q=T(e=>{if(!e||e.disabled)return;G.current||=e;let t=W.current,n=e.checked||t==null||t.disabled?K(e):void 0;return()=>{G.current===e&&(G.current=null),W.current===e?n?(n(),W.current=null):K(null):n?.()}}),J=T(()=>{let e=j.current;if(!e)return I??null;for(let t of w.registeredInputs.keys())if(t.checked&&wf(t,e))return I??null;return null});Gu(U,F,I??null,J,!N,d),eu(I,()=>{A(P),E(I!==O.initialValue),D(I!=null),w.change(I);let e=G.current;I==null&&e&&!e.disabled&&K(e)});let ee=k??M?.legendId,Y={...C,disabled:N??!1,required:o??!1,readOnly:a??!1},te=_.useMemo(()=>({checkedValue:I,disabled:N,form:u,validation:w,name:P,readOnly:a,registerInputRef:q,required:o,setCheckedValue:V,setTouched:B,touched:z}),[I,N,u,w,P,a,q,o,V,B,z]),ne={id:p,role:`radiogroup`,"aria-required":o||void 0,"aria-disabled":N||void 0,"aria-readonly":a||void 0,"aria-labelledby":ee,onFocus(){y(!0)},onBlur(e){ba(e.currentTarget,e.relatedTarget)||(g(!0),y(!1),b===`onBlur`&&w.commit(I))},onKeyDownCapture(e){e.key.startsWith(`Arrow`)&&(B(!0),y(!0))}};return(0,L.jsx)(rv.Provider,{value:te,children:(0,L.jsx)(rg,{render:n,className:r,style:m,state:Y,props:[ne,h,e=>w.getValidationProps(N??!1,e)],refs:[t],stateAttributesMapping:Vu,enableHomeAndEndKeys:!1,modifierKeys:loe})})});process.env.NODE_ENV!==`production`&&(sv.displayName=`RadioGroup`);var cv=_.createContext(void 0);process.env.NODE_ENV!==`production`&&(cv.displayName=`ScrollAreaRootContext`);function lv(){let e=_.useContext(cv);if(e===void 0)throw Error(process.env.NODE_ENV===`production`?K(53):`Base UI: ScrollAreaRootContext is missing. ScrollArea parts must be placed within <ScrollArea.Root>.`);return e}function uv(e,t,n){if(!e)return 0;let r=getComputedStyle(e),i=`${t}${n===`x`?`Inline`:`Block`}`,a=parseFloat(r[`${i}Start`]);return n===`x`&&t===`margin`?a*2:a+parseFloat(r[`${i}End`])}var dv=`base-ui-disable-scrollbar`,fv={className:dv,getElement(e){return(0,L.jsx)(`style`,{nonce:e,href:dv,precedence:`base-ui:low`,children:`.${dv}{scrollbar-width:none}.${dv}::-webkit-scrollbar{display:none}`})}};process.env.NODE_ENV!==`production`&&(fv.getElement.displayName=`styleDisableScrollbar.getElement`);var uoe=`data-has-overflow-x`,doe=`data-has-overflow-y`,foe=`data-overflow-x-start`,poe=`data-overflow-x-end`,moe=`data-overflow-y-start`,hoe=`data-overflow-y-end`,pv=e=>t=>t?{[e]:``}:null,mv={hasOverflowX:pv(uoe),hasOverflowY:pv(doe),overflowXStart:pv(foe),overflowXEnd:pv(poe),overflowYStart:pv(moe),overflowYEnd:pv(hoe),cornerHidden:()=>null},hv=`--scroll-area-corner-height`,gv=`--scroll-area-corner-width`,goe=`data-orientation`,_oe={x:0,y:0},_v={width:0,height:0},voe={xStart:!1,xEnd:!1,yStart:!1,yEnd:!1},yoe={x:!0,y:!0,corner:!0},vv=_.forwardRef(function(e,t){let{render:n,className:r,overflowEdgeThreshold:i,style:a,...o}=e,{xStart:s,xEnd:c,yStart:l,yEnd:u}=boe(i),d=He(),f=oa(),p=oa(),{nonce:m,disableStyleElements:h}=dm(),[g,v]=_.useState(!1),[y,b]=_.useState(!1),[x,S]=_.useState(!1),[C,w]=_.useState(!1),[E,D]=_.useState(!1),[O,k]=_.useState(_v),[A,j]=_.useState(_v),[M,N]=_.useState(voe),[P,F]=_.useState(yoe),I=_.useRef(null),R=_.useRef(null),z=_.useRef(null),B=_.useRef(null),V=_.useRef(null),H=_.useRef(null),U=_.useRef(null),W=_.useRef(null),G=_.useRef(0),K=_.useRef(0),q=_.useRef(0),J=_.useRef(0),ee=_.useRef(`vertical`),Y=_.useRef(_oe),te=_.useRef(null);function ne(e){let t=e?S:b,n=e?f:p;t(!0),n.start(500,()=>{t(!1)})}let re=T(e=>{let t=e.x-Y.current.x,n=e.y-Y.current.y;Y.current=e,n!==0&&ne(!0),t!==0&&ne(!1)}),ie=T(()=>{let e=R.current;e&&te.current===null&&(te.current=e.style.scrollSnapType,e.style.scrollSnapType=`none`)}),ae=T(e=>{if(e.button!==0||W.current!==null&&(ee.current===`vertical`?V.current:H.current)?.hasPointerCapture(W.current))return;W.current=e.pointerId,G.current=e.clientY,K.current=e.clientX,ee.current=e.currentTarget.getAttribute(goe);let t=R.current;t&&(q.current=t.scrollTop,J.current=t.scrollLeft,ie()),(ee.current===`vertical`?V.current:H.current)?.setPointerCapture(e.pointerId)}),oe=T(e=>{if(e.pointerId!==W.current)return;W.current=null,(ee.current===`vertical`?S:b)(!1),te.current!==null&&(R.current&&(R.current.style.scrollSnapType=te.current),te.current=null);let t=ee.current===`vertical`?V.current:H.current;t?.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId)}),se=T(e=>{if(e.pointerId!==W.current)return;if(e.buttons%2==0){oe(e);return}let t=R.current;if(!t)return;let n=ee.current===`vertical`,r=n?V.current:H.current,i=n?z.current:B.current;if(!r||!i)return;let a=n?`y`:`x`,o=uv(i,`padding`,a),s=uv(r,`margin`,a),c=n?r.offsetHeight:r.offsetWidth,l=(n?i.offsetHeight:i.offsetWidth)-c-o-s,u=n?e.clientY-G.current:e.clientX-K.current,d=l<=0?0:u/l,f=n?t.scrollHeight:t.scrollWidth,p=n?t.clientHeight:t.clientWidth,m=(n?q.current:J.current)+d*(f-p);n?t.scrollTop=m:t.scrollLeft=m,e.preventDefault(),ne(n)});function ce(e){w(e.pointerType===`touch`)}function le(e){if(ce(e),e.pointerType!==`touch`){let t=ba(I.current,e.target);v(t)}}let ue=_.useMemo(()=>({scrolling:y||x,hasOverflowX:!P.x,hasOverflowY:!P.y,overflowXStart:M.xStart,overflowXEnd:M.xEnd,overflowYStart:M.yStart,overflowYEnd:M.yEnd,cornerHidden:P.corner}),[y,x,P.x,P.y,P.corner,M]),de={role:`presentation`,onPointerEnter:le,onPointerMove:le,onPointerDown:ce,onPointerLeave(){v(!1)},style:{position:`relative`,[hv]:`${O.height}px`,[gv]:`${O.width}px`}},fe=X(`div`,e,{state:ue,ref:[t,I],props:[de,o],stateAttributesMapping:mv}),pe=_.useMemo(()=>({handlePointerDown:ae,handlePointerMove:se,handlePointerUp:oe,handleScroll:re,disableViewportSnap:ie,cornerSize:O,setCornerSize:k,thumbSize:A,setThumbSize:j,hasMeasuredScrollbar:E,setHasMeasuredScrollbar:D,touchModality:C,cornerRef:U,scrollingX:y,scrollingY:x,hovering:g,setHovering:v,viewportRef:R,scrollbarYRef:z,scrollbarXRef:B,thumbYRef:V,thumbXRef:H,rootId:d,hiddenState:P,setHiddenState:F,overflowEdges:M,setOverflowEdges:N,viewportState:ue,overflowEdgeThreshold:{xStart:s,xEnd:c,yStart:l,yEnd:u}}),[ae,se,oe,re,ie,O,A,E,C,y,x,g,d,P,M,ue,s,c,l,u]);return(0,L.jsxs)(cv.Provider,{value:pe,children:[!h&&fv.getElement(m),fe]})});process.env.NODE_ENV!==`production`&&(vv.displayName=`ScrollAreaRoot`);function boe(e){let t=typeof e==`number`?{xStart:e,xEnd:e,yStart:e,yEnd:e}:e;return{xStart:Math.max(0,t?.xStart||0),xEnd:Math.max(0,t?.xEnd||0),yStart:Math.max(0,t?.yStart||0),yEnd:Math.max(0,t?.yEnd||0)}}var yv=_.createContext(void 0);process.env.NODE_ENV!==`production`&&(yv.displayName=`ScrollAreaViewportContext`);function bv(e,t){return Math.max(0,e-t)}function xv(e,t){if(t<=0)return 0;let n=Vm(e,0,t),r=n,i=t-n,a=r<=1,o=i<=1;return a&&o?r<=i?0:t:a?0:o?t:n}var xoe=`--scroll-area-overflow-x-start`,Soe=`--scroll-area-overflow-x-end`,Coe=`--scroll-area-overflow-y-start`,woe=`--scroll-area-overflow-y-end`,Sv=`--scroll-area-thumb-height`,Cv=`--scroll-area-thumb-width`,wv=[xoe,Soe,Coe,woe],Tv=!1;function Toe(){Tv||ea||(typeof CSS<`u`&&`registerProperty`in CSS&&wv.forEach(e=>{try{CSS.registerProperty({name:e,syntax:`<length>`,inherits:!1,initialValue:`0px`})}catch{}}),Tv=!0)}var Ev=_.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{viewportRef:o,scrollbarYRef:s,scrollbarXRef:c,thumbYRef:l,thumbXRef:u,cornerRef:d,cornerSize:f,setCornerSize:p,setThumbSize:m,rootId:h,setHiddenState:g,hiddenState:v,setHasMeasuredScrollbar:y,handleScroll:b,touchModality:x,setHovering:S,setOverflowEdges:C,overflowEdgeThreshold:w,viewportState:E}=lv(),D=sd(),O=_.useRef(!0),k=_.useRef([NaN,NaN,NaN,NaN]),A=oa(),j=oa(),N=T(()=>{let e=o.current,t=s.current,n=c.current,r=l.current,i=u.current,a=d.current;if(!e)return;let h=e.scrollHeight,_=e.scrollWidth,v=e.clientHeight,b=e.clientWidth,x=e.scrollTop,S=e.scrollLeft,T=k.current,E=Number.isNaN(T[0]);if(T[0]=v,T[1]=h,T[2]=b,T[3]=_,E&&y(!0),h===0||_===0)return;let O=Eoe(e),A=O.y,j=O.x,M=b/_,N=v/h,P=Math.max(0,_-b),F=Math.max(0,h-v),I=0,L=0;j||(I=xv(D===`rtl`?-S:S,P),L=P-I);let R=A?0:xv(x,F),z=A?0:F-R,B=j?0:b,V=A?0:v,H=0,U=0;!j&&!A&&(H=t?.offsetWidth||0,U=n?.offsetHeight||0);let W=f.width===0&&f.height===0,G=W?H:0,K=W?U:0,q=uv(n,`padding`,`x`),J=uv(t,`padding`,`y`),ee=uv(i,`margin`,`x`),Y=uv(r,`margin`,`y`),te=B-q-ee,ne=V-J-Y,re=n?Math.min(n.offsetWidth-G,te):te,ie=t?Math.min(t.offsetHeight-K,ne):ne,ae=Math.max(16,re*M),oe=Math.max(16,ie*N);if(m(e=>Dv(e,{width:ae,height:oe})),t&&r){let e=Ov(r,Sv,x,F,h,oe,t.offsetHeight-oe-J-Y);r.style.transform=`translate3d(0,${e}px,0)`}if(n&&i){let e=n.offsetWidth-ae-q-ee,t=Ov(i,Cv,D===`rtl`?-S:S,P,_,ae,e);i.style.transform=`translate3d(${D===`rtl`?-t:t}px,0,0)`}let se=[I,L,R,z];wv.forEach((t,n)=>{e.style.setProperty(t,`${se[n]}px`)}),a&&p(e=>Dv(e,{width:H,height:U})),g(e=>Dv(e,O));let ce={xStart:!j&&I>w.xStart,xEnd:!j&&L>w.xEnd,yStart:!A&&R>w.yStart,yEnd:!A&&z>w.yEnd};C(e=>Dv(e,ce))});M(()=>{Toe()},[]),M(()=>{queueMicrotask(N)},[N,v,D,w.xStart,w.xEnd,w.yStart,w.yEnd]),M(()=>{o.current?.matches(`:hover`)&&S(!0)},[o,S]),M(()=>{let e=o.current;if(typeof ResizeObserver>`u`||!e)return;let t=!1,n=new ResizeObserver(()=>{if(!t){t=!0;let n=k.current;if(n[0]===e.clientHeight&&n[1]===e.scrollHeight&&n[2]===e.clientWidth&&n[3]===e.scrollWidth)return}N()});return n.observe(e),j.start(0,()=>{let t=e.getAnimations({subtree:!0});t.length!==0&&Promise.allSettled(t.map(e=>e.finished)).then(N).catch(()=>{})}),()=>{n.disconnect(),j.clear()}},[N,o,j]);function P(){O.current=!1}let F={role:`presentation`,...h&&{"data-id":`${h}-viewport`},tabIndex:v.x&&v.y?-1:0,className:fv.className,style:{overflow:`scroll`},onScroll(){o.current&&(N(),(x||!O.current)&&b({x:o.current.scrollLeft,y:o.current.scrollTop}),A.start(100,()=>{O.current=!0}))},onWheel:P,onPointerMove:P,onPointerEnter:P,onKeyDown:P},I=X(`div`,e,{ref:[t,o],state:E,props:[F,a],stateAttributesMapping:mv}),R=_.useMemo(()=>({computeThumbPosition:N}),[N]);return(0,L.jsx)(yv.Provider,{value:R,children:I})});process.env.NODE_ENV!==`production`&&(Ev.displayName=`ScrollAreaViewport`);function Eoe(e){let t=e.clientHeight>=e.scrollHeight,n=e.clientWidth>=e.scrollWidth;return{y:t,x:n,corner:t||n}}function Dv(e,t){for(let n in t)if(e[n]!==t[n])return t;return e}function Ov(e,t,n,r,i,a,o){let s=Vm(n,0,r),c=n-s,l=Math.max(16,a*i/(i+Math.abs(c)));return e.style.setProperty(t,c?`${l}px`:``),(r?s/r*o:0)+(c>0?a-l:0)}var kv=_.createContext(void 0);process.env.NODE_ENV!==`production`&&(kv.displayName=`ScrollAreaScrollbarContext`);function Doe(){let e=_.useContext(kv);if(e===void 0)throw Error(process.env.NODE_ENV===`production`?K(54):`Base UI: ScrollAreaScrollbarContext is missing. ScrollAreaScrollbar parts must be placed within <ScrollArea.Scrollbar>.`);return e}var Av=_.forwardRef(function(e,t){let{render:n,className:r,orientation:i=`vertical`,keepMounted:a=!1,style:o,...s}=e,{hovering:c,scrollingX:l,scrollingY:u,hiddenState:d,scrollbarYRef:f,scrollbarXRef:p,viewportRef:m,thumbYRef:h,thumbXRef:g,handlePointerDown:v,handlePointerUp:y,handleScroll:b,disableViewportSnap:x,rootId:S,thumbSize:C,hasMeasuredScrollbar:w,viewportState:T}=lv(),E=i===`vertical`,D={...T,hovering:c,scrolling:E?u:l,orientation:i},O=sd(),k=!w&&!a,A=E?d.y:d.x,j=a||!A;_.useEffect(()=>{if(!j)return;let e=m.current,t=E?f.current:p.current;if(!t)return;function n(t){if(!e||t.ctrlKey)return;let n=!E,r=n?`scrollLeft`:`scrollTop`,i=n?t.deltaX:t.deltaY;if(i===0)return;let a=n?e.scrollWidth-e.clientWidth:e.scrollHeight-e.clientHeight,o=n&&O===`rtl`?-a:0,s=n&&O===`rtl`?0:a,c=e[r];c<=o&&i<0||c>=s&&i>0||(t.preventDefault(),e[r]=Math.min(s,Math.max(o,c+i)),b({x:e.scrollLeft,y:e.scrollTop}))}return Pn(t,`wheel`,n,{passive:!1})},[O,b,E,p,f,j,m]);let M={...S&&{"data-id":`${S}-scrollbar`},"aria-hidden":!0,onPointerDown(e){if(e.button!==0)return;let t=xa(e.nativeEvent),n=E?h.current:g.current;if(n&&ba(n,t))return;let r=m.current;if(!r)return;let i=E?f.current:p.current;if(!n||!i)return;let a=E?`y`:`x`,o=uv(n,`margin`,a),s=uv(i,`padding`,a),c=E?n.offsetHeight:n.offsetWidth,l=i.getBoundingClientRect(),u=E?e.clientY-l.top-c/2-s+o/2:e.clientX-l.left-c/2-s+o/2,d=E?r.scrollHeight:r.scrollWidth,_=E?r.clientHeight:r.clientWidth,y=(E?i.offsetHeight:i.offsetWidth)-c-s-o;if(y<=0)return;let S=u/y,C=d-_;x(),E?r.scrollTop=S*C:r.scrollLeft=O===`rtl`?-(1-S)*C:S*C,b({x:r.scrollLeft,y:r.scrollTop}),v(e)},onMouseDown(e){e.preventDefault()},onPointerUp:y,onPointerCancel:y,style:{position:`absolute`,touchAction:`none`,WebkitUserSelect:`none`,userSelect:`none`,visibility:k?`hidden`:void 0,...E?{top:0,bottom:`var(${hv})`,insetInlineEnd:0,[Sv]:`${C.height}px`}:{insetInlineStart:0,insetInlineEnd:`var(${gv})`,bottom:0,[Cv]:`${C.width}px`}}},N=X(`div`,e,{ref:[t,E?f:p],state:D,props:[M,s],stateAttributesMapping:mv});return j?(0,L.jsx)(kv.Provider,{value:i,children:N}):null});process.env.NODE_ENV!==`production`&&(Av.displayName=`ScrollAreaScrollbar`);var jv=_.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{thumbYRef:o,thumbXRef:s,handlePointerDown:c,handlePointerMove:l,handlePointerUp:u,scrollingX:d,scrollingY:f,hasMeasuredScrollbar:p}=lv(),m=Doe(),h=m===`vertical`;return X(`div`,e,{ref:[t,h?o:s],state:{scrolling:h?f:d,orientation:m},props:[{onPointerDown:c,onPointerMove:l,onPointerUp:u,onPointerCancel:u,style:{visibility:p?void 0:`hidden`,...h?{height:`var(--scroll-area-thumb-height)`}:{width:`var(--scroll-area-thumb-width)`}}},a]})});process.env.NODE_ENV!==`production`&&(jv.displayName=`ScrollAreaThumb`);var Mv=_.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{cornerRef:o,cornerSize:s,hiddenState:c}=lv(),l=X(`div`,e,{ref:[t,o],props:[{"aria-hidden":!0,style:{position:`absolute`,bottom:0,insetInlineEnd:0,width:s.width,height:s.height}},a]});return c.corner?null:l});process.env.NODE_ENV!==`production`&&(Mv.displayName=`ScrollAreaCorner`);var Nv=_.createContext(void 0);process.env.NODE_ENV!==`production`&&(Nv.displayName=`SelectRootContext`);var Pv=_.createContext(void 0);process.env.NODE_ENV!==`production`&&(Pv.displayName=`SelectRootPropsContext`);var Fv=_.createContext(void 0);process.env.NODE_ENV!==`production`&&(Fv.displayName=`SelectFloatingContext`);function Iv(){let e=_.useContext(Nv);if(e===void 0)throw Error(process.env.NODE_ENV===`production`?K(60):`Base UI: SelectRootContext is missing. Select parts must be placed within <Select.Root>.`);return e}function Lv(){let e=_.useContext(Pv);if(e===void 0)throw Error(process.env.NODE_ENV===`production`?K(101):`Base UI: SelectRootPropsContext is missing. Select parts must be placed within <Select.Root>.`);return e}function Rv(){let e=_.useContext(Fv);if(e===void 0)throw Error(process.env.NODE_ENV===`production`?K(61):`Base UI: SelectFloatingContext is missing. Select parts must be placed within <Select.Root>.`);return e}var Ooe={id:e=>e.id,labelId:e=>e.labelId,modal:e=>e.modal,items:e=>e.items,itemToStringLabel:e=>e.itemToStringLabel,isItemEqualToValue:e=>e.isItemEqualToValue,value:e=>e.value,hasSelectedValue:e=>{let{value:t,multiple:n,itemToStringValue:r}=e;return t==null?!1:n&&Array.isArray(t)?t.length>0:Iu(t,r)!==``},hasNullItemLabel:(e,t)=>t?Pu(e.items):!1,open:e=>e.open,mounted:e=>e.mounted,forceMount:e=>e.forceMount,transitionStatus:e=>e.transitionStatus,openMethod:e=>e.openMethod,activeIndex:e=>e.activeIndex,selectedIndex:e=>e.selectedIndex,isActive:(e,t)=>e.activeIndex===t,isSelected:(e,t)=>{let n=e.isItemEqualToValue,r=e.value;return e.multiple?Array.isArray(r)&&r.some(e=>wu(t,e,n)):wu(t,r,n)},isSelectedByFocus:(e,t)=>e.selectedIndex===t,popupProps:e=>e.popupProps,triggerProps:e=>e.triggerProps,triggerElement:e=>e.triggerElement,positionerElement:e=>e.positionerElement,listElement:e=>e.listElement,popupSide:e=>e.popupSide,scrollUpArrowVisible:e=>e.scrollUpArrowVisible,scrollDownArrowVisible:e=>e.scrollDownArrowVisible,hasScrollArrows:e=>e.hasScrollArrows};function koe(e){let{id:t,value:n,defaultValue:r=null,onValueChange:i,open:a,defaultOpen:o=!1,onOpenChange:s,name:c,form:l,autoComplete:u,disabled:d=!1,readOnly:f=!1,required:p=!1,modal:m=!0,actionsRef:h,inputRef:g,onOpenChangeComplete:y,items:b,multiple:x=!1,itemToStringLabel:C,itemToStringValue:w,isItemEqualToValue:E=Cu,highlightItemOnHover:D=!0,children:O}=e,{clearErrors:N}=qu(),{setDirty:P,setTouched:F,setFocused:I,validityData:R,setFilled:z,name:B,disabled:V,validation:H,validationMode:U}=Wu(),W=Xu({id:t}),G=V||d,K=B??c,[q,J]=v({controlled:n,default:x?r??A:r,name:`Select`,state:`value`}),[Y,te]=v({controlled:a,default:o,name:`Select`,state:`open`}),ne=_.useRef([]),re=_.useRef([]),ie=_.useRef(null),ae=_.useRef(null),oe=_.useRef(0),se=_.useRef(null),ce=_.useRef([]),le=_.useRef(!1),ue=_.useRef(null),de=_.useRef(null),fe=_.useRef({allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1,dragY:0}),me=_.useRef(!1),he=_.useRef(q),{mounted:ge,setMounted:_e,transitionStatus:ve}=At(Y),{openMethod:ye,triggerProps:be}=nu(Y),xe=S(()=>new Dc({id:W,labelId:void 0,modal:m,multiple:x,itemToStringLabel:C,itemToStringValue:w,isItemEqualToValue:E,value:q,open:Y,mounted:ge,transitionStatus:ve,items:b,forceMount:!1,openMethod:null,activeIndex:null,selectedIndex:null,popupProps:j,triggerProps:j,triggerElement:null,positionerElement:null,listElement:null,popupSide:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1,hasScrollArrows:!1},{setValue:k,setOpen:k,handleScrollArrowVisibility:k,onOpenChangeComplete:k,listRef:ne,popupRef:ie,scrollHandlerRef:ae,scrollArrowsMountedCountRef:oe,valueRef:se,valuesRef:ce,labelsRef:re,typingRef:le,selectionRef:fe,firstItemTextRef:ue,selectedItemTextRef:de,alignItemWithTriggerActiveRef:me,initialValueRef:he},Ooe)).current,Se=xe.useState(`activeIndex`),Ce=xe.useState(`selectedIndex`),we=xe.useState(`triggerElement`),Te=xe.useState(`positionerElement`),Ee=Lp(ye),X=ye??Ee,De=_.useMemo(()=>x?``:Iu(q,w),[x,q,w]),Oe=_.useMemo(()=>x&&Array.isArray(q)?q.map(e=>Iu(e,w)):Iu(q,w),[x,q,w]);Gu(Fn(we),W,q,T(()=>Oe),!G,c);let ke=x?Array.isArray(q)&&q.length>0:q!=null&&De!==``;M(()=>{z(ke)},[ke,z]),M(function(){let e=Ou(ce.current,q,E,x);e===null&&(de.current=null),!Y&&xe.set(`selectedIndex`,e)},[x,Y,q,E,xe]),eu(q,()=>{N(K),P(Tu(q,R.initialValue,E)),H.change(q)});let Ae=T((e,t)=>{s?.(e,t),!t.isCanceled&&(te(e),!e&&(t.reason===`focus-out`||t.reason===`outside-press`)&&(F(!0),I(!1),U===`onBlur`&&H.commit(q)))}),je=T(()=>{_e(!1),xe.update({activeIndex:null,openMethod:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1}),y?.(!1)});Vn({enabled:!h,open:Y,ref:ie,onComplete(){Y||je()}}),_.useImperativeHandle(h,()=>({unmount:je}),[je]);let Me=T((e,t)=>{i?.(e,t),!t.isCanceled&&J(e)}),Ne=T(e=>{let t=bv(e.scrollHeight,e.clientHeight),n=xv(e.scrollTop,t),r=n>0,i=n<t;xe.set(`scrollUpArrowVisible`,r),xe.set(`scrollDownArrowVisible`,i)}),Pe=tl({open:Y,onOpenChange:Ae,elements:{reference:we,floating:Te}}),Fe=zs(Pe,{enabled:!G,event:`mousedown`}),Ie=Vs(Pe),Le=hl(Pe,{enabled:!G,listRef:ne,activeIndex:Se,selectedIndex:Ce,disabledIndices:A,onNavigate(e){(e!==null||Y)&&xe.set(`activeIndex`,e)},focusItemOnHover:D}),Re=gl(Pe,{enabled:!G&&(Y||!f&&!x),listRef:re,activeIndex:Se,selectedIndex:Ce,disabledIndices:e=>nm(ne.current[e]),onMatch(e){Y?xe.set(`activeIndex`,e):Me(ce.current[e],Z(Ue))},onTyping(e){le.current=e}}),ze=_.useMemo(()=>pe(Re.reference,Le.reference,Ie.reference,Fe.reference,be),[Fe.reference,Re.reference,Le.reference,Ie.reference,be]),Be=_.useMemo(()=>pe(jc,Re.floating,Le.floating,Ie.floating),[Re.floating,Le.floating,Ie.floating]),Ve=Le.item??j;xe.useContextCallback(`setValue`,Me),xe.useContextCallback(`setOpen`,Ae),xe.useContextCallback(`handleScrollArrowVisibility`,Ne),xe.useContextCallback(`onOpenChangeComplete`,y),uu(()=>{xe.update({popupProps:Be,triggerProps:ze})}),xe.useSyncedValues({id:W,modal:m,multiple:x,value:q,open:Y,mounted:ge,transitionStatus:ve,popupProps:Be,triggerProps:ze,items:b,itemToStringLabel:C,itemToStringValue:w,isItemEqualToValue:E,openMethod:X});let He=_.useMemo(()=>({disabled:G,readOnly:f,required:p,multiple:x,highlightItemOnHover:D,itemProps:Ve}),[G,f,p,x,D,Ve]),We=ee(g,H.inputRef),Ge=x?void 0:K,Ke=_.useMemo(()=>!x||!Array.isArray(q)||!K?null:q.map(e=>{let t=Iu(e,w);return(0,L.jsx)(`input`,{type:`hidden`,form:l,name:K,value:t,disabled:G},t)}),[x,q,l,K,w,G]);return(0,L.jsxs)(Nv.Provider,{value:xe,children:[(0,L.jsx)(Pv.Provider,{value:He,children:(0,L.jsx)(Fv.Provider,{value:Pe,children:O})}),(0,L.jsx)(`input`,{...H.getValidationProps(G,{onFocus(){xe.state.triggerElement?.focus({focusVisible:!0})},onChange(e){if(e.nativeEvent.defaultPrevented||G||f)return;let t=e.currentTarget.value,n=Z(Ue,e.nativeEvent);function r(){if(x)return;let e=t.toLowerCase(),r=ce.current.findIndex(t=>Iu(t,w).toLowerCase()===e||Fu(t,C).toLowerCase()===e);r===-1&&(r=ce.current.findIndex((t,n)=>{let r=re.current[n];return r!=null&&r.toLowerCase()===e}));let i=ce.current[r];i!=null&&Me(i,n)}xe.set(`forceMount`,!0),queueMicrotask(r)}}),id:W&&Ge==null?`${W}-hidden-input`:void 0,form:l,name:Ge,autoComplete:u,value:De,disabled:G,required:p&&!(x&&ke),readOnly:f,ref:We,style:K?Wa:Ua,tabIndex:-1,"aria-hidden":!0,suppressHydrationWarning:!0}),Ke]})}var Aoe=`data-popup-side`,joe=400,Moe={...Ea,...Vu,popupSide:e=>e?{[Aoe]:e}:null,value:()=>null},zv=_.forwardRef(function(e,t){let{render:n,className:r,id:i,disabled:a=!1,nativeButton:o=!0,style:s,...c}=e,{setTouched:l,setFocused:u,validationMode:d,validation:f,state:p,disabled:m}=Wu(),{labelId:h}=Yu(),g=Iv(),{readOnly:v,required:y,disabled:b}=Lv(),x=m||b||a,S=g.useState(`open`),C=g.useState(`mounted`),w=g.useState(`value`),T=g.useState(`triggerProps`),E=g.useState(`positionerElement`),D=g.useState(`listElement`),O=g.useState(`popupSide`),k=g.useState(`id`),A=g.useState(`labelId`),j=g.useState(`hasSelectedValue`),M=C&&E?O:null,N=i??k,P=fd(h,A);Xu({id:i});let F=Fn(E),I=_.useRef(null),{getButtonProps:L,buttonRef:R}=jn({disabled:x,native:o}),z=g.useStateSetter(`triggerElement`),B=oa(),V=oa(),H=oa();_.useEffect(()=>{if(S)return H.start(joe,()=>{g.context.selectionRef.current.allowUnselectedMouseUp=!0,g.context.selectionRef.current.allowSelectedMouseUp=!0}),()=>{H.clear()};g.context.selectionRef.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1,dragY:0},V.clear()},[S,g,V,H]);let U=pe(T,{id:N,role:`combobox`,"aria-expanded":S,"aria-haspopup":`listbox`,"aria-controls":S?D?.id??Ia(E)?.id:void 0,"aria-labelledby":P,"aria-readonly":v||void 0,"aria-required":y||void 0,tabIndex:x?-1:0,onFocus(e){u(!0),S&&g.context.alignItemWithTriggerActiveRef.current&&g.context.setOpen(!1,Z(Ue,e.nativeEvent)),B.start(0,()=>{g.set(`forceMount`,!0)})},onBlur(e){ba(E,e.relatedTarget)||(l(!0),u(!1),d===`onBlur`&&f.commit(w))},onMouseDown(e){if(S)return;let t=kn(e.currentTarget);function n(e){if(!I.current)return;let t=e.target;ba(I.current,t)||ba(F.current,t)||dd(e,I.current)||g.context.setOpen(!1,Z(ht,e))}V.start(0,()=>{t.addEventListener(`mouseup`,n,{once:!0})})}},c,L),W=f.getValidationProps(x,U);W.role=`combobox`;let G={...p,open:S,disabled:x,value:w,readOnly:v,popupSide:M,placeholder:!j};return X(`button`,e,{ref:[t,I,R,z],state:G,stateAttributesMapping:Moe,props:W})});process.env.NODE_ENV!==`production`&&(zv.displayName=`SelectTrigger`);var Noe={value:()=>null},Bv=_.forwardRef(function(e,t){let{className:n,render:r,children:i,placeholder:a,style:o,...s}=e,c=Iv(),l=c.useState(`value`),u=c.useState(`items`),d=c.useState(`itemToStringLabel`),f=c.useState(`hasSelectedValue`),p=!f&&a!=null&&i==null,m=c.useState(`hasNullItemLabel`,p),h={value:l,placeholder:!f},g=null;return g=typeof i==`function`?i(l):i??(p&&!m?a:Array.isArray(l)?Ru(l,u,d):Lu(l,u,d)),X(`span`,e,{state:h,ref:[t,c.context.valueRef],props:[{children:g},s],stateAttributesMapping:Noe})});process.env.NODE_ENV!==`production`&&(Bv.displayName=`SelectValue`);var Vv=_.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e;return X(`span`,e,{state:{open:Iv().useState(`open`)},ref:t,props:[{"aria-hidden":!0,children:`▼`},a],stateAttributesMapping:Ta})});process.env.NODE_ENV!==`production`&&(Vv.displayName=`SelectIcon`);var Hv=_.forwardRef(function(e,t){let n=Iv(),r=n.useState(`mounted`),i=n.useState(`forceMount`);return r||i?(0,L.jsx)(Cs,{ref:t,...e}):null});process.env.NODE_ENV!==`production`&&(Hv.displayName=`SelectPortal`);var Uv=_.createContext(void 0);process.env.NODE_ENV!==`production`&&(Uv.displayName=`SelectPositionerContext`);function Wv(){let e=_.useContext(Uv);if(!e)throw Error(process.env.NODE_ENV===`production`?K(59):`Base UI: SelectPositionerContext is missing. SelectPositioner parts must be placed within <Select.Positioner>.`);return e}function Gv(e,t){e&&Object.assign(e.style,t)}var Kv={position:`relative`,maxHeight:`100%`,overflowX:`hidden`,overflowY:`auto`},Poe={position:`fixed`},qv=_.forwardRef(function(e,t){let{anchor:n,className:r,render:i,positionMethod:a,side:o,align:s,sideOffset:c,alignOffset:l,collisionBoundary:u=`clipping-ancestors`,collisionPadding:d,arrowPadding:f,sticky:p,disableAnchorTracking:m,alignItemWithTrigger:h=!0,collisionAvoidance:g=_s,style:v,...y}=e,b=Iv(),x=Rv(),S=b.useState(`open`),C=b.useState(`mounted`),w=b.useState(`modal`),E=b.useState(`value`),D=b.useState(`openMethod`),O=b.useState(`positionerElement`),k=b.useState(`triggerElement`),A=b.useState(`isItemEqualToValue`),j=b.useState(`transitionStatus`),N=_.useRef(null),P=_.useRef(null),[F,I]=_.useState(h),z=C&&F&&D!==`touch`;!C&&F!==h&&I(h),_.useImperativeHandle(b.context.alignItemWithTriggerActiveRef,()=>z),Jd((z||w)&&S,D===`touch`,O,k);let B=Ud({anchor:n,floatingRootContext:x,positionMethod:a,mounted:C,side:o,sideOffset:c,align:s,alignOffset:l,arrowPadding:f,collisionBoundary:u,collisionPadding:d,sticky:p,disableAnchorTracking:m??z,collisionAvoidance:g,keepMounted:!0}),V=z?`none`:B.side,H=z?Poe:B.positionerStyles,U={open:S,side:V,align:B.align,anchorHidden:B.anchorHidden};M(()=>{b.set(`popupSide`,B.side)},[b,B.side]);let W=qd(e,U,{styles:H,transitionStatus:j,props:y,refs:[t,b.useStateSetter(`positionerElement`)],hidden:!C,inert:!S}),G=_.useRef(0),K=T(e=>{if(b.context.valuesRef.current.length===0)return;let t=G.current;G.current=e.size;let n=Z(Ue);if(t!==0&&!b.state.multiple&&E!==null&&Du(b.context.valuesRef.current,E,A)===-1){let e=b.context.initialValueRef.current,t=e!=null&&Du(b.context.valuesRef.current,e,A)!==-1?e:null;b.context.setValue(t,n),t===null&&(b.set(`selectedIndex`,null),b.context.selectedItemTextRef.current=null)}if(t!==0&&b.state.multiple&&Array.isArray(E)){let e=E.filter(e=>Du(b.context.valuesRef.current,e,A)!==-1);e.length!==E.length&&(b.context.setValue(e,n),e.length===0&&(b.set(`selectedIndex`,null),b.context.selectedItemTextRef.current=null))}if(S&&z){b.update({scrollUpArrowVisible:!1,scrollDownArrowVisible:!1});let e={height:``};Gv(O,e),Gv(b.context.popupRef.current,e)}}),q=_.useMemo(()=>({...B,side:V,alignItemWithTriggerActive:z,setControlledAlignItemWithTrigger:I,scrollUpArrowRef:N,scrollDownArrowRef:P}),[B,V,z,I]);return(0,L.jsx)(R,{elementsRef:b.context.listRef,labelsRef:b.context.labelsRef,onMapChange:K,children:(0,L.jsxs)(Uv.Provider,{value:q,children:[C&&w&&(0,L.jsx)(Zl,{inert:Xl(!S),cutout:k}),W]})})});process.env.NODE_ENV!==`production`&&(qv.displayName=`SelectPositioner`);var Jv=`--transform-origin`,Foe={...Da,...Vt},Yv=_.forwardRef(function(e,t){let{render:n,className:r,style:i,finalFocus:a,...o}=e,s=Iv(),{multiple:c,readOnly:l,highlightItemOnHover:u}=Lv(),d=Rv(),{side:f,align:p,alignItemWithTriggerActive:m,isPositioned:h,setControlledAlignItemWithTrigger:g}=Wv(),v=ap(!0)!=null,y=sd(),{nonce:b,disableStyleElements:x}=dm(),S=s.useState(`id`),C=s.useState(`open`),w=s.useState(`openMethod`),E=s.useState(`mounted`),D=s.useState(`popupProps`),O=s.useState(`transitionStatus`),k=s.useState(`triggerElement`),A=s.useState(`positionerElement`),j=s.useState(`listElement`),N=_.useRef(!1),P=_.useRef(!1),F=_.useRef({}),I=kt(),R=T(e=>{if(!A||!s.context.popupRef.current||!P.current)return;let t=A.style.top===`0px`,n=A.style.bottom===`0px`;if(N.current||!m||!t&&!n){s.context.handleScrollArrowVisibility(e);return}let r=Qv(A),i=$v(A.getBoundingClientRect().height,`y`,r),a=kn(A),o=nn(A),c=o.getComputedStyle(A),l=parseFloat(c.marginTop),u=parseFloat(c.marginBottom),d=Xv(o.getComputedStyle(s.context.popupRef.current)),f=Math.min(a.documentElement.clientHeight-l-u,d),p=e.scrollTop,h=Zv(e),g=null,_=e=>{A.style.height=`${e}px`},v=t?h-p:p,y=Math.min(i+v,f);if(v<=1){let n=Vm(v,0,f-i);n>0&&_(i+n),e.scrollTop=t?h:0,f-(i+n)<=1&&(N.current=!0),s.context.handleScrollArrowVisibility(e);return}f-y>1?g=t?1/0:0:n&&p<h&&(g=p-(v-(i+v-f)));let b=Math.ceil(y);if(b!==0&&_(b),g!=null){let t=Vm(g,0,Zv(e));Math.abs(e.scrollTop-t)>1&&(e.scrollTop=t)}b>=f-1&&(N.current=!0),s.context.handleScrollArrowVisibility(e)});_.useImperativeHandle(s.context.scrollHandlerRef,()=>R,[R]),Vn({open:C,ref:s.context.popupRef,onComplete(){C&&s.context.onOpenChangeComplete(!0)}});let z={open:C,transitionStatus:O,side:f,align:p};M(()=>{A&&s.context.popupRef.current&&!Object.keys(F.current).length&&(F.current={top:A.style.top||`0`,left:A.style.left||`0`,right:A.style.right,height:A.style.height,bottom:A.style.bottom,minHeight:A.style.minHeight,maxHeight:A.style.maxHeight,marginTop:A.style.marginTop,marginBottom:A.style.marginBottom})},[s,A]),M(()=>{C||m||(P.current=!1,N.current=!1,Gv(A,F.current))},[C,m,A]),M(()=>{let e=s.context.popupRef.current;if(!C||!k||!A||!e||m&&!h||s.state.transitionStatus===`ending`)return;if(P.current=!0,e.style.removeProperty(Jv),!m){I.request(()=>s.context.handleScrollArrowVisibility(j||e));return}let t=Ioe(e);try{let t=s.context.selectedItemTextRef.current;t?.isConnected||(t=!s.select(`hasSelectedValue`)&&s.context.firstItemTextRef.current?.isConnected?s.context.firstItemTextRef.current:null);let n=s.context.valueRef.current,r=nn(A),i=r.getComputedStyle(A),a=r.getComputedStyle(e),o=kn(k),c=Qv(k),l=ey(k.getBoundingClientRect(),c),d=ey(A.getBoundingClientRect(),c),f=l.height,p=j||e,m=p.scrollHeight,h=parseFloat(a.borderBottomWidth),_=parseFloat(i.marginTop)||10,v=parseFloat(i.marginBottom)||10,b=parseFloat(i.minHeight)||100,x=Xv(a),S=o.documentElement.clientHeight-_-v,C=o.documentElement.clientWidth,w=S-l.bottom+f,T,E=y===`rtl`?l.right-d.width:l.left,D=0;if(t&&n){let e=ey(n.getBoundingClientRect(),c);T=ey(t.getBoundingClientRect(),c),E=d.left+(y===`rtl`?e.right-T.right:e.left-T.left);let r=e.top-l.top+e.height/2;D=T.top-d.top+T.height/2-r}let O=w+D+v+h,M=Math.min(S,O),P=S-_-v,I=O-M,L=C-5;A.style.left=`${Vm(E,5,L-d.width)}px`,A.style.height=`${M}px`,A.style.maxHeight=`none`,A.style.marginTop=`${_}px`,A.style.marginBottom=`${v}px`,e.style.height=`100%`;let R=Zv(p),z=I>=R-1;z&&(M=Math.min(S,d.height)-(I-R));let B=l.top<20||l.bottom>S-20||Math.ceil(M)+1<Math.min(m,b),V=(r.visualViewport?.scale??1)!==1&&ea;if(B||V){Gv(A,F.current),g(!1);return}let H=Math.max(b,M);if(z){let e=Math.max(0,S-O);A.style.top=d.height>=P?`0`:`${e}px`,A.style.height=`${M}px`,p.scrollTop=Zv(p)}else A.style.bottom=`0`,p.scrollTop=I;if(T){let t=d.top,n=d.height,r=T.top+T.height/2,i=Vm(n>0?(r-t)/n*100:50,0,100);e.style.setProperty(Jv,`50% ${i}%`)}(H===S||M>=x)&&(N.current=!0),s.context.handleScrollArrowVisibility(p),u&&s.state.selectedIndex===null&&s.state.activeIndex===null&&s.context.listRef.current[0]!=null&&s.set(`activeIndex`,0)}finally{t()}},[s,C,A,k,m,g,I,j,u,y,h]),_.useEffect(()=>{if(!m||!A||!C)return;let e=nn(A);function t(e){s.context.setOpen(!1,Z(St,e))}return Pn(e,`resize`,t)},[s,m,A,C]);let B={...j?{role:`presentation`}:{role:`listbox`,"aria-multiselectable":c||void 0,"aria-readonly":l||void 0,id:`${S}-list`},onKeyDown(e){v&&Hl.has(e.key)&&e.stopPropagation()},onScroll(e){j||R(e.currentTarget)},...m&&{style:j?{height:`100%`}:Kv},className:!j&&m?fv.className:void 0},V=X(`div`,e,{ref:[t,s.context.popupRef],state:z,stateAttributesMapping:Foe,props:[D,B,Kd(O),o]});return(0,L.jsxs)(_.Fragment,{children:[!x&&fv.getElement(b),(0,L.jsx)(Rs,{context:d,modal:!1,disabled:!E,openInteractionType:w,returnFocus:a,restoreFocus:!0,children:V})]})});process.env.NODE_ENV!==`production`&&(Yv.displayName=`SelectPopup`);function Xv(e){let t=e.maxHeight;return t.endsWith(`px`)&&parseFloat(t)||1/0}function Zv(e){return bv(e.scrollHeight,e.clientHeight)}function Qv(e){return tc.getScale(e)}function $v(e,t,n){return e/n[t]}function ey(e,t){return yo({x:$v(e.x,`x`,t),y:$v(e.y,`y`,t),width:$v(e.width,`x`,t),height:$v(e.height,`y`,t)})}var ty=[[`transform`,`none`],[`scale`,`1`],[`translate`,`0 0`]];function Ioe(e){let{style:t}=e,n={};for(let[e,r]of ty)n[e]=t.getPropertyValue(e),t.setProperty(e,r,`important`);return()=>{for(let[e]of ty){let r=n[e];r?t.setProperty(e,r):t.removeProperty(e)}}}var ny=_.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,o=Iv(),{multiple:s,readOnly:c}=Lv(),{alignItemWithTriggerActive:l}=Wv(),u=o.useState(`hasScrollArrows`),d=o.useState(`openMethod`),f={id:`${o.useState(`id`)}-list`,role:`listbox`,"aria-multiselectable":s||void 0,"aria-readonly":c||void 0,onScroll(e){o.context.scrollHandlerRef.current?.(e.currentTarget)},...l&&{style:Kv},className:u&&d!==`touch`?fv.className:void 0};return X(`div`,e,{ref:[t,o.useStateSetter(`listElement`)],props:[f,a]})});process.env.NODE_ENV!==`production`&&(ny.displayName=`SelectList`);var ry=_.createContext(void 0);process.env.NODE_ENV!==`production`&&(ry.displayName=`SelectItemContext`);function iy(){let e=_.useContext(ry);if(!e)throw Error(process.env.NODE_ENV===`production`?K(57):`Base UI: SelectItemContext is missing. SelectItem parts must be placed within <Select.Item>.`);return e}var ay=_.memo(_.forwardRef(function(e,t){let{render:n,className:r,style:i,value:a=null,label:o,disabled:s=!1,nativeButton:c=!1,...l}=e,u=_.useRef(null),d=Pt({guess:!0,label:o,textRef:u}),f=Iv(),{itemProps:p,multiple:m,disabled:h,readOnly:g}=Lv(),v=h||s,y=f.useState(`isActive`,d.index),b=f.useState(`open`),x=f.useState(`isSelected`,a),S=f.useState(`isSelectedByFocus`,d.index),C=f.useState(`isItemEqualToValue`),w=d.index,T=_.useRef(null);M(()=>{let e=f.context.valuesRef.current;return e[w]=a,()=>{delete e[w]}},[w,a,f]),M(()=>{let e=f.state.value,t=f.state.selectedIndex,n=t,r;m&&Array.isArray(e)?(n=ku(w,a,f.context.valuesRef.current,e,C,t),r=n===w,w===t&&!r&&(f.context.selectedItemTextRef.current=null)):(r=e!==void 0&&wu(a,e,C),r&&(n=w)),f.set(`selectedIndex`,n),r&&u.current&&(f.context.selectedItemTextRef.current=u.current)},[w,m,C,f,a]);let E=_.useRef(`mouse`),D=_.useRef(!1),{getButtonProps:O,buttonRef:k}=jn({disabled:v,focusableWhenDisabled:!0,native:c,composite:!0}),A={disabled:v,selected:x,highlighted:y};function j(e){if(h||g)return;let t=f.state.value;if(m){let n=Array.isArray(t)?t:[],r=x?Au(n,a,C):[...n,a];f.context.setValue(r,Z(Je,e))}else f.context.setValue(a,Z(Je,e)),f.context.setOpen(!1,Z(Je,e))}function N(){f.context.selectionRef.current.dragY=0}let P={role:`option`,"aria-selected":x,tabIndex:b&&y?0:-1,onKeyDown(e){f.set(`activeIndex`,w),e.key===` `&&f.context.typingRef.current&&e.preventDefault()},onClick(e){let t=E.current!==`touch`,n=e.nativeEvent.pointerType,r=t&&ga(e.nativeEvent)&&(n!==void 0||y),i=t&&!r&&!D.current;D.current=!1,!(v||i)&&j(e.nativeEvent)},onPointerEnter(e){E.current=e.pointerType},onPointerMove(e){if(e.pointerType===`mouse`&&e.buttons===1){let t=f.context.selectionRef.current;t.dragY+=e.movementY,t.dragY**2>=64&&(t.allowUnselectedMouseUp=!0)}},onPointerDown(e){E.current=e.pointerType,D.current=!0,N()},onMouseUp(){if(N(),v||E.current===`touch`||D.current)return;let e=!f.context.selectionRef.current.allowSelectedMouseUp&&x,t=!f.context.selectionRef.current.allowUnselectedMouseUp&&!x;e||t||(D.current=!0,T.current?.click(),D.current=!1)}},F=X(`div`,e,{ref:[k,t,d.ref,T],state:A,props:[p,P,l,O]}),I=_.useMemo(()=>({selected:x,index:w,textRef:u,selectedByFocus:S}),[x,w,u,S]);return(0,L.jsx)(ry.Provider,{value:I,children:F})}));process.env.NODE_ENV!==`production`&&(ay.displayName=`SelectItem`);var oy=_.forwardRef(function(e,t){let{selected:n}=iy();return e.keepMounted||n?(0,L.jsx)(sy,{...e,ref:t}):null});process.env.NODE_ENV!==`production`&&(oy.displayName=`SelectItemIndicator`);var sy=_.memo(_.forwardRef((e,t)=>{let{render:n,className:r,style:i,keepMounted:a,...o}=e,{selected:s}=iy(),c=_.useRef(null),{transitionStatus:l,setMounted:u}=At(s),d=X(`span`,e,{ref:[t,c],state:{selected:s,transitionStatus:l},props:[{"aria-hidden":!0,children:`✔️`},o],stateAttributesMapping:Vt});return Vn({batch:!0,enabled:!s,open:s,ref:c,onComplete(){s||u(!1)}}),d}));process.env.NODE_ENV!==`production`&&(sy.displayName=`Inner`);var cy=_.memo(_.forwardRef(function(e,t){let{index:n,textRef:r,selectedByFocus:i}=iy(),a=Iv(),{render:o,className:s,style:c,...l}=e;return X(`div`,e,{ref:[_.useCallback(e=>{e&&(n===0&&(a.context.firstItemTextRef.current=e),i&&(a.context.selectedItemTextRef.current=e))},[a,n,i]),t,r],props:l})}));process.env.NODE_ENV!==`production`&&(cy.displayName=`SelectItemText`);var ly=_.forwardRef(function(e,t){let{render:n,className:r,style:i,direction:a,keepMounted:o,...s}=e,c=a===`up`,l=Iv(),{side:u,scrollDownArrowRef:d,scrollUpArrowRef:f}=Wv(),p=c?`scrollUpArrowVisible`:`scrollDownArrowVisible`,m=l.useState(p),h=l.useState(`openMethod`),g=m&&h!==`touch`,_=oa(),v=c?f:d,{mounted:y,transitionStatus:b,setMounted:x}=At(g);M(()=>(l.context.scrollArrowsMountedCountRef.current+=1,l.set(`hasScrollArrows`,!0),()=>{l.context.scrollArrowsMountedCountRef.current=Math.max(0,l.context.scrollArrowsMountedCountRef.current-1),l.context.scrollArrowsMountedCountRef.current===0&&l.set(`hasScrollArrows`,!1)}),[l]),Vn({open:g,ref:v,onComplete(){g||x(!1)}});let S=X(`div`,e,{ref:[t,v],state:{direction:a,visible:g,side:u,transitionStatus:b},props:[{"aria-hidden":!0,children:c?`▲`:`▼`,style:{position:`absolute`},onMouseMove(e){if(e.movementX===0&&e.movementY===0||_.isStarted())return;l.set(`activeIndex`,null);function t(){let e=l.state.listElement??l.context.popupRef.current;if(!e)return;l.set(`activeIndex`,null),l.context.handleScrollArrowVisibility(e);let n=bv(e.scrollHeight,e.clientHeight),r=xv(e.scrollTop,n),i=r===(c?0:n),a=l.context.listRef.current;if(r!==e.scrollTop&&(e.scrollTop=r),i){_.clear();return}if(a.length>0){let t=v.current?.offsetHeight||0;e.scrollTop=Loe(a,c,r,e.clientHeight,t,n)}_.start(40,t)}_.start(40,t)},onMouseLeave(){_.clear()}},s],stateAttributesMapping:Vt});return y||o?S:null});process.env.NODE_ENV!==`production`&&(ly.displayName=`SelectScrollArrow`);function Loe(e,t,n,r,i,a){if(t){let t=0,r=n+i-1;for(let n=0;n<e.length;n+=1){let i=e[n];if(i&&i.offsetTop>=r){t=n;break}}let o=Math.max(0,t-1),s=e[o];return o<t&&s?xv(s.offsetTop-i,a):0}let o=e.length-1,s=n+r-i+1;for(let t=0;t<e.length;t+=1){let n=e[t];if(n&&n.offsetTop+n.offsetHeight>s){o=Math.max(0,t-1);break}}let c=Math.min(e.length-1,o+1),l=e[c];return c>o&&l?xv(l.offsetTop+l.offsetHeight-r+i,a):a}var uy=_.forwardRef(function(e,t){return(0,L.jsx)(ly,{...e,ref:t,direction:`down`})});process.env.NODE_ENV!==`production`&&(uy.displayName=`SelectScrollDownArrow`);var dy=_.forwardRef(function(e,t){return(0,L.jsx)(ly,{...e,ref:t,direction:`up`})});process.env.NODE_ENV!==`production`&&(dy.displayName=`SelectScrollUpArrow`);var fy=_.createContext(void 0);process.env.NODE_ENV!==`production`&&(fy.displayName=`SelectGroupContext`);function Roe(){let e=_.useContext(fy);if(e===void 0)throw Error(process.env.NODE_ENV===`production`?K(56):`Base UI: SelectGroupContext is missing. SelectGroup parts must be placed within <Select.Group>.`);return e}var py=_.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,[o,s]=_.useState(),c=_.useMemo(()=>({labelId:o,setLabelId:s}),[o,s]),l=X(`div`,e,{ref:t,props:[{role:`group`,"aria-labelledby":o},a]});return(0,L.jsx)(fy.Provider,{value:c,children:l})});process.env.NODE_ENV!==`production`&&(py.displayName=`SelectGroup`);var my=_.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,...o}=e,{setLabelId:s}=Roe(),c=He(a);return M(()=>(s(c),()=>{s(e=>e===c?void 0:e)}),[c,s]),X(`div`,e,{ref:t,props:[{id:c,"aria-hidden":!0},o]})});process.env.NODE_ENV!==`production`&&(my.displayName=`SelectGroupLabel`);function hy(e,t){return e-t}function gy(e,t,n,r,i,a){let o=Vm(e,n,r);if(!i)return o;let s=a.slice();return s[t]=Vm(o,a[t-1]??-1/0,a[t+1]??1/0),s.sort(hy)}function _y(e,t,n){if(!Array.isArray(e))return!0;let r=t*n;for(let t=0;t<e.length-1;t+=1)if(!(Math.abs(e[t]-e[t+1])>=r))return!1;return!0}var vy=()=>null,yy={activeThumbIndex:vy,max:vy,min:vy,minStepsBetweenValues:vy,step:vy,values:vy,...Vu},by=_.createContext(void 0);process.env.NODE_ENV!==`production`&&(by.displayName=`SliderRootContext`);function xy(){let e=_.useContext(by);if(e===void 0)throw Error(process.env.NODE_ENV===`production`?K(62):`Base UI: SliderRootContext is missing. Slider parts must be placed within <Slider.Root>.`);return e}function zoe(e,t){return e===t||Array.isArray(e)&&Array.isArray(t)&&Su(e,t)}var Sy=_.forwardRef(function(e,t){let{"aria-labelledby":n,className:r,defaultValue:i,disabled:a=!1,id:o,format:s,largeStep:c=10,locale:l,render:u,max:d=100,min:f=0,minStepsBetweenValues:p=0,form:m,name:h,onValueChange:g,onValueCommitted:y,orientation:b=`horizontal`,step:x=1,thumbCollisionBehavior:S=`push`,thumbAlignment:C=`center`,value:w,style:E,...D}=e,k=He(o),A=Kre(k),j=T(g),N=T(y),{clearErrors:P}=qu(),{state:F,disabled:I,name:z,setTouched:B,setDirty:V,validityData:H,validation:U}=Wu(),{labelId:W}=Yu(),[G,K]=_.useState(),q=n??fd(W,G),J=I||a,ee=z??h,[Y,te]=v({controlled:w,default:i??f,name:`Slider`}),ne=_.useRef(null),re=_.useRef(null),ie=_.useRef([]),ae=_.useRef(null),oe=_.useRef(-1),se=_.useRef(null),ce=_.useRef(Ue),[le,ue]=_.useState(-1),[de,fe]=_.useState(-1),[pe,me]=_.useState(!1),[he,ge]=_.useState(()=>new Map),[_e,ve]=_.useState([void 0,void 0]),ye=T(e=>{ue(e),e!==-1&&fe(e)}),be=T(e=>{e&&(re.current=e)}),xe=Array.isArray(Y),Se=_.useMemo(()=>xe?Y.map(e=>Vm(e,f,d)).sort(hy):[Vm(Y,f,d)],[d,f,xe,Y]),Ce=xe?Se:Se[0];Gu(U.inputRef,k,Ce,void 0,!J,h),eu(Ce,()=>{P(ee),U.change(Ce);let e=H.initialValue,t;t=Array.isArray(Ce)&&Array.isArray(e)?!Su(Ce,e):Ce!==e,V(t)});let we=T((e,t)=>{if(Number.isNaN(e)||zoe(e,Y))return!1;let n=t.event,r=n.constructor,i=new r(n.type,n);return Object.defineProperty(i,"target",{writable:!0,value:{value:e,name:ee}}),t.event=i,j(e,t),!t.isCanceled&&(ce.current=t.reason,te(e),!0)}),Te=T((e,t,n)=>{let r=gy(e,t,f,d,xe,Se);if(_y(r,x,p)){let e=`key`in n?ut:tt,i=we(r,Z(e,n.nativeEvent,void 0,{activeThumbIndex:t}));B(!0),i&&N(r,Ct(e,n.nativeEvent))}});process.env.NODE_ENV!==`production`&&f>=d&&O("Slider `max` must be greater than `min`."),M(()=>{if(!J)return;let e=ya(kn(ne.current));ba(ne.current,e)&&e.blur(),le!==-1&&ye(-1)},[le,J,ye]);let Ee=_.useMemo(()=>({...F,activeThumbIndex:le,disabled:J,dragging:pe,orientation:b,max:d,min:f,minStepsBetweenValues:p,step:x,values:Se}),[F,le,J,pe,d,f,p,b,x,Se]),De=_.useMemo(()=>({active:le,controlRef:re,disabled:J,dragging:pe,validation:U,format:s,handleInputChange:Te,indicatorPosition:_e,inset:C!==`center`,labelId:q,rootLabelId:A,largeStep:c,lastUsedThumbIndex:de,lastChangeReasonRef:ce,form:m,locale:l,max:d,min:f,minStepsBetweenValues:p,name:ee,onValueCommitted:N,orientation:b,pressedThumbCenterOffsetRef:ae,pressedThumbIndexRef:oe,pressedValuesRef:se,registerFieldControlRef:be,renderBeforeHydration:C===`edge`,setActive:ye,setDragging:me,setIndicatorPosition:ve,setLabelId:K,setValue:we,state:Ee,step:x,thumbCollisionBehavior:S,thumbMap:he,thumbRefs:ie,values:Se}),[le,q,A,J,pe,U,s,Te,_e,c,de,m,l,d,f,p,ee,N,b,be,ye,we,Ee,x,S,C,he,Se]),Oe=X(`div`,e,{state:Ee,ref:[t,ne],props:[{"aria-labelledby":q,id:k,role:`group`},D,e=>U.getValidationProps(J,e)],stateAttributesMapping:yy});return(0,L.jsx)(by.Provider,{value:De,children:(0,L.jsx)(R,{elementsRef:ie,onMapChange:ge,children:Oe})})});process.env.NODE_ENV!==`production`&&(Sy.displayName=`SliderRoot`);var Cy=_.forwardRef(function(e,t){let{"aria-live":n=`off`,render:r,className:i,children:a,style:o,...s}=e,{thumbMap:c,state:l,values:u,format:d,locale:f}=xy(),p=Array.from(c.values(),({inputId:e})=>e).join(` `).trim()||void 0,m=_.useMemo(()=>u.map(e=>og(e,f,d)),[d,f,u]),h=m.join(` – `);return X(`output`,e,{state:l,ref:t,props:[{"aria-live":n,children:typeof a==`function`?a(m,u):h,htmlFor:p},s],stateAttributesMapping:yy})});process.env.NODE_ENV!==`production`&&(Cy.displayName=`SliderValue`);function wy(e,t){let n=e.getBoundingClientRect();return t?(n.top+n.bottom)/2:(n.left+n.right)/2}function Ty(e){if(e===0)return 0;if(Math.abs(e)<1){let t=e.toExponential().split(`e-`),n=t[0].split(`.`)[1];return(n?n.length:0)+parseInt(t[1],10)}let t=e.toString().split(`.`)[1];return t?t.length:0}function Ey(e,t,n){let r=Math.round((e-n)/t)*t+n;return Number(r.toFixed(Math.max(Ty(t),Ty(n))))}function Dy(e,t,n,r,i,a,o,s){let c=e.slice(),l=a*o,u=c.length-1,d=s??e;c[t]=Vm(n,r+t*l,i-(u-t)*l);for(let e=t+1;e<=u;e+=1){let t=c[e-1]+l,n=i-(u-e)*l,r=d[e],a=Math.max(c[e],t);r<a&&(a=Math.max(r,t)),c[e]=Vm(a,t,n)}for(let e=t-1;e>=0;--e){let t=c[e+1]-l,n=r+e*l,i=d[e],a=Math.min(c[e],t);i>a&&(a=Math.min(i,t)),c[e]=Vm(a,n,t)}for(let e=0;e<=u;e+=1)c[e]=Number(c[e].toFixed(12));return c}function Boe(e,t,n,r,i,a,o,s,c,l){let u=n??t,d=r??t;if(!(u.length>1))return{value:a,thumbIndex:0,didSwap:!1};let f=c*l;if(e===`push`)return{value:Dy(u,i,a,o,s,c,l),thumbIndex:i,didSwap:!1};let p=u.slice(),m=p[i-1],h=p[i+1],g=m==null?o:m+f,_=h==null?s:h-f,v=Number(Vm(a,g,_).toFixed(12));switch(p[i]=v,e){case`swap`:{let e=u[i],t=1e-7,n=a>e,r=a<e,g=n&&h!=null&&a>=h-t,_=r&&m!=null&&a<=m+t;if(!g&&!_)return{value:p,thumbIndex:i,didSwap:!1};let y=g?i+1:i-1,b=p.map((e,t)=>t===i?v:d[t]??u[t]),x=a;x=g?Math.max(a,p[y]):Math.min(a,p[y]);let S=Dy(p,y,x,o,s,c,l,b),C=g?y-1:y+1,w=S[C-1],T=S[C+1],E=w==null?o:w+f;E=Math.max(E,o+C*f);let D=T==null?s:T-f;D=Math.min(D,s-(S.length-1-C)*f);let O=Vm(v,E,D);return S[C]=Number(O.toFixed(12)),{value:S,thumbIndex:y,didSwap:!0}}default:return{value:p,thumbIndex:i,didSwap:!1}}}var Voe=2;function Hoe(e,t){if(!e)return{start:0,end:0};function n(e){let t=e==null?0:parseFloat(e);return Number.isNaN(t)?0:t}let r=t?`Top`:`InlineStart`,i=t?`Bottom`:`InlineEnd`;return{start:n(e[`border${r}Width`])+n(e[`padding${r}`]),end:n(e[`border${i}Width`])+n(e[`padding${i}`])}}function Uoe(e,t){if(t.current!=null&&e.changedTouches){let n=e;for(let e=0;e<n.changedTouches.length;e+=1){let r=n.changedTouches[e];if(r.identifier===t.current)return{x:r.clientX,y:r.clientY}}return null}return{x:e.clientX,y:e.clientY}}var Oy=_.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{disabled:o,dragging:s,inset:c,lastChangeReasonRef:l,max:u,min:d,minStepsBetweenValues:f,onValueCommitted:p,orientation:m,pressedThumbCenterOffsetRef:h,pressedThumbIndexRef:g,pressedValuesRef:v,registerFieldControlRef:y,renderBeforeHydration:b,setActive:x,setDragging:S,setValue:C,state:w,step:E,thumbCollisionBehavior:D,thumbRefs:O,values:k}=xy(),A=sd(),j=k.length>1,M=m===`vertical`,N=_.useRef(null),P=_.useRef(null),F=T(e=>{e&&P.current==null&&(P.current=nn(e).getComputedStyle(e))}),I=_.useRef(null),L=_.useRef(0),R=_.useRef(0),z=_.useRef(null),B=Fn(k);function V(e){return e?.querySelector(`input[type="range"]`)}function H(e){g.current=e,O.current[e]||(h.current=null)}function U(){g.current=-1,h.current=null}function W(e){return on(e)?O.current.some(t=>!on(t)||!ba(t,e)?!1:V(t)?.disabled===!0):!1}function G(e){let t=N.current,n=g.current;if(!t||n<0||n>=k.length)return n>=k.length&&(z.current=null),null;let{width:r,height:i,bottom:a,left:o,right:s}=t.getBoundingClientRect(),c=Hoe(P.current,M),l=R.current,p=(M?i:r)-c.start-c.end-l*2,m=h.current??0,_=e.x-m,y=e.y-m,b=Vm(((M?a-y-c.end:(A===`rtl`?s-_:_-o)-c.start)-l)/p,0,1),x=(u-d)*b+d;return x=Ey(x,E,d),x=Vm(x,d,u),j?Boe(D,k,B.current,v.current,n,x,d,u,E,f):{value:x,thumbIndex:n,didSwap:!1}}function K(e){v.current=j?k.slice():null,z.current=null,B.current=k;let t=g.current,n=t;if(t>-1&&t<k.length){if(k[t]===u){let e=t;for(;e>0&&k[e-1]===u;)--e;n=e}}else{let t=M?`y`:`x`,r;n=-1;for(let i=0;i<O.current.length;i+=1){let a=O.current[i];if(on(a)&&!V(a)?.disabled){let o=wy(a,M),s=Math.abs(e[t]-o);(r===void 0||s<=r)&&(n=i,r=s)}}}if(n>-1&&n!==t&&H(n),c){let e=O.current[n];if(on(e)){let t=e.getBoundingClientRect();R.current=t[M?`height`:`width`]/2}}}function q(e){let t=V(O.current?.[e]);t&&t.focus({preventScroll:!0,focusVisible:!1})}function J(e,t,n){let r=C(e.value,Z(t,n,void 0,{activeThumbIndex:e.thumbIndex}));return r&&(z.current=e.value,B.current=Array.isArray(e.value)?e.value:[e.value],e.didSwap&&(H(e.thumbIndex),q(e.thumbIndex))),r}let ee=T(e=>{let t=Uoe(e,I);if(t==null)return;if(L.current+=1,e.type===`pointermove`&&e.buttons===0){Y(e);return}let n=G(t);n!=null&&_y(n.value,E,f)&&(!s&&L.current>Voe&&S(!0),J(n,ft,e))}),Y=T(e=>{x(-1),S(!1),h.current=null;let t=z.current;if(Array.isArray(t)&&t.length!==k.length&&(z.current=null),z.current!=null){let t=l.current;p(z.current,Ct(t,e))}`pointerType`in e&&N.current?.hasPointerCapture(e.pointerId)&&N.current?.releasePointerCapture(e.pointerId),g.current=-1,I.current=null,ne()}),te=T(e=>{if(o)return;if(W(xa(e))){U();return}let t=e.changedTouches[0];if(t==null)return;I.current=t.identifier;let n={x:t.clientX,y:t.clientY};K(n);let r=G(n);if(r==null)return;q(r.thumbIndex),J(r,Qe,e),L.current=0;let i=kn(N.current);i.addEventListener(`touchmove`,ee,{passive:!0}),i.addEventListener(`touchend`,Y,{passive:!0})}),ne=T(()=>{let e=kn(N.current);e.removeEventListener(`pointermove`,ee),e.removeEventListener(`pointerup`,Y),e.removeEventListener(`touchmove`,ee),e.removeEventListener(`touchend`,Y),v.current=null,z.current=null}),re=kt();return _.useEffect(()=>{let e=N.current;if(!e)return()=>ne();let t=Pn(e,`touchstart`,te,{passive:!0});return()=>{t(),re.cancel(),ne()}},[ne,te,N,re]),_.useEffect(()=>{o&&ne()},[o,ne]),X(`div`,e,{state:w,ref:[t,y,N,F],props:[{"data-base-ui-slider-control":b?``:void 0,onPointerDown(e){let t=N.current,n=xa(e.nativeEvent);if(!t||o||e.defaultPrevented||!on(n)||e.button!==0)return;if(W(n)){U();return}let r={x:e.clientX,y:e.clientY};K(r);let i=G(r);if(i==null)return;ba(O.current[i.thumbIndex],ya(kn(t)))?e.preventDefault():re.request(()=>{q(i.thumbIndex)}),S(!0),h.current??J(i,Qe,e.nativeEvent),e.nativeEvent.pointerId&&t.setPointerCapture(e.nativeEvent.pointerId),L.current=0;let a=kn(t);a.addEventListener(`pointermove`,ee,{passive:!0}),a.addEventListener(`pointerup`,Y,{once:!0})}},a],stateAttributesMapping:yy})});process.env.NODE_ENV!==`production`&&(Oy.displayName=`SliderControl`);var ky=_.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{state:o}=xy();return X(`div`,e,{state:o,ref:t,props:[{style:{position:`relative`}},a],stateAttributesMapping:yy})});process.env.NODE_ENV!==`production`&&(ky.displayName=`SliderTrack`);function Woe(){return k}function Goe(){return!1}function Koe(){return!0}function Ay(){return(0,Cc.useSyncExternalStore)(Woe,Goe,Koe)}function jy(e){let{script:t}=e,{nonce:n}=dm();return Ay()?(0,L.jsx)(`script`,{nonce:n,dangerouslySetInnerHTML:{__html:t},suppressHydrationWarning:!0}):null}var qoe=`data-index`,Joe,Yoe=new Set([...Hl,Bl,Vl]);function Xoe(e,t,n,r){if(!(t<0))return e.length===2?`${og(e[t],r,n)} ${t===0?`start`:`end`} range`:n?og(e[t],r,n):void 0}function Zoe(e,t,n,r,i){let a=e+t*n;return Vm(Number(a.toFixed(Math.max(Ty(e),Ty(t),Ty(r)))),r,i)}var My=_.forwardRef(function(e,t){let{render:n,children:r,className:i,"aria-describedby":a,"aria-label":o,"aria-labelledby":s,"aria-valuetext":c,disabled:l=!1,getAriaLabel:u,getAriaValueText:d,id:f,index:p,inputRef:m,onBlur:h,onFocus:g,onKeyDown:v,tabIndex:y,style:b,...x}=e,S=He(f),{active:C,lastUsedThumbIndex:w,controlRef:E,disabled:D,validation:O,format:k,handleInputChange:A,inset:j,labelId:N,largeStep:P,locale:F,max:I,min:R,minStepsBetweenValues:z,form:B,name:V,orientation:H,pressedThumbCenterOffsetRef:U,pressedThumbIndexRef:W,renderBeforeHydration:G,setActive:K,setIndicatorPosition:q,state:J,step:Y,thumbRefs:te,values:ne}=xy(),re=sd(),ie=l||D,ae=ne.length>1,oe=H===`vertical`,se=re===`rtl`,{setTouched:ce,setFocused:le,validationMode:ue}=Wu(),de=_.useRef(null),fe=_.useRef(null),me=_.useRef(!1),he=T(e=>{me.current||g?.(e)}),ge=T(e=>{me.current||h?.(e)}),_e=He(),ve=Xu(),ye=ae?_e:ve,{ref:be,index:xe}=Pt({metadata:_.useMemo(()=>({inputId:ye}),[ye])}),Se=ae?p??xe:0,Ce=Se===ne.length-1,we=ne[Se],Te=lg(we,R,I),[Ee,De]=_.useState(),Oe=Ay(),ke=w>=0&&w<ne.length?w:-1,Ae=T(()=>{let e=E.current,t=de.current;if(!e||!t)return;let n=t.getBoundingClientRect(),r=e.getBoundingClientRect(),i=oe?`height`:`width`,a=r[i]-n[i],o=(n[i]/2+a*Te/100)/r[i]*100,s=Number.isFinite(o)?o:void 0;De(s),Se===0?q(e=>[s,e[1]]):Ce&&q(e=>[e[0],s])});M(()=>{j&&queueMicrotask(Ae)},[Ae,j]),M(()=>{j&&Ae()},[Ae,j,Te]),M(()=>{if(!j)return;let e=E.current,t=de.current;if(!e||!t)return;let n=nn(e).ResizeObserver;if(typeof n!=`function`)return;let r=new n(Ae);return r.observe(e),r.observe(t),()=>{r.disconnect()}},[E,Ae,j]);let je=oe?`bottom`:`insetInlineStart`,Me=oe?`left`:`top`,Ne;ae?C===Se?Ne=2:ke===Se&&(Ne=1):C===Se&&(Ne=1);let Pe;Pe=!j&&!Number.isFinite(Te)?Ua:{position:`absolute`,[je]:j?`var(--position)`:`${Te}%`,[Me]:`50%`,translate:`${(oe||!se?-1:1)*50}% ${(oe?1:-1)*50}%`,zIndex:Ne,...j&&{"--position":`${Ee??0}%`,visibility:G&&Oe||Ee===void 0?`hidden`:void 0}};let Fe;oe&&(Fe=se?`vertical-rl`:`vertical-lr`);let Ie=typeof u==`function`?u(Se):o,Le=pe({"aria-label":Ie,"aria-labelledby":s??(Ie==null?N:void 0),"aria-describedby":a,"aria-orientation":H,"aria-valuenow":we,"aria-valuetext":typeof d==`function`?d(og(we,F,k),we,Se):c??Xoe(ne,Se,k,F),disabled:ie,form:B,id:ye,max:I,min:R,name:V,onChange(e){A(e.currentTarget.valueAsNumber,Se,e)},onFocus(e){let t=me.current;me.current=!1,K(Se),le(!0),t&&e.stopPropagation()},onBlur(e){if(me.current){e.stopPropagation();return}K(-1),!te.current.some(t=>ba(t,e.relatedTarget))&&(ce(!0),le(!1),ue===`onBlur`&&O.commit(gy(we,Se,R,I,ae,ne)))},onKeyDown(e){if(e.defaultPrevented||!Yoe.has(e.key))return;Hl.has(e.key)&&e.stopPropagation();let t=null,n=0,r=e.shiftKey?P:Y,i=Ey(we,Y,R);switch(e.key){case Fl:n=1;break;case Rl:n=se?-1:1;break;case Il:n=-1;break;case Ll:n=se?1:-1;break;case Bl:r=P,n=1;break;case Vl:r=P,n=-1;break;case`End`:t=ae&&Number.isFinite(ne[Se+1])?ne[Se+1]-Y*z:I;break;case zl:t=ae&&Number.isFinite(ne[Se-1])?ne[Se-1]+Y*z:R}if(n!==0&&(t=Zoe(i,r,n,R,I)),t!==null){let n=e.currentTarget;Fa(n)||(me.current=!0,n.blur(),n.focus({preventScroll:!0,focusVisible:!0})),A(t,Se,e),e.preventDefault()}},step:Y,style:{...Ua,width:`100%`,height:`100%`,writingMode:Fe},tabIndex:y,type:`range`,value:we??``},e=>O.getValidationProps(ie,e),{onFocus:he,onBlur:ge,onKeyDown:v}),Re=ee(fe,O.inputRef,m);return X(`div`,e,{state:J,ref:[t,be,de],props:[{[qoe]:Se,children:(0,L.jsxs)(_.Fragment,{children:[r,(0,L.jsx)(`input`,{ref:Re,...Le,suppressHydrationWarning:!0}),j&&Ce&&G&&(Joe||=(0,L.jsx)(jy,{script:``}))]}),id:S,onPointerDown(e){if(ie)return;W.current=Se;let t=wy(e.currentTarget,oe);U.current=(oe?e.clientY:e.clientX)-t},style:Pe,suppressHydrationWarning:G||void 0},x],stateAttributesMapping:yy})});process.env.NODE_ENV!==`production`&&(My.displayName=`SliderThumb`);function Qoe(e,t,n,r,i,a){let o={visibility:a||n&&(r===void 0||t&&i===void 0)?`hidden`:void 0,position:e?`absolute`:`relative`,[e?`width`:`height`]:`inherit`},s=`${r??0}%`,c=`${(i??0)-(r??0)}%`;return n&&(o[`--start-position`]=s,s=`var(--start-position)`,t&&(o[`--relative-size`]=c,c=`var(--relative-size)`)),o[e?`bottom`:`insetInlineStart`]=t?s:0,o[e?`height`:`width`]=t?c:s,o}var Ny=_.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{indicatorPosition:o,inset:s,max:c,min:l,orientation:u,renderBeforeHydration:d,state:f,values:p}=xy(),m=Ay(),h=Qoe(u===`vertical`,p.length>1,s,s?o[0]:lg(p[0],l,c),s?o[1]:lg(p[p.length-1],l,c),s&&d&&m);return X(`div`,e,{state:f,ref:t,props:[{"data-base-ui-slider-indicator":d?``:void 0,style:h,suppressHydrationWarning:d||void 0},a],stateAttributesMapping:yy})});process.env.NODE_ENV!==`production`&&(Ny.displayName=`SliderIndicator`);var Py=_.createContext(void 0);process.env.NODE_ENV!==`production`&&(Py.displayName=`SwitchRootContext`);function $oe(){let e=_.useContext(Py);if(e===void 0)throw Error(process.env.NODE_ENV===`production`?K(63):`Base UI: SwitchRootContext is missing. Switch parts must be placed within <Switch.Root>.`);return e}var ese=`data-checked`,tse=`data-unchecked`,Fy={...Vu,checked(e){return e?{[ese]:``}:{[tse]:``}}},Iy=_.forwardRef(function(e,t){let{checked:n,className:r,defaultChecked:i,"aria-labelledby":a,form:o,id:s,inputRef:c,name:l,nativeButton:u=!1,onCheckedChange:d,readOnly:f=!1,required:p=!1,disabled:m=!1,render:h,uncheckedValue:g,value:y,style:b,...x}=e,{clearErrors:S}=qu(),{state:C,setTouched:w,setDirty:T,validityData:E,setFilled:D,setFocused:O,validationMode:k,disabled:A,name:N,validation:P}=Wu(),{labelId:F}=Yu(),I=A||m,R=N??l,z=_.useRef(null),B=ee(z,c,P.inputRef),V=_.useRef(null),H=He(),U=Xu({id:s}),W=u?void 0:U,[G,K]=v({controlled:n,default:!!i,name:`Switch`,state:`checked`});Gu(V,H,G,void 0,!I,l),M(()=>{D(G)},[G,D]),eu(G,()=>{S(R),T(G!==E.initialValue),P.change(G)});let{getButtonProps:q,buttonRef:J}=jn({disabled:I,native:u}),Y=yf(a,F,z,!u,W),te={id:u?U:H,role:`switch`,"aria-checked":G,"aria-readonly":f||void 0,"aria-required":p||void 0,"aria-labelledby":Y,onFocus(){I||O(!0)},onBlur(){let e=z.current;e&&!I&&(w(!0),O(!1),k===`onBlur`&&P.commit(e.checked))},onClick(e){if(f||I)return;e.preventDefault();let t=z.current;t&&An(t,e)}},ne={...P.getValidationProps(I),checked:G,disabled:I,form:o,id:W,name:R,required:p,style:R?Wa:Ua,tabIndex:-1,type:`checkbox`,"aria-hidden":!0,ref:B,onChange(e){if(e.nativeEvent.defaultPrevented)return;if(f){e.preventDefault();return}let t=e.currentTarget.checked,n=Z(Ue,e.nativeEvent);d?.(t,n),!n.isCanceled&&K(t)},onClick(e){e.stopPropagation()},onFocus(){V.current?.focus()},...y===void 0?j:{value:y}},re=_.useMemo(()=>({...C,checked:G,disabled:I,readOnly:f,required:p}),[C,G,I,f,p]),ie=X(`span`,e,{state:re,ref:[t,V,J],props:[te,x,q,e=>P.getValidationProps(I,e)],stateAttributesMapping:Fy});return(0,L.jsxs)(Py.Provider,{value:re,children:[ie,!G&&R&&g!==void 0&&(0,L.jsx)(`input`,{type:`hidden`,form:o,name:R,value:g,disabled:I}),(0,L.jsx)(`input`,{...ne,suppressHydrationWarning:!0})]})});process.env.NODE_ENV!==`production`&&(Iy.displayName=`SwitchRoot`);var Ly=_.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e;return X(`span`,e,{state:$oe(),ref:t,stateAttributesMapping:Fy,props:a})});process.env.NODE_ENV!==`production`&&(Ly.displayName=`SwitchThumb`);var Ry=_.createContext(void 0);process.env.NODE_ENV!==`production`&&(Ry.displayName=`TabsRootContext`);function zy(){let e=_.useContext(Ry);if(e===void 0)throw Error(process.env.NODE_ENV===`production`?K(64):`Base UI: TabsRootContext is missing. Tabs parts must be placed within <Tabs.Root>.`);return e}var nse=`data-activation-direction`,By={tabActivationDirection:e=>({[nse]:e})},Vy=_.forwardRef(function(e,t){let{className:n,defaultValue:r=0,onValueChange:i,orientation:a=`horizontal`,render:o,value:s,style:c,...l}=e,u=e.defaultValue!==void 0,d=_.useRef([]),[f,p]=_.useState(()=>new Map),[m,h]=v({controlled:s,default:r,name:`Tabs`,state:`value`}),g=s!==void 0,[y,b]=_.useState(()=>new Map),x=_.useRef(void 0),S=_.useCallback(e=>Hy(y,e),[y]),[C,w]=_.useState(()=>({previousValue:m,tabActivationDirection:`none`})),{previousValue:E,tabActivationDirection:D}=C,O=D,k=!1;E!==m&&(O=Uy(E,m,a,y),k=E!=null&&m!=null&&S(m)==null);let A=k?E:m,j=E!==A||D!==O;M(()=>{j&&w({previousValue:A,tabActivationDirection:O})},[A,j,O]);let N=T((e,t)=>{t.activationDirection=Uy(m,e,a,y),i?.(e,t),!t.isCanceled&&h(e)}),P=T((e,t)=>{i?.(e,Z(t,void 0,void 0,{activationDirection:`none`}))}),F=T((e,t)=>(p(n=>{let r=new Map(n);return r.set(e,t),r}),()=>{p(n=>{if(n.get(e)!==t)return n;let r=new Map(n);return r.delete(e),r})})),I=_.useCallback(e=>f.get(e),[f]),z=_.useCallback(e=>{for(let t of y.values())if(e===t.value)return t.id},[y]),B=_.useMemo(()=>({getTabElementBySelectedValue:S,getTabIdByPanelValue:z,getTabPanelIdByValue:I,onValueChange:N,orientation:a,registerMountedTabPanel:F,setTabMap:b,tabActivationDirection:O,value:m}),[S,z,I,N,a,F,b,O,m]),V=_.useMemo(()=>{for(let e of y.values())if(e.value===m)return e},[y,m]),H=_.useMemo(()=>{for(let e of y.values())if(!e.disabled)return e.value},[y]),U=_.useRef(!u),W=_.useRef(r),G=_.useRef(u),K=_.useRef(!1);M(()=>{if(g)return;function e(e,t){h(e),w({previousValue:e,tabActivationDirection:`none`}),P(e,t),U.current=!1}if(y.size===0){K.current&&m!==null&&!x.current?.isConnected&&e(null,vt);return}K.current=!0,x.current=y.keys().next().value;let t=V?.disabled,n=V==null&&m!==null;if(!t&&m===W.current&&(G.current=!1),G.current&&t&&m===W.current)return;let r=U.current;if(t||n){let n=H??null;if(m===n){U.current=!1;return}let i=vt;r?i=yt:t&&(i=_t),e(n,i);return}r&&V!=null&&(P(m,yt),U.current=!1)},[H,g,P,V,h,y,m]);let q=X(`div`,e,{state:{orientation:a,tabActivationDirection:O},ref:t,props:l,stateAttributesMapping:By});return(0,L.jsx)(Ry.Provider,{value:B,children:(0,L.jsx)(R,{elementsRef:d,children:q})})});process.env.NODE_ENV!==`production`&&(Vy.displayName=`TabsRoot`);function Hy(e,t){for(let[n,r]of e.entries())if(t===r.value)return n;return null}function Uy(e,t,n,r){if(e==null||t==null)return`none`;let[i,a,o]=n===`horizontal`?[`left`,`left`,`right`]:[`top`,`up`,`down`],s=Hy(r,e),c=Hy(r,t);if(s==null||c==null)return s!==c&&(typeof e==`number`||typeof e==`string`)&&typeof e==typeof t?t>e?o:a:`none`;let l=s.getBoundingClientRect()[i],u=c.getBoundingClientRect()[i];return u<l?a:u>l?o:`none`}var Wy=_.createContext(void 0);process.env.NODE_ENV!==`production`&&(Wy.displayName=`TabsListContext`);function Gy(){let e=_.useContext(Wy);if(e===void 0)throw Error(process.env.NODE_ENV===`production`?K(65):`Base UI: TabsListContext is missing. TabsList parts must be placed within <Tabs.List>.`);return e}var Ky=_.forwardRef(function(e,t){let{className:n,disabled:r=!1,render:i,value:a,id:o,nativeButton:s=!0,style:c,...l}=e,{value:u,getTabPanelIdByValue:d,onValueChange:f,orientation:p,tabActivationDirection:m}=zy(),{activateOnFocus:h,registerTabResizeObserverElement:g,tabsListElement:v}=Gy(),{highlightedIndex:y,onHighlightedIndexChange:b}=Dn(),x=He(o),{compositeProps:S,compositeRef:C,index:w}=kp({metadata:_.useMemo(()=>({disabled:r,id:x,value:a}),[r,x,a])}),E=a===u,D=_.useRef(!1),O=_.useRef(null),k=T(e=>{O.current?.(),O.current=e?g(e):null});M(()=>{if(D.current){D.current=!1;return}if(!(E&&w>-1&&y!==w))return;let e=v;if(e!=null){let t=ya(kn(e));if(t&&ba(e,t))return}r||b(w)},[E,w,y,b,r,v]);let{getButtonProps:A,buttonRef:j}=jn({disabled:r,native:s,focusableWhenDisabled:!0}),N=d(a),P=_.useRef(!1),F=_.useRef(!1);function I(e){f(a,Z(Ue,e.nativeEvent,void 0,{activationDirection:`none`}))}function L(e){E||r||I(e)}function R(e){E||r||h&&(!P.current||F.current)&&I(e)}function z(e){if(E||r)return;P.current=!0,F.current=e.button===0;let t=kn(e.currentTarget);function n(){P.current=!1,F.current=!1,t.removeEventListener(`pointerup`,n),t.removeEventListener(`pointercancel`,n)}t.addEventListener(`pointerup`,n),t.addEventListener(`pointercancel`,n)}return X(`button`,e,{state:{disabled:r,active:E,orientation:p,tabActivationDirection:m},ref:[t,j,C,k],props:[S,{role:`tab`,"aria-controls":N,"aria-selected":E,id:x,onClick:L,onFocus:R,onPointerDown:z,[ng]:E?``:void 0,onKeyDownCapture(){D.current=!0}},l,A],stateAttributesMapping:By})});process.env.NODE_ENV!==`production`&&(Ky.displayName=`TabsTab`);var rse=`--active-tab-left`,ise=`--active-tab-right`,ase=`--active-tab-top`,ose=`--active-tab-bottom`,sse=`--active-tab-width`,cse=`--active-tab-height`,lse,use={...By,activeTabPosition:()=>null,activeTabSize:()=>null},qy=2,Jy=_.forwardRef(function(e,t){let{className:n,render:r,renderBeforeHydration:i=!1,style:a,...o}=e,{getTabElementBySelectedValue:s,orientation:c,tabActivationDirection:l,value:u}=zy(),{tabsListElement:d,registerIndicatorUpdateListener:f}=Gy(),p=Oc();_.useEffect(()=>f(p),[f,p]);let m=0,h=0,g=0,v=0,y=0,b=0,x=!1;if(u!=null&&d!=null){let e=s(u);if(e!=null){x=!0;let{width:t,height:n}=Rp(e),{width:r,height:i}=Rp(d),a=e.getBoundingClientRect(),o=d.getBoundingClientRect(),s=r>0?o.width/r:1,c=i>0?o.height/i:1,l=dse(e,d);m=l.left,g=l.top;let u=(a.left-o.left)/s+d.scrollLeft-d.clientLeft,f=(a.top-o.top)/c+d.scrollTop-d.clientTop,p=fse(e);Math.abs(u-p.x-m)<=qy&&Math.abs(f-p.y-g)<=qy&&(m=u,g=f),y=t,b=n,h=d.scrollWidth-m-y,v=d.scrollHeight-g-b}}let S=x?{left:m,right:h,top:g,bottom:v}:null,C=x?{width:y,height:b}:null,w=x?{[rse]:`${m}px`,[ise]:`${h}px`,[ase]:`${g}px`,[ose]:`${v}px`,[sse]:`${y}px`,[cse]:`${b}px`}:void 0,T=X(`span`,e,{state:{orientation:c,activeTabPosition:S,activeTabSize:C,tabActivationDirection:l},ref:t,props:[{role:`presentation`,style:w,hidden:!(x&&y>0&&b>0)},o,{suppressHydrationWarning:!0}],stateAttributesMapping:use});return u==null?null:(0,L.jsxs)(_.Fragment,{children:[T,i&&(lse||=(0,L.jsx)(jy,{script:``}))]})});process.env.NODE_ENV!==`production`&&(Jy.displayName=`TabsIndicator`);function dse(e,t){let n=Yy(e),r=Yy(t),i=n.left-r.left-t.clientLeft,a=n.top-r.top-t.clientTop,o=Sn(e);for(;sn(o)&&o!==t&&!yn(o);)i-=o.scrollLeft,a-=o.scrollTop,o=Sn(o);return{left:i,top:a}}function Yy(e){let t=0,n=0,r=e;for(;r!=null;){t+=r.offsetLeft,n+=r.offsetTop;let e=r.offsetParent;e!=null&&(t+=e.clientLeft,n+=e.clientTop),r=e}return{left:t,top:n}}function fse(e){let t=nn(e).getComputedStyle(e),{x:n,y:r}=sh(e,t),i=n,a=r,{translate:o}=t;if(o&&o!==`none`){let t=o.split(` `);i+=Xy(t[0],e.offsetWidth),a+=Xy(t[1],e.offsetHeight)}return{x:i,y:a}}function Xy(e,t){if(!e)return 0;let n=parseFloat(e);return Number.isFinite(n)?e.endsWith(`%`)?n/100*t:n:0}var pse=`data-index`,mse={...By,...Vt},Zy=_.forwardRef(function(e,t){let{className:n,value:r,render:i,keepMounted:a=!1,style:o,...s}=e,{value:c,getTabIdByPanelValue:l,orientation:u,tabActivationDirection:d,registerMountedTabPanel:f}=zy(),p=He(),{ref:m,index:h}=Pt(),g=r===c,{mounted:v,transitionStatus:y,setMounted:b}=At(g),x=!v,S=l(r),C={hidden:x,orientation:u,tabActivationDirection:d,transitionStatus:y},w=_.useRef(null),T=X(`div`,e,{state:C,ref:[t,m,w],props:[{"aria-labelledby":S,hidden:x,id:p,role:`tabpanel`,tabIndex:g?0:-1,inert:Xl(!g),[pse]:h},s],stateAttributesMapping:mse});return Vn({open:g,ref:w,onComplete(){g||b(!1)}}),M(()=>{if(!(p==null||x&&!a))return f(r,p)},[x,a,r,p,f]),a||v?T:null});process.env.NODE_ENV!==`production`&&(Zy.displayName=`TabsPanel`);var Qy=_.forwardRef(function(e,t){let{activateOnFocus:n=!1,className:r,loopFocus:i=!0,render:a,style:o,...s}=e,{orientation:c,setTabMap:l,tabActivationDirection:u}=zy(),[d,f]=_.useState(0),[p,m]=_.useState(null),h=_.useRef(new Set),g=_.useRef(new Set),v=_.useRef(null);M(()=>{if(typeof ResizeObserver>`u`)return;let e=new ResizeObserver(()=>{h.current.forEach(e=>{e()})});return v.current=e,p&&e.observe(p),g.current.forEach(t=>{e.observe(t)}),()=>{e.disconnect(),v.current=null}},[p]);let y=T(e=>(h.current.add(e),()=>{h.current.delete(e)})),b=T(e=>(g.current.add(e),v.current?.observe(e),()=>{g.current.delete(e),v.current?.unobserve(e)})),x={orientation:c,tabActivationDirection:u},S={"aria-orientation":c===`vertical`?`vertical`:void 0,role:`tablist`},C=_.useMemo(()=>({activateOnFocus:n,registerIndicatorUpdateListener:y,registerTabResizeObserverElement:b,tabsListElement:p}),[n,y,b,p]);return(0,L.jsx)(Wy.Provider,{value:C,children:(0,L.jsx)(rg,{render:a,className:r,style:o,state:x,refs:[t,m],props:[S,s],stateAttributesMapping:By,highlightedIndex:d,enableHomeAndEndKeys:!0,loopFocus:i,orientation:c,onHighlightedIndexChange:f,onMapChange:l,disabledIndices:A})})});process.env.NODE_ENV!==`production`&&(Qy.displayName=`TabsList`);var $y=_.createContext(void 0);process.env.NODE_ENV!==`production`&&($y.displayName=`ToastContext`);function eb(){let e=_.useContext($y);if(!e)throw Error(process.env.NODE_ENV===`production`?K(73):`Base UI: useToastManager must be used within <Toast.Provider>.`);return e}var tb=0;function nb(e){return tb+=1,`${e}-${Math.random().toString(36).slice(2,6)}-${tb}`}function rb(e,t){if(typeof e==`string`)return{description:e};if(typeof e==`function`){let n=e(t);return typeof n==`string`?{description:n}:n}return e}function ib(e){let t=new Map,n=0,r=0;return e.forEach((e,i)=>{let a=e.transitionStatus===`ending`;t.set(e.id,{value:e,domIndex:i,visibleIndex:a?-1:n,offsetY:r}),r+=e.height||0,a||(n+=1)}),t}function ab(e,t){let n=0;return e.map(e=>{if(e.transitionStatus===`ending`)return e;let r=n>=t;return n+=1,e.limited===r?e:{...e,limited:r}})}var ob={toasts:e=>e.toasts,isEmpty:e=>e.toasts.length===0,toast:(e,t)=>e.toastMetadata.get(t)?.value,toastIndex:(e,t)=>e.toastMetadata.get(t)?.domIndex??-1,toastOffsetY:(e,t)=>e.toastMetadata.get(t)?.offsetY??0,toastVisibleIndex:(e,t)=>e.toastMetadata.get(t)?.visibleIndex??-1,focused:e=>e.focused,expanded:e=>e.hovering||e.focused,expandedOrOutOfFocus:e=>e.hovering||e.focused||!e.isWindowFocused,prevFocusElement:e=>e.prevFocusElement},hse=class extends Dc{timers=new Map;areTimersPaused=!1;constructor(e){super({...e,toastMetadata:ib(e.toasts)},{},ob)}setViewport=e=>{this.set(`viewport`,e)};syncProviderProps(e,t){let n=this.state.limit!==t;if(this.state.timeout===e&&!n)return;let r={timeout:e,limit:t};if(n){let e=ab(this.state.toasts,t);r.toasts=e,r.toastMetadata=ib(e)}this.update(r)}disposeEffect=()=>()=>{this.timers.forEach(e=>{e.timeout?.clear()}),this.timers.clear()};removeToast(e,t=!1){let n=ob.toastIndex(this.state,e);if(n===-1)return;let r=this.state.toasts[n];t||r?.onRemove?.();let i=[...this.state.toasts];i.splice(n,1),this.setToasts(i)}addToast=e=>{let{timeout:t,limit:n}=this.state,r=e.id||nb(`toast`);if(e.id){let t=ob.toast(this.state,e.id);if(t){if(t.transitionStatus===`ending`)this.removeToast(e.id,!0);else{let{id:t,transitionStatus:n,...r}=e;return this.updateToastInternal(e.id,r,!0,!0),e.id}}}let i={...e,id:r,updateKey:0,transitionStatus:`starting`},a=[i,...this.state.toasts];this.setToasts(ab(a,n));let o=i.timeout??t;return i.type!==`loading`&&o>0&&this.scheduleTimer(r,o,()=>this.closeToast(r)),ob.expandedOrOutOfFocus(this.state)&&this.pauseTimers(),r};updateToast=(e,t)=>{let n=ob.toast(this.state,e);n&&n.transitionStatus!==`ending`&&this.updateToastInternal(e,typeof t==`function`?t(n):t,!1,!0)};updateToastInternal=(e,t,n=!1,r=!1)=>{let{timeout:i,toasts:a}=this.state,o=ob.toast(this.state,e);if(!o||o.transitionStatus===`ending`)return;let s={...o,...t,...r&&{updateKey:o.updateKey+1}};this.setToasts(a.map(t=>t.id===e?s:t));let c=s.timeout??i,l=o.timeout??i,u=Object.hasOwn(t,`timeout`),d=s.transitionStatus!==`ending`&&s.type!==`loading`&&c>0,f=this.timers.has(e),p=l!==c,m=o.type===`loading`;if(!d&&f){this.clearTimer(e);return}d&&(!f||p||u||m||n)&&(this.clearTimer(e),this.scheduleTimer(e,c,()=>this.closeToast(e)),ob.expandedOrOutOfFocus(this.state)&&this.pauseTimers())};closeToast=e=>{let t=e===void 0,{limit:n,toasts:r}=this.state,i;if(t)i=r,this.clearTimers();else{let t=ob.toast(this.state,e);if(!t)return;i=[t],this.clearTimer(e)}let a=ab(r.map(n=>t||n.id===e?{...n,transitionStatus:`ending`,height:0}:n),n);this.setToasts(a,!a.some(e=>e.transitionStatus!==`ending`)),i.forEach(e=>{e.transitionStatus!==`ending`&&e.onClose?.()}),this.handleFocusManagement(e)};promiseToast=(e,t)=>{let n=rb(t.loading),r=this.addToast({...n,type:`loading`}),i=e.then(e=>{let n=rb(t.success,e);return this.updateToast(r,{...n,type:`success`,timeout:n.timeout}),e}).catch(e=>{let n=rb(t.error,e);return this.updateToast(r,{...n,type:`error`,timeout:n.timeout}),Promise.reject(e)});return{}.hasOwnProperty.call(t,`setPromise`)&&t.setPromise(i),i};pauseTimers(){this.areTimersPaused||(this.areTimersPaused=!0,this.timers.forEach(e=>{e.timeout&&(e.timeout.clear(),e.remaining=Math.max(e.remaining-(Date.now()-e.start),0))}))}resumeTimers(){this.areTimersPaused&&(this.areTimersPaused=!1,this.timers.forEach((e,t)=>{e.remaining=e.remaining>0?e.remaining:e.delay,e.timeout??=aa.create(),e.timeout.start(e.remaining,()=>{this.handleTimerFired(t),e.callback()}),e.start=Date.now()}))}restoreFocusToPrevElement(){this.state.prevFocusElement?.focus({preventScroll:!0})}handleDocumentPointerDown=e=>{if(e.pointerType!==`touch`)return;let t=xa(e);ba(this.state.viewport,t)||(this.resumeTimers(),this.update({hovering:!1,focused:!1}))};scheduleTimer(e,t,n){let r=Date.now(),i=ob.expandedOrOutOfFocus(this.state)?void 0:aa.create();i?.start(t,()=>{this.handleTimerFired(e),n()}),this.timers.set(e,{timeout:i,start:r,delay:t,remaining:t,callback:n})}clearTimers(){this.timers.forEach(e=>{e.timeout?.clear()}),this.timers.clear(),this.areTimersPaused=!1}clearTimer(e){this.timers.get(e)?.timeout?.clear(),this.timers.delete(e),this.resetPausedStateIfNoTimersRemain()}handleTimerFired(e){this.timers.delete(e),this.resetPausedStateIfNoTimersRemain()}resetPausedStateIfNoTimersRemain(){this.timers.size===0&&(this.areTimersPaused=!1)}setToasts(e,t=e.length===0){let n={toasts:e,toastMetadata:ib(e)};t&&(n.hovering=!1,n.focused=!1),this.update(n)}handleFocusManagement(e){let t=ya(kn(this.state.viewport));if(!this.state.viewport||!ba(this.state.viewport,t)||!Fa(t))return;if(e===void 0){this.restoreFocusToPrevElement();return}let n=ob.toasts(this.state),r=ob.toastIndex(this.state,e),i=(e,t)=>{for(let r=e;r>=0&&r<n.length;r+=t)if(n[r].transitionStatus!==`ending`)return n[r];return null},a=i(r+1,1)??i(r-1,-1);a?a.ref?.current?.focus():this.restoreFocusToPrevElement()}},sb=function(e){let{children:t,timeout:n=5e3,limit:r=3,toastManager:i}=e,a=S(()=>new hse({timeout:n,limit:r,viewport:null,toasts:[],hovering:!1,focused:!1,isWindowFocused:!0,prevFocusElement:null})).current;return wt(a.disposeEffect),_.useEffect(function(){if(i)return i[` subscribe`](({action:e,options:t})=>{let n=t.id;e===`promise`&&t.promise?a.promiseToast(t.promise,t):e===`update`&&n?a.updateToast(n,t.updates):e===`close`?a.closeToast(n):a.addToast(t)})},[a,i]),(0,L.jsxs)($y.Provider,{value:a,children:[(0,L.jsx)(gse,{store:a,timeout:n,limit:r}),t]})};process.env.NODE_ENV!==`production`&&(sb.displayName=`ToastProvider`);function gse(e){let{store:t,timeout:n,limit:r}=e;return M(()=>{t.syncProviderProps(n,r)},[t,n,r]),null}var _se=`--toast-frontmost-height`,cb=_.forwardRef(function(e,t){let{render:n,className:r,style:i,children:a,...o}=e,s=eb(),c=oa(),l=_.useRef(!1),u=_.useRef(!1),d=_.useRef(!1),f=s.useState(`isEmpty`),p=s.useState(`toasts`),m=s.useState(`focused`),h=s.useState(`expanded`),g=s.useState(`prevFocusElement`),v=p[0]?.height,y=p.some(e=>e.transitionStatus===`ending`),b=p.filter(e=>e.priority===`high`);_.useEffect(()=>{let e=s.state.viewport;if(!e||f)return;let t=nn(e),n=kn(e);function r(t){t.key===`F6`&&xa(t)!==e&&(t.preventDefault(),s.set(`prevFocusElement`,ya(n)),e?.focus({preventScroll:!0}),s.pauseTimers(),s.set(`focused`,!0))}function i(e){xa(e)===t&&(s.set(`isWindowFocused`,!1),s.pauseTimers())}function a(n){if(n.relatedTarget)return;let r=xa(n),i=ya(kn(e));(r===t||!ba(e,r)||!Fa(i))&&s.resumeTimers(),c.start(0,()=>s.set(`isWindowFocused`,!0))}return Va(Pn(t,`keydown`,r),Pn(t,`blur`,i,!0),Pn(t,`focus`,a,!0),Pn(n,`pointerdown`,s.handleDocumentPointerDown,!0))},[s,c,f]);function x(e){l.current=!0;let t=e.relatedTarget===s.state.viewport?p.find(e=>e.transitionStatus!==`ending`&&!e.limited):void 0;t?t.ref?.current?.focus():s.restoreFocusToPrevElement()}function S(e){e.key===`Tab`&&e.shiftKey&&xa(e.nativeEvent)===s.state.viewport&&(e.preventDefault(),s.restoreFocusToPrevElement())}function C(){s.state.toasts.some(e=>e.transitionStatus===`ending`)||d.current||!u.current||(s.state.isWindowFocused&&s.resumeTimers(),s.set(`hovering`,!1),u.current=!1)}_.useEffect(C,[y,s]);function w(){s.pauseTimers(),s.set(`hovering`,!0),u.current=!1}function T(){s.state.isWindowFocused&&s.resumeTimers()}function E(){u.current=!0,C()}function D(e){e.pointerType===`touch`&&(d.current=!0)}function O(e){e.pointerType===`touch`&&(d.current=!1,C())}function k(){if(l.current){l.current=!1;return}m||Fa(ya(kn(s.state.viewport)))&&(s.set(`focused`,!0),s.pauseTimers())}function A(e){m&&!ba(s.state.viewport,e.relatedTarget)&&(s.set(`focused`,!1),T())}let j={tabIndex:-1,role:`region`,"aria-live":`polite`,"aria-atomic":!1,"aria-relevant":`additions text`,"aria-label":`Notifications`,onMouseEnter:w,onMouseMove:w,onMouseLeave:E,onFocus:k,onBlur:A,onKeyDown:S,onClick:k,onPointerDown:D,onPointerUp:O,onPointerCancel:O,style:{[_se]:v?`${v}px`:void 0}},M={expanded:h},N=!f&&g&&(0,L.jsx)(Ga,{onFocus:x}),P=X(`div`,e,{ref:[t,s.setViewport],state:M,props:[j,o,{children:(0,L.jsxs)(_.Fragment,{children:[N,a,N]})}]});return(0,L.jsxs)(_.Fragment,{children:[N,P,!m&&b.length>0&&(0,L.jsx)(`div`,{style:Ua,children:b.map(e=>(0,L.jsxs)(`div`,{role:`alert`,"aria-atomic":!0,children:[(0,L.jsx)(`div`,{children:e.title}),(0,L.jsx)(`div`,{children:e.description})]},e.id))})]})});process.env.NODE_ENV!==`production`&&(cb.displayName=`ToastViewport`);var lb=_.createContext(void 0);process.env.NODE_ENV!==`production`&&(lb.displayName=`ToastRootContext`);function ub(){let e=_.useContext(lb);if(!e)throw Error(process.env.NODE_ENV===`production`?K(66):`Base UI: ToastRootContext is missing. Toast parts must be used within <Toast.Root>.`);return e}var db=`--toast-index`,vse=`--toast-offset-y`,yse=`--toast-height`,bse=`--toast-swipe-movement-x`,xse=`--toast-swipe-movement-y`,Sse=`data-swipe-direction`,Cse={...Vt,swipeDirection(e){return e?{[Sse]:e}:null}},fb=40,wse=10,pb=.5,Tse=1,Ese=`${gs},${ane}`,mb=_.forwardRef(function(e,t){let{toast:n,render:r,className:i,swipeDirection:a=[`down`,`right`],style:o,...s}=e,c=n.positionerProps?.anchor!==void 0,l=[];c||(l=Array.isArray(a)?a:[a]);let u=l.length>0,d=eb(),[f,p]=_.useState(void 0),[m,h]=_.useState(!1),[g,v]=_.useState(!1),[y,b]=_.useState({x:0,y:0}),[x,S]=_.useState({x:0,y:0,scale:1}),[C,w]=_.useState(),[E,D]=_.useState(),[O,k]=_.useState(null),A=_.useRef(null),j=_.useRef(void 0),N=_.useRef({x:0,y:0}),P=_.useRef({x:0,y:0,scale:1}),F=_.useRef(void 0),I=_.useRef(0),R=_.useRef(!1),z=_.useRef({x:0,y:0}),B=_.useRef(!1),V=_.useRef({x:0,y:0}),H=_.useRef(null),U=_.useRef(null),W=d.useState(`toastIndex`,n.id),G=d.useState(`toastVisibleIndex`,n.id),K=d.useState(`toastOffsetY`,n.id),q=d.useState(`focused`),J=d.useState(`expanded`);Vn({open:n.transitionStatus!==`ending`,ref:A,onComplete(){n.transitionStatus===`ending`&&d.removeToast(n.id)}});let ee=T((e=!1)=>{let t=A.current;if(!t)return;let r=t.style.height;t.style.height=`auto`;let i=t.offsetHeight;t.style.height=r;function a(){d.updateToastInternal(n.id,{ref:A,height:i,transitionStatus:void 0})}e?Rn.flushSync(a):a()});M(()=>{let e=j.current;(n.transitionStatus===`starting`||e!==n.id)&&(e!==void 0&&(p(void 0),S({x:0,y:0,scale:1}),Y({x:0,y:0})),j.current=n.id,ee())},[ee,n.id,n.transitionStatus]);function Y(e){V.current=e,b(e)}M(()=>()=>{U.current?.abort()},[]);function te(e,t){let n=e=>e>0?e**pb:-(Math.abs(e)**pb),r=e>0&&!l.includes(`right`)||e<0&&!l.includes(`left`),i=t>0&&!l.includes(`down`)||t<0&&!l.includes(`up`);return{x:r?n(e):e,y:i?n(t):t}}let ne=T(e=>{if(e.pointerId!==H.current)return;H.current=null,U.current?.abort(),U.current=null,h(!1),v(!1),k(null);let t=P.current;if(e.type===`pointercancel`||R.current){Y({x:t.x,y:t.y}),p(void 0);return}let r=V.current,i=r.x-t.x,a=r.y-t.y,o;for(let e of l)if(hh(e,i,a)>fb){o=e;break}o?(p(o),d.closeToast(n.id)):(Y({x:t.x,y:t.y}),p(void 0))});function re(e){if(e.button!==0||(e.pointerType===`touch`&&d.pauseTimers(),xa(e.nativeEvent)?.closest(`button,a,input,textarea,[role="button"],${Ese}`)))return;R.current=!1,F.current=void 0,I.current=0,H.current=e.pointerId,N.current={x:e.clientX,y:e.clientY},z.current=N.current;let t=e.currentTarget,n=sh(t);P.current=n,S(n),Y({x:n.x,y:n.y}),d.set(`hovering`,!0),h(!0),v(!1),k(null),B.current=!0,U.current?.abort();let r=new AbortController;U.current=r;let i=kn(t);i.addEventListener(`pointerup`,ne,{signal:r.signal}),i.addEventListener(`pointercancel`,ne,{signal:r.signal}),t.setPointerCapture?.(e.pointerId)}function ie(e){if(e.pointerId!==H.current)return;e.preventDefault(),B.current&&=(N.current={x:e.clientX,y:e.clientY},!1);let{clientY:t,clientX:n,movementX:r,movementY:i}=e;(i<0&&t>z.current.y||i>0&&t<z.current.y)&&(z.current={x:z.current.x,y:t}),(r<0&&n>z.current.x||r>0&&n<z.current.x)&&(z.current={x:n,y:z.current.y});let a=n-N.current.x,o=t-N.current.y,s=t-z.current.y,c=n-z.current.x,u=O;if(!g&&Math.sqrt(a*a+o*o)>=Tse){v(!0);let e=l.includes(`left`)||l.includes(`right`),t=l.includes(`up`)||l.includes(`down`);e&&t&&(u=Math.abs(a)>Math.abs(o)?`horizontal`:`vertical`,k(u))}let d;if(!F.current)u===`vertical`?o>0?d=`down`:o<0&&(d=`up`):u===`horizontal`?a>0?d=`right`:a<0&&(d=`left`):d=Math.abs(a)>=Math.abs(o)?a>0?`right`:`left`:o>0?`down`:`up`,d&&l.includes(d)&&(F.current=d,I.current=hh(d,a,o),p(d));else{let e=F.current,t=hh(e,c,s);t>fb?(R.current=!1,p(e)):!(l.includes(`left`)&&l.includes(`right`))&&!(l.includes(`up`)&&l.includes(`down`))&&I.current-t>=wse&&(R.current=!0)}let f=te(a,o),m=P.current.x,h=P.current.y,_=l.includes(`left`)||l.includes(`right`),y=l.includes(`up`)||l.includes(`down`);u!==`vertical`&&_&&(m+=f.x),u!==`horizontal`&&y&&(h+=f.y),Y({x:m,y:h})}function ae(e){if(e.key===`Escape`){if(!A.current||!ba(A.current,ya(kn(A.current))))return;d.closeToast(n.id)}}_.useEffect(()=>{let e=A.current;if(!u||!e)return;function t(t){H.current!==null&&ba(e,xa(t))&&t.preventDefault()}return Pn(e,`touchmove`,t,{passive:!1})},[u]);function oe(){let e=y.x-x.x,t=y.y-x.y;return{transition:m?`none`:void 0,transform:m?`translateX(${y.x}px) translateY(${y.y}px) scale(${x.scale})`:void 0,[bse]:`${e}px`,[xse]:`${t}px`}}let se=n.priority===`high`,ce={role:se?`alertdialog`:`dialog`,tabIndex:0,"aria-modal":!1,"aria-labelledby":C,"aria-describedby":E,"aria-hidden":se&&!q?!0:void 0,onPointerDown:u?re:void 0,onPointerMove:u?ie:void 0,onPointerUp:u?ne:void 0,onPointerCancel:u?ne:void 0,onKeyDown:ae,inert:Xl(n.limited),style:{...oe(),[db]:n.transitionStatus===`ending`?W:G,[vse]:`${K}px`,[yse]:n.height?`${n.height}px`:void 0}},le=_.useMemo(()=>({toast:n,setTitleId:w,setDescriptionId:D,recalculateHeight:ee,visibleIndex:G,expanded:J}),[n,w,D,ee,G,J]),ue={transitionStatus:n.transitionStatus,expanded:J,limited:n.limited||!1,type:n.type,swiping:m,swipeDirection:f},de=X(`div`,e,{ref:[t,A],state:ue,stateAttributesMapping:Cse,props:[ce,s]});return(0,L.jsx)(lb.Provider,{value:le,children:de})});process.env.NODE_ENV!==`production`&&(mb.displayName=`ToastRoot`);var hb=_.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{visibleIndex:o,expanded:s,recalculateHeight:c}=ub(),l=_.useRef(null);return M(()=>{c();let e=l.current;if(!e||typeof ResizeObserver!=`function`||typeof MutationObserver!=`function`)return;let t=new ResizeObserver(()=>c(!0)),n=new MutationObserver(()=>c(!0));return t.observe(e),n.observe(e,{childList:!0,subtree:!0,characterData:!0}),()=>{t.disconnect(),n.disconnect()}},[c]),X(`div`,e,{ref:[t,l],state:{expanded:s,behind:o>0},props:a})});process.env.NODE_ENV!==`production`&&(hb.displayName=`ToastContent`);function gb(e){return e==null||typeof e==`boolean`||e===``?!1:!Array.isArray(e)||e.some(gb)}function _b(e){return _.isValidElement(e)&&gb(e.props.children)}function vb(e,t,n){let{toast:r,setTitleId:i,setDescriptionId:a}=ub(),o=n===`title`?i:a,s=t??(n===`title`?r.title:r.description);return{id:Ve(e),children:s,type:r.type,setId:o}}function yb(e,t,n){let r=_b(e);return M(()=>{if(r)return n(t),()=>{n(e=>e===t?void 0:e)}},[r,t,n]),r?e:null}var bb=_.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,children:o,...s}=e,{id:c,children:l,type:u,setId:d}=vb(a,o,`description`);return yb(X(`p`,e,{ref:t,state:{type:u},props:{...s,id:c,children:l}}),c,d)});process.env.NODE_ENV!==`production`&&(bb.displayName=`ToastDescription`);var xb=_.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,children:o,...s}=e,{id:c,children:l,type:u,setId:d}=vb(a,o,`title`);return yb(X(`h2`,e,{ref:t,state:{type:u},props:{...s,id:c,children:l}}),c,d)});process.env.NODE_ENV!==`production`&&(xb.displayName=`ToastTitle`);var Sb=_.forwardRef(function(e,t){let{render:n,className:r,style:i,disabled:a,nativeButton:o=!0,...s}=e,c=eb(),{toast:l,expanded:u}=ub(),[d,f]=_.useState(!1),{getButtonProps:p,buttonRef:m}=jn({disabled:a,native:o}),h={type:l.type};return X(`button`,e,{ref:[t,m],state:h,props:[{"aria-hidden":!u&&!d,onClick(){c.closeToast(l.id)},onFocus(){f(!0)},onBlur(){f(!1)}},s,p]})});process.env.NODE_ENV!==`production`&&(Sb.displayName=`ToastClose`);var Cb=_.forwardRef(function(e,t){let{render:n,className:r,style:i,disabled:a,nativeButton:o=!0,...s}=e,{toast:c}=ub(),l=c.actionProps?.children??s.children,{getButtonProps:u,buttonRef:d}=jn({disabled:a,native:o}),f={type:c.type},p=X(`button`,e,{ref:[t,d],state:f,props:[s,c.actionProps,u,{children:l}]});return _b(p)?p:null});process.env.NODE_ENV!==`production`&&(Cb.displayName=`ToastAction`);var wb=_.forwardRef(function(e,t){return(0,L.jsx)(X_,{ref:t,...e})});process.env.NODE_ENV!==`production`&&(wb.displayName=`ToastPortal`);var Tb=_.createContext(void 0);process.env.NODE_ENV!==`production`&&(Tb.displayName=`ToastPositionerContext`);function Dse(){let e=_.useContext(Tb);if(e===void 0)throw Error(process.env.NODE_ENV===`production`?K(84):`Base UI: ToastPositionerContext is missing. ToastPositioner parts must be placed within <Toast.Positioner>.`);return e}var Eb=_.forwardRef(function(e,t){let{toast:n,...r}=e,i=eb(),a=n.positionerProps??j,{render:o,className:s,anchor:c=a.anchor,positionMethod:l=a.positionMethod??`absolute`,side:u=a.side??`top`,align:d=a.align??`center`,sideOffset:f=a.sideOffset??0,alignOffset:p=a.alignOffset??0,collisionBoundary:m=a.collisionBoundary??`clipping-ancestors`,collisionPadding:h=a.collisionPadding??5,arrowPadding:g=a.arrowPadding??5,sticky:v=a.sticky??!1,disableAnchorTracking:y=a.disableAnchorTracking??!1,collisionAvoidance:b=a.collisionAvoidance??vs,style:x,...S}=r,[C,w]=_.useState(null),T=i.useState(`toastIndex`,n.id),E=i.useState(`toastVisibleIndex`,n.id),D=on(c)?c:null,O=Ud({anchor:D,positionMethod:l,floatingRootContext:tl({open:!0,onOpenChange:k,elements:{floating:C,reference:D}}),mounted:!0,side:u,sideOffset:f,align:d,alignOffset:p,collisionBoundary:m,collisionPadding:h,sticky:v,arrowPadding:g,disableAnchorTracking:y,keepMounted:!0,collisionAvoidance:b}),A=qd(e,{side:O.side,align:O.align,anchorHidden:O.anchorHidden},{styles:{...O.positionerStyles,[db]:n.transitionStatus===`ending`?T:E},transitionStatus:n.transitionStatus,props:S,refs:[t,w]});return(0,L.jsx)(Tb.Provider,{value:O,children:A})});process.env.NODE_ENV!==`production`&&(Eb.displayName=`ToastPositioner`);var Db=_.forwardRef(function(e,t){let{className:n,render:r,style:i,...a}=e,{arrowRef:o,side:s,align:c,arrowUncentered:l,arrowStyles:u}=Dse();return X(`div`,e,{state:{side:s,align:c,uncentered:l},ref:[t,o],props:[{style:u,"aria-hidden":!0},a]})});process.env.NODE_ENV!==`production`&&(Db.displayName=`ToastArrow`);function Ose(){let e=eb(),t=e.useState(`toasts`);return _.useMemo(()=>({toasts:t,add:e.addToast,close:e.closeToast,update:e.updateToast,promise:e.promiseToast}),[t,e])}function kse(){let e=new Set;function t(t){e.forEach(e=>e(t))}return{" subscribe":function(t){return e.add(t),()=>{e.delete(t)}},add(e){let n=e.id||nb(`toast`);return t({action:`add`,options:{...e,id:n,transitionStatus:`starting`}}),n},close(e){t({action:`close`,options:{id:e}})},update(e,n){t({action:`update`,options:{id:e,updates:n}})},promise(e,n){let r=e;return t({action:`promise`,options:{...n,promise:e,setPromise(e){r=e}}}),r}}}var Ob=_.createContext(void 0);process.env.NODE_ENV!==`production`&&(Ob.displayName=`ToggleGroupContext`);function Ase(){return _.useContext(Ob)}var kb=_.forwardRef(function(e,t){let{className:n,defaultPressed:r=!1,disabled:i=!1,form:a,onPressedChange:o,pressed:s,render:c,type:l,value:u,nativeButton:d=!0,style:f,...p}=e,m=He(u||void 0),h=Ase(),y=h?.value??[],b=(i||h?.disabled)??!1;process.env.NODE_ENV!==`production`&&_.useEffect(()=>{h&&u===void 0&&h.isValueInitialized&&g("A `<Toggle>` component rendered in a `<ToggleGroup>` has no explicit `value` prop.",`This will cause issues between the Toggle Group and Toggle values.`,"Provide the `<Toggle>` with a `value` prop matching the `<ToggleGroup>` values prop type.")},[h,u,h?.isValueInitialized]);let[x,S]=v({controlled:h?m!==void 0&&y.indexOf(m)>-1:s,default:r,name:`Toggle`,state:`pressed`}),{getButtonProps:C,buttonRef:w}=jn({disabled:b,native:d}),T={disabled:b,pressed:x},E=[w,t],D=[{"aria-pressed":x,onClick(e){let t=!x,n=Z(Ue,e.nativeEvent);o?.(t,n),!n.isCanceled&&(m&&h?.setGroupValue?.(m,t,n),!n.isCanceled&&S(t))}},p,C],O=X(`button`,e,{enabled:!h,state:T,ref:E,props:D}),k=_.useMemo(()=>({disabled:b,focusableWhenDisabled:!1}),[b]);return h?(0,L.jsx)(Ap,{tag:`button`,render:c,className:n,style:f,metadata:k,state:T,refs:E,props:D}):O});process.env.NODE_ENV!==`production`&&(kb.displayName=`Toggle`);var Ab=_.createContext(void 0);process.env.NODE_ENV!==`production`&&(Ab.displayName=`ToolbarGroupContext`);function jse(){return _.useContext(Ab)}var jb=_.forwardRef(function(e,t){let{defaultValue:n,disabled:r=!1,loopFocus:i=!0,onValueChange:a,orientation:o=`horizontal`,multiple:s=!1,value:c,className:l,render:u,style:d,...f}=e,p=ap(!0),m=jse(),h=n??A,g=c!==void 0||n!==void 0,y=(p?.disabled??!1)||(m?.disabled??!1)||r,[b,x]=v({controlled:c,default:h,name:`ToggleGroup`,state:`value`}),S=T((e,t,n)=>{let r;s?(r=b.slice(),t?r.push(e):r.splice(b.indexOf(e),1)):r=t?[e]:[],a?.(r,n),!n.isCanceled&&x(r)}),C={disabled:y,multiple:s,orientation:o},w=_.useMemo(()=>({disabled:y,setGroupValue:S,value:b,isValueInitialized:g}),[y,S,b,g]),E={role:`group`},D=X(`div`,e,{enabled:!!p,state:C,ref:t,props:[E,f]});return(0,L.jsx)(Ob.Provider,{value:w,children:p?D:(0,L.jsx)(rg,{render:u,className:l,style:d,state:C,refs:[t],props:[E,f],loopFocus:i,enableHomeAndEndKeys:!0,orientation:o})})});process.env.NODE_ENV!==`production`&&(jb.displayName=`ToggleGroup`);var Mb=_.createContext(void 0);process.env.NODE_ENV!==`production`&&(Mb.displayName=`TooltipRootContext`);function Nb(e){let t=_.useContext(Mb);if(t===void 0&&!e)throw Error(process.env.NODE_ENV===`production`?K(72):`Base UI: TooltipRootContext is missing. Tooltip parts must be placed within <Tooltip.Root>.`);return t}var Mse={...$c,disabled:e=>e.disabled,instantType:e=>e.instantType,isInstantPhase:e=>e.isInstantPhase,trackCursorAxis:e=>e.trackCursorAxis,disableHoverablePopup:e=>e.disableHoverablePopup,lastOpenChangeReason:e=>e.openChangeReason,closeOnClick:e=>e.closeOnClick,closeDelay:e=>e.closeDelay,adaptiveOrigin:e=>e.adaptiveOrigin},Nse=class extends Dc{constructor(e,t,n){let r=new Kc;super(Pse(e,r,t,n),Fse(r),Mse)}setOpen=(e,t)=>{zc(this,e,t,{extraState:{openChangeReason:t.reason}})};cancelPendingOpen(e){this.state.floatingRootContext.dispatchOpenChange(!1,Z(We,e))}};function Pse(e,t,n,r=!1){return{...qc(t,n,r),disabled:!1,instantType:void 0,isInstantPhase:!1,trackCursorAxis:`none`,disableHoverablePopup:!1,openChangeReason:null,closeOnClick:!0,closeDelay:0,adaptiveOrigin:void 0,...e}}function Fse(e){return{popupRef:_.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:e}}var Pb=bc(function(e){let{disabled:t=!1,defaultOpen:n=!1,open:r,disableHoverablePopup:i=!1,trackCursorAxis:a=`none`,actionsRef:o,onOpenChange:s,onOpenChangeComplete:c,handle:l,triggerId:u,defaultTriggerId:d=null,children:f}=e,p=Nc((e,t)=>new Nse({open:n,openProp:r,activeTriggerId:d,triggerIdProp:u},e,t));p.useControlledProp(`openProp`,r),p.useControlledProp(`triggerIdProp`,u),p.useContextCallback(`onOpenChange`,s),p.useContextCallback(`onOpenChangeComplete`,c);let m=p.useState(`open`),h=!t&&m,g=p.useState(`activeTriggerId`),v=p.useState(`mounted`),y=p.useState(`payload`);p.useSyncedValues({trackCursorAxis:a,disableHoverablePopup:i,disabled:t}),Vc(p,{closeOnActiveTriggerUnmount:!0});let{forceUnmount:b,transitionStatus:x}=Hc(h,p),S=p.useState(`isInstantPhase`),C=p.useState(`instantType`),w=p.useState(`lastOpenChangeReason`),T=_.useRef(null);M(()=>{m&&t&&p.setOpen(!1,Z(_t))},[m,t,p]),M(()=>{x===`ending`&&w===`none`||x!==`ending`&&S?(C!==`delay`&&(T.current=C),p.set(`instantType`,`delay`)):T.current!==null&&(p.set(`instantType`,T.current),T.current=null)},[x,S,w,C,p]),M(()=>{h&&(g??p.set(`payload`,void 0))},[p,g,h]),_.useImperativeHandle(o,()=>({unmount:b,close:()=>p.setOpen(!1,Z(bt))}),[b,p]);let E=h||v||!t&&a!==`none`;return(0,L.jsxs)(Mb.Provider,{value:p,children:[l&&(0,L.jsx)(Pc,{handle:l,store:p}),E&&(0,L.jsx)(Ise,{store:p,disabled:t,trackCursorAxis:a}),typeof f==`function`?f({payload:y}):f]})});process.env.NODE_ENV!==`production`&&(Pb.displayName=`TooltipRoot`);function Ise({store:e,disabled:t,trackCursorAxis:n}){let r=e.useState(`floatingRootContext`),i=Vs(r,{enabled:!t,referencePress:()=>e.select(`closeOnClick`)}),a=dne(r,{enabled:!t&&n!==`none`,axis:n===`none`?void 0:n}),o=_.useMemo(()=>pe(a.reference,i.reference),[a.reference,i.reference]);return Uc(e,{activeTriggerProps:o,inactiveTriggerProps:o,popupProps:i.floating??j}),null}var Fb=_.createContext(void 0);process.env.NODE_ENV!==`production`&&(Fb.displayName=`TooltipProviderContext`);function Lse(){return _.useContext(Fb)}var Ib=`data-base-ui-tooltip-trigger`;function Lb(e){if(`composedPath`in e){let t=e.composedPath();for(let e=0;e<t.length;e+=1){let n=t[e];if(on(n))return n}}let t=e.target;return on(t)?t:null}function Rse(e){let t=e;for(;t;){let e=t.closest(`[${Ib}]`);if(e)return e;let n=t.getRootNode();t=`host`in n&&on(n.host)?n.host:null}return null}var Rb=xc(function(e,t){let{render:n,className:r,style:i,handle:a,payload:o,disabled:s,delay:c,closeOnClick:l=!0,closeDelay:u,id:d,...f}=e,p=Nb(!0),m=el(a)??p;if(!m)throw Error(process.env.NODE_ENV===`production`?K(82):`Base UI: <Tooltip.Trigger> must be either used within a <Tooltip.Root> component or provided with a handle.`);let h=He(d),g=m.useState(`isTriggerActive`,h),v=m.useState(`isOpenedByTrigger`,h),y=m.useState(`floatingRootContext`),b=_.useRef(null),x=u??0,{registerTrigger:S,isMountedByThisTrigger:C}=Bc(h,b,m,{payload:o,closeOnClick:l,closeDelay:x}),w=Lse(),{activeIdRef:T,delayRef:E,isInstantPhase:D,hasProvider:O}=$te(y,{open:v}),k=cl(y);m.useSyncedValue(`isInstantPhase`,D);let A=m.useState(`disabled`),j=s??A,M=Fn(j),N=m.useState(`trackCursorAxis`),P=m.useState(`disableHoverablePopup`),F=_.useRef(!1),I=oa(),L=_.useRef(void 0);function R(){return O&&T.current!=null?0:c??w??600}function z(e){let t=b.current;if(!t||!e)return!1;let n=Rse(e);return n!==null&&n!==t&&ba(t,n)}function B(e){let t=z(e);return F.current=t,t&&(k.openChangeTimeout.clear(),k.restTimeout.clear(),k.restTimeoutPending=!1,I.clear()),t}let V=ul(y,{enabled:!j,mouseOnly:!0,move:!1,handleClose:!P&&N!==`both`?Sl():null,restMs:R,delay(){return u==null&&O?{close:La(E.current,`close`)}:{close:x}},triggerElementRef:b,isActiveTrigger:g,isClosing:()=>m.select(`transitionStatus`)===`ending`,shouldOpen(){return!F.current}}),H=il(y,{enabled:!j}).reference,U=e=>{let t=F.current,n=Lb(e),r=B(n),i=b.current,a=i&&n&&ba(i,n);if(r&&m.select(`open`)&&m.select(`lastOpenChangeReason`)===`trigger-hover`){m.setOpen(!1,Z(Ge,e));return}if(t&&!r&&a&&!M.current&&!m.select(`open`)&&i&&va(L.current)){let t=()=>{!F.current&&!M.current&&!m.select(`open`)&&m.setOpen(!0,Z(Ge,e,i))},n=R();n===0?(I.clear(),t()):I.start(n,t)}},W=m.useState(`triggerProps`,C);return X(`button`,e,{state:{open:v},ref:[t,S,b],props:[V,H,C||N!==`none`?W:void 0,{onMouseOver(e){U(e.nativeEvent)},onFocus(e){z(Lb(e.nativeEvent))&&e.preventBaseUIHandler()},onMouseLeave(){F.current=!1,I.clear(),L.current=void 0},onPointerEnter(e){L.current=e.pointerType},onPointerDown(e){L.current=e.pointerType,m.set(`closeOnClick`,l),l&&!m.select(`open`)&&m.cancelPendingOpen(e.nativeEvent)},onClick(e){l&&!m.select(`open`)&&m.cancelPendingOpen(e.nativeEvent)},id:h,[ka]:j?``:void 0,[Ib]:j?void 0:``},f],stateAttributesMapping:Ta})});process.env.NODE_ENV!==`production`&&(Rb.displayName=`TooltipTrigger`);var zb=_.createContext(void 0);process.env.NODE_ENV!==`production`&&(zb.displayName=`TooltipPortalContext`);function zse(){let e=_.useContext(zb);if(e===void 0)throw Error(process.env.NODE_ENV===`production`?K(70):`Base UI: <Tooltip.Portal> is missing.`);return e}var Bb=_.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e;return Nb().useState(`mounted`)||n?(0,L.jsx)(zb.Provider,{value:n,children:(0,L.jsx)(X_,{ref:t,...r})}):null});process.env.NODE_ENV!==`production`&&(Bb.displayName=`TooltipPortal`);var Vb=_.createContext(void 0);process.env.NODE_ENV!==`production`&&(Vb.displayName=`TooltipPositionerContext`);function Bse(){let e=_.useContext(Vb);if(e===void 0)throw Error(process.env.NODE_ENV===`production`?K(71):`Base UI: TooltipPositionerContext is missing. TooltipPositioner parts must be placed within <Tooltip.Positioner>.`);return e}var Hb=_.forwardRef(function(e,t){let{render:n,className:r,anchor:i,positionMethod:a=`absolute`,side:o=`top`,align:s=`center`,sideOffset:c=0,alignOffset:l=0,collisionBoundary:u=`clipping-ancestors`,collisionPadding:d=5,arrowPadding:f=5,sticky:p=!1,disableAnchorTracking:m=!1,collisionAvoidance:h=vs,style:g,...v}=e,y=Nb(),b=zse(),x=y.useState(`open`),S=y.useState(`mounted`),C=y.useState(`trackCursorAxis`),w=y.useState(`disableHoverablePopup`),T=y.useState(`floatingRootContext`),E=y.useState(`instantType`),D=y.useState(`transitionStatus`),O=Ud({anchor:i,positionMethod:a,floatingRootContext:T,mounted:S,side:o,sideOffset:c,align:s,alignOffset:l,collisionBoundary:u,collisionPadding:d,sticky:p,arrowPadding:f,disableAnchorTracking:m,keepMounted:b,collisionAvoidance:h,adaptiveOrigin:y.useState(`adaptiveOrigin`)}),k=qd(e,_.useMemo(()=>({open:x,side:O.side,align:O.align,anchorHidden:O.anchorHidden,instant:C===`none`?E:`tracking-cursor`}),[x,O.side,O.align,O.anchorHidden,C,E]),{styles:O.positionerStyles,transitionStatus:D,props:v,refs:[t,y.useStateSetter(`positionerElement`)],hidden:!S,inert:!x||C===`both`||w});return(0,L.jsx)(Vb.Provider,{value:O,children:k})});process.env.NODE_ENV!==`production`&&(Hb.displayName=`TooltipPositioner`);var Ub=_.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,o=Nb(),{side:s,align:c}=Bse(),l=o.useState(`open`),u=o.useState(`instantType`),d=o.useState(`transitionStatus`),f=o.useState(`popupProps`),p=o.useState(`floatingRootContext`),m=o.useState(`disabled`),h=o.useState(`closeDelay`);Vn({open:l,ref:o.context.popupRef,onComplete(){l&&o.context.onOpenChangeComplete?.(!0)}}),ll(p,{enabled:!m,closeDelay:h});let g=o.useStateSetter(`popupElement`);return X(`div`,e,{state:{open:l,side:s,align:c,instant:u,transitionStatus:d},ref:[t,o.context.popupRef,g],props:[jc,f,Kd(d),a],stateAttributesMapping:Oa})});process.env.NODE_ENV!==`production`&&(Ub.displayName=`TooltipPopup`);var Wb=function(e){let{delay:t,closeDelay:n,timeout:r=400}=e,i=_.useMemo(()=>({open:t,close:n}),[t,n]);return(0,L.jsx)(Fb.Provider,{value:t,children:(0,L.jsx)(Qte,{delay:i,timeoutMs:r,children:e.children})})};process.env.NODE_ENV!==`production`&&(Wb.displayName=`TooltipProvider`);var Vse=({children:e,...t})=>(0,L.jsx)(Tre,{...t,children:e}),Hse=nr(`inline-flex cursor-pointer items-center justify-center rounded-full whitespace-nowrap transition-all select-none disabled:pointer-events-none disabled:opacity-50`,{variants:{tone:{brand:``,accent:``,neutral:``,error:``,info:``,warning:``,success:``},variant:{fill:`active:scale-[0.98]`,outline:`border active:scale-[0.98]`,ghost:`active:scale-[0.98]`,soft:`border active:scale-[0.98]`,elevated:`shadow-xs not-active:hover:shadow-md`,link:`size-fit! p-0! underline decoration-transparent underline-offset-2 [&>svg]:transition-colors`},size:{large:`h-2xl gap-xs px-md style-text-default-2 [&>svg]:size-md`,medium:`h-xl gap-2xs px-sm style-text-default-0 [&>svg]:size-sm`,small:`h-lg gap-3xs px-xs style-text-default--1 [&>svg]:size-xs`,extraSmall:`h-md gap-3xs px-2xs style-text-default--2 [&>svg]:size-xs`,iconLarge:`size-2xl p-[0px] [&>svg]:size-md`,iconMedium:`size-xl p-[0px] [&>svg]:size-sm`,iconSmall:`size-lg p-[0px] [&>svg]:size-xs`,iconExtraSmall:`size-md p-[0px] [&>svg]:size-xs`}},defaultVariants:{tone:`brand`,variant:`fill`,size:`medium`},compoundVariants:[{variant:`fill`,tone:`brand`,className:`bg-brand-default text-brand-on-default hover:bg-brand-muted`},{variant:`fill`,tone:`accent`,className:`bg-accent-default text-accent-on-default hover:bg-accent-muted`},{variant:`fill`,tone:`neutral`,className:`bg-neutral-default text-neutral-on-default hover:bg-neutral-muted`},{variant:`fill`,tone:`error`,className:`bg-error-default text-error-on-default hover:bg-error-muted`},{variant:`fill`,tone:`info`,className:`bg-info-default text-info-on-default hover:bg-info-muted`},{variant:`fill`,tone:`success`,className:`bg-success-default text-success-on-default hover:bg-success-muted`},{variant:`fill`,tone:`warning`,className:`bg-warning-default text-warning-on-default hover:bg-warning-muted`},{variant:`outline`,tone:`brand`,className:`border-brand-border text-brand-default hover:bg-brand-subtle hover:text-brand-on-container`},{variant:`outline`,tone:`accent`,className:`border-accent-border text-accent-default hover:bg-accent-subtle hover:text-accent-on-container`},{variant:`outline`,tone:`neutral`,className:`border-neutral-border text-neutral-default hover:bg-neutral-subtle hover:text-neutral-on-container`},{variant:`outline`,tone:`error`,className:`border-error-border text-error-default hover:bg-error-subtle hover:text-error-on-container`},{variant:`outline`,tone:`info`,className:`border-info-border text-info-default hover:bg-info-subtle hover:text-info-on-container`},{variant:`outline`,tone:`success`,className:`border-success-border text-success-default hover:bg-success-subtle hover:text-success-on-container`},{variant:`outline`,tone:`warning`,className:`border-warning-border text-warning-default hover:bg-warning-subtle hover:text-warning-on-container`},{variant:`ghost`,tone:`brand`,className:`text-brand-default hover:bg-brand-subtle hover:text-brand-on-container`},{variant:`ghost`,tone:`accent`,className:`text-accent-default hover:bg-accent-subtle hover:text-accent-on-container`},{variant:`ghost`,tone:`neutral`,className:`text-neutral-default hover:bg-neutral-subtle hover:text-neutral-on-container`},{variant:`ghost`,tone:`error`,className:`text-error-default hover:bg-error-subtle hover:text-error-on-container`},{variant:`ghost`,tone:`info`,className:`text-info-default hover:bg-info-subtle hover:text-info-on-container`},{variant:`ghost`,tone:`success`,className:`text-success-default hover:bg-success-subtle hover:text-success-on-container`},{variant:`ghost`,tone:`warning`,className:`text-warning-default hover:bg-warning-subtle hover:text-warning-on-container`},{variant:`soft`,tone:`brand`,className:`border-brand-border bg-brand-container text-brand-on-container hover:border-brand-border-strong hover:bg-brand-container-high`},{variant:`soft`,tone:`accent`,className:`border-accent-border bg-accent-container text-accent-on-container hover:border-accent-border-strong hover:bg-accent-container-high`},{variant:`soft`,tone:`neutral`,className:`border-neutral-border bg-neutral-container text-neutral-on-container hover:border-neutral-border-strong hover:bg-neutral-container-high`},{variant:`soft`,tone:`error`,className:`border-error-border bg-error-container text-error-on-container hover:border-error-border-strong hover:bg-error-container-high`},{variant:`soft`,tone:`info`,className:`border-info-border bg-info-container text-info-on-container hover:border-info-border-strong hover:bg-info-container-high`},{variant:`soft`,tone:`success`,className:`border-success-border bg-success-container text-success-on-container hover:border-success-border-strong hover:bg-success-container-high`},{variant:`soft`,tone:`warning`,className:`border-warning-border bg-warning-container text-warning-on-container hover:border-warning-border-strong hover:bg-warning-container-high`},{variant:`elevated`,tone:`brand`,className:`bg-brand-container text-brand-on-container not-active:hover:bg-brand-container-high`},{variant:`elevated`,tone:`accent`,className:`bg-accent-container text-accent-on-container not-active:hover:bg-accent-container-high`},{variant:`elevated`,tone:`neutral`,className:`bg-surface-2 text-on-surface not-active:hover:bg-surface-3`},{variant:`elevated`,tone:`error`,className:`bg-error-container text-error-on-container not-active:hover:bg-error-container-high`},{variant:`elevated`,tone:`info`,className:`bg-info-container text-info-on-container not-active:hover:bg-info-container-high`},{variant:`elevated`,tone:`success`,className:`bg-success-container text-success-on-container not-active:hover:bg-success-container-high`},{variant:`elevated`,tone:`warning`,className:`bg-warning-container text-warning-on-container not-active:hover:bg-warning-container-high`},{variant:`link`,tone:`brand`,className:`text-brand-default hover:decoration-brand-default [&>svg]:text-brand-default/50 hover:[&>svg]:text-brand-default`},{variant:`link`,tone:`accent`,className:`text-accent-default hover:decoration-accent-default [&>svg]:text-accent-default/50 hover:[&>svg]:text-accent-default`},{variant:`link`,tone:`neutral`,className:`text-neutral-default hover:decoration-neutral-default [&>svg]:text-neutral-default/50 hover:[&>svg]:text-neutral-default`},{variant:`link`,tone:`error`,className:`text-error-default hover:decoration-error-default [&>svg]:text-error-default/50 hover:[&>svg]:text-error-default`},{variant:`link`,tone:`info`,className:`text-info-default hover:decoration-info-default [&>svg]:text-info-default/50 hover:[&>svg]:text-info-default`},{variant:`link`,tone:`success`,className:`text-success-default hover:decoration-success-default [&>svg]:text-success-default/50 hover:[&>svg]:text-success-default`},{variant:`link`,tone:`warning`,className:`text-warning-default hover:decoration-warning-default [&>svg]:text-warning-default/50 hover:[&>svg]:text-warning-default`}]}),Gb=({tone:e,variant:t,size:n,className:r,children:i,...a})=>(0,L.jsx)(hf,{"data-size":n,className:Q(Hse({tone:e,variant:t,size:n,className:r})),...a,children:i}),Use=({className:e,children:t,ref:n,...r})=>(0,L.jsx)(jl,{className:Q(``,e),ref:n,...r,render:(0,L.jsx)(Gb,{"aria-label":`Close`,tone:`neutral`,variant:`outline`,children:t})}),Kb=(0,_.createContext)({tone:`brand`}),Wse=()=>(0,_.useContext)(Kb),Gse=({className:e,children:t,ref:n,...r})=>{let{tone:i}=Wse();return(0,L.jsx)(jl,{"data-confirm":!0,className:Q(``,e),ref:n,...r,render:(0,L.jsx)(Gb,{tone:i,children:t})})},Kse=({className:e,children:t,ref:n,...r})=>(0,L.jsx)(Ml,{"data-slot":`alert-dialog-description`,className:Q(`mb-[0px] style-text-prose-0`,e),ref:n,...r,children:t}),qse=({className:e,children:t,ref:n,...r})=>(0,L.jsx)(`div`,{className:Q(`flex items-start justify-end gap-2xs`,e),ref:n,...r,children:t}),Jse=({className:e,children:t,ref:n,...r})=>(0,L.jsx)(`div`,{className:Q(`grid auto-rows-min items-center gap-x-sm has-data-[slot=alert-dialog-description]:grid-rows-[auto_auto] has-data-[slot=alert-dialog-icon]:grid-cols-[auto_1fr] has-data-[slot=alert-dialog-description]:**:data-[slot=alert-dialog-icon]:row-span-2`,e),ref:n,...r,children:t}),Yse=nr(`fixed top-1/2 left-1/2 z-999 max-w-[lg(100vw-3rem)] min-w-1/3 -translate-1/2 space-y-md overflow-hidden rounded-3xl bg-surface-3 p-md transition-all duration-150 data-ending-style:scale-90 data-ending-style:opacity-0 data-starting-style:scale-90 data-starting-style:opacity-0`,{variants:{tone:{brand:`[&_svg]:text-brand-default`,accent:`[&_svg]:text-accent-default`,neutral:`[&_svg]:text-neutral-default`,error:`[&_svg]:text-error-default`,info:`[&_svg]:text-info-default`,success:`[&_svg]:text-success-default`,warning:`[&_svg]:text-warning-default`}},defaultVariants:{tone:`brand`}});lu();var Xse=({tone:e,className:t,children:n,ref:r,...i})=>(0,L.jsx)(Kb.Provider,{value:{tone:e},children:(0,L.jsxs)(Ql,{children:[(0,L.jsx)(Al,{"data-slot":`alert-dialog-backdrop`,className:`fixed inset-[0px] z-998 min-h-dvh transition-all duration-150 data-ending-style:opacity-0 data-starting-style:opacity-0 supports-[-webkit-touch-callout:none]:absolute`,style:{backgroundColor:`rgb(0 0 0 / 10%)`,backdropFilter:`blur(16px)`,WebkitBackdropFilter:`blur(16px)`}}),(0,L.jsx)(Yl,{className:Q(Yse({tone:e}),t),ref:r,...i,children:n})]})}),Zse=({className:e,children:t,ref:n,...r})=>(0,L.jsx)($l,{"data-slot":`alert-dialog-title`,className:Q(`style-text-strong-1`,e),ref:n,...r,children:t}),Qse=({className:e,children:t,ref:n,...r})=>(0,L.jsx)(iu,{className:Q(``,e),ref:n,...r,render:t}),$se=({className:e,children:t,ref:n,...r})=>(0,L.jsx)(`div`,{"data-slot":`alert-dialog-icon`,className:Q(`row-span-2 self-start [&>svg]:size-xl [&>svg]:shrink-0`,e),ref:n,...r,children:t}),ece=({children:e,...t})=>(0,L.jsx)(Hre,{...t,children:e}),tce=({children:e,...t})=>(0,L.jsx)(Ad,{...t,children:e}),nce=({emptyText:e,className:t,children:n,ref:r,...i})=>(0,L.jsx)(Fd,{children:(0,L.jsx)(Yd,{className:Q(``,t),ref:r,...i,sideOffset:16,children:(0,L.jsxs)(Xd,{className:`max-h-[22.5rem] w-[calc(var(--anchor-width)+var(--spacing-md))] max-w-[calc(var(--available-width))] overflow-hidden rounded-xl bg-surface-2 shadow-md`,children:[(0,L.jsx)(cf,{className:`ml-3xs p-sm style-text-prose--1 text-on-surface-variant empty:m-[0px] empty:p-[0px]`,children:e}),(0,L.jsx)(jd,{className:`max-h-[min(22.5rem,var(--available-height))] scroll-pt-[2.25rem] scroll-pb-[0.5rem] overflow-y-auto overscroll-contain data-empty:p-[0px]`,children:n})]})})}),rce=e=>{if(e<1e3)return`${e} B`;let t=[`KB`,`MB`,`GB`,`TB`],n=e/1e3,r=0;for(;n>=1e3&&r<t.length-1;)n/=1e3,r+=1;return`${n.toFixed(n%1==0?0:1)} ${t[r]}`},qb=nr(`group flex w-full items-center text-ellipsis caret-brand-border-strong outline outline-transparent transition-all placeholder:opacity-60 focus-within:outline-brand-border-strong not-focus-within:hover:outline-border-strong disabled:cursor-not-allowed aria-invalid:bg-error-container aria-invalid:text-error-on-container aria-invalid:caret-error-border-strong aria-invalid:outline-error-border aria-invalid:focus-within:outline-error-border-strong aria-invalid:not-focus-within:hover:outline-error-border data-[disabled=true]:cursor-not-allowed data-[disabled=true]:opacity-50`,{variants:{variant:{primary:`bg-surface shadow-2xs`,secondary:`bg-neutral-container`},size:{small:`h-lg gap-3xs rounded-lg pr-3xs pl-xs style-text-prose--1`,medium:`h-xl gap-2xs rounded-xl px-sm style-text-prose-0`,large:`h-2xl gap-xs rounded-2xl px-md style-text-prose-1`}},defaultVariants:{variant:`primary`,size:`medium`}}),Jb=({variant:e,className:t,children:n,ref:r,...i})=>(0,L.jsx)(`div`,{className:Q(qb({variant:e}),t),ref:r,...i,children:n}),Yb=({placeholder:e,className:t,ref:n,...r})=>(0,L.jsx)(wd,{placeholder:e,className:Q(`grow text-ellipsis outline-none placeholder:opacity-85`,t),ref:n,...r}),ice=({placeholder:e=`Search…`,emptyText:t,className:n,children:r,ref:i,...a})=>(0,L.jsx)(Fd,{children:(0,L.jsx)(Yd,{className:Q(``,n),ref:i,...a,align:`end`,sideOffset:4,children:(0,L.jsxs)(Xd,{"aria-label":`Suggestions`,className:`max-h-[20.5rem] max-w-(--available-width) origin-(--transform-origin) overflow-hidden rounded-lg bg-surface-2 shadow-lg transition-[transform,scale,opacity] [--input-container-height:3rem] data-ending-style:scale-90 data-ending-style:opacity-0 data-starting-style:scale-90 data-starting-style:opacity-0`,children:[(0,L.jsx)(`div`,{className:`m-3xs flex h-(--input-container-height) items-center justify-center text-center`,children:(0,L.jsx)(Jb,{children:(0,L.jsx)(Yb,{placeholder:e})})}),(0,L.jsx)(cf,{className:`p-sm style-text-prose--1 empty:m-[0px] empty:p-[0px]`,children:t}),(0,L.jsx)(jd,{className:`max-h-[calc(19.5rem-var(--input-container-height))] scroll-pt-xl scroll-pb-[0.35rem] overflow-auto overscroll-contain`,children:r})]})})}),ace=({className:e,children:t,ref:n,...r})=>(0,L.jsx)(of,{className:Q(`group flex h-lg min-w-(--anchor-width) cursor-default items-center rounded-md style-text-prose--1 select-none hover:cursor-pointer hover:bg-accent-default hover:text-surface data-highlighted:relative data-highlighted:z-0 data-highlighted:bg-accent-default data-highlighted:text-surface before:data-highlighted:absolute before:data-highlighted:inset-[0px] before:data-highlighted:z-[-1] before:data-highlighted:rounded-md`,e),ref:n,...r,children:(0,L.jsx)(`span`,{className:`text-lg leading-none`,children:t})}),oce=({className:e,children:t,ref:n,...r})=>(0,L.jsx)(Qd,{className:Q(`block space-y-3xs`,e),ref:n,...r,children:t}),sce=({className:e,children:t,ref:n,...r})=>(0,L.jsx)($d,{className:Q(`sticky top-[0px] z-1 my-[0px] mr-[0px] ml-[3px] bg-surface-2 px-sm pt-sm pb-3xs style-text-strong--2 text-on-surface-variant`,e),ref:n,...r,children:t}),cce=({className:e,children:t,ref:n,...r})=>(0,L.jsx)(`div`,{className:Q(`inline-flex items-center gap-xs style-text-default-0 text-on-surface-variant`,e),ref:n,...r,children:t}),lce=({className:e,children:t,ref:n,...r})=>(0,L.jsx)(of,{className:Q(`mx-xs flex cursor-default items-center rounded-lg px-2xs py-3xs style-text-prose-0 select-none first:mt-xs last:mb-xs hover:cursor-pointer hover:bg-neutral-container-high hover:text-neutral-on-container data-highlighted:relative data-highlighted:z-0 data-highlighted:bg-neutral-container-high data-highlighted:text-neutral-on-container before:data-highlighted:absolute before:data-highlighted:inset-x-sm before:data-highlighted:inset-y-[0px] before:data-highlighted:z-[-1] before:data-highlighted:rounded-sm`,e),ref:n,...r,children:t}),uce=({className:e,children:t,ref:n,...r})=>(0,L.jsx)(sf,{className:Q(`grid grid-cols-5`,e),ref:n,...r,children:t}),dce=({className:e,children:t,ref:n,...r})=>(0,L.jsx)(Nd,{className:Q(`flex items-center gap-2xs p-xs style-text-prose--1 text-on-surface-variant empty:hidden`,e),ref:n,...r,children:t}),fce=({className:e,children:t,ref:n,...r})=>(0,L.jsx)(qre,{className:Q(``,e),ref:n,...r,render:()=>(0,L.jsx)(L.Fragment,{children:t})}),pce=nr(`group/avatar relative inline-flex shrink-0 items-center justify-center rounded-full`,{variants:{size:{small:`size-lg style-text-default--1`,medium:`size-xl style-text-default-0`,large:`size-2xl style-text-default-1`}},defaultVariants:{size:`medium`}}),mce=nr(`absolute right-0 bottom-0 inline-flex items-center justify-center rounded-full outline-3 outline-surface-background group-data-[size=large]/avatar:size-md group-data-[size=medium]/avatar:size-sm group-data-[size=small]/avatar:size-xs group-data-[size=large]/avatar:[&_svg]:size-sm group-data-[size=medium]/avatar:[&_svg]:size-xs group-data-[size=small]/avatar:[&_svg]:size-2xs`,{variants:{tone:{brand:`bg-brand-default [&>svg]:text-brand-on-default`,accent:`bg-accent-default [&>svg]:text-accent-on-default`,neutral:`bg-neutral-default [&>svg]:text-neutral-on-default`,error:`bg-error-default [&>svg]:text-error-on-default`,info:`bg-info-default [&>svg]:text-info-on-default`,success:`bg-success-default [&>svg]:text-success-on-default`,warning:`bg-warning-default [&>svg]:text-warning-on-default`},position:{topLeft:`top-0 left-0`,topRight:`top-0 right-0`,bottomLeft:`bottom-0 left-0`,bottomRight:`right-0 bottom-0`}},defaultVariants:{tone:`success`,position:`bottomRight`}}),hce=({size:e=`medium`,className:t,children:n,ref:r,...i})=>(0,L.jsx)(ff,{className:Q(pce({className:t,size:e})),"data-size":e,"data-slot":`avatar`,ref:r,...i,children:n}),gce=({className:e,ref:t,...n})=>(0,L.jsx)(mf,{className:Q(`flex size-full items-center justify-center rounded-full bg-surface-3 align-middle shadow-2xs select-none`,e),"data-slot":`avatar-fallback`,ref:t,...n}),Xb=({className:e,children:t,ref:n,...r})=>(0,L.jsx)(`div`,{className:Q(`animate-pulse rounded-lg bg-surface-2 shadow-sm`,e),ref:n,...r,children:t}),_ce=({className:e,ref:t,...n})=>{let[r,i]=_.useState(`loading`);return(0,L.jsxs)(L.Fragment,{children:[r===`loading`?(0,L.jsx)(Xb,{className:`absolute inset-0 size-full rounded-full`}):null,(0,L.jsx)(pf,{onLoadingStatusChange:i,className:Q(`size-full rounded-full object-cover`,e),"data-slot":`avatar-image`,ref:t,...n})]})},vce=({tone:e,position:t,className:n,children:r,ref:i,...a})=>(0,L.jsx)(`div`,{"data-slot":`avatar-badge`,className:Q(mce({tone:e,position:t,className:n})),ref:i,...a,children:r}),yce=nr(`inline-flex items-center justify-center gap-3xs rounded-full style-text-default--2 whitespace-nowrap transition-all select-none`,{variants:{size:{small:`h-sm px-xs [&>svg]:size-2xs`,medium:`h-md px-xs [&>svg]:size-xs`,large:`h-lg px-xs [&>svg]:size-sm`,iconSmall:`size-sm [&>svg]:size-2xs`,iconMedium:`size-md [&>svg]:size-xs`,iconLarge:`size-lg [&>svg]:size-sm`},tone:{brand:``,accent:``,neutral:``,error:``,info:``,success:``,warning:``},variant:{fill:`shadow-2xs`,outline:`border`,soft:`border`}},defaultVariants:{size:`medium`,tone:`brand`,variant:`fill`},compoundVariants:[{variant:`fill`,tone:`brand`,className:`bg-brand-default text-brand-on-default`},{variant:`fill`,tone:`accent`,className:`bg-accent-default text-accent-on-default`},{variant:`fill`,tone:`neutral`,className:`bg-neutral-default text-neutral-on-default`},{variant:`fill`,tone:`error`,className:`bg-error-default text-error-on-default`},{variant:`fill`,tone:`info`,className:`bg-info-default text-info-on-default`},{variant:`fill`,tone:`success`,className:`bg-success-default text-success-on-default`},{variant:`fill`,tone:`warning`,className:`bg-warning-default text-warning-on-default`},{variant:`outline`,tone:`brand`,className:`border-brand-default text-brand-default`},{variant:`outline`,tone:`accent`,className:`border-accent-default text-accent-default`},{variant:`outline`,tone:`neutral`,className:`border-neutral-default text-neutral-default`},{variant:`outline`,tone:`error`,className:`border-error-default text-error-default`},{variant:`outline`,tone:`info`,className:`border-info-default text-info-default`},{variant:`outline`,tone:`success`,className:`border-success-default text-success-default`},{variant:`outline`,tone:`warning`,className:`border-warning-default text-warning-default`},{variant:`soft`,tone:`brand`,className:`border-brand-border bg-brand-container text-brand-on-container`},{variant:`soft`,tone:`accent`,className:`border-accent-border bg-accent-container text-accent-on-container`},{variant:`soft`,tone:`neutral`,className:`border-neutral-border bg-neutral-container text-neutral-on-container`},{variant:`soft`,tone:`error`,className:`border-error-border bg-error-container text-error-on-container`},{variant:`soft`,tone:`info`,className:`border-info-border bg-info-container text-info-on-container`},{variant:`soft`,tone:`success`,className:`border-success-border bg-success-container text-success-on-container`},{variant:`soft`,tone:`warning`,className:`border-warning-border bg-warning-container text-warning-on-container`}]}),Zb=({className:e,size:t,tone:n,variant:r,children:i,ref:a,...o})=>(0,L.jsx)(`div`,{className:Q(yce({className:e,size:t,tone:n,variant:r})),ref:a,...o,children:i}),bce=nr(`group/box flex size-full min-h-0 flex-col overflow-hidden bg-surface`,{variants:{size:{small:`gap-xs rounded-xl p-xs shadow-2xs`,medium:`gap-sm rounded-2xl p-sm shadow-xs`,large:`gap-md rounded-3xl p-md shadow-sm`}},defaultVariants:{size:`medium`}}),xce=({size:e=`medium`,className:t,children:n,ref:r,...i})=>(0,L.jsx)(`div`,{"data-size":e,className:Q(bce({size:e,className:t})),ref:r,...i,children:n}),Qb=({className:e,children:t,ref:n,...r})=>(0,L.jsx)(`div`,{className:Q(`col-start-2 row-span-2 row-start-1 self-start justify-self-end pl-lg`,e),ref:n,...r,children:t}),$b=({className:e,children:t,ref:n,...r})=>(0,L.jsx)(`div`,{className:Q(`min-h-0 flex-1`,e),ref:n,...r,children:t}),ex=({className:e,children:t,ref:n,...r})=>(0,L.jsx)(`span`,{className:Q(`text-on-surface-variant group-data-[size=large]/box:style-text-prose-0 group-data-[size=medium]/box:style-text-prose--1 group-data-[size=small]/box:style-text-prose--2`,e),ref:n,...r,children:t}),Sce=({className:e,children:t,ref:n,...r})=>(0,L.jsx)(`div`,{className:Q(`flex items-center justify-between not-first:group-data-[size=large]/box:gap-lg not-first:group-data-[size=medium]/box:gap-md group-data-[size=small]/box:gap-sm`,e),ref:n,...r,children:t}),Cce=({className:e,children:t,ref:n,...r})=>(0,L.jsx)(`div`,{className:Q(`group/box-header grid auto-rows-min items-start group-data-[size=large]/box:gap-0 group-data-[size=medium]/box:gap-0 group-data-[size=small]/box:gap-0`,e),ref:n,...r,children:t}),wce=({className:e,children:t,ref:n,...r})=>(0,L.jsx)(`span`,{className:Q(`group-data-[size=large]/box:style-text-strong-1 not-first:group-data-[size=large]/box:pt-xs group-data-[size=medium]/box:style-text-strong-0 not-first:group-data-[size=medium]/box:pt-2xs group-data-[size=small]/box:style-text-strong--1 not-first:group-data-[size=small]/box:pt-3xs`,e),ref:n,...r,children:t}),Tce=({className:e,children:t,ref:n,...r})=>(0,L.jsx)(`nav`,{className:Q(`flex items-center gap-2xs px-sm py-2xs`,e),ref:n,...r,children:t}),Ece=({className:e,children:t,ref:n,...r})=>(0,L.jsxs)(`div`,{className:Q(`flex size-md items-center justify-center rounded-sm text-on-surface-variant transition-all hover:cursor-pointer hover:bg-neutral-container hover:text-neutral-on-container active:scale-[0.98] active:bg-neutral-container disabled:opacity-50 [&>svg]:size-sm`,e),ref:n,...r,children:[t,(0,L.jsx)(yi,{weight:`bold`})]}),Dce=({className:e,children:t,ref:n,...r})=>(0,L.jsx)(`div`,{className:Q(`inline-flex h-md items-center justify-center gap-2xs rounded-full px-2xs style-text-default--1 text-accent-default [&>svg]:size-xs`,e),ref:n,...r,children:t}),Oce=({className:e,children:t,ref:n,...r})=>(0,L.jsx)(`div`,{className:Q(`inline-flex h-md items-center justify-center gap-3xs rounded-md px-2xs style-text-default--1 text-on-surface-variant transition-all hover:cursor-pointer hover:bg-neutral-container active:scale-[0.98] active:bg-neutral-container disabled:opacity-50 [&>svg]:size-xs`,e),ref:n,...r,children:t}),kce=({className:e,ref:t,...n})=>(0,L.jsx)(`div`,{className:Q(`text-on-surface-variant [&>svg]:size-xs`,e),ref:t,...n,children:(0,L.jsx)(fi,{weight:`bold`})}),Ace=nr(`inline-flex cursor-pointer items-center justify-center overflow-hidden rounded-lg whitespace-nowrap transition-all select-none *:rounded-none *:bg-transparent disabled:pointer-events-none disabled:opacity-50 [&>button]:text-inherit`,{variants:{size:{large:`rounded-2xl *:style-text-default-2 [&>button]:h-2xl [&>button]:px-md [&>button]:[&>svg]:size-md`,medium:`rounded-xl *:style-text-default-0 [&>button]:h-xl [&>button]:px-sm [&>button]:[&>svg]:size-sm`,small:`rounded-lg *:style-text-default--1 [&>button]:h-lg [&>button]:px-xs [&>button]:[&>svg]:size-xs`,extraSmall:`rounded-md *:style-text-default--2 [&>button]:h-md [&>button]:px-2xs [&>button]:[&>svg]:size-2xs`,iconLarge:`rounded-2xl *:size-2xl [&>button]:size-2xl [&>button]:p-[0px] [&>button]:[&>svg]:size-md`,iconMedium:`rounded-xl *:size-xl [&>button]:size-xl [&>button]:p-[0px] [&>button]:[&>svg]:size-sm`,iconSmall:`rounded-lg *:size-lg [&>button]:size-lg [&>button]:p-[0px] [&>button]:[&>svg]:size-xs`,iconExtraSmall:`rounded-md *:size-md [&>button]:size-md [&>button]:p-[0px] [&>button]:[&>svg]:size-2xs`},variant:{fill:``,outline:`border`,ghost:``,soft:`border`,elevated:`shadow-xs *:active:scale-100!`},tone:{brand:`[&>*+*]:before:bg-brand-border`,accent:`[&>*+*]:before:bg-accent-border`,neutral:`[&>*+*]:before:bg-neutral-border`,error:`[&>*+*]:before:bg-error-border`,info:`[&>*+*]:before:bg-info-border`,success:`[&>*+*]:before:bg-success-border`,warning:``},orientation:{horizontal:`[&>*+*]:relative [&>*+*]:before:absolute [&>*+*]:before:top-1/2 [&>*+*]:before:left-0 [&>*+*]:before:h-1/2 [&>*+*]:before:w-px [&>*+*]:before:-translate-y-1/2 [&>*+*]:before:content-[""]`,vertical:`flex-col [&>*+*]:relative [&>*+*]:before:absolute [&>*+*]:before:top-0 [&>*+*]:before:left-1/2 [&>*+*]:before:h-px [&>*+*]:before:w-1/2 [&>*+*]:before:-translate-x-1/2 [&>*+*]:before:content-[""]`}},defaultVariants:{size:`medium`,variant:`fill`,tone:`brand`,orientation:`horizontal`},compoundVariants:[{variant:`fill`,tone:`brand`,className:`bg-brand-default text-brand-on-default [&>button:hover]:bg-brand-muted`},{variant:`fill`,tone:`accent`,className:`bg-accent-default text-accent-on-default [&>button:hover]:bg-accent-muted`},{variant:`fill`,tone:`neutral`,className:`bg-neutral-default text-neutral-on-default [&>button:hover]:bg-neutral-muted`},{variant:`fill`,tone:`error`,className:`bg-error-default text-error-on-default [&>button:hover]:bg-error-muted`},{variant:`fill`,tone:`info`,className:`bg-info-default text-info-on-default [&>button:hover]:bg-info-muted`},{variant:`fill`,tone:`success`,className:`bg-success-default text-success-on-default [&>button:hover]:bg-success-muted`},{variant:`fill`,tone:`warning`,className:`bg-warning-default text-warning-on-default [&>button:hover]:bg-warning-muted`},{variant:`outline`,tone:`brand`,className:`border-brand-border text-brand-default [&>button:hover]:bg-brand-subtle [&>button:hover]:text-brand-on-container`},{variant:`outline`,tone:`accent`,className:`border-accent-border text-accent-default [&>button:hover]:bg-accent-subtle [&>button:hover]:text-accent-on-container`},{variant:`outline`,tone:`neutral`,className:`border-neutral-border text-neutral-default [&>button:hover]:bg-neutral-subtle [&>button:hover]:text-neutral-on-container`},{variant:`outline`,tone:`error`,className:`border-error-border text-error-default [&>button:hover]:bg-error-subtle [&>button:hover]:text-error-on-container`},{variant:`outline`,tone:`info`,className:`border-info-border text-info-default [&>button:hover]:bg-info-subtle [&>button:hover]:text-info-on-container`},{variant:`outline`,tone:`success`,className:`border-success-border text-success-default [&>button:hover]:bg-success-subtle [&>button:hover]:text-success-on-container`},{variant:`outline`,tone:`warning`,className:`border-warning-border text-warning-default [&>button:hover]:bg-warning-subtle [&>button:hover]:text-warning-on-container`},{variant:`ghost`,tone:`brand`,className:`text-brand-default [&>button:hover]:bg-brand-subtle [&>button:hover]:text-brand-on-container`},{variant:`ghost`,tone:`accent`,className:`text-accent-default [&>button:hover]:bg-accent-subtle [&>button:hover]:text-accent-on-container`},{variant:`ghost`,tone:`neutral`,className:`text-neutral-default [&>button:hover]:bg-neutral-subtle [&>button:hover]:text-neutral-on-container`},{variant:`ghost`,tone:`error`,className:`text-error-default [&>button:hover]:bg-error-subtle [&>button:hover]:text-error-on-container`},{variant:`ghost`,tone:`info`,className:`text-info-default [&>button:hover]:bg-info-subtle [&>button:hover]:text-info-on-container`},{variant:`ghost`,tone:`success`,className:`text-success-default [&>button:hover]:bg-success-subtle [&>button:hover]:text-success-on-container`},{variant:`ghost`,tone:`warning`,className:`text-warning-default [&>button:hover]:bg-warning-subtle [&>button:hover]:text-warning-on-container`},{variant:`soft`,tone:`brand`,className:`border-brand-border bg-brand-container text-brand-on-container [&>button:hover]:bg-brand-container-high`},{variant:`soft`,tone:`accent`,className:`border-accent-border bg-accent-container text-accent-on-container [&>button:hover]:bg-accent-container-high`},{variant:`soft`,tone:`neutral`,className:`border-neutral-border bg-neutral-container text-neutral-on-container [&>button:hover]:bg-neutral-container-high`},{variant:`soft`,tone:`error`,className:`border-error-border bg-error-container text-error-on-container [&>button:hover]:bg-error-container-high`},{variant:`soft`,tone:`info`,className:`border-info-border bg-info-container text-info-on-container [&>button:hover]:bg-info-container-high`},{variant:`soft`,tone:`success`,className:`border-success-border bg-success-container text-success-on-container [&>button:hover]:bg-success-container-high`},{variant:`soft`,tone:`warning`,className:`border-warning-border bg-warning-container text-warning-on-container [&>button:hover]:bg-warning-container-high`},{variant:`elevated`,tone:`brand`,className:`bg-brand-container text-brand-on-container [&>button]:not-active:hover:bg-brand-container-high [&>button]:active:bg-brand-container`},{variant:`elevated`,tone:`accent`,className:`bg-accent-container text-accent-on-container [&>button]:not-active:hover:bg-accent-container-high [&>button]:active:bg-accent-container`},{variant:`elevated`,tone:`neutral`,className:`bg-surface-2 text-on-surface [&>button]:not-active:hover:bg-surface-3 [&>button]:not-active:hover:text-neutral-on-container [&>button]:active:bg-surface`},{variant:`elevated`,tone:`error`,className:`bg-error-container text-error-on-container [&>button]:not-active:hover:bg-error-container-high [&>button]:active:bg-error-container`},{variant:`elevated`,tone:`info`,className:`bg-info-container text-info-on-container [&>button]:not-active:hover:bg-info-container-high [&>button]:active:bg-info-container`},{variant:`elevated`,tone:`success`,className:`bg-success-container text-success-on-container [&>button]:not-active:hover:bg-success-container-high [&>button]:active:bg-success-container`},{variant:`elevated`,tone:`warning`,className:`bg-warning-container text-warning-on-container [&>button]:not-active:hover:bg-warning-container-high [&>button]:active:bg-warning-container`}]}),jce=({size:e,variant:t,tone:n,orientation:r,className:i,children:a,ref:o,...s})=>(0,L.jsx)(`div`,{className:Q(Ace({size:e,variant:t,tone:n,orientation:r}),i),ref:o,...s,children:a}),tx=_.createContext(null),Mce=({id:e,config:t,className:n,children:r,ref:i,...a})=>{let o=_.useId(),s=`chart-${e??o.replace(/:/g,``)}`;return(0,L.jsx)(tx.Provider,{value:{config:t},children:(0,L.jsx)(`div`,{"data-slot":`chart`,"data-chart":s,className:Q(`flex aspect-video justify-center style-text-default--1 [&_.recharts-cartesian-axis-tick_text]:fill-on-surface-muted [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-hidden [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-neutral-container-high [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-neutral-container-high [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border [&_.recharts-sector]:outline-hidden [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-surface]:outline-hidden`,n),ref:i,...a,children:r})})},nx=()=>{let e=_.useContext(tx);if(!e)throw Error(`useChart must be used within a ChartContainerProvider`);return e},Nce=`dangerouslySetInnerHTML.onCopy.onCopyCapture.onCut.onCutCapture.onPaste.onPasteCapture.onCompositionEnd.onCompositionEndCapture.onCompositionStart.onCompositionStartCapture.onCompositionUpdate.onCompositionUpdateCapture.onFocus.onFocusCapture.onBlur.onBlurCapture.onChange.onChangeCapture.onBeforeInput.onBeforeInputCapture.onInput.onInputCapture.onReset.onResetCapture.onSubmit.onSubmitCapture.onInvalid.onInvalidCapture.onLoad.onLoadCapture.onError.onErrorCapture.onKeyDown.onKeyDownCapture.onKeyPress.onKeyPressCapture.onKeyUp.onKeyUpCapture.onAbort.onAbortCapture.onCanPlay.onCanPlayCapture.onCanPlayThrough.onCanPlayThroughCapture.onDurationChange.onDurationChangeCapture.onEmptied.onEmptiedCapture.onEncrypted.onEncryptedCapture.onEnded.onEndedCapture.onLoadedData.onLoadedDataCapture.onLoadedMetadata.onLoadedMetadataCapture.onLoadStart.onLoadStartCapture.onPause.onPauseCapture.onPlay.onPlayCapture.onPlaying.onPlayingCapture.onProgress.onProgressCapture.onRateChange.onRateChangeCapture.onSeeked.onSeekedCapture.onSeeking.onSeekingCapture.onStalled.onStalledCapture.onSuspend.onSuspendCapture.onTimeUpdate.onTimeUpdateCapture.onVolumeChange.onVolumeChangeCapture.onWaiting.onWaitingCapture.onAuxClick.onAuxClickCapture.onClick.onClickCapture.onContextMenu.onContextMenuCapture.onDoubleClick.onDoubleClickCapture.onDrag.onDragCapture.onDragEnd.onDragEndCapture.onDragEnter.onDragEnterCapture.onDragExit.onDragExitCapture.onDragLeave.onDragLeaveCapture.onDragOver.onDragOverCapture.onDragStart.onDragStartCapture.onDrop.onDropCapture.onMouseDown.onMouseDownCapture.onMouseEnter.onMouseLeave.onMouseMove.onMouseMoveCapture.onMouseOut.onMouseOutCapture.onMouseOver.onMouseOverCapture.onMouseUp.onMouseUpCapture.onSelect.onSelectCapture.onTouchCancel.onTouchCancelCapture.onTouchEnd.onTouchEndCapture.onTouchMove.onTouchMoveCapture.onTouchStart.onTouchStartCapture.onPointerDown.onPointerDownCapture.onPointerMove.onPointerMoveCapture.onPointerUp.onPointerUpCapture.onPointerCancel.onPointerCancelCapture.onPointerEnter.onPointerEnterCapture.onPointerLeave.onPointerLeaveCapture.onPointerOver.onPointerOverCapture.onPointerOut.onPointerOutCapture.onGotPointerCapture.onGotPointerCaptureCapture.onLostPointerCapture.onLostPointerCaptureCapture.onScroll.onScrollCapture.onWheel.onWheelCapture.onAnimationStart.onAnimationStartCapture.onAnimationEnd.onAnimationEndCapture.onAnimationIteration.onAnimationIterationCapture.onTransitionEnd.onTransitionEndCapture`.split(`.`);function rx(e){return typeof e==`string`&&Nce.includes(e)}var Pce=new Set(`aria-activedescendant.aria-atomic.aria-autocomplete.aria-busy.aria-checked.aria-colcount.aria-colindex.aria-colspan.aria-controls.aria-current.aria-describedby.aria-details.aria-disabled.aria-errormessage.aria-expanded.aria-flowto.aria-haspopup.aria-hidden.aria-invalid.aria-keyshortcuts.aria-label.aria-labelledby.aria-level.aria-live.aria-modal.aria-multiline.aria-multiselectable.aria-orientation.aria-owns.aria-placeholder.aria-posinset.aria-pressed.aria-readonly.aria-relevant.aria-required.aria-roledescription.aria-rowcount.aria-rowindex.aria-rowspan.aria-selected.aria-setsize.aria-sort.aria-valuemax.aria-valuemin.aria-valuenow.aria-valuetext.className.color.height.id.lang.max.media.method.min.name.style.target.width.role.tabIndex.accentHeight.accumulate.additive.alignmentBaseline.allowReorder.alphabetic.amplitude.arabicForm.ascent.attributeName.attributeType.autoReverse.azimuth.baseFrequency.baselineShift.baseProfile.bbox.begin.bias.by.calcMode.capHeight.clip.clipPath.clipPathUnits.clipRule.colorInterpolation.colorInterpolationFilters.colorProfile.colorRendering.contentScriptType.contentStyleType.cursor.cx.cy.d.decelerate.descent.diffuseConstant.direction.display.divisor.dominantBaseline.dur.dx.dy.edgeMode.elevation.enableBackground.end.exponent.externalResourcesRequired.fill.fillOpacity.fillRule.filter.filterRes.filterUnits.floodColor.floodOpacity.focusable.fontFamily.fontSize.fontSizeAdjust.fontStretch.fontStyle.fontVariant.fontWeight.format.from.fx.fy.g1.g2.glyphName.glyphOrientationHorizontal.glyphOrientationVertical.glyphRef.gradientTransform.gradientUnits.hanging.horizAdvX.horizOriginX.href.ideographic.imageRendering.in2.in.intercept.k1.k2.k3.k4.k.kernelMatrix.kernelUnitLength.kerning.keyPoints.keySplines.keyTimes.lengthAdjust.letterSpacing.lightingColor.limitingConeAngle.local.markerEnd.markerHeight.markerMid.markerStart.markerUnits.markerWidth.mask.maskContentUnits.maskUnits.mathematical.mode.numOctaves.offset.opacity.operator.order.orient.orientation.origin.overflow.overlinePosition.overlineThickness.paintOrder.panose1.pathLength.patternContentUnits.patternTransform.patternUnits.pointerEvents.pointsAtX.pointsAtY.pointsAtZ.preserveAlpha.preserveAspectRatio.primitiveUnits.r.radius.refX.refY.renderingIntent.repeatCount.repeatDur.requiredExtensions.requiredFeatures.restart.result.rotate.rx.ry.seed.shapeRendering.slope.spacing.specularConstant.specularExponent.speed.spreadMethod.startOffset.stdDeviation.stemh.stemv.stitchTiles.stopColor.stopOpacity.strikethroughPosition.strikethroughThickness.string.stroke.strokeDasharray.strokeDashoffset.strokeLinecap.strokeLinejoin.strokeMiterlimit.strokeOpacity.strokeWidth.surfaceScale.systemLanguage.tableValues.targetX.targetY.textAnchor.textDecoration.textLength.textRendering.to.transform.u1.u2.underlinePosition.underlineThickness.unicode.unicodeBidi.unicodeRange.unitsPerEm.vAlphabetic.values.vectorEffect.version.vertAdvY.vertOriginX.vertOriginY.vHanging.vIdeographic.viewTarget.visibility.vMathematical.widths.wordSpacing.writingMode.x1.x2.x.xChannelSelector.xHeight.xlinkActuate.xlinkArcrole.xlinkHref.xlinkRole.xlinkShow.xlinkTitle.xlinkType.xmlBase.xmlLang.xmlns.xmlnsXlink.xmlSpace.y1.y2.y.yChannelSelector.z.zoomAndPan.ref.key.angle`.split(`.`));function ix(e){return typeof e==`string`&&Pce.has(e)}function ax(e){return typeof e==`string`&&e.startsWith(`data-`)}function ox(e){if(typeof e!=`object`||!e)return{};var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(ix(n)||ax(n))&&(t[n]=e[n]);return t}function Fce(e){if(e==null)return null;if((0,_.isValidElement)(e)&&typeof e.props==`object`&&e.props!==null){var t=e.props;return ox(t)}return typeof e==`object`&&!Array.isArray(e)?ox(e):null}function sx(e){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(ix(n)||ax(n)||rx(n))&&(t[n]=e[n]);return t}var Ice=[`children`,`width`,`height`,`viewBox`,`className`,`style`,`title`,`desc`];function cx(){return cx=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},cx.apply(null,arguments)}function Lce(e,t){if(e==null)return{};var n,r,i=Rce(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Rce(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var zce=(0,_.forwardRef)((e,t)=>{var n=e.children,r=e.width,i=e.height,a=e.viewBox,o=e.className,s=e.style,c=e.title,l=e.desc,u=Lce(e,Ice),d=a||{width:r,height:i,x:0,y:0},f=$n(`recharts-surface`,o);return _.createElement(`svg`,cx({},sx(u),{className:f,width:r,height:i,style:s,viewBox:`${d.x} ${d.y} ${d.width} ${d.height}`,ref:t}),_.createElement(`title`,null,c),_.createElement(`desc`,null,l),n)});function lx(e){return e===`__proto__`}var Bce=/\.|(\[(?:[^[\]]*|(["'])(?:(?!\2)[^\\]|\\.)*?\2)\])/;function ux(e){switch(typeof e){case`number`:case`symbol`:return!1;case`string`:return e===``||e.startsWith(`.`)||e.endsWith(`.`)?!1:Bce.test(e);default:return!1}}function dx(e){return typeof e==`string`||typeof e==`symbol`?e:Object.is(e?.valueOf?.(),-0)?`-0`:String(e)}function fx(e){return typeof e==`symbol`||e instanceof Symbol}function Vce(e){return e==null?``:px(e)}function px(e){if(typeof e==`string`)return e;if(Array.isArray(e))return e.map(px).join(`,`);if(fx(e))return e.toString();let t=e+``;return t===`0`&&Object.is(Number(e),-0)?`-0`:t}function mx(e){if(Array.isArray(e))return e.map(dx);if(typeof e==`symbol`)return[e];e=Vce(e);let t=[],n=e.length;if(n===0)return t;let r=0,i=``,a=``,o=!1,s=!1,c=/^-?\d+(?:\.\d+)?$/;for(e.charCodeAt(0)===46&&t.push(``);r<n;){let l=e[r];if(a)l===`\\`&&r+1<n?(r++,i+=e[r]):l===a?a=``:i+=l;else if(o){if(l===`"`||l===`'`)a=l,s=!0;else if(l===`]`){if(o=!1,!s&&i.includes(`.`)&&!c.test(i)){let e=i.split(`.`);for(let n=0;n<e.length;n++)e[n]!==``&&t.push(e[n])}else t.push(i);i=``}else i+=l}else if(l===`[`)o=!0,s=!1,i&&=(t.push(i),``);else if(l===`.`){i&&=(t.push(i),``);let n=e[r+1];(n===void 0||n===`.`)&&t.push(``)}else i+=l;r++}return i&&t.push(i),t}function hx(e,t,n){if(e==null)return n;switch(typeof t){case`string`:{if(lx(t))return n;let r=e[t];return r===void 0?ux(t)&&!Object.hasOwn(e,t)?hx(e,mx(t),n):n:r}case`number`:case`symbol`:{typeof t==`number`&&(t=dx(t));let r=e[t];return r===void 0?n:r}default:{if(Array.isArray(t))return Hce(e,t,n);if(t=Object.is(t?.valueOf(),-0)?`-0`:String(t),lx(t))return n;let r=e[t];return r===void 0?n:r}}}function Hce(e,t,n){if(t.length===0)return n;let r=e;for(let e=0;e<t.length;e++){if(r==null||lx(t[e]))return n;r=r[t[e]]}return r===void 0?n:r}var Uce=4;function gx(e){var t=10**(arguments.length>1&&arguments[1]!==void 0?arguments[1]:Uce),n=Math.round(e*t)/t;return Object.is(n,-0)?0:n}function _x(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return e.reduce((e,t,r)=>{var i=n[r-1];return typeof i==`string`?e+i+t:i===void 0?e+t:e+gx(i)+t},``)}var vx=e=>e===0?0:e>0?1:-1,yx=e=>typeof e==`number`&&e!=+e,bx=e=>typeof e==`string`&&e.length>1&&e.indexOf(`%`)===e.length-1,xx=e=>(typeof e==`number`||e instanceof Number)&&!yx(e),Sx=e=>xx(e)||typeof e==`string`,Cx=0,wx=e=>{var t=++Cx;return`${e||``}${t}`},Tx=function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,r=arguments.length>3&&arguments[3]!==void 0&&arguments[3];if(!xx(e)&&typeof e!=`string`)return n;var i;if(bx(e)){if(t==null)return n;var a=e.indexOf(`%`);i=t*parseFloat(e.slice(0,a))/100}else i=+e;return yx(i)&&(i=n),r&&t!=null&&i>t&&(i=t),i},Ex=e=>{if(!Array.isArray(e))return!1;for(var t=e.length,n={},r=0;r<t;r++)if(!n[String(e[r])])n[String(e[r])]=!0;else return!0;return!1};function Dx(e,t,n){return xx(e)&&xx(t)?gx(e+n*(t-e)):t}function Ox(e,t,n){if(e&&e.length)return e.find(e=>e&&(typeof t==`function`?t(e):hx(e,t))===n)}var kx=e=>e==null,Ax=e=>kx(e)?e:`${e.charAt(0).toUpperCase()}${e.slice(1)}`;function jx(e){return e!=null}function Mx(){}function Wce(e){if(e)return{x:e.x,y:e.y,upperWidth:`upperWidth`in e?e.upperWidth:e.width,lowerWidth:`lowerWidth`in e?e.lowerWidth:e.width,width:e.width,height:e.height}}function Nx(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Px(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Nx(Object(n),!0).forEach(function(t){Gce(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Nx(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Gce(e,t,n){return(t=Kce(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Kce(e){var t=qce(e,`string`);return typeof t==`symbol`?t:t+``}function qce(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var Jce=e=>{var t=e.viewBox,n=e.position,r=e.offset,i=r===void 0?0:r,a=e.parentViewBox,o=e.clamp,s=Wce(t),c=s.x,l=s.y,u=s.height,d=s.upperWidth,f=s.lowerWidth,p=c,m=c+(d-f)/2,h=(p+m)/2,g=(d+f)/2,_=p+d/2,v=u>=0?1:-1,y=v*i,b=v>0?`end`:`start`,x=v>0?`start`:`end`,S=d>=0?1:-1,C=S*i,w=S>0?`end`:`start`,T=S>0?`start`:`end`,E=a;if(n===`top`){var D={x:p+d/2,y:l-y,horizontalAnchor:`middle`,verticalAnchor:b};return o&&E&&(D.height=Math.max(l-E.y,0),D.width=d),D}if(n===`bottom`){var O={x:m+f/2,y:l+u+y,horizontalAnchor:`middle`,verticalAnchor:x};return o&&E&&(O.height=Math.max(E.y+E.height-(l+u),0),O.width=f),O}if(n===`left`){var k={x:h-C,y:l+u/2,horizontalAnchor:w,verticalAnchor:`middle`};return o&&E&&(k.width=Math.max(k.x-E.x,0),k.height=u),k}if(n===`right`){var A={x:h+g+C,y:l+u/2,horizontalAnchor:T,verticalAnchor:`middle`};return o&&E&&(A.width=Math.max(E.x+E.width-A.x,0),A.height=u),A}var j=o&&E?{width:g,height:u}:{};return n===`insideLeft`?Px({x:h+C,y:l+u/2,horizontalAnchor:T,verticalAnchor:`middle`},j):n===`insideRight`?Px({x:h+g-C,y:l+u/2,horizontalAnchor:w,verticalAnchor:`middle`},j):n===`insideTop`?Px({x:p+d/2,y:l+y,horizontalAnchor:`middle`,verticalAnchor:x},j):n===`insideBottom`?Px({x:m+f/2,y:l+u-y,horizontalAnchor:`middle`,verticalAnchor:b},j):n===`insideTopLeft`?Px({x:p+C,y:l+y,horizontalAnchor:T,verticalAnchor:x},j):n===`insideTopRight`?Px({x:p+d-C,y:l+y,horizontalAnchor:w,verticalAnchor:x},j):n===`insideBottomLeft`?Px({x:m+C,y:l+u-y,horizontalAnchor:T,verticalAnchor:b},j):n===`insideBottomRight`?Px({x:m+f-C,y:l+u-y,horizontalAnchor:w,verticalAnchor:b},j):n&&typeof n==`object`&&(xx(n.x)||bx(n.x))&&(xx(n.y)||bx(n.y))?Px({x:c+Tx(n.x,g),y:l+Tx(n.y,u),horizontalAnchor:`end`,verticalAnchor:`end`},j):Px({x:_,y:l+u/2,horizontalAnchor:`middle`,verticalAnchor:`middle`},j)},Yce=[`top`,`left`,`right`,`bottom`];function Fx(e){return e==null?!1:typeof e==`object`||Yce.includes(e)}var Xce=(0,_.createContext)(null),Zce=()=>(0,_.useContext)(Xce);function Ix(e){return function(){return e}}var Lx=Math.cos,Rx=Math.sin,zx=Math.sqrt,Bx=Math.PI;Bx/2;var Vx=2*Bx,Hx=Math.PI,Ux=2*Hx,Wx=1e-6,Qce=Ux-Wx;function Gx(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function $ce(e){let t=Math.floor(e);if(!(t>=0))throw Error(`invalid digits: ${e}`);if(t>15)return Gx;let n=10**t;return function(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=Math.round(arguments[t]*n)/n+e[t]}}var Kx=class{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._=``,this._append=e==null?Gx:$ce(e)}moveTo(e,t){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,t){this._append`L${this._x1=+e},${this._y1=+t}`}quadraticCurveTo(e,t,n,r){this._append`Q${+e},${+t},${this._x1=+n},${this._y1=+r}`}bezierCurveTo(e,t,n,r,i,a){this._append`C${+e},${+t},${+n},${+r},${this._x1=+i},${this._y1=+a}`}arcTo(e,t,n,r,i){if(e=+e,t=+t,n=+n,r=+r,i=+i,i<0)throw Error(`negative radius: ${i}`);let a=this._x1,o=this._y1,s=n-e,c=r-t,l=a-e,u=o-t,d=l*l+u*u;if(this._x1===null)this._append`M${this._x1=e},${this._y1=t}`;else if(d>Wx){if(!(Math.abs(u*s-c*l)>Wx)||!i)this._append`L${this._x1=e},${this._y1=t}`;else{let f=n-a,p=r-o,m=s*s+c*c,h=f*f+p*p,g=Math.sqrt(m),_=Math.sqrt(d),v=i*Math.tan((Hx-Math.acos((m+d-h)/(2*g*_)))/2),y=v/_,b=v/g;Math.abs(y-1)>Wx&&this._append`L${e+y*l},${t+y*u}`,this._append`A${i},${i},0,0,${+(u*f>l*p)},${this._x1=e+b*s},${this._y1=t+b*c}`}}}arc(e,t,n,r,i,a){if(e=+e,t=+t,n=+n,a=!!a,n<0)throw Error(`negative radius: ${n}`);let o=n*Math.cos(r),s=n*Math.sin(r),c=e+o,l=t+s,u=1^a,d=a?r-i:i-r;this._x1===null?this._append`M${c},${l}`:(Math.abs(this._x1-c)>Wx||Math.abs(this._y1-l)>Wx)&&this._append`L${c},${l}`,n&&(d<0&&(d=d%Ux+Ux),d>Qce?this._append`A${n},${n},0,1,${u},${e-o},${t-s}A${n},${n},0,1,${u},${this._x1=c},${this._y1=l}`:d>Wx&&this._append`A${n},${n},0,${+(d>=Hx)},${u},${this._x1=e+n*Math.cos(i)},${this._y1=t+n*Math.sin(i)}`)}rect(e,t,n,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}h${n=+n}v${+r}h${-n}Z`}toString(){return this._}};Kx.prototype;function qx(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{let e=Math.floor(n);if(!(e>=0))throw RangeError(`invalid digits: ${n}`);t=e}return e},()=>new Kx(t)}Array.prototype.slice;function Jx(e){return typeof e==`object`&&`length`in e?e:Array.from(e)}function Yx(e){this._context=e}Yx.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t)}}};function Xx(e){return new Yx(e)}function Zx(e){return e[0]}function Qx(e){return e[1]}function $x(e,t){var n=Ix(!0),r=null,i=Xx,a=null,o=qx(s);e=typeof e==`function`?e:e===void 0?Zx:Ix(e),t=typeof t==`function`?t:t===void 0?Qx:Ix(t);function s(s){var c,l=(s=Jx(s)).length,u,d=!1,f;for(r??(a=i(f=o())),c=0;c<=l;++c)!(c<l&&n(u=s[c],c,s))===d&&((d=!d)?a.lineStart():a.lineEnd()),d&&a.point(+e(u,c,s),+t(u,c,s));if(f)return a=null,f+``||null}return s.x=function(t){return arguments.length?(e=typeof t==`function`?t:Ix(+t),s):e},s.y=function(e){return arguments.length?(t=typeof e==`function`?e:Ix(+e),s):t},s.defined=function(e){return arguments.length?(n=typeof e==`function`?e:Ix(!!e),s):n},s.curve=function(e){return arguments.length?(i=e,r!=null&&(a=i(r)),s):i},s.context=function(e){return arguments.length?(e==null?r=a=null:a=i(r=e),s):r},s}function eS(e,t,n){var r=null,i=Ix(!0),a=null,o=Xx,s=null,c=qx(l);e=typeof e==`function`?e:e===void 0?Zx:Ix(+e),t=typeof t==`function`?t:Ix(t===void 0?0:+t),n=typeof n==`function`?n:n===void 0?Qx:Ix(+n);function l(l){var u,d,f,p=(l=Jx(l)).length,m,h=!1,g,_=Array(p),v=Array(p);for(a??(s=o(g=c())),u=0;u<=p;++u){if(!(u<p&&i(m=l[u],u,l))===h){if(h=!h)d=u,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),f=u-1;f>=d;--f)s.point(_[f],v[f]);s.lineEnd(),s.areaEnd()}}h&&(_[u]=+e(m,u,l),v[u]=+t(m,u,l),s.point(r?+r(m,u,l):_[u],n?+n(m,u,l):v[u]))}if(g)return s=null,g+``||null}function u(){return $x().defined(i).curve(o).context(a)}return l.x=function(t){return arguments.length?(e=typeof t==`function`?t:Ix(+t),r=null,l):e},l.x0=function(t){return arguments.length?(e=typeof t==`function`?t:Ix(+t),l):e},l.x1=function(e){return arguments.length?(r=e==null?null:typeof e==`function`?e:Ix(+e),l):r},l.y=function(e){return arguments.length?(t=typeof e==`function`?e:Ix(+e),n=null,l):t},l.y0=function(e){return arguments.length?(t=typeof e==`function`?e:Ix(+e),l):t},l.y1=function(e){return arguments.length?(n=e==null?null:typeof e==`function`?e:Ix(+e),l):n},l.lineX0=l.lineY0=function(){return u().x(e).y(t)},l.lineY1=function(){return u().x(e).y(n)},l.lineX1=function(){return u().x(r).y(t)},l.defined=function(e){return arguments.length?(i=typeof e==`function`?e:Ix(!!e),l):i},l.curve=function(e){return arguments.length?(o=e,a!=null&&(s=o(a)),l):o},l.context=function(e){return arguments.length?(e==null?a=s=null:s=o(a=e),l):a},l}var tS=class{constructor(e,t){this._context=e,this._x=t}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,t,e,t):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+t)/2,e,this._y0,e,t)}this._x0=e,this._y0=t}};function ele(e){return new tS(e,!0)}function tle(e){return new tS(e,!1)}var nS={draw(e,t){let n=zx(t/Bx);e.moveTo(n,0),e.arc(0,0,n,0,Vx)}},nle={draw(e,t){let n=zx(t/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}},rS=zx(1/3),rle=rS*2,ile={draw(e,t){let n=zx(t/rle),r=n*rS;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},ale={draw(e,t){let n=zx(t),r=-n/2;e.rect(r,r,n,n)}},ole=.8908130915292852,iS=Rx(Bx/10)/Rx(7*Bx/10),sle=Rx(Vx/10)*iS,cle=-Lx(Vx/10)*iS,lle={draw(e,t){let n=zx(t*ole),r=sle*n,i=cle*n;e.moveTo(0,-n),e.lineTo(r,i);for(let t=1;t<5;++t){let a=Vx*t/5,o=Lx(a),s=Rx(a);e.lineTo(s*n,-o*n),e.lineTo(o*r-s*i,s*r+o*i)}e.closePath()}},aS=zx(3),ule={draw(e,t){let n=-zx(t/(aS*3));e.moveTo(0,n*2),e.lineTo(-aS*n,-n),e.lineTo(aS*n,-n),e.closePath()}},oS=-.5,sS=zx(3)/2,cS=1/zx(12),dle=(cS/2+1)*3,fle={draw(e,t){let n=zx(t/dle),r=n/2,i=n*cS,a=r,o=n*cS+n,s=-a,c=o;e.moveTo(r,i),e.lineTo(a,o),e.lineTo(s,c),e.lineTo(oS*r-sS*i,sS*r+oS*i),e.lineTo(oS*a-sS*o,sS*a+oS*o),e.lineTo(oS*s-sS*c,sS*s+oS*c),e.lineTo(oS*r+sS*i,oS*i-sS*r),e.lineTo(oS*a+sS*o,oS*o-sS*a),e.lineTo(oS*s+sS*c,oS*c-sS*s),e.closePath()}};function ple(e,t){let n=null,r=qx(i);e=typeof e==`function`?e:Ix(e||nS),t=typeof t==`function`?t:Ix(t===void 0?64:+t);function i(){let i;if(n||=i=r(),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),i)return n=null,i+``||null}return i.type=function(t){return arguments.length?(e=typeof t==`function`?t:Ix(t),i):e},i.size=function(e){return arguments.length?(t=typeof e==`function`?e:Ix(+e),i):t},i.context=function(e){return arguments.length?(n=e??null,i):n},i}function lS(){}function uS(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function dS(e){this._context=e}dS.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:uS(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:uS(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function mle(e){return new dS(e)}function fS(e){this._context=e}fS.prototype={areaStart:lS,areaEnd:lS,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:uS(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function hle(e){return new fS(e)}function pS(e){this._context=e}pS.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:uS(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function gle(e){return new pS(e)}function mS(e){this._context=e}mS.prototype={areaStart:lS,areaEnd:lS,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function _le(e){return new mS(e)}function hS(e){return e<0?-1:1}function gS(e,t,n){var r=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(r||i<0&&-0),o=(n-e._y1)/(i||r<0&&-0),s=(a*i+o*r)/(r+i);return(hS(a)+hS(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function _S(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function vS(e,t,n){var r=e._x0,i=e._y0,a=e._x1,o=e._y1,s=(a-r)/3;e._context.bezierCurveTo(r+s,i+s*t,a-s,o-s*n,a,o)}function yS(e){this._context=e}yS.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:vS(this,this._t0,_S(this,this._t0))}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,e!==this._x1||t!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,vS(this,_S(this,n=gS(this,e,t)),n);break;default:vS(this,this._t0,n=gS(this,e,t))}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function bS(e){this._context=new xS(e)}(bS.prototype=Object.create(yS.prototype)).point=function(e,t){yS.prototype.point.call(this,t,e)};function xS(e){this._context=e}xS.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,a){this._context.bezierCurveTo(t,e,r,n,a,i)}};function vle(e){return new yS(e)}function yle(e){return new bS(e)}function SS(e){this._context=e}SS.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n){if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=CS(e),i=CS(t),a=0,o=1;o<n;++a,++o)this._context.bezierCurveTo(r[0][a],i[0][a],r[1][a],i[1][a],e[o],t[o])}(this._line||this._line!==0&&n===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function CS(e){var t,n=e.length-1,r,i=Array(n),a=Array(n),o=Array(n);for(i[0]=0,a[0]=2,o[0]=e[0]+2*e[1],t=1;t<n-1;++t)i[t]=1,a[t]=4,o[t]=4*e[t]+2*e[t+1];for(i[n-1]=2,a[n-1]=7,o[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)r=i[t]/a[t-1],a[t]-=r,o[t]-=r*o[t-1];for(i[n-1]=o[n-1]/a[n-1],t=n-2;t>=0;--t)i[t]=(o[t]-i[t+1])/a[t];for(a[n-1]=(e[n]+i[n-1])/2,t=0;t<n-1;++t)a[t]=2*e[t+1]-i[t+1];return[i,a]}function ble(e){return new SS(e)}function wS(e,t){this._context=e,this._t=t}wS.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}}this._x=e,this._y=t}};function xle(e){return new wS(e,.5)}function Sle(e){return new wS(e,0)}function Cle(e){return new wS(e,1)}function TS(e,t){if((o=e.length)>1)for(var n=1,r,i,a=e[t[0]],o,s=a.length;n<o;++n)for(i=a,a=e[t[n]],r=0;r<s;++r)a[r][1]+=a[r][0]=isNaN(i[r][1])?i[r][0]:i[r][1]}function ES(e){for(var t=e.length,n=Array(t);--t>=0;)n[t]=t;return n}function wle(e,t){return e[t]}function Tle(e){let t=[];return t.key=e,t}function Ele(){var e=Ix([]),t=ES,n=TS,r=wle;function i(i){var a=Array.from(e.apply(this,arguments),Tle),o,s=a.length,c=-1,l;for(let e of i)for(o=0,++c;o<s;++o)(a[o][c]=[0,+r(e,a[o].key,c,i)]).data=e;for(o=0,l=Jx(t(a));o<s;++o)a[l[o]].index=o;return n(a,l),a}return i.keys=function(t){return arguments.length?(e=typeof t==`function`?t:Ix(Array.from(t)),i):e},i.value=function(e){return arguments.length?(r=typeof e==`function`?e:Ix(+e),i):r},i.order=function(e){return arguments.length?(t=e==null?ES:typeof e==`function`?e:Ix(Array.from(e)),i):t},i.offset=function(e){return arguments.length?(n=e??TS,i):n},i}function Dle(e,t){if((r=e.length)>0){for(var n,r,i=0,a=e[0].length,o;i<a;++i){for(o=n=0;n<r;++n)o+=e[n][i][1]||0;if(o)for(n=0;n<r;++n)e[n][i][1]/=o}TS(e,t)}}function Ole(e,t){if((i=e.length)>0){for(var n=0,r=e[t[0]],i,a=r.length;n<a;++n){for(var o=0,s=0;o<i;++o)s+=e[o][n][1]||0;r[n][1]+=r[n][0]=-s/2}TS(e,t)}}function DS(e,t){if((o=e.length)>0&&(a=(i=e[t[0]]).length)>0){for(var n=0,r=1,i,a,o;r<a;++r){for(var s=0,c=0,l=0;s<o;++s){for(var u=e[t[s]],d=u[r][1]||0,f=(d-(u[r-1][1]||0))/2,p=0;p<s;++p){var m=e[t[p]],h=m[r][1]||0,g=m[r-1][1]||0;f+=h-g}c+=d,l+=f*d}i[r-1][1]+=i[r-1][0]=n,c&&(n-=l/c)}i[r-1][1]+=i[r-1][0]=n,TS(e,t)}}var OS=[`type`,`size`,`sizeType`];function kS(){return kS=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},kS.apply(null,arguments)}function AS(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function jS(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?AS(Object(n),!0).forEach(function(t){MS(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):AS(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function MS(e,t,n){return(t=NS(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function NS(e){var t=PS(e,`string`);return typeof t==`symbol`?t:t+``}function PS(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function FS(e,t){if(e==null)return{};var n,r,i=IS(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function IS(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var LS={symbolCircle:nS,symbolCross:nle,symbolDiamond:ile,symbolSquare:ale,symbolStar:lle,symbolTriangle:ule,symbolWye:fle},RS=Math.PI/180,zS=e=>LS[`symbol${Ax(e)}`]||nS,BS=(e,t,n)=>{if(t===`area`)return e;switch(n){case`cross`:return 5*e*e/9;case`diamond`:return .5*e*e/Math.sqrt(3);case`square`:return e*e;case`star`:var r=18*RS;return 1.25*e*e*(Math.tan(r)-Math.tan(r*2)*Math.tan(r)**2);case`triangle`:return Math.sqrt(3)*e*e/4;case`wye`:return(21-10*Math.sqrt(3))*e*e/8;default:return Math.PI*e*e/4}},VS=(e,t)=>{LS[`symbol${Ax(e)}`]=t},HS=e=>{var t=e.type,n=t===void 0?`circle`:t,r=e.size,i=r===void 0?64:r,a=e.sizeType,o=a===void 0?`area`:a,s=jS(jS({},FS(e,OS)),{},{type:n,size:i,sizeType:o}),c=`circle`;typeof n==`string`&&(c=n);var l=()=>{var e=zS(c),t=ple().type(e).size(BS(i,o,c))();if(t!==null)return t},u=s.className,d=s.cx,f=s.cy,p=sx(s);return xx(d)&&xx(f)&&xx(i)?_.createElement(`path`,kS({},p,{className:$n(`recharts-symbols`,u),transform:`translate(${d}, ${f})`,d:l()})):null};HS.registerSymbol=VS;var US=e=>`radius`in e&&`startAngle`in e&&`endAngle`in e,WS=(e,t)=>{if(!e||typeof e==`function`||typeof e==`boolean`)return null;var n=e;if((0,_.isValidElement)(e)&&(n=e.props),typeof n!=`object`&&typeof n!=`function`)return null;var r={};return Object.keys(n).forEach(e=>{rx(e)&&typeof n[e]==`function`&&(r[e]=t||(t=>n[e](n,t)))}),r},GS=(e,t,n)=>r=>(e(t,n,r),null),KS=(e,t,n)=>{if(e===null||typeof e!=`object`&&typeof e!=`function`)return null;var r=null;return Object.keys(e).forEach(i=>{var a=e[i];rx(i)&&typeof a==`function`&&(r||={},r[i]=GS(a,t,n))}),r};function qS(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function JS(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?qS(Object(n),!0).forEach(function(t){YS(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qS(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function YS(e,t,n){return(t=XS(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function XS(e){var t=ZS(e,`string`);return typeof t==`symbol`?t:t+``}function ZS(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function QS(e,t){var n=JS({},e),r=t;return Object.keys(t).reduce((e,t)=>(e[t]===void 0&&r[t]!==void 0&&(e[t]=r[t]),e),n)}function $S(){return $S=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},$S.apply(null,arguments)}function eC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function tC(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?eC(Object(n),!0).forEach(function(t){nC(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):eC(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function nC(e,t,n){return(t=rC(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function rC(e){var t=iC(e,`string`);return typeof t==`symbol`?t:t+``}function iC(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var aC=32,oC={align:`center`,iconSize:14,inactiveColor:`#ccc`,layout:`horizontal`,verticalAlign:`middle`,labelStyle:{}};function sC(e){if(typeof e==`object`&&e&&`strokeDasharray`in e)return String(e.strokeDasharray)}function cC(e){var t=e.data,n=e.iconType,r=e.inactiveColor,i=aC/2,a=aC/6,o=aC/3,s=t.inactive?r:t.color,c=n??t.type;if(c===`none`)return null;if(c===`plainline`)return _.createElement(`line`,{strokeWidth:4,fill:`none`,stroke:s,strokeDasharray:sC(t.payload),x1:0,y1:i,x2:aC,y2:i,className:`recharts-legend-icon`});if(c===`line`)return _.createElement(`path`,{strokeWidth:4,fill:`none`,stroke:s,d:`M0,${i}h${o}
26
- A${a},${a},0,1,1,${2*o},${i}
27
- H${aC}M${2*o},${i}
28
- A${a},${a},0,1,1,${o},${i}`,className:`recharts-legend-icon`});if(c===`rect`)return _.createElement(`path`,{stroke:`none`,fill:s,d:`M0,${aC/8}h${aC}v${aC*3/4}h${-aC}z`,className:`recharts-legend-icon`});if(_.isValidElement(t.legendIcon)){var l=tC({},t);return delete l.legendIcon,_.cloneElement(t.legendIcon,l)}return _.createElement(HS,{fill:s,cx:i,cy:i,size:aC,sizeType:`diameter`,type:c})}function lC(e){var t=e.payload,n=e.iconSize,r=e.layout,i=e.formatter,a=e.inactiveColor,o=e.iconType,s=e.labelStyle,c={x:0,y:0,width:aC,height:aC},l={display:r===`horizontal`?`inline-block`:`block`,marginRight:10,whiteSpace:`nowrap`},u={display:`inline-block`,verticalAlign:`middle`,marginRight:4};return t.map((t,r)=>{var d=t.formatter||i,f=$n({"recharts-legend-item":!0,[`legend-item-${r}`]:!0,inactive:t.inactive});if(t.type===`none`)return null;var p=typeof s==`object`?tC({},s):{};p.color=t.inactive?a:p.color||t.color,p.whiteSpace??=`normal`,p.overflowWrap??=`break-word`;var m=d?d(t.value,t,r):t.value;return _.createElement(`li`,$S({className:f,style:l,key:`legend-item-${r}`},KS(e,t,r)),_.createElement(zce,{width:n,height:n,viewBox:c,style:u,"aria-label":t.value==null?`legend icon`:`${t.value} legend icon`},_.createElement(cC,{data:t,iconType:o,inactiveColor:a})),_.createElement(`span`,{className:`recharts-legend-item-text`,style:p},m))})}var uC=e=>{var t=QS(e,oC),n=t.payload,r=t.layout,i=t.align;if(!n||!n.length)return null;var a={padding:0,margin:0,textAlign:r===`horizontal`?i:`left`};return _.createElement(`ul`,{className:`recharts-default-legend`,style:a},_.createElement(lC,$S({},t,{payload:n})))};function dC(e,t){let n=new Map;for(let r=0;r<e.length;r++){let i=e[r],a=t(i,r,e);n.has(a)||n.set(a,i)}return Array.from(n.values())}function fC(e,t){return function(...n){return e.apply(this,n.slice(0,t))}}function pC(e){return e}function mC(e){return Number.isSafeInteger(e)&&e>=0}function hC(e){return e!=null&&typeof e!=`function`&&mC(e.length)}function gC(e){return function(t){return hx(t,e)}}function _C(e){return e==null||typeof e!=`object`&&typeof e!=`function`}function vC(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function yC(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}function bC(e){return e==null?e===void 0?`[object Undefined]`:`[object Null]`:Object.prototype.toString.call(e)}var xC=`[object RegExp]`,SC=`[object String]`,CC=`[object Number]`,wC=`[object Boolean]`,TC=`[object Arguments]`,kle=`[object Symbol]`,Ale=`[object Date]`,jle=`[object Map]`,Mle=`[object Set]`,Nle=`[object Array]`,Ple=`[object ArrayBuffer]`,Fle=`[object Object]`,Ile=`[object DataView]`,Lle=`[object Uint8Array]`,Rle=`[object Uint8ClampedArray]`,zle=`[object Uint16Array]`,Ble=`[object Uint32Array]`,Vle=`[object Int8Array]`,Hle=`[object Int16Array]`,Ule=`[object Int32Array]`,Wle=`[object Float32Array]`,Gle=`[object Float64Array]`,EC=typeof globalThis==`object`&&globalThis||typeof window==`object`&&window||typeof self==`object`&&self||typeof global==`object`&&global||(function(){return this})();function Kle(e){return EC.Buffer!==void 0&&EC.Buffer.isBuffer(e)}function qle(e,t){return DC(e,void 0,e,new Map,t)}function DC(e,t,n,r=new Map,i=void 0){let a=i?.(e,t,n,r);if(a!==void 0)return a;if(_C(e))return e;if(r.has(e))return r.get(e);if(Array.isArray(e)){let t=Array(e.length);r.set(e,t);for(let a=0;a<e.length;a++)t[a]=DC(e[a],a,n,r,i);return Object.hasOwn(e,`index`)&&(t.index=e.index),Object.hasOwn(e,`input`)&&(t.input=e.input),t}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp){let t=new RegExp(e.source,e.flags);return t.lastIndex=e.lastIndex,t}if(e instanceof Map){let t=new Map;r.set(e,t);for(let[a,o]of e)t.set(a,DC(o,a,n,r,i));return t}if(e instanceof Set){let t=new Set;r.set(e,t);for(let a of e)t.add(DC(a,void 0,n,r,i));return t}if(Kle(e))return e.subarray();if(vC(e)){let t=new(Object.getPrototypeOf(e)).constructor(e.length);r.set(e,t);for(let a=0;a<e.length;a++)t[a]=DC(e[a],a,n,r,i);return t}if(e instanceof ArrayBuffer||typeof SharedArrayBuffer<`u`&&e instanceof SharedArrayBuffer)return e.slice(0);if(e instanceof DataView){let t=new DataView(e.buffer.slice(0),e.byteOffset,e.byteLength);return r.set(e,t),OC(t,e,n,r,i),t}if(typeof File<`u`&&e instanceof File){let t=new File([e],e.name,{type:e.type});return r.set(e,t),OC(t,e,n,r,i),t}if(typeof Blob<`u`&&e instanceof Blob){let t=new Blob([e],{type:e.type});return r.set(e,t),OC(t,e,n,r,i),t}if(e instanceof Error){let t=structuredClone(e);return r.set(e,t),t.message=e.message,t.name=e.name,t.stack=e.stack,t.cause=e.cause,t.constructor=e.constructor,OC(t,e,n,r,i),t}if(e instanceof Boolean){let t=new Boolean(e.valueOf());return r.set(e,t),OC(t,e,n,r,i),t}if(e instanceof Number){let t=new Number(e.valueOf());return r.set(e,t),OC(t,e,n,r,i),t}if(e instanceof String){let t=new String(e.valueOf());return r.set(e,t),OC(t,e,n,r,i),t}if(typeof e==`object`&&Jle(e)){let t=Object.create(Object.getPrototypeOf(e));return r.set(e,t),OC(t,e,n,r,i),t}return e}function OC(e,t,n=e,r,i){let a=[...Object.keys(t),...yC(t)];for(let o=0;o<a.length;o++){let s=a[o],c=Object.getOwnPropertyDescriptor(e,s);(c==null||c.writable)&&(e[s]=DC(t[s],s,n,r,i))}}function Jle(e){switch(bC(e)){case TC:case Nle:case Ple:case Ile:case wC:case Ale:case Wle:case Gle:case Vle:case Hle:case Ule:case jle:case CC:case Fle:case xC:case Mle:case SC:case kle:case Lle:case Rle:case zle:case Ble:return!0;default:return!1}}function Yle(e){return DC(e,void 0,e,new Map,void 0)}function kC(e,t){return e===t||Number.isNaN(e)&&Number.isNaN(t)}function AC(e){return e!==null&&(typeof e==`object`||typeof e==`function`)}function jC(e,t,n){return typeof n==`function`?MC(e,t,function e(t,r,i,a,o,s){let c=n(t,r,i,a,o,s);return c===void 0?MC(t,r,e,s,!1):!!c},new Map,!0):jC(e,t,()=>void 0)}function MC(e,t,n,r,i=!1){if(t===e)return!0;switch(typeof t){case`object`:return Xle(e,t,n,r,i);case`function`:return Object.keys(t).length>0?MC(e,{...t},n,r,i):kC(e,t);default:return AC(e)&&i?typeof t!=`string`||t===``:kC(e,t)}}function Xle(e,t,n,r,i=!1){if(t==null)return!0;if(Array.isArray(t))return NC(e,t,n,r);if(t instanceof Map)return Zle(e,t,n,r);if(t instanceof Set)return Qle(e,t,n,r);let a=Object.keys(t);if(e==null)return i&&a.length===0;if(i)_C(e)&&(e=Object(e));else{let t=bC(e);if(t!==`[object Object]`&&t!==`[object Arguments]`)return!1}if(a.length===0)return!0;if(r?.has(t))return r.get(t)===e;r?.set(t,e);try{for(let i=0;i<a.length;i++){let o=a[i];if(!(o in e)||t[o]===void 0&&e[o]!==void 0||t[o]===null&&e[o]!==null||!n(e[o],t[o],o,e,t,r))return!1}return!0}finally{r?.delete(t)}}function Zle(e,t,n,r){if(t.size===0)return!0;if(!(e instanceof Map))return!1;for(let[i,a]of t.entries())if(n(e.get(i),a,i,e,t,r)===!1)return!1;return!0}function NC(e,t,n,r){if(t.length===0)return!0;if(!Array.isArray(e))return!1;let i=new Set;for(let a=0;a<t.length;a++){let o=t[a],s=!1;for(let c=0;c<e.length;c++){if(i.has(c))continue;let l=e[c],u=!1;if(n(l,o,a,e,t,r)&&(u=!0),u){i.add(c),s=!0;break}}if(!s)return!1}return!0}function Qle(e,t,n,r){return t.size===0||e instanceof Set&&NC([...e],[...t],n,r)}function PC(e,t){return jC(e,t,()=>void 0)}function $le(e){return e=Yle(e),t=>PC(t,e)}function eue(e,t){return qle(e,(n,r,i,a)=>{let o=t?.(n,r,i,a);if(o!==void 0)return o;if(typeof e==`object`){if(bC(e)===`[object Object]`&&typeof e.constructor!=`function`){let t={};return a.set(e,t),OC(t,e,i,a),t}switch(Object.prototype.toString.call(e)){case CC:case SC:case wC:{let t=new e.constructor(e?.valueOf());return OC(t,e),t}case TC:{let t={};return OC(t,e),t.length=e.length,t[Symbol.iterator]=e[Symbol.iterator],t}default:return}}})}function tue(e){return eue(e)}var nue=/^(?:0|[1-9]\d*)$/;function FC(e,t=2**53-1){switch(typeof e){case`number`:return Number.isInteger(e)&&e>=0&&e<t;case`symbol`:return!1;case`string`:return nue.test(e)}}function rue(e){return typeof e==`object`&&!!e&&bC(e)===`[object Arguments]`}function iue(e,t){let n;if(n=Array.isArray(t)?t:typeof t==`string`&&ux(t)&&!(t in Object(e))?mx(t):[t],n.length===0)return!1;let r=e;for(let e=0;e<n.length;e++){let t=dx(n[e]);if((r==null||!Object.hasOwn(r,t))&&!((Array.isArray(r)||rue(r))&&FC(t)&&Number(t)<r.length))return!1;r=r[t]}return!0}function aue(e,t){switch(typeof e){case`object`:Object.is(e?.valueOf(),-0)&&(e=`-0`);break;case`number`:e=dx(e)}return t=tue(t),function(n){let r=hx(n,e);return r===void 0?iue(n,e):t===void 0?r===void 0:PC(r,t)}}function oue(e){if(e==null)return pC;switch(typeof e){case`function`:return e;case`object`:return Array.isArray(e)&&e.length===2?aue(e[0],e[1]):$le(e);default:return gC(e)}}function sue(e){return e===0?0:e}function IC(e,t=pC){return hC(e)?dC(Array.from(e),fC(oue(t),1)).map(sue):[]}function LC(e,t,n){return t===!0?IC(e,n):typeof t==`function`?IC(e,t):e}var RC=(0,_.createContext)(null),cue=e=>e,zC=()=>{var e=(0,_.useContext)(RC);return e?e.store.dispatch:cue},BC=()=>{},lue=()=>BC,uue=(e,t)=>e===t;function VC(e){var t=(0,_.useContext)(RC),n=(0,_.useMemo)(()=>t?t=>{if(t!=null)return e(t)}:BC,[t,e]);return(0,wc.useSyncExternalStoreWithSelector)(t?t.subscription.addNestedSub:lue,t?t.store.getState:BC,t?t.store.getState:BC,n,uue)}var due=(e,t,n)=>{if(t.length===1&&t[0]===n){let t=!1;try{let n={};e(n)===n&&(t=!0)}catch{}if(t){let e;try{throw Error()}catch(t){({stack:e}=t)}console.warn(`The result function returned its own inputs without modification. e.g
29
- \`createSelector([state => state.todos], todos => todos)\`
30
- This could lead to inefficient memoization and unnecessary re-renders.
31
- Ensure transformation logic is in the result function, and extraction logic is in the input selectors.`,{stack:e})}}},fue=(e,t,n)=>{let{memoize:r,memoizeOptions:i}=t,{inputSelectorResults:a,inputSelectorResultsCopy:o}=e,s=r(()=>({}),...i);if(s.apply(null,a)!==s.apply(null,o)){let e;try{throw Error()}catch(t){({stack:e}=t)}console.warn(`An input selector returned a different result when passed same arguments.
32
- This means your output selector will likely run more frequently than intended.
33
- Avoid returning a new reference inside your input selector, e.g.
34
- \`createSelector([state => state.todos.map(todo => todo.id)], todoIds => todoIds.length)\``,{arguments:n,firstInputs:a,secondInputs:o,stack:e})}},pue={inputStabilityCheck:`once`,identityFunctionCheck:`once`};function mue(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!=`function`)throw TypeError(t)}function hue(e,t=`expected all items to be functions, instead received the following types: `){if(!e.every(e=>typeof e==`function`)){let n=e.map(e=>typeof e==`function`?`function ${e.name||`unnamed`}()`:typeof e).join(`, `);throw TypeError(`${t}[${n}]`)}}var HC=e=>Array.isArray(e)?e:[e];function gue(e){let t=Array.isArray(e[0])?e[0]:e;return hue(t,`createSelector expects all input-selectors to be functions, but received the following types: `),t}function UC(e,t){let n=[],{length:r}=e;for(let i=0;i<r;i++)n.push(e[i].apply(null,t));return n}var _ue=(e,t)=>{let{identityFunctionCheck:n,inputStabilityCheck:r}={...pue,...t};return{identityFunctionCheck:{shouldRun:n===`always`||n===`once`&&e,run:due},inputStabilityCheck:{shouldRun:r===`always`||r===`once`&&e,run:fue}}},vue=class{constructor(e){this.value=e}deref(){return this.value}},WC=typeof WeakRef>`u`?vue:WeakRef,yue=0,GC=1;function KC(){return{s:yue,v:void 0,o:null,p:null}}function bue(e){return e instanceof WC?e.deref():e}function qC(e,t={}){let n=KC(),{resultEqualityCheck:r}=t,i,a=0;function o(){let t=n,{length:o}=arguments;for(let e=0,n=o;e<n;e++){let n=arguments[e];if(typeof n==`function`||typeof n==`object`&&n){let e=t.o;e===null&&(t.o=e=new WeakMap);let r=e.get(n);r===void 0?(t=KC(),e.set(n,t)):t=r}else{let e=t.p;e===null&&(t.p=e=new Map);let r=e.get(n);r===void 0?(t=KC(),e.set(n,t)):t=r}}let s=t,c;if(t.s===GC)c=t.v;else if(c=e.apply(null,arguments),a++,r){let e=bue(i);e!=null&&r(e,c)&&(c=e,a!==0&&a--),i=typeof c==`object`&&c||typeof c==`function`?new WC(c):c}return s.s=GC,s.v=c,c}return o.clearCache=()=>{n=KC(),o.resetResultsCount()},o.resultsCount=()=>a,o.resetResultsCount=()=>{a=0},o}function xue(e,...t){let n=typeof e==`function`?{memoize:e,memoizeOptions:t}:e,r=(...e)=>{let t=0,r=0,i,a={},o=e.pop();typeof o==`object`&&(a=o,o=e.pop()),mue(o,`createSelector expects an output function after the inputs, but received: [${typeof o}]`);let s={...n,...a},{memoize:c,memoizeOptions:l=[],argsMemoize:u=qC,argsMemoizeOptions:d=[]}=s,f=HC(l),p=HC(d),m=gue(e),h=c(function(){return t++,o.apply(null,arguments)},...f),g=!0,_=u(function(){r++;let e=UC(m,arguments);if(i=h.apply(null,e),process.env.NODE_ENV!==`production`){let{devModeChecks:t={}}=s,{identityFunctionCheck:n,inputStabilityCheck:r}=_ue(g,t);if(n.shouldRun&&n.run(o,e,i),r.shouldRun){let t=UC(m,arguments);r.run({inputSelectorResults:e,inputSelectorResultsCopy:t},{memoize:c,memoizeOptions:f},arguments)}g&&=!1}return i},...p);return Object.assign(_,{resultFunc:o,memoizedResultFunc:h,dependencies:m,dependencyRecomputations:()=>r,resetDependencyRecomputations:()=>{r=0},lastResult:()=>i,recomputations:()=>t,resetRecomputations:()=>{t=0},memoize:c,argsMemoize:u})};return Object.assign(r,{withTypes:()=>r}),r}var $=xue(qC);function Sue(e,t=1){let n=[],r=Math.floor(t),i=(e,t)=>{for(let a=0;a<e.length;a++){let o=e[a];Array.isArray(o)&&t<r?i(o,t+1):n.push(o)}};return i(e,0),n}function JC(e,t,n){return AC(n)&&(typeof t==`number`&&hC(n)&&FC(t)&&t<n.length||typeof t==`string`&&t in n)?kC(n[t],e):!1}function YC(e){return typeof e==`symbol`?1:e===null?2:e===void 0?3:e===e?0:4}var Cue=(e,t,n)=>{if(e!==t){let r=YC(e),i=YC(t);if(r===i&&r===0){if(e<t)return n===`desc`?1:-1;if(e>t)return n===`desc`?-1:1}return n===`desc`?i-r:r-i}return 0},wue=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Tue=/^\w*$/;function Eue(e,t){return Array.isArray(e)?!1:typeof e==`number`||typeof e==`boolean`||e==null||fx(e)?!0:typeof e==`string`&&(Tue.test(e)||!wue.test(e))||t!=null&&Object.hasOwn(t,e)}function Due(e,t,n,r){if(e==null)return[];n=r?void 0:n,Array.isArray(e)||(e=hC(e)?Array.from(e):Object.values(e)),Array.isArray(t)||(t=t==null?[null]:[t]),t.length===0&&(t=[null]),Array.isArray(n)||(n=n==null?[]:[n]),n=n.map(e=>String(e));let i=(e,t)=>{let n=e,r=0;for(;r<t.length&&n!=null;++r)n=n[t[r]];return r>0&&r===t.length?n:void 0},a=(e,t)=>{if(e==null)return t;if(t!=null)return typeof e==`object`&&`key`in e?Object.hasOwn(t,e.key)?t[e.key]:i(t,e.path):typeof e==`function`?e(t):Array.isArray(e)?i(t,e):t[e]},o=t.map(e=>(Array.isArray(e)&&e.length===1&&(e=e[0]),e==null||typeof e==`function`||Array.isArray(e)||Eue(e)?e:{key:e,path:mx(e)}));return e.map(e=>({original:e,criteria:o.map(t=>a(t,e))})).slice().sort((e,t)=>{for(let r=0;r<o.length;r++){let i=Cue(e.criteria[r],t.criteria[r],n[r]);if(i!==0)return i}return 0}).map(e=>e.original)}function XC(e,...t){let n=t.length;return n>1&&JC(e,t[0],t[1])?t=[]:n>2&&JC(t[0],t[1],t[2])&&(t=[t[0]]),Due(e,Sue(t),[`asc`])}var ZC=e=>e.legend.settings,Oue=e=>e.legend.size,kue=$([e=>e.legend.payload,ZC],(e,t)=>{var n=t.itemSorter,r=e.flat(1);return n?XC(r,n):r});function Aue(){return VC(kue)}function jue(e,t){return Fue(e)||Pue(e,t)||Nue(e,t)||Mue()}function Mue(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
35
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Nue(e,t){if(e){if(typeof e==`string`)return QC(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?QC(e,t):void 0}}function QC(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Pue(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function Fue(e){if(Array.isArray(e))return e}var $C=1;function ew(e,t){return Math.abs(e.height-t.height)>$C||Math.abs(e.left-t.left)>$C||Math.abs(e.top-t.top)>$C||Math.abs(e.width-t.width)>$C}function tw(e){var t=e.getBoundingClientRect();return{height:t.height,left:t.left,top:t.top,width:t.width}}function nw(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=jue((0,_.useState)({height:0,left:0,top:0,width:0}),2),n=t[0],r=t[1],i=(0,_.useRef)(null),a=(0,_.useRef)(n);a.current=n;var o=(0,_.useCallback)(e=>{if(i.current!=null&&(i.current.disconnect(),i.current=null),e!=null){var t=tw(e);if(ew(t,a.current)&&r(t),typeof ResizeObserver<`u`){var n=new ResizeObserver(()=>{var t=tw(e);ew(t,a.current)&&r(t)});n.observe(e),i.current=n}}},[...e]);return(0,_.useEffect)(()=>()=>{var e;(e=i.current)==null||e.disconnect()},[]),[n,o]}var rw=()=>Math.random().toString(36).substring(7).split(``).join(`.`);`${rw()}`,`${rw()}`;function Iue(e){if(typeof e!=`object`||!e)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function Lue(e){return Iue(e)&&`type`in e&&typeof e.type==`string`}var iw=Symbol.for(`immer-nothing`),aw=Symbol.for(`immer-draftable`),ow=Symbol.for(`immer-state`),Rue=process.env.NODE_ENV===`production`?[]:[function(e){return`The plugin for '${e}' has not been loaded into Immer. To enable the plugin, import and call \`enable${e}()\` when initializing your application.`},function(e){return`produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '${e}'`},`This object has been frozen and should not be mutated`,function(e){return`Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? `+e},`An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.`,`Immer forbids circular references`,"The first or second argument to `produce` must be a function","The third argument to `produce` must be a function or undefined","First argument to `createDraft` must be a plain object, an array, or an immerable object","First argument to `finishDraft` must be a draft returned by `createDraft`",function(e){return`'current' expects a draft, got: ${e}`},`Object.defineProperty() cannot be used on an Immer draft`,`Object.setPrototypeOf() cannot be used on an Immer draft`,`Immer only supports deleting array indices`,`Immer only supports setting array indices and the 'length' property`,function(e){return`'original' expects a draft, got: ${e}`}];function sw(e,...t){if(process.env.NODE_ENV!==`production`){let n=Rue[e],r=kw(n)?n.apply(null,t):n;throw Error(`[Immer] ${r}`)}throw Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var cw=Object,lw=cw.getPrototypeOf,uw=`constructor`,dw=`prototype`,fw=`configurable`,pw=`enumerable`,mw=`writable`,hw=`value`,gw=e=>!!e&&!!e[ow];function _w(e){return e?yw(e)||Tw(e)||!!e[aw]||!!e[uw]?.[aw]||Ew(e)||Dw(e):!1}var zue=cw[dw][uw].toString(),vw=new WeakMap;function yw(e){if(!e||!Ow(e))return!1;let t=lw(e);if(t===null||t===cw[dw])return!0;let n=cw.hasOwnProperty.call(t,uw)&&t[uw];if(n===Object)return!0;if(!kw(n))return!1;let r=vw.get(n);return r===void 0&&(r=Function.toString.call(n),vw.set(n,r)),r===zue}function bw(e,t,n=!0){xw(e)===0?(n?Reflect.ownKeys(e):cw.keys(e)).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function xw(e){let t=e[ow];return t?t.type_:Tw(e)?1:Ew(e)?2:Dw(e)?3:0}var Sw=(e,t,n=xw(e))=>n===2?e.has(t):cw[dw].hasOwnProperty.call(e,t),Cw=(e,t,n=xw(e))=>n===2?e.get(t):e[t],ww=(e,t,n,r=xw(e))=>{r===2?e.set(t,n):r===3?e.add(n):e[t]=n};function Bue(e,t){return e===t?e!==0||1/e==1/t:e!==e&&t!==t}var Tw=Array.isArray,Ew=e=>e instanceof Map,Dw=e=>e instanceof Set,Ow=e=>typeof e==`object`,kw=e=>typeof e==`function`,Aw=e=>typeof e==`boolean`;function Vue(e){let t=+e;return Number.isInteger(t)&&String(t)===e}var jw=e=>e.copy_||e.base_,Mw=e=>e.modified_?e.copy_:e.base_;function Nw(e,t){if(Ew(e))return new Map(e);if(Dw(e))return new Set(e);if(Tw(e))return Array[dw].slice.call(e);let n=yw(e);if(t===!0||t===`class_only`&&!n){let t=cw.getOwnPropertyDescriptors(e);delete t[ow];let n=Reflect.ownKeys(t);for(let r=0;r<n.length;r++){let i=n[r],a=t[i];a[mw]===!1&&(a[mw]=!0,a[fw]=!0),(a.get||a.set)&&(t[i]={[fw]:!0,[mw]:!0,[pw]:a[pw],[hw]:e[i]})}return cw.create(lw(e),t)}{let t=lw(e);if(t!==null&&n)return{...e};let r=cw.create(t);return cw.assign(r,e)}}function Pw(e,t=!1){return Iw(e)||gw(e)||!_w(e)?e:(xw(e)>1&&cw.defineProperties(e,{set:Fw,add:Fw,clear:Fw,delete:Fw}),cw.freeze(e),t&&bw(e,(e,t)=>{Pw(t,!0)},!1),e)}function Hue(){sw(2)}var Fw={[hw]:Hue};function Iw(e){return e===null||!Ow(e)||cw.isFrozen(e)}var Lw=`MapSet`,Rw=`Patches`,zw=`ArrayMethods`,Bw={};function Vw(e){let t=Bw[e];return t||sw(0,e),t}var Hw=e=>!!Bw[e],Uw,Ww=()=>Uw,Uue=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:Hw(Lw)?Vw(Lw):void 0,arrayMethodsPlugin_:Hw(zw)?Vw(zw):void 0});function Gw(e,t){t&&(e.patchPlugin_=Vw(Rw),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Kw(e){qw(e),e.drafts_.forEach(Wue),e.drafts_=null}function qw(e){e===Uw&&(Uw=e.parent_)}var Jw=e=>Uw=Uue(Uw,e);function Wue(e){let t=e[ow];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Yw(e,t){t.unfinalizedDrafts_=t.drafts_.length;let n=t.drafts_[0];if(e!==void 0&&e!==n){n[ow].modified_&&(Kw(t),sw(4)),_w(e)&&(e=Xw(t,e));let{patchPlugin_:r}=t;r&&r.generateReplacementPatches_(n[ow].base_,e,t)}else e=Xw(t,n);return Gue(t,e,!0),Kw(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e===iw?void 0:e}function Xw(e,t){if(Iw(t))return t;let n=t[ow];if(!n)return tT(t,e.handledSet_,e);if(!Qw(n,e))return t;if(!n.modified_)return n.base_;if(!n.finalized_){let{callbacks_:t}=n;if(t)for(;t.length>0;)t.pop()(e);eT(n,e)}return n.copy_}function Gue(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Pw(t,n)}function Zw(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var Qw=(e,t)=>e.scope_===t,Kue=[];function $w(e,t,n,r){let i=jw(e),a=e.type_;if(r!==void 0&&Cw(i,r,a)===t){ww(i,r,n,a);return}if(!e.draftLocations_){let t=e.draftLocations_=new Map;bw(i,(e,n)=>{if(gw(n)){let r=t.get(n)||[];r.push(e),t.set(n,r)}})}let o=e.draftLocations_.get(t)??Kue;for(let e of o)ww(i,e,n,a)}function que(e,t,n){e.callbacks_.push(function(r){let i=t;if(!i||!Qw(i,r))return;r.mapSetPlugin_?.fixSetContents(i);let a=Mw(i);$w(e,i.draft_??i,a,n),eT(i,r)})}function eT(e,t){if(e.modified_&&!e.finalized_&&(e.type_===3||e.type_===1&&e.allIndicesReassigned_||(e.assigned_?.size??0)>0)){let{patchPlugin_:n}=t;if(n){let r=n.getPath(e);r&&n.generatePatches_(e,r,t)}Zw(e)}}function Jue(e,t,n){let{scope_:r}=e;if(gw(n)){let i=n[ow];Qw(i,r)&&i.callbacks_.push(function(){sT(e),$w(e,n,Mw(i),t)})}else _w(n)&&e.callbacks_.push(function(){let i=jw(e);e.type_===3?i.has(n)&&tT(n,r.handledSet_,r):Cw(i,t,e.type_)===n&&r.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&tT(Cw(e.copy_,t,e.type_),r.handledSet_,r)})}function tT(e,t,n){return!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1||gw(e)||t.has(e)||!_w(e)||Iw(e)?e:(t.add(e),bw(e,(r,i)=>{if(gw(i)){let t=i[ow];Qw(t,n)&&(ww(e,r,Mw(t),e.type_),Zw(t))}else _w(i)&&tT(i,t,n)}),e)}function Yue(e,t){let n=Tw(e),r={type_:+!!n,scope_:t?t.scope_:Ww(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0},i=r,a=nT;n&&(i=[r],a=rT);let{revoke:o,proxy:s}=Proxy.revocable(i,a);return r.draft_=s,r.revoke_=o,[s,r]}var nT={get(e,t){if(t===ow)return e;let n=e.scope_.arrayMethodsPlugin_,r=e.type_===1&&typeof t==`string`;if(r&&n?.isArrayOperationMethod(t))return n.createMethodInterceptor(e,t);let i=jw(e);if(!Sw(i,t,e.type_))return Zue(e,i,t);let a=i[t];if(e.finalized_||!_w(a)||r&&e.operationMethod&&n?.isMutatingArrayMethod(e.operationMethod)&&Vue(t))return a;if(a===iT(e.base_,t)||Xue(e,t,a)){sT(e);let n=e.type_===1?+t:t,r=cT(e.scope_,a,e,n);return e.copy_[n]=r}return a},has(e,t){return t in jw(e)},ownKeys(e){return Reflect.ownKeys(jw(e))},set(e,t,n){let r=aT(jw(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){let r=iT(jw(e),t),i=r?.[ow];if(i&&i.base_===n)return e.copy_[t]=n,e.assigned_.set(t,!1),!0;if(Bue(n,r)&&(n!==void 0||Sw(e.base_,t,e.type_)))return!0;sT(e),oT(e)}return e.copy_[t]===n&&(n!==void 0||Sw(e.copy_,t,e.type_))||Number.isNaN(n)&&Number.isNaN(e.copy_[t])?!0:(e.copy_[t]=n,e.assigned_.set(t,!0),Jue(e,t,n),!0)},deleteProperty(e,t){return sT(e),iT(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),oT(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let n=jw(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{[mw]:!0,[fw]:e.type_!==1||t!==`length`,[pw]:r[pw],[hw]:n[t]}},defineProperty(){sw(11)},getPrototypeOf(e){return lw(e.base_)},setPrototypeOf(){sw(12)}},rT={};for(let e in nT){let t=nT[e];rT[e]=function(){let e=arguments;return e[0]=e[0][0],t.apply(this,e)}}rT.deleteProperty=function(e,t){return process.env.NODE_ENV!==`production`&&isNaN(parseInt(t))&&sw(13),rT.set.call(this,e,t,void 0)},rT.set=function(e,t,n){return process.env.NODE_ENV!==`production`&&t!==`length`&&isNaN(parseInt(t))&&sw(14),nT.set.call(this,e[0],t,n,e[0])};function iT(e,t){let n=e[ow];return(n?jw(n):e)[t]}function Xue(e,t,n){return e.type_!==1||!e.allIndicesReassigned_||e.assigned_?.get(t)||!_w(n)||n[ow]?!1:e.baseRefs_.has(n)}function Zue(e,t,n){let r=aT(t,n);return r?hw in r?r[hw]:r.get?.call(e.draft_):void 0}function aT(e,t){if(!(t in e))return;let n=lw(e);for(;n;){let e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=lw(n)}}function oT(e){e.modified_||(e.modified_=!0,e.parent_&&oT(e.parent_))}function sT(e){e.copy_||=(e.assigned_=new Map,Nw(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var Que=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(e,t,n)=>{if(kw(e)&&!kw(t)){let n=t;t=e;let r=this;return function(e=n,...i){return r.produce(e,e=>t.call(this,e,...i))}}kw(t)||sw(6),n!==void 0&&!kw(n)&&sw(7);let r;if(_w(e)){let i=Jw(this),a=cT(i,e,void 0),o=!0;try{r=t(a),o=!1}finally{o?Kw(i):qw(i)}return Gw(i,n),Yw(r,i)}if(!e||!Ow(e)){if(r=t(e),r===void 0&&(r=e),r===iw&&(r=void 0),this.autoFreeze_&&Pw(r,!0),n){let t=[],i=[];Vw(Rw).generateReplacementPatches_(e,r,{patches_:t,inversePatches_:i}),n(t,i)}return r}sw(1,e)},this.produceWithPatches=(e,t)=>{if(kw(e))return(t,...n)=>this.produceWithPatches(t,t=>e(t,...n));let n,r;return[this.produce(e,t,(e,t)=>{n=e,r=t}),n,r]},Aw(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),Aw(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),Aw(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){_w(e)||sw(8),gw(e)&&(e=lT(e));let t=Jw(this),n=cT(t,e,void 0);return n[ow].isManual_=!0,qw(t),n}finishDraft(e,t){let n=e&&e[ow];(!n||!n.isManual_)&&sw(9);let{scope_:r}=n;return Gw(r,t),Yw(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){let r=t[n];if(r.path.length===0&&r.op===`replace`){e=r.value;break}}n>-1&&(t=t.slice(n+1));let r=Vw(Rw).applyPatches_;return gw(e)?r(e,t):this.produce(e,e=>r(e,t))}};function cT(e,t,n,r){let[i,a]=Ew(t)?Vw(Lw).proxyMap_(t,n):Dw(t)?Vw(Lw).proxySet_(t,n):Yue(t,n);return(n?.scope_??Ww()).drafts_.push(i),a.callbacks_=n?.callbacks_??[],a.key_=r,n&&r!==void 0?que(n,a,r):a.callbacks_.push(function(e){e.mapSetPlugin_?.fixSetContents(a);let{patchPlugin_:t}=e;a.modified_&&t&&t.generatePatches_(a,[],e)}),i}function lT(e){return gw(e)||sw(10,e),uT(e)}function uT(e){if(!_w(e)||Iw(e))return e;let t=e[ow],n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Nw(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=Nw(e,!0);return bw(n,(e,t)=>{ww(n,e,uT(t))},r),t&&(t.finalized_=!1),n}globalThis.Iterator?.from;var dT=new Que().produce,fT=e=>e;typeof window<`u`&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__,typeof window<`u`&&window.__REDUX_DEVTOOLS_EXTENSION__&&window.__REDUX_DEVTOOLS_EXTENSION__;function pT(e,t){function n(...n){if(t){let r=t(...n);if(!r)throw Error(process.env.NODE_ENV===`production`?TT(0):`prepareAction did not return an object`);return{type:e,payload:r.payload,...`meta`in r&&{meta:r.meta},...`error`in r&&{error:r.error}}}return{type:e,payload:n[0]}}return n.toString=()=>`${e}`,n.type=e,n.match=t=>Lue(t)&&t.type===e,n}function mT(e){return _w(e)?dT(e,()=>{}):e}function hT(e,t,n){return e.has(t)?e.get(t):e.set(t,n(t)).get(t)}var $ue=`RTK_autoBatch`,gT=()=>e=>({payload:e,meta:{[$ue]:!0}});function _T(e){let t={},n=[],r,i={addCase(e,a){if(process.env.NODE_ENV!==`production`){if(n.length>0)throw Error(process.env.NODE_ENV===`production`?TT(26):"`builder.addCase` should only be called before calling `builder.addMatcher`");if(r)throw Error(process.env.NODE_ENV===`production`?TT(27):"`builder.addCase` should only be called before calling `builder.addDefaultCase`")}let o=typeof e==`string`?e:e.type;if(!o)throw Error(process.env.NODE_ENV===`production`?TT(28):"`builder.addCase` cannot be called with an empty action type");if(o in t)throw Error(process.env.NODE_ENV===`production`?TT(29):`\`builder.addCase\` cannot be called with two reducers for the same action type '${o}'`);return t[o]=a,i},addAsyncThunk(e,a){if(process.env.NODE_ENV!==`production`&&r)throw Error(process.env.NODE_ENV===`production`?TT(43):"`builder.addAsyncThunk` should only be called before calling `builder.addDefaultCase`");return a.pending&&(t[e.pending.type]=a.pending),a.rejected&&(t[e.rejected.type]=a.rejected),a.fulfilled&&(t[e.fulfilled.type]=a.fulfilled),a.settled&&n.push({matcher:e.settled,reducer:a.settled}),i},addMatcher(e,t){if(process.env.NODE_ENV!==`production`&&r)throw Error(process.env.NODE_ENV===`production`?TT(30):"`builder.addMatcher` should only be called before calling `builder.addDefaultCase`");return n.push({matcher:e,reducer:t}),i},addDefaultCase(e){if(process.env.NODE_ENV!==`production`&&r)throw Error(process.env.NODE_ENV===`production`?TT(31):"`builder.addDefaultCase` can only be called once");return r=e,i}};return e(i),[t,n,r]}function ede(e){return typeof e==`function`}function tde(e,t){if(process.env.NODE_ENV!==`production`&&typeof t==`object`)throw Error(process.env.NODE_ENV===`production`?TT(8):"The object notation for `createReducer` has been removed. Please use the 'builder callback' notation instead: https://redux-toolkit.js.org/api/createReducer");let[n,r,i]=_T(t),a;if(ede(e))a=()=>mT(e());else{let t=mT(e);a=()=>t}function o(e=a(),t){let o=[n[t.type],...r.filter(({matcher:e})=>e(t)).map(({reducer:e})=>e)];return o.filter(e=>!!e).length===0&&(o=[i]),o.reduce((e,n)=>{if(n){if(gw(e)){let r=n(e,t);return r===void 0?e:r}if(_w(e))return dT(e,e=>n(e,t));{let r=n(e,t);if(r===void 0){if(e===null)return e;throw Error(`A case reducer on a non-draftable value must not return undefined`)}return r}}return e},e)}return o.getInitialState=a,o}var nde=Symbol.for(`rtk-slice-createasyncthunk`);function rde(e,t){return`${e}/${t}`}function ide({creators:e}={}){let t=e?.asyncThunk?.[nde];return function(e){let{name:n,reducerPath:r=n}=e;if(!n)throw Error(process.env.NODE_ENV===`production`?TT(11):"`name` is a required option for createSlice");typeof process<`u`&&process.env.NODE_ENV===`development`&&e.initialState===void 0&&console.error("You must provide an `initialState` value that is not `undefined`. You may have misspelled `initialState`");let i=(typeof e.reducers==`function`?e.reducers(ode()):e.reducers)||{},a=Object.keys(i),o={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},s={addCase(e,t){let n=typeof e==`string`?e:e.type;if(!n)throw Error(process.env.NODE_ENV===`production`?TT(12):"`context.addCase` cannot be called with an empty action type");if(n in o.sliceCaseReducersByType)throw Error(process.env.NODE_ENV===`production`?TT(13):"`context.addCase` cannot be called with two reducers for the same action type: "+n);return o.sliceCaseReducersByType[n]=t,s},addMatcher(e,t){return o.sliceMatchers.push({matcher:e,reducer:t}),s},exposeAction(e,t){return o.actionCreators[e]=t,s},exposeCaseReducer(e,t){return o.sliceCaseReducersByName[e]=t,s}};a.forEach(r=>{let a=i[r],o={reducerName:r,type:rde(n,r),createNotation:typeof e.reducers==`function`};cde(a)?ude(o,a,s,t):sde(o,a,s)});function c(){if(process.env.NODE_ENV!==`production`&&typeof e.extraReducers==`object`)throw Error(process.env.NODE_ENV===`production`?TT(14):"The object notation for `createSlice.extraReducers` has been removed. Please use the 'builder callback' notation instead: https://redux-toolkit.js.org/api/createSlice");let[t={},n=[],r=void 0]=typeof e.extraReducers==`function`?_T(e.extraReducers):[e.extraReducers],i={...t,...o.sliceCaseReducersByType};return tde(e.initialState,e=>{for(let t in i)e.addCase(t,i[t]);for(let t of o.sliceMatchers)e.addMatcher(t.matcher,t.reducer);for(let t of n)e.addMatcher(t.matcher,t.reducer);r&&e.addDefaultCase(r)})}let l=e=>e,u=new Map,d=new WeakMap,f;function p(e,t){return f||=c(),f(e,t)}function m(){return f||=c(),f.getInitialState()}function h(t,n=!1){function r(e){let i=e[t];if(i===void 0){if(n)i=hT(d,r,m);else if(process.env.NODE_ENV!==`production`)throw Error(process.env.NODE_ENV===`production`?TT(15):`selectSlice returned undefined for an uninjected slice reducer`)}return i}function i(t=l){return hT(hT(u,n,()=>new WeakMap),t,()=>{let r={};for(let[i,a]of Object.entries(e.selectors??{}))r[i]=ade(a,t,()=>hT(d,t,m),n);return r})}return{reducerPath:t,getSelectors:i,get selectors(){return i(r)},selectSlice:r}}let g={name:n,reducer:p,actions:o.actionCreators,caseReducers:o.sliceCaseReducersByName,getInitialState:m,...h(r),injectInto(e,{reducerPath:t,...n}={}){let i=t??r;return e.inject({reducerPath:i,reducer:p},n),{...g,...h(i,!0)}}};return g}}function ade(e,t,n,r){function i(i,...a){let o=t(i);if(o===void 0){if(r)o=n();else if(process.env.NODE_ENV!==`production`)throw Error(process.env.NODE_ENV===`production`?TT(16):`selectState returned undefined for an uninjected slice reducer`)}return e(o,...a)}return i.unwrapped=e,i}var vT=ide();function ode(){function e(e,t){return{_reducerDefinitionType:`asyncThunk`,payloadCreator:e,...t}}return e.withTypes=()=>e,{reducer(e){return Object.assign({[e.name](...t){return e(...t)}}[e.name],{_reducerDefinitionType:`reducer`})},preparedReducer(e,t){return{_reducerDefinitionType:`reducerWithPrepare`,prepare:e,reducer:t}},asyncThunk:e}}function sde({type:e,reducerName:t,createNotation:n},r,i){let a,o;if(`reducer`in r){if(n&&!lde(r))throw Error(process.env.NODE_ENV===`production`?TT(17):"Please use the `create.preparedReducer` notation for prepared action creators with the `create` notation.");a=r.reducer,o=r.prepare}else a=r;i.addCase(e,a).exposeCaseReducer(t,a).exposeAction(t,o?pT(e,o):pT(e))}function cde(e){return e._reducerDefinitionType===`asyncThunk`}function lde(e){return e._reducerDefinitionType===`reducerWithPrepare`}function ude({type:e,reducerName:t},n,r,i){if(!i)throw Error(process.env.NODE_ENV===`production`?TT(18):"Cannot use `create.asyncThunk` in the built-in `createSlice`. Use `buildCreateSlice({ creators: { asyncThunk: asyncThunkCreator } })` to create a customised version of `createSlice`.");let{payloadCreator:a,fulfilled:o,pending:s,rejected:c,settled:l,options:u}=n,d=i(e,a,u);r.exposeAction(t,d),o&&r.addCase(d.fulfilled,o),s&&r.addCase(d.pending,s),c&&r.addCase(d.rejected,c),l&&r.addMatcher(d.settled,l),r.exposeCaseReducer(t,{fulfilled:o||yT,pending:s||yT,rejected:c||yT,settled:l||yT})}function yT(){}var bT=`listener`,xT=`completed`,ST=`cancelled`;`${ST}`,`${xT}`,`${bT}${ST}`,`${bT}${xT}`;var{assign:CT}=Object,wT=`listenerMiddleware`,dde=CT(pT(`${wT}/add`),{withTypes:()=>dde});`${wT}`;var fde=CT(pT(`${wT}/remove`),{withTypes:()=>fde});function TT(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}function ET(e,t,n){return Array.isArray(e)&&e&&t+n!==0?e.slice(t,n+1):e}function DT(e){return Number.isFinite(e)}function OT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function kT(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?OT(Object(n),!0).forEach(function(t){pde(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):OT(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function pde(e,t,n){return(t=mde(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function mde(e){var t=hde(e,`string`);return typeof t==`symbol`?t:t+``}function hde(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function AT(e,t,n){return kx(e)||kx(t)?n:Sx(t)?hx(e,t,n):typeof t==`function`?t(e):n}var gde=(e,t,n)=>{if(t&&n){var r=n.width,i=n.height,a=t.align,o=t.verticalAlign,s=t.layout,c=t.position,l=t.offset,u=l===void 0?0:l;if(c!=null){if(Fx(c)){if(c===`top`&&xx(e.top))return kT(kT({},e),{},{top:e.top+(i||0)+u});if(c===`bottom`&&xx(e.bottom))return kT(kT({},e),{},{bottom:e.bottom+(i||0)+u});if(c===`left`&&xx(e.left))return kT(kT({},e),{},{left:e.left+(r||0)+u});if(c===`right`&&xx(e.right))return kT(kT({},e),{},{right:e.right+(r||0)+u})}return e}if((s===`vertical`||s===`horizontal`&&o===`middle`)&&a!==`center`&&xx(e[a]))return kT(kT({},e),{},{[a]:e[a]+(r||0)});if((s===`horizontal`||s===`vertical`&&a===`center`)&&o!==`middle`&&xx(e[o]))return kT(kT({},e),{},{[o]:e[o]+(i||0)})}return e},jT=(e,t)=>e===`horizontal`&&t===`xAxis`||e===`vertical`&&t===`yAxis`||e===`centric`&&t===`angleAxis`||e===`radial`&&t===`radiusAxis`,_de={sign:e=>{var t=e.length;if(!(t<=0)){var n=e[0]?.length;if(!(n==null||n<=0))for(var r=0;r<n;++r)for(var i=0,a=0,o=0;o<t;++o){var s=e[o]?.[r];if(s!=null){var c=s[1],l=s[0],u=yx(c)?l:c;u>=0?(s[0]=i,i+=u,s[1]=i):(s[0]=a,a+=u,s[1]=a)}}}},expand:Dle,none:TS,silhouette:Ole,wiggle:DS,positive:e=>{var t=e.length;if(!(t<=0)){var n=e[0]?.length;if(!(n==null||n<=0))for(var r=0;r<n;++r)for(var i=0,a=0;a<t;++a){var o=e[a]?.[r];if(o!=null){var s=yx(o[1])?o[0]:o[1];s>=0?(o[0]=i,i+=s,o[1]=i):(o[0]=0,o[1]=0)}}}}},vde=(e,t,n)=>{var r=_de[n]??TS,i=Ele().keys(t).value((e,t)=>Number(AT(e,t,0))).order(ES).offset(r)(e);return i.forEach((n,r)=>{n.forEach((n,i)=>{var a=AT(e[i],t[r],0);Array.isArray(a)&&a.length===2&&xx(a[0])&&xx(a[1])&&(n[0]=a[0],n[1]=a[1])})}),i},yde=e=>{var t=e.flat(2).filter(xx);return[Math.min(...t),Math.max(...t)]},bde=e=>[e[0]===1/0?0:e[0],e[1]===-1/0?0:e[1]],xde=(e,t,n)=>{if(e!=null&&Object.keys(e).length!==0)return bde(Object.keys(e).reduce((r,i)=>{var a=e[i];if(!a)return r;var o=a.stackedData.reduce((e,r)=>{var i=yde(ET(r,t,n));return!DT(i[0])||!DT(i[1])?e:[Math.min(e[0],i[0]),Math.max(e[1],i[1])]},[1/0,-1/0]);return[Math.min(o[0],r[0]),Math.max(o[1],r[1])]},[1/0,-1/0]))},MT=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,NT=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Sde=(e,t,n)=>{if(e&&e.scale&&e.scale.bandwidth){var r=e.scale.bandwidth();if(!n||r>0)return r}if(e&&t&&t.length>=2){for(var i=XC(t,e=>e.coordinate),a=[],o=0,s=1,c=i.length;s<c;s++){var l=(i[s]?.coordinate||0)-(i[s-1]?.coordinate||0);a.push(l),o=Math.max(l,o)}var u=o*1e-4,d=1/0;for(var f of a)f>u&&(d=Math.min(f,d));return d===1/0?0:d}return n?void 0:0};function PT(e){var t=e.tooltipEntrySettings,n=e.dataKey,r=e.payload,i=e.value,a=e.name;return kT(kT({},t),{},{dataKey:n,payload:r,value:i,name:a})}var FT=e=>e.layout.width,IT=e=>e.layout.height,LT=e=>e.layout.margin,RT=$(e=>e.cartesianAxis.xAxis,e=>Object.values(e)),zT=$(e=>e.cartesianAxis.yAxis,e=>Object.values(e));function BT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function VT(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?BT(Object(n),!0).forEach(function(t){Cde(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):BT(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Cde(e,t,n){return(t=wde(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function wde(e){var t=Tde(e,`string`);return typeof t==`symbol`?t:t+``}function Tde(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var Ede=e=>e.brush.height;function Dde(e){return zT(e).reduce((e,t)=>t.orientation===`left`&&!t.mirror&&!t.hide?e+(typeof t.width==`number`?t.width:60):e,0)}function Ode(e){return zT(e).reduce((e,t)=>t.orientation===`right`&&!t.mirror&&!t.hide?e+(typeof t.width==`number`?t.width:60):e,0)}function kde(e){return RT(e).reduce((e,t)=>t.orientation===`top`&&!t.mirror&&!t.hide?e+(typeof t.height==`number`?t.height:30):e,0)}function Ade(e){return RT(e).reduce((e,t)=>t.orientation===`bottom`&&!t.mirror&&!t.hide?e+(typeof t.height==`number`?t.height:30):e,0)}var HT=$([FT,IT,LT,Ede,Dde,Ode,kde,Ade,ZC,Oue],(e,t,n,r,i,a,o,s,c,l)=>{var u={left:(n.left||0)+i,right:(n.right||0)+a},d=VT(VT({},{top:(n.top||0)+o,bottom:(n.bottom||0)+s}),u),f=d.bottom;d.bottom+=r,d=gde(d,c,l);var p=e-d.left-d.right,m=t-d.top-d.bottom;return VT(VT({brushBottom:f},d),{},{width:Math.max(p,0),height:Math.max(m,0)})}),UT=$(HT,e=>({x:e.left,y:e.top,width:e.width,height:e.height}));$(FT,IT,(e,t)=>({x:0,y:0,width:e,height:t}));var jde=(0,_.createContext)(null),WT=()=>(0,_.useContext)(jde)!=null,GT=e=>e.brush,KT=$([GT,HT,LT],(e,t,n)=>({height:e.height,x:xx(e.x)?e.x:t.left,y:xx(e.y)?e.y:t.top+t.height+t.brushBottom-(n?.bottom||0),width:xx(e.width)?e.width:t.width})),qT=()=>{var e=WT(),t=VC(UT),n=VC(KT),r=VC(GT)?.padding;return!e||!n||!r?t:{width:n.width-r.left-r.right,height:n.height-r.top-r.bottom,x:r.left,y:r.top}},JT={top:0,bottom:0,left:0,right:0,width:0,height:0,brushBottom:0},YT=()=>VC(HT)??JT,XT=()=>VC(FT),ZT=()=>VC(IT),QT=()=>VC(e=>e.layout.margin),$T=e=>e.layout.layoutType,eE=()=>VC($T),tE=e=>{var t=e.layout.layoutType;if(t===`centric`||t===`radial`)return t},nE=()=>eE()!==void 0,rE=vT({name:`legend`,initialState:{settings:{layout:`horizontal`,align:`center`,verticalAlign:`bottom`,itemSorter:`value`,position:void 0,offset:0},size:{width:0,height:0},payload:[]},reducers:{setLegendSize(e,t){e.size.width=t.payload.width,e.size.height=t.payload.height},setLegendSettings(e,t){e.settings.align=t.payload.align,e.settings.layout=t.payload.layout,e.settings.verticalAlign=t.payload.verticalAlign,e.settings.itemSorter=t.payload.itemSorter,e.settings.position=t.payload.position,e.settings.offset=t.payload.offset},addLegendPayload:{reducer(e,t){e.payload.push(fT(t.payload))},prepare:gT()},replaceLegendPayload:{reducer(e,t){var n=t.payload,r=n.prev,i=n.next,a=lT(e).payload.indexOf(fT(r));a>-1&&(e.payload[a]=fT(i))},prepare:gT()},removeLegendPayload:{reducer(e,t){var n=lT(e).payload.indexOf(fT(t.payload));n>-1&&e.payload.splice(n,1)},prepare:gT()}}}),iE=rE.actions,aE=iE.setLegendSize,oE=iE.setLegendSettings;iE.addLegendPayload,iE.replaceLegendPayload,iE.removeLegendPayload,rE.reducer;var sE=s((e=>{var t=p();function n(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var r=typeof Object.is==`function`?Object.is:n,i=t.useSyncExternalStore,a=t.useRef,o=t.useEffect,s=t.useMemo,c=t.useDebugValue;e.useSyncExternalStoreWithSelector=function(e,t,n,l,u){var d=a(null);if(d.current===null){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=s(function(){function e(e){if(!i){if(i=!0,a=e,e=l(e),u!==void 0&&f.hasValue){var t=f.value;if(u(t,e))return o=t}return o=e}if(t=o,r(a,e))return t;var n=l(e);return u!==void 0&&u(t,n)?(a=e,t):(a=e,o=n)}var i=!1,a,o,s=n===void 0?null:n;return[function(){return e(t())},s===null?void 0:function(){return e(s())}]},[t,n,l,u]);var p=i(e,d[0],d[1]);return o(function(){f.hasValue=!0,f.value=p},[p]),c(p),p}})),cE=s((e=>{process.env.NODE_ENV!==`production`&&(function(){function t(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart==`function`&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var n=p(),r=typeof Object.is==`function`?Object.is:t,i=n.useSyncExternalStore,a=n.useRef,o=n.useEffect,s=n.useMemo,c=n.useDebugValue;e.useSyncExternalStoreWithSelector=function(e,t,n,l,u){var d=a(null);if(d.current===null){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=s(function(){function e(e){if(!i){if(i=!0,a=e,e=l(e),u!==void 0&&f.hasValue){var t=f.value;if(u(t,e))return o=t}return o=e}if(t=o,r(a,e))return t;var n=l(e);return u!==void 0&&u(t,n)?(a=e,t):(a=e,o=n)}var i=!1,a,o,s=n===void 0?null:n;return[function(){return e(t())},s===null?void 0:function(){return e(s())}]},[t,n,l,u]);var p=i(e,d[0],d[1]);return o(function(){f.hasValue=!0,f.value=p},[p]),c(p),p},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop==`function`&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()}));s(((e,t)=>{t.exports=process.env.NODE_ENV===`production`?sE():cE()}))();function lE(e,t){return e===t?e!==0||t!==0||1/e==1/t:e!==e&&t!==t}function uE(e,t){if(lE(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r=0;r<n.length;r++)if(!Object.prototype.hasOwnProperty.call(t,n[r])||!lE(e[n[r]],t[n[r]]))return!1;return!0}var dE=new Set([`axisLine`,`tickLine`,`activeBar`,`activeDot`,`activeLabel`,`activeShape`,`allowEscapeViewBox`,`background`,`cursor`,`dot`,`label`,`line`,`margin`,`padding`,`position`,`shape`,`style`,`tick`,`wrapperStyle`,`radius`,`throttledEvents`]);function fE(e,t){return e==null&&t==null?!0:typeof e==`number`&&typeof t==`number`?e===t||e!==e&&t!==t:e===t}function pE(e,t){for(var n of new Set([...Object.keys(e),...Object.keys(t)]))if(dE.has(n)){if(e[n]==null&&t[n]==null)continue;if(!uE(e[n],t[n]))return!1}else if(!fE(e[n],t[n]))return!1;return!0}var mE=$([FT,IT,LT],(e,t,n)=>({x:n.left||0,y:n.top||0,width:Math.max(e-(n.left||0)-(n.right||0),0),height:Math.max(t-(n.top||0)-(n.bottom||0),0)}));function hE(e,t){return e===`start`&&t===`start`?``:`translate(${e===`inherit`?`0`:{start:`0`,middle:`-50%`,end:`-100%`}[e]}, ${{start:`0`,middle:`-50%`,end:`-100%`}[t]??`0`})`}var gE=[`contextPayload`];function _E(){return _E=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_E.apply(null,arguments)}function vE(e,t){return CE(e)||SE(e,t)||bE(e,t)||yE()}function yE(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
36
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function bE(e,t){if(e){if(typeof e==`string`)return xE(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?xE(e,t):void 0}}function xE(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function SE(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function CE(e){if(Array.isArray(e))return e}function wE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function TE(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?wE(Object(n),!0).forEach(function(t){EE(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wE(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function EE(e,t,n){return(t=DE(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function DE(e){var t=OE(e,`string`);return typeof t==`symbol`?t:t+``}function OE(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function kE(e,t){if(e==null)return{};var n,r,i=AE(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function AE(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function jE(e){return e.value}function ME(e){var t=e.contextPayload,n=kE(e,gE),r=LC(t,e.payloadUniqBy,jE),i=TE(TE({},n),{},{payload:r});return _.isValidElement(e.content)?_.cloneElement(e.content,i):typeof e.content==`function`?_.createElement(e.content,i):_.createElement(uC,i)}function NE(e){return e===`left`||e===`right`||e===`insideLeft`||e===`insideRight`?`vertical`:`horizontal`}function PE(e,t){return t==null?null:Fx(t)?mE(e):UT(e)}function FE(e,t,n){return e===`top`?{top:n.height+t}:e===`bottom`?{top:-n.height-t}:e===`left`?{left:n.width+t}:e===`right`?{left:-n.width-t}:{}}function IE(e,t,n,r,i,a){var o=t.layout,s=t.align,c=t.verticalAlign,l,u;return(!e||(e.left===void 0||e.left===null)&&(e.right===void 0||e.right===null))&&(l=s===`center`&&o===`vertical`?{left:((r||0)-a.width)/2}:s===`right`?{right:n&&n.right||0}:{left:n&&n.left||0}),(!e||(e.top===void 0||e.top===null)&&(e.bottom===void 0||e.bottom===null))&&(u=c===`middle`?{top:((i||0)-a.height)/2}:c===`bottom`?{bottom:n&&n.bottom||0}:{top:n&&n.top||0}),TE(TE({},l),u)}function LE(e){var t=e.align,n=e.layout,r=e.verticalAlign,i=e.itemSorter,a=e.position,o=e.offset,s=zC();return(0,_.useLayoutEffect)(()=>{s(oE({align:t,layout:n,verticalAlign:r,itemSorter:i,position:a,offset:o}))},[s,t,n,r,i,a,o]),null}function RE(e){var t=e.width,n=e.height,r=zC();return(0,_.useLayoutEffect)(()=>{r(aE({width:t,height:n}))},[r,t,n]),(0,_.useLayoutEffect)(()=>()=>{r(aE({width:0,height:0}))},[r]),null}function zE(e,t,n,r){return e===`vertical`&&t!=null?{height:t}:e===`horizontal`?{width:n||r}:null}var BE={align:`center`,iconSize:14,inactiveColor:`#ccc`,itemSorter:`value`,labelStyle:{},layout:`auto`,verticalAlign:`bottom`,offset:0};function VE(e){var t=QS(e,BE),n=e.layout&&e.layout!==`auto`?e.layout:NE(t.position),r=Aue(),i=Zce(),a=QT(),o=VC(e=>PE(e,t.position)),s=t.width,c=t.height,l=t.wrapperStyle,u=t.portal,d=u==null&&(t.position==null||Fx(t.position)),f=vE(nw([r]),2),p=f[0],m=f[1],h=XT(),g=ZT();if(h==null||g==null||t.position!=null&&o==null)return null;var v=zE(n,c,s,h-(a?.left||0)-(a?.right||0)),y=t.position==null?null:Jce({viewBox:o??{x:0,y:0,width:h,height:g},position:t.position,offset:t.offset??0}),b=FE(t.position,t.offset??0,p),x=n===`vertical`?(o?.width??0)/2:o?.width??0,S=n===`horizontal`?(o?.height??0)/2:o?.height??0,C=y?{width:`max-content`,height:`max-content`,maxWidth:x,maxHeight:S,overflowY:`auto`,top:y.y+(b.top??0),left:y.x+(b.left??0),transform:hE(y.horizontalAnchor,y.verticalAnchor)}:IE(l,t,a,h,g,p),w=u?l:TE(TE({position:`absolute`,width:v?.width||s||`auto`,height:v?.height||c||`auto`},C),l),T=u??i;if(T==null||r==null)return null;var E=_.createElement(`div`,{className:`recharts-legend-wrapper`,style:w,ref:m},_.createElement(LE,{layout:n,align:t.align,verticalAlign:t.verticalAlign,itemSorter:t.itemSorter,position:t.position,offset:t.offset}),d&&_.createElement(RE,p),_.createElement(ME,_E({},t,{layout:n},v,{margin:a,chartWidth:h,chartHeight:g,contextPayload:r})));return(0,Rn.createPortal)(E,T)}var HE=_.memo(VE,pE);HE.displayName=`Legend`;function UE(){return UE=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},UE.apply(null,arguments)}function WE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function GE(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?WE(Object(n),!0).forEach(function(t){KE(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):WE(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function KE(e,t,n){return(t=qE(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function qE(e){var t=JE(e,`string`);return typeof t==`symbol`?t:t+``}function JE(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function YE(e,t){return eD(e)||$E(e,t)||ZE(e,t)||XE()}function XE(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
37
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ZE(e,t){if(e){if(typeof e==`string`)return QE(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?QE(e,t):void 0}}function QE(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function $E(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function eD(e){if(Array.isArray(e))return e}function tD(e){return Array.isArray(e)&&Sx(e[0])&&Sx(e[1])?e.join(` ~ `):e}var nD={separator:` : `,contentStyle:{margin:0,padding:10,backgroundColor:`#fff`,border:`1px solid #ccc`,whiteSpace:`nowrap`},itemStyle:{display:`block`,paddingTop:4,paddingBottom:4,color:`#000`},labelStyle:{},accessibilityLayer:!1};function rD(e,t){return t==null?e:XC(e,t)}var iD=e=>{var t=e.separator,n=t===void 0?nD.separator:t,r=e.contentStyle,i=e.itemStyle,a=e.labelStyle,o=a===void 0?nD.labelStyle:a,s=e.payload,c=e.formatter,l=e.itemSorter,u=e.wrapperClassName,d=e.labelClassName,f=e.label,p=e.labelFormatter,m=e.accessibilityLayer,h=m===void 0?nD.accessibilityLayer:m,g=()=>{if(s&&s.length){var e={padding:0,margin:0},t=rD(s,l).map((e,t)=>{if(!e||e.type===`none`)return null;var r=e.formatter||c||tD,a=e.value,o=e.name,l=a,u=o;if(r){var d=r(a,o,e,t,s);if(Array.isArray(d)){var f=YE(d,2);l=f[0],u=f[1]}else if(d!=null)l=d;else return null}var p=GE(GE({},nD.itemStyle),{},{color:e.color||nD.itemStyle.color},i);return _.createElement(`li`,{className:`recharts-tooltip-item`,key:`tooltip-item-${t}`,style:p},Sx(u)?_.createElement(`span`,{className:`recharts-tooltip-item-name`},u):null,Sx(u)?_.createElement(`span`,{className:`recharts-tooltip-item-separator`},n):null,_.createElement(`span`,{className:`recharts-tooltip-item-value`},l),_.createElement(`span`,{className:`recharts-tooltip-item-unit`},e.unit||``))});return _.createElement(`ul`,{className:`recharts-tooltip-item-list`,style:e},t)}return null},v=GE(GE({},nD.contentStyle),r),y=GE({margin:0},o),b=!kx(f),x=b?f:``,S=$n(`recharts-default-tooltip`,u),C=$n(`recharts-tooltip-label`,d);b&&p&&s!=null&&(x=p(f,s));var w=h?{role:`status`,"aria-live":`assertive`}:{};return _.createElement(`div`,UE({className:S,style:v},w),_.createElement(`p`,{className:C,style:y},_.isValidElement(x)?x:`${x}`),g())},aD=`recharts-tooltip-wrapper`,oD={visibility:`hidden`};function sD(e){var t=e.coordinate,n=e.translateX,r=e.translateY;return $n(aD,{[`${aD}-right`]:xx(n)&&t&&xx(t.x)&&n>=t.x,[`${aD}-left`]:xx(n)&&t&&xx(t.x)&&n<t.x,[`${aD}-bottom`]:xx(r)&&t&&xx(t.y)&&r>=t.y,[`${aD}-top`]:xx(r)&&t&&xx(t.y)&&r<t.y})}function cD(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.key,i=e.offset,a=e.position,o=e.reverseDirection,s=e.tooltipDimension,c=e.viewBox,l=e.viewBoxDimension;if(a&&xx(a[r]))return a[r];var u=n[r]-s-(i>0?i:0),d=n[r]+i;if(t[r])return o[r]?u:d;var f=c[r];return f==null?0:o[r]?Math.max(u<f?d:u,f):l==null?0:d+s>f+l?Math.max(u,f):Math.max(d,f)}function lD(e){var t=e.translateX,n=e.translateY;return{transform:e.useTranslate3d?`translate3d(${t}px, ${n}px, 0)`:`translate(${t}px, ${n}px)`}}function uD(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.offsetTop,i=e.offsetLeft,a=e.position,o=e.reverseDirection,s=e.tooltipBox,c=e.useTranslate3d,l=e.viewBox,u,d,f;return s&&s.height>0&&s.width>0&&n?(d=cD({allowEscapeViewBox:t,coordinate:n,key:`x`,offset:i,position:a,reverseDirection:o,tooltipDimension:s.width,viewBox:l,viewBoxDimension:l.width}),f=cD({allowEscapeViewBox:t,coordinate:n,key:`y`,offset:r,position:a,reverseDirection:o,tooltipDimension:s.height,viewBox:l,viewBoxDimension:l.height}),u=lD({translateX:d,translateY:f,useTranslate3d:c})):u=oD,{cssProperties:u,cssClasses:sD({translateX:d,translateY:f,coordinate:n})}}var dD={devToolsEnabled:!0,isSsr:!(typeof window<`u`&&window.document&&window.document.createElement&&window.setTimeout)};function fD(e,t){return _D(e)||gD(e,t)||mD(e,t)||pD()}function pD(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
38
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function mD(e,t){if(e){if(typeof e==`string`)return hD(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?hD(e,t):void 0}}function hD(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function gD(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function _D(e){if(Array.isArray(e))return e}function vD(){var e=fD((0,_.useState)(()=>dD.isSsr||!window.matchMedia?!1:window.matchMedia(`(prefers-reduced-motion: reduce)`).matches),2),t=e[0],n=e[1];return(0,_.useEffect)(()=>{if(window.matchMedia){var e=window.matchMedia(`(prefers-reduced-motion: reduce)`),t=()=>{n(e.matches)};return e.addEventListener(`change`,t),()=>{e.removeEventListener(`change`,t)}}},[]),t}function yD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function bD(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?yD(Object(n),!0).forEach(function(t){xD(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yD(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function xD(e,t,n){return(t=SD(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function SD(e){var t=CD(e,`string`);return typeof t==`symbol`?t:t+``}function CD(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function wD(e,t){return kD(e)||OD(e,t)||ED(e,t)||TD()}function TD(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
39
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ED(e,t){if(e){if(typeof e==`string`)return DD(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?DD(e,t):void 0}}function DD(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function OD(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function kD(e){if(Array.isArray(e))return e}function AD(e){if(!(e.prefersReducedMotion&&e.isAnimationActive===`auto`)&&e.isAnimationActive&&e.active){var t=typeof e.animationEasing==`string`?e.animationEasing:`ease`;return`transform ${e.animationDuration}ms ${t}`}}function jD(e){var t=vD(),n=wD(_.useState(()=>({dismissed:!1,dismissedAtCoordinate:{x:0,y:0}})),2),r=n[0],i=n[1];_.useEffect(()=>{var t=t=>{t.key===`Escape`&&i({dismissed:!0,dismissedAtCoordinate:{x:e.coordinate?.x??0,y:e.coordinate?.y??0}})};return document.addEventListener(`keydown`,t),()=>{document.removeEventListener(`keydown`,t)}},[e.coordinate?.x,e.coordinate?.y]),r.dismissed&&((e.coordinate?.x??0)!==r.dismissedAtCoordinate.x||(e.coordinate?.y??0)!==r.dismissedAtCoordinate.y)&&i(bD(bD({},r),{},{dismissed:!1}));var a=uD({allowEscapeViewBox:e.allowEscapeViewBox,coordinate:e.coordinate,offsetLeft:typeof e.offset==`number`?e.offset:e.offset.x,offsetTop:typeof e.offset==`number`?e.offset:e.offset.y,position:e.position,reverseDirection:e.reverseDirection,tooltipBox:e.lastBoundingBox,useTranslate3d:e.useTranslate3d,viewBox:e.viewBox}),o=a.cssClasses,s=a.cssProperties,c=bD(bD({},e.hasPortalFromProps?{}:bD(bD({transition:AD({prefersReducedMotion:t,isAnimationActive:e.isAnimationActive,active:e.active,animationDuration:e.animationDuration,animationEasing:e.animationEasing})},s),{},{pointerEvents:`none`,position:`absolute`,top:0,left:0})),{},{visibility:!r.dismissed&&e.active&&e.hasPayload?`visible`:`hidden`},e.wrapperStyle);return _.createElement(`div`,{xmlns:`http://www.w3.org/1999/xhtml`,tabIndex:-1,className:o,style:c,ref:e.innerRef},e.children)}var MD=_.memo(jD),ND=()=>VC(e=>e.rootProps.accessibilityLayer)??!0;function PD(){return PD=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},PD.apply(null,arguments)}function FD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function ID(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?FD(Object(n),!0).forEach(function(t){LD(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):FD(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function LD(e,t,n){return(t=RD(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function RD(e){var t=zD(e,`string`);return typeof t==`symbol`?t:t+``}function zD(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var BD={curveBasisClosed:hle,curveBasisOpen:gle,curveBasis:mle,curveBumpX:ele,curveBumpY:tle,curveLinearClosed:_le,curveLinear:Xx,curveMonotoneX:vle,curveMonotoneY:yle,curveNatural:ble,curveStep:xle,curveStepAfter:Cle,curveStepBefore:Sle},VD=e=>DT(e.x)&&DT(e.y),HD=e=>e.base!=null&&VD(e.base)&&VD(e),UD=e=>e.x,WD=e=>e.y,GD=(e,t)=>{if(typeof e==`function`)return e;var n=`curve${Ax(e)}`;if((n===`curveMonotone`||n===`curveBump`)&&t){var r=BD[`${n}${t===`vertical`?`Y`:`X`}`];if(r)return r}return BD[n]||Xx},KD={connectNulls:!1,type:`linear`},qD=e=>{var t=e.type,n=t===void 0?KD.type:t,r=e.points,i=r===void 0?[]:r,a=e.baseLine,o=e.layout,s=e.connectNulls,c=s===void 0?KD.connectNulls:s,l=GD(n,o),u=c?i.filter(VD):i;if(Array.isArray(a)){var d,f=i.map((e,t)=>ID(ID({},e),{},{base:a[t]}));return d=o===`vertical`?eS().y(WD).x1(UD).x0(e=>e.base.x):eS().x(UD).y1(WD).y0(e=>e.base.y),d.defined(HD).curve(l)(c?f.filter(HD):f)}return(o===`vertical`&&xx(a)?eS().y(WD).x1(UD).x0(a):xx(a)?eS().x(UD).y1(WD).y0(a):$x().x(UD).y(WD)).defined(VD).curve(l)(u)},JD=e=>{var t=e.className,n=e.points,r=e.path,i=e.pathRef,a=eE();if((!n||!n.length)&&!r)return null;var o={type:e.type,points:e.points,baseLine:e.baseLine,layout:e.layout||a,connectNulls:e.connectNulls},s=n&&n.length?qD(o):r;return _.createElement(`path`,PD({},ox(e),WS(e),{className:$n(`recharts-curve`,t),d:s===null?void 0:s,ref:i}))},YD=[`x`,`y`,`top`,`left`,`width`,`height`,`className`];function XD(){return XD=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},XD.apply(null,arguments)}function ZD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function QD(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?ZD(Object(n),!0).forEach(function(t){$D(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ZD(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function $D(e,t,n){return(t=eO(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function eO(e){var t=tO(e,`string`);return typeof t==`symbol`?t:t+``}function tO(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function nO(e,t){if(e==null)return{};var n,r,i=rO(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function rO(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var iO=(e,t,n,r,i,a)=>`M${e},${i}v${r}M${a},${t}h${n}`,aO=e=>{var t=e.x,n=t===void 0?0:t,r=e.y,i=r===void 0?0:r,a=e.top,o=a===void 0?0:a,s=e.left,c=s===void 0?0:s,l=e.width,u=l===void 0?0:l,d=e.height,f=d===void 0?0:d,p=e.className,m=nO(e,YD),h=QD({x:n,y:i,top:o,left:c,width:u,height:f},m);return!xx(n)||!xx(i)||!xx(u)||!xx(f)||!xx(o)||!xx(c)?null:_.createElement(`path`,XD({},sx(h),{className:$n(`recharts-cross`,p),d:iO(n,i,u,f,o,c)}))};function oO(e,t,n,r){var i=r/2;return{stroke:`none`,fill:`#ccc`,x:e===`horizontal`?t.x-i:n.left+.5,y:e===`horizontal`?n.top+.5:t.y-i,width:e===`horizontal`?r:n.width-1,height:e===`horizontal`?n.height-1:r}}var sO=(e,t)=>[0,3*e,3*t-6*e,3*e-3*t+1],cO=(e,t)=>e.map((e,n)=>e*t**n).reduce((e,t)=>e+t),lO=(e,t)=>n=>cO(sO(e,t),n),uO=(e,t)=>n=>cO([...sO(e,t).map((e,t)=>e*t).slice(1),0],n),dO=e=>{var t,n=e.split(`(`);if(n.length!==2||n[0]!==`cubic-bezier`)return null;var r=(t=n[1])==null||(t=t.split(`)`)[0])==null?void 0:t.split(`,`);if(r==null||r.length!==4)return null;var i=r.map(e=>parseFloat(e));return[i[0],i[1],i[2],i[3]]},fO=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];if(t.length===1)switch(t[0]){case`linear`:return[0,0,1,1];case`ease`:return[.25,.1,.25,1];case`ease-in`:return[.42,0,1,1];case`ease-out`:return[.42,0,.58,1];case`ease-in-out`:return[0,0,.58,1];default:var r=dO(t[0]);if(r)return r}return t.length===4?t:[0,0,1,1]},pO=(e,t,n,r)=>{var i=lO(e,n),a=lO(t,r),o=uO(e,n),s=e=>e>1?1:e<0?0:e,c=e=>{for(var t=e>1?1:e,n=t,r=0;r<8;++r){var c=i(n)-t,l=o(n);if(Math.abs(c-t)<1e-4||l<1e-4)return a(n);n=s(n-c/l)}return a(n)};return c.isStepper=!1,c},mO=function(){return pO(...fO(...arguments))},hO=function(){for(var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.stiff,n=t===void 0?100:t,r=e.damping,i=r===void 0?8:r,a=e.dt,o=a===void 0?16.67:a,s=1,c=[0],l=0,u=0,d=1e4,f=0;f<d;){var p=-(l-s)*n,m=u*i;if(u+=(p-m)*o/1e3,l+=u*o/1e3,c.push(l),Math.abs(l-s)<1e-4&&Math.abs(u)<1e-4)break;f++}c[c.length-1]=s;var h=c.length-1;return e=>{if(e<=0)return 0;if(e>=1)return s;var t=e*h,n=Math.floor(t),r=t-n;return(c[n]??0)+((c[n+1]??0)-(c[n]??0))*r}},gO=e=>{if(typeof e==`string`)switch(e){case`ease`:case`ease-in-out`:case`ease-out`:case`ease-in`:case`linear`:return mO(e);case`spring`:return hO();default:if(e.split(`(`)[0]===`cubic-bezier`)return mO(e)}return typeof e==`function`?e:null},_O=(0,_.createContext)((e,t,n)=>{var r,i=a=>{var o=t.tick(a);if(t.getState()===`active`){if(n(t.getInterpolated()),t.getProgress()===1){t.complete(),r=void 0;return}r=e.setTimeout(i,o);return}r=e.setTimeout(i,o)};return r=e.setTimeout(i,0),()=>r?.()});_O.Provider;function vO(e){var t=(0,_.useContext)(_O);return(0,_.useMemo)(()=>e??t,[e,t])}function yO(e,t,n){return(t=bO(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function bO(e){var t=xO(e,`string`);return typeof t==`symbol`?t:t+``}function xO(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var SO=`init`,CO=`pending`,wO=`active`,TO=`completed`;function EO(e){return Math.max(0,e)}var DO=class{getAnimationStartedTime(){return this.animationStartedTime}getBeginStartedTime(){return this.beginStartedTime}constructor(e){var t;yO(this,`state`,SO),this.animationId=e.animationId,this.onAnimationEnd=e.onAnimationEnd,this.animationDuration=EO(e.animationDuration),this.animationBegin=EO(e.animationBegin),this.progress=0,this.from=e.from,this.to=e.to,this.easing=e.easing,(t=e.onAnimationStart)==null||t.call(e)}getState(){return this.state}getEasing(){return this.easing}getAnimationDuration(){return this.animationDuration}tick(e){if(this.getState()===SO)return this.state=CO,this.beginStartedTime=e,this.animationBegin;if(this.getState()===CO){if(this.beginStartedTime==null)throw Error();var t=e-this.beginStartedTime;return t>=this.animationBegin?(this.state=wO,this.animationStartedTime=e,this.nextAnimationUpdate(0)):EO(this.animationBegin-t)}if(this.getState()===wO){if(this.animationStartedTime==null)throw Error();var n=e-this.animationStartedTime;return this.setProgress(n/this.animationDuration),this.nextAnimationUpdate(n)}return 0}setProgress(e){this.progress=Math.min(1,Math.max(0,e))}getProgress(){return this.progress}complete(){if(this.progress=1,this.state===`active`){var e;(e=this.onAnimationEnd)==null||e.call(this)}this.state=TO}getFrom(){return this.from}getTo(){return this.to}getAnimationId(){return this.animationId}getAnimationBegin(){return this.animationBegin}},OO=class extends DO{nextAnimationUpdate(){return 0}getInterpolated(){return this.easing(Dx(this.getFrom(),this.getTo(),this.getProgress()))}},kO=class{setTimeout(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=performance.now(),r=null,i=a=>{a-n>=t?e(a):r=requestAnimationFrame(i)};return r=requestAnimationFrame(i),()=>{r!=null&&cancelAnimationFrame(r)}}};function AO(e,t){return FO(e)||PO(e,t)||MO(e,t)||jO()}function jO(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
40
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function MO(e,t){if(e){if(typeof e==`string`)return NO(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?NO(e,t):void 0}}function NO(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function PO(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function FO(e){if(Array.isArray(e))return e}var IO={begin:0,duration:1e3,easing:`ease`,isActive:!0,canBegin:!0,onAnimationEnd:()=>{},onAnimationStart:()=>{}},LO=0,RO=1;function zO(e){var t=QS(e,IO),n=t.animationId,r=t.isActive,i=t.canBegin,a=t.duration,o=t.easing,s=t.begin,c=t.onAnimationEnd,l=t.onAnimationStart,u=t.children,d=vD(),f=r===`auto`?!dD.isSsr&&!d:r,p=vO(t.animationController),m=AO((0,_.useState)(f?LO:RO),2),h=m[0],g=m[1];return(0,_.useEffect)(()=>{f||g(RO)},[f]),(0,_.useEffect)(()=>{var e=gO(o);return!f||!i||e==null?Mx:p(new kO,new OO({animationId:n,easing:e,animationDuration:a,animationBegin:s,onAnimationStart:l,onAnimationEnd:c,from:LO,to:RO}),g)},[p,n,f,i,a,o,s,l,c]),u(Number(h))}function BO(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:`animation-`,n=(0,_.useRef)(wx(t)),r=(0,_.useRef)(e);return r.current!==e&&(n.current=wx(t),r.current=e),n.current}var VO=e=>e.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`),HO=(e,t,n)=>e.map(e=>`${VO(e)} ${t}ms ${n}`).join(`,`),UO=[`radius`],WO=[`radius`],GO,KO,qO,JO,YO,XO,ZO,QO,$O,ek;function tk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function nk(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?tk(Object(n),!0).forEach(function(t){rk(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):tk(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function rk(e,t,n){return(t=ik(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ik(e){var t=ak(e,`string`);return typeof t==`symbol`?t:t+``}function ak(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function ok(){return ok=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ok.apply(null,arguments)}function sk(e,t){if(e==null)return{};var n,r,i=ck(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function ck(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function lk(e,t){return mk(e)||pk(e,t)||dk(e,t)||uk()}function uk(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
41
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function dk(e,t){if(e){if(typeof e==`string`)return fk(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?fk(e,t):void 0}}function fk(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function pk(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function mk(e){if(Array.isArray(e))return e}function hk(e,t){return t||=e.slice(0),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var gk=(e,t,n,r,i)=>{var a=gx(n),o=gx(r),s=Math.min(Math.abs(a)/2,Math.abs(o)/2),c=o>=0?1:-1,l=a>=0?1:-1,u=+(o>=0&&a>=0||o<0&&a<0),d;if(s>0&&Array.isArray(i)){for(var f=[0,0,0,0],p=0,m=4;p<m;p++){var h=i[p]??0;f[p]=h>s?s:h}d=_x(GO||=hk([`M`,`,`,``]),e,t+c*f[0]),f[0]>0&&(d+=_x(KO||=hk([`A `,`,`,`,0,0,`,`,`,`,`,``]),f[0],f[0],u,e+l*f[0],t)),d+=_x(qO||=hk([`L `,`,`,``]),e+n-l*f[1],t),f[1]>0&&(d+=_x(JO||=hk([`A `,`,`,`,0,0,`,`,
42
- `,`,`,``]),f[1],f[1],u,e+n,t+c*f[1])),d+=_x(YO||=hk([`L `,`,`,``]),e+n,t+r-c*f[2]),f[2]>0&&(d+=_x(XO||=hk([`A `,`,`,`,0,0,`,`,
43
- `,`,`,``]),f[2],f[2],u,e+n-l*f[2],t+r)),d+=_x(ZO||=hk([`L `,`,`,``]),e+l*f[3],t+r),f[3]>0&&(d+=_x(QO||=hk([`A `,`,`,`,0,0,`,`,
44
- `,`,`,``]),f[3],f[3],u,e,t+r-c*f[3])),d+=`Z`}else if(s>0&&i===+i&&i>0){var g=Math.min(s,i);d=_x($O||=hk(`M .,.
45
- A .,.,0,0,.,.,.
46
- L .,.
47
- A .,.,0,0,.,.,.
48
- L .,.
49
- A .,.,0,0,.,.,.
50
- L .,.
51
- A .,.,0,0,.,.,. Z`.split(`.`)),e,t+c*g,g,g,u,e+l*g,t,e+n-l*g,t,g,g,u,e+n,t+c*g,e+n,t+r-c*g,g,g,u,e+n-l*g,t+r,e+l*g,t+r,g,g,u,e,t+r-c*g)}else d=_x(ek||=hk([`M `,`,`,` h `,` v `,` h `,` Z`]),e,t,n,r,-n);return d},_k={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:`ease`},vk=e=>{var t=QS(e,_k),n=(0,_.useRef)(null),r=lk((0,_.useState)(-1),2),i=r[0],a=r[1];(0,_.useEffect)(()=>{if(n.current&&n.current.getTotalLength)try{var e=n.current.getTotalLength();e&&a(e)}catch{}},[]);var o=t.x,s=t.y,c=t.width,l=t.height,u=t.radius,d=t.className,f=t.animationEasing,p=t.animationDuration,m=t.animationBegin,h=t.isAnimationActive,g=t.isUpdateAnimationActive,v=(0,_.useRef)(c),y=(0,_.useRef)(l),b=(0,_.useRef)(o),x=(0,_.useRef)(s),S=BO((0,_.useMemo)(()=>({x:o,y:s,width:c,height:l,radius:u}),[o,s,c,l,u]),`rectangle-`);if(o!==+o||s!==+s||c!==+c||l!==+l||c===0||l===0)return null;var C=$n(`recharts-rectangle`,d);if(!g){var w=sx(t);w.radius;var T=sk(w,UO);return _.createElement(`path`,ok({},T,{x:gx(o),y:gx(s),width:gx(c),height:gx(l),radius:typeof u==`number`?u:void 0,className:C,d:gk(o,s,c,l,u)}))}var E=v.current,D=y.current,O=b.current,k=x.current,A=`0px ${i===-1?1:i}px`,j=`${i}px ${i}px`,M=HO([`strokeDasharray`],p,typeof f==`string`?f:_k.animationEasing);return _.createElement(zO,{animationId:S,key:S,canBegin:i>0,duration:p,easing:f,isActive:g,begin:m},e=>{var r=Dx(E,c,e),i=Dx(D,l,e),a=Dx(O,o,e),d=Dx(k,s,e);n.current&&(v.current=r,y.current=i,b.current=a,x.current=d);var f=h?e>0?{transition:M,strokeDasharray:j}:{strokeDasharray:A}:{strokeDasharray:j},p=sx(t);p.radius;var m=sk(p,WO);return _.createElement(`path`,ok({},m,{radius:typeof u==`number`?u:void 0,className:C,d:gk(a,d,r,i,u),ref:n,style:nk(nk({},f),t.style)}))})},yk=Math.PI/180,bk=(e,t,n,r)=>({x:e+Math.cos(-yk*r)*n,y:t+Math.sin(-yk*r)*n}),xk=function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{top:0,right:0,bottom:0,left:0,width:0,height:0,brushBottom:0};return Math.min(Math.abs(e-(n.left||0)-(n.right||0)),Math.abs(t-(n.top||0)-(n.bottom||0)))/2};function Sk(e){var t=e.cx,n=e.cy,r=e.radius,i=e.startAngle,a=e.endAngle;return{points:[bk(t,n,r,i),bk(t,n,r,a)],cx:t,cy:n,radius:r,startAngle:i,endAngle:a}}var Ck,wk,Tk,Ek,Dk,Ok,kk;function Ak(){return Ak=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ak.apply(null,arguments)}function jk(e,t){return t||=e.slice(0),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var Mk=(e,t)=>vx(t-e)*Math.min(Math.abs(t-e),359.999),Nk=e=>{var t=e.cx,n=e.cy,r=e.radius,i=e.angle,a=e.sign,o=e.isExternal,s=e.cornerRadius,c=e.cornerIsExternal,l=s*(o?1:-1)+r,u=Math.asin(s/l)/yk,d=c?i:i+a*u,f=bk(t,n,l,d),p=bk(t,n,r,d),m=c?i-a*u:i;return{center:f,circleTangency:p,lineTangency:bk(t,n,l*Math.cos(u*yk),m),theta:u}},Pk=e=>{var t=e.cx,n=e.cy,r=e.innerRadius,i=e.outerRadius,a=e.startAngle,o=e.endAngle,s=Mk(a,o),c=a+s,l=bk(t,n,i,a),u=bk(t,n,i,c),d=_x(Ck||=jk([`M `,`,`,`
52
- A `,`,`,`,0,
53
- `,`,`,`,
54
- `,`,`,`
55
- `]),l.x,l.y,i,i,+(Math.abs(s)>180),+(a>c),u.x,u.y);if(r>0){var f=bk(t,n,r,a),p=bk(t,n,r,c);d+=_x(wk||=jk([`L `,`,`,`
56
- A `,`,`,`,0,
57
- `,`,`,`,
58
- `,`,`,` Z`]),p.x,p.y,r,r,+(Math.abs(s)>180),+(a<=c),f.x,f.y)}else d+=_x(Tk||=jk([`L `,`,`,` Z`]),t,n);return d},Mde=e=>{var t=e.cx,n=e.cy,r=e.innerRadius,i=e.outerRadius,a=e.cornerRadius,o=e.forceCornerRadius,s=e.cornerIsExternal,c=e.startAngle,l=e.endAngle,u=vx(l-c),d=Nk({cx:t,cy:n,radius:i,angle:c,sign:u,cornerRadius:a,cornerIsExternal:s}),f=d.circleTangency,p=d.lineTangency,m=d.theta,h=Nk({cx:t,cy:n,radius:i,angle:l,sign:-u,cornerRadius:a,cornerIsExternal:s}),g=h.circleTangency,_=h.lineTangency,v=h.theta,y=s?Math.abs(c-l):Math.abs(c-l)-m-v;if(y<0)return o?_x(Ek||=jk([`M `,`,`,`
59
- a`,`,`,`,0,0,1,`,`,0
60
- a`,`,`,`,0,0,1,`,`,0
61
- `]),p.x,p.y,a,a,a*2,a,a,-a*2):Pk({cx:t,cy:n,innerRadius:r,outerRadius:i,startAngle:c,endAngle:l});var b=_x(Dk||=jk([`M `,`,`,`
62
- A`,`,`,`,0,0,`,`,`,`,`,`
63
- A`,`,`,`,0,`,`,`,`,`,`,`,`
64
- A`,`,`,`,0,0,`,`,`,`,`,`
65
- `]),p.x,p.y,a,a,+(u<0),f.x,f.y,i,i,+(y>180),+(u<0),g.x,g.y,a,a,+(u<0),_.x,_.y);if(r>0){var x=Nk({cx:t,cy:n,radius:r,angle:c,sign:u,isExternal:!0,cornerRadius:a,cornerIsExternal:s}),S=x.circleTangency,C=x.lineTangency,w=x.theta,T=Nk({cx:t,cy:n,radius:r,angle:l,sign:-u,isExternal:!0,cornerRadius:a,cornerIsExternal:s}),E=T.circleTangency,D=T.lineTangency,O=T.theta,k=s?Math.abs(c-l):Math.abs(c-l)-w-O;if(k<0&&a===0)return`${b}L${t},${n}Z`;b+=_x(Ok||=jk([`L`,`,`,`
66
- A`,`,`,`,0,0,`,`,`,`,`,`
67
- A`,`,`,`,0,`,`,`,`,`,`,`,`
68
- A`,`,`,`,0,0,`,`,`,`,`,`Z`]),D.x,D.y,a,a,+(u<0),E.x,E.y,r,r,+(k>180),+(u>0),S.x,S.y,a,a,+(u<0),C.x,C.y)}else b+=_x(kk||=jk([`L`,`,`,`Z`]),t,n);return b},Nde={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},Pde=e=>{var t=QS(e,Nde),n=t.cx,r=t.cy,i=t.innerRadius,a=t.outerRadius,o=t.cornerRadius,s=t.forceCornerRadius,c=t.cornerIsExternal,l=t.startAngle,u=t.endAngle,d=t.className;if(a<i||l===u)return null;var f=$n(`recharts-sector`,d),p=a-i,m=Tx(o,p,0,!0),h=m>0&&Math.abs(l-u)<360?Mde({cx:n,cy:r,innerRadius:i,outerRadius:a,cornerRadius:Math.min(m,p/2),forceCornerRadius:s,cornerIsExternal:c,startAngle:l,endAngle:u}):Pk({cx:n,cy:r,innerRadius:i,outerRadius:a,startAngle:l,endAngle:u});return _.createElement(`path`,Ak({},sx(t),{className:f,d:h}))};function Fde(e,t,n){if(e===`horizontal`)return[{x:t.x,y:n.top},{x:t.x,y:n.top+n.height}];if(e===`vertical`)return[{x:n.left,y:t.y},{x:n.left+n.width,y:t.y}];if(US(t)){if(e===`centric`){var r=t.cx,i=t.cy,a=t.innerRadius,o=t.outerRadius,s=t.angle,c=bk(r,i,a,s),l=bk(r,i,o,s);return[{x:c.x,y:c.y},{x:l.x,y:l.y}]}return Sk(t)}}function Ide(e){return fx(e)?NaN:Number(e)}function Fk(e){return e?(e=Ide(e),e===1/0||e===-1/0?(e<0?-1:1)*Number.MAX_VALUE:e===e?e:0):e===0?e:0}function Ik(e,t,n){n&&typeof n!=`number`&&JC(e,t,n)&&(t=n=void 0),e=Fk(e),t===void 0?(t=e,e=0):t=Fk(t),n=n===void 0?e<t?1:-1:Fk(n);let r=Math.max(Math.ceil((t-e)/(n||1)),0),i=Array(r);for(let t=0;t<r;t++)i[t]=e,e+=n;return i}var Lk=e=>e.chartData,Rk=$([Lk],e=>{var t=e.chartData==null?0:e.chartData.length-1;return{chartData:e.chartData,computedData:e.computedData,dataEndIndex:t,dataStartIndex:0}}),zk=(e,t,n,r)=>r?Rk(e):Lk(e),Lde=$([zk],e=>{var t=e.chartData,n=e.dataStartIndex,r=e.dataEndIndex;return t==null?[]:t.slice(n,r+1)});$([Rk],e=>{var t=e.chartData,n=e.dataStartIndex,r=e.dataEndIndex;return t==null?[]:t.slice(n,r+1)});var Rde=$([Lk],e=>{var t=e.chartData,n=e.dataStartIndex,r=e.dataEndIndex;return t==null?[]:t.slice(n,r+1)});function Bk(e,t){return Hde(e)||Vde(e,t)||Bde(e,t)||zde()}function zde(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
69
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Bde(e,t){if(e){if(typeof e==`string`)return Vk(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Vk(e,t):void 0}}function Vk(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Vde(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function Hde(e){if(Array.isArray(e))return e}function Hk(e){if(Array.isArray(e)&&e.length===2){var t=Bk(e,2),n=t[0],r=t[1];if(DT(n)&&DT(r))return!0}return!1}function Uk(e,t,n){return n?e:[Math.min(e[0],t[0]),Math.max(e[1],t[1])]}function Wk(e,t){if(t&&typeof e!=`function`&&Array.isArray(e)&&e.length===2){var n=Bk(e,2),r=n[0],i=n[1],a,o;if(DT(r))a=r;else if(typeof r==`function`)return;if(DT(i))o=i;else if(typeof i==`function`)return;var s=[a,o];if(Hk(s))return s}}function Ude(e,t,n){if(n||t!=null){if(typeof e==`function`&&t!=null)try{var r=e(t,n);if(Hk(r))return Uk(r,t,n)}catch{}if(Array.isArray(e)&&e.length===2){var i=Bk(e,2),a=i[0],o=i[1],s,c;if(a===`auto`)t!=null&&(s=Math.min(...t));else if(xx(a))s=a;else if(typeof a==`function`)try{t!=null&&(s=a(t?.[0]))}catch{}else if(typeof a==`string`&&MT.test(a)){var l=MT.exec(a);if(l==null||l[1]==null||t==null)s=void 0;else{var u=+l[1];s=t[0]-u}}else s=t?.[0];if(o===`auto`)t!=null&&(c=Math.max(...t));else if(xx(o))c=o;else if(typeof o==`function`)try{t!=null&&(c=o(t?.[1]))}catch{}else if(typeof o==`string`&&NT.test(o)){var d=NT.exec(o);if(d==null||d[1]==null||t==null)c=void 0;else{var f=+d[1];c=t[1]+f}}else c=t?.[1];var p=[s,c];if(Hk(p))return t==null?p:Uk(p,t,n)}}}var Gk=u(s(((e,t)=>{(function(e){"use strict";var n=1e9,r={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:`2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286`},i=!0,a=`[DecimalError] `,o=a+`Invalid argument: `,s=a+`Exponent out of range: `,c=Math.floor,l=Math.pow,u=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,d,f=1e7,p=7,m=9007199254740991,h=c(m/p),g={};g.absoluteValue=g.abs=function(){var e=new this.constructor(this);return e.s&&=1,e},g.comparedTo=g.cmp=function(e){var t,n,r,i,a=this;if(e=new a.constructor(e),a.s!==e.s)return a.s||-e.s;if(a.e!==e.e)return a.e>e.e^a.s<0?1:-1;for(r=a.d.length,i=e.d.length,t=0,n=r<i?r:i;t<n;++t)if(a.d[t]!==e.d[t])return a.d[t]>e.d[t]^a.s<0?1:-1;return r===i?0:r>i^a.s<0?1:-1},g.decimalPlaces=g.dp=function(){var e=this,t=e.d.length-1,n=(t-e.e)*p;if(t=e.d[t],t)for(;t%10==0;t/=10)n--;return n<0?0:n},g.dividedBy=g.div=function(e){return b(this,new this.constructor(e))},g.dividedToIntegerBy=g.idiv=function(e){var t=this,n=t.constructor;return D(b(t,new n(e),0,1),n.precision)},g.equals=g.eq=function(e){return!this.cmp(e)},g.exponent=function(){return S(this)},g.greaterThan=g.gt=function(e){return this.cmp(e)>0},g.greaterThanOrEqualTo=g.gte=function(e){return this.cmp(e)>=0},g.isInteger=g.isint=function(){return this.e>this.d.length-2},g.isNegative=g.isneg=function(){return this.s<0},g.isPositive=g.ispos=function(){return this.s>0},g.isZero=function(){return this.s===0},g.lessThan=g.lt=function(e){return this.cmp(e)<0},g.lessThanOrEqualTo=g.lte=function(e){return this.cmp(e)<1},g.logarithm=g.log=function(e){var t,n=this,r=n.constructor,o=r.precision,s=o+5;if(e===void 0)e=new r(10);else if(e=new r(e),e.s<1||e.eq(d))throw Error(a+`NaN`);if(n.s<1)throw Error(a+(n.s?`NaN`:`-Infinity`));return n.eq(d)?new r(0):(i=!1,t=b(T(n,s),T(e,s),s),i=!0,D(t,o))},g.minus=g.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?O(t,e):_(t,(e.s=-e.s,e))},g.modulo=g.mod=function(e){var t,n=this,r=n.constructor,o=r.precision;if(e=new r(e),!e.s)throw Error(a+`NaN`);return n.s?(i=!1,t=b(n,e,0,1).times(e),i=!0,n.minus(t)):D(new r(n),o)},g.naturalExponential=g.exp=function(){return x(this)},g.naturalLogarithm=g.ln=function(){return T(this)},g.negated=g.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e},g.plus=g.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?_(t,e):O(t,(e.s=-e.s,e))},g.precision=g.sd=function(e){var t,n,r,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(o+e);if(t=S(i)+1,r=i.d.length-1,n=r*p+1,r=i.d[r],r){for(;r%10==0;r/=10)n--;for(r=i.d[0];r>=10;r/=10)n++}return e&&t>n?t:n},g.squareRoot=g.sqrt=function(){var e,t,n,r,o,s,l,u=this,d=u.constructor;if(u.s<1){if(!u.s)return new d(0);throw Error(a+`NaN`)}for(e=S(u),i=!1,o=Math.sqrt(+u),o==0||o==1/0?(t=y(u.d),(t.length+e)%2==0&&(t+=`0`),o=Math.sqrt(t),e=c((e+1)/2)-(e<0||e%2),o==1/0?t=`5e`+e:(t=o.toExponential(),t=t.slice(0,t.indexOf(`e`)+1)+e),r=new d(t)):r=new d(o.toString()),n=d.precision,o=l=n+3;;)if(s=r,r=s.plus(b(u,s,l+2)).times(.5),y(s.d).slice(0,l)===(t=y(r.d)).slice(0,l)){if(t=t.slice(l-3,l+1),o==l&&t==`4999`){if(D(s,n+1,0),s.times(s).eq(u)){r=s;break}}else if(t!=`9999`)break;l+=4}return i=!0,D(r,n)},g.times=g.mul=function(e){var t,n,r,a,o,s,c,l,u,d=this,p=d.constructor,m=d.d,h=(e=new p(e)).d;if(!d.s||!e.s)return new p(0);for(e.s*=d.s,n=d.e+e.e,l=m.length,u=h.length,l<u&&(o=m,m=h,h=o,s=l,l=u,u=s),o=[],s=l+u,r=s;r--;)o.push(0);for(r=u;--r>=0;){for(t=0,a=l+r;a>r;)c=o[a]+h[r]*m[a-r-1]+t,o[a--]=c%f|0,t=c/f|0;o[a]=(o[a]+t)%f|0}for(;!o[--s];)o.pop();return t?++n:o.shift(),e.d=o,e.e=n,i?D(e,p.precision):e},g.toDecimalPlaces=g.todp=function(e,t){var r=this,i=r.constructor;return r=new i(r),e===void 0?r:(v(e,0,n),t===void 0?t=i.rounding:v(t,0,8),D(r,e+S(r)+1,t))},g.toExponential=function(e,t){var r,i=this,a=i.constructor;return e===void 0?r=k(i,!0):(v(e,0,n),t===void 0?t=a.rounding:v(t,0,8),i=D(new a(i),e+1,t),r=k(i,!0,e+1)),r},g.toFixed=function(e,t){var r,i,a=this,o=a.constructor;return e===void 0?k(a):(v(e,0,n),t===void 0?t=o.rounding:v(t,0,8),i=D(new o(a),e+S(a)+1,t),r=k(i.abs(),!1,e+S(i)+1),a.isneg()&&!a.isZero()?`-`+r:r)},g.toInteger=g.toint=function(){var e=this,t=e.constructor;return D(new t(e),S(e)+1,t.rounding)},g.toNumber=function(){return+this},g.toPower=g.pow=function(e){var t,n,r,o,s,l,u=this,f=u.constructor,h=12,g=+(e=new f(e));if(!e.s)return new f(d);if(u=new f(u),!u.s){if(e.s<1)throw Error(a+`Infinity`);return u}if(u.eq(d))return u;if(r=f.precision,e.eq(d))return D(u,r);if(t=e.e,n=e.d.length-1,l=t>=n,s=u.s,!l){if(s<0)throw Error(a+`NaN`)}else if((n=g<0?-g:g)<=m){for(o=new f(d),t=Math.ceil(r/p+4),i=!1;n%2&&(o=o.times(u),A(o.d,t)),n=c(n/2),n!==0;)u=u.times(u),A(u.d,t);return i=!0,e.s<0?new f(d).div(o):D(o,r)}return s=s<0&&e.d[Math.max(t,n)]&1?-1:1,u.s=1,i=!1,o=e.times(T(u,r+h)),i=!0,o=x(o),o.s=s,o},g.toPrecision=function(e,t){var r,i,a=this,o=a.constructor;return e===void 0?(r=S(a),i=k(a,r<=o.toExpNeg||r>=o.toExpPos)):(v(e,1,n),t===void 0?t=o.rounding:v(t,0,8),a=D(new o(a),e,t),r=S(a),i=k(a,e<=r||r<=o.toExpNeg,e)),i},g.toSignificantDigits=g.tosd=function(e,t){var r=this,i=r.constructor;return e===void 0?(e=i.precision,t=i.rounding):(v(e,1,n),t===void 0?t=i.rounding:v(t,0,8)),D(new i(r),e,t)},g.toString=g.valueOf=g.val=g.toJSON=function(){var e=this,t=S(e),n=e.constructor;return k(e,t<=n.toExpNeg||t>=n.toExpPos)};function _(e,t){var n,r,a,o,s,c,l,u,d=e.constructor,m=d.precision;if(!e.s||!t.s)return t.s||(t=new d(e)),i?D(t,m):t;if(l=e.d,u=t.d,s=e.e,a=t.e,l=l.slice(),o=s-a,o){for(o<0?(r=l,o=-o,c=u.length):(r=u,a=s,c=l.length),s=Math.ceil(m/p),c=s>c?s+1:c+1,o>c&&(o=c,r.length=1),r.reverse();o--;)r.push(0);r.reverse()}for(c=l.length,o=u.length,c-o<0&&(o=c,r=u,u=l,l=r),n=0;o;)n=(l[--o]=l[o]+u[o]+n)/f|0,l[o]%=f;for(n&&(l.unshift(n),++a),c=l.length;l[--c]==0;)l.pop();return t.d=l,t.e=a,i?D(t,m):t}function v(e,t,n){if(e!==~~e||e<t||e>n)throw Error(o+e)}function y(e){var t,n,r,i=e.length-1,a=``,o=e[0];if(i>0){for(a+=o,t=1;t<i;t++)r=e[t]+``,n=p-r.length,n&&(a+=w(n)),a+=r;o=e[t],r=o+``,n=p-r.length,n&&(a+=w(n))}else if(o===0)return`0`;for(;o%10==0;)o/=10;return a+o}var b=(function(){function e(e,t){var n,r=0,i=e.length;for(e=e.slice();i--;)n=e[i]*t+r,e[i]=n%f|0,r=n/f|0;return r&&e.unshift(r),e}function t(e,t,n,r){var i,a;if(n!=r)a=n>r?1:-1;else for(i=a=0;i<n;i++)if(e[i]!=t[i]){a=e[i]>t[i]?1:-1;break}return a}function n(e,t,n){for(var r=0;n--;)e[n]-=r,r=+(e[n]<t[n]),e[n]=r*f+e[n]-t[n];for(;!e[0]&&e.length>1;)e.shift()}return function(r,i,o,s){var c,l,u,d,m,h,g,_,v,y,b,x,C,w,T,E,O,k,A=r.constructor,j=r.s==i.s?1:-1,M=r.d,N=i.d;if(!r.s)return new A(r);if(!i.s)throw Error(a+`Division by zero`);for(l=r.e-i.e,O=N.length,T=M.length,g=new A(j),_=g.d=[],u=0;N[u]==(M[u]||0);)++u;if(N[u]>(M[u]||0)&&--l,x=o==null?o=A.precision:s?o+(S(r)-S(i))+1:o,x<0)return new A(0);if(x=x/p+2|0,u=0,O==1)for(d=0,N=N[0],x++;(u<T||d)&&x--;u++)C=d*f+(M[u]||0),_[u]=C/N|0,d=C%N|0;else{for(d=f/(N[0]+1)|0,d>1&&(N=e(N,d),M=e(M,d),O=N.length,T=M.length),w=O,v=M.slice(0,O),y=v.length;y<O;)v[y++]=0;k=N.slice(),k.unshift(0),E=N[0],N[1]>=f/2&&++E;do d=0,c=t(N,v,O,y),c<0?(b=v[0],O!=y&&(b=b*f+(v[1]||0)),d=b/E|0,d>1?(d>=f&&(d=f-1),m=e(N,d),h=m.length,y=v.length,c=t(m,v,h,y),c==1&&(d--,n(m,O<h?k:N,h))):(d==0&&(c=d=1),m=N.slice()),h=m.length,h<y&&m.unshift(0),n(v,m,y),c==-1&&(y=v.length,c=t(N,v,O,y),c<1&&(d++,n(v,O<y?k:N,y))),y=v.length):c===0&&(d++,v=[0]),_[u++]=d,c&&v[0]?v[y++]=M[w]||0:(v=[M[w]],y=1);while((w++<T||v[0]!==void 0)&&x--)}return _[0]||_.shift(),g.e=l,D(g,s?o+S(g)+1:o)}})();function x(e,t){var n,r,a,o,c,u,f=0,p=0,m=e.constructor,h=m.precision;if(S(e)>16)throw Error(s+S(e));if(!e.s)return new m(d);for(t==null?(i=!1,u=h):u=t,c=new m(.03125);e.abs().gte(.1);)e=e.times(c),p+=5;for(r=Math.log(l(2,p))/Math.LN10*2+5|0,u+=r,n=a=o=new m(d),m.precision=u;;){if(a=D(a.times(e),u),n=n.times(++f),c=o.plus(b(a,n,u)),y(c.d).slice(0,u)===y(o.d).slice(0,u)){for(;p--;)o=D(o.times(o),u);return m.precision=h,t==null?(i=!0,D(o,h)):o}o=c}}function S(e){for(var t=e.e*p,n=e.d[0];n>=10;n/=10)t++;return t}function C(e,t,n){if(t>e.LN10.sd())throw i=!0,n&&(e.precision=n),Error(a+`LN10 precision limit exceeded`);return D(new e(e.LN10),t)}function w(e){for(var t=``;e--;)t+=`0`;return t}function T(e,t){var n,r,o,s,c,l,u,f,p,m=1,h=10,g=e,_=g.d,v=g.constructor,x=v.precision;if(g.s<1)throw Error(a+(g.s?`NaN`:`-Infinity`));if(g.eq(d))return new v(0);if(t==null?(i=!1,f=x):f=t,g.eq(10))return t??(i=!0),C(v,f);if(f+=h,v.precision=f,n=y(_),r=n.charAt(0),s=S(g),Math.abs(s)<0x5543df729c000){for(;r<7&&r!=1||r==1&&n.charAt(1)>3;)g=g.times(e),n=y(g.d),r=n.charAt(0),m++;s=S(g),r>1?(g=new v(`0.`+n),s++):g=new v(r+`.`+n.slice(1))}else return u=C(v,f+2,x).times(s+``),g=T(new v(r+`.`+n.slice(1)),f-h).plus(u),v.precision=x,t==null?(i=!0,D(g,x)):g;for(l=c=g=b(g.minus(d),g.plus(d),f),p=D(g.times(g),f),o=3;;){if(c=D(c.times(p),f),u=l.plus(b(c,new v(o),f)),y(u.d).slice(0,f)===y(l.d).slice(0,f))return l=l.times(2),s!==0&&(l=l.plus(C(v,f+2,x).times(s+``))),l=b(l,new v(m),f),v.precision=x,t==null?(i=!0,D(l,x)):l;l=u,o+=2}}function E(e,t){var n,r,a;for((n=t.indexOf(`.`))>-1&&(t=t.replace(`.`,``)),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;t.charCodeAt(r)===48;)++r;for(a=t.length;t.charCodeAt(a-1)===48;)--a;if(t=t.slice(r,a),t){if(a-=r,n=n-r-1,e.e=c(n/p),e.d=[],r=(n+1)%p,n<0&&(r+=p),r<a){for(r&&e.d.push(+t.slice(0,r)),a-=p;r<a;)e.d.push(+t.slice(r,r+=p));t=t.slice(r),r=p-t.length}else r-=a;for(;r--;)t+=`0`;if(e.d.push(+t),i&&(e.e>h||e.e<-h))throw Error(s+n)}else e.s=0,e.e=0,e.d=[0];return e}function D(e,t,n){var r,a,o,u,d,m,g,_,v=e.d;for(u=1,o=v[0];o>=10;o/=10)u++;if(r=t-u,r<0)r+=p,a=t,g=v[_=0];else{if(_=Math.ceil((r+1)/p),o=v.length,_>=o)return e;for(g=o=v[_],u=1;o>=10;o/=10)u++;r%=p,a=r-p+u}if(n!==void 0&&(o=l(10,u-a-1),d=g/o%10|0,m=t<0||v[_+1]!==void 0||g%o,m=n<4?(d||m)&&(n==0||n==(e.s<0?3:2)):d>5||d==5&&(n==4||m||n==6&&(r>0?a>0?g/l(10,u-a):0:v[_-1])%10&1||n==(e.s<0?8:7))),t<1||!v[0])return m?(o=S(e),v.length=1,t=t-o-1,v[0]=l(10,(p-t%p)%p),e.e=c(-t/p)||0):(v.length=1,v[0]=e.e=e.s=0),e;if(r==0?(v.length=_,o=1,_--):(v.length=_+1,o=l(10,p-r),v[_]=a>0?(g/l(10,u-a)%l(10,a)|0)*o:0),m)for(;;)if(_==0){(v[0]+=o)==f&&(v[0]=1,++e.e);break}else{if(v[_]+=o,v[_]!=f)break;v[_--]=0,o=1}for(r=v.length;v[--r]===0;)v.pop();if(i&&(e.e>h||e.e<-h))throw Error(s+S(e));return e}function O(e,t){var n,r,a,o,s,c,l,u,d,m,h=e.constructor,g=h.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new h(e),i?D(t,g):t;if(l=e.d,m=t.d,r=t.e,u=e.e,l=l.slice(),s=u-r,s){for(d=s<0,d?(n=l,s=-s,c=m.length):(n=m,r=u,c=l.length),a=Math.max(Math.ceil(g/p),c)+2,s>a&&(s=a,n.length=1),n.reverse(),a=s;a--;)n.push(0);n.reverse()}else{for(a=l.length,c=m.length,d=a<c,d&&(c=a),a=0;a<c;a++)if(l[a]!=m[a]){d=l[a]<m[a];break}s=0}for(d&&(n=l,l=m,m=n,t.s=-t.s),c=l.length,a=m.length-c;a>0;--a)l[c++]=0;for(a=m.length;a>s;){if(l[--a]<m[a]){for(o=a;o&&l[--o]===0;)l[o]=f-1;--l[o],l[a]+=f}l[a]-=m[a]}for(;l[--c]===0;)l.pop();for(;l[0]===0;l.shift())--r;return l[0]?(t.d=l,t.e=r,i?D(t,g):t):new h(0)}function k(e,t,n){var r,i=S(e),a=y(e.d),o=a.length;return t?(n&&(r=n-o)>0?a=a.charAt(0)+`.`+a.slice(1)+w(r):o>1&&(a=a.charAt(0)+`.`+a.slice(1)),a=a+(i<0?`e`:`e+`)+i):i<0?(a=`0.`+w(-i-1)+a,n&&(r=n-o)>0&&(a+=w(r))):i>=o?(a+=w(i+1-o),n&&(r=n-i-1)>0&&(a=a+`.`+w(r))):((r=i+1)<o&&(a=a.slice(0,r)+`.`+a.slice(r)),n&&(r=n-o)>0&&(i+1===o&&(a+=`.`),a+=w(r))),e.s<0?`-`+a:a}function A(e,t){if(e.length>t)return e.length=t,!0}function j(e){var t,n,r;function i(e){var t=this;if(!(t instanceof i))return new i(e);if(t.constructor=i,e instanceof i){t.s=e.s,t.e=e.e,t.d=(e=e.d)?e.slice():e;return}if(typeof e==`number`){if(e*0!=0)throw Error(o+e);if(e>0)t.s=1;else if(e<0)e=-e,t.s=-1;else{t.s=0,t.e=0,t.d=[0];return}if(e===~~e&&e<1e7){t.e=0,t.d=[e];return}return E(t,e.toString())}if(typeof e!=`string`)throw Error(o+e);if(e.charCodeAt(0)===45?(e=e.slice(1),t.s=-1):t.s=1,u.test(e))E(t,e);else throw Error(o+e)}if(i.prototype=g,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.clone=j,i.config=i.set=M,e===void 0&&(e={}),e)for(r=[`precision`,`rounding`,`toExpNeg`,`toExpPos`,`LN10`],t=0;t<r.length;)e.hasOwnProperty(n=r[t++])||(e[n]=this[n]);return i.config(e),i}function M(e){if(!e||typeof e!=`object`)throw Error(a+`Object expected`);var t,r,i,s=[`precision`,1,n,`rounding`,0,8,`toExpNeg`,-1/0,0,`toExpPos`,0,1/0];for(t=0;t<s.length;t+=3)if((i=e[r=s[t]])!==void 0){if(c(i)===i&&i>=s[t+1]&&i<=s[t+2])this[r]=i;else throw Error(o+r+`: `+i)}if((i=e[r=`LN10`])!==void 0){if(i==Math.LN10)this[r]=new this(i);else throw Error(o+r+`: `+i)}return this}r=j(r),r.default=r.Decimal=r,d=new r(1),typeof define==`function`&&define.amd?define(function(){return r}):t!==void 0&&t.exports?t.exports=r:(e||=typeof self<`u`&&self&&self.self==self?self:Function(`return this`)(),e.Decimal=r)})(e)}))());function Kk(e){return e===0?1:Math.floor(new Gk.default(e).abs().log(10).toNumber())+1}function qk(e,t,n){for(var r=new Gk.default(e),i=0,a=[];r.lt(t)&&i<1e5;)a.push(r.toNumber()),r=r.add(n),i++;return a}function Jk(e,t){return qde(e)||Kde(e,t)||Gde(e,t)||Wde()}function Wde(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
70
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Gde(e,t){if(e){if(typeof e==`string`)return Yk(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Yk(e,t):void 0}}function Yk(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Kde(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function qde(e){if(Array.isArray(e))return e}var Xk=e=>{var t=Jk(e,2),n=t[0],r=t[1],i=n,a=r;return n>r&&(i=r,a=n),[i,a]},Zk=(e,t,n)=>{if(e.lte(0))return new Gk.default(0);var r=Kk(e.toNumber()),i=new Gk.default(10).pow(r),a=e.div(i),o=r===1?.1:.05,s=new Gk.default(Math.ceil(a.div(o).toNumber())).add(n).mul(o).mul(i);return t?new Gk.default(s.toNumber()):new Gk.default(Math.ceil(s.toNumber()))},Qk=(e,t,n)=>{if(e.lte(0))return new Gk.default(0);var r=[1,2,2.5,5],i=e.toNumber(),a=Math.floor(new Gk.default(i).abs().log(10).toNumber()),o=new Gk.default(10).pow(a),s=e.div(o).toNumber(),c=r.findIndex(e=>e>=s-1e-10);if(c===-1&&(o=o.mul(10),c=0),c+=n,c>=r.length){var l=Math.floor(c/r.length);c%=r.length,o=o.mul(new Gk.default(10).pow(l))}var u=r[c]??1,d=new Gk.default(u).mul(o);return t?d:new Gk.default(Math.ceil(d.toNumber()))},Jde=(e,t,n)=>{var r=new Gk.default(1),i=new Gk.default(e);if(!i.isint()&&n){var a=Math.abs(e);a<1?(r=new Gk.default(10).pow(Kk(e)-1),i=new Gk.default(Math.floor(i.div(r).toNumber())).mul(r)):a>1&&(i=new Gk.default(Math.floor(e)))}else e===0?i=new Gk.default(Math.floor((t-1)/2)):n||(i=new Gk.default(Math.floor(e)));for(var o=Math.floor((t-1)/2),s=[],c=0;c<t;c++)s.push(i.add(new Gk.default(c-o).mul(r)).toNumber());return s},$k=function(e,t,n,r){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:Zk;if(!Number.isFinite((t-e)/(n-1)))return{step:new Gk.default(0),tickMin:new Gk.default(0),tickMax:new Gk.default(0)};var o=a(new Gk.default(t).sub(e).div(n-1),r,i),s;e<=0&&t>=0?s=new Gk.default(0):(s=new Gk.default(e).add(t).div(2),s=s.sub(new Gk.default(s).mod(o)));var c=Math.ceil(s.sub(e).div(o).toNumber()),l=Math.ceil(new Gk.default(t).sub(s).div(o).toNumber()),u=c+l+1;return u>n?$k(e,t,n,r,i+1,a):(u<n&&(l=t>0?l+(n-u):l,c=t>0?c:c+(n-u)),{step:o,tickMin:s.sub(new Gk.default(c).mul(o)),tickMax:s.add(new Gk.default(l).mul(o))})},eA=function(e){var t=Jk(e,2),n=t[0],r=t[1],i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:`auto`,s=Math.max(i,2),c=Jk(Xk([n,r]),2),l=c[0],u=c[1];if(l===-1/0||u===1/0){var d=u===1/0?[l,...Array(i-1).fill(1/0)]:[...Array(i-1).fill(-1/0),u];return n>r?d.reverse():d}if(l===u)return Jde(l,i,a);var f=$k(l,u,s,a,0,o===`snap125`?Qk:Zk),p=f.step,m=f.tickMin,h=f.tickMax,g=qk(m,h.add(new Gk.default(.1).mul(p)),p);return n>r?g.reverse():g},tA=function(e,t){var n=Jk(e,2),r=n[0],i=n[1],a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:`auto`,s=Jk(Xk([r,i]),2),c=s[0],l=s[1];if(c===-1/0||l===1/0)return[r,i];if(c===l)return[c];var u=o===`snap125`?Qk:Zk,d=Math.max(t,2),f=u(new Gk.default(l).sub(c).div(d-1),a,0),p=[...qk(new Gk.default(c),new Gk.default(l),f),l];if(a===!1){p=p.map(e=>Math.round(e));var m=p.length-1;m>0&&p[m]===p[m-1]&&(p=p.slice(0,m))}return r>i?p.reverse():p},Yde=e=>e.rootProps.barCategoryGap,nA=e=>e.rootProps.stackOffset,rA=e=>e.rootProps.reverseStackOrder,iA=e=>e.options.chartName,Xde=e=>e.rootProps.syncId,Zde=e=>e.rootProps.syncMethod,Qde=e=>e.options.eventEmitter,aA={grid:-100,barBackground:-50,area:100,cursorRectangle:200,bar:300,line:400,axis:500,scatter:600,activeBar:1e3,cursorLine:1100,activeDot:1200,label:2e3},oA={allowDecimals:!1,allowDuplicatedCategory:!0,allowDataOverflow:!1,angle:0,angleAxisId:0,axisLine:!0,axisLineType:`polygon`,cx:0,cy:0,hide:!1,includeHidden:!1,label:!1,niceTicks:`auto`,orientation:`outer`,reversed:!1,scale:`auto`,tick:!0,tickLine:!0,tickSize:8,type:`auto`,zIndex:aA.axis},sA={allowDataOverflow:!1,allowDecimals:!1,allowDuplicatedCategory:!0,angle:0,axisLine:!0,includeHidden:!1,hide:!1,niceTicks:`auto`,label:!1,orientation:`right`,radiusAxisId:0,reversed:!1,scale:`auto`,stroke:`#ccc`,tick:!0,tickCount:5,tickLine:!0,type:`auto`,zIndex:aA.axis},cA=(e,t)=>{if(e&&t)return e!=null&&e.reversed?[t[1],t[0]]:t};function lA(e,t,n){if(n!==`auto`)return n;if(e!=null)return jT(e,t)?`category`:`number`}function uA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function dA(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?uA(Object(n),!0).forEach(function(t){$de(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):uA(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function $de(e,t,n){return(t=efe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function efe(e){var t=tfe(e,`string`);return typeof t==`symbol`?t:t+``}function tfe(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var fA={allowDataOverflow:oA.allowDataOverflow,allowDecimals:oA.allowDecimals,allowDuplicatedCategory:!1,dataKey:void 0,domain:void 0,id:oA.angleAxisId,includeHidden:!1,name:void 0,reversed:oA.reversed,scale:oA.scale,tick:oA.tick,tickCount:void 0,ticks:void 0,type:oA.type,unit:void 0,niceTicks:`auto`},pA={allowDataOverflow:sA.allowDataOverflow,allowDecimals:sA.allowDecimals,allowDuplicatedCategory:sA.allowDuplicatedCategory,dataKey:void 0,domain:void 0,id:sA.radiusAxisId,includeHidden:sA.includeHidden,name:void 0,reversed:sA.reversed,scale:sA.scale,tick:sA.tick,tickCount:sA.tickCount,ticks:void 0,type:sA.type,unit:void 0,niceTicks:`auto`},mA=$([(e,t)=>{if(t!=null)return e.polarAxis.angleAxis[t]},tE],(e,t)=>{if(e!=null)return e;var n=lA(t,`angleAxis`,fA.type)??`category`;return dA(dA({},fA),{},{type:n})}),hA=$([(e,t)=>e.polarAxis.radiusAxis[t],tE],(e,t)=>{if(e!=null)return e;var n=lA(t,`radiusAxis`,pA.type)??`category`;return dA(dA({},pA),{},{type:n})}),gA=e=>e.polarOptions,_A=$([FT,IT,HT],xk),vA=$([gA,_A],(e,t)=>{if(e!=null)return Tx(e.innerRadius,t,0)}),yA=$([gA,_A],(e,t)=>{if(e!=null)return Tx(e.outerRadius,t,t*.8)}),bA=$([gA],e=>e==null?[0,0]:[e.startAngle,e.endAngle]);$([mA,bA],cA);var xA=$([_A,vA,yA],(e,t,n)=>{if(e!=null&&t!=null&&n!=null)return[t,n]});$([hA,xA],cA),$([$T,gA,vA,yA,FT,IT],(e,t,n,r,i,a)=>{if(!(e!==`centric`&&e!==`radial`||t==null||n==null||r==null)){var o=t.cx,s=t.cy,c=t.startAngle,l=t.endAngle;return{cx:Tx(o,i,i/2),cy:Tx(s,a,a/2),innerRadius:n,outerRadius:r,startAngle:c,endAngle:l,clockWise:!1}}});var SA=(e,t)=>t,CA=(e,t,n)=>n;function wA(e){return e?.id}function TA(e,t,n){var r=t.chartData,i=r===void 0?[]:r,a=n.allowDuplicatedCategory,o=n.dataKey,s=new Map;return e.forEach(e=>{var t=e.data??i;if(t!=null&&t.length!==0){var n=wA(e);t.forEach((t,r)=>{var i=o==null||a?r:String(AT(t,o,null)),c=AT(t,e.dataKey,0),l=s.has(i)?s.get(i):{};Object.assign(l,{[n]:c}),s.set(i,l)})}}),Array.from(s.values())}function EA(e){return`stackId`in e&&e.stackId!=null&&e.dataKey!=null}var DA=(e,t)=>e===t?!0:e==null||t==null?!1:e[0]===t[0]&&e[1]===t[1];function OA(e,t){return Array.isArray(e)&&Array.isArray(t)&&e.length===0&&t.length===0?!0:e===t}function nfe(e,t){if(e.length===t.length){for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}return!1}var kA=e=>{var t=$T(e);return t===`horizontal`?`xAxis`:t===`vertical`?`yAxis`:t===`centric`?`angleAxis`:`radiusAxis`},AA=e=>e.tooltip.settings.axisId;function jA(e){if(e!=null){var t=e.ticks,n=e.bandwidth,r=e.range(),i=[Math.min(...r),Math.max(...r)];return{domain:()=>e.domain(),range:function(e){function t(){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}(()=>i),rangeMin:()=>i[0],rangeMax:()=>i[1],isInRange(e){var t=i[0],n=i[1];return t<=n?e>=t&&e<=n:e>=n&&e<=t},bandwidth:n?()=>n.call(e):void 0,ticks:t?n=>t.call(e,n):void 0,map:(t,n)=>{var r=e(t);if(r!=null){if(e.bandwidth&&n!=null&&n.position){var i=e.bandwidth();switch(n.position){case`middle`:r+=i/2;break;case`end`:r+=i}}return r}}}}}var rfe=(e,t)=>{if(t!=null)switch(e){case`linear`:if(!Hk(t)){for(var n,r,i=0;i<t.length;i++){var a=t[i];DT(a)&&((n===void 0||a<n)&&(n=a),(r===void 0||a>r)&&(r=a))}return n!==void 0&&r!==void 0?[n,r]:void 0}return t;default:return t}};function MA(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function ife(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function NA(e){let t,n,r;e.length===2?(t=e===MA||e===ife?e:afe,n=e,r=e):(t=MA,n=(t,n)=>MA(e(t),n),r=(t,n)=>e(t)-n);function i(e,r,i=0,a=e.length){if(i<a){if(t(r,r)!==0)return a;do{let t=i+a>>>1;n(e[t],r)<0?i=t+1:a=t}while(i<a)}return i}function a(e,r,i=0,a=e.length){if(i<a){if(t(r,r)!==0)return a;do{let t=i+a>>>1;n(e[t],r)<=0?i=t+1:a=t}while(i<a)}return i}function o(e,t,n=0,a=e.length){let o=i(e,t,n,a-1);return o>n&&r(e[o-1],t)>-r(e[o],t)?o-1:o}return{left:i,center:o,right:a}}function afe(){return 0}function PA(e){return e===null?NaN:+e}function*ofe(e,t){if(t===void 0)for(let t of e)t!=null&&(t=+t)>=t&&(yield t);else{let n=-1;for(let r of e)(r=t(r,++n,e))!=null&&(r=+r)>=r&&(yield r)}}var FA=NA(MA),IA=FA.right;FA.left,NA(PA).center;var LA=class extends Map{constructor(e,t=lfe){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),e!=null)for(let[t,n]of e)this.set(t,n)}get(e){return super.get(RA(this,e))}has(e){return super.has(RA(this,e))}set(e,t){return super.set(sfe(this,e),t)}delete(e){return super.delete(cfe(this,e))}};function RA({_intern:e,_key:t},n){let r=t(n);return e.has(r)?e.get(r):n}function sfe({_intern:e,_key:t},n){let r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function cfe({_intern:e,_key:t},n){let r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function lfe(e){return typeof e==`object`&&e?e.valueOf():e}function ufe(e=MA){if(e===MA)return zA;if(typeof e!=`function`)throw TypeError(`compare is not a function`);return(t,n)=>{let r=e(t,n);return r||r===0?r:(e(n,n)===0)-(e(t,t)===0)}}function zA(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:+(e>t))}var dfe=Math.sqrt(50),ffe=Math.sqrt(10),pfe=Math.sqrt(2);function BA(e,t,n){let r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),a=r/10**i,o=a>=dfe?10:a>=ffe?5:a>=pfe?2:1,s,c,l;return i<0?(l=10**-i/o,s=Math.round(e*l),c=Math.round(t*l),s/l<e&&++s,c/l>t&&--c,l=-l):(l=10**i*o,s=Math.round(e/l),c=Math.round(t/l),s*l<e&&++s,c*l>t&&--c),c<s&&.5<=n&&n<2?BA(e,t,n*2):[s,c,l]}function VA(e,t,n){if(t=+t,e=+e,n=+n,!(n>0))return[];if(e===t)return[e];let r=t<e,[i,a,o]=r?BA(t,e,n):BA(e,t,n);if(!(a>=i))return[];let s=a-i+1,c=Array(s);if(r){if(o<0)for(let e=0;e<s;++e)c[e]=(a-e)/-o;else for(let e=0;e<s;++e)c[e]=(a-e)*o}else if(o<0)for(let e=0;e<s;++e)c[e]=(i+e)/-o;else for(let e=0;e<s;++e)c[e]=(i+e)*o;return c}function HA(e,t,n){return t=+t,e=+e,n=+n,BA(e,t,n)[2]}function UA(e,t,n){t=+t,e=+e,n=+n;let r=t<e,i=r?HA(t,e,n):HA(e,t,n);return(r?-1:1)*(i<0?1/-i:i)}function WA(e,t){let n;if(t===void 0)for(let t of e)t!=null&&(n<t||n===void 0&&t>=t)&&(n=t);else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(n<i||n===void 0&&i>=i)&&(n=i)}return n}function GA(e,t){let n;if(t===void 0)for(let t of e)t!=null&&(n>t||n===void 0&&t>=t)&&(n=t);else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(n>i||n===void 0&&i>=i)&&(n=i)}return n}function KA(e,t,n=0,r=1/0,i){if(t=Math.floor(t),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(e.length-1,r)),!(n<=t&&t<=r))return e;for(i=i===void 0?zA:ufe(i);r>n;){if(r-n>600){let a=r-n+1,o=t-n+1,s=Math.log(a),c=.5*Math.exp(2*s/3),l=.5*Math.sqrt(s*c*(a-c)/a)*(o-a/2<0?-1:1),u=Math.max(n,Math.floor(t-o*c/a+l)),d=Math.min(r,Math.floor(t+(a-o)*c/a+l));KA(e,t,u,d,i)}let a=e[t],o=n,s=r;for(qA(e,n,t),i(e[r],a)>0&&qA(e,n,r);o<s;){for(qA(e,o,s),++o,--s;i(e[o],a)<0;)++o;for(;i(e[s],a)>0;)--s}i(e[n],a)===0?qA(e,n,s):(++s,qA(e,s,r)),s<=t&&(n=s+1),t<=s&&(r=s-1)}return e}function qA(e,t,n){let r=e[t];e[t]=e[n],e[n]=r}function mfe(e,t,n){if(e=Float64Array.from(ofe(e,n)),(r=e.length)&&!isNaN(t=+t)){if(t<=0||r<2)return GA(e);if(t>=1)return WA(e);var r,i=(r-1)*t,a=Math.floor(i),o=WA(KA(e,a).subarray(0,a+1));return o+(GA(e.subarray(a+1))-o)*(i-a)}}function hfe(e,t,n=PA){if((r=e.length)&&!isNaN(t=+t)){if(t<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,i=(r-1)*t,a=Math.floor(i),o=+n(e[a],a,e);return o+(+n(e[a+1],a+1,e)-o)*(i-a)}}function gfe(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((t-e)/n))|0,a=Array(i);++r<i;)a[r]=e+r*n;return a}function JA(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}function YA(e,t){switch(arguments.length){case 0:break;case 1:typeof e==`function`?this.interpolator(e):this.range(e);break;default:this.domain(e),typeof t==`function`?this.interpolator(t):this.range(t)}return this}var XA=Symbol(`implicit`);function ZA(){var e=new LA,t=[],n=[],r=XA;function i(i){let a=e.get(i);if(a===void 0){if(r!==XA)return r;e.set(i,a=t.push(i)-1)}return n[a%n.length]}return i.domain=function(n){if(!arguments.length)return t.slice();t=[],e=new LA;for(let r of n)e.has(r)||e.set(r,t.push(r)-1);return i},i.range=function(e){return arguments.length?(n=Array.from(e),i):n.slice()},i.unknown=function(e){return arguments.length?(r=e,i):r},i.copy=function(){return ZA(t,n).unknown(r)},JA.apply(i,arguments),i}function QA(){var e=ZA().unknown(void 0),t=e.domain,n=e.range,r=0,i=1,a,o,s=!1,c=0,l=0,u=.5;delete e.unknown;function d(){var e=t().length,d=i<r,f=d?i:r,p=d?r:i;a=(p-f)/Math.max(1,e-c+l*2),s&&(a=Math.floor(a)),f+=(p-f-a*(e-c))*u,o=a*(1-c),s&&(f=Math.round(f),o=Math.round(o));var m=gfe(e).map(function(e){return f+a*e});return n(d?m.reverse():m)}return e.domain=function(e){return arguments.length?(t(e),d()):t()},e.range=function(e){return arguments.length?([r,i]=e,r=+r,i=+i,d()):[r,i]},e.rangeRound=function(e){return[r,i]=e,r=+r,i=+i,s=!0,d()},e.bandwidth=function(){return o},e.step=function(){return a},e.round=function(e){return arguments.length?(s=!!e,d()):s},e.padding=function(e){return arguments.length?(c=Math.min(1,l=+e),d()):c},e.paddingInner=function(e){return arguments.length?(c=Math.min(1,e),d()):c},e.paddingOuter=function(e){return arguments.length?(l=+e,d()):l},e.align=function(e){return arguments.length?(u=Math.max(0,Math.min(1,e)),d()):u},e.copy=function(){return QA(t(),[r,i]).round(s).paddingInner(c).paddingOuter(l).align(u)},JA.apply(d(),arguments)}function $A(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return $A(t())},e}function _fe(){return $A(QA.apply(null,arguments).paddingInner(1))}function ej(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function tj(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function nj(){}var rj=.7,ij=1/rj,aj=`\\s*([+-]?\\d+)\\s*`,oj=`\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*`,sj=`\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*`,vfe=/^#([0-9a-f]{3,8})$/,yfe=RegExp(`^rgb\\(${aj},${aj},${aj}\\)$`),bfe=RegExp(`^rgb\\(${sj},${sj},${sj}\\)$`),xfe=RegExp(`^rgba\\(${aj},${aj},${aj},${oj}\\)$`),Sfe=RegExp(`^rgba\\(${sj},${sj},${sj},${oj}\\)$`),Cfe=RegExp(`^hsl\\(${oj},${sj},${sj}\\)$`),wfe=RegExp(`^hsla\\(${oj},${sj},${sj},${oj}\\)$`),cj={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};ej(nj,dj,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:lj,formatHex:lj,formatHex8:Tfe,formatHsl:Efe,formatRgb:uj,toString:uj});function lj(){return this.rgb().formatHex()}function Tfe(){return this.rgb().formatHex8()}function Efe(){return Sj(this).formatHsl()}function uj(){return this.rgb().formatRgb()}function dj(e){var t,n;return e=(e+``).trim().toLowerCase(),(t=vfe.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?fj(t):n===3?new hj(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?pj(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?pj(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=yfe.exec(e))?new hj(t[1],t[2],t[3],1):(t=bfe.exec(e))?new hj(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=xfe.exec(e))?pj(t[1],t[2],t[3],t[4]):(t=Sfe.exec(e))?pj(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=Cfe.exec(e))?xj(t[1],t[2]/100,t[3]/100,1):(t=wfe.exec(e))?xj(t[1],t[2]/100,t[3]/100,t[4]):cj.hasOwnProperty(e)?fj(cj[e]):e===`transparent`?new hj(NaN,NaN,NaN,0):null}function fj(e){return new hj(e>>16&255,e>>8&255,e&255,1)}function pj(e,t,n,r){return r<=0&&(e=t=n=NaN),new hj(e,t,n,r)}function Dfe(e){return e instanceof nj||(e=dj(e)),e?(e=e.rgb(),new hj(e.r,e.g,e.b,e.opacity)):new hj}function mj(e,t,n,r){return arguments.length===1?Dfe(e):new hj(e,t,n,r??1)}function hj(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}ej(hj,mj,tj(nj,{brighter(e){return e=e==null?ij:ij**+e,new hj(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?rj:rj**+e,new hj(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new hj(yj(this.r),yj(this.g),yj(this.b),vj(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:gj,formatHex:gj,formatHex8:Ofe,formatRgb:_j,toString:_j}));function gj(){return`#${bj(this.r)}${bj(this.g)}${bj(this.b)}`}function Ofe(){return`#${bj(this.r)}${bj(this.g)}${bj(this.b)}${bj((isNaN(this.opacity)?1:this.opacity)*255)}`}function _j(){let e=vj(this.opacity);return`${e===1?`rgb(`:`rgba(`}${yj(this.r)}, ${yj(this.g)}, ${yj(this.b)}${e===1?`)`:`, ${e})`}`}function vj(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function yj(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function bj(e){return e=yj(e),(e<16?`0`:``)+e.toString(16)}function xj(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Cj(e,t,n,r)}function Sj(e){if(e instanceof Cj)return new Cj(e.h,e.s,e.l,e.opacity);if(e instanceof nj||(e=dj(e)),!e)return new Cj;if(e instanceof Cj)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),a=Math.max(t,n,r),o=NaN,s=a-i,c=(a+i)/2;return s?(o=t===a?(n-r)/s+(n<r)*6:n===a?(r-t)/s+2:(t-n)/s+4,s/=c<.5?a+i:2-a-i,o*=60):s=c>0&&c<1?0:o,new Cj(o,s,c,e.opacity)}function kfe(e,t,n,r){return arguments.length===1?Sj(e):new Cj(e,t,n,r??1)}function Cj(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}ej(Cj,kfe,tj(nj,{brighter(e){return e=e==null?ij:ij**+e,new Cj(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?rj:rj**+e,new Cj(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new hj(Ej(e>=240?e-240:e+120,i,r),Ej(e,i,r),Ej(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new Cj(wj(this.h),Tj(this.s),Tj(this.l),vj(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){let e=vj(this.opacity);return`${e===1?`hsl(`:`hsla(`}${wj(this.h)}, ${Tj(this.s)*100}%, ${Tj(this.l)*100}%${e===1?`)`:`, ${e})`}`}}));function wj(e){return e=(e||0)%360,e<0?e+360:e}function Tj(e){return Math.max(0,Math.min(1,e||0))}function Ej(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}var Dj=e=>()=>e;function Afe(e,t){return function(n){return e+n*t}}function jfe(e,t,n){return e**=+n,t=t**+n-e,n=1/n,function(r){return(e+r*t)**+n}}function Mfe(e){return(e=+e)==1?Oj:function(t,n){return n-t?jfe(t,n,e):Dj(isNaN(t)?n:t)}}function Oj(e,t){var n=t-e;return n?Afe(e,n):Dj(isNaN(e)?t:e)}var kj=(function e(t){var n=Mfe(t);function r(e,t){var r=n((e=mj(e)).r,(t=mj(t)).r),i=n(e.g,t.g),a=n(e.b,t.b),o=Oj(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=i(t),e.b=a(t),e.opacity=o(t),e+``}}return r.gamma=e,r})(1);function Nfe(e,t){t||=[];var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(a){for(i=0;i<n;++i)r[i]=e[i]*(1-a)+t[i]*a;return r}}function Pfe(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function Ffe(e,t){for(var n=t?t.length:0,r=e?Math.min(n,e.length):0,i=Array(r),a=Array(n),o=0;o<r;++o)i[o]=Nj(e[o],t[o]);for(;o<n;++o)a[o]=t[o];return function(e){for(o=0;o<r;++o)a[o]=i[o](e);return a}}function Ife(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function Aj(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function Lfe(e,t){var n={},r={},i;for(i in(typeof e!=`object`||!e)&&(e={}),(typeof t!=`object`||!t)&&(t={}),t)i in e?n[i]=Nj(e[i],t[i]):r[i]=t[i];return function(e){for(i in n)r[i]=n[i](e);return r}}var jj=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Mj=new RegExp(jj.source,`g`);function Rfe(e){return function(){return e}}function zfe(e){return function(t){return e(t)+``}}function Bfe(e,t){var n=jj.lastIndex=Mj.lastIndex=0,r,i,a,o=-1,s=[],c=[];for(e+=``,t+=``;(r=jj.exec(e))&&(i=Mj.exec(t));)(a=i.index)>n&&(a=t.slice(n,a),s[o]?s[o]+=a:s[++o]=a),(r=r[0])===(i=i[0])?s[o]?s[o]+=i:s[++o]=i:(s[++o]=null,c.push({i:o,x:Aj(r,i)})),n=Mj.lastIndex;return n<t.length&&(a=t.slice(n),s[o]?s[o]+=a:s[++o]=a),s.length<2?c[0]?zfe(c[0].x):Rfe(t):(t=c.length,function(e){for(var n=0,r;n<t;++n)s[(r=c[n]).i]=r.x(e);return s.join(``)})}function Nj(e,t){var n=typeof t,r;return t==null||n===`boolean`?Dj(t):(n===`number`?Aj:n===`string`?(r=dj(t))?(t=r,kj):Bfe:t instanceof dj?kj:t instanceof Date?Ife:Pfe(t)?Nfe:Array.isArray(t)?Ffe:typeof t.valueOf!=`function`&&typeof t.toString!=`function`||isNaN(t)?Lfe:Aj)(e,t)}function Pj(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function Vfe(e,t){t===void 0&&(t=e,e=Nj);for(var n=0,r=t.length-1,i=t[0],a=Array(r<0?0:r);n<r;)a[n]=e(i,i=t[++n]);return function(e){var t=Math.max(0,Math.min(r-1,Math.floor(e*=r)));return a[t](e-t)}}function Hfe(e){return function(){return e}}function Fj(e){return+e}var Ij=[0,1];function Lj(e){return e}function Rj(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:Hfe(isNaN(t)?NaN:.5)}function Ufe(e,t){var n;return e>t&&(n=e,e=t,t=n),function(n){return Math.max(e,Math.min(t,n))}}function Wfe(e,t,n){var r=e[0],i=e[1],a=t[0],o=t[1];return i<r?(r=Rj(i,r),a=n(o,a)):(r=Rj(r,i),a=n(a,o)),function(e){return a(r(e))}}function Gfe(e,t,n){var r=Math.min(e.length,t.length)-1,i=Array(r),a=Array(r),o=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++o<r;)i[o]=Rj(e[o],e[o+1]),a[o]=n(t[o],t[o+1]);return function(t){var n=IA(e,t,1,r)-1;return a[n](i[n](t))}}function zj(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function Bj(){var e=Ij,t=Ij,n=Nj,r,i,a,o=Lj,s,c,l;function u(){var n=Math.min(e.length,t.length);return o!==Lj&&(o=Ufe(e[0],e[n-1])),s=n>2?Gfe:Wfe,c=l=null,d}function d(i){return i==null||isNaN(i=+i)?a:(c||=s(e.map(r),t,n))(r(o(i)))}return d.invert=function(n){return o(i((l||=s(t,e.map(r),Aj))(n)))},d.domain=function(t){return arguments.length?(e=Array.from(t,Fj),u()):e.slice()},d.range=function(e){return arguments.length?(t=Array.from(e),u()):t.slice()},d.rangeRound=function(e){return t=Array.from(e),n=Pj,u()},d.clamp=function(e){return arguments.length?(o=e?!0:Lj,u()):o!==Lj},d.interpolate=function(e){return arguments.length?(n=e,u()):n},d.unknown=function(e){return arguments.length?(a=e,d):a},function(e,t){return r=e,i=t,u()}}function Vj(){return Bj()(Lj,Lj)}function Kfe(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString(`en`).replace(/,/g,``):e.toString(10)}function Hj(e,t){if(!isFinite(e)||e===0)return null;var n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf(`e`),r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function Uj(e){return e=Hj(Math.abs(e)),e?e[1]:NaN}function qfe(e,t){return function(n,r){for(var i=n.length,a=[],o=0,s=e[0],c=0;i>0&&s>0&&(c+s+1>r&&(s=Math.max(1,r-c)),a.push(n.substring(i-=s,i+s)),!((c+=s+1)>r));)s=e[o=(o+1)%e.length];return a.reverse().join(t)}}function Jfe(e){return function(t){return t.replace(/[0-9]/g,function(t){return e[+t]})}}var Yfe=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Wj(e){if(!(t=Yfe.exec(e)))throw Error(`invalid format: `+e);var t;return new Gj({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}Wj.prototype=Gj.prototype;function Gj(e){this.fill=e.fill===void 0?` `:e.fill+``,this.align=e.align===void 0?`>`:e.align+``,this.sign=e.sign===void 0?`-`:e.sign+``,this.symbol=e.symbol===void 0?``:e.symbol+``,this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?``:e.type+``}Gj.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?`0`:``)+(this.width===void 0?``:Math.max(1,this.width|0))+(this.comma?`,`:``)+(this.precision===void 0?``:`.`+Math.max(0,this.precision|0))+(this.trim?`~`:``)+this.type};function Xfe(e){out:for(var t=e.length,n=1,r=-1,i;n<t;++n)switch(e[n]){case`.`:r=i=n;break;case`0`:r===0&&(r=n),i=n;break;default:if(!+e[n])break out;r>0&&(r=0)}return r>0?e.slice(0,r)+e.slice(i+1):e}var Kj;function Zfe(e,t){var n=Hj(e,t);if(!n)return Kj=void 0,e.toPrecision(t);var r=n[0],i=n[1],a=i-(Kj=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,o=r.length;return a===o?r:a>o?r+Array(a-o+1).join(`0`):a>0?r.slice(0,a)+`.`+r.slice(a):`0.`+Array(1-a).join(`0`)+Hj(e,Math.max(0,t+a-1))[0]}function qj(e,t){var n=Hj(e,t);if(!n)return e+``;var r=n[0],i=n[1];return i<0?`0.`+Array(-i).join(`0`)+r:r.length>i+1?r.slice(0,i+1)+`.`+r.slice(i+1):r+Array(i-r.length+2).join(`0`)}var Jj={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+``,d:Kfe,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>qj(e*100,t),r:qj,s:Zfe,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function Yj(e){return e}var Xj=Array.prototype.map,Zj=[`y`,`z`,`a`,`f`,`p`,`n`,`µ`,`m`,``,`k`,`M`,`G`,`T`,`P`,`E`,`Z`,`Y`];function Qfe(e){var t=e.grouping===void 0||e.thousands===void 0?Yj:qfe(Xj.call(e.grouping,Number),e.thousands+``),n=e.currency===void 0?``:e.currency[0]+``,r=e.currency===void 0?``:e.currency[1]+``,i=e.decimal===void 0?`.`:e.decimal+``,a=e.numerals===void 0?Yj:Jfe(Xj.call(e.numerals,String)),o=e.percent===void 0?`%`:e.percent+``,s=e.minus===void 0?`−`:e.minus+``,c=e.nan===void 0?`NaN`:e.nan+``;function l(e,l){e=Wj(e);var u=e.fill,d=e.align,f=e.sign,p=e.symbol,m=e.zero,h=e.width,g=e.comma,_=e.precision,v=e.trim,y=e.type;y===`n`?(g=!0,y=`g`):Jj[y]||(_===void 0&&(_=12),v=!0,y=`g`),(m||u===`0`&&d===`=`)&&(m=!0,u=`0`,d=`=`);var b=(l&&l.prefix!==void 0?l.prefix:``)+(p===`$`?n:p===`#`&&/[boxX]/.test(y)?`0`+y.toLowerCase():``),x=(p===`$`?r:/[%p]/.test(y)?o:``)+(l&&l.suffix!==void 0?l.suffix:``),S=Jj[y],C=/[defgprs%]/.test(y);_=_===void 0?6:/[gprs]/.test(y)?Math.max(1,Math.min(21,_)):Math.max(0,Math.min(20,_));function w(e){var n=b,r=x,o,l,p;if(y===`c`)r=S(e)+r,e=``;else{e=+e;var w=e<0||1/e<0;if(e=isNaN(e)?c:S(Math.abs(e),_),v&&(e=Xfe(e)),w&&+e==0&&f!==`+`&&(w=!1),n=(w?f===`(`?f:s:f===`-`||f===`(`?``:f)+n,r=(y===`s`&&!isNaN(e)&&Kj!==void 0?Zj[8+Kj/3]:``)+r+(w&&f===`(`?`)`:``),C){for(o=-1,l=e.length;++o<l;)if(p=e.charCodeAt(o),48>p||p>57){r=(p===46?i+e.slice(o+1):e.slice(o))+r,e=e.slice(0,o);break}}}g&&!m&&(e=t(e,1/0));var T=n.length+e.length+r.length,E=T<h?Array(h-T+1).join(u):``;switch(g&&m&&(e=t(E+e,E.length?h-r.length:1/0),E=``),d){case`<`:e=n+e+r+E;break;case`=`:e=n+E+e+r;break;case`^`:e=E.slice(0,T=E.length>>1)+n+e+r+E.slice(T);break;default:e=E+n+e+r}return a(e)}return w.toString=function(){return e+``},w}function u(e,t){var n=Math.max(-8,Math.min(8,Math.floor(Uj(t)/3)))*3,r=10**-n,i=l((e=Wj(e),e.type=`f`,e),{suffix:Zj[8+n/3]});return function(e){return i(r*e)}}return{format:l,formatPrefix:u}}var Qj,$j,eM;$fe({thousands:`,`,grouping:[3],currency:[`$`,``]});function $fe(e){return Qj=Qfe(e),$j=Qj.format,eM=Qj.formatPrefix,Qj}function epe(e){return Math.max(0,-Uj(Math.abs(e)))}function tpe(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Uj(t)/3)))*3-Uj(Math.abs(e)))}function npe(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Uj(t)-Uj(e))+1}function tM(e,t,n,r){var i=UA(e,t,n),a;switch(r=Wj(r??`,f`),r.type){case`s`:var o=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(a=tpe(i,o))&&(r.precision=a),eM(r,o);case``:case`e`:case`g`:case`p`:case`r`:r.precision==null&&!isNaN(a=npe(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=a-(r.type===`e`));break;case`f`:case`%`:r.precision==null&&!isNaN(a=epe(i))&&(r.precision=a-(r.type===`%`)*2)}return $j(r)}function nM(e){var t=e.domain;return e.ticks=function(e){var n=t();return VA(n[0],n[n.length-1],e??10)},e.tickFormat=function(e,n){var r=t();return tM(r[0],r[r.length-1],e??10,n)},e.nice=function(n){n??=10;var r=t(),i=0,a=r.length-1,o=r[i],s=r[a],c,l,u=10;for(s<o&&(l=o,o=s,s=l,l=i,i=a,a=l);u-->0;){if(l=HA(o,s,n),l===c)return r[i]=o,r[a]=s,t(r);if(l>0)o=Math.floor(o/l)*l,s=Math.ceil(s/l)*l;else if(l<0)o=Math.ceil(o*l)/l,s=Math.floor(s*l)/l;else break;c=l}return e},e}function rM(){var e=Vj();return e.copy=function(){return zj(e,rM())},JA.apply(e,arguments),nM(e)}function iM(e){var t;function n(e){return e==null||isNaN(e=+e)?t:e}return n.invert=n,n.domain=n.range=function(t){return arguments.length?(e=Array.from(t,Fj),n):e.slice()},n.unknown=function(e){return arguments.length?(t=e,n):t},n.copy=function(){return iM(e).unknown(t)},e=arguments.length?Array.from(e,Fj):[0,1],nM(n)}function aM(e,t){e=e.slice();var n=0,r=e.length-1,i=e[n],a=e[r],o;return a<i&&(o=n,n=r,r=o,o=i,i=a,a=o),e[n]=t.floor(i),e[r]=t.ceil(a),e}function oM(e){return Math.log(e)}function sM(e){return Math.exp(e)}function rpe(e){return-Math.log(-e)}function ipe(e){return-Math.exp(-e)}function ape(e){return isFinite(e)?+(`1e`+e):e<0?0:e}function ope(e){return e===10?ape:e===Math.E?Math.exp:t=>e**+t}function spe(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function cM(e){return(t,n)=>-e(-t,n)}function lM(e){let t=e(oM,sM),n=t.domain,r=10,i,a;function o(){return i=spe(r),a=ope(r),n()[0]<0?(i=cM(i),a=cM(a),e(rpe,ipe)):e(oM,sM),t}return t.base=function(e){return arguments.length?(r=+e,o()):r},t.domain=function(e){return arguments.length?(n(e),o()):n()},t.ticks=e=>{let t=n(),o=t[0],s=t[t.length-1],c=s<o;c&&([o,s]=[s,o]);let l=i(o),u=i(s),d,f,p=e==null?10:+e,m=[];if(!(r%1)&&u-l<p){if(l=Math.floor(l),u=Math.ceil(u),o>0){for(;l<=u;++l)for(d=1;d<r;++d)if(f=l<0?d/a(-l):d*a(l),!(f<o)){if(f>s)break;m.push(f)}}else for(;l<=u;++l)for(d=r-1;d>=1;--d)if(f=l>0?d/a(-l):d*a(l),!(f<o)){if(f>s)break;m.push(f)}m.length*2<p&&(m=VA(o,s,p))}else m=VA(l,u,Math.min(u-l,p)).map(a);return c?m.reverse():m},t.tickFormat=(e,n)=>{if(e??=10,n??=r===10?`s`:`,`,typeof n!=`function`&&(!(r%1)&&(n=Wj(n)).precision==null&&(n.trim=!0),n=$j(n)),e===1/0)return n;let o=Math.max(1,r*e/t.ticks().length);return e=>{let t=e/a(Math.round(i(e)));return t*r<r-.5&&(t*=r),t<=o?n(e):``}},t.nice=()=>n(aM(n(),{floor:e=>a(Math.floor(i(e))),ceil:e=>a(Math.ceil(i(e)))})),t}function uM(){let e=lM(Bj()).domain([1,10]);return e.copy=()=>zj(e,uM()).base(e.base()),JA.apply(e,arguments),e}function dM(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function fM(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function pM(e){var t=1,n=e(dM(t),fM(t));return n.constant=function(n){return arguments.length?e(dM(t=+n),fM(t)):t},nM(n)}function mM(){var e=pM(Bj());return e.copy=function(){return zj(e,mM()).constant(e.constant())},JA.apply(e,arguments)}function hM(e){return function(t){return t<0?-((-t)**+e):t**+e}}function cpe(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function lpe(e){return e<0?-e*e:e*e}function gM(e){var t=e(Lj,Lj),n=1;function r(){return n===1?e(Lj,Lj):n===.5?e(cpe,lpe):e(hM(n),hM(1/n))}return t.exponent=function(e){return arguments.length?(n=+e,r()):n},nM(t)}function _M(){var e=gM(Bj());return e.copy=function(){return zj(e,_M()).exponent(e.exponent())},JA.apply(e,arguments),e}function upe(){return _M.apply(null,arguments).exponent(.5)}function vM(e){return Math.sign(e)*e*e}function dpe(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function yM(){var e=Vj(),t=[0,1],n=!1,r;function i(t){var i=dpe(e(t));return isNaN(i)?r:n?Math.round(i):i}return i.invert=function(t){return e.invert(vM(t))},i.domain=function(t){return arguments.length?(e.domain(t),i):e.domain()},i.range=function(n){return arguments.length?(e.range((t=Array.from(n,Fj)).map(vM)),i):t.slice()},i.rangeRound=function(e){return i.range(e).round(!0)},i.round=function(e){return arguments.length?(n=!!e,i):n},i.clamp=function(t){return arguments.length?(e.clamp(t),i):e.clamp()},i.unknown=function(e){return arguments.length?(r=e,i):r},i.copy=function(){return yM(e.domain(),t).round(n).clamp(e.clamp()).unknown(r)},JA.apply(i,arguments),nM(i)}function bM(){var e=[],t=[],n=[],r;function i(){var r=0,i=Math.max(1,t.length);for(n=Array(i-1);++r<i;)n[r-1]=hfe(e,r/i);return a}function a(e){return e==null||isNaN(e=+e)?r:t[IA(n,e)]}return a.invertExtent=function(r){var i=t.indexOf(r);return i<0?[NaN,NaN]:[i>0?n[i-1]:e[0],i<n.length?n[i]:e[e.length-1]]},a.domain=function(t){if(!arguments.length)return e.slice();e=[];for(let n of t)n!=null&&!isNaN(n=+n)&&e.push(n);return e.sort(MA),i()},a.range=function(e){return arguments.length?(t=Array.from(e),i()):t.slice()},a.unknown=function(e){return arguments.length?(r=e,a):r},a.quantiles=function(){return n.slice()},a.copy=function(){return bM().domain(e).range(t).unknown(r)},JA.apply(a,arguments)}function xM(){var e=0,t=1,n=1,r=[.5],i=[0,1],a;function o(e){return e!=null&&e<=e?i[IA(r,e,0,n)]:a}function s(){var i=-1;for(r=Array(n);++i<n;)r[i]=((i+1)*t-(i-n)*e)/(n+1);return o}return o.domain=function(n){return arguments.length?([e,t]=n,e=+e,t=+t,s()):[e,t]},o.range=function(e){return arguments.length?(n=(i=Array.from(e)).length-1,s()):i.slice()},o.invertExtent=function(a){var o=i.indexOf(a);return o<0?[NaN,NaN]:o<1?[e,r[0]]:o>=n?[r[n-1],t]:[r[o-1],r[o]]},o.unknown=function(e){return arguments.length&&(a=e),o},o.thresholds=function(){return r.slice()},o.copy=function(){return xM().domain([e,t]).range(i).unknown(a)},JA.apply(nM(o),arguments)}function SM(){var e=[.5],t=[0,1],n,r=1;function i(i){return i!=null&&i<=i?t[IA(e,i,0,r)]:n}return i.domain=function(n){return arguments.length?(e=Array.from(n),r=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(n){return arguments.length?(t=Array.from(n),r=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(n){var r=t.indexOf(n);return[e[r-1],e[r]]},i.unknown=function(e){return arguments.length?(n=e,i):n},i.copy=function(){return SM().domain(e).range(t).unknown(n)},JA.apply(i,arguments)}var CM=new Date,wM=new Date;function TM(e,t,n,r){function i(t){return e(t=arguments.length===0?new Date:new Date(+t)),t}return i.floor=t=>(e(t=new Date(+t)),t),i.ceil=n=>(e(n=new Date(n-1)),t(n,1),e(n),n),i.round=e=>{let t=i(e),n=i.ceil(e);return e-t<n-e?t:n},i.offset=(e,n)=>(t(e=new Date(+e),n==null?1:Math.floor(n)),e),i.range=(n,r,a)=>{let o=[];if(n=i.ceil(n),a=a==null?1:Math.floor(a),!(n<r)||!(a>0))return o;let s;do o.push(s=new Date(+n)),t(n,a),e(n);while(s<n&&n<r);return o},i.filter=n=>TM(t=>{if(t>=t)for(;e(t),!n(t);)t.setTime(t-1)},(e,r)=>{if(e>=e){if(r<0)for(;++r<=0;)for(;t(e,-1),!n(e););else for(;--r>=0;)for(;t(e,1),!n(e););}}),n&&(i.count=(t,r)=>(CM.setTime(+t),wM.setTime(+r),e(CM),e(wM),Math.floor(n(CM,wM))),i.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?i.filter(r?t=>r(t)%e===0:t=>i.count(0,t)%e===0):i)),i}var EM=TM(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);EM.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?TM(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):EM),EM.range;var DM=1e3,OM=DM*60,kM=OM*60,AM=kM*24,jM=AM*7,MM=AM*30,NM=AM*365,PM=TM(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*DM)},(e,t)=>(t-e)/DM,e=>e.getUTCSeconds());PM.range;var FM=TM(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*DM)},(e,t)=>{e.setTime(+e+t*OM)},(e,t)=>(t-e)/OM,e=>e.getMinutes());FM.range;var IM=TM(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*OM)},(e,t)=>(t-e)/OM,e=>e.getUTCMinutes());IM.range;var LM=TM(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*DM-e.getMinutes()*OM)},(e,t)=>{e.setTime(+e+t*kM)},(e,t)=>(t-e)/kM,e=>e.getHours());LM.range;var RM=TM(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*kM)},(e,t)=>(t-e)/kM,e=>e.getUTCHours());RM.range;var zM=TM(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*OM)/AM,e=>e.getDate()-1);zM.range;var BM=TM(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/AM,e=>e.getUTCDate()-1);BM.range;var VM=TM(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/AM,e=>Math.floor(e/AM));VM.range;function HM(e){return TM(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(e,t)=>{e.setDate(e.getDate()+t*7)},(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*OM)/jM)}var UM=HM(0),WM=HM(1),fpe=HM(2),ppe=HM(3),GM=HM(4),mpe=HM(5),hpe=HM(6);UM.range,WM.range,fpe.range,ppe.range,GM.range,mpe.range,hpe.range;function KM(e){return TM(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t*7)},(e,t)=>(t-e)/jM)}var qM=KM(0),JM=KM(1),gpe=KM(2),_pe=KM(3),YM=KM(4),vpe=KM(5),ype=KM(6);qM.range,JM.range,gpe.range,_pe.range,YM.range,vpe.range,ype.range;var XM=TM(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());XM.range;var ZM=TM(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());ZM.range;var QM=TM(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());QM.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:TM(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)}),QM.range;var $M=TM(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());$M.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:TM(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)}),$M.range;function eN(e,t,n,r,i,a){let o=[[PM,1,DM],[PM,5,5*DM],[PM,15,15*DM],[PM,30,30*DM],[a,1,OM],[a,5,5*OM],[a,15,15*OM],[a,30,30*OM],[i,1,kM],[i,3,3*kM],[i,6,6*kM],[i,12,12*kM],[r,1,AM],[r,2,2*AM],[n,1,jM],[t,1,MM],[t,3,3*MM],[e,1,NM]];function s(e,t,n){let r=t<e;r&&([e,t]=[t,e]);let i=n&&typeof n.range==`function`?n:c(e,t,n),a=i?i.range(e,+t+1):[];return r?a.reverse():a}function c(t,n,r){let i=Math.abs(n-t)/r,a=NA(([,,e])=>e).right(o,i);if(a===o.length)return e.every(UA(t/NM,n/NM,r));if(a===0)return EM.every(Math.max(UA(t,n,r),1));let[s,c]=o[i/o[a-1][2]<o[a][2]/i?a-1:a];return s.every(c)}return[s,c]}var[bpe,xpe]=eN($M,ZM,qM,VM,RM,IM),[Spe,Cpe]=eN(QM,XM,UM,zM,LM,FM);function tN(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function nN(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function rN(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function wpe(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,a=e.days,o=e.shortDays,s=e.months,c=e.shortMonths,l=sN(i),u=cN(i),d=sN(a),f=cN(a),p=sN(o),m=cN(o),h=sN(s),g=cN(s),_=sN(c),v=cN(c),y={a:N,A:P,b:F,B:I,c:null,d:pN,e:pN,f:qpe,g:rme,G:ame,H:Wpe,I:Gpe,j:Kpe,L:mN,m:Jpe,M:Ype,p:L,q:R,Q:bN,s:xN,S:Xpe,u:Zpe,U:Qpe,V:$pe,w:eme,W:tme,x:null,X:null,y:nme,Y:ime,Z:ome,"%":yN},b={a:z,A:B,b:V,B:H,c:null,d:gN,e:gN,f:ume,g:bme,G:Sme,H:sme,I:cme,j:lme,L:_N,m:dme,M:fme,p:U,q:W,Q:bN,s:xN,S:pme,u:mme,U:hme,V:gme,w:_me,W:vme,x:null,X:null,y:yme,Y:xme,Z:Cme,"%":yN},x={a:E,A:D,b:O,B:k,c:A,d:dN,e:dN,f:Bpe,g:uN,G:lN,H:fN,I:fN,j:Ipe,L:zpe,m:Fpe,M:Lpe,p:T,q:Ppe,Q:Hpe,s:Upe,S:Rpe,u:kpe,U:Ape,V:jpe,w:Ope,W:Mpe,x:j,X:M,y:uN,Y:lN,Z:Npe,"%":Vpe};y.x=S(n,y),y.X=S(r,y),y.c=S(t,y),b.x=S(n,b),b.X=S(r,b),b.c=S(t,b);function S(e,t){return function(n){var r=[],i=-1,a=0,o=e.length,s,c,l;for(n instanceof Date||(n=new Date(+n));++i<o;)e.charCodeAt(i)===37&&(r.push(e.slice(a,i)),(c=iN[s=e.charAt(++i)])==null?c=s===`e`?` `:`0`:s=e.charAt(++i),(l=t[s])&&(s=l(n,c)),r.push(s),a=i+1);return r.push(e.slice(a,i)),r.join(``)}}function C(e,t){return function(n){var r=rN(1900,void 0,1),i=w(r,e,n+=``,0),a,o;if(i!=n.length)return null;if(`Q`in r)return new Date(r.Q);if(`s`in r)return new Date(r.s*1e3+(`L`in r?r.L:0));if(t&&!(`Z`in r)&&(r.Z=0),`p`in r&&(r.H=r.H%12+r.p*12),r.m===void 0&&(r.m=`q`in r?r.q:0),`V`in r){if(r.V<1||r.V>53)return null;`w`in r||(r.w=1),`Z`in r?(a=nN(rN(r.y,0,1)),o=a.getUTCDay(),a=o>4||o===0?JM.ceil(a):JM(a),a=BM.offset(a,(r.V-1)*7),r.y=a.getUTCFullYear(),r.m=a.getUTCMonth(),r.d=a.getUTCDate()+(r.w+6)%7):(a=tN(rN(r.y,0,1)),o=a.getDay(),a=o>4||o===0?WM.ceil(a):WM(a),a=zM.offset(a,(r.V-1)*7),r.y=a.getFullYear(),r.m=a.getMonth(),r.d=a.getDate()+(r.w+6)%7)}else(`W`in r||`U`in r)&&(`w`in r||(r.w=`u`in r?r.u%7:+(`W`in r)),o=`Z`in r?nN(rN(r.y,0,1)).getUTCDay():tN(rN(r.y,0,1)).getDay(),r.m=0,r.d=`W`in r?(r.w+6)%7+r.W*7-(o+5)%7:r.w+r.U*7-(o+6)%7);return`Z`in r?(r.H+=r.Z/100|0,r.M+=r.Z%100,nN(r)):tN(r)}}function w(e,t,n,r){for(var i=0,a=t.length,o=n.length,s,c;i<a;){if(r>=o)return-1;if(s=t.charCodeAt(i++),s===37){if(s=t.charAt(i++),c=x[s in iN?t.charAt(i++):s],!c||(r=c(e,n,r))<0)return-1}else if(s!=n.charCodeAt(r++))return-1}return r}function T(e,t,n){var r=l.exec(t.slice(n));return r?(e.p=u.get(r[0].toLowerCase()),n+r[0].length):-1}function E(e,t,n){var r=p.exec(t.slice(n));return r?(e.w=m.get(r[0].toLowerCase()),n+r[0].length):-1}function D(e,t,n){var r=d.exec(t.slice(n));return r?(e.w=f.get(r[0].toLowerCase()),n+r[0].length):-1}function O(e,t,n){var r=_.exec(t.slice(n));return r?(e.m=v.get(r[0].toLowerCase()),n+r[0].length):-1}function k(e,t,n){var r=h.exec(t.slice(n));return r?(e.m=g.get(r[0].toLowerCase()),n+r[0].length):-1}function A(e,n,r){return w(e,t,n,r)}function j(e,t,r){return w(e,n,t,r)}function M(e,t,n){return w(e,r,t,n)}function N(e){return o[e.getDay()]}function P(e){return a[e.getDay()]}function F(e){return c[e.getMonth()]}function I(e){return s[e.getMonth()]}function L(e){return i[+(e.getHours()>=12)]}function R(e){return 1+~~(e.getMonth()/3)}function z(e){return o[e.getUTCDay()]}function B(e){return a[e.getUTCDay()]}function V(e){return c[e.getUTCMonth()]}function H(e){return s[e.getUTCMonth()]}function U(e){return i[+(e.getUTCHours()>=12)]}function W(e){return 1+~~(e.getUTCMonth()/3)}return{format:function(e){var t=S(e+=``,y);return t.toString=function(){return e},t},parse:function(e){var t=C(e+=``,!1);return t.toString=function(){return e},t},utcFormat:function(e){var t=S(e+=``,b);return t.toString=function(){return e},t},utcParse:function(e){var t=C(e+=``,!0);return t.toString=function(){return e},t}}}var iN={"-":``,_:` `,0:`0`},aN=/^\s*\d+/,Tpe=/^%/,Epe=/[\\^$*+?|[\]().{}]/g;function oN(e,t,n){var r=e<0?`-`:``,i=(r?-e:e)+``,a=i.length;return r+(a<n?Array(n-a+1).join(t)+i:i)}function Dpe(e){return e.replace(Epe,`\\$&`)}function sN(e){return RegExp(`^(?:`+e.map(Dpe).join(`|`)+`)`,`i`)}function cN(e){return new Map(e.map((e,t)=>[e.toLowerCase(),t]))}function Ope(e,t,n){var r=aN.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function kpe(e,t,n){var r=aN.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function Ape(e,t,n){var r=aN.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function jpe(e,t,n){var r=aN.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function Mpe(e,t,n){var r=aN.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function lN(e,t,n){var r=aN.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function uN(e,t,n){var r=aN.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Npe(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||`00`)),n+r[0].length):-1}function Ppe(e,t,n){var r=aN.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function Fpe(e,t,n){var r=aN.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function dN(e,t,n){var r=aN.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function Ipe(e,t,n){var r=aN.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function fN(e,t,n){var r=aN.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function Lpe(e,t,n){var r=aN.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function Rpe(e,t,n){var r=aN.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function zpe(e,t,n){var r=aN.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function Bpe(e,t,n){var r=aN.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Vpe(e,t,n){var r=Tpe.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function Hpe(e,t,n){var r=aN.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function Upe(e,t,n){var r=aN.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function pN(e,t){return oN(e.getDate(),t,2)}function Wpe(e,t){return oN(e.getHours(),t,2)}function Gpe(e,t){return oN(e.getHours()%12||12,t,2)}function Kpe(e,t){return oN(1+zM.count(QM(e),e),t,3)}function mN(e,t){return oN(e.getMilliseconds(),t,3)}function qpe(e,t){return mN(e,t)+`000`}function Jpe(e,t){return oN(e.getMonth()+1,t,2)}function Ype(e,t){return oN(e.getMinutes(),t,2)}function Xpe(e,t){return oN(e.getSeconds(),t,2)}function Zpe(e){var t=e.getDay();return t===0?7:t}function Qpe(e,t){return oN(UM.count(QM(e)-1,e),t,2)}function hN(e){var t=e.getDay();return t>=4||t===0?GM(e):GM.ceil(e)}function $pe(e,t){return e=hN(e),oN(GM.count(QM(e),e)+(QM(e).getDay()===4),t,2)}function eme(e){return e.getDay()}function tme(e,t){return oN(WM.count(QM(e)-1,e),t,2)}function nme(e,t){return oN(e.getFullYear()%100,t,2)}function rme(e,t){return e=hN(e),oN(e.getFullYear()%100,t,2)}function ime(e,t){return oN(e.getFullYear()%1e4,t,4)}function ame(e,t){var n=e.getDay();return e=n>=4||n===0?GM(e):GM.ceil(e),oN(e.getFullYear()%1e4,t,4)}function ome(e){var t=e.getTimezoneOffset();return(t>0?`-`:(t*=-1,`+`))+oN(t/60|0,`0`,2)+oN(t%60,`0`,2)}function gN(e,t){return oN(e.getUTCDate(),t,2)}function sme(e,t){return oN(e.getUTCHours(),t,2)}function cme(e,t){return oN(e.getUTCHours()%12||12,t,2)}function lme(e,t){return oN(1+BM.count($M(e),e),t,3)}function _N(e,t){return oN(e.getUTCMilliseconds(),t,3)}function ume(e,t){return _N(e,t)+`000`}function dme(e,t){return oN(e.getUTCMonth()+1,t,2)}function fme(e,t){return oN(e.getUTCMinutes(),t,2)}function pme(e,t){return oN(e.getUTCSeconds(),t,2)}function mme(e){var t=e.getUTCDay();return t===0?7:t}function hme(e,t){return oN(qM.count($M(e)-1,e),t,2)}function vN(e){var t=e.getUTCDay();return t>=4||t===0?YM(e):YM.ceil(e)}function gme(e,t){return e=vN(e),oN(YM.count($M(e),e)+($M(e).getUTCDay()===4),t,2)}function _me(e){return e.getUTCDay()}function vme(e,t){return oN(JM.count($M(e)-1,e),t,2)}function yme(e,t){return oN(e.getUTCFullYear()%100,t,2)}function bme(e,t){return e=vN(e),oN(e.getUTCFullYear()%100,t,2)}function xme(e,t){return oN(e.getUTCFullYear()%1e4,t,4)}function Sme(e,t){var n=e.getUTCDay();return e=n>=4||n===0?YM(e):YM.ceil(e),oN(e.getUTCFullYear()%1e4,t,4)}function Cme(){return`+0000`}function yN(){return`%`}function bN(e){return+e}function xN(e){return Math.floor(e/1e3)}var SN,CN,wN;wme({dateTime:`%x, %X`,date:`%-m/%-d/%Y`,time:`%-I:%M:%S %p`,periods:[`AM`,`PM`],days:[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`],shortDays:[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`],months:[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`],shortMonths:[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`]});function wme(e){return SN=wpe(e),CN=SN.format,SN.parse,wN=SN.utcFormat,SN.utcParse,SN}function Tme(e){return new Date(e)}function Eme(e){return e instanceof Date?+e:+new Date(+e)}function TN(e,t,n,r,i,a,o,s,c,l){var u=Vj(),d=u.invert,f=u.domain,p=l(`.%L`),m=l(`:%S`),h=l(`%I:%M`),g=l(`%I %p`),_=l(`%a %d`),v=l(`%b %d`),y=l(`%B`),b=l(`%Y`);function x(e){return(c(e)<e?p:s(e)<e?m:o(e)<e?h:a(e)<e?g:r(e)<e?i(e)<e?_:v:n(e)<e?y:b)(e)}return u.invert=function(e){return new Date(d(e))},u.domain=function(e){return arguments.length?f(Array.from(e,Eme)):f().map(Tme)},u.ticks=function(t){var n=f();return e(n[0],n[n.length-1],t??10)},u.tickFormat=function(e,t){return t==null?x:l(t)},u.nice=function(e){var n=f();return(!e||typeof e.range!=`function`)&&(e=t(n[0],n[n.length-1],e??10)),e?f(aM(n,e)):u},u.copy=function(){return zj(u,TN(e,t,n,r,i,a,o,s,c,l))},u}function Dme(){return JA.apply(TN(Spe,Cpe,QM,XM,UM,zM,LM,FM,PM,CN).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function Ome(){return JA.apply(TN(bpe,xpe,$M,ZM,qM,BM,RM,IM,PM,wN).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function EN(){var e=0,t=1,n,r,i,a,o=Lj,s=!1,c;function l(e){return e==null||isNaN(e=+e)?c:o(i===0?.5:(e=(a(e)-n)*i,s?Math.max(0,Math.min(1,e)):e))}l.domain=function(o){return arguments.length?([e,t]=o,n=a(e=+e),r=a(t=+t),i=n===r?0:1/(r-n),l):[e,t]},l.clamp=function(e){return arguments.length?(s=!!e,l):s},l.interpolator=function(e){return arguments.length?(o=e,l):o};function u(e){return function(t){var n,r;return arguments.length?([n,r]=t,o=e(n,r),l):[o(0),o(1)]}}return l.range=u(Nj),l.rangeRound=u(Pj),l.unknown=function(e){return arguments.length?(c=e,l):c},function(o){return a=o,n=o(e),r=o(t),i=n===r?0:1/(r-n),l}}function DN(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function ON(){var e=nM(EN()(Lj));return e.copy=function(){return DN(e,ON())},YA.apply(e,arguments)}function kN(){var e=lM(EN()).domain([1,10]);return e.copy=function(){return DN(e,kN()).base(e.base())},YA.apply(e,arguments)}function AN(){var e=pM(EN());return e.copy=function(){return DN(e,AN()).constant(e.constant())},YA.apply(e,arguments)}function jN(){var e=gM(EN());return e.copy=function(){return DN(e,jN()).exponent(e.exponent())},YA.apply(e,arguments)}function kme(){return jN.apply(null,arguments).exponent(.5)}function MN(){var e=[],t=Lj;function n(n){if(n!=null&&!isNaN(n=+n))return t((IA(e,n,1)-1)/(e.length-1))}return n.domain=function(t){if(!arguments.length)return e.slice();e=[];for(let n of t)n!=null&&!isNaN(n=+n)&&e.push(n);return e.sort(MA),n},n.interpolator=function(e){return arguments.length?(t=e,n):t},n.range=function(){return e.map((n,r)=>t(r/(e.length-1)))},n.quantiles=function(t){return Array.from({length:t+1},(n,r)=>mfe(e,r/t))},n.copy=function(){return MN(t).domain(e)},YA.apply(n,arguments)}function NN(){var e=0,t=.5,n=1,r=1,i,a,o,s,c,l=Lj,u,d=!1,f;function p(e){return isNaN(e=+e)?f:(e=.5+((e=+u(e))-a)*(r*e<r*a?s:c),l(d?Math.max(0,Math.min(1,e)):e))}p.domain=function(l){return arguments.length?([e,t,n]=l,i=u(e=+e),a=u(t=+t),o=u(n=+n),s=i===a?0:.5/(a-i),c=a===o?0:.5/(o-a),r=a<i?-1:1,p):[e,t,n]},p.clamp=function(e){return arguments.length?(d=!!e,p):d},p.interpolator=function(e){return arguments.length?(l=e,p):l};function m(e){return function(t){var n,r,i;return arguments.length?([n,r,i]=t,l=Vfe(e,[n,r,i]),p):[l(0),l(.5),l(1)]}}return p.range=m(Nj),p.rangeRound=m(Pj),p.unknown=function(e){return arguments.length?(f=e,p):f},function(l){return u=l,i=l(e),a=l(t),o=l(n),s=i===a?0:.5/(a-i),c=a===o?0:.5/(o-a),r=a<i?-1:1,p}}function PN(){var e=nM(NN()(Lj));return e.copy=function(){return DN(e,PN())},YA.apply(e,arguments)}function FN(){var e=lM(NN()).domain([.1,1,10]);return e.copy=function(){return DN(e,FN()).base(e.base())},YA.apply(e,arguments)}function IN(){var e=pM(NN());return e.copy=function(){return DN(e,IN()).constant(e.constant())},YA.apply(e,arguments)}function LN(){var e=gM(NN());return e.copy=function(){return DN(e,LN()).exponent(e.exponent())},YA.apply(e,arguments)}function Ame(){return LN.apply(null,arguments).exponent(.5)}var RN=c({scaleBand:()=>QA,scaleDiverging:()=>PN,scaleDivergingLog:()=>FN,scaleDivergingPow:()=>LN,scaleDivergingSqrt:()=>Ame,scaleDivergingSymlog:()=>IN,scaleIdentity:()=>iM,scaleImplicit:()=>XA,scaleLinear:()=>rM,scaleLog:()=>uM,scaleOrdinal:()=>ZA,scalePoint:()=>_fe,scalePow:()=>_M,scaleQuantile:()=>bM,scaleQuantize:()=>xM,scaleRadial:()=>yM,scaleSequential:()=>ON,scaleSequentialLog:()=>kN,scaleSequentialPow:()=>jN,scaleSequentialQuantile:()=>MN,scaleSequentialSqrt:()=>kme,scaleSequentialSymlog:()=>AN,scaleSqrt:()=>upe,scaleSymlog:()=>mM,scaleThreshold:()=>SM,scaleTime:()=>Dme,scaleUtc:()=>Ome,tickFormat:()=>tM});function jme(e){var t=RN;if(e in t&&typeof t[e]==`function`)return t[e]();var n=`scale${Ax(e)}`;if(n in t&&typeof t[n]==`function`)return t[n]()}function zN(e,t,n){if(typeof e==`function`)return e.copy().domain(t).range(n);if(e!=null){var r=jme(e);if(r!=null)return r.domain(t).range(n),r}}function BN(e,t,n,r){if(n!=null&&r!=null)return typeof e.scale==`function`?zN(e.scale,n,r):zN(t,n,r)}function Mme(e){return`scale${Ax(e)}`}function Nme(e){return Mme(e)in RN}var VN=(e,t,n)=>{if(e!=null){var r=e.scale,i=e.type;if(r===`auto`)return i===`category`&&n&&(n.indexOf(`LineChart`)>=0||n.indexOf(`AreaChart`)>=0||n.indexOf(`ComposedChart`)>=0&&!t)?`point`:i===`category`?`band`:`linear`;if(typeof r==`string`)return Nme(r)?r:`point`}};function Pme(e,t){for(var n=0,r=e.length,i=e[0]<e[e.length-1];n<r;){var a=Math.floor((n+r)/2);(i?e[a]<t:e[a]>t)?n=a+1:r=a}return n}function HN(e,t){if(e){var n=t??e.domain(),r=n.map(t=>e(t)??0),i=e.range();if(!(n.length===0||i.length<2))return e=>{var t=Pme(r,e);if(t<=0)return n[0];if(t>=n.length)return n[n.length-1];var i=r[t-1]??0,a=r[t]??0;return Math.abs(e-i)<=Math.abs(e-a)?n[t-1]:n[t]}}}function Fme(e){if(e!=null)return`invert`in e&&typeof e.invert==`function`?e.invert.bind(e):HN(e,void 0)}function UN(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function WN(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?UN(Object(n),!0).forEach(function(t){Ime(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):UN(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Ime(e,t,n){return(t=Lme(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Lme(e){var t=Rme(e,`string`);return typeof t==`symbol`?t:t+``}function Rme(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function GN(e,t){return Hme(e)||Vme(e,t)||Bme(e,t)||zme()}function zme(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
71
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Bme(e,t){if(e){if(typeof e==`string`)return KN(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?KN(e,t):void 0}}function KN(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Vme(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function Hme(e){if(Array.isArray(e))return e}var qN=[0,`auto`],Ume={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:void 0,height:30,hide:!0,id:0,includeHidden:!1,interval:`preserveEnd`,minTickGap:5,mirror:!1,name:void 0,orientation:`bottom`,padding:{left:0,right:0},reversed:!1,scale:`auto`,tick:!0,tickCount:5,tickFormatter:void 0,ticks:void 0,type:`category`,unit:void 0,niceTicks:`auto`},Wme=(e,t)=>e.cartesianAxis.xAxis[t],JN=(e,t)=>Wme(e,t)??Ume,Gme={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:qN,hide:!0,id:0,includeHidden:!1,interval:`preserveEnd`,minTickGap:5,mirror:!1,name:void 0,orientation:`left`,padding:{top:0,bottom:0},reversed:!1,scale:`auto`,tick:!0,tickCount:5,tickFormatter:void 0,ticks:void 0,type:`number`,unit:void 0,niceTicks:`auto`,width:60},Kme=(e,t)=>e.cartesianAxis.yAxis[t],YN=(e,t)=>Kme(e,t)??Gme,qme={domain:[0,`auto`],includeHidden:!1,reversed:!1,allowDataOverflow:!1,allowDuplicatedCategory:!1,dataKey:void 0,id:0,name:``,range:[64,64],scale:`auto`,type:`number`,unit:``},XN=(e,t)=>e.cartesianAxis.zAxis[t]??qme,ZN=(e,t,n)=>{switch(t){case`xAxis`:return JN(e,n);case`yAxis`:return YN(e,n);case`zAxis`:return XN(e,n);case`angleAxis`:return mA(e,n);case`radiusAxis`:return hA(e,n);default:throw Error(`Unexpected axis type: ${t}`)}},Jme=(e,t,n)=>{switch(t){case`xAxis`:return JN(e,n);case`yAxis`:return YN(e,n);default:throw Error(`Unexpected axis type: ${t}`)}},QN=(e,t,n)=>{switch(t){case`xAxis`:return JN(e,n);case`yAxis`:return YN(e,n);case`angleAxis`:return mA(e,n);case`radiusAxis`:return hA(e,n);default:throw Error(`Unexpected axis type: ${t}`)}},$N=e=>e.graphicalItems.cartesianItems.some(e=>e.type===`bar`)||e.graphicalItems.polarItems.some(e=>e.type===`radialBar`);function eP(e,t){return n=>{switch(e){case`xAxis`:return`xAxisId`in n&&n.xAxisId===t;case`yAxis`:return`yAxisId`in n&&n.yAxisId===t;case`zAxis`:return`zAxisId`in n&&n.zAxisId===t;case`angleAxis`:return`angleAxisId`in n&&n.angleAxisId===t;case`radiusAxis`:return`radiusAxisId`in n&&n.radiusAxisId===t;default:return!1}}}var Yme=e=>e.graphicalItems.cartesianItems,Xme=$([SA,CA],eP),tP=(e,t,n)=>e.filter(n).filter(e=>t?.includeHidden===!0||!e.hide),nP=$([Yme,ZN,Xme],tP,{memoizeOptions:{resultEqualityCheck:OA}}),rP=$([nP],e=>e.filter(e=>e.type===`area`||e.type===`bar`).filter(EA)),iP=e=>e.filter(e=>!(`stackId`in e)||e.stackId===void 0),Zme=$([nP],iP),aP=e=>e.map(e=>e.data).filter(Boolean).flat(1),Qme=$([nP],e=>e.some(e=>!e.data)),oP=$([nP],aP,{memoizeOptions:{resultEqualityCheck:OA}}),sP=(e,t)=>{var n=t.chartData,r=n===void 0?[]:n,i=t.dataStartIndex,a=t.dataEndIndex;return e.length>0?e:r.slice(i,a+1)},cP=$([oP,zk],sP),$me=(e,t,n)=>t?.dataKey==null?n.length>0?n.map(e=>e.dataKey).flatMap(t=>e.map(e=>({value:AT(e,t)}))):e.map(e=>({value:e})):e.map(e=>({value:AT(e,t.dataKey)})),lP=(e,t,n,r,i,a)=>{var o=r.chartData,s=o===void 0?[]:o,c=r.dataStartIndex,l=r.dataEndIndex,u=$me(e,t,n);return i&&t?.dataKey!=null&&a.length>0?[...s.slice(c,l+1).map(e=>({value:AT(e,t.dataKey)})).filter(e=>e.value!=null),...u]:u},uP=$([cP,ZN,nP,zk,Qme,oP],lP);function dP(e){if(Sx(e)||e instanceof Date){var t=Number(e);if(DT(t))return t}}function fP(e){if(Array.isArray(e)){var t=[dP(e[0]),dP(e[1])];return Hk(t)?t:void 0}var n=dP(e);if(n!=null)return[n,n]}function pP(e){return e.map(dP).filter(jx)}function ehe(e,t){var n=dP(e),r=dP(t);return n==null&&r==null?0:n==null?-1:r==null?1:n-r}var the=$([uP],e=>e?.map(e=>e.value).sort(ehe));function mP(e,t){switch(e){case`xAxis`:return t.direction===`x`;case`yAxis`:return t.direction===`y`;default:return!1}}function nhe(e,t,n){if(!n||!n.length)return[];var r;if(typeof t==`number`&&!yx(t))r=t;else if(Array.isArray(t)){var i=pP(t);i.length>0&&(r=Math.max(...i))}return r==null?[]:pP(n.flatMap(t=>{var n=AT(e,t.dataKey),i,a;if(Array.isArray(n)){var o=GN(n,2);i=o[0],a=o[1]}else i=a=n;if(DT(i)&&DT(a))return[r-i,r+a]}))}var hP=e=>QN(e,kA(e),AA(e)),gP=$([hP],e=>e?.dataKey),rhe=$([rP,zk,hP],TA),_P=(e,t,n,r)=>{var i=t.reduce((e,t)=>{if(t.stackId==null)return e;var n=e[t.stackId];return n??=[],n.push(t),e[t.stackId]=n,e},{});return Object.fromEntries(Object.entries(i).map(t=>{var i=GN(t,2),a=i[0],o=i[1],s=r?[...o].reverse():o;return[a,{stackedData:vde(e,s.map(wA),n),graphicalItems:s}]}))},ihe=$([rhe,rP,nA,rA],_P),vP=(e,t,n,r)=>{var i=t.dataStartIndex,a=t.dataEndIndex;if(r==null&&n!==`zAxis`)return xde(e,i,a)},ahe=$([ZN],e=>e.allowDataOverflow),yP=e=>{if(e==null||!(`domain`in e))return qN;if(e.domain!=null)return e.domain;if(`ticks`in e&&e.ticks!=null){if(e.type===`number`){var t=pP(e.ticks);return[Math.min(...t),Math.max(...t)]}if(e.type===`category`)return e.ticks.map(String)}return e?.domain??qN},bP=$([ZN],yP),xP=$([bP,ahe],Wk),ohe=$([ihe,Lk,SA,xP],vP,{memoizeOptions:{resultEqualityCheck:DA}}),SP=e=>e.errorBars,she=(e,t,n)=>e.flatMap(e=>t[e.id]).filter(Boolean).filter(e=>mP(n,e)),CP=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t.filter(Boolean);if(r.length!==0){var i=r.flat();return[Math.min(...i),Math.max(...i)]}},wP=function(e,t,n,r,i){var a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:[],o,s;if(n.length>0&&n.forEach(e=>{var n=e.data==null?a:[...e.data],c=r[e.id]?.filter(e=>mP(i,e));n.forEach(n=>{var r=AT(n,t.dataKey??e.dataKey),i=nhe(n,r,c);if(i.length>=2){var a=Math.min(...i),l=Math.max(...i);(o==null||a<o)&&(o=a),(s==null||l>s)&&(s=l)}var u=fP(r);u!=null&&(o=o==null?u[0]:Math.min(o,u[0]),s=s==null?u[1]:Math.max(s,u[1]))})}),t?.dataKey!=null&&n.length===0&&e.forEach(e=>{var n=fP(AT(e,t.dataKey));n!=null&&(o=o==null?n[0]:Math.min(o,n[0]),s=s==null?n[1]:Math.max(s,n[1]))}),DT(o)&&DT(s))return[o,s]},che=$([cP,ZN,Zme,SP,SA,Lde],wP,{memoizeOptions:{resultEqualityCheck:DA}});function lhe(e){var t=e.value;if(Sx(t)||t instanceof Date)return t}var uhe=(e,t,n)=>{var r=e.map(lhe).filter(e=>e!=null);return n&&(t.dataKey==null||t.allowDuplicatedCategory&&Ex(r))?Ik(0,e.length):t.allowDuplicatedCategory?r:Array.from(new Set(r))},TP=e=>e.referenceElements.dots,EP=(e,t,n)=>e.filter(e=>e.ifOverflow===`extendDomain`).filter(e=>t===`xAxis`?e.xAxisId===n:e.yAxisId===n),dhe=$([TP,SA,CA],EP),DP=e=>e.referenceElements.areas,fhe=$([DP,SA,CA],EP),OP=e=>e.referenceElements.lines,phe=$([OP,SA,CA],EP),kP=(e,t)=>{if(e!=null){var n=pP(e.map(e=>t===`xAxis`?e.x:e.y));if(n.length!==0)return[Math.min(...n),Math.max(...n)]}},mhe=$(dhe,SA,kP),AP=(e,t)=>{if(e!=null){var n=pP(e.flatMap(e=>[t===`xAxis`?e.x1:e.y1,t===`xAxis`?e.x2:e.y2]));if(n.length!==0)return[Math.min(...n),Math.max(...n)]}},hhe=$([fhe,SA],AP);function ghe(e){if(e.x!=null)return pP([e.x]);var t=e.segment?.map(e=>e.x);return t==null||t.length===0?[]:pP(t)}function _he(e){if(e.y!=null)return pP([e.y]);var t=e.segment?.map(e=>e.y);return t==null||t.length===0?[]:pP(t)}var jP=(e,t)=>{if(e!=null){var n=e.flatMap(e=>t===`xAxis`?ghe(e):_he(e));if(n.length!==0)return[Math.min(...n),Math.max(...n)]}},vhe=$(mhe,$([phe,SA],jP),hhe,(e,t,n)=>CP(e,n,t)),MP=(e,t,n,r,i,a,o,s,c)=>{if(n!=null)return n;var l=o===`vertical`&&s===`xAxis`||o===`horizontal`&&s===`yAxis`?CP(r,a,i):CP(a,i),u=Ude(t,l,e.allowDataOverflow);return u==null&&e.allowDataOverflow&&l==null&&c!=null?c:u},yhe=$([ZN,bP,xP,ohe,che,vhe,$T,SA,$([ZN],e=>{if(e!=null&&e.type===`number`&&`ticks`in e&&e.ticks!=null){var t=pP(e.ticks);if(t.length!==0)return[Math.min(...t),Math.max(...t)]}},{memoizeOptions:{resultEqualityCheck:DA}})],MP,{memoizeOptions:{resultEqualityCheck:DA}}),bhe=[0,1],NP=(e,t,n,r,i,a,o)=>{if(e!=null&&n!=null&&n.length!==0||o!==void 0){var s=e.dataKey,c=e.type,l=jT(t,a);return l&&s==null?Ik(0,n?.length??0):c===`category`?uhe(r,e,l):i===`expand`&&!l?bhe:o}},PP=$([ZN,$T,cP,uP,nA,SA,yhe],NP),FP=$([ZN,$N,iA],VN),IP=(e,t,n)=>{var r=t.niceTicks;if(r!==`none`){var i=yP(t),a=Array.isArray(i)&&(i[0]===`auto`||i[1]===`auto`);if((r===`snap125`||r===`adaptive`)&&t!=null&&t.tickCount&&Hk(e)){if(a)return eA(e,t.tickCount,t.allowDecimals,r);if(t.type===`number`)return tA(e,t.tickCount,t.allowDecimals,r)}if(r===`auto`&&n===`linear`&&t!=null&&t.tickCount){if(a&&Hk(e))return eA(e,t.tickCount,t.allowDecimals,`adaptive`);if(t.type===`number`&&Hk(e))return tA(e,t.tickCount,t.allowDecimals,`adaptive`)}}},LP=$([PP,QN,FP],IP),RP=(e,t,n,r)=>{if(r!==`angleAxis`&&e?.type===`number`&&Hk(t)&&Array.isArray(n)&&n.length>0){var i=t[0],a=n[0]??0,o=t[1],s=n[n.length-1]??0;return[Math.min(i,a),Math.max(o,s)]}return t},xhe=$([ZN,PP,LP,SA],RP),zP=$($(uP,ZN,(e,t)=>{if(t&&t.type===`number`){var n=1/0,r=Array.from(pP(e.map(e=>e.value))).sort((e,t)=>e-t),i=r[0],a=r[r.length-1];if(i==null||a==null)return 1/0;var o=a-i;if(o===0)return 1/0;for(var s=0;s<r.length-1;s++){var c=r[s],l=r[s+1];if(c!=null&&l!=null){var u=l-c;n=Math.min(n,u)}}return n/o}}),$T,Yde,HT,(e,t,n,r,i)=>i,(e,t,n,r,i)=>{if(!DT(e))return 0;var a=t===`vertical`?r.height:r.width;if(i===`gap`)return e*a/2;if(i===`no-gap`){var o=Tx(n,e*a),s=e*a/2;return s-o-(s-o)/a*o}return 0}),She=(e,t,n)=>{var r=JN(e,t);return r==null||typeof r.padding!=`string`?0:zP(e,`xAxis`,t,n,r.padding)},Che=(e,t,n)=>{var r=YN(e,t);return r==null||typeof r.padding!=`string`?0:zP(e,`yAxis`,t,n,r.padding)},whe=$(JN,She,(e,t)=>{if(e==null)return{left:0,right:0};var n=e.padding;return typeof n==`string`?{left:t,right:t}:{left:(n.left??0)+t,right:(n.right??0)+t}}),The=$(YN,Che,(e,t)=>{if(e==null)return{top:0,bottom:0};var n=e.padding;return typeof n==`string`?{top:t,bottom:t}:{top:(n.top??0)+t,bottom:(n.bottom??0)+t}}),Ehe=$([HT,whe,KT,GT,(e,t,n)=>n],(e,t,n,r,i)=>{var a=r.padding;return i?[a.left,n.width-a.right]:[e.left+t.left,e.left+e.width-t.right]}),Dhe=$([HT,$T,The,KT,GT,(e,t,n)=>n],(e,t,n,r,i,a)=>{var o=i.padding;return a?[r.height-o.bottom,o.top]:t===`horizontal`?[e.top+e.height-n.bottom,e.top+n.top]:[e.top+n.top,e.top+e.height-n.bottom]}),BP=(e,t,n,r)=>{switch(t){case`xAxis`:return Ehe(e,n,r);case`yAxis`:return Dhe(e,n,r);case`zAxis`:return XN(e,n)?.range;case`angleAxis`:return bA(e);case`radiusAxis`:return xA(e,n);default:return}},VP=$([ZN,BP],cA),HP=$([ZN,FP,$([FP,xhe],rfe),VP],BN),UP=(e,t,n,r)=>{if(n!=null&&n.dataKey!=null){var i=n.type,a=n.scale;if(jT(e,r)&&(i===`number`||a!==`auto`))return t.map(e=>e.value)}},WP=$([$T,uP,QN,SA],UP),GP=$([HP],jA);$([HP],Fme),$([HP,the],HN),$([nP,SP,SA],she);function KP(e,t){return e.id<t.id?-1:+(e.id>t.id)}var qP=(e,t)=>t,JP=(e,t,n)=>n,Ohe=$(RT,qP,JP,(e,t,n)=>e.filter(e=>e.orientation===t).filter(e=>e.mirror===n).sort(KP)),khe=$(zT,qP,JP,(e,t,n)=>e.filter(e=>e.orientation===t).filter(e=>e.mirror===n).sort(KP)),YP=(e,t)=>{var n=typeof t.height==`number`?t.height:30;return{width:e.width,height:n}},Ahe=(e,t)=>({width:typeof t.width==`number`?t.width:60,height:e.height});$(HT,JN,YP);var jhe=(e,t,n)=>{switch(t){case`top`:return e.top;case`bottom`:return n-e.bottom;default:return 0}},Mhe=(e,t,n)=>{switch(t){case`left`:return e.left;case`right`:return n-e.right;default:return 0}},Nhe=$(IT,HT,Ohe,qP,JP,(e,t,n,r,i)=>{var a={},o;return n.forEach(n=>{var s=YP(t,n);o??=jhe(t,r,e);var c=r===`top`&&!i||r===`bottom`&&i;a[n.id]=o-Number(c)*s.height,o+=(c?-1:1)*s.height}),a}),Phe=$(FT,HT,khe,qP,JP,(e,t,n,r,i)=>{var a={},o;return n.forEach(n=>{var s=Ahe(t,n);o??=Mhe(t,r,e);var c=r===`left`&&!i||r===`right`&&i;a[n.id]=o-Number(c)*s.width,o+=(c?-1:1)*s.width}),a});$([HT,JN,(e,t)=>{var n=JN(e,t);if(n!=null)return Nhe(e,n.orientation,n.mirror)},(e,t)=>t],(e,t,n,r)=>{if(t!=null){var i=n?.[r];return i==null?{x:e.left,y:0}:{x:e.left,y:i}}}),$([HT,YN,(e,t)=>{var n=YN(e,t);if(n!=null)return Phe(e,n.orientation,n.mirror)},(e,t)=>t],(e,t,n,r)=>{if(t!=null){var i=n?.[r];return i==null?{x:0,y:e.top}:{x:i,y:e.top}}}),$(HT,YN,(e,t)=>({width:typeof t.width==`number`?t.width:60,height:e.height}));var XP=(e,t,n,r)=>{if(n!=null){var i=n.allowDuplicatedCategory,a=n.type,o=n.dataKey,s=jT(e,r),c=t.map(e=>e.value),l=c.filter(e=>e!=null);if(o&&s&&a===`category`&&i&&Ex(l))return c}},ZP=$([$T,uP,ZN,SA],XP);$([$T,Jme,FP,GP,ZP,WP,BP,LP,SA],(e,t,n,r,i,a,o,s,c)=>{if(t!=null){var l=jT(e,c);return{angle:t.angle,interval:t.interval,minTickGap:t.minTickGap,orientation:t.orientation,tick:t.tick,tickCount:t.tickCount,tickFormatter:t.tickFormatter,ticks:t.ticks,type:t.type,unit:t.unit,axisType:c,categoricalDomain:a,duplicateDomain:i,isCategorical:l,niceTicks:s,range:o,realScaleType:n,scale:r}}}),$([$T,QN,FP,GP,LP,BP,ZP,WP,SA],(e,t,n,r,i,a,o,s,c)=>{if(t!=null&&r!=null){var l=jT(e,c),u=t.type,d=t.ticks,f=t.tickCount,p=n===`scaleBand`&&typeof r.bandwidth==`function`?r.bandwidth()/2:2,m=u===`category`&&r.bandwidth?r.bandwidth()/p:0;m=c===`angleAxis`&&a!=null&&a.length>=2?vx(a[0]-a[1])*2*m:m;var h=d||i;return h?h.map((e,t)=>{var n=o?o.indexOf(e):e,i=r.map(n);return DT(i)?{index:t,coordinate:i+m,value:e,offset:m}:null}).filter(jx):l&&s?s.map((e,t)=>{var n=r.map(e);return DT(n)?{coordinate:n+m,value:e,index:t,offset:m}:null}).filter(jx):r.ticks?r.ticks(f).map((e,t)=>{var n=r.map(e);return DT(n)?{coordinate:n+m,value:e,index:t,offset:m}:null}).filter(jx):r.domain().map((e,t)=>{var n=r.map(e);return DT(n)?{coordinate:n+m,value:o?o[e]:e,index:t,offset:m}:null}).filter(jx)}}),$([$T,QN,GP,BP,ZP,WP,SA],(e,t,n,r,i,a,o)=>{if(t!=null&&n!=null&&r!=null&&r[0]!==r[1]){var s=jT(e,o),c=t.tickCount,l=0;return l=o===`angleAxis`&&r?.length>=2?vx(r[0]-r[1])*2*l:l,s&&a?a.map((e,t)=>{var r=n.map(e);return DT(r)?{coordinate:r+l,value:e,index:t,offset:l}:null}).filter(jx):n.ticks?n.ticks(c).map((e,t)=>{var r=n.map(e);return DT(r)?{coordinate:r+l,value:e,index:t,offset:l}:null}).filter(jx):n.domain().map((e,t)=>{var r=n.map(e);return DT(r)?{coordinate:r+l,value:i?i[e]:e,index:t,offset:l}:null}).filter(jx)}}),$(ZN,GP,(e,t)=>{if(e!=null&&t!=null)return WN(WN({},e),{},{scale:t})}),$((e,t,n)=>XN(e,n),$([$([ZN,FP,PP,VP],BN)],jA),(e,t)=>{if(e!=null&&t!=null)return WN(WN({},e),{},{scale:t})}),$([$T,RT,zT],(e,t,n)=>{switch(e){case`horizontal`:return t.some(e=>e.reversed)?`right-to-left`:`left-to-right`;case`vertical`:return n.some(e=>e.reversed)?`bottom-to-top`:`top-to-bottom`;case`centric`:case`radial`:return`left-to-right`;default:return}}),$([(e,t,n)=>e.renderedTicks[t]?.[n]],e=>{if(e&&e.length!==0)return t=>{var n=1/0,r=e[0];for(var i of e){var a=Math.abs(i.coordinate-t);a<n&&(n=a,r=i)}return r?.value}});var QP=e=>e.options.defaultTooltipEventType,$P=e=>e.options.validateTooltipEventTypes;function eF(e,t,n){if(e==null)return t;var r=e?`axis`:`item`;return n==null?t:n.includes(r)?r:t}function Fhe(e,t){return eF(t,QP(e),$P(e))}function Ihe(e){return VC(t=>Fhe(t,e))}var tF=(e,t)=>{var n,r=Number(t);if(!(yx(r)||t==null))return r>=0?e==null||(n=e[r])==null?void 0:n.value:void 0},Lhe=e=>e.tooltip.settings,nF={active:!1,index:null,dataKey:void 0,graphicalItemId:void 0,coordinate:void 0},rF=vT({name:`tooltip`,initialState:{itemInteraction:{click:nF,hover:nF},axisInteraction:{click:nF,hover:nF},keyboardInteraction:nF,syncInteraction:{active:!1,index:null,dataKey:void 0,label:void 0,coordinate:void 0,sourceViewBox:void 0,graphicalItemId:void 0},tooltipItemPayloads:[],settings:{shared:void 0,trigger:`hover`,axisId:0,active:!1,defaultIndex:void 0}},reducers:{addTooltipEntrySettings:{reducer(e,t){e.tooltipItemPayloads.push(fT(t.payload))},prepare:gT()},replaceTooltipEntrySettings:{reducer(e,t){var n=t.payload,r=n.prev,i=n.next,a=lT(e).tooltipItemPayloads.indexOf(fT(r));a>-1&&(e.tooltipItemPayloads[a]=fT(i))},prepare:gT()},removeTooltipEntrySettings:{reducer(e,t){var n=lT(e).tooltipItemPayloads.indexOf(fT(t.payload));n>-1&&e.tooltipItemPayloads.splice(n,1)},prepare:gT()},setTooltipSettingsState(e,t){e.settings=t.payload},setActiveMouseOverItemIndex(e,t){e.syncInteraction.active=!1,e.syncInteraction.sourceViewBox=void 0,e.keyboardInteraction.active=!1,e.itemInteraction.hover.active=!0,e.itemInteraction.hover.index=t.payload.activeIndex,e.itemInteraction.hover.dataKey=t.payload.activeDataKey,e.itemInteraction.hover.graphicalItemId=t.payload.activeGraphicalItemId,e.itemInteraction.hover.coordinate=t.payload.activeCoordinate},mouseLeaveChart(e){e.itemInteraction.hover.active=!1,e.axisInteraction.hover.active=!1},mouseLeaveItem(e){e.itemInteraction.hover.active=!1},setActiveClickItemIndex(e,t){e.syncInteraction.active=!1,e.syncInteraction.sourceViewBox=void 0,e.itemInteraction.click.active=!0,e.keyboardInteraction.active=!1,e.itemInteraction.click.index=t.payload.activeIndex,e.itemInteraction.click.dataKey=t.payload.activeDataKey,e.itemInteraction.click.graphicalItemId=t.payload.activeGraphicalItemId,e.itemInteraction.click.coordinate=t.payload.activeCoordinate},setMouseOverAxisIndex(e,t){e.syncInteraction.active=!1,e.syncInteraction.sourceViewBox=void 0,e.axisInteraction.hover.active=!0,e.keyboardInteraction.active=!1,e.axisInteraction.hover.index=t.payload.activeIndex,e.axisInteraction.hover.dataKey=t.payload.activeDataKey,e.axisInteraction.hover.coordinate=t.payload.activeCoordinate},setMouseClickAxisIndex(e,t){e.syncInteraction.active=!1,e.syncInteraction.sourceViewBox=void 0,e.keyboardInteraction.active=!1,e.axisInteraction.click.active=!0,e.axisInteraction.click.index=t.payload.activeIndex,e.axisInteraction.click.dataKey=t.payload.activeDataKey,e.axisInteraction.click.coordinate=t.payload.activeCoordinate},setSyncInteraction(e,t){e.syncInteraction=t.payload},setKeyboardInteraction(e,t){e.keyboardInteraction.active=t.payload.active,e.keyboardInteraction.index=t.payload.activeIndex,e.keyboardInteraction.coordinate=t.payload.activeCoordinate}}}),iF=rF.actions;iF.addTooltipEntrySettings,iF.replaceTooltipEntrySettings,iF.removeTooltipEntrySettings;var Rhe=iF.setTooltipSettingsState;iF.setActiveMouseOverItemIndex,iF.mouseLeaveItem,iF.mouseLeaveChart,iF.setActiveClickItemIndex,iF.setMouseOverAxisIndex,iF.setMouseClickAxisIndex;var zhe=iF.setSyncInteraction;iF.setKeyboardInteraction,rF.reducer;function aF(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function oF(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?aF(Object(n),!0).forEach(function(t){Bhe(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):aF(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Bhe(e,t,n){return(t=Vhe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Vhe(e){var t=Hhe(e,`string`);return typeof t==`symbol`?t:t+``}function Hhe(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function Uhe(e,t,n){return t===`axis`?n===`click`?e.axisInteraction.click:e.axisInteraction.hover:n===`click`?e.itemInteraction.click:e.itemInteraction.hover}function Whe(e){return e.index!=null}var sF=(e,t,n,r)=>{if(t==null)return nF;var i=Uhe(e,t,n);if(i==null)return nF;if(i.active)return i;if(e.keyboardInteraction.active)return e.keyboardInteraction;if(e.syncInteraction.active&&e.syncInteraction.index!=null)return e.syncInteraction;var a=e.settings.active===!0;if(Whe(i)){if(a)return oF(oF({},i),{},{active:!0})}else if(r!=null)return{active:!0,coordinate:void 0,dataKey:void 0,index:r,graphicalItemId:void 0};return oF(oF({},nF),{},{coordinate:i.coordinate})};function Ghe(e){if(typeof e==`number`)return Number.isFinite(e)?e:void 0;if(e instanceof Date){var t=e.valueOf();return Number.isFinite(t)?t:void 0}var n=Number(e);return Number.isFinite(n)?n:void 0}function Khe(e,t){var n=Ghe(e),r=t[0],i=t[1];return n!==void 0&&n>=Math.min(r,i)&&n<=Math.max(r,i)}function qhe(e,t,n){if(n==null||t==null)return!0;var r=AT(e,t);return r==null||!Hk(n)||Khe(r,n)}var cF=(e,t,n,r)=>{var i=e?.index;if(i==null)return null;var a=Number(i);if(!DT(a))return i;var o=0,s=1/0;t.length>0&&(s=t.length-1);var c=Math.max(o,Math.min(a,s)),l=t[c];return l==null||qhe(l,n,r)?String(c):null},lF=(e,t,n,r,i,a,o)=>{if(a!=null){var s=o[0]?.getPosition(a);if(s!=null)return s;var c=i?.[Number(a)];if(c)switch(n){case`horizontal`:return{x:c.coordinate,y:(r.top+t)/2};default:return{x:(r.left+e)/2,y:c.coordinate}}}},uF=(e,t,n,r)=>{if(t===`axis`)return e.tooltipItemPayloads;if(e.tooltipItemPayloads.length===0)return[];var i=n===`hover`?e.itemInteraction.hover.graphicalItemId:e.itemInteraction.click.graphicalItemId;if(e.syncInteraction.active&&i==null)return e.tooltipItemPayloads;if(i==null&&(r!=null||e.keyboardInteraction.active)){var a=e.tooltipItemPayloads[0];return a==null?[]:[a]}return e.tooltipItemPayloads.filter(e=>e.settings?.graphicalItemId===i)},dF=e=>e.options.tooltipPayloadSearcher,fF=e=>e.tooltip;function pF(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function mF(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?pF(Object(n),!0).forEach(function(t){Jhe(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pF(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Jhe(e,t,n){return(t=Yhe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Yhe(e){var t=Xhe(e,`string`);return typeof t==`symbol`?t:t+``}function Xhe(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function Zhe(e){if(typeof e==`string`||typeof e==`number`)return e}function Qhe(e){if(typeof e==`string`||typeof e==`number`||typeof e==`boolean`)return e}function $he(e){if(typeof e==`string`||typeof e==`number`)return e;if(typeof e==`function`)return t=>e(t)}function hF(e){if(typeof e==`string`)return e}function ege(e){if(typeof e==`object`&&e)return{name:`name`in e?Zhe(e.name):void 0,unit:`unit`in e?Qhe(e.unit):void 0,dataKey:`dataKey`in e?$he(e.dataKey):void 0,payload:`payload`in e?e.payload:void 0,color:`color`in e?hF(e.color):void 0,fill:`fill`in e?hF(e.fill):void 0}}function tge(e,t){return e??t}var gF=(e,t,n,r,i,a,o)=>{if(t!=null&&a!=null){var s=n.chartData,c=n.computedData,l=n.dataStartIndex,u=n.dataEndIndex;return e.reduce((e,n)=>{var d=n.dataDefinedOnItem,f=n.settings,p=tge(d,s),m=Array.isArray(p)?ET(p,l,u):p,h=f?.dataKey??r,g=f?.nameKey,_;return r&&Array.isArray(m)&&!Array.isArray(m[0])&&o===`axis`?(_=Ox(m,r,i),_??=a(m,t,c,g)):_=a(m,t,c,g),Array.isArray(_)?_.forEach(t=>{var n=ege(t),r=n?.name,i=n?.dataKey,a=n?.payload,o=mF(mF({},f),{},{name:r,unit:n?.unit,color:n?.color??f?.color,fill:n?.fill??f?.fill});e.push(PT({tooltipEntrySettings:o,dataKey:i,payload:a,value:AT(a,i),name:r==null?void 0:String(r)}))}):e.push(PT({tooltipEntrySettings:f,dataKey:h,payload:_,value:AT(_,h),name:AT(_,g)??f?.name})),e},[])}},_F=$([hP,$N,iA],VN),vF=$([$([e=>e.graphicalItems.cartesianItems,e=>e.graphicalItems.polarItems],(e,t)=>[...e,...t]),hP,$([kA,AA],eP)],tP,{memoizeOptions:{resultEqualityCheck:OA}}),nge=$([vF],e=>e.filter(EA)),yF=$([vF],aP,{memoizeOptions:{resultEqualityCheck:OA}}),rge=$([vF],e=>e.some(e=>!e.data)),bF=$([yF,Lk],sP),ige=$([nge,Lk,hP],TA),xF=$([bF,hP,vF,Lk,rge,yF],lP),SF=$([hP],yP),CF=$([SF,$([hP],e=>e.allowDataOverflow)],Wk),age=$([$([ige,$([vF],e=>e.filter(EA)),nA,rA],_P),Lk,kA,CF],vP),oge=$([bF,hP,$([vF],iP),SP,kA,Rde],wP,{memoizeOptions:{resultEqualityCheck:DA}}),sge=$([$([TP,kA,AA],EP),kA],kP),cge=$([$([DP,kA,AA],EP),kA],AP),wF=$([hP,$T,bF,xF,nA,kA,$([hP,SF,CF,age,oge,$([sge,$([$([OP,kA,AA],EP),kA],jP),cge],CP),$T,kA],MP)],NP),lge=$([hP,wF,$([wF,hP,_F],IP),kA],RP),TF=e=>BP(e,kA(e),AA(e),!1),EF=$([$([hP,_F,lge,$([hP,TF],cA)],BN)],jA),DF=$([$T,hP,_F,EF,TF,$([$T,xF,hP,kA],XP),$([$T,xF,hP,kA],UP),kA],(e,t,n,r,i,a,o,s)=>{if(t){var c=t.type,l=jT(e,s);if(r){var u=n===`scaleBand`&&r.bandwidth?r.bandwidth()/2:2,d=c===`category`&&r.bandwidth?r.bandwidth()/u:0;return d=s===`angleAxis`&&i!=null&&i?.length>=2?vx(i[0]-i[1])*2*d:d,l&&o?o.map((e,t)=>{var n=r.map(e);return DT(n)?{coordinate:n+d,value:e,index:t,offset:d}:null}).filter(jx):r.domain().map((e,t)=>{var n=r.map(e);return DT(n)?{coordinate:n+d,value:a?a[e]:e,index:t,offset:d}:null}).filter(jx)}}}),OF=$([QP,$P,Lhe],(e,t,n)=>eF(n.shared,e,t)),kF=e=>e.tooltip.settings.trigger,AF=e=>e.tooltip.settings.defaultIndex,jF=$([fF,OF,kF,AF],sF),MF=$([jF,bF,gP,wF],cF),uge=$([DF,MF],tF);$([jF],e=>{if(e)return e.dataKey});var dge=$([jF],e=>{if(e)return e.graphicalItemId}),NF=$([fF,OF,kF,AF],uF);$([jF,$([FT,IT,$T,HT,DF,AF,NF],lF)],(e,t)=>e!=null&&e.coordinate?e.coordinate:t),$([jF],e=>e?.active??!1),$([$([NF,MF,Lk,gP,uge,dF,OF],gF)],e=>{if(e!=null){var t=e.map(e=>e.payload).filter(e=>e!=null);return Array.from(new Set(t))}});function PF(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function FF(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?PF(Object(n),!0).forEach(function(t){fge(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):PF(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function fge(e,t,n){return(t=pge(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pge(e){var t=mge(e,`string`);return typeof t==`symbol`?t:t+``}function mge(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var hge=()=>VC(hP),gge=()=>{var e=hge(),t=VC(DF),n=VC(EF);return Sde(!e||!n?void 0:FF(FF({},e),{},{scale:n}),t)},_ge=()=>VC(iA),IF=(e,t)=>t,LF=(e,t,n)=>n,RF=(e,t,n,r)=>r;$(DF,e=>XC(e,e=>e.coordinate));var zF=$([fF,IF,LF,RF],sF),BF=$([zF,bF,gP,wF],cF),vge=(e,t,n)=>{if(t!=null){var r=fF(e);return t===`axis`?n===`hover`?r.axisInteraction.hover.dataKey:r.axisInteraction.click.dataKey:n===`hover`?r.itemInteraction.hover.dataKey:r.itemInteraction.click.dataKey}},VF=$([fF,IF,LF,RF],uF),yge=$([zF,$([FT,IT,$T,HT,DF,RF,VF],lF)],(e,t)=>e.coordinate??t),HF=$([DF,BF],tF),bge=$([VF,BF,Lk,gP,HF,dF,IF],gF),xge=$([zF,BF],(e,t)=>({isActive:e.active&&t!=null,activeIndex:t})),Sge=$(e=>e.zIndex.zIndexMap,(e,t)=>t,(e,t,n)=>n,(e,t,n)=>{if(t!=null){var r=e[t];if(r!=null)return n?r.panoramaElement:r.element}});$(e=>e.zIndex.zIndexMap,e=>{var t=Object.keys(e).map(e=>parseInt(e,10)).concat(Object.values(aA));return Array.from(new Set(t)).sort((e,t)=>e-t)},{memoizeOptions:{resultEqualityCheck:nfe}});function UF(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function WF(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?UF(Object(n),!0).forEach(function(t){Cge(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):UF(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Cge(e,t,n){return(t=wge(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function wge(e){var t=Tge(e,`string`);return typeof t==`symbol`?t:t+``}function Tge(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var Ege={zIndexMap:Object.values(aA).reduce((e,t)=>WF(WF({},e),{},{[t]:{element:void 0,panoramaElement:void 0,consumers:0}}),{})},Dge=new Set(Object.values(aA));function Oge(e){return Dge.has(e)}var GF=vT({name:`zIndex`,initialState:Ege,reducers:{registerZIndexPortal:{reducer:(e,t)=>{var n=t.payload.zIndex;e.zIndexMap[n]?e.zIndexMap[n].consumers+=1:e.zIndexMap[n]={consumers:1,element:void 0,panoramaElement:void 0}},prepare:gT()},unregisterZIndexPortal:{reducer:(e,t)=>{var n=t.payload.zIndex;e.zIndexMap[n]&&(--e.zIndexMap[n].consumers,e.zIndexMap[n].consumers<=0&&!Oge(n)&&delete e.zIndexMap[n])},prepare:gT()},registerZIndexPortalElement:{reducer:(e,t)=>{var n=t.payload,r=n.zIndex,i=n.element,a=n.isPanorama;e.zIndexMap[r]?a?e.zIndexMap[r].panoramaElement=fT(i):e.zIndexMap[r].element=fT(i):e.zIndexMap[r]={consumers:0,element:a?void 0:fT(i),panoramaElement:a?fT(i):void 0}},prepare:gT()},unregisterZIndexPortalElement:{reducer:(e,t)=>{var n=t.payload.zIndex;e.zIndexMap[n]&&(t.payload.isPanorama?e.zIndexMap[n].panoramaElement=void 0:e.zIndexMap[n].element=void 0)},prepare:gT()}}}),KF=GF.actions,kge=KF.registerZIndexPortal,qF=KF.unregisterZIndexPortal;KF.registerZIndexPortalElement,KF.unregisterZIndexPortalElement,GF.reducer;function Age(e){var t=e.zIndex,n=e.children,r=nE()&&t!==void 0&&t!==0,i=WT(),a=(0,_.useRef)(void 0),o=(0,_.useRef)(new Set),s=zC(),c=VC(e=>Sge(e,t,i));if((0,_.useLayoutEffect)(()=>{if(!r){var e=o.current;e.forEach(e=>{s(qF({zIndex:e}))}),e.clear(),a.current=void 0;return}if(o.current.has(t)||(s(kge({zIndex:t})),o.current.add(t)),c){a.current=c;var n=o.current;n.forEach(e=>{e!==t&&(s(qF({zIndex:e})),n.delete(e))})}},[s,t,r,c]),(0,_.useLayoutEffect)(()=>{var e=o.current;return()=>{e.forEach(e=>{s(qF({zIndex:e}))}),e.clear()}},[s]),!r)return n;var l=c??a.current;return l?(0,Rn.createPortal)(n,l):null}function JF(){return JF=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},JF.apply(null,arguments)}function YF(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function XF(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?YF(Object(n),!0).forEach(function(t){jge(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):YF(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function jge(e,t,n){return(t=Mge(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Mge(e){var t=Nge(e,`string`);return typeof t==`symbol`?t:t+``}function Nge(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function Pge(e){var t=e.cursor,n=e.cursorComp,r=e.cursorProps;return(0,_.isValidElement)(t)?(0,_.cloneElement)(t,r):(0,_.createElement)(n,r)}function Fge(e){var t=e.coordinate,n=e.payload,r=e.index,i=e.offset,a=e.tooltipAxisBandSize,o=e.layout,s=e.cursor,c=e.tooltipEventType,l=e.chartName,u=t,d=n,f=r;if(!s||!u||l!==`ScatterChart`&&c!==`axis`)return null;var p,m,h;if(l===`ScatterChart`)p=u,m=aO,h=aA.cursorLine;else if(l===`BarChart`)p=oO(o,u,i,a),m=vk,h=aA.cursorRectangle;else if(o===`radial`&&US(u)){var g=Sk(u),v=g.cx,y=g.cy,b=g.radius;p={cx:v,cy:y,startAngle:g.startAngle,endAngle:g.endAngle,innerRadius:b,outerRadius:b},m=Pde,h=aA.cursorLine}else p={points:Fde(o,u,i)},m=JD,h=aA.cursorLine;var x=typeof s==`object`&&`className`in s?s.className:void 0,S=XF(XF(XF(XF({stroke:`#ccc`,pointerEvents:`none`},i),p),Fce(s)),{},{payload:d,payloadIndex:f,className:$n(`recharts-tooltip-cursor`,x)});return _.createElement(Age,{zIndex:e.zIndex??h},_.createElement(Pge,{cursor:s,cursorComp:m,cursorProps:S}))}function ZF(e){var t=gge(),n=YT(),r=eE(),i=_ge();return t==null||n==null||r==null||i==null?null:_.createElement(Fge,JF({},e,{offset:n,layout:r,tooltipAxisBandSize:t,chartName:i}))}var QF=(0,_.createContext)(null),$F=()=>(0,_.useContext)(QF),eI=u(s(((e,t)=>{var n=Object.prototype.hasOwnProperty,r=`~`;function i(){}Object.create&&(i.prototype=Object.create(null),new i().__proto__||(r=!1));function a(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function o(e,t,n,i,o){if(typeof n!=`function`)throw TypeError(`The listener must be a function`);var s=new a(n,i||e,o),c=r?r+t:t;return e._events[c]?e._events[c].fn?e._events[c]=[e._events[c],s]:e._events[c].push(s):(e._events[c]=s,e._eventsCount++),e}function s(e,t){--e._eventsCount===0?e._events=new i:delete e._events[t]}function c(){this._events=new i,this._eventsCount=0}c.prototype.eventNames=function(){var e=[],t,i;if(this._eventsCount===0)return e;for(i in t=this._events)n.call(t,i)&&e.push(r?i.slice(1):i);return Object.getOwnPropertySymbols?e.concat(Object.getOwnPropertySymbols(t)):e},c.prototype.listeners=function(e){var t=r?r+e:e,n=this._events[t];if(!n)return[];if(n.fn)return[n.fn];for(var i=0,a=n.length,o=Array(a);i<a;i++)o[i]=n[i].fn;return o},c.prototype.listenerCount=function(e){var t=r?r+e:e,n=this._events[t];return n?n.fn?1:n.length:0},c.prototype.emit=function(e,t,n,i,a,o){var s=r?r+e:e;if(!this._events[s])return!1;var c=this._events[s],l=arguments.length,u,d;if(c.fn){switch(c.once&&this.removeListener(e,c.fn,void 0,!0),l){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,t),!0;case 3:return c.fn.call(c.context,t,n),!0;case 4:return c.fn.call(c.context,t,n,i),!0;case 5:return c.fn.call(c.context,t,n,i,a),!0;case 6:return c.fn.call(c.context,t,n,i,a,o),!0}for(d=1,u=Array(l-1);d<l;d++)u[d-1]=arguments[d];c.fn.apply(c.context,u)}else{var f=c.length,p;for(d=0;d<f;d++)switch(c[d].once&&this.removeListener(e,c[d].fn,void 0,!0),l){case 1:c[d].fn.call(c[d].context);break;case 2:c[d].fn.call(c[d].context,t);break;case 3:c[d].fn.call(c[d].context,t,n);break;case 4:c[d].fn.call(c[d].context,t,n,i);break;default:if(!u)for(p=1,u=Array(l-1);p<l;p++)u[p-1]=arguments[p];c[d].fn.apply(c[d].context,u)}}return!0},c.prototype.on=function(e,t,n){return o(this,e,t,n,!1)},c.prototype.once=function(e,t,n){return o(this,e,t,n,!0)},c.prototype.removeListener=function(e,t,n,i){var a=r?r+e:e;if(!this._events[a])return this;if(!t)return s(this,a),this;var o=this._events[a];if(o.fn)o.fn===t&&(!i||o.once)&&(!n||o.context===n)&&s(this,a);else{for(var c=0,l=[],u=o.length;c<u;c++)(o[c].fn!==t||i&&!o[c].once||n&&o[c].context!==n)&&l.push(o[c]);l.length?this._events[a]=l.length===1?l[0]:l:s(this,a)}return this},c.prototype.removeAllListeners=function(e){var t;return e?(t=r?r+e:e,this._events[t]&&s(this,t)):(this._events=new i,this._eventsCount=0),this},c.prototype.off=c.prototype.removeListener,c.prototype.addListener=c.prototype.on,c.prefixed=r,c.EventEmitter=c,t!==void 0&&(t.exports=c)}))(),1).default,tI=new eI,nI=`recharts.syncEvent.tooltip`;function rI(e){return e.tooltip.syncInteraction}function iI(e,t,n,r,i,a){var o=VC(n=>vge(n,e,t)),s=VC(dge),c=VC(Qde),l=VC(Xde),u=VC(Zde),d=VC(rI)?.sourceViewBox!=null,f=qT();(0,_.useEffect)(()=>{if(!d&&l!=null&&c!=null){var e=zhe({active:a,coordinate:n,dataKey:o,index:i,label:typeof r==`number`?String(r):r,sourceViewBox:f,graphicalItemId:s});tI.emit(nI,l,e,c)}},[d,n,o,s,i,r,c,l,u,a,f])}function aI(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function oI(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?aI(Object(n),!0).forEach(function(t){sI(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):aI(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function sI(e,t,n){return(t=cI(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function cI(e){var t=lI(e,`string`);return typeof t==`symbol`?t:t+``}function lI(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function uI(e,t){return hI(e)||mI(e,t)||fI(e,t)||dI()}function dI(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
72
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function fI(e,t){if(e){if(typeof e==`string`)return pI(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?pI(e,t):void 0}}function pI(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function mI(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function hI(e){if(Array.isArray(e))return e}function gI(e){return e.dataKey}function _I(e,t){return _.isValidElement(e)?_.cloneElement(e,t):typeof e==`function`?_.createElement(e,t):_.createElement(iD,t)}var vI=[],yI={allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:`ease`,axisId:0,contentStyle:{},cursor:!0,filterNull:!0,includeHidden:!1,isAnimationActive:`auto`,itemSorter:`name`,itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:` : `,trigger:`hover`,useTranslate3d:!1,wrapperStyle:{}};function bI(e){var t=QS(e,yI),n=t.active,r=t.allowEscapeViewBox,i=t.animationDuration,a=t.animationEasing,o=t.content,s=t.filterNull,c=t.isAnimationActive,l=t.offset,u=t.payloadUniqBy,d=t.position,f=t.reverseDirection,p=t.useTranslate3d,m=t.wrapperStyle,h=t.cursor,g=t.shared,v=t.trigger,y=t.defaultIndex,b=t.portal,x=t.axisId,S=zC(),C=typeof y==`number`?String(y):y;(0,_.useEffect)(()=>{S(Rhe({shared:g,trigger:v,axisId:x,active:n,defaultIndex:C}))},[S,g,v,x,n,C]);var w=qT(),T=ND(),E=Ihe(g),D=VC(e=>xge(e,E,v,C))??{},O=D.activeIndex,k=D.isActive,A=VC(e=>bge(e,E,v,C)),j=VC(e=>HF(e,E,v,C)),M=VC(e=>yge(e,E,v,C)),N=A,P=$F(),F=n??k??!1,I=uI(nw([N,F]),2),L=I[0],R=I[1],z=E===`axis`?j:void 0;iI(E,v,M,z,O,F);var B=b??P;if(B==null||w==null||E==null)return null;var V=N??vI;F||(V=vI),s&&V.length&&(V=LC(V.filter(e=>e.value!=null&&(e.hide!==!0||t.includeHidden)),u,gI));var H=V.length>0,U=oI(oI({},t),{},{payload:V,label:z,active:F,activeIndex:O,coordinate:M,accessibilityLayer:T}),W=_.createElement(MD,{allowEscapeViewBox:r,animationDuration:i,animationEasing:a,isAnimationActive:c,active:F,coordinate:M,hasPayload:H,offset:l,position:d,reverseDirection:f,useTranslate3d:p,viewBox:w,wrapperStyle:m,lastBoundingBox:L,innerRef:R,hasPortalFromProps:!!b},_I(o,U));return _.createElement(_.Fragment,null,(0,Rn.createPortal)(W,B),F&&_.createElement(ZF,{cursor:h,tooltipEventType:E,coordinate:M,payload:V,index:O}))}var xI=({content:e,...t})=>(0,L.jsx)(bI,{content:e,...t}),SI=_.createContext(null),CI=({className:e,children:t,ref:n,...r})=>(0,L.jsx)(SI.Provider,{value:r,children:(0,L.jsx)(`div`,{className:Q(`min-w-[125px] space-y-2xs rounded-lg bg-surface-2 px-xs py-2xs`,e),ref:n,...r,children:t})}),wI=()=>{let e=_.useContext(SI);if(!e)throw Error(`useChartTooltipContent must be used within a ChartTooltipContentProvider`);return e},TI=({className:e,children:t,ref:n,...r})=>{let{label:i}=wI();return(0,L.jsxs)(`p`,{className:Q(`style-text-default-0`,e),ref:n,...r,children:[t,i]})},EI=_.createContext(null),DI=({className:e,children:t,ref:n,...r})=>{let{payload:i}=wI();return(0,L.jsx)(`div`,{className:Q(`flex flex-col gap-3xs`,e),ref:n,...r,children:i?.map((e,n)=>(0,L.jsx)(EI.Provider,{value:e,children:(0,L.jsx)(`div`,{className:`flex items-center justify-between gap-2xs`,children:t})},`payload-${n}`))})},OI=()=>{let e=_.useContext(EI);if(!e)throw Error(`useChartTooltipPayload must be used within a ChartTooltipPayloadProvider`);return e},kI=({children:e,...t})=>(0,L.jsx)(HE,{...t,children:e}),AI=({className:e,children:t,ref:n,...r})=>{let{icon:i,color:a}=II();return(0,L.jsxs)(`div`,{style:{color:a},className:Q(`shrink-0 [&>svg]:size-xs`,e),ref:n,...r,children:[t,i&&(0,L.jsx)(i,{})]})},jI=({shape:e=`circle`,className:t,children:n,ref:r,...i})=>{let{color:a}=II();return(0,L.jsx)(`div`,{style:{backgroundColor:a,...e===`circle`&&{borderRadius:`50%`},...e===`diamond`&&{transform:`rotate(45deg)`},...e===`triangle`&&{clipPath:`polygon(50% 0%, 0% 100%, 100% 100%)`},...e===`wye`&&{clipPath:`polygon(50% 0%, 61.8% 35.4%, 98.5% 35.4%, 69.1% 57.1%, 80.9% 92.5%, 50% 70.7%, 19.1% 92.5%, 30.9% 57.1%, 1.5% 35.4%, 38.2% 35.4%)`},...e===`line`&&{maxHeight:`100%`,width:`3px`,borderRadius:`1.5px`}},className:Q(`size-xs`,t),ref:r,...i,children:n})},MI=({className:e,children:t,ref:n,...r})=>{let{label:i}=II();return(0,L.jsxs)(`p`,{className:Q(`style-text-default--1 capitalize`,e),ref:n,...r,children:[t,i]})},NI=(e,t,n)=>{if(typeof t==`object`&&t){if(n in e)return e[n];if(`name`in t&&typeof t.name==`string`&&t.name in e)return e[t.name]}},PI=_.createContext(null),FI=({payload:e,verticalAlign:t=`bottom`,className:n,children:r,ref:i,...a})=>{let{config:o}=nx();return(0,L.jsx)(`div`,{className:Q(`flex items-center justify-center gap-lg`,t===`top`?`mb-md`:`mt-md`,n),ref:i,...a,children:e?.map((e,t)=>{let n=typeof e.dataKey==`string`?e.dataKey:`value`,i=NI(o,e,n);return(0,L.jsx)(PI.Provider,{value:{color:i?.color,icon:i?.icon,label:i?.label},children:(0,L.jsxs)(`div`,{className:`flex items-center gap-2xs`,children:[i?.icon?(0,L.jsx)(AI,{}):(0,L.jsx)(jI,{}),(0,L.jsx)(MI,{}),r]})},`payload-${t}`)})})},II=()=>{let e=_.useContext(PI);if(!e)throw Error(`useChartLegendPayload must be used within a ChartLegendPayloadProvider`);return e},LI=({gradients:e,className:t,children:n,ref:r,...i})=>(0,L.jsxs)(`defs`,{className:Q(``,t),ref:r,...i,children:[e.map(e=>(0,L.jsxs)(`linearGradient`,{id:e.id,x1:`0`,y1:`0`,x2:`0`,y2:`1`,children:[(0,L.jsx)(`stop`,{offset:`5%`,stopColor:e.stopColor,stopOpacity:.8}),(0,L.jsx)(`stop`,{offset:`95%`,stopColor:e.stopColor,stopOpacity:.1})]},e.id)),n]}),RI=({shape:e=`circle`,className:t,children:n,ref:r,...i})=>{let{color:a}=OI();return(0,L.jsx)(`div`,{style:{backgroundColor:a,...e===`circle`&&{borderRadius:`50%`},...e===`diamond`&&{transform:`rotate(45deg)`},...e===`triangle`&&{clipPath:`polygon(50% 0%, 0% 100%, 100% 100%)`},...e===`wye`&&{clipPath:`polygon(50% 0%, 61.8% 35.4%, 98.5% 35.4%, 69.1% 57.1%, 80.9% 92.5%, 50% 70.7%, 19.1% 92.5%, 30.9% 57.1%, 1.5% 35.4%, 38.2% 35.4%)`},...e===`line`&&{maxHeight:`100%`,width:`3px`,borderRadius:`1.5px`}},className:Q(`size-xs`,t),ref:r,...i,children:n})},zI=({className:e,children:t,ref:n,...r})=>{let{name:i}=OI();return(0,L.jsxs)(`p`,{className:Q(`grow text-left style-text-default--1 text-on-surface-variant capitalize`,e),ref:n,...r,children:[t,i]})},BI=({className:e,children:t,ref:n,...r})=>{let{config:i}=nx(),a=OI(),o=NI(i,a,typeof a.dataKey==`string`?a.dataKey:`value`)?.icon;return(0,L.jsxs)(`div`,{style:{color:a.color},className:Q(`shrink-0 [&>svg]:size-xs`,e),ref:n,...r,children:[t,o&&(0,L.jsx)(o,{})]})},VI=({className:e,children:t,ref:n,...r})=>{let{value:i}=OI();return(0,L.jsxs)(`p`,{className:Q(`mx-auto style-text-default--1`,e),ref:n,...r,children:[t,i]})},HI=nr(`flex items-center gap-2xs select-none hover:cursor-pointer`,{variants:{size:{small:`style-text-default--1`,medium:`style-text-default-0`,large:`style-text-default-1`}},defaultVariants:{size:`medium`}}),UI=({className:e,children:t,ref:n,size:r,...i})=>(0,L.jsx)(`label`,{className:HI({className:e,size:r}),"data-slot":`label`,htmlFor:i.htmlFor,ref:n,...i,children:t}),WI=({className:e,...t})=>(0,L.jsx)(Cf,{className:Q(`flex`,e),...t,render:(e,t)=>t.indeterminate?(0,L.jsx)(Ni,{weight:`bold`,...e,className:`text-accent-default`}):(0,L.jsx)(hi,{weight:`bold`,...e})}),GI=nr(`group flex size-sm items-center justify-center rounded-sm shadow-2xs outline-2 outline-transparent transition-colors not-indeterminate:text-accent-on-default indeterminate:text-accent-default hover:cursor-pointer hover:outline-accent-border disabled:cursor-not-allowed disabled:hover:cursor-not-allowed data-checked:bg-accent-default [&_svg]:size-xs [&:not([data-checked])]:hover:outline-border-strong`,{variants:{variant:{elevated:`bg-surface shadow-2xs`,inSurface:`bg-surface-low shadow-none inset-shadow-2xs data-checked:inset-shadow-none`}},defaultVariants:{variant:`elevated`}}),KI=({variant:e,className:t,ref:n,label:r,...i})=>(0,L.jsxs)(`div`,{className:`flex items-center gap-xs`,children:[(0,L.jsx)(Sf,{"aria-label":typeof r==`string`?r:void 0,className:Q(GI({variant:e,className:t})),ref:n,...i,children:(0,L.jsx)(WI,{})}),r&&(0,L.jsx)(UI,{htmlFor:i.id,children:r})]}),qI=({className:e,children:t,ref:n,...r})=>{let i=_.useId();return(0,L.jsx)(Tf,{"aria-labelledby":i,className:Q(`flex flex-col items-start gap-2xs`,e),ref:n,...r,children:t})},JI=_.createContext(void 0),YI=({items:e,defaultValue:t,className:n,children:r,ref:i,...a})=>{let[o,s]=_.useState(t);return(0,L.jsx)(JI.Provider,{value:{currentValue:o,setCurrentValue:s,items:e},children:(0,L.jsx)(`div`,{className:Q(`flex flex-col rounded-xl border border-border bg-surface`,n),ref:i,...a,children:r})})},XI=()=>{let e=_.useContext(JI);if(!e)throw Error(`useCodeBlock must be used within a CodeBlock`);return e},ZI=({className:e,children:t,ref:n,...r})=>(0,L.jsx)(`div`,{className:Q(`absolute top-3xs right-3xs flex items-center gap-3xs`,e),ref:n,...r,children:t}),QI=({className:e,children:t,ref:n,...r})=>{let{currentValue:i}=XI(),[a,o]=_.useState(!1);return(0,L.jsxs)(Gb,{"aria-label":a?`Copied`:`Copy code`,onClick:async()=>{try{await navigator.clipboard.writeText(i.content),o(!0),setTimeout(()=>o(!1),2e3)}catch(e){console.error(`Failed to copy text: `,e)}},size:`iconMedium`,variant:`ghost`,tone:`neutral`,className:Q(``,e),ref:n,...r,children:[t,a?(0,L.jsx)(hi,{weight:`bold`,className:`animate-in zoom-in`}):(0,L.jsx)(vi,{weight:`bold`,className:`animate-in zoom-in`})]})},$I=({className:e,children:t,ref:n,...r})=>{let{currentValue:i}=XI(),[a,o]=_.useState(!1);return(0,L.jsxs)(Gb,{"aria-label":a?`Downloaded`:`Download code`,onClick:async()=>{try{let e=new Blob([i.content]),t=URL.createObjectURL(e),n=document.createElement(`a`);n.href=t,n.download=`${i.name}`,n.click(),URL.revokeObjectURL(t),o(!0),setTimeout(()=>o(!1),2e3)}catch(e){console.error(`Failed to download file: `,e)}},size:`iconMedium`,variant:`ghost`,tone:`neutral`,className:Q(``,e),ref:n,...r,children:[t,a?(0,L.jsx)(hi,{weight:`bold`,className:`animate-in zoom-in`}):(0,L.jsx)(bi,{weight:`bold`,className:`animate-in zoom-in`})]})},eL=({className:e,children:t,ref:n,...r})=>(0,L.jsx)(`div`,{className:Q(`flex min-h-2xl items-center justify-between border-b border-border p-2xs`,e),ref:n,...r,children:t}),tL=({className:e,children:t,ref:n,...r})=>{let{currentValue:i}=XI();return(0,L.jsxs)(`div`,{className:Q(`flex items-center justify-center gap-2xs px-xs style-text-strong-0 text-on-surface-variant [&>svg]:size-sm`,e),ref:n,...r,children:[t,i?.icon,i.name]})},nL=({children:e,...t})=>(0,L.jsx)(koe,{...t,children:e}),rL=({className:e,children:t,ref:n,...r})=>(0,L.jsxs)(ay,{className:Q(`group/item grid min-h-lg cursor-default grid-cols-[1fr_0.75rem] items-center gap-xs rounded-lg px-2xs py-3xs transition-colors outline-none select-none group-data-[side=none]:pr-xs hover:cursor-pointer data-highlighted:relative data-highlighted:z-0 data-highlighted:bg-neutral-container-high data-highlighted:text-neutral-on-container data-highlighted:before:absolute data-highlighted:before:inset-x-3xs data-highlighted:before:inset-y-[0px] data-highlighted:before:z-[-1] data-highlighted:before:rounded-sm data-selected:bg-neutral-default data-selected:text-neutral-on-default [&_svg]:size-sm`,e),ref:n,...r,children:[(0,L.jsx)(cy,{className:`flex flex-col`,children:t}),(0,L.jsx)(oy,{className:`place-self-end self-center`,children:(0,L.jsx)(hi,{weight:`bold`})})]}),iL=({className:e,children:t,ref:n,...r})=>(0,L.jsx)(ny,{className:Q(`relative max-h-(--available-height) scroll-py-md space-y-3xs overflow-y-auto`,e),ref:n,...r,children:t}),aL=({className:e,children:t,ref:n,...r})=>(0,L.jsx)(Vv,{className:Q(`flex text-on-surface-variant [&>svg]:size-sm`,e),ref:n,...r,children:t}),oL=({className:e,children:t,ref:n,...r})=>(0,L.jsx)(Hv,{children:(0,L.jsx)(qv,{className:Q(`z-9999 outline-none select-none`,e),ref:n,...r,children:(0,L.jsxs)(Yv,{className:`group min-w-(--anchor-width) origin-(--transform-origin) rounded-xl bg-surface-2 bg-clip-padding p-2xs shadow-md transition-[transform,scale,opacity] data-ending-style:scale-90 data-ending-style:opacity-0 data-starting-style:scale-90 data-starting-style:opacity-0 data-[side=none]:data-ending-style:scale-90 data-[side=none]:data-ending-style:opacity-0 data-[side=none]:data-starting-style:scale-90 data-[side=none]:data-starting-style:opacity-0`,children:[(0,L.jsx)(dy,{className:`top-0 right-0 z-[1px] flex h-md w-full cursor-default items-center justify-center rounded-xl bg-surface-2 before:absolute before:left-0 before:size-full before:content-[''] data-[side=none]:before:-top-full`,children:(0,L.jsx)(pi,{className:`size-sm`,weight:`fill`})}),t,(0,L.jsx)(uy,{className:`right-0 bottom-0 z-[1px] flex h-md w-full cursor-default items-center justify-center rounded-xl bg-surface-2 before:absolute before:left-0 before:size-full before:content-[''] data-[side=none]:before:-bottom-full`,children:(0,L.jsx)(ci,{className:`size-sm`,weight:`fill`})})]})})}),sL=nr(`flex items-center justify-between outline outline-transparent transition-all duration-100 hover:cursor-pointer aria-invalid:bg-error-container aria-invalid:text-error-on-container aria-invalid:outline-error-border data-disabled:cursor-not-allowed [&_[data-value]]:min-w-0 [&_[data-value]]:flex-1`,{variants:{variant:{primary:`bg-surface shadow-2xs hover:outline-border-strong`,secondary:`bg-neutral-container hover:outline-border-strong`,ghost:`bg-transparent hover:bg-neutral-container`},size:{small:`h-lg gap-md rounded-lg px-xs style-text-default--1 [&_[data-value]]:gap-3xs [&_svg]:size-xs`,medium:`h-xl gap-lg rounded-xl px-sm style-text-default-0 [&_[data-value]]:gap-2xs [&_svg]:size-sm`,large:`h-2xl gap-xl rounded-2xl px-md style-text-default-1 [&_[data-value]]:gap-xs [&_svg]:size-md`}},defaultVariants:{variant:`primary`,size:`medium`}}),cL=({variant:e,size:t,className:n,children:r,ref:i,...a})=>(0,L.jsx)(zv,{className:Q(sL({variant:e,size:t,className:n})),ref:i,...a,children:r}),lL=({className:e,children:t,ref:n,...r})=>(0,L.jsx)(Bv,{"data-value":!0,className:Q(`flex h-lg min-w-0 flex-1 items-center gap-2xs overflow-hidden text-left text-ellipsis whitespace-nowrap data-placeholder:opacity-70`,e),ref:n,...r,children:t}),uL=({className:e,children:t,ref:n,...r})=>(0,L.jsx)(py,{className:Q(`block space-y-3xs border-border-strong not-last:border-b not-last:pb-xs`,e),ref:n,...r,children:t}),dL=({className:e,children:t,ref:n,...r})=>(0,L.jsx)(my,{className:Q(`sticky top-[0px] z-1 cursor-default bg-surface-2 px-2xs py-3xs style-text-default--2 text-on-surface-variant select-none`,e),ref:n,...r,children:t}),fL=({className:e,children:t,ref:n,...r})=>(0,L.jsx)(`span`,{className:Q(`style-text-prose--1 text-on-surface-variant transition-colors group-data-highlighted/item:text-neutral-on-container group-data-selected/item:text-neutral-on-default`,e),ref:n,...r,children:t}),pL=({className:e,children:t,ref:n,...r})=>(0,L.jsx)(`span`,{className:Q(`flex items-center gap-2xs style-text-default-0 text-on-surface transition-colors group-data-highlighted/item:text-neutral-on-container group-data-selected/item:text-neutral-on-default`,e),ref:n,...r,children:t}),mL=({className:e,children:t,ref:n,...r})=>{let{currentValue:i,setCurrentValue:a,items:o}=XI();return(0,L.jsxs)(nL,{value:i.id,onValueChange:e=>{let t=o.find(t=>t.id===e);t&&a(t)},children:[(0,L.jsxs)(cL,{"aria-label":`Select file`,className:Q(``,e),ref:n,...r,variant:`ghost`,children:[(0,L.jsx)(lL,{children:e=>o.find(t=>t.id===e)?.label}),(0,L.jsx)(aL,{children:(0,L.jsx)(mi,{weight:`bold`})})]}),(0,L.jsx)(oL,{children:(0,L.jsxs)(iL,{children:[t,(0,L.jsx)(uL,{children:o.map(({label:e,id:t})=>(0,L.jsx)(rL,{value:t,children:e},t))})]})})]})},hL=nr(``,{variants:{variant:{default:`space-y-xs [&_[role=presentation]]:top-1/2 [&_[role=tablist]]:bg-surface-low`,ghost:`space-y-2xs [&_[role=presentation]]:top-1/2 [&_[role=presentation]]:rounded-full [&_[role=presentation]]:border [&_[role=tablist]]:rounded-full`,underline:`space-y-xs [&_[role=tablist]]:border-border`},size:{small:``,medium:``,large:``},tone:{brand:``,accent:``,neutral:``,error:``,info:``,success:``,warning:``},fill:{true:`[&_[role=tab]]:grow [&_[role=tablist]]:w-full`,false:`[&_[role=tablist]]:w-fit`}},compoundVariants:[{variant:`default`,tone:`brand`,class:`[&_[role=presentation]]:bg-brand-default [&_[role=tab]]:data-active:text-brand-on-default [&_[role=tab]]:hover:[&:not([data-active])]:text-brand-default`},{variant:`default`,tone:`accent`,class:`[&_[role=presentation]]:bg-accent-default [&_[role=tab]]:data-active:text-accent-on-default [&_[role=tab]]:hover:[&:not([data-active])]:text-accent-default`},{variant:`default`,tone:`neutral`,class:`[&_[role=presentation]]:bg-neutral-default [&_[role=tab]]:data-active:text-neutral-on-default [&_[role=tab]]:hover:[&:not([data-active])]:text-neutral-default`},{variant:`default`,tone:`error`,class:`[&_[role=presentation]]:bg-error-default [&_[role=tab]]:data-active:text-error-on-default [&_[role=tab]]:hover:[&:not([data-active])]:text-error-default`},{variant:`default`,tone:`info`,class:`[&_[role=presentation]]:bg-info-default [&_[role=tab]]:data-active:text-info-on-default [&_[role=tab]]:hover:[&:not([data-active])]:text-info-default`},{variant:`default`,tone:`success`,class:`[&_[role=presentation]]:bg-success-default [&_[role=tab]]:data-active:text-success-on-default [&_[role=tab]]:hover:[&:not([data-active])]:text-success-default`},{variant:`default`,tone:`warning`,class:`[&_[role=presentation]]:bg-warning-default [&_[role=tab]]:data-active:text-warning-on-default [&_[role=tab]]:hover:[&:not([data-active])]:text-warning-default`},{variant:`ghost`,tone:`brand`,class:`[&_[role=presentation]]:border-brand-border [&_[role=presentation]]:bg-brand-container [&_[role=tab]]:data-active:text-brand-on-container [&_[role=tab]]:hover:[&:not([data-active])]:text-brand-default`},{variant:`ghost`,tone:`accent`,class:`[&_[role=presentation]]:border-accent-border [&_[role=presentation]]:bg-accent-container [&_[role=tab]]:data-active:text-accent-on-container [&_[role=tab]]:hover:[&:not([data-active])]:text-accent-default`},{variant:`ghost`,tone:`neutral`,class:`[&_[role=presentation]]:border-neutral-border [&_[role=presentation]]:bg-neutral-container [&_[role=tab]]:data-active:text-neutral-on-container [&_[role=tab]]:hover:[&:not([data-active])]:text-neutral-default`},{variant:`ghost`,tone:`error`,class:`[&_[role=presentation]]:border-error-border [&_[role=presentation]]:bg-error-container [&_[role=tab]]:data-active:text-error-on-container [&_[role=tab]]:hover:[&:not([data-active])]:text-error-default`},{variant:`ghost`,tone:`info`,class:`[&_[role=presentation]]:border-info-border [&_[role=presentation]]:bg-info-container [&_[role=tab]]:data-active:text-info-on-container [&_[role=tab]]:hover:[&:not([data-active])]:text-info-default`},{variant:`ghost`,tone:`success`,class:`[&_[role=presentation]]:border-success-border [&_[role=presentation]]:bg-success-container [&_[role=tab]]:data-active:text-success-on-container [&_[role=tab]]:hover:[&:not([data-active])]:text-success-default`},{variant:`ghost`,tone:`warning`,class:`[&_[role=presentation]]:border-warning-border [&_[role=presentation]]:bg-warning-container [&_[role=tab]]:data-active:text-warning-on-container [&_[role=tab]]:hover:[&:not([data-active])]:text-warning-default`},{variant:`underline`,tone:`brand`,class:`[&_[role=presentation]]:bg-brand-default [&_[role=tab]]:data-active:text-brand-default [&_[role=tab]]:hover:[&:not([data-active])]:text-brand-default`},{variant:`underline`,tone:`accent`,class:`[&_[role=presentation]]:bg-accent-default [&_[role=tab]]:data-active:text-accent-default [&_[role=tab]]:hover:[&:not([data-active])]:text-accent-default`},{variant:`underline`,tone:`neutral`,class:`[&_[role=presentation]]:bg-neutral-default [&_[role=tab]]:data-active:text-neutral-default [&_[role=tab]]:hover:[&:not([data-active])]:text-neutral-default`},{variant:`underline`,tone:`error`,class:`[&_[role=presentation]]:bg-error-default [&_[role=tab]]:data-active:text-error-default [&_[role=tab]]:hover:[&:not([data-active])]:text-error-default`},{variant:`underline`,tone:`info`,class:`[&_[role=presentation]]:bg-info-default [&_[role=tab]]:data-active:text-info-default [&_[role=tab]]:hover:[&:not([data-active])]:text-info-default`},{variant:`underline`,tone:`success`,class:`[&_[role=presentation]]:bg-success-default [&_[role=tab]]:data-active:text-success-default [&_[role=tab]]:hover:[&:not([data-active])]:text-success-default`},{variant:`underline`,tone:`warning`,class:`[&_[role=presentation]]:bg-warning-default [&_[role=tab]]:data-active:text-warning-default [&_[role=tab]]:hover:[&:not([data-active])]:text-warning-default`},{size:`small`,variant:`default`,class:`[&_[role=presentation]]:rounded-lg [&_[role=tab]]:rounded-lg [&_[role=tablist]]:rounded-lg`},{size:`small`,variant:`default`,class:`[&_[role=tab]]:h-lg [&_[role=tab]]:px-sm [&_[role=tab]]:style-text-default--1 [&_[role=tablist]]:gap-2xs [&_[role=tablist]]:p-3xs`},{size:`medium`,variant:`default`,class:`[&_[role=presentation]]:rounded-xl [&_[role=tab]]:h-xl [&_[role=tab]]:rounded-xl [&_[role=tab]]:px-md [&_[role=tab]]:style-text-default-0 [&_[role=tablist]]:gap-xs [&_[role=tablist]]:rounded-xl [&_[role=tablist]]:p-2xs`},{size:`large`,variant:`default`,class:`[&_[role=presentation]]:rounded-2xl [&_[role=tab]]:h-2xl [&_[role=tab]]:rounded-2xl [&_[role=tab]]:px-lg [&_[role=tab]]:style-text-default-1 [&_[role=tablist]]:gap-sm [&_[role=tablist]]:rounded-2xl [&_[role=tablist]]:p-xs`},{size:`small`,variant:`ghost`,class:`[&_[role=tab]]:h-lg [&_[role=tab]]:px-sm [&_[role=tab]]:style-text-default--1 [&_[role=tablist]]:gap-2xs [&_[role=tablist]]:p-3xs`},{size:`medium`,variant:`ghost`,class:`[&_[role=tab]]:h-xl [&_[role=tab]]:px-md [&_[role=tab]]:style-text-default-0 [&_[role=tablist]]:gap-xs [&_[role=tablist]]:p-2xs`},{size:`large`,variant:`ghost`,class:`[&_[role=tab]]:h-2xl [&_[role=tab]]:px-lg [&_[role=tab]]:style-text-default-1 [&_[role=tablist]]:gap-sm [&_[role=tablist]]:p-xs`},{size:`small`,variant:`underline`,class:`[&_[role=tab]]:px-lg [&_[role=tab]]:pb-sm [&_[role=tab]]:style-text-default--1 [&_[role=tablist]]:h-lg [&_[role=tablist]]:gap-md [&_[role=tablist]]:border-b-2 **:[[role=presentation]]:bottom-[-3px] **:[[role=presentation]]:h-[2px]`},{size:`medium`,variant:`underline`,class:`[&_[role=tab]]:px-xl [&_[role=tab]]:pb-xs [&_[role=tab]]:style-text-default-0 [&_[role=tablist]]:h-xl [&_[role=tablist]]:gap-lg [&_[role=tablist]]:border-b-3 **:[[role=presentation]]:bottom-[-4px] **:[[role=presentation]]:h-[3px]`},{size:`large`,variant:`underline`,class:`[&_[role=tab]]:px-2xl [&_[role=tab]]:pb-2xs [&_[role=tab]]:style-text-default-1 [&_[role=tablist]]:h-2xl [&_[role=tablist]]:gap-xl [&_[role=tablist]]:border-b-4 **:[[role=presentation]]:bottom-[-5px] **:[[role=presentation]]:h-[4px]`}],defaultVariants:{variant:`default`,size:`medium`,tone:`brand`,fill:!0}}),gL=({size:e,tone:t,variant:n,fill:r,className:i,ref:a,...o})=>(0,L.jsx)(Vy,{className:Q(hL({size:e,tone:t,variant:n,fill:r}),i),ref:a,...o}),_L=({className:e,...t})=>(0,L.jsx)(Jy,{className:Q(`absolute left-[0px] z-[-1] h-(--active-tab-height) w-(--active-tab-width) translate-x-(--active-tab-left) -translate-y-1/2 transition-all duration-300`,e),...t}),vL=({className:e,...t})=>(0,L.jsx)(Qy,{className:Q(`relative z-0 flex`,e),...t}),yL=({className:e,...t})=>(0,L.jsx)(Zy,{className:Q(`relative flex grow flex-col items-center justify-start gap-md`,e),...t}),bL=({className:e,...t})=>(0,L.jsx)(Ky,{className:Q(`inline-flex items-center justify-center gap-xs text-center break-keep whitespace-nowrap text-on-surface transition-colors duration-300 outline-none select-none hover:cursor-pointer focus-visible:relative focus-visible:before:absolute focus-visible:before:outline`,e),...t}),xL=({className:e,children:t,ref:n,...r})=>{let{currentValue:i,items:a,setCurrentValue:o}=XI();return(0,L.jsxs)(gL,{value:i.id,onValueChange:e=>{let t=a.find(t=>t.id===e);t&&o(t)},className:Q(``,e),variant:`ghost`,ref:n,...r,children:[(0,L.jsxs)(vL,{children:[a.map(({id:e,label:t})=>(0,L.jsx)(bL,{value:e,children:t},e)),(0,L.jsx)(_L,{})]}),t]})},SL=({className:e,children:t,ref:n,...r})=>{let{currentValue:i}=XI();return(0,L.jsxs)(`div`,{className:Q(`relative overflow-auto rounded-lg px-md py-sm`,e),ref:n,...r,children:[t,(0,L.jsx)(`div`,{dangerouslySetInnerHTML:{__html:i.content}})]})},CL=({className:e,children:t,ref:n,...r})=>(0,L.jsx)(kf,{className:Q(`ml-md flex h-(--collapsible-panel-height) flex-col justify-end gap-3xs overflow-hidden border-l border-border pl-sm transition-all duration-150 ease-out data-ending-style:h-0 data-starting-style:h-0 [&[hidden]:not([hidden="until-found"])]:hidden`,e),ref:n,...r,children:t}),wL=({className:e,children:t,ref:n,...r})=>(0,L.jsx)(Of,{render:i=>(0,L.jsxs)(Gb,{...i,tone:`neutral`,variant:`elevated`,className:Q(`group/trigger`,e),ref:n,...r,children:[t,(0,L.jsx)(fi,{weight:`bold`,className:`ml-auto transition-all ease-out group-data-panel-open/trigger:rotate-90`})]})}),TL=({className:e,children:t,ref:n,...r})=>(0,L.jsx)(Df,{className:Q(`flex min-h-xl w-full flex-col justify-center gap-xs`,e),ref:n,...r,children:t}),EL=nr(`flex flex-col gap-xs`,{variants:{size:{small:`[&_[data-slot='slider-thumb']]:size-sm [&_[data-slot='slider-thumb']]:border-4 [&_[data-slot='slider-thumb'][data-dragging]]:size-sm [&_[data-slot='slider-track'][data-orientation='horizontal']]:h-xs [&_[data-slot='slider-track'][data-orientation='vertical']]:w-3xs`,medium:`[&_[data-slot='slider-thumb']]:size-md [&_[data-slot='slider-thumb']]:border-4 [&_[data-slot='slider-thumb'][data-dragging]]:size-md [&_[data-slot='slider-track'][data-orientation='horizontal']]:h-sm [&_[data-slot='slider-track'][data-orientation='vertical']]:w-2xs`,large:`[&_[data-slot='slider-thumb']]:size-lg [&_[data-slot='slider-thumb']]:border-4 [&_[data-slot='slider-thumb'][data-dragging]]:size-lg [&_[data-slot='slider-track'][data-orientation='horizontal']]:h-md [&_[data-slot='slider-track'][data-orientation='vertical']]:w-xs`}},defaultVariants:{size:`medium`}}),DL=({size:e,trackStyle:t,className:n,children:r,ref:i,...a})=>{let o=t.some(e=>e.includes(`rgba`)||e.includes(`hsla`)||e.includes(`/`)),{"aria-label":s,"aria-labelledby":c,...l}=a;return(0,L.jsx)(Sy,{className:Q(EL({size:e}),n),"data-slot":`slider-root`,thumbAlignment:`edge`,ref:i,...l,children:(0,L.jsx)(Oy,{className:`shrink-0 hover:cursor-pointer data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full`,children:(0,L.jsxs)(ky,{"data-slot":`slider-track`,className:Q(`relative size-full rounded-full`),style:{backgroundImage:o?[`linear-gradient(to right, ${t.join(`, `)})`,`linear-gradient(45deg, #d4d4d8 25%, transparent 25%, transparent 75%, #d4d4d8 75%, #d4d4d8)`,`linear-gradient(45deg, #d4d4d8 25%, transparent 25%, transparent 75%, #d4d4d8 75%, #d4d4d8)`].join(`, `):`linear-gradient(to right, ${t.join(`, `)})`,backgroundSize:o?`100% 100%, 10px 10px, 10px 10px`:`auto`,backgroundPosition:o?`0 0, 0 0, 5px 5px`:`auto`,backgroundColor:`#ffffff`},children:[r,(0,L.jsx)(Ny,{"data-slot":`slider-indicator`,className:`rounded-full`}),(0,L.jsx)(My,{"aria-label":s,"aria-labelledby":c,"data-slot":`slider-thumb`,className:Q(`absolute aspect-square rounded-full border-white shadow-xs transition-[width,height,opacity] data-dragging:cursor-grabbing hover:[&:not([data-dragging])]:cursor-pointer`),render:(e,n)=>(0,L.jsx)(`div`,{...e,style:{...e.style,backgroundColor:t[n.values[0]]}})})]})})})},{min:OL,max:kL}=Math,AL=(e,t=0,n=1)=>OL(kL(t,e),n),jL=e=>{e._clipped=!1,e._unclipped=e.slice(0);for(let t=0;t<=3;t++)t<3?((e[t]<0||e[t]>255)&&(e._clipped=!0),e[t]=AL(e[t],0,255)):t===3&&(e[t]=AL(e[t],0,1));return e},ML={};for(let e of[`Boolean`,`Number`,`String`,`Function`,`Array`,`Date`,`RegExp`,`Undefined`,`Null`])ML[`[object ${e}]`]=e.toLowerCase();function NL(e){return ML[Object.prototype.toString.call(e)]||`object`}var PL=(e,t=null)=>e.length>=3?Array.prototype.slice.call(e):NL(e[0])==`object`&&t?t.split(``).filter(t=>e[0][t]!==void 0).map(t=>e[0][t]):e[0].slice(0),FL=e=>{if(e.length<2)return null;let t=e.length-1;return NL(e[t])==`string`?e[t].toLowerCase():null},{PI:IL,min:LL,max:RL}=Math,zL=e=>Math.round(e*100)/100,BL=e=>Math.round(e*100)/100,VL=IL*2,HL=IL/3,UL=IL/180,WL=180/IL;function GL(e){return[...e.slice(0,3).reverse(),...e.slice(3)]}var KL={format:{},autodetect:[]},qL=class{constructor(...e){let t=this;if(NL(e[0])===`object`&&e[0].constructor&&e[0].constructor===this.constructor)return e[0];let n=FL(e),r=!1;if(!n){r=!0,KL.sorted||=(KL.autodetect=KL.autodetect.sort((e,t)=>t.p-e.p),!0);for(let t of KL.autodetect)if(n=t.test(...e),n)break}if(KL.format[n])t._rgb=jL(KL.format[n].apply(null,r?e:e.slice(0,-1)));else throw Error(`unknown format: `+e);t._rgb.length===3&&t._rgb.push(1)}toString(){return NL(this.hex)==`function`?this.hex():`[${this._rgb.join(`,`)}]`}},JL=`3.2.0`,YL=(...e)=>new qL(...e);YL.version=JL;var XL={aliceblue:`#f0f8ff`,antiquewhite:`#faebd7`,aqua:`#00ffff`,aquamarine:`#7fffd4`,azure:`#f0ffff`,beige:`#f5f5dc`,bisque:`#ffe4c4`,black:`#000000`,blanchedalmond:`#ffebcd`,blue:`#0000ff`,blueviolet:`#8a2be2`,brown:`#a52a2a`,burlywood:`#deb887`,cadetblue:`#5f9ea0`,chartreuse:`#7fff00`,chocolate:`#d2691e`,coral:`#ff7f50`,cornflowerblue:`#6495ed`,cornsilk:`#fff8dc`,crimson:`#dc143c`,cyan:`#00ffff`,darkblue:`#00008b`,darkcyan:`#008b8b`,darkgoldenrod:`#b8860b`,darkgray:`#a9a9a9`,darkgreen:`#006400`,darkgrey:`#a9a9a9`,darkkhaki:`#bdb76b`,darkmagenta:`#8b008b`,darkolivegreen:`#556b2f`,darkorange:`#ff8c00`,darkorchid:`#9932cc`,darkred:`#8b0000`,darksalmon:`#e9967a`,darkseagreen:`#8fbc8f`,darkslateblue:`#483d8b`,darkslategray:`#2f4f4f`,darkslategrey:`#2f4f4f`,darkturquoise:`#00ced1`,darkviolet:`#9400d3`,deeppink:`#ff1493`,deepskyblue:`#00bfff`,dimgray:`#696969`,dimgrey:`#696969`,dodgerblue:`#1e90ff`,firebrick:`#b22222`,floralwhite:`#fffaf0`,forestgreen:`#228b22`,fuchsia:`#ff00ff`,gainsboro:`#dcdcdc`,ghostwhite:`#f8f8ff`,gold:`#ffd700`,goldenrod:`#daa520`,gray:`#808080`,green:`#008000`,greenyellow:`#adff2f`,grey:`#808080`,honeydew:`#f0fff0`,hotpink:`#ff69b4`,indianred:`#cd5c5c`,indigo:`#4b0082`,ivory:`#fffff0`,khaki:`#f0e68c`,laserlemon:`#ffff54`,lavender:`#e6e6fa`,lavenderblush:`#fff0f5`,lawngreen:`#7cfc00`,lemonchiffon:`#fffacd`,lightblue:`#add8e6`,lightcoral:`#f08080`,lightcyan:`#e0ffff`,lightgoldenrod:`#fafad2`,lightgoldenrodyellow:`#fafad2`,lightgray:`#d3d3d3`,lightgreen:`#90ee90`,lightgrey:`#d3d3d3`,lightpink:`#ffb6c1`,lightsalmon:`#ffa07a`,lightseagreen:`#20b2aa`,lightskyblue:`#87cefa`,lightslategray:`#778899`,lightslategrey:`#778899`,lightsteelblue:`#b0c4de`,lightyellow:`#ffffe0`,lime:`#00ff00`,limegreen:`#32cd32`,linen:`#faf0e6`,magenta:`#ff00ff`,maroon:`#800000`,maroon2:`#7f0000`,maroon3:`#b03060`,mediumaquamarine:`#66cdaa`,mediumblue:`#0000cd`,mediumorchid:`#ba55d3`,mediumpurple:`#9370db`,mediumseagreen:`#3cb371`,mediumslateblue:`#7b68ee`,mediumspringgreen:`#00fa9a`,mediumturquoise:`#48d1cc`,mediumvioletred:`#c71585`,midnightblue:`#191970`,mintcream:`#f5fffa`,mistyrose:`#ffe4e1`,moccasin:`#ffe4b5`,navajowhite:`#ffdead`,navy:`#000080`,oldlace:`#fdf5e6`,olive:`#808000`,olivedrab:`#6b8e23`,orange:`#ffa500`,orangered:`#ff4500`,orchid:`#da70d6`,palegoldenrod:`#eee8aa`,palegreen:`#98fb98`,paleturquoise:`#afeeee`,palevioletred:`#db7093`,papayawhip:`#ffefd5`,peachpuff:`#ffdab9`,peru:`#cd853f`,pink:`#ffc0cb`,plum:`#dda0dd`,powderblue:`#b0e0e6`,purple:`#800080`,purple2:`#7f007f`,purple3:`#a020f0`,rebeccapurple:`#663399`,red:`#ff0000`,rosybrown:`#bc8f8f`,royalblue:`#4169e1`,saddlebrown:`#8b4513`,salmon:`#fa8072`,sandybrown:`#f4a460`,seagreen:`#2e8b57`,seashell:`#fff5ee`,sienna:`#a0522d`,silver:`#c0c0c0`,skyblue:`#87ceeb`,slateblue:`#6a5acd`,slategray:`#708090`,slategrey:`#708090`,snow:`#fffafa`,springgreen:`#00ff7f`,steelblue:`#4682b4`,tan:`#d2b48c`,teal:`#008080`,thistle:`#d8bfd8`,tomato:`#ff6347`,turquoise:`#40e0d0`,violet:`#ee82ee`,wheat:`#f5deb3`,white:`#ffffff`,whitesmoke:`#f5f5f5`,yellow:`#ffff00`,yellowgreen:`#9acd32`},ZL=/^#?([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/,QL=/^#?([A-Fa-f0-9]{8}|[A-Fa-f0-9]{4})$/,$L=e=>{if(e.match(ZL)){(e.length===4||e.length===7)&&(e=e.substr(1)),e.length===3&&(e=e.split(``),e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]);let t=parseInt(e,16);return[t>>16,t>>8&255,t&255,1]}if(e.match(QL)){(e.length===5||e.length===9)&&(e=e.substr(1)),e.length===4&&(e=e.split(``),e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]+e[3]+e[3]);let t=parseInt(e,16);return[t>>24&255,t>>16&255,t>>8&255,Math.round((t&255)/255*100)/100]}throw Error(`unknown hex color: ${e}`)},{round:eR}=Math,tR=(...e)=>{let[t,n,r,i]=PL(e,`rgba`),a=FL(e)||`auto`;i===void 0&&(i=1),a===`auto`&&(a=i<1?`rgba`:`rgb`),t=eR(t),n=eR(n),r=eR(r);let o=`000000`+(t<<16|n<<8|r).toString(16);o=o.substr(o.length-6);let s=`0`+eR(i*255).toString(16);switch(s=s.substr(s.length-2),a.toLowerCase()){case`rgba`:return`#${o}${s}`;case`argb`:return`#${s}${o}`;default:return`#${o}`}};qL.prototype.name=function(){let e=tR(this._rgb,`rgb`);for(let t of Object.keys(XL))if(XL[t]===e)return t.toLowerCase();return e},KL.format.named=e=>{if(e=e.toLowerCase(),XL[e])return $L(XL[e]);throw Error(`unknown color name: `+e)},KL.autodetect.push({p:5,test:(e,...t)=>{if(!t.length&&NL(e)===`string`&&XL[e.toLowerCase()])return`named`}}),qL.prototype.alpha=function(e,t=!1){return e!==void 0&&NL(e)===`number`?t?(this._rgb[3]=e,this):new qL([this._rgb[0],this._rgb[1],this._rgb[2],e],`rgb`):this._rgb[3]},qL.prototype.clipped=function(){return this._rgb._clipped||!1};var nR={Kn:18,labWhitePoint:`d65`,Xn:.95047,Yn:1,Zn:1.08883,t0:.137931034,t1:.206896552,t2:.12841855,t3:.008856452,kE:216/24389,kKE:8,kK:24389/27,RefWhiteRGB:{X:.95047,Y:1,Z:1.08883},MtxRGB2XYZ:{m00:.4124564390896922,m01:.21267285140562253,m02:.0193338955823293,m10:.357576077643909,m11:.715152155287818,m12:.11919202588130297,m20:.18043748326639894,m21:.07217499330655958,m22:.9503040785363679},MtxXYZ2RGB:{m00:3.2404541621141045,m01:-.9692660305051868,m02:.055643430959114726,m10:-1.5371385127977166,m11:1.8760108454466942,m12:-.2040259135167538,m20:-.498531409556016,m21:.041556017530349834,m22:1.0572251882231791},As:.9414285350000001,Bs:1.040417467,Cs:1.089532651,MtxAdaptMa:{m00:.8951,m01:-.7502,m02:.0389,m10:.2664,m11:1.7135,m12:-.0685,m20:-.1614,m21:.0367,m22:1.0296},MtxAdaptMaI:{m00:.9869929054667123,m01:.43230526972339456,m02:-.008528664575177328,m10:-.14705425642099013,m11:.5183602715367776,m12:.04004282165408487,m20:.15996265166373125,m21:.0492912282128556,m22:.9684866957875502}},rR=new Map([[`a`,[1.0985,.35585]],[`b`,[1.0985,.35585]],[`c`,[.98074,1.18232]],[`d50`,[.96422,.82521]],[`d55`,[.95682,.92149]],[`d65`,[.95047,1.08883]],[`e`,[1,1,1]],[`f2`,[.99186,.67393]],[`f7`,[.95041,1.08747]],[`f11`,[1.00962,.6435]],[`icc`,[.96422,.82521]]]);function iR(e){let t=rR.get(String(e).toLowerCase());if(!t)throw Error(`unknown Lab illuminant `+e);nR.labWhitePoint=e,nR.Xn=t[0],nR.Zn=t[1]}function aR(){return nR.labWhitePoint}var oR=(...e)=>{e=PL(e,`lab`);let[t,n,r]=e,[i,a,o]=sR(t,n,r),[s,c,l]=lR(i,a,o);return[s,c,l,e.length>3?e[3]:1]},sR=(e,t,n)=>{let{kE:r,kK:i,kKE:a,Xn:o,Yn:s,Zn:c}=nR,l=(e+16)/116,u=.002*t+l,d=l-.005*n,f=u*u*u,p=d*d*d,m=f>r?f:(116*u-16)/i,h=e>a?((e+16)/116)**3:e/i,g=p>r?p:(116*d-16)/i;return[m*o,h*s,g*c]},cR=e=>{let t=Math.sign(e);return e=Math.abs(e),(e<=.0031308?e*12.92:1.055*e**(1/2.4)-.055)*t},lR=(e,t,n)=>{let{MtxAdaptMa:r,MtxAdaptMaI:i,MtxXYZ2RGB:a,RefWhiteRGB:o,Xn:s,Yn:c,Zn:l}=nR,u=s*r.m00+c*r.m10+l*r.m20,d=s*r.m01+c*r.m11+l*r.m21,f=s*r.m02+c*r.m12+l*r.m22,p=o.X*r.m00+o.Y*r.m10+o.Z*r.m20,m=o.X*r.m01+o.Y*r.m11+o.Z*r.m21,h=o.X*r.m02+o.Y*r.m12+o.Z*r.m22,g=(e*r.m00+t*r.m10+n*r.m20)*(p/u),_=(e*r.m01+t*r.m11+n*r.m21)*(m/d),v=(e*r.m02+t*r.m12+n*r.m22)*(h/f),y=g*i.m00+_*i.m10+v*i.m20,b=g*i.m01+_*i.m11+v*i.m21,x=g*i.m02+_*i.m12+v*i.m22,S=cR(y*a.m00+b*a.m10+x*a.m20),C=cR(y*a.m01+b*a.m11+x*a.m21),w=cR(y*a.m02+b*a.m12+x*a.m22);return[S*255,C*255,w*255]},uR=(...e)=>{let[t,n,r,...i]=PL(e,`rgb`),[a,o,s]=pR(t,n,r),[c,l,u]=dR(a,o,s);return[c,l,u,...i.length>0&&i[0]<1?[i[0]]:[]]};function dR(e,t,n){let{Xn:r,Yn:i,Zn:a,kE:o,kK:s}=nR,c=e/r,l=t/i,u=n/a,d=c>o?c**(1/3):(s*c+16)/116,f=l>o?l**(1/3):(s*l+16)/116,p=u>o?u**(1/3):(s*u+16)/116;return[116*f-16,500*(d-f),200*(f-p)]}function fR(e){let t=Math.sign(e);return e=Math.abs(e),(e<=.04045?e/12.92:((e+.055)/1.055)**2.4)*t}var pR=(e,t,n)=>{e=fR(e/255),t=fR(t/255),n=fR(n/255);let{MtxRGB2XYZ:r,MtxAdaptMa:i,MtxAdaptMaI:a,Xn:o,Yn:s,Zn:c,As:l,Bs:u,Cs:d}=nR,f=e*r.m00+t*r.m10+n*r.m20,p=e*r.m01+t*r.m11+n*r.m21,m=e*r.m02+t*r.m12+n*r.m22,h=o*i.m00+s*i.m10+c*i.m20,g=o*i.m01+s*i.m11+c*i.m21,_=o*i.m02+s*i.m12+c*i.m22,v=f*i.m00+p*i.m10+m*i.m20,y=f*i.m01+p*i.m11+m*i.m21,b=f*i.m02+p*i.m12+m*i.m22;return v*=h/l,y*=g/u,b*=_/d,f=v*a.m00+y*a.m10+b*a.m20,p=v*a.m01+y*a.m11+b*a.m21,m=v*a.m02+y*a.m12+b*a.m22,[f,p,m]};qL.prototype.lab=function(){return uR(this._rgb)},Object.assign(YL,{lab:(...e)=>new qL(...e,`lab`),getLabWhitePoint:aR,setLabWhitePoint:iR}),KL.format.lab=oR,KL.autodetect.push({p:2,test:(...e)=>{if(e=PL(e,`lab`),NL(e)===`array`&&e.length===3)return`lab`}}),qL.prototype.darken=function(e=1){let t=this,n=t.lab();return n[0]-=nR.Kn*e,new qL(n,`lab`).alpha(t.alpha(),!0)},qL.prototype.brighten=function(e=1){return this.darken(-e)},qL.prototype.darker=qL.prototype.darken,qL.prototype.brighter=qL.prototype.brighten,qL.prototype.get=function(e){let[t,n]=e.split(`.`),r=this[t]();if(n){let e=t.indexOf(n)-(t.substr(0,2)===`ok`?2:0);if(e>-1)return r[e];throw Error(`unknown channel ${n} in mode ${t}`)}return r};var{pow:mR}=Math,hR=1e-7,gR=20;qL.prototype.luminance=function(e,t=`rgb`){if(e!==void 0&&NL(e)===`number`){if(e===0)return new qL([0,0,0,this._rgb[3]],`rgb`);if(e===1)return new qL([255,255,255,this._rgb[3]],`rgb`);let n=this.luminance(),r=gR,i=(n,a)=>{let o=n.interpolate(a,.5,t),s=o.luminance();return Math.abs(e-s)<hR||!r--?o:s>e?i(n,o):i(o,a)};return new qL([...(n>e?i(new qL([0,0,0]),this):i(this,new qL([255,255,255]))).rgb(),this._rgb[3]])}return _R(...this._rgb.slice(0,3))};var _R=(e,t,n)=>(e=vR(e),t=vR(t),n=vR(n),.2126*e+.7152*t+.0722*n),vR=e=>(e/=255,e<=.03928?e/12.92:mR((e+.055)/1.055,2.4)),yR={},bR=(e,t,n=.5,...r)=>{let i=r[0]||`lrgb`;if(!yR[i]&&!r.length&&(i=Object.keys(yR)[0]),!yR[i])throw Error(`interpolation mode ${i} is not defined`);return NL(e)!==`object`&&(e=new qL(e)),NL(t)!==`object`&&(t=new qL(t)),yR[i](e,t,n).alpha(e.alpha()+n*(t.alpha()-e.alpha()))};qL.prototype.mix=qL.prototype.interpolate=function(e,t=.5,...n){return bR(this,e,t,...n)},qL.prototype.premultiply=function(e=!1){let t=this._rgb,n=t[3];return e?(this._rgb=[t[0]*n,t[1]*n,t[2]*n,n],this):new qL([t[0]*n,t[1]*n,t[2]*n,n],`rgb`)};var{sin:xR,cos:SR}=Math,CR=(...e)=>{let[t,n,r]=PL(e,`lch`);return isNaN(r)&&(r=0),r*=UL,[t,SR(r)*n,xR(r)*n]},wR=(...e)=>{e=PL(e,`lch`);let[t,n,r]=e,[i,a,o]=CR(t,n,r),[s,c,l]=oR(i,a,o);return[s,c,l,e.length>3?e[3]:1]},TR=(...e)=>wR(...GL(PL(e,`hcl`))),{sqrt:ER,atan2:DR,round:OR}=Math,kR=(...e)=>{let[t,n,r]=PL(e,`lab`),i=ER(n*n+r*r),a=(DR(r,n)*WL+360)%360;return OR(i*1e4)===0&&(a=NaN),[t,i,a]},AR=(...e)=>{let[t,n,r,...i]=PL(e,`rgb`),[a,o,s]=uR(t,n,r),[c,l,u]=kR(a,o,s);return[c,l,u,...i.length>0&&i[0]<1?[i[0]]:[]]};qL.prototype.lch=function(){return AR(this._rgb)},qL.prototype.hcl=function(){return GL(AR(this._rgb))},Object.assign(YL,{lch:(...e)=>new qL(...e,`lch`),hcl:(...e)=>new qL(...e,`hcl`)}),KL.format.lch=wR,KL.format.hcl=TR,[`lch`,`hcl`].forEach(e=>KL.autodetect.push({p:2,test:(...t)=>{if(t=PL(t,e),NL(t)===`array`&&t.length===3)return e}})),qL.prototype.saturate=function(e=1){let t=this,n=t.lch();return n[1]+=nR.Kn*e,n[1]<0&&(n[1]=0),new qL(n,`lch`).alpha(t.alpha(),!0)},qL.prototype.desaturate=function(e=1){return this.saturate(-e)},qL.prototype.set=function(e,t,n=!1){let[r,i]=e.split(`.`),a=this[r]();if(i){let e=r.indexOf(i)-(r.substr(0,2)===`ok`?2:0);if(e>-1){if(NL(t)==`string`)switch(t.charAt(0)){case`+`:a[e]+=+t;break;case`-`:a[e]+=+t;break;case`*`:a[e]*=+t.substr(1);break;case`/`:a[e]/=+t.substr(1);break;default:a[e]=+t}else if(NL(t)===`number`)a[e]=t;else throw Error(`unsupported value for Color.set`);let i=new qL(a,r);return n?(this._rgb=i._rgb,this):i}throw Error(`unknown channel ${i} in mode ${r}`)}return a},qL.prototype.tint=function(e=.5,...t){return bR(this,`white`,e,...t)},qL.prototype.shade=function(e=.5,...t){return bR(this,`black`,e,...t)},yR.rgb=(e,t,n)=>{let r=e._rgb,i=t._rgb;return new qL(r[0]+n*(i[0]-r[0]),r[1]+n*(i[1]-r[1]),r[2]+n*(i[2]-r[2]),`rgb`)};var{sqrt:jR,pow:MR}=Math;yR.lrgb=(e,t,n)=>{let[r,i,a]=e._rgb,[o,s,c]=t._rgb;return new qL(jR(MR(r,2)*(1-n)+MR(o,2)*n),jR(MR(i,2)*(1-n)+MR(s,2)*n),jR(MR(a,2)*(1-n)+MR(c,2)*n),`rgb`)},yR.lab=(e,t,n)=>{let r=e.lab(),i=t.lab();return new qL(r[0]+n*(i[0]-r[0]),r[1]+n*(i[1]-r[1]),r[2]+n*(i[2]-r[2]),`lab`)};var NR=(e,t,n,r)=>{let i,a;r===`hsl`?(i=e.hsl(),a=t.hsl()):r===`hsv`?(i=e.hsv(),a=t.hsv()):r===`hcg`?(i=e.hcg(),a=t.hcg()):r===`hsi`?(i=e.hsi(),a=t.hsi()):r===`lch`||r===`hcl`?(r=`hcl`,i=e.hcl(),a=t.hcl()):r===`oklch`&&(i=e.oklch().reverse(),a=t.oklch().reverse());let o,s,c,l,u,d;(r.substr(0,1)===`h`||r===`oklch`)&&([o,c,u]=i,[s,l,d]=a);let f,p,m,h;return!isNaN(o)&&!isNaN(s)?(h=s>o&&s-o>180?s-(o+360):s<o&&o-s>180?s+360-o:s-o,p=o+n*h):isNaN(o)?isNaN(s)?p=NaN:(p=s,(u==1||u==0)&&r!=`hsv`&&(f=l)):(p=o,(d==1||d==0)&&r!=`hsv`&&(f=c)),f===void 0&&(f=c+n*(l-c)),m=u+n*(d-u),r===`oklch`?new qL([m,f,p],r):new qL([p,f,m],r)},PR=(e,t,n)=>NR(e,t,n,`lch`);yR.lch=PR,yR.hcl=PR;var FR=e=>{if(NL(e)==`number`&&e>=0&&e<=16777215)return[e>>16,e>>8&255,e&255,1];throw Error(`unknown num color: `+e)},IR=(...e)=>{let[t,n,r]=PL(e,`rgb`);return(t<<16)+(n<<8)+r};qL.prototype.num=function(){return IR(this._rgb)},Object.assign(YL,{num:(...e)=>new qL(...e,`num`)}),KL.format.num=FR,KL.autodetect.push({p:5,test:(...e)=>{if(e.length===1&&NL(e[0])===`number`&&e[0]>=0&&e[0]<=16777215)return`num`}}),yR.num=(e,t,n)=>{let r=e.num();return new qL(r+n*(t.num()-r),`num`)};var{floor:LR}=Math,RR=(...e)=>{e=PL(e,`hcg`);let[t,n,r]=e,i,a,o;r*=255;let s=n*255;if(n===0)i=a=o=r;else{t===360&&(t=0),t>360&&(t-=360),t<0&&(t+=360),t/=60;let e=LR(t),c=t-e,l=r*(1-n),u=l+s*(1-c),d=l+s*c,f=l+s;switch(e){case 0:[i,a,o]=[f,d,l];break;case 1:[i,a,o]=[u,f,l];break;case 2:[i,a,o]=[l,f,d];break;case 3:[i,a,o]=[l,u,f];break;case 4:[i,a,o]=[d,l,f];break;case 5:[i,a,o]=[f,l,u]}}return[i,a,o,e.length>3?e[3]:1]},zR=(...e)=>{let[t,n,r]=PL(e,`rgb`),i=LL(t,n,r),a=RL(t,n,r),o=a-i,s=o*100/255,c=i/(255-o)*100,l;return o===0?l=NaN:(t===a&&(l=(n-r)/o),n===a&&(l=2+(r-t)/o),r===a&&(l=4+(t-n)/o),l*=60,l<0&&(l+=360)),[l,s,c]};qL.prototype.hcg=function(){return zR(this._rgb)},YL.hcg=(...e)=>new qL(...e,`hcg`),KL.format.hcg=RR,KL.autodetect.push({p:1,test:(...e)=>{if(e=PL(e,`hcg`),NL(e)===`array`&&e.length===3)return`hcg`}}),yR.hcg=(e,t,n)=>NR(e,t,n,`hcg`);var{cos:BR}=Math,VR=(...e)=>{e=PL(e,`hsi`);let[t,n,r]=e,i,a,o;return isNaN(t)&&(t=0),isNaN(n)&&(n=0),t>360&&(t-=360),t<0&&(t+=360),t/=360,t<1/3?(o=(1-n)/3,i=(1+n*BR(VL*t)/BR(HL-VL*t))/3,a=1-(o+i)):t<2/3?(t-=1/3,i=(1-n)/3,a=(1+n*BR(VL*t)/BR(HL-VL*t))/3,o=1-(i+a)):(t-=2/3,a=(1-n)/3,o=(1+n*BR(VL*t)/BR(HL-VL*t))/3,i=1-(a+o)),i=AL(r*i*3),a=AL(r*a*3),o=AL(r*o*3),[i*255,a*255,o*255,e.length>3?e[3]:1]},{min:HR,sqrt:UR,acos:WR}=Math,GR=(...e)=>{let[t,n,r]=PL(e,`rgb`);t/=255,n/=255,r/=255;let i,a=HR(t,n,r),o=(t+n+r)/3,s=o>0?1-a/o:0;return s===0?i=NaN:(i=(t-n+(t-r))/2,i/=UR((t-n)*(t-n)+(t-r)*(n-r)),i=WR(i),r>n&&(i=VL-i),i/=VL),[i*360,s,o]};qL.prototype.hsi=function(){return GR(this._rgb)},YL.hsi=(...e)=>new qL(...e,`hsi`),KL.format.hsi=VR,KL.autodetect.push({p:2,test:(...e)=>{if(e=PL(e,`hsi`),NL(e)===`array`&&e.length===3)return`hsi`}}),yR.hsi=(e,t,n)=>NR(e,t,n,`hsi`);var KR=(...e)=>{e=PL(e,`hsl`);let[t,n,r]=e,i,a,o;if(n===0)i=a=o=r*255;else{let e=[0,0,0],s=[0,0,0],c=r<.5?r*(1+n):r+n-r*n,l=2*r-c,u=t/360;e[0]=u+1/3,e[1]=u,e[2]=u-1/3;for(let t=0;t<3;t++)e[t]<0&&(e[t]+=1),e[t]>1&&--e[t],6*e[t]<1?s[t]=l+(c-l)*6*e[t]:2*e[t]<1?s[t]=c:3*e[t]<2?s[t]=l+(c-l)*(2/3-e[t])*6:s[t]=l;[i,a,o]=[s[0]*255,s[1]*255,s[2]*255]}return e.length>3?[i,a,o,e[3]]:[i,a,o,1]},qR=(...e)=>{e=PL(e,`rgba`);let[t,n,r]=e;t/=255,n/=255,r/=255;let i=LL(t,n,r),a=RL(t,n,r),o=(a+i)/2,s,c;return a===i?(s=0,c=NaN):s=o<.5?(a-i)/(a+i):(a-i)/(2-a-i),t==a?c=(n-r)/(a-i):n==a?c=2+(r-t)/(a-i):r==a&&(c=4+(t-n)/(a-i)),c*=60,c<0&&(c+=360),e.length>3&&e[3]!==void 0?[c,s,o,e[3]]:[c,s,o]};qL.prototype.hsl=function(){return qR(this._rgb)},YL.hsl=(...e)=>new qL(...e,`hsl`),KL.format.hsl=KR,KL.autodetect.push({p:2,test:(...e)=>{if(e=PL(e,`hsl`),NL(e)===`array`&&e.length===3)return`hsl`}}),yR.hsl=(e,t,n)=>NR(e,t,n,`hsl`);var{floor:JR}=Math,YR=(...e)=>{e=PL(e,`hsv`);let[t,n,r]=e,i,a,o;if(r*=255,n===0)i=a=o=r;else{t===360&&(t=0),t>360&&(t-=360),t<0&&(t+=360),t/=60;let e=JR(t),s=t-e,c=r*(1-n),l=r*(1-n*s),u=r*(1-n*(1-s));switch(e){case 0:[i,a,o]=[r,u,c];break;case 1:[i,a,o]=[l,r,c];break;case 2:[i,a,o]=[c,r,u];break;case 3:[i,a,o]=[c,l,r];break;case 4:[i,a,o]=[u,c,r];break;case 5:[i,a,o]=[r,c,l]}}return[i,a,o,e.length>3?e[3]:1]},{min:XR,max:ZR}=Math,QR=(...e)=>{e=PL(e,`rgb`);let[t,n,r]=e,i=XR(t,n,r),a=ZR(t,n,r),o=a-i,s,c,l;return l=a/255,a===0?(s=NaN,c=0):(c=o/a,t===a&&(s=(n-r)/o),n===a&&(s=2+(r-t)/o),r===a&&(s=4+(t-n)/o),s*=60,s<0&&(s+=360)),[s,c,l]};qL.prototype.hsv=function(){return QR(this._rgb)},YL.hsv=(...e)=>new qL(...e,`hsv`),KL.format.hsv=YR,KL.autodetect.push({p:2,test:(...e)=>{if(e=PL(e,`hsv`),NL(e)===`array`&&e.length===3)return`hsv`}}),yR.hsv=(e,t,n)=>NR(e,t,n,`hsv`);function $R(e,t){let n=e.length;Array.isArray(e[0])||(e=[e]),Array.isArray(t[0])||(t=t.map(e=>[e]));let r=t[0].length,i=t[0].map((e,n)=>t.map(e=>e[n])),a=e.map(e=>i.map(t=>Array.isArray(e)?e.reduce((e,n,r)=>e+n*(t[r]||0),0):t.reduce((t,n)=>t+n*e,0)));return n===1&&(a=a[0]),r===1?a.map(e=>e[0]):a}var ez=(...e)=>{e=PL(e,`lab`);let[t,n,r,...i]=e,[a,o,s]=tz([t,n,r]),[c,l,u]=lR(a,o,s);return[c,l,u,...i.length>0&&i[0]<1?[i[0]]:[]]};function tz(e){return $R([[1.2268798758459243,-.5578149944602171,.2813910456659647],[-.0405757452148008,1.112286803280317,-.0717110580655164],[-.0763729366746601,-.4214933324022432,1.5869240198367816]],$R([[1,.3963377773761749,.2158037573099136],[1,-.1055613458156586,-.0638541728258133],[1,-.0894841775298119,-1.2914855480194092]],e).map(e=>e**3))}var nz=(...e)=>{let[t,n,r,...i]=PL(e,`rgb`);return[...rz(pR(t,n,r)),...i.length>0&&i[0]<1?[i[0]]:[]]};function rz(e){return $R([[.210454268309314,.7936177747023054,-.0040720430116193],[1.9779985324311684,-2.42859224204858,.450593709617411],[.0259040424655478,.7827717124575296,-.8086757549230774]],$R([[.819022437996703,.3619062600528904,-.1288737815209879],[.0329836539323885,.9292868615863434,.0361446663506424],[.0481771893596242,.2642395317527308,.6335478284694309]],e).map(e=>Math.cbrt(e)))}qL.prototype.oklab=function(){return nz(this._rgb)},Object.assign(YL,{oklab:(...e)=>new qL(...e,`oklab`)}),KL.format.oklab=ez,KL.autodetect.push({p:2,test:(...e)=>{if(e=PL(e,`oklab`),NL(e)===`array`&&e.length===3)return`oklab`}}),yR.oklab=(e,t,n)=>{let r=e.oklab(),i=t.oklab();return new qL(r[0]+n*(i[0]-r[0]),r[1]+n*(i[1]-r[1]),r[2]+n*(i[2]-r[2]),`oklab`)},yR.oklch=(e,t,n)=>NR(e,t,n,`oklch`);var{pow:iz,sqrt:az,PI:oz,cos:sz,sin:cz,atan2:lz}=Math,uz=(e,t=`lrgb`,n=null)=>{let r=e.length;n||=Array.from(Array(r)).map(()=>1);let i=r/n.reduce(function(e,t){return e+t});if(n.forEach((e,t)=>{n[t]*=i}),e=e.map(e=>new qL(e)),t===`lrgb`)return dz(e,n);let a=e.shift(),o=a.get(t),s=[],c=0,l=0;for(let e=0;e<o.length;e++)if(o[e]=(o[e]||0)*n[0],s.push(isNaN(o[e])?0:n[0]),t.charAt(e)===`h`&&!isNaN(o[e])){let t=o[e]/180*oz;c+=sz(t)*n[0],l+=cz(t)*n[0]}let u=a.alpha()*n[0];e.forEach((e,r)=>{let i=e.get(t);u+=e.alpha()*n[r+1];for(let e=0;e<o.length;e++)if(!isNaN(i[e])){if(s[e]+=n[r+1],t.charAt(e)===`h`){let t=i[e]/180*oz;c+=sz(t)*n[r+1],l+=cz(t)*n[r+1]}else o[e]+=i[e]*n[r+1]}});for(let e=0;e<o.length;e++)if(t.charAt(e)===`h`){let t=lz(l/s[e],c/s[e])/oz*180;for(;t<0;)t+=360;for(;t>=360;)t-=360;o[e]=t}else o[e]=o[e]/s[e];return u/=r,new qL(o,t).alpha(u>.99999?1:u,!0)},dz=(e,t)=>{let n=e.length,r=[0,0,0,0];for(let i=0;i<e.length;i++){let a=e[i],o=t[i]/n,s=a._rgb;r[0]+=iz(s[0],2)*o,r[1]+=iz(s[1],2)*o,r[2]+=iz(s[2],2)*o,r[3]+=s[3]*o}return r[0]=az(r[0]),r[1]=az(r[1]),r[2]=az(r[2]),r[3]>.9999999&&(r[3]=1),new qL(jL(r))},{pow:fz}=Math;function pz(e){let t=`rgb`,n=YL(`#ccc`),r=0,i=[0,1],a=[0,1],o=[],s=[0,0],c=!1,l=[],u=!1,d=0,f=1,p=!1,m={},h=!0,g=1,_=function(e){if(e||=[`#fff`,`#000`],e&&NL(e)===`string`&&YL.brewer&&YL.brewer[e.toLowerCase()]&&(e=YL.brewer[e.toLowerCase()]),NL(e)===`array`){e.length===1&&(e=[e[0],e[0]]),e=e.slice(0);for(let t=0;t<e.length;t++)e[t]=YL(e[t]);o.length=0;for(let t=0;t<e.length;t++)o.push(t/(e.length-1))}return S(),l=e},v=function(e){if(c!=null){let t=c.length-1,n=0;for(;n<t&&e>=c[n];)n++;return n-1}return 0},y=e=>e,b=e=>e,x=function(e,r){let i,a;if(r??=!1,isNaN(e)||e===null)return n;a=r?e:c&&c.length>2?v(e)/(c.length-2):f===d?1:(e-d)/(f-d),a=b(a),r||(a=y(a)),g!==1&&(a=fz(a,g)),a=s[0]+a*(1-s[0]-s[1]),a=AL(a,0,1);let u=Math.floor(a*1e4);if(h&&m[u])i=m[u];else{if(NL(l)===`array`)for(let e=0;e<o.length;e++){let n=o[e];if(a<=n){i=l[e];break}if(a>=n&&e===o.length-1){i=l[e];break}if(a>n&&a<o[e+1]){a=(a-n)/(o[e+1]-n),i=YL.interpolate(l[e],l[e+1],a,t);break}}else NL(l)===`function`&&(i=l(a));h&&(m[u]=i)}return i};var S=()=>m={};_(e);let C=function(e){let t=YL(x(e));return u&&t[u]?t[u]():t};return C.classes=function(e){if(e!=null){if(NL(e)===`array`)c=e,i=[e[0],e[e.length-1]];else{let t=YL.analyze(i);c=e===0?[t.min,t.max]:YL.limits(t,`e`,e)}return C}return c},C.domain=function(e){if(!arguments.length)return a;a=e.slice(0),d=e[0],f=e[e.length-1],o=[];let t=l.length;if(e.length===t&&d!==f)for(let t of Array.from(e))o.push((t-d)/(f-d));else{for(let e=0;e<t;e++)o.push(e/(t-1));if(e.length>2){let t=e.map((t,n)=>n/(e.length-1)),n=e.map(e=>(e-d)/(f-d));n.every((e,n)=>t[n]===e)||(b=e=>{if(e<=0||e>=1)return e;let r=0;for(;e>=n[r+1];)r++;let i=(e-n[r])/(n[r+1]-n[r]);return t[r]+i*(t[r+1]-t[r])})}}return i=[d,f],C},C.mode=function(e){return arguments.length?(t=e,S(),C):t},C.range=function(e,t){return _(e,t),C},C.out=function(e){return u=e,C},C.spread=function(e){return arguments.length?(r=e,C):r},C.correctLightness=function(e){return e??=!0,p=e,S(),y=p?function(e){let t=x(0,!0).lab()[0],n=x(1,!0).lab()[0],r=t>n,i=x(e,!0).lab()[0],a=t+(n-t)*e,o=i-a,s=0,c=1,l=20;for(;Math.abs(o)>.01&&l-->0;)(function(){return r&&(o*=-1),o<0?(s=e,e+=(c-e)*.5):(c=e,e+=(s-e)*.5),i=x(e,!0).lab()[0],o=i-a})();return e}:e=>e,C},C.padding=function(e){return e==null?s:(NL(e)===`number`&&(e=[e,e]),s=e,C)},C.colors=function(t,n){arguments.length<2&&(n=`hex`);let r=[];if(arguments.length===0)r=l.slice(0);else if(t===1)r=[C(.5)];else if(t>1){let e=i[0],n=i[1]-e;r=mz(0,t,!1).map(r=>C(e+r/(t-1)*n))}else{e=[];let t=[];if(c&&c.length>2)for(let e=1,n=c.length,r=1<=n;r?e<n:e>n;r?e++:e--)t.push((c[e-1]+c[e])*.5);else t=i;r=t.map(e=>C(e))}return YL[n]&&(r=r.map(e=>e[n]())),r},C.cache=function(e){return e==null?h:(h=e,C)},C.gamma=function(e){return e==null?g:(g=e,C)},C.nodata=function(e){return e==null?n:(n=YL(e),C)},C}function mz(e,t,n){let r=[],i=e<t,a=n?i?t+1:t-1:t;for(let t=e;i?t<a:t>a;i?t++:t--)r.push(t);return r}var hz=function(e){let t=[1,1];for(let n=1;n<e;n++){let e=[1];for(let n=1;n<=t.length;n++)e[n]=(t[n]||0)+t[n-1];t=e}return t},gz=function(e){let t,n,r,i;if(e=e.map(e=>new qL(e)),e.length===2)[n,r]=e.map(e=>e.lab()),t=function(e){return new qL([0,1,2].map(t=>n[t]+e*(r[t]-n[t])),`lab`)};else if(e.length===3)[n,r,i]=e.map(e=>e.lab()),t=function(e){return new qL([0,1,2].map(t=>(1-e)*(1-e)*n[t]+2*(1-e)*e*r[t]+e*e*i[t]),`lab`)};else if(e.length===4){let a;[n,r,i,a]=e.map(e=>e.lab()),t=function(e){return new qL([0,1,2].map(t=>(1-e)*(1-e)*(1-e)*n[t]+3*(1-e)*(1-e)*e*r[t]+3*(1-e)*e*e*i[t]+e*e*e*a[t]),`lab`)}}else if(e.length>=5){let n,r,i;n=e.map(e=>e.lab()),i=e.length-1,r=hz(i),t=function(e){let t=1-e;return new qL([0,1,2].map(a=>n.reduce((n,o,s)=>n+r[s]*t**(i-s)*e**s*o[a],0)),`lab`)}}else throw RangeError(`No point in running bezier with only one color.`);return t},_z=e=>{let t=gz(e);return t.scale=()=>pz(t),t},{round:vz}=Math;qL.prototype.rgb=function(e=!0){return e===!1?this._rgb.slice(0,3):this._rgb.slice(0,3).map(vz)},qL.prototype.rgba=function(e=!0){return this._rgb.slice(0,4).map((t,n)=>n<3?e===!1?t:vz(t):t)},Object.assign(YL,{rgb:(...e)=>new qL(...e,`rgb`)}),KL.format.rgb=(...e)=>{let t=PL(e,`rgba`);return t[3]===void 0&&(t[3]=1),t},KL.autodetect.push({p:3,test:(...e)=>{if(e=PL(e,`rgba`),NL(e)===`array`&&(e.length===3||e.length===4&&NL(e[3])==`number`&&e[3]>=0&&e[3]<=1))return`rgb`}});var yz=(e,t,n)=>{if(!yz[n])throw Error(`unknown blend mode `+n);return yz[n](e,t)},bz=e=>(t,n)=>{let r=YL(n).rgb(),i=YL(t).rgb();return YL.rgb(e(r,i))},xz=e=>(t,n)=>{let r=[];return r[0]=e(t[0],n[0]),r[1]=e(t[1],n[1]),r[2]=e(t[2],n[2]),r};yz.normal=bz(xz(e=>e)),yz.multiply=bz(xz((e,t)=>e*t/255)),yz.screen=bz(xz((e,t)=>255*(1-(1-e/255)*(1-t/255)))),yz.overlay=bz(xz((e,t)=>t<128?2*e*t/255:255*(1-2*(1-e/255)*(1-t/255)))),yz.darken=bz(xz((e,t)=>e>t?t:e)),yz.lighten=bz(xz((e,t)=>e>t?e:t)),yz.dodge=bz(xz((e,t)=>e===255?255:(e=t/255*255/(1-e/255),e>255?255:e))),yz.burn=bz(xz((e,t)=>255*(1-(1-t/255)/(e/255))));var{pow:Sz,sin:Cz,cos:wz}=Math;function Tz(e=300,t=-1.5,n=1,r=1,i=[0,1]){let a=0,o;NL(i)===`array`?o=i[1]-i[0]:(o=0,i=[i,i]);let s=function(s){let c=VL*((e+120)/360+t*s),l=Sz(i[0]+o*s,r),u=(a===0?n:n[0]+s*a)*l*(1-l)/2,d=wz(c),f=Cz(c),p=l+u*(-.14861*d+1.78277*f),m=l+u*(-.29227*d-.90649*f),h=l+1.97294*d*u;return YL(jL([p*255,m*255,h*255,1]))};return s.start=function(t){return t==null?e:(e=t,s)},s.rotations=function(e){return e==null?t:(t=e,s)},s.gamma=function(e){return e==null?r:(r=e,s)},s.hue=function(e){return e==null?n:(n=e,NL(n)===`array`?(a=n[1]-n[0],a===0&&(n=n[1])):a=0,s)},s.lightness=function(e){return e==null?i:(NL(e)===`array`?(i=e,o=e[1]-e[0]):(i=[e,e],o=0),s)},s.scale=()=>YL.scale(s),s.hue(n),s}var Ez=`0123456789abcdef`,{floor:Dz,random:Oz}=Math,kz=(e=Oz)=>{let t=`#`;for(let n=0;n<6;n++)t+=Ez.charAt(Dz(e()*16));return new qL(t,`hex`)},{log:Az,pow:jz,floor:Mz,abs:Nz}=Math;function Pz(e,t=null){let n={min:Number.MAX_VALUE,max:Number.MAX_VALUE*-1,sum:0,values:[],count:0};return NL(e)===`object`&&(e=Object.values(e)),e.forEach(e=>{t&&NL(e)===`object`&&(e=e[t]),e!=null&&!isNaN(e)&&(n.values.push(e),n.sum+=e,e<n.min&&(n.min=e),e>n.max&&(n.max=e),n.count+=1)}),n.domain=[n.min,n.max],n.limits=(e,t)=>Fz(n,e,t),n}function Fz(e,t=`equal`,n=7){NL(e)==`array`&&(e=Pz(e));let{min:r,max:i}=e,a=e.values.sort((e,t)=>e-t);if(n===1)return[r,i];let o=[];if(t.substr(0,1)===`c`&&(o.push(r),o.push(i)),t.substr(0,1)===`e`){o.push(r);for(let e=1;e<n;e++)o.push(r+e/n*(i-r));o.push(i)}else if(t.substr(0,1)===`l`){if(r<=0)throw Error(`Logarithmic scales are only possible for values > 0`);let e=Math.LOG10E*Az(r),t=Math.LOG10E*Az(i);o.push(r);for(let r=1;r<n;r++)o.push(jz(10,e+r/n*(t-e)));o.push(i)}else if(t.substr(0,1)===`q`){o.push(r);for(let e=1;e<n;e++){let t=(a.length-1)*e/n,r=Mz(t);if(r===t)o.push(a[r]);else{let e=t-r;o.push(a[r]*(1-e)+a[r+1]*e)}}o.push(i)}else if(t.substr(0,1)===`k`){let e,t=a.length,s=Array(t),c=Array(n),l=!0,u=0,d=null;d=[],d.push(r);for(let e=1;e<n;e++)d.push(r+e/n*(i-r));for(d.push(i);l;){for(let e=0;e<n;e++)c[e]=0;for(let e=0;e<t;e++){let t=a[e],r=Number.MAX_VALUE,i;for(let a=0;a<n;a++){let n=Nz(d[a]-t);n<r&&(r=n,i=a),c[i]++,s[e]=i}}let r=Array(n);for(let e=0;e<n;e++)r[e]=null;for(let n=0;n<t;n++)e=s[n],r[e]===null?r[e]=a[n]:r[e]+=a[n];for(let e=0;e<n;e++)r[e]*=1/c[e];l=!1;for(let e=0;e<n;e++)if(r[e]!==d[e]){l=!0;break}d=r,u++,u>200&&(l=!1)}let f={};for(let e=0;e<n;e++)f[e]=[];for(let n=0;n<t;n++)e=s[n],f[e].push(a[n]);let p=[];for(let e=0;e<n;e++)p.push(f[e][0]),p.push(f[e][f[e].length-1]);p=p.sort((e,t)=>e-t),o.push(p[0]);for(let e=1;e<p.length;e+=2){let t=p[e];!isNaN(t)&&o.indexOf(t)===-1&&o.push(t)}}return o}var Iz=(e,t)=>{e=new qL(e),t=new qL(t);let n=e.luminance(),r=t.luminance();return n>r?(n+.05)/(r+.05):(r+.05)/(n+.05)},Lz=.027,Rz=5e-4,zz=.1,Bz=1.14,Vz=.022,Hz=1.414,Uz=(e,t)=>{e=new qL(e),t=new qL(t),e.alpha()<1&&(e=bR(t,e,e.alpha(),`rgb`));let n=Wz(...e.rgb()),r=Wz(...t.rgb()),i=n>=Vz?n:n+(Vz-n)**+Hz,a=r>=Vz?r:r+(Vz-r)**+Hz,o=a**.56-i**.57,s=a**.65-i**.62,c=Math.abs(a-i)<Rz?0:i<a?o*Bz:s*Bz;return(Math.abs(c)<zz?0:c>0?c-Lz:c+Lz)*100};function Wz(e,t,n){return .2126729*(e/255)**2.4+.7151522*(t/255)**2.4+.072175*(n/255)**2.4}var{sqrt:Gz,pow:Kz,min:qz,max:Jz,atan2:Yz,abs:Xz,cos:Zz,sin:Qz,exp:$z,PI:eB}=Math;function tB(e,t,n=1,r=1,i=1){var a=function(e){return 360*e/(2*eB)},o=function(e){return 2*eB*e/360};e=new qL(e),t=new qL(t);let[s,c,l]=Array.from(e.lab()),[u,d,f]=Array.from(t.lab()),p=(s+u)/2,m=(Gz(Kz(c,2)+Kz(l,2))+Gz(Kz(d,2)+Kz(f,2)))/2,h=.5*(1-Gz(Kz(m,7)/(Kz(m,7)+Kz(25,7)))),g=c*(1+h),_=d*(1+h),v=Gz(Kz(g,2)+Kz(l,2)),y=Gz(Kz(_,2)+Kz(f,2)),b=(v+y)/2,x=a(Yz(l,g)),S=a(Yz(f,_)),C=x>=0?x:x+360,w=S>=0?S:S+360,T=Xz(C-w)>180?(C+w+360)/2:(C+w)/2,E=1-.17*Zz(o(T-30))+.24*Zz(o(2*T))+.32*Zz(o(3*T+6))-.2*Zz(o(4*T-63)),D=w-C;D=Xz(D)<=180?D:w<=C?D+360:D-360,D=2*Gz(v*y)*Qz(o(D)/2);let O=u-s,k=y-v,A=1+.015*Kz(p-50,2)/Gz(20+Kz(p-50,2)),j=1+.045*b,M=1+.015*b*E,N=30*$z(-Kz((T-275)/25,2)),P=-(2*Gz(Kz(b,7)/(Kz(b,7)+Kz(25,7))))*Qz(2*o(N));return Jz(0,qz(100,Gz(Kz(O/(n*A),2)+Kz(k/(r*j),2)+Kz(D/(i*M),2)+P*(k/(r*j))*(D/(i*M)))))}function nB(e,t,n=`lab`){e=new qL(e),t=new qL(t);let r=e.get(n),i=t.get(n),a=0;for(let e in r){let t=(r[e]||0)-(i[e]||0);a+=t*t}return Math.sqrt(a)}var rB=(...e)=>{try{return new qL(...e),!0}catch{return!1}},iB={cool(){return pz([YL.hsl(180,1,.9),YL.hsl(250,.7,.4)])},hot(){return pz([`#000`,`#f00`,`#ff0`,`#fff`],[0,.25,.75,1]).mode(`rgb`)}},aB={OrRd:[`#fff7ec`,`#fee8c8`,`#fdd49e`,`#fdbb84`,`#fc8d59`,`#ef6548`,`#d7301f`,`#b30000`,`#7f0000`],PuBu:[`#fff7fb`,`#ece7f2`,`#d0d1e6`,`#a6bddb`,`#74a9cf`,`#3690c0`,`#0570b0`,`#045a8d`,`#023858`],BuPu:[`#f7fcfd`,`#e0ecf4`,`#bfd3e6`,`#9ebcda`,`#8c96c6`,`#8c6bb1`,`#88419d`,`#810f7c`,`#4d004b`],Oranges:[`#fff5eb`,`#fee6ce`,`#fdd0a2`,`#fdae6b`,`#fd8d3c`,`#f16913`,`#d94801`,`#a63603`,`#7f2704`],BuGn:[`#f7fcfd`,`#e5f5f9`,`#ccece6`,`#99d8c9`,`#66c2a4`,`#41ae76`,`#238b45`,`#006d2c`,`#00441b`],YlOrBr:[`#ffffe5`,`#fff7bc`,`#fee391`,`#fec44f`,`#fe9929`,`#ec7014`,`#cc4c02`,`#993404`,`#662506`],YlGn:[`#ffffe5`,`#f7fcb9`,`#d9f0a3`,`#addd8e`,`#78c679`,`#41ab5d`,`#238443`,`#006837`,`#004529`],Reds:[`#fff5f0`,`#fee0d2`,`#fcbba1`,`#fc9272`,`#fb6a4a`,`#ef3b2c`,`#cb181d`,`#a50f15`,`#67000d`],RdPu:[`#fff7f3`,`#fde0dd`,`#fcc5c0`,`#fa9fb5`,`#f768a1`,`#dd3497`,`#ae017e`,`#7a0177`,`#49006a`],Greens:[`#f7fcf5`,`#e5f5e0`,`#c7e9c0`,`#a1d99b`,`#74c476`,`#41ab5d`,`#238b45`,`#006d2c`,`#00441b`],YlGnBu:[`#ffffd9`,`#edf8b1`,`#c7e9b4`,`#7fcdbb`,`#41b6c4`,`#1d91c0`,`#225ea8`,`#253494`,`#081d58`],Purples:[`#fcfbfd`,`#efedf5`,`#dadaeb`,`#bcbddc`,`#9e9ac8`,`#807dba`,`#6a51a3`,`#54278f`,`#3f007d`],GnBu:[`#f7fcf0`,`#e0f3db`,`#ccebc5`,`#a8ddb5`,`#7bccc4`,`#4eb3d3`,`#2b8cbe`,`#0868ac`,`#084081`],Greys:[`#ffffff`,`#f0f0f0`,`#d9d9d9`,`#bdbdbd`,`#969696`,`#737373`,`#525252`,`#252525`,`#000000`],YlOrRd:[`#ffffcc`,`#ffeda0`,`#fed976`,`#feb24c`,`#fd8d3c`,`#fc4e2a`,`#e31a1c`,`#bd0026`,`#800026`],PuRd:[`#f7f4f9`,`#e7e1ef`,`#d4b9da`,`#c994c7`,`#df65b0`,`#e7298a`,`#ce1256`,`#980043`,`#67001f`],Blues:[`#f7fbff`,`#deebf7`,`#c6dbef`,`#9ecae1`,`#6baed6`,`#4292c6`,`#2171b5`,`#08519c`,`#08306b`],PuBuGn:[`#fff7fb`,`#ece2f0`,`#d0d1e6`,`#a6bddb`,`#67a9cf`,`#3690c0`,`#02818a`,`#016c59`,`#014636`],Viridis:[`#440154`,`#482777`,`#3f4a8a`,`#31678e`,`#26838f`,`#1f9d8a`,`#6cce5a`,`#b6de2b`,`#fee825`],Spectral:[`#9e0142`,`#d53e4f`,`#f46d43`,`#fdae61`,`#fee08b`,`#ffffbf`,`#e6f598`,`#abdda4`,`#66c2a5`,`#3288bd`,`#5e4fa2`],RdYlGn:[`#a50026`,`#d73027`,`#f46d43`,`#fdae61`,`#fee08b`,`#ffffbf`,`#d9ef8b`,`#a6d96a`,`#66bd63`,`#1a9850`,`#006837`],RdBu:[`#67001f`,`#b2182b`,`#d6604d`,`#f4a582`,`#fddbc7`,`#f7f7f7`,`#d1e5f0`,`#92c5de`,`#4393c3`,`#2166ac`,`#053061`],PiYG:[`#8e0152`,`#c51b7d`,`#de77ae`,`#f1b6da`,`#fde0ef`,`#f7f7f7`,`#e6f5d0`,`#b8e186`,`#7fbc41`,`#4d9221`,`#276419`],PRGn:[`#40004b`,`#762a83`,`#9970ab`,`#c2a5cf`,`#e7d4e8`,`#f7f7f7`,`#d9f0d3`,`#a6dba0`,`#5aae61`,`#1b7837`,`#00441b`],RdYlBu:[`#a50026`,`#d73027`,`#f46d43`,`#fdae61`,`#fee090`,`#ffffbf`,`#e0f3f8`,`#abd9e9`,`#74add1`,`#4575b4`,`#313695`],BrBG:[`#543005`,`#8c510a`,`#bf812d`,`#dfc27d`,`#f6e8c3`,`#f5f5f5`,`#c7eae5`,`#80cdc1`,`#35978f`,`#01665e`,`#003c30`],RdGy:[`#67001f`,`#b2182b`,`#d6604d`,`#f4a582`,`#fddbc7`,`#ffffff`,`#e0e0e0`,`#bababa`,`#878787`,`#4d4d4d`,`#1a1a1a`],PuOr:[`#7f3b08`,`#b35806`,`#e08214`,`#fdb863`,`#fee0b6`,`#f7f7f7`,`#d8daeb`,`#b2abd2`,`#8073ac`,`#542788`,`#2d004b`],Set2:[`#66c2a5`,`#fc8d62`,`#8da0cb`,`#e78ac3`,`#a6d854`,`#ffd92f`,`#e5c494`,`#b3b3b3`],Accent:[`#7fc97f`,`#beaed4`,`#fdc086`,`#ffff99`,`#386cb0`,`#f0027f`,`#bf5b17`,`#666666`],Set1:[`#e41a1c`,`#377eb8`,`#4daf4a`,`#984ea3`,`#ff7f00`,`#ffff33`,`#a65628`,`#f781bf`,`#999999`],Set3:[`#8dd3c7`,`#ffffb3`,`#bebada`,`#fb8072`,`#80b1d3`,`#fdb462`,`#b3de69`,`#fccde5`,`#d9d9d9`,`#bc80bd`,`#ccebc5`,`#ffed6f`],Dark2:[`#1b9e77`,`#d95f02`,`#7570b3`,`#e7298a`,`#66a61e`,`#e6ab02`,`#a6761d`,`#666666`],Paired:[`#a6cee3`,`#1f78b4`,`#b2df8a`,`#33a02c`,`#fb9a99`,`#e31a1c`,`#fdbf6f`,`#ff7f00`,`#cab2d6`,`#6a3d9a`,`#ffff99`,`#b15928`],Pastel2:[`#b3e2cd`,`#fdcdac`,`#cbd5e8`,`#f4cae4`,`#e6f5c9`,`#fff2ae`,`#f1e2cc`,`#cccccc`],Pastel1:[`#fbb4ae`,`#b3cde3`,`#ccebc5`,`#decbe4`,`#fed9a6`,`#ffffcc`,`#e5d8bd`,`#fddaec`,`#f2f2f2`]},oB=Object.keys(aB),sB=new Map(oB.map(e=>[e.toLowerCase(),e])),cB=typeof Proxy==`function`?new Proxy(aB,{get(e,t){let n=t.toLowerCase();if(sB.has(n))return e[sB.get(n)]},getOwnPropertyNames(){return Object.getOwnPropertyNames(oB)}}):aB,lB=(...e)=>{e=PL(e,`cmyk`);let[t,n,r,i]=e,a=e.length>4?e[4]:1;return i===1?[0,0,0,a]:[t>=1?0:255*(1-t)*(1-i),n>=1?0:255*(1-n)*(1-i),r>=1?0:255*(1-r)*(1-i),a]},{max:uB}=Math,dB=(...e)=>{let[t,n,r]=PL(e,`rgb`);t/=255,n/=255,r/=255;let i=1-uB(t,uB(n,r)),a=i<1?1/(1-i):0;return[(1-t-i)*a,(1-n-i)*a,(1-r-i)*a,i]};qL.prototype.cmyk=function(){return dB(this._rgb)},Object.assign(YL,{cmyk:(...e)=>new qL(...e,`cmyk`)}),KL.format.cmyk=lB,KL.autodetect.push({p:2,test:(...e)=>{if(e=PL(e,`cmyk`),NL(e)===`array`&&e.length===4)return`cmyk`}});var fB=(...e)=>{let t=PL(e,`hsla`),n=FL(e)||`lsa`;return t[0]=zL(t[0]||0)+`deg`,t[1]=zL(t[1]*100)+`%`,t[2]=zL(t[2]*100)+`%`,n===`hsla`||t.length>3&&t[3]<1?(t[3]=`/ `+(t.length>3?t[3]:1),n=`hsla`):t.length=3,`${n.substr(0,3)}(${t.join(` `)})`},pB=(...e)=>{let t=PL(e,`lab`),n=FL(e)||`lab`;return t[0]=zL(t[0])+`%`,t[1]=zL(t[1]),t[2]=zL(t[2]),n===`laba`||t.length>3&&t[3]<1?t[3]=`/ `+(t.length>3?t[3]:1):t.length=3,`lab(${t.join(` `)})`},mB=(...e)=>{let t=PL(e,`lch`),n=FL(e)||`lab`;return t[0]=zL(t[0])+`%`,t[1]=zL(t[1]),t[2]=isNaN(t[2])?`none`:zL(t[2])+`deg`,n===`lcha`||t.length>3&&t[3]<1?t[3]=`/ `+(t.length>3?t[3]:1):t.length=3,`lch(${t.join(` `)})`},hB=(...e)=>{let t=PL(e,`lab`);return t[0]=zL(t[0]*100)+`%`,t[1]=BL(t[1]),t[2]=BL(t[2]),t.length>3&&t[3]<1?t[3]=`/ `+(t.length>3?t[3]:1):t.length=3,`oklab(${t.join(` `)})`},gB=(...e)=>{let[t,n,r,...i]=PL(e,`rgb`),[a,o,s]=nz(t,n,r),[c,l,u]=kR(a,o,s);return[c,l,u,...i.length>0&&i[0]<1?[i[0]]:[]]},_B=(...e)=>{let t=PL(e,`lch`);return t[0]=zL(t[0]*100)+`%`,t[1]=BL(t[1]),t[2]=isNaN(t[2])?`none`:zL(t[2])+`deg`,t.length>3&&t[3]<1?t[3]=`/ `+(t.length>3?t[3]:1):t.length=3,`oklch(${t.join(` `)})`},{round:vB}=Math,yB=(...e)=>{let t=PL(e,`rgba`),n=FL(e)||`rgb`;if(n.substr(0,3)===`hsl`)return fB(qR(t),n);if(n.substr(0,3)===`lab`){let e=aR();iR(`d50`);let r=pB(uR(t),n);return iR(e),r}if(n.substr(0,3)===`lch`){let e=aR();iR(`d50`);let r=mB(AR(t),n);return iR(e),r}return n.substr(0,5)===`oklab`?hB(nz(t)):n.substr(0,5)===`oklch`?_B(gB(t)):(t[0]=vB(t[0]),t[1]=vB(t[1]),t[2]=vB(t[2]),(n===`rgba`||t.length>3&&t[3]<1)&&(t[3]=`/ `+(t.length>3?t[3]:1),n=`rgba`),`${n.substr(0,3)}(${t.slice(0,n===`rgb`?3:4).join(` `)})`)},bB=(...e)=>{e=PL(e,`lch`);let[t,n,r,...i]=e,[a,o,s]=CR(t,n,r),[c,l,u]=ez(a,o,s);return[c,l,u,...i.length>0&&i[0]<1?[i[0]]:[]]},xB=`((?:-?\\d+)|(?:-?\\d+(?:\\.\\d+)?)%|none)`,SB=`((?:-?(?:\\d+(?:\\.\\d*)?|\\.\\d+)%?)|none)`,CB=`((?:-?(?:\\d+(?:\\.\\d*)?|\\.\\d+)%)|none)`,wB=`\\s*`,TB=`\\s+`,EB=`\\s*,\\s*`,DB=`((?:-?(?:\\d+(?:\\.\\d*)?|\\.\\d+)(?:deg)?)|none)`,OB=`\\s*(?:\\/\\s*((?:[01]|[01]?\\.\\d+)|\\d+(?:\\.\\d+)?%))?`,kB=RegExp(`^rgba?\\(`+wB+[xB,xB,xB].join(TB)+OB+`\\)$`),AB=RegExp(`^rgb\\(`+wB+[xB,xB,xB].join(EB)+wB+`\\)$`),jB=RegExp(`^rgba\\(`+wB+[xB,xB,xB,SB].join(EB)+wB+`\\)$`),MB=RegExp(`^hsla?\\(`+wB+[DB,CB,CB].join(TB)+OB+`\\)$`),NB=RegExp(`^hsl?\\(`+wB+[DB,CB,CB].join(EB)+wB+`\\)$`),PB=/^hsla\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,FB=RegExp(`^lab\\(`+wB+[SB,SB,SB].join(TB)+OB+`\\)$`),IB=RegExp(`^lch\\(`+wB+[SB,SB,DB].join(TB)+OB+`\\)$`),LB=RegExp(`^oklab\\(`+wB+[SB,SB,SB].join(TB)+OB+`\\)$`),RB=RegExp(`^oklch\\(`+wB+[SB,SB,DB].join(TB)+OB+`\\)$`),{round:zB}=Math,BB=e=>e.map((e,t)=>t<=2?AL(zB(e),0,255):e),VB=(e,t=0,n=100,r=!1)=>(typeof e==`string`&&e.endsWith(`%`)&&(e=parseFloat(e.substring(0,e.length-1))/100,e=r?t+(e+1)*.5*(n-t):t+e*(n-t)),+e),HB=(e,t)=>e===`none`?t:e,UB=e=>{if(e=e.toLowerCase().trim(),e===`transparent`)return[0,0,0,0];let t;if(KL.format.named)try{return KL.format.named(e)}catch{}if((t=e.match(kB))||(t=e.match(AB))){let e=t.slice(1,4);for(let t=0;t<3;t++)e[t]=+VB(HB(e[t],0),0,255);e=BB(e);let n=t[4]===void 0?1:+VB(t[4],0,1);return e[3]=n,e}if(t=e.match(jB)){let e=t.slice(1,5);for(let t=0;t<4;t++)e[t]=+VB(e[t],0,255);return e}if((t=e.match(MB))||(t=e.match(NB))){let e=t.slice(1,4);e[0]=+HB(e[0].replace(`deg`,``),0),e[1]=VB(HB(e[1],0),0,100)*.01,e[2]=VB(HB(e[2],0),0,100)*.01;let n=BB(KR(e));return n[3]=t[4]===void 0?1:+VB(t[4],0,1),n}if(t=e.match(PB)){let e=t.slice(1,4);e[1]*=.01,e[2]*=.01;let n=KR(e);for(let e=0;e<3;e++)n[e]=zB(n[e]);return n[3]=+t[4],n}if(t=e.match(FB)){let e=t.slice(1,4);e[0]=VB(HB(e[0],0),0,100),e[1]=VB(HB(e[1],0),-125,125,!0),e[2]=VB(HB(e[2],0),-125,125,!0);let n=aR();iR(`d50`);let r=BB(oR(e));return iR(n),r[3]=t[4]===void 0?1:+VB(t[4],0,1),r}if(t=e.match(IB)){let e=t.slice(1,4);e[0]=VB(e[0],0,100),e[1]=VB(HB(e[1],0),0,150,!1),e[2]=+HB(e[2].replace(`deg`,``),0);let n=aR();iR(`d50`);let r=BB(wR(e));return iR(n),r[3]=t[4]===void 0?1:+VB(t[4],0,1),r}if(t=e.match(LB)){let e=t.slice(1,4);e[0]=VB(HB(e[0],0),0,1),e[1]=VB(HB(e[1],0),-.4,.4,!0),e[2]=VB(HB(e[2],0),-.4,.4,!0);let n=BB(ez(e));return n[3]=t[4]===void 0?1:+VB(t[4],0,1),n}if(t=e.match(RB)){let e=t.slice(1,4);e[0]=VB(HB(e[0],0),0,1),e[1]=VB(HB(e[1],0),0,.4,!1),e[2]=+HB(e[2].replace(`deg`,``),0);let n=BB(bB(e));return n[3]=t[4]===void 0?1:+VB(t[4],0,1),n}};UB.test=e=>kB.test(e)||MB.test(e)||FB.test(e)||IB.test(e)||LB.test(e)||RB.test(e)||AB.test(e)||jB.test(e)||NB.test(e)||PB.test(e)||e===`transparent`,qL.prototype.css=function(e){return yB(this._rgb,e)},YL.css=(...e)=>new qL(...e,`css`),KL.format.css=UB,KL.autodetect.push({p:5,test:(e,...t)=>{if(!t.length&&NL(e)===`string`&&UB.test(e))return`css`}}),KL.format.gl=(...e)=>{let t=PL(e,`rgba`);return t[0]*=255,t[1]*=255,t[2]*=255,t},YL.gl=(...e)=>new qL(...e,`gl`),qL.prototype.gl=function(){let e=this._rgb;return[e[0]/255,e[1]/255,e[2]/255,e[3]]},qL.prototype.hex=function(e){return tR(this._rgb,e)},YL.hex=(...e)=>new qL(...e,`hex`),KL.format.hex=$L,KL.autodetect.push({p:4,test:(e,...t)=>{if(!t.length&&NL(e)===`string`&&[3,4,5,6,7,8,9].indexOf(e.length)>=0)return`hex`}});var{log:WB}=Math,GB=e=>{let t=e/100,n,r,i;return t<66?(n=255,r=t<6?0:-155.25485562709179-.44596950469579133*(r=t-2)+104.49216199393888*WB(r),i=t<20?0:-254.76935184120902+.8274096064007395*(i=t-10)+115.67994401066147*WB(i)):(n=351.97690566805693+.114206453784165*(n=t-55)-40.25366309332127*WB(n),r=325.4494125711974+.07943456536662342*(r=t-50)-28.0852963507957*WB(r),i=255),[n,r,i,1]},{round:KB}=Math,qB=(...e)=>{let t=PL(e,`rgb`),n=t[0],r=t[2],i=1e3,a=4e4,o;for(;a-i>.4;){o=(a+i)*.5;let e=GB(o);e[2]/e[0]>=r/n?a=o:i=o}return KB(o)};qL.prototype.temp=qL.prototype.kelvin=qL.prototype.temperature=function(){return qB(this._rgb)};var JB=(...e)=>new qL(...e,`temp`);Object.assign(YL,{temp:JB,kelvin:JB,temperature:JB}),KL.format.temp=KL.format.kelvin=KL.format.temperature=GB,qL.prototype.oklch=function(){return gB(this._rgb)},Object.assign(YL,{oklch:(...e)=>new qL(...e,`oklch`)}),KL.format.oklch=bB,KL.autodetect.push({p:2,test:(...e)=>{if(e=PL(e,`oklch`),NL(e)===`array`&&e.length===3)return`oklch`}}),Object.assign(YL,{analyze:Pz,average:uz,bezier:_z,blend:yz,brewer:cB,Color:qL,colors:XL,contrast:Iz,contrastAPCA:Uz,cubehelix:Tz,deltaE:tB,distance:nB,input:KL,interpolate:bR,limits:Fz,mix:bR,random:kz,scale:pz,scales:iB,valid:rB});var YB=YL,XB=nr(`flex flex-col space-y-sm`,{variants:{variant:{elevated:`rounded-xl bg-surface p-md shadow-2xs`,outline:`rounded-xl border border-border p-md`,ghost:``}},defaultVariants:{variant:`elevated`}}),ZB=nr(`overflow-hidden border border-border hover:cursor-pointer focus:outline-2 focus:outline-offset-2`,{variants:{size:{small:`size-sm rounded-md`,medium:`size-md rounded-lg`,large:`size-lg rounded-xl`}},defaultVariants:{size:`medium`}}),QB=[{label:`RGB`,value:`rgb`,getValue:e=>e.rgb(),parseValue:e=>{let t=e.split(`,`).map(e=>parseInt(e.trim(),10));if(t.length===3&&t.every(e=>!isNaN(e)))return YB.rgb(t[0],t[1],t[2])}},{label:`CSS`,value:`css`,getValue:e=>e.css(),parseValue:e=>{try{return YB(e)}catch{return}}},{label:`HEX`,value:`hex`,getValue:e=>e.hex(`rgb`),parseValue:e=>{try{return YB(e)}catch{return}}},{label:`HSL`,value:`hsl`,getValue:e=>e.hsl(),parseValue:e=>{try{return YB(e)}catch{return}}},{label:`HSV`,value:`hsv`,getValue:e=>e.hsv(),parseValue:e=>{try{return YB(e)}catch{return}}}],$B=_.createContext(null),eV=(e,t)=>{try{return YB(typeof e==`string`?e.trim():e)}catch{return t}},tV=(e,t)=>{switch(t.type){case`set_color`:{let[n,r,i]=t.color.hsv();return{...e,hue:n==null||Number.isNaN(n)?e.hue:n,saturation:i===0||r==null||Number.isNaN(r)?e.saturation:r,value:i,alpha:t.color.alpha()}}case`set_hue`:return{...e,hue:t.hue};case`set_saturation`:return{...e,saturation:t.saturation};case`set_value`:return{...e,value:t.value};case`set_saturation_value`:return{...e,saturation:t.saturation,value:t.value};case`set_alpha`:return{...e,alpha:t.alpha};case`set_lightness`:return{...e,value:t.lightness};case`set_value_type`:return{...e,valueType:t.valueType};case`set_palette`:return{...e,palette:t.palette};case`add_palette_color`:return{...e,palette:[...e.palette,t.color]};default:return e}},nV=({variant:e,value:t,defaultColor:n,palette:r,defaultPalette:i,onPaletteChange:a,paletteLimit:o,defaultValueType:s,onValueChange:c,className:l,children:u,ref:d,...f})=>{let[p,m]=_.useReducer(tV,{controlledValue:t,defaultColor:n,defaultPalette:i},({controlledValue:e,defaultColor:t,defaultPalette:n})=>{let i=eV(e??t??`#ffffff`,YB(`#ffffff`)),[a,o,c]=i.hsv();return{hue:a==null||Number.isNaN(a)?0:a,saturation:o==null||Number.isNaN(o)?0:o,value:c,alpha:i.alpha(),valueType:QB.find(e=>e.value===s)??QB[0],palette:(r??n??[]).map(e=>YB(e))}}),{hue:h,saturation:g,value:v,alpha:y,valueType:b,palette:x}=p,S=_.useMemo(()=>YB.hsv(h,g,v).alpha(y),[h,g,v,y]),C=h,w=g,T=v,E=y,D=_.useRef(void 0);_.useEffect(()=>{if(t===void 0)return;let e=eV(t,S),n=e.hex(`rgba`);n!==D.current&&(D.current=n,n!==S.hex(`rgba`)&&m({type:`set_color`,color:e}))},[t,S]);let O=_.useRef(void 0);_.useEffect(()=>{if(r===void 0)return;let e=r.map(e=>YB(e)),t=e.map(e=>e.hex(`rgba`)).join(`|`);t!==O.current&&(O.current=t,m({type:`set_palette`,palette:e}))},[r]);let k=_.useCallback(e=>{m({type:`set_color`,color:e}),c?.(e.hex())},[c]),A=_.useCallback(e=>{m({type:`set_hue`,hue:e}),c?.(YB.hsv(e,w,T).alpha(E).hex())},[E,w,T,c]),j=_.useCallback(e=>{m({type:`set_saturation`,saturation:e}),c?.(YB.hsv(C,e,T).alpha(E).hex())},[E,C,T,c]),M=_.useCallback(e=>{m({type:`set_value`,value:e}),c?.(YB.hsv(C,w,e).alpha(E).hex())},[E,C,w,c]),N=_.useCallback((e,t)=>{m({type:`set_saturation_value`,saturation:e,value:t}),c?.(YB.hsv(C,e,t).alpha(E).hex())},[E,C,c]),P=_.useCallback(e=>k(S.alpha(e)),[S,k]),F=_.useCallback(e=>k(S.set(`hsl.l`,e)),[S,k]),I=_.useCallback(e=>m({type:`set_value_type`,valueType:e}),[]),R=_.useCallback(e=>{O.current=e.map(e=>e.hex(`rgba`)).join(`|`),m({type:`set_palette`,palette:e}),a?.(e.map(e=>e.hex()))},[a]),z=_.useCallback(e=>{if(o&&x.length>=o)return;let t=[...x,e];O.current=t.map(e=>e.hex(`rgba`)).join(`|`),m({type:`add_palette_color`,color:e}),a?.(t.map(e=>e.hex()))},[x,o,a]);return(0,L.jsx)($B.Provider,{value:{color:S,setColor:k,hue:C,saturation:w,value:T,alpha:E,setHue:A,setSaturation:j,setValue:M,setSaturationValue:N,setAlpha:P,setLightness:F,valueType:b,setValueType:I,palette:x,setPalette:R,addPaletteColor:z,paletteLimit:o},children:(0,L.jsx)(`div`,{className:Q(XB({variant:e}),l),ref:d,...f,children:u})})},rV=()=>{let e=_.useContext($B);if(!e)throw Error(`useColorPicker must be used within a ColorPicker`);return e},iV=({className:e,ref:t,...n})=>{let{color:r,hue:i,saturation:a,value:o,setSaturationValue:s}=rV(),c=YB.hsv(i,1,1).hex(),l=e=>{let t=e.currentTarget.getBoundingClientRect(),n=Math.min(Math.max((e.clientX-t.left)/t.width,0),1),r=Math.min(Math.max(1-(e.clientY-t.top)/t.height,0),1);s(n,r)},u=e=>{e.currentTarget.setPointerCapture(e.pointerId),l(e)};return(0,L.jsx)(`div`,{...n,ref:t,className:Q(`relative aspect-square grow touch-none rounded-lg active:cursor-grabbing`,e),style:{background:`
73
- linear-gradient(to top, black, transparent),
74
- linear-gradient(to right, white, ${c})
75
- `,...n.style},onPointerDown:u,onPointerMove:e=>{e.currentTarget.hasPointerCapture(e.pointerId)&&l(e)},children:(0,L.jsx)(`div`,{className:`pointer-events-none absolute size-md -translate-x-1/2 -translate-y-1/2 rounded-full border-3 border-white`,style:{left:`${a*100}%`,top:`${(1-o)*100}%`,backgroundColor:r.hex()}})})},aV=({className:e,children:t,ref:n,...r})=>(0,L.jsx)(`div`,{className:Q(`flex flex-col gap-sm`,e),ref:n,...r,children:t}),oV=()=>Array.from({length:361},(e,t)=>YB.hsl(t,1,.5).hex()),sV=e=>Array.from({length:101},(t,n)=>YB(e).alpha(n/100).css()),cV=e=>Array.from({length:101},(t,n)=>YB(e).set(`hsl.l`,n/100).css()),lV=({className:e,ref:t,...n})=>{let{hue:r,setHue:i}=rV(),a=e=>{i(Array.isArray(e)?e[0]:e)};return(0,L.jsx)(DL,{"aria-label":`Hue`,...n,min:0,max:360,value:r,onValueChange:a,trackStyle:oV(),className:Q(``,e),ref:t})},uV=({variant:e,size:t,className:n,children:r,ref:i,...a})=>(0,L.jsx)(`div`,{className:Q(qb({variant:e,size:t}),n),ref:i,...a,children:r}),dV=nr(`inline-flex items-center gap-2xs text-on-surface-variant not-first:pl-2xs group-aria-invalid:text-error-on-container`,{variants:{size:{small:`style-text-default--1 [&>svg]:size-xs`,medium:`style-text-default-0 [&>svg]:size-sm`,large:`style-text-default-1 [&>svg]:size-md`}},defaultVariants:{size:`medium`}}),fV=({size:e,className:t,children:n,ref:r,...i})=>(0,L.jsx)(`div`,{className:Q(dV({size:e}),t),ref:r,...i,children:n}),pV=({size:e=`medium`,className:t,ref:n,...r})=>{let i=(0,_.useRef)(null),[a,o]=(0,_.useState)(r.defaultValue||r.value||`#000000`);if(r.type===`color`){let s=r.value!==void 0,c=(s?r.value:a)||`#000000`,{onChange:l,defaultValue:u,value:d,...f}=r;return(0,L.jsxs)(`button`,{"aria-label":`Open color picker`,className:Q(`relative flex size-full items-center justify-start hover:cursor-pointer`,t),disabled:r.disabled,onClick:()=>i.current?.click(),type:`button`,children:[(0,L.jsx)(`div`,{className:Q(`absolute top-1/2 left-0 aspect-square h-7/12 -translate-y-1/2`,e===`small`&&`rounded-md`,e===`medium`&&`rounded-lg`,e===`large`&&`rounded-xl`),style:{backgroundColor:c}}),(0,L.jsx)(tg,{className:`peer pointer-events-none invisible absolute top-lg`,defaultValue:s?void 0:c,onChange:e=>{s||o(e.currentTarget.value),l?.(e)},ref:e=>{if(i.current=e,typeof n==`function`){n(e);return}n&&typeof n==`object`&&(n.current=e)},type:`color`,value:s?c:void 0,...f}),(0,L.jsx)(`p`,{className:Q(`text-left`,e===`small`&&`pr-xs pl-lg style-text-default--1`,e===`medium`&&`pl-[calc(var(--dawn-spacing-lg)+6px)] style-text-default-0`,e===`large`&&`pl-2xl style-text-default-1`),children:c})]})}return(0,L.jsx)(tg,{className:Q(`w-full grow text-ellipsis outline-none placeholder:opacity-60 disabled:cursor-not-allowed`,t),ref:n,...r})},mV=nr(`relative shrink-0 rounded-full`,{variants:{orientation:{horizontal:`w-full`,vertical:`h-full`},style:{rounded:`rounded-full`,square:`rounded-none`},variant:{default:`bg-neutral-border`,strong:`bg-neutral-border-strong`},weight:{thick:`[&_[data-label]]:style-text-prose-0`,medium:`[&_[data-label]]:style-text-prose--1`,thin:`[&_[data-label]]:style-text-prose--2`,thinnest:`[&_[data-label]]:style-text-prose--2`}},defaultVariants:{orientation:`horizontal`,style:`rounded`,variant:`default`,weight:`thinnest`},compoundVariants:[{orientation:`horizontal`,weight:`thick`,className:`h-[8px]`},{orientation:`horizontal`,weight:`medium`,className:`h-[4px]`},{orientation:`horizontal`,weight:`thin`,className:`h-[2px]`},{orientation:`horizontal`,weight:`thinnest`,className:`h-px`},{orientation:`vertical`,weight:`thick`,className:`w-[8px]`},{orientation:`vertical`,weight:`medium`,className:`w-[4px]`},{orientation:`vertical`,weight:`thin`,className:`w-[2px]`},{orientation:`vertical`,weight:`thinnest`,className:`w-px`}]}),hV=({orientation:e,weight:t,style:n,variant:r,children:i,className:a,labelClassName:o,ref:s,...c})=>(0,L.jsx)(tm,{className:Q(`relative`,mV({orientation:e,weight:t,style:n,variant:r}),a),orientation:e,ref:s,...c,children:(0,L.jsx)(`span`,{"data-label":!0,className:Q(`absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 bg-surface-background px-2xs whitespace-nowrap text-on-surface-variant`,o),children:i})}),gV=({className:e,children:t,ref:n,...r})=>(0,L.jsx)(hV,{className:Q(`h-2/4`,e),ref:n,...r,children:t}),_V=({children:e,...t})=>(0,L.jsx)(Gae,{...t,children:e}),vV=({className:e,ref:t,children:n,...r})=>(0,L.jsx)(U_,{className:Q(`style-text-prose--1`,e),ref:t,...r,children:n}),yV=nr(`relative z-99 h-(--popup-height,auto) w-(--popup-width,auto) origin-(--transform-origin) overflow-hidden rounded-2xl text-on-surface transition-[width,height,opacity,scale] duration-[0.35s] ease-[cubic-bezier(0.22,1,0.36,1)] data-ending-style:scale-90 data-ending-style:opacity-0 data-instant:transition-none data-starting-style:scale-90 data-starting-style:opacity-0`,{variants:{elevation:{low:`bg-surface shadow-sm`,medium:`bg-surface-2 shadow-md`,high:`bg-surface-3 shadow-lg`}},defaultVariants:{elevation:`medium`}}),bV=Zae(),xV=({elevation:e,className:t,ref:n,children:r,...i})=>(0,L.jsx)(F_,{children:(0,L.jsx)(R_,{className:Q(`h-(--positioner-height) w-(--positioner-width) max-w-(--available-width) transition-[top,left,right,bottom,transform] duration-[0.35s] ease-[cubic-bezier(0.22,1,0.36,1)] data-instant:transition-none`),ref:n,sideOffset:8,...i,children:(0,L.jsxs)(B_,{className:yV({elevation:e,className:t}),children:[(0,L.jsx)(V_,{className:`flex transition-[left] duration-[0.35s] ease-[cubic-bezier(0.22,1,0.36,1)] data-[side=bottom]:top-[-8px] data-[side=left]:right-[-13px] data-[side=left]:rotate-90 data-[side=right]:left-[-13px] data-[side=right]:-rotate-90 data-[side=top]:bottom-[-8px] data-[side=top]:rotate-180`}),(0,L.jsx)(W_,{className:Q(`relative h-(--popup-height,auto) w-(--popup-width,auto) max-w-full overflow-clip p-[1rem] transition-[width,height] duration-[0.35s] ease-[cubic-bezier(0.22,1,0.36,1)] **:data-current:w-[calc(var(--popup-width)-2rem)] **:data-current:translate-x-0 **:data-current:opacity-100 **:data-current:transition-[translate,opacity] **:data-current:duration-[350ms,175ms] **:data-current:ease-[cubic-bezier(0.22,1,0.36,1)] **:data-previous:w-[calc(var(--popup-width)-2rem)] **:data-previous:translate-x-0 **:data-previous:opacity-100 **:data-previous:transition-[translate,opacity] **:data-previous:duration-[350ms,175ms] **:data-previous:ease-[cubic-bezier(0.22,1,0.36,1)] **:data-[activation-direction~='left']:data-previous:data-ending-style:translate-x-1/2 **:data-[activation-direction~='left']:data-previous:data-ending-style:opacity-0 **:data-[activation-direction~='left']:data-current:data-starting-style:-translate-x-1/2 **:data-[activation-direction~='left']:data-current:data-starting-style:opacity-0 **:data-[activation-direction~='right']:data-previous:data-ending-style:-translate-x-1/2 **:data-[activation-direction~='right']:data-previous:data-ending-style:opacity-0 **:data-[activation-direction~='right']:data-current:data-starting-style:translate-x-1/2 **:data-[activation-direction~='right']:data-current:data-starting-style:opacity-0`,t),children:r})]})})}),SV=({className:e,ref:t,children:n,...r})=>(0,L.jsx)(H_,{className:Q(`flex items-center gap-2xs style-text-strong-0 [&>svg]:size-sm`,e),ref:t,...r,children:n}),CV=({className:e,ref:t,children:n,...r})=>(0,L.jsx)(N_,{className:Q(`px-xs`,e),ref:t,...r,render:n}),wV=({className:e,children:t,ref:n,...r})=>(0,L.jsx)(`div`,{className:Q(`flex flex-col pb-xs`,e),ref:n,...r,children:t}),TV=({className:e,children:t,ref:n,...r})=>(0,L.jsx)(`div`,{className:Q(`space-y-3xs`,e),ref:n,...r,children:t}),EV=({variant:e,tone:t,className:n,children:r,ref:i,...a})=>e===`ghost`&&t===`neutral`?(0,L.jsx)(Gb,{variant:e,tone:t,className:Q(`hover:bg-neutral-container-high!`,n),ref:i,...a,children:r}):(0,L.jsx)(Gb,{variant:e,tone:t,className:Q(``,n),ref:i,...a,children:r}),DV=({showPopover:e=!1,showTransparencyField:t=!0,className:n,children:r,ref:i,...a})=>{let{color:o,setColor:s,valueType:c}=rV(),[l,u]=_.useState(c.getValue(o)),[d,f]=_.useState(Math.round(o.alpha()*100).toString()),[p,m]=_.useState(o),[h,g]=_.useState(c);(o!==p||c!==h)&&(m(o),g(c),u(c.getValue(o)),f(Math.round(o.alpha()*100).toString()));let v=e=>{u(e)},y=e=>{f(e)},b=()=>{let e=c.parseValue(l);e&&s(e)},x=()=>{let e=parseFloat(d);Number.isNaN(e)||s(o.alpha(e/100))},S=e=>{e.key===`Enter`&&b()},C=e=>{e.key===`Enter`&&x()};return(0,L.jsxs)(uV,{variant:`secondary`,className:Q(``,n),ref:i,...a,children:[e?(0,L.jsxs)(_V,{children:[(0,L.jsx)(CV,{nativeButton:!1,children:(0,L.jsx)(fV,{"aria-label":`Open color options`,style:{backgroundColor:o.hex()},className:`aspect-square h-1/2 rounded-lg hover:cursor-pointer`})}),(0,L.jsx)(xV,{children:(0,L.jsx)(TV,{className:`flex w-[300px] flex-col gap-sm`,children:r})})]}):(0,L.jsx)(fV,{style:{backgroundColor:o.hex()},className:`aspect-square size-md rounded-lg`}),(0,L.jsx)(pV,{"aria-label":`Color value`,onBlur:b,onKeyDown:S,onValueChange:v,value:l,className:`uppercase`}),t&&(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(hV,{orientation:`vertical`,className:`h-md`}),(0,L.jsx)(fV,{children:(0,L.jsx)(Pi,{weight:`bold`})}),(0,L.jsx)(pV,{"aria-label":`Transparency percentage`,type:`number`,min:0,max:100,value:d,onValueChange:y,onBlur:x,onKeyDown:C,className:`w-xl`})]})]})},OV=({className:e,children:t,ref:n,...r})=>(0,L.jsx)(`span`,{className:Q(`style-text-default-0`,e),ref:n,...r,children:t}),kV=({className:e,children:t,ref:n,...r})=>{let{palette:i,paletteLimit:a}=rV(),o=a&&i.length>=a;return a?(0,L.jsxs)(`span`,{className:Q(`style-text-prose--2`,o?`text-error-default`:`text-on-surface-variant`,e),ref:n,...r,children:[t,i.length,` / `,a]}):null},AV=({size:e,color:t,className:n,children:r,ref:i,...a})=>{let{setColor:o}=rV();return(0,L.jsxs)(`button`,{"aria-label":typeof t==`string`?`Select color ${t}`:`Select color`,onClick:()=>{o(YB(t))},className:Q(ZB({size:e}),n),ref:i,style:{color:t},...a,children:[r,(0,L.jsx)(`div`,{className:`size-full`,style:{backgroundColor:t}})]})},jV=({className:e,children:t,ref:n,...r})=>{let{palette:i}=rV();return(0,L.jsxs)(`ul`,{className:Q(`flex flex-wrap items-center justify-start gap-2xs`,e),ref:n,...r,children:[i.map((e,t)=>(0,L.jsx)(`li`,{className:`flex`,children:(0,L.jsx)(AV,{color:e.css(),size:`medium`})},t)),t&&(0,L.jsx)(`li`,{className:`flex`,children:t})]})},MV=({className:e,children:t,ref:n,...r})=>(0,L.jsx)(`div`,{className:Q(`flex items-center justify-between gap-xs`,e),ref:n,...r,children:t}),NV=({className:e,ref:t,...n})=>{let{color:r,setColor:i}=rV(),a=r.alpha(),o=e=>{let t=Array.isArray(e)?e[0]:e;i(r.alpha(t/100))};return(0,L.jsx)(DL,{"aria-label":`Transparency`,...n,min:0,max:100,value:a*100,onValueChange:o,trackStyle:sV(r.hex()),className:Q(``,e),ref:t})},PV=({className:e,children:t,ref:n,...r})=>{let{valueType:i,setValueType:a}=rV();return(0,L.jsxs)(nL,{value:i.value,onValueChange:e=>{a(QB.find(t=>t.value===e)??QB[0])},children:[(0,L.jsxs)(cL,{"aria-label":`Color value type`,variant:`secondary`,className:Q(``,e),ref:n,...r,children:[t,(0,L.jsx)(lL,{children:e=>QB.find(t=>t.value===e)?.label??e}),(0,L.jsx)(aL,{children:(0,L.jsx)(mi,{weight:`bold`})})]}),(0,L.jsx)(oL,{sideOffset:8,children:(0,L.jsx)(iL,{children:QB.map(({label:e,value:t})=>(0,L.jsx)(rL,{value:t,children:e},e))})})]})},FV=({className:e,ref:t,...n})=>{let{color:r,setColor:i}=rV(),a=r.get(`hsl.l`),o=Number.isNaN(a)?0:a,s=e=>{let t=Array.isArray(e)?e[0]:e;i(r.set(`hsl.l`,t/100))};return(0,L.jsx)(DL,{"aria-label":`Lightness`,...n,min:0,max:100,value:o*100,onValueChange:s,trackStyle:cV(r.hex()),className:Q(``,e),ref:t})},IV=({children:e,...t})=>(0,L.jsx)(Oie,{...t,children:e}),LV=({className:e,children:t,ref:n,...r})=>(0,L.jsxs)(Ff,{className:Q(`inline-flex h-lg items-center justify-center gap-xs rounded-lg bg-neutral-container pr-3xs pl-xs style-text-default-0 text-neutral-on-container`,e),ref:n,...r,children:[t,(0,L.jsx)(If,{"aria-label":`Remove`,render:e=>(0,L.jsx)(Gb,{...e,variant:`ghost`,tone:`error`,size:`iconExtraSmall`,children:(0,L.jsx)(Hi,{className:`size-sm`,weight:`bold`})})})]}),RV=({className:e,children:t,ref:n,...r})=>(0,L.jsx)(Nf,{"data-chips":!0,className:Q(`group flex size-full flex-wrap items-center gap-2xs empty:hidden`,e),ref:n,...r,children:t}),zV=({children:e,...t})=>(0,L.jsx)(Ad,{...t,children:e}),BV=({className:e,children:t,ref:n,...r})=>(0,L.jsx)(cf,{className:Q(`max-h-[min(23rem,var(--available-height))] scroll-py-[0.5rem] overflow-y-auto overscroll-contain p-xs empty:m-[0px] empty:p-[0px]`,e),ref:n,...r,children:t}),VV=({className:e,children:t,ref:n,...r})=>(0,L.jsx)(Qd,{className:Q(`block pb-3xs`,e),ref:n,...r,children:t}),HV=({className:e,children:t,ref:n,...r})=>(0,L.jsx)($d,{className:Q(`sticky top-[0px] z-1 my-[0px] mr-[0px] -ml-2xs bg-surface-2 px-sm pt-2xs pb-3xs style-text-strong--2 text-on-surface-variant`,e),ref:n,...r,children:t}),UV=({inline:e=!1,variant:t,className:n,children:r,ref:i,...a})=>{let o=_.useId();return e?(0,L.jsx)(`div`,{className:`h-(--input-container-height) py-2xs pr-2xs`,children:(0,L.jsx)(wd,{className:Q(`h-xl w-full rounded-lg bg-surface-low px-sm outline-border transition-all not-active:outline-1 focus-within:outline-2 hover:outline-2 focus:caret-brand-default focus:outline-brand-border data-[disabled=true]:cursor-not-allowed data-[disabled=true]:opacity-50`,`placeholder:opacity-60`,`disabled:cursor-not-allowed`,`text-ellipsis`,n),id:o,ref:i,...a})}):(0,L.jsxs)(uV,{variant:t,className:Q(`flex flex-wrap py-xs [&:has([data-chips]:empty)>[role=separator]]:hidden [&:has([data-chips]:not(:empty))]:rounded-xl [&:not(:has([data-chips]))>[role=separator]]:hidden`,n),children:[r,(0,L.jsx)(hV,{weight:`thinnest`}),(0,L.jsxs)(Ed,{className:`relative flex w-full items-center justify-between [&>input]:pr-[2rem] has-[.combobox-clear]:[&>input]:pr-[calc(0.5rem+1.5rem*2)]`,children:[(0,L.jsx)(wd,{className:Q(`w-full text-ellipsis outline-none placeholder:opacity-60 disabled:cursor-not-allowed`,n),id:o,ref:i,...a}),(0,L.jsxs)(fV,{children:[(0,L.jsx)(Od,{"aria-label":`Clear selection`,keepMounted:!0,render:e=>(0,L.jsx)(Gb,{...e,size:`iconExtraSmall`,variant:`ghost`,tone:`error`,children:(0,L.jsx)(Hi,{weight:`bold`})})}),(0,L.jsx)(vd,{"aria-label":`Open popup`,render:(e,t)=>(0,L.jsx)(Gb,{...e,size:`iconExtraSmall`,variant:t.open?`fill`:`ghost`,tone:`brand`,children:(0,L.jsx)(ci,{weight:`bold`})})})]})]})]})},WV=({className:e,children:t,ref:n,...r})=>(0,L.jsxs)(af,{className:Q(`mr-2xs grid cursor-default grid-cols-[1fr_0.75rem] items-center gap-xs rounded-md px-2xs py-3xs style-text-default-0 transition-colors duration-100 select-none group-data-[side=none]:pr-xs group-data-[side=none]:leading-lg first-of-type:mt-2xs last-of-type:mb-2xs hover:cursor-pointer data-highlighted:relative data-highlighted:z-0 data-highlighted:bg-neutral-container-high data-highlighted:text-neutral-on-container data-highlighted:before:absolute data-highlighted:before:inset-x-3xs data-highlighted:before:inset-y-[0px] data-highlighted:before:z-[-1] data-highlighted:before:rounded-sm data-selected:bg-neutral-default data-selected:text-neutral-on-default pointer-coarse:py-xs`,e),ref:n,...r,children:[(0,L.jsx)(`span`,{className:`col-start-1`,children:t}),(0,L.jsx)(jf,{className:`col-start-2 place-self-end self-center`,children:(0,L.jsx)(hi,{className:`size-sm`,weight:`bold`})})]}),GV=({className:e,children:t,ref:n,...r})=>(0,L.jsx)(jd,{className:Q(`max-h-[min(calc(23rem-var(--input-container-height,0rem)),calc(var(--available-height)-var(--input-container-height,0rem)))] scroll-py-[0.5rem] space-y-3xs overflow-y-auto overscroll-contain data-empty:p-[0px]`,e),ref:n,...r,children:t}),KV=({className:e,children:t,ref:n,...r})=>(0,L.jsx)(Fd,{children:(0,L.jsx)(Yd,{className:Q(``,e),ref:n,sideOffset:20,...r,children:(0,L.jsx)(Xd,{className:`max-h-[23rem] w-(--anchor-width) max-w-(--available-width) origin-(--transform-origin) overflow-hidden rounded-xl bg-surface-2 pl-2xs shadow-md transition-[transform,scale,opacity] duration-100 [--input-container-height:4rem] data-ending-style:scale-95 data-ending-style:opacity-0 data-starting-style:scale-95 data-starting-style:opacity-0`,children:t})})}),qV=({className:e,children:t,ref:n,...r})=>(0,L.jsx)(Nd,{className:Q(`flex items-center gap-2xs p-xs style-text-prose--1 text-on-surface-variant empty:hidden`,e),ref:n,...r,children:t}),JV=({placeholder:e,className:t,children:n,ref:r,...i})=>(0,L.jsxs)(vd,{"aria-label":typeof e==`string`?e:void 0,className:Q(`inline-flex h-xl items-center justify-between gap-xl rounded-xl bg-surface pr-sm pl-md style-text-default-0 outline-2 outline-transparent transition-all hover:cursor-pointer hover:outline-border data-popup-open:outline-brand-border`,t),ref:r,...i,children:[(0,L.jsx)(Af,{placeholder:(0,L.jsx)(`span`,{className:`opacity-70`,children:e})}),(0,L.jsx)(Dd,{children:(0,L.jsx)(mi,{})}),n]}),YV=({children:e,...t})=>(0,L.jsx)(Af,{...t,children:e});function XV(e){return typeof e==`object`?e.key:e}function ZV(e,t){let n=e.length;return new Proxy(e,{get(e,r,i){if(typeof r==`string`){let i=r.charCodeAt(0);if(i>=48&&i<=57){let i=+r;if(Number.isInteger(i)&&i>=0&&i<n){let n=e[i];if(typeof n!=`object`){let r=t[i*2];n=e[i]={index:i,key:n,start:r,size:t[i*2+1],end:r+t[i*2+1],lane:0}}return n}}if(r===`length`)return n}return Reflect.get(e,r,i)}})}function QV(e,t,n){let r=n.initialDeps??[],i,a=!0;function o(){let o=process.env.NODE_ENV!==`production`&&!!n.key&&!!n.debug?.call(n),s=0;o&&(s=Date.now());let c=e();if(!(c.length!==r.length||c.some((e,t)=>r[t]!==e)))return i;r=c;let l=0;if(o&&(l=Date.now()),i=t(...c),o){let e=Math.round((Date.now()-s)*100)/100,t=Math.round((Date.now()-l)*100)/100,r=t/16,i=(e,t)=>{for(e=String(e);e.length<t;)e=` `+e;return e};console.info(`%c⏱ ${i(t,5)} /${i(e,5)} ms`,`
76
- font-size: .6rem;
77
- font-weight: bold;
78
- color: hsl(${Math.max(0,Math.min(120-120*r,120))}deg 100% 31%);`,n?.key)}return n?.onChange&&!(a&&n.skipInitialOnChange)&&n.onChange(i),a=!1,i}return o.updateDeps=e=>{r=e},o}function $V(e,t){if(e===void 0)throw Error(`Unexpected undefined${t?`: ${t}`:``}`);return e}var eH=(e,t)=>Math.abs(e-t)<1.01,tH=(e,t,n)=>{let r;return Object.assign(function(...i){e.clearTimeout(r),r=e.setTimeout(()=>t.apply(this,i),n)},{cancel:()=>{e.clearTimeout(r)}})},nH,rH=()=>{if(nH!==void 0)return nH;if(typeof navigator>`u`)return nH=!1;if(/iP(hone|od|ad)/.test(navigator.userAgent))return nH=!0;let e=navigator.maxTouchPoints;return nH=navigator.platform===`MacIntel`&&e!==void 0&&e>0},iH=e=>{let{offsetWidth:t,offsetHeight:n}=e;return{width:t,height:n}},aH=e=>e,oH=e=>{let t=Math.max(e.startIndex-e.overscan,0),n=Math.min(e.endIndex+e.overscan,e.count-1)-t+1,r=Array(n);for(let e=0;e<n;e++)r[e]=t+e;return r},sH=(e,t)=>{let n=e.scrollElement;if(!n)return;let r=e.targetWindow;if(!r)return;let i=e=>{let{width:n,height:r}=e;t({width:Math.round(n),height:Math.round(r)})};if(i(iH(n)),!r.ResizeObserver)return()=>{};let a=new r.ResizeObserver(t=>{let r=()=>{let e=t[0];if(e?.borderBoxSize){let t=e.borderBoxSize[0];if(t){i({width:t.inlineSize,height:t.blockSize});return}}i(iH(n))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(r):r()});return a.observe(n,{box:`border-box`}),()=>{a.unobserve(n)}},cH={passive:!0},lH=typeof window>`u`||`onscrollend`in window,uH=(e,t,n)=>{let r=e.scrollElement;if(!r)return;let i=e.targetWindow;if(!i)return;let a=e.options.useScrollendEvent&&lH,o=0,s=a?null:tH(i,()=>t(n(r),!1),e.options.isScrollingResetDelay),c=e=>()=>{o=n(r),s?.(),t(o,e)},l=c(!0),u=c(!1);return r.addEventListener(`scroll`,l,cH),a&&r.addEventListener(`scrollend`,u,cH),()=>{r.removeEventListener(`scroll`,l),a&&r.removeEventListener(`scrollend`,u),s?.cancel()}},dH=(e,t)=>uH(e,t,t=>{let{horizontal:n,isRtl:r}=e.options;return n?t.scrollLeft*(r&&-1||1):t.scrollTop}),fH=(e,t,n)=>{if(n.options.useCachedMeasurements){let t=n.indexFromElement(e),r=n.options.getItemKey(t);return n.itemSizeCache.get(r)??n.options.estimateSize(t)}if(t?.borderBoxSize){let e=t.borderBoxSize[0];if(e)return Math.round(e[n.options.horizontal?`inlineSize`:`blockSize`])}if(!t){let t=n.indexFromElement(e),r=n.options.getItemKey(t),i=n.itemSizeCache.get(r);if(i!==void 0)return i}return e[n.options.horizontal?`offsetWidth`:`offsetHeight`]},pH=(e,{adjustments:t=0,behavior:n},r)=>{var i,a;(a=(i=r.scrollElement)?.scrollTo)==null||a.call(i,{[r.options.horizontal?`left`:`top`]:e+t,behavior:n})};function mH(e,t,n,r){if(t===0)return!1;let i=r(0),a=new Set,o=0;for(;o<e;){let e=n(o);if(e===i)break;a.add(e),o++}let s=e-o;if(s===0||s>=t)return!1;for(let e=0;e<s;e++)if(r(e)!==n(o+e))return!1;for(let e=s;e<t;e++)if(a.has(r(e)))return!1;return!0}var hH=class{constructor(e){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollState=null,this.measurementsCache=[],this._singleLaneMeasurements=null,this.itemSizeCache=new Map,this.itemSizeCacheVersion=0,this.laneAssignments=new Map,this.pendingMin=null,this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.pendingScrollAnchor=null,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this._iosDeferredAdjustment=0,this._iosTouching=!1,this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._intendedScrollOffset=null,this._clampedAdjustment=null,this.elementsCache=new Map,this.now=()=>{var e;return((e=this.targetWindow?.performance)?.now)?.call(e)??Date.now()},this.observer=(()=>{let e=null,t=()=>e||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:e=new this.targetWindow.ResizeObserver(e=>{e.forEach(e=>{let t=()=>{let t=e.target,n=this.indexFromElement(t);if(!t.isConnected){this.observer.unobserve(t);for(let[e,n]of this.elementsCache)if(n===t){this.elementsCache.delete(e);break}return}this.isIndexInRange(n)&&this.shouldMeasureDuringScroll(n)&&this.resizeItem(n,this.options.measureElement(t,e,this))};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(t):t()})}));return{disconnect:()=>{var n;(n=t())==null||n.disconnect(),e=null},observe:e=>t()?.observe(e,{box:`border-box`}),unobserve:e=>t()?.unobserve(e)}})(),this.range=null,this.setOptions=e=>{let t={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:aH,rangeExtractor:oH,onChange:()=>{},measureElement:fH,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:`data-index`,initialMeasurementsCache:[],lanes:1,anchorTo:`start`,followOnAppend:!1,scrollEndThreshold:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,laneAssignmentMode:`estimate`,useCachedMeasurements:!1};for(let n in e){let r=e[n];r!==void 0&&(t[n]=r)}let n=this.options,r=null,i=null,a=!1;if(n!==void 0&&n.enabled&&t.enabled&&t.anchorTo===`end`&&this.scrollElement!==null){let e=n.count,o=t.count,s=this.getMeasurements(),c=this._singleLaneMeasurements?.items??s,l=e=>XV(c[e]),u=e>0?l(0):null,d=e>0?l(e-1):null;if(o!==e||e>0&&o>0&&(t.getItemKey(0)!==u||t.getItemKey(o-1)!==d)){a=!0;let c=e>0?this.getVirtualItemForOffset(this.getScrollOffset())??s[0]:null;c&&(r=[c.key,this.getScrollOffset()-c.start]);let u=t.followOnAppend===!0?`auto`:t.followOnAppend||null;u&&o>0&&this.isAtEnd(n.scrollEndThreshold)&&(e===0||t.getItemKey(o-1)!==d)&&(o>e||mH(e,o,l,t.getItemKey))&&(i=u)}}this.options=t,a&&(this.pendingMin=0,this.itemSizeCacheVersion++);let o=!1,s=0;if(r&&this.scrollOffset!==null){let[e,t]=r,n=this.getMeasurements(),{count:a,getItemKey:c}=this.options,l=0;for(;l<a&&c(l)!==e;)l++;if(l<a){let e=n[l];if(e){let n=Math.max(0,e.start+t);!i&&n!==this.scrollOffset&&(s=n-this.scrollOffset,this.scrollOffset=n,o=!0)}}}(o||i)&&(this.pendingScrollAnchor=[o?r[0]:null,o?r[1]:0,i,s])},this.notify=e=>{var t,n;(n=(t=this.options).onChange)==null||n.call(t,this,e)},this.maybeNotify=QV(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),e=>{this.notify(e)},{key:process.env.NODE_ENV!==`production`&&`maybeNotify`,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(e=>e()),this.unsubs=[],this.observer.disconnect(),this.rafId!=null&&this.targetWindow&&(this.targetWindow.cancelAnimationFrame(this.rafId),this.rafId=null),this.scrollState=null,this.isScrolling=!1,this.scrollDirection=null,this._iosDeferredAdjustment=0,this._iosTouching=!1,this._iosJustTouchEnded=!1,this._clampedAdjustment=null,this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{let e=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==e){if(this.cleanup(),!e){this.maybeNotify();return}if(this.scrollElement=e,this.targetWindow=this.scrollElement&&`ownerDocument`in this.scrollElement?this.scrollElement.ownerDocument.defaultView:this.scrollElement?.window??null,this.elementsCache.forEach(e=>{this.observer.observe(e)}),this.unsubs.push(this.options.observeElementRect(this,e=>{this.scrollRect=e,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(e,t)=>{if(t&&this._intendedScrollOffset===null&&e===this.scrollOffset)return;this._intendedScrollOffset!==null&&Math.abs(e-this._intendedScrollOffset)<1.5&&(e=this._intendedScrollOffset),this._intendedScrollOffset=null,this._clampedAdjustment!==null&&Math.abs(e-this._clampedAdjustment.maxAtWrite)>=1.5&&(this._clampedAdjustment=null),this.scrollAdjustments=0;let n=this.getScrollOffset();this.scrollDirection=t?n===e?this.scrollDirection:n<e?`forward`:`backward`:null,this.scrollOffset=e,this.isScrolling=t,this._flushIosDeferredIfReady(),this.scrollState&&this.scheduleScrollReconcile(),this.maybeNotify()})),`addEventListener`in this.scrollElement){let e=this.scrollElement,t=()=>{this._iosTouching=!0,this._iosJustTouchEnded=!1,this._iosTouchEndTimerId!==null&&this.targetWindow!=null&&(this.targetWindow.clearTimeout(this._iosTouchEndTimerId),this._iosTouchEndTimerId=null)},n=()=>{this._iosTouching=!1,rH()&&this.targetWindow!=null&&(this._iosJustTouchEnded=!0,this._iosTouchEndTimerId=this.targetWindow.setTimeout(()=>{this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._flushIosDeferredIfReady()},150))};e.addEventListener(`touchstart`,t,cH),e.addEventListener(`touchend`,n,cH),this.unsubs.push(()=>{e.removeEventListener(`touchstart`,t),e.removeEventListener(`touchend`,n),this._iosTouchEndTimerId!==null&&this.targetWindow!=null&&(this.targetWindow.clearTimeout(this._iosTouchEndTimerId),this._iosTouchEndTimerId=null)})}this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})}let t=this.pendingScrollAnchor;if(this.pendingScrollAnchor=null,t&&this.scrollElement&&this.options.enabled){let[e,n,r,i]=t;e!==null&&!r&&(rH()&&(this.isScrolling||this._iosTouching||this._iosJustTouchEnded)?i!==0&&(this._iosDeferredAdjustment+=i):this.scrollState?.behavior===`smooth`&&!eH(this.getScrollOffset()-i,this.scrollState.lastTargetOffset)||this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})),r&&this.scrollToEnd({behavior:r})}this._retryClampedAdjustment()},this._retryClampedAdjustment=()=>{if(this._clampedAdjustment===null||!this.scrollElement||!this.options.enabled)return;let{target:e,maxAtWrite:t}=this._clampedAdjustment,n=this.getMaxScrollOffset();n>t+.5&&(this._clampedAdjustment=e>n+.5?{target:e,maxAtWrite:n}:null,this._scrollToOffset(e,{adjustments:void 0,behavior:void 0}))},this._flushIosDeferredIfReady=()=>{if(this._iosDeferredAdjustment===0||this.isScrolling||this._iosTouching||this._iosJustTouchEnded)return;let e=this.getScrollOffset(),t=this.getMaxScrollOffset();if(e<0||e>t)return;if(this._iosDeferredAdjustment<0&&e>=t-1){this._iosDeferredAdjustment=0;return}let n=this._iosDeferredAdjustment;this._iosDeferredAdjustment=0,this._scrollToOffset(e,{adjustments:this.scrollAdjustments+=n,behavior:void 0})},this.rafId=null,this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?`width`:`height`]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset==`function`?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getMeasurementOptions=QV(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes,this.options.laneAssignmentMode,this.options.gap],(e,t,n,r,i,a,o,s)=>(this.prevLanes!==void 0&&this.prevLanes!==a&&(this.lanesChangedFlag=!0),this.prevLanes=a,this.pendingMin=null,{count:e,paddingStart:t,scrollMargin:n,getItemKey:r,enabled:i,lanes:a,laneAssignmentMode:o,gap:s}),{key:!1}),this.isIndexInRange=e=>e>=0&&e<this.options.count,this.getMeasurements=QV(()=>[this.getMeasurementOptions(),this.itemSizeCacheVersion],({count:e,paddingStart:t,scrollMargin:n,getItemKey:r,enabled:i,lanes:a,laneAssignmentMode:o,gap:s},c)=>{let l=this.itemSizeCache;if(!i)return this.measurementsCache=[],this._singleLaneMeasurements=null,this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>e)for(let t of this.laneAssignments.keys())t>=e&&this.laneAssignments.delete(t);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this._singleLaneMeasurements=null,this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMin=null),this.measurementsCache.length===0&&!this.lanesSettling&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(e=>{this.itemSizeCache.set(e.key,e.size)}));let u=this.lanesSettling?0:this.pendingMin??0;if(this.pendingMin=null,this.lanesSettling&&this.measurementsCache.length===e&&(this.lanesSettling=!1),a===1){let i=e*2,a=this._singleLaneMeasurements?.flat;if(!a||a.length<i){let e=new Float64Array(i);a&&u>0&&e.set(a.subarray(0,u*2)),a=e}let o=u===0?Array(e):this._singleLaneMeasurements.items.slice(),c;if(u===0)c=t+n;else{let e=u-1;c=a[e*2]+a[e*2+1]+s}for(let t=u;t<e;t++){let e=r(t);o[t]=e;let n=l.get(e),i=typeof n==`number`?n:this.options.estimateSize(t);a[t*2]=c,a[t*2+1]=i,c+=i+s}this._singleLaneMeasurements={flat:a,items:o};let d=ZV(o,a);return this.measurementsCache=d,d}let d=this.measurementsCache.slice(0,u),f=Array(a).fill(void 0),p=new Float64Array(a),m=0;for(let e=0;e<u;e++){let t=d[e];t&&(f[t.lane]===void 0&&m++,f[t.lane]=e,p[t.lane]=t.end)}for(let i=u;i<e;i++){let e=r(i),c=this.laneAssignments.get(i),u,h,g=o===`estimate`||l.has(e);if(c!==void 0&&this.options.lanes>1){u=c;let e=f[u],r=e===void 0?void 0:d[e];h=r?r.end+s:t+n}else if(m===a){let e=0,t=p[0],n=f[0];for(let r=1;r<a;r++){let i=p[r];(i<t||i===t&&f[r]<n)&&(e=r,t=i,n=f[r])}u=e,h=t+s,g&&this.laneAssignments.set(i,u)}else u=i%this.options.lanes,h=t+n,g&&this.laneAssignments.set(i,u);let _=l.get(e),v=typeof _==`number`?_:this.options.estimateSize(i),y=h+v;d[i]={index:i,start:h,size:v,end:y,key:e,lane:u},f[u]===void 0&&m++,f[u]=i,p[u]=y}return this.measurementsCache=d,d},{key:process.env.NODE_ENV!==`production`&&`getMeasurements`,debug:()=>this.options.debug}),this.calculateRange=QV(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(e,t,n,r)=>e.length===0||t===0?(this.range=null,null):(this.range=vH(e,t,n,r,r===1&&this._singleLaneMeasurements!==null?this._singleLaneMeasurements.flat:null),this.range),{key:process.env.NODE_ENV!==`production`&&`calculateRange`,debug:()=>this.options.debug}),this.getVirtualIndexes=QV(()=>{let e=null,t=null,n=this.calculateRange();return n&&(e=n.startIndex,t=n.endIndex),this.maybeNotify.updateDeps([this.isScrolling,e,t]),[this.options.rangeExtractor,this.options.overscan,this.options.count,e,t]},(e,t,n,r,i)=>r===null||i===null?[]:e({startIndex:r,endIndex:i,overscan:t,count:n}),{key:process.env.NODE_ENV!==`production`&&`getVirtualIndexes`,debug:()=>this.options.debug}),this.indexFromElement=e=>{let t=this.options.indexAttribute,n=e.getAttribute(t);return n?parseInt(n,10):(console.warn(`Missing attribute name '${t}={index}' on measured element.`),-1)},this.shouldMeasureDuringScroll=e=>{if(!this.scrollState||this.scrollState.behavior!==`smooth`)return!0;let t=this.scrollState.index??this.getVirtualItemForOffset(this.scrollState.lastTargetOffset)?.index;if(t!==void 0&&this.range){let n=Math.max(this.options.overscan,Math.ceil((this.range.endIndex-this.range.startIndex)/2)),r=Math.max(0,t-n),i=Math.min(this.options.count-1,t+n);return e>=r&&e<=i}return!0},this.measureElement=e=>{if(!e){this.elementsCache.forEach((e,t)=>{e.isConnected||(this.observer.unobserve(e),this.elementsCache.delete(t))});return}let t=this.indexFromElement(e);if(!this.isIndexInRange(t))return;let n=this.options.getItemKey(t),r=this.elementsCache.get(n);r!==e&&(r&&this.observer.unobserve(r),this.observer.observe(e),this.elementsCache.set(n,e)),(!this.isScrolling||this.scrollState)&&this.shouldMeasureDuringScroll(t)&&this.resizeItem(t,this.options.measureElement(e,void 0,this))},this.resizeItem=(e,t)=>{if(!this.isIndexInRange(e))return;let n,r,i,a=this._singleLaneMeasurements?.flat;if(this.options.lanes===1&&a!=null)i=this.options.getItemKey(e),r=a[e*2],n=a[e*2+1];else{let t=this.measurementsCache[e];if(!t)return;i=t.key,r=t.start,n=t.size}let o=this.itemSizeCache.get(i)??n,s=t-o;if(s!==0){let a=this.options.anchorTo===`end`&&this.scrollState?.behavior!==`smooth`&&this.getVirtualDistanceFromEnd()<=this.options.scrollEndThreshold,c=a?this.getTotalSize():0,l=this.getScrollOffset()+this.scrollAdjustments,u=this.itemSizeCache.has(i)?r+o<=l&&this.scrollDirection!==`backward`:r<l,d=this.scrollState?.behavior!==`smooth`&&(this.shouldAdjustScrollPositionOnItemSizeChange===void 0?u:this.shouldAdjustScrollPositionOnItemSizeChange(this.measurementsCache[e]??{index:e,key:i,start:r,size:n,end:r+n,lane:0},s,this));(this.pendingMin===null||e<this.pendingMin)&&(this.pendingMin=e),this.itemSizeCache.set(i,t),this.itemSizeCacheVersion++;let f=!1;a?f=this.applyScrollAdjustment(this.getTotalSize()-c):d&&(f=this.applyScrollAdjustment(s)),this.notify(f),this._retryClampedAdjustment()}},this.getVirtualItems=QV(()=>[this.getVirtualIndexes(),this.getMeasurements()],(e,t)=>{let n=[];for(let r=0,i=e.length;r<i;r++){let i=t[e[r]];n.push(i)}return n},{key:process.env.NODE_ENV!==`production`&&`getVirtualItems`,debug:()=>this.options.debug}),this.getVirtualItemForOffset=e=>{let t=this.getMeasurements();if(t.length===0)return;let n=this._singleLaneMeasurements?.flat,r=this.options.lanes===1&&n!=null;return $V(t[gH(0,t.length-1,r?e=>n[e*2]:e=>$V(t[e]).start,e)])},this.getMaxScrollOffset=()=>{if(!this.scrollElement)return 0;if(`scrollHeight`in this.scrollElement)return this.options.horizontal?this.scrollElement.scrollWidth-this.scrollElement.clientWidth:this.scrollElement.scrollHeight-this.scrollElement.clientHeight;{let e=this.scrollElement.document.documentElement;return this.options.horizontal?e.scrollWidth-this.scrollElement.innerWidth:e.scrollHeight-this.scrollElement.innerHeight}},this.getVirtualDistanceFromEnd=()=>Math.max(this.getTotalSize()-this.getSize()-this.getScrollOffset(),0),this.getDistanceFromEnd=()=>Math.max(this.getMaxScrollOffset()-this.getScrollOffset(),0),this.isAtEnd=(e=this.options.scrollEndThreshold)=>this.getDistanceFromEnd()<=e,this.getOffsetForAlignment=(e,t,n=0)=>{if(!this.scrollElement)return 0;let r=this.getSize(),i=this.getScrollOffset();t===`auto`&&(t=e>=i+r?`end`:`start`),t===`center`?e+=(n-r)/2:t===`end`&&(e-=r);let a=this.getMaxScrollOffset();return Math.max(Math.min(a,e),0)},this.getOffsetForIndex=(e,t=`auto`)=>{e=Math.max(0,Math.min(e,this.options.count-1));let n=this.getSize(),r=this.getScrollOffset(),i=this.measurementsCache[e];if(!i)return;if(t===`auto`){if(i.end>=r+n-this.options.scrollPaddingEnd)t=`end`;else if(i.start<=r+this.options.scrollPaddingStart)t=`start`;else return[r,t]}if(t===`end`&&e===this.options.count-1)return[this.getMaxScrollOffset(),t];let a=t===`end`?i.end+this.options.scrollPaddingEnd:i.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(a,t,i.size),t]},this.scrollToOffset=(e,{align:t=`start`,behavior:n=`auto`}={})=>{this._iosDeferredAdjustment=0;let r=this.getOffsetForAlignment(e,t),i=this.now();this.scrollState={index:null,align:t,behavior:n,startedAt:i,lastTargetOffset:r,stableFrames:0},this._scrollToOffset(r,{adjustments:void 0,behavior:n}),this.scheduleScrollReconcile()},this.scrollToIndex=(e,{align:t=`auto`,behavior:n=`auto`}={})=>{this._iosDeferredAdjustment=0,e=Math.max(0,Math.min(e,this.options.count-1));let r=this.getOffsetForIndex(e,t);if(!r)return;let[i,a]=r,o=this.now();this.scrollState={index:e,align:a,behavior:n,startedAt:o,lastTargetOffset:i,stableFrames:0},this._scrollToOffset(i,{adjustments:void 0,behavior:n}),this.scheduleScrollReconcile()},this.scrollBy=(e,{behavior:t=`auto`}={})=>{let n=this.getScrollOffset()+e,r=this.now();this.scrollState={index:null,align:`start`,behavior:t,startedAt:r,lastTargetOffset:n,stableFrames:0},this._scrollToOffset(n,{adjustments:void 0,behavior:t}),this.scheduleScrollReconcile()},this.scrollToEnd=({behavior:e=`auto`}={})=>{if(this.options.count>0){this.scrollToIndex(this.options.count-1,{align:`end`,behavior:e});return}this.scrollToOffset(Math.max(this.getTotalSize()-this.getSize(),0),{behavior:e})},this.getTotalSize=()=>{let e=this.getMeasurements(),t;if(e.length===0)t=this.options.paddingStart;else if(this.options.lanes===1){let n=e.length-1,r=this._singleLaneMeasurements?.flat;t=r==null?e[n]?.end??0:r[n*2]+r[n*2+1]}else{let n=Array(this.options.lanes).fill(null),r=e.length-1;for(;r>=0&&n.some(e=>e===null);){let t=e[r];n[t.lane]===null&&(n[t.lane]=t.end),r--}t=Math.max(...n.filter(e=>e!==null))}return Math.max(t-this.options.scrollMargin+this.options.paddingEnd,0)},this.takeSnapshot=()=>{let e=[];if(this.itemSizeCache.size===0)return e;let t=this.getMeasurements();for(let n of t)n&&this.itemSizeCache.has(n.key)&&e.push({index:n.index,key:n.key,start:n.start,size:n.size,end:n.end,lane:n.lane});return e},this._scrollToOffset=(e,{adjustments:t,behavior:n})=>{this._intendedScrollOffset=e+(t??0),this.options.scrollToFn(e,{behavior:n,adjustments:t},this)},this.measure=()=>{this.pendingMin=null,this.itemSizeCache.clear(),this.laneAssignments.clear(),this.itemSizeCacheVersion++,this.notify(!1)},this.setOptions(e)}applyScrollAdjustment(e,t){if(e===0)return!1;if(process.env.NODE_ENV!==`production`&&this.options.debug&&console.info(`correction`,e),rH()&&(this.isScrolling||this._iosTouching||this._iosJustTouchEnded))return this._iosDeferredAdjustment+=e,!1;{let n=this.getScrollOffset()+this.scrollAdjustments+e,r=this.scrollElement,i=r!==null&&(`scrollHeight`in r||`document`in r)?this.getMaxScrollOffset():null;return this._clampedAdjustment=i!==null&&n>i+.5?{target:n,maxAtWrite:i}:null,this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=e,behavior:t}),this.scrollOffset!==null&&(this.scrollOffset+=this.scrollAdjustments,this.scrollOffset<0&&(this.scrollOffset=0),this.scrollAdjustments=0),!0}}scheduleScrollReconcile(){if(!this.targetWindow){this.scrollState=null;return}this.rafId??=this.targetWindow.requestAnimationFrame(()=>{this.rafId=null,this.reconcileScroll()})}reconcileScroll(){if(!this.scrollState||!this.scrollElement)return;if(this.now()-this.scrollState.startedAt>5e3){this.scrollState=null;return}let e=this.scrollState.index==null?void 0:this.getOffsetForIndex(this.scrollState.index,this.scrollState.align),t=e?e[0]:this.scrollState.lastTargetOffset,n=t!==this.scrollState.lastTargetOffset;if(!n&&eH(t,this.getScrollOffset())){if(this.scrollState.stableFrames++,this.scrollState.stableFrames>=1){this.getScrollOffset()!==t&&this._scrollToOffset(t,{adjustments:void 0,behavior:`auto`}),this.scrollState=null;return}}else if(this.scrollState.stableFrames=0,n){let e=this.getSize()||600,n=Math.abs(t-this.getScrollOffset()),r=this.scrollState.behavior===`smooth`&&n>e;this.scrollState.lastTargetOffset=t,r||(this.scrollState.behavior=`auto`),this._scrollToOffset(t,{adjustments:void 0,behavior:r?`smooth`:`auto`})}this.scheduleScrollReconcile()}},gH=(e,t,n,r)=>{for(;e<=t;){let i=(e+t)/2|0,a=n(i);if(a<r)e=i+1;else if(a>r)t=i-1;else return i}return e>0?e-1:0};function _H(e,t,n){let r=0;for(;r<=t;){let i=(r+t)/2|0,a=e[i*2];if(a<n)r=i+1;else if(a>n)t=i-1;else return i}return r>0?r-1:0}function vH(e,t,n,r,i){let a=e.length-1;if(e.length<=r)return{startIndex:0,endIndex:a};if(r===1&&i!==null){let e=_H(i,a,n),r=e,o=n+t;for(;r<a&&i[r*2]+i[r*2+1]<o;)r++;return{startIndex:e,endIndex:r}}let o=gH(0,a,t=>e[t].start,n),s=o;if(r===1)for(;s<a&&e[s].end<n+t;)s++;else if(r>1){let i=Array(r).fill(0);for(;s<a&&i.some(e=>e<n+t);){let t=e[s];i[t.lane]=t.end,s++}let c=Array(r).fill(n+t);for(;o>=0&&c.some(e=>e>=n);){let t=e[o];c[t.lane]=t.start,o--}o=Math.max(0,o-o%r),s=Math.min(a,s+(r-1-s%r))}return{startIndex:o,endIndex:s}}var yH=typeof document<`u`?_.useLayoutEffect:_.useEffect;function bH({useFlushSync:e=!0,directDomUpdates:t=!1,directDomUpdatesMode:n=`transform`,...r}){let i=_.useReducer(e=>e+1,0)[1],a=_.useRef({enabled:t,mode:n,container:null,lastSize:null,lastPositions:new WeakMap,prevRange:null});a.current.enabled=t,a.current.mode=n;let o=_.useRef(!1),s=e=>{let t=a.current;if(!t.enabled||!t.container)return;let n=e.getTotalSize();if(n!==t.lastSize){t.lastSize=n;let r=e.options.horizontal?`width`:`height`;t.container.style[r]=`${n}px`}},c=e=>{let t=a.current;if(!t.enabled||!t.container)return;s(e);let n=!!e.options.horizontal,r=t.mode===`transform`,i=n?`left`:`top`,o=e.options.scrollMargin,c=e.getVirtualItems();for(let a of c){let s=a.start-o,c=e.elementsCache.get(a.key);c&&t.lastPositions.get(c)!==s&&(t.lastPositions.set(c,s),r?c.style.transform=n?`translate3d(${s}px, 0, 0)`:`translate3d(0, ${s}px, 0)`:c.style[i]=`${s}px`)}},l={...r,onChange:(t,n)=>{var s;let l=a.current,u=!0;if(l.enabled){c(t);let e=t.range,n=l.prevRange;u=!n||n.isScrolling!==t.isScrolling||n.startIndex!==e?.startIndex||n.endIndex!==e?.endIndex,u&&(l.prevRange=e?{startIndex:e.startIndex,endIndex:e.endIndex,isScrolling:t.isScrolling}:null)}u&&(e&&n&&!o.current?(0,Rn.flushSync)(i):i()),(s=r.onChange)==null||s.call(r,t,n)}},[u]=_.useState(()=>{let e=new hH(l),t=e.measureElement;return e.measureElement=e=>{o.current=!0;try{t(e)}finally{o.current=!1}},Object.assign(e,{containerRef:t=>{let n=a.current;if(n.container=t,n.lastSize=null,t&&n.enabled){let r=e.getTotalSize();n.lastSize=r;let i=e.options.horizontal?`width`:`height`;t.style[i]=`${r}px`}}})});return u.setOptions(l),yH(()=>u._didMount(),[]),yH(()=>(s(u),u._willUpdate())),yH(()=>{c(u)}),u}function xH(e){return bH({observeElementRect:sH,observeElementOffset:dH,scrollToFn:pH,...e})}var SH=pie,CH=({open:e,virtualizerRef:t,estimateSize:n=32,overscan:r=20,className:i,children:a,...o})=>{let s=SH(),c=_.useRef(null),l=xH({enabled:e,count:s.length,getScrollElement:()=>c.current,estimateSize:()=>n,overscan:r,paddingStart:8,paddingEnd:8,scrollPaddingStart:8,scrollPaddingEnd:8});_.useEffect(()=>{t&&(t.current=l)},[l,t]);let u=_.useCallback(e=>{c.current=e,e&&l.measure()},[l]),d=l.getTotalSize();return s.length?(0,L.jsx)(`div`,{role:`presentation`,ref:u,style:{"--total-size":`${d}px`},className:Q(`h-[min(22.5rem,var(--total-size))] max-h-(--available-height) scroll-py-3xs overflow-auto overscroll-contain`,i),...o,children:(0,L.jsx)(`div`,{role:`presentation`,className:`relative w-full`,style:{height:d},children:l.getVirtualItems().map(e=>{let t=s[e.index];return t?(0,L.jsx)(WV,{index:e.index,"data-index":e.index,ref:l.measureElement,value:t,"aria-setsize":s.length,"aria-posinset":e.index+1,className:`first-of-type:mt-0!`,style:{position:`absolute`,top:0,left:0,width:`100%`,transform:`translateY(${e.start}px)`},children:typeof a==`function`?a(t):a},e.key):null})})}):null},wH=({children:e,...t})=>(0,L.jsx)(am,{...t,children:e}),TH=({className:e,children:t,ref:n,...r})=>(0,L.jsxs)(Zf,{className:Q(`relative z-0 grid cursor-default grid-cols-[1fr_2rem] items-center px-xs py-3xs style-text-default-0 outline-none select-none before:absolute before:inset-x-3xs before:inset-y-[0px] before:z-[-1] before:rounded-md before:bg-transparent before:content-[""] hover:cursor-pointer data-highlighted:text-neutral-on-container data-highlighted:before:bg-neutral-container-high`,e),ref:n,...r,children:[(0,L.jsx)(`span`,{className:`col-start-1`,children:t}),(0,L.jsx)(Qf,{className:`col-start-2 flex items-center justify-center place-self-end self-center`,children:(0,L.jsx)(hi,{className:`size-sm`,weight:`bold`})})]}),EH=({className:e,children:t,ref:n,...r})=>(0,L.jsx)(tp,{className:Q(``,e),ref:n,...r,children:t}),DH=({className:e,children:t,ref:n,...r})=>(0,L.jsx)(np,{className:Q(`cursor-default px-2xs py-3xs style-text-default--2 text-on-surface-variant select-none`,e),ref:n,...r,children:t}),OH=({className:e,children:t,ref:n,...r})=>(0,L.jsx)(pp,{className:Q(`mx-3xs`,e),ref:n,...r,children:t}),kH=({className:e,children:t,ref:n,...r})=>(0,L.jsxs)(gp,{className:Q(`relative z-0 grid cursor-default grid-cols-[1fr_2rem] items-center px-xs py-3xs style-text-default-0 outline-none select-none before:absolute before:inset-x-3xs before:inset-y-[0px] before:z-[-1] before:rounded-md before:bg-transparent before:content-[""] hover:cursor-pointer data-highlighted:text-neutral-on-container data-highlighted:before:bg-neutral-container-high`,e),ref:n,...r,children:[(0,L.jsx)(`span`,{className:`col-start-1 min-w-3xl`,children:t}),(0,L.jsx)(_p,{className:`col-start-2 flex items-center justify-center place-self-end self-center`,children:(0,L.jsx)(hi,{className:`size-sm`,weight:`bold`})})]}),AH=({className:e,children:t,ref:n,...r})=>(0,L.jsx)(`div`,{className:Q(`ml-auto inline-flex items-center gap-3xs`,e),ref:n,...r,children:t}),jH=nr(`relative z-0 flex cursor-default items-center px-xs py-3xs style-text-default-0 transition-colors duration-100 outline-none select-none before:absolute before:inset-x-3xs before:inset-y-[0px] before:z-[-1] before:rounded-md before:bg-transparent before:transition-colors before:duration-100 before:content-[""] hover:cursor-pointer`,{variants:{tone:{brand:`text-brand-default data-highlighted:text-brand-on-container data-highlighted:before:bg-brand-container`,accent:`text-accent-default data-highlighted:text-accent-on-container data-highlighted:before:bg-accent-container`,neutral:`text-on-surface data-highlighted:text-neutral-on-container data-highlighted:before:bg-neutral-container-high`,error:`text-error-default data-highlighted:text-error-on-container data-highlighted:before:bg-error-container`,info:`text-info-default data-highlighted:text-info-on-container data-highlighted:before:bg-info-container`,success:`text-success-default data-highlighted:text-success-on-container data-highlighted:before:bg-success-container`,warning:`text-warning-default data-highlighted:text-warning-on-container data-highlighted:before:bg-warning-container`}},defaultVariants:{tone:`neutral`}}),MH=nr(`relative z-0 flex cursor-default items-center px-xs py-3xs style-text-default-0 transition-colors duration-100 outline-none select-none before:absolute before:inset-x-3xs before:inset-y-[0px] before:z-[-1] before:rounded-md before:bg-transparent before:transition-colors before:duration-100 before:content-[""] hover:cursor-pointer`,{variants:{tone:{brand:`text-brand-default data-highlighted:text-brand-on-container data-highlighted:before:bg-brand-container data-popup-open:text-brand-on-container data-popup-open:before:bg-brand-container data-highlighted:data-popup-open:before:bg-brand-container`,accent:`text-accent-default data-highlighted:text-accent-on-container data-highlighted:before:bg-accent-container data-popup-open:text-accent-on-container data-popup-open:before:bg-accent-container data-highlighted:data-popup-open:before:bg-accent-container`,neutral:`text-on-surface data-highlighted:text-neutral-on-container data-highlighted:before:bg-neutral-container-high data-popup-open:text-neutral-on-container data-popup-open:before:bg-neutral-container-high data-highlighted:data-popup-open:before:bg-neutral-container-high`,error:`text-error-default data-highlighted:text-error-on-container data-highlighted:before:bg-error-container data-popup-open:text-error-on-container data-popup-open:before:bg-error-container data-highlighted:data-popup-open:before:bg-error-container`,info:`text-info-default data-highlighted:text-info-on-container data-highlighted:before:bg-info-container data-popup-open:text-info-on-container data-popup-open:before:bg-info-container data-highlighted:data-popup-open:before:bg-info-container`,success:`text-success-default data-highlighted:text-success-on-container data-highlighted:before:bg-success-container data-popup-open:text-success-on-container data-popup-open:before:bg-success-container data-highlighted:data-popup-open:before:bg-success-container`,warning:`text-warning-default data-highlighted:text-warning-on-container data-highlighted:before:bg-warning-container data-popup-open:text-warning-on-container data-popup-open:before:bg-warning-container data-highlighted:data-popup-open:before:bg-warning-container`}},defaultVariants:{tone:`neutral`}}),NH=({className:e,tone:t,children:n,ref:r,...i})=>(0,L.jsx)(rp,{className:Q(jH({tone:t}),e),nativeButton:!0,ref:r,render:e=>(0,L.jsx)(`button`,{type:`button`,...e,className:Q(`w-full gap-2xs [&>svg]:size-sm`,e.className),children:n}),...i}),PH=({className:e,children:t,ref:n,...r})=>(0,L.jsx)(lp,{children:(0,L.jsx)(cm,{children:(0,L.jsx)(op,{className:Q(`z-99 flex w-[calc(100%+var(--spacing-xl))] origin-(--transform-origin) translate-x-[-calc(var(--spacing-xl)/2)] flex-col gap-3xs rounded-xl bg-surface-2 p-3xs py-2xs shadow-md transition-[transform,scale,opacity] outline-none data-ending-style:scale-90 data-ending-style:opacity-0 data-starting-style:scale-90 data-starting-style:opacity-0`,e),ref:n,...r,children:t})})}),FH=({className:e,children:t,ref:n,...r})=>(0,L.jsx)(tm,{className:Q(`mx-2xs my-3xs h-px bg-border-strong`,e),ref:n,...r,children:t}),IH=({children:e,...t})=>(0,L.jsx)(Op,{...t,children:e}),LH=({className:e,children:t,ref:n,tone:r,...i})=>(0,L.jsxs)(im,{className:Q(MH({tone:r}),e),ref:n,...i,children:[(0,L.jsx)(`span`,{className:`flex min-w-3xl items-center gap-2xs pr-2xl`,children:t}),(0,L.jsx)(fi,{className:`ml-auto size-xs shrink-0 self-center`,weight:`bold`})]}),RH=({className:e,children:t,ref:n,...r})=>(0,L.jsx)(sm,{className:Q(`flex min-w-0 flex-1`,e),ref:n,...r,children:t}),zH=({children:e,...t})=>(0,L.jsx)(fm,{...t,children:e}),BH=({className:e,ref:t,...n})=>(0,L.jsx)(jl,{className:Q(`absolute top-2xs right-2xs`,e),ref:t,...n,render:(0,L.jsx)(Gb,{"aria-label":`Close`,variant:`ghost`,size:`iconSmall`,tone:`error`,children:(0,L.jsx)(Hi,{weight:`bold`})})}),VH=({className:e,children:t,ref:n,...r})=>(0,L.jsx)(`div`,{className:Q(`flex h-full flex-col gap-sm`,e),ref:n,...r,children:t}),HH=({className:e,children:t,ref:n,...r})=>(0,L.jsx)(Ml,{"data-slot":`dialog-description`,className:Q(`style-text-prose-0 text-on-surface-variant`,e),ref:n,...r,children:t}),UH=({className:e,children:t,ref:n,...r})=>(0,L.jsx)(`div`,{className:Q(`flex w-full items-center justify-end gap-2xs`,e),ref:n,...r,children:t}),WH=({className:e,children:t,ref:n,...r})=>(0,L.jsx)(`div`,{className:Q(`grid auto-rows-min items-center gap-x-sm has-data-[slot=dialog-description]:grid-rows-[auto_auto] has-data-[slot=dialog-icon]:grid-cols-[auto_1fr] has-data-[slot=dialog-description]:**:data-[slot=dialog-icon]:row-span-2`,e),ref:n,...r,children:t}),GH=({className:e,children:t,ref:n,...r})=>(0,L.jsx)(`div`,{"data-slot":`dialog-icon`,className:Q(`row-span-2 self-start [&>svg]:size-xl [&>svg]:shrink-0`,e),ref:n,...r,children:t}),KH=({className:e,children:t,ref:n,...r})=>(0,L.jsxs)(Ql,{children:[(0,L.jsx)(Al,{className:`fixed inset-[0px] z-998 min-h-dvh transition-all duration-150 data-ending-style:opacity-0 data-starting-style:opacity-0 supports-[-webkit-touch-callout:none]:absolute`,style:{backdropFilter:`blur(16px)`,WebkitBackdropFilter:`blur(16px)`}}),(0,L.jsx)(Yl,{className:Q(`fixed top-1/2 left-1/2 z-999 flex max-w-[calc(100vw-3rem)] min-w-1/6 -translate-1/2 flex-col gap-sm overflow-hidden rounded-3xl bg-surface-3 p-md shadow-lg transition-all duration-150 data-ending-style:scale-90 data-ending-style:opacity-0 data-starting-style:scale-90 data-starting-style:opacity-0`,e),ref:n,...r,children:t})]}),qH=({className:e,children:t,ref:n,...r})=>(0,L.jsx)($l,{"data-slot":`dialog-title`,className:Q(`style-text-strong-1`,e),ref:n,...r,children:t}),JH=({className:e,children:t,ref:n,...r})=>(0,L.jsx)(ru,{className:Q(``,e),ref:n,...r,render:t}),YH=pm,XH=({children:e,...t})=>(0,L.jsx)(rh,{...t,children:e}),ZH=({className:e,children:t,ref:n,...r})=>(0,L.jsx)(Cm,{className:Q(`shrink-0`,e),ref:n,...r,render:t}),QH=({className:e,children:t,ref:n,...r})=>(0,L.jsx)(Tm,{className:Q(`mx-auto w-full max-w-[32rem] space-y-3xs`,e),ref:n,...r,children:t}),$H=({className:e,children:t,ref:n,...r})=>(0,L.jsx)(Em,{className:Q(`style-text-prose-0 text-on-surface-variant`,e),ref:n,...r,children:t}),eU=({children:e,...t})=>(0,L.jsxs)($m,{...t,children:[(0,L.jsx)(Mm,{}),(0,L.jsx)(Am,{className:`size-full`,children:e})]}),tU=({className:e,children:t,ref:n,...r})=>(0,L.jsx)(Sh,{className:Q(``,e),ref:n,...r,render:t}),nU=`fixed inset-0 min-h-dvh bg-scrim opacity-[calc(var(--backdrop-opacity)*(1-var(--drawer-swipe-progress)))] transition-opacity duration-450 ease-[cubic-bezier(0.32,0.72,0,1)] [--backdrop-opacity:0.2] [--bleed:3rem] data-ending-style:opacity-0 data-ending-style:duration-[calc(var(--drawer-swipe-strength)*0.4s)] data-starting-style:opacity-0 data-swiping:duration-0 supports-[-webkit-touch-callout:none]:absolute dark:[--backdrop-opacity:0.7]`,rU=Q(`fixed inset-0 flex`,`items-end justify-center`,`has-[[data-swipe-direction=up]]:items-start has-[[data-swipe-direction=up]]:justify-center`,`has-[[data-swipe-direction=right]]:items-center has-[[data-swipe-direction=right]]:justify-end`,`has-[[data-swipe-direction=left]]:items-center has-[[data-swipe-direction=left]]:justify-start`),iU=Q(`touch-auto overflow-y-auto overscroll-contain bg-surface-background p-md outline outline-border-strong transition-transform duration-450 ease-[cubic-bezier(0.32,0.72,0,1)] data-ending-style:duration-[calc(var(--drawer-swipe-strength)*0.4s)] data-swiping:select-none`,`mb-[-3rem] max-h-[calc(80vh+3rem)] w-full transform-[translateY(var(--drawer-swipe-movement-y))] rounded-t-2xl pb-[calc(1.5rem+env(safe-area-inset-bottom,0)+3rem)] shadow-[0_-8px_24px_var(--color-shadow)] data-ending-style:transform-[translateY(calc(100%-3rem+2px))] data-starting-style:transform-[translateY(calc(100%-3rem+2px))]`,`data-[swipe-direction=up]:mt-[-3rem] data-[swipe-direction=up]:mb-0 data-[swipe-direction=up]:rounded-t-none data-[swipe-direction=up]:rounded-b-2xl data-[swipe-direction=up]:pt-[calc(1.5rem+env(safe-area-inset-top,0)+3rem)] data-[swipe-direction=up]:pb-md data-[swipe-direction=up]:shadow-[0_8px_24px_var(--color-shadow)] data-[swipe-direction=up]:data-ending-style:transform-[translateY(calc(-100%+3rem-2px))] data-[swipe-direction=up]:data-starting-style:transform-[translateY(calc(-100%+3rem-2px))]`,`data-[swipe-direction=right]:mr-[-3rem] data-[swipe-direction=right]:mb-0 data-[swipe-direction=right]:h-full data-[swipe-direction=right]:max-h-dvh data-[swipe-direction=right]:w-[23rem] data-[swipe-direction=right]:max-w-[calc(100vw-3rem)] data-[swipe-direction=right]:transform-[translateX(var(--drawer-swipe-movement-x))] data-[swipe-direction=right]:rounded-none data-[swipe-direction=right]:rounded-l-2xl data-[swipe-direction=right]:pr-[4.5rem] data-[swipe-direction=right]:pb-md data-[swipe-direction=right]:shadow-[-8px_0_24px_var(--color-shadow)] data-[swipe-direction=right]:data-ending-style:transform-[translateX(calc(100%-3rem+2px))] data-[swipe-direction=right]:data-starting-style:transform-[translateX(calc(100%-3rem+2px))]`,`data-[swipe-direction=left]:mb-0 data-[swipe-direction=left]:ml-[-3rem] data-[swipe-direction=left]:h-full data-[swipe-direction=left]:max-h-dvh data-[swipe-direction=left]:w-[23rem] data-[swipe-direction=left]:max-w-[calc(100vw-3rem)] data-[swipe-direction=left]:transform-[translateX(var(--drawer-swipe-movement-x))] data-[swipe-direction=left]:rounded-none data-[swipe-direction=left]:rounded-r-2xl data-[swipe-direction=left]:pb-md data-[swipe-direction=left]:pl-[4.5rem] data-[swipe-direction=left]:shadow-[8px_0_24px_var(--color-shadow)] data-[swipe-direction=left]:data-ending-style:transform-[translateX(calc(-100%+3rem-2px))] data-[swipe-direction=left]:data-starting-style:transform-[translateX(calc(-100%+3rem-2px))]`),aU=({className:e,children:t,ref:n,...r})=>(0,L.jsxs)(Qm,{children:[(0,L.jsx)(Sm,{className:nU}),(0,L.jsx)(zh,{className:rU,children:(0,L.jsx)(Zm,{className:Q(iU,e),ref:n,...r,children:t})})]}),oU=({className:e,children:t,ref:n,...r})=>(0,L.jsx)(xh,{className:Q(`style-text-strong-1`,e),ref:n,...r,children:t}),sU=({className:e,children:t,ref:n,...r})=>(0,L.jsx)(`div`,{className:Q(`flex items-start justify-between pb-sm`,e),ref:n,...r,children:t}),cU=e=>{if(e<1e3)return`${e} B`;let t=[`KB`,`MB`,`GB`,`TB`],n=e/1e3,r=0;for(;n>=1e3&&r<t.length-1;)n/=1e3,r+=1;return`${n.toFixed(n%1==0?0:1)}${t[r]}`},lU=e=>`${e.name}-${e.size}-${e.lastModified}`,uU=(e,t)=>{if(t.length===0)return!0;let n=e.name.toLowerCase(),r=e.type.toLowerCase();return t.some(e=>{let t=e.toLowerCase();return t.startsWith(`.`)?n.endsWith(t):t.endsWith(`/*`)?r.startsWith(`${t.slice(0,-1)}`):r===t})},dU=_.createContext(null),fU=({maxFiles:e,maxFileSize:t,maxFilesErrorLabel:n=e=>`You can select up to ${e} file${e===1?``:`s`}.`,maxFileSizeErrorLabel:r=(e,t)=>`"${e}" exceeds the maximum size of ${t}.`,fileTypeErrorLabel:i=e=>`"${e}" is not an accepted file type.`,onUpload:a,ref:o,className:s,children:c,onChange:l,onConfirm:u,...d})=>{let f=_.useRef(null),p=_.useRef([]),[m,h]=_.useState(!1),[g,v]=_.useState([]),[y,b]=_.useState(null),[x,S]=_.useState({});_.useEffect(()=>{p.current=g},[g]);let C=_.useMemo(()=>typeof d.accept==`string`?d.accept.split(`,`).map(e=>e.trim()).filter(Boolean):[],[d.accept]),w=_.useCallback(e=>{if(!f.current)return;let t=new DataTransfer;e.forEach(e=>t.items.add(e)),f.current.files=t.files},[]),T=_.useCallback(e=>d.multiple?[...p.current,...e].filter((e,t,n)=>n.findIndex(t=>t.name===e.name&&t.size===e.size&&t.lastModified===e.lastModified)===t):e.slice(0,1),[d.multiple]),E=_.useCallback(e=>{let t=lU(e);v(t=>{let n=t.filter(t=>t!==e);return p.current=n,w(n),n}),S(e=>{let n={...e};return delete n[t],n}),b(null)},[w]),D=_.useCallback(e=>{e.forEach(e=>{let t=lU(e);if(!a){S(e=>({...e,[t]:100}));return}S(e=>({...e,[t]:0})),a(e,e=>{S(n=>({...n,[t]:Math.max(0,Math.min(100,e))}))})})},[a]),O=_.useCallback(a=>{let o=a.filter(e=>!uU(e,C));if(o.length>0)return{acceptedFiles:null,error:i(o[0].name)};let s=t===void 0?[]:a.filter(e=>e.size>t),c=t===void 0?a:a.filter(e=>e.size<=t);return e!==void 0&&c.length>e?{acceptedFiles:null,error:n(e)}:{acceptedFiles:c,error:s.length>0&&t!==void 0?r(s[0].name,cU(t)):null}},[C,i,e,t,n,r]);return(0,L.jsx)(dU.Provider,{value:{acceptedFileTypes:C,fileError:y,fileProgress:x,files:g,handleDragLeave:()=>{h(!1)},handleDragOver:e=>{e.preventDefault(),h(!0)},handleDrop:e=>{e.preventDefault();let t=Array.from(e.dataTransfer.files),n=p.current,r=T(t),{acceptedFiles:i,error:a}=O(r);if(!i){b(a),h(!1);return}b(a);let o=new Set(n.map(lU)),s=i.filter(e=>!o.has(lU(e)));p.current=i,v(i),w(i),D(s),f.current&&l?.({target:f.current,currentTarget:f.current}),h(!1)},handleFiles:e=>{let t=e.target.files?Array.from(e.target.files):[],n=p.current,r=T(t),{acceptedFiles:i,error:a}=O(r);if(!i){b(a),w(n);return}b(a);let o=new Set(n.map(lU)),s=i.filter(e=>!o.has(lU(e)));p.current=i,v(i),w(i),D(s),f.current&&l?.({target:f.current,currentTarget:f.current})},inputRef:f,isHovering:m,maxFileSize:t===void 0?void 0:cU(t),maxFiles:e,onConfirm:u,onUpload:a,props:d,removeFile:E,setFiles:v},children:(0,L.jsx)(`div`,{className:Q(`space-y-md`,s),ref:o,children:c})})},pU=()=>{let e=_.useContext(dU);if(!e)throw Error(`useDropzone must be used within a DropzoneProvider`);return e},mU=({className:e,children:t,...n})=>{let{fileError:r,handleDragLeave:i,handleDragOver:a,handleDrop:o,handleFiles:s,inputRef:c,isHovering:l,props:u}=pU(),d=u.disabled??!1;return(0,L.jsxs)(`div`,{"aria-disabled":d,"aria-invalid":r?!0:void 0,onClick:()=>{d||c.current?.click()},onDragLeave:i,onDragOver:a,onDrop:o,className:Q(`flex size-full items-center justify-center rounded-xl border-2 border-brand-border bg-surface py-2xl transition-all outline-none focus-visible:outline-2 focus-visible:outline-brand-border-strong`,!d&&`cursor-pointer`,l&&`ring-8 ring-brand-border-strong/20`,r&&`border-error-border`,d&&`cursor-not-allowed opacity-50`,e),...n,children:[(0,L.jsx)(`div`,{className:`flex flex-col items-center justify-center gap-lg`,children:t}),(0,L.jsx)(`input`,{...u,hidden:!0,onChange:s,onClick:e=>{e.currentTarget.value=``},ref:c,type:`file`})]})},hU=({className:e,children:t,ref:n,...r})=>{let{fileError:i}=pU();return!i&&!t?null:(0,L.jsxs)(`p`,{className:Q(`flex items-center gap-2xs style-text-strong--1 text-error-default`,e),ref:n,role:`alert`,...r,children:[(0,L.jsx)(Vi,{weight:`bold`}),t??i]})},gU=nr(``,{variants:{orientation:{horizontal:`flex items-center justify-between gap-xs [&_[data-track]]:w-full [&_button]:shrink-0`,vertical:`flex flex-col space-y-3xs`},size:{small:`[&_[data-track]]:h-3xs`,medium:`[&_[data-track]]:h-2xs`,large:`[&_[data-track]]:h-xs`},tone:{brand:`[&_[data-indicator]]:bg-brand-default`,accent:`[&_[data-indicator]]:bg-accent-default`,neutral:`[&_[data-indicator]]:bg-neutral-default`,error:`[&_[data-indicator]]:bg-error-default`,info:`[&_[data-indicator]]:bg-info-default`,success:`[&_[data-indicator]]:bg-success-default`,warning:`[&_[data-indicator]]:bg-warning-default`}},defaultVariants:{orientation:`vertical`,size:`medium`,tone:`brand`}}),_U=({orientation:e,size:t,tone:n,className:r,children:i,ref:a,...o})=>(0,L.jsx)(ug,{className:Q(gU({orientation:e,size:t,tone:n,className:r})),ref:a,...o,children:i}),vU=({className:e,children:t,ref:n,...r})=>(0,L.jsx)(`div`,{className:Q(`flex items-center justify-between`,e),ref:n,...r,children:t}),yU=({className:e,children:t,ref:n,...r})=>(0,L.jsx)(fg,{"data-indicator":!0,className:Q(`rounded-full transition-[width] duration-300 ease-in-out`,e),ref:n,...r,children:t}),bU=({className:e,children:t,ref:n,...r})=>(0,L.jsx)(mg,{className:Q(`flex items-center gap-2xs style-text-strong--1 text-on-surface [&>svg]:size-xs`,e),ref:n,...r,children:t}),xU=({className:e,children:t,ref:n,...r})=>(0,L.jsx)(dg,{className:Q(`w-full self-center rounded-full bg-surface-low inset-shadow-2xs`,e),"data-track":!0,ref:n,...r,children:t}),SU=({className:e,ref:t,...n})=>(0,L.jsx)(pg,{className:Q(`ml-auto text-right style-text-prose--2 text-on-surface-variant`,e),ref:t,...n}),CU=({className:e,children:t,ref:n,...r})=>(0,L.jsx)(`div`,{className:Q(`flex items-center justify-between`,e),ref:n,...r,children:t}),wU=({className:e,children:t,ref:n,...r})=>(0,L.jsx)(`span`,{className:Q(`text-left style-text-prose--2 whitespace-nowrap text-on-surface-variant`,e),ref:n,...r,children:t}),TU=({className:e,children:t,ref:n,...r})=>{let{files:i,fileProgress:a,removeFile:o,onUpload:s}=pU();return(0,L.jsxs)(`ul`,{className:Q(`flex flex-col gap-xs`,e),ref:n,...r,children:[i.map((e,t)=>{let n=a[lU(e)]??0,r=n>=0&&n<100,i=n>=100;return(0,L.jsxs)(`li`,{className:Q(`flex items-center justify-between gap-lg rounded-xl border bg-surface px-md py-sm`,r&&`border-border`,i&&`border-border`),children:[r&&(0,L.jsx)(`div`,{className:`flex items-center justify-center rounded-full bg-brand-container p-xs`,children:(0,L.jsx)(Ci,{className:`size-md text-brand-on-container`})}),i&&(0,L.jsx)(`div`,{className:`flex items-center justify-center rounded-full bg-success-container p-xs`,children:(0,L.jsx)(hi,{className:`size-md text-success-on-container`})}),(0,L.jsxs)(`div`,{className:`flex w-full flex-col justify-between gap-3xs`,children:[(0,L.jsx)(`span`,{className:`style-text-default-0`,children:e.name}),s?(0,L.jsxs)(_U,{orientation:`vertical`,tone:n>=100?`success`:`brand`,value:n,children:[(0,L.jsx)(xU,{children:(0,L.jsx)(yU,{})}),(0,L.jsxs)(CU,{children:[(0,L.jsx)(`span`,{className:`style-text-prose--1 text-on-surface-variant`,children:cU(e.size)}),(0,L.jsx)(SU,{})]})]}):(0,L.jsx)(`span`,{className:`style-text-prose--1 text-on-surface-variant`,children:cU(e.size)})]}),(0,L.jsx)(Gb,{variant:`ghost`,tone:`error`,onClick:()=>o(e),children:(0,L.jsx)(Ri,{weight:`bold`})})]},t)}),t]})},EU=({className:e,children:t,ref:n,...r})=>{let{maxFileSize:i}=pU();return(0,L.jsxs)(`span`,{className:Q(``,e),ref:n,...r,children:[t,i]})},DU=({className:e,children:t,ref:n,...r})=>{let{acceptedFileTypes:i}=pU();return(0,L.jsxs)(`span`,{className:Q(``,e),ref:n,...r,children:[i.join(`, `),t]})},OU=({className:e,children:t,ref:n,...r})=>(0,L.jsx)(`span`,{className:Q(`style-text-default-0`,e),ref:n,...r,children:t}),kU=({className:e,children:t,ref:n,...r})=>(0,L.jsx)(`div`,{className:Q(`rounded-full bg-brand-container p-sm [&>svg]:size-lg [&>svg]:text-brand-on-container`,e),ref:n,...r,children:t}),AU=({className:e,children:t,ref:n,...r})=>(0,L.jsx)(`span`,{className:Q(`text-on-surface-variant`,e),ref:n,...r,children:t}),jU=({className:e,children:t,ref:n,...r})=>{let{inputRef:i}=pU();return(0,L.jsx)(Gb,{variant:`link`,onClick:e=>{e.stopPropagation(),i.current?.click()},className:Q(``,e),ref:n,...r,children:t})},MU=({className:e,children:t,ref:n,...r})=>(0,L.jsx)(`div`,{className:Q(`flex flex-col items-center justify-center gap-2xs`,e),ref:n,...r,children:t}),NU=({className:e,children:t,ref:n,...r})=>(0,L.jsx)(`div`,{className:Q(`flex flex-col gap-xs`,e),ref:n,...r,children:t}),PU=({className:e,children:t,ref:n,...r})=>(0,L.jsx)(`div`,{className:Q(`flex items-center justify-between gap-sm`,e),ref:n,...r,children:t}),FU=({className:e,children:t,ref:n,...r})=>(0,L.jsx)(`span`,{className:Q(`style-text-default-0`,e),ref:n,...r,children:t}),IU=({className:e,children:t,ref:n,...r})=>(0,L.jsx)(`div`,{className:Q(`flex items-center gap-xs`,e),ref:n,...r,children:t}),LU=({className:e,children:t,ref:n,...r})=>{let{files:i,onConfirm:a}=pU();return(0,L.jsx)(Gb,{disabled:i.length===0,onClick:()=>{a&&a(i)},className:Q(`w-full`,e),ref:n,...r,children:t})},RU=({className:e,children:t,ref:n,...r})=>{let{files:i,setFiles:a}=pU();return(0,L.jsx)(Gb,{disabled:i.length===0,onClick:()=>a([]),tone:`error`,variant:`outline`,className:Q(`w-full`,e),ref:n,...r,children:t})},zU=({className:e,children:t,ref:n,...r})=>(0,L.jsx)(`div`,{className:Q(`flex flex-col gap-2xs`,e),ref:n,...r,children:t}),BU=({className:e,children:t,ref:n,...r})=>(0,L.jsx)(`p`,{className:Q(`style-text-prose--1 text-on-surface-variant`,e),ref:n,...r,children:t});function VU({update:e,notify:t,unwatched:n}){return{link:r,unlink:i,propagate:a,checkDirty:o,shallowPropagate:s};function r(e,t,n){let r=t.depsTail;if(r!==void 0&&r.dep===e)return;let i=r===void 0?t.deps:r.nextDep;if(i!==void 0&&i.dep===e){i.version=n,t.depsTail=i;return}let a=e.subsTail;if(a!==void 0&&a.version===n&&a.sub===t)return;let o=t.depsTail=e.subsTail={version:n,dep:e,sub:t,prevDep:r,nextDep:i,prevSub:a,nextSub:void 0};i!==void 0&&(i.prevDep=o),r===void 0?t.deps=o:r.nextDep=o,a===void 0?e.subs=o:a.nextSub=o}function i(e,t=e.sub){let r=e.dep,i=e.prevDep,a=e.nextDep,o=e.nextSub,s=e.prevSub;return a===void 0?t.depsTail=i:a.prevDep=i,i===void 0?t.deps=a:i.nextDep=a,o===void 0?r.subsTail=s:o.prevSub=s,s===void 0?(r.subs=o)===void 0&&n(r):s.nextSub=o,a}function a(e){let n=e.nextSub,r;top:do{let i=e.sub,a=i.flags;if(a&60?a&12?a&4?!(a&48)&&c(e,i)?(i.flags=a|40,a&=1):a=0:i.flags=a&-9|32:a=0:i.flags=a|32,a&2&&t(i),a&1){let t=i.subs;if(t!==void 0){let i=(e=t).nextSub;i!==void 0&&(r={value:n,prev:r},n=i);continue}}if((e=n)!==void 0){n=e.nextSub;continue}for(;r!==void 0;)if(e=r.value,r=r.prev,e!==void 0){n=e.nextSub;continue top}break}while(1)}function o(t,n){let r,i=0,a=!1;top:do{let o=t.dep,c=o.flags;if(n.flags&16)a=!0;else if((c&17)==17){if(e(o)){let e=o.subs;e.nextSub!==void 0&&s(e),a=!0}}else if((c&33)==33){(t.nextSub!==void 0||t.prevSub!==void 0)&&(r={value:t,prev:r}),t=o.deps,n=o,++i;continue}if(!a){let e=t.nextDep;if(e!==void 0){t=e;continue}}for(;i--;){let i=n.subs,o=i.nextSub!==void 0;if(o?(t=r.value,r=r.prev):t=i,a){if(e(n)){o&&s(i),n=t.sub;continue}a=!1}else n.flags&=-33;n=t.sub;let c=t.nextDep;if(c!==void 0){t=c;continue top}}return a}while(1)}function s(e){do{let n=e.sub,r=n.flags;(r&48)==32&&(n.flags=r|16,(r&6)==2&&t(n))}while((e=e.nextSub)!==void 0)}function c(e,t){let n=t.depsTail;for(;n!==void 0;){if(n===e)return!0;n=n.prevDep}return!1}}function HU(e,t,n){let r=typeof e==`object`,i=r?e:void 0;return{next:(r?e.next:e)?.bind(i),error:(r?e.error:t)?.bind(i),complete:(r?e.complete:n)?.bind(i)}}var UU=[],WU=0,{link:GU,unlink:KU,propagate:qU,checkDirty:JU,shallowPropagate:YU}=VU({update(e){return e._update()},notify(e){UU[ZU++]=e,e.flags&=-3},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=17,tW(e))}}),XU=0,ZU=0,QU,$U=0;function eW(e){try{++$U,e()}finally{--$U||nW()}}function tW(e){let t=e.depsTail,n=t===void 0?e.deps:t.nextDep;for(;n!==void 0;)n=KU(n,e)}function nW(){if(!($U>0)){for(;XU<ZU;){let e=UU[XU];UU[XU++]=void 0,e.notify()}XU=0,ZU=0}}function rW(e,t){let n=typeof e==`function`,r=e,i={_snapshot:n?void 0:e,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:+!n,get(){return QU!==void 0&&GU(i,QU,WU),i._snapshot},subscribe(e){let t=HU(e),n={current:!1},r=iW(()=>{i.get(),n.current?t.next?.(i._snapshot):n.current=!0});return{unsubscribe:()=>{r.stop()}}},_update(e){let a=QU,o=t?.compare??Object.is;if(n)QU=i,++WU,i.depsTail=void 0;else if(e===void 0)return!1;n&&(i.flags=5);try{let t=i._snapshot,a=typeof e==`function`?e(t):e===void 0&&n?r(t):e;return t===void 0||!o(t,a)?(i._snapshot=a,!0):!1}finally{QU=a,n&&(i.flags&=-5),tW(i)}}};return n?(i.flags=17,i.get=function(){let e=i.flags;if(e&16||e&32&&JU(i.deps,i)){if(i._update()){let e=i.subs;e!==void 0&&YU(e)}}else e&32&&(i.flags=e&-33);return QU!==void 0&&GU(i,QU,WU),i._snapshot}):i.set=function(e){if(i._update(e)){let e=i.subs;e!==void 0&&(qU(e),YU(e),nW())}},i}function iW(e){let t=()=>{let t=QU;QU=n,++WU,n.depsTail=void 0,n.flags=6;try{return e()}finally{QU=t,n.flags&=-5,tW(n)}},n={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:6,notify(){let e=this.flags;e&16||e&32&&JU(this.deps,this)?t():this.flags=2},stop(){this.flags=0,this.depsTail=void 0,tW(this)}};return t(),n}var aW=class{constructor(e,t){this.atom=rW(e),this.get=this.get.bind(this),this.setState=this.setState.bind(this),this.subscribe=this.subscribe.bind(this),t&&(this.actions=t(this))}setState(e){this.atom.set(e)}get state(){return this.atom.get()}get(){return this.state}subscribe(e){return this.atom.subscribe(HU(e))}},oW=class{constructor(e){this.atom=rW(e)}get state(){return this.atom.get()}get(){return this.state}subscribe(e){return this.atom.subscribe(HU(e))}};function sW(e,t){return typeof e==`function`?new oW(e):t?new aW(e,t):new aW(e)}function cW(e,t){if(Object.is(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(let[n,r]of e)if(!t.has(n)||!Object.is(r,t.get(n)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();let n=lW(e);if(n.length!==lW(t).length)return!1;for(let r=0;r<n.length;r++)if(!Object.prototype.hasOwnProperty.call(t,n[r])||!Object.is(e[n[r]],t[n[r]]))return!1;return!0}function lW(e){return Object.keys(e).concat(Object.getOwnPropertySymbols(e))}var uW=class{constructor(e,t){this.fn=e,this.options=t,this.lastExecutionTime=0,this.isPending=!1,this.maybeExecute=(...e)=>{let t=Date.now()-this.lastExecutionTime;if(this.options.leading&&t>=this.options.wait)this.execute(...e);else if(this.lastArgs=e,!this.timeoutId&&this.options.trailing){let e=this.options.wait-t;this.isPending=!0,this.timeoutId=setTimeout(()=>{this.lastArgs!==void 0&&this.execute(...this.lastArgs)},e)}},this.execute=(...e)=>{this.fn(...e),this.options.onExecute?.(e,this),this.lastExecutionTime=Date.now(),this.clearTimeout(),this.lastArgs=void 0,this.isPending=!1},this.flush=()=>{this.isPending&&this.lastArgs&&this.execute(...this.lastArgs)},this.cancel=()=>{this.clearTimeout(),this.lastArgs=void 0,this.isPending=!1},this.clearTimeout=()=>{this.timeoutId&&=(clearTimeout(this.timeoutId),void 0)},this.options.leading===void 0&&this.options.trailing===void 0&&(this.options.leading=!0,this.options.trailing=!0)}};function dW(e,t){return new uW(e,t).maybeExecute}var fW=class{#e=!0;#t;#n;#r;#i;#a;#o;#s;#c=0;#l=5;#u=!1;#d=!1;#f=null;#p=()=>{this.debugLog(`Connected to event bus`),this.#a=!0,this.#u=!1,this.debugLog(`Emitting queued events`,this.#i),this.#i.forEach(e=>this.emitEventToBus(e)),this.#i=[],this.stopConnectLoop(),this.#n().removeEventListener(`tanstack-connect-success`,this.#p)};#m=()=>{if(this.#c<this.#l){this.#c++,this.dispatchCustomEvent(`tanstack-connect`,{});return}this.#n().removeEventListener(`tanstack-connect`,this.#m),this.#d=!0,this.debugLog(`Max retries reached, giving up on connection`),this.stopConnectLoop()};#h=()=>{this.#u||(this.#u=!0,this.#n().addEventListener(`tanstack-connect-success`,this.#p),this.#m())};constructor({pluginId:e,debug:t=!1,enabled:n=!0,reconnectEveryMs:r=300}){this.#t=e,this.#e=n,this.#n=this.getGlobalTarget,this.#r=t,this.debugLog(` Initializing event subscription for plugin`,this.#t),this.#i=[],this.#a=!1,this.#d=!1,this.#o=null,this.#s=r}startConnectLoop(){this.#o!==null||this.#a||(this.debugLog(`Starting connect loop (every ${this.#s}ms)`),this.#o=setInterval(this.#m,this.#s))}stopConnectLoop(){this.#u=!1,this.#o!==null&&(clearInterval(this.#o),this.#o=null,this.#i=[],this.debugLog(`Stopped connect loop`))}debugLog(...e){this.#r&&console.log(`🌴 [tanstack-devtools:${this.#t}-plugin]`,...e)}getGlobalTarget(){if(typeof globalThis<`u`&&globalThis.__TANSTACK_EVENT_TARGET__)return this.debugLog(`Using global event target`),globalThis.__TANSTACK_EVENT_TARGET__;if(typeof window<`u`&&window.addEventListener!==void 0)return this.debugLog(`Using window as event target`),window;let e=typeof EventTarget<`u`?new EventTarget:void 0;return e===void 0||e.addEventListener===void 0?(this.debugLog(`No event mechanism available, running in non-web environment`),{addEventListener:()=>{},removeEventListener:()=>{},dispatchEvent:()=>!1}):(this.debugLog(`Using new EventTarget as fallback`),e)}getPluginId(){return this.#t}dispatchCustomEventShim(e,t){try{let n=new Event(e,{detail:t});this.#n().dispatchEvent(n)}catch{this.debugLog(`Failed to dispatch shim event`)}}dispatchCustomEvent(e,t){try{this.#n().dispatchEvent(new CustomEvent(e,{detail:t}))}catch{this.dispatchCustomEventShim(e,t)}}emitEventToBus(e){this.debugLog(`Emitting event to client bus`,e),this.dispatchCustomEvent(`tanstack-dispatch-event`,e)}createEventPayload(e,t){return{type:`${this.#t}:${e}`,payload:t,pluginId:this.#t}}emit(e,t){if(!this.#e){this.debugLog(`Event bus client is disabled, not emitting event`,e,t);return}if(this.#f&&(this.debugLog(`Emitting event to internal event target`,e,t),this.#f.dispatchEvent(new CustomEvent(`${this.#t}:${e}`,{detail:this.createEventPayload(e,t)}))),this.#d){this.debugLog(`Previously failed to connect, not emitting to bus`);return}if(!this.#a){this.debugLog(`Bus not available, will be pushed as soon as connected`),this.#i.push(this.createEventPayload(e,t)),typeof CustomEvent<`u`&&!this.#u&&(this.#h(),this.startConnectLoop());return}return this.emitEventToBus(this.createEventPayload(e,t))}on(e,t,n){let r=n?.withEventTarget??!1,i=`${this.#t}:${e}`;if(r&&(this.#f||=new EventTarget,this.#f.addEventListener(i,e=>{t(e.detail)})),!this.#e)return this.debugLog(`Event bus client is disabled, not registering event`,i),()=>{};let a=e=>{this.debugLog(`Received event from bus`,e.detail),t(e.detail)};return this.#n().addEventListener(i,a),this.debugLog(`Registered event to bus`,i),()=>{r&&this.#f?.removeEventListener(i,a),this.#n().removeEventListener(i,a)}}onAll(e){if(!this.#e)return this.debugLog(`Event bus client is disabled, not registering event`),()=>{};let t=t=>{let n=t.detail;e(n)};return this.#n().addEventListener(`tanstack-devtools-global`,t),()=>this.#n().removeEventListener(`tanstack-devtools-global`,t)}onAllPluginEvents(e){if(!this.#e)return this.debugLog(`Event bus client is disabled, not registering event`),()=>{};let t=t=>{let n=t.detail;this.#t&&n.pluginId!==this.#t||e(n)};return this.#n().addEventListener(`tanstack-devtools-global`,t),()=>this.#n().removeEventListener(`tanstack-devtools-global`,t)}},pW=new class extends fW{constructor(){super({pluginId:`form-devtools`,reconnectEveryMs:1e3})}};function mW(e,t){return typeof e==`function`?e(t):e}function hW(e,t){return CW(t).reduce((e,t)=>{if(e===null)return null;if(e!==void 0)return e[t]},e)}function gW(e,t,n){let r=CW(t);function i(e){if(!r.length)return mW(n,e);let t=r.shift();if(typeof t==`string`||typeof t==`number`&&!Array.isArray(e))return typeof e==`object`?(e===null&&(e={}),{...e,[t]:i(e[t])}):{[t]:i()};if(Array.isArray(e)&&typeof t==`number`){let n=e.slice(0,t);return[...n.length?n:Array(t),i(e[t]),...e.slice(t+1)]}return[...Array(t),i()]}return i(e)}function _W(e,t){let n=CW(t);function r(e){if(!e)return;if(n.length===1){let t=n[0];if(Array.isArray(e)&&typeof t==`number`)return e.filter((e,n)=>n!==t);let{[t]:r,...i}=e;return i}let t=n.shift();if((typeof t==`string`||typeof t==`number`&&!Array.isArray(e))&&typeof e==`object`)return{...e,[t]:r(e[t])};if(typeof t==`number`&&Array.isArray(e)){if(t>=e.length)return e;let n=e.slice(0,t);return[...n.length?n:Array(t),r(e[t]),...e.slice(t+1)]}throw Error(`It seems we have created an infinite loop in deleteBy. `)}return r(e)}var vW=46,yW=91,bW=93,xW=48,SW=57;function CW(e){if(Array.isArray(e))return[...e];if(typeof e!=`string`)throw Error(`Path must be a string.`);let t=e.length,n=[],r=+(t>0&&e.charCodeAt(0)===yW),i=!0,a=-1;for(let o=r;o<=t;o++){let s=o<t?e.charCodeAt(o):-1;if(o===t||s===vW||s===yW||s===bW){let t=o-r;if(t>0){let a=i&&(t===1||e.charCodeAt(r)!==xW),s=e.slice(r,o);if(a){let e=parseInt(s,10);t<=15||String(e)===s?n.push(e):n.push(s)}else n.push(s)}else a!==bW&&(a!==-1||s!==bW)&&(a!==s||s!==vW&&s!==yW)&&n.push(``);r=o+1,i=!0}else(s<xW||s>SW)&&(i=!1);a=s}return n.length||n.push(``),n}function wW(e,t){return e.length===0?t:t.length===0?e:t.startsWith(`[`)||t.startsWith(`.`)?e+t:`${e}.${t}`}function TW(e){return!(Array.isArray(e)&&e.length===0)}function EW(e,t){return t.validationLogic({form:t.form,group:t.group,validators:t.validators,event:{type:e,fieldName:t.fieldName,async:!1},runValidation:e=>e.validators.filter(Boolean).map(e=>({cause:e.cause,validate:e.fn}))})}function DW(e,t){let{asyncDebounceMs:n}=t,{onBlurAsyncDebounceMs:r,onChangeAsyncDebounceMs:i,onDynamicAsyncDebounceMs:a}=t.validators||{},o=n??0;return t.validationLogic({form:t.form,group:t.group,validators:t.validators,event:{type:e,fieldName:t.fieldName,async:!0},runValidation:t=>t.validators.filter(Boolean).map(t=>{let n=t?.cause||e,s=o;switch(n){case`change`:s=i??o;break;case`blur`:s=r??o;break;case`dynamic`:s=a??o;break;case`submit`:s=0}return e===`submit`&&(s=0),{cause:n,validate:t.fn,debounceMs:s}})})}var OW=e=>!!e&&typeof e==`object`&&`fields`in e;function kW(e,t){if(Object.is(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(let[n,r]of e)if(!t.has(n)||!Object.is(r,t.get(n)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length||n.length===0&&!Array.isArray(e)&&!Array.isArray(t)&&(Object.getPrototypeOf(e)!==Object.prototype||Object.getPrototypeOf(t)!==Object.prototype))return!1;for(let i of n)if(!r.includes(i)||!kW(e[i],t[i]))return!1;return!0}var AW=({newFormValidatorError:e,isPreviousErrorFromFormValidator:t,previousErrorValue:n})=>e?{newErrorValue:e,newSource:`form`}:t?{newErrorValue:void 0,newSource:void 0}:n?{newErrorValue:n,newSource:`field`}:{newErrorValue:void 0,newSource:void 0},jW=({formLevelError:e,fieldLevelError:t})=>t?{newErrorValue:t,newSource:`field`}:e?{newErrorValue:e,newSource:`form`}:{newErrorValue:void 0,newSource:void 0};function MW(e,t){return e==null?t:{...e,...t}}for(var NW=256,PW=[],FW;NW--;)PW[NW]=(NW+256).toString(16).substring(1);function IW(){let e=0,t,n=``;if(!FW||NW+16>256){for(FW=Array(256),e=256;e--;)FW[e]=256*Math.random()|0;e=0,NW=0}for(;e<16;e++)t=FW[NW+e],n+=e===6?PW[t&15|64]:e===8?PW[t&63|128]:PW[t],e&1&&e>1&&e<11&&(n+=`-`);return NW++,n}var LW=dW(e=>pW.emit(`form-state`,{id:e.formId,state:e.store.state}),{wait:300});function RW(e){if(typeof e!=`object`||!e)return e;if(e instanceof Date)return new Date(e.getTime());if(Array.isArray(e)){let t=[];for(let n=0;n<e.length;n++)t[n]=RW(e[n]);return t}if(e instanceof Map){let t=new Map;return e.forEach((e,n)=>{t.set(n,RW(e))}),t}if(e instanceof Set){let t=new Set;return e.forEach(e=>{t.add(RW(e))}),t}let t={};for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=RW(e[n]));return t}function zW(e,t){return t===e||t.startsWith(`${e}.`)||t.startsWith(`${e}[`)}var BW=e=>{if(!e.validators)return e.runValidation({validators:[],form:e.form});let t=e.event.async,n=t?void 0:{fn:e.validators.onMount,cause:`mount`},r={fn:t?e.validators.onChangeAsync:e.validators.onChange,cause:`change`},i={fn:t?e.validators.onBlurAsync:e.validators.onBlur,cause:`blur`},a={fn:t?e.validators.onSubmitAsync:e.validators.onSubmit,cause:`submit`},o=t?void 0:{fn:()=>void 0,cause:`server`};switch(e.event.type){case`mount`:return e.runValidation({validators:[n],form:e.form});case`submit`:return e.runValidation({validators:[r,i,a,o],form:e.form});case`server`:return e.runValidation({validators:[],form:e.form});case`blur`:return e.runValidation({validators:[i,o],form:e.form});case`change`:return e.runValidation({validators:[r,o],form:e.form});default:throw Error(`Unknown validation event type: ${e.event.type}`)}};function VW(e,t){let n=new Map;for(let r of e){let e=r.path??[],i=t,a=``;for(let t=0;t<e.length;t++){let n=e[t];if(n===void 0)continue;let r=typeof n==`object`?n.key:n,o=Number(r);a+=Array.isArray(i)&&!Number.isNaN(o)?`[${o}]`:(t>0?`.`:``)+String(r),i=typeof i==`object`&&i?i[r]:void 0}n.set(a,(n.get(a)??[]).concat(r))}return Object.fromEntries(n)}var HW=(e,t)=>{let n=VW(e,t);return{form:n,fields:n}},UW={validate({value:e,validationSource:t},n){let r=n[`~standard`].validate(e);if(r instanceof Promise)throw Error(`async function passed to sync validator`);if(r.issues)return t===`field`?r.issues:HW(r.issues,e)},async validateAsync({value:e,validationSource:t},n){let r=await n[`~standard`].validate(e);if(r.issues)return t===`field`?r.issues:HW(r.issues,e)}},WW=e=>!!e&&`~standard`in e,GW={isValidating:!1,isTouched:!1,isBlurred:!1,isDirty:!1,isPristine:!0,isValid:!0,isDefaultValue:!0,errors:[],errorMap:{},errorSourceMap:{},_arrayVersion:0,_pendingValidationsCount:0};function KW(e){function t(t){let n=e.getFieldMeta(t)??GW;e.setFieldMeta(t,{...n,_arrayVersion:(n._arrayVersion||0)+1})}function n(n,r,i){t(n);let a=s(n,r,`move`,i),c=Math.min(r,i),u=Math.max(r,i);for(let e=c;e<=u;e++)a.push(o(n,e));let d=Object.keys(e.fieldInfo).reduce((t,i)=>(i.startsWith(o(n,r))&&t.set(i,e.getFieldMeta(i)),t),new Map);l(a,r<i?`up`:`down`),Object.keys(e.fieldInfo).filter(e=>e.startsWith(o(n,i))).forEach(t=>{let a=t.replace(o(n,i),o(n,r)),s=d.get(a);s&&e.setFieldMeta(t,s)})}function r(e,n){t(e),l(s(e,n,`remove`),`up`)}function i(n,r,i){t(n),s(n,r,`swap`,i).forEach(t=>{if(!t.toString().startsWith(o(n,r)))return;let a=t.toString().replace(o(n,r),o(n,i)),[s,c]=[e.getFieldMeta(t),e.getFieldMeta(a)];s&&e.setFieldMeta(a,s),c&&e.setFieldMeta(t,c)})}function a(n,r){t(n);let i=s(n,r,`insert`);l(i,`down`),i.forEach(t=>{t.toString().startsWith(o(n,r))&&e.setFieldMeta(t,u())})}function o(e,t){return`${e}[${t}]`}function s(t,n,r,i){let a=[o(t,n)];switch(r){case`swap`:a.push(o(t,i));break;case`move`:{let[e,r]=[Math.min(n,i),Math.max(n,i)];for(let n=e;n<=r;n++)a.push(o(t,n));break}default:{let r=e.getFieldValue(t),i=Array.isArray(r)?r.length:0;for(let e=n+1;e<i;e++)a.push(o(t,e));break}}return Object.keys(e.fieldInfo).filter(e=>a.some(t=>e.startsWith(t)))}function c(e,t){return e.replace(/\[(\d+)\]/,(e,n)=>{let r=parseInt(n,10);return`[${t===`up`?r+1:Math.max(0,r-1)}]`})}function l(t,n){(n===`up`?t:[...t].reverse()).forEach(t=>{let r=c(t.toString(),n),i=e.getFieldMeta(r);i?e.setFieldMeta(t,i):e.setFieldMeta(t,u())})}let u=()=>GW;return{bumpArrayVersion:t,handleArrayMove:n,handleArrayRemove:r,handleArraySwap:i,handleArrayInsert:a}}function qW(e){return{values:e.values??{},errorMap:e.errorMap??{},fieldMetaBase:e.fieldMetaBase??{},formGroupStateBase:e.formGroupStateBase??{},isSubmitted:e.isSubmitted??!1,isSubmitting:e.isSubmitting??!1,isValidating:e.isValidating??!1,submissionAttempts:e.submissionAttempts??0,isSubmitSuccessful:e.isSubmitSuccessful??!1,validationMetaMap:e.validationMetaMap??{onChange:void 0,onBlur:void 0,onSubmit:void 0,onMount:void 0,onServer:void 0,onDynamic:void 0}}}var JW=class{constructor(e){this.options={},this.fieldInfo={},this.formGroupApis=new Set,this.mount=()=>{let e=this.store.subscribe(()=>{LW(this)}),t=pW.on(`request-form-state`,e=>{e.payload.id===this._formId&&pW.emit(`form-api`,{id:this._formId,state:this.store.state,options:this.options})}),n=pW.on(`request-form-reset`,e=>{e.payload.id===this._formId&&this.reset()}),r=pW.on(`request-form-force-submit`,e=>{e.payload.id===this._formId&&(this._devtoolsSubmissionOverride=!0,this.handleSubmit(),this._devtoolsSubmissionOverride=!1)}),i=()=>{r(),n(),t(),e.unsubscribe(),pW.emit(`form-unmounted`,{id:this._formId})};this.options.listeners?.onMount?.({formApi:this});let{onMount:a}=this.options.validators||{};return pW.emit(`form-api`,{id:this._formId,state:this.store.state,options:this.options}),a&&this.validateSync(`mount`),i},this.update=e=>{if(!e)return;let t=this.options;this.options=e;let n=e.defaultValues&&!kW(e.defaultValues,t.defaultValues)&&!this.state.isTouched,r=!kW(e.defaultState,t.defaultState)&&!this.state.isTouched;if(n||r){if(eW(()=>{this.baseStore.setState(()=>qW(Object.assign({},this.state,r?e.defaultState:{},n?{values:e.defaultValues}:{})))}),n){let e=KW(this);for(let t of Object.keys(this.fieldInfo))Array.isArray(this.getFieldValue(t))&&e.bumpArrayVersion(t)}pW.emit(`form-api`,{id:this._formId,state:this.store.state,options:this.options})}},this.reset=(e,t)=>{let{fieldMeta:n}=this.state,r=this.resetFieldMeta(n);e&&!t?.keepDefaultValues&&(this.options={...this.options,defaultValues:e}),this.baseStore.setState(()=>{let t=e??this.options.defaultValues??this.options.defaultState?.values;return e||Object.values(this.fieldInfo).forEach(e=>{e.instance&&e.instance.options.defaultValue!==void 0&&(t=gW(t,e.instance.name,e.instance.options.defaultValue))}),qW({...this.options.defaultState,values:t,fieldMetaBase:r})})},this.validateAllFields=async e=>{let t=[];return eW(()=>{Object.values(this.fieldInfo).forEach(n=>{if(!n.instance)return;let r=n.instance;t.push(Promise.resolve().then(()=>r.validate(e,{skipFormValidation:!0,skipGroupValidation:!0}))),n.instance.store.state.meta.isTouched||n.instance.setMeta(e=>({...e,isTouched:!0}))})}),(await Promise.all(t)).flat()},this.validateArrayFieldsStartingFrom=async(e,t,n)=>{let r=this.getFieldValue(e),i=Array.isArray(r)?Math.max(r.length-1,0):null,a=[`${e}[${t}]`];for(let n=t+1;n<=(i??0);n++)a.push(`${e}[${n}]`);let o=Object.keys(this.fieldInfo).filter(e=>a.some(t=>e.startsWith(t))),s=[];return eW(()=>{o.forEach(e=>{s.push(Promise.resolve().then(()=>this.validateField(e,n)))})}),(await Promise.all(s)).flat()},this.validateField=(e,t)=>{let n=this.fieldInfo[e]?.instance;if(!n){let{hasErrored:n}=this.validateSync(t);return n&&!this.options.asyncAlways?this.getFieldMeta(e)?.errors??[]:this.validateAsync(t).then(()=>this.getFieldMeta(e)?.errors??[])}return n.store.state.meta.isTouched||n.setMeta(e=>({...e,isTouched:!0})),n.validate(t)},this.validateSync=(e,t)=>{let n=EW(e,{...this.options,form:this,group:t?.group,validationLogic:this.options.validationLogic||BW}),r=!1,i={};return eW(()=>{for(let e of n){if(!e.validate)continue;let{formError:n,fieldErrors:a}=YW(this.runValidator({validate:e.validate,value:{value:this.state.values,formApi:this,validationSource:`form`},type:`validate`})),o=XW(e.cause),s=new Set([...Object.keys(this.state.fieldMeta),...Object.keys(a||{})]);t?.filterFieldNames&&(s=new Set([...s].filter(t.filterFieldNames)));for(let e of s){if(this.baseStore.state.fieldMetaBase[e]===void 0&&!a?.[e])continue;let{errorMap:t,errorSourceMap:n}=this.getFieldMeta(e)??GW,r=a?.[e],{newErrorValue:s,newSource:c}=AW({newFormValidatorError:r,isPreviousErrorFromFormValidator:n?.[o]===`form`,previousErrorValue:t?.[o]});c===`form`&&(i[e]={...i[e],[o]:r}),t?.[o]!==s&&this.setFieldMeta(e,(e=GW)=>({...e,errorMap:{...e.errorMap,[o]:s},errorSourceMap:{...e.errorSourceMap,[o]:c}}))}t?.dontUpdateFormErrorMap||this.state.errorMap?.[o]!==n&&this.baseStore.setState(e=>({...e,errorMap:{...e.errorMap,[o]:n}})),(n||a)&&(r=!0)}if(t?.dontUpdateFormErrorMap)return;let a=XW(`submit`);this.state.errorMap?.[a]&&e!==`submit`&&!r&&this.baseStore.setState(e=>({...e,errorMap:{...e.errorMap,[a]:void 0}}));let o=XW(`server`);this.state.errorMap?.[o]&&e!==`server`&&!r&&this.baseStore.setState(e=>({...e,errorMap:{...e.errorMap,[o]:void 0}}))}),{hasErrored:r,fieldsErrorMap:i}},this.validateAsync=async(e,t)=>{let n=DW(e,{...this.options,form:this,group:t?.group,validationLogic:this.options.validationLogic||BW});this.state.isFormValidating||this.baseStore.setState(e=>({...e,isFormValidating:!0}));let r=[],i;for(let e of n){if(!e.validate)continue;let n=XW(e.cause);this.state.validationMetaMap[n]?.lastAbortController.abort();let a=new AbortController;this.state.validationMetaMap[n]={lastAbortController:a},r.push(new Promise(async n=>{let r;try{r=await new Promise((t,n)=>{setTimeout(async()=>{if(a.signal.aborted)return t(void 0);try{t(await this.runValidator({validate:e.validate,value:{value:this.state.values,formApi:this,validationSource:`form`,signal:a.signal},type:`validateAsync`}))}catch(e){n(e)}},e.debounceMs)})}catch(e){r=e}let{formError:o,fieldErrors:s}=YW(r);s&&(i=i?{...i,...s}:s);let c=XW(e.cause),l=new Set([...Object.keys(this.state.fieldMeta),...Object.keys(i||{})]),u=Array.from(l);t?.filterFieldNames&&(u=u.filter(t.filterFieldNames));for(let e of u){if(this.baseStore.state.fieldMetaBase[e]===void 0&&!i?.[e])continue;let{errorMap:t,errorSourceMap:n}=this.getFieldMeta(e)??GW,r=i?.[e],{newErrorValue:a,newSource:o}=AW({newFormValidatorError:r,isPreviousErrorFromFormValidator:n?.[c]===`form`,previousErrorValue:t?.[c]});t?.[c]!==a&&this.setFieldMeta(e,(e=GW)=>({...e,errorMap:{...e.errorMap,[c]:a},errorSourceMap:{...e.errorSourceMap,[c]:o}}))}t?.dontUpdateFormErrorMap||this.baseStore.setState(e=>({...e,errorMap:{...e.errorMap,[c]:o}})),n(i?{fieldErrors:i,errorMapKey:c}:void 0)}))}let a=[],o={};if(r.length){a=await Promise.all(r);for(let e of a)if(e?.fieldErrors){let{errorMapKey:t}=e;for(let[n,r]of Object.entries(e.fieldErrors))o[n]={...o[n]||{},[t]:r}}}return this.baseStore.setState(e=>({...e,isFormValidating:!1})),o},this.validate=(e,t)=>{let{hasErrored:n,fieldsErrorMap:r}=this.validateSync(e,t);return n&&!this.options.asyncAlways?r:this.validateAsync(e,t)},this._handleSubmit=async e=>{this.baseStore.setState(e=>({...e,isSubmitted:!1,submissionAttempts:e.submissionAttempts+1,isSubmitSuccessful:!1})),eW(()=>{Object.values(this.fieldInfo).forEach(e=>{e.instance&&(e.instance.store.state.meta.isTouched||e.instance.setMeta(e=>({...e,isTouched:!0})))})});let t=e??this.options.onSubmitMeta;if(!this.state.canSubmit&&!this._devtoolsSubmissionOverride&&this.baseStore.state.submissionAttempts<=1){this.options.onSubmitInvalid?.({value:this.state.values,formApi:this,meta:t});return}this.baseStore.setState(e=>({...e,isSubmitting:!0}));let n=()=>{this.baseStore.setState(e=>({...e,isSubmitting:!1}))};if(await this.validateAllFields(`submit`),!this.state.isFieldsValid){n(),this.options.onSubmitInvalid?.({value:this.state.values,formApi:this,meta:t}),pW.emit(`form-submission`,{id:this._formId,submissionAttempt:this.state.submissionAttempts,successful:!1,stage:`validateAllFields`,errors:Object.values(this.state.fieldMeta).map(e=>e.errors).flat()});return}if(await this.validate(`submit`),!this.state.isValid){n(),this.options.onSubmitInvalid?.({value:this.state.values,formApi:this,meta:t}),pW.emit(`form-submission`,{id:this._formId,submissionAttempt:this.state.submissionAttempts,successful:!1,stage:`validate`,errors:this.state.errors});return}eW(()=>{Object.values(this.fieldInfo).forEach(e=>{e.instance?.triggerOnSubmitListener()})}),this.options.listeners?.onSubmit?.({formApi:this,meta:t});try{await this.options.onSubmit?.({value:this.state.values,formApi:this,meta:t}),eW(()=>{this.baseStore.setState(e=>({...e,isSubmitted:!0,isSubmitSuccessful:!0})),pW.emit(`form-submission`,{id:this._formId,submissionAttempt:this.state.submissionAttempts,successful:!0}),n()})}catch(e){throw this.baseStore.setState(e=>({...e,isSubmitSuccessful:!1})),pW.emit(`form-submission`,{id:this._formId,submissionAttempt:this.state.submissionAttempts,successful:!1,stage:`inflight`,onError:e}),n(),e}},this.getFieldValue=e=>hW(this.state.values,e),this.getFieldMeta=e=>this.state.fieldMeta[e],this.getFormGroupMeta=e=>this.formGroupMetaDerived.state[e],this.getFieldInfo=e=>this.fieldInfo[e]||={instance:null,validationMetaMap:{onChange:void 0,onBlur:void 0,onSubmit:void 0,onMount:void 0,onServer:void 0,onDynamic:void 0}},this.setFieldMeta=(e,t)=>{this.baseStore.setState(n=>({...n,fieldMetaBase:{...n.fieldMetaBase,[e]:mW(t,n.fieldMetaBase[e])}}))},this.resetFieldMeta=e=>Object.keys(e).reduce((e,t)=>{let n=t;return e[n]=GW,e},{}),this.setFieldValue=(e,t,n)=>{let r=n?.dontUpdateMeta??!1,i=n?.dontRunListeners??!1,a=n?.dontValidate??!1;eW(()=>{r||this.setFieldMeta(e,e=>({...e,isTouched:!0,isDirty:!0,errorMap:{...e?.errorMap,onMount:void 0}})),this.baseStore.setState(n=>({...n,values:gW(n.values,e,t)}))}),i||this.getFieldInfo(e).instance?.triggerOnChangeListener(),a||this.validateField(e,`change`)},this.deleteField=e=>{let t=[...Object.keys(this.fieldInfo).filter(t=>{let n=e.toString();return t.startsWith(`${n}.`)||t.startsWith(`${n}[`)}),e];this.baseStore.setState(e=>{let n={...e};return t.forEach(e=>{n.values=_W(n.values,e),delete this.fieldInfo[e],delete n.fieldMetaBase[e]}),n})},this.pushFieldValue=(e,t,n)=>{this.setFieldValue(e,e=>[...Array.isArray(e)?e:[],t],n),KW(this).bumpArrayVersion(e)},this.insertFieldValue=async(e,t,n,r)=>{this.setFieldValue(e,e=>[...e.slice(0,t),n,...e.slice(t)],MW(r,{dontValidate:!0}));let i=r?.dontValidate??!1;i||await this.validateField(e,`change`),KW(this).handleArrayInsert(e,t),i||await this.validateArrayFieldsStartingFrom(e,t,`change`)},this.replaceFieldValue=async(e,t,n,r)=>{this.setFieldValue(e,e=>e.map((e,r)=>r===t?n:e),MW(r,{dontValidate:!0})),KW(this).bumpArrayVersion(e),(r?.dontValidate??!1)||(await this.validateField(e,`change`),await this.validateArrayFieldsStartingFrom(e,t,`change`))},this.removeFieldValue=async(e,t,n)=>{let r=this.getFieldValue(e),i=Array.isArray(r)?Math.max(r.length-1,0):null;if(this.setFieldValue(e,e=>e.filter((e,n)=>n!==t),MW(n,{dontValidate:!0})),KW(this).handleArrayRemove(e,t),i!==null){let t=`${e}[${i}]`;this.deleteField(t)}(n?.dontValidate??!1)||(await this.validateField(e,`change`),await this.validateArrayFieldsStartingFrom(e,t,`change`))},this.swapFieldValues=(e,t,n,r)=>{this.setFieldValue(e,e=>{let r=e[t],i=e[n];return gW(gW(e,`${t}`,i),`${n}`,r)},MW(r,{dontValidate:!0})),KW(this).handleArraySwap(e,t,n),(r?.dontValidate??!1)||(this.validateField(e,`change`),this.validateField(`${e}[${t}]`,`change`),this.validateField(`${e}[${n}]`,`change`))},this.moveFieldValues=(e,t,n,r)=>{this.setFieldValue(e,e=>{let r=[...e];return r.splice(n,0,r.splice(t,1)[0]),r},MW(r,{dontValidate:!0})),KW(this).handleArrayMove(e,t,n),(r?.dontValidate??!1)||(this.validateField(e,`change`),this.validateField(`${e}[${t}]`,`change`),this.validateField(`${e}[${n}]`,`change`))},this.clearFieldValues=(e,t)=>{let n=this.getFieldValue(e),r=Array.isArray(n)?Math.max(n.length-1,0):null;if(this.setFieldValue(e,[],MW(t,{dontValidate:!0})),KW(this).bumpArrayVersion(e),r!==null)for(let t=0;t<=r;t++){let n=`${e}[${t}]`;this.deleteField(n)}(t?.dontValidate??!1)||this.validateField(e,`change`)},this.resetField=e=>{this.baseStore.setState(t=>{let n=this.getFieldInfo(e).instance?.options.defaultValue,r=hW(this.options.defaultValues,e),i=n??r;return{...t,fieldMetaBase:{...t.fieldMetaBase,[e]:GW},values:i===void 0?t.values:gW(t.values,e,i)}})},this.setErrorMap=e=>{eW(()=>{Object.entries(e).forEach(([e,t])=>{let n=e;if(OW(t)){let{formError:e,fieldErrors:r}=YW(t);for(let e of Object.keys(this.fieldInfo))this.getFieldMeta(e)&&this.setFieldMeta(e,t=>({...t,errorMap:{...t.errorMap,[n]:r?.[e]},errorSourceMap:{...t.errorSourceMap,[n]:`form`}}));this.baseStore.setState(t=>({...t,errorMap:{...t.errorMap,[n]:e}}))}else this.baseStore.setState(e=>({...e,errorMap:{...e.errorMap,[n]:t}}))})})},this.getAllErrors=()=>({form:{errors:this.state.errors,errorMap:this.state.errorMap},fields:Object.entries(this.state.fieldMeta).reduce((e,[t,n])=>(Object.keys(n).length&&n.errors.length&&(e[t]={errors:n.errors,errorMap:n.errorMap}),e),{})}),this.parseValuesWithSchema=e=>UW.validate({value:this.state.values,validationSource:`form`},e),this.parseValuesWithSchemaAsync=e=>UW.validateAsync({value:this.state.values,validationSource:`form`},e),this.timeoutIds={validations:{},listeners:{},formListeners:{}},this._formId=e?.formId??IW(),this._devtoolsSubmissionOverride=!1;let t=qW({...e?.defaultState,values:e?.defaultValues??e?.defaultState?.values});if(e?.transform){t=e.transform({state:t}).state;for(let e of Object.keys(t.errorMap)){let n=t.errorMap[e];if(n!==void 0&&OW(n))for(let r of Object.keys(n.fields)){let i=n.fields[r];if(i===void 0)continue;let a=t.fieldMetaBase[r];t.fieldMetaBase[r]={isTouched:!1,isValidating:!1,isBlurred:!1,isDirty:!1,_arrayVersion:0,_pendingValidationsCount:0,...a??{},errorSourceMap:{...a?.errorSourceMap??{},onChange:`form`},errorMap:{...a?.errorMap??{},[e]:i}}}}}this.baseStore=sW(t);let n;this.fieldMetaDerived=sW(e=>{let t=this.baseStore.get(),r=0,i={};for(let a of Object.keys(t.fieldMetaBase)){let o=t.fieldMetaBase[a],s=n?.fieldMetaBase[a],c=e?.[a],l=hW(t.values,a),u=c?.errors;if(!s||o.errorMap!==s.errorMap){u=Object.values(o.errorMap??{}).filter(e=>e!==void 0);let e=this.getFieldInfo(a)?.instance;(!e||!e.options.disableErrorFlat)&&(u=u.flat(1))}let d=!TW(u),f=!o.isDirty,p=kW(l,this.getFieldInfo(a)?.instance?.options.defaultValue??hW(this.options.defaultValues,a));if(c&&c.isPristine===f&&c.isValid===d&&c.isDefaultValue===p&&c.errors===u&&o===s){i[a]=c,r++;continue}i[a]={...o,errors:u??[],isPristine:f,isValid:d,isDefaultValue:p}}return Object.keys(t.fieldMetaBase).length?e&&r===Object.keys(t.fieldMetaBase).length?e:(n=this.baseStore.get(),i):i}),this.formGroupMetaDerived=sW(e=>{let t=this.baseStore.get(),n=this.fieldMetaDerived.get(),r={};for(let i of this.formGroupApis){let a=i.name,o=t.formGroupStateBase[a]??{isSubmitted:!1,isSubmitting:!1,isValidating:!1,submissionAttempts:0,isSubmitSuccessful:!1},s=n[a],c=!1,l=!0,u=!1,d=!1,f=!0,p=!1;for(let e in n){if(e===a||!zW(a,e))continue;let t=n[e];t&&(t.isValidating&&(c=!0),t.isValid||(l=!1),t.isTouched&&(u=!0),t.isBlurred&&(d=!0),t.isDefaultValue||(f=!1),t.isDirty&&(p=!0))}let m=!p,h=!!c||o.isValidating,g=s?.errorMap??{},_=s?.errorSourceMap??{},v=!!(g.onMount||Object.entries(n).some(([e,t])=>t&&e!==a&&zW(a,e)&&t.errorMap.onMount)),y=e?.[a],b=y?.errors??[];(!y||y.__srcErrorMap!==g)&&(b=Object.values(g).reduce((e,t)=>{if(t===void 0)return e;if(t&&typeof t==`object`&&`fields`in t){let n=t.group;return n!==void 0&&e.push(n),e}return e.push(t),e},[]));let x=b.length===0,S=l&&x,C=i.options.canSubmitWhenInvalid??!1,w=o.submissionAttempts===0&&!u&&!v||!h&&!o.isSubmitting&&S||C;if(y&&y.errorMap===g&&y.errorSourceMap===_&&y.errors===b&&y.isFieldsValidating===c&&y.isFieldsValid===l&&y.isGroupValid===x&&y.isValid===S&&y.canSubmit===w&&y.isTouched===u&&y.isBlurred===d&&y.isPristine===m&&y.isDefaultValue===f&&y.isDirty===p&&y.isValidating===h&&y.isSubmitting===o.isSubmitting&&y.isSubmitted===o.isSubmitted&&y.submissionAttempts===o.submissionAttempts&&y.isSubmitSuccessful===o.isSubmitSuccessful){r[a]=y;continue}let T={...o,errorMap:g,errorSourceMap:_,_arrayVersion:s?._arrayVersion??0,isTouched:u,isBlurred:d,isDirty:p,isPristine:m,isDefaultValue:f,isValid:S,errors:b,isValidating:h,isFieldsValidating:c,isFieldsValid:l,isGroupValid:x,canSubmit:w};Object.defineProperty(T,"__srcErrorMap",{value:g,enumerable:!1,configurable:!0}),r[a]=T}return r});let r;this.store=sW(e=>{let t=this.baseStore.get(),n=this.fieldMetaDerived.get(),i=Object.values(n).filter(Boolean),a=i.some(e=>e.isValidating),o=i.every(e=>e.isValid),s=i.some(e=>e.isTouched),c=i.some(e=>e.isBlurred),l=i.every(e=>e.isDefaultValue),u=s&&t.errorMap?.onMount,d=i.some(e=>e.isDirty),f=!d,p=!!(t.errorMap?.onMount||i.some(e=>e?.errorMap?.onMount)),m=!!a,h=e?.errors??[];(!r||t.errorMap!==r.errorMap)&&(h=Object.values(t.errorMap).reduce((e,t)=>t===void 0?e:t&&OW(t)?(e.push(t.form),e):(e.push(t),e),[]));let g=h.length===0,_=o&&g,v=this.options.canSubmitWhenInvalid??!1,y=t.submissionAttempts===0&&!s&&!p||!m&&!t.isSubmitting&&_||v,b=t.errorMap;if(u&&(h=h.filter(e=>e!==t.errorMap.onMount),b=Object.assign(b,{onMount:void 0})),e&&r&&e.errorMap===b&&e.fieldMeta===this.fieldMetaDerived.state&&e.errors===h&&e.isFieldsValidating===a&&e.isFieldsValid===o&&e.isFormValid===g&&e.isValid===_&&e.canSubmit===y&&e.isTouched===s&&e.isBlurred===c&&e.isPristine===f&&e.isDefaultValue===l&&e.isDirty===d&&kW(r,t))return e;let x={...t,errorMap:b,fieldMeta:this.fieldMetaDerived.state,errors:h,isFieldsValidating:a,isFieldsValid:o,isFormValid:g,isValid:_,canSubmit:y,isTouched:s,isBlurred:c,isPristine:f,isDefaultValue:l,isDirty:d};return r=this.baseStore.get(),x}),this.handleSubmit=this.handleSubmit.bind(this),this.update(e||{})}get state(){return this.store.state}get formId(){return this._formId}runValidator(e){return WW(e.validate)?UW[e.type](e.value,e.validate):e.validate(e.value)}handleSubmit(e){return this._handleSubmit(e)}};function YW(e){return e?OW(e)?{formError:YW(e.form).formError,fieldErrors:e.fields}:{formError:e}:{formError:void 0}}function XW(e){switch(e){case`submit`:return`onSubmit`;case`blur`:return`onBlur`;case`mount`:return`onMount`;case`server`:return`onServer`;case`dynamic`:return`onDynamic`;default:return`onChange`}}var ZW=class e{constructor(t){this.options={},this.mount=()=>{this.options.defaultValue!==void 0&&!this.getMeta().isTouched&&this.form.setFieldValue(this.name,this.options.defaultValue,{dontUpdateMeta:!0});let e=this.getInfo();e.instance=this,this.update(this.options);let{onMount:t}=this.options.validators||{};if(t){let e=this.runValidator({validate:t,value:{value:this.state.value,fieldApi:this,validationSource:`field`},type:`validate`});e&&this.setMeta(t=>({...t,errorMap:{...t?.errorMap,onMount:e},errorSourceMap:{...t?.errorSourceMap,onMount:`field`}}))}return this.options.listeners?.onMount?.({value:this.state.value,fieldApi:this}),()=>{for(let[e,t]of Object.entries(this.timeoutIds.validations))t&&(clearTimeout(t),this.timeoutIds.validations[e]=null);for(let[e,t]of Object.entries(this.timeoutIds.listeners))t&&(clearTimeout(t),this.timeoutIds.listeners[e]=null);for(let[e,t]of Object.entries(this.timeoutIds.formListeners))t&&(clearTimeout(t),this.timeoutIds.formListeners[e]=null);let e=this.form.fieldInfo[this.name];if(e&&e.instance===this){for(let[t,n]of Object.entries(e.validationMetaMap))n?.lastAbortController.abort(),e.validationMetaMap[t]=void 0;this.form.baseStore.setState(e=>({...e,fieldMetaBase:{...e.fieldMetaBase,[this.name]:{...GW,isTouched:e.fieldMetaBase[this.name]?.isTouched??GW.isTouched,isBlurred:e.fieldMetaBase[this.name]?.isBlurred??GW.isBlurred,isDirty:e.fieldMetaBase[this.name]?.isDirty??GW.isDirty}}})),e.instance=null,this.options.listeners?.onUnmount?.({value:this.state.value,fieldApi:this}),this.form.options.listeners?.onFieldUnmount?.({formApi:this.form,fieldApi:this})}}},this.update=e=>{this.options=e,this.name=e.name,!this.state.meta.isTouched&&this.options.defaultValue!==void 0&&(kW(this.form.getFieldValue(this.name),e.defaultValue)||this.form.setFieldValue(this.name,e.defaultValue,{dontUpdateMeta:!0,dontValidate:!0,dontRunListeners:!0})),this.form.getFieldMeta(this.name)||this.form.setFieldMeta(this.name,this.state.meta)},this.getValue=()=>this.form.getFieldValue(this.name),this.setValue=(e,t)=>{this.form.setFieldValue(this.name,e,MW(t,{dontRunListeners:!0,dontValidate:!0})),t?.dontRunListeners||this.triggerOnChangeListener(),t?.dontValidate||this.validate(`change`)},this.getMeta=()=>this.store.state.meta,this.setMeta=e=>this.form.setFieldMeta(this.name,e),this.getInfo=()=>this.form.getFieldInfo(this.name),this.pushValue=(e,t)=>{this.form.pushFieldValue(this.name,e,MW(t,{dontRunListeners:!0})),t?.dontRunListeners||this.triggerOnChangeListener()},this.insertValue=(e,t,n)=>{this.form.insertFieldValue(this.name,e,t,MW(n,{dontRunListeners:!0})),n?.dontRunListeners||this.triggerOnChangeListener()},this.replaceValue=(e,t,n)=>{this.form.replaceFieldValue(this.name,e,t,MW(n,{dontRunListeners:!0})),n?.dontRunListeners||this.triggerOnChangeListener()},this.removeValue=(e,t)=>{this.form.removeFieldValue(this.name,e,MW(t,{dontRunListeners:!0})),t?.dontRunListeners||this.triggerOnChangeListener()},this.swapValues=(e,t,n)=>{this.form.swapFieldValues(this.name,e,t,MW(n,{dontRunListeners:!0})),n?.dontRunListeners||this.triggerOnChangeListener()},this.moveValue=(e,t,n)=>{this.form.moveFieldValues(this.name,e,t,MW(n,{dontRunListeners:!0})),n?.dontRunListeners||this.triggerOnChangeListener()},this.clearValues=e=>{this.form.clearFieldValues(this.name,MW(e,{dontRunListeners:!0})),e?.dontRunListeners||this.triggerOnChangeListener()},this.getLinkedFields=t=>{let n=Object.values(this.form.fieldInfo),r=[];for(let i of n){if(!i.instance||!(i.instance instanceof e))continue;let{onChangeListenTo:n,onBlurListenTo:a}=i.instance.options.validators||{};t===`change`&&n?.includes(this.name)&&r.push(i.instance),t===`blur`&&a?.includes(this.name)&&r.push(i.instance)}return r},this.validateSync=(e,t)=>{let n=EW(e,{...this.options,form:this.form,fieldName:this.name,validationLogic:this.form.options.validationLogic||BW}),r=this.getLinkedFields(e).reduce((t,n)=>{let r=EW(e,{...n.options,form:n.form,fieldName:n.name,validationLogic:n.form.options.validationLogic||BW});return r.forEach(e=>{e.field=n}),t.concat(r)},[]),i=!1;eW(()=>{let e=(e,n)=>{let r=$W(n.cause),a=n.validate?QW(e.runValidator({validate:n.validate,value:{value:e.store.state.value,validationSource:`field`,fieldApi:e},type:`validate`})):void 0,o=t[r],{newErrorValue:s,newSource:c}=jW({formLevelError:o,fieldLevelError:a});e.state.meta.errorMap?.[r]!==s&&e.setMeta(e=>({...e,errorMap:{...e.errorMap,[r]:s},errorSourceMap:{...e.errorSourceMap,[r]:c}})),s&&(i=!0)};for(let t of n)e(this,t);for(let t of r)t.validate&&e(t.field,t)});let a=$W(`submit`);return this.state.meta.errorMap?.[a]&&e!==`submit`&&!i&&this.setMeta(e=>({...e,errorMap:{...e.errorMap,[a]:void 0},errorSourceMap:{...e.errorSourceMap,[a]:void 0}})),{hasErrored:i}},this.validateAsync=async(e,t)=>{let n=DW(e,{...this.options,form:this.form,fieldName:this.name,validationLogic:this.form.options.validationLogic||BW}),r=await t,i=this.getLinkedFields(e).reduce((t,n)=>{let r=DW(e,{...n.options,form:n.form,fieldName:n.name,validationLogic:n.form.options.validationLogic||BW});return r.forEach(e=>{e.field=n}),t.concat(r)},[]),a=[],o=[],s=n.some(e=>e.validate),c=Array.from(new Set(i.filter(e=>e.validate).map(e=>e.field)));eW(()=>{s&&this.startValidation();for(let e of c)e.startValidation()});let l=(e,t,n)=>{let i=$W(t.cause),a=e.getInfo();a.validationMetaMap[i]?.lastAbortController.abort();let o=new AbortController;a.validationMetaMap[i]={lastAbortController:o},n.push(new Promise(async n=>{let a;try{a=await new Promise((n,r)=>{e.timeoutIds.validations[t.cause]&&(clearTimeout(e.timeoutIds.validations[t.cause]),e.endValidation()),e.timeoutIds.validations[t.cause]=setTimeout(async()=>{if(o.signal.aborted)return n(void 0);try{n(await this.runValidator({validate:t.validate,value:{value:e.store.state.value,fieldApi:e,signal:o.signal,validationSource:`field`},type:`validateAsync`}))}catch(e){r(e)}},t.debounceMs)})}catch(e){a=e}if(o.signal.aborted)return n(void 0);let s=QW(a),c=r[e.name]?.[i],{newErrorValue:l,newSource:u}=jW({formLevelError:c,fieldLevelError:s});if(e.getInfo().instance!==e)return n(void 0);e.setMeta(e=>({...e,errorMap:{...e?.errorMap,[i]:l},errorSourceMap:{...e.errorSourceMap,[i]:u}})),n(l)}))};for(let e of n)e.validate&&l(this,e,a);for(let e of i)e.validate&&l(e.field,e,o);let u=[];return(a.length||o.length)&&(u=await Promise.all(a),await Promise.all(o)),eW(()=>{s&&this.endValidation();for(let e of c)e.endValidation()}),u.filter(Boolean)},this.validate=(e,t)=>{if(!this.state.meta.isTouched)return[];let n=t?.skipGroupValidation?[]:Array.from(this.form.formGroupApis).filter(e=>this.name.startsWith(e.name)),r=(t?.skipFormValidation?{fieldsErrorMap:{}}:this.form.validateSync(e)).fieldsErrorMap[this.name]??{};if(!t?.skipFormValidation)for(let t of n){if(t.state.meta.submissionAttempts===0)continue;let{fieldsErrorMap:n}=this.form.validateSync(e,{group:t,dontUpdateFormErrorMap:!0,filterFieldNames:e=>zW(t.name,e)});r={...r,...n[this.name]??{}}}let{hasErrored:i}=this.validateSync(e,r),a=new WeakMap;for(let t of n){let{hasErrored:n}=t.validateSync(e,{},{skipRelatedFieldValidation:!0});a.set(t,n)}if(i&&!this.options.asyncAlways){this.getInfo().validationMetaMap[$W(e)]?.lastAbortController.abort();let t=[];for(let r of n)r.getInfo().validationMetaMap[$W(e)]?.lastAbortController.abort(),t.push(r.state.meta.errors);return[...this.state.meta.errors,...t.flat()]}let o=t?.skipFormValidation?Promise.resolve({}):this.form.validateAsync(e),s=this.validateAsync(e,o),c=[];for(let t of n)(!a.get(t)||t.options.asyncAlways)&&c.push(t.validateAsync(e,o,{skipRelatedFieldValidation:!0}));return c.length===0?s:Promise.all([s,...c]).then(e=>e.flat())},this.handleChange=e=>{this.setValue(e)},this.handleBlur=()=>{this.state.meta.isTouched||this.setMeta(e=>({...e,isTouched:!0})),this.state.meta.isBlurred||this.setMeta(e=>({...e,isBlurred:!0})),this.validate(`blur`),this.triggerOnBlurListener()},this.setErrorMap=e=>{this.setMeta(t=>({...t,errorMap:{...t.errorMap,...e}}))},this.parseValueWithSchema=e=>UW.validate({value:this.state.value,validationSource:`field`},e),this.parseValueWithSchemaAsync=e=>UW.validateAsync({value:this.state.value,validationSource:`field`},e),this.triggerOnBlurListener=()=>{let e=this.form.options.listeners?.onBlurDebounceMs;e&&e>0?(this.timeoutIds.formListeners.blur&&clearTimeout(this.timeoutIds.formListeners.blur),this.timeoutIds.formListeners.blur=setTimeout(()=>{this.form.options.listeners?.onBlur?.({formApi:this.form,fieldApi:this})},e)):this.form.options.listeners?.onBlur?.({formApi:this.form,fieldApi:this});let t=this.options.listeners?.onBlurDebounceMs;t&&t>0?(this.timeoutIds.listeners.blur&&clearTimeout(this.timeoutIds.listeners.blur),this.timeoutIds.listeners.blur=setTimeout(()=>{this.options.listeners?.onBlur?.({value:this.state.value,fieldApi:this})},t)):this.options.listeners?.onBlur?.({value:this.state.value,fieldApi:this})},this.triggerOnChangeListener=()=>{let e=this.form.options.listeners?.onChangeDebounceMs;e&&e>0?(this.timeoutIds.formListeners.change&&clearTimeout(this.timeoutIds.formListeners.change),this.timeoutIds.formListeners.change=setTimeout(()=>{this.form.options.listeners?.onChange?.({formApi:this.form,fieldApi:this})},e)):this.form.options.listeners?.onChange?.({formApi:this.form,fieldApi:this});let t=this.options.listeners?.onChangeDebounceMs;t&&t>0?(this.timeoutIds.listeners.change&&clearTimeout(this.timeoutIds.listeners.change),this.timeoutIds.listeners.change=setTimeout(()=>{this.options.listeners?.onChange?.({value:this.state.value,fieldApi:this})},t)):this.options.listeners?.onChange?.({value:this.state.value,fieldApi:this});for(let e of this.form.formGroupApis)zW(e.name,this.name)&&e.triggerOnChangeListener()},this.triggerOnSubmitListener=()=>{this.options.listeners?.onSubmit?.({value:this.state.value,fieldApi:this})},this.form=t.form,this.name=t.name,this.options=t,this.timeoutIds={validations:{},listeners:{},formListeners:{}},this.store=sW(e=>{this.form.store.get();let n=this.form.getFieldMeta(this.name)??{...GW,...t.defaultMeta},r=this.form.getFieldValue(this.name);return!n.isTouched&&r===void 0&&this.options.defaultValue!==void 0&&!kW(r,this.options.defaultValue)&&(r=this.options.defaultValue),e&&e.value===r&&e.meta===n?e:{value:r,meta:n}})}get state(){return this.store.state}runValidator(e){return WW(e.validate)?UW[e.type](e.value,e.validate):e.validate(e.value)}startValidation(){this.setMeta(e=>{let t=e._pendingValidationsCount+1;return{...e,_pendingValidationsCount:t,isValidating:t>0&&!e.isValidating||e.isValidating}})}endValidation(){this.setMeta(e=>{let t=Math.max(0,e._pendingValidationsCount-1);return{...e,_pendingValidationsCount:t,isValidating:t===0&&e.isValidating?!1:e.isValidating}})}};function QW(e){if(e)return e}function $W(e){switch(e){case`submit`:return`onSubmit`;case`blur`:return`onBlur`;case`mount`:return`onMount`;case`server`:return`onServer`;case`dynamic`:return`onDynamic`;default:return`onChange`}}function eG(e){return{isSubmitted:e.isSubmitted??!1,isSubmitting:e.isSubmitting??!1,isValidating:e.isValidating??!1,submissionAttempts:e.submissionAttempts??0,isSubmitSuccessful:e.isSubmitSuccessful??!1}}function tG(e){return{...GW,...e,errors:[],isPristine:!0,isValid:!0,isDefaultValue:!0,isFieldsValidating:!1,isFieldsValid:!0,isGroupValid:!0,canSubmit:!0,isSubmitting:!1,isSubmitted:!1,isValidating:!1,submissionAttempts:0,isSubmitSuccessful:!1}}var nG=class e{constructor(t){this.options={},this.setFormGroupState=e=>{this.form.baseStore.setState(t=>{let n=t.formGroupStateBase[this.name]??eG({});return{...t,formGroupStateBase:{...t.formGroupStateBase,[this.name]:e(n)}}})},this._lastDistributedFieldNames={},this.update=e=>{this.options=e,this.name=e.name,!this.state.meta.isTouched&&this.options.defaultValue!==void 0&&(kW(this.form.getFieldValue(this.name),e.defaultValue)||this.form.setFieldValue(this.name,e.defaultValue,{dontUpdateMeta:!0,dontValidate:!0,dontRunListeners:!0})),this.form.getFieldMeta(this.name)||this.form.setFieldMeta(this.name,{...GW,...this.options.defaultMeta})},this.mount=()=>{this.update(this.options),this.form.formGroupApis.add(this),this.fieldInfo.instance=this,this.form.baseStore.setState(e=>({...e,formGroupStateBase:{...e.formGroupStateBase,[this.name]:e.formGroupStateBase[this.name]??eG({...this.options.defaultState})}}));let{onMount:e}=this.options.validators||{};if(e){let t=this.runValidator({validate:e,value:{value:this.state.value,groupApi:this,validationSource:`form`},type:`validate`}),n=t,r;iG(t)&&(n=t.group,r=t.fields);let i=rG(n);i&&this.setMeta(e=>({...e,errorMap:{...e.errorMap,onMount:i},errorSourceMap:{...e.errorSourceMap,onMount:`field`}})),this.distributeFieldErrors(`onMount`,r)}return this.options.listeners?.onMount?.({value:this.state.value,groupApi:this}),()=>{for(let[e,t]of Object.entries(this.timeoutIds.validations))t&&(clearTimeout(t),this.timeoutIds.validations[e]=null);for(let[e,t]of Object.entries(this.timeoutIds.listeners))t&&(clearTimeout(t),this.timeoutIds.listeners[e]=null);for(let[e,t]of Object.entries(this.timeoutIds.formListeners))t&&(clearTimeout(t),this.timeoutIds.formListeners[e]=null);if(this.fieldInfo.instance===this){for(let[e,t]of Object.entries(this.fieldInfo.validationMetaMap))t?.lastAbortController.abort(),this.fieldInfo.validationMetaMap[e]=void 0;this.form.formGroupApis.delete(this),this.form.baseStore.setState(e=>({...e,formGroupStateBase:{...e.formGroupStateBase,[this.name]:eG({})}})),this.fieldInfo.instance=null,this.options.listeners?.onUnmount?.({value:this.state.value,groupApi:this})}}},this.setValue=(e,t)=>{this.form.setFieldValue(this.name,e,MW(t,{dontRunListeners:!0,dontValidate:!0})),t?.dontRunListeners||this.triggerOnChangeListener(),t?.dontValidate||this.validate(`change`)},this.getMeta=()=>this.store.state.meta,this.setMeta=e=>this.form.setFieldMeta(this.name,e),this.getInfo=()=>this.fieldInfo,this.getRelatedFields=()=>{let e=Object.values(this.form.fieldInfo),t=[];for(let n of e)n.instance&&n.instance instanceof ZW&&n.instance.name.startsWith(this.name)&&t.push(n.instance);return t},this.getRelatedFieldMetasDerived=()=>{let e=Object.entries(this.form.fieldMetaDerived.state),t=[];for(let[n,r]of e)n!==this.name&&zW(this.name,n)&&t.push({...r,name:n});return t},this.buildChildFieldName=e=>e===``?this.name:e.startsWith(`[`)?`${this.name}${e}`:`${this.name}.${e}`,this.distributeFieldErrors=(e,t)=>{let n=this._lastDistributedFieldNames[e]??new Set,r=new Set;if(t)for(let[e,n]of Object.entries(t))n!=null&&n!==!1&&r.add(this.buildChildFieldName(e));let i=new Set([...n,...r]),a=!1;for(let n of i){let r=n.startsWith(this.name+`[`)?n.slice(this.name.length):n.slice(this.name.length+1),i=t?.[r],o=this.form.getFieldMeta(n);if(!o&&!i)continue;let s=o?.errorMap[e],{newErrorValue:c,newSource:l}=AW({newFormValidatorError:i,isPreviousErrorFromFormValidator:o?.errorSourceMap[e]===`form`,previousErrorValue:s});c&&(a=!0),(s!==c||o?.errorSourceMap[e]!==l)&&this.form.setFieldMeta(n,(t=GW)=>({...t,errorMap:{...t.errorMap,[e]:c},errorSourceMap:{...t.errorSourceMap,[e]:l}}))}return this._lastDistributedFieldNames[e]=r,a},this.validateSync=(t,n,r={})=>{let i=EW(t,{...this.options,form:this.form,group:this,validationLogic:this.options.validationLogic||this.form.options.validationLogic||BW}),a=(r.skipRelatedFieldValidation?[]:this.getRelatedFields()).reduce((e,n)=>{let r=EW(t,{...n.options,form:n.form,validationLogic:n.form.options.validationLogic||BW});return r.forEach(e=>{e.field=n}),e.concat(r)},[]),o=!1;eW(()=>{let t=(t,r)=>{let i=oG(r.cause),a=t===this,s;r.validate&&(s=t.runValidator({validate:r.validate,value:{value:t.store.state.value,validationSource:a?`form`:`field`,...t instanceof e?{groupApi:t}:{fieldApi:t}},type:`validate`}));let c=s,l;a&&iG(s)&&(c=s.group,l=s.fields);let u=rG(c),d=n[i],{newErrorValue:f,newSource:p}=jW({formLevelError:d,fieldLevelError:u});t.state.meta.errorMap?.[i]!==f&&t.setMeta(e=>({...e,errorMap:{...e.errorMap,[i]:f},errorSourceMap:{...e.errorSourceMap,[i]:p}})),f&&(o=!0),a&&this.distributeFieldErrors(i,l)&&(o=!0)};for(let e of i)t(this,e);for(let e of a)e.validate&&t(e.field,e)});let s=oG(`submit`);return this.state.meta.errorMap?.[s]&&t!==`submit`&&!o&&this.setMeta(e=>({...e,errorMap:{...e.errorMap,[s]:void 0},errorSourceMap:{...e.errorSourceMap,[s]:void 0}})),{hasErrored:o}},this.validateAsync=async(t,n,r={})=>{let i=DW(t,{...this.options,form:this.form,group:this,validationLogic:this.options.validationLogic||this.form.options.validationLogic||BW}),a=await n,o=r.skipRelatedFieldValidation?[]:this.getRelatedFields(),s=o.reduce((e,n)=>{let r=DW(t,{...n.options,form:n.form,validationLogic:n.form.options.validationLogic||BW});return r.forEach(e=>{e.field=n}),e.concat(r)},[]),c=[],l=[],u=i.some(e=>e.validate)||s.some(e=>e.validate);if(u){this.state.meta.isValidating||this.setMeta(e=>({...e,isValidating:!0}));for(let e of o)e.setMeta(e=>({...e,isValidating:!0}))}let d=(t,n,r)=>{let i=oG(n.cause),o=t.getInfo();o.validationMetaMap[i]?.lastAbortController.abort();let s=new AbortController;o.validationMetaMap[i]={lastAbortController:s};let c=t===this;r.push(new Promise(async r=>{let o;try{o=await new Promise((r,i)=>{t.timeoutIds.validations[n.cause]&&clearTimeout(t.timeoutIds.validations[n.cause]),t.timeoutIds.validations[n.cause]=setTimeout(async()=>{if(s.signal.aborted)return r(void 0);try{r(await this.runValidator({validate:n.validate,value:{value:t.store.state.value,signal:s.signal,validationSource:c?`form`:`field`,...t instanceof e?{groupApi:t}:{fieldApi:t}},type:`validateAsync`}))}catch(e){i(e)}},n.debounceMs)})}catch(e){o=e}if(s.signal.aborted)return r(void 0);let l=o,u;c&&iG(o)&&(l=o.group,u=o.fields);let d=rG(l),f=a[t.name]?.[i],{newErrorValue:p,newSource:m}=jW({formLevelError:f,fieldLevelError:d});if(t.getInfo().instance!==t)return r(void 0);t.setMeta(e=>({...e,errorMap:{...e?.errorMap,[i]:p},errorSourceMap:{...e.errorSourceMap,[i]:m}})),c&&this.distributeFieldErrors(i,u),r(p)}))};for(let e of i)e.validate&&d(this,e,c);for(let e of s)e.validate&&d(e.field,e,l);let f=[];if((c.length||l.length)&&(f=await Promise.all(c),await Promise.all(l)),u){this.setMeta(e=>({...e,isValidating:!1}));for(let e of o)e.setMeta(e=>({...e,isValidating:!1}))}return f.filter(Boolean)},this.validateAllFields=async e=>{let t=[];return eW(()=>{Object.values(this.getRelatedFields()).forEach(n=>{t.push(Promise.resolve().then(()=>n.validate(e,{skipFormValidation:!0,skipGroupValidation:!0}))),n.store.state.meta.isTouched||n.setMeta(e=>({...e,isTouched:!0}))})}),(await Promise.all(t)).flat()},this.validateArrayFieldsStartingFrom=(e,t,n)=>this.form.validateArrayFieldsStartingFrom(e,t,n),this.validateField=(e,t)=>this.form.validateField(e,t),this.getFieldValue=e=>this.form.getFieldValue(e),this.getFieldMeta=e=>this.form.getFieldMeta(e),this.setFieldMeta=(e,t)=>this.form.setFieldMeta(e,t),this.setFieldValue=(e,t)=>this.form.setFieldValue(e,t),this.deleteField=e=>this.form.deleteField(e),this.pushFieldValue=(e,t)=>this.form.pushFieldValue(e,t),this.insertFieldValue=(e,t,n)=>this.form.insertFieldValue(e,t,n),this.replaceFieldValue=(e,t,n)=>this.form.replaceFieldValue(e,t,n),this.swapFieldValues=(e,t,n)=>this.form.swapFieldValues(e,t,n),this.moveFieldValues=(e,t,n)=>this.form.moveFieldValues(e,t,n),this.clearFieldValues=e=>this.form.clearFieldValues(e),this.resetField=e=>this.form.resetField(e),this.removeFieldValue=(e,t)=>this.form.removeFieldValue(e,t),this.areRelatedFieldsValid=()=>Object.values(this.getRelatedFields()).every(e=>e.state.meta.isValid),this.validate=(e,t)=>{let{fieldsErrorMap:n}=t?.skipFormValidation?{fieldsErrorMap:{}}:this.form.validateSync(e,{dontUpdateFormErrorMap:!0,filterFieldNames:e=>zW(this.name,e)}),{hasErrored:r}=this.validateSync(e,n[this.name]??{},{skipRelatedFieldValidation:t?.skipRelatedFieldValidation});if(r&&!this.options.asyncAlways)return this.getInfo().validationMetaMap[oG(e)]?.lastAbortController.abort(),this.state.meta.errors;let i=t?.skipFormValidation?Promise.resolve({}):this.form.validateAsync(e,{dontUpdateFormErrorMap:!0,filterFieldNames:e=>zW(this.name,e)});return this.validateAsync(e,i,{skipRelatedFieldValidation:t?.skipRelatedFieldValidation})},this.triggerOnChangeListener=()=>{let e=this.form.options.listeners?.onChangeGroupDebounceMs;e&&e>0?(this.timeoutIds.formListeners.change&&clearTimeout(this.timeoutIds.formListeners.change),this.timeoutIds.formListeners.change=setTimeout(()=>{this.form.options.listeners?.onChangeGroup?.({formApi:this.form,groupApi:this})},e)):this.form.options.listeners?.onChangeGroup?.({formApi:this.form,groupApi:this});let t=this.options.listeners?.onChangeDebounceMs;t&&t>0?(this.timeoutIds.listeners.change&&clearTimeout(this.timeoutIds.listeners.change),this.timeoutIds.listeners.change=setTimeout(()=>{this.options.listeners?.onChange?.({value:this.state.value,groupApi:this})},t)):this.options.listeners?.onChange?.({value:this.state.value,groupApi:this})},this.triggerOnSubmitListener=()=>{this.options.listeners?.onSubmit?.({value:this.state.value,groupApi:this})},this._handleSubmit=async e=>{this.setFormGroupState(e=>({...e,isSubmitted:!1,submissionAttempts:e.submissionAttempts+1,isSubmitSuccessful:!1})),eW(()=>{Object.values(this.getRelatedFields()).forEach(e=>{e.state.meta.isTouched||e.setMeta(e=>({...e,isTouched:!0}))})});let t=e??this.options.onSubmitMeta;this.setFormGroupState(e=>({...e,isSubmitting:!0}));let n=()=>{this.setFormGroupState(e=>({...e,isSubmitting:!1}))};if(await this.validateAllFields(`submit`),!this.areRelatedFieldsValid()){n(),this.options.onGroupSubmitInvalid?.({value:this.state.value,groupApi:this,meta:t});return}if(await this.validate(`submit`,{skipRelatedFieldValidation:!0}),!this.areRelatedFieldsValid()||!this.state.meta.isValid){n(),this.options.onGroupSubmitInvalid?.({value:this.state.value,groupApi:this,meta:t});return}eW(()=>{Object.values(this.getRelatedFields()).forEach(e=>{e.options.listeners?.onGroupSubmit?.({value:e.state.value,fieldApi:e})})}),this.options.listeners?.onSubmit?.({groupApi:this,value:this.state.value});try{await this.options.onGroupSubmit?.({value:this.state.value,groupApi:this,meta:t}),eW(()=>{this.setFormGroupState(e=>({...e,isSubmitted:!0,isSubmitSuccessful:!0})),n()})}catch(e){throw this.setFormGroupState(e=>({...e,isSubmitSuccessful:!1})),n(),e}},this.form=t.form,this.name=t.name,this.options=t,this.timeoutIds={validations:{},listeners:{},formListeners:{}},this.fieldInfo={instance:null,validationMetaMap:{onChange:void 0,onBlur:void 0,onSubmit:void 0,onMount:void 0,onServer:void 0,onDynamic:void 0}},this.store=sW(e=>{this.form.formGroupMetaDerived.get(),this.form.baseStore.get();let n=this.form.getFormGroupMeta(this.name)??tG(t.defaultMeta),r=this.form.getFieldValue(this.name);return!n.isTouched&&r===void 0&&this.options.defaultValue!==void 0&&!kW(r,this.options.defaultValue)&&(r=this.options.defaultValue),e&&e.value===r&&e.meta===n?e:{value:r,meta:n}}),this.handleSubmit=this.handleSubmit.bind(this)}get state(){return this.store.state}runValidator(e){if(WW(e.validate)){let t=UW[e.type](e.value,e.validate);return e.type===`validate`?aG(t):t.then(aG)}return e.validate(e.value)}handleSubmit(e){return this._handleSubmit(e)}};function rG(e){if(e)return e}function iG(e){return!!e&&typeof e==`object`&&`fields`in e}function aG(e){if(!e||typeof e!=`object`||!(`form`in e)&&!(`fields`in e))return e;let{form:t,fields:n,...r}=e;return{...r,group:t,fields:n}}function oG(e){switch(e){case`submit`:return`onSubmit`;case`blur`:return`onBlur`;case`mount`:return`onMount`;case`server`:return`onServer`;case`dynamic`:return`onDynamic`;default:return`onChange`}}var sG=class e{constructor(t){if(this.getFormFieldName=e=>{if(typeof this.fieldsMap==`string`)return wW(this.fieldsMap,e);let t=CW(e)[0];if(typeof t!=`string`)return``;let n=e.slice(t.length),r=this.fieldsMap[t];return wW(r,n)},this.getFormFieldOptions=e=>{let t={...e},n=t.validators;if(t.name=this.getFormFieldName(e.name),n&&(n.onChangeListenTo||n.onBlurListenTo)){let e={...n},r=e=>{if(e)return e.map(e=>this.getFormFieldName(e))};e.onChangeListenTo=r(n.onChangeListenTo),e.onBlurListenTo=r(n.onBlurListenTo),t.validators=e}return t},this.mount=()=>()=>{},this.validateArrayFieldsStartingFrom=async(e,t,n)=>this.form.validateArrayFieldsStartingFrom(this.getFormFieldName(e),t,n),this.validateField=(e,t)=>this.form.validateField(this.getFormFieldName(e),t),this.getFieldValue=e=>this.form.getFieldValue(this.getFormFieldName(e)),this.getFieldMeta=e=>this.form.getFieldMeta(this.getFormFieldName(e)),this.setFieldMeta=(e,t)=>this.form.setFieldMeta(this.getFormFieldName(e),t),this.setFieldValue=(e,t,n)=>this.form.setFieldValue(this.getFormFieldName(e),t,n),this.deleteField=e=>this.form.deleteField(this.getFormFieldName(e)),this.pushFieldValue=(e,t,n)=>this.form.pushFieldValue(this.getFormFieldName(e),t,n),this.insertFieldValue=async(e,t,n,r)=>this.form.insertFieldValue(this.getFormFieldName(e),t,n,r),this.replaceFieldValue=async(e,t,n,r)=>this.form.replaceFieldValue(this.getFormFieldName(e),t,n,r),this.removeFieldValue=async(e,t,n)=>this.form.removeFieldValue(this.getFormFieldName(e),t,n),this.swapFieldValues=(e,t,n,r)=>this.form.swapFieldValues(this.getFormFieldName(e),t,n,r),this.moveFieldValues=(e,t,n,r)=>this.form.moveFieldValues(this.getFormFieldName(e),t,n,r),this.clearFieldValues=(e,t)=>this.form.clearFieldValues(this.getFormFieldName(e),t),this.resetField=e=>this.form.resetField(this.getFormFieldName(e)),this.validateAllFields=e=>this.form.validateAllFields(e),t.form instanceof e){let e=t.form;if(this.form=e.form,typeof t.fields==`string`)this.fieldsMap=e.getFormFieldName(t.fields);else{let n={...t.fields};for(let t in n)n[t]=e.getFormFieldName(n[t]);this.fieldsMap=n}}else this.form=t.form,this.fieldsMap=t.fields;this.store=sW(()=>{let e=this.form.store.get(),t;if(typeof this.fieldsMap==`string`)t=hW(e.values,this.fieldsMap);else{t={};let n=this.fieldsMap;for(let r in n)t[r]=hW(e.values,n[r])}return{values:t}})}get state(){return this.store.state}async handleSubmit(e){return this.form.handleSubmit(e)}};function cG(e,t){if(!t)return;let n=Object.assign({},e,{state:RW(e.state)});t(n),n.fieldInfo!==e.fieldInfo&&(e.fieldInfo=n.fieldInfo),n.options!==e.options&&(e.options=n.options);let r=Object.keys({values:null,validationMetaMap:null,fieldMetaBase:null,formGroupStateBase:null,isSubmitting:null,isSubmitted:null,isValidating:null,submissionAttempts:null,isSubmitSuccessful:null,_force_re_eval:null}).reduce((t,r)=>(e.state[r]!==n.state[r]&&(t[r]=n.state[r]),t),{});return eW(()=>{Object.keys(r).length&&e.baseStore.setState(e=>({...e,...r})),n.state.errorMap!==e.state.errorMap&&e.setErrorMap(n.state.errorMap)}),n}function lG(e,t){return e===t}function uG(e,t=e=>e,n){let r=n?.compare??lG,i=(0,_.useCallback)(t=>{let{unsubscribe:n}=e.subscribe(t);return n},[e]),a=(0,_.useCallback)(()=>e.get(),[e]);return(0,wc.useSyncExternalStoreWithSelector)(i,a,a,t,r)}var dG=typeof window<`u`?_.useLayoutEffect:_.useEffect;function fG(e){let[t,n]=(0,_.useState)(()=>({form:e.form,name:e.name})),[r,i]=(0,_.useState)(()=>new ZW({...e})),a=r;(t.form!==e.form||t.name!==e.name)&&(a=new ZW({...e}),i(a),n({form:e.form,name:e.name}));let o=uG(a.store,e.mode===`array`?e=>e.meta._arrayVersion||0:e=>e.value),s=uG(a.store,e=>e.meta.isTouched),c=uG(a.store,e=>e.meta.isBlurred),l=uG(a.store,e=>e.meta.isDirty),u=uG(a.store,e=>e.meta.errorMap),d=uG(a.store,e=>e.meta.errorSourceMap),f=uG(a.store,e=>e.meta.isValidating),p=(0,_.useMemo)(()=>({...a,get state(){return{value:e.mode===`array`?a.state.value:o,get meta(){return{...a.state.meta,isTouched:s,isBlurred:c,isDirty:l,errorMap:u,errorSourceMap:d,isValidating:f}}}}}),[a,e.mode,o,s,c,l,u,d,f]);return dG(a.mount,[a]),dG(()=>{a.update(e)}),p}var pG=(({children:e,...t})=>{let n=fG(t),r=(0,_.useMemo)(()=>mW(e,n),[e,n]);return(0,L.jsx)(L.Fragment,{children:r})});function mG(){return(0,_.useState)(()=>IW())[0]}var hG=_,gG=`19.3.0`.split(`.`)[0]===`17`?mG:hG.useId;function _G(e){let[t,n]=(0,_.useState)(()=>({form:e.form,name:e.name})),[r,i]=(0,_.useState)(()=>new nG({...e}));(t.form!==e.form||t.name!==e.name)&&(i(new nG({...e})),n({form:e.form,name:e.name}));let a=uG(r.store,e=>e.value),o=uG(r.store,e=>e.meta.isTouched),s=uG(r.store,e=>e.meta.isBlurred),c=uG(r.store,e=>e.meta.isDirty),l=uG(r.store,e=>e.meta.errorMap),u=uG(r.store,e=>e.meta.errorSourceMap),d=uG(r.store,e=>e.meta.isValidating),f=uG(r.store,e=>e.meta.isSubmitting),p=uG(r.store,e=>e.meta.isSubmitted),m=uG(r.store,e=>e.meta.submissionAttempts),h=uG(r.store,e=>e.meta.isSubmitSuccessful),g=uG(r.store,e=>e.meta.canSubmit),v=uG(r.store,e=>e.meta.isValid),y=uG(r.store,e=>e.meta.isFieldsValid),b=uG(r.store,e=>e.meta.isFieldsValidating),x=uG(r.store,e=>e.meta.isGroupValid),S=(0,_.useMemo)(()=>({...r,handleSubmit:((...e)=>r._handleSubmit(...e)),get state(){return{...r.state,value:a,get meta(){return{...r.state.meta,isTouched:o,isBlurred:s,isDirty:c,errorMap:l,errorSourceMap:u,isValidating:d,isSubmitting:f,isSubmitted:p,submissionAttempts:m,isSubmitSuccessful:h,canSubmit:g,isValid:v,isFieldsValid:y,isFieldsValidating:b,isGroupValid:x}}}}}),[r,a,o,s,c,l,u,d,f,p,m,h,g,v,y,b,x]);return dG(r.mount,[r]),dG(()=>{r.update(e)}),S}var vG=(({children:e,...t})=>{let n=_G(t),r=(0,_.useMemo)(()=>mW(e,n),[e,n]);return(0,L.jsx)(L.Fragment,{children:r})});function yG({form:e,selector:t=e=>e,children:n}){let r=uG(e.store,t);return(0,L.jsx)(L.Fragment,{children:mW(n,r)})}function bG(e){let t=gG(),[n,r]=(0,_.useState)(e?.formId),[i,a]=(0,_.useState)(()=>new JW({...e,formId:e?.formId??t}));if(n!==e?.formId){let n=e?.formId??t;a(new JW({...e,formId:n})),r(n)}let o=(0,_.useMemo)(()=>{let e={...i,handleSubmit:((...e)=>i._handleSubmit(...e)),get formId(){return i._formId},get state(){return i.store.state}};return e.Field=function(e){return(0,L.jsx)(pG,{...e,form:i})},e.FormGroup=function(e){return(0,L.jsx)(vG,{...e,form:i})},e.Subscribe=function(e){return(0,L.jsx)(yG,{form:i,selector:e.selector,children:e.children})},e},[i]);dG(i.mount,[]),dG(()=>{i.update(e)});let s=(0,_.useRef)(!1);return dG(()=>{s.current&&e?.transform&&cG(i,e.transform)},[i,e?.transform]),dG(()=>{s.current=!0}),o}function xG({lens:e,selector:t=e=>e,children:n}){let r=uG(e.store,t);return(0,L.jsx)(L.Fragment,{children:mW(n,r)})}function SG(e){let[t]=(0,_.useState)(()=>{let n=new sG(e),r=e.form instanceof sG?e.form.form:e.form,i=n;return i.AppForm=function(e){return(0,L.jsx)(r.AppForm,{...e})},i.AppField=function(e){return(0,L.jsx)(r.AppField,{...t.getFormFieldOptions(e)})},i.Field=function(e){return(0,L.jsx)(r.Field,{...t.getFormFieldOptions(e)})},i.Subscribe=function(e){return(0,L.jsx)(xG,{lens:t,selector:e.selector,children:e.children})},Object.assign(i,{...e.formComponents})});return dG(t.mount,[t]),t}var CG=(0,_.createContext)(null),wG=(0,_.createContext)(null);function TG(){let e=(0,_.useContext)(wG);if(!e)throw Error("`formContext` only works when within a `formComponent` passed to `createFormHook`");return e}function EG(){function e(){let e=(0,_.useContext)(CG);if(!e)throw Error("`fieldContext` only works when within a `fieldComponent` passed to `createFormHook`");return e}return{fieldContext:CG,useFieldContext:e,useFormContext:TG,formContext:wG}}function DG({fieldComponents:e,fieldContext:t,formContext:n,formComponents:r}){function i(i){let a=bG(i),o=(0,_.useMemo)(()=>({children:e})=>(0,L.jsx)(n.Provider,{value:a,children:e}),[a]),s=(0,_.useMemo)(()=>(({children:n,...r})=>(0,L.jsx)(a.Field,{...r,children:r=>(0,L.jsx)(t.Provider,{value:r,children:n(Object.assign(r,e))})})),[a]);return(0,_.useMemo)(()=>Object.assign(a,{AppField:s,AppForm:o,...r}),[a,s,o])}function a({render:e,props:t}){return function(n){return e({...t,...n})}}function o({render:e,props:t,defaultValues:n}){return function(i){let a=SG((0,_.useMemo)(()=>({form:i.form,fields:i.fields,defaultValues:n,formComponents:r}),[i.form,i.fields]));return e({...t,...i,group:a})}}function s(e){return TG()}function c(i){return DG({fieldContext:t,formContext:n,fieldComponents:{...e,...i.fieldComponents},formComponents:{...r,...i.formComponents}})}return{useAppForm:i,withForm:a,withFieldGroup:o,useTypedAppFormContext:s,extendForm:c}}var{fieldContext:OG,useFieldContext:kG,formContext:AG,useFormContext:jG}=EG(),MG=({className:e,children:t,ref:n,...r})=>{let i=kG().state.meta.errors;if((!i||i.length===0)&&!t)return null;let a=[],o=e=>{typeof e==`string`?a.push(e):Array.isArray(e)?e.forEach(o):e&&typeof e==`object`&&(`issues`in e&&Array.isArray(e.issues)?e.issues.forEach(e=>{typeof e?.message==`string`&&a.push(e.message)}):`message`in e&&typeof e.message==`string`?a.push(e.message):Object.values(e).forEach(o))};return i?.forEach(o),a.length===0&&!t?null:(0,L.jsxs)(`ul`,{className:Q(`space-y-3xs`,e),ref:n,...r,children:[a.map((e,t)=>(0,L.jsx)(`li`,{className:`flex items-center gap-2xs style-text-strong--1 text-error-default`,children:e},`${e}-${t}`)),t]})},NG=({fileUploadButtonIcon:e=(0,L.jsx)(zi,{weight:`bold`}),fileUploadButtonLabel:t,maxFiles:n,maxFileSize:r,clearFilesLabel:i=`Remove files`,filesSelectedLabel:a=e=>`${e} files selected`,maxFilesErrorLabel:o=e=>`You can select up to ${e} file${e===1?``:`s`}.`,maxFileSizeErrorLabel:s=(e,t)=>`"${e}" exceeds the maximum size of ${t}.`,compact:c,variant:l,size:u,className:d,ref:f,...p})=>{let m=(0,_.useRef)(null),[h,g]=(0,_.useState)(p.defaultValue||p.value||`#000000`),[v,y]=(0,_.useState)([]),[b,x]=(0,_.useState)(null);if(p.type===`color`){let e=p.value!==void 0,t=(e?p.value:h)||`#000000`,{onChange:n,defaultValue:r,value:i,...a}=p,o=t=>{e||g(t.currentTarget.value),n?.(t)},s=e=>{if(m.current=e,typeof f==`function`){f(e);return}f&&typeof f==`object`&&(f.current=e)};return c?(0,L.jsxs)(`button`,{"aria-label":`Open color picker`,className:Q(`relative outline-2 outline-transparent transition-colors focus-within:outline-border hover:cursor-pointer`,u===`small`&&`size-lg -outline-offset-2`,u===`medium`&&`size-xl -outline-offset-4`,u===`large`&&`size-2xl -outline-offset-6`,d),disabled:p.disabled,onClick:()=>m.current?.click(),type:`button`,children:[(0,L.jsx)(`div`,{className:Q(`size-full`,u===`small`&&`rounded-lg`,u===`medium`&&`rounded-xl`,u===`large`&&`rounded-2xl`),style:{backgroundColor:t}}),(0,L.jsx)(tg,{className:`peer pointer-events-none invisible absolute`,defaultValue:e?void 0:t,onChange:o,ref:s,type:`color`,value:e?t:void 0,...a})]}):(0,L.jsxs)(`button`,{"aria-label":`Open color picker`,className:Q(`relative flex hover:cursor-pointer`,qb({variant:l,size:u}),d),disabled:p.disabled,onClick:()=>m.current?.click(),type:`button`,children:[(0,L.jsx)(`div`,{className:Q(`absolute top-1/2 left-xs aspect-square h-7/12 -translate-y-1/2`,u===`small`&&`rounded-md`,u===`medium`&&`rounded-lg`,u===`large`&&`rounded-xl`),style:{backgroundColor:t}}),(0,L.jsx)(tg,{className:`peer pointer-events-none invisible absolute top-lg`,defaultValue:e?void 0:t,onChange:o,ref:s,type:`color`,value:e?t:void 0,...a}),(0,L.jsx)(`p`,{className:Q(`text-left`,u===`small`&&`pr-2xs pl-lg style-text-default--1`,u===`medium`&&`pl-lg style-text-default-0`,u===`large`&&`pl-xl style-text-default-1`),children:t})]})}if(p.type===`file`){let{onChange:c,...l}=p,u=()=>{m.current&&(m.current.value=``),y([]),x(null)},d=e=>{let t=e.currentTarget,i=t.files?Array.from(t.files):[];if(n!==void 0&&i.length>n){y([]),x(o(n)),t.value=``;return}let a=r===void 0?void 0:i.find(e=>e.size>r);if(a&&r!==void 0){y([]),x(s(a.name,rce(r))),t.value=``;return}x(null),y(i),c?.(e)};return(0,L.jsxs)(`div`,{className:`flex items-center justify-between gap-lg`,children:[(0,L.jsxs)(`div`,{className:`flex items-center gap-xs`,children:[(0,L.jsxs)(Gb,{variant:`soft`,tone:`neutral`,onClick:()=>m.current?.click(),children:[e,t]}),(0,L.jsx)(tg,{ref:m,...l,hidden:!0,onChange:d}),(0,L.jsx)(`p`,{className:`style-text-default-0`,children:b?(0,L.jsx)(`span`,{className:`style-text-prose-0 text-error-default`,children:b}):v.length===0?(0,L.jsx)(`span`,{className:`style-text-prose-0 text-on-surface-variant`,children:p?.placeholder}):v.length===1?v[0].name:a(v.length)})]}),(0,L.jsx)(Gb,{"aria-label":i,size:`iconMedium`,variant:`ghost`,tone:`error`,onClick:u,children:(0,L.jsx)(Hi,{weight:`bold`})})]})}return(0,L.jsx)(tg,{className:Q(qb({variant:l,size:u}),d),ref:f,...p})},PG=({className:e,children:t,ref:n,...r})=>{let i=kG(),a=i.state.meta.isTouched&&i.state.meta.errors.length>0&&!i.state.meta.isValid;return(0,L.jsx)(NG,{"aria-invalid":a,className:Q(``,e),id:i.name,name:i.name,onChange:e=>i.handleChange(e.target.value),ref:n,value:i.state.value,...r,children:t})},FG=nr(`whitespace-nowrap`,{variants:{size:{small:`style-text-default--1`,medium:`style-text-default-0`,large:`style-text-default-1`},variant:{primary:`text-on-surface`,secondary:`text-on-surface-variant`}},defaultVariants:{size:`medium`,variant:`primary`}}),IG=({size:e,variant:t,showRequired:n=!1,className:r,children:i,ref:a,...o})=>{let s=kG(),c=s.name.replace(/([A-Z])/g,` $1`).replace(/^./,e=>e.toUpperCase()),l=s.state.meta.errors.length>0;return(0,L.jsxs)(`div`,{className:Q(FG({size:e,variant:t}),r,l&&`text-error-default`),ref:a,...o,children:[i||c,n&&(0,L.jsx)(`span`,{className:`ml-3xs text-error-default`,children:`*`})]})},LG=({children:e,...t})=>(0,L.jsx)(Wb,{children:(0,L.jsx)(Pb,{...t,children:e})}),RG=({side:e=`top`,alignOffset:t=0,sideOffset:n=5,className:r,children:i,...a})=>(0,L.jsx)(Bb,{children:(0,L.jsx)(Hb,{side:e,alignOffset:t,sideOffset:n,children:(0,L.jsx)(Ub,{className:Q(`z-50 w-fit origin-(--transform-origin) animate-in rounded-md bg-surface-2 px-xs py-3xs text-sm text-balance shadow-md fade-in-0 zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95`,r),...a,children:i})})}),zG=({children:e,...t})=>(0,L.jsx)(Rb,{...t,render:e}),BG=({className:e,children:t,ref:n,hide:r,...i})=>{let[a,o]=_.useState(!1),[s,c]=_.useState(!1),l=_.useRef(null),u=_.useCallback(e=>{l.current=e,typeof n==`function`?n(e):n&&(n.current=e)},[n]);return _.useEffect(()=>{let e=l.current;if(!e)return;let t=()=>c(e.hasAttribute(`data-dragging`));t();let n=new MutationObserver(t);return n.observe(e,{attributes:!0,attributeFilter:[`data-dragging`]}),()=>n.disconnect()},[]),(0,L.jsxs)(LG,{open:a||s,disabled:r,children:[(0,L.jsx)(zG,{delay:0,children:(0,L.jsx)(My,{"data-slot":`slider-thumb`,className:Q(`absolute aspect-square rounded-full bg-surface transition-[width,height,opacity] outline-none data-dragging:cursor-grabbing data-dragging:shadow-sm hover:[&:not([data-dragging])]:cursor-pointer`,e),onPointerEnter:()=>o(!0),onPointerLeave:()=>o(!1),ref:u,...i,children:t})}),(0,L.jsx)(RG,{sideOffset:10,children:(0,L.jsx)(Cy,{})})]})},VG=nr(`flex h-lg w-full items-center`,{variants:{size:{small:`[&_[data-slot='slider-thumb']]:size-xs [&_[data-slot='slider-thumb']]:border [&_[data-slot='slider-thumb'][data-dragging]]:size-sm [&_[data-slot='slider-track'][data-orientation='horizontal']]:h-3xs [&_[data-slot='slider-track'][data-orientation='vertical']]:w-3xs`,medium:`[&_[data-slot='slider-thumb']]:size-sm [&_[data-slot='slider-thumb']]:border-2 [&_[data-slot='slider-thumb'][data-dragging]]:size-md [&_[data-slot='slider-track'][data-orientation='horizontal']]:h-2xs [&_[data-slot='slider-track'][data-orientation='vertical']]:w-2xs`,large:`[&_[data-slot='slider-thumb']]:size-md [&_[data-slot='slider-thumb']]:border-3 [&_[data-slot='slider-thumb'][data-dragging]]:size-lg [&_[data-slot='slider-track'][data-orientation='horizontal']]:h-xs [&_[data-slot='slider-track'][data-orientation='vertical']]:w-xs`},tone:{brand:`[&_[data-slot='slider-thumb']]:border-brand-default [&_[data-slot=slider-indicator]]:bg-brand-default [&_[data-slot=slider-track]]:bg-brand-container-high`,accent:`[&_[data-slot='slider-thumb']]:border-accent-default [&_[data-slot=slider-indicator]]:bg-accent-default [&_[data-slot=slider-track]]:bg-accent-container-high`,neutral:`[&_[data-slot='slider-thumb']]:border-neutral-default [&_[data-slot=slider-indicator]]:bg-neutral-default [&_[data-slot=slider-track]]:bg-neutral-container-high`,error:`[&_[data-slot='slider-thumb']]:border-error-default [&_[data-slot=slider-indicator]]:bg-error-default [&_[data-slot=slider-track]]:bg-error-container-high`,info:`[&_[data-slot='slider-thumb']]:border-info-default [&_[data-slot=slider-indicator]]:bg-info-default [&_[data-slot=slider-track]]:bg-info-container-high`,success:`[&_[data-slot='slider-thumb']]:border-success-default [&_[data-slot=slider-indicator]]:bg-success-default [&_[data-slot=slider-track]]:bg-success-container-high`,warning:`[&_[data-slot='slider-thumb']]:border-warning-default [&_[data-slot=slider-indicator]]:bg-warning-default [&_[data-slot=slider-track]]:bg-warning-container-high`}},defaultVariants:{size:`medium`,tone:`brand`}}),HG=({size:e,tone:t,defaultValue:n,min:r=0,max:i=100,step:a=1,showIndicator:o=!0,showTooltip:s=!0,showThumbOnHover:c=!0,value:l,onValueChange:u,className:d,ref:f,...p})=>{let m=Array.isArray(l)?l:Array.isArray(n)?n:[l??n??r],{"aria-label":h,"aria-labelledby":g,..._}=p;return(0,L.jsx)(Sy,{className:Q(VG({size:e,tone:t}),d),defaultValue:n,"data-slot":`slider-root`,max:i,min:r,onValueChange:u,ref:f,step:a,value:l,..._,children:(0,L.jsx)(Oy,{className:`shrink-0 hover:cursor-pointer data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full`,children:(0,L.jsxs)(ky,{"data-slot":`slider-track`,className:Q(`relative size-full rounded-full`,!c&&`**:data-[slot='slider-thumb']:opacity-0 hover:**:data-[slot='slider-thumb']:opacity-100 active:**:data-[slot='slider-thumb']:opacity-100 data-dragging:**:data-[slot='slider-thumb']:opacity-100`),children:[(0,L.jsx)(Ny,{"data-slot":`slider-indicator`,className:Q(`rounded-full`,!o&&`opacity-0`)}),Array.from({length:m.length},(e,t)=>(0,L.jsx)(BG,{"aria-label":h,"aria-labelledby":g,index:t,hide:!s},t))]})})})},UG=({className:e,ref:t,...n})=>{let r=kG(),i=r.name.replace(/([A-Z])/g,` $1`).replace(/^./,e=>e.toUpperCase());return(0,L.jsx)(HG,{"aria-label":i,className:Q(``,e),onValueChange:e=>r.setValue(e),ref:t,value:r.state.value,...n})},WG=({children:e,...t})=>{let n=kG(),r=n.name.replace(/([A-Z])/g,` $1`).replace(/^./,e=>e.toUpperCase());return(0,L.jsxs)(nL,{value:n.state.value,onValueChange:e=>n.setValue(e),...t,children:[(0,L.jsxs)(cL,{"aria-label":r,children:[(0,L.jsx)(lL,{placeholder:`Select ${r.toLowerCase()}`}),(0,L.jsx)(aL,{children:(0,L.jsx)(mi,{weight:`bold`})})]}),(0,L.jsx)(oL,{children:(0,L.jsx)(iL,{children:e})})]})},GG=nr(`relative flex resize flex-col overflow-hidden rounded-xl outline outline-transparent transition-[outline] hover:not-focus-within:outline-border-strong data-[disabled=true]:cursor-not-allowed data-[disabled=true]:opacity-50`,{variants:{variant:{primary:`bg-surface shadow-2xs`,secondary:`bg-neutral-container`}},defaultVariants:{variant:`primary`}}),KG=({variant:e,className:t,ref:n,...r})=>{let i=r.value!==void 0,[a,o]=_.useState(String(r.defaultValue??``)),s=i?String(r.value??``):a,c=r.maxLength,l=typeof c==`number`,u=l&&s.length>=c,d=e=>{i||o(e.target.value),r.onChange?.(e)};return(0,L.jsxs)(`div`,{className:Q(GG({variant:e,className:t}),u?`outline-error-border-strong`:`focus-within:outline-brand-border-strong`),"data-disabled":r.disabled?!0:void 0,children:[(0,L.jsx)(`textarea`,{className:`grow resize-none px-sm py-xs style-text-prose-0 outline-none focus-within:caret-brand-border-strong`,ref:n,...r,onChange:d,value:s}),l&&(0,L.jsxs)(`span`,{className:Q(`w-full px-xs py-2xs text-right style-text-default--1 text-on-surface`,u&&`text-error-default`),children:[s.length,` / `,c]})]})},qG=({className:e,ref:t,...n})=>{let r=kG(),i=r.state.meta.isTouched&&r.state.meta.errors.length>0&&!r.state.meta.isValid;return(0,L.jsx)(KG,{"aria-invalid":i,className:Q(``,e),id:r.name,name:r.name,onChange:e=>r.handleChange(e.target.value),ref:t,value:r.state.value,...n})},JG=({...e})=>{let t=kG();return(0,L.jsxs)(`div`,{className:`flex items-center gap-xs`,children:[(0,L.jsx)(KI,{checked:t.state.value,id:t.name,name:t.name,onCheckedChange:e=>t.handleChange(e===!0),...e}),e.label&&(0,L.jsx)(UI,{htmlFor:t.name,children:e.label})]})},YG=nr(`group flex size-sm shrink-0 items-center justify-center rounded-full outline outline-transparent transition-all hover:outline-border-strong data-checked:bg-brand-default data-checked:outline-brand-border-strong data-disabled:opacity-50`,{variants:{variant:{elevated:`bg-surface shadow-2xs`,inSurface:`bg-surface-low inset-shadow-2xs`}},defaultVariants:{variant:`elevated`}}),XG=({variant:e,className:t,children:n,ref:r,...i})=>(0,L.jsxs)(UI,{htmlFor:i.id,children:[(0,L.jsx)(av,{className:Q(YG({variant:e,className:t})),ref:r,...i,children:(0,L.jsx)(ov,{"data-indicator":!0,className:`size-2xs origin-center scale-0 rounded-full bg-surface shadow-2xs transition-transform duration-200 ease-out data-checked:scale-100`})}),n]}),ZG=({className:e,children:t,ref:n,...r})=>{let i=_.useId();return(0,L.jsx)(sv,{"aria-labelledby":i,className:Q(`flex flex-col items-start gap-2xs data-disabled:opacity-50`,e),ref:n,...r,children:t})},QG=({children:e,...t})=>{let n=kG();return(0,L.jsx)(XG,{...t,onChange:e=>n.handleChange(e.target.value),value:n.state.value,children:e})},$G=({children:e,...t})=>{let n=kG();return(0,L.jsx)(ZG,{name:n.name,onChange:e=>{let t=e.target;t.type===`radio`&&n.handleChange(t.value)},value:n.state.value,...t,children:e})},eK=({label:e,className:t,ref:n,...r})=>(0,L.jsxs)(`div`,{className:`flex items-center gap-xs`,children:[(0,L.jsx)(Iy,{"aria-label":e??void 0,className:Q(`group relative flex h-md w-xl items-center rounded-full bg-surface-low inset-shadow-2xs outline-2 outline-transparent transition-colors ease-[cubic-bezier(0.26,0.75,0.38,0.45)] before:absolute before:rounded-full hover:cursor-pointer hover:not-disabled:outline-accent-border-strong disabled:pointer-events-none disabled:opacity-50 data-checked:bg-accent-default data-disabled:pointer-events-none data-disabled:opacity-50`,t),ref:n,...r,children:(0,L.jsx)(Ly,{className:`aspect-square size-xs translate-x-2xs rounded-full shadow-2xs transition-transform duration-500 ease-[cubic-bezier(0.68,-0.55,0.27,1.55)] data-checked:size-sm data-checked:translate-x-md data-checked:bg-accent-on-default data-unchecked:bg-accent-default`})}),e&&(0,L.jsx)(UI,{htmlFor:r.id,children:e})]}),tK=({...e})=>{let t=kG();return(0,L.jsx)(eK,{checked:t.state.value,id:t.name,name:t.name,onCheckedChange:e=>t.handleChange(e===!0),...e})},nK=(0,_.createContext)(void 0),rK=nr(`flex items-center justify-center rounded-full text-on-surface-variant transition-all hover:cursor-pointer disabled:opacity-70`,{variants:{size:{iconSmall:`size-md [&>svg]:size-xs`,iconMedium:`size-lg [&>svg]:size-sm`,iconLarge:`size-xl [&>svg]:size-md`,small:`h-md gap-3xs px-2xs style-text-default--2 [&>svg]:size-xs`,medium:`h-lg gap-2xs px-xs style-text-default--1 [&>svg]:size-sm`,large:`h-xl gap-xs px-sm style-text-default-0 [&>svg]:size-md`},tone:{brand:`hover:not-disabled:bg-brand-container hover:not-disabled:text-brand-on-container data-pressed:text-brand-default`,accent:`hover:not-disabled:bg-accent-container hover:not-disabled:text-accent-on-container data-pressed:text-accent-default`,neutral:`hover:not-disabled:bg-surface-low hover:not-disabled:text-neutral-on-container data-pressed:text-neutral-default`,error:`hover:not-disabled:bg-error-container hover:not-disabled:text-error-on-container data-pressed:text-error-default`,info:`hover:not-disabled:bg-info-container hover:not-disabled:text-info-on-container data-pressed:text-info-default`,success:`hover:not-disabled:bg-success-container hover:not-disabled:text-success-on-container data-pressed:text-success-default`,warning:`hover:not-disabled:bg-warning-container hover:not-disabled:text-warning-on-container data-pressed:text-warning-default`}},defaultVariants:{size:`medium`,tone:`brand`}}),iK=({size:e,tone:t,className:n,children:r,ref:i,...a})=>{let o=(0,_.useContext)(nK),s=e??o?.size??`medium`;return(0,L.jsx)(kb,{ref:i,...a,render:(e,i)=>(0,L.jsx)(`button`,{...e,className:Q(rK({size:s,tone:t,className:n})),type:`button`,children:typeof r==`function`?r(i):r})})},aK=({children:e,...t})=>{let n=kG();return(0,L.jsx)(iK,{id:n.name,name:n.name,onChange:e=>n.handleChange(!n.state.value),pressed:n.state.value,...t,children:e})},oK=({className:e,children:t,ref:n,...r})=>{let i=kG(),a=i.state.meta.isTouched&&i.state.meta.errors.length>0&&!i.state.meta.isValid;return(0,L.jsx)(uV,{"aria-invalid":a,className:Q(``,e),id:i.name,ref:n,...r,children:t})},sK=({className:e,ref:t,...n})=>{let r=kG(),i=r.state.meta.isTouched&&r.state.meta.errors.length>0&&!r.state.meta.isValid;return(0,L.jsx)(pV,{"aria-invalid":i,className:Q(``,e),id:r.name,name:r.name,onChange:e=>r.handleChange(e.target.value),ref:t,value:r.state.value,...n})},cK=({className:e,children:t,ref:n,...r})=>(0,L.jsx)(`div`,{className:Q(`flex w-full flex-col gap-2xs`,e),ref:n,...r,children:t}),lK=({className:e,children:t,ref:n,...r})=>(0,L.jsx)(`div`,{className:Q(`flex items-center justify-between gap-sm`,e),ref:n,...r,children:t}),uK=({className:e,children:t,ref:n,...r})=>(0,L.jsx)(`form`,{className:Q(`flex flex-col gap-sm`,e),ref:n,...r,children:t}),dK=(e,t)=>{if(e!=null){if(typeof e==`string`){e.trim()&&t.add(e);return}if(Array.isArray(e)){e.forEach(e=>dK(e,t));return}if(typeof e==`object`){let n=e.message;if(typeof n==`string`){t.add(n);return}Object.values(e).forEach(e=>dK(e,t))}}},fK=({className:e,children:t,ref:n,...r})=>{let i=jG();return(0,L.jsx)(i.Subscribe,{selector:e=>[e.errors,e.fieldMeta],children:([i,a])=>{let o=new Set;return dK(i,o),Object.values(a).forEach(e=>dK(e.errors,o)),o.size===0?null:(0,L.jsxs)(Wi,{className:Q(``,e),ref:n,tone:`error`,...r,children:[(0,L.jsx)(Ki,{children:(0,L.jsx)(Ui,{weight:`duotone`})}),t,(0,L.jsx)(Gi,{children:(0,L.jsx)(`ul`,{children:[...o].map(e=>(0,L.jsx)(`li`,{children:e},e))})})]})}})},pK=({orientation:e=`horizontal`,className:t,children:n,ref:r,...i})=>(0,L.jsx)(`div`,{className:Q(`flex gap-2xs`,t,e===`horizontal`?`flex-row`:`flex-col`),ref:r,...i,children:n}),mK=({className:e,children:t,ref:n,...r})=>{let i=jG(),a=()=>{i.reset()};return(0,L.jsx)(i.Subscribe,{selector:e=>e,children:i=>(0,L.jsx)(Gb,{className:Q(`w-full`,e),disabled:!i.values,onClick:a,ref:n,type:`reset`,...r,children:t})})},hK=({className:e,children:t,ref:n,...r})=>(0,L.jsx)(`div`,{className:Q(`flex flex-col gap-xs`,e),ref:n,...r,children:t}),gK=({className:e,children:t,ref:n,...r})=>(0,L.jsx)(`div`,{className:Q(`flex flex-col gap-md`,e),ref:n,...r,children:t}),_K=nr(``,{variants:{size:{small:`style-text-strong-0`,medium:`style-text-strong-1`,large:`style-text-strong-2`}},defaultVariants:{size:`medium`}}),vK=({size:e,className:t,children:n,ref:r,...i})=>(0,L.jsx)(`span`,{className:Q(_K({size:e,className:t})),ref:r,...i,children:n}),yK=({className:e,children:t,ref:n,...r})=>{let i=jG();return(0,L.jsx)(i.Subscribe,{selector:e=>e,children:i=>(0,L.jsx)(Gb,{className:Q(`w-full`,e),disabled:i.isSubmitting||!i.canSubmit,ref:n,type:`submit`,...r,children:i.isSubmitting?(0,L.jsx)(_i,{className:`animate-spin`,weight:`bold`}):t})})},{useAppForm:bK,withFieldGroup:xK,withForm:SK,useTypedAppFormContext:CK}=DG({fieldContext:OG,fieldComponents:{FieldCheckbox:JG,FieldDescription:BU,FieldErrors:MG,FieldRow:lK,FieldInput:PG,FieldInputGroup:oK,FieldInputGroupInput:sK,FieldLabel:IG,FieldRadio:QG,FieldRadioGroup:$G,FieldSelect:WG,FieldSet:cK,FieldSlider:UG,FieldSwitch:tK,FieldTextArea:qG,FieldToggle:aK},formContext:AG,formComponents:{FormErrors:fK,FormFooter:pK,FormReset:mK,FormSet:hK,FormSetHeading:vK,FormSetContent:gK,FormSubmit:yK}}),wK=({children:e,className:t,ref:n,id:r,"aria-label":i,...a})=>{let o=_.useId(),s=r??o;return(0,L.jsxs)(L.Fragment,{children:[i&&(0,L.jsx)(`label`,{className:`sr-only`,htmlFor:s,children:i}),(0,L.jsx)(T_,{className:Q(`group flex items-center gap-2xs has-disabled:opacity-30`,t),id:s,ref:n,...a,children:e})]})},TK=({className:e,...t})=>(0,L.jsx)(E_,{className:Q(`relative h-lg w-md rounded-md bg-surface text-center style-text-default-0 shadow-2xs outline outline-transparent transition-colors hover:outline-border-strong focus:outline-brand-border-strong`,e),...t}),EK=({className:e,ref:t,...n})=>(0,L.jsx)(tm,{className:Q(`flex items-center justify-center text-on-surface-variant`,e),ref:t,...n,children:(0,L.jsx)(Ni,{weight:`bold`})}),DK=({className:e,children:t,ref:n,...r})=>(0,L.jsx)(`div`,{className:Q(`inline-flex h-md items-center justify-center rounded-md bg-neutral-container-high px-2xs align-middle style-text-default--1 whitespace-nowrap text-neutral-on-container select-none [&:has(svg)]:size-md [&:has(svg)]:p-0 [&>svg]:size-sm`,e),ref:n,...r,children:t});function OK(e){return kK(e)||typeof e==`function`||AK(e)}function kK(e){return typeof e==`function`&&(()=>{let t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}function AK(e){return typeof e==`object`&&typeof e.$$typeof==`symbol`&&[`react.memo`,`react.forward_ref`].includes(e.$$typeof.description)}function jK(e,t){return e==null?null:OK(e)?_.createElement(e,t):e}function MK(e){if(`cell`in e&&e.cell){let t=e.cell,n=t.column.columnDef,r=t,i=n;return r.getIsAggregated?.()?jK(i.aggregatedCell??n.cell,t.getContext()):r.getIsPlaceholder?.()?null:jK(n.cell,t.getContext())}return`header`in e&&e.header?jK(e.header.column.columnDef.header,e.header.getContext()):`footer`in e&&e.footer?jK(e.footer.column.columnDef.footer,e.footer.getContext()):null}function NK(e){let t=uG(e.source,e.selector,{compare:cW});return typeof e.children==`function`?e.children(t):e.children}function PK(e){let t=e;return Object.defineProperty(e,"state",{get(){return e.get()}}),`set`in e&&(t.setState=e.set.bind(e)),t}function FK(e){let{createAtom:t,batch:n}=e,r=t(0);return{createOptionsStore:!1,wrapExternalAtoms:!1,addSubscription:()=>{throw Error(`Feature not supported in current reactivity implementation`)},unmount:()=>{throw Error(`Feature not supported in current reactivity implementation`)},schedule:e.schedule??(e=>queueMicrotask(e)),batch:n,untrack:e=>e(),createReadonlyAtom:(e,n)=>{let i=n?.compare??Object.is,a=!1,o,s=()=>{let t=e();return(!a||!i(o,t))&&(o=t,a=!0),o},c=t(()=>(r.get(),s()),{compare:i});return{get:s,subscribe:c.subscribe.bind(c)}},createWritableAtom:(e,n)=>t(e,{compare:n?.compare}),commit:()=>{r.set(e=>e+1)}}}function IK(e,t=Object.is){let n=!1,r;return{get:e.get,markCommitted:e=>{r=e,n=!0},subscribe:i=>e.subscribe(e=>{(!n||!t(r,e))&&i(e)})}}function LK(){return FK({createAtom:rW,batch:eW})}function RK(e,t){return typeof e==`function`?e(t):e}function zK(e){if(Array.isArray(e))return e.map(zK);if(e&&typeof e==`object`){let t=Object.getPrototypeOf(e);if(t!==Object.prototype&&t!==null)return e;let n=t===null?VK():{},r=Object.keys(e);for(let t=0;t<r.length;t++){let i=r[t];Object.defineProperty(n,i,{configurable:!0,enumerable:!0,value:zK(e[i]),writable:!0})}return n}return e}function BK(e,t){let n=Object.keys(t),r=e;for(let e=0;e<n.length;e++){let i=n[e];!i.startsWith(`_memo_`)&&i!==`_cellsCache`&&(r[i]=t[i])}return e}function VK(){return Object.create(null)}function HK(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function UK(e,t){return n=>{(t.options.atoms?.[e]??t.baseAtoms[e]).set(e=>RK(n,e))}}function WK(e){if(typeof e!=`object`||!e)return!1;if(Array.isArray(e))return!0;let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function GK(e){return Reflect.ownKeys(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}var KK=3;function qK(e,t){return JK(e,t,KK)}function JK(e,t,n){if(Object.is(e,t))return!0;if(n<=0||!WK(e)||!WK(t)||(Array.isArray(e)||Array.isArray(t))&&(!Array.isArray(e)||!Array.isArray(t)||e.length!==t.length))return!1;let r=GK(e),i=GK(t);if(r.length!==i.length)return!1;let a=e,o=t;for(let e=0;e<r.length;e++){let i=r[e];if(!Object.prototype.propertyIsEnumerable.call(t,i)||!JK(a[i],o[i],n-1))return!1}return!0}function YK(e,t,n,r=qK){let i=`on${t.charAt(0).toUpperCase()}${t.slice(1)}Change`,a=e.options[i];a&&a(e=>{let t=RK(n,e);return r(e,t)?e:t})}function XK(e){return e instanceof Function}function ZK(e,t){let n=[],r=e=>{e.forEach(e=>{n.push(e);let i=t(e);i.length&&r(i)})};return r(e),n}var QK=({fn:e,memoDeps:t,onAfterCompare:n,onAfterUpdate:r,onBeforeCompare:i,onBeforeUpdate:a})=>{let o=[],s;return c=>{i?.();let l=t?.(c),u=!l||l.length!==o?.length;if(!u&&l){for(let e=0;e<l.length;e++)if(l[e]!==o[e]){u=!0;break}}return n?.(u),u?(o=l,a?.(),s=e(...l??[]),r?.(s),s):s}};function $K(e){let t=!1;return()=>{if(!t){t=!0;return}e()}}var eq=(e,t)=>{for(e=String(e);e.length<t;)e=` `+e;return e};function tq({feature:e,fnName:t,objectId:n,onAfterUpdate:r,table:i,...a}){let o,s,c=0,l;if(process.env.NODE_ENV===`development`){let{debugAll:n}=i.options,{parentName:r}=nq(t,`.`),a=i.options[`debug${(r==`table`?r:r+`s`).replace(r,r.charAt(0).toUpperCase()+r.slice(1))}`],o=e?i.options[`debug${e.charAt(0).toUpperCase()+e.slice(1)}`]:!1;l=n||a||o}function u(r,o){let s=c===0?`(1st run)`:o?`(rerun #`+c+`)`:`(cache)`;c++,console.groupCollapsed(`%c⏱ ${eq(`${r.toFixed(1)} ms`,12)} %c${s}%c ${t}%c ${n?`(${t.split(`.`)[0]}Id: ${n})`:``}`,`font-size: .6rem; font-weight: bold; ${o?`color: hsl(
79
- ${Math.max(0,Math.min(120-Math.log10(r)*60,120))}deg 100% 31%);`:``} `,`color: ${c<2?`#FF00FF`:`#FF1493`}`,`color: #666`,`color: #87CEEB`),console.info({feature:e,state:i.store.state,deps:a.memoDeps?.toString()}),console.trace(),console.groupEnd()}let d=()=>{if(!r)return;let{schedule:e,untrack:t}=i._reactivity;e(()=>t(()=>r()))},f=process.env.NODE_ENV===`development`?{onBeforeCompare:()=>{},onAfterCompare:e=>{},onBeforeUpdate:()=>{l&&(o=performance.now())},onAfterUpdate:()=>{l&&(s=performance.now(),u(Math.round((s-o)*100)/100,!0)),d()}}:{onAfterUpdate:()=>{d()}};return QK({...a,...f})}function nq(e,t=`_`){let[n,r]=e.split(t);return{fnKey:r,fnName:`${n}.${r}`,parentName:n}}function rq(e,t,n){for(let[r,{fn:i,memoDeps:a}]of Object.entries(n)){let{fnKey:n,fnName:o}=nq(r);t[n]=a?tq({memoDeps:a,fn:i,fnName:o,table:t,feature:e}):i}}function iq(e,t,n,r){for(let[i,{fn:a,memoDeps:o}]of Object.entries(r)){let{fnKey:r,fnName:s}=nq(i);if(o){let i=`_memo_${r}`;t[r]=function(...t){if(!this[i]){let t=this;this[i]=tq({memoDeps:e=>o(t,e),fn:(...e)=>a(t,...e),fnName:s,objectId:t.id,table:n,feature:e})}return this[i](...t)}}else t[r]=function(...e){return a(this,...e)}}}function aq(e,t,n,...r){return e[t]?.(...r)??n(e,...r)}function oq(e){return e.row.getValue(e.column.id)}function sq(e){return e.getValue()??e.table.options.renderFallbackValue}function cq(e){return{table:e.table,column:e.column,row:e.row,cell:e,getValue:()=>e.getValue(),renderValue:()=>e.renderValue()}}var lq={assignCellPrototype:(e,t)=>{iq(`coreCellsFeature`,e,t,{cell_getValue:{fn:e=>oq(e)},cell_renderValue:{fn:e=>sq(e)},cell_getContext:{fn:e=>cq(e),memoDeps:e=>[e]}})}};function uq(e){if(!e._headerPrototype){e._headerPrototype={table:e};let t=Object.values(e._features);for(let n=0;n<t.length;n++)t[n].assignHeaderPrototype?.(e._headerPrototype,e)}return e._headerPrototype}function dq(e,t,n){let r=uq(e),i=Object.create(r);i.colSpan=0,i.column=t,i.depth=n.depth,i.headerGroup=null,i.id=n.id??t.id,i.index=n.index,i.isPlaceholder=!!n.isPlaceholder,i.placeholderId=n.placeholderId,i.rowSpan=0,i.subHeaders=[];let a=e._headerInstanceInitFns;for(let e=0;e<a.length;e++)a[e](i);return i}function fq(){return{start:[],end:[]}}function pq(e){let t=e.getAllColumns(),n=e.getAllLeafColumnsById(),{start:r}=e.atoms.columnPinning?.get()??fq(),i=[];for(let e=0;e<r.length;e++){let t=n[r[e]];t&&aq(t,`getIsVisible`,xq)&&i.push(t)}return jq(t,i,e,`start`)}function mq(e){let t=e.getAllColumns(),n=e.getAllLeafColumnsById(),{end:r}=e.atoms.columnPinning?.get()??fq(),i=[];for(let e=0;e<r.length;e++){let t=n[r[e]];t&&aq(t,`getIsVisible`,xq)&&i.push(t)}return jq(t,i,e,`end`)}function hq(e){let t=e.getAllColumns(),n=aq(e,`getVisibleLeafColumns`,wq),{start:r,end:i}=e.atoms.columnPinning?.get()??fq();if(r.length||i.length){let e=[...r,...i];n=n.filter(t=>!e.includes(t.id))}return jq(t,n,e,`center`)}function gq(e){let{start:t}=e.atoms.columnPinning?.get()??fq(),n=e.getAllLeafColumnsById(),r=[];for(let e=0;e<t.length;e++){let i=n[t[e]];i&&r.push(i)}return r}function _q(e){let{end:t}=e.atoms.columnPinning?.get()??fq(),n=e.getAllLeafColumnsById(),r=[];for(let e=0;e<t.length;e++){let i=n[t[e]];i&&r.push(i)}return r}function vq(e){let{start:t,end:n}=e.atoms.columnPinning?.get()??fq();if(!t.length&&!n.length)return e.getAllLeafColumns();let r=[...t,...n];return e.getAllLeafColumns().filter(e=>!r.includes(e.id))}function Ige(e){return aq(e,`getStartLeafColumns`,gq).filter(e=>aq(e,`getIsVisible`,xq))}function Lge(e){return aq(e,`getEndLeafColumns`,_q).filter(e=>aq(e,`getIsVisible`,xq))}function Rge(e){return aq(e,`getCenterLeafColumns`,vq).filter(e=>aq(e,`getIsVisible`,xq))}function yq(e,t){return t?t===`start`?aq(e,`getStartVisibleLeafColumns`,Ige):t===`end`?aq(e,`getEndVisibleLeafColumns`,Lge):aq(e,`getCenterVisibleLeafColumns`,Rge):aq(e,`getVisibleLeafColumns`,wq)}function zge(){return VK()}function bq(e,t){Sq(e)&&Tq(e.table,n=>{let r=Object.assign(VK(),n),i=t??!aq(e,`getIsVisible`,xq),a=e.getLeafColumns();for(let e=0;e<a.length;e++){let t=a[e];Sq(t)&&(r[t.id]=i)}return r})}function xq(e){let t=e.table.atoms.columnVisibility?.get();if(!t)return!0;let n=e.columns;return n.length?n.some(e=>aq(e,`getIsVisible`,xq)):(HK(t,e.id)?t[e.id]:void 0)??!0}function Sq(e){return(e.columnDef.enableHiding??!0)&&(e.table.options.enableHiding??!0)}function Bge(e){return t=>{bq(e,t.target.checked)}}function Vge(e){let t=e.getAllCells(),n=[];for(let e=0;e<t.length;e++){let r=t[e];aq(r.column,`getIsVisible`,xq)&&n.push(r)}let{start:r,end:i}=e.table.atoms.columnPinning?.get()??fq();if(!r.length&&!i.length)return n;let a=aq(e,`getVisibleCellsByColumnId`,Cq),o=[];for(let e=0;e<r.length;e++){let t=a[r[e]];t&&o.push(t)}let s=[];for(let e=0;e<i.length;e++){let t=a[i[e]];t&&s.push(t)}let c=[];for(let e=0;e<n.length;e++){let t=n[e],a=t.column.id;!r.includes(a)&&!i.includes(a)&&c.push(t)}return[...o,...c,...s]}function Cq(e){let t=VK(),n=e.getAllCells();for(let e=0;e<n.length;e++){let r=n[e];aq(r.column,`getIsVisible`,xq)&&(t[r.column.id]=r)}return t}function Hge(e){return e.getAllFlatColumns().filter(e=>aq(e,`getIsVisible`,xq))}function wq(e){return e.getAllLeafColumns().filter(e=>aq(e,`getIsVisible`,xq))}function Tq(e,t){YK(e,`columnVisibility`,t)}function Uge(e,t){Tq(e,t?VK():Object.assign(VK(),zK(e.initialState.columnVisibility??{})))}function Eq(e,t){t??=!Dq(e);let n=VK(),r=e.getAllLeafColumns();for(let e=0;e<r.length;e++){let i=r[e];n[i.id]=t||!Sq(i)}Tq(e,n)}function Dq(e){return!e.getAllLeafColumns().some(e=>!aq(e,`getIsVisible`,xq))}function Wge(e){return e.getAllLeafColumns().some(e=>aq(e,`getIsVisible`,xq))}function Gge(e){return t=>{Eq(e,t.target.checked)}}function Oq(e,t=1){let n=t;for(let r=0;r<e.length;r++){let i=e[r];aq(i,`getIsVisible`,xq)&&i.columns.length&&(n=Math.max(n,Oq(i.columns,t+1)))}return n}function Kge(e,t){return e?`${e}_${t}`:String(t)}function qge(e,t,n,r){let i=e??``;return t&&(i=i?`${i}_${t}`:String(t)),n&&(i=i?`${i}_${n}`:n),r&&(i=i?`${i}_${r}`:r),i}function Jge(e,t){let n=0;for(let r=0;r<e.length;r++)e[r].column===t&&n++;return n}function kq(e,t,n,r,i,a){let o={depth:t,id:Kge(r,t),headers:[]},s=[];for(let i=0;i<e.length;i++){if(!(i in e))continue;let a=e[i],c=s[s.length-1],l=a.column.depth===o.depth,u,d=!1;if(l&&a.column.parent?u=a.column.parent:(u=a.column,d=!0),c&&c.column===u)c.subHeaders.push(a);else{let e=dq(n,u,{id:qge(r,t,u.id,a.id),isPlaceholder:d,placeholderId:d?String(Jge(s,u)):void 0,depth:t,index:s.length});e.subHeaders.push(a),s.push(e)}o.headers.push(a),a.headerGroup=o}for(let e=0;e<a.length;e++)a[e](o);i.push(o),t>0&&kq(s,t-1,n,r,i,a)}function Aq(e){for(let t=0;t<e.length;t++){let n=e[t];if(!aq(n.column,`getIsVisible`,xq))continue;let r=0;if(n.subHeaders.length){Aq(n.subHeaders);for(let e=0;e<n.subHeaders.length;e++){let t=n.subHeaders[e];aq(t.column,`getIsVisible`,xq)&&(r+=t.colSpan)}}else r=1;if(n.colSpan=r,n.isPlaceholder&&n.subHeaders.length===1&&n.subHeaders[0].column===n.column){let e=1,t=n.subHeaders[0];for(;t;)t.rowSpan=0,e++,t=t.subHeaders.length===1&&t.subHeaders[0].column===n.column?t.subHeaders[0]:void 0;n.rowSpan=e}else n.rowSpan=1}}function jq(e,t,n,r){let i=Oq(e),a=[],o=n._headerGroupInstanceInitFns,s=Array(t.length);for(let e=0;e<t.length;e++)e in t&&(s[e]=dq(n,t[e],{depth:i,index:e}));return kq(s,i-1,n,r,a,o),a.reverse(),Aq(a[0]?.headers??[]),a}function Yge(e){if(!e._columnPrototype){e._columnPrototype={table:e};let t=Object.values(e._features);for(let n=0;n<t.length;n++)t[n].assignColumnPrototype?.(e._columnPrototype,e)}return e._columnPrototype}function Xge(e,t,n,r){let i={...e.getDefaultColumnDef(),...t},a=i.accessorKey,o=a===void 0?void 0:String(a),s=i.id??o?.replaceAll(`.`,`_`)??(typeof i.header==`string`?i.header:void 0),c;if(i.accessorFn)c=i.accessorFn;else if(a!==void 0){if(typeof a==`string`&&a.includes(`.`)){let e=a.split(`.`);c=t=>{let n=t;for(let t=0;t<e.length;t++){let r=e[t];n=n?.[r],process.env.NODE_ENV===`development`&&n===void 0&&console.warn(`"${r}" in deeply nested key "${a}" returned undefined.`)}return n}}else c=e=>e[i.accessorKey]}if(!s)throw process.env.NODE_ENV===`development`?Error(i.accessorFn?`coreColumnsFeature require an id when using an accessorFn`:`coreColumnsFeature require an id when using a non-string header`):Error();let l=Yge(e),u=Object.create(l);u.accessorFn=c,u.columnDef=i,u.columns=[],u.depth=n,u.id=`${String(s)}`,u.parent=r;let d=e._columnInstanceInitFns;for(let e=0;e<d.length;e++)d[e](u);return u}function Mq(e){let t=e.atoms.columnOrder?.get();return n=>{let r=[];if(!t?.length)r=n;else{let e=new Map;for(let t=0;t<n.length;t++){let r=n[t];e.set(r.id,r)}for(let n=0;n<t.length;n++){let i=t[n],a=e.get(i);a&&(r.push(a),e.delete(i))}for(let t=0;t<n.length;t++){let i=n[t];e.has(i.id)&&r.push(i)}}return Zge(e,r)}}function Zge(e,t){let n=e.atoms.grouping?.get()??[],{groupedColumnMode:r}=e.options;if(!n.length||!r)return t;let i=t.filter(e=>!n.includes(e.id));if(r===`remove`)return i;let a=new Map;for(let e=0;e<t.length;e++){let n=t[e];a.set(n.id,n)}let o=[];for(let e=0;e<n.length;e++){let t=a.get(n[e]);t&&o.push(t)}return[...o,...i]}function Qge(e){return[e,...e.columns.flatMap(e=>e.getFlatColumns())]}function $ge(e){if(e.columns.length){let t=e.columns.flatMap(e=>e.getLeafColumns());return aq(e.table,`getOrderColumns`,Mq)(t)}return[e]}function e_e(e){return{header:e=>{let t=e.header.column.columnDef;return t.accessorKey?t.accessorKey:t.accessorFn?t.id:null},cell:e=>e.renderValue()?.toString?.()??null,...Object.values(e._features).reduce((e,t)=>Object.assign(e,t.getDefaultColumnDef?.()),{}),...e.options.defaultColumn}}function Nq(e,t,n,r=0){let i=Array(t.length);for(let a=0;a<t.length;a++){if(!(a in t))continue;let o=t[a],s=Xge(e,o,r,n),c=o;s.columns=c.columns?Nq(e,c.columns,s,r+1):[],i[a]=s}return i}function t_e(e){return Nq(e,e.options.columns)}function n_e(e){return e.getAllColumns().flatMap(e=>e.getFlatColumns())}function r_e(e){let t=VK(),n=e.getAllFlatColumns();for(let e=0;e<n.length;e++){let r=n[e];t[r.id]=r}return t}function i_e(e){let t=e.getAllColumns().flatMap(e=>e.getLeafColumns());return aq(e,`getOrderColumns`,Mq)(t)}function a_e(e){let t=VK(),n=e.getAllLeafColumns();for(let e=0;e<n.length;e++){let r=n[e];t[r.id]=r}return t}function Pq(e,t){let n=e.getAllFlatColumnsById()[t];return process.env.NODE_ENV===`development`&&!n&&console.warn(`[Table] Column with id '${t}' does not exist.`),n}var o_e={assignColumnPrototype:(e,t)=>{iq(`coreColumnsFeature`,e,t,{column_getFlatColumns:{fn:e=>Qge(e),memoDeps:e=>[e.table.options.columns]},column_getLeafColumns:{fn:e=>$ge(e),memoDeps:e=>[e.table.atoms.columnOrder?.get(),e.table.atoms.grouping?.get(),e.table.options.columns,e.table.options.groupedColumnMode]}})},constructTableAPIs:e=>{rq(`coreColumnsFeature`,e,{table_getDefaultColumnDef:{fn:()=>e_e(e),memoDeps:()=>[e.options.defaultColumn]},table_getAllColumns:{fn:()=>t_e(e),memoDeps:()=>[e.options.columns]},table_getAllFlatColumns:{fn:()=>n_e(e),memoDeps:()=>[e.options.columns]},table_getAllFlatColumnsById:{fn:()=>r_e(e),memoDeps:()=>[e.options.columns]},table_getAllLeafColumns:{fn:()=>i_e(e),memoDeps:()=>[e.atoms.columnOrder?.get(),e.atoms.grouping?.get(),e.options.columns,e.options.groupedColumnMode]},table_getAllLeafColumnsById:{fn:()=>a_e(e),memoDeps:()=>[e.getAllLeafColumns()]},table_getColumn:{fn:t=>Pq(e,t)}})}};function Fq(e,t){for(let n=0;n<e.subHeaders.length;n++)Fq(e.subHeaders[n],t);t.push(e)}function s_e(e){let t=[];return Fq(e,t),t}function c_e(e){return{column:e.column,header:e,table:e.column.table}}function l_e(e){let{start:t,end:n}=e.atoms.columnPinning?.get()??fq(),r=e.getAllColumns(),i=aq(e,`getVisibleLeafColumns`,wq);if(!t.length&&!n.length)return jq(r,i,e);let a=e.getAllLeafColumnsById(),o=[];for(let e=0;e<t.length;e++){let n=a[t[e]];n&&aq(n,`getIsVisible`,xq)&&o.push(n)}let s=[];for(let e=0;e<n.length;e++){let t=a[n[e]];t&&aq(t,`getIsVisible`,xq)&&s.push(t)}let c=i.filter(e=>!t.includes(e.id)&&!n.includes(e.id));return jq(r,[...o,...c,...s],e)}function u_e(e){return[...e.getHeaderGroups()].reverse()}function d_e(e){let t=e.getHeaderGroups(),n=[];for(let e=0;e<t.length;e++){let r=t[e].headers;for(let e=0;e<r.length;e++)n.push(r[e])}return n}function f_e(e){let t=e.getHeaderGroups()[0]?.headers??[],n=[];for(let e=0;e<t.length;e++){let r=t[e].getLeafHeaders();for(let e=0;e<r.length;e++)n.push(r[e])}return n}var p_e={assignHeaderPrototype:(e,t)=>{iq(`coreHeadersFeature`,e,t,{header_getLeafHeaders:{fn:e=>s_e(e),memoDeps:e=>[e.column.table.options.columns]},header_getContext:{fn:e=>c_e(e),memoDeps:e=>[e.column.table.options.columns]}})},constructTableAPIs:e=>{rq(`coreHeadersFeature`,e,{table_getHeaderGroups:{fn:()=>l_e(e),memoDeps:()=>[e.options.columns,e.atoms.columnOrder?.get(),e.atoms.grouping?.get(),e.atoms.columnPinning?.get(),e.atoms.columnVisibility?.get(),e.options.groupedColumnMode]},table_getFooterGroups:{fn:()=>u_e(e),memoDeps:()=>[e.getHeaderGroups()]},table_getFlatHeaders:{fn:()=>d_e(e),memoDeps:()=>[e.getHeaderGroups()]},table_getLeafHeaders:{fn:()=>f_e(e),memoDeps:()=>[e.getHeaderGroups()]}})}};function m_e(e){if(!e._rowPrototype){e._rowPrototype={table:e};let t=Object.values(e._features);for(let n=0;n<t.length;n++)t[n].assignRowPrototype?.(e._rowPrototype,e)}return e._rowPrototype}var Iq=(e,t,n,r,i,a,o)=>{let s=m_e(e),c=Object.create(s);c._displayIndexCache=-1,c._uniqueValuesCache=VK(),c._valuesCache=VK(),c.depth=i,c.id=t,c.index=r,c.original=n,c.parentId=o,c.subRows=a??[];let l=e._rowInstanceInitFns;for(let e=0;e<l.length;e++)l[e](c);return c},h_e=/([0-9]+)/gm;function Lq(e){let t=Object.assign((e,n,r)=>{let i=e.getValue(r),a=n.getValue(r),o=t.resolveDataValue;return o&&(i=o(i),a=o(a)),t.sort(i,a,e,n,r)},e);return t}var Rq=Lq({resolveDataValue:e=>Uq(e).toLowerCase(),sort:(e,t)=>Wq(e,t)});Lq({resolveDataValue:e=>Uq(e),sort:(e,t)=>Wq(e,t)});var zq=Lq({resolveDataValue:e=>Uq(e).toLowerCase(),sort:(e,t)=>Hq(e,t)});Lq({resolveDataValue:e=>Uq(e),sort:(e,t)=>Hq(e,t)});var Bq=Lq({resolveDataValue:e=>g_e(e),sort:(e,t)=>e>t?1:e<t?-1:0}),Vq=Lq({sort:(e,t)=>Hq(e,t)});function Hq(e,t){return e===t?0:e>t?1:-1}function g_e(e){return e instanceof Date?e.getTime():e}function Uq(e){return typeof e==`number`?isNaN(e)||e===1/0||e===-1/0?``:String(e):typeof e==`string`?e:``}function Wq(e,t){let n=0,r=0,i=e.length,a=t.length;for(;n<i&&r<a;){let i=Gq(e.charCodeAt(n)),a=Gq(t.charCodeAt(r)),o=Kq(e,n,i),s=Kq(t,r,a);if(!i&&!a){let i=__e(e,n,o,t,r,s);if(i)return i;n=o,r=s;continue}if(i!==a)return i?1:-1;let c=v_e(e,n,o,t,r,s);if(c)return c;n=o,r=s}return Jq(e,n)-Jq(t,r)}function Gq(e){return e>=48&&e<=57}function Kq(e,t,n){let r=t+1;for(;r<e.length&&Gq(e.charCodeAt(r))===n;)r++;return r}function __e(e,t,n,r,i,a){let o=n-t,s=a-i,c=o<s?o:s;for(let n=0;n<c;n++){let a=e.charCodeAt(t+n),o=r.charCodeAt(i+n);if(a>o)return 1;if(o>a)return-1}return o>s?1:s>o?-1:0}function v_e(e,t,n,r,i,a){let o=t;for(;o<n&&e.charCodeAt(o)===48;)o++;let s=i;for(;s<a&&r.charCodeAt(s)===48;)s++;let c=n-o,l=a-s;if(c===0&&l===0)return 0;if(c<=15&&l<=15){let t=qq(e,o,n),i=qq(r,s,a);return t>i?1:i>t?-1:0}let u=parseInt(e.slice(t,n),10),d=parseInt(r.slice(i,a),10);return u>d?1:d>u?-1:0}function qq(e,t,n){let r=0;for(let i=t;i<n;i++)r=r*10+e.charCodeAt(i)-48;return r}function Jq(e,t){let n=0,r=t;for(;r<e.length;)n++,r=Kq(e,r,Gq(e.charCodeAt(r)));return n}function Yq(){return[]}function y_e(e,t){YK(e,`cellSelection`,t?Yq():zK(e.initialState.cellSelection)??Yq())}function b_e(e){e.atoms.cellSelection&&(e.options.autoResetAll??e.options.autoResetCellSelection??!0)&&e._reactivity.schedule(()=>y_e(e))}function x_e(){return VK()}function Xq(e){e.atoms.expanded&&(e.options.autoResetAll??e.options.autoResetExpanded??!e.options.manualExpanding)&&e._reactivity.schedule(()=>$q(e))}function Zq(e,t){e.options.onExpandedChange?.(t)}function Qq(e,t){let n=e.atoms.expanded?.get()??{};if(t??!tJ(e)){if(n===!0||!eJ(e))return;Zq(e,!0)}else{if(n!==!0&&!Object.keys(n).length)return;Zq(e,VK())}}function $q(e,t){let n=e.initialState.expanded;YK(e,`expanded`,t?VK():n===!0||Object.assign(VK(),zK(n??{})))}function eJ(e){return e.getPrePaginatedRowModel().flatRows.some(e=>aJ(e))}function S_e(e){return t=>{Qq(e)}}function C_e(e){let t=e.atoms.expanded?.get()??{};return t===!0||Object.values(t).some(Boolean)}function tJ(e){let t=e.atoms.expanded?.get()??{};if(t===!0)return!0;if(!Object.keys(t).length)return!1;let n=e.getRowModel().flatRows.filter(e=>aJ(e));return!(!n.length||n.some(e=>!rJ(e)))}function w_e(e){let t=0,n=e.atoms.expanded?.get();return(n===!0?Object.values(e.getRowModel().rowsById).filter(e=>aJ(e)).map(e=>e.id):Object.keys(n??{})).forEach(e=>{let n=e.split(`.`);t=Math.max(t,n.length)}),t}function nJ(e,t){let n=e.table.atoms.expanded?.get()??{},r=n===!0||iJ(n,e.id),i=t??!r;i!==r&&(!i||aJ(e))&&Zq(e.table,t=>{let n=t===!0||iJ(t,e.id),r=VK();if(t===!0?Object.values(e.table.getRowModel().rowsById).forEach(e=>{aJ(e)&&(r[e.id]=!0)}):r=Object.assign(VK(),t),!n&&i)return r[e.id]=!0,r;if(n&&!i){let t=VK(),n=Object.keys(r);for(let i=0;i<n.length;i++){let a=n[i];a!==e.id&&r[a]&&(t[a]=!0)}return t}return t})}function rJ(e){let t=e.table.atoms.expanded?.get()??{};return!!(e.table.options.getIsRowExpanded?.(e)??(t===!0||iJ(t,e.id)))}function iJ(e,t){return!!(e&&e!==!0&&HK(e,t)&&e[t])}function aJ(e){return e.table.options.getRowCanExpand?.(e)??((e.table.options.enableExpanding??!0)&&!!e.subRows.length)}function T_e(e){let t=!0,n=e;for(;t&&n.parentId;)n=e.table.getRow(n.parentId,!0),t=rJ(n);return t}function E_e(e){let t=aJ(e);return()=>{t&&nJ(e)}}var oJ=0,sJ=10;function cJ(){return{pageIndex:oJ,pageSize:sJ}}function lJ(e){if(e.options.autoResetAll??e.options.autoResetPageIndex??!e.options.manualPagination){if((e.atoms.pagination?.get()?.pageIndex??oJ)===oJ)return;fJ(e,!0)}}function uJ(e,t){YK(e,`pagination`,t)}function D_e(e,t){uJ(e,t?cJ():zK(e.initialState.pagination??cJ()))}function dJ(e,t){uJ(e,n=>{let r=RK(t,n.pageIndex),i=e.options.pageCount===void 0||e.options.pageCount===-1?2**53-1:e.options.pageCount-1;return r=Math.max(0,Math.min(r,i)),{...n,pageIndex:r}})}function fJ(e,t){dJ(e,t?oJ:e.initialState.pagination?.pageIndex??oJ)}function O_e(e,t){pJ(e,t?sJ:e.initialState.pagination?.pageSize??sJ)}function pJ(e,t){uJ(e,e=>{let n=Math.max(1,RK(t,e.pageSize)),r=e.pageSize===1/0?0:e.pageSize*e.pageIndex,i=n===1/0?0:Math.floor(r/n);return{...e,pageIndex:i,pageSize:n}})}function k_e(e){let t=mJ(e),n=[];return t&&t>0&&(n=[...Array(t)].fill(null).map((e,t)=>t)),n}function A_e(e){return(e.atoms.pagination?.get()?.pageIndex??0)>0}function j_e(e){let t=e.atoms.pagination?.get()?.pageIndex??oJ,n=mJ(e);return n===-1||n!==0&&t<n-1}function M_e(e){let t=e.atoms.pagination?.get()?.pageIndex??oJ,n=mJ(e);return Number.isFinite(n)&&n>0&&t<n-1}function N_e(e){return dJ(e,e=>e-1)}function P_e(e){return dJ(e,e=>e+1)}function F_e(e){return dJ(e,0)}function I_e(e){let t=mJ(e);if(!(!Number.isFinite(t)||t<=0))return dJ(e,t-1)}function mJ(e){let t=e.options.pageCount;if(t!=null)return t;let n=hJ(e),r=e.atoms.pagination?.get()?.pageSize??sJ;return r===1/0&&Number.isFinite(n)&&n>0?1:Math.ceil(n/r)}function hJ(e){return e.options.rowCount??e.getPrePaginatedRowModel().rows.length}function L_e(){return[]}function gJ(e,t){YK(e,`sorting`,t)}function _J(e,t){gJ(e,t?[]:zK(e.initialState.sorting??[]))}function R_e(e){e.atoms.sorting&&(e.options.autoResetAll??e.options.autoResetSorting??!1)&&_J(e)}function vJ(e){let t=e.table._rowModelFns.sortFns,n=e.table.getFilteredRowModel().flatRows.slice(0,10),r,i=!1;for(let t=0;t<n.length;t++){let a=n[t].getValue(e.id);if(Object.prototype.toString.call(a)===`[object Date]`){r=`datetime`;break}if(typeof a==`string`&&(i=!0,a.split(h_e).length>1)){r=`alphanumeric`;break}}if(!r&&i&&(r=`text`),r){let n=t?.[r];if(n||(process.env.NODE_ENV===`development`&&console.warn(`sortFn '${r}' (auto) for column '${e.id}' is not registered`),r===`alphanumeric`&&(n=t?.text)),n)return n}return Vq}function yJ(e){let t=e.table.getFilteredRowModel().flatRows.slice(0,10);for(let n=0;n<t.length;n++){let r=t[n].getValue(e.id);if(r!=null)return typeof r==`string`?`asc`:`desc`}return`desc`}function bJ(e){let t=e.table._rowModelFns.sortFns;if(XK(e.columnDef.sortFn))return e.columnDef.sortFn;if(e.columnDef.sortFn===`auto`)return vJ(e);let n=t?.[e.columnDef.sortFn];return process.env.NODE_ENV===`development`&&!n&&console.warn(`sortFn '${String(e.columnDef.sortFn)}' for column '${e.id}' is not registered`),n??Vq}function xJ(e,t,n){let r=CJ(e,n&&TJ(e)),i=t!==void 0;gJ(e.table,a=>{let o=a.findIndex(t=>t.id===e.id),s=o===-1?void 0:a[o],c=[],l,u=i?t:r===`desc`,d=!!(a.length&&TJ(e)&&n);return l=d?s?`toggle`:`add`:s?`toggle`:`replace`,l===`toggle`&&(i||r||(l=`remove`)),l===`add`?(c=[...a,{id:e.id,desc:u}],c.splice(0,c.length-(e.table.options.maxMultiSortColCount??2**53-1))):c=l===`toggle`?d?a.map(t=>t.id===e.id?{...t,desc:u}:t):[{id:e.id,desc:u}]:l===`remove`?d?a.filter(t=>t.id!==e.id):[]:[{id:e.id,desc:u}],c})}function SJ(e){return e.columnDef.sortDescFirst??e.table.options.sortDescFirst??yJ(e)===`desc`?`desc`:`asc`}function CJ(e,t){let n=SJ(e),r=EJ(e);return r?r!==n&&(e.table.options.enableSortingRemoval??!0)&&(!t||(e.table.options.enableMultiRemove??!0))?!1:r===`desc`?`asc`:`desc`:n}function wJ(e){return(e.columnDef.enableSorting??!0)&&(e.table.options.enableSorting??!0)&&!!e.accessorFn}function TJ(e){return e.columnDef.enableMultiSort??e.table.options.enableMultiSort??!!e.accessorFn}function EJ(e){let t=e.table.atoms.sorting?.get()?.find(t=>t.id===e.id);return t?t.desc?`desc`:`asc`:!1}function z_e(e){return e.table.atoms.sorting?.get()?.findIndex(t=>t.id===e.id)??-1}function B_e(e){gJ(e.table,t=>t.length?t.filter(t=>t.id!==e.id):[])}function V_e(e){let t=wJ(e);return n=>{t&&xJ(e,void 0,TJ(e)?e.table.options.isMultiSortEvent?.(n):!1)}}function H_e(){return e=>tq({feature:`coreRowModelsFeature`,table:e,fnName:`table.getCoreRowModel`,memoDeps:()=>[e.options.data],fn:()=>U_e(e,e.options.data),onAfterUpdate:$K(()=>{Xq(e),lJ(e),R_e(e),b_e(e)})})}function DJ(e,t,n,r=0,i){let a=[];for(let o=0;o<n.length;o++){let s=n[o],c=Iq(e,e.getRowId(s,o,i),s,o,r,void 0,i?.id);t.flatRows.push(c),t.rowsById[c.id]=c,a.push(c),e.options.getSubRows&&(c.originalSubRows=e.options.getSubRows(s,o),c.originalSubRows?.length&&(c.subRows=DJ(e,t,c.originalSubRows,r+1,c)))}return a}function U_e(e,t){let n={rows:[],flatRows:[],rowsById:VK()};return n.rows=DJ(e,n,t),n}function W_e(e){return e._rowModels.coreRowModel||(e._rowModels.coreRowModel=e.options.features.coreRowModel?.(e)??H_e()(e)),e._rowModels.coreRowModel()}function G_e(e){return e.getCoreRowModel()}function K_e(e){return e._rowModels.filteredRowModel||(e._rowModels.filteredRowModel=e.options.features.filteredRowModel?.(e)),e.options.manualFiltering||!e._rowModels.filteredRowModel?e.getPreFilteredRowModel():e._rowModels.filteredRowModel()}function q_e(e){return e.getFilteredRowModel()}function J_e(e){return e._rowModels.groupedRowModel||(e._rowModels.groupedRowModel=e.options.features.groupedRowModel?.(e)),e.options.manualGrouping||!e._rowModels.groupedRowModel?e.getPreGroupedRowModel():e._rowModels.groupedRowModel()}function Y_e(e){return e.getGroupedRowModel()}function X_e(e){return e._rowModels.sortedRowModel||(e._rowModels.sortedRowModel=e.options.features.sortedRowModel?.(e)),e.options.manualSorting||!e._rowModels.sortedRowModel?e.getPreSortedRowModel():e._rowModels.sortedRowModel()}function Z_e(e){return e.getSortedRowModel()}function Q_e(e){return e._rowModels.expandedRowModel||(e._rowModels.expandedRowModel=e.options.features.expandedRowModel?.(e)),e.options.manualExpanding||!e._rowModels.expandedRowModel?e.getPreExpandedRowModel():e._rowModels.expandedRowModel()}function $_e(e){return e.getExpandedRowModel()}function eve(e){return e._rowModels.paginatedRowModel||(e._rowModels.paginatedRowModel=e.options.features.paginatedRowModel?.(e)),e.options.manualPagination||!e._rowModels.paginatedRowModel?e.getPrePaginatedRowModel():e._rowModels.paginatedRowModel()}function tve(e){return e.getPaginatedRowModel()}var nve={constructTableAPIs:e=>{rq(`coreRowModelsFeature`,e,{table_getCoreRowModel:{fn:()=>W_e(e)},table_getPreFilteredRowModel:{fn:()=>G_e(e)},table_getFilteredRowModel:{fn:()=>K_e(e)},table_getPreGroupedRowModel:{fn:()=>q_e(e)},table_getGroupedRowModel:{fn:()=>J_e(e)},table_getPreSortedRowModel:{fn:()=>Y_e(e)},table_getSortedRowModel:{fn:()=>X_e(e)},table_getPreExpandedRowModel:{fn:()=>Z_e(e)},table_getExpandedRowModel:{fn:()=>Q_e(e)},table_getPrePaginatedRowModel:{fn:()=>$_e(e)},table_getPaginatedRowModel:{fn:()=>eve(e)},table_getRowModel:{fn:()=>tve(e)}})}};function rve(e){if(!e._cellPrototype){e._cellPrototype={table:e};let t=Object.values(e._features);for(let n=0;n<t.length;n++)t[n].assignCellPrototype?.(e._cellPrototype,e)}return e._cellPrototype}function ive(e,t,n){let r=rve(n),i=Object.create(r);i.column=e,i.id=`${t.id}_${e.id}`,i.row=t;let a=n._cellInstanceInitFns;for(let e=0;e<a.length;e++)a[e](i);return i}function ave(e){let t=e.table.getRowsInDisplayOrder(),n=e._displayIndexCache;return t[n]===e?n:-1}function ove(e){let t=e.getPrePaginatedRowModel().rows;if(e.options.paginateExpandedRows===!1){let e=[],n=t=>{t._displayIndexCache=e.length,e.push(t),t.subRows.length&&t.getIsExpanded?.()&&t.subRows.forEach(n)};return t.forEach(n),e}for(let e=0;e<t.length;e++)t[e]._displayIndexCache=e;return t}function sve(e,t){if(HK(e._valuesCache,t))return e._valuesCache[t];let n=e.table.getColumn(t);if(n?.accessorFn)return e._valuesCache[t]=n.accessorFn(e.original,e.index),e._valuesCache[t]}function cve(e,t){if(HK(e._uniqueValuesCache,t))return e._uniqueValuesCache[t];let n=e.table.getColumn(t);if(n?.accessorFn)return n.columnDef.getUniqueValues?(e._uniqueValuesCache[t]=n.columnDef.getUniqueValues(e.original,e.index),e._uniqueValuesCache[t]):(e._uniqueValuesCache[t]=[e.getValue(t)],e._uniqueValuesCache[t])}function lve(e,t){return e.getValue(t)??e.table.options.renderFallbackValue}function uve(e){return ZK(e.subRows,e=>e.subRows)}function dve(e){let t=e.getCoreRowModel().flatRows,n=0;for(let e=0;e<t.length;e++)n=Math.max(n,t[e].depth);return n}function fve(e){if(e.parentId)return e.table.getCoreRowModel().rowsById[e.parentId]??e.table.getRow(e.parentId,!0)}function pve(e){let t=[],n=e;for(;;){let e=n.getParentRow();if(!e)break;t.push(e),n=e}return t.reverse()}function mve(e){let t=e.table.getAllLeafColumns(),n=e._cellsCache;n||=e._cellsCache=new WeakMap;let r=Array(t.length);for(let i=0;i<t.length;i++){let a=t[i],o=n.get(a);o||(o=ive(a,e,e.table),n.set(a,o)),r[i]=o}return r}function hve(e){let t=VK(),n=e.getAllCells();for(let e=0;e<n.length;e++){let r=n[e];t[r.column.id]=r}return t}function gve(e,t,n,r){return t.options.getRowId?.(e,n,r)??(r?`${r.id}.${n}`:String(n))}function _ve(e,t,n){let r=(n?e.getPrePaginatedRowModel():e.getRowModel()).rowsById[t];if(!r&&(r=e.getCoreRowModel().rowsById[t],!r))throw process.env.NODE_ENV===`development`?Error(`getRow could not find row with ID: ${t}`):Error();return r}var vve={assignRowPrototype:(e,t)=>{iq(`coreRowsFeature`,e,t,{row_getDisplayIndex:{fn:e=>ave(e)},row_getAllCellsByColumnId:{fn:e=>hve(e),memoDeps:e=>[e.getAllCells()]},row_getAllCells:{fn:e=>mve(e),memoDeps:e=>[e.table.getAllLeafColumns()]},row_getLeafRows:{fn:e=>uve(e),memoDeps:e=>[e.subRows]},row_getParentRow:{fn:e=>fve(e)},row_getParentRows:{fn:e=>pve(e)},row_getUniqueValues:{fn:(e,t)=>cve(e,t)},row_getValue:{fn:(e,t)=>sve(e,t)},row_renderValue:{fn:(e,t)=>lve(e,t)}})},constructTableAPIs:e=>{rq(`coreRowsFeature`,e,{table_getRowsInDisplayOrder:{fn:()=>ove(e),memoDeps:()=>[e.getPrePaginatedRowModel().rows,e.options.paginateExpandedRows,e.options.paginateExpandedRows===!1?e.atoms.expanded?.get():void 0]},table_getRowId:{fn:(t,n,r)=>gve(t,e,n,r)},table_getRow:{fn:(t,n)=>_ve(e,t,n)},table_getMaxSubRowDepth:{fn:()=>dve(e),memoDeps:()=>[e.getCoreRowModel()]}})}};function OJ(e,t,n=(e,t)=>e===t){let r=t===void 0?e.options.state:t;e._reactivity.batch(()=>{if(r)for(let t in r){let i=e.baseAtoms[t];if(!i)continue;let a=r[t],o=a===void 0?e.initialState[t]:a;n(e._reactivity.untrack(()=>i.get()),o)||i.set(()=>o)}})}function kJ(e,t,n=(e,t)=>e===t){e._reactivity.batch(()=>{OJ(e,t,n),e._reactivity.commit?.()})}function yve(e){let t=zK(e.initialState);e._reactivity.batch(()=>{let n=Object.keys(t);for(let r=0;r<n.length;r++){let i=n[r];e.baseAtoms[i].set(t[i])}});let n=Object.values(e._features);for(let t=0;t<n.length;t++)n[t].resetTableInstanceData?.(e)}function bve(e,t){let{features:n,atoms:r,initialState:i}=e.options;if(!e.options.mergeOptions)return{...e.options,...t,features:n,atoms:r,initialState:i};let a=e.options.mergeOptions(e.options,t),o={...Object.getOwnPropertyDescriptors(a)};return Object.defineProperties(Object.create(Object.getPrototypeOf(a)),{...o,features:{value:n,enumerable:!0,configurable:!0,writable:!0},atoms:{value:r,enumerable:!0,configurable:!0,writable:!0},initialState:{value:i,enumerable:!0,configurable:!0,writable:!0}})}function AJ(e,t,n){let r=bve(e,RK(t,e.options));e.optionsStore?e.optionsStore.set(()=>r):e.options=r,n?.syncExternalState!==!1&&kJ(e,r.state??null)}var xve={coreCellsFeature:lq,coreColumnsFeature:o_e,coreHeadersFeature:p_e,coreRowModelsFeature:nve,coreRowsFeature:vve,coreTablesFeature:{constructTableAPIs:e=>{rq(`coreTablesFeature`,e,{table_reset:{fn:()=>yve(e)},table_setOptions:{fn:t=>AJ(e,t)}})}}};function Sve(){return{accessor:(e,t)=>typeof e==`function`?{...t,accessorFn:e}:{...t,accessorKey:e},columns:e=>e,display:e=>e,group:e=>e}}function jJ(){return{}}function MJ(e){return e}function Cve(e,t={}){return Object.values(e).forEach(e=>{t=e.getInitialState?.(t)??t}),zK(t)}function wve(e){let t=e.features.coreReactivityFeature,{aggregationFns:n,columnMeta:r,coreRowModel:i,expandedRowModel:a,facetedMinMaxValues:o,facetedRowModel:s,facetedUniqueValues:c,filterFns:l,filterMeta:u,filteredRowModel:d,groupedRowModel:f,paginatedRowModel:p,sortFns:m,sortedRowModel:h,tableMeta:g,..._}=e.features,v={_cellInstanceInitFns:[],_columnInstanceInitFns:[],_features:{...xve,..._},_headerGroupInstanceInitFns:[],_headerInstanceInitFns:[],_reactivity:t,_rowInstanceInitFns:[],_rowModelFns:{aggregationFns:n,filterFns:l,sortFns:m},_rowModels:{},atoms:{},baseAtoms:{}},y=Object.values(v._features),b={...y.reduce((e,t)=>Object.assign(e,t.getDefaultTableOptions?.(v)),{}),...e};if(t.wrapExternalAtoms&&b.atoms)for(let[e,n]of Object.entries(b.atoms)){let r=n,i=t.createWritableAtom(r.get(),{debugName:`externalAtom/${e}`});b.atoms[e]=i;let a=!1,o=r.subscribe(e=>{a||i.set(e)}),s=i.subscribe(e=>{a=!0,r.set(e),a=!1});t.addSubscription(o),t.addSubscription(s)}t.createOptionsStore?(v.optionsStore=t.createWritableAtom(b,{debugName:`table/optionsStore`}),Object.defineProperty(v,"options",{configurable:!0,enumerable:!0,get(){return v.optionsStore.get()},set(e){v.optionsStore.set(()=>e)}})):v.options=b,v.initialState=Cve(v._features,v.options.initialState);let x=Object.keys(v.initialState);for(let e=0;e<x.length;e++){let n=x[e];v.baseAtoms[n]=t.createWritableAtom(v.initialState[n],{debugName:`table/baseAtoms/${n}`}),v.atoms[n]=t.createReadonlyAtom(()=>{let e=v.options,t=e.atoms?.[n],r=t?t.get():v.baseAtoms[n].get();if(t)return r;let i=e.state;if(i&&HK(i,n)){let e=i[n];return e===void 0?v.initialState[n]:e}return r},{debugName:`table/atoms/${n}`})}OJ(v),v.store=PK(t.createReadonlyAtom(()=>{let e={};for(let t=0;t<x.length;t++){let n=x[t];e[n]=v.atoms[n].get()}return e},{compare:cW,debugName:`table/store`}));for(let e=0;e<y.length;e++){let t=y[e];t.initTableInstanceData?.(v),t.initCellInstanceData&&v._cellInstanceInitFns.push(t.initCellInstanceData.bind(t)),t.initColumnInstanceData&&v._columnInstanceInitFns.push(t.initColumnInstanceData.bind(t)),t.initHeaderGroupInstanceData&&v._headerGroupInstanceInitFns.push(t.initHeaderGroupInstanceData.bind(t)),t.initHeaderInstanceData&&v._headerInstanceInitFns.push(t.initHeaderInstanceData.bind(t)),t.initRowInstanceData&&v._rowInstanceInitFns.push(t.initRowInstanceData.bind(t)),t.constructTableAPIs?.(v)}if(process.env.NODE_ENV===`development`&&(e.debugAll||e.debugTable)){let e=Object.keys(v._features),t=Object.entries({coreRowModel:i,filteredRowModel:d,groupedRowModel:f,sortedRowModel:h,expandedRowModel:a,paginatedRowModel:p,facetedRowModel:s,facetedMinMaxValues:o,facetedUniqueValues:c}).filter(([,e])=>e).map(([e])=>e),n=Object.keys(v.initialState);console.log(`Constructing Table Instance
80
-
81
- Features: ${e.join(`
82
- `)}
83
-
84
- Row Models: ${t.length?t.join(`
85
- `):`(none)`}
86
-
87
- States: ${n.join(`
88
- `)}\n`,{table:v})}return v}function Tve(e,t){let n=t._rowModels.facetedMinMaxValues??=VK(),r=n[e.id];return r||=n[e.id]=t.options.features.facetedMinMaxValues?.(t,e.id)??(()=>void 0),r()}function NJ(e,t){let n=e?.id??``,r=t._rowModels.facetedRowModels??=VK(),i=r[n];return i||=r[n]=t.options.features.facetedRowModel?.(t,n)??(()=>t.getPreFilteredRowModel()),i()}function Eve(e,t){let n=t._rowModels.facetedUniqueValues??=VK(),r=n[e.id];return r||=n[e.id]=t.options.features.facetedUniqueValues?.(t,e.id)??PJ(),r()}function PJ(){let e=new Map;return()=>e}function Dve(e){e._rowModels.globalFacetedMinMaxValues||(e._rowModels.globalFacetedMinMaxValues=e.options.features.facetedMinMaxValues?.(e,`__global__`)??(()=>void 0));let t=e._rowModels.globalFacetedMinMaxValues;return t()}function FJ(e){e._rowModels.globalFacetedRowModel||(e._rowModels.globalFacetedRowModel=e.options.features.facetedRowModel?.(e,`__global__`)??(()=>e.getPreFilteredRowModel()));let t=e._rowModels.globalFacetedRowModel;return t()}function Ove(e){e._rowModels.globalFacetedUniqueValues||(e._rowModels.globalFacetedUniqueValues=e.options.features.facetedUniqueValues?.(e,`__global__`)??PJ());let t=e._rowModels.globalFacetedUniqueValues;return t()}var IJ={assignColumnPrototype:(e,t)=>{iq(`columnFacetingFeature`,e,t,{column_getFacetedRowModel:{fn:e=>NJ(e,e.table)},column_getFacetedMinMaxValues:{fn:e=>Tve(e,e.table)},column_getFacetedUniqueValues:{fn:e=>Eve(e,e.table)}})},constructTableAPIs:e=>{rq(`columnFacetingFeature`,e,{table_getGlobalFacetedRowModel:{fn:()=>FJ(e)},table_getGlobalFacetedMinMaxValues:{fn:()=>Dve(e)},table_getGlobalFacetedUniqueValues:{fn:()=>Ove(e)}})}};function kve(){return[]}function LJ(e){let t=e.table._rowModelFns.filterFns,n=e.table.getCoreRowModel().flatRows,r;for(let t=0;t<n.length;t++){let i=n[t].getValue(e.id);if(i!=null){r=i;break}}let i;i=typeof r==`string`?`includesString`:typeof r==`number`?`inNumberRange`:typeof r==`boolean`?`equals`:Array.isArray(r)?`arrIncludes`:Object.prototype.toString.call(r)===`[object Date]`?`inDateRange`:typeof r==`object`&&r?`equals`:`weakEquals`;let a=t?.[i];return process.env.NODE_ENV===`development`&&!a&&console.warn(`filterFn '${i}' (auto) for column '${e.id}' is not registered`),a}function RJ(e){let t=null,n=e.table._rowModelFns.filterFns;return t=XK(e.columnDef.filterFn)?e.columnDef.filterFn:e.columnDef.filterFn===`auto`?LJ(e):n?.[e.columnDef.filterFn],process.env.NODE_ENV===`development`&&!t&&e.columnDef.filterFn!==`auto`&&console.warn(`filterFn '${String(e.columnDef.filterFn)}' for column '${e.id}' is not registered`),t??void 0}function Ave(e){return(e.columnDef.enableColumnFilter??!0)&&(e.table.options.enableColumnFilters??!0)&&(e.table.options.enableFilters??!0)&&!!e.accessorFn}function jve(e){return zJ(e)>-1}function Mve(e){return e.table.atoms.columnFilters?.get()?.find(t=>t.id===e.id)?.value}function zJ(e){return e.table.atoms.columnFilters?.get()?.findIndex(t=>t.id===e.id)??-1}function Nve(e,t){BJ(e.table,n=>{let r=RJ(e),i=n.find(t=>t.id===e.id),a=RK(t,i?i.value:void 0);if(VJ(r,a,e))return n.filter(t=>t.id!==e.id);let o={id:e.id,value:a};return i?n.map(t=>t.id===e.id?o:t):n.length?[...n,o]:[o]})}function BJ(e,t){let n=e.getAllLeafColumnsById();YK(e,`columnFilters`,e=>RK(t,e).filter(e=>{let t=n[e.id];return!(t&&VJ(RJ(t),e.value,t))}))}function Pve(e,t){BJ(e,t?[]:zK(e.initialState.columnFilters??[]))}function VJ(e,t,n){return t===void 0?!0:e?.autoRemove?!!e.autoRemove(t,n):typeof t==`string`&&!t}var HJ={getInitialState:e=>({columnFilters:kve(),...e}),getDefaultColumnDef:()=>({filterFn:`auto`}),getDefaultTableOptions:e=>({onColumnFiltersChange:UK(`columnFilters`,e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),assignColumnPrototype:(e,t)=>{iq(`columnFilteringFeature`,e,t,{column_getAutoFilterFn:{fn:e=>LJ(e)},column_getFilterFn:{fn:e=>RJ(e)},column_getCanFilter:{fn:e=>Ave(e)},column_getIsFiltered:{fn:e=>jve(e)},column_getFilterValue:{fn:e=>Mve(e)},column_getFilterIndex:{fn:e=>zJ(e)},column_setFilterValue:{fn:(e,t)=>Nve(e,t)}})},initRowInstanceData:e=>{e.columnFilters=VK(),e.columnFiltersMeta=VK()},constructTableAPIs:e=>{rq(`columnFilteringFeature`,e,{table_setColumnFilters:{fn:t=>BJ(e,t)},table_resetColumnFilters:{fn:t=>Pve(e,t)}})}};function Fve(){return VK()}function UJ(){return{size:150,minSize:20,maxSize:2**53-1}}function WJ(e){let t=UJ(),n=e.table.atoms.columnSizing?.get(),r=n&&HK(n,e.id)?n[e.id]:void 0;return Math.min(Math.max(e.columnDef.minSize??t.minSize,r??e.columnDef.size??t.size),e.columnDef.maxSize??t.maxSize)}function GJ(e){let t=VK(),n=VK(),r=Array(e.length),i=0;for(let n=0;n<e.length;n++){let a=e[n],o=aq(a,`getSize`,WJ);r[n]=o,t[a.id]=i,i+=o}let a=0;for(let t=e.length-1;t>=0;t--)n[e[t].id]=a,a+=r[t];return{starts:t,afters:n}}function KJ(e){return{all:GJ(yq(e)),center:GJ(yq(e,`center`)),start:GJ(yq(e,`start`)),end:GJ(yq(e,`end`))}}function qJ(e){return e===`start`?`start`:e===`end`?`end`:e===`center`?`center`:`all`}function Ive(e,t){return aq(e.table,`getColumnOffsets`,KJ)[qJ(t)].starts[e.id]??0}function Lve(e,t){return aq(e.table,`getColumnOffsets`,KJ)[qJ(t)].afters[e.id]??0}function Rve(e){ZJ(e.table,t=>{let n=VK(),r=Object.keys(t);for(let i=0;i<r.length;i++){let a=r[i];a!==e.id&&(n[a]=t[a])}return n})}function JJ(e){if(!e.subHeaders.length)return WJ(e.column);let t=0;for(let n=0;n<e.subHeaders.length;n++)t+=JJ(e.subHeaders[n]);return t}function YJ(e){return JJ(e)}function XJ(e){if(e.index>0){let t=e.headerGroup?.headers[e.index-1];if(t)return aq(t,`getStart`,XJ)+aq(t,`getSize`,YJ)}return 0}function ZJ(e,t){e.options.onColumnSizingChange?.(t)}function zve(e,t){ZJ(e,t?VK():Object.assign(VK(),zK(e.initialState.columnSizing??{})))}function Bve(e){return e.getHeaderGroups()[0]?.headers.reduce((e,t)=>e+YJ(t),0)??0}function Vve(e){return aq(e,`getStartHeaderGroups`,pq)[0]?.headers.reduce((e,t)=>e+YJ(t),0)??0}function Hve(e){return aq(e,`getCenterHeaderGroups`,hq)[0]?.headers.reduce((e,t)=>e+YJ(t),0)??0}function Uve(e){return aq(e,`getEndHeaderGroups`,mq)[0]?.headers.reduce((e,t)=>e+YJ(t),0)??0}var QJ={getInitialState:e=>({columnSizing:Fve(),...e}),getDefaultColumnDef:()=>UJ(),getDefaultTableOptions:e=>({onColumnSizingChange:UK(`columnSizing`,e)}),assignColumnPrototype:(e,t)=>{iq(`columnSizingFeature`,e,t,{column_getSize:{fn:e=>WJ(e),memoDeps:e=>[t.options.columns,t.atoms.columnSizing?.get()?.[e.id]]},column_getStart:{fn:(e,t)=>Ive(e,t)},column_getAfter:{fn:(e,t)=>Lve(e,t)},column_resetSize:{fn:e=>Rve(e)}})},assignHeaderPrototype:(e,t)=>{iq(`columnSizingFeature`,e,t,{header_getSize:{fn:e=>YJ(e),memoDeps:e=>[t.options.columns,e.column.columns.length>0?t.atoms.columnSizing?.get():t.atoms.columnSizing?.get()?.[e.column.id]]},header_getStart:{fn:e=>XJ(e),memoDeps:()=>[t.options.columns,t.atoms.columnSizing?.get(),t.atoms.columnOrder?.get(),t.atoms.columnPinning?.get(),t.atoms.columnVisibility?.get(),t.atoms.grouping?.get(),t.options.groupedColumnMode]}})},constructTableAPIs:e=>{rq(`columnSizingFeature`,e,{table_getColumnOffsets:{fn:()=>KJ(e),memoDeps:()=>[e.options.columns,e.atoms.columnSizing?.get(),e.atoms.columnOrder?.get(),e.atoms.columnPinning?.get(),e.atoms.columnVisibility?.get(),e.atoms.grouping?.get(),e.options.groupedColumnMode]},table_setColumnSizing:{fn:t=>ZJ(e,t)},table_resetColumnSizing:{fn:t=>zve(e,t)},table_getTotalSize:{fn:()=>Bve(e),memoDeps:()=>[e.atoms.columnSizing?.get(),e.getHeaderGroups()]},table_getStartTotalSize:{fn:()=>Vve(e),memoDeps:()=>[e.atoms.columnSizing?.get(),e.getHeaderGroups()]},table_getCenterTotalSize:{fn:()=>Hve(e),memoDeps:()=>[e.atoms.columnSizing?.get(),e.getHeaderGroups()]},table_getEndTotalSize:{fn:()=>Uve(e),memoDeps:()=>[e.atoms.columnSizing?.get(),e.getHeaderGroups()]}})}},$J={getInitialState:e=>({columnVisibility:zge(),...e}),getDefaultTableOptions:e=>({onColumnVisibilityChange:UK(`columnVisibility`,e)}),assignColumnPrototype:(e,t)=>{iq(`columnVisibilityFeature`,e,t,{column_getIsVisible:{fn:e=>xq(e),memoDeps:e=>[t.options.columns,t.atoms.columnVisibility?.get(),e.columns]},column_getCanHide:{fn:e=>Sq(e)},column_getToggleVisibilityHandler:{fn:e=>Bge(e)},column_toggleVisibility:{fn:(e,t)=>bq(e,t)}})},assignRowPrototype:(e,t)=>{iq(`columnVisibilityFeature`,e,t,{row_getVisibleCells:{fn:e=>Vge(e),memoDeps:e=>[e.getAllCells(),t.atoms.columnPinning?.get(),t.atoms.columnVisibility?.get()]},row_getVisibleCellsByColumnId:{fn:e=>Cq(e),memoDeps:e=>[e.getAllCells(),t.atoms.columnVisibility?.get()]}})},constructTableAPIs:e=>{rq(`columnVisibilityFeature`,e,{table_getVisibleFlatColumns:{fn:()=>Hge(e),memoDeps:()=>[e.atoms.columnVisibility?.get(),e.atoms.columnOrder?.get(),e.atoms.grouping?.get(),e.options.columns,e.options.groupedColumnMode]},table_getVisibleLeafColumns:{fn:()=>wq(e),memoDeps:()=>[e.atoms.columnVisibility?.get(),e.atoms.columnOrder?.get(),e.atoms.grouping?.get(),e.options.columns,e.options.groupedColumnMode]},table_setColumnVisibility:{fn:t=>Tq(e,t)},table_resetColumnVisibility:{fn:t=>Uge(e,t)},table_toggleAllColumnsVisible:{fn:t=>Eq(e,t)},table_getIsAllColumnsVisible:{fn:()=>Dq(e)},table_getIsSomeColumnsVisible:{fn:()=>Wge(e)},table_getToggleAllColumnsVisibilityHandler:{fn:()=>Gge(e)}})}};function eY(e){let t=Object.assign((e,n,r,i)=>{let a=e.getValue(n),o=t.resolveDataValue?t.resolveDataValue(a):a;return t.filter(o,r,e,n,i)},e);return t}var tY=eY({filter:(e,t)=>e===t,autoRemove:e=>yY(e)}),nY=eY({filter:(e,t)=>e==t,autoRemove:e=>yY(e)}),rY=eY({filter:(e,t)=>!!e?.includes(t),autoRemove:e=>yY(e),resolveFilterValue:e=>String(e),resolveDataValue:e=>e==null?void 0:String(e)}),iY=eY({filter:(e,t)=>!!e?.includes(t),autoRemove:e=>yY(e),resolveFilterValue:e=>String(e).toLowerCase(),resolveDataValue:e=>e==null?void 0:String(e).toLowerCase()}),aY=eY({filter:(e,t)=>e===t,autoRemove:e=>yY(e),resolveFilterValue:e=>String(e).toLowerCase(),resolveDataValue:e=>e==null?void 0:String(e).toLowerCase()}),oY=eY({filter:(e,t)=>e===t,autoRemove:e=>yY(e),resolveFilterValue:e=>String(e),resolveDataValue:e=>e==null?void 0:String(e)}),sY=eY({filter:(e,t)=>!!e?.startsWith(t),autoRemove:e=>yY(e),resolveFilterValue:e=>String(e).toLowerCase(),resolveDataValue:e=>e==null?void 0:String(e).toLowerCase()}),cY=eY({filter:(e,t)=>!!e?.endsWith(t),autoRemove:e=>yY(e),resolveFilterValue:e=>String(e).toLowerCase(),resolveDataValue:e=>e==null?void 0:String(e).toLowerCase()}),lY=eY({filter:e=>bY(e),autoRemove:e=>yY(e)||e===!1}),uY=eY({filter:e=>!bY(e),autoRemove:e=>yY(e)||e===!1});eY({filter:(e,t)=>SY(e,t),autoRemove:e=>yY(e)}),eY({filter:(e,t)=>CY(e,t),autoRemove:e=>yY(e)}),eY({filter:(e,t)=>!CY(e,t),autoRemove:e=>yY(e)}),eY({filter:(e,t)=>!SY(e,t),autoRemove:e=>yY(e)});var dY=eY({filter:(e,t)=>wY(e,t,!1),autoRemove:e=>yY(e)||Array.isArray(e)&&yY(e[0])&&yY(e[1])}),fY=eY({filter:(e,t)=>wY(e,t,!0),autoRemove:e=>yY(e)||Array.isArray(e)&&yY(e[0])&&yY(e[1])}),pY=eY({filter:(e,t)=>{if(typeof e!=`number`||Number.isNaN(e))return!1;let[n,r]=t;return e>=n&&e<=r},resolveFilterValue:e=>{let[t,n]=e,r=typeof t==`number`?t:parseFloat(t),i=typeof n==`number`?n:parseFloat(n),a=t===null||Number.isNaN(r)?-1/0:r,o=n===null||Number.isNaN(i)?1/0:i;if(a>o){let e=a;a=o,o=e}return[a,o]},autoRemove:e=>yY(e)||Array.isArray(e)&&yY(e[0])&&yY(e[1])}),mY=eY({filter:(e,t)=>{let[n,r]=t;return e>=n&&e<=r},resolveFilterValue:e=>{let[t,n]=e,r=xY(t),i=xY(n),a=Number.isNaN(r)?-1/0:r,o=Number.isNaN(i)?1/0:i;if(a>o){let e=a;a=o,o=e}return[a,o]},resolveDataValue:e=>xY(e),autoRemove:e=>yY(e)||Array.isArray(e)&&yY(e[0])&&yY(e[1])}),hY=eY({filter:(e,t)=>{for(let n=0;n<t.length;n++)if(e===t[n])return!0;return!1},autoRemove:e=>yY(e)||!e?.length}),gY=eY({filter:(e,t)=>{if(typeof e!=`string`&&!Array.isArray(e))return!1;for(let n=0;n<t.length;n++)if(e.includes(t[n]))return!0;return!1},autoRemove:e=>yY(e)||!e?.length}),_Y=eY({filter:(e,t)=>{if(!Array.isArray(e))return!1;for(let n=0;n<t.length;n++)if(!e.includes(t[n]))return!1;return!0},autoRemove:e=>yY(e)||!e?.length}),vY=eY({filter:(e,t)=>{if(!Array.isArray(e))return!1;for(let n=0;n<t.length;n++)if(e.includes(t[n]))return!0;return!1},autoRemove:e=>yY(e)||!e?.length});function yY(e){return e==null||e===``}function bY(e){return e==null||String(e).trim()===``}function xY(e){return e instanceof Date?e.getTime():typeof e==`number`?e:e==null||e===``?NaN:new Date(e).getTime()}function SY(e,t){let n=e==null?0:+e,r=Number(t);return!isNaN(r)&&!isNaN(n)?n>r:String(e??``).toLowerCase().trim()>String(t).toLowerCase().trim()}function CY(e,t){return e===t||SY(e,t)}function wY(e,t,n){let r=t[0],i=r!==``&&r!==void 0;if(i&&!(n?CY(e,r):SY(e,r)))return!1;let a=t[1];if(a===``||a===void 0)return!0;if(i){let e=Number(r),t=Number(a);if(!isNaN(e)&&!isNaN(t)&&e>t)return!0}return n?!SY(e,a):!CY(e,a)}function TY(e){return(e.columnDef.enableGlobalFilter??!0)&&(e.table.options.enableGlobalFilter??!0)&&(e.table.options.enableFilters??!0)&&(e.table.options.getColumnCanGlobalFilter?.(e)??!0)&&!!e.accessorFn}function EY(){return iY}function DY(e){let{globalFilterFn:t}=e.options,n=e._rowModelFns.filterFns,r=XK(t)?t:t===`auto`?EY():n?.[t];return process.env.NODE_ENV===`development`&&!r&&t!=null&&console.warn(`globalFilterFn '${String(t)}' is not registered`),r}function OY(e,t){e.options.onGlobalFilterChange?.(t)}function Wve(e,t){OY(e,t?void 0:zK(e.initialState.globalFilter))}var kY={getInitialState:e=>({globalFilter:void 0,...e}),getDefaultTableOptions:e=>({onGlobalFilterChange:UK(`globalFilter`,e),globalFilterFn:`auto`,getColumnCanGlobalFilter:t=>{if(`enableGlobalFilter`in t.columnDef&&t.columnDef.enableGlobalFilter===!0)return!0;let n=e.getCoreRowModel().flatRows.find(e=>e.getAllCellsByColumnId()[t.id]?.getValue()!=null)?.getAllCellsByColumnId()[t.id]?.getValue();return typeof n==`string`||typeof n==`number`}}),assignColumnPrototype:(e,t)=>{iq(`globalFilteringFeature`,e,t,{column_getCanGlobalFilter:{fn:e=>TY(e)}})},constructTableAPIs:e=>{rq(`globalFilteringFeature`,e,{table_getGlobalAutoFilterFn:{fn:()=>EY()},table_getGlobalFilterFn:{fn:()=>DY(e)},table_setGlobalFilter:{fn:t=>OY(e,t)},table_resetGlobalFilter:{fn:t=>Wve(e,t)}})}},Gve={getInitialState:e=>({expanded:x_e(),...e}),getDefaultTableOptions:e=>({onExpandedChange:UK(`expanded`,e),paginateExpandedRows:!0}),assignRowPrototype:(e,t)=>{iq(`rowExpandingFeature`,e,t,{row_toggleExpanded:{fn:(e,t)=>nJ(e,t)},row_getIsExpanded:{fn:e=>rJ(e)},row_getCanExpand:{fn:e=>aJ(e)},row_getIsAllParentsExpanded:{fn:e=>T_e(e)},row_getToggleExpandedHandler:{fn:e=>E_e(e)}})},constructTableAPIs:e=>{rq(`rowExpandingFeature`,e,{table_autoResetExpanded:{fn:()=>Xq(e)},table_setExpanded:{fn:t=>Zq(e,t)},table_toggleAllRowsExpanded:{fn:t=>Qq(e,t)},table_resetExpanded:{fn:t=>$q(e,t)},table_getCanSomeRowsExpand:{fn:()=>eJ(e)},table_getToggleAllRowsExpandedHandler:{fn:()=>S_e(e)},table_getIsSomeRowsExpanded:{fn:()=>C_e(e)},table_getIsAllRowsExpanded:{fn:()=>tJ(e)},table_getExpandedDepth:{fn:()=>w_e(e)}})}},AY={getInitialState:e=>({...e,pagination:{...cJ(),...e.pagination}}),getDefaultTableOptions:e=>({onPaginationChange:UK(`pagination`,e)}),constructTableAPIs:e=>{rq(`rowPaginationFeature`,e,{table_autoResetPageIndex:{fn:()=>lJ(e)},table_setPagination:{fn:t=>uJ(e,t)},table_resetPagination:{fn:t=>D_e(e,t)},table_setPageIndex:{fn:t=>dJ(e,t)},table_resetPageIndex:{fn:t=>fJ(e,t)},table_setPageSize:{fn:t=>pJ(e,t)},table_getPageCount:{fn:()=>mJ(e)},table_resetPageSize:{fn:t=>O_e(e,t)},table_getPageOptions:{fn:()=>k_e(e)},table_getCanPreviousPage:{fn:()=>A_e(e)},table_getCanNextPage:{fn:()=>j_e(e)},table_getCanLastPage:{fn:()=>M_e(e)},table_previousPage:{fn:()=>N_e(e)},table_nextPage:{fn:()=>P_e(e)},table_firstPage:{fn:()=>F_e(e)},table_lastPage:{fn:()=>I_e(e)},table_getRowCount:{fn:()=>hJ(e)}})}};function Kve(){return VK()}function jY(e,t){e.options.onRowSelectionChange?.(t)}function qve(e,t){e._lastSelectedRowId=null,jY(e,t?VK():Object.assign(VK(),zK(e.initialState.rowSelection??{})))}function MY(e,t,n){e._lastSelectedRowId=null,jY(e,r=>{if(t=t===void 0?!aq(e,`getIsAllRowsSelected`,FY):t,n?.deselectAll&&!t)return VK();let i=Object.assign(VK(),r),a=e.getPreGroupedRowModel().flatRows;if(t){let e=new Map;a.forEach(t=>{GY(t,e)&&(i[t.id]=!0)})}else a.forEach(e=>{VY(e)&&delete i[e.id]});return i})}function NY(e,t,n){e._lastSelectedRowId=null,jY(e,r=>{let i=t===void 0?!aq(e,`getIsAllPageRowsSelected`,IY):t;if(n?.deselectAll&&!i)return VK();let a=Object.assign(VK(),r);return e.getRowModel().rows.forEach(t=>{WY(a,t.id,i,!0,e,!0)}),a})}function Jve(e){return e.getCoreRowModel()}function Yve(e){let t=e.getCoreRowModel();return aq(e,`getIsSomeRowsSelected`,LY)?JY(t,e):{rows:[],flatRows:[],rowsById:VK()}}function Xve(e){let t=e.getFilteredRowModel();return aq(e,`getIsSomeRowsSelected`,LY)?JY(t,e):{rows:[],flatRows:[],rowsById:VK()}}function Zve(e){let t=e.getSortedRowModel();return aq(e,`getIsSomeRowsSelected`,LY)?JY(t,e):{rows:[],flatRows:[],rowsById:VK()}}function PY(e){return Object.keys(e.atoms.rowSelection?.get()??{})}function FY(e){let t=e.getFilteredRowModel().flatRows,n=e.atoms.rowSelection?.get()??{},r=!!(t.length&&Object.keys(n).length);if(r){let e=new Map;t.some(t=>!YY(t,n)&&GY(t,e))&&(r=!1)}return r}function IY(e){let t=e.getPaginatedRowModel().flatRows,n=e.atoms.rowSelection?.get()??{},r=new Map,i=!1;for(let e=0;e<t.length;e++){let a=t[e];if(YY(a,n))!i&&GY(a,r)&&(i=!0);else if(GY(a,r))return!1}return i}function LY(e){return aq(e,`getSelectedRowIds`,PY).length>0}function Qve(e){return e.getPaginatedRowModel().flatRows.filter(e=>VY(e)).some(e=>zY(e)||aq(e,`getIsSomeSelected`,BY))}function $ve(e){return t=>{MY(e,t.target.checked)}}function eye(e){return t=>{NY(e,t.target.checked)}}function RY(e,t,n){let r=zY(e);jY(e.table,i=>{t=t===void 0?!r:t;let a=Object.assign(VK(),i);return WY(a,e.id,t,(n?.selectChildren??!0)&&UY(e),e.table),!t&&n?.deselectParents&&KY(a,e),a})}function zY(e){return YY(e,e.table.atoms.rowSelection?.get()??{})}function BY(e){return XY(e)===`some`}function tye(e){return XY(e)===`all`}function VY(e){let t=e.table.options;return typeof t.enableRowSelection==`function`?t.enableRowSelection(e):t.enableRowSelection??!0}function HY(e){let t=e.table.options;return typeof t.enableSubRowSelection==`function`?t.enableSubRowSelection(e):t.enableSubRowSelection??!0}function UY(e){let t=e.table.options;return typeof t.enableMultiRowSelection==`function`?t.enableMultiRowSelection(e):t.enableMultiRowSelection??!0}function nye(e,t){let n=VY(e);return r=>{if(!n)return;let i=r,a=e.table,o=i.target.checked,s=a._lastSelectedRowId;(!(a.options.enableRowRangeSelection!==!1&&s!==null&&UY(e)&&(a.options.isRowRangeSelectionEvent?.(r)??!1))||!rye(e,s,o,t))&&RY(e,o,t),a._lastSelectedRowId=e.id}}function rye(e,t,n,r){let i=r?.selectChildren??!0,a=e.table,o=a.getRowsInDisplayOrder(),s=a.getPrePaginatedRowModel().rowsById[t]??a.getCoreRowModel().rowsById[t];if(!s)return!1;let c=s.getDisplayIndex(),l=e.getDisplayIndex(),u=o[c],d=o[l];if(c<0||l<0||c>=o.length||l>=o.length||u?.id!==s.id||d?.id!==e.id||!UY(s)||!UY(e))return!1;let f=Math.min(c,l),p=Math.max(c,l);return jY(a,e=>{let t=Object.assign(VK(),e);for(let e=f;e<=p;e++){let s=o[e];VY(s)&&UY(s)&&(WY(t,s.id,n,i,a),!n&&r?.deselectParents&&KY(t,s))}return t}),!0}function WY(e,t,n,r,i,a){let o=i.getRow(t,!0);n?(UY(o)||Object.keys(e).forEach(t=>delete e[t]),VY(o)&&(e[t]=!0)):(!a||VY(o))&&delete e[t],r&&o.subRows.length&&HY(o)&&o.subRows.forEach(t=>WY(e,t.id,n,r,i,a))}function GY(e,t){if(!VY(e))return!1;let n=e.table;if(n.options.enableSubRowSelection===!0)return!0;let r=e.parentId;if(r===void 0)return!0;let i=t.get(r);if(i!==void 0)return i;let a=n.getCoreRowModel().rowsById,o=[],s=!0,c=r;for(;c!==void 0;){let e=t.get(c);if(e!==void 0){s=e;break}o.push(c);let r=a[c]??n.getRow(c,!0);if(!HY(r)){s=!1;break}c=r.parentId}return o.forEach(e=>t.set(e,s)),s}function KY(e,t){let n=t.table.getCoreRowModel().rowsById,r=t.parentId;for(;r!==void 0;)delete e[r],r=(n[r]??t.table.getRow(r,!0)).parentId}function qY(e,t,n,r){let i=[];for(let a=0;a<e.length;a++){let o=e[a],s=YY(o,t);if(s&&(n.push(o),r[o.id]=o),o.subRows.length){let e=qY(o.subRows,t,n,r);if(s){let t=Object.create(Object.getPrototypeOf(o));BK(t,o),t.subRows=e,i.push(t)}}else s&&i.push(o)}return i}function JY(e,t){let n=[],r=VK(),i=t.atoms.rowSelection?.get()??{};return{rows:qY(e.rows,i,n,r),flatRows:n,rowsById:r}}function YY(e,t){return!!(HK(t,e.id)&&t[e.id])}function XY(e){if(!e.subRows.length)return!1;let t=e.table.atoms.rowSelection?.get()??{},n=!1,r=!0,i=!1;for(let a=0;a<e.subRows.length;a++){let o=e.subRows[a];if(n&&!r)break;if(VY(o)&&(i=!0,YY(o,t)?n=!0:r=!1),o.subRows.length){let e=XY(o);e===`all`?(n=!0,i=!0):e===`some`?(n=!0,r=!1,i=!0):r=!1}}return i?r?`all`:n?`some`:!1:!1}var ZY={initTableInstanceData:e=>{e._lastSelectedRowId=null},resetTableInstanceData:e=>{e._lastSelectedRowId=null},getInitialState:e=>({rowSelection:Kve(),...e}),getDefaultTableOptions:e=>({onRowSelectionChange:UK(`rowSelection`,e),enableRowSelection:!0,enableMultiRowSelection:!0,enableRowRangeSelection:!0,enableSubRowSelection:!0,isRowRangeSelectionEvent:e=>{let t=e;return!!(t.shiftKey||t.nativeEvent?.shiftKey)}}),assignRowPrototype:(e,t)=>{iq(`rowSelectionFeature`,e,t,{row_toggleSelected:{fn:(e,t,n)=>RY(e,t,n)},row_getIsSelected:{fn:e=>zY(e)},row_getIsSomeSelected:{fn:e=>BY(e),memoDeps:e=>[e.subRows,e.table.atoms.rowSelection?.get(),e.table.options.enableRowSelection]},row_getIsAllSubRowsSelected:{fn:e=>tye(e),memoDeps:e=>[e.subRows,e.table.atoms.rowSelection?.get(),e.table.options.enableRowSelection]},row_getCanSelect:{fn:e=>VY(e)},row_getCanSelectSubRows:{fn:e=>HY(e)},row_getCanMultiSelect:{fn:e=>UY(e)},row_getToggleSelectedHandler:{fn:(e,t)=>nye(e,t)}})},constructTableAPIs:e=>{rq(`rowSelectionFeature`,e,{table_setRowSelection:{fn:t=>jY(e,t)},table_resetRowSelection:{fn:t=>qve(e,t)},table_toggleAllRowsSelected:{fn:(t,n)=>MY(e,t,n)},table_toggleAllPageRowsSelected:{fn:(t,n)=>NY(e,t,n)},table_getPreSelectedRowModel:{fn:()=>Jve(e)},table_getSelectedRowModel:{fn:()=>Yve(e),memoDeps:()=>[e.atoms.rowSelection?.get(),e.getCoreRowModel()]},table_getFilteredSelectedRowModel:{fn:()=>Xve(e),memoDeps:()=>[e.atoms.rowSelection?.get(),e.getFilteredRowModel()]},table_getGroupedSelectedRowModel:{fn:()=>Zve(e),memoDeps:()=>[e.atoms.rowSelection?.get(),e.getSortedRowModel()]},table_getSelectedRowIds:{fn:()=>PY(e),memoDeps:()=>[e.atoms.rowSelection?.get()]},table_getIsAllRowsSelected:{fn:()=>FY(e),memoDeps:()=>[e.atoms.rowSelection?.get(),e.getFilteredRowModel(),e.options.enableRowSelection,e.options.enableSubRowSelection]},table_getIsAllPageRowsSelected:{fn:()=>IY(e),memoDeps:()=>[e.atoms.rowSelection?.get(),e.getPaginatedRowModel(),e.options.enableRowSelection,e.options.enableSubRowSelection]},table_getIsSomeRowsSelected:{fn:()=>LY(e),memoDeps:()=>[e.atoms.rowSelection?.get()]},table_getIsSomePageRowsSelected:{fn:()=>Qve(e),memoDeps:()=>[e.atoms.rowSelection?.get(),e.getPaginatedRowModel(),e.options.enableRowSelection]},table_getToggleAllRowsSelectedHandler:{fn:()=>$ve(e)},table_getToggleAllPageRowsSelectedHandler:{fn:()=>eye(e)}})}},QY={getInitialState(e){return{sorting:L_e(),...e}},getDefaultColumnDef(){return{sortFn:`auto`,sortUndefined:1}},getDefaultTableOptions(e){return{autoResetSorting:!1,onSortingChange:UK(`sorting`,e),isMultiSortEvent:e=>e.shiftKey}},assignColumnPrototype(e,t){iq(`rowSortingFeature`,e,t,{column_getAutoSortFn:{fn:e=>vJ(e)},column_getAutoSortDir:{fn:e=>yJ(e)},column_getSortFn:{fn:e=>bJ(e)},column_toggleSorting:{fn:(e,t,n)=>xJ(e,t,n)},column_getFirstSortDir:{fn:e=>SJ(e)},column_getNextSortingOrder:{fn:(e,t)=>CJ(e,t)},column_getCanSort:{fn:e=>wJ(e)},column_getCanMultiSort:{fn:e=>TJ(e)},column_getIsSorted:{fn:e=>EJ(e)},column_getSortIndex:{fn:e=>z_e(e)},column_clearSorting:{fn:e=>B_e(e)},column_getToggleSortingHandler:{fn:e=>V_e(e)}})},constructTableAPIs(e){rq(`rowSortingFeature`,e,{table_setSorting:{fn:t=>gJ(e,t)},table_resetSorting:{fn:t=>_J(e,t)}})}};function $Y(e,t,n){return n.options.filterFromLeafRows?iye(e,t,n):aye(e,t,n)}function iye(e,t,n){let r=[],i=VK(),a=n.options.maxLeafRowFilterDepth??100,o=(e,r=0)=>{let i=[];for(let s of e){let e=Iq(n,s.id,s.original,s.index,s.depth,void 0,s.parentId);e.columnFilters=s.columnFilters,e.columnFiltersMeta=s.columnFiltersMeta,s.subRows.length&&r<a?(e.subRows=o(s.subRows,r+1),(e.subRows.length||t(e))&&i.push(e)):t(e)&&(e.subRows=s.subRows,i.push(e))}return i},s=o(e);return eX(s,r,i),{rows:s,flatRows:r,rowsById:i}}function aye(e,t,n){let r=[],i=VK(),a=n.options.maxLeafRowFilterDepth??100,o=(e,s=0)=>{let c=[];for(let l of e)if(t(l)){if(l.subRows.length&&s<a){let e=Iq(n,l.id,l.original,l.index,l.depth,void 0,l.parentId),t=l;e.columnFilters=t.columnFilters,e.columnFiltersMeta=t.columnFiltersMeta,c.push(e),r.push(e),i[e.id]=e,e.subRows=o(l.subRows,s+1)}else c.push(l),r.push(l),i[l.id]=l,l.subRows.length&&s>=a&&eX(l.subRows,r,i)}return c};return{rows:o(e),flatRows:r,rowsById:i}}function eX(e,t,n){for(let r of e)t.push(r),n[r.id]=r,r.subRows.length&&eX(r.subRows,t,n)}function tX(){return(e,t)=>{let n=e;return tq({feature:`columnFacetingFeature`,table:n,fnName:`createFacetedRowModel`,memoDeps:()=>[n.getPreFilteredRowModel(),n.atoms.columnFilters?.get(),n.atoms.globalFilter?.get(),n.getFilteredRowModel()],fn:(e,r,i)=>oye(n,t,e,r,i)})}}function oye(e,t,n,r,i){let a=i!=null&&i!==``;if(!n.rows.length||!r?.length&&!a)return n;let o=[];if(r)for(let e=0;e<r.length;e++){let n=r[e].id;n!==t&&o.push(n)}return a&&t!==`__global__`&&o.push(`__global__`),o.length?$Y(n.rows,e=>{for(let t=0;t<o.length;t++)if(e.columnFilters?.[o[t]]===!1)return!1;return!0},e):n}function nX(){return(e,t)=>{let n=e;return tq({feature:`columnFacetingFeature`,table:n,fnName:`table.getFacetedUniqueValues`,memoDeps:()=>{if(t===`__global__`)return[aq(n,`getGlobalFacetedRowModel`,FJ).flatRows];let e=n.getColumn(t);return e?[aq(e,`getFacetedRowModel`,NJ,n).flatRows]:[n.getPreFilteredRowModel().flatRows]},fn:e=>sye(n,t,e)})}}function sye(e,t,n){let r=t===`__global__`?e.getAllLeafColumns().filter(e=>TY(e)).map(e=>e.id):[t],i=new Map;for(let e=0;e<n.length;e++)for(let t=0;t<r.length;t++){let a=n[e].getUniqueValues(r[t]);if(a)for(let e=0;e<a.length;e++){let t=a[e],n=i.get(t);i.set(t,n===void 0?1:n+1)}}return i}function rX(){return e=>{let t=e;return tq({feature:`columnFilteringFeature`,table:t,fnName:`table.getFilteredRowModel`,memoDeps:()=>[t.getPreFilteredRowModel(),t.atoms.columnFilters?.get(),t.atoms.globalFilter?.get()],fn:()=>cye(t),onAfterUpdate:$K(()=>lJ(t))})}}function cye(e){let t=e.getPreFilteredRowModel(),n=e.atoms.columnFilters?.get(),r=e.atoms.globalFilter?.get(),i=r!=null&&r!==``;if(!t.rows.length||!n?.length&&!i){let e=t.flatRows;for(let t=0;t<e.length;t++){let n=e[t];n.columnFilters=VK(),n.columnFiltersMeta=VK()}return t}let a=[],o=[];n?.forEach(t=>{let n=Pq(e,t.id);if(!n)return;let r=RJ(n);r&&a.push({id:t.id,filterFn:r,resolvedValue:r.resolveFilterValue?.(t.value)??t.value})});let s=n?.map(e=>e.id)??[],c=DY(e),l=e.getAllLeafColumns().filter(e=>TY(e));i&&c&&l.length&&(s.push(`__global__`),l.forEach(e=>{o.push({id:e.id,filterFn:c,resolvedValue:c.resolveFilterValue?.(r)??r})}));let u=t.flatRows;for(let e=0;e<u.length;e++){let t=u[e];if(t.columnFilters=VK(),t.columnFiltersMeta=VK(),a.length)for(let e=0;e<a.length;e++){let n=a[e],r=n.id;t.columnFilters[r]=n.filterFn(t,r,n.resolvedValue,e=>{t.columnFiltersMeta||=VK(),t.columnFiltersMeta[r]=e})}if(o.length){for(let e=0;e<o.length;e++){let n=o[e],r=n.id;if(n.filterFn(t,r,n.resolvedValue,e=>{t.columnFiltersMeta||=VK(),t.columnFiltersMeta[r]=e})){t.columnFilters.__global__=!0;break}}t.columnFilters.__global__!==!0&&(t.columnFilters.__global__=!1)}}return $Y(t.rows,e=>{for(let t=0;t<s.length;t++)if(e.columnFilters[s[t]]===!1)return!1;return!0},e)}function lye(){return e=>{let t=e;return tq({feature:`rowExpandingFeature`,table:t,fnName:`table.getExpandedRowModel`,memoDeps:()=>[t.atoms.expanded?.get(),t.getPreExpandedRowModel(),t.options.paginateExpandedRows,t.options.manualPagination],fn:()=>uye(t)})}}function uye(e){let t=e.getPreExpandedRowModel(),n=e.atoms.expanded?.get();return!t.rows.length||n!==!0&&!Object.keys(n??{}).length||!e.options.paginateExpandedRows&&!e.options.manualPagination?t:iX(t)}function iX(e){let t=[],n=e=>{t.push(e),e.subRows.length&&rJ(e)&&e.subRows.forEach(n)};return e.rows.forEach(n),{rows:t,flatRows:e.flatRows,rowsById:e.rowsById}}function aX(){return e=>{let t=e;return tq({feature:`rowPaginationFeature`,table:t,fnName:`table.getPaginatedRowModel`,memoDeps:()=>[t.getPrePaginatedRowModel(),t.atoms.pagination?.get(),t.options.paginateExpandedRows?void 0:t.atoms.expanded?.get()],fn:()=>dye(t)})}}function dye(e){let t=e.getPrePaginatedRowModel(),n=e.atoms.pagination?.get();if(!t.rows.length)return t;let{pageSize:r,pageIndex:i}=n??cJ(),{rows:a,flatRows:o,rowsById:s}=t,c=a;if(r!==1/0||i!==0){let e=r*i,t=e+r;c=a.slice(e,t)}let l;l=e.options.paginateExpandedRows?{rows:c,flatRows:o,rowsById:s}:iX({rows:c,flatRows:o,rowsById:s}),l.flatRows=[];let u=new Set,d=e=>{u.has(e.id)||(u.add(e.id),l.flatRows.push(e),e.subRows.length&&e.subRows.forEach(d))};return l.rows.forEach(d),l}function oX(){return e=>{let t=e;return tq({feature:`rowSortingFeature`,table:t,fnName:`table.getSortedRowModel`,memoDeps:()=>[t.atoms.sorting?.get(),t.getPreSortedRowModel()],fn:()=>fye(t),onAfterUpdate:$K(()=>lJ(t))})}}function fye(e){let t=e.getPreSortedRowModel(),n=e.atoms.sorting?.get();if(!t.rows.length||!n?.length)return t;let r=[],i=n.filter(t=>{let n=e.getColumn(t.id);return n?wJ(n):!1});if(!i.length)return t;let a=[];for(let t=0;t<i.length;t++){let n=i[t],r=e.getColumn(n.id);r&&a.push({id:n.id,desc:n.desc,sortUndefined:r.columnDef.sortUndefined,invertSorting:r.columnDef.invertSorting,sortFn:bJ(r)})}let o=(e,t)=>{for(let n=0;n<a.length;n++){let r=a[n],i=r.sortUndefined,o=r.desc,s=0;if(i){let n=e.getValue(r.id),a=t.getValue(r.id),o=n===void 0,c=a===void 0;if(o&&c)continue;if(o||c){if(i===`first`)return o?-1:1;if(i===`last`)return o?1:-1;s=o?i:-i}}if(s===0&&(s=r.sortFn(e,t,r.id)),s!==0)return o&&(s*=-1),r.invertSorting&&(s*=-1),s}return e.index-t.index},s=e=>{let t=e.slice();t.sort(o);let n=!1;for(let i=0;i<t.length;i++){let a=t[i];a!==e[i]&&(n=!0);let o=r.length;if(r.push(a),a.subRows.length){let e=s(a.subRows);if(e.changed){let s=Object.create(Object.getPrototypeOf(a));BK(s,a),s.subRows=e.rows,t[i]=s,r[o]=s,n=!0}}}return{rows:t,changed:n}};return{rows:s(t.rows).rows,flatRows:r,rowsById:t.rowsById}}var pye=typeof window>`u`?_.useEffect:_.useLayoutEffect;function mye(e,t){let[{table:n,rootSource:r}]=(0,_.useState)(()=>{let t=wve({...e,features:{coreReactivityFeature:LK(),...e.features}});return t.Subscribe=(e=>NK({...e,source:e.source??t.store})),t.FlexRender=MK,{table:t,rootSource:IK(t.store,cW)}}),i=n;AJ(i,t=>({...t,...e}),{syncExternalState:!1});let a=i.options.state,o=r.get(),s=uG(r,t,{compare:cW});return pye(()=>{r.markCommitted(o),kJ(i,a??null,cW)}),(0,_.useMemo)(()=>({...n,options:e,state:s}),[n,e,s])}var hye=(0,_.createContext)(null),gye=(0,_.createContext)(null),_ye=(0,_.createContext)(null);function sX({tableComponents:e,cellComponents:t,headerComponents:n,tableContext:r=hye,cellContext:i=gye,headerContext:a=_ye,...o}){let s=r,c=i,l=a;function u(){return Sve()}function d(){let e=(0,_.useContext)(s);if(!e)throw Error("`useTableContext` must be used within an `AppTable` component. Make sure your component is wrapped with `<table.AppTable>...</table.AppTable>`.");return e}function f(){let e=(0,_.useContext)(c);if(!e)throw Error("`useCellContext` must be used within an `AppCell` component. Make sure your component is wrapped with `<table.AppCell cell={cell}>...</table.AppCell>`.");return e}function p(){let e=(0,_.useContext)(l);if(!e)throw Error("`useHeaderContext` must be used within an `AppHeader` or `AppFooter` component.");return e}function m(){let e=f();return _.createElement(MK,{cell:e})}function h(){let e=p();return _.createElement(MK,{header:e})}function g(){let e=p();return _.createElement(MK,{footer:e})}function v(r,i){let a=mye({...o,...r},i),u=(0,_.useRef)(a);u.current=a;let d=(0,_.useMemo)(()=>{function e(e){let{children:t,selector:n}=e,r=u.current;return _.createElement(s.Provider,{value:r},n?_.createElement(r.Subscribe,{selector:n},e=>t(e)):t)}return e},[]),f=(0,_.useMemo)(()=>{function e(e){let{cell:n,children:r,selector:i}=e,a=u.current,o=Object.assign(n,{FlexRender:m,...t});return _.createElement(c.Provider,{value:n},i?_.createElement(a.Subscribe,{selector:i},e=>r(o,e)):r(o))}return e},[]),p=(0,_.useMemo)(()=>{function e(e){let{header:t,children:r,selector:i}=e,a=u.current,o=Object.assign(t,{FlexRender:h,...n});return _.createElement(l.Provider,{value:t},i?_.createElement(a.Subscribe,{selector:i},e=>r(o,e)):r(o))}return e},[]),v=(0,_.useMemo)(()=>{function e(e){let{header:t,children:r,selector:i}=e,a=u.current,o=Object.assign(t,{FlexRender:g,...n});return _.createElement(l.Provider,{value:t},i?_.createElement(a.Subscribe,{selector:i},e=>r(o,e)):r(o))}return e},[]);return(0,_.useMemo)(()=>Object.assign(a,{AppTable:d,AppCell:f,AppHeader:p,AppFooter:v,...e}),[a,d,f,p,v])}return{appFeatures:o.features,createAppColumnHelper:u,useAppTable:v,useTableContext:d,useCellContext:f,useHeaderContext:p}}var vye=Symbol.for(`preact-signals`);function cX(){if(mX>1)mX--;else{var e,t=!1;for((function(){var e=_X;for(_X=void 0;e!==void 0;){var t=e.S;if(t.v===e.v)for(var n=t.t;n!==void 0;n=n.x)n.i===e.i&&(n.i=t.i);e=e.o}})();pX!==void 0;){var n=pX;for(pX=void 0,hX++;n!==void 0;){var r=n.u;if(n.u=void 0,n.f&=-3,!(8&n.f)&&SX(n))try{n.c()}catch(n){t||=(e=n,!0)}n=r}}if(hX=0,mX--,t)throw e}}function lX(e){if(mX>0)return e();gX=++yye,mX++;try{return e()}finally{cX()}}var uX,dX=void 0;function fX(e){var t=dX,n=uX;dX=void 0,uX=void 0;try{return e()}finally{dX=t,uX=n}}var pX=void 0,mX=0,hX=0,yye=0,gX=0,_X=void 0,vX=0;function yX(e){if(dX!==void 0){var t=e.n;if(t===void 0||t.t!==dX)return t={i:0,S:e,p:dX.s,n:void 0,t:dX,e:void 0,x:void 0,r:t},dX.s!==void 0&&(dX.s.n=t),dX.s=t,e.n=t,32&dX.f&&e.S(t),t;if(t.i===-1)return t.i=0,t.n!==void 0&&(t.n.p=t.p,t.p!==void 0&&(t.p.n=t.n),t.p=dX.s,t.n=void 0,dX.s.n=t,dX.s=t),t}}function bX(e,t){this.v=e,this.i=0,this.n=void 0,this.t=void 0,this.l=0,this.W=t?.watched,this.Z=t?.unwatched,this.name=t?.name}bX.prototype.brand=vye,bX.prototype.h=function(){return!0},bX.prototype.S=function(e){var t=this,n=this.t;n!==e&&e.e===void 0&&(e.x=n,this.t=e,n===void 0?fX(function(){var e;(e=t.W)==null||e.call(t)}):n.e=e)},bX.prototype.U=function(e){var t=this;if(this.t!==void 0){var n=e.e,r=e.x;n!==void 0&&(n.x=r,e.e=void 0),r!==void 0&&(r.e=n,e.x=void 0),e===this.t&&(this.t=r,r===void 0&&fX(function(){var e;(e=t.Z)==null||e.call(t)}))}},bX.prototype.subscribe=function(e){var t=this;return AX(function(){var n=t.value;fX(function(){return e(n)})},{name:`sub`})},bX.prototype.valueOf=function(){return this.value},bX.prototype.toString=function(){return this.value+``},bX.prototype.toJSON=function(){return this.value},bX.prototype.peek=function(){var e=this;return fX(function(){return e.value})},Object.defineProperty(bX.prototype,"value",{get:function(){var e=yX(this);return e!==void 0&&(e.i=this.i),this.v},set:function(e){if(e!==this.v){if(hX>100)throw Error(`Cycle detected`);(function(e){mX!==0&&hX===0&&e.l!==gX&&(e.l=gX,_X={S:e,v:e.v,i:e.i,o:_X})})(this),this.v=e,this.i++,vX++,mX++;try{for(var t=this.t;t!==void 0;t=t.x)t.t.N()}finally{cX()}}}});function xX(e,t){return new bX(e,t)}function SX(e){for(var t=e.s;t!==void 0;t=t.n)if(t.S.i!==t.i||!t.S.h()||t.S.i!==t.i)return!0;return!1}function CX(e){for(var t=e.s;t!==void 0;t=t.n){var n=t.S.n;if(n!==void 0&&(t.r=n),t.S.n=t,t.i=-1,t.n===void 0){e.s=t;break}}}function wX(e){for(var t=e.s,n=void 0;t!==void 0;){var r=t.p;t.i===-1?(t.S.U(t),r!==void 0&&(r.n=t.n),t.n!==void 0&&(t.n.p=r)):n=t,t.S.n=t.r,t.r!==void 0&&(t.r=void 0),t=r}e.s=n}function TX(e,t){bX.call(this,void 0,t),this.x=e,this.s=void 0,this.g=vX-1,this.f=4}TX.prototype=new bX,TX.prototype.h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===vX))return!0;if(this.g=vX,this.f|=1,this.i>0&&!SX(this))return this.f&=-2,!0;var e=dX;try{CX(this),dX=this;var t=this.x();(16&this.f||this.v!==t||this.i===0)&&(this.v=t,this.f&=-17,this.i++)}catch(e){this.v=e,this.f|=16,this.i++}return dX=e,wX(this),this.f&=-2,!0},TX.prototype.S=function(e){if(this.t===void 0){this.f|=36;for(var t=this.s;t!==void 0;t=t.n)t.S.S(t)}bX.prototype.S.call(this,e)},TX.prototype.U=function(e){if(this.t!==void 0&&(bX.prototype.U.call(this,e),this.t===void 0)){this.f&=-33;for(var t=this.s;t!==void 0;t=t.n)t.S.U(t)}},TX.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var e=this.t;e!==void 0;e=e.x)e.t.N()}},Object.defineProperty(TX.prototype,"value",{get:function(){if(1&this.f)throw Error(`Cycle detected`);var e=yX(this);if(this.h(),e!==void 0&&(e.i=this.i),16&this.f)throw this.v;return this.v}});function EX(e,t){return new TX(e,t)}function DX(e){var t=e.m;if(e.m=void 0,typeof t==`function`){mX++;var n=dX;dX=void 0;try{t()}catch(t){throw e.f&=-2,e.f|=8,OX(e),t}finally{dX=n,cX()}}}function OX(e){for(var t=e.s;t!==void 0;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,DX(e)}function bye(e){if(dX!==this)throw Error(`Out-of-order effect`);wX(this),dX=e,this.f&=-2,8&this.f&&OX(this),cX()}function kX(e,t){this.x=e,this.m=void 0,this.s=void 0,this.u=void 0,this.f=32,this.name=t?.name,uX&&uX.push(this)}kX.prototype.c=function(){var e=this.S();try{if(8&this.f||this.x===void 0)return;var t=this.x();typeof t==`function`&&(this.m=t)}finally{e()}},kX.prototype.S=function(){if(1&this.f)throw Error(`Cycle detected`);this.f|=1,this.f&=-9,DX(this),CX(this),mX++;var e=dX;return dX=this,bye.bind(this,e)},kX.prototype.N=function(){2&this.f||(this.f|=2,this.u=pX,pX=this)},kX.prototype.d=function(){this.f|=8,1&this.f||OX(this)},kX.prototype.dispose=function(){this.d()};function AX(e,t){var n=new kX(e,t);try{n.c()}catch(e){throw n.d(),e}var r=n.d.bind(n);return r[Symbol.dispose]=r,r}var xye=Object.create,jX=Object.defineProperty,Sye=Object.defineProperties,Cye=Object.getOwnPropertyDescriptor,wye=Object.getOwnPropertyDescriptors,MX=Object.getOwnPropertySymbols,Tye=Object.prototype.hasOwnProperty,Eye=Object.prototype.propertyIsEnumerable,NX=(e,t)=>(t=Symbol[e])?t:Symbol.for(`Symbol.`+e),PX=e=>{throw TypeError(e)},FX=(e,t,n)=>t in e?jX(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Dye=(e,t)=>{for(var n in t||={})Tye.call(t,n)&&FX(e,n,t[n]);if(MX)for(var n of MX(t))Eye.call(t,n)&&FX(e,n,t[n]);return e},Oye=(e,t)=>Sye(e,wye(t)),IX=(e,t)=>jX(e,`name`,{value:t,configurable:!0}),kye=e=>[,,,xye(e?.[NX(`metadata`)]??null)],LX=[`class`,`method`,`getter`,`setter`,`accessor`,`field`,`value`,`get`,`set`],RX=e=>e!==void 0&&typeof e!=`function`?PX(`Function expected`):e,Aye=(e,t,n,r,i)=>({kind:LX[e],name:t,metadata:r,addInitializer:e=>n._?PX(`Already initialized`):i.push(RX(e||null))}),zX=(e,t)=>FX(t,NX(`metadata`),e[3]),BX=(e,t,n,r)=>{for(var i=0,a=e[t>>1],o=a&&a.length;i<o;i++)t&1?a[i].call(n):r=a[i].call(n,r);return r},VX=(e,t,n,r,i,a)=>{var o,s,c,l,u,d=t&7,f=!!(t&8),p=!!(t&16),m=d>3?e.length+1:d?f?1:2:0,h=LX[d+5],g=d>3&&(e[m-1]=[]),_=e[m]||(e[m]=[]),v=d&&(!p&&!f&&(i=i.prototype),d<5&&(d>3||!p)&&Cye(d<4?i:{get[n](){return UX(this,a)},set[n](e){return GX(this,a,e)}},n));d?p&&d<4&&IX(a,(d>2?`set `:d>1?`get `:``)+n):IX(i,n);for(var y=r.length-1;y>=0;y--)l=Aye(d,n,c={},e[3],_),d&&(l.static=f,l.private=p,u=l.access={has:p?e=>jye(i,e):e=>n in e},d^3&&(u.get=p?e=>(d^1?UX:Mye)(e,i,d^4?a:v.get):e=>e[n]),d>2&&(u.set=p?(e,t)=>GX(e,i,t,d^4?a:v.set):(e,t)=>e[n]=t)),s=(0,r[y])(d?d<4?p?a:v[h]:d>4?void 0:{get:v.get,set:v.set}:i,l),c._=1,d^4||s===void 0?RX(s)&&(d>4?g.unshift(s):d?p?a=s:v[h]=s:i=s):typeof s!=`object`||!s?PX(`Object expected`):(RX(o=s.get)&&(v.get=o),RX(o=s.set)&&(v.set=o),RX(o=s.init)&&g.unshift(o));return d||zX(e,i),v&&jX(i,n,v),p?d^4?a:v:i},HX=(e,t,n)=>t.has(e)||PX(`Cannot `+n),jye=(e,t)=>Object(t)===t?e.has(t):PX(`Cannot use the "in" operator on this value`),UX=(e,t,n)=>(HX(e,t,`read from private field`),n?n.call(e):t.get(e)),WX=(e,t,n)=>t.has(e)?PX(`Cannot add the same private member more than once`):t instanceof WeakSet?t.add(e):t.set(e,n),GX=(e,t,n,r)=>(HX(e,t,`write to private field`),r?r.call(e,n):t.set(e,n),n),Mye=(e,t,n)=>(HX(e,t,`access private method`),n);function KX(e,t){if(t){let n;return EX(()=>{let r=e();return r&&n&&t(n,r)?n:(n=r,r)})}return EX(e)}function qX(e,t){if(Object.is(e,t))return!0;if(e===null||t===null)return!1;if(typeof e==`function`&&typeof t==`function`)return e===t;if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}if(Array.isArray(e))return!Array.isArray(t)||e.length!==t.length?!1:!e.some((e,n)=>!qX(e,t[n]));if(typeof e==`object`&&typeof t==`object`){let n=Object.keys(e),r=Object.keys(t);return n.length===r.length&&!n.some(n=>!qX(e[n],t[n]))}return!1}function JX({get:e},t){return{init(e){return xX(e)},get(){return e.call(this).value},set(t){let n=e.call(this);n.peek()!==t&&(n.value=t)}}}function YX(e,t){let n=new WeakMap;return function(){let t=n.get(this);return t||(t=KX(e.bind(this)),n.set(this,t)),t.value}}function XX(e=!0){return function(t,n){n.addInitializer(function(){let t=n.kind===`field`||n.static?this:Object.getPrototypeOf(this),r=Object.getOwnPropertyDescriptor(t,n.name);r&&Object.defineProperty(t,n.name,Oye(Dye({},r),{enumerable:e}))})}}function ZX(...e){let t=e.map(e=>AX(e));return()=>t.forEach(e=>e())}var QX,$X,eZ,tZ,nZ,Nye=[JX],rZ,iZ,aZ,oZ,sZ,cZ,lZ,uZ,dZ,fZ,pZ,mZ,hZ,gZ;nZ=[JX],tZ=[JX],eZ=[XX()],$X=[XX()],QX=[XX()];var _Z=class{constructor(e,t=Object.is){this.defaultValue=e,this.equals=t,BX(rZ,5,this),WX(this,cZ),WX(this,iZ,BX(rZ,8,this)),BX(rZ,11,this),WX(this,lZ,BX(rZ,12,this)),BX(rZ,15,this),WX(this,pZ,BX(rZ,16,this)),BX(rZ,19,this),this.reset=this.reset.bind(this),this.reset()}get current(){return UX(this,cZ,hZ)}get initial(){return UX(this,cZ,oZ)}get previous(){return UX(this,cZ,dZ)}set current(e){let t=fX(()=>UX(this,cZ,hZ));e&&t&&this.equals(t,e)||lX(()=>{UX(this,cZ,oZ)||GX(this,cZ,e,sZ),GX(this,cZ,t,fZ),GX(this,cZ,e,gZ)})}reset(e=this.defaultValue){lX(()=>{GX(this,cZ,void 0,fZ),GX(this,cZ,e,sZ),GX(this,cZ,e,gZ)})}};rZ=kye(null),iZ=new WeakMap,cZ=new WeakSet,lZ=new WeakMap,pZ=new WeakMap,aZ=VX(rZ,20,`#initial`,Nye,cZ,iZ),oZ=aZ.get,sZ=aZ.set,uZ=VX(rZ,20,`#previous`,nZ,cZ,lZ),dZ=uZ.get,fZ=uZ.set,mZ=VX(rZ,20,`#current`,tZ,cZ,pZ),hZ=mZ.get,gZ=mZ.set,VX(rZ,2,`current`,eZ,_Z),VX(rZ,2,`initial`,$X,_Z),VX(rZ,2,`previous`,QX,_Z),zX(rZ,_Z);function vZ(e){return fX(()=>{let t={};for(let n in e)t[n]=e[n];return t})}var Pye=Object.create,yZ=Object.defineProperty,Fye=Object.getOwnPropertyDescriptor,bZ=Object.getOwnPropertySymbols,Iye=Object.prototype.hasOwnProperty,Lye=Object.prototype.propertyIsEnumerable,xZ=(e,t)=>(t=Symbol[e])?t:Symbol.for(`Symbol.`+e),SZ=e=>{throw TypeError(e)},CZ=Math.pow,wZ=(e,t,n)=>t in e?yZ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Rye=(e,t)=>{for(var n in t||={})Iye.call(t,n)&&wZ(e,n,t[n]);if(bZ)for(var n of bZ(t))Lye.call(t,n)&&wZ(e,n,t[n]);return e},TZ=(e,t)=>yZ(e,`name`,{value:t,configurable:!0}),zye=e=>[,,,Pye(e?.[xZ(`metadata`)]??null)],EZ=[`class`,`method`,`getter`,`setter`,`accessor`,`field`,`value`,`get`,`set`],DZ=e=>e!==void 0&&typeof e!=`function`?SZ(`Function expected`):e,Bye=(e,t,n,r,i)=>({kind:EZ[e],name:t,metadata:r,addInitializer:e=>n._?SZ(`Already initialized`):i.push(DZ(e||null))}),OZ=(e,t)=>wZ(t,xZ(`metadata`),e[3]),Vye=(e,t,n,r)=>{for(var i=0,a=e[t>>1],o=a&&a.length;i<o;i++)t&1?a[i].call(n):r=a[i].call(n,r);return r},kZ=(e,t,n,r,i,a)=>{var o,s,c,l,u,d=t&7,f=!!(t&8),p=!!(t&16),m=d>3?e.length+1:d?f?1:2:0,h=EZ[d+5],g=d>3&&(e[m-1]=[]),_=e[m]||(e[m]=[]),v=d&&(!p&&!f&&(i=i.prototype),d<5&&(d>3||!p)&&Fye(d<4?i:{get[n](){return jZ(this,a)},set[n](e){return MZ(this,a,e)}},n));d?p&&d<4&&TZ(a,(d>2?`set `:d>1?`get `:``)+n):TZ(i,n);for(var y=r.length-1;y>=0;y--)l=Bye(d,n,c={},e[3],_),d&&(l.static=f,l.private=p,u=l.access={has:p?e=>Hye(i,e):e=>n in e},d^3&&(u.get=p?e=>(d^1?jZ:Wye)(e,i,d^4?a:v.get):e=>e[n]),d>2&&(u.set=p?(e,t)=>MZ(e,i,t,d^4?a:v.set):(e,t)=>e[n]=t)),s=(0,r[y])(d?d<4?p?a:v[h]:d>4?void 0:{get:v.get,set:v.set}:i,l),c._=1,d^4||s===void 0?DZ(s)&&(d>4?g.unshift(s):d?p?a=s:v[h]=s:i=s):typeof s!=`object`||!s?SZ(`Object expected`):(DZ(o=s.get)&&(v.get=o),DZ(o=s.set)&&(v.set=o),DZ(o=s.init)&&g.unshift(o));return d||OZ(e,i),v&&yZ(i,n,v),p?d^4?a:v:i},AZ=(e,t,n)=>t.has(e)||SZ(`Cannot `+n),Hye=(e,t)=>Object(t)===t?e.has(t):SZ(`Cannot use the "in" operator on this value`),jZ=(e,t,n)=>(AZ(e,t,`read from private field`),n?n.call(e):t.get(e)),Uye=(e,t,n)=>t.has(e)?SZ(`Cannot add the same private member more than once`):t instanceof WeakSet?t.add(e):t.set(e,n),MZ=(e,t,n,r)=>(AZ(e,t,`write to private field`),r?r.call(e,n):t.set(e,n),n),Wye=(e,t,n)=>(AZ(e,t,`access private method`),n),NZ=class e{constructor(e,t){this.x=e,this.y=t}static delta(t,n){return new e(t.x-n.x,t.y-n.y)}static distance(e,t){return Math.hypot(e.x-t.x,e.y-t.y)}static equals(e,t){return e.x===t.x&&e.y===t.y}static from({x:t,y:n}){return new e(t,n)}},PZ=class e{constructor(e,t,n,r){this.left=e,this.top=t,this.width=n,this.height=r,this.scale={x:1,y:1}}get inverseScale(){return{x:1/this.scale.x,y:1/this.scale.y}}translate(t,n){let{top:r,left:i,width:a,height:o,scale:s}=this,c=new e(i+t,r+n,a,o);return c.scale=Rye({},s),c}get boundingRectangle(){let{width:e,height:t,left:n,top:r,right:i,bottom:a}=this;return{width:e,height:t,left:n,top:r,right:i,bottom:a}}get center(){let{left:e,top:t,right:n,bottom:r}=this;return new NZ((e+n)/2,(t+r)/2)}get area(){let{width:e,height:t}=this;return e*t}equals(t){if(!(t instanceof e))return!1;let{left:n,top:r,width:i,height:a}=this;return n===t.left&&r===t.top&&i===t.width&&a===t.height}containsPoint(e){let{top:t,left:n,bottom:r,right:i}=this;return t<=e.y&&e.y<=r&&n<=e.x&&e.x<=i}intersectionArea(t){return t instanceof e?Gye(this,t):0}intersectionRatio(e){let{area:t}=this,n=this.intersectionArea(e);return n/(e.area+t-n)}get bottom(){let{top:e,height:t}=this;return e+t}get right(){let{left:e,width:t}=this;return e+t}get aspectRatio(){let{width:e,height:t}=this;return e/t}get corners(){return[{x:this.left,y:this.top},{x:this.right,y:this.top},{x:this.left,y:this.bottom},{x:this.right,y:this.bottom}]}static from({top:t,left:n,width:r,height:i}){return new e(n,t,r,i)}static delta(e,t,n={x:`center`,y:`center`}){let r=(e,t)=>{let r=n[t],i=t===`x`?e.left:e.top,a=t===`x`?e.width:e.height;return r==`start`?i:r==`end`?i+a:i+a/2};return NZ.delta({x:r(e,`x`),y:r(e,`y`)},{x:r(t,`x`),y:r(t,`y`)})}static intersectionRatio(t,n){return e.from(t).intersectionRatio(e.from(n))}};function Gye(e,t){let n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),i=Math.min(t.left+t.width,e.left+e.width),a=Math.min(t.top+t.height,e.top+e.height),o=i-r,s=a-n;return r<i&&n<a?o*s:0}var FZ,IZ,LZ,RZ,zZ,BZ=class extends (LZ=_Z,IZ=[YX],FZ=[YX],LZ){constructor(e){let t=NZ.from(e);super(t,(e,t)=>NZ.equals(e,t)),Vye(zZ,5,this),Uye(this,RZ,0),this.velocity={x:0,y:0}}get delta(){return NZ.delta(this.current,this.initial)}get direction(){let{current:e,previous:t}=this;if(!t)return null;let n={x:e.x-t.x,y:e.y-t.y};return!n.x&&!n.y?null:Math.abs(n.x)>Math.abs(n.y)?n.x>0?`right`:`left`:n.y>0?`down`:`up`}get current(){return super.current}set current(e){let{current:t}=this,n=NZ.from(e),r={x:n.x-t.x,y:n.y-t.y},i=Date.now(),a=i-jZ(this,RZ),o=e=>Math.round(e/a*100);lX(()=>{MZ(this,RZ,i),this.velocity={x:o(r.x),y:o(r.y)},super.current=n})}reset(e=this.defaultValue){super.reset(NZ.from(e)),this.velocity={x:0,y:0}}};zZ=zye(LZ),RZ=new WeakMap,kZ(zZ,2,`delta`,IZ,BZ),kZ(zZ,2,`direction`,FZ,BZ),OZ(zZ,BZ);function VZ({x:e,y:t},n){let r=Math.abs(e),i=Math.abs(t);return typeof n==`number`?Math.sqrt(CZ(r,2)+CZ(i,2))>n:`x`in n&&`y`in n?r>n.x&&i>n.y:`x`in n?r>n.x:`y`in n&&i>n.y}var HZ=(e=>(e.Horizontal=`x`,e.Vertical=`y`,e))(HZ||{}),UZ=Object.values(HZ),Kye=Object.create,WZ=Object.defineProperty,qye=Object.defineProperties,Jye=Object.getOwnPropertyDescriptor,Yye=Object.getOwnPropertyDescriptors,GZ=Object.getOwnPropertySymbols,KZ=Object.prototype.hasOwnProperty,qZ=Object.prototype.propertyIsEnumerable,JZ=(e,t)=>(t=Symbol[e])?t:Symbol.for(`Symbol.`+e),YZ=e=>{throw TypeError(e)},XZ=(e,t,n)=>t in e?WZ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ZZ=(e,t)=>{for(var n in t||={})KZ.call(t,n)&&XZ(e,n,t[n]);if(GZ)for(var n of GZ(t))qZ.call(t,n)&&XZ(e,n,t[n]);return e},QZ=(e,t)=>qye(e,Yye(t)),$Z=(e,t)=>WZ(e,`name`,{value:t,configurable:!0}),eQ=(e,t)=>{var n={};for(var r in e)KZ.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&GZ)for(var r of GZ(e))t.indexOf(r)<0&&qZ.call(e,r)&&(n[r]=e[r]);return n},tQ=e=>[,,,Kye(e?.[JZ(`metadata`)]??null)],nQ=[`class`,`method`,`getter`,`setter`,`accessor`,`field`,`value`,`get`,`set`],rQ=e=>e!==void 0&&typeof e!=`function`?YZ(`Function expected`):e,Xye=(e,t,n,r,i)=>({kind:nQ[e],name:t,metadata:r,addInitializer:e=>n._?YZ(`Already initialized`):i.push(rQ(e||null))}),iQ=(e,t)=>XZ(t,JZ(`metadata`),e[3]),aQ=(e,t,n,r)=>{for(var i=0,a=e[t>>1],o=a&&a.length;i<o;i++)t&1?a[i].call(n):r=a[i].call(n,r);return r},oQ=(e,t,n,r,i,a)=>{var o,s,c,l,u,d=t&7,f=!!(t&8),p=!!(t&16),m=d>3?e.length+1:d?f?1:2:0,h=nQ[d+5],g=d>3&&(e[m-1]=[]),_=e[m]||(e[m]=[]),v=d&&(!p&&!f&&(i=i.prototype),d<5&&(d>3||!p)&&Jye(d<4?i:{get[n](){return cQ(this,a)},set[n](e){return uQ(this,a,e)}},n));d?p&&d<4&&$Z(a,(d>2?`set `:d>1?`get `:``)+n):$Z(i,n);for(var y=r.length-1;y>=0;y--)l=Xye(d,n,c={},e[3],_),d&&(l.static=f,l.private=p,u=l.access={has:p?e=>Zye(i,e):e=>n in e},d^3&&(u.get=p?e=>(d^1?cQ:dQ)(e,i,d^4?a:v.get):e=>e[n]),d>2&&(u.set=p?(e,t)=>uQ(e,i,t,d^4?a:v.set):(e,t)=>e[n]=t)),s=(0,r[y])(d?d<4?p?a:v[h]:d>4?void 0:{get:v.get,set:v.set}:i,l),c._=1,d^4||s===void 0?rQ(s)&&(d>4?g.unshift(s):d?p?a=s:v[h]=s:i=s):typeof s!=`object`||!s?YZ(`Object expected`):(rQ(o=s.get)&&(v.get=o),rQ(o=s.set)&&(v.set=o),rQ(o=s.init)&&g.unshift(o));return d||iQ(e,i),v&&WZ(i,n,v),p?d^4?a:v:i},sQ=(e,t,n)=>t.has(e)||YZ(`Cannot `+n),Zye=(e,t)=>Object(t)===t?e.has(t):YZ(`Cannot use the "in" operator on this value`),cQ=(e,t,n)=>(sQ(e,t,`read from private field`),n?n.call(e):t.get(e)),lQ=(e,t,n)=>t.has(e)?YZ(`Cannot add the same private member more than once`):t instanceof WeakSet?t.add(e):t.set(e,n),uQ=(e,t,n,r)=>(sQ(e,t,`write to private field`),r?r.call(e,n):t.set(e,n),n),dQ=(e,t,n)=>(sQ(e,t,`access private method`),n);function fQ(e,t){return{plugin:e,options:t}}function pQ(e){return t=>fQ(e,t)}function mQ(e){return typeof e==`function`?{plugin:e,options:void 0}:e}var Qye=[JX],hQ,gQ,_Q,vQ=class{constructor(e,t){this.manager=e,this.options=t,lQ(this,gQ,aQ(hQ,8,this,!1)),aQ(hQ,11,this),lQ(this,_Q,new Set)}enable(){this.disabled=!1}disable(){this.disabled=!0}isDisabled(){return fX(()=>this.disabled)}configure(e){this.options=e}registerEffect(e){let t=AX(e.bind(this));return cQ(this,_Q).add(t),t}destroy(){cQ(this,_Q).forEach(e=>e())}static configure(e){return fQ(this,e)}};hQ=tQ(null),gQ=new WeakMap,_Q=new WeakMap,oQ(hQ,4,`disabled`,Qye,vQ,gQ),iQ(hQ,vQ);var yQ=class extends vQ{},bQ,xQ=class{constructor(e){this.manager=e,this.instances=new Map,lQ(this,bQ,[])}get values(){return Array.from(this.instances.values())}set values(e){let t=e.map(mQ).reduce((e,t)=>{let n=e.find(({plugin:e})=>e===t.plugin);return n?(n.options=t.options,e):[...e,t]},[]),n=t.map(({plugin:e})=>e);for(let e of cQ(this,bQ))if(!n.includes(e)){if(e.prototype instanceof yQ)continue;this.unregister(e)}for(let{plugin:e,options:n}of t)this.register(e,n);uQ(this,bQ,n)}get(e){return this.instances.get(e)}register(e,t){let n=this.instances.get(e);if(n)return n.options!==t&&(n.options=t),n;let r=new e(this.manager,t);return this.instances.set(e,r),r}unregister(e){let t=this.instances.get(e);t&&(t.destroy(),this.instances.delete(e))}destroy(){for(let e of this.instances.values())e.destroy();this.instances.clear()}};bQ=new WeakMap;function $ye(e,t){return e.priority===t.priority?e.type===t.type?t.value-e.value:t.type-e.type:t.priority-e.priority}var SQ=[],CQ,wQ,ebe=class extends vQ{constructor(e){super(e),lQ(this,CQ),lQ(this,wQ),this.computeCollisions=this.computeCollisions.bind(this),uQ(this,wQ,xX(SQ)),this.destroy=ZX(()=>{let e=this.computeCollisions(),t=fX(()=>this.manager.dragOperation.position.current);if(e!==SQ){let e=cQ(this,CQ);if(uQ(this,CQ,t),e&&t.x==e.x&&t.y==e.y)return}else uQ(this,CQ,void 0);cQ(this,wQ).value=e},()=>{let{dragOperation:e}=this.manager;e.status.initialized&&this.forceUpdate()})}forceUpdate(e=!0){fX(()=>{e?cQ(this,wQ).value=this.computeCollisions():uQ(this,CQ,void 0)})}computeCollisions(e,t){let{registry:n,dragOperation:r}=this.manager,{source:i,shape:a,status:o}=r;if(!o.initialized||!a)return SQ;let s=[],c=[];for(let a of e??n.droppables){if(a.disabled||i&&!a.accepts(i))continue;let e=t??a.collisionDetector;if(!e)continue;c.push(a),a.shape;let n=fX(()=>e({droppable:a,dragOperation:r}));n&&(a.collisionPriority!=null&&(n.priority=a.collisionPriority),s.push(n))}return c.length===0?SQ:(s.sort($ye),s)}get collisions(){return cQ(this,wQ).value}};CQ=new WeakMap,wQ=new WeakMap;var TQ,EQ,tbe=[JX],DQ,OQ,kQ,AQ,jQ,MQ,NQ;EQ=[JX],TQ=[JX];var PQ=class e{constructor(e,t){lQ(this,AQ,aQ(kQ,8,this)),aQ(kQ,11,this),lQ(this,jQ),lQ(this,MQ,aQ(kQ,12,this)),aQ(kQ,15,this),lQ(this,NQ,aQ(kQ,16,this)),aQ(kQ,19,this);let{effects:n,id:r,data:i={},disabled:a=!1,register:o=!0}=e,s=r;uQ(this,jQ,xX(r)),this.manager=t,this.data=i,this.disabled=a,this.effects=()=>[()=>{let{id:e,manager:t}=this;if(e!==s)return s=e,t?.registry.register(this),()=>t?.registry.unregister(this)},...n?.()??[]],this.register=this.register.bind(this),this.unregister=this.unregister.bind(this),this.destroy=this.destroy.bind(this),t&&o&&queueMicrotask(this.register)}get id(){let t=cQ(this,jQ).value;return e.pendingIdChanges?.get(this)??t}set id(t){t!==(e.pendingIdChanges?.get(this)??cQ(this,jQ).peek())&&(e.pendingIdChanges||(e.pendingIdChanges=new Map,queueMicrotask(()=>{var t;return dQ(t=e,DQ,OQ).call(t)})),e.pendingIdChanges.set(this,t))}register(){return this.manager?.registry.register(this)}unregister(){var e;(e=this.manager)==null||e.registry.unregister(this)}destroy(){var e;(e=this.manager)==null||e.registry.unregister(this)}};kQ=tQ(null),DQ=new WeakSet,OQ=function(){let e=PQ.pendingIdChanges;PQ.pendingIdChanges=null,e&&lX(()=>{for(let[t,n]of e)cQ(t,jQ).value=n})},AQ=new WeakMap,jQ=new WeakMap,MQ=new WeakMap,NQ=new WeakMap,oQ(kQ,4,`manager`,tbe,PQ,AQ),oQ(kQ,4,`data`,EQ,PQ,MQ),oQ(kQ,4,`disabled`,TQ,PQ,NQ),lQ(PQ,DQ),iQ(kQ,PQ),PQ.pendingIdChanges=null;var FQ=PQ,IQ=class{constructor(){this.map=xX(new Map),this.cleanupFunctions=new WeakMap,this.register=(e,t)=>{let n=this.map.peek(),r=n.get(e),i=()=>this.unregister(e,t);if(r===t)return i;r&&r.id===e&&(this.cleanupFunctions.get(r)?.(),this.cleanupFunctions.delete(r));let a=new Map(n);for(let[r,i]of n)if(i===t&&r!==e){a.delete(r);break}a.set(e,t),this.map.value=a;let o=ZX(...t.effects());return this.cleanupFunctions.set(t,o),i},this.unregister=(e,t)=>{let n=this.map.peek();if(n.get(e)!==t)return;this.cleanupFunctions.get(t)?.(),this.cleanupFunctions.delete(t);let r=new Map(n);r.delete(e),this.map.value=r}}[Symbol.iterator](){return this.map.peek().values()}get value(){return this.map.value.values()}has(e){return this.map.value.has(e)}get(e){return this.map.value.get(e)}destroy(){for(let e of this)this.cleanupFunctions.get(e)?.(),e.destroy();this.map.value=new Map}},LQ,RQ,zQ,BQ,VQ,HQ,UQ,WQ,GQ,KQ,qQ,JQ=class extends (UQ=FQ,HQ=[JX],VQ=[JX],BQ=[JX],zQ=[YX],RQ=[YX],LQ=[YX],UQ){constructor(e,t){var n=e,{modifiers:r,type:i,sensors:a,plugins:o,effects:s}=n,c=eQ(n,[`modifiers`,`type`,`sensors`,`plugins`,`effects`]);super(QZ(ZZ({},c),{effects:()=>[...s?.()??[],()=>{let{manager:e,plugins:t}=this;if(e&&t)for(let n of t){let{plugin:t}=mQ(n);e.registry.plugins.register(t)}}]}),t),aQ(WQ,5,this),lQ(this,GQ,aQ(WQ,8,this)),aQ(WQ,11,this),lQ(this,KQ,aQ(WQ,12,this)),aQ(WQ,15,this),lQ(this,qQ,aQ(WQ,16,this,this.isDragSource?`dragging`:`idle`)),aQ(WQ,19,this),this.type=i,this.sensors=a,this.modifiers=r,this.alignment=c.alignment,this.plugins=o}pluginConfig(e){if(this.plugins)for(let t of this.plugins){let n=mQ(t);if(n.plugin===e)return n.options}}get isDropping(){return this.status===`dropping`&&this.isDragSource}get isDragging(){return this.status===`dragging`&&this.isDragSource}get isDragSource(){return this.manager?.dragOperation.source?.id===this.id}};WQ=tQ(UQ),GQ=new WeakMap,KQ=new WeakMap,qQ=new WeakMap,oQ(WQ,4,`type`,HQ,JQ,GQ),oQ(WQ,4,`modifiers`,VQ,JQ,KQ),oQ(WQ,4,`status`,BQ,JQ,qQ),oQ(WQ,2,`isDropping`,zQ,JQ),oQ(WQ,2,`isDragging`,RQ,JQ),oQ(WQ,2,`isDragSource`,LQ,JQ),iQ(WQ,JQ);var YQ,XQ,ZQ,QQ,$Q,e$,t$,n$,r$,i$,a$,o$,s$,c$=class extends (t$=FQ,e$=[JX],$Q=[JX],QQ=[JX],ZQ=[JX],XQ=[JX],YQ=[YX],t$){constructor(e,t){var n=e,{accept:r,collisionDetector:i,collisionPriority:a,type:o}=n,s=eQ(n,[`accept`,`collisionDetector`,`collisionPriority`,`type`]);super(s,t),aQ(n$,5,this),lQ(this,r$,aQ(n$,8,this)),aQ(n$,11,this),lQ(this,i$,aQ(n$,12,this)),aQ(n$,15,this),lQ(this,a$,aQ(n$,16,this)),aQ(n$,19,this),lQ(this,o$,aQ(n$,20,this)),aQ(n$,23,this),lQ(this,s$,aQ(n$,24,this)),aQ(n$,27,this),this.accept=r,this.collisionDetector=i,this.collisionPriority=a,this.type=o}accepts(e){let{accept:t}=this;return t?typeof t==`function`?t(e):e.type?Array.isArray(t)?t.includes(e.type):e.type===t:!1:!0}get isDropTarget(){return this.manager?.dragOperation.target?.id===this.id}};n$=tQ(t$),r$=new WeakMap,i$=new WeakMap,a$=new WeakMap,o$=new WeakMap,s$=new WeakMap,oQ(n$,4,`accept`,e$,c$,r$),oQ(n$,4,`type`,$Q,c$,i$),oQ(n$,4,`collisionDetector`,QQ,c$,a$),oQ(n$,4,`collisionPriority`,ZQ,c$,o$),oQ(n$,4,`shape`,XQ,c$,s$),oQ(n$,2,`isDropTarget`,YQ,c$),iQ(n$,c$);var nbe=class{constructor(){this.registry=new Map}addEventListener(e,t){let{registry:n}=this,r=new Set(n.get(e));return r.add(t),n.set(e,r),()=>this.removeEventListener(e,t)}removeEventListener(e,t){let{registry:n}=this,r=new Set(n.get(e));r.delete(t),n.set(e,r)}dispatch(e,...t){let{registry:n}=this,r=n.get(e);if(r)for(let e of r)e(...t)}},rbe=class extends nbe{constructor(e){super(),this.manager=e}dispatch(e,t){let n=[t,this.manager];super.dispatch(e,...n)}};function l$(e,t=!0){let n=!1;return QZ(ZZ({},e),{cancelable:t,get defaultPrevented(){return n},preventDefault(){t&&(n=!0)}})}var ibe=class extends yQ{constructor(e){super(e);let t=(e,t)=>e.map(({id:e})=>e).join(``)===t.map(({id:e})=>e).join(``),n=[];this.destroy=ZX(()=>{let{dragOperation:t,collisionObserver:r}=e;t.status.initializing&&(n=[],r.enable())},()=>{let{collisionObserver:r,monitor:i}=e,{collisions:a}=r;if(r.isDisabled()||FQ.pendingIdChanges)return;let o=l$({collisions:a});if(i.dispatch(`collision`,o),o.defaultPrevented||t(a,n))return;n=a;let[s]=a;fX(()=>{s?.id!==e.dragOperation.target?.id&&(r.disable(),e.actions.setDropTarget(s?.id).then(()=>{r.enable()}))})})}},u$=(e=>(e[e.Lowest=0]=`Lowest`,e[e.Low=1]=`Low`,e[e.Normal=2]=`Normal`,e[e.High=3]=`High`,e[e.Highest=4]=`Highest`,e))(u$||{}),d$=(e=>(e[e.Collision=0]=`Collision`,e[e.ShapeIntersection=1]=`ShapeIntersection`,e[e.PointerIntersection=2]=`PointerIntersection`,e))(d$||{}),f$,p$,m$,h$,g$,_$,abe=[JX],v$,y$;_$=[YX],g$=[YX],h$=[YX],m$=[YX],p$=[YX],f$=[YX];var b$=class{constructor(){aQ(v$,5,this),lQ(this,y$,aQ(v$,8,this,`idle`)),aQ(v$,11,this)}get current(){return this.value}get idle(){return this.value===`idle`}get initializing(){return this.value===`initializing`}get initialized(){let{value:e}=this;return e!==`idle`&&e!==`initialization-pending`}get dragging(){return this.value===`dragging`}get dropped(){return this.value===`dropped`}set(e){this.value=e}};v$=tQ(null),y$=new WeakMap,oQ(v$,4,`value`,abe,b$,y$),oQ(v$,2,`current`,_$,b$),oQ(v$,2,`idle`,g$,b$),oQ(v$,2,`initializing`,h$,b$),oQ(v$,2,`initialized`,m$,b$),oQ(v$,2,`dragging`,p$,b$),oQ(v$,2,`dropped`,f$,b$),iQ(v$,b$);var obe=class{constructor(e){this.manager=e}setDragSource(e){let{dragOperation:t}=this.manager;t.sourceIdentifier=typeof e==`string`||typeof e==`number`?e:e.id}setDropTarget(e){return fX(()=>{let{dragOperation:t}=this.manager,n=e??null;if(t.targetIdentifier===n)return Promise.resolve(!1);t.targetIdentifier=n;let r=l$({operation:t.snapshot()});return t.status.dragging&&this.manager.monitor.dispatch(`dragover`,r),this.manager.renderer.rendering.then(()=>r.defaultPrevented)})}start(e){return fX(()=>{let{dragOperation:t}=this.manager;if(e.source!=null&&this.setDragSource(e.source),!t.source)throw Error(`Cannot start a drag operation without a drag source`);if(!t.status.idle)throw Error(`Cannot start a drag operation while another is active`);let n=new AbortController,{event:r,coordinates:i}=e;lX(()=>{t.status.set(`initialization-pending`),t.shape=null,t.canceled=!1,t.activatorEvent=r??null,t.position.reset(i)});let a=l$({operation:t.snapshot()});return this.manager.monitor.dispatch(`beforedragstart`,a),a.defaultPrevented?(t.reset(),n.abort(),n):(t.status.set(`initializing`),t.controller=n,this.manager.renderer.rendering.then(()=>{if(n.signal.aborted)return;let{status:e}=t;e.current===`initializing`&&lX(()=>{t.status.set(`dragging`),this.manager.monitor.dispatch(`dragstart`,{nativeEvent:r,operation:t.snapshot(),cancelable:!1})})}),n)})}move(e){return fX(()=>{let{dragOperation:t}=this.manager,{status:n,controller:r}=t;if(!n.dragging||!r||r.signal.aborted)return;let i=l$({nativeEvent:e.event,operation:t.snapshot(),by:e.by,to:e.to},e.cancelable??!0);(e.propagate??!0)&&this.manager.monitor.dispatch(`dragmove`,i),queueMicrotask(()=>{if(i.defaultPrevented)return;let n=e.to??{x:t.position.current.x+(e.by?.x??0),y:t.position.current.y+(e.by?.y??0)};t.position.current=n})})}stop(e={}){return fX(()=>{let{dragOperation:t}=this.manager,{controller:n}=t;if(!n||n.signal.aborted)return;let r,i=()=>{let e={resume:()=>{},abort:()=>{}};return r=new Promise((t,n)=>{e.resume=t,e.abort=n}),e};n.abort();let a=()=>{this.manager.renderer.rendering.then(()=>{t.status.set(`dropped`);let e=fX(()=>t.source?.status===`dropping`),r=()=>{t.controller===n&&(t.controller=void 0),t.reset()};if(e){let{source:e}=t,n=AX(()=>{e?.status===`idle`&&(n(),r())})}else this.manager.renderer.rendering.then(r)})};t.canceled=e.canceled??!1,this.manager.monitor.dispatch(`dragend`,{nativeEvent:e.event,operation:t.snapshot(),canceled:e.canceled??!1,suspend:i}),r?r.then(a).catch(()=>t.reset()):a()})}},x$=class extends vQ{constructor(e,t){super(e,t),this.manager=e,this.options=t}},sbe=class extends AbortController{constructor(e,t){super(),this.constraints=e,this.onActivate=t,this.activated=!1;for(let t of e??[])t.controller=this}onEvent(e){if(!this.activated){if(this.constraints?.length)for(let t of this.constraints)t.onEvent(e);else this.activate(e)}}activate(e){this.activated||(this.activated=!0,this.onActivate(e))}abort(e){this.activated=!1,super.abort(e)}},S$,C$=class{constructor(e){this.options=e,lQ(this,S$)}set controller(e){uQ(this,S$,e),e.signal.addEventListener(`abort`,()=>this.abort())}activate(e){var t;(t=cQ(this,S$))==null||t.activate(e)}};S$=new WeakMap;var w$=class extends vQ{constructor(e,t){super(e,t),this.manager=e,this.options=t}apply(e){return e.transform}},cbe=class{constructor(e){this.draggables=new IQ,this.droppables=new IQ,this.plugins=new xQ(e),this.sensors=new xQ(e),this.modifiers=new xQ(e)}register(e,t){if(e instanceof JQ)return this.draggables.register(e.id,e);if(e instanceof c$)return this.droppables.register(e.id,e);if(e.prototype instanceof w$)return this.modifiers.register(e,t);if(e.prototype instanceof x$)return this.sensors.register(e,t);if(e.prototype instanceof vQ)return this.plugins.register(e,t);throw Error(`Invalid instance type`)}unregister(e){if(e instanceof FQ)return e instanceof JQ?this.draggables.unregister(e.id,e):e instanceof c$?this.droppables.unregister(e.id,e):()=>{};if(e.prototype instanceof w$)return this.modifiers.unregister(e);if(e.prototype instanceof x$)return this.sensors.unregister(e);if(e.prototype instanceof vQ)return this.plugins.unregister(e);throw Error(`Invalid instance type`)}destroy(){this.draggables.destroy(),this.droppables.destroy(),this.plugins.destroy(),this.sensors.destroy(),this.modifiers.destroy()}},T$,E$,D$,O$,k$,A$,j$,M$,lbe=[YX],N$,P$,F$,I$,L$,R$,z$,B$,V$,H$;M$=[JX],j$=[JX],A$=[JX],k$=[JX],O$=[JX],D$=[YX],E$=[YX],T$=[YX];var U$=class{constructor(e){aQ(I$,5,this),lQ(this,N$),lQ(this,P$),lQ(this,F$,new _Z(void 0,(e,t)=>e&&t?e.equals(t):e===t)),this.status=new b$,lQ(this,L$,aQ(I$,8,this,!1)),aQ(I$,11,this),lQ(this,R$,aQ(I$,12,this,null)),aQ(I$,15,this),lQ(this,z$,aQ(I$,16,this,null)),aQ(I$,19,this),lQ(this,B$,aQ(I$,20,this,null)),aQ(I$,23,this),lQ(this,V$,aQ(I$,24,this,[])),aQ(I$,27,this),this.position=new BZ({x:0,y:0}),lQ(this,H$,{x:0,y:0}),uQ(this,N$,e)}get shape(){let{current:e,initial:t,previous:n}=cQ(this,F$);return!e||!t?null:{current:e,initial:t,previous:n}}set shape(e){e?cQ(this,F$).current=e:cQ(this,F$).reset()}get source(){let e=this.sourceIdentifier;if(e==null)return null;let t=cQ(this,N$).registry.draggables.get(e);return t&&uQ(this,P$,t),t??cQ(this,P$)??null}get target(){let e=this.targetIdentifier;return e==null?null:cQ(this,N$).registry.droppables.get(e)??null}get transform(){let{x:e,y:t}=this.position.delta,n={x:e,y:t};for(let e of this.modifiers)n=e.apply(QZ(ZZ({},this.snapshot()),{transform:n}));return uQ(this,H$,n),n}snapshot(){return fX(()=>({source:this.source,target:this.target,activatorEvent:this.activatorEvent,transform:cQ(this,H$),shape:this.shape?vZ(this.shape):null,position:vZ(this.position),status:vZ(this.status),canceled:this.canceled}))}reset(){lX(()=>{this.status.set(`idle`),this.sourceIdentifier=null,this.targetIdentifier=null,cQ(this,F$).reset(),this.position.reset({x:0,y:0}),uQ(this,H$,{x:0,y:0}),this.modifiers=[]})}};I$=tQ(null),N$=new WeakMap,P$=new WeakMap,F$=new WeakMap,L$=new WeakMap,R$=new WeakMap,z$=new WeakMap,B$=new WeakMap,V$=new WeakMap,H$=new WeakMap,oQ(I$,2,`shape`,lbe,U$),oQ(I$,4,`canceled`,M$,U$,L$),oQ(I$,4,`activatorEvent`,j$,U$,R$),oQ(I$,4,`sourceIdentifier`,A$,U$,z$),oQ(I$,4,`targetIdentifier`,k$,U$,B$),oQ(I$,4,`modifiers`,O$,U$,V$),oQ(I$,2,`source`,D$,U$),oQ(I$,2,`target`,E$,U$),oQ(I$,2,`transform`,T$,U$),iQ(I$,U$);var ube={get rendering(){return Promise.resolve()}};function W$(e,t){return typeof e==`function`?e(t):e??t}var dbe=class{constructor(e){this.destroy=()=>{this.dragOperation.status.idle||this.actions.stop({canceled:!0}),this.dragOperation.modifiers.forEach(e=>e.destroy()),this.registry.destroy(),this.collisionObserver.destroy()};let t=e??{},n=W$(t.plugins,[]),r=W$(t.sensors,[]),i=W$(t.modifiers,[]),a=t.renderer??ube,o=new rbe(this),s=new cbe(this);this.registry=s,this.monitor=o,this.renderer=a,this.actions=new obe(this),this.dragOperation=new U$(this),this.collisionObserver=new ebe(this),this.plugins=[ibe,...n],this.modifiers=i,this.sensors=r;let{destroy:c}=this,l=ZX(()=>{let e=fX(()=>this.dragOperation.modifiers),t=this.modifiers;for(let n of e)t.includes(n)||n.destroy();this.dragOperation.modifiers=(this.dragOperation.source?.modifiers)?.map(e=>{let{plugin:t,options:n}=mQ(e);return new t(this,n)})??t});this.destroy=()=>{l(),c()}}get plugins(){return this.registry.plugins.values}set plugins(e){this.registry.plugins.values=e}get modifiers(){return this.registry.modifiers.values}set modifiers(e){this.registry.modifiers.values=e}get sensors(){return this.registry.sensors.values}set sensors(e){this.registry.sensors.values=e}},G$=e=>{throw TypeError(e)},K$=(e,t,n)=>t.has(e)||G$(`Cannot `+n),q$=(e,t,n)=>(K$(e,t,`read from private field`),t.get(e)),J$=(e,t,n)=>t.has(e)?G$(`Cannot add the same private member more than once`):t instanceof WeakSet?t.add(e):t.set(e,n),Y$=(e,t,n,r)=>(K$(e,t,`write to private field`),t.set(e,n),n),X$=(e,t,n)=>(K$(e,t,`access private method`),n);function Z$(e){return e?e instanceof KeyframeEffect||`getKeyframes`in e&&typeof e.getKeyframes==`function`:!1}function fbe(e,t){let n=e.getAnimations(),r=null;for(let e of n){if(e.playState!==`running`)continue;let{effect:n}=e,i=(Z$(n)?n.getKeyframes():[]).filter(t);i.length>0&&(r=[i[i.length-1],e])}return r}function Q$(e){let{width:t,height:n,top:r,left:i,bottom:a,right:o}=e.getBoundingClientRect();return{width:t,height:n,top:r,left:i,bottom:a,right:o}}function $$(e){let t=Object.prototype.toString.call(e);return t===`[object Window]`||t===`[object global]`}function e1(e){return`nodeType`in e}function t1(e){return e?$$(e)?e:e1(e)?`defaultView`in e?e.defaultView??window:e.ownerDocument?.defaultView??window:window:window}function n1(e){let{Document:t}=t1(e);return e instanceof t||`nodeType`in e&&e.nodeType===Node.DOCUMENT_NODE}function r1(e){return!e||$$(e)?!1:e instanceof t1(e).HTMLElement||`namespaceURI`in e&&typeof e.namespaceURI==`string`&&e.namespaceURI.endsWith(`html`)}function i1(e){return e instanceof t1(e).SVGElement||`namespaceURI`in e&&typeof e.namespaceURI==`string`&&e.namespaceURI.endsWith(`svg`)}function a1(e){return e?$$(e)?e.document:e1(e)?n1(e)?e:r1(e)||i1(e)?e.ownerDocument:document:document:document}function pbe(e){let{documentElement:t}=a1(e),n=t1(e).visualViewport,r=n?.width??t.clientWidth,i=n?.height??t.clientHeight,a=n?.offsetTop??0,o=n?.offsetLeft??0;return{top:a,left:o,right:o+r,bottom:a+i,width:r,height:i}}function mbe(e,t){if(hbe(e)&&e.open===!1)return!1;let{overflow:n,overflowX:r,overflowY:i}=getComputedStyle(e);return n===`visible`&&r===`visible`&&i===`visible`}function hbe(e){return e.tagName===`DETAILS`}function o1(e,t=e.getBoundingClientRect(),n=0){let r=t,{ownerDocument:i}=e,a=i.defaultView??window,o=e.parentElement;for(;o&&o!==i.documentElement;){if(!mbe(o)){let e=o.getBoundingClientRect(),t=n*(e.bottom-e.top),i=n*(e.right-e.left),a=n*(e.bottom-e.top),s=n*(e.right-e.left);r={top:Math.max(r.top,e.top-t),right:Math.min(r.right,e.right+i),bottom:Math.min(r.bottom,e.bottom+a),left:Math.max(r.left,e.left-s),width:0,height:0},r.width=r.right-r.left,r.height=r.bottom-r.top}o=o.parentElement}let s=a.visualViewport,c=s?.offsetTop??0,l=s?.offsetLeft??0,u=s?.width??a.innerWidth,d=s?.height??a.innerHeight,f=n*d,p=n*u;return r={top:Math.max(r.top,c-f),right:Math.min(r.right,l+u+p),bottom:Math.min(r.bottom,c+d+f),left:Math.max(r.left,l-p),width:0,height:0},r.width=r.right-r.left,r.height=r.bottom-r.top,r.width<0&&(r.width=0),r.height<0&&(r.height=0),r}function s1(e){return{x:e.clientX,y:e.clientY}}var c1=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function l1(e=document,t=new Set){if(t.has(e))return[];t.add(e);let n=[e];for(let r of Array.from(e.querySelectorAll(`iframe, frame`)))try{let e=r.contentDocument;e&&!t.has(e)&&n.push(...l1(e,t))}catch{}try{let r=e.defaultView;if(r&&r!==window.top){let i=r.parent;i&&i.document&&i.document!==e&&n.push(...l1(i.document,t))}}catch{}return n}function u1(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function d1(){let e=u1()?window.visualViewport:null;return{x:e?.offsetLeft??0,y:e?.offsetTop??0}}function f1(e){return!e||!e1(e)?!1:e instanceof t1(e).ShadowRoot}function p1(e){if(e&&e1(e)){let t=e.getRootNode();if(f1(t)||t instanceof Document)return t}return a1(e)}function m1(e){return e.matchMedia(`(prefers-reduced-motion: reduce)`).matches}function gbe(e){let t=`input, textarea, select, canvas, [contenteditable]`,n=e.cloneNode(!0),r=Array.from(e.querySelectorAll(t));return Array.from(n.querySelectorAll(t)).forEach((e,t)=>{let n=r[t];h1(e)&&h1(n)&&(e.type!==`file`&&(e.value=n.value),e.type===`radio`&&e.name&&(e.name=`Cloned__${e.name}`)),g1(e)&&g1(n)&&n.width>0&&n.height>0&&e.getContext(`2d`)?.drawImage(n,0,0)}),n}function h1(e){return`value`in e}function g1(e){return e.tagName===`CANVAS`}function _1(e,{x:t,y:n}){let r=e.elementFromPoint(t,n);if(_be(r)){let{contentDocument:e}=r;if(e){let{left:i,top:a}=r.getBoundingClientRect();return _1(e,{x:t-i,y:n-a})}}return r}function _be(e){return e?.tagName===`IFRAME`}var v1=new WeakMap;function vbe(e){return e.closest(`
89
- input:not([disabled]),
90
- select:not([disabled]),
91
- textarea:not([disabled]),
92
- button:not([disabled]),
93
- a[href],
94
- [contenteditable]:not([contenteditable="false"])
95
- `)}var y1=class{constructor(){this.entries=new Set,this.clear=()=>{for(let e of this.entries){let[t,{type:n,listener:r,options:i}]=e;t.removeEventListener(n,r,i)}this.entries.clear()}}bind(e,t){let n=Array.isArray(e)?e:[e],r=Array.isArray(t)?t:[t],i=[];for(let e of n)for(let t of r){let{type:n,listener:r,options:a}=t,o=[e,t];e.addEventListener(n,r,a),this.entries.add(o),i.push(o)}let a=this.entries;return function(){for(let e of i){let[t,{type:n,listener:r,options:i}]=e;t.removeEventListener(n,r,i),a.delete(e)}}}};function b1(e){let t=e?.ownerDocument.defaultView;if(t&&t.self!==t.parent)return t.frameElement}function ybe(e){let t=new Set,n=b1(e);for(;n;)t.add(n),n=b1(n);return t}function bbe(e,t){let n=setTimeout(e,t);return()=>clearTimeout(n)}function x1(e,t){let n=()=>performance.now(),r,i;return function(...a){let o=this;i?(r?.(),r=bbe(()=>{e.apply(o,a),i=n()},t-(n()-i))):(e.apply(o,a),i=n())}}function xbe(e,t){return e===t?!0:!e||!t?!1:e.top==t.top&&e.left==t.left&&e.right==t.right&&e.bottom==t.bottom}function Sbe(e,t=e.getBoundingClientRect()){let{width:n,height:r}=o1(e,t);return n>0&&r>0}var Cbe=c1?ResizeObserver:class{observe(){}unobserve(){}disconnect(){}},S1,wbe=class extends Cbe{constructor(e){super(t=>{if(!q$(this,S1)){Y$(this,S1,!0);return}e(t,this)}),J$(this,S1,!1)}};S1=new WeakMap;var C1=Array.from({length:100},(e,t)=>t/100),w1=75,T1,E1,D1,O1,k1,A1,j1,M1,N1,P1,F1,I1=class{constructor(e,t,n={debug:!1,skipInitial:!1}){this.element=e,this.callback=t,J$(this,N1),this.disconnect=()=>{var e,t,n;Y$(this,j1,!0),(e=q$(this,D1))==null||e.disconnect(),(t=q$(this,O1))==null||t.disconnect(),q$(this,k1).disconnect(),(n=q$(this,A1))==null||n.remove()},J$(this,T1,!0),J$(this,E1),J$(this,D1),J$(this,O1),J$(this,k1),J$(this,A1),J$(this,j1,!1),J$(this,M1,x1(()=>{var e;let{element:t}=this;if((e=q$(this,O1))==null||e.disconnect(),q$(this,j1)||!q$(this,T1)||!t.isConnected)return;let n=t.ownerDocument??document,{innerHeight:r,innerWidth:i}=n.defaultView??window,a=t.getBoundingClientRect(),{top:o,left:s,bottom:c,right:l}=o1(t,a),u=-Math.floor(o),d=-Math.floor(s),f=`${u}px ${-Math.floor(i-l)}px ${-Math.floor(r-c)}px ${d}px`;this.boundingClientRect=a,Y$(this,O1,new IntersectionObserver(e=>{let[n]=e,{intersectionRect:r}=n;(n.intersectionRatio===1?PZ.intersectionRatio(r,o1(t)):n.intersectionRatio)!==1&&q$(this,M1).call(this)},{threshold:C1,rootMargin:f,root:n})),q$(this,O1).observe(t),X$(this,N1,P1).call(this)},w1)),this.boundingClientRect=e.getBoundingClientRect(),Y$(this,T1,Sbe(e,this.boundingClientRect));let r=!0;this.callback=e=>{r&&(r=!1,n.skipInitial)||t(e)};let i=e.ownerDocument;n?.debug&&(Y$(this,A1,document.createElement(`div`)),q$(this,A1).style.background=`rgba(0,0,0,0.15)`,q$(this,A1).style.position=`fixed`,q$(this,A1).style.pointerEvents=`none`,i.body.appendChild(q$(this,A1))),Y$(this,k1,new IntersectionObserver(t=>{var n,r;let{boundingClientRect:i,isIntersecting:a}=t[t.length-1],{width:o,height:s}=i,c=q$(this,T1);Y$(this,T1,a),(o||s)&&(c&&!a?((n=q$(this,O1))==null||n.disconnect(),this.callback(null),(r=q$(this,D1))==null||r.disconnect(),Y$(this,D1,void 0),q$(this,A1)&&(q$(this,A1).style.visibility=`hidden`)):q$(this,M1).call(this),a&&!q$(this,D1)&&(Y$(this,D1,new wbe(q$(this,M1))),q$(this,D1).observe(e)))},{threshold:C1,root:i})),q$(this,T1)&&!n.skipInitial&&this.callback(this.boundingClientRect),q$(this,k1).observe(e)}};T1=new WeakMap,E1=new WeakMap,D1=new WeakMap,O1=new WeakMap,k1=new WeakMap,A1=new WeakMap,j1=new WeakMap,M1=new WeakMap,N1=new WeakSet,P1=function(){q$(this,j1)||(X$(this,N1,F1).call(this),!xbe(this.boundingClientRect,q$(this,E1))&&(this.callback(this.boundingClientRect),Y$(this,E1,this.boundingClientRect)))},F1=function(){if(q$(this,A1)){let{top:e,left:t,width:n,height:r}=o1(this.element);q$(this,A1).style.overflow=`hidden`,q$(this,A1).style.visibility=`visible`,q$(this,A1).style.top=`${Math.floor(e)}px`,q$(this,A1).style.left=`${Math.floor(t)}px`,q$(this,A1).style.width=`${Math.floor(n)}px`,q$(this,A1).style.height=`${Math.floor(r)}px`}};var L1=new WeakMap,R1=new WeakMap;function Tbe(e,t){let n=L1.get(e);return n||={disconnect:new I1(e,t=>{let n=L1.get(e);n&&n.callbacks.forEach(e=>e(t))},{skipInitial:!0}).disconnect,callbacks:new Set},n.callbacks.add(t),L1.set(e,n),()=>{n.callbacks.delete(t),n.callbacks.size===0&&(L1.delete(e),n.disconnect())}}function Ebe(e,t){let n=new Set;for(let r of e){let e=Tbe(r,t);n.add(e)}return()=>n.forEach(e=>e())}function Dbe(e,t){let n=e.ownerDocument;if(!R1.has(n)){let e=new AbortController,t=new Set;document.addEventListener(`scroll`,e=>t.forEach(t=>t(e)),{capture:!0,passive:!0,signal:e.signal}),R1.set(n,{disconnect:()=>e.abort(),listeners:t})}let{listeners:r,disconnect:i}=R1.get(n)??{};return!r||!i?()=>{}:(r.add(t),()=>{r.delete(t),r.size===0&&(i(),R1.delete(n))})}var z1,B1,V1,H1,Obe=class{constructor(e,t,n){this.callback=t,J$(this,z1),J$(this,B1,!1),J$(this,V1),J$(this,H1,x1(e=>{if(!q$(this,B1)&&e.target&&`contains`in e.target&&typeof e.target.contains==`function`){for(let t of q$(this,V1))if(e.target.contains(t)){this.callback(q$(this,z1).boundingClientRect);break}}},w1));let r=ybe(e),i=Ebe(r,t),a=Dbe(e,q$(this,H1));Y$(this,V1,r),Y$(this,z1,new I1(e,t,n)),this.disconnect=()=>{q$(this,B1)||(Y$(this,B1,!0),i(),a(),q$(this,z1).disconnect())}}};z1=new WeakMap,B1=new WeakMap,V1=new WeakMap,H1=new WeakMap;function U1(e){return`showPopover`in e&&`hidePopover`in e&&typeof e.showPopover==`function`&&typeof e.hidePopover==`function`}function W1(e){try{U1(e)&&e.isConnected&&e.hasAttribute(`popover`)&&!e.matches(`:popover-open`)&&e.showPopover()}catch{}}function G1(e){return!c1||!e?!1:e===a1(e).scrollingElement}function K1(e){let t=t1(e),n=G1(e)?pbe(e):Q$(e),r=t.visualViewport,i=G1(e)?{height:r?.height??t.innerHeight,width:r?.width??t.innerWidth}:{height:e.clientHeight,width:e.clientWidth},a={current:{x:e.scrollLeft,y:e.scrollTop},max:{x:e.scrollWidth-i.width,y:e.scrollHeight-i.height}};return{rect:n,position:a,isTop:a.current.y<=0,isLeft:a.current.x<=0,isBottom:a.current.y>=a.max.y,isRight:a.current.x>=a.max.x}}function kbe(e,t){let{isTop:n,isBottom:r,isLeft:i,isRight:a,position:o}=K1(e),{x:s,y:c}=t??{x:0,y:0},l=!n&&o.current.y+c>0,u=!r&&o.current.y+c<o.max.y,d=!i&&o.current.x+s>0,f=!a&&o.current.x+s<o.max.x;return{top:l,bottom:u,left:d,right:f,x:d||f,y:l||u}}var q1=class{constructor(e){this.scheduler=e,this.pending=!1,this.tasks=new Set,this.resolvers=new Set,this.flush=()=>{let{tasks:e,resolvers:t}=this;this.pending=!1,this.tasks=new Set,this.resolvers=new Set;for(let t of e)t();for(let e of t)e()}}schedule(e){return this.tasks.add(e),this.pending||(this.pending=!0,this.scheduler(this.flush)),new Promise(e=>this.resolvers.add(e))}},J1=new q1(e=>{typeof requestAnimationFrame==`function`?requestAnimationFrame(e):e()}),Abe=new q1(e=>setTimeout(e,50)),Y1=new Map,jbe=Y1.clear.bind(Y1);function X1(e,t=!1){if(!t)return Z1(e);let n=Y1.get(e);return n||(n=Z1(e),Y1.set(e,n),Abe.schedule(jbe),n)}function Z1(e){return t1(e).getComputedStyle(e)}function Mbe(e,t=X1(e,!0)){return t.position===`fixed`||t.position===`sticky`}function Nbe(e,t=X1(e,!0)){let n=/(auto|scroll|overlay)/;return[`overflow`,`overflowX`,`overflowY`].some(e=>{let r=t[e];return typeof r==`string`&&n.test(r)})}var Pbe={excludeElement:!0,escapeShadowDOM:!0};function Q1(e,t=Pbe){let{limit:n,excludeElement:r,escapeShadowDOM:i}=t,a=new Set;function o(t){if(n!=null&&a.size>=n||!t)return a;if(n1(t)&&t.scrollingElement!=null&&!a.has(t.scrollingElement))return a.add(t.scrollingElement),a;if(i&&f1(t))return o(t.host);if(!r1(t))return i1(t)?o(t.parentElement):a;if(a.has(t))return a;let s=X1(t,!0);if(r&&t===e||Nbe(t,s)&&a.add(t),Mbe(t,s)){let{scrollingElement:e}=t.ownerDocument;return e&&a.add(e),a}return o(t.parentNode)}return e?o(e):a}function $1(e,t=window.frameElement){let n={x:0,y:0,scaleX:1,scaleY:1};if(!e)return n;let r=b1(e);for(;r;){if(r===t)return n;let e=Q$(r),{x:i,y:a}=Fbe(r,e);n.x+=e.left,n.y+=e.top,n.scaleX*=i,n.scaleY*=a,r=b1(r)}return n}function Fbe(e,t=Q$(e)){let n=Math.round(t.width),r=Math.round(t.height);if(r1(e))return{x:n/e.offsetWidth,y:r/e.offsetHeight};let i=X1(e,!0);return{x:(parseFloat(i.width)||n)/n,y:(parseFloat(i.height)||r)/r}}function Ibe(e){if(!e||e===`none`)return null;let t=e.split(` `),n=parseFloat(t[0]),r=parseFloat(t[1]);return isNaN(n)&&isNaN(r)?null:{x:isNaN(n)?r:n,y:isNaN(r)?n:r}}function e0(e){if(!e||e===`none`)return null;let[t,n,r=`0`]=e.split(` `),i={x:parseFloat(t),y:parseFloat(n),z:parseInt(r,10)};return isNaN(i.x)&&isNaN(i.y)?null:{x:isNaN(i.x)?0:i.x,y:isNaN(i.y)?0:i.y,z:isNaN(i.z)?0:i.z}}function t0(e){let{scale:t,transform:n,translate:r}=e,i=Ibe(t),a=e0(r),o=Lbe(n);if(!o&&!i&&!a)return null;let s={x:i?.x??1,y:i?.y??1},c={x:a?.x??0,y:a?.y??0},l={x:o?.x??0,y:o?.y??0,scaleX:o?.scaleX??1,scaleY:o?.scaleY??1};return{x:c.x+l.x,y:c.y+l.y,z:a?.z??0,scaleX:s.x*l.scaleX,scaleY:s.y*l.scaleY}}function Lbe(e){if(e.startsWith(`matrix3d(`)){let t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}if(e.startsWith(`matrix(`)){let t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}var n0=(e=>(e[e.Idle=0]=`Idle`,e[e.Forward=1]=`Forward`,e[e.Reverse=-1]=`Reverse`,e))(n0||{}),Rbe={x:.2,y:.2},zbe={x:10,y:10};function Bbe(e,t,n,r=25,i=Rbe,a=zbe){let{x:o,y:s}=t,{rect:c,isTop:l,isBottom:u,isLeft:d,isRight:f}=K1(e),p=$1(e),m=t0(X1(e,!0)),h=m!==null&&m?.scaleX<0,g=m!==null&&m?.scaleY<0,_=new PZ(c.left*p.scaleX+p.x,c.top*p.scaleY+p.y,c.width*p.scaleX,c.height*p.scaleY),v={x:0,y:0},y={x:0,y:0},b={height:_.height*i.y,width:_.width*i.x};return b.height>0&&(!l||g&&!u)&&s<=_.top+b.height&&n?.y!==1&&o>=_.left-a.x&&o<=_.right+a.x?(v.y=g?1:-1,y.y=r*Math.abs((_.top+b.height-s)/b.height)):b.height>0&&(!u||g&&!l)&&s>=_.bottom-b.height&&n?.y!==-1&&o>=_.left-a.x&&o<=_.right+a.x&&(v.y=g?-1:1,y.y=r*Math.abs((_.bottom-b.height-s)/b.height)),b.width>0&&(!f||h&&!d)&&o>=_.right-b.width&&n?.x!==-1&&s>=_.top-a.y&&s<=_.bottom+a.y?(v.x=h?-1:1,y.x=r*Math.abs((_.right-b.width-o)/b.width)):b.width>0&&(!d||h&&!f)&&o<=_.left+b.width&&n?.x!==1&&s>=_.top-a.y&&s<=_.bottom+a.y&&(v.x=h?1:-1,y.x=r*Math.abs((_.left+b.width-o)/b.width)),{direction:v,speed:y}}function Vbe(e,{block:t=`nearest`,inline:n=`nearest`}={}){if(!r1(e))return;let r=Q1(e),i=[];for(let a of r){if(!r1(a))continue;let{top:r,left:o}=Hbe(e,a),s=r,c=o;for(let e of i)s-=e.scrollTop,c-=e.scrollLeft;if(t!==`none`){let n=s<a.scrollTop;n!==s+e.offsetHeight>a.scrollTop+a.clientHeight&&(a.scrollTop=t===`center`?s-a.clientHeight/2+e.offsetHeight/2:n?s:s+e.offsetHeight-a.clientHeight)}if(n!==`none`){let t=c<a.scrollLeft;t!==c+e.offsetWidth>a.scrollLeft+a.clientWidth&&(a.scrollLeft=n===`center`?c-a.clientWidth/2+e.offsetWidth/2:t?c:c+e.offsetWidth-a.clientWidth)}i.push(a)}}function r0(e){let t=0,n=0,r=e;for(;r;){t+=r.offsetTop,n+=r.offsetLeft;let e=r.offsetParent;if(!r1(e))break;t+=e.clientTop,n+=e.clientLeft,r=e}return{top:t,left:n}}function Hbe(e,t){let n=r0(e),r=r0(t);return{top:n.top-r.top-t.clientTop,left:n.left-r.left-t.clientLeft}}function Ube(e,t,n){let{scaleX:r,scaleY:i,x:a,y:o}=t,s=e.left+a+(1-r)*parseFloat(n),c=e.top+o+(1-i)*parseFloat(n.slice(n.indexOf(` `)+1)),l=r?e.width*r:e.width,u=i?e.height*i:e.height;return{width:l,height:u,top:c,right:s+l,bottom:c+u,left:s}}function Wbe(e,t,n){let{scaleX:r,scaleY:i,x:a,y:o}=t,s=e.left-a-(1-r)*parseFloat(n),c=e.top-o-(1-i)*parseFloat(n.slice(n.indexOf(` `)+1)),l=r?e.width/r:e.width,u=i?e.height/i:e.height;return{width:l,height:u,top:c,right:s+l,bottom:c+u,left:s}}function Gbe({element:e,keyframes:t,options:n}){return e.animate(t,n).finished}var Kbe=new q1(e=>setTimeout(e,0)),i0=new Map,qbe=i0.clear.bind(i0);function Jbe(e){let t=e.ownerDocument,n=i0.get(t);if(n)return n;n=t.getAnimations(),i0.set(t,n),Kbe.schedule(qbe);let r=n.filter(t=>Z$(t.effect)&&t.effect.target===e);return i0.set(e,r),n}function Ybe(e,t){let n=Jbe(e).filter(e=>{if(Z$(e.effect)){let{target:n}=e.effect;if((n&&t.isValidTarget?.call(t,n))??!0)return e.effect.getKeyframes().some(e=>{for(let n of t.properties)if(e[n])return!0})}}).map(e=>{let{effect:t,currentTime:n}=e,r=t?.getComputedTiming().duration;if(!(e.pending||e.playState===`finished`)&&typeof r==`number`&&typeof n==`number`&&n<r)return e.currentTime=r,()=>{e.currentTime=n}});if(n.length>0)return()=>n.forEach(e=>e?.())}var a0=class extends PZ{constructor(e,t={}){let{frameTransform:n=$1(e),ignoreTransforms:r,getBoundingClientRect:i=Q$}=t,a=Ybe(e,{properties:[`transform`,`translate`,`scale`,`width`,`height`],isValidTarget:t=>(t!==e||u1())&&t.contains(e)}),o=i(e),{top:s,left:c,width:l,height:u}=o,d,f=X1(e),p=t0(f),m={x:p?.scaleX??1,y:p?.scaleY??1},h=Xbe(e,f);a?.(),p&&(d=Wbe(o,p,f.transformOrigin),(r||h)&&(s=d.top,c=d.left,l=d.width,u=d.height));let g={width:d?.width??l,height:d?.height??u};if(h&&!r&&d){let e=Ube(d,h,f.transformOrigin);s=e.top,c=e.left,l=e.width,u=e.height,m.x=h.scaleX,m.y=h.scaleY}n&&(r||(c*=n.scaleX,l*=n.scaleX,s*=n.scaleY,u*=n.scaleY),c+=n.x,s+=n.y),super(c,s,l,u),this.scale=m,this.intrinsicWidth=g.width,this.intrinsicHeight=g.height}};function Xbe(e,t){let n=e.getAnimations();if(!n.length)return null;let r,i,a,o=!1;for(let e of n){if(e.playState!==`running`)continue;let t=Z$(e.effect)?e.effect.getKeyframes():[],n=t[t.length-1];if(!n)continue;let{transform:s,translate:c,scale:l}=n;typeof s==`string`&&s&&(r=s,o=!0),typeof c==`string`&&c&&(i=c,o=!0),typeof l==`string`&&l&&(a=l,o=!0)}return o?t0({transform:r??t.transform,translate:i??t.translate,scale:a??t.scale}):null}function o0(e){return`style`in e&&typeof e.style==`object`&&e.style!==null&&`setProperty`in e.style&&`removeProperty`in e.style&&typeof e.style.setProperty==`function`&&typeof e.style.removeProperty==`function`}var Zbe=class{constructor(e){this.element=e,this.initial=new Map}set(e,t=``){let{element:n}=this;if(o0(n))for(let[r,i]of Object.entries(e)){let e=`${t}${r}`;this.initial.has(e)||this.initial.set(e,n.style.getPropertyValue(e)),n.style.setProperty(e,typeof i==`string`?i:`${i}px`)}}remove(e,t=``){let{element:n}=this;if(o0(n))for(let r of e){let e=`${t}${r}`;n.style.removeProperty(e)}}reset(){let{element:e}=this;if(o0(e)){for(let[t,n]of this.initial)e.style.setProperty(t,n);e.getAttribute(`style`)===``&&e.removeAttribute(`style`)}}};function s0(e){return e?e instanceof t1(e).Element||e1(e)&&e.nodeType===Node.ELEMENT_NODE:!1}function c0(e){if(!e)return!1;let{KeyboardEvent:t}=t1(e.target);return e instanceof t}function Qbe(e){if(!e)return!1;let{PointerEvent:t}=t1(e.target);return e instanceof t}function $be(e){if(!s0(e))return!1;let{tagName:t}=e;return t===`INPUT`||t===`TEXTAREA`||exe(e)}function exe(e){return e.hasAttribute(`contenteditable`)&&e.getAttribute(`contenteditable`)!==`false`}var l0={};function u0(e){let t=l0[e]==null?0:l0[e]+1;return l0[e]=t,`${e}-${t}`}var txe=({dragOperation:e,droppable:t})=>{let n=e.position.current;if(!n)return null;let{id:r}=t;return t.shape&&t.shape.containsPoint(n)?{id:r,value:1/NZ.distance(t.shape.center,n),type:d$.PointerIntersection,priority:u$.High}:null},nxe=({dragOperation:e,droppable:t})=>{let{shape:n}=e;if(!t.shape||!n?.current)return null;let r=n.current.intersectionArea(t.shape);if(r){let{position:i}=e,a=NZ.distance(t.shape.center,i.current),o=r/(n.current.area+t.shape.area-r)/a;return{id:t.id,value:o,type:d$.ShapeIntersection,priority:u$.Normal}}return null},rxe=e=>txe(e)??nxe(e),ixe=Object.create,d0=Object.defineProperty,axe=Object.defineProperties,oxe=Object.getOwnPropertyDescriptor,sxe=Object.getOwnPropertyDescriptors,f0=Object.getOwnPropertySymbols,p0=Object.prototype.hasOwnProperty,m0=Object.prototype.propertyIsEnumerable,h0=(e,t)=>(t=Symbol[e])?t:Symbol.for(`Symbol.`+e),g0=e=>{throw TypeError(e)},_0=(e,t,n)=>t in e?d0(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,v0=(e,t)=>{for(var n in t||={})p0.call(t,n)&&_0(e,n,t[n]);if(f0)for(var n of f0(t))m0.call(t,n)&&_0(e,n,t[n]);return e},y0=(e,t)=>axe(e,sxe(t)),b0=(e,t)=>d0(e,`name`,{value:t,configurable:!0}),x0=(e,t)=>{var n={};for(var r in e)p0.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&f0)for(var r of f0(e))t.indexOf(r)<0&&m0.call(e,r)&&(n[r]=e[r]);return n},S0=e=>[,,,ixe(e?.[h0(`metadata`)]??null)],C0=[`class`,`method`,`getter`,`setter`,`accessor`,`field`,`value`,`get`,`set`],w0=e=>e!==void 0&&typeof e!=`function`?g0(`Function expected`):e,cxe=(e,t,n,r,i)=>({kind:C0[e],name:t,metadata:r,addInitializer:e=>n._?g0(`Already initialized`):i.push(w0(e||null))}),T0=(e,t)=>_0(t,h0(`metadata`),e[3]),E0=(e,t,n,r)=>{for(var i=0,a=e[t>>1],o=a&&a.length;i<o;i++)t&1?a[i].call(n):r=a[i].call(n,r);return r},D0=(e,t,n,r,i,a)=>{var o,s,c,l,u,d=t&7,f=!!(t&8),p=!!(t&16),m=d>3?e.length+1:d?f?1:2:0,h=C0[d+5],g=d>3&&(e[m-1]=[]),_=e[m]||(e[m]=[]),v=d&&(!p&&!f&&(i=i.prototype),d<5&&(d>3||!p)&&oxe(d<4?i:{get[n](){return k0(this,a)},set[n](e){return j0(this,a,e)}},n));d?p&&d<4&&b0(a,(d>2?`set `:d>1?`get `:``)+n):b0(i,n);for(var y=r.length-1;y>=0;y--)l=cxe(d,n,c={},e[3],_),d&&(l.static=f,l.private=p,u=l.access={has:p?e=>lxe(i,e):e=>n in e},d^3&&(u.get=p?e=>(d^1?k0:M0)(e,i,d^4?a:v.get):e=>e[n]),d>2&&(u.set=p?(e,t)=>j0(e,i,t,d^4?a:v.set):(e,t)=>e[n]=t)),s=(0,r[y])(d?d<4?p?a:v[h]:d>4?void 0:{get:v.get,set:v.set}:i,l),c._=1,d^4||s===void 0?w0(s)&&(d>4?g.unshift(s):d?p?a=s:v[h]=s:i=s):typeof s!=`object`||!s?g0(`Object expected`):(w0(o=s.get)&&(v.get=o),w0(o=s.set)&&(v.set=o),w0(o=s.init)&&g.unshift(o));return d||T0(e,i),v&&d0(i,n,v),p?d^4?a:v:i},O0=(e,t,n)=>t.has(e)||g0(`Cannot `+n),lxe=(e,t)=>Object(t)===t?e.has(t):g0(`Cannot use the "in" operator on this value`),k0=(e,t,n)=>(O0(e,t,`read from private field`),n?n.call(e):t.get(e)),A0=(e,t,n)=>t.has(e)?g0(`Cannot add the same private member more than once`):t instanceof WeakSet?t.add(e):t.set(e,n),j0=(e,t,n,r)=>(O0(e,t,`write to private field`),r?r.call(e,n):t.set(e,n),n),M0=(e,t,n)=>(O0(e,t,`access private method`),n),N0={role:`button`,roleDescription:`draggable`},uxe=`dnd-kit-description`,dxe=`dnd-kit-announcement`,fxe={draggable:`To pick up a draggable item, press the space bar. While dragging, use the arrow keys to move the item in a given direction. Press space again to drop the item in its new position, or press escape to cancel.`},pxe={dragstart({operation:{source:e}}){if(e)return`Picked up draggable item ${e.id}.`},dragover({operation:{source:e,target:t}}){if(e&&e.id!==t?.id)return t?`Draggable item ${e.id} was moved over droppable target ${t.id}.`:`Draggable item ${e.id} is no longer over a droppable target.`},dragend({operation:{source:e,target:t},canceled:n}){if(e)return n?`Dragging was cancelled. Draggable item ${e.id} was dropped.`:t?`Draggable item ${e.id} was dropped over droppable target ${t.id}`:`Draggable item ${e.id} was dropped.`}};function mxe(e){let t=e.tagName.toLowerCase();return[`input`,`select`,`textarea`,`a`,`button`].includes(t)}function hxe(e,t){let n=document.createElement(`div`);return n.id=e,n.style.setProperty(`display`,`none`),n.textContent=t,n}function gxe(e){let t=document.createElement(`div`);return t.id=e,t.setAttribute(`role`,`status`),t.setAttribute(`aria-live`,`polite`),t.setAttribute(`aria-atomic`,`true`),t.style.setProperty(`position`,`fixed`),t.style.setProperty(`width`,`1px`),t.style.setProperty(`height`,`1px`),t.style.setProperty(`margin`,`-1px`),t.style.setProperty(`border`,`0`),t.style.setProperty(`padding`,`0`),t.style.setProperty(`overflow`,`hidden`),t.style.setProperty(`clip`,`rect(0 0 0 0)`),t.style.setProperty(`clip-path`,`inset(100%)`),t.style.setProperty(`white-space`,`nowrap`),t}var _xe=[`dragover`,`dragmove`],vxe=class extends vQ{constructor(e,t){super(e);let{id:n,idPrefix:{description:r=uxe,announcement:i=dxe}={},announcements:a=pxe,screenReaderInstructions:o=fxe,debounce:s=500}=t??{},c=n?`${r}-${n}`:u0(r),l=n?`${i}-${n}`:u0(i),u,d,f,p,m=(e=p)=>{f&&e&&f?.nodeValue!==e&&(f.nodeValue=e)},h=()=>J1.schedule(m),g=yxe(h,s),_=Object.entries(a).map(([e,t])=>this.manager.monitor.addEventListener(e,(n,r)=>{let i=f;if(!i)return;let a=t?.(n,r);a&&i.nodeValue!==a&&(p=a,_xe.includes(e)?g():(h(),g.cancel()))})),v=()=>{let e=[];u?.isConnected||(u=hxe(c,o.draggable),e.push(u)),d?.isConnected||(d=gxe(l),f=document.createTextNode(``),d.appendChild(f),e.push(d)),e.length>0&&document.body.append(...e)},y=new Set;function b(){for(let e of y)e()}this.registerEffect(()=>{y.clear();for(let e of this.manager.registry.draggables.value){let t=e.handle??e.element;if(t){(!u||!d)&&y.add(v),(!mxe(t)||u1())&&!t.hasAttribute(`tabindex`)&&y.add(()=>t.setAttribute(`tabindex`,`0`)),!t.hasAttribute(`role`)&&t.tagName.toLowerCase()!==`button`&&y.add(()=>t.setAttribute(`role`,N0.role)),t.hasAttribute(`aria-roledescription`)||y.add(()=>t.setAttribute(`aria-roledescription`,N0.roleDescription)),t.hasAttribute(`aria-describedby`)||y.add(()=>t.setAttribute(`aria-describedby`,c));for(let n of[`aria-pressed`,`aria-grabbed`]){let r=String(e.isDragging);t.getAttribute(n)!==r&&y.add(()=>t.setAttribute(n,r))}let n=String(e.disabled);t.getAttribute(`aria-disabled`)!==n&&y.add(()=>t.setAttribute(`aria-disabled`,n))}}y.size>0&&J1.schedule(b)}),this.destroy=()=>{super.destroy(),u?.remove(),d?.remove(),_.forEach(e=>e())}}};function yxe(e,t){let n,r=()=>{clearTimeout(n),n=setTimeout(e,t)};return r.cancel=()=>clearTimeout(n),r}var P0=new Map,F0,I0,L0,R0,z0,B0,V0,H0,U0,W0,G0,K0,q0,J0=class extends (z0=yQ,R0=[JX],L0=[YX],I0=[YX],F0=[YX],z0){constructor(e,t){super(e,t),E0(V0,5,this),A0(this,U0),A0(this,B0,new Set),A0(this,H0,E0(V0,8,this,new Set)),E0(V0,11,this),this.registerEffect(M0(this,U0,W0))}register(e){return k0(this,B0).add(e),()=>{k0(this,B0).delete(e)}}addRoot(e){return fX(()=>{let t=new Set(this.additionalRoots);t.add(e),this.additionalRoots=t}),()=>{fX(()=>{let t=new Set(this.additionalRoots);t.delete(e),this.additionalRoots=t})}}get sourceRoot(){let{source:e}=this.manager.dragOperation;return p1(e?.element??null)}get targetRoot(){let{target:e}=this.manager.dragOperation;return p1(e?.element??null)}get roots(){let{status:e}=this.manager.dragOperation;if(e.initializing||e.initialized){let e=[this.sourceRoot,this.targetRoot].filter(e=>e!=null);return new Set([...e,...this.additionalRoots])}return new Set}};V0=S0(z0),B0=new WeakMap,H0=new WeakMap,U0=new WeakSet,W0=function(){let{roots:e}=this,t=[];for(let n of e)for(let e of k0(this,B0))t.push(M0(this,U0,G0).call(this,n,e));return()=>{for(let e of t)e()}},G0=function(e,t){let n=P0.get(e);n||(n=new Map,P0.set(e,n));let r=n.get(t);if(!r){let i=n1(e)?M0(this,U0,K0).call(this,e,n,t):M0(this,U0,q0).call(this,e,n,t);if(!i)return()=>{};r=i,n.set(t,r)}r.refCount++;let i=!1;return()=>{i||(i=!0,r.refCount--,r.refCount===0&&r.cleanup())}},K0=function(e,t,n){let r=e.createElement(`style`),{nonce:i}=this.options??{};i&&r.setAttribute(`nonce`,i),r.textContent=n,e.head.prepend(r);let a=new MutationObserver(t=>{for(let n of t)for(let t of Array.from(n.removedNodes))if(t===r){e.head.prepend(r);return}});return a.observe(e.head,{childList:!0}),{refCount:0,cleanup:()=>{a.disconnect(),r.remove(),t.delete(n),t.size===0&&P0.delete(e)}}},q0=function(e,t,n){!(`adoptedStyleSheets`in e&&Array.isArray(e.adoptedStyleSheets))&&process.env.NODE_ENV!==`production`&&console.error(`Cannot inject styles: This browser doesn't support adoptedStyleSheets`);let{CSSStyleSheet:r}=e.ownerDocument.defaultView??{};if(!r)return process.env.NODE_ENV!==`production`&&console.error(`Cannot inject styles: CSSStyleSheet constructor not available`),null;let i=new r;return i.replaceSync(n),e.adoptedStyleSheets.push(i),{refCount:0,cleanup:()=>{if(f1(e)&&e.host?.isConnected){let t=e.adoptedStyleSheets.indexOf(i);t!==-1&&e.adoptedStyleSheets.splice(t,1)}t.delete(n),t.size===0&&P0.delete(e)}}},D0(V0,4,`additionalRoots`,R0,J0,H0),D0(V0,2,`sourceRoot`,L0,J0),D0(V0,2,`targetRoot`,I0,J0),D0(V0,2,`roots`,F0,J0),T0(V0,J0),J0.configure=pQ(J0);var Y0=J0,bxe=class extends vQ{constructor(e,t){super(e,t),this.manager=e;let{cursor:n=`grabbing`}=t??{},r=e.registry.plugins.get(Y0)?.register(`* { cursor: ${n} !important; }`);if(r){let e=this.destroy.bind(this);this.destroy=()=>{r(),e()}}}},X0=`data-dnd-`,Z0=`${X0}dropping`,Q0=`--dnd-`,$0=`${X0}dragging`,e2=`${X0}placeholder`,xxe=[$0,e2,`popover`,`aria-pressed`,`aria-grabbing`],Sxe=[`view-transition-name`],Cxe=`
96
- :is(:root,:host) [${$0}] {
97
- position: fixed !important;
98
- pointer-events: none !important;
99
- touch-action: none;
100
- z-index: calc(infinity);
101
- will-change: translate;
102
- top: var(${Q0}top, 0px) !important;
103
- left: var(${Q0}left, 0px) !important;
104
- right: unset !important;
105
- bottom: unset !important;
106
- width: var(${Q0}width, auto);
107
- max-width: var(${Q0}width, auto);
108
- height: var(${Q0}height, auto);
109
- max-height: var(${Q0}height, auto);
110
- transform: var(${Q0}transform, none) !important;
111
- transition: var(${Q0}transition) !important;
112
- }
113
-
114
- :is(:root,:host) [${e2}] {
115
- transition: none;
116
- }
117
-
118
- :is(:root,:host) [${e2}='hidden'] {
119
- visibility: hidden;
120
- }
121
-
122
- [${$0}] * {
123
- pointer-events: none !important;
124
- }
125
-
126
- [${$0}]:not([${Z0}]) {
127
- translate: var(${Q0}translate) !important;
128
- }
129
-
130
- [${$0}][style*='${Q0}scale'] {
131
- scale: var(${Q0}scale) !important;
132
- transform-origin: var(${Q0}transform-origin) !important;
133
- }
134
-
135
- @layer dnd-kit {
136
- :where([${$0}][popover]) {
137
- overflow: visible;
138
- background: unset;
139
- border: unset;
140
- margin: unset;
141
- padding: unset;
142
- color: inherit;
143
-
144
- &:is(input, button) {
145
- border: revert;
146
- background: revert;
147
- }
148
- }
149
- }
150
- [${$0}]::backdrop, [${X0}overlay]:not([${$0}]) {
151
- display: none;
152
- visibility: hidden;
153
- }
154
- `.replace(/\n+/g,` `).replace(/\s+/g,` `).trim();function wxe(e,t=`hidden`){return fX(()=>{let{element:n,manager:r}=e;if(!n||!r)return;let i=Txe(n,r.registry.droppables),a=[],o=gbe(n),{remove:s}=o;return Exe(i,o,a),Dxe(o,t),o.remove=()=>{a.forEach(e=>e()),s.call(o)},o})}function Txe(e,t){let n=new Map;for(let r of t)if(r.element&&(e===r.element||e.contains(r.element))){let e=`${X0}${u0(`dom-id`)}`;r.element.setAttribute(e,``),n.set(r,e)}return n}function Exe(e,t,n){for(let[r,i]of e){if(!r.element)continue;let e=`[${i}]`,a=t.matches(e)?t:t.querySelector(e);if(r.element.removeAttribute(i),!a)continue;let o=r.element;r.proxy=a,a.removeAttribute(i),v1.set(o,a),n.push(()=>{v1.delete(o),r.proxy=void 0})}}function Dxe(e,t=`hidden`){e.setAttribute(`inert`,`true`),e.setAttribute(`tab-index`,`-1`),e.setAttribute(`aria-hidden`,`true`),e.setAttribute(e2,t)}function t2(e,t){return e===t||b1(e)===b1(t)}function n2(e){let{target:t}=e;`newState`in e&&e.newState===`closed`&&s0(t)&&t.hasAttribute(`popover`)&&requestAnimationFrame(()=>W1(t))}function r2(e){return e.tagName===`TR`}function Oxe(e,t,n){let r=new MutationObserver(r=>{let i=!1;for(let n of r){if(n.target!==e){i=!0;continue}if(n.type!==`attributes`)continue;let r=n.attributeName;if(r.startsWith(`aria-`)||xxe.includes(r))continue;let a=e.getAttribute(r);if(r===`style`){if(o0(e)&&o0(t)){let n=e.style;for(let e of Array.from(t.style))n.getPropertyValue(e)===``&&t.style.removeProperty(e);for(let e of Array.from(n)){if(Sxe.includes(e)||e.startsWith(Q0))continue;let r=n.getPropertyValue(e);t.style.setProperty(e,r)}}}else a===null?t.removeAttribute(r):t.setAttribute(r,a)}i&&n&&t.replaceChildren(...e.cloneNode(!0).childNodes)});return r.observe(e,{attributes:!0,subtree:!0,childList:!0}),r}function kxe(e,t,n){let r=new MutationObserver(r=>{for(let i of r)if(i.addedNodes.length!==0)for(let r of Array.from(i.addedNodes)){if(r.contains(e)&&e.nextElementSibling!==t){e.insertAdjacentElement(`afterend`,t),W1(n);return}if(r.contains(t)&&t.previousElementSibling!==e){t.insertAdjacentElement(`beforebegin`,e),W1(n);return}}e.isConnected&&t.isConnected&&e.nextElementSibling!==t&&(e.insertAdjacentElement(`afterend`,t),W1(n))});return r.observe(e.ownerDocument.body,{childList:!0,subtree:!0}),r}function Axe(e){return new ResizeObserver(()=>{var t;let n=new a0(e.placeholder,{frameTransform:e.frameTransform,ignoreTransforms:!0}),r=e.transformOrigin??{x:1,y:1},i=(e.width-n.width)*r.x+e.delta.x,a=(e.height-n.height)*r.y+e.delta.y,o=d1();if(e.styles.set({width:n.width-e.widthOffset,height:n.height-e.heightOffset,top:e.top+a+o.y,left:e.left+i+o.x},Q0),(t=e.getElementMutationObserver())==null||t.takeRecords(),r2(e.element)&&r2(e.placeholder)){let t=Array.from(e.element.cells),n=Array.from(e.placeholder.cells);e.getSavedCellWidths()||e.setSavedCellWidths(t.map(e=>e.style.width));for(let[e,r]of t.entries()){let t=n[e];r.style.width=`${t.getBoundingClientRect().width}px`}}let s=e.getTranslate()??{x:0,y:0},c=e.left+i+o.x+s.x,l=e.top+a+o.y+s.y,u=n.width-e.widthOffset,d=n.height-e.heightOffset,f=e.frameTransform;e.dragOperation.shape=new PZ(c*f.scaleX+f.x,l*f.scaleY+f.y,u*f.scaleX,d*f.scaleY)})}var jxe=250,Mxe=`ease`;function Nxe(e){var t;let{animation:n}=e;if(typeof n==`function`){let t=n({source:e.source,element:e.element,feedbackElement:e.feedbackElement,placeholder:e.placeholder,translate:e.translate,moved:e.moved});Promise.resolve(t).then(()=>{e.cleanup(),requestAnimationFrame(e.restoreFocus)});return}let{duration:r=jxe,easing:i=Mxe}=n??{};W1(e.feedbackElement);let[,a]=fbe(e.feedbackElement,e=>`translate`in e)??[];a?.pause();let o=e.placeholder??e.element,s={frameTransform:t2(e.feedbackElement,o)?null:void 0},c=new a0(e.feedbackElement,s),l=e0(X1(e.feedbackElement).translate)??e.translate,u=new a0(o,s),d=PZ.delta(c,u,e.alignment),f={x:l.x-d.x,y:l.y-d.y},p=Math.round(c.intrinsicHeight)===Math.round(u.intrinsicHeight)?{}:{minHeight:[`${c.intrinsicHeight}px`,`${u.intrinsicHeight}px`],maxHeight:[`${c.intrinsicHeight}px`,`${u.intrinsicHeight}px`]},m=Math.round(c.intrinsicWidth)===Math.round(u.intrinsicWidth)?{}:{minWidth:[`${c.intrinsicWidth}px`,`${u.intrinsicWidth}px`],maxWidth:[`${c.intrinsicWidth}px`,`${u.intrinsicWidth}px`]};e.styles.set({transition:e.transition},Q0),e.feedbackElement.setAttribute(Z0,``),(t=e.getElementMutationObserver())==null||t.takeRecords(),Gbe({element:e.feedbackElement,keyframes:y0(v0(v0({},p),m),{translate:[`${l.x}px ${l.y}px 0`,`${f.x}px ${f.y}px 0`]}),options:{duration:m1(t1(e.feedbackElement))?0:e.moved||e.feedbackElement!==e.element?r:0,easing:i}}).then(()=>{e.feedbackElement.removeAttribute(Z0),a?.finish(),e.cleanup(),requestAnimationFrame(e.restoreFocus)})}var i2,a2,o2,s2,c2,l2,u2,d2=class extends (a2=vQ,i2=[JX],a2){constructor(e,t){super(e,t),A0(this,c2),A0(this,s2,E0(o2,8,this)),E0(o2,11,this),this.state={initial:{},current:{}};let n=e.registry.plugins.get(Y0),r=n?.register(Cxe);if(r){let e=this.destroy.bind(this);this.destroy=()=>{r(),e()}}this.registerEffect(M0(this,c2,l2).bind(this,n)),this.registerEffect(M0(this,c2,u2))}};o2=S0(a2),s2=new WeakMap,c2=new WeakSet,l2=function(e){let{overlay:t}=this;if(!t||!e)return;let n=p1(t);if(n)return e.addRoot(n)},u2=function(){let{state:e,manager:t,options:n}=this,{dragOperation:r}=t,{position:i,source:a,status:o}=r;if(o.idle){e.current={},e.initial={};return}if(!a)return;let{element:s}=a,c=a.pluginConfig(d2),l=c?.feedback??n?.feedback??`default`,u=typeof l==`function`?l(a,t):l;if(!s||u===`none`||!o.initialized||o.initializing)return;let{initial:d}=e,f=this.overlay??s,p=$1(f),m=$1(s),h=!t2(s,f),g=new a0(s,{frameTransform:h?m:null,ignoreTransforms:!h}),_={x:m.scaleX/p.scaleX,y:m.scaleY/p.scaleY},{width:v,height:y,top:b,left:x}=g;h&&(v/=_.x,y/=_.y);let S=new Zbe(f),C=X1(s),{transition:w,translate:T,boxSizing:E,paddingBlockStart:D,paddingBlockEnd:O,paddingInlineStart:k,paddingInlineEnd:A,borderInlineStartWidth:j,borderInlineEndWidth:M,borderBlockStartWidth:N,borderBlockEndWidth:P}=C,F=w.split(`,`).filter(e=>!/^\s*(transform|translate|scale)\b/.test(e)).join(`,`),I=t0(C),L=C.transform,R=u===`clone`,z=E===`content-box`,B=z?parseInt(k)+parseInt(A)+parseInt(j)+parseInt(M):0,V=z?parseInt(D)+parseInt(O)+parseInt(N)+parseInt(P):0,H=u!==`move`&&!this.overlay?wxe(a,R?`clone`:`hidden`):null,U=fX(()=>c0(t.dragOperation.activatorEvent));if(!d.translate){if(this.overlay&&I)d.translate={x:I.x,y:I.y};else if(T!==`none`){let e=e0(T);e&&(d.translate=e)}}if(!d.transformOrigin){let e=fX(()=>i.current),t=x+(I?.x??0),n=b+(I?.y??0);d.transformOrigin={x:(e.x-t*p.scaleX-p.x)/(v*p.scaleX),y:(e.y-n*p.scaleY-p.y)/(y*p.scaleY)}}let{transformOrigin:W}=d,G=b*p.scaleY+p.y,K=x*p.scaleX+p.x;if(!d.coordinates&&(d.coordinates={x:K,y:G},_.x!==1||_.y!==1)){let{scaleX:e,scaleY:t}=m,{x:n,y:r}=W;d.coordinates.x+=(v*e-v)*n,d.coordinates.y+=(y*t-y)*r}d.dimensions||={width:v,height:y},d.frameTransform||=p;let q={x:d.coordinates.x-K,y:d.coordinates.y-G},J={width:(d.dimensions.width*d.frameTransform.scaleX-v*p.scaleX)*W.x,height:(d.dimensions.height*d.frameTransform.scaleY-y*p.scaleY)*W.y},ee={x:q.x/p.scaleX+J.width,y:q.y/p.scaleY+J.height},Y={left:x+ee.x,top:b+ee.y};f.setAttribute($0,`true`);let te=fX(()=>r.transform),ne=d.translate??{x:0,y:0},re=te.x*p.scaleX+ne.x,ie=te.y*p.scaleY+ne.y,ae=d1();S.set({width:v-B,height:y-V,top:Y.top+ae.y,left:Y.left+ae.x,translate:`${re}px ${ie}px 0`,transform:this.overlay?`none`:L,transition:F?`${F}, translate 0ms linear`:`translate 0ms linear`,scale:h?`${_.x} ${_.y}`:``,"transform-origin":`${W.x*100}% ${W.y*100}%`},Q0),H&&(s.insertAdjacentElement(`afterend`,H),n?.rootElement&&(typeof n.rootElement==`function`?n.rootElement(a):n.rootElement).appendChild(s)),U1(f)&&(f.hasAttribute(`popover`)||f.setAttribute(`popover`,`manual`),W1(f),f.addEventListener(`beforetoggle`,n2));let oe,se,ce,le=Axe({placeholder:H,element:s,feedbackElement:f,frameTransform:p,transformOrigin:W,width:v,height:y,top:b,left:x,widthOffset:B,heightOffset:V,delta:ee,styles:S,dragOperation:r,getTranslate:()=>e.current.translate,getElementMutationObserver:()=>oe,getSavedCellWidths:()=>ce,setSavedCellWidths:e=>{ce=e}}),ue=new a0(f);fX(()=>r.shape=ue);let de=t1(f),fe=e=>{this.manager.actions.stop({event:e})},pe=m1(de);U&&de.addEventListener(`resize`,fe),fX(()=>a.status)===`idle`&&requestAnimationFrame(()=>a.status=`dragging`),H&&(le.observe(H),oe=Oxe(s,H,R),se=kxe(s,H,f));let me=t.dragOperation.source?.id,he=()=>{if(!U||me==null)return;let e=t.registry.draggables.get(me),n=e?.handle??e?.element;r1(n)&&n.focus()},ge=()=>{oe?.disconnect(),se?.disconnect(),le.disconnect(),de.removeEventListener(`resize`,fe),U1(f)&&(f.removeEventListener(`beforetoggle`,n2),f.removeAttribute(`popover`)),f.removeAttribute($0),S.reset();let t=()=>{if(ce&&r2(s)){let e=Array.from(s.cells);for(let[t,n]of e.entries())n.style.width=ce[t]??``}a.status=`idle`;let t=e.current.translate!=null,n=r.status.dragging;H&&(!n&&t||H.parentElement!==f.parentElement)&&f.isConnected&&H.replaceWith(f),H?.remove()};f===this.overlay?setTimeout(t,0):t()},_e=n?.dropAnimation,ve=this,ye=ZX(()=>{let{transform:t,status:i}=r;if((t.x||t.y||e.current.translate)&&i.dragging){let i=d.translate??{x:0,y:0},a={x:t.x/p.scaleX+i.x,y:t.y/p.scaleY+i.y},o=e.current.translate,s=fX(()=>r.modifiers),c=fX(()=>r.shape?.current),l=n?.keyboardTransition,u=U&&!pe&&l!==null?`${l?.duration??250}ms ${l?.easing??`cubic-bezier(0.25, 1, 0.5, 1)`}`:`0ms linear`;if(S.set({transition:F?`${F}, translate ${u}`:`translate ${u}`,translate:`${a.x}px ${a.y}px 0`},Q0),oe?.takeRecords(),c&&c!==ue&&o&&!s.length){let e=NZ.delta(a,o);r.shape=PZ.from(c.boundingRectangle).translate(e.x*p.scaleX,e.y*p.scaleY)}else r.shape=new a0(f);e.current.translate=a}},function(){if(r.status.dropped){this.dispose(),a.status=`dropping`;let n=c?.dropAnimation===void 0?ve.dropAnimation===void 0?_e:ve.dropAnimation:c.dropAnimation,r=e.current.translate,i=r!=null;if(!r&&s!==f&&(r={x:0,y:0}),!r||n===null){ge();return}t.renderer.rendering.then(()=>{Nxe({source:a,element:s,feedbackElement:f,placeholder:H,translate:r,moved:i,transition:w,alignment:a.alignment,styles:S,animation:n??void 0,getElementMutationObserver:()=>oe,cleanup:ge,restoreFocus:he})})}});return()=>{ge(),ye()}},D0(o2,4,`overlay`,i2,d2,s2),T0(o2,d2),d2.configure=pQ(d2);var f2=d2,p2=!0,Pxe=!1,m2,h2,Fxe=[JX],Ixe=n0.Forward,g2,_2,v2;h2=(m2=[JX],n0.Reverse);var y2=class{constructor(){A0(this,_2,E0(g2,8,this,p2)),E0(g2,11,this),A0(this,v2,E0(g2,12,this,p2)),E0(g2,15,this)}isLocked(e){return e===n0.Idle?!1:e==null?this[n0.Forward]===p2&&this[n0.Reverse]===p2:this[e]===p2}unlock(e){e!==n0.Idle&&(this[e]=Pxe)}};g2=S0(null),_2=new WeakMap,v2=new WeakMap,D0(g2,4,Ixe,Fxe,y2,_2),D0(g2,4,h2,m2,y2,v2),T0(g2,y2);var Lxe=[n0.Forward,n0.Reverse],b2=class{constructor(){this.x=new y2,this.y=new y2}isLocked(){return this.x.isLocked()&&this.y.isLocked()}},Rxe=class extends vQ{constructor(e){super(e);let t=xX(new b2),n=null;this.signal=t,AX(()=>{let{status:r}=e.dragOperation;if(!r.initialized){n=null,t.value=new b2;return}let{delta:i}=e.dragOperation.position;if(n){let e={x:x2(i.x,n.x),y:x2(i.y,n.y)},r=t.peek();lX(()=>{for(let t of UZ)for(let n of Lxe)e[t]===n&&r[t].unlock(n);t.value=r})}n=i})}get current(){return this.signal.peek()}};function x2(e,t){return Math.sign(e-t)}var S2,C2,w2,T2,E2,D2,O2=class extends (C2=yQ,S2=[JX],C2){constructor(e){super(e),A0(this,T2,E0(w2,8,this,!1)),E0(w2,11,this),A0(this,E2),A0(this,D2,()=>{if(!k0(this,E2))return;let{element:e,by:t}=k0(this,E2);t.y&&(e.scrollTop+=t.y),t.x&&(e.scrollLeft+=t.x)}),this.scroll=(e,t)=>{if(this.disabled)return!1;let n=this.getScrollableElements();if(!n)return j0(this,E2,void 0),!1;let{position:r}=this.manager.dragOperation,i=r?.current;if(i){let{by:r}=e??{},a=r?{x:k2(r.x),y:k2(r.y)}:void 0,o=a?void 0:this.scrollIntentTracker.current;if(o?.isLocked())return!1;for(let e of n){let n=kbe(e,r);if(n.x||n.y){let{speed:n,direction:s}=Bbe(e,i,a,t?.acceleration,t?.threshold);if(o)for(let e of UZ)o[e].isLocked(s[e])&&(n[e]=0,s[e]=0);if(s.x||s.y){let{x:t,y:i}=r??s,a=t*n.x,o=i*n.y;if(a||o){let t=k0(this,E2)?.by;if(this.autoScrolling&&t&&(t.x&&!a||t.y&&!o))continue;return j0(this,E2,{element:e,by:{x:a,y:o}}),J1.schedule(k0(this,D2)),!0}}}}}return j0(this,E2,void 0),!1};let t=null,n=null,r=KX(()=>{let{position:n,source:r}=e.dragOperation;if(!n)return null;let i=_1(p1(r?.element),n.current);return i&&(t=i),i??t}),i=KX(()=>{let t=r.value,{documentElement:i}=a1(t);if(!t||t===i){let{target:t}=e.dragOperation,r=t?.element;if(r){let e=Q1(r,{excludeElement:!1});return n=e,e}}if(t){let e=Q1(t,{excludeElement:!1});return this.autoScrolling&&n&&e.size<n?.size?n:(n=e,e)}return n=null,null},qX);this.getScrollableElements=()=>i.value,this.scrollIntentTracker=new Rxe(e),this.destroy=e.monitor.addEventListener(`dragmove`,t=>{!this.disabled&&!t.defaultPrevented&&c0(e.dragOperation.activatorEvent)&&t.by&&this.scroll({by:t.by})&&t.preventDefault()})}};w2=S0(C2),T2=new WeakMap,E2=new WeakMap,D2=new WeakMap,D0(w2,4,`autoScrolling`,S2,O2,T2),T0(w2,O2);function k2(e){return e>0?n0.Forward:e<0?n0.Reverse:n0.Idle}var zxe=new class{constructor(e){this.scheduler=e,this.pending=!1,this.tasks=new Set,this.resolvers=new Set,this.flush=()=>{let{tasks:e,resolvers:t}=this;this.pending=!1,this.tasks=new Set,this.resolvers=new Set;for(let t of e)t();for(let e of t)e()}}schedule(e){return this.tasks.add(e),this.pending||(this.pending=!0,this.scheduler(this.flush)),new Promise(e=>this.resolvers.add(e))}}(e=>{typeof requestAnimationFrame==`function`?requestAnimationFrame(e):e()}),Bxe=10,A2=class extends vQ{constructor(e,t){super(e,t);let n=e.registry.plugins.get(O2);if(!n)throw Error(`AutoScroller plugin depends on Scroller plugin`);this.destroy=AX(()=>{if(this.disabled)return;let{position:t,status:r}=e.dragOperation;if(r.dragging){let e={acceleration:this.options?.acceleration,threshold:typeof this.options?.threshold==`number`?{x:this.options.threshold,y:this.options.threshold}:this.options?.threshold};if(n.scroll(void 0,e)){n.autoScrolling=!0;let t=setInterval(()=>zxe.schedule(()=>n.scroll(void 0,e)),Bxe);return()=>{clearInterval(t)}}n.autoScrolling=!1}})}};A2.configure=pQ(A2);var j2=A2,M2={capture:!0,passive:!0},N2,Vxe=class extends yQ{constructor(e){super(e),A0(this,N2),this.handleScroll=()=>{k0(this,N2)??j0(this,N2,setTimeout(()=>{this.manager.collisionObserver.forceUpdate(!1),j0(this,N2,void 0)},50))};let{dragOperation:t}=this.manager;this.destroy=AX(()=>{if(t.status.dragging){let e=t.source?.element?.ownerDocument??document;return e.addEventListener(`scroll`,this.handleScroll,M2),()=>{e.removeEventListener(`scroll`,this.handleScroll,M2)}}})}};N2=new WeakMap;var Hxe=`* { user-select: none !important; -webkit-user-select: none !important; }`,Uxe=class extends vQ{constructor(e){super(e),this.manager=e;let t=e.registry.plugins.get(Y0)?.register(Hxe);if(this.destroy=AX(()=>{let{dragOperation:e}=this.manager;if(e.status.initialized)return P2(),document.addEventListener(`selectionchange`,P2,{capture:!0}),()=>{document.removeEventListener(`selectionchange`,P2,{capture:!0})}}),t){let e=this.destroy.bind(this);this.destroy=()=>{t(),e()}}}};function P2(){var e;(e=document.getSelection())==null||e.removeAllRanges()}var F2=Object.freeze({offset:10,keyboardCodes:{start:[`Space`,`Enter`],cancel:[`Escape`],end:[`Space`,`Enter`,`Tab`],up:[`ArrowUp`],down:[`ArrowDown`],left:[`ArrowLeft`],right:[`ArrowRight`]},preventActivation(e,t){let n=t.handle??t.element;return e.target!==n}}),I2,L2=class extends x${constructor(e,t){super(e),this.manager=e,this.options=t,A0(this,I2,[]),this.listeners=new y1,this.handleSourceKeyDown=(e,t,n)=>{if(this.disabled||e.defaultPrevented||!s0(e.target)||t.disabled)return;let{keyboardCodes:r=F2.keyboardCodes,preventActivation:i=F2.preventActivation}=n??{};r.start.includes(e.code)&&this.manager.dragOperation.status.idle&&(i?.(e,t)||this.handleStart(e,t,n))}}bind(e,t=this.options){return AX(()=>{let n=e.handle??e.element,r=n=>{c0(n)&&this.handleSourceKeyDown(n,e,t)};if(n)return n.addEventListener(`keydown`,r),()=>{n.removeEventListener(`keydown`,r)}})}handleStart(e,t,n){let{element:r}=t;if(!r)throw Error(`Source draggable does not have an associated element`);e.preventDefault(),e.stopImmediatePropagation(),Vbe(r);let{center:i}=new a0(r);if(this.manager.actions.start({event:e,coordinates:{x:i.x,y:i.y},source:t}).signal.aborted)return this.cleanup();this.sideEffects();let a=a1(r),o=[this.listeners.bind(a,[{type:`keydown`,listener:e=>this.handleKeyDown(e,t,n),options:{capture:!0}}])];k0(this,I2).push(...o)}handleKeyDown(e,t,n){let{keyboardCodes:r=F2.keyboardCodes}=n??{};if(R2(e,[...r.end,...r.cancel])){e.preventDefault();let t=R2(e,r.cancel);this.handleEnd(e,t);return}R2(e,r.up)?this.handleMove(`up`,e):R2(e,r.down)&&this.handleMove(`down`,e),R2(e,r.left)?this.handleMove(`left`,e):R2(e,r.right)&&this.handleMove(`right`,e)}handleEnd(e,t){this.manager.actions.stop({event:e,canceled:t}),this.cleanup()}handleMove(e,t){let{shape:n}=this.manager.dragOperation,r=t.shiftKey?5:1,i={x:0,y:0},a=this.options?.offset??F2.offset;if(typeof a==`number`&&(a={x:a,y:a}),n){switch(e){case`up`:i={x:0,y:-a.y*r};break;case`down`:i={x:0,y:a.y*r};break;case`left`:i={x:-a.x*r,y:0};break;case`right`:i={x:a.x*r,y:0}}(i.x||i.y)&&(t.preventDefault(),this.manager.actions.move({event:t,by:i}))}}sideEffects(){let e=this.manager.registry.plugins.get(j2);e?.disabled===!1&&(e.disable(),k0(this,I2).push(()=>{e.enable()}))}cleanup(){k0(this,I2).forEach(e=>e()),j0(this,I2,[])}destroy(){this.cleanup(),this.listeners.clear()}};I2=new WeakMap,L2.configure=pQ(L2),L2.defaults=F2;var Wxe=L2;function R2(e,t){return t.includes(e.code)}var z2,Gxe=class extends C${constructor(){super(...arguments),A0(this,z2)}onEvent(e){switch(e.type){case`pointerdown`:j0(this,z2,s1(e));break;case`pointermove`:if(!k0(this,z2))return;let{x:t,y:n}=s1(e),r={x:t-k0(this,z2).x,y:n-k0(this,z2).y},{tolerance:i}=this.options;if(i&&VZ(r,i)){this.abort();return}VZ(r,this.options.value)&&this.activate(e);break;case`pointerup`:this.abort()}}abort(){j0(this,z2,void 0)}};z2=new WeakMap;var B2,V2,Kxe=class extends C${constructor(){super(...arguments),A0(this,B2),A0(this,V2)}onEvent(e){switch(e.type){case`pointerdown`:j0(this,V2,s1(e)),j0(this,B2,setTimeout(()=>this.activate(e),this.options.value));break;case`pointermove`:if(!k0(this,V2))return;let{x:t,y:n}=s1(e);VZ({x:t-k0(this,V2).x,y:n-k0(this,V2).y},this.options.tolerance)&&this.abort();break;case`pointerup`:this.abort()}}abort(){k0(this,B2)&&(clearTimeout(k0(this,B2)),j0(this,V2,void 0),j0(this,B2,void 0))}};B2=new WeakMap,V2=new WeakMap;var H2=class{};H2.Delay=Kxe,H2.Distance=Gxe;var U2=Object.freeze({activationConstraints(e,t){let{pointerType:n,target:r}=e;if(n!==`mouse`||!s0(r)||t.handle!==r&&!t.handle?.contains(r))return n===`touch`?[new H2.Delay({value:250,tolerance:5})]:$be(r)&&!e.defaultPrevented?[new H2.Delay({value:200,tolerance:0})]:[new H2.Delay({value:200,tolerance:10}),new H2.Distance({value:5})]},preventActivation(e,t){let{target:n}=e;if(n===t.element||n===t.handle||!s0(n)||t.handle?.contains(n))return!1;let r=vbe(n);return r!==t.element&&!!r}}),W2,G2=class extends x${constructor(e,t){super(e),this.manager=e,this.options=t,A0(this,W2,new Set),this.listeners=new y1,this.latest={event:void 0,coordinates:void 0},this.handleMove=()=>{let{event:e,coordinates:t}=this.latest;e&&t&&this.manager.actions.move({event:e,to:t})},this.handleCancel=this.handleCancel.bind(this),this.handlePointerUp=this.handlePointerUp.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this)}activationConstraints(e,t,n=this.options){let{activationConstraints:r=U2.activationConstraints}=n??{};return typeof r==`function`?r(e,t):r}bind(e,t=this.options){return AX(()=>{let n=new AbortController,{signal:r}=n,i=n=>{Qbe(n)&&this.handlePointerDown(n,e,t)},a=[e.handle??e.element];t?.activatorElements&&(a=Array.isArray(t.activatorElements)?t.activatorElements:t.activatorElements(e));for(let e of a)e&&(Xxe(e.ownerDocument.defaultView),e.addEventListener(`pointerdown`,i,{signal:r}));return()=>n.abort()})}handlePointerDown(e,t,n){if(this.disabled||!e.isPrimary||e.button!==0||!s0(e.target)||t.disabled||Jxe(e)||!this.manager.dragOperation.status.idle)return;let{preventActivation:r=U2.preventActivation}=n??{};if(r?.(e,t))return;let{target:i}=e,a=r1(i)&&i.draggable&&i.getAttribute(`draggable`)===`true`,o=$1(t.element),{x:s,y:c}=s1(e);this.initialCoordinates={x:s*o.scaleX+o.x,y:c*o.scaleY+o.y};let l=this.activationConstraints(e,t,n);e.sensor=this;let u=new sbe(l,e=>this.handleStart(t,e));u.signal.onabort=()=>this.handleCancel(e),u.onEvent(e),this.controller=u;let d=l1(),f=this.listeners.bind(d,[{type:`pointermove`,listener:e=>this.handlePointerMove(e,t)},{type:`pointerup`,listener:this.handlePointerUp,options:{capture:!0}},{type:`pointercancel`,listener:this.handleCancel},{type:`dragstart`,listener:a?this.handleCancel:K2,options:{capture:!0}}]);k0(this,W2).add(()=>{f(),this.initialCoordinates=void 0})}handlePointerMove(e,t){var n;if(this.controller?.activated===!1){(n=this.controller)==null||n.onEvent(e);return}if(this.manager.dragOperation.status.dragging){let n=s1(e),r=$1(t.element);n.x=n.x*r.scaleX+r.x,n.y=n.y*r.scaleY+r.y,e.preventDefault(),e.stopPropagation(),this.latest.event=e,this.latest.coordinates=n,J1.schedule(this.handleMove)}}handlePointerUp(e){let{status:t}=this.manager.dragOperation;if(!t.idle){e.preventDefault(),e.stopPropagation();let n=!t.initialized;this.manager.actions.stop({event:e,canceled:n})}this.cleanup()}handleKeyDown(e){e.key===`Escape`&&(e.preventDefault(),this.handleCancel(e))}handleStart(e,t){let{manager:n,initialCoordinates:r}=this;if(!r||!n.dragOperation.status.idle||t.defaultPrevented)return;if(n.actions.start({coordinates:r,event:t,source:e}).signal.aborted)return this.cleanup();t.preventDefault();let i=a1(t.target).body;try{i.setPointerCapture(t.pointerId)}catch{this.handleCancel(t);return}let a=s0(t.target)?[t.target,i]:i,o=this.listeners.bind(a,[{type:`touchmove`,listener:K2,options:{passive:!1}},{type:`click`,listener:K2},{type:`contextmenu`,listener:K2},{type:`keydown`,listener:this.handleKeyDown}]);k0(this,W2).add(o)}handleCancel(e){let{dragOperation:t}=this.manager;t.status.initialized&&this.manager.actions.stop({event:e,canceled:!0}),this.cleanup()}cleanup(){let{controller:e}=this;this.controller=void 0,e&&!e.signal.aborted&&e.abort(),this.latest={event:void 0,coordinates:void 0},k0(this,W2).forEach(e=>e()),k0(this,W2).clear()}destroy(){this.cleanup(),this.listeners.clear()}};W2=new WeakMap,G2.configure=pQ(G2),G2.defaults=U2;var qxe=G2;function Jxe(e){return`sensor`in e}function K2(e){e.preventDefault()}function Yxe(){}var q2=new WeakSet;function Xxe(e){e&&!q2.has(e)&&(e.addEventListener(`touchmove`,Yxe,{capture:!1,passive:!1}),q2.add(e))}var J2={modifiers:[],plugins:[vxe,j2,bxe,f2,Uxe],sensors:[qxe,Wxe]},Y2=class extends dbe{constructor(e={}){let t=W$(e.plugins,J2.plugins),n=W$(e.sensors,J2.sensors),r=W$(e.modifiers,J2.modifiers);super(y0(v0({},e),{plugins:[Vxe,O2,Y0,...t],sensors:n,modifiers:r}))}},X2,Z2,Q2,$2,e4,t4,n4=class extends (Q2=JQ,Z2=[JX],X2=[JX],Q2){constructor(e,t){var n=e,{element:r,effects:i=()=>[],handle:a}=n,o=x0(n,[`element`,`effects`,`handle`]);super(v0({effects:()=>[...i(),()=>{let{manager:e}=this;if(!e)return;let t=(this.sensors?.map(mQ)??[...e.sensors]).map(t=>{let n=t instanceof x$?t:e.registry.register(t.plugin),r=t instanceof x$?void 0:t.options;return n.bind(this,r)});return function(){t.forEach(e=>e())}}]},o),t),A0(this,e4,E0($2,8,this)),E0($2,11,this),A0(this,t4,E0($2,12,this)),E0($2,15,this),this.element=r,this.handle=a}};$2=S0(Q2),e4=new WeakMap,t4=new WeakMap,D0($2,4,`handle`,Z2,n4,e4),D0($2,4,`element`,X2,n4,t4),T0($2,n4);var r4,i4,a4,o4,s4,c4,l4,u4,d4,f4,p4=class extends (a4=c$,i4=[JX],r4=[JX],a4){constructor(e,t){var n=e,{element:r,effects:i=()=>[]}=n,a=x0(n,[`element`,`effects`]);let{collisionDetector:o=rxe}=a,s=e=>{let{manager:t,element:n}=this;if(!n||e===null){this.shape=void 0;return}if(!t)return;let r=new a0(n),i=fX(()=>this.shape);return r&&i?.equals(r)?i:(this.shape=r,r)},c=xX(!1);super(y0(v0({},a),{collisionDetector:o,effects:()=>[...i(),()=>{let{element:e,manager:t}=this;if(!t)return;let{dragOperation:n}=t,{source:r}=n;c.value=!!(r&&n.status.initialized&&e&&!this.disabled&&this.accepts(r))},()=>{let{element:e}=this;if(c.value&&e){let t=new Obe(e,s);return()=>{t.disconnect(),this.shape=void 0}}},()=>{if(this.manager?.dragOperation.status.initialized)return()=>{this.shape=void 0}}]}),t),A0(this,d4),A0(this,s4,E0(o4,8,this)),E0(o4,11,this),A0(this,f4,E0(o4,12,this)),E0(o4,15,this),this.element=r,this.refreshShape=()=>s()}set element(e){j0(this,d4,e,u4)}get element(){return this.proxy??k0(this,d4,l4)}};o4=S0(a4),s4=new WeakMap,d4=new WeakSet,f4=new WeakMap,c4=D0(o4,20,`#element`,i4,d4,s4),l4=c4.get,u4=c4.set,D0(o4,4,`proxy`,r4,p4,f4),T0(o4,p4);function Zxe(e){return typeof e==`object`&&!!e&&`current`in e}function m4(e){if(e!=null)return Zxe(e)?e.current??void 0:e}var h4=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0?_.useLayoutEffect:_.useEffect;function g4(){let e=(0,_.useState)(0)[1];return(0,_.useCallback)(()=>{e(e=>e+1)},[e])}function Qxe(e,t=!1){let n=(0,_.useRef)(e.peek()),r=(0,_.useRef)(!1),i=g4();return h4(()=>AX(()=>{let a=n.current,o=e.value;if(a!==o){if(n.current=o,!r.current)return;t?(0,Rn.flushSync)(i):i()}}),[e,t,i]),{get value(){return r.current=!0,e.peek()}}}function $xe(e,t=[],n=!1){let r=(0,_.useRef)(e);return r.current=e,Qxe((0,_.useMemo)(()=>KX(()=>r.current()),t),n)}function _4(e,t){let n=(0,_.useRef)(new Map),r=g4();return h4(()=>{if(!e){n.current.clear();return}return AX(()=>{let i=!1,a=!1;for(let r of n.current){let[o]=r,s=fX(()=>r[1]),c=e[o];s!==c&&(i=!0,n.current.set(o,c),a=t?.(o,s,c)??!1)}i&&(a?queueMicrotask(()=>(0,Rn.flushSync)(r)):r())})},[e]),(0,_.useMemo)(()=>e&&new Proxy(e,{get(e,t){let r=e[t];return n.current.set(t,r),r}}),[e])}function v4(e){let t=(0,_.useRef)(e);return h4(()=>{t.current=e},[e]),t}function y4(e,t,n=_.useEffect,r=Object.is){let i=(0,_.useRef)(e);n(()=>{let n=i.current;r(e,n)||(i.current=e,t(e,n))},[t,e])}function b4(e,t){let n=(0,_.useRef)(m4(e));h4(()=>{let r=m4(e);r!==n.current&&(n.current=r,t(r))})}var eSe=Object.defineProperty,tSe=Object.defineProperties,nSe=Object.getOwnPropertyDescriptors,x4=Object.getOwnPropertySymbols,S4=Object.prototype.hasOwnProperty,C4=Object.prototype.propertyIsEnumerable,w4=(e,t,n)=>t in e?eSe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,T4=(e,t)=>{for(var n in t||={})S4.call(t,n)&&w4(e,n,t[n]);if(x4)for(var n of x4(t))C4.call(t,n)&&w4(e,n,t[n]);return e},E4=(e,t)=>tSe(e,nSe(t)),rSe=(e,t)=>{var n={};for(var r in e)S4.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&x4)for(var r of x4(e))t.indexOf(r)<0&&C4.call(e,r)&&(n[r]=e[r]);return n},iSe=new Y2,D4=(0,_.createContext)(iSe),aSe=(0,_.memo)((0,_.forwardRef)(({children:e},t)=>{let[n,r]=(0,_.useState)(0),i=(0,_.useRef)(null),a=(0,_.useRef)(null),o=(0,_.useMemo)(()=>({renderer:{get rendering(){return i.current??Promise.resolve()}},trackRendering(e){i.current||=new Promise(e=>{a.current=e}),(0,_.startTransition)(()=>{e(),r(e=>e+1)})}}),[]);return h4(()=>{var e;(e=a.current)==null||e.call(a),i.current=null},[e,n]),(0,_.useImperativeHandle)(t,()=>o),null})),O4=[void 0,qX];function oSe(e){var t=e,{children:n,onCollision:r,onBeforeDragStart:i,onDragStart:a,onDragMove:o,onDragOver:s,onDragEnd:c}=t,l=rSe(t,[`children`,`onCollision`,`onBeforeDragStart`,`onDragStart`,`onDragMove`,`onDragOver`,`onDragEnd`]);let u=(0,_.useRef)(null),{plugins:d,modifiers:f,sensors:p}=l,m=W$(d,J2.plugins),h=W$(p,J2.sensors),g=W$(f,J2.modifiers),v=v4(i),y=v4(a),b=v4(s),x=v4(o),S=v4(c),C=v4(r),w=sSe(()=>l.manager??new Y2(l));return(0,_.useEffect)(()=>{if(!u.current)throw Error(`Renderer not found`);let{renderer:e,trackRendering:t}=u.current,{monitor:n}=w;w.renderer=e;let r=[n.addEventListener(`beforedragstart`,e=>{let n=v.current;n&&t(()=>n(e,w))}),n.addEventListener(`dragstart`,e=>y.current?.call(y,e,w)),n.addEventListener(`dragover`,e=>{let n=b.current;n&&t(()=>n(e,w))}),n.addEventListener(`dragmove`,e=>{let n=x.current;n&&t(()=>n(e,w))}),n.addEventListener(`dragend`,e=>{let n=S.current;n&&t(()=>n(e,w))}),n.addEventListener(`collision`,e=>C.current?.call(C,e,w))];return()=>r.forEach(e=>e())},[w]),y4(m,()=>w&&(w.plugins=m),...O4),y4(h,()=>w&&(w.sensors=h),...O4),y4(g,()=>w&&(w.modifiers=g),...O4),(0,L.jsxs)(D4.Provider,{value:w,children:[(0,L.jsx)(aSe,{ref:u,children:n}),n]})}function sSe(e){let t=(0,_.useRef)(null);return t.current||=e(),(0,_.useInsertionEffect)(()=>()=>t.current?.destroy(),[]),t.current}function k4(){return(0,_.useContext)(D4)}function A4(e){let t=k4()??void 0,[n]=(0,_.useState)(()=>e(t));return n.manager!==t&&(n.manager=t),h4(n.register,[t,n]),n}function cSe(e){let{disabled:t,data:n,element:r,handle:i,id:a,modifiers:o,sensors:s,plugins:c}=e,l=A4(t=>new n4(E4(T4({},e),{register:!1,handle:m4(i),element:m4(r)}),t)),u=_4(l,lSe);return y4(a,()=>l.id=a),b4(i,e=>l.handle=e),b4(r,e=>l.element=e),y4(n,()=>n&&(l.data=n)),y4(t,()=>l.disabled=t===!0),y4(s,()=>l.sensors=s,void 0,qX),y4(o,()=>l.modifiers=o,void 0,qX),y4(c,()=>l.plugins=c,void 0,qX),y4(e.alignment,()=>l.alignment=e.alignment),{draggable:u,get isDragging(){return u.isDragging},get isDropping(){return u.isDropping},get isDragSource(){return u.isDragSource},handleRef:(0,_.useCallback)(e=>{l.handle=e??void 0},[l]),ref:(0,_.useCallback)(e=>{(e||!l.element?.isConnected||l.manager?.dragOperation.status.idle)&&(l.element=e??void 0)},[l])}}function lSe(e,t,n){return!(e!==`isDragSource`||n||!t)}function uSe({children:e,className:t,dropAnimation:n,style:r,tag:i,disabled:a}){let o=(0,_.useRef)(null),s=k4(),c=$xe(()=>s?.dragOperation.source,[s]).value??null,l=typeof a==`function`?a(c):a;(0,_.useEffect)(()=>{if(!o.current||!s||l)return;let e=s.plugins.find(e=>e instanceof f2);if(e)return e.overlay=o.current,()=>{e.overlay=void 0}},[s,l]),(0,_.useEffect)(()=>{if(!s)return;let e=s.plugins.find(e=>e instanceof f2);if(e)return e.dropAnimation=n,()=>{e.dropAnimation=void 0}},[s,n]);let u=(0,_.useMemo)(()=>{if(!s)return null;let e=new Proxy(s.registry,{get(e,t){return t===`register`||t===`unregister`?dSe:e[t]}});return new Proxy(s,{get(t,n){return n===`registry`?e:t[n]}})},[s]);return(0,L.jsx)(D4.Provider,{value:u,children:(0,_.createElement)(i||`div`,{ref:o,className:t,style:r,"data-dnd-overlay":!0},d())});function d(){return!c||l?null:typeof e==`function`?(0,L.jsx)(fSe,{source:c,children:e}):e}}function dSe(){return()=>{}}function fSe({children:e,source:t}){return e(_4(t))}var pSe=Object.create,j4=Object.defineProperty,mSe=Object.getOwnPropertyDescriptor,M4=(e,t)=>(t=Symbol[e])?t:Symbol.for(`Symbol.`+e),N4=e=>{throw TypeError(e)},hSe=(e,t,n)=>t in e?j4(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,gSe=e=>[,,,pSe(e?.[M4(`metadata`)]??null)],P4=[`class`,`method`,`getter`,`setter`,`accessor`,`field`,`value`,`get`,`set`],F4=e=>e!==void 0&&typeof e!=`function`?N4(`Function expected`):e,_Se=(e,t,n,r,i)=>({kind:P4[e],name:t,metadata:r,addInitializer:e=>n._?N4(`Already initialized`):i.push(F4(e||null))}),vSe=(e,t)=>hSe(t,M4(`metadata`),e[3]),ySe=(e,t,n,r)=>{for(var i=0,a=e[t>>1],o=a&&a.length;i<o;i++)a[i].call(n);return r},I4=(e,t,n,r,i,a)=>{for(var o,s,c,l,u=t&7,d=!1,f=!1,p=2,m=P4[u+5],h=e[p]||(e[p]=[]),g=(i=i.prototype,mSe(i,n)),_=r.length-1;_>=0;_--)c=_Se(u,n,s={},e[3],h),c.static=d,c.private=f,l=c.access={has:e=>n in e},l.get=e=>e[n],o=(0,r[_])(g[m],c),s._=1,F4(o)&&(g[m]=o);return g&&j4(i,n,g),i},L4=(e,t,n)=>t.has(e)||N4(`Cannot `+n),bSe=(e,t,n)=>(L4(e,t,`read from private field`),t.get(e)),xSe=(e,t,n)=>t.has(e)?N4(`Cannot add the same private member more than once`):t instanceof WeakSet?t.add(e):t.set(e,n),SSe=(e,t,n,r)=>(L4(e,t,`write to private field`),t.set(e,n),n),R4=class e{constructor(e,t){this.x=e,this.y=t}static delta(t,n){return new e(t.x-n.x,t.y-n.y)}static distance(e,t){return Math.hypot(e.x-t.x,e.y-t.y)}static equals(e,t){return e.x===t.x&&e.y===t.y}static from({x:t,y:n}){return new e(t,n)}},z4,B4,V4,H4,U4,W4=class extends (V4=_Z,B4=[YX],z4=[YX],V4){constructor(e){let t=R4.from(e);super(t,(e,t)=>R4.equals(e,t)),ySe(U4,5,this),xSe(this,H4,0),this.velocity={x:0,y:0}}get delta(){return R4.delta(this.current,this.initial)}get direction(){let{current:e,previous:t}=this;if(!t)return null;let n={x:e.x-t.x,y:e.y-t.y};return!n.x&&!n.y?null:Math.abs(n.x)>Math.abs(n.y)?n.x>0?`right`:`left`:n.y>0?`down`:`up`}get current(){return super.current}set current(e){let{current:t}=this,n=R4.from(e),r={x:n.x-t.x,y:n.y-t.y},i=Date.now(),a=i-bSe(this,H4),o=e=>Math.round(e/a*100);lX(()=>{SSe(this,H4,i),this.velocity={x:o(r.x),y:o(r.y)},super.current=n})}reset(e=this.defaultValue){super.reset(R4.from(e)),this.velocity={x:0,y:0}}};U4=gSe(V4),H4=new WeakMap,I4(U4,2,`delta`,B4,W4),I4(U4,2,`direction`,z4,W4),vSe(U4,W4);var G4=(e=>(e.Horizontal=`x`,e.Vertical=`y`,e))(G4||{});Object.values(G4);var CSe=({dragOperation:e,droppable:t})=>{let n=e.position.current;if(!n)return null;let{id:r}=t;return t.shape&&t.shape.containsPoint(n)?{id:r,value:1/R4.distance(t.shape.center,n),type:d$.PointerIntersection,priority:u$.High}:null},wSe=({dragOperation:e,droppable:t})=>{let{shape:n}=e;if(!t.shape||!n?.current)return null;let r=n.current.intersectionArea(t.shape);if(r){let{position:i}=e,a=R4.distance(t.shape.center,i.current),o=r/(n.current.area+t.shape.area-r)/a;return{id:t.id,value:o,type:d$.ShapeIntersection,priority:u$.Normal}}return null},TSe=e=>CSe(e)??wSe(e);function K4(e){let{collisionDetector:t,data:n,disabled:r,element:i,id:a,accept:o,type:s}=e,c=A4(t=>new p4(E4(T4({},e),{register:!1,element:m4(i)}),t)),l=_4(c);return y4(a,()=>c.id=a),b4(i,e=>c.element=e),y4(o,()=>c.accept=o,void 0,qX),y4(t,()=>c.collisionDetector=t??TSe),y4(n,()=>n&&(c.data=n)),y4(r,()=>c.disabled=r===!0),y4(s,()=>c.type=s),{droppable:l,get isDropTarget(){return l.isDropTarget},ref:(0,_.useCallback)(e=>{(e||!c.element?.isConnected||c.manager?.dragOperation.status.idle)&&(c.element=e??void 0)},[c])}}var q4=_.createContext(null),J4=({onDNDStart:e,onDNDEnd:t,className:n,children:r,ref:i,...a})=>{let o=p7(),[s,c]=_.useState(null);return(0,L.jsx)(oSe,{onDragStart:({operation:{source:t}})=>{c(t?.data.nodeId??null),e&&e({nodeId:t?.data.nodeId??``})},onDragEnd:({operation:{source:e,target:n}})=>{if(c(null),t){let r=n?.data.folderId??n?.data.nodeId??null;t({sourceNodeId:e?.data.nodeId??``,targetNodeId:r})}},plugins:e=>[...e,f2.configure({dropAnimation:null})],children:(0,L.jsx)(q4.Provider,{value:{className:n,children:r,ref:i,draggingNodeId:s,...a},children:(0,L.jsxs)(`div`,{className:Q(`flex flex-col justify-between`,n),ref:i,...a,children:[r,(0,L.jsx)(uSe,{children:e=>(0,L.jsxs)(`div`,{className:Q(`relative rounded-md border border-neutral-border bg-neutral-container px-xs py-3xs opacity-80 shadow-md transition-opacity`),children:[o.getRow(String(e.id)).renderValue(`name`)??e.id,(0,L.jsx)(Zb,{className:`absolute -top-xs -right-xs`,size:`iconSmall`,tone:`neutral`,children:o.getRow(String(e.id))?.subRows.length+1})]})})]})})})},Y4=()=>{let e=_.useContext(q4);if(!e)throw Error(`useLayerTree must be used within a LayerTreeProvider`);return e},X4=({rowId:e,className:t,children:n,ref:r,...i})=>{let a=p7();return(0,L.jsx)(a.Subscribe,{selector:e=>({expanded:e.expanded,rowSelection:e.rowSelection,rowVisibility:e.rowVisibility}),children:()=>{let o=a.getRowModel().rows.find(t=>t.id===e),s=(o?.depth??0)*24,c=o?.getLeafRows()??[],l=c.length>0?c.some(e=>e.getIsVisible()):o?.getIsVisible()??!0;return(0,L.jsxs)(`div`,{className:Q(`flex w-full items-center gap-3xs`,t),ref:r,...i,children:[n,o?.getVisibleCells().map((e,t)=>{let n=t===0,r=e.column.columnDef.meta?.fill??e.column.id===`name`;return(0,L.jsx)(a.AppCell,{cell:e,children:e=>(0,L.jsx)(`div`,{style:{marginLeft:n?s:void 0,opacity:l?1:.5},className:Q(`flex items-center`,r?`min-w-0 grow gap-3xs`:`w-fit shrink-0`),children:(0,L.jsx)(a.FlexRender,{cell:e})})},e.id)})]})}})},Z4=({className:e,children:t,...n})=>{let r=p7(),{isDropTarget:i,ref:a}=K4({id:`root-dropzone`,data:{folderId:`root`,nodeId:`root`}});return(0,L.jsx)(r.Subscribe,{selector:e=>e,children:()=>(0,L.jsxs)(`div`,{className:Q(`flex min-h-0 w-full grow flex-col`,e),...n,children:[t,(0,L.jsx)(`ul`,{className:`flex min-h-0 w-full flex-col gap-xs overflow-y-auto`,children:r.getRowModel().rows.map(e=>(0,L.jsx)(`li`,{className:`contents`,children:(0,L.jsx)(X4,{rowId:e.id})},e.id))}),(0,L.jsx)(`div`,{ref:a,className:Q(`grow`,i&&`rounded-lg bg-success-container ring-1 ring-success-default ring-inset`)})]})})},Q4=({className:e,ref:t,...n})=>{let r=p7(),i=()=>{r.getIsSomeRowsExpanded()?r.toggleAllRowsExpanded(!1):r.toggleAllRowsExpanded(!0)};return(0,L.jsx)(r.Subscribe,{selector:e=>e.expanded,children:()=>(0,L.jsx)(Gb,{"aria-label":r.getIsSomeRowsExpanded()?`Collapse all layers`:`Expand all layers`,size:`iconMedium`,tone:`neutral`,variant:`ghost`,onClick:i,className:Q(``,e),ref:t,...n,children:r.getIsSomeRowsExpanded()?(0,L.jsx)(Ti,{weight:`bold`}):(0,L.jsx)(Ei,{weight:`bold`})})})},$4=({className:e,children:t,ref:n,...r})=>(0,L.jsx)(`div`,{className:Q(`flex flex-col gap-3xs`,e),ref:n,...r,children:t}),e3=({className:e,children:t,ref:n,...r})=>{let i=m7(),a=p7(),o=i.getValue(),s=i.row,c=s.getCanExpand()&&s.getLeafRows().length>0;return(0,L.jsx)(a.Subscribe,{selector:e=>e.expanded,children:()=>{let i=s.getIsExpanded();return(0,L.jsxs)(`div`,{className:Q(`flex w-fit shrink-0 items-center [&>svg]:size-sm`,e),ref:n,...r,children:[t,c?i?(0,L.jsx)(Ti,{}):(0,L.jsx)(wi,{weight:c&&`fill`}):(0,_.createElement)(o,{weight:`bold`})]})}})},t3=({className:e,children:t,ref:n,...r})=>{let i=p7(),a=i.getCoreRowModel().flatRows,o=e=>{let t=!e;for(let e of a)e.toggleLocked(t)};return(0,L.jsx)(i.Subscribe,{selector:e=>e.rowLocked,children:()=>{let i=a.some(e=>e.getIsLocked());return(0,L.jsxs)(Gb,{"aria-label":i?`Unlock all layers`:`Lock all layers`,size:`iconSmall`,tone:`neutral`,variant:`ghost`,onClick:()=>o(i),className:Q(``,e),ref:n,...r,children:[t,i?(0,L.jsx)(Ai,{weight:`fill`}):(0,L.jsx)(ji,{weight:`bold`})]})}})},n3=({className:e,children:t,ref:n,...r})=>{let i=m7(),a=p7(),o=i.row,s=o.getLeafRows(),c=s.length>0?s:[o],l=e=>{let t=!e;for(let e of c)e.toggleLocked(t)};return(0,L.jsx)(a.Subscribe,{selector:e=>e.rowLocked,children:()=>{let i=c.every(e=>e.getIsLocked());return(0,L.jsxs)(Gb,{"aria-label":i?`Unlock layer`:`Lock layer`,size:`iconSmall`,tone:`neutral`,variant:`ghost`,onClick:()=>l(i),className:Q(``,e),ref:n,...r,children:[t,i?(0,L.jsx)(Ai,{weight:`fill`}):(0,L.jsx)(ji,{weight:`bold`})]})}})},r3=({icon:e,className:t,children:n,ref:r,...i})=>{let a=m7().row,o=a.getCanExpand()&&a.getLeafRows().length>0;return(0,L.jsxs)(`div`,{className:Q(``,t),ref:r,...i,children:[n,o?a.getIsExpanded()?(0,L.jsx)(Ti,{}):(0,L.jsx)(wi,{weight:`fill`}):(0,L.jsx)(e,{weight:`bold`})]})},i3=({placeholder:e,className:t,children:n,ref:r,...i})=>{let a=p7();return(0,L.jsx)(a.Subscribe,{selector:e=>e.globalFilter,children:o=>(0,L.jsxs)(uV,{className:Q(``,t),ref:r,...i,children:[(0,L.jsx)(fV,{children:(0,L.jsx)(Mi,{weight:`bold`})}),(0,L.jsx)(pV,{placeholder:e,onChange:e=>a.setGlobalFilter(e.target.value),value:o??``}),n]})})},a3=({children:e,...t})=>(0,L.jsx)(Ep,{...t,children:e}),o3=({className:e,children:t,ref:n,...r})=>(0,L.jsxs)(Zf,{className:Q(`relative z-0 grid h-lg cursor-default grid-cols-[1fr_2rem] items-center px-xs style-text-default-0 transition-colors outline-none select-none before:absolute before:inset-x-3xs before:inset-y-[0px] before:z-[-1] before:rounded-md before:bg-transparent before:transition-colors before:content-[""] hover:cursor-pointer data-highlighted:text-neutral-on-container data-highlighted:before:bg-neutral-container-high`,e),ref:n,...r,children:[(0,L.jsx)(`span`,{className:`col-start-1 flex items-center gap-2xs`,children:t}),(0,L.jsx)(Qf,{className:`col-start-2 flex items-center justify-center place-self-end self-center`,children:(0,L.jsx)(hi,{className:`size-sm`,weight:`bold`})})]}),ESe=({className:e,children:t,ref:n,...r})=>(0,L.jsx)(tp,{className:Q(``,e),ref:n,...r,children:t}),DSe=({className:e,children:t,ref:n,...r})=>(0,L.jsx)(np,{className:Q(`cursor-default px-2xs py-3xs style-text-default--2 text-on-surface-variant select-none`,e),ref:n,...r,children:t}),OSe=nr(`relative z-0 flex h-lg cursor-default items-center px-xs style-text-default-0 transition-colors duration-100 outline-none select-none before:absolute before:inset-x-3xs before:inset-y-[0px] before:z-[-1] before:rounded-md before:bg-transparent before:transition-colors before:duration-100 before:content-[""] hover:cursor-pointer`,{variants:{tone:{brand:`text-brand-default data-highlighted:text-brand-on-container data-highlighted:before:bg-brand-container`,accent:`text-accent-default data-highlighted:text-accent-on-container data-highlighted:before:bg-accent-container`,neutral:`text-on-surface data-highlighted:text-neutral-on-container data-highlighted:before:bg-neutral-container-high`,error:`text-error-default data-highlighted:text-error-on-container data-highlighted:before:bg-error-container`,info:`text-info-default data-highlighted:text-info-on-container data-highlighted:before:bg-info-container`,success:`text-success-default data-highlighted:text-success-on-container data-highlighted:before:bg-success-container`,warning:`text-warning-default data-highlighted:text-warning-on-container data-highlighted:before:bg-warning-container`}},defaultVariants:{tone:`neutral`}}),kSe=nr(`relative z-0 grid h-lg cursor-default grid-cols-[1fr_2rem] items-center px-xs style-text-default-0 transition-colors duration-100 outline-none select-none before:absolute before:inset-x-3xs before:inset-y-[0px] before:z-[-1] before:rounded-md before:transition-colors before:duration-100 before:content-[""] hover:cursor-pointer`,{variants:{tone:{brand:`text-brand-default data-highlighted:text-brand-on-container data-highlighted:before:bg-brand-container data-popup-open:text-brand-on-container data-popup-open:before:bg-brand-container data-highlighted:data-popup-open:before:bg-brand-container`,accent:`text-accent-default data-highlighted:text-accent-on-container data-highlighted:before:bg-accent-container data-popup-open:text-accent-on-container data-popup-open:before:bg-accent-container data-highlighted:data-popup-open:before:bg-accent-container`,neutral:`text-on-surface data-highlighted:text-neutral-on-container data-highlighted:before:bg-neutral-container-high data-popup-open:text-neutral-on-container data-popup-open:before:bg-neutral-container-high data-highlighted:data-popup-open:before:bg-neutral-container-high`,error:`text-error-default data-highlighted:text-error-on-container data-highlighted:before:bg-error-container data-popup-open:text-error-on-container data-popup-open:before:bg-error-container data-highlighted:data-popup-open:before:bg-error-container`,info:`text-info-default data-highlighted:text-info-on-container data-highlighted:before:bg-info-container data-popup-open:text-info-on-container data-popup-open:before:bg-info-container data-highlighted:data-popup-open:before:bg-info-container`,success:`text-success-default data-highlighted:text-success-on-container data-highlighted:before:bg-success-container data-popup-open:text-success-on-container data-popup-open:before:bg-success-container data-highlighted:data-popup-open:before:bg-success-container`,warning:`text-warning-default data-highlighted:text-warning-on-container data-highlighted:before:bg-warning-container data-popup-open:text-warning-on-container data-popup-open:before:bg-warning-container data-highlighted:data-popup-open:before:bg-warning-container`}},defaultVariants:{tone:`neutral`}}),s3=({tone:e,className:t,children:n,ref:r,...i})=>(0,L.jsx)(rp,{className:Q(OSe({tone:e}),t),nativeButton:!0,ref:r,render:e=>(0,L.jsx)(`button`,{type:`button`,...e,className:Q(`w-full gap-2xs [&>svg]:size-sm`,e.className),children:n}),...i}),c3=({className:e,children:t,ref:n,...r})=>(0,L.jsx)(lp,{children:(0,L.jsx)(up,{className:Q(`outline-none`,e),ref:n,sideOffset:8,...r,children:(0,L.jsx)(op,{className:`z-99 min-w-[12rem] origin-(--transform-origin) translate-x-[-calc(var(--spacing-xl)/2)] rounded-lg bg-surface-2 px-3xs py-2xs shadow-md transition-[transform,scale,opacity] data-ending-style:scale-90 data-ending-style:opacity-0 data-starting-style:scale-90 data-starting-style:opacity-0`,children:t})})}),l3=({className:e,children:t,ref:n,...r})=>(0,L.jsx)(pp,{className:Q(``,e),ref:n,...r,children:t}),u3=({className:e,children:t,ref:n,...r})=>(0,L.jsxs)(gp,{className:Q(`relative z-0 grid h-lg cursor-default grid-cols-[1fr_2rem] items-center px-xs style-text-default-0 transition-colors outline-none select-none before:absolute before:inset-x-3xs before:inset-y-[0px] before:z-[-1] before:rounded-md before:bg-transparent before:transition-colors before:content-[""] hover:cursor-pointer data-highlighted:text-neutral-on-container data-highlighted:before:bg-neutral-container-high`,e),ref:n,...r,children:[(0,L.jsx)(`span`,{className:`col-start-1 min-w-3xl`,children:t}),(0,L.jsx)(_p,{className:`col-start-2 flex items-center justify-center place-self-end self-center`,children:(0,L.jsx)(hi,{className:`size-sm`,weight:`bold`})})]}),ASe=({className:e,ref:t,...n})=>(0,L.jsx)(tm,{className:Q(`mx-2xs my-3xs h-px bg-border-strong`,e),ref:t,...n}),jSe=({className:e,children:t,ref:n,...r})=>(0,L.jsx)(`div`,{className:Q(`ml-auto inline-flex items-center gap-3xs`,e),ref:n,...r,children:t}),d3=({children:e,...t})=>(0,L.jsx)(Op,{...t,children:e}),f3=({tone:e,className:t,children:n,ref:r,...i})=>(0,L.jsxs)(im,{className:Q(kSe({tone:e}),t),ref:r,...i,children:[(0,L.jsx)(`div`,{className:`col-start-1 flex min-w-3xl items-center gap-2xs pr-2xl [&>svg]:size-sm`,children:n}),(0,L.jsx)(fi,{className:`col-start-2 size-xs place-self-end self-center`,weight:`bold`})]}),p3=({className:e,children:t,ref:n,...r})=>(0,L.jsx)(Pp,{className:Q(`data-popup-open:pointer-events-none`,e),ref:n,...r,render:t}),m3=({className:e,children:t,ref:n,...r})=>{let i=p7(),a=i.options.meta?.translations?.buttonLabels??{},o=a.ascending??`Ascending`,s=a.descending??`Descending`,c=(e,t)=>{let n=i.getColumn(e);if(n?.getIsSorted()===t){n?.clearSorting();return}n?.toggleSorting(t===`desc`,n.getCanMultiSort())};return(0,L.jsxs)(a3,{children:[(0,L.jsx)(p3,{className:Q(`shrink-0`,e),ref:n,...r,children:(0,L.jsx)(Gb,{"aria-label":`Sort layers`,variant:`ghost`,size:`iconMedium`,tone:`neutral`,children:(0,L.jsx)(si,{weight:`bold`})})}),(0,L.jsx)(c3,{align:`end`,children:(0,L.jsx)(i.Subscribe,{selector:e=>e.sorting,children:()=>i.getAllColumns().filter(e=>e.getCanSort()).map(e=>(0,L.jsxs)(d3,{children:[(0,L.jsx)(f3,{children:e.columnDef.header??e.id}),(0,L.jsxs)(c3,{children:[t,(0,L.jsxs)(o3,{checked:e.getIsSorted()===`asc`,onClick:()=>c(e.id,`asc`),children:[(0,L.jsx)(Li,{weight:`bold`}),o]}),(0,L.jsxs)(o3,{checked:e.getIsSorted()===`desc`,onClick:()=>c(e.id,`desc`),children:[(0,L.jsx)(Ii,{weight:`bold`}),s]})]})]},e.id))})})]})};function h3(e){let t=Object.values(e).filter(e=>typeof e==`number`);return Object.entries(e).filter(([e,n])=>t.indexOf(+e)===-1).map(([e,t])=>t)}function g3(e,t=`|`){return e.map(e=>P3(e)).join(t)}function _3(e,t){return typeof t==`bigint`?t.toString():t}var MSe=class{constructor(e){this._getter=e,this._value=void 0}get value(){let e=this._getter;return e!==void 0&&(this._value=e(),this._getter=void 0),this._value}};function v3(e){return new MSe(e)}function NSe(e){return e==null}function y3(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function b3(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function x3(e){let t=Object.getOwnPropertyDescriptor(e,`shape`);return t?.get?t.get.raw:t?.value}function S3(e){return x3(e._zod.def)??e._zod.def.shape}function C3(e,t,n){Object.defineProperty(e,t,{get(){let e=n();return b3(this,t,e),e},enumerable:!0,configurable:!0})}function w3(e,t,n){t in e?b3(e,t,n):e[t]=n}function T3(e,t,n,r){let i=S3(t);for(let a of n){let n=Object.getOwnPropertyDescriptor(i,a);n.enumerable&&(n.get?C3(e,a,()=>{let e=t._zod.def.shape[a];return r?r(e,a):e}):w3(e,a,r?r(n.value,a):n.value))}}function PSe(e,t){for(let n of Reflect.ownKeys(t)){let r=Object.getOwnPropertyDescriptor(t,n);r.enumerable&&(r.get?C3(e,n,()=>t[n]):w3(e,n,r.value))}}function E3(...e){let t={};for(let n of e){let e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}function FSe(e){return JSON.stringify(e)}function ISe(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,``).replace(/[\s_-]+/g,`-`).replace(/^-+|-+$/g,``)}var D3=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function O3(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var LSe=v3(()=>{if(r6.jitless||typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}});function k3(e){if(O3(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return O3(n)!==!1&&Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)!==!1}function A3(e){return k3(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}var RSe=new Set([`string`,`number`,`symbol`]);function j3(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function M3(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function N3(e){let t=e;if(!t)return{};if(typeof t==`string`)return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error==`string`?{...t,error:()=>t.error}:t}function P3(e){return typeof e==`bigint`?e.toString()+`n`:typeof e==`string`?`"${e}"`:`${e}`}function zSe(e){return Object.keys(e).filter(t=>e[t]._zod.optin!==void 0&&e[t]._zod.optout===`optional`)}var BSe={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},VSe={int64:[BigInt(`-9223372036854775808`),BigInt(`9223372036854775807`)],uint64:[BigInt(0),BigInt(`18446744073709551615`)]};function HSe(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.pick() cannot be used on object schemas containing refinements`);let i={};return T3(i,e,F3(e,t)),M3(e,E3(n,{shape:i,checks:[]}))}function F3(e,t){let n=S3(e),r=[];for(let e of Reflect.ownKeys(t)){if(!Object.getOwnPropertyDescriptor(n,e)?.enumerable)throw Error(`Unrecognized key: "${String(e)}"`);t[e]&&r.push(e)}return r}function USe(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.omit() cannot be used on object schemas containing refinements`);let i=new Set(F3(e,t)),a={};return T3(a,e,Reflect.ownKeys(S3(e)).filter(e=>!i.has(e))),M3(e,E3(n,{shape:a,checks:[]}))}function WSe(e,t){if(!k3(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=S3(e);for(let e of Reflect.ownKeys(t))if(Object.getOwnPropertyDescriptor(n,e)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return M3(e,E3(e._zod.def,{shape:I3(e,t)}))}function I3(e,t){let n={};return T3(n,e,Reflect.ownKeys(S3(e))),PSe(n,t),n}function GSe(e,t){if(!k3(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return M3(e,E3(e._zod.def,{shape:I3(e,t)}))}function KSe(e,t){if(!t?._zod?.def)throw Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");if(e._zod.def.checks?.length)throw Error(`.merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.`);let n={};return T3(n,e,Reflect.ownKeys(S3(e))),T3(n,t,Reflect.ownKeys(S3(t))),M3(e,E3(e._zod.def,{shape:n,get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}function L3(e,t,n,r=`partial`){let i=t._zod.def.checks;if(i&&i.length>0)throw Error(`.${r}() cannot be used on object schemas containing refinements`);let a=n?new Set(F3(t,n)):void 0,o={};return T3(o,t,Reflect.ownKeys(S3(t)),e&&((t,n)=>a&&!a.has(n)?t:new e({type:`optional`,innerType:t}))),M3(t,E3(t._zod.def,{shape:o,checks:[]}))}function qSe(e,t,n){let r=n?new Set(F3(t,n)):void 0,i={};return T3(i,t,Reflect.ownKeys(S3(t)),(t,n)=>r&&!r.has(n)?t:new e({type:`nonoptional`,innerType:t})),M3(t,E3(t._zod.def,{shape:i}))}function R3(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function JSe(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue===!1)return!0;return!1}function z3(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function B3(e){return typeof e==`string`?e:e?.message}function V3(e,t,n){var r;for(let i=t;i<e.length;i++)(r=e[i]).schema??(r.schema=n)}function H3(e,t,n){var r;let i=e.inst?._zod?.traits;i?.has(`$ZodType`)&&(i.has(`$ZodCheck`)?(r=e).schema??(r.schema=e.inst):e.schema=e.inst);let a=e.schema===e.inst?void 0:e.schema?._zod.def?.error,o=e.message?e.message:B3(e.inst?._zod.def?.error?.(e))??B3(a?.(e))??B3(t?.error?.(e))??B3(n.customError?.(e))??B3(n.localeError?.(e))??`Invalid input`,s={};for(let t of Object.keys(e))t!==`inst`&&t!==`schema`&&t!==`continue`&&t!==`input`&&t!==`__proto__`&&(s[t]=e[t]);return s.path??=[],s.message=o,t?.reportInput&&(s.input=e.input),s}var YSe=/[\uD800-\uDBFF]/;function U3(e){let t=e.length;if(!YSe.test(e))return t;let n=t;for(let r=0;r<t-1;r++)(e.charCodeAt(r)&64512)==55296&&(e.charCodeAt(r+1)&64512)==56320&&(n--,r++);return n}function W3(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function XSe(e){let t=typeof e;switch(t){case`number`:return Number.isNaN(e)?`nan`:`number`;case`object`:{if(e===null)return`null`;if(Array.isArray(e))return`array`;let t=e;if(t&&Object.getPrototypeOf(t)!==Object.prototype&&`constructor`in t&&t.constructor)return t.constructor.name}}return t}function G3(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}function ZSe(e,t){for(let n in t){let r=Object.getOwnPropertyDescriptor(t,n);r.get?Object.defineProperty(e,n,{...r,enumerable:!1}):$Se(e,n,r.value)}}function K3(e,t,n,r=!0){return Object.defineProperty(e,t,{configurable:!0,writable:!0,enumerable:r,value:n}),n}function q3(e,t,n){return K3(e,t,n,!1)}function QSe(e,t){for(let n in e){let r=e[n];Object.defineProperty(t,n,{configurable:!0,enumerable:!0,get(){return K3(this,n,r(this))},set(e){K3(this,n,e)}})}return t}function $Se(e,t,n){Object.defineProperty(e,t,{configurable:!0,get(){return this==null?n:K3(this,t,n.bind(this))},set(e){K3(this,t,e)}})}function eCe(e,t){let n=Object.getPrototypeOf(e);return t in n?void 0:n}var J3,Y3=!1,tCe={configurable:!0,get(){Y3=!0}};function X3(e,t,n){let r=Object.getPrototypeOf(e._zod);if(t in r&&J3!==e._zod){J3=void 0;return}J3=e._zod,Object.defineProperty(r,t,{configurable:!0,get(){Object.defineProperty(this,t,tCe);let e=Y3;Y3=!1;try{let r=n(this);return Y3?delete this[t]:Object.defineProperty(this,t,{configurable:!0,writable:!0,value:r}),Y3||=e,r}catch(n){throw delete this[t],Y3||=e,n}},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}})}function nCe(e,t,n,r){let i=eCe(e,t);i&&Object.defineProperty(i,t,{configurable:!0,get(){let e={configurable:!0,writable:!0,enumerable:r,value:void 0};return Object.defineProperty(this,t,e),e.value=n(this),Object.defineProperty(this,t,e),e.value},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,enumerable:r,value:e})}})}var rCe=`~constantCatch`;function iCe(e){let t=()=>e;return t[rCe]=!0,t}var Z3,Q3={value:void 0,enumerable:!1},$3=`captureStackTrace`in Error?Error:null;function aCe(e){let t=$3;if(t){let n=t.stackTraceLimit;if(typeof n==`number`){try{t.stackTraceLimit=0}catch{return $3=null,new e}try{return new e}finally{t.stackTraceLimit=n}}}return new e}function e6(e,t,n,r){let i={};function a(e){this.def=e,this.constr=d,this.traits=new Set}a.prototype=i;let o=n,s=o&&new WeakSet;function c(n,r){if(!n._zod){Q3.value=new a(r);try{Object.defineProperty(n,"_zod",Q3)}finally{Q3.value=void 0}}else if(n._zod.traits.has(e))return;if(n._zod.traits.add(e),t(n,r),s){let e=Object.getPrototypeOf(n),t=n._zod.constr.prototype,r=e;for(;r&&r!==t;)r=Object.getPrototypeOf(r);let i=r??e;s.has(i)||(s.add(i),ZSe(i,o))}let i=d.prototype;for(let e in i)Object.prototype.hasOwnProperty.call(i,e)&&(e in n||(n[e]=i[e].bind(n)))}let l=r?.Parent??Object;class u extends l{}Object.defineProperty(u,"name",{value:e});function d(e){let t=r?.Parent?aCe(u):this;c(t,e);let n=t._zod.deferred;if(n){for(let e of n)e();t._zod.deferred=void 0}let i=globalThis.__zod_globalConfig?.postProcessor;return i&&i(t),t}return Object.defineProperty(d,"init",{value:c}),Object.defineProperty(d,Symbol.hasInstance,{value:t=>r?.Parent&&t instanceof r.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(d,"name",{value:e}),d}var t6=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},n6=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}};(Z3=globalThis).__zod_globalConfig??(Z3.__zod_globalConfig={});var r6=globalThis.__zod_globalConfig;function i6(e){return e&&Object.assign(r6,e),r6}function oCe(){let e=this._zod;return e.message??=JSON.stringify(e.def,_3,2),e.message}function sCe(e){this._zod.message=e}var cCe={get:oCe,set:sCe,enumerable:!0,configurable:!0},a6={value:void 0,enumerable:!1},o6=new WeakSet([Object.prototype,Error.prototype]),s6=(e,t)=>{e.name=`$ZodError`,a6.value=t,Object.defineProperty(e,"issues",a6),a6.value=void 0,Object.defineProperty(e,"message",cCe);let n=Object.getPrototypeOf(e);o6.has(n)||(o6.add(n),Object.defineProperty(n,"toString",{configurable:!0,enumerable:!1,get(){let e=()=>this.message;return Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0})}}))},lCe=e6(`$ZodError`,s6);e6(`$ZodError`,s6,void 0,{Parent:Error});function uCe(e,t,n){return Object.prototype.hasOwnProperty.call(e,t)||(t===`__proto__`?Object.defineProperty(e,t,{value:n(),writable:!0,enumerable:!0,configurable:!0}):e[t]=n()),e[t]}function dCe(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?uCe(n,i.path[0],()=>[]).push(t(i)):r.push(t(i));return{formErrors:r,fieldErrors:n}}function fCe(e,t=e=>e.message){let n={_errors:[]},r=(e,i=[])=>{for(let a of e.issues)if(a.code===`invalid_union`&&a.errors.length)a.errors.map(e=>r({issues:e},[...i,...a.path]));else if(a.code===`invalid_key`)r({issues:a.issues},[...i,...a.path]);else if(a.code===`invalid_element`)r({issues:a.issues},[...i,...a.path]);else{let e=[...i,...a.path];if(e.length===0)n._errors.push(t(a));else{let r=n,i=0;for(;i<e.length;){let n=e[i],o=i===e.length-1;if(n===`_errors`){o&&r._errors.push(t(a)),i++;continue}Object.prototype.hasOwnProperty.call(r,n)||Object.defineProperty(r,n,{value:{_errors:[]},enumerable:!0,writable:!0,configurable:!0});let s=r[n];o&&s._errors.push(t(a)),r=s,i++}}}};return r(e),n}function c6(e,t){return{callee:t?.callee??e,Err:t?.Err}}var l6=e=>{let t=(n,r,i,a)=>{let o=i?{...i,async:!1}:{async:!1},s=n._zod.run({value:r,issues:[]},o);if(s instanceof Promise)throw new t6;if(s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>H3(e,o,i6())));throw D3(n,a?.callee??t),n}return s.value};return t},u6=e=>{let t=async(n,r,i,a)=>{let o=i?{...i,async:!0}:{async:!0},s=n._zod.run({value:r,issues:[]},o);if(s instanceof Promise&&(s=await s),s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>H3(e,o,i6())));throw D3(n,a?.callee??t),n}return s.value};return t},d6=e=>(t,n,r)=>{let i=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new t6;return a.issues.length?f6(e,a.issues,i):{success:!0,data:a.value}};function f6(e,t,n){let r;return{success:!1,get error(){return r||(r=new e(t.map(e=>H3(e,n,i6()))),t=void 0,n=void 0),r},set error(e){r=e,t=void 0,n=void 0}}}var p6=e=>async(t,n,r)=>{let i=r?{...r,async:!0}:{async:!0},a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?f6(e,a.issues,i):{success:!0,data:a.value}},pCe=Symbol.for(`zod.compile.invalid`),mCe=Symbol.for(`zod.compile.fallback`),hCe=((e,t,n)=>{let r=e._zod.bag.validator;if(r!==void 0){if(r(t)!==pCe)return!0;if(r.definite===!0&&n===void 0)return!1}return gCe(e,t,n)});function gCe(e,t,n){let r=n?{...n,async:!1,abortEarly:!0}:{async:!1,abortEarly:!0},i=e._zod.bag.fallbackRun,a;if(i?(r[mCe]=!0,a=i({value:t,issues:[]},r)):a=e._zod.run({value:t,issues:[]},r),a instanceof Promise)throw new t6;return a.issues.length===0}var _Ce=async(e,t,n)=>{let r=n?{...n,async:!0,abortEarly:!0}:{async:!0,abortEarly:!0},i=e._zod.run({value:t,issues:[]},r);return i instanceof Promise&&(i=await i),i.issues.length===0},vCe=e=>{let t=l6(e),n=(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return t(e,r,o,c6(n,a))};return n},yCe=e=>{let t=l6(e),n=(e,r,i,a)=>t(e,r,i,c6(n,a));return n},bCe=e=>{let t=u6(e),n=async(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return await t(e,r,o,c6(n,a))};return n},xCe=e=>{let t=u6(e),n=async(e,r,i,a)=>await t(e,r,i,c6(n,a));return n},SCe=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return d6(e)(t,n,i)},CCe=e=>(t,n,r)=>d6(e)(t,n,r),wCe=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return p6(e)(t,n,i)},TCe=e=>async(t,n,r)=>p6(e)(t,n,r),ECe=/^[cC][0-9a-z]{6,}$/,DCe=/^[0-9a-z]+$/,OCe=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,kCe=/^[0-9a-vA-V]{20}$/,ACe=/^[A-Za-z0-9]{27}$/,jCe=/^[a-zA-Z0-9_-]{21}$/;function MCe(e){return RegExp(`^[a-zA-Z0-9_-]{${e}}$`)}var NCe=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,PCe=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,m6=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,FCe=/^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,ICe=`^(?=[\\s\\S]*[\\p{Extended_Pictographic}\\p{Regional_Indicator}\\u20E3])[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$`;function LCe(){return new RegExp(ICe,`u`)}var RCe=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,zCe=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,BCe=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,VCe=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,HCe=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,UCe=/^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2,3})?$/,WCe=/^https?$/,GCe=/^\+[1-9]\d{6,14}$/,h6=`(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`;function KCe(e){return RegExp(`^${e}$`)}var qCe=KCe(h6);function g6(e){let t=`(?:[01]\\d|2[0-3]):[0-5]\\d`;return typeof e.precision==`number`?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:e.seconds?`${t}:[0-5]\\d(?:\\.\\d+)?`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function JCe(e){return RegExp(`^${g6(e)}$`)}function YCe(e){let t=[`Z`];e.offset&&t.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);let n=`${g6({precision:e.precision,seconds:!0})}(?:${t.join(`|`)})`,r=e.local?`${n}|${g6({precision:e.precision})}`:n;return RegExp(`^${h6}T(?:${r})$`)}var XCe=/^[\s\S]{0,}$/,ZCe=/^[^A-Z]*$/,QCe=/^[^a-z]*$/,_6=e6(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),v6=e=>{let t=e.value;return!NSe(t)&&t.length!==void 0},$Ce=e6(`$ZodCheckMaxLength`,(e,t)=>{var n;_6.init(e,t),(n=e._zod.def).when??(n.when=v6),e._zod.check=n=>{let r=n.value,i=r.length;if((typeof r==`string`&&i>t.maximum?U3(r):i)<=t.maximum)return;let a=W3(r);n.issues.push({origin:a,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),ewe=e6(`$ZodCheckMinLength`,(e,t)=>{var n;_6.init(e,t),(n=e._zod.def).when??(n.when=v6),e._zod.check=n=>{let r=n.value,i=r.length;if((typeof r==`string`&&i>=t.minimum&&i<t.minimum*2?U3(r):i)>=t.minimum)return;let a=W3(r);n.issues.push({origin:a,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),twe=e6(`$ZodCheckLengthEquals`,(e,t)=>{var n;_6.init(e,t),(n=e._zod.def).when??(n.when=v6),e._zod.check=n=>{let r=n.value,i=r.length,a=typeof r==`string`&&i>=t.length&&i<=t.length*2?U3(r):i;if(a===t.length)return;let o=W3(r),s=a>t.length;n.issues.push({origin:o,...s?{code:`too_big`,maximum:t.length}:{code:`too_small`,minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),y6=e6(`$ZodCheckStringFormat`,(e,t)=>{var n,r;_6.init(e,t),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),nwe=e6(`$ZodCheckRegex`,(e,t)=>{y6.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:`regex`,input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),rwe=e6(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=ZCe,y6.init(e,t)}),iwe=e6(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=QCe,y6.init(e,t)}),awe=e6(`$ZodCheckIncludes`,(e,t)=>{_6.init(e,t);let n=j3(t.includes);t.pattern=new RegExp(typeof t.position==`number`?`^.{${t.position},}${n}`:n),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:`string`,code:`invalid_format`,format:`includes`,includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),owe=e6(`$ZodCheckStartsWith`,(e,t)=>{_6.init(e,t);let n=RegExp(`^${j3(t.prefix)}.*`);t.pattern??=n,e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`starts_with`,prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),swe=e6(`$ZodCheckEndsWith`,(e,t)=>{_6.init(e,t);let n=RegExp(`.*${j3(t.suffix)}$`);t.pattern??=n,e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`ends_with`,suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),cwe=e6(`$ZodCheckOverwrite`,(e,t)=>{_6.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}}),lwe=class{constructor(e=[],t={}){this.content=[],this.indent=0,this.args=e,this.closed=t}indented(e){this.indent+=1;try{e(this)}finally{--this.indent}}write(e){if(typeof e==`function`){e(this,{execution:`sync`}),e(this,{execution:`async`});return}let t=e.split(`
155
- `).filter(e=>e),n=Math.min(...t.map(e=>e.length-e.trimStart().length)),r=t.map(e=>e.slice(n)).map(e=>` `.repeat(this.indent*2)+e);for(let e of r)this.content.push(e)}compile(){let e=Function,t=this?.content??[``];return new e(...Object.keys(this.closed),`return function (${this.args.join(`, `)}) {\n${t.join(`
156
- `)}\n};`)(...Object.values(this.closed))}},uwe={major:4,minor:6,patch:5},b6=e6(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=uwe;let r=e._zod.def.checks,i=e._zod.traits.has(`$ZodCheck`)?[e,...r??[]]:r?.length?[...r]:[];for(let t of i)for(let n of t._zod.onattach)n(e);if(i.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(t,n,r)=>{if(t.memo)return t;let i=R3(t),a;for(let o of n){if(o._zod.def.when){if(JSe(t)||!o._zod.def.when(t))continue}else if(i)continue;let n=t.issues.length,s=o._zod.check(t);if(s instanceof Promise&&r?.async===!1)throw new t6;if(a||s instanceof Promise)a=(a??Promise.resolve()).then(async()=>{await s,t.issues.length!==n&&(V3(t.issues,n,e),i||=R3(t,n))});else{if(t.issues.length===n)continue;V3(t.issues,n,e),i||=R3(t,n)}}return a?a.then(()=>t):t},n=(n,r,a)=>{if(R3(n))return n.aborted=!0,n;let o=t(r,i,a);if(o instanceof Promise){if(a.async===!1)throw new t6;return o.then(t=>e._zod.parse(t,a))}return e._zod.parse(o,a)};e._zod.run=(r,a)=>{if(a.skipChecks)return e._zod.parse(r,a);if(a.direction===`backward`){let t=e._zod.parse({value:r.value,issues:[]},{...a,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,r,a)):n(t,r,a)}let o=e._zod.parse(r,a);if(o instanceof Promise){if(a.async===!1)throw new t6;return o.then(e=>t(e,i,a))}return t(o,i,a)}}},{get"~standard"(){return q3(this,`~standard`,S6(this))},set"~standard"(e){K3(this,`~standard`,e)}}),x6=(e,t)=>e.issues.length?{issues:e.issues.map(e=>H3(e,t,i6()))}:{value:e.value};async function dwe(e,t){let n={async:!0};return x6(await e._zod.run({value:t,issues:[]},n),n)}function S6(e){return{validate:t=>{let n={async:!1};try{let r=e._zod.run({value:t,issues:[]},n);if(!(r instanceof Promise))return x6(r,n)}catch{}return dwe(e,t)},vendor:`zod`,version:1}}var C6=e6(`$ZodString`,(e,t)=>{b6.init(e,t),e._zod.pattern=t.pattern??XCe,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value==`string`||n.issues.push({expected:`string`,code:`invalid_type`,input:n.value,inst:e}),n}}),w6=e6(`$ZodStringFormat`,(e,t)=>{y6.init(e,t),C6.init(e,t)}),fwe=e6(`$ZodGUID`,(e,t)=>{t.pattern??=PCe,w6.init(e,t)}),pwe=e6(`$ZodUUID`,(e,t)=>{if(t.version){let e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(e===void 0)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??=m6(e)}else t.pattern??=m6();w6.init(e,t)}),mwe=e6(`$ZodEmail`,(e,t)=>{t.pattern??=FCe,w6.init(e,t)});function T6(e){try{return typeof URL<`u`&&typeof URL.canParse==`function`?URL.canParse(e):(new URL(e),!0)}catch{return!1}}function hwe(e,t){return!(`normalize`in t)&&!(`hostname`in t)&&!(`protocol`in t)?T6(e)||2:gwe(e,t)}function gwe(e,t){if(!t.normalize&&t.protocol?.source===WCe.source&&!/^https?:\/\//i.test(e))return 1;try{if(typeof URL<`u`){let t=URL;if(typeof t.parse==`function`)return t.parse(e)??2}return new URL(e)}catch{return 2}}var _we=/[\t\n\r]/g;function E6(e){return e.replace(_we,``)}function vwe(e,t){return t.lastIndex=0,t.test(e.hostname)}function ywe(e,t){return t.lastIndex=0,t.test(e.protocol.endsWith(`:`)?e.protocol.slice(0,-1):e.protocol)}var bwe=e6(`$ZodURL`,(e,t)=>{w6.init(e,t),e._zod.check=n=>{try{let r=n.value.trim(),i=hwe(r,t);if(i===1){n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid URL format`,input:n.value,inst:e,continue:!t.abort});return}if(i===2){n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort});return}if(i===!0){n.value=E6(r);return}t.hostname&&!vwe(i,t.hostname)&&n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid hostname`,pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort}),t.protocol&&!ywe(i,t.protocol)&&n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid protocol`,pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort}),n.value=t.normalize?i.href:E6(r);return}catch{n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort})}}}),xwe=e6(`$ZodEmoji`,(e,t)=>{t.pattern??=LCe(),w6.init(e,t)}),Swe=e6(`$ZodNanoID`,(e,t)=>{if(t.length!==void 0&&(!Number.isInteger(t.length)||t.length<1))throw Error(`Invalid nanoid length: ${t.length}`);t.pattern??=t.length===void 0?jCe:MCe(t.length),w6.init(e,t)}),Cwe=e6(`$ZodCUID`,(e,t)=>{t.pattern??=ECe,w6.init(e,t)}),wwe=e6(`$ZodCUID2`,(e,t)=>{t.pattern??=DCe,w6.init(e,t)}),Twe=e6(`$ZodULID`,(e,t)=>{t.pattern??=OCe,w6.init(e,t)}),Ewe=e6(`$ZodXID`,(e,t)=>{t.pattern??=kCe,w6.init(e,t)}),Dwe=e6(`$ZodKSUID`,(e,t)=>{t.pattern??=ACe,w6.init(e,t)}),Owe=e6(`$ZodISODateTime`,(e,t)=>{t.pattern??=YCe(t),w6.init(e,t)}),kwe=e6(`$ZodISODate`,(e,t)=>{t.pattern??=qCe,w6.init(e,t)}),Awe=e6(`$ZodISOTime`,(e,t)=>{t.pattern??=JCe(t),w6.init(e,t)}),jwe=e6(`$ZodISODuration`,(e,t)=>{t.pattern??=NCe,w6.init(e,t)}),Mwe=e6(`$ZodIPv4`,(e,t)=>{t.pattern??=RCe,w6.init(e,t)}),Nwe=/^[0-9a-fA-F:.]+$/;function D6(e){return Nwe.test(e)?T6(`http://[${e}]`):!1}var Pwe=e6(`$ZodIPv6`,(e,t)=>{t.pattern??=zCe,w6.init(e,t),e._zod.check=n=>{D6(n.value)||n.issues.push({code:`invalid_format`,format:`ipv6`,input:n.value,inst:e,continue:!t.abort})}}),Fwe=e6(`$ZodCIDRv4`,(e,t)=>{t.pattern??=BCe,w6.init(e,t)});function Iwe(e){let t=e.split(`/`);if(t.length!==2)return!1;let[n,r]=t;if(!r)return!1;let i=Number(r);return`${i}`!==r||i<0||i>128?!1:D6(n)}var Lwe=e6(`$ZodCIDRv6`,(e,t)=>{t.pattern??=VCe,w6.init(e,t),e._zod.check=n=>{Iwe(n.value)||n.issues.push({code:`invalid_format`,format:`cidrv6`,input:n.value,inst:e,continue:!t.abort})}});function O6(e){if(e===``)return!0;if(/\s/.test(e)||e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}var k6=/^[0-9a-zA-Z+/]*={0,2}$/,Rwe=e6(`$ZodBase64`,(e,t)=>{t.pattern??=k6,w6.init(e,t),e._zod.check=n=>{O6(n.value)||n.issues.push({code:`invalid_format`,format:`base64`,input:n.value,inst:e,continue:!t.abort})}}),A6=/^[A-Za-z0-9_-]*$/;function zwe(e){if(!A6.test(e))return!1;let t=e.replace(/[-_]/g,e=>e===`-`?`+`:`/`);return O6(t.padEnd(Math.ceil(t.length/4)*4,`=`))}var Bwe=e6(`$ZodBase64URL`,(e,t)=>{t.pattern??=A6,w6.init(e,t),e._zod.check=n=>{zwe(n.value)||n.issues.push({code:`invalid_format`,format:`base64url`,input:n.value,inst:e,continue:!t.abort})}}),Vwe=e6(`$ZodE164`,(e,t)=>{t.pattern??=GCe,w6.init(e,t)});function Hwe(e,t=null){try{let n=e.split(`.`);if(n.length!==3)return!1;let[r]=n;if(!r)return!1;let i=JSON.parse(atob(r));return!(`typ`in i&&i?.typ!==`JWT`||!i.alg||t&&(!(`alg`in i)||i.alg!==t))}catch{return!1}}var Uwe=e6(`$ZodJWT`,(e,t)=>{w6.init(e,t),e._zod.check=n=>{Hwe(n.value,t.alg)||n.issues.push({code:`invalid_format`,format:`jwt`,input:n.value,inst:e,continue:!t.abort})}}),Wwe=e6(`$ZodUnknown`,(e,t)=>{b6.init(e,t),e._zod.parse=e=>e}),Gwe=e6(`$ZodNever`,(e,t)=>{b6.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:`never`,code:`invalid_type`,input:t.value,inst:e}),t)});function j6(e,t,n){e.issues.length&&t.issues.push(...z3(n,e.issues)),t.value[n]=e.value}var Kwe=e6(`$ZodArray`,(e,t)=>{b6.init(e,t);let n=r6.memoizer;n?.attach(e),e._zod.parse=(r,i)=>{let a=r.value;if(!Array.isArray(a))return r.issues.push({expected:`array`,code:`invalid_type`,input:a,inst:e}),r;r.value=n?n.alloc(e,r,Array(a.length),i):Array(a.length);let o=[],s=i?.abortEarly;for(let e=0;e<a.length;e++){let n=a[e],c=t.element._zod.run({value:n,issues:[]},i);if(c instanceof Promise)o.push(c.then(t=>j6(t,r,e)));else if(j6(c,r,e),s&&c.issues.length!==0&&R3(c))break}return o.length?Promise.all(o).then(()=>r):r}});function M6(e,t,n,r,i,a){let o=n in r,s=a===`optional`;if(o||!s||i!==`optional`){if(e.issues.length){if(i!==void 0&&s&&!o)return;t.issues.push(...z3(n,e.issues))}if(!o&&i===void 0){e.issues.length||t.issues.push({code:`invalid_type`,expected:`nonoptional`,input:void 0,path:[n]});return}e.value===void 0?(o||i===`defaulted`&&!s)&&(t.value[n]=void 0):t.value[n]=e.value}}var qwe=[];function N6(e){let t=Object.keys(e.shape),n=Object.getOwnPropertySymbols(e.shape),r=n.length?n:qwe,i=r.length?[...t,...r]:t;for(let t of i)if(!e.shape?.[t]?._zod?.traits?.has(`$ZodType`))throw Error(`Invalid element at key "${String(t)}": expected a Zod schema`);let a=zSe(e.shape);return{...e,allKeys:i,symbolKeys:r,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(a)}}function P6(e,t,n,r,i,a,o){let s=[],c=i.keySet,l=i.catchall._zod,u=l.def.type,d=l.optin,f=l.optout,p=0;for(let i in t){if(o&&n.issues.length!==p){if(R3(n,p))break;p=n.issues.length}if(c.has(i))continue;if(i===`__proto__`){u===`never`&&s.push(i);continue}if(u===`never`){s.push(i);continue}let a=l.run({value:t[i],issues:[]},r);a instanceof Promise?e.push(a.then(e=>M6(e,n,i,t,d,f))):M6(a,n,i,t,d,f)}return s.length&&n.issues.push({code:`unrecognized_keys`,keys:s,input:t,inst:a,continue:!0}),e.length?Promise.all(e).then(()=>n):n}var Jwe=e6(`$ZodObject`,(e,t)=>{b6.init(e,t);let n=Object.getOwnPropertyDescriptor(t,`shape`),r=n?.get?n.get.raw:t.shape??{};if(r){let e=()=>{let n={...r};return Object.defineProperty(t,"shape",{value:n}),e.raw=n,n};e.raw=r,Object.defineProperty(t,"shape",{get:e})}let i=v3(()=>N6(t));X3(e,`propValues`,e=>{let t=e.def.shape,n={};for(let e in t){let r=t[e]._zod;if(r.values){Object.prototype.hasOwnProperty.call(n,e)||b3(n,e,new Set);for(let t of r.values)n[e].add(t);r.optin!==void 0&&n[e].add(void 0)}}return n});let a=O3,o=t.catchall,s,c=r6.memoizer;c?.attach(e),e._zod.parse=(t,n)=>{s??=i.value;let r=t.value;if(!a(r))return t.issues.push({expected:`object`,code:`invalid_type`,input:r,inst:e}),t;t.value=c?c.alloc(e,t,{},n):{};let l=[],u=s.shape,d=n?.abortEarly,f=t.issues.length;for(let e of s.allKeys){if(d&&t.issues.length!==f){if(R3(t,f))break;f=t.issues.length}if(e===`__proto__`)continue;let i=u[e],a=i._zod.optin,o=i._zod.optout,s=i._zod.run({value:r[e],issues:[]},n);s instanceof Promise?l.push(s.then(n=>M6(n,t,e,r,a,o))):M6(s,t,e,r,a,o)}return o?P6(l,r,t,n,i.value,e,d===!0):l.length?Promise.all(l).then(()=>t):t}}),Ywe=e6(`$ZodObjectJIT`,(e,t)=>{Jwe.init(e,t);let n=e._zod.parse,r=v3(()=>N6(t)),i=r6.memoizer,a=t=>{let n=r.value,a=n.symbolKeys,o=new lwe([`payload`,`ctx`],{shape:t,inst:e,memo:i,syms:a}),s=e=>`shape[${e}]._zod.run({ value: input[${e}], issues: [] }, ctx)`,c=(e,t)=>`
157
- let ${e}_ab = false;
158
- for (let i = 0; i < ${e}.issues.length; i++) {
159
- const iss = ${e}.issues[i];
160
- iss.path = iss.path ? [${t}, ...iss.path] : [${t}];
161
- payload.issues.push(iss);
162
- if (iss.continue !== true) ${e}_ab = true;
163
- }
164
- if (${e}_ab && ctx && ctx.abortEarly) {
165
- payload.value = newResult;
166
- return payload;
167
- }`;o.write(`const input = payload.value;`);let l=Object.create(null),u=0;for(let e of n.allKeys)l[e]=`key_${u++}`;o.write(i?`const newResult = memo.alloc(inst, payload, {}, ctx);`:`const newResult = {};`);for(let e of n.allKeys){if(e===`__proto__`)continue;let n=l[e],r=typeof e==`symbol`?`syms[${a.indexOf(e)}]`:FSe(e),i=`${r} in input`,u=t[e],d=u?._zod?.optin,f=d!==void 0,p=u?._zod?.optout===`optional`;if(o.write(`const ${n} = ${s(r)};`),f&&p){let e=d===`optional`?`${n}_present`:`${n}.value !== undefined || ${n}_present`;o.write(`
168
- const ${n}_present = ${i};
169
- if (!${n}.issues.length || ${n}_present) {
170
- if (${n}.issues.length) {${c(n,r)}
171
- }
172
-
173
- if (${e}) {
174
- newResult[${r}] = ${n}.value;
175
- }
176
- }
177
-
178
- `)}else f?(o.write(`
179
- if (${n}.issues.length) {${c(n,r)}
180
- }
181
- `),d===`defaulted`?o.write(`newResult[${r}] = ${n}.value;`):o.write(`
182
- if (${n}.value !== undefined || ${i}) {
183
- newResult[${r}] = ${n}.value;
184
- }
185
- `)):o.write(`
186
- const ${n}_present = ${i};
187
- if (${n}.issues.length) {${c(n,r)}
188
- }
189
- if (!${n}_present && !${n}.issues.length) {
190
- payload.issues.push({
191
- code: "invalid_type",
192
- expected: "nonoptional",
193
- input: undefined,
194
- path: [${r}]
195
- });
196
- if (ctx && ctx.abortEarly) {
197
- payload.value = newResult;
198
- return payload;
199
- }
200
- }
201
-
202
- if (${n}_present) {
203
- newResult[${r}] = ${n}.value;
204
- }
205
-
206
- `)}return o.write(`payload.value = newResult;`),o.write(`return payload;`),o.compile()},o,s=O3,c=!r6.jitless,l=c&&LSe.value,u=t.catchall,d;e._zod.parse=(i,f)=>{d??=r.value;let p=i.value;return s(p)?c&&l&&f?.async===!1&&f.jitless!==!0?(o||=a(t.shape),i=o(i,f),u?P6([],p,i,f,d,e,f?.abortEarly===!0):i):n(i,f):(i.issues.push({expected:`object`,code:`invalid_type`,input:p,inst:e}),i)}});function F6(e,t,n,r){for(let n of e)if(n.issues.length===0)return t.value=n.value,t;let i=e.filter(e=>!R3(e));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:`invalid_union`,input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>H3(e,r,i6())))}),t)}var Xwe=e6(`$ZodUnion`,(e,t)=>{b6.init(e,t),X3(e,`optin`,e=>e.def.options.some(e=>e._zod.optin===`defaulted`)?`defaulted`:e.def.options.some(e=>e._zod.optin!==void 0)?`optional`:void 0),X3(e,`optout`,e=>e.def.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),X3(e,`values`,e=>{if(e.def.options.every(e=>e._zod.values))return new Set(e.def.options.flatMap(e=>Array.from(e._zod.values)))}),X3(e,`pattern`,e=>{if(e.def.options.every(e=>e._zod.pattern)){let t=e.def.options.map(e=>e._zod.pattern);return RegExp(`^(${t.map(e=>y3(e.source)).join(`|`)})$`)}});let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(r,i)=>{if(n)return n(r,i);let a=!1,o=[];for(let e of t.options){let t=e._zod.run({value:r.value,issues:[]},i);if(t instanceof Promise)o.push(t),a=!0;else{if(t.issues.length===0)return t;o.push(t)}}return a?Promise.all(o).then(t=>F6(t,r,e,i)):F6(o,r,e,i)}}),Zwe=e6(`$ZodIntersection`,(e,t)=>{b6.init(e,t),e._zod.parse=(e,n)=>{let r=e.value,i=t.left._zod.run({value:r,issues:[]},n),a=t.right._zod.run({value:r,issues:[]},n);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([t,n])=>L6(e,t,n)):L6(e,i,a)}});function I6(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(k3(e)&&k3(t)){let n=Object.keys(t),r=Object.keys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};Object.prototype.hasOwnProperty.call(i,`__proto__`)&&delete i.__proto__;for(let n of r){if(n===`__proto__`)continue;let r=I6(e[n],t[n]);if(!r.valid)return{valid:!1,mergeErrorPath:[n,...r.mergeErrorPath]};i[n]=r.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let r=0;r<e.length;r++){let i=e[r],a=t[r],o=I6(i,a);if(!o.valid)return{valid:!1,mergeErrorPath:[r,...o.mergeErrorPath]};n.push(o.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function L6(e,t,n){let r=new Map,i,a=new Map,o=(e,t)=>{let n;if(e.code===`unrecognized_keys`&&!e.path?.length)i??=e,n=e.keys;else if(e.code===`invalid_key`&&e.origin===`record`&&e.path?.length===1){let t=String(e.path[0]);a.has(t)||a.set(t,e),n=[t]}else return!1;for(let e of n)r.has(e)||r.set(e,{}),r.get(e)[t]=!0;return!0};for(let n of t.issues)o(n,`l`)||e.issues.push(n);for(let t of n.issues)o(t,`r`)||e.issues.push(t);let s=[...r].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(s.length){let t=i?s.filter(e=>i.keys.includes(e)):[];t.length&&e.issues.push({...i,keys:t});for(let n of s)!t.includes(n)&&a.has(n)&&e.issues.push(a.get(n))}let c=I6(t.value,n.value);if(!c.valid){if(R3(e))return e;throw Error(`Unmergable intersection. Error path: ${JSON.stringify(c.mergeErrorPath)}`)}return e.value=c.data,e}var Qwe=e6(`$ZodEnum`,(e,t)=>{b6.init(e,t);let n=h3(t.entries),r=new Set(n);e._zod.values=r,X3(e,`pattern`,e=>{let t=h3(e.def.entries).filter(e=>RSe.has(typeof e));return RegExp(t.length?`^(${t.map(e=>j3(e.toString())).join(`|`)})$`:`^[^\\s\\S]$`)}),e._zod.parse=(t,i)=>{let a=t.value;return r.has(a)||t.issues.push({code:`invalid_value`,values:n,input:a,inst:e}),t}}),$we=e6(`$ZodLiteral`,(e,t)=>{b6.init(e,t);let n=new Set(t.values);e._zod.values=n,X3(e,`pattern`,e=>{let t=e.def.values;return RegExp(t.length?`^(${t.map(e=>typeof e==`string`?j3(e):e?j3(e.toString()):String(e)).join(`|`)})$`:`^[^\\s\\S]$`)}),e._zod.parse=(r,i)=>{let a=r.value;return n.has(a)||r.issues.push({code:`invalid_value`,values:t.values,input:a,inst:e}),r}}),eTe=e6(`$ZodTransform`,(e,t)=>{b6.init(e,t),e._zod.optin=`optional`,r6.memoizer?.guard(e),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new n6(e.constructor.name);let i=t.transform(n.value,n);if(r.async)return(i instanceof Promise?i:Promise.resolve(i)).then(e=>(n.value=e,n));if(i instanceof Promise)throw new t6;return n.value=i,n}});function R6(e,t){return e.value=t.issues.length?void 0:t.value,e}var z6=e6(`$ZodOptional`,(e,t)=>{b6.init(e,t),X3(e,`optin`,e=>e.def.innerType._zod.optin===`defaulted`?`defaulted`:`optional`),e._zod.optout=`optional`,X3(e,`values`,e=>{let t=e.def.innerType._zod.values;return t?new Set([...t,void 0]):void 0}),X3(e,`pattern`,e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${y3(t.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if(e.value===void 0){if(t.innerType._zod.optin!==`defaulted`)return e;let r=t.innerType._zod.run({value:e.value,issues:[]},n);return r instanceof Promise?r.then(t=>R6(e,t)):R6(e,r)}return t.innerType._zod.run(e,n)}}),tTe=e6(`$ZodExactOptional`,(e,t)=>{z6.init(e,t),X3(e,`values`,e=>e.def.innerType._zod.values),X3(e,`pattern`,e=>e.def.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),nTe=e6(`$ZodNullable`,(e,t)=>{b6.init(e,t),X3(e,`optin`,e=>e.def.innerType._zod.optin),X3(e,`optout`,e=>e.def.innerType._zod.optout),X3(e,`pattern`,e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${y3(t.source)}|null)$`):void 0}),X3(e,`values`,e=>e.def.innerType._zod.values?new Set([...e.def.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>e.value===null?e:t.innerType._zod.run(e,n)}),rTe=e6(`$ZodDefault`,(e,t)=>{b6.init(e,t),e._zod.optin=`defaulted`,X3(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);if(e.value===void 0)return e.value=t.defaultValue,e;let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>B6(e,t)):B6(r,t)}});function B6(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var iTe=e6(`$ZodPrefault`,(e,t)=>{b6.init(e,t),e._zod.optin=`defaulted`,X3(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>(n.direction===`backward`||e.value===void 0&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),aTe=e6(`$ZodNonOptional`,(e,t)=>{b6.init(e,t),X3(e,`values`,e=>{let t=e.def.innerType._zod.values;return t?new Set([...t].filter(e=>e!==void 0)):void 0}),e._zod.parse=(n,r)=>{let i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(t=>V6(t,e)):V6(i,e)}});function V6(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:`invalid_type`,expected:`nonoptional`,input:e.value,inst:t}),e}function H6(e,t,n,r){return t.issues.length?(e.value=n.catchValue({...t,value:e.value,error:{issues:t.issues.map(e=>H3(e,r,i6()))},input:e.value}),e):(e.value=t.value,t.memo&&(e.memo=!0),e)}var oTe=e6(`$ZodCatch`,(e,t)=>{b6.init(e,t),X3(e,`optin`,e=>e.def.innerType._zod.optin===`defaulted`?`defaulted`:`optional`),X3(e,`optout`,e=>e.def.innerType._zod.optout),X3(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run({value:e.value,issues:[]},n);return r instanceof Promise?r.then(r=>H6(e,r,t,n)):H6(e,r,t,n)}}),sTe=e6(`$ZodPipe`,(e,t)=>{b6.init(e,t),X3(e,`values`,e=>e.def.in._zod.values),X3(e,`optin`,e=>e.def.in._zod.optin),X3(e,`optout`,e=>e.def.out._zod.optout),X3(e,`propValues`,e=>e.def.in._zod.propValues),e._zod.parse=(e,n)=>{if(n.direction===`backward`){let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>U6(e,t.in,n)):U6(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>U6(e,t.out,n)):U6(r,t.out,n)}});function U6(e,t,n){return e.issues.some(e=>e.code!==`unrecognized_keys`)?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}var cTe=e6(`$ZodReadonly`,(e,t)=>{b6.init(e,t),X3(e,`propValues`,e=>e.def.innerType._zod.propValues),X3(e,`values`,e=>e.def.innerType._zod.values),X3(e,`optin`,e=>e.def.innerType?._zod?.optin),X3(e,`optout`,e=>e.def.innerType?._zod?.optout),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(W6):W6(r)}});function W6(e){return e.memo||(e.value=Object.freeze(e.value)),e}var lTe=e6(`$ZodCustom`,(e,t)=>{_6.init(e,t),b6.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{let r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then(t=>G6(t,n,r,e));G6(i,n,r,e)}});function G6(e,t,n,r){if(!e){let e={code:`custom`,input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(G3(e))}}var uTe=class extends Error{constructor(){super(`Cannot parse a reference cycle that closes through a transform`),this.name=`ZodCyclicError`}},K6=`~memo`,q6=[];function J6(e){return typeof e==`object`&&!!e}function Y6(e){return e.map(e=>e.path?{...e,path:e.path.slice()}:{...e})}var X6=new WeakMap,Z6=0,Q6=1,$6=2;function e8(e,t,n){let r=X6.get(e);if(r!==void 0)return r?$6:Z6;if(t.has(e))return $6;t.add(e);let i=Z6,a=e=>{if(i!==$6&&e?._zod){let r=e8(e,t,n);r>i&&(i=r)}},o=(e,r)=>{let i=Z6;for(let a of Reflect.ownKeys(e)){let o=Object.getOwnPropertyDescriptor(e,a);if(r&&!o.enumerable)continue;let s=o.get?Q6:o.value?._zod?e8(o.value,t,n):Z6;s>i&&(i=s)}return i},s=e=>{e>i&&(i=e)},c=e._zod.def;switch(c.type){case`object`:{let e=x3(c);s(e?o(e,!0):Q6),a(c.catchall);break}case`array`:a(c.element);break;case`tuple`:for(let e of c.items)a(e);a(c.rest);break;case`record`:case`map`:a(c.keyType),a(c.valueType);break;case`set`:a(c.valueType);break;case`union`:for(let e of c.options)a(e);break;case`intersection`:a(c.left),a(c.right);break;case`optional`:case`nullable`:case`default`:case`prefault`:case`catch`:case`readonly`:case`nonoptional`:case`promise`:case`success`:a(c.innerType);break;case`pipe`:a(c.in),a(c.out);break;case`function`:a(c.input),a(c.output);break;case`lazy`:{let r=c._cachedInner??(n?e._zod.innerType:void 0);s(r?e8(r,t,!1):Q6);break}case`template_literal`:case`string`:case`number`:case`int`:case`boolean`:case`bigint`:case`symbol`:case`undefined`:case`null`:case`void`:case`never`:case`any`:case`unknown`:case`date`:case`nan`:case`enum`:case`literal`:case`file`:case`transform`:case`custom`:break;default:for(let e in c){let t=Object.getOwnPropertyDescriptor(c,e);if(!t||t.get)continue;let n=t.value;if(n&&typeof n==`object`){if(n._zod)a(n);else if(Array.isArray(n))for(let e of n)a(e)}}}return t.delete(e),dTe(e,i)}function dTe(e,t){return t!==Q6&&X6.set(e,t===$6),t}function fTe(e,t){let n=e.buckets.get(t);return n||(n=new WeakMap,e.buckets.set(t,n)),n}var t8,n8=[],pTe={alloc(e,t,n){let r=t8;if(!r)return n;t8=void 0;let i={value:n,issues:null};return r.set(t.value,i),n8.push(i),n},guard(e){var t;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let t=e._zod.parse,n=(e,n)=>{if(n.direction!==`backward`&&hTe(n,e.value))throw new uTe;return t(e,n)};e._zod.parse=n,e._zod.run===t&&(e._zod.run=n)})},attach(e){var t;let n,r=!1,i,a;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let t=e._zod.parse,o=(s,c)=>{if(n===void 0){let i=e8(e,new Set,!1);if(i===Z6)return e._zod.parse=t,e._zod.run===o&&(e._zod.run=t),t(s,c);i===$6||r?n=!0:r=!0}let l=s.value;if(!J6(l))return t(s,c);let u=c[K6];u||(u={buckets:new WeakMap,backEdges:void 0},c[K6]=u);let d;i===c?d=a:(d=fTe(u,e),i=c,a=d);let f=d.get(l);if(f)return s.value=f.value,f.issues?f.issues.length&&s.issues.push(...Y6(f.issues)):(s.memo=!0,u.backEdges??(u.backEdges=new WeakSet),u.backEdges.add(f.value)),s;t8=d;let p=n8.length,m=t(s,c);t8=void 0;let h=n8.length>p?n8.pop():void 0;return m instanceof Promise?m.then(e=>(h&&(h.issues=e.issues.length?Y6(e.issues):q6),e)):(h&&(h.issues=m.issues.length?Y6(m.issues):q6),m)};e._zod.parse=o,e._zod.run===t&&(e._zod.run=o)})}};function mTe(){return pTe}function hTe(e,t){let n=e[K6]?.backEdges;return n!==void 0&&J6(t)&&n.has(t)}var gTe=()=>{let e={string:{unit:`characters`,verb:`to have`},file:{unit:`bytes`,verb:`to have`},array:{unit:`items`,verb:`to have`},set:{unit:`items`,verb:`to have`},map:{unit:`entries`,verb:`to have`}};function t(t){return e[t]??null}let n={regex:`input`,email:`email address`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO datetime`,date:`ISO date`,time:`ISO time`,duration:`ISO duration`,ipv4:`IPv4 address`,ipv6:`IPv6 address`,mac:`MAC address`,cidrv4:`IPv4 range`,cidrv6:`IPv6 range`,base64:`base64-encoded string`,base64url:`base64url-encoded string`,json_string:`JSON string`,e164:`E.164 number`,currency_code:`currency code`,credit_card:`credit card number`,iban:`IBAN`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`};function i(e,t){return e===`number`&&typeof t==`number`&&!Number.isFinite(t)?String(t):r[e]??e}return e=>{switch(e.code){case`invalid_type`:return`Invalid input: expected ${i(e.expected)}, received ${i(XSe(e.input),e.input)}`;case`invalid_value`:return e.values.length===1?`Invalid input: expected ${P3(e.values[0])}`:`Invalid option: expected one of ${g3(e.values,`|`)}`;case`too_big`:{let n=e.exact?`exactly `:e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Too big: expected ${e.origin??`value`} to have ${n}${e.maximum.toString()} ${r.unit??`elements`}`:`Too big: expected ${e.origin??`value`} to be ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.exact?`exactly `:e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Too small: expected ${e.origin} to have ${n}${e.minimum.toString()} ${r.unit}`:`Too small: expected ${e.origin} to be ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Invalid string: must start with "${t.prefix}"`:t.format===`ends_with`?`Invalid string: must end with "${t.suffix}"`:t.format===`includes`?`Invalid string: must include "${t.includes}"`:t.format===`regex`?`Invalid string: must match pattern ${t.pattern}`:`Invalid ${n[t.format]??e.format}`}case`not_multiple_of`:return`Invalid number: must be a multiple of ${e.divisor}`;case`unrecognized_keys`:return`Unrecognized key${e.keys.length>1?`s`:``}: ${g3(e.keys,`, `)}`;case`invalid_key`:return`Invalid key in ${e.origin}`;case`invalid_union`:return e.options&&Array.isArray(e.options)&&e.options.length>0?`Invalid discriminator value. Expected ${e.options.map(e=>`'${e}'`).join(` | `)}`:e.inclusive===!1?`Invalid input: more than one option matched`:`Invalid input`;case`invalid_element`:return`Invalid value in ${e.origin}`;default:return`Invalid input`}}};function _Te(){return{localeError:gTe()}}var r8,vTe=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let n=t[0];return this._map.set(e,n),n&&typeof n==`object`&&`id`in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&typeof t==`object`&&`id`in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let n={...this.get(t)??{}};delete n.id;let r={...n,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};function yTe(){return new vTe}(r8=globalThis).__zod_globalRegistry??(r8.__zod_globalRegistry=yTe());var i8=globalThis.__zod_globalRegistry;function bTe(e){return e.checks&&=[...e.checks],e}function xTe(e,t){return new e(bTe({type:`string`,...N3(t)}))}function STe(e,t){return new e({type:`string`,format:`email`,check:`string_format`,abort:!1,...N3(t)})}function CTe(e,t){return new e({type:`string`,format:`guid`,check:`string_format`,abort:!1,...N3(t)})}function wTe(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,...N3(t)})}function TTe(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v4`,...N3(t)})}function ETe(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v6`,...N3(t)})}function DTe(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v7`,...N3(t)})}function OTe(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...N3(t)})}function kTe(e,t){return new e({type:`string`,format:`emoji`,check:`string_format`,abort:!1,...N3(t)})}function ATe(e,t){return new e({type:`string`,format:`nanoid`,check:`string_format`,abort:!1,...N3(t)})}function jTe(e,t){return new e({type:`string`,format:`cuid`,check:`string_format`,abort:!1,...N3(t)})}function MTe(e,t){return new e({type:`string`,format:`cuid2`,check:`string_format`,abort:!1,...N3(t)})}function NTe(e,t){return new e({type:`string`,format:`ulid`,check:`string_format`,abort:!1,...N3(t)})}function PTe(e,t){return new e({type:`string`,format:`xid`,check:`string_format`,abort:!1,...N3(t)})}function FTe(e,t){return new e({type:`string`,format:`ksuid`,check:`string_format`,abort:!1,...N3(t)})}function ITe(e,t){return new e({type:`string`,format:`ipv4`,check:`string_format`,abort:!1,...N3(t)})}function LTe(e,t){return new e({type:`string`,format:`ipv6`,check:`string_format`,abort:!1,...N3(t)})}function RTe(e,t){return new e({type:`string`,format:`cidrv4`,check:`string_format`,abort:!1,...N3(t)})}function zTe(e,t){return new e({type:`string`,format:`cidrv6`,check:`string_format`,abort:!1,...N3(t)})}function BTe(e,t){return new e({type:`string`,format:`base64`,check:`string_format`,abort:!1,...N3(t)})}function VTe(e,t){return new e({type:`string`,format:`base64url`,check:`string_format`,abort:!1,...N3(t)})}function HTe(e,t){return new e({type:`string`,format:`e164`,check:`string_format`,abort:!1,...N3(t)})}function UTe(e,t){return new e({type:`string`,format:`jwt`,check:`string_format`,abort:!1,...N3(t)})}function WTe(e,t){return new e({type:`string`,format:`datetime`,check:`string_format`,offset:!1,local:!1,precision:null,...N3(t)})}function a8(e,t){return new e({type:`string`,format:`date`,check:`string_format`,...N3(t)})}function GTe(e,t){return new e({type:`string`,format:`time`,check:`string_format`,precision:null,...N3(t)})}function KTe(e,t){return new e({type:`string`,format:`duration`,check:`string_format`,...N3(t)})}function qTe(e){return new e({type:`unknown`})}function JTe(e,t){return new e({type:`never`,...N3(t)})}function o8(e,t){return new $Ce({check:`max_length`,...N3(t),maximum:e})}function s8(e,t){return new ewe({check:`min_length`,...N3(t),minimum:e})}function c8(e,t){return new twe({check:`length_equals`,...N3(t),length:e})}function YTe(e,t){return new nwe({check:`string_format`,format:`regex`,...N3(t),pattern:e})}function XTe(e){return new rwe({check:`string_format`,format:`lowercase`,...N3(e)})}function ZTe(e){return new iwe({check:`string_format`,format:`uppercase`,...N3(e)})}function QTe(e,t){return new awe({check:`string_format`,format:`includes`,...N3(t),includes:e})}function $Te(e,t){return new owe({check:`string_format`,format:`starts_with`,...N3(t),prefix:e})}function eEe(e,t){return new swe({check:`string_format`,format:`ends_with`,...N3(t),suffix:e})}function l8(e){return new cwe({check:`overwrite`,tx:e})}function tEe(e){return l8(t=>t.normalize(e))}function nEe(){return l8(e=>e.trim())}function rEe(){return l8(e=>e.toLowerCase())}function iEe(){return l8(e=>e.toUpperCase())}function aEe(){return l8(e=>ISe(e))}function oEe(e,t,n){return new e({type:`array`,element:t,...N3(n)})}function sEe(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...N3(n)})}function cEe(e,t){let n=lEe(t=>(t.addIssue=e=>{if(typeof e==`string`)t.issues.push(G3(e,t.value,n._zod.def));else{let r=e;r.fatal&&(r.continue=!1),r.code??=`custom`,`input`in r||(r.input=t.value),r.inst??=n,r.continue??=!n._zod.def.abort,t.issues.push(G3(r))}},e(t.value,t)),t);return n}function lEe(e,t){let n=new _6({check:`custom`,...N3(t)});return n._zod.check=e,n}function u8(e,...t){for(let n of t)for(let t of Reflect.ownKeys(n))Object.prototype.propertyIsEnumerable.call(n,t)&&b3(e,t,n[t]);return e}function d8(e){let t=e?.target??`draft-2020-12`;return t===`draft-4`&&(t=`draft-04`),t===`draft-7`&&(t=`draft-07`),{processors:e.processors??{},metadataRegistry:e?.metadata??i8,target:t,unrepresentable:e?.unrepresentable??`throw`,override:e?.override??(()=>{}),io:e?.io??`output`,counter:0,seen:new Map,sharedDefsExtractedFor:void 0,sharedEmitDoneFor:void 0,cycles:e?.cycles??`ref`,reused:e?.reused??`inline`,intersections:[],deferred:[],external:e?.external??void 0}}function f8(e,t,n,r,i){let a=typeof t.unrepresentable==`function`?t.unrepresentable({zodSchema:e,path:r.path,message:i}):t.unrepresentable;if(a===`any`)return!1;if(a===void 0||a===`throw`)throw Error(i);return Object.assign(n,a),!0}function p8(e,t,n={path:[],schemaPath:[]}){var r;let i=e._zod.def,a=t.seen.get(e);if(a)return a.count++,n.schemaPath.includes(e)&&(a.cycle=n.path),a.schema;let o={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,o),t.sharedDefsExtractedFor=void 0,t.sharedEmitDoneFor=void 0;let s=e._zod.toJSONSchema?.();if(s)o.schema=s;else{let r={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,o.schema,r);else{let n=o.schema,a=t.processors[i.type];if(!a)throw Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);a(e,t,n,r)}let a=e._zod.parent;a&&(o.ref||=a,p8(a,t,r),t.seen.get(a).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&u8(o.schema,c),t.io===`input`&&S8(e)&&(delete o.schema.examples,delete o.schema.default),t.io===`input`&&`_prefault`in o.schema&&((r=o.schema).default??(r.default=o.schema._prefault)),delete o.schema._prefault,t.seen.get(e).schema}function m8(e){return e.replace(/~/g,`~0`).replace(/\//g,`~1`)}function h8(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);if(e.external&&e.sharedDefsExtractedFor===e.external)return;let r=new Map;for(let t of e.seen.entries()){let n=e.metadataRegistry.get(t[0])?.id;if(n){let e=r.get(n);if(e&&e!==t[0])throw Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(n,t[0])}}let i=t=>{let r=e.target===`draft-2020-12`?`$defs`:`definitions`;if(e.external){let n=e.external.registry.get(t[0])?.id,i=e.external.uri??(e=>e);if(n)return{ref:i(n)};let a=t[1].defId??t[1].schema.id??`schema${e.counter++}`;return t[1].defId=a,{defId:a,ref:`${i(`__shared`)}#/${r}/${m8(a)}`}}let i=`#/${r}/`;if(t[1]===n&&!t[1].schema.id)return{ref:`#`};let a=t[1].schema.id??`__schema${e.counter++}`;return{defId:a,ref:i+m8(a)}},a=e=>{if(e[1].schema.$ref)return;let t=e[1],{ref:n,defId:r}=i(e);t.def={...t.schema},r&&(t.defId=r);let a=t.schema;for(let e in a)delete a[e];a.$ref=n};if(e.cycles===`throw`)for(let t of e.seen.entries()){let e=t[1];if(e.cycle)throw Error(`Cycle detected: #/${e.cycle?.join(`/`)}/<root>
207
-
208
- Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let n of e.seen.entries()){let r=n[1];if(t===n[0]){a(n);continue}if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){a(n);continue}}if(e.metadataRegistry.get(n[0])?.id){a(n);continue}if(r.cycle){a(n);continue}r.count>1&&e.reused===`ref`&&a(n)}e.external&&(e.sharedDefsExtractedFor=e.external)}function g8(e){let t=e.anyOf;if(!Array.isArray(t)||t.length===0||e.type!==void 0)return;let n=[];for(let e of t){if(!e||typeof e!=`object`)return;g8(e);let t=Object.keys(e);if(t.length!==1||t[0]!==`type`)return;let r=e.type;for(let e of Array.isArray(r)?r:[r]){if(typeof e!=`string`)return;n.includes(e)||n.push(e)}}delete e.anyOf,e.type=n.length===1?n[0]:n}var _8=new Set([`type`,`properties`,`required`,`additionalProperties`]),v8=[`oneOf`,`anyOf`];function y8(e){let t=e.additionalProperties;return t===void 0||t===!1||typeof t!=`object`||!t?null:Object.keys(t).length?t:null}function b8(e){let t=[];for(let n of e){if(typeof n!=`object`||n.type!==`object`)return null;for(let e in n)if(!_8.has(e))return null;t.push(n)}let n={},r=new Set;for(let e of t){for(let r in e.properties){if(Object.prototype.hasOwnProperty.call(n,r))continue;let e=[];for(let n of t){let t=n.properties?.[r]??y8(n);t!=null&&(e.some(e=>JSON.stringify(e)===JSON.stringify(t))||e.push(t))}b3(n,r,e.length===1?e[0]:b8(e)??{allOf:e})}for(let t of e.required??[])r.add(t)}let i={type:`object`,properties:n};if(r.size&&(i.required=[...r]),t.every(e=>e.additionalProperties===!1))i.additionalProperties=!1;else{let e=[];for(let n of t){let t=y8(n);t&&!e.some(e=>JSON.stringify(e)===JSON.stringify(t))&&e.push(t)}e.length===1?i.additionalProperties=e[0]:e.length>1&&(i.additionalProperties={allOf:e})}return i}function uEe(e){let t=e.allOf;if(!Array.isArray(t)||t.length<2)return;for(let t of _8)if(t in e)return;let n=t.filter(e=>v8.some(t=>Array.isArray(e[t]))),r=null;if(!n.length)r=b8(t);else{let e=n[0],i=v8.find(t=>Array.isArray(e[t]));if(Object.keys(e).length!==1)return;let a=t.filter(t=>t!==e),o=e[i].map(e=>b8([...a,e]));if(o.some(e=>!e))return;r={[i]:o}}r&&(delete e.allOf,u8(e,r))}function x8(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=t=>{let n=e.seen.get(t);if(n.ref===null)return;let i=n.def??n.schema,a={...i},o=n.ref;if(n.ref=null,o){r(o);let n=e.seen.get(o),s=n.schema;if(s.$ref&&(e.target===`draft-07`||e.target===`draft-04`||e.target===`openapi-3.0`)?(i.allOf=i.allOf??[],i.allOf.push(s)):u8(i,s),u8(i,a),t._zod.parent===o)for(let e in i)e!==`$ref`&&e!==`allOf`&&(e in a||delete i[e]);if(s.$ref&&n.def)for(let e in i)e!==`$ref`&&e!==`allOf`&&e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==o){r(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)e!==`$ref`&&e!==`allOf`&&e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};if(!e.external||e.sharedEmitDoneFor!==e.external){for(let t of[...e.seen.entries()].reverse())r(t[0]);if(e.target!==`openapi-3.0`)for(let t of e.seen.entries())g8(t[1].def??t[1].schema);for(let t of e.deferred)t();if(e.intersections.length){let t=new Map;for(let n of e.seen.values())for(let e of[n.schema,n.def]){let n=e?.allOf;if(!Array.isArray(n))continue;let r=t.get(n);r?r.push(e):t.set(n,[e])}for(let n of e.intersections)for(let e of t.get(n)??[])uEe(e)}}let i={};if(e.target===`draft-2020-12`?i.$schema=`https://json-schema.org/draft/2020-12/schema`:e.target===`draft-07`?i.$schema=`http://json-schema.org/draft-07/schema#`:e.target===`draft-04`?i.$schema=`http://json-schema.org/draft-04/schema#`:e.target,e.external?.uri){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}u8(i,n.defId?n.schema:n.def??n.schema);let a=e.metadataRegistry.get(t)?.id;a!==void 0&&i.id===a&&delete i.id;let o=e.external?.defs??{};if(!e.external||e.sharedEmitDoneFor!==e.external)for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,b3(o,e.defId,e.def))}e.external&&(e.sharedEmitDoneFor=e.external),e.external||Object.keys(o).length>0&&(e.target===`draft-2020-12`?i.$defs=o:i.definitions=o);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,"~standard",{value:{...t[`~standard`],jsonSchema:{input:C8(t,`input`,e.processors),output:C8(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function S8(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;if(r.type===`transform`)return!0;if(r.type===`array`)return S8(r.element,n);if(r.type===`set`)return S8(r.valueType,n);if(r.type===`lazy`)return S8(r.getter(),n);if(r.type===`promise`||r.type===`optional`||r.type===`nonoptional`||r.type===`nullable`||r.type===`readonly`||r.type==="default"||r.type===`prefault`||r.type===`catch`)return S8(r.innerType,n);if(r.type===`intersection`)return S8(r.left,n)||S8(r.right,n);if(r.type===`record`||r.type===`map`)return S8(r.keyType,n)||S8(r.valueType,n);if(r.type===`pipe`)return e._zod.traits.has(`$ZodCodec`)?!0:S8(r.in,n)||S8(r.out,n);if(r.type===`object`){for(let e in r.shape)if(S8(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(S8(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(S8(e,n))return!0;return!!(r.rest&&S8(r.rest,n))}return!1}var dEe=(e,t={})=>n=>{let r=d8({...n,processors:t});return p8(e,r),h8(r,e),x8(r,e)},C8=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=d8({...i??{},target:a,io:t,processors:n});return p8(e,o),h8(o,e),x8(o,e)},w8=(e,t,n)=>{(e[t]===void 0||n>e[t])&&(e[t]=n)},T8=(e,t,n)=>{(e[t]===void 0||n<e[t])&&(e[t]=n)},E8=(e,t)=>{w8(e,`minimum`,t),T8(e,`maximum`,t)},D8=(e,t)=>{e.multipleOf??=[],e.multipleOf.includes(t)||e.multipleOf.push(t)},O8=(e,t)=>{e.patterns??=new Set,e.patterns.add(t)},k8=(e,t)=>{e.mime=e.mime?e.mime.filter(e=>t.includes(e)):[...t]},A8=(e,t)=>{e.format=t,t.includes(`int`)&&(e.isInt=!0)},j8=(e,t)=>w8(e,`minimum`,t.minimum),M8=(e,t)=>T8(e,`maximum`,t.maximum),N8=e=>(t,n)=>{A8(t,n.format);let[r,i]=e[n.format];w8(t,`minimum`,r),T8(t,`maximum`,i)},fEe={greater_than:(e,t)=>w8(e,t.inclusive?`minimum`:`exclusiveMinimum`,t.value),less_than:(e,t)=>T8(e,t.inclusive?`maximum`:`exclusiveMaximum`,t.value),multiple_of:(e,t)=>D8(e,t.value),number_format:N8(BSe),bigint_format:N8(VSe),min_length:j8,max_length:M8,length_equals:(e,t)=>E8(e,t.length),min_size:j8,max_size:M8,size_equals:(e,t)=>E8(e,t.size),string_format:(e,t)=>{A8(e,t.format),t.pattern&&O8(e,t.pattern),(t.format===`base64`||t.format===`base64url`)&&(e.contentEncoding=t.format),(t.local||t.precision===-1)&&(e.laxFormat=!0)},mime_type:(e,t)=>k8(e,t.mime)};function P8(e){let t={},n=e._zod.def,r=e._zod.traits.has(`$ZodCheck`)?[e,...n.checks??[]]:n.checks??[];for(let e of r)fEe[e._zod.def.check]?.(t,e._zod.def);let i=e._zod.bag;i.minimum!==void 0&&w8(t,`minimum`,i.minimum),i.exclusiveMinimum!==void 0&&w8(t,`exclusiveMinimum`,i.exclusiveMinimum),i.maximum!==void 0&&T8(t,`maximum`,i.maximum),i.exclusiveMaximum!==void 0&&T8(t,`exclusiveMaximum`,i.exclusiveMaximum),i.multipleOf!==void 0&&D8(t,i.multipleOf),i.format!==void 0&&(t.format??=i.format,i.format.includes(`int`)&&(t.isInt=!0)),i.mime&&k8(t,i.mime);for(let e of i.patterns??[])O8(t,e);return t}var pEe={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},mEe=new Map([[k6,HCe],[A6,UCe]]),hEe=e=>mEe.get(e)??e,gEe=(e,t,n,r)=>{let i=n;i.type=`string`;let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:l,laxFormat:u}=P8(e);if(typeof a==`number`&&(i.minLength=a),typeof o==`number`&&(i.maxLength=o),s&&(i.format=pEe[s]??s,i.format===``&&delete i.format,(s===`time`||u)&&delete i.format),l&&(i.contentEncoding=l),c&&c.size>0){let e=[...c].map(hEe);e.length===1?i.pattern=e[0].source:e.length>1&&(i.allOf=[...e.map(e=>({...t.target===`draft-07`||t.target===`draft-04`||t.target===`openapi-3.0`?{type:`string`}:{},pattern:e.source}))])}},_Ee=(e,t,n,r)=>{n.not={}},vEe=(e,t,n,r)=>{let i=e._zod.def,a=h3(i.entries);if(a.length===0){n.not={};return}a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a},yEe=(e,t,n,r)=>{let i=e._zod.def;if(i.values.length===0){n.not={};return}let a=[];for(let o of i.values)if(o===void 0){if(f8(e,t,n,r,"Literal `undefined` cannot be represented in JSON Schema"))return}else if(typeof o==`bigint`){if(f8(e,t,n,r,`BigInt literals cannot be represented in JSON Schema`))return;a.push(Number(o))}else a.push(o);if(a.length!==0){if(a.length===1){let e=a[0];n.type=e===null?`null`:typeof e,t.target===`draft-04`||t.target===`openapi-3.0`?n.enum=[e]:n.const=e}else a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),a.every(e=>typeof e==`boolean`)&&(n.type=`boolean`),a.every(e=>e===null)&&(n.type=`null`),n.enum=a}},bEe=(e,t,n,r)=>{f8(e,t,n,r,`Custom types cannot be represented in JSON Schema`)},xEe=(e,t,n,r)=>{f8(e,t,n,r,`Transforms cannot be represented in JSON Schema`)},SEe=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=P8(e);typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=p8(a.element,t,{...r,path:[...r.path,`items`]})};function F8(e){let t=e._zod.def;return t.type===`pipe`&&t.in._zod.traits.has(`$ZodTransform`)?F8(t.out):t.type===`catch`?F8(t.innerType):e._zod.optin}var CEe=(e,t,n,r)=>{let i=n,a=e._zod.def,o=a.shape;if(Object.getOwnPropertySymbols(o).length&&f8(e,t,i,r,`Symbol keys cannot be represented in JSON Schema`))return;i.type=`object`,i.properties={};for(let e in o)b3(i.properties,e,p8(o[e],t,{...r,path:[...r.path,`properties`,e]}));let s=[];for(let e of Object.keys(o)){let n=a.shape[e];(t.io===`input`?F8(n)===void 0:n._zod.optout===void 0)&&s.push(e)}s.length>0&&(i.required=s),a.catchall?._zod.def.type===`never`?i.additionalProperties=!1:a.catchall?a.catchall&&(i.additionalProperties=p8(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},wEe=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>p8(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},TEe=(e,t,n,r)=>{let i=e._zod.def,a=p8(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=p8(i.right,t,{...r,path:[...r.path,`allOf`,1]}),s=e=>`allOf`in e&&Object.keys(e).length===1,c=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]];n.allOf=c,t.intersections.push(c)},EEe=(e,t,n,r)=>{let i=e._zod.def,a=p8(i.innerType,t,r),o=t.seen.get(e);t.target===`openapi-3.0`?(o.ref=i.innerType,n.nullable=!0):n.anyOf=[a,{type:`null`}]},DEe=(e,t,n,r)=>{let i=e._zod.def;p8(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},I8=Symbol();function L8(e,t,n,r,i){let a=!1,o=JSON.stringify(e,(e,t)=>typeof t==`bigint`?(a=!0,null):t);return a?(f8(t,n,r,i,`BigInt defaults cannot be represented in JSON Schema`),I8):JSON.parse(o)}var OEe=(e,t,n,r)=>{let i=e._zod.def;p8(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o=L8(i.defaultValue,e,t,n,r);o!==I8&&(n.default=o)},kEe=(e,t,n,r)=>{let i=e._zod.def;p8(i.innerType,t,r);let a=t.seen.get(e);if(a.ref=i.innerType,t.io!==`input`)return;let o=L8(i.defaultValue,e,t,n,r);o!==I8&&(n._prefault=o)},AEe=(e,t,n,r)=>{let i=e._zod.def;p8(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{f8(e,t,n,r,`Dynamic catch values are not supported in JSON Schema`);return}n.default=o},jEe=(e,t,n,r)=>{let i=e._zod.def,a=i.in._zod.traits.has(`$ZodTransform`),o=t.io===`input`?a?i.out:i.in:i.out;p8(o,t,r);let s=t.seen.get(e);s.ref=o},MEe=(e,t,n,r)=>{let i=e._zod.def;p8(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},R8=(e,t,n,r)=>{let i=e._zod.def;p8(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},z8=new WeakSet([Object.prototype,Error.prototype]);function B8(e,t,n){Object.defineProperty(e,t,{configurable:!0,enumerable:!1,get(){let e=n(this);return Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0})}})}var V8=e6(`ZodError`,(e,t)=>{lCe.init(e,t),e.name=`ZodError`;let n=Object.getPrototypeOf(e);z8.has(n)||(z8.add(n),B8(n,`format`,e=>t=>fCe(e,t)),B8(n,`flatten`,e=>t=>dCe(e,t)),B8(n,`addIssue`,e=>t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,_3,2)}),B8(n,`addIssues`,e=>t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,_3,2)}),Object.defineProperty(n,"isEmpty",{configurable:!0,enumerable:!1,get(){return this.issues.length===0}}))},void 0,{Parent:Error}),NEe=l6(V8),PEe=u6(V8),FEe=d6(V8),IEe=p6(V8),LEe=vCe(V8),REe=yCe(V8),zEe=bCe(V8),BEe=xCe(V8),VEe=SCe(V8),HEe=CCe(V8),UEe=wCe(V8),WEe=TCe(V8);function GEe(){r6.localeError||i6(_Te())}function H8(){r6.memoizer||i6({memoizer:mTe()})}var U8=e6(`ZodType`,(e,t)=>(GEe(),b6.init(e,t),e.def=t,e.type=t.type,e),{check(...e){let t=this.def;return this.clone(E3(t,{checks:[...t.checks??[],...e.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return M3(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(zDe(e,t))},superRefine(e,t){return this.check(BDe(e,t))},overwrite(e){return this.check(l8(e))},optional(){return n5(this)},exactOptional(){return EDe(this)},nullable(){return i5(this)},nullish(){return n5(i5(this))},nonoptional(e){return MDe(this,e)},array(){return vDe(this)},or(e){return Z8([this,e])},and(e){return SDe(this,e)},transform(e){return o5(this,TDe(e))},default(e){return kDe(this,e)},prefault(e){return jDe(this,e)},catch(e){return PDe(this,e)},pipe(e){return o5(this,e)},readonly(){return LDe(this)},describe(e){let t=this.clone();return i8.add(t,{description:e}),t},meta(...e){if(e.length===0)return i8.get(this);let t=this.clone();return i8.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e,...t){return t.length===0?e(this):e(this,...t)},get"~standard"(){return q3(this,`~standard`,{...S6(this),jsonSchema:{input:C8(this,`input`),output:C8(this,`output`)}})},set"~standard"(e){K3(this,`~standard`,e)},parse:function e(t,n){return NEe(this,t,n,{callee:e})},parseAsync:async function e(t,n){return await PEe(this,t,n,{callee:e})},safeParse(e,t){return FEe(this,e,t)},async safeParseAsync(e,t){return IEe(this,e,t)},get spa(){return this?.safeParseAsync},set spa(e){K3(this,`spa`,e)},validate(e,t){return hCe(this,e,t)},validateAsync(e,t){return _Ce(this,e,t)},encode:function e(t,n){return LEe(this,t,n,{callee:e})},decode:function e(t,n){return REe(this,t,n,{callee:e})},encodeAsync:async function e(t,n){return await zEe(this,t,n,{callee:e})},decodeAsync:async function e(t,n){return await BEe(this,t,n,{callee:e})},safeEncode(e,t){return VEe(this,e,t)},safeDecode(e,t){return HEe(this,e,t)},async safeEncodeAsync(e,t){return UEe(this,e,t)},async safeDecodeAsync(e,t){return WEe(this,e,t)},toJSONSchema(e){return dEe(this,{})(e)},get description(){return i8.get(this)?.description},get _def(){return this._zod.def}}),W8=e6(`_ZodString`,(e,t)=>{C6.init(e,t),U8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>gEe(e,t,n,r)},QSe({format:e=>P8(e).format??null,minLength:e=>P8(e).minimum??null,maxLength:e=>P8(e).maximum??null},{regex(...e){return this.check(YTe(...e))},includes(...e){return this.check(QTe(...e))},startsWith(...e){return this.check($Te(...e))},endsWith(...e){return this.check(eEe(...e))},min(...e){return this.check(s8(...e))},max(...e){return this.check(o8(...e))},length(...e){return this.check(c8(...e))},nonempty(...e){return this.check(s8(1,...e))},lowercase(e){return this.check(XTe(e))},uppercase(e){return this.check(ZTe(e))},trim(){return this.check(nEe())},normalize(...e){return this.check(tEe(...e))},toLowerCase(){return this.check(rEe())},toUpperCase(){return this.check(iEe())},slugify(){return this.check(aEe())}})),KEe=e6(`ZodString`,(e,t)=>{C6.init(e,t),W8.init(e,t)},{email(e){return this.check(STe(XEe,e))},url(e){return this.check(OTe(QEe,e))},jwt(e){return this.check(UTe(pDe,e))},emoji(e){return this.check(kTe($Ee,e))},guid(e){return this.check(CTe(ZEe,e))},uuid(e){return this.check(wTe(J8,e))},uuidv4(e){return this.check(TTe(J8,e))},uuidv6(e){return this.check(ETe(J8,e))},uuidv7(e){return this.check(DTe(J8,e))},nanoid(e){return this.check(ATe(eDe,e))},cuid(e){return this.check(jTe(tDe,e))},cuid2(e){return this.check(MTe(nDe,e))},ulid(e){return this.check(NTe(rDe,e))},base64(e){return this.check(BTe(uDe,e))},base64url(e){return this.check(VTe(dDe,e))},xid(e){return this.check(PTe(iDe,e))},ksuid(e){return this.check(FTe(aDe,e))},ipv4(e){return this.check(ITe(oDe,e))},ipv6(e){return this.check(LTe(sDe,e))},cidrv4(e){return this.check(RTe(cDe,e))},cidrv6(e){return this.check(zTe(lDe,e))},e164(e){return this.check(HTe(fDe,e))},datetime(e){return this.check(WTe(qEe,e))},date(e){return this.check(a8(q8,e))},time(e){return this.check(GTe(JEe,e))},duration(e){return this.check(KTe(YEe,e))}});function G8(e){return xTe(KEe,e)}var K8=e6(`ZodStringFormat`,(e,t)=>{w6.init(e,t),W8.init(e,t)}),qEe=e6(`ZodISODateTime`,(e,t)=>{Owe.init(e,t),K8.init(e,t)}),q8=e6(`ZodISODate`,(e,t)=>{kwe.init(e,t),K8.init(e,t)}),JEe=e6(`ZodISOTime`,(e,t)=>{Awe.init(e,t),K8.init(e,t)}),YEe=e6(`ZodISODuration`,(e,t)=>{jwe.init(e,t),K8.init(e,t)}),XEe=e6(`ZodEmail`,(e,t)=>{mwe.init(e,t),K8.init(e,t)}),ZEe=e6(`ZodGUID`,(e,t)=>{fwe.init(e,t),K8.init(e,t)}),J8=e6(`ZodUUID`,(e,t)=>{pwe.init(e,t),K8.init(e,t)}),QEe=e6(`ZodURL`,(e,t)=>{bwe.init(e,t),K8.init(e,t)}),$Ee=e6(`ZodEmoji`,(e,t)=>{xwe.init(e,t),K8.init(e,t)}),eDe=e6(`ZodNanoID`,(e,t)=>{Swe.init(e,t),K8.init(e,t)}),tDe=e6(`ZodCUID`,(e,t)=>{Cwe.init(e,t),K8.init(e,t)}),nDe=e6(`ZodCUID2`,(e,t)=>{wwe.init(e,t),K8.init(e,t)}),rDe=e6(`ZodULID`,(e,t)=>{Twe.init(e,t),K8.init(e,t)}),iDe=e6(`ZodXID`,(e,t)=>{Ewe.init(e,t),K8.init(e,t)}),aDe=e6(`ZodKSUID`,(e,t)=>{Dwe.init(e,t),K8.init(e,t)}),oDe=e6(`ZodIPv4`,(e,t)=>{Mwe.init(e,t),K8.init(e,t)}),sDe=e6(`ZodIPv6`,(e,t)=>{Pwe.init(e,t),K8.init(e,t)}),cDe=e6(`ZodCIDRv4`,(e,t)=>{Fwe.init(e,t),K8.init(e,t)}),lDe=e6(`ZodCIDRv6`,(e,t)=>{Lwe.init(e,t),K8.init(e,t)}),uDe=e6(`ZodBase64`,(e,t)=>{Rwe.init(e,t),K8.init(e,t)}),dDe=e6(`ZodBase64URL`,(e,t)=>{Bwe.init(e,t),K8.init(e,t)}),fDe=e6(`ZodE164`,(e,t)=>{Vwe.init(e,t),K8.init(e,t)}),pDe=e6(`ZodJWT`,(e,t)=>{Uwe.init(e,t),K8.init(e,t)}),mDe=e6(`ZodUnknown`,(e,t)=>{Wwe.init(e,t),U8.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function Y8(){return qTe(mDe)}var hDe=e6(`ZodNever`,(e,t)=>{Gwe.init(e,t),U8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>_Ee(e,t,n,r)});function gDe(e){return JTe(hDe,e)}var _De=e6(`ZodArray`,(e,t)=>{H8(),Kwe.init(e,t),U8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>SEe(e,t,n,r),e.element=t.element},{min(e,t){return this.check(s8(e,t))},nonempty(e){return this.check(s8(1,e))},max(e,t){return this.check(o8(e,t))},length(e,t){return this.check(c8(e,t))},unwrap(){return this.element}});function vDe(e,t){return oEe(_De,e,t)}var yDe=e6(`ZodObject`,(e,t)=>{H8(),Ywe.init(e,t),U8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>CEe(e,t,n,r),nCe(e,`shape`,e=>e._zod.def.shape,!1)},{keyof(){return $8(Object.keys(this._zod.def.shape))},catchall(e){return this.clone(E3(this._zod.def,{catchall:e}))},passthrough(){return this.clone(E3(this._zod.def,{catchall:Y8()}))},loose(){return this.clone(E3(this._zod.def,{catchall:Y8()}))},strict(){return this.clone(E3(this._zod.def,{catchall:gDe()}))},strip(){return this.clone(E3(this._zod.def,{catchall:void 0}))},extend(e){return WSe(this,e)},safeExtend(e){return GSe(this,e)},merge(e){return KSe(this,e)},pick(e){return HSe(this,e)},omit(e){return USe(this,e)},partial(...e){return L3(t5,this,e[0])},exactPartial(...e){return L3(r5,this,e[0],`exactPartial`)},required(...e){return qSe(a5,this,e[0])}});function X8(e,t){return new yDe({type:`object`,shape:e??{},...N3(t)})}var bDe=e6(`ZodUnion`,(e,t)=>{Xwe.init(e,t),U8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>wEe(e,t,n,r),e.options=t.options});function Z8(e,t){return new bDe({type:`union`,options:e,...N3(t)})}var xDe=e6(`ZodIntersection`,(e,t)=>{Zwe.init(e,t),U8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>TEe(e,t,n,r)});function SDe(e,t){return new xDe({type:`intersection`,left:e,right:t})}var Q8=e6(`ZodEnum`,(e,t)=>{Qwe.init(e,t),U8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>vEe(e,t,n,r),e.enum=t.entries,e.options=[...e._zod.values];let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new Q8({...t,checks:[],...N3(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new Q8({...t,checks:[],...N3(r),entries:i})}});function $8(e,t){return new Q8({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...N3(t)})}var CDe=e6(`ZodLiteral`,(e,t)=>{$we.init(e,t),U8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>yEe(e,t,n,r),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function e5(e,t){return new CDe({type:`literal`,values:Array.isArray(e)?e:[e],...N3(t)})}var wDe=e6(`ZodTransform`,(e,t)=>{H8(),eTe.init(e,t),U8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>xEe(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new n6(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(G3(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,`input`in t||(t.input=n.value),t.inst??=e,n.issues.push(G3(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n)):(n.value=i,n)}});function TDe(e){return new wDe({type:`transform`,transform:e})}var t5=e6(`ZodOptional`,(e,t)=>{z6.init(e,t),U8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>R8(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function n5(e){return new t5({type:`optional`,innerType:e})}var r5=e6(`ZodExactOptional`,(e,t)=>{tTe.init(e,t),U8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>R8(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function EDe(e){return new r5({type:`optional`,innerType:e})}var DDe=e6(`ZodNullable`,(e,t)=>{nTe.init(e,t),U8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>EEe(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function i5(e){return new DDe({type:`nullable`,innerType:e})}var ODe=e6(`ZodDefault`,(e,t)=>{rTe.init(e,t),U8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>OEe(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function kDe(e,t){return new ODe({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():A3(t)}})}var ADe=e6(`ZodPrefault`,(e,t)=>{iTe.init(e,t),U8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>kEe(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function jDe(e,t){return new ADe({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():A3(t)}})}var a5=e6(`ZodNonOptional`,(e,t)=>{aTe.init(e,t),U8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>DEe(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function MDe(e,t){return new a5({type:`nonoptional`,innerType:e,...N3(t)})}var NDe=e6(`ZodCatch`,(e,t)=>{oTe.init(e,t),U8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>AEe(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function PDe(e,t){return new NDe({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:iCe(t)})}var FDe=e6(`ZodPipe`,(e,t)=>{sTe.init(e,t),U8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>jEe(e,t,n,r),e.in=t.in,e.out=t.out});function o5(e,t){return new FDe({type:`pipe`,in:e,out:t})}var IDe=e6(`ZodReadonly`,(e,t)=>{cTe.init(e,t),U8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>MEe(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function LDe(e){return new IDe({type:`readonly`,innerType:e})}var RDe=e6(`ZodCustom`,(e,t)=>{lTe.init(e,t),U8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>bEe(e,t,n,r)});function zDe(e,t={}){return sEe(RDe,e,t)}function BDe(e,t){return cEe(e,t)}function s5(e){return a8(q8,e)}var c5=[`equals`,`notEquals`,`contains`,`notContains`,`startsWith`,`endsWith`],l5=[`equals`,`notEquals`,`greaterThan`,`lessThan`,`between`],u5=[`equals`,`notEquals`,`greaterThan`,`lessThan`,`between`],d5={equals:`Is`,notEquals:`Is not`,contains:`Contains`,notContains:`Does not contain`,startsWith:`Starts with`,endsWith:`Ends with`,greaterThan:`Is greater than`,lessThan:`Is less than`,between:`Is between`},VDe=X8({filterOperator:$8(u5),filterValueFrom:Z8([e5(``),s5()]),filterValueTo:Z8([e5(``),s5()])}),HDe=X8({filterOperator:$8(c5),filterValue:G8()}),UDe=X8({filterOperator:$8(l5),filterValueFrom:G8(),filterValueTo:G8()}),f5=({className:e,children:t,ref:n,tone:r,...i})=>{let a=n7().getValue(),o=typeof r==`function`?r(a):r;return(0,L.jsxs)(Zb,{variant:`soft`,className:Q(``,e),ref:n,tone:o,...i,children:[t,a]})},p5=({showDivider:e=!0,className:t,ref:n,...r})=>{let i=t7();return i.state.viewMode===`grid`?(0,L.jsx)(i.Subscribe,{selector:e=>e,children:()=>(0,L.jsx)(`ul`,{className:Q(`grid auto-rows-fr grid-cols-[repeat(auto-fill,minmax(252px,1fr))] gap-sm overflow-y-auto`,t),children:i.getRowModel().rows.map(e=>(0,L.jsx)(`li`,{className:`min-w-0`,children:e.getVisibleCells().map(e=>(0,L.jsx)(i.AppCell,{cell:e,children:e=>(0,L.jsx)(i.FlexRender,{cell:e})},e.id))},e.id))})}):(0,L.jsx)(i.Subscribe,{selector:e=>e,children:()=>(0,L.jsx)(`tbody`,{className:Q(e&&`divide-y divide-border`,`overflow-y-auto`,t),ref:n,...r,children:i.getRowModel().rows.map(e=>(0,L.jsx)(`tr`,{style:{backgroundColor:e.getIsSelected()?`var(--color-neutral-container-high)`:`transparent`},children:e.getVisibleCells().map(e=>(0,L.jsx)(i.AppCell,{cell:e,children:e=>(0,L.jsx)(`td`,{style:{width:e.column.getSize()},className:Q(`h-xl px-xs first:rounded-l-xl last:rounded-r-xl`,t),children:(0,L.jsx)(i.FlexRender,{cell:e})})},e.id))},e.id))})})},m5=({className:e,children:t,ref:n,...r})=>{let i=n7(),a=t7(),o=i.row;return(0,L.jsx)(a.Subscribe,{selector:e=>e.rowSelection,children:()=>(0,L.jsx)(KI,{"aria-label":`Select row`,checked:o.getIsSelected()||o.getCanSelectSubRows()&&o.getIsAllSubRowsSelected(),disabled:!o.getCanSelect(),indeterminate:o.getIsSomeSelected(),onCheckedChange:e=>o.toggleSelected(e),className:Q(``,e),ref:n,...r,children:t})})},h5=({className:e,children:t,ref:n,...r})=>{let i=t7(),a=e=>{i.getColumn(e)?.toggleVisibility()};return(0,L.jsxs)(a3,{children:[(0,L.jsx)(p3,{className:Q(`shrink-0`,e),ref:n,...r,children:t}),(0,L.jsx)(c3,{children:i.getAllColumns().flatMap(e=>e.getCanHide()?(0,L.jsx)(o3,{checked:e.getIsVisible(),onCheckedChange:()=>a(e.id),children:e.columnDef.header||e.id},e.id):null)})]})},g5=({className:e,children:t,ref:n,...r})=>(0,L.jsx)(`div`,{className:Q(`flex flex-col gap-xs`,e),ref:n,...r,children:t}),WDe=({className:e,children:t,ref:n,...r})=>{let i=n7();return(0,L.jsxs)(`span`,{className:Q(``,e),ref:n,...r,children:[t,i.getValue().toLocaleDateString()]})},_5=({column:e,className:t,children:n,ref:r,...i})=>{let a=t7(),o=a.options.meta?.translations?.filterOperatorLabels,s=a.options.meta?.translations?.buttonLabels??{reset:`Reset`,apply:`Apply`},c=e.getFilterValue(),l=bK({defaultValues:{filterOperator:c?.operator??`equals`,filterValueFrom:c?.date[0]??``,filterValueTo:c?.date[1]??``},validators:{onSubmit:VDe},onSubmit:({value:t})=>{e.setFilterValue({operator:t.filterOperator,date:[t.filterValueFrom,t.filterValueTo]})}});return(0,L.jsx)(uK,{onSubmit:async e=>{e.preventDefault(),e.stopPropagation(),await l.handleSubmit()},onReset:()=>{e.setFilterValue(void 0),l.reset()},className:Q(``,t),ref:r,...i,children:(0,L.jsxs)(l.AppForm,{children:[n,(0,L.jsx)(l.FormErrors,{}),(0,L.jsx)(l.FormSet,{children:(0,L.jsx)(l.FormSetHeading,{children:(0,L.jsx)(l.FormSetContent,{children:(0,L.jsx)(zU,{children:(0,L.jsx)(l.AppField,{name:`filterOperator`,children:e=>(0,L.jsxs)(zU,{children:[(0,L.jsx)(e.FieldErrors,{}),(0,L.jsx)(e.FieldRadioGroup,{children:u5.map(t=>(0,L.jsxs)(e.FieldSet,{children:[(0,L.jsx)(XG,{value:t,variant:`inSurface`,children:o?.[t]??d5[t]}),e.state.value===t&&(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(l.AppField,{name:`filterValueFrom`,children:e=>(0,L.jsxs)(zU,{children:[(0,L.jsx)(e.FieldErrors,{}),(0,L.jsx)(e.FieldInput,{type:`date`,variant:`secondary`})]})}),t===`between`&&(0,L.jsx)(l.AppField,{name:`filterValueTo`,children:e=>(0,L.jsxs)(zU,{children:[(0,L.jsx)(e.FieldErrors,{}),(0,L.jsx)(e.FieldInput,{type:`date`,variant:`secondary`})]})})]})]},t))})]})})})})})}),(0,L.jsxs)(l.FormFooter,{children:[(0,L.jsx)(l.FormReset,{children:s.reset}),(0,L.jsx)(l.FormSubmit,{children:s.apply})]})]})})},v5=({column:e,className:t,children:n,ref:r,...i})=>{let a=t7().options.meta?.translations?.filterOperatorLabels,o=e.getFilterValue();return(0,L.jsxs)(_V,{children:[(0,L.jsx)(CV,{className:Q(``,t),ref:r,...i,children:(0,L.jsxs)(Gb,{tone:`neutral`,size:`extraSmall`,variant:`soft`,children:[(0,L.jsx)(Di,{}),(0,L.jsx)(`span`,{children:e.columnDef.header||e.id}),(0,L.jsx)(`span`,{className:`lowercase`,children:a?.[o.operator]??d5[o.operator]}),(0,L.jsx)(`span`,{children:Array.isArray(o.date)&&o.date[1]!==``?o.date.join(` - `):o.date})]})}),(0,L.jsx)(xV,{children:(0,L.jsxs)(wV,{children:[(0,L.jsx)(SV,{children:e.columnDef.header||e.id}),(0,L.jsxs)(TV,{children:[n,(0,L.jsx)(_5,{column:e})]})]})})]},e.id)},y5=({column:e,className:t,children:n,ref:r,...i})=>{let a=t7(),o=a.options.meta?.translations?.filterOperatorLabels,s=a.options.meta?.translations?.buttonLabels??{reset:`Reset`,apply:`Apply`},c=e.getFilterValue(),l=bK({defaultValues:{filterOperator:c?.operator??`equals`,filterValueFrom:c?.number[0]??``,filterValueTo:c?.number[1]??``},validators:{onSubmit:UDe},onSubmit:({value:t})=>{e.setFilterValue({operator:t.filterOperator,number:[t.filterValueFrom,t.filterValueTo]})}});return(0,L.jsx)(uK,{onSubmit:async e=>{e.preventDefault(),e.stopPropagation(),await l.handleSubmit()},onReset:()=>{e.setFilterValue(void 0),l.reset({filterOperator:`equals`,filterValueFrom:``,filterValueTo:``})},className:Q(``,t),ref:r,...i,children:(0,L.jsxs)(l.AppForm,{children:[n,(0,L.jsx)(l.FormErrors,{}),(0,L.jsx)(l.FormSet,{children:(0,L.jsx)(l.FormSetContent,{children:(0,L.jsx)(l.AppField,{name:`filterOperator`,children:t=>(0,L.jsxs)(zU,{children:[(0,L.jsx)(t.FieldErrors,{}),(0,L.jsx)(t.FieldRadioGroup,{children:l5.map(n=>(0,L.jsxs)(t.FieldSet,{children:[(0,L.jsx)(XG,{value:n,variant:`inSurface`,children:o?.[n]??d5[n]}),t.state.value===n&&(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(l.AppField,{name:`filterValueFrom`,children:t=>(0,L.jsxs)(zU,{children:[(0,L.jsx)(t.FieldErrors,{}),(0,L.jsx)(t.FieldInput,{"aria-label":`${e.id} filter value`,type:`number`,variant:`secondary`})]})}),n===`between`&&(0,L.jsx)(l.AppField,{name:`filterValueTo`,children:t=>(0,L.jsxs)(zU,{children:[(0,L.jsx)(t.FieldErrors,{}),(0,L.jsx)(t.FieldInput,{"aria-label":`${e.id} maximum filter value`,type:`number`,variant:`secondary`})]})})]})]},n))})]})})})}),(0,L.jsxs)(l.FormFooter,{children:[(0,L.jsx)(l.FormReset,{children:s.reset}),(0,L.jsx)(l.FormSubmit,{children:s.apply})]})]})})},b5=({column:e,className:t,children:n,ref:r,...i})=>{let a=t7().options.meta?.translations?.filterOperatorLabels,o=e.getFilterValue(),s=o.operator===`between`?o.number.filter(Boolean).join(` - `):o.number[0];return(0,L.jsxs)(_V,{children:[(0,L.jsx)(CV,{className:Q(``,t),ref:r,...i,children:(0,L.jsxs)(Gb,{tone:`neutral`,size:`extraSmall`,variant:`soft`,children:[(0,L.jsx)(Di,{}),(0,L.jsx)(`span`,{children:e.columnDef.header||e.id}),(0,L.jsx)(`span`,{className:`font-light lowercase`,children:a?.[o.operator]??d5[o.operator]}),(0,L.jsx)(`span`,{children:s}),n]})}),(0,L.jsxs)(xV,{children:[(0,L.jsx)(wV,{children:(0,L.jsx)(SV,{children:e.columnDef.header||e.id})}),(0,L.jsx)(TV,{children:(0,L.jsx)(y5,{column:e})})]})]})},x5=e=>typeof e==`string`||typeof e==`number`||typeof e==`boolean`,S5=e=>Array.isArray(e)&&e.every(x5),C5=({column:e,className:t,children:n,ref:r,...i})=>{let a=t7(),o=e.getFilterValue(),s=a.options.meta?.translations?.buttonLabels??{reset:`Reset`,apply:`Apply`},[c,l]=(0,_.useState)(S5(o)?o:[]),u=Array.from(e.getFacetedUniqueValues().keys()).filter(x5).sort((e,t)=>String(e).localeCompare(String(t)));return(0,L.jsxs)(uK,{className:Q(``,t),onReset:()=>{e.setFilterValue(void 0),l([])},onSubmit:t=>{t.preventDefault(),t.stopPropagation(),c.length>0&&e.setFilterValue(c)},ref:r,...i,children:[n,(0,L.jsxs)(nL,{multiple:!0,value:c,onValueChange:e=>{S5(e)&&l(e)},children:[(0,L.jsxs)(cL,{"aria-label":`${e.id} filter value`,variant:`secondary`,children:[(0,L.jsx)(lL,{placeholder:`Select values`,children:e=>S5(e)?e.map(String).join(`, `):`Select values`}),(0,L.jsx)(aL,{children:(0,L.jsx)(mi,{weight:`bold`})})]}),(0,L.jsx)(oL,{alignItemWithTrigger:!1,sideOffset:8,children:(0,L.jsx)(iL,{children:u.map(e=>(0,L.jsx)(rL,{value:e,children:(0,L.jsx)(pL,{children:String(e)})},`${typeof e}:${String(e)}`))})})]}),(0,L.jsxs)(pK,{children:[(0,L.jsx)(Gb,{className:`w-full`,tone:`neutral`,type:`reset`,variant:`outline`,children:s.reset}),(0,L.jsx)(Gb,{className:`w-full`,disabled:c.length===0,type:`submit`,children:s.apply})]})]})},w5=({column:e,className:t,children:n,ref:r,...i})=>{let a=e.getFilterValue(),o=e.columnDef.header||e.id;return(0,L.jsxs)(_V,{children:[(0,L.jsx)(CV,{className:Q(``,t),ref:r,...i,children:(0,L.jsxs)(Gb,{tone:`neutral`,size:`extraSmall`,variant:`soft`,children:[(0,L.jsx)(Di,{}),(0,L.jsx)(`span`,{children:o}),(0,L.jsx)(`span`,{className:`font-light lowercase`,children:a.map(String).join(`, `)}),n]})}),(0,L.jsxs)(xV,{children:[(0,L.jsx)(wV,{children:(0,L.jsx)(SV,{children:o})}),(0,L.jsx)(TV,{children:(0,L.jsx)(C5,{column:e})})]})]})},T5=({column:e,className:t,children:n,ref:r,...i})=>{let a=t7(),o=a.options.meta?.translations?.filterOperatorLabels,s=a.options.meta?.translations?.buttonLabels??{reset:`Reset`,apply:`Apply`},c=e.getFilterValue(),l=bK({defaultValues:{filterOperator:c?.operator??`contains`,filterValue:c?.value??``},validators:{onSubmit:HDe},onSubmit:({value:t})=>{e.setFilterValue({operator:t.filterOperator,value:t.filterValue})}});return(0,L.jsx)(uK,{onSubmit:async e=>{e.preventDefault(),e.stopPropagation(),await l.handleSubmit()},onReset:()=>{e.setFilterValue(void 0),l.reset({filterOperator:`contains`,filterValue:``})},className:Q(``,t),ref:r,...i,children:(0,L.jsxs)(l.AppForm,{children:[n,(0,L.jsx)(l.FormErrors,{}),(0,L.jsx)(l.FormSet,{children:(0,L.jsx)(l.FormSetContent,{children:(0,L.jsx)(l.AppField,{name:`filterOperator`,children:t=>(0,L.jsxs)(zU,{children:[(0,L.jsx)(t.FieldErrors,{}),(0,L.jsx)(t.FieldRadioGroup,{children:c5.map(n=>(0,L.jsxs)(t.FieldSet,{children:[(0,L.jsx)(XG,{value:n,variant:`inSurface`,children:o?.[n]??d5[n]}),t.state.value===n&&(0,L.jsx)(l.AppField,{name:`filterValue`,children:t=>(0,L.jsxs)(zU,{children:[(0,L.jsx)(t.FieldErrors,{}),(0,L.jsx)(t.FieldInput,{"aria-label":`${e.id} filter value`,variant:`secondary`})]})})]},n))})]})})})}),(0,L.jsxs)(l.FormFooter,{children:[(0,L.jsx)(l.FormReset,{children:s.reset}),(0,L.jsx)(l.FormSubmit,{children:s.apply})]})]})})},E5=({column:e,className:t,children:n,ref:r,...i})=>{let a=t7().options.meta?.translations?.filterOperatorLabels,o=e.getFilterValue();return(0,L.jsxs)(_V,{children:[(0,L.jsx)(CV,{className:Q(``,t),ref:r,...i,children:(0,L.jsxs)(Gb,{tone:`neutral`,size:`extraSmall`,variant:`soft`,children:[(0,L.jsx)(Di,{}),(0,L.jsx)(`span`,{children:e.columnDef.header||e.id}),(0,L.jsx)(`span`,{className:`font-light lowercase`,children:a?.[o.operator]??d5[o.operator]}),(0,L.jsx)(`span`,{children:o.value}),n]})}),(0,L.jsxs)(xV,{children:[(0,L.jsx)(wV,{children:(0,L.jsx)(SV,{children:e.columnDef.header||e.id})}),(0,L.jsx)(TV,{children:(0,L.jsx)(T5,{column:e})})]})]})},D5=({className:e,children:t,ref:n,...r})=>{let i=t7();return(0,L.jsx)(i.Subscribe,{selector:e=>e.columnFilters,children:()=>i.getAllColumns().some(e=>e.getIsFiltered())?(0,L.jsxs)(`ul`,{className:Q(`flex flex-wrap items-center gap-xs`,e),ref:n,...r,children:[t&&(0,L.jsx)(`li`,{className:`contents`,children:t}),i.getAllColumns().map(e=>{if(!e.getIsFiltered())return null;let t=null;switch(e.columnDef.meta?.filterVariant){case`date`:t=(0,L.jsx)(v5,{column:e});break;case`number`:t=(0,L.jsx)(b5,{column:e});break;case`select`:t=(0,L.jsx)(w5,{column:e});break;case`string`:t=(0,L.jsx)(E5,{column:e});break;default:return null}return(0,L.jsx)(`li`,{className:`contents`,children:t},e.id)})]}):null})},O5=({className:e,children:t,ref:n,...r})=>{let i=t7();return(0,L.jsxs)(a3,{modal:!1,children:[(0,L.jsx)(p3,{className:Q(`shrink-0`,e),ref:n,...r,children:t}),(0,L.jsx)(c3,{align:`end`,className:``,children:i.getAllColumns().filter(e=>e.getCanFilter()).map(t=>{let{filterVariant:n}=t.columnDef.meta??{};return(0,L.jsxs)(_V,{children:[(0,L.jsx)(CV,{nativeButton:!1,children:(0,L.jsx)(s3,{closeOnClick:!1,children:t.columnDef.header||t.id})}),(0,L.jsxs)(xV,{side:`inline-end`,align:`start`,className:Q(``,e),onKeyDownCapture:e=>e.stopPropagation(),children:[(0,L.jsx)(wV,{children:(0,L.jsx)(SV,{children:t.columnDef.header||t.id})}),(0,L.jsx)(TV,{children:(()=>{switch(n){case`date`:return(0,L.jsx)(_5,{column:t});case`number`:return(0,L.jsx)(y5,{column:t});case`select`:return(0,L.jsx)(C5,{column:t});case`string`:return(0,L.jsx)(T5,{column:t});default:return null}})()})]})]},t.id)})})]})},k5=({className:e,children:t,ref:n,...r})=>{let i=t7();return(0,L.jsxs)(Gb,{"aria-label":`First page`,className:Q(`shrink-0`,e),disabled:!i.getCanPreviousPage(),onClick:()=>{i.setPageIndex(0)},ref:n,variant:`ghost`,tone:`neutral`,...r,children:[t,(0,L.jsx)(ui,{weight:`bold`})]})},A5=({className:e,children:t,ref:n,...r})=>{let i=t7();return(0,L.jsxs)(`tfoot`,{className:Q(``,e),ref:n,...r,children:[t,i.getFooterGroups().map(e=>(0,L.jsx)(`tr`,{children:e.headers.map(e=>(0,L.jsx)(i.AppFooter,{header:e,children:e=>(0,L.jsx)(`td`,{style:{width:e.getSize()},colSpan:e.colSpan,children:(0,L.jsx)(i.FlexRender,{footer:e})})},e.id))},e.id))]})},j5=({className:e,children:t,ref:n,...r})=>{let i=t7();return i.state.viewMode===`grid`?null:(0,L.jsxs)(`thead`,{className:Q(`bg-neutral-container`),ref:n,...r,children:[t,i.getHeaderGroups().map(t=>(0,L.jsx)(`tr`,{children:t.headers.map(t=>(0,L.jsx)(i.AppHeader,{header:t,selector:e=>e.sorting,children:t=>(0,L.jsx)(`th`,{style:{width:t.getSize()},className:Q(`container p-xs text-left style-text-default-0 text-neutral-on-container-muted transition-colors first:rounded-l-xl last:rounded-r-xl`,t.column.getCanSort()&&`hover:cursor-pointer hover:bg-neutral-container-high hover:*:text-neutral-on-container`,t.isPlaceholder&&`cursor-default`,e),colSpan:t.colSpan,onClick:t.column.getToggleSortingHandler(),children:t.isPlaceholder?null:(0,L.jsxs)(`div`,{className:Q(`flex items-center justify-between gap-2xs whitespace-nowrap [&_svg]:size-sm`,t.column.getCanSort()&&`select-none hover:cursor-pointer`),children:[(0,L.jsx)(`div`,{className:`flex items-center gap-2xs`,children:(0,L.jsx)(i.FlexRender,{header:t})}),{asc:(0,L.jsx)(Li,{weight:`bold`}),desc:(0,L.jsx)(Ii,{weight:`bold`})}[t.column.getIsSorted()]??(t.column.getCanSort()?(0,L.jsx)(Oi,{weight:`bold`}):null)]})},t.id)},t.id))},t.id))]})},M5=({className:e,ref:t,...n})=>{let r=n7();return(0,L.jsx)(`img`,{alt:``,src:r.getValue(),className:Q(`my-xs size-xl`,e),ref:t,...n})},N5=({className:e,children:t,ref:n,...r})=>{let i=t7();return(0,L.jsxs)(Gb,{"aria-label":`Last page`,className:Q(`shrink-0`,e),disabled:!i.getCanNextPage(),onClick:()=>{i.setPageIndex(i.getPageCount()-1)},ref:n,variant:`ghost`,tone:`neutral`,...r,children:[t,(0,L.jsx)(di,{weight:`bold`})]})},P5=({sticky:e=!1,className:t,children:n,ref:r,...i})=>(0,L.jsx)(`div`,{className:Q(`flex w-full items-center justify-between gap-md`,e&&`sticky bottom-0 z-10 bg-inherit`,t),ref:r,...i,children:n}),F5=({className:e,children:t,ref:n,...r})=>{let i=t7();return(0,L.jsxs)(Gb,{"aria-label":`Next page`,className:Q(`shrink-0`,e),disabled:!i.getCanNextPage(),onClick:()=>{i.nextPage()},ref:n,variant:`ghost`,tone:`neutral`,...r,children:[t,(0,L.jsx)(fi,{weight:`bold`})]})},I5=({className:e,children:t,ref:n,...r})=>{let i=n7();return(0,L.jsxs)(`span`,{className:Q(``,e),ref:n,...r,children:[t,i.getValue().toLocaleString()]})},L5=({className:e,children:t,ref:n,...r})=>(0,L.jsx)(`div`,{className:Q(`inline-flex items-center justify-center gap-3xs`,e),ref:n,...r,children:t}),R5=({min:e=3,max:t=1,className:n,children:r,ref:i,...a})=>{let o=t7(),s=e=>{o.setPageIndex(e)};return(0,L.jsx)(o.Subscribe,{selector:e=>e.pagination,children:c=>{let l=o.getPageCount(),u=e=>e===c.pageIndex;return(0,L.jsxs)(`div`,{className:Q(`flex items-center gap-3xs`,n),ref:i,...a,children:[r,Array.from({length:e}).map((e,t)=>t<l?(0,L.jsx)(Gb,{tone:`neutral`,size:`iconMedium`,variant:u(t)?`fill`:`ghost`,className:`shrink-0`,onClick:()=>s(t),children:t+1},t):null),l>e+t&&(0,L.jsxs)(a3,{children:[(0,L.jsx)(p3,{children:(0,L.jsx)(Gb,{"aria-label":`More pages`,tone:`neutral`,size:`iconMedium`,variant:`ghost`,className:`shrink-0`,children:(0,L.jsx)(yi,{weight:`bold`})})}),(0,L.jsx)(c3,{align:`center`,children:(0,L.jsx)(l3,{value:c.pageIndex,onValueChange:s,className:`max-h-[200px] overflow-y-auto`,children:Array.from({length:l-e-t}).map((t,n)=>{let r=e+n;return(0,L.jsx)(u3,{value:r,closeOnClick:!0,children:r+1},r)})})})]}),Array.from({length:t}).map((n,r)=>{let i=l-t+r;return i<e?null:(0,L.jsx)(Gb,{tone:`neutral`,size:`iconMedium`,variant:u(i)?`fill`:`ghost`,className:`shrink-0`,onClick:()=>s(i),children:i+1},r)})]})}})},z5=({className:e,children:t,ref:n,...r})=>{let i=t7();return(0,L.jsxs)(Gb,{"aria-label":`Previous page`,className:Q(`shrink-0`,e),disabled:!i.getCanPreviousPage(),onClick:()=>{i.previousPage()},ref:n,variant:`ghost`,tone:`neutral`,...r,children:[t,(0,L.jsx)(li,{weight:`bold`})]})},B5=({className:e,children:t,ref:n,...r})=>{let i=t7(),a=e=>{i.setGlobalFilter(String(e.target.value))};return(0,L.jsx)(i.Subscribe,{selector:e=>e.globalFilter,children:i=>(0,L.jsxs)(uV,{children:[(0,L.jsx)(fV,{children:(0,L.jsx)(Mi,{weight:`bold`})}),(0,L.jsx)(pV,{className:Q(``,e),onChange:a,ref:n,value:i??``,...r,children:t})]})})},V5=({className:e,children:t,ref:n,...r})=>{let i=t7();return(0,L.jsx)(i.Subscribe,{selector:e=>e.rowSelection,children:()=>{let a=i.getIsAllRowsSelected();return(0,L.jsx)(KI,{"aria-label":`Select all rows`,checked:a,indeterminate:!a&&i.getIsSomeRowsSelected(),onCheckedChange:e=>i.toggleAllRowsSelected(e),className:Q(``,e),ref:n,...r,children:t})}})},H5=({className:e,children:t,ref:n,...r})=>{let i=p7(),a=i.options.meta?.translations?.buttonLabels??{},o=a.ascending??`Ascending`,s=a.descending??`Descending`,c=(e,t)=>{let n=i.getColumn(e);if(n?.getIsSorted()===t){n?.clearSorting();return}n?.toggleSorting(t===`desc`,n.getCanMultiSort())};return(0,L.jsxs)(a3,{children:[(0,L.jsx)(p3,{className:Q(`shrink-0`,e),ref:n,...r,children:t}),(0,L.jsx)(c3,{align:`end`,children:(0,L.jsx)(i.Subscribe,{selector:e=>e.sorting,children:()=>i.getAllColumns().filter(e=>e.getCanSort()).map(e=>(0,L.jsxs)(d3,{children:[(0,L.jsx)(f3,{children:e.columnDef.header||e.id}),(0,L.jsxs)(c3,{children:[(0,L.jsxs)(o3,{checked:e.getIsSorted()===`asc`,onClick:()=>c(e.id,`asc`),children:[(0,L.jsx)(Li,{weight:`bold`}),o]}),(0,L.jsxs)(o3,{checked:e.getIsSorted()===`desc`,onClick:()=>c(e.id,`desc`),children:[(0,L.jsx)(Ii,{weight:`bold`}),s]})]})]},e.id))})})]})},U5=({column:e,className:t,children:n,ref:r,...i})=>{let a=t7(),o=e.getIsSorted(),s=a.options.meta?.translations?.buttonLabels??{},c=s.ascending??`Ascending`,l=s.descending??`Descending`;return o?(0,L.jsx)(H5,{className:Q(``,t),ref:r,...i,children:(0,L.jsxs)(Gb,{tone:`neutral`,size:`extraSmall`,variant:`soft`,children:[o===`asc`?(0,L.jsx)(Li,{}):(0,L.jsx)(Ii,{}),(0,L.jsx)(`span`,{children:e.columnDef.header||e.id}),(0,L.jsx)(`span`,{className:`font-light lowercase`,children:o===`asc`?c:l}),n]})}):null},W5=({className:e,children:t,ref:n,...r})=>{let i=t7();return i.getAllColumns().some(e=>e.getIsSorted())?(0,L.jsx)(i.Subscribe,{selector:e=>e.sorting,children:()=>(0,L.jsxs)(`ul`,{className:Q(`flex flex-wrap items-center gap-xs`,e),ref:n,...r,children:[t&&(0,L.jsx)(`li`,{className:`contents`,children:t}),i.getAllColumns().map(e=>e.getIsSorted()?(0,L.jsx)(`li`,{className:`contents`,children:(0,L.jsx)(U5,{column:e})},e.id):null)]})}):null},G5=({className:e,children:t,ref:n,...r})=>{let i=n7();return(0,L.jsxs)(`span`,{className:Q(``,e),ref:n,...r,children:[t,i.getValue()]})},K5=({sticky:e=!1,className:t,children:n,ref:r,...i})=>(0,L.jsx)(`div`,{className:Q(`flex items-center gap-3xs`,e&&`sticky top-0 z-10`,t),ref:r,...i,children:n}),GDe=({className:e,children:t,ref:n,...r})=>{let i=t7(),a=i.state.viewMode===`grid`;return(0,L.jsx)(Gb,{"aria-label":`Toggle view mode`,onClick:()=>{i.toggleViewMode()},className:Q(`shrink-0`,e),ref:n,...r,children:t(a)})},q5=({className:e,children:t,ref:n,...r})=>t7().state.viewMode===`grid`?(0,L.jsx)(`div`,{className:Q(`size-full`,e),ref:n,...r,children:t}):(0,L.jsx)(`table`,{className:Q(`size-full`,e),ref:n,...r,children:t}),J5=eY({filter:(e,t)=>t.includes(e),autoRemove:e=>!e?.length}),Y5=e=>{if(!e)return null;let t=new Date(e);return Number.isNaN(t.getTime())?null:Date.UTC(t.getFullYear(),t.getMonth(),t.getDate())},X5=eY({filter:(e,t)=>{let{operator:n,from:r,to:i}=t;switch(n){case`equals`:return r!==null&&e===r;case`notEquals`:return r!==null&&e!==r;case`greaterThan`:return r!==null&&e>r;case`lessThan`:return r!==null&&e<r;case`between`:return r!==null&&i!==null&&e>=r&&e<=i;default:return!0}},resolveFilterValue:e=>({operator:e.operator,from:Y5(e.date[0]),to:Y5(e.date[1])}),resolveDataValue:e=>{if(e instanceof Date)return Date.UTC(e.getFullYear(),e.getMonth(),e.getDate());if(typeof e==`number`){let t=new Date(e);return Date.UTC(t.getFullYear(),t.getMonth(),t.getDate())}if(typeof e==`string`){let t=new Date(e);return Number.isNaN(t.getTime())?0:Date.UTC(t.getFullYear(),t.getMonth(),t.getDate())}return 0},autoRemove:e=>!e||!e.date[0]&&!e.date[1]}),Z5=eY({filter:(e,t)=>{let{operator:n,value:r}=t,i=e.toLocaleLowerCase(),a=r.toLocaleLowerCase();switch(n){case`equals`:return i===a;case`notEquals`:return i!==a;case`contains`:return i.includes(a);case`notContains`:return!i.includes(a);case`startsWith`:return i.startsWith(a);case`endsWith`:return i.endsWith(a);default:return!0}},resolveDataValue:e=>typeof e==`string`||typeof e==`number`||typeof e==`boolean`?String(e):``,autoRemove:e=>!e||e.value===``}),Q5=e=>{if(e.trim()===``)return null;let t=Number(e);return Number.isFinite(t)?t:null},$5=eY({filter:(e,t)=>{let{operator:n,from:r,to:i}=t;switch(n){case`equals`:return r!==null&&e===r;case`notEquals`:return r!==null&&e!==r;case`greaterThan`:return r!==null&&e>r;case`lessThan`:return r!==null&&e<r;case`between`:return(r===null||e>=r)&&(i===null||e<=i);default:return!0}},resolveFilterValue:e=>{let t=Q5(e.number[0]),n=Q5(e.number[1]);return t!==null&&n!==null&&t>n?{operator:e.operator,from:n,to:t}:{operator:e.operator,from:t,to:n}},resolveDataValue:e=>Number(e),autoRemove:e=>!e||e.number[0]===``&&e.number[1]===``}),e7=MJ({columnFacetingFeature:IJ,columnFilteringFeature:HJ,columnSizingFeature:QJ,columnVisibilityFeature:$J,globalFilteringFeature:kY,rowPaginationFeature:AY,rowSelectionFeature:ZY,rowSortingFeature:QY,viewModePlugin:{getInitialState:e=>({viewMode:`list`,...e}),getDefaultTableOptions:e=>({enableViewModeToggle:!0,onViewModeChange:UK(`viewMode`,e)}),constructTableAPIs:e=>{let t=e.options;rq(`viewModePlugin`,e,{table_setViewMode:{fn:e=>t.onViewModeChange?.(t=>RK(e,t))},table_toggleViewMode:{fn:e=>t.onViewModeChange?.(t=>e||(t===`list`?`grid`:`list`))}})}},filteredRowModel:rX(),facetedRowModel:tX(),facetedUniqueValues:nX(),paginatedRowModel:aX(),sortedRowModel:oX(),columnMeta:jJ(),tableMeta:jJ(),filterFns:{includesString:iY,includesStringSensitive:rY,startsWith:sY,endsWith:cY,equalsString:aY,equalsStringSensitive:oY,equals:tY,weakEquals:nY,empty:lY,notEmpty:uY,arrIncludes:gY,arrIncludesAll:_Y,arrIncludesSome:vY,arrHas:hY,inNumberRange:pY,inDateRange:mY,between:dY,betweenInclusive:fY,date:X5,string:Z5,number:$5,select:J5},sortFns:{alphanumeric:Rq,text:zq,datetime:Bq,basic:Vq}}),{createAppColumnHelper:KDe,useAppTable:qDe,useTableContext:t7,useCellContext:n7,useHeaderContext:JDe}=sX({features:e7,getRowId:(e,t,n)=>e.id??(n?`${n.id}.${t}`:String(t)),tableComponents:{TableBody:p5,TableColumnToggle:h5,TableContainer:g5,TableFirstPage:k5,TableFilterMenu:O5,TableFilterList:D5,TableFooter:A5,TableHeader:j5,TableLastPage:N5,TableNav:P5,TableNextPage:F5,TablePagination:L5,TablePaging:R5,TablePreviousPage:z5,TableSearch:B5,TableSortMenu:H5,TableSortList:W5,TableToolbar:K5,TableViewModeToggle:GDe,TableViewport:q5},cellComponents:{TableCheckboxCell:m5,TableDateCell:WDe,TableImageCell:M5,TableNumberCell:I5,TableBadgeCell:f5,TableTextCell:G5},headerComponents:{TableSelectHeader:V5}}),YDe=({children:e})=>{let t=t7(),n=t.state.pagination.pageIndex,r=t.state.pagination.pageSize,i=t.getFilteredRowModel().rows.length,a=i===0?0:n*r+1;return e(a,i===0?0:Math.min(a+r-1,i),i)},XDe=nr(`min-w-0 grow truncate px-2xs`,{variants:{size:{small:`style-text-default--1`,medium:`style-text-default-0`,large:`style-text-default-1`}},defaultVariants:{size:`medium`}}),r7=({size:e,className:t,children:n,ref:r,...i})=>{let a=n7();return(0,L.jsxs)(`span`,{className:Q(XDe({size:e,className:t})),ref:r,...i,children:[n,a.getValue()]})},i7=({className:e,children:t,dndDisabled:n,onClick:r,...i})=>{let a=m7(),{draggingNodeId:o}=Y4(),s=a.row,c=s.getCanExpand(),{ref:l,isDragging:u}=cSe({id:s.id,data:{isFolder:c,nodeId:s.id},disabled:n}),{ref:d,isDropTarget:f}=K4({id:`folder:${s.id}`,data:{folderId:s.id,nodeId:s.id,isFolder:c},disabled:n||!c}),p=_.useCallback(e=>{l(e),d(e)},[l,d]),m=e=>{if(r?.(e),!e.defaultPrevented){if(c){s.toggleExpanded();return}s.getCanSelect()&&(e.shiftKey||a.table.resetRowSelection(),s.getToggleSelectedHandler()({target:{checked:!0},shiftKey:e.shiftKey}))}},h=_.useMemo(()=>{if(!o)return!1;let e=s.getParentRow();for(;e;){if(e.id===o)return!0;e=e.getParentRow()}return!1},[o,s]);return(0,L.jsxs)(`button`,{type:`button`,onClick:m,className:Q(`flex h-lg min-w-0 grow items-center justify-start gap-2xs truncate rounded-lg px-2xs style-text-default-0 transition-all hover:cursor-pointer [&>svg]:size-sm [&>svg]:shrink-0`,c&&f&&`bg-success-container text-success-on-container ring ring-success-border`,s.getIsSelected()?`bg-neutral-default text-neutral-on-default`:`hover:bg-neutral-container hover:text-neutral-on-container`,(u||h)&&`opacity-60`,e),ref:p,...i,children:[t,a.getValue()]})},a7=(e,t)=>{for(let n of e){if(n.id===t)return n;if(n.children?.length){let e=a7(n.children,t);if(e)return e}}return null},o7=(e,t)=>{let n=null;return{nextNodes:e.flatMap(e=>{if(e.id===t)return n=e,[];if(!e.children?.length)return[e];let r=o7(e.children,t);return r.removedNode?(n=r.removedNode,[{...e,children:r.nextNodes}]):[e]}),removedNode:n}},s7=(e,t,n)=>e.map(e=>e.id===t?{...e,children:[...e.children??[],n]}:e.children?.length?{...e,children:s7(e.children,t,n)}:e),ZDe=(e,t,n)=>{if(t===n)return e;let r=a7(e,t),i=a7(e,n);if(!r||!i?.children||a7(r.children??[],n))return e;let{nextNodes:a,removedNode:o}=o7(e,t);return o?s7(a,n,o):e},QDe=(e,t)=>{let{nextNodes:n,removedNode:r}=o7(e,t);return r?[...n,r]:e},c7={getInitialState:e=>({rowVisibility:{},...e}),getDefaultTableOptions:e=>({enableRowVisibility:!0,onRowVisibilityChange:UK(`rowVisibility`,e)}),constructTableAPIs:e=>{let t=e,n=e=>t.atoms.rowVisibility?.get()?.[e.id]??t.options.getRowVisible?.(e)??!0,r=e=>{t.options.onRowVisibilityChange?.(t=>RK(e,t))},i=()=>t.getRowModel().flatRows.every(e=>n(e));rq(`rowVisibilityFeature`,e,{table_setRowVisibility:{fn:e=>r(e)},table_resetRowVisibility:{fn:()=>r(t.initialState.rowVisibility??{})},table_getIsAllRowsVisible:{fn:()=>i()},table_toggleAllRowsVisible:{fn:e=>{let n=e??!i();r(()=>{let e={};for(let r of t.getRowModel().flatRows)e[r.id]=n;return e})}}})},assignRowPrototype:(e,t)=>{let n=t;iq(`rowVisibilityFeature`,e,t,{row_getIsVisible:{fn:e=>n.atoms.rowVisibility?.get()?.[e.id]??n.options.getRowVisible?.(e)??!0},row_toggleVisibility:{fn:(e,t)=>{n.options.onRowVisibilityChange?.(n=>({...n,[e.id]:t??!(n[e.id]??!0)}))}}})}},l7={getInitialState:e=>({rowLocked:{},...e}),getDefaultTableOptions:e=>({enableRowLocked:!0,onRowLockedChange:UK(`rowLocked`,e)}),constructTableAPIs:e=>{let t=e,n=e=>t.atoms.rowLocked?.get()?.[e.id]??t.options.getRowLocked?.(e)??!1,r=e=>{t.options.onRowLockedChange?.(t=>RK(e,t))},i=()=>t.getRowModel().flatRows.every(e=>n(e));rq(`rowLockedFeature`,e,{table_setRowLocked:{fn:e=>r(e)},table_resetRowLocked:{fn:()=>r(t.initialState.rowLocked??{})},table_getIsAllRowsLocked:{fn:()=>i()},table_toggleAllRowsLocked:{fn:e=>{let n=e??!i();r(()=>{let e={};for(let r of t.getRowModel().flatRows)e[r.id]=n;return e})}}})},assignRowPrototype:(e,t)=>{let n=t;iq(`rowLockedFeature`,e,t,{row_getIsLocked:{fn:e=>n.atoms.rowLocked?.get()?.[e.id]??n.options.getRowLocked?.(e)??!1},row_toggleLocked:{fn:(e,t)=>{n.options.onRowLockedChange?.(n=>({...n,[e.id]:t??!(n[e.id]??!1)}))}}})}},u7=({className:e,children:t,ref:n,...r})=>{let i=p7(),a=i.getCoreRowModel().flatRows,o=e=>{let t=!e;for(let e of a)e.toggleVisibility(t)};return(0,L.jsx)(i.Subscribe,{selector:e=>e.rowVisibility,children:()=>{let i=a.some(e=>e.getIsVisible());return(0,L.jsxs)(Gb,{"aria-label":i?`Hide all layers`:`Show all layers`,size:`iconSmall`,tone:`neutral`,variant:`ghost`,onClick:()=>o(i),className:Q(``,e),ref:n,...r,children:[t,i?(0,L.jsx)(xi,{weight:`bold`}):(0,L.jsx)(Si,{weight:`bold`})]})}})},d7=({className:e,children:t,ref:n,...r})=>{let i=m7(),a=p7(),o=i.row,s=o.getLeafRows(),c=s.length>0?s:[o],l=e=>{let t=!e;for(let e of c)e.toggleVisibility(t)};return(0,L.jsx)(a.Subscribe,{selector:e=>e.rowVisibility,children:()=>{let i=c.some(e=>e.getIsVisible());return(0,L.jsxs)(Gb,{"aria-label":i?`Hide layer`:`Show layer`,size:`iconSmall`,tone:`neutral`,variant:`ghost`,onClick:()=>l(i),className:Q(``,e),ref:n,...r,children:[t,i?(0,L.jsx)(xi,{}):(0,L.jsx)(Si,{})]})}})},f7=MJ({columnFacetingFeature:IJ,columnFilteringFeature:HJ,columnSizingFeature:QJ,columnVisibilityFeature:$J,globalFilteringFeature:kY,rowExpandingFeature:Gve,rowLockedFeature:l7,rowPaginationFeature:AY,rowSelectionFeature:ZY,rowSortingFeature:QY,rowVisibilityFeature:c7,expandedRowModel:lye(),filteredRowModel:rX(),facetedRowModel:tX(),facetedUniqueValues:nX(),paginatedRowModel:aX(),sortedRowModel:oX(),columnMeta:jJ(),tableMeta:jJ(),filterFns:{includesString:iY,includesStringSensitive:rY,startsWith:sY,endsWith:cY,equalsString:aY,equalsStringSensitive:oY,equals:tY,weakEquals:nY,empty:lY,notEmpty:uY,arrIncludes:gY,arrIncludesAll:_Y,arrIncludesSome:vY,arrHas:hY,inNumberRange:pY,inDateRange:mY,between:dY,betweenInclusive:fY},sortFns:{alphanumeric:Rq,text:zq,datetime:Bq,basic:Vq}}),{createAppColumnHelper:$De,useAppTable:eOe,useTableContext:p7,useCellContext:m7,useHeaderContext:tOe}=sX({features:f7,tableComponents:{LayerTree:J4,LayerTreeBody:Z4,LayerTreeExpandAll:Q4,LayerTreeFooter:$4,LayerTreeLockedAll:t3,LayerTreeRow:X4,LayerTreeSearch:i3,LayerTreeSort:m3,LayerTreeVisibilityAll:u7},cellComponents:{LayerTreeIconCell:e3,LayerTreeLockedCell:n3,LayerTreeNodeIcon:r3,LayerTreeTextCell:r7,LayerTreeTriggerCell:i7,LayerTreeVisibilityCell:d7},headerComponents:{}}),nOe=nr(`flex h-fit items-center justify-between`,{variants:{size:{small:`gap-2xs p-xs [&_span]:style-text-default--2 [&_svg]:size-sm`,medium:`gap-xs p-sm [&_span]:style-text-default--1 [&_svg]:size-md`,large:`gap-sm p-md [&_span]:style-text-default-0 [&_svg]:size-lg`},itemOrientation:{horizontal:`[&_[data-nav-bar-item]]:flex-row`,vertical:`[&_[data-nav-bar-item]]:flex-col`},variant:{outline:`w-full border border-border bg-surface-background`,floating:`absolute bottom-md w-fit max-w-15/16 overflow-x-auto bg-surface shadow-2xs`}},compoundVariants:[{size:`small`,variant:`floating`,className:`rounded-xl`},{size:`medium`,variant:`floating`,className:`rounded-2xl`},{size:`large`,variant:`floating`,className:`rounded-3xl`},{size:`small`,itemOrientation:`vertical`,className:`[&_[data-nav-bar-item]]:size-xl [&_[data-nav-bar-item]]:gap-3xs [&_[data-nav-bar-item]]:rounded-xl`},{size:`medium`,itemOrientation:`vertical`,className:`[&_[data-nav-bar-item]]:size-2xl [&_[data-nav-bar-item]]:gap-3xs [&_[data-nav-bar-item]]:rounded-2xl`},{size:`large`,itemOrientation:`vertical`,className:`[&_[data-nav-bar-item]]:size-3xl [&_[data-nav-bar-item]]:gap-2xs [&_[data-nav-bar-item]]:rounded-3xl`},{size:`small`,itemOrientation:`horizontal`,className:`[&_[data-nav-bar-item]]:h-lg [&_[data-nav-bar-item]]:gap-3xs [&_[data-nav-bar-item]]:rounded-lg [&_[data-nav-bar-item]]:px-xs`},{size:`medium`,itemOrientation:`horizontal`,className:`[&_[data-nav-bar-item]]:h-xl [&_[data-nav-bar-item]]:gap-2xs [&_[data-nav-bar-item]]:rounded-xl [&_[data-nav-bar-item]]:px-sm`},{size:`large`,itemOrientation:`horizontal`,className:`[&_[data-nav-bar-item]]:h-2xl [&_[data-nav-bar-item]]:gap-xs [&_[data-nav-bar-item]]:rounded-2xl [&_[data-nav-bar-item]]:px-md`}],defaultVariants:{itemOrientation:`vertical`,size:`medium`,variant:`outline`}}),rOe=nr(`flex aspect-square items-center justify-center transition-all disabled:pointer-events-none disabled:opacity-50 data-[active=false]:hover:cursor-pointer data-[active=false]:active:scale-95 [&>svg]:shrink-0`,{variants:{tone:{brand:`text-brand-default hover:bg-brand-container hover:text-brand-on-container data-[active=true]:bg-brand-container data-[active=true]:text-brand-on-container`,accent:`text-accent-default hover:bg-accent-container hover:text-accent-on-container data-[active=true]:bg-accent-container data-[active=true]:text-accent-on-container`,neutral:`text-neutral-default hover:bg-neutral-container hover:text-neutral-on-container data-[active=true]:bg-neutral-container data-[active=true]:text-neutral-on-container`,error:`text-error-default hover:bg-error-container hover:text-error-on-container data-[active=true]:bg-error-container data-[active=true]:text-error-on-container`,info:`text-info-default hover:bg-info-container hover:text-info-on-container data-[active=true]:bg-info-container data-[active=true]:text-info-on-container`,success:`text-success-default hover:bg-success-container hover:text-success-on-container data-[active=true]:bg-success-container data-[active=true]:text-success-on-container`,warning:`text-warning-default hover:bg-warning-container hover:text-warning-on-container data-[active=true]:bg-warning-container data-[active=true]:text-warning-on-container`}},defaultVariants:{tone:`neutral`}}),iOe=({itemOrientation:e,size:t,variant:n,className:r,children:i,ref:a,...o})=>(0,L.jsx)(`div`,{className:Q(nOe({itemOrientation:e,size:t,variant:n}),r),ref:a,...o,children:i}),aOe=({isActive:e=!1,tone:t,className:n,children:r,ref:i,...a})=>(0,L.jsx)(`button`,{"data-active":e,"data-nav-bar-item":!0,className:Q(rOe({tone:t}),n),ref:i,...a,children:r}),oOe=({className:e,children:t,ref:n,...r})=>(0,L.jsx)(`div`,{className:Q(``,e),ref:n,...r,children:t}),sOe=({className:e,children:t,ref:n,...r})=>(0,L.jsx)(`span`,{className:Q(``,e),ref:n,...r,children:t}),cOe=({className:e,children:t,ref:n,...r})=>(0,L.jsx)(wg,{className:Q(`min-w-max`,e),ref:n,...r,children:t}),lOe=({className:e,children:t,ref:n,...r})=>(0,L.jsx)(Ng,{className:Q(`h-full w-[calc(100vw-40px)] rounded-xl bg-surface p-2xs transition-[opacity,transform,translate] duration-(--duration) ease-(--easing) data-ending-style:opacity-0 data-starting-style:opacity-0 data-ending-style:data-[activation-direction=left]:translate-x-[50%] data-starting-style:data-[activation-direction=left]:translate-x-[-50%] data-ending-style:data-[activation-direction=right]:translate-x-[-50%] data-starting-style:data-[activation-direction=right]:translate-x-[50%] min-[500px]:w-max min-[500px]:max-w-[400px]`,e),ref:n,...r,children:t}),uOe=({className:e,children:t,ref:n,...r})=>(0,L.jsx)(Gg,{className:Q(`transition-transform duration-200 ease-[ease] data-popup-open:rotate-180`,e),ref:n,...r,children:t}),dOe=({className:e,children:t,ref:n,...r})=>(0,L.jsx)(jg,{className:Q(``,e),ref:n,...r,children:t}),fOe=nr(`rounded-lg px-sm py-xs transition-colors hover:cursor-pointer`,{variants:{tone:{brand:`text-brand-on-container hover:bg-brand-container`,accent:`text-accent-on-container hover:bg-accent-container`,neutral:`text-neutral-on-container hover:bg-neutral-container`,error:`text-error-on-container hover:bg-error-container`,info:`text-info-on-container hover:bg-info-container`,success:`text-success-on-container hover:bg-success-container`,warning:`text-warning-on-container hover:bg-warning-container`}},defaultVariants:{tone:`neutral`}}),pOe=({tone:e,className:t,children:n,ref:r,...i})=>(0,L.jsx)(`div`,{className:Q(fOe({tone:e,className:t})),ref:r,...i,children:n}),mOe=({className:e,children:t,ref:n,...r})=>(0,L.jsx)(Og,{className:Q(`relative flex gap-px`,e),ref:n,...r,children:t}),hOe=({className:e,children:t,ref:n,...r})=>(0,L.jsx)(Lg,{children:(0,L.jsx)(Bg,{sideOffset:10,collisionPadding:{top:5,bottom:5,left:20,right:20},collisionAvoidance:{side:`none`},className:Q(`h-(--positioner-height) w-(--positioner-width) max-w-(--available-width) transition-[top,left,right,bottom] duration-(--duration) ease-(--easing) before:absolute data-instant:transition-none data-[side=bottom]:before:inset-x-0 data-[side=bottom]:before:top-[-10px] data-[side=bottom]:before:h-2xs data-[side=left]:before:inset-y-0 data-[side=left]:before:right-[-10px] data-[side=left]:before:w-2xs data-[side=right]:before:inset-y-0 data-[side=right]:before:left-[-10px] data-[side=right]:before:w-2xs data-[side=top]:before:inset-x-0 data-[side=top]:before:bottom-[-10px] data-[side=top]:before:h-2xs`,e),ref:n,style:{"--duration":`0.35s`,"--easing":`cubic-bezier(0.22, 1, 0.36, 1)`},...r,children:(0,L.jsxs)(Ug,{className:`relative h-(--popup-height) w-(--popup-width) origin-(--transform-origin) rounded-xl shadow-md transition-[opacity,transform,width,height,scale] duration-(--duration) ease-(--easing) outline-none data-ending-style:scale-90 data-ending-style:opacity-0 data-ending-style:duration-150 data-ending-style:ease-[ease] data-starting-style:scale-90 data-starting-style:opacity-0`,children:[(0,L.jsx)(Wg,{className:`relative block overflow-clip transition-[left,right] duration-(--duration) ease-(--easing) before:absolute before:bottom-0 before:left-1/2 before:block before:size-[calc(6px*sqrt(2))] before:-translate-x-1/2 before:translate-y-1/2 before:rotate-45 before:border before:content-[''] data-[side=bottom]:top-[-6px] data-[side=left]:right-[-9px] data-[side=left]:rotate-90 data-[side=right]:left-[-9px] data-[side=right]:-rotate-90 data-[side=top]:bottom-[-6px] data-[side=top]:rotate-180`}),(0,L.jsx)(Hg,{className:`relative size-full overflow-hidden`}),t]})})}),gOe=nr(`flex items-center justify-center rounded-full bg-transparent no-underline transition-colors select-none hover:cursor-pointer focus-visible:outline-2 focus-visible:-outline-offset-1`,{variants:{size:{small:`h-lg gap-3xs px-xs style-text-default--1 [&>svg]:size-xs`,medium:`h-xl gap-2xs px-sm style-text-default-0 [&>svg]:size-sm`,large:`h-2xl gap-xs px-md style-text-default-2 [&>svg]:size-md`},tone:{brand:`text-brand-default data-popup-open:bg-brand-container data-popup-open:text-brand-on-container`,accent:`text-accent-default data-popup-open:bg-accent-container data-popup-open:text-accent-on-container`,neutral:`text-neutral-default data-popup-open:bg-neutral-container data-popup-open:text-neutral-on-container`,error:`text-error-default data-popup-open:bg-error-container data-popup-open:text-error-on-container`,info:`text-info-default data-popup-open:bg-info-container data-popup-open:text-info-on-container`,success:`text-success-default data-popup-open:bg-success-container data-popup-open:text-success-on-container`,warning:`text-warning-default data-popup-open:bg-warning-container data-popup-open:text-warning-on-container`}},defaultVariants:{size:`medium`,tone:`neutral`}}),_Oe=({size:e,tone:t,className:n,children:r,ref:i,...a})=>(0,L.jsx)(Fg,{className:Q(gOe({size:e,tone:t}),n),ref:i,...a,children:r}),h7=nr(`flex flex-col gap-3xs data-disabled:cursor-not-allowed data-disabled:opacity-50 [&_[role="group"]]:rounded-full [&_[role="group"]]:outline [&_[role="group"]]:outline-transparent [&_[role="group"]]:transition-all aria-invalid:[&_[role="group"]]:bg-error-container aria-invalid:[&_[role="group"]]:outline-error-border aria-invalid:[&_[role="group"]]:focus-within:outline-error-border-strong aria-invalid:[&_[role="group"]]:not-focus-within:hover:outline-error-border data-[disabled]:[&_[role="group"]]:cursor-not-allowed data-[invalid]:[&_[role="group"]]:bg-error-container data-[invalid]:[&_[role="group"]]:outline-error-border data-[invalid]:[&_[role="group"]]:focus-within:outline-error-border-strong data-[invalid]:[&_[role="group"]]:not-focus-within:hover:outline-error-border aria-invalid:[&_input]:text-error-on-container aria-invalid:[&_input]:caret-error-border-strong data-invalid:[&_input]:text-error-on-container data-invalid:[&_input]:caret-error-border-strong`,{variants:{size:{small:`[&_[role="group"]]:h-lg [&_input]:style-text-default--1`,medium:`[&_[role="group"]]:h-xl [&_input]:style-text-default-0`,large:`[&_[role="group"]]:h-2xl [&_input]:style-text-default-1`},variant:{primary:`[&_[role="group"]]:bg-surface [&_[role="group"]]:shadow-2xs`,secondary:`[&_[role="group"]]:bg-neutral-container`,ghost:``}},defaultVariants:{size:`medium`,variant:`primary`}}),vOe=({size:e,variant:t,children:n,label:r,disableInput:i=!1,className:a,ref:o,...s})=>{let c=_.useId(),{id:l,min:u,max:d,value:f,defaultValue:p,onValueChange:m,"aria-invalid":h,"aria-label":g,...v}=s,y=l??c,[b,x]=_.useState(()=>typeof p==`number`?p:null),S=typeof f==`number`||f===null?f:b,C=!!(h||typeof S==`number`&&(typeof u==`number`&&S<u||typeof d==`number`&&S>d)),w=(...e)=>{let[t]=e;typeof f!=`number`&&f!==null&&x(t),m?.(...e)},T=()=>{switch(e){case`small`:return`iconSmall`;case`medium`:return`iconMedium`;case`large`:return`iconLarge`;default:return`iconMedium`}};return(0,L.jsxs)(s_,{className:Q(h7({size:e,variant:t,className:a})),ref:o,"aria-invalid":C,"data-invalid":C?``:void 0,defaultValue:p,id:y,max:d,min:u,onValueChange:w,value:f,...v,children:[r&&(0,L.jsxs)(g_,{className:`cursor-ew-resize`,children:[(0,L.jsx)(`label`,{className:`cursor-ew-resize style-text-default--1`,htmlFor:y,children:r}),(0,L.jsx)(__,{children:(0,L.jsx)(yOe,{})})]}),(0,L.jsxs)(c_,{className:`relative flex w-full items-center gap-3xs`,children:[(0,L.jsx)(p_,{render:e=>(0,L.jsx)(Gb,{...e,tone:`error`,variant:`ghost`,size:T(),className:`shrink-0 rounded-r-none`,children:(0,L.jsx)(Ni,{weight:`bold`})})}),(0,L.jsx)(m_,{"aria-label":r?void 0:g,disabled:i,className:Q(`w-full text-center focus:outline-none`,n&&`text-right`)}),n&&(0,L.jsx)(`div`,{className:Q(`w-full text-left text-on-surface-variant`,e===`small`&&`style-text-default--1`,e===`medium`&&`style-text-default-0`,e===`large`&&`style-text-default-1`),children:n}),(0,L.jsx)(f_,{render:e=>(0,L.jsx)(Gb,{...e,tone:`success`,variant:`ghost`,size:T(),className:`shrink-0 rounded-l-none`,children:(0,L.jsx)(Fi,{weight:`bold`})})})]})]})};function yOe(e){return(0,L.jsxs)(`svg`,{fill:`black`,height:`14`,stroke:`white`,viewBox:`0 0 24 14`,width:`26`,xmlns:`http://www.w3.org/2000/svg`,...e,children:[(0,L.jsx)(`title`,{children:`Resize cursor`}),(0,L.jsx)(`path`,{d:`M19.5 5.5L6.49737 5.51844V2L1 6.9999L6.5 12L6.49737 8.5L19.5 8.5V12L25 6.9999L19.5 2V5.5Z`})]})}var bOe=({children:e,...t})=>(0,L.jsx)(J_,{...t,children:e}),xOe=({className:e,children:t,ref:n,...r})=>(0,L.jsx)(Z_,{children:(0,L.jsx)(ev,{className:Q(``,e),ref:n,...r,children:(0,L.jsx)(tv,{className:`relative h-(--popup-height,auto) w-(--popup-width,auto) origin-(--transform-origin) rounded-xl bg-surface shadow-md transition-[transform,opacity] duration-100 ease-out data-ending-style:transform-[scale(0.98)] data-ending-style:opacity-0 data-starting-style:transform-[scale(0.98)] data-starting-style:opacity-0`,children:t})})}),SOe=({className:e,children:t,ref:n,...r})=>(0,L.jsx)(Q_,{className:Q(``,e),ref:n,...r,children:t}),COe=({className:e,children:t,ref:n,...r})=>(0,L.jsx)(`div`,{className:Q(`flex w-full items-center gap-sm rounded-full`,e),ref:n,...r,children:t}),wOe=({className:e,children:t,ref:n,...r})=>(0,L.jsx)(`span`,{className:Q(`flex items-center gap-xs style-text-default-0 [&>svg]:size-md`,e),ref:n,...r,children:t}),TOe=({className:e,children:t,ref:n,...r})=>(0,L.jsx)(`span`,{className:Q(`style-text-default--2 text-on-surface-variant`,e),ref:n,...r,children:t}),EOe=({className:e,children:t,ref:n,...r})=>(0,L.jsx)(`div`,{className:Q(`ml-auto text-on-surface-variant [&>svg]:size-sm`,e),ref:n,...r,children:t}),DOe=({compact:e,className:t,children:n,ref:r,...i})=>(0,L.jsx)(`div`,{className:Q(`flex flex-col items-start justify-start gap-3xs`,e&&`hidden`,t),ref:r,...i,children:n}),OOe=({currentIndex:e,className:t,children:n,ref:r,...i})=>{let a=`progress-${(0,_.useId)().replace(/:/g,``)}`,o=e;return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(`style`,{children:`
209
- .${a} > :nth-child(${o}) [data-slot='progress-indicator'] {
210
- background-color: var(--color-accent-container);
211
- border: 1px solid var(--color-accent-border-strong);
212
- color: var(--color-accent-on-container);
213
- }
214
- .${a} > :nth-child(-n+${o-1}) [data-slot='progress-indicator'] {
215
- background-color: var(--color-accent-default);
216
- border: none;
217
- color: var(--color-accent-on-default);
218
- box-shadow: none;
219
- }
220
- .${a} > :nth-child(-n+${o-1}) [data-slot='progress-bar'] {
221
- background-color: var(--color-accent-default);
222
- }
223
- `}),(0,L.jsx)(`div`,{className:Q(`flex w-full items-center justify-center gap-2xs`,a,t),ref:r,...i,children:n})]})},kOe=({className:e,children:t,ref:n,...r})=>(0,L.jsx)(`div`,{className:`w-full`,children:(0,L.jsx)(`div`,{className:Q(`h-3xs w-full grow rounded-full bg-accent-default/20 transition-colors ease-in-out`,e),"data-slot":`progress-bar`,ref:n,...r,children:t})}),AOe=({title:e,description:t,className:n,children:r,ref:i,...a})=>(0,L.jsxs)(`div`,{className:`relative`,children:[(0,L.jsx)(`div`,{className:Q(`flex size-md shrink-0 flex-col items-center justify-center rounded-full border border-neutral-border bg-neutral-container text-center style-text-default--2 text-accent-default transition-colors ease-in-out [&>svg]:size-xs`,n),"data-slot":`progress-indicator`,ref:i,...a,children:r}),(0,L.jsxs)(`div`,{className:`absolute top-full left-1/2 w-3xl -translate-x-1/2 translate-y-2xs`,children:[e&&(0,L.jsx)(`div`,{className:`text-center style-text-strong--2 text-on-surface`,children:e}),t&&(0,L.jsx)(`div`,{className:`text-center style-text-prose--2 text-on-surface-variant`,children:t})]})]}),jOe=nr(`absolute top-[0px] right-[0px] flex`,{variants:{tone:{brand:`[&_[data-dot]]:bg-brand-default [&_[data-radar-ping]]:bg-brand-default`,accent:`[&_[data-dot]]:bg-accent-default [&_[data-radar-ping]]:bg-accent-default`,neutral:`[&_[data-dot]]:bg-neutral-default [&_[data-radar-ping]]:bg-neutral-default`,info:`[&_[data-dot]]:bg-info-default [&_[data-radar-ping]]:bg-info-default`,error:`[&_[data-dot]]:bg-error-default [&_[data-radar-ping]]:bg-error-default`,success:`[&_[data-dot]]:bg-success-default [&_[data-radar-ping]]:bg-success-default`,warning:`[&_[data-dot]]:bg-warning-default [&_[data-radar-ping]]:bg-warning-default`},size:{small:`-mt-3xs -mr-3xs style-text-default--2 [&_[data-dot]]:size-sm`,medium:`-mt-2xs -mr-2xs style-text-default--1 [&_[data-dot]]:size-md`,large:`-mt-xs -mr-xs style-text-default-0 [&_[data-dot]]:size-lg`}},defaultVariants:{tone:`brand`,size:`medium`}}),MOe=({hidePing:e=!1,tone:t=`brand`,size:n=`medium`,className:r,children:i,ref:a,...o})=>(0,L.jsxs)(`div`,{className:Q(jOe({tone:t,size:n,className:r})),ref:a,...o,children:[!e&&(0,L.jsx)(`span`,{className:`absolute inline-flex size-full animate-ping rounded-full opacity-75`,"data-radar-ping":!0}),(0,L.jsx)(`span`,{className:`relative flex items-center justify-center rounded-full text-surface`,"data-dot":!0,children:i})]});function NOe(e,t){let n=getComputedStyle(e);return t*parseFloat(n.fontSize)}function POe(e,t){let n=getComputedStyle(e.ownerDocument.documentElement);return t*parseFloat(n.fontSize)}function FOe(e){return e/100*window.innerHeight}function IOe(e){return e/100*window.innerWidth}function LOe(e){switch(typeof e){case`number`:return[e,`px`];case`string`:{let t=parseFloat(e);return e.endsWith(`%`)?[t,`%`]:e.endsWith(`px`)?[t,`px`]:e.endsWith(`rem`)?[t,`rem`]:e.endsWith(`em`)?[t,`em`]:e.endsWith(`vh`)?[t,`vh`]:e.endsWith(`vw`)?[t,`vw`]:[t,`%`]}}}function g7({groupSize:e,panelElement:t,styleProp:n}){let r,[i,a]=LOe(n);switch(a){case`%`:r=i/100*e;break;case`px`:r=i;break;case`rem`:r=POe(t,i);break;case`em`:r=NOe(t,i);break;case`vh`:r=FOe(i);break;case`vw`:r=IOe(i)}return r}function _7(e){return parseFloat(e.toFixed(3))}function v7({group:e}){let{orientation:t,panels:n}=e;return n.reduce((e,n)=>(e+=t===`horizontal`?n.element.offsetWidth:n.element.offsetHeight,e),0)}function y7(e){let{panels:t}=e,n=v7({group:e});return n===0?t.map(e=>({groupResizeBehavior:e.panelConstraints.groupResizeBehavior,collapsedSize:0,collapsible:e.panelConstraints.collapsible===!0,defaultSize:void 0,disabled:e.panelConstraints.disabled,minSize:0,maxSize:100,panelId:e.id})):t.map(e=>{let{element:t,panelConstraints:r}=e,i=0;r.collapsedSize!==void 0&&(i=_7(g7({groupSize:n,panelElement:t,styleProp:r.collapsedSize})/n*100));let a;r.collapsedThreshold!==void 0&&(a=_7(g7({groupSize:n,panelElement:t,styleProp:r.collapsedThreshold})/n*100));let o;r.defaultSize!==void 0&&(o=_7(g7({groupSize:n,panelElement:t,styleProp:r.defaultSize})/n*100));let s=0;r.minSize!==void 0&&(s=_7(g7({groupSize:n,panelElement:t,styleProp:r.minSize})/n*100));let c=100;return r.maxSize!==void 0&&(c=_7(g7({groupSize:n,panelElement:t,styleProp:r.maxSize})/n*100)),{groupResizeBehavior:r.groupResizeBehavior,collapsedSize:i,collapsedThreshold:a,collapsible:r.collapsible===!0,defaultSize:o,disabled:r.disabled,minSize:s,maxSize:c,panelId:e.id}})}var b7=class{#e={};addListener(e,t){let n=this.#e[e];return n===void 0?this.#e[e]=[t]:n.includes(t)||n.push(t),()=>{this.removeListener(e,t)}}emit(e,t){let n=this.#e[e];if(n!==void 0){if(n.length===1)n[0].call(null,t);else{let e=!1,r=null,i=Array.from(n);for(let n=0;n<i.length;n++){let a=i[n];try{a.call(null,t)}catch(t){r===null&&(e=!0,r=t)}}if(e)throw r}}}removeAllListeners(){this.#e={}}removeListener(e,t){let n=this.#e[e];if(n!==void 0){let e=n.indexOf(t);e>=0&&n.splice(e,1)}}},x7={cursorFlags:0,state:`inactive`},S7=new b7;function C7(){return x7}function w7(e){return S7.addListener(`change`,e)}function ROe(e,t=[],n,r=!1){let i=x7,a={...x7};a.cursorFlags=e,a.state===`active`&&(a.didPointerMove||=r,a.previews=t,n&&(a.previewLayoutMap=n)),x7=a,S7.emit(`change`,{prev:i,next:a})}function T7(e){let t=x7;x7=e,t.state===`active`&&e.state!==`active`&&t.didPointerMove&&t.hitRegions.forEach(({separator:e})=>{e&&e.element.ownerDocument.activeElement===e.element&&e.element.blur()}),S7.emit(`change`,{prev:t,next:e})}function zOe(e){x7.state!==`active`||!x7.previews.some(t=>t.separator===e)||T7({...x7,previews:x7.previews.map(t=>t.separator===e?{...t}:t)})}function BOe(e){if(x7.state===`inactive`)return!1;let t=x7.hitRegions.filter(t=>t.group!==e),n=x7.state===`active`&&x7.previews.some(t=>t.group===e);if(t.length===x7.hitRegions.length&&!n)return!1;if(t.length===0)T7({cursorFlags:0,state:`inactive`});else if(x7.state===`active`){let n=new Map(x7.initialLayoutMap),r=new Map(x7.previewLayoutMap);n.delete(e),r.delete(e),T7({...x7,cursorFlags:0,hitRegions:t,initialLayoutMap:n,previewLayoutMap:r,previews:x7.previews.filter(t=>t.group!==e)})}else T7({...x7,hitRegions:t});return!0}var VOe=e=>e,E7=()=>{},D7=1,O7=2,k7=4,A7=8,j7=3,M7=12,N7;function P7(){return N7===void 0&&(N7=!1,typeof window<`u`&&(window.navigator.userAgent.includes(`Chrome`)||window.navigator.userAgent.includes(`Firefox`))&&(N7=!0)),N7}function HOe({cursorFlags:e,groups:t,state:n}){let r=0,i=0;switch(n){case`active`:case`hover`:t.forEach(e=>{if(!e.mutableState.disableCursor)switch(e.orientation){case`horizontal`:r++;break;case`vertical`:i++}})}if(r!==0||i!==0){if(n===`active`&&e&&P7()){let t=(e&D7)!==0,n=(e&O7)!==0,r=(e&k7)!==0,i=(e&A7)!==0;if(t)return r?`se-resize`:i?`ne-resize`:`e-resize`;if(n)return r?`sw-resize`:i?`nw-resize`:`w-resize`;if(r)return`s-resize`;if(i)return`n-resize`}return P7()?r>0&&i>0?`move`:r>0?`ew-resize`:`ns-resize`:r>0&&i>0?`grab`:r>0?`col-resize`:`row-resize`}}var F7=new WeakMap;function I7(e){if(!e.defaultView||!e.adoptedStyleSheets)return;let{prevStyle:t,styleSheet:n}=F7.get(e)??{};n===void 0&&(n=new e.defaultView.CSSStyleSheet,e.adoptedStyleSheets&&(Object.isExtensible(e.adoptedStyleSheets)?e.adoptedStyleSheets.push(n):e.adoptedStyleSheets=[...e.adoptedStyleSheets,n]));let r=C7();switch(r.state){case`active`:case`hover`:{let e=HOe({cursorFlags:r.cursorFlags,groups:r.hitRegions.map(e=>e.group),state:r.state}),i=`*, *:hover {cursor: ${e} !important; }`;if(t===i)return;t=i,e?n.cssRules.length===0?n.insertRule(i):n.replaceSync(i):n.cssRules.length===1&&n.deleteRule(0);break}case`inactive`:t=void 0,n.cssRules.length===1&&n.deleteRule(0)}F7.set(e,{prevStyle:t,styleSheet:n})}function L7(e,t=`Assertion error`){if(!e)throw Error(t)}function R7(e,t){return Array.from(t).sort((t,n)=>{let r=e===`horizontal`?UOe(t,n):WOe(t,n);if(r!==0)return r;let i=t.element.compareDocumentPosition(n.element);return i&Node.DOCUMENT_POSITION_DISCONNECTED?0:i&Node.DOCUMENT_POSITION_FOLLOWING?-1:i&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function UOe(e,t){let n=e.element.offsetLeft-t.element.offsetLeft;return n===0?e.element.offsetWidth-t.element.offsetWidth:n}function WOe(e,t){let n=e.element.offsetTop-t.element.offsetTop;return n===0?e.element.offsetHeight-t.element.offsetHeight:n}function z7(e){return typeof e==`object`&&!!e&&`nodeType`in e&&e.nodeType===Node.ELEMENT_NODE}function B7(e,t){return{x:e.x>=t.left&&e.x<=t.right?0:Math.min(Math.abs(e.x-t.left),Math.abs(e.x-t.right)),y:e.y>=t.top&&e.y<=t.bottom?0:Math.min(Math.abs(e.y-t.top),Math.abs(e.y-t.bottom))}}function GOe({orientation:e,rects:t,targetRect:n}){let r={x:n.x+n.width/2,y:n.y+n.height/2},i,a=Number.MAX_VALUE;for(let n of t){let{x:t,y:o}=B7(r,n),s=e===`horizontal`?t:o;s<a&&(a=s,i=n)}return L7(i,`No rect found`),i}var V7;function KOe(){return V7===void 0&&(V7=typeof matchMedia==`function`&&!!matchMedia(`(pointer:coarse)`).matches),V7}function H7({expandHitTargets:e=!0,group:t,includeDisabled:n=!1}){let{element:r,orientation:i,panels:a,separators:o}=t,s=R7(i,Array.from(r.children).filter(z7).filter(e=>!e.hasAttribute(`data-resize-preview`)).map(e=>({element:e}))).map(({element:e})=>e),c=[],l=!1,u=!1,d=-1,f,p=-1,m=0,h,g=[];{let e=-1;for(let t of s)t.hasAttribute(`data-panel`)&&(e++,t.hasAttribute(`data-disabled`)||(m++,d===-1&&(d=e),p=e))}if(n||m>1){let r=-1;for(let m of s)if(m.hasAttribute(`data-panel`)){r++;let o=a.find(e=>e.element===m);if(o){if(h){let a=h.element.getBoundingClientRect(),s=m.getBoundingClientRect(),_;if(u){let e=i===`horizontal`?new DOMRect(a.right,a.top,0,a.height):new DOMRect(a.left,a.bottom,a.width,0),t=i===`horizontal`?new DOMRect(s.left,s.top,0,s.height):new DOMRect(s.left,s.top,s.width,0);switch(g.length){case 0:_=[e,t];break;case 1:{let n=g[0];_=[n,GOe({orientation:i,rects:[a,s],targetRect:n.element.getBoundingClientRect()})===a?t:e];break}default:_=g}}else _=g.length?g:[i===`horizontal`?new DOMRect(a.right,s.top,s.left-a.right,s.height):new DOMRect(s.left,a.bottom,s.width,s.top-a.bottom)];for(let i of _){let a=`width`in i?i:i.element.getBoundingClientRect(),s=e?KOe()?t.resizeTargetMinimumSize.coarse:t.resizeTargetMinimumSize.fine:0;if(a.width<s){let e=s-a.width;a=new DOMRect(a.x-e/2,a.y,a.width+e,a.height)}if(a.height<s){let e=s-a.height;a=new DOMRect(a.x,a.y-e/2,a.width,a.height+e)}(n||!l&&!(r<=d||r>p))&&(f??=v7({group:t}),c.push({group:t,groupSize:f,panels:[h,o],separator:`width`in i?void 0:i,rect:a})),l=!1}}u=!1,h=o,g=[]}}else if(m.hasAttribute(`data-separator`)){m.ariaDisabled!==null&&(l=!0);let e=o.find(e=>e.element===m);e?g.push(e):(h=void 0,g=[])}else u=!0}return c}var U7=new Map,W7=new b7;function qOe(e){U7=new Map(U7),U7.delete(e)}function G7(e,t){for(let[t]of U7)if(t.id===e)return t}function K7(e,t){for(let[t,n]of U7)if(t.id===e)return n;if(t)throw Error(`Could not find data for Group with id ${e}`)}function q7(){return U7}function J7(e,t){return W7.addListener(`groupChange`,n=>{n.group.id===e&&t(n)})}function Y7(e,t,n){let r=U7.get(e);U7=new Map(U7),U7.set(e,t),W7.emit(`groupChange`,{group:e,isUserInteraction:n?.isUserInteraction===!0,prev:r,next:t})}function JOe(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!=t[n])return!1;return!0}function X7(e,t,n=0){return Math.abs(_7(e)-_7(t))<=n}function Z7(e,t){return X7(e,t)?0:e>t?1:-1}function Q7({overrideDisabledPanels:e,panelConstraints:t,prevSize:n,size:r}){let{collapsedSize:i=0,collapsedThreshold:a,collapsible:o,disabled:s,maxSize:c=100,minSize:l=0}=t;if(s&&!e)return n;if(Z7(r,l)<0){if(o){let e=a??(l-i)/2,t=Z7(n,i)<=0,o=t?i+e:l-e,s=Z7(r,o);r=Z7(r,i)<=0||s<0||a!==void 0&&t&&s===0?i:l}else r=l}return r=Math.min(c,r),r=_7(r),r}function $7({delta:e,initialLayout:t,panelConstraints:n,pivotIndices:r,prevLayout:i,trigger:a}){if(X7(e,0))return t;let o=a===`imperative-api`,s=n.map(({panelId:e})=>t[e]),c=n.map(({panelId:e})=>i[e]),l=[...s],[u,d]=r;L7(u!=null,`Invalid first pivot index`),L7(d!=null,`Invalid second pivot index`);let f=0;switch(a){case`keyboard`:{let t=e<0?d:u,r=n[t];L7(r,`Panel constraints not found for index ${t}`);let{collapsedSize:i=0,collapsible:a,minSize:o=0}=r;if(a){let n=s[t];if(L7(n!=null,`Previous layout not found for panel index ${t}`),X7(n,i)){let t=o-n;Z7(t,Math.abs(e))>0&&(e=e<0?0-t:t)}}}{let t=e<0?u:d,r=n[t];L7(r,`No panel constraints found for index ${t}`);let{collapsedSize:i=0,collapsible:a,minSize:o=0}=r;if(a){let n=s[t];if(L7(n!=null,`Previous layout not found for panel index ${t}`),X7(n,o)){let t=n-i;Z7(t,Math.abs(e))>0&&(e=e<0?0-t:t)}}}break;default:{let t=e<0?d:u,r=n[t];L7(r,`Panel constraints not found for index ${t}`);let i=s[t],{collapsedSize:a,collapsedThreshold:o,collapsible:c,minSize:l}=r;if(c&&Z7(i,l)<0){let t=l-a,n=o??t/2;if(Z7(i+Math.abs(e),l)<0){let r=Z7(Math.abs(e),n);e=r>0||r===0&&o===void 0&&e<0?e<0?-t:t:0}}break}}{let t=e<0?1:-1,r=e<0?d:u,i=0;for(;;){let e=s[r];L7(e!=null,`Previous layout not found for panel index ${r}`);let a=Q7({overrideDisabledPanels:o,panelConstraints:n[r],prevSize:e,size:100})-e;if(i+=a,r+=t,r<0||r>=n.length)break}let a=Math.min(Math.abs(e),Math.abs(i));e=e<0?0-a:a}{let t=e<0?u:d;for(;t>=0&&t<n.length;){let r=Math.abs(e)-Math.abs(f),i=s[t];L7(i!=null,`Previous layout not found for panel index ${t}`);let a=i-r,c=Q7({overrideDisabledPanels:o,panelConstraints:n[t],prevSize:i,size:a});if(!X7(i,c)&&(f+=i-c,l[t]=c,f.toFixed(3).localeCompare(Math.abs(e).toFixed(3),void 0,{numeric:!0})>=0))break;e<0?t--:t++}}if(JOe(c,l))return i;{let t=e<0?d:u,r=s[t];L7(r!=null,`Previous layout not found for panel index ${t}`);let i=r+f,a=Q7({overrideDisabledPanels:o,panelConstraints:n[t],prevSize:r,size:i});if(l[t]=a,!X7(a,i)){let t=i-a,r=e<0?d:u;for(;r>=0&&r<n.length;){let i=l[r];L7(i!=null,`Previous layout not found for panel index ${r}`);let a=i+t,s=Q7({overrideDisabledPanels:o,panelConstraints:n[r],prevSize:i,size:a});if(X7(i,s)||(t-=s-i,l[r]=s),X7(t,0))break;e>0?r--:r++}}}return X7(Object.values(l).reduce((e,t)=>t+e,0),100,.1)?l.reduce((e,t,r)=>(e[n[r].panelId]=t,e),{}):i}function e9(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(t[n]===void 0||Z7(e[n],t[n])!==0)return!1;return!0}function t9({commit:e,document:t,event:n,hitRegions:r,initialLayoutMap:i,mountedGroups:a,pointerDownAtPoint:o,prevCursorFlags:s}){let c=0,l=C7(),u=l.state===`active`?l.previews:[],d=new Map(l.state===`active`?l.previewLayoutMap:void 0);r.forEach(t=>{let{group:r,groupSize:s}=t,{orientation:l,panels:f}=r;if(e&&r.resizePreviewMode!==`separator`)return;let{disableCursor:p}=r.mutableState,m=0;m=o?l===`horizontal`?(n.clientX-o.x)/s*100:(n.clientY-o.y)/s*100:l===`horizontal`?n.clientX<0?-100:100:n.clientY<0?-100:100;let h=i.get(r),g=a.get(r);if(!h||!g)return;let{defaultLayoutDeferred:_,derivedPanelConstraints:v,groupSize:y,layout:b,separatorToPanels:x}=g;if(v&&b&&x){let n=r.resizePreviewMode===`separator`?d.get(r)??b:b,i=$7({delta:m,initialLayout:h,panelConstraints:v,pivotIndices:t.panels.map(e=>f.indexOf(e)),prevLayout:n,trigger:`mouse-or-touch`});if(r.resizePreviewMode===`separator`&&!e&&!e9(i,n)){d.set(r,i);let e=0,t=f.map(t=>(e+=i[t.id]-h[t.id],s/100*e));u=u.map(e=>{if(e.group!==r)return e;let n=t[e.panelIndex];return n===e.offset?e:{...e,offset:n}})}if(e9(i,n)&&m!==0&&!p)switch(l){case`horizontal`:c|=m<0?D7:O7;break;case`vertical`:c|=m<0?k7:A7}(r.resizePreviewMode!==`separator`||e)&&!e9(i,b)&&Y7(t.group,{defaultLayoutDeferred:_,derivedPanelConstraints:v,groupSize:y,layout:i,separatorToPanels:x})}});let f=0;n.movementX===0?f|=s&j7:f|=c&j7,n.movementY===0?f|=s&M7:f|=c&M7;let p=l.state===`active`&&(n.clientX!==l.pointerDownAtPoint.x||n.clientY!==l.pointerDownAtPoint.y);ROe(f,u,d,p),I7(t)}function n9(e,t){let n=C7(),r=q7(),i=!1;return n.state===`active`&&(t9({commit:!0,document:e,event:t,hitRegions:n.hitRegions,initialLayoutMap:n.initialLayoutMap,mountedGroups:r,pointerDownAtPoint:n.pointerDownAtPoint,prevCursorFlags:n.cursorFlags}),T7({cursorFlags:0,state:`inactive`}),n.hitRegions.length>0&&(I7(e),i=!0,n.hitRegions.forEach(e=>{if(!r.has(e.group))return;let t=K7(e.group.id,!0);Y7(e.group,t,{isUserInteraction:!0})}))),i}function r9(e){e.defaultPrevented||n9(e.currentTarget,e)}function YOe(e,t,n){let r,i={x:1/0,y:1/0};for(let a of t){let t=B7(n,a.rect);switch(e){case`horizontal`:t.x<=i.x&&(r=a,i=t);break;case`vertical`:t.y<=i.y&&(r=a,i=t)}}return r?{distance:i,hitRegion:r}:void 0}function XOe(e){return typeof e==`object`&&!!e&&`nodeType`in e&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE}function ZOe(e,t){if(e===t)throw Error(`Cannot compare node with itself`);let n={a:o9(e),b:o9(t)},r;for(;n.a.at(-1)===n.b.at(-1);)r=n.a.pop(),n.b.pop();L7(r,`Stacking order can only be calculated for elements with a common ancestor`);let i={a:a9(i9(n.a)),b:a9(i9(n.b))};if(i.a===i.b){let e=r.childNodes,t={a:n.a.at(-1),b:n.b.at(-1)},i=e.length;for(;i--;){let n=e[i];if(n===t.a)return 1;if(n===t.b)return-1}}return Math.sign(i.a-i.b)}var QOe=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function $Oe(e){let t=getComputedStyle(s9(e)??e).display;return t===`flex`||t===`inline-flex`}function eke(e){let t=getComputedStyle(e);return!!(t.position===`fixed`||t.zIndex!==`auto`&&(t.position!==`static`||$Oe(e))||+t.opacity<1||`transform`in t&&t.transform!==`none`||`webkitTransform`in t&&t.webkitTransform!==`none`||`mixBlendMode`in t&&t.mixBlendMode!==`normal`||`filter`in t&&t.filter!==`none`||`webkitFilter`in t&&t.webkitFilter!==`none`||`isolation`in t&&t.isolation===`isolate`||QOe.test(t.willChange)||t.webkitOverflowScrolling===`touch`)}function i9(e){let t=e.length;for(;t--;){let n=e[t];if(L7(n,`Missing node`),eke(n))return n}return null}function a9(e){return e&&Number(getComputedStyle(e).zIndex)||0}function o9(e){let t=[];for(;e;)t.push(e),e=s9(e);return t}function s9(e){let{parentNode:t}=e;return XOe(t)?t.host:t}function tke(e,t){return e.x<t.x+t.width&&e.x+e.width>t.x&&e.y<t.y+t.height&&e.y+e.height>t.y}function nke(e){try{return e.matches(`:modal`)}catch{return!1}}function rke({groupElement:e,hitRegion:t,pointerEventTarget:n}){if(z7(n)){let t=n.closest(`dialog`);if(t&&!t.contains(e)&&nke(t))return!1}if(!z7(n)||n.contains(e)||e.contains(n))return!0;if(ZOe(n,e)>0){let r=n;for(;r;){if(r.contains(e))return!0;if(tke(r.getBoundingClientRect(),t))return!1;r=r.parentElement}}return!0}function c9(e,t){let n=[];return t.forEach((t,r)=>{if(r.disabled)return;let i=H7({group:r}),a=YOe(r.orientation,i,{x:e.clientX,y:e.clientY});a&&a.distance.x<=0&&a.distance.y<=0&&rke({groupElement:r.element,hitRegion:a.hitRegion.rect,pointerEventTarget:e.target})&&n.push(a.hitRegion)}),n}function l9({layout:e,panelConstraints:t}){let n=t.map(({panelId:t})=>e[t]),r=[...n],i=r.reduce((e,t)=>e+t,0);if(Object.keys(e).length!==t.length)throw Error(`Invalid ${t.length} panel layout: ${Object.values(e).map(e=>`${e}%`).join(`, `)}`);if(!X7(i,100)&&r.length>0)for(let e=0;e<t.length;e++){let t=r[e];L7(t!=null,`No layout data found for index ${e}`);let n=100/i*t;r[e]=n}let a=0;for(let e=0;e<t.length;e++){let i=n[e];L7(i!=null,`No layout data found for index ${e}`);let o=r[e];L7(o!=null,`No layout data found for index ${e}`);let s=Q7({overrideDisabledPanels:!0,panelConstraints:t[e],prevSize:i,size:o});o!=s&&(a+=o-s,r[e]=s)}if(!X7(a,0))for(let e=0;e<t.length;e++){let n=r[e];L7(n!=null,`No layout data found for index ${e}`);let i=n+a,o=Q7({overrideDisabledPanels:!0,panelConstraints:t[e],prevSize:n,size:i});if(n!==o&&(a-=o-n,r[e]=o,X7(a,0)))break}return r.reduce((e,n,r)=>(e[t[r].panelId]=n,e),{})}function u9({groupId:e,panelId:t}){let n=()=>{let t=q7();for(let[n,{defaultLayoutDeferred:r,derivedPanelConstraints:i,layout:a,groupSize:o,separatorToPanels:s}]of t)if(n.id===e)return{defaultLayoutDeferred:r,derivedPanelConstraints:i,group:n,groupSize:o,layout:a,separatorToPanels:s};throw Error(`Group ${e} not found`)},r=()=>{let e=n().derivedPanelConstraints.find(e=>e.panelId===t);if(e!==void 0)return e;throw Error(`Panel constraints not found for Panel ${t}`)},i=()=>{let e=n().group.panels.find(e=>e.id===t);if(e!==void 0)return e;throw Error(`Layout not found for Panel ${t}`)},a=()=>{let e=n().layout[t];if(e!==void 0)return e;throw Error(`Layout not found for Panel ${t}`)},o=({nextSize:e,panels:n,prevLayout:r,derivedPanelConstraints:i})=>{let o=a(),s=n.findIndex(e=>e.id===t),c=s===0,l=s===n.length-1;if(l&&e<o&&(c||n.slice(0,s).every((e,t)=>{let n=i[t];return n?.collapsible&&X7(n.collapsedSize,r[n.panelId])}))){let e=n.slice(0,s).reduce((e,t)=>e+r[t.id],0);return{...r,[t]:_7(100-e)}}return $7({delta:l?o-e:e-o,initialLayout:r,panelConstraints:i,pivotIndices:l?[s-1,s]:[s,s+1],prevLayout:r,trigger:`imperative-api`})},s=e=>{if(e===a())return;let{defaultLayoutDeferred:t,derivedPanelConstraints:r,group:i,groupSize:s,layout:c,separatorToPanels:l}=n(),u=l9({layout:o({nextSize:e,panels:i.panels,prevLayout:c,derivedPanelConstraints:r}),panelConstraints:r});e9(c,u)||Y7(i,{defaultLayoutDeferred:t,derivedPanelConstraints:r,groupSize:s,layout:u,separatorToPanels:l})};return{collapse:()=>{let{collapsible:e,collapsedSize:t}=r(),{mutableValues:n}=i(),o=a();e&&o!==t&&(n.expandToSize=o,s(t))},expand:()=>{let{collapsible:e,collapsedSize:t,minSize:n}=r(),{mutableValues:o}=i(),c=a();if(e&&c===t){let e=o.expandToSize??n;e===0&&(e=1),s(e)}},getSize:()=>{let{group:e}=n(),t=a(),{element:r}=i();return{asPercentage:t,inPixels:e.orientation===`horizontal`?r.offsetWidth:r.offsetHeight}},isCollapsed:()=>{let{collapsible:e,collapsedSize:t}=r(),n=a();return e&&X7(t,n)},resize:e=>{let{group:t}=n(),{element:r}=i(),a=v7({group:t}),o=_7(g7({groupSize:a,panelElement:r,styleProp:e})/a*100);s(o)}}}function d9(e){e.defaultPrevented||c9(e,q7()).forEach(t=>{if(t.separator&&!t.separator.disableDoubleClick){let n=t.panels.find(e=>e.panelConstraints.defaultSize!==void 0);if(n){let r=n.panelConstraints.defaultSize,i=u9({groupId:t.group.id,panelId:n.id});i&&r!==void 0&&(i.resize(r),e.preventDefault())}}})}function f9(e){let t=q7();for(let[n]of t)if(n.separators.some(t=>t.element===e))return n;throw Error(`Could not find parent Group for separator element`)}function p9({groupId:e}){let t=()=>{let t=q7();for(let[n,r]of t)if(n.id===e)return{group:n,...r};throw Error(`Could not find Group with id "${e}"`)};return{getLayout(){let{defaultLayoutDeferred:e,layout:n}=t();return e?{}:n},setLayout(e){let{defaultLayoutDeferred:n,derivedPanelConstraints:r,group:i,groupSize:a,layout:o,separatorToPanels:s}=t(),c=l9({layout:e,panelConstraints:r});return n?o:(e9(o,c)||Y7(i,{defaultLayoutDeferred:n,derivedPanelConstraints:r,groupSize:a,layout:c,separatorToPanels:s}),c)}}}function m9(e,t){let n=f9(e),r=K7(n.id,!0),i=n.separators.find(t=>t.element===e);L7(i,`Matching separator not found`);let a=r.separatorToPanels.get(i);L7(a,`Matching panels not found`);let o=a.map(e=>n.panels.indexOf(e)),s=p9({groupId:n.id}).getLayout(),c=l9({layout:$7({delta:t,initialLayout:s,panelConstraints:r.derivedPanelConstraints,pivotIndices:o,prevLayout:s,trigger:`keyboard`}),panelConstraints:r.derivedPanelConstraints});e9(s,c)||Y7(n,{defaultLayoutDeferred:r.defaultLayoutDeferred,derivedPanelConstraints:r.derivedPanelConstraints,groupSize:r.groupSize,layout:c,separatorToPanels:r.separatorToPanels},{isUserInteraction:!0})}function h9(e){if(e.defaultPrevented)return;let t=e.currentTarget,n=f9(t);if(!(n.disabled||n.separators.find(e=>e.element===t)?.disabled))switch(e.key){case`ArrowDown`:e.preventDefault(),n.orientation===`vertical`&&m9(t,5);break;case`ArrowLeft`:e.preventDefault(),n.orientation===`horizontal`&&m9(t,-5);break;case`ArrowRight`:e.preventDefault(),n.orientation===`horizontal`&&m9(t,5);break;case`ArrowUp`:e.preventDefault(),n.orientation===`vertical`&&m9(t,-5);break;case`End`:e.preventDefault(),m9(t,100);break;case`Enter`:{e.preventDefault();let n=f9(t),{derivedPanelConstraints:r,layout:i,separatorToPanels:a}=K7(n.id,!0),o=n.separators.find(e=>e.element===t);L7(o,`Matching separator not found`);let s=a.get(o);L7(s,`Matching panels not found`);let c=s[0],l=r.find(e=>e.panelId===c.id);if(L7(l,`Panel metadata not found`),l.collapsible){let e=i[c.id];m9(t,(l.collapsedSize===e?n.mutableState.expandedPanelSizes[c.id]??l.minSize:l.collapsedSize)-e)}break}case`F6`:{e.preventDefault();let n=f9(t).separators.map(e=>e.element),r=Array.from(n).findIndex(t=>t===e.currentTarget);L7(r!==null,`Index not found`),n[e.shiftKey?r>0?r-1:n.length-1:r+1<n.length?r+1:0].focus({preventScroll:!0});break}case`Home`:e.preventDefault(),m9(t,-100)}}function ike(e,t){let{element:n,orientation:r,panels:i}=e,a=n.getBoundingClientRect(),o=r===`horizontal`;return H7({expandHitTargets:!1,group:e,includeDisabled:!0}).map(({panels:r,rect:s,separator:c},l)=>{let u=i.indexOf(r[0]),d=o?s.left+s.width/2:s.top+s.height/2;return{active:t.some(t=>{if(t.group!==e||t.panels[0]!==r[0])return!1;if(c||t.separator)return t.separator===c;let n=o?t.rect.left+t.rect.width/2:t.rect.top+t.rect.height/2;return X7(d,n)}),group:e,key:c?`separator-${c.id}`:`panel-${r[0].id}-${l}`,offset:0,panelIndex:u,rect:new DOMRect((o&&!c?d:s.left)-a.left-n.clientLeft+n.scrollLeft,(!o&&!c?d:s.top)-a.top-n.clientTop+n.scrollTop,o&&!c?0:s.width,!o&&!c?0:s.height),separator:c}})}function g9(e){if(e.defaultPrevented||e.pointerType===`mouse`&&e.button>0)return;let t=q7(),n=c9(e,t);if(n.length===0)return;let r=new Map,i=!1;n.forEach(e=>{e.separator&&(i||(i=!0,e.separator.element.focus({focusVisible:!1,preventScroll:!0})));let n=t.get(e.group);n&&r.set(e.group,n.layout)});let a=Array.from(r.keys()).flatMap(e=>e.resizePreviewMode===`separator`?ike(e,n):[]);T7({cursorFlags:0,didPointerMove:!1,hitRegions:n,initialLayoutMap:r,pointerDownAtPoint:{x:e.clientX,y:e.clientY},previewLayoutMap:new Map(r),previews:a,state:`active`}),e.preventDefault()}function _9(e){let t=q7(),n=C7();n.state===`active`&&t9({commit:!1,document:e.currentTarget,event:e,hitRegions:n.hitRegions,initialLayoutMap:n.initialLayoutMap,mountedGroups:t,prevCursorFlags:n.cursorFlags})}function v9(e){if(e.defaultPrevented)return;let t=C7(),n=q7();switch(t.state){case`active`:if(e.buttons===0){t.previewLayoutMap.forEach((e,t)=>{let r=n.get(t);t.resizePreviewMode===`separator`&&r&&!e9(e,r.layout)&&Y7(t,{...r,layout:e})}),T7({cursorFlags:0,state:`inactive`}),t.hitRegions.forEach(e=>{if(!n.has(e.group))return;let t=K7(e.group.id,!0);Y7(e.group,t,{isUserInteraction:!0})}),I7(e.currentTarget);return}for(let n of t.hitRegions)if(n.separator){let{element:t}=n.separator;t.isConnected&&!t.hasPointerCapture?.(e.pointerId)&&t.setPointerCapture?.(e.pointerId)}t9({commit:!1,document:e.currentTarget,event:e,hitRegions:t.hitRegions,initialLayoutMap:t.initialLayoutMap,mountedGroups:n,pointerDownAtPoint:t.pointerDownAtPoint,prevCursorFlags:t.cursorFlags});break;default:{let r=c9(e,n);r.length===0?t.state!==`inactive`&&T7({cursorFlags:0,state:`inactive`}):T7({cursorFlags:0,hitRegions:r,state:`hover`}),I7(e.currentTarget);break}}}function y9(e){if(e.relatedTarget instanceof HTMLIFrameElement)switch(C7().state){case`hover`:T7({cursorFlags:0,state:`inactive`})}}function b9(e){e.defaultPrevented||e.pointerType===`mouse`&&e.button>0||n9(e.currentTarget,e)&&e.preventDefault()}function ake(e){let t=0,n=0,r={};for(let i of e)if(i.defaultSize!==void 0){t++;let e=_7(i.defaultSize);n+=e,r[i.panelId]=e}else r[i.panelId]=void 0;let i=e.length-t;if(i!==0){let t=_7((100-n)/i);for(let n of e)n.defaultSize===void 0&&(r[n.panelId]=t)}return r}function oke(e,t){let n=e.map(e=>e.id),r=Object.keys(t);if(n.length!==r.length)return!1;for(let e of n)if(!r.includes(e))return!1;return!0}function x9({group:e,panelConstraints:t}){let n=e.panels.map(({id:e})=>e).join(`,`),r=e.mutableState.defaultLayout;return e.mutableState.layouts[n]??(r&&oke(e.panels,r)?r:ake(t))}function ske(e,t,n){if(!n[0])return;let r=e.panels.find(e=>e.element===t);if(!r||!r.onResize)return;let i=v7({group:e}),a=e.orientation===`horizontal`?r.element.offsetWidth:r.element.offsetHeight,o=r.mutableValues.prevSize,s={asPercentage:_7(a/i*100),inPixels:a};r.mutableValues.prevSize=s,r.onResize(s,r.id,o)}function S9(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(e[n]!==t[n])return!1;return!0}function cke(e,t){return e.length===t.length&&e.every((e,n)=>S9(e,t[n]))}function lke({group:e,nextGroupSize:t,prevGroupSize:n,prevLayout:r}){if(n<=0||t<=0||n===t)return r;let i=0,a=0,o=!1,s=new Map,c=[];for(let l of e.panels){let e=r[l.id]??0;switch(l.panelConstraints.groupResizeBehavior){case`preserve-pixel-size`:{o=!0;let r=_7(e/100*n/t*100);s.set(l.id,r),i+=r;break}default:c.push(l.id),a+=e}}if(!o||c.length===0)return r;let l=100-i,u={...r};if(s.forEach((e,t)=>{u[t]=e}),a>0)for(let e of c)u[e]=_7((r[e]??0)/a*l);else{let e=_7(l/c.length);for(let t of c)u[t]=e}return u}var C9=new Map;function uke(e){let t=!0;L7(e.element.ownerDocument.defaultView,`Cannot register an unmounted Group`);let n=e.element.ownerDocument.defaultView.ResizeObserver,r=new Set,i=new Set,a=new n(n=>{for(let r of n){let{borderBoxSize:n,target:i}=r;if(i===e.element){if(t){let t=v7({group:e});if(t===0)return;let n=K7(e.id);if(!n)return;let r=y7(e),i=n.defaultLayoutDeferred?x9({group:e,panelConstraints:r}):n.layout,a=l9({layout:lke({group:e,nextGroupSize:t,prevGroupSize:n.groupSize,prevLayout:i}),panelConstraints:r});if(!n.defaultLayoutDeferred&&e9(n.layout,a)&&cke(n.derivedPanelConstraints,r)&&n.groupSize===t)continue;Y7(e,{defaultLayoutDeferred:!1,derivedPanelConstraints:r,groupSize:t,layout:a,separatorToPanels:n.separatorToPanels})}}else ske(e,i,n)}});a.observe(e.element),e.panels.forEach(e=>{L7(!r.has(e.id),`Panel ids must be unique; id "${e.id}" was used more than once`),r.add(e.id),e.onResize&&a.observe(e.element)});let o=v7({group:e}),s=y7(e),c=l9({layout:x9({group:e,panelConstraints:s}),panelConstraints:s}),l=e.element.ownerDocument;C9.set(l,(C9.get(l)??0)+1);let u=new Map;return H7({group:e,includeDisabled:!0}).forEach(e=>{e.separator&&u.set(e.separator,e.panels)}),Y7(e,{defaultLayoutDeferred:o===0,derivedPanelConstraints:s,groupSize:o,layout:c,separatorToPanels:u}),e.separators.forEach(e=>{L7(!i.has(e.id),`Separator ids must be unique; id "${e.id}" was used more than once`),i.add(e.id),e.element.addEventListener(`keydown`,h9)}),C9.get(l)===1&&(l.addEventListener(`contextmenu`,r9,!0),l.addEventListener(`dblclick`,d9,!0),l.addEventListener(`pointerdown`,g9,!0),l.addEventListener(`pointerleave`,_9),l.addEventListener(`pointermove`,v9),l.addEventListener(`pointerout`,y9),l.addEventListener(`pointerup`,b9,!0)),function(){t=!1,C9.set(l,Math.max(0,(C9.get(l)??0)-1)),qOe(e),BOe(e)&&I7(l),e.separators.forEach(e=>{e.element.removeEventListener(`keydown`,h9)}),C9.get(l)||(l.removeEventListener(`contextmenu`,r9,!0),l.removeEventListener(`dblclick`,d9,!0),l.removeEventListener(`pointerdown`,g9,!0),l.removeEventListener(`pointerleave`,_9),l.removeEventListener(`pointermove`,v9),l.removeEventListener(`pointerout`,y9),l.removeEventListener(`pointerup`,b9,!0)),a.disconnect()}}function dke(){let[e,t]=(0,_.useState)({});return[e,(0,_.useCallback)(()=>t({}),[])]}function w9(e){let t=(0,_.useId)();return`${e??t}`}var T9=typeof window<`u`?_.useLayoutEffect:_.useEffect;function E9(e){let t=(0,_.useRef)(e);return T9(()=>{t.current=e},[e]),(0,_.useCallback)((...e)=>t.current?.(...e),[t])}function D9(...e){return E9(t=>{e.forEach(e=>{if(e)switch(typeof e){case`function`:e(t);break;case`object`:e.current=t}})})}function O9(e){let t=(0,_.useRef)({...e});return T9(()=>{for(let n in e)t.current[n]=e[n]},[e]),t.current}var k9=(0,_.createContext)(null);function fke({separator:e}){let{element:t}=e,n=(0,_.useRef)(null);return T9(()=>{let e=t.cloneNode(!0),r=[t,...t.querySelectorAll(`*`)],i=[e,...e.querySelectorAll(`*`)],a=t.ownerDocument.defaultView;return r.forEach((e,t)=>{let n=i[t];if(n instanceof a.HTMLElement||n instanceof a.SVGElement){let t=a.getComputedStyle(e);for(let e=0;e<t.length;e++){let r=t.item(e);n.style.setProperty(r,t.getPropertyValue(r))}}n.removeAttribute(`data-testid`),n.removeAttribute(`id`)}),Object.assign(e.style,{boxSizing:`border-box`,height:`100%`,margin:`0`,position:`static`,transform:`none`,width:`100%`}),n.current.appendChild(e),()=>e.remove()},[t]),(0,L.jsx)(`div`,{ref:n,style:{height:`100%`,opacity:.65,pointerEvents:`none`,width:`100%`}})}function A9(){let e=(0,_.useContext)(k9);return L7(e,`Group Context not found; did you render a Panel or Separator outside of a Group?`),e}function j9(e){let{registerOverlay:t}=A9(),n=(0,_.useRef)(e);S9(n.current,e)||(n.current=e);let r=n.current;return T9(()=>t(r),[t,r]),null}j9.displayName=`SeparatorOverlay`;function pke({active:e,orientation:t,style:n,...r}){let i;switch(t){case`horizontal`:i={height:`100%`,minWidth:`1px`};break;case`vertical`:i={minHeight:`1px`,width:`100%`}}return(0,L.jsx)(`div`,{...r,"data-separator-overlay":e?`active`:`inactive`,style:{...i,...n,flexShrink:0,pointerEvents:`none`}})}function mke({overlay:e,preview:t}){let{group:n,offset:r,rect:i,separator:a}=t,o=n.orientation===`horizontal`,s=a?.preview,c=e;return(0,_.isValidElement)(s)&&s.type===j9&&(c=s.props,s=void 0),s??(c?s=(0,L.jsx)(pke,{...c,active:t.active,orientation:n.orientation}):a&&(s=(0,L.jsx)(fke,{separator:a}))),(0,L.jsx)(`div`,{"aria-hidden":`true`,"data-resize-preview":!0,inert:!0,style:{height:i.height,left:i.left,pointerEvents:`none`,position:`absolute`,top:i.top,transform:o?`translateX(${r}px)`:`translateY(${r}px)`,width:i.width},children:s})}function hke(e,t){let n=(0,_.useRef)({getLayout:()=>({}),setLayout:VOe});(0,_.useImperativeHandle)(t,()=>n.current,[]),T9(()=>{Object.assign(n.current,p9({groupId:e}))})}function gke({groupId:e,resizePreviewMode:t}){let[n,r]=(0,_.useState)([]),i=(0,_.useRef)(n);return T9(()=>{let n=n=>{let a=G7(e),o=t===`separator`&&n.state===`active`?n.previews.filter(e=>e.group===a&&(e.active||!X7(e.offset,0))):[],s=i.current;s.length===o.length&&o.every((e,t)=>e===s[t])||(i.current=o,r(o))};if(t!==`separator`){n(C7());return}let a=w7(({next:e})=>n(e));return n(C7()),a},[e,t]),n}function M9({children:e,className:t,defaultLayout:n,disableCursor:r,disabled:i,elementRef:a,groupRef:o,id:s,onLayoutChange:c,onLayoutChanged:l,orientation:u=`horizontal`,resizePreviewMode:d=`panel`,resizeTargetMinimumSize:f={coarse:20,fine:10},style:p,...m}){let h=(0,_.useRef)({onLayoutChange:{},onLayoutChanged:{}}),g=E9(e=>{e9(h.current.onLayoutChange,e)||(h.current.onLayoutChange=e,c?.(e))}),v=E9((e,t)=>{e9(h.current.onLayoutChanged,e)||(h.current.onLayoutChanged=e,l?.(e,{isUserInteraction:t}))}),y=w9(s),[b,x]=(0,_.useState)(),S=gke({groupId:y,resizePreviewMode:d}),C=(0,_.useRef)(null),[w,T]=dke(),E=(0,_.useRef)({lastExpandedPanelSizes:{},layouts:{},panels:[],separators:[]}),D=D9(C,a);hke(y,o);let O=E9((e,t)=>{let r=K7(e);if(r)return{flexGrow:r.layout[t]??1};if(n?.[t])return{flexGrow:n?.[t]}}),k=O9({defaultLayout:n,disableCursor:r,resizeTargetMinimumSize:f}),A=(0,_.useMemo)(()=>({get disableCursor(){return!!k.disableCursor},getPanelStyles:O,id:y,orientation:u,registerPanel:e=>{let t=E.current;return t.panels=R7(u,[...t.panels,e]),T(),()=>{t.panels=t.panels.filter(t=>t!==e),T()}},registerOverlay:e=>(x(e),()=>{x(void 0)}),registerSeparator:e=>{let t=E.current;return t.separators=R7(u,[...t.separators,e]),T(),()=>{t.separators=t.separators.filter(t=>t!==e),T()}},updatePanelProps:(e,{disabled:t})=>{let n=E.current.panels.find(t=>t.id===e);n&&(n.panelConstraints.disabled=t);let r=G7(y),i=K7(y);r&&i&&Y7(r,{...i,derivedPanelConstraints:y7(r)})},updateSeparatorProps:(e,{disabled:t,disableDoubleClick:n})=>{let r=E.current.separators.find(t=>t.id===e);r&&(r.disabled=t,r.disableDoubleClick=n)}}),[O,y,T,u,k]),j=(0,_.useRef)(null);return T9(()=>{let e=C.current;if(e===null)return;let t=E.current,n;if(k.defaultLayout!==void 0&&Object.keys(k.defaultLayout).length===t.panels.length){n={};for(let e of t.panels){let t=k.defaultLayout[e.id];t!==void 0&&(n[e.id]=t)}}let r={disabled:!!i,element:e,id:y,mutableState:{defaultLayout:n,disableCursor:!!k.disableCursor,expandedPanelSizes:E.current.lastExpandedPanelSizes,layouts:E.current.layouts},orientation:u,panels:t.panels,resizePreviewMode:d,get resizeTargetMinimumSize(){return k.resizeTargetMinimumSize},separators:t.separators};j.current=r;let a=uke(r),{defaultLayoutDeferred:o,derivedPanelConstraints:s,layout:c}=K7(r.id,!0);!o&&s.length>0&&(g(c),v(c,!1));let l=J7(y,e=>{let{defaultLayoutDeferred:t,derivedPanelConstraints:n,layout:i}=e.next;if(t||n.length===0)return;let a=r.panels.map(({id:e})=>e).join(`,`);r.mutableState.layouts[a]=i,n.forEach(t=>{if(t.collapsible){let{layout:n}=e.prev??{};if(n){let e=X7(t.collapsedSize,i[t.panelId]),a=X7(t.collapsedSize,n[t.panelId]);e&&!a&&(r.mutableState.expandedPanelSizes[t.panelId]=n[t.panelId])}}});let o=C7(),s=o.state!==`active`||!o.hitRegions.some(e=>e.group===r);g(i),s&&v(i,e.isUserInteraction)});return()=>{j.current=null,a(),l()}},[i,y,v,g,u,w,d,k]),(0,_.useEffect)(()=>{let e=j.current;e&&(e.mutableState.defaultLayout=n,e.mutableState.disableCursor=!!r)}),(0,L.jsx)(k9.Provider,{value:A,children:(0,L.jsxs)(`div`,{...m,className:t,"data-group":!0,"data-testid":y,id:y,ref:D,style:{height:`100%`,width:`100%`,overflow:`hidden`,position:d===`separator`?`relative`:void 0,...p,display:`flex`,flexDirection:u===`horizontal`?`row`:`column`,flexWrap:`nowrap`,touchAction:u===`horizontal`?`pan-y`:`pan-x`},children:[e,S.map(e=>(0,L.jsx)(mke,{overlay:b,preview:e},e.key))]})})}M9.displayName=`Group`;function _ke(e,t){let{id:n}=A9(),r=(0,_.useRef)({collapse:E7,expand:E7,getSize:()=>({asPercentage:0,inPixels:0}),isCollapsed:()=>!1,resize:E7});(0,_.useImperativeHandle)(t,()=>r.current,[]),T9(()=>{Object.assign(r.current,u9({groupId:n,panelId:e}))})}function N9({children:e,className:t,collapsedSize:n=`0%`,collapsedThreshold:r,collapsible:i=!1,defaultSize:a,disabled:o,elementRef:s,groupResizeBehavior:c=`preserve-relative-size`,id:l,maxSize:u=`100%`,minSize:d=`0%`,onResize:f,panelRef:p,style:m,...h}){let g=!!l,v=w9(l),y=O9({disabled:o}),b=(0,_.useRef)(null),x=D9(b,s),{getPanelStyles:S,id:C,orientation:w,registerPanel:T,updatePanelProps:E}=A9(),D=f!==null,O=E9((e,t,n)=>{f?.(e,l,n)});T9(()=>{let e=b.current;if(e!==null){let t={element:e,id:v,idIsStable:g,mutableValues:{expandToSize:void 0,prevSize:void 0},onResize:D?O:void 0,panelConstraints:{groupResizeBehavior:c,collapsedSize:n,collapsedThreshold:r,collapsible:i,defaultSize:a,disabled:y.disabled,maxSize:u,minSize:d}};return T(t)}},[c,n,r,i,a,D,v,g,u,d,O,T,y]),(0,_.useEffect)(()=>{E(v,{disabled:o})},[o,v,E]),_ke(v,p);let k=()=>{let e=S(C,v);if(e)return JSON.stringify(e)},A=(0,_.useSyncExternalStore)(e=>J7(C,e),k,k),j;return j=A?JSON.parse(A):a===void 0?{flexGrow:1}:{flexGrow:void 0,flexShrink:void 0,flexBasis:a},(0,L.jsx)(`div`,{...h,"data-disabled":o||void 0,"data-panel":!0,"data-testid":v,id:v,ref:x,style:{...vke,display:`flex`,flexBasis:0,flexShrink:1,overflow:`visible`,...j},children:(0,L.jsx)(`div`,{className:t,style:{maxHeight:`100%`,maxWidth:`100%`,flexGrow:1,overflow:`auto`,...m,touchAction:w===`horizontal`?`pan-y`:`pan-x`},children:e})})}N9.displayName=`Panel`;var vke={minHeight:0,maxHeight:`100%`,height:`auto`,minWidth:0,maxWidth:`100%`,width:`auto`,border:`none`,borderWidth:0,padding:0,margin:0};function yke({layout:e,panelConstraints:t,panelId:n,panelIndex:r}){let i,a,o=e[n],s=t.find(e=>e.panelId===n);if(s){let c=s.maxSize,l=s.collapsible?s.collapsedSize:s.minSize,u=[r,r+1];a=l9({layout:$7({delta:l-o,initialLayout:e,panelConstraints:t,pivotIndices:u,prevLayout:e}),panelConstraints:t})[n],i=l9({layout:$7({delta:c-o,initialLayout:e,panelConstraints:t,pivotIndices:u,prevLayout:e}),panelConstraints:t})[n]}return{valueControls:n,valueMax:i,valueMin:a,valueNow:o}}function P9({children:e,className:t,disabled:n,disableDoubleClick:r,elementRef:i,id:a,preview:o,style:s,...c}){let l=w9(a),u=O9({disabled:n,disableDoubleClick:r,children:e,className:t,preview:o,style:s}),[d,f]=(0,_.useState)({}),[p,m]=(0,_.useState)(`inactive`),[h,g]=(0,_.useState)(!1),v=(0,_.useRef)(null),y=(0,_.useRef)(null),b=D9(v,i),{disableCursor:x,id:S,orientation:C,registerSeparator:w,updateSeparatorProps:T}=A9(),E=C===`horizontal`?`vertical`:`horizontal`;T9(()=>{let e=v.current;if(e!==null){let t={disabled:u.disabled,disableDoubleClick:u.disableDoubleClick,element:e,id:l,get children(){return u.children},get className(){return u.className},get preview(){return u.preview},get style(){return u.style}};y.current=t;let n=w(t),r=w7(e=>{m(e.next.state!==`inactive`&&e.next.hitRegions.some(e=>e.separator===t)?e.next.state:`inactive`)}),i=J7(S,e=>{let{derivedPanelConstraints:n,layout:r,separatorToPanels:i}=e.next,a=i.get(t);if(a){let e=a[0],t=n.findIndex(t=>t.panelId===e.id);f(yke({layout:r,panelConstraints:n,panelId:e.id,panelIndex:t}))}});return()=>{y.current=null,r(),i(),n()}}},[S,l,w,u]),T9(()=>{let e=y.current;e&&zOe(e)},[o]),(0,_.useEffect)(()=>{T(l,{disabled:n,disableDoubleClick:r})},[n,r,l,T]);let D;n&&!x&&(D=`not-allowed`);let O;if(n)O=`disabled`;else switch(p){case`active`:O=`active`;break;default:O=h?`focus`:p}return(0,L.jsx)(`div`,{...c,"aria-controls":d.valueControls,"aria-disabled":n||void 0,"aria-orientation":E,"aria-valuemax":d.valueMax,"aria-valuemin":d.valueMin,"aria-valuenow":d.valueNow,children:e,className:t,"data-separator":O,"data-testid":l,id:l,onBlur:()=>g(!1),onFocus:()=>g(!0),ref:b,role:`separator`,style:{flexBasis:`auto`,cursor:D,...s,flexGrow:0,flexShrink:0,touchAction:`none`},tabIndex:n?void 0:0})}P9.displayName=`Separator`;var bke=({withHandle:e=!1,className:t,...n})=>(0,L.jsx)(P9,{className:Q(`relative flex w-px items-center justify-center bg-border after:absolute after:inset-y-[0px] after:left-1/2 after:w-px after:-translate-x-1/2 focus-visible:outline-hidden aria-[orientation=horizontal]:h-px aria-[orientation=horizontal]:w-full after:aria-[orientation=horizontal]:left-[0px] after:aria-[orientation=horizontal]:h-px after:aria-[orientation=horizontal]:w-full after:aria-[orientation=horizontal]:translate-x-[0px] after:aria-[orientation=horizontal]:-translate-y-1/2 [&[aria-orientation=horizontal]>div]:rotate-90`,t),"data-slot":`resizable-handle`,...n,children:e&&(0,L.jsx)(`div`,{className:`z-10 flex h-md w-3xs shrink-0 rounded-lg bg-border-strong`})}),xke=({className:e,...t})=>(0,L.jsx)(N9,{className:Q(``,e),"data-slot":`resizable-panel`,...t}),Ske=({className:e,...t})=>(0,L.jsx)(M9,{className:Q(`flex h-full aria-[orientation=vertical]:flex-col`,e),"data-slot":`resizable-panel-group`,...t}),Cke=nr(`overflow-hidden rounded-xl`,{variants:{orientation:{vertical:``,horizontal:`h-full`},variant:{default:`bg-surface-low **:data-viewport:rounded-xl **:data-viewport:bg-surface-low **:data-viewport:p-sm **:data-viewport:inset-shadow-2xs **:data-viewport:before:pointer-events-none **:data-viewport:before:absolute **:data-viewport:before:top-0 **:data-viewport:before:left-0 **:data-viewport:before:block **:data-viewport:before:h-[min(40px,var(--scroll-area-overflow-y-start))] **:data-viewport:before:w-full **:data-viewport:before:bg-linear-to-b **:data-viewport:before:from-shadow **:data-viewport:before:to-transparent **:data-viewport:before:transition-[height] **:data-viewport:before:duration-100 **:data-viewport:before:ease-out **:data-viewport:before:content-[""] **:data-viewport:before:[--scroll-area-overflow-y-start:inherit] **:data-viewport:after:pointer-events-none **:data-viewport:after:absolute **:data-viewport:after:bottom-0 **:data-viewport:after:left-0 **:data-viewport:after:block **:data-viewport:after:h-[min(40px,var(--scroll-area-overflow-y-end,40px))] **:data-viewport:after:w-full **:data-viewport:after:bg-linear-to-t **:data-viewport:after:from-shadow **:data-viewport:after:to-transparent **:data-viewport:after:transition-[height] **:data-viewport:after:duration-100 **:data-viewport:after:ease-out **:data-viewport:after:content-[""] **:data-viewport:after:[--scroll-area-overflow-y-end:inherit]`,ghost:`**:data-viewport:pr-3xs`,outline:`border border-border **:data-viewport:p-sm`}},defaultVariants:{orientation:`vertical`,variant:`default`}}),wke=({defaultHeight:e=200,orientation:t,variant:n,className:r,children:i,ref:a,...o})=>(0,L.jsxs)(vv,{className:Q(r,Cke({orientation:t,variant:n})),ref:a,style:{height:t===`vertical`?`${e}px`:`100%`},...o,children:[(0,L.jsx)(Ev,{"data-viewport":!0,className:Q(`flex h-full gap-xs overscroll-contain`,t===`horizontal`&&`flex-row pb-md`,t===`vertical`&&`flex-col`),children:i}),(0,L.jsx)(Av,{"data-scrollbar":!0,className:Q(`ml-sm opacity-0 transition-opacity delay-300 hover:cursor-pointer data-hovering:opacity-100 data-hovering:delay-0 data-hovering:duration-75 data-scrolling:opacity-100 data-scrolling:delay-0 data-scrolling:duration-75`,t===`vertical`&&`my-2xs mr-3xs w-2xs`,t===`horizontal`&&`mx-xs mb-xs h-2xs`),orientation:t,children:(0,L.jsx)(jv,{className:`size-full rounded-full bg-accent-default shadow-xs`})}),(0,L.jsx)(Mv,{})]}),Tke=[{name:`mobile`,query:`(max-width: 767px), (orientation: landscape) and (max-height: 500px)`},{name:`tablet`,query:`(min-width: 768px) and (max-width: 1023px)`},{name:`desktop`,query:`(min-width: 1024px)`}],F9=e=>{let t=Tke.find(t=>t.name===e),[n,r]=_.useState(()=>typeof window<`u`&&window.matchMedia(t.query).matches);return _.useEffect(()=>{let e=window.matchMedia(t.query),n=()=>r(e.matches);return n(),e.addEventListener(`change`,n),()=>e.removeEventListener(`change`,n)},[t]),n},I9=`dawn-ui-theme`,L9=`light`,Eke=(e,t)=>t.find(t=>t.value===e),R9=(0,_.createContext)({theme:`system`,setTheme:()=>null});function Dke({children:e,defaultTheme:t=L9,storageKey:n=I9,...r}){let[i,a]=(0,_.useState)(()=>localStorage.getItem(n)||t);(0,_.useEffect)(()=>{window.document.documentElement.setAttribute(`data-theme`,i),localStorage.setItem(n,i)},[i,n]);let o={theme:i,setTheme:a};return(0,L.jsx)(R9.Provider,{...r,value:o,children:e})}var Oke=()=>{let e=(0,_.useContext)(R9);if(e===void 0)throw Error(`useTheme must be used within a ThemeProvider`);return e},z9=_.createContext(null),kke=({id:e,defaultOpen:t=!0,side:n=`left`,collapsible:r=`icon`,className:i,children:a,ref:o,...s})=>{let c=`sidebar-state-${e}`,l=604800,[u,d]=_.useState(t),f=F9(`mobile`),p=f?`offcanvas`:r,m=_.useCallback(e=>{d(t=>{let n=typeof e==`function`?e(t):e;return document.cookie=[`${c}=${encodeURIComponent(String(n))}`,`path=/`,`max-age=${l}`,`samesite=lax`].join(`; `),n})},[c,l]);return(0,L.jsx)(z9.Provider,{value:{id:e,defaultOpen:t,open:u,setOpen:m,side:n,trigger:()=>m(e=>!e),isMobile:f,collapsible:p},children:(0,L.jsx)(`div`,{className:Q(`relative size-full`,n===`left`?`flex flex-row`:`flex flex-row-reverse`,i),ref:o,...s,children:a})})},B9=()=>{let e=_.useContext(z9);if(!e)throw Error(`useSidebar must be used within a SidebarProvider`);return e},Ake=({tone:e=`primary`,width:t=400,className:n,children:r,...i})=>{let{open:a,setOpen:o,isMobile:s,collapsible:c,side:l}=B9(),u=_.useRef(null);return _.useEffect(()=>{let e=e=>{u.current&&!u.current.contains(e.target)&&s&&a&&o&&o(!1)};return document.addEventListener(`click`,e),()=>{document.removeEventListener(`click`,e)}},[a,o,s]),(0,L.jsx)(`div`,{className:Q(`sticky left-[0px] flex h-full shrink-0 flex-col justify-between overflow-hidden border-border bg-surface transition-[width,transform] duration-300 ease-in-out`,n,e===`primary`&&`bg-surface-background`,e===`secondary`&&`bg-surface`,e===`ghost`&&`bg-transparent`,c===`none`?`gap-lg`:c===`offcanvas`||c===`icon`?a?`gap-lg`:`gap-sm`:`gap-lg`,(c===`offcanvas`||c===`icon`)&&!a&&s?`absolute z-50 -translate-x-full`:(c===`offcanvas`||c===`icon`)&&a&&s?`absolute z-50`:``,c===`offcanvas`&&!a&&`border-none`,a&&`p-md`,c===`icon`&&!a&&`py-md`,s&&`border-none`,l===`left`?`border-r`:`border-l`),ref:u,style:c===`none`?{width:`${t}px`}:c===`offcanvas`?a?s?{width:`33.333333%`}:{width:`${t}px`}:{width:`0px`}:c==`icon`?a?{width:`${t}px`}:s?{width:`0px`}:{width:`80px`}:{width:`${t}px`},...i,children:r})},jke=({className:e,children:t,ref:n,...r})=>{let{open:i}=B9();return(0,L.jsx)(vv,{className:Q(`mb-auto min-h-0 flex-1 overflow-hidden rounded-xl transition-all duration-300 ease-in-out`,i?``:`w-fit self-center`,e),ref:n,...r,children:(0,L.jsx)(Ev,{className:Q(`flex h-full scrollbar-none flex-col items-center divide-y divide-border overflow-y-auto overscroll-contain [&::-webkit-scrollbar]:hidden`,`before:pointer-events-none before:absolute before:top-0 before:left-0 before:block before:h-[min(40px,var(--scroll-area-overflow-y-start))] before:w-full before:bg-linear-to-b before:from-shadow/35 before:to-transparent before:transition-[height] before:duration-100 before:ease-out before:content-[""] before:[--scroll-area-overflow-y-start:inherit]`,`after:pointer-events-none after:absolute after:bottom-0 after:left-0 after:block after:h-[min(40px,var(--scroll-area-overflow-y-end,40px))] after:w-full after:bg-linear-to-t after:from-shadow/35 after:to-transparent after:transition-[height] after:duration-100 after:ease-out after:content-[""] after:[--scroll-area-overflow-y-end:inherit]`,i?`gap-md`:`gap-xs px-3xs pt-3xs`),children:t})})},Mke=({className:e,children:t,ref:n,...r})=>{let{open:i,collapsible:a}=B9(),o=a===`none`||i;return(0,L.jsx)(`div`,{className:Q(`flex shrink-0 animate-in items-center truncate p-3xs transition-all duration-300 ease-in-out`,i?`justify-start fade-in-0`:`justify-center self-center fade-out-0`,e),ref:n,...r,children:t(o)})},Nke=({className:e,children:t,ref:n,...r})=>(0,L.jsx)(`div`,{className:Q(`flex w-full flex-col items-start gap-3xs not-last-of-type:pb-md`,e),ref:n,...r,children:t}),Pke=({className:e,children:t,ref:n,...r})=>(0,L.jsx)(`div`,{className:Q(`flex w-full flex-col gap-3xs`,e),ref:n,...r,children:t}),Fke=({className:e,children:t,ref:n,...r})=>{let{open:i,collapsible:a}=B9();return a===`none`||i?(0,L.jsx)(`span`,{className:Q(`inline-flex h-md w-full items-center justify-between truncate pr-3xs pl-sm style-text-default--1 text-on-surface-variant transition-all duration-200 ease-out`,a!==`none`&&i&&`animate-in fade-in-0 slide-in-from-left-2`,e),ref:n,...r,children:t}):null},Ike=({className:e,children:t,ref:n,...r})=>{let{open:i,collapsible:a}=B9(),o=a===`none`||i;return(0,L.jsx)(`div`,{className:Q(`flex shrink-0 items-center justify-start gap-xs truncate style-text-strong-1 transition-all duration-200 ease-out`,i?`h-2xl pr-3xs pl-xs`:`self-center`,i&&`justify-between`,a!==`none`&&`animate-in`,o?`fade-in-0`:`fade-out-0`,e),ref:n,...r,children:t(o)})},Lke=({className:e,children:t,ref:n,...r})=>(0,L.jsx)(`div`,{className:Q(`flex w-full flex-col items-start gap-3xs p-3xs`,e),ref:n,...r,children:t}),Rke=({className:e,children:t,ref:n,...r})=>{let{trigger:i,open:a,collapsible:o}=B9();return!i||o===`none`?null:(0,L.jsx)(Gb,{"aria-label":`Toggle sidebar`,className:Q(`shrink-0 border-none`,e),ref:n,size:`iconMedium`,variant:`ghost`,onClick:e=>{e.stopPropagation(),i&&i()},...r,children:typeof t==`function`?t(a):t})},zke=({className:e,children:t,ref:n,...r})=>{let{open:i}=B9();return(0,L.jsx)(Zb,{className:Q(!i&&`hidden`,e),ref:n,...r,children:t})},Bke=({isActive:e,className:t,children:n,ref:r,...i})=>{let{open:a,collapsible:o}=B9();return(0,L.jsx)(`button`,{"data-active":e?`true`:`false`,className:Q(`inline-flex cursor-pointer items-center gap-2xs rounded-full border border-transparent style-text-default-0 whitespace-nowrap transition-all duration-200 ease-out select-none active:scale-95 disabled:pointer-events-none disabled:opacity-50 [&>svg]:shrink-0`,e?`pointer-events-none bg-surface text-on-surface shadow-2xs`:`text-neutral-default hover:bg-neutral-container hover:text-neutral-on-container`,e&&!a&&`bg-neutral-container`,!(o===`none`||a)&&`mx-auto`,a?`h-xl w-full pl-sm`:`size-xl justify-center *:hidden [&>svg]:block`,o!==`none`&&a&&`animate-in fade-in-0 slide-in-from-left-2`,t),ref:r,...i,children:n})},V9=e=>_.Children.toArray(e).some(e=>{if(!(0,_.isValidElement)(e))return!1;let t=e.props;return t.isActive===!0||V9(t.children)}),Vke=({className:e,children:t,ref:n,...r})=>{let{open:i}=B9();return i?(0,L.jsx)(TL,{defaultOpen:V9(t),className:Q(``,e),ref:n,...r,children:t}):(0,L.jsx)(_V,{children:t})},Hke=({className:e,children:t,ref:n,...r})=>{let{open:i}=B9();return i?(0,L.jsx)(CL,{className:Q(`py-3xs`,e),ref:n,...r,children:t}):(0,L.jsx)(xV,{elevation:`low`,side:`right`,className:`w-fit p-[0.5rem_0.5rem]`,children:(0,L.jsx)(TV,{className:`flex gap-3xs`,children:t})})},Uke=({className:e,children:t,ref:n,style:r,...i})=>{let{open:a,collapsible:o}=B9(),s=o===`none`||a;return a?(0,L.jsx)(wL,{variant:`ghost`,className:Q(`inline-flex! w-full! animate-in! justify-start! overflow-hidden! text-left! whitespace-nowrap! fade-in-0! slide-in-from-left-2! [&>svg]:size-sm! [&>svg]:flex-none [&>svg]:shrink-0`,!s&&`mx-auto`,a?`h-xl pl-sm`:`size-xl *:hidden [&>svg]:block`,o!==`none`&&a&&`animate-in slide-in-from-left-2`,e),ref:n,style:{justifyContent:`flex-start`},...i,children:(0,L.jsx)(`span`,{className:`flex shrink-0 items-center gap-2xs [&>svg]:size-sm`,children:t})}):(0,L.jsx)(CV,{children:(0,L.jsxs)(`button`,{className:Q(`flex size-xl items-center justify-center rounded-full shadow-none! transition-colors *:hidden hover:cursor-pointer hover:bg-neutral-container hover:text-neutral-on-container data-popup-open:bg-neutral-container [&>svg]:block`),children:[t,(0,L.jsx)(fi,{weight:`bold`,className:`absolute right-2xs size-xs text-on-surface-variant`})]})})},Wke=({className:e,children:t,ref:n,...r})=>(0,L.jsx)(`div`,{className:Q(`flex h-xl w-full items-center justify-between gap-2xs`,e),ref:n,...r,children:t}),Gke=(e,t)=>{if(typeof document>`u`)return t;let n=document.cookie.match(RegExp(`(?:^|; )sidebar-state-${e}=([^;]*)`));return n?decodeURIComponent(n[1])===`true`:t},H9=(0,_.createContext)(null),U9=()=>(0,_.useContext)(H9),Kke=(e,t)=>e===t||e!=null&&t!=null&&e.length===t.length&&e.every((e,n)=>e===t[n]),W9=e=>{let[t,n]=(0,_.useState)(e);return Kke(t,e)?t:(n(e),e)},G9=e=>e==null?void 0:Array.isArray(e)?[...e]:[e],qke=({className:e,children:t,ref:n,defaultValue:r,value:i,onValueChange:a,...o})=>{let s=i!=null,[c,l]=_.useState(()=>G9(r)),[u,d]=_.useState({min:0,max:100,step:1}),f=W9(s?G9(i):c),p=_.useCallback(e=>{s||l(e),a?.(e)},[s,a]),m=_.useCallback(e=>{d(t=>t.min===e.min&&t.max===e.max&&t.step===e.step?t:{min:e.min,max:e.max,step:e.step}),e.defaultValue!=null&&l(t=>t===void 0?G9(e.defaultValue):t)},[]),h=_.useMemo(()=>({value:f,setValue:p,min:u.min,max:u.max,step:u.step,registerConfig:m}),[f,p,u,m]);return(0,L.jsx)(H9.Provider,{value:h,children:(0,L.jsx)(`div`,{"data-slot":`slider-group`,className:Q(`flex w-full flex-wrap items-center gap-x-sm`,`**:data-[slot=slider-label]:basis-full`,`**:data-[slot=slider-root]:flex-1`,`**:data-[slot=slider-description]:basis-full`,e),ref:n,...o,children:t})})},Jke=({min:e=0,max:t=100,step:n=1,defaultValue:r,value:i,onValueChange:a,...o})=>{let s=U9();_.useEffect(()=>{s?.registerConfig({min:e,max:t,step:n,defaultValue:r})},[s,e,t,n,r]);let c=W9(s?s.value??(Array.isArray(r)?[...r]:[i??r??e]):void 0);return(0,L.jsx)(HG,{min:e,max:t,step:n,value:c,onValueChange:(...e)=>{let t=e[0];s?.setValue(Array.isArray(t)?[...t]:[t]),a?.(...e)},...o})},Yke=({className:e,ref:t,...n})=>{let r=U9();if(!r)return null;let{value:i,setValue:a,min:o,max:s,step:c}=r,l=i?.[0]??o,u=e=>{let t=e.target.value;if(t===``)return;let n=Number(t);if(Number.isNaN(n))return;let r=Math.min(s,Math.max(o,n)),c=i?[...i]:[r];c[0]=r,a(c)};return(0,L.jsx)(NG,{"aria-label":`Value`,"data-slot":`slider-input`,className:Q(`w-[4rem]`,e),ref:t,...n,type:`number`,min:o,max:s,step:c,value:l,onChange:u})},Xke=({className:e,children:t,ref:n,...r})=>{let i=U9();if(!i)return null;let{value:a,min:o}=i,s=a?.[0]??o;return(0,L.jsxs)(`span`,{"data-slot":`slider-value`,className:Q(`min-w-lg text-right style-text-default--1 text-on-surface-variant`,e),ref:n,...r,children:[t,s]})},Zke=({className:e,children:t,ref:n,...r})=>(0,L.jsx)(`span`,{"data-slot":`slider-label`,className:Q(`style-text-default-0`,e),ref:n,...r,children:t}),Qke=({className:e,children:t,ref:n,...r})=>(0,L.jsx)(`p`,{"data-slot":`slider-description`,className:Q(`style-text-prose--1 text-on-surface-variant`,e),ref:n,...r,children:t}),$ke=({className:e,children:t,ref:n,...r})=>(0,L.jsx)(`div`,{"data-slot":`slider-icon`,className:Q(`[&>svg]:size-sm [&>svg]:shrink-0`,e),ref:n,...r,children:t}),K9=()=>{let e=kse(),t=t=>e.add({...t,data:{...t.data,icon:t.icon,variant:t.variant}});return{...e,add:t}},q9=()=>{let e=Ose();return{add:t=>e.add({...t,data:{...t.data,icon:t.icon,variant:t.variant}}),toasts:e.toasts}},J9=({className:e,ref:t,toast:n,...r})=>{let i=n.timeout??1e4,a=2*Math.PI*14;_.useEffect(()=>{let e,t=performance.now(),n=r=>{Math.min(r-t,i)<i&&(e=requestAnimationFrame(n))};return e=requestAnimationFrame(n),()=>cancelAnimationFrame(e)},[i]);let o=()=>{switch(n.data?.variant){case`brand`:return`bg-brand-default`;case`accent`:return`bg-accent-default`;case`neutral`:return`bg-neutral-default`;case`error`:return`bg-error-default`;case`info`:return`bg-info-default`;case`success`:return`bg-success-default`;case`warning`:return`bg-warning-default`;default:return`bg-neutral-default`}},s=()=>{switch(n.data?.variant){case`brand`:return`border-brand-border-strong`;case`accent`:return`border-accent-border-strong`;case`neutral`:return`border-neutral-border-strong`;case`error`:return`border-error-border-strong`;case`info`:return`border-info-border-strong`;case`success`:return`border-success-border-strong`;case`warning`:return`border-warning-border-strong`;default:return`border-neutral-border-strong`}},c=()=>{if(n.data?.icon)return(0,L.jsx)(n.data.icon,{weight:`fill`});switch(n.data?.variant){case`brand`:return(0,L.jsx)(ki,{weight:`fill`});case`accent`:return(0,L.jsx)(ki,{weight:`fill`});case`neutral`:return(0,L.jsx)(ki,{weight:`fill`});case`error`:return(0,L.jsx)(Vi,{weight:`fill`});case`info`:return(0,L.jsx)(ki,{weight:`fill`});case`success`:return(0,L.jsx)(gi,{weight:`fill`});case`warning`:return(0,L.jsx)(Bi,{weight:`fill`});default:return(0,L.jsx)(ki,{weight:`fill`})}};return(0,L.jsxs)(mb,{className:Q(`absolute right-[0px] bottom-[0px] left-auto z-[calc(1000-var(--toast-index))] mr-[0px] flex h-2xl origin-bottom transform-[translateX(var(--toast-swipe-movement-x))_translateY(calc(var(--toast-swipe-movement-y)-(var(--toast-index)*var(--peek))-(var(--shrink)*var(--height))))_scale(var(--scale))] items-center justify-center gap-xs overflow-hidden rounded-xl border bg-surface bg-clip-padding pr-sm shadow-lg select-none [--gap:0.75rem] [--height:var(--toast-frontmost-height,var(--toast-height))] [--offset-y:calc(var(--toast-offset-y)*-1+calc(var(--toast-index)*var(--gap)*-1)+var(--toast-swipe-movement-y))] [--peek:0.75rem] [--scale:calc(max(0,1-(var(--toast-index)*0.1)))] [--shrink:calc(1-var(--scale))] [transition:transform_0.5s_cubic-bezier(0.22,1,0.36,1),opacity_0.5s,height_0.15s] after:absolute after:top-full after:left-[0px] after:w-full after:content-[''] data-ending-style:opacity-0 data-expanded:h-(--toast-height) data-expanded:transform-[translateX(var(--toast-swipe-movement-x))_translateY(calc(var(--offset-y)))] data-limited:opacity-0 data-starting-style:transform-[translateY(150%)] data-ending-style:data-[swipe-direction=down]:transform-[translateY(calc(var(--toast-swipe-movement-y)+150%))] data-expanded:data-ending-style:data-[swipe-direction=down]:transform-[translateY(calc(var(--toast-swipe-movement-y)+150%))] data-ending-style:data-[swipe-direction=left]:transform-[translateX(calc(var(--toast-swipe-movement-x)-150%))_translateY(var(--offset-y))] data-expanded:data-ending-style:data-[swipe-direction=left]:transform-[translateX(calc(var(--toast-swipe-movement-x)-150%))_translateY(var(--offset-y))] data-ending-style:data-[swipe-direction=right]:transform-[translateX(calc(var(--toast-swipe-movement-x)+150%))_translateY(var(--offset-y))] data-expanded:data-ending-style:data-[swipe-direction=right]:transform-[translateX(calc(var(--toast-swipe-movement-x)+150%))_translateY(var(--offset-y))] data-ending-style:data-[swipe-direction=up]:transform-[translateY(calc(var(--toast-swipe-movement-y)-150%))] data-expanded:data-ending-style:data-[swipe-direction=up]:transform-[translateY(calc(var(--toast-swipe-movement-y)-150%))] [&[data-ending-style]:not([data-limited]):not([data-swipe-direction])]:transform-[translateY(150%)]`,e,s()),ref:t,toast:n,...r,children:[(0,L.jsx)(`div`,{className:Q(`flex aspect-square size-2xl items-center justify-center [&>svg]:size-lg [&>svg]:text-on-surface-inverse`,o()),children:c()}),(0,L.jsxs)(hb,{className:`flex items-center justify-center gap-xs overflow-hidden pl-2xs transition-opacity duration-250 data-behind:pointer-events-none data-behind:opacity-0 data-expanded:pointer-events-auto data-expanded:opacity-100`,children:[(0,L.jsxs)(`div`,{children:[(0,L.jsx)(xb,{className:`style-text-strong--1`}),(0,L.jsx)(bb,{className:`style-text-prose--1 whitespace-nowrap text-on-surface-variant`})]}),(0,L.jsxs)(`div`,{className:`ml-xl flex h-lg grow items-center justify-center gap-xs`,children:[(0,L.jsx)(Cb,{render:e=>(0,L.jsx)(Gb,{"data-testid":`toast-action-button`,onClick:e.onClick,size:`small`,tone:n.data?.variant,variant:`soft`,children:e.children})}),n.actionProps&&(0,L.jsx)(hV,{variant:`strong`,orientation:`vertical`,weight:`thinnest`}),(0,L.jsxs)(Sb,{"aria-label":`Close`,className:`relative flex size-sm items-center justify-center rounded-full bg-transparent p-xs text-on-surface-variant transition-colors hover:cursor-pointer hover:bg-error-container hover:text-error-on-container`,children:[(0,L.jsx)(`span`,{className:`pointer-events-none absolute inset-[0px] z-10 flex items-center justify-center`,children:(0,L.jsx)(`svg`,{width:`100%`,height:`100%`,viewBox:`0 0 32 32`,className:`block -rotate-90`,children:(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(`style`,{children:`
224
- @keyframes toast-drain-${n.id} {
225
- from { stroke-dashoffset: 0; }
226
- to { stroke-dashoffset: ${a}; }
227
- }
228
- `}),(0,L.jsx)(`circle`,{cx:`16`,cy:`16`,r:`14`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeDasharray:a,strokeLinecap:`round`,className:`text-error-border-strong`,style:{animation:`toast-drain-${n.id} ${i}ms linear forwards`}})]})})}),(0,L.jsx)(Hi,{className:`size-sm shrink-0`,weight:`bold`})]})]})]})]},n.id)},Y9=({className:e,ref:t,...n})=>{let{toasts:r}=q9();return(0,L.jsx)(wb,{children:(0,L.jsx)(cb,{"aria-label":`Notifications`,className:Q(`fixed top-auto right-[1rem] bottom-[1rem] z-10 mx-auto flex w-[250px] sm:right-[2rem] sm:bottom-[2rem] sm:w-[300px]`,e),ref:t,...n,children:r.map(e=>(0,L.jsx)(J9,{toast:e},e.id))})})},X9=({className:e,ref:t,toast:n,...r})=>(0,L.jsxs)(mb,{className:Q(`group flex w-max origin-(--transform-origin) flex-col rounded-2xl bg-surface px-sm py-2xs shadow-lg transition-[transform,scale,opacity] data-ending-style:scale-90 data-ending-style:opacity-0 data-starting-style:scale-90 data-starting-style:opacity-0`,e),ref:t,toast:n,...r,children:[(0,L.jsx)(Db,{className:`data-[side=bottom]:-top-3xs data-[side=left]:right-[-13px] data-[side=left]:rotate-90 data-[side=right]:left-[-13px] data-[side=right]:-rotate-90 data-[side=top]:-bottom-3xs data-[side=top]:rotate-180`}),(0,L.jsx)(hb,{children:(0,L.jsx)(bb,{className:`style-text-default--1`})})]}),Z9=({className:e,ref:t,...n})=>{let{toasts:r}=q9();return(0,L.jsx)(wb,{children:(0,L.jsx)(cb,{"aria-label":`Anchored notifications`,className:Q(`fixed top-auto right-[1rem] bottom-[1rem] z-10 mx-auto flex w-[250px] sm:right-[2rem] sm:bottom-[2rem] sm:w-[300px]`,e),ref:t,...n,children:r.map(e=>(0,L.jsx)(Eb,{className:`z-[calc(1000-var(--toast-index))]`,toast:e,children:(0,L.jsx)(X9,{toast:e})},e.id))})})},eAe=({children:e})=>(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(sb,{timeout:1e4,toastManager:Q9,children:(0,L.jsx)(Z9,{})}),(0,L.jsx)(sb,{timeout:1e4,toastManager:$9,children:(0,L.jsx)(Y9,{})}),e]}),Q9=K9(),$9=K9(),tAe=nr(`group flex w-fit items-center justify-center gap-3xs`,{variants:{size:{small:`rounded-lg`,medium:`rounded-xl`,large:`rounded-2xl`},variant:{default:`bg-surface-low`,ghost:`bg-transparent`}},compoundVariants:[{variant:`default`,size:`small`,className:`h-lg px-3xs`},{variant:`default`,size:`medium`,className:`h-xl px-2xs`},{variant:`default`,size:`large`,className:`h-2xl px-xs`}],defaultVariants:{size:`medium`,variant:`default`}});e.Accordion=Iee,e.AccordionHeader=_te,e.AccordionIcon=Ste,e.AccordionItem=vte,e.AccordionPanel=yte,e.AccordionSubtitle=bte,e.AccordionTitle=xte,e.Alert=Wi,e.AlertAction=Tte,e.AlertDescription=Gi,e.AlertDialog=Vse,e.AlertDialogClose=Use,e.AlertDialogConfirm=Gse,e.AlertDialogDescription=Kse,e.AlertDialogFooter=qse,e.AlertDialogHeader=Jse,e.AlertDialogIcon=$se,e.AlertDialogPopup=Xse,e.AlertDialogTitle=Zse,e.AlertDialogTrigger=Qse,e.AlertIcon=Ki,e.AlertTitle=wte,e.AnchoredToastItem=X9,e.AnchoredToasts=Z9,e.Autocomplete=ece,e.AutocompleteCollection=tce,e.AutocompleteContent=nce,e.AutocompleteGridContent=ice,e.AutocompleteGridItem=ace,e.AutocompleteGroup=oce,e.AutocompleteGroupLabel=sce,e.AutocompleteInputGroup=Jb,e.AutocompleteInputGroupAddon=cce,e.AutocompleteInputGroupInput=Yb,e.AutocompleteItem=lce,e.AutocompleteRow=uce,e.AutocompleteStatus=dce,e.AutocompleteTrigger=fce,e.Avatar=hce,e.AvatarBadge=vce,e.AvatarFallback=gce,e.AvatarImage=_ce,e.Badge=Zb,e.BentoBox=xce,e.BentoBoxAction=Qb,e.BentoBoxContent=$b,e.BentoBoxDescription=ex,e.BentoBoxFooter=Sce,e.BentoBoxHeader=Cce,e.BentoBoxTitle=wce,e.Breadcrumb=Tce,e.BreadcrumbEllipsis=Ece,e.BreadcrumbItem=Dce,e.BreadcrumbLink=Oce,e.BreadcrumbSeparator=kce,e.Button=Gb,e.ButtonGroup=jce,e.ChartContainer=Mce,e.ChartContainerContext=tx,e.ChartLegend=kI,e.ChartLegendContent=FI,e.ChartLegendIcon=AI,e.ChartLegendIndicator=jI,e.ChartLegendLabel=MI,e.ChartLinearGradient=LI,e.ChartTooltip=xI,e.ChartTooltipContent=CI,e.ChartTooltipIcon=BI,e.ChartTooltipIndicator=RI,e.ChartTooltipLabel=TI,e.ChartTooltipName=zI,e.ChartTooltipPayload=DI,e.ChartTooltipValue=VI,e.Checkbox=KI,e.CheckboxGroup=qI,e.CheckboxIndicator=WI,e.CodeBlock=YI,e.CodeBlockActions=ZI,e.CodeBlockCopy=QI,e.CodeBlockDownload=$I,e.CodeBlockHeader=eL,e.CodeBlockName=tL,e.CodeBlockSelect=mL,e.CodeBlockTabs=xL,e.CodeBlockWindow=SL,e.Collapsible=TL,e.CollapsiblePanel=CL,e.CollapsibleTrigger=wL,e.ColorChannelSlider=DL,e.ColorPicker=nV,e.ColorPickerArea=iV,e.ColorPickerGroup=aV,e.ColorPickerHueSlider=lV,e.ColorPickerInput=DV,e.ColorPickerLabel=OV,e.ColorPickerLightnessSlider=FV,e.ColorPickerPaletteLimit=kV,e.ColorPickerPaletteList=jV,e.ColorPickerPaletteSwatch=AV,e.ColorPickerRow=MV,e.ColorPickerTransparencySlider=NV,e.ColorPickerValueType=PV,e.Combobox=IV,e.ComboboxChip=LV,e.ComboboxChips=RV,e.ComboboxCollection=zV,e.ComboboxEmpty=BV,e.ComboboxGroup=VV,e.ComboboxGroupLabel=HV,e.ComboboxInput=UV,e.ComboboxItem=WV,e.ComboboxList=GV,e.ComboboxPopup=KV,e.ComboboxStatus=qV,e.ComboboxTrigger=JV,e.ComboboxValue=YV,e.ComboboxVirtualizedList=CH,e.ContextMenu=wH,e.ContextMenuCheckboxItem=TH,e.ContextMenuGroup=EH,e.ContextMenuGroupLabel=DH,e.ContextMenuItem=NH,e.ContextMenuPopup=PH,e.ContextMenuRadioGroup=OH,e.ContextMenuRadioItem=kH,e.ContextMenuSeparator=FH,e.ContextMenuShortcut=AH,e.ContextMenuSubmenu=IH,e.ContextMenuSubmenuTrigger=LH,e.ContextMenuTrigger=RH,e.DEFAULT_THEME=L9,e.Dialog=zH,e.DialogClose=BH,e.DialogContent=VH,e.DialogDescription=HH,e.DialogFooter=UH,e.DialogHeader=WH,e.DialogHelper=YH,e.DialogIcon=GH,e.DialogPopup=KH,e.DialogTitle=qH,e.DialogTrigger=JH,e.Drawer=XH,e.DrawerClose=ZH,e.DrawerContent=QH,e.DrawerDescription=$H,e.DrawerHeader=sU,e.DrawerPopup=aU,e.DrawerProvider=eU,e.DrawerTitle=oU,e.DrawerTrigger=tU,e.Dropzone=fU,e.DropzoneActions=IU,e.DropzoneClear=RU,e.DropzoneConfirm=LU,e.DropzoneContainer=mU,e.DropzoneError=hU,e.DropzoneFileList=TU,e.DropzoneFileSizeLimit=EU,e.DropzoneFiles=NU,e.DropzoneFilesHeader=PU,e.DropzoneFilesTitle=FU,e.DropzoneFormats=DU,e.DropzoneHeading=OU,e.DropzoneIcon=kU,e.DropzoneInfo=MU,e.DropzoneSubtitle=AU,e.DropzoneTrigger=jU,e.Field=zU,e.FieldCheckbox=JG,e.FieldDescription=BU,e.FieldErrors=MG,e.FieldInput=PG,e.FieldInputGroup=oK,e.FieldInputGroupInput=sK,e.FieldLabel=IG,e.FieldRadio=QG,e.FieldRadioGroup=$G,e.FieldRow=lK,e.FieldSelect=WG,e.FieldSet=cK,e.FieldSlider=UG,e.FieldSwitch=tK,e.FieldTextArea=qG,e.FieldToggle=aK,e.Form=uK,e.FormErrors=fK,e.FormFooter=pK,e.FormReset=mK,e.FormSet=hK,e.FormSetContent=gK,e.FormSetHeading=vK,e.FormSubmit=yK,e.Input=NG,e.InputGroup=uV,e.InputGroupAddon=fV,e.InputGroupInput=pV,e.InputGroupSeparator=gV,e.InputOTP=wK,e.InputOTPSlot=TK,e.InputOtpSeparator=EK,e.Kbd=DK,e.Label=UI,e.LayerTree=J4,e.LayerTreeBody=Z4,e.LayerTreeExpandAll=Q4,e.LayerTreeFooter=$4,e.LayerTreeIconCell=e3,e.LayerTreeLockedAll=t3,e.LayerTreeLockedCell=n3,e.LayerTreeNodeIcon=r3,e.LayerTreeRow=X4,e.LayerTreeSearch=i3,e.LayerTreeSort=m3,e.LayerTreeTextCell=r7,e.LayerTreeTriggerCell=i7,e.LayerTreeVisibilityAll=u7,e.LayerTreeVisibilityCell=d7,e.Menu=a3,e.MenuCheckboxItem=o3,e.MenuGroup=ESe,e.MenuGroupLabel=DSe,e.MenuItem=s3,e.MenuPopup=c3,e.MenuRadioGroup=l3,e.MenuRadioItem=u3,e.MenuSeparator=ASe,e.MenuShortcut=jSe,e.MenuSubmenu=d3,e.MenuSubmenuTrigger=f3,e.MenuTrigger=p3,e.Meter=_U,e.MeterFooter=CU,e.MeterHeader=vU,e.MeterIndicator=yU,e.MeterLabel=bU,e.MeterSubtitle=wU,e.MeterTrack=xU,e.MeterValue=SU,e.NavBar=iOe,e.NavBarItem=aOe,e.NavBarItemIcon=oOe,e.NavBarItemLabel=sOe,e.NavigationMenu=cOe,e.NavigationMenuContent=lOe,e.NavigationMenuIcon=uOe,e.NavigationMenuItem=dOe,e.NavigationMenuLink=pOe,e.NavigationMenuList=mOe,e.NavigationMenuPopup=hOe,e.NavigationMenuTrigger=_Oe,e.NumberField=vOe,e.Popover=_V,e.PopoverButton=EV,e.PopoverContent=TV,e.PopoverDescription=vV,e.PopoverHeader=wV,e.PopoverPanel=xV,e.PopoverTitle=SV,e.PopoverTrigger=CV,e.PreviewCard=bOe,e.PreviewCardPopup=xOe,e.PreviewCardTrigger=SOe,e.Profile=COe,e.ProfileAction=EOe,e.ProfileContent=DOe,e.ProfileName=wOe,e.ProfileSubname=TOe,e.Progress=OOe,e.ProgressBar=kOe,e.ProgressIndicator=AOe,e.RadarPing=MOe,e.Radio=XG,e.RadioGroup=ZG,e.ResizeableHandle=bke,e.ResizeablePanel=xke,e.ResizeablePanelGroup=Ske,e.ScrollArea=wke,e.Select=nL,e.SelectDescription=fL,e.SelectGroup=uL,e.SelectGroupLabel=dL,e.SelectIcon=aL,e.SelectItem=rL,e.SelectList=iL,e.SelectPopup=oL,e.SelectTitle=pL,e.SelectTrigger=cL,e.SelectValue=lL,e.Separator=hV,e.Sidebar=Ake,e.SidebarContent=jke,e.SidebarFooter=Mke,e.SidebarGroup=Nke,e.SidebarGroupContent=Pke,e.SidebarGroupLabel=Fke,e.SidebarHeader=Ike,e.SidebarMenu=Lke,e.SidebarMenuBadge=zke,e.SidebarMenuButton=Bke,e.SidebarMenuCollapsible=Vke,e.SidebarMenuCollapsiblePanel=Hke,e.SidebarMenuCollapsibleTrigger=Uke,e.SidebarMenuItem=Wke,e.SidebarProvider=kke,e.SidebarToggle=Rke,e.Skeleton=Xb,e.Slider=HG,e.SliderDescription=Qke,e.SliderGroup=qke,e.SliderGroupSlider=Jke,e.SliderIcon=$ke,e.SliderInput=Yke,e.SliderLabel=Zke,e.SliderThumb=BG,e.SliderValue=Xke,e.StackToastItem=J9,e.StackToasts=Y9,e.Switch=eK,e.THEME_STORAGE_KEY=I9,e.TableBadgeCell=f5,e.TableBody=p5,e.TableColumnToggle=h5,e.TableContainer=g5,e.TableDateFilterChip=v5,e.TableDateFilterForm=_5,e.TableFilterList=D5,e.TableFilterMenu=O5,e.TableFirstPage=k5,e.TableFooter=A5,e.TableHeader=j5,e.TableImageCell=M5,e.TableLastPage=N5,e.TableNav=P5,e.TableNextPage=F5,e.TableNumberCell=I5,e.TableNumberFilterChip=b5,e.TableNumberFilterForm=y5,e.TablePagination=L5,e.TablePaging=R5,e.TablePreviousPage=z5,e.TableResults=YDe,e.TableSearch=B5,e.TableSelectCell=m5,e.TableSelectFilterChip=w5,e.TableSelectFilterForm=C5,e.TableSelectHeader=V5,e.TableSortChip=U5,e.TableSortList=W5,e.TableSortMenu=H5,e.TableStringFilterChip=E5,e.TableStringFilterForm=T5,e.TableTextCell=G5,e.TableToolbar=K5,e.TableViewport=q5,e.Tabs=gL,e.TabsIndicator=_L,e.TabsList=vL,e.TabsPanel=yL,e.TabsTab=bL,e.TextArea=KG,e.ThemeProvider=Dke,e.ToastProvider=eAe,e.Toggle=iK,e.ToggleGroup=({size:e=`medium`,variant:t,className:n,children:r,ref:i,...a})=>{let o=e??`medium`;return(0,L.jsx)(nK.Provider,{value:{size:o},children:(0,L.jsx)(jb,{className:Q(tAe({size:o,variant:t,className:n})),"data-size":o,ref:i,...a,children:r})})},e.Tooltip=LG,e.TooltipContent=RG,e.TooltipTrigger=zG,e.anchoredToastManager=Q9,e.cn=Q,e.createAppColumnHelper=KDe,e.createLayerTreeColumnHelper=$De,e.dateFilterFn=X5,e.defaultFilterOperatorLabels=d5,e.features=e7,e.fieldContext=OG,e.findLayerTreeNode=a7,e.formContext=AG,e.getPayloadConfigFromPayload=NI,e.getStoredSidebarOpen=Gke,e.getThemeByValue=Eke,e.insertLayerTreeNode=s7,e.layerTreeFeatures=f7,e.moveLayerTreeNode=ZDe,e.moveLayerTreeNodeToRoot=QDe,e.numberFilterFn=$5,e.popoverHandle=bV,e.removeLayerTreeNode=o7,e.rowLockedFeature=l7,e.rowVisibilityFeature=c7,e.selectFilterFn=J5,e.stackToastManager=$9,e.stringFilterFn=Z5,e.useAppForm=bK,e.useAppTable=qDe,e.useCellContext=n7,e.useChart=nx,e.useChartTooltipContent=wI,e.useChartTooltipPayload=OI,e.useFieldContext=kG,e.useFormContext=jG,e.useHeaderContext=JDe,e.useLayerTree=Y4,e.useLayerTreeCellContext=m7,e.useLayerTreeContext=p7,e.useLayerTreeHeaderContext=tOe,e.useLayerTreeTable=eOe,e.useMediaQuery=F9,e.useSidebar=B9,e.useSliderGroupContext=U9,e.useTableContext=t7,e.useTheme=Oke,e.useToastManager=q9,e.useTypedAppFormContext=CK,e.withFieldGroup=xK,e.withForm=SK});