@cloudraker/reki 2.6.1 → 2.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (381) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/README.md +1 -1
  3. package/ai/component-registry.json +1271 -41
  4. package/ai/component-registry.md +1310 -34
  5. package/ai/schemas.ts +226 -2
  6. package/dist/.build-complete +1 -1
  7. package/dist/ai/schemas.d.ts +554 -5
  8. package/dist/ai/schemas.d.ts.map +1 -1
  9. package/dist/ai/schemas.js +1699 -1405
  10. package/dist/ai/schemas.js.map +1 -1
  11. package/dist/chunks/{SankeyChart-jwwpwps4npqzbrvn.js → SankeyChart-gogf860o4u387kjn.js} +2 -2
  12. package/dist/chunks/{SankeyChart-jwwpwps4npqzbrvn.js.map → SankeyChart-gogf860o4u387kjn.js.map} +1 -1
  13. package/dist/chunks/actor-display-izds1bhw0yswurqm.js +35 -0
  14. package/dist/chunks/actor-display-izds1bhw0yswurqm.js.map +1 -0
  15. package/dist/chunks/address-input-g1la0xqrpg8ic6ak.js +80 -0
  16. package/dist/chunks/address-input-g1la0xqrpg8ic6ak.js.map +1 -0
  17. package/dist/chunks/array-display-lu1259ap3qrl847e.js +12 -0
  18. package/dist/chunks/array-display-lu1259ap3qrl847e.js.map +1 -0
  19. package/dist/chunks/{autocomplete-f4vetako14h2aqsw.js → autocomplete-htuy5t9ag29qhuwa.js} +4 -4
  20. package/dist/chunks/{autocomplete-f4vetako14h2aqsw.js.map → autocomplete-htuy5t9ag29qhuwa.js.map} +1 -1
  21. package/dist/chunks/avatar-g40cun6cn17fcxd4.js +57 -0
  22. package/dist/chunks/avatar-g40cun6cn17fcxd4.js.map +1 -0
  23. package/dist/chunks/avatar-group-fpcaziey1yu7226v.js +23 -0
  24. package/dist/chunks/avatar-group-fpcaziey1yu7226v.js.map +1 -0
  25. package/dist/chunks/{breadcrumbs-d6149hyct4puz3x4.js → breadcrumbs-mq1utzm0q4u2r5v5.js} +2 -2
  26. package/dist/chunks/{breadcrumbs-d6149hyct4puz3x4.js.map → breadcrumbs-mq1utzm0q4u2r5v5.js.map} +1 -1
  27. package/dist/chunks/{button-nc5p1h28cwes0tjw.js → button-fvlz1rzc3s1hpyxs.js} +14 -14
  28. package/dist/chunks/button-fvlz1rzc3s1hpyxs.js.map +1 -0
  29. package/dist/chunks/{checkbox-g2661n3eodgoispq.js → checkbox-h3kfhlron3b6sfhv.js} +3 -3
  30. package/dist/chunks/{checkbox-g2661n3eodgoispq.js.map → checkbox-h3kfhlron3b6sfhv.js.map} +1 -1
  31. package/dist/chunks/chip-iu7movvthovdurgb.js +69 -0
  32. package/dist/chunks/chip-iu7movvthovdurgb.js.map +1 -0
  33. package/dist/chunks/circular-progress-bar-ofg0ps2axad1wsr6.js +60 -0
  34. package/dist/chunks/circular-progress-bar-ofg0ps2axad1wsr6.js.map +1 -0
  35. package/dist/chunks/{clipboard-text-g3659lejx2d7i93e.js → clipboard-text-ogue8iq06n1z7q7v.js} +4 -4
  36. package/dist/chunks/{clipboard-text-g3659lejx2d7i93e.js.map → clipboard-text-ogue8iq06n1z7q7v.js.map} +1 -1
  37. package/dist/chunks/{collapsible-ndvmgo29s5iqfcor.js → collapsible-ivqat099ene9z3bv.js} +2 -2
  38. package/dist/chunks/{collapsible-ndvmgo29s5iqfcor.js.map → collapsible-ivqat099ene9z3bv.js.map} +1 -1
  39. package/dist/chunks/color-sample-h7hspma3rb91go3z.js +32 -0
  40. package/dist/chunks/color-sample-h7hspma3rb91go3z.js.map +1 -0
  41. package/dist/chunks/{combobox-i38w67netm8ukw4f.js → combobox-iytvpzp5poljxgek.js} +4 -4
  42. package/dist/chunks/{combobox-i38w67netm8ukw4f.js.map → combobox-iytvpzp5poljxgek.js.map} +1 -1
  43. package/dist/chunks/{command-palette-fe5cjfdgsg3t17vq.js → command-palette-k6vrx8ely8rmf4a5.js} +4 -4
  44. package/dist/chunks/command-palette-k6vrx8ely8rmf4a5.js.map +1 -0
  45. package/dist/chunks/data-grid-i7kfgm7zr5tj0e0a.js +3110 -0
  46. package/dist/chunks/data-grid-i7kfgm7zr5tj0e0a.js.map +1 -0
  47. package/dist/chunks/{dialog-m4go8xof25fospqo.js → dialog-ggx34i6k4eulfvgk.js} +3 -3
  48. package/dist/chunks/{dialog-m4go8xof25fospqo.js.map → dialog-ggx34i6k4eulfvgk.js.map} +1 -1
  49. package/dist/chunks/double-text-input-k0i5xnfq6khv01wu.js +39 -0
  50. package/dist/chunks/double-text-input-k0i5xnfq6khv01wu.js.map +1 -0
  51. package/dist/chunks/{dropdown-j5uht8mn4z7xc9fc.js → dropdown-bt1lfs2jli0khnex.js} +2 -2
  52. package/dist/chunks/{dropdown-j5uht8mn4z7xc9fc.js.map → dropdown-bt1lfs2jli0khnex.js.map} +1 -1
  53. package/dist/chunks/emails-display-nsbqzscr0f9bqimg.js +12 -0
  54. package/dist/chunks/emails-display-nsbqzscr0f9bqimg.js.map +1 -0
  55. package/dist/chunks/{empty-kazxr0248zjemw6n.js → empty-dxy8jti5bsxxh905.js} +2 -2
  56. package/dist/chunks/{empty-kazxr0248zjemw6n.js.map → empty-dxy8jti5bsxxh905.js.map} +1 -1
  57. package/dist/chunks/expandable-list-bjceh467ocazog53.js +26 -0
  58. package/dist/chunks/expandable-list-bjceh467ocazog53.js.map +1 -0
  59. package/dist/chunks/{field-fe5m8z3vbpvtctbe.js → field-b0aywboxuss4rpu7.js} +3 -3
  60. package/dist/chunks/{field-fe5m8z3vbpvtctbe.js.map → field-b0aywboxuss4rpu7.js.map} +1 -1
  61. package/dist/chunks/{input-area-ciw85g3fno06t4tw.js → input-area-cuijpofpark5w5qq.js} +4 -4
  62. package/dist/chunks/{input-area-ciw85g3fno06t4tw.js.map → input-area-cuijpofpark5w5qq.js.map} +1 -1
  63. package/dist/chunks/{input-i5nefqk213n4z7pr.js → input-eno4q26x68rx3i8q.js} +3 -3
  64. package/dist/chunks/{input-i5nefqk213n4z7pr.js.map → input-eno4q26x68rx3i8q.js.map} +1 -1
  65. package/dist/chunks/{input-group-mo7tq7jr19hmgor5.js → input-group-dl9htnza7kq4om4c.js} +5 -5
  66. package/dist/chunks/{input-group-mo7tq7jr19hmgor5.js.map → input-group-dl9htnza7kq4om4c.js.map} +1 -1
  67. package/dist/chunks/json-display-fy0t2khc4itn130p.js +31 -0
  68. package/dist/chunks/json-display-fy0t2khc4itn130p.js.map +1 -0
  69. package/dist/chunks/{label-fcho4757rbdess0c.js → label-ld57mr4ocdxsf06p.js} +3 -3
  70. package/dist/chunks/{label-fcho4757rbdess0c.js.map → label-ld57mr4ocdxsf06p.js.map} +1 -1
  71. package/dist/chunks/{layer-card-kzu48dhzxm3e9p4u.js → layer-card-iuquuc1w3116umfw.js} +2 -2
  72. package/dist/chunks/{layer-card-kzu48dhzxm3e9p4u.js.map → layer-card-iuquuc1w3116umfw.js.map} +1 -1
  73. package/dist/chunks/{link-j2gu5dr3nr4i4yf0.js → link-8pn6y27h3m3ud8fl.js} +2 -2
  74. package/dist/chunks/{link-j2gu5dr3nr4i4yf0.js.map → link-8pn6y27h3m3ud8fl.js.map} +1 -1
  75. package/dist/chunks/link-chip-cz5v6lw9icmcndzl.js +58 -0
  76. package/dist/chunks/link-chip-cz5v6lw9icmcndzl.js.map +1 -0
  77. package/dist/chunks/links-display-dfaehepz86s2wxx1.js +20 -0
  78. package/dist/chunks/links-display-dfaehepz86s2wxx1.js.map +1 -0
  79. package/dist/chunks/menu-item-kyqq7o2krghxbpw5.js +178 -0
  80. package/dist/chunks/menu-item-kyqq7o2krghxbpw5.js.map +1 -0
  81. package/dist/chunks/{menubar-ir5gbjmsizsddz7g.js → menubar-56kqktsa5a28xyzj.js} +2 -2
  82. package/dist/chunks/{menubar-ir5gbjmsizsddz7g.js.map → menubar-56kqktsa5a28xyzj.js.map} +1 -1
  83. package/dist/chunks/{meter-o5yd7ctjf80vvyjx.js → meter-b5rnmibceu4z8i6a.js} +2 -2
  84. package/dist/chunks/{meter-o5yd7ctjf80vvyjx.js.map → meter-b5rnmibceu4z8i6a.js.map} +1 -1
  85. package/dist/chunks/notification-counter-hiq85elmcydnhzoo.js +30 -0
  86. package/dist/chunks/notification-counter-hiq85elmcydnhzoo.js.map +1 -0
  87. package/dist/chunks/overflowing-text-mm8bkx7voc6h8ra4.js +49 -0
  88. package/dist/chunks/overflowing-text-mm8bkx7voc6h8ra4.js.map +1 -0
  89. package/dist/chunks/{pagination-bryw6rohfr7mm3km.js → pagination-iczb9ooenevbxslx.js} +3 -3
  90. package/dist/chunks/{pagination-bryw6rohfr7mm3km.js.map → pagination-iczb9ooenevbxslx.js.map} +1 -1
  91. package/dist/chunks/phones-display-cdsrl07dv6obf4eg.js +19 -0
  92. package/dist/chunks/phones-display-cdsrl07dv6obf4eg.js.map +1 -0
  93. package/dist/chunks/pill-pfpvgbcnqhtyksz5.js +22 -0
  94. package/dist/chunks/pill-pfpvgbcnqhtyksz5.js.map +1 -0
  95. package/dist/chunks/{popover-elxcmvv7mu7m7uk4.js → popover-ldqdlpv6sqvkjume.js} +2 -2
  96. package/dist/chunks/{popover-elxcmvv7mu7m7uk4.js.map → popover-ldqdlpv6sqvkjume.js.map} +1 -1
  97. package/dist/chunks/{radio-newyq331uk4lltr6.js → radio-lyeniil3x20cyb8z.js} +2 -2
  98. package/dist/chunks/{radio-newyq331uk4lltr6.js.map → radio-lyeniil3x20cyb8z.js.map} +1 -1
  99. package/dist/chunks/rating-yyd4t8e62ast4obo.js +48 -0
  100. package/dist/chunks/rating-yyd4t8e62ast4obo.js.map +1 -0
  101. package/dist/chunks/record-board-iapx3cw5rusehrta.js +3395 -0
  102. package/dist/chunks/record-board-iapx3cw5rusehrta.js.map +1 -0
  103. package/dist/chunks/{select-h5480mbro0ypxu0b.js → select-hmoccee4zagd34tq.js} +6 -6
  104. package/dist/chunks/{select-h5480mbro0ypxu0b.js.map → select-hmoccee4zagd34tq.js.map} +1 -1
  105. package/dist/chunks/{sensitive-input-lqugq6uvx0lkpu0u.js → sensitive-input-nkfx72rduc7aijaf.js} +4 -4
  106. package/dist/chunks/{sensitive-input-lqugq6uvx0lkpu0u.js.map → sensitive-input-nkfx72rduc7aijaf.js.map} +1 -1
  107. package/dist/chunks/{sidebar-noz668nhdu2gso12.js → sidebar-gwfibai76tw069d4.js} +34 -33
  108. package/dist/chunks/sidebar-gwfibai76tw069d4.js.map +1 -0
  109. package/dist/chunks/status-ot0itdwxloqgahi0.js +29 -0
  110. package/dist/chunks/status-ot0itdwxloqgahi0.js.map +1 -0
  111. package/dist/chunks/{surface-cyxme7mlr49l33f8.js → surface-fqmma34ju0agh5pe.js} +2 -2
  112. package/dist/chunks/{surface-cyxme7mlr49l33f8.js.map → surface-fqmma34ju0agh5pe.js.map} +1 -1
  113. package/dist/chunks/{switch-bigo96fyjlh7ivbi.js → switch-nhtmn65n5s7gg6vb.js} +3 -3
  114. package/dist/chunks/{switch-bigo96fyjlh7ivbi.js.map → switch-nhtmn65n5s7gg6vb.js.map} +1 -1
  115. package/dist/chunks/{table-mwcmwp6a80zvyrxw.js → table-cjj894o3niouq4tg.js} +2 -2
  116. package/dist/chunks/{table-mwcmwp6a80zvyrxw.js.map → table-cjj894o3niouq4tg.js.map} +1 -1
  117. package/dist/chunks/{tabs-e4pcjkw94kpe35x0.js → tabs-klj6wapad6fpd9at.js} +14 -16
  118. package/dist/chunks/tabs-klj6wapad6fpd9at.js.map +1 -0
  119. package/dist/chunks/tag-h5kwf5eh7dyyvc2c.js +58 -0
  120. package/dist/chunks/tag-h5kwf5eh7dyyvc2c.js.map +1 -0
  121. package/dist/chunks/timeline-lqurr2lcxkayomk2.js +109 -0
  122. package/dist/chunks/timeline-lqurr2lcxkayomk2.js.map +1 -0
  123. package/dist/chunks/{toast-ivr4097bstjcjotf.js → toast-j47dl441zpxa1yw3.js} +3 -3
  124. package/dist/chunks/{toast-ivr4097bstjcjotf.js.map → toast-j47dl441zpxa1yw3.js.map} +1 -1
  125. package/dist/chunks/{tooltip-ncaia8n1lavkyw8n.js → tooltip-bkgxuz77xzg5fooc.js} +2 -2
  126. package/dist/chunks/{tooltip-ncaia8n1lavkyw8n.js.map → tooltip-bkgxuz77xzg5fooc.js.map} +1 -1
  127. package/dist/chunks/{vendor-base-ui-bgl9g5nkvqy3tn36.js → vendor-base-ui-djdjrfuoxlb1lubi.js} +2358 -2358
  128. package/dist/chunks/{vendor-base-ui-bgl9g5nkvqy3tn36.js.map → vendor-base-ui-djdjrfuoxlb1lubi.js.map} +1 -1
  129. package/dist/code.js +1 -1
  130. package/dist/components/actor-display.js +6 -0
  131. package/dist/components/actor-display.js.map +1 -0
  132. package/dist/components/address-input.js +6 -0
  133. package/dist/components/address-input.js.map +1 -0
  134. package/dist/components/array-display.js +6 -0
  135. package/dist/components/array-display.js.map +1 -0
  136. package/dist/components/autocomplete.js +1 -1
  137. package/dist/components/avatar-group.js +6 -0
  138. package/dist/components/avatar-group.js.map +1 -0
  139. package/dist/components/avatar.js +6 -0
  140. package/dist/components/avatar.js.map +1 -0
  141. package/dist/components/breadcrumbs.js +1 -1
  142. package/dist/components/button.js +1 -1
  143. package/dist/components/chart.js +1 -1
  144. package/dist/components/checkbox.js +1 -1
  145. package/dist/components/chip.js +8 -0
  146. package/dist/components/chip.js.map +1 -0
  147. package/dist/components/circular-progress-bar.js +6 -0
  148. package/dist/components/circular-progress-bar.js.map +1 -0
  149. package/dist/components/clipboard-text.js +1 -1
  150. package/dist/components/collapsible.js +1 -1
  151. package/dist/components/color-sample.js +6 -0
  152. package/dist/components/color-sample.js.map +1 -0
  153. package/dist/components/combobox.js +1 -1
  154. package/dist/components/command-palette.js +1 -1
  155. package/dist/components/data-grid.js +8 -0
  156. package/dist/components/data-grid.js.map +1 -0
  157. package/dist/components/dialog.js +1 -1
  158. package/dist/components/double-text-input.js +6 -0
  159. package/dist/components/double-text-input.js.map +1 -0
  160. package/dist/components/dropdown.js +1 -1
  161. package/dist/components/emails-display.js +6 -0
  162. package/dist/components/emails-display.js.map +1 -0
  163. package/dist/components/empty.js +1 -1
  164. package/dist/components/expandable-list.js +6 -0
  165. package/dist/components/expandable-list.js.map +1 -0
  166. package/dist/components/field.js +1 -1
  167. package/dist/components/input-group.js +1 -1
  168. package/dist/components/input.js +3 -3
  169. package/dist/components/json-display.js +6 -0
  170. package/dist/components/json-display.js.map +1 -0
  171. package/dist/components/label.js +1 -1
  172. package/dist/components/layer-card.js +1 -1
  173. package/dist/components/link-chip.js +6 -0
  174. package/dist/components/link-chip.js.map +1 -0
  175. package/dist/components/link.js +1 -1
  176. package/dist/components/links-display.js +6 -0
  177. package/dist/components/links-display.js.map +1 -0
  178. package/dist/components/menu-item.js +11 -0
  179. package/dist/components/menu-item.js.map +1 -0
  180. package/dist/components/menubar.js +1 -1
  181. package/dist/components/meter.js +1 -1
  182. package/dist/components/notification-counter.js +6 -0
  183. package/dist/components/notification-counter.js.map +1 -0
  184. package/dist/components/overflowing-text.js +6 -0
  185. package/dist/components/overflowing-text.js.map +1 -0
  186. package/dist/components/pagination.js +1 -1
  187. package/dist/components/phones-display.js +6 -0
  188. package/dist/components/phones-display.js.map +1 -0
  189. package/dist/components/pill.js +6 -0
  190. package/dist/components/pill.js.map +1 -0
  191. package/dist/components/popover.js +1 -1
  192. package/dist/components/radio.js +1 -1
  193. package/dist/components/rating.js +6 -0
  194. package/dist/components/rating.js.map +1 -0
  195. package/dist/components/record-board.js +8 -0
  196. package/dist/components/record-board.js.map +1 -0
  197. package/dist/components/select.js +1 -1
  198. package/dist/components/sensitive-input.js +1 -1
  199. package/dist/components/sidebar.js +1 -1
  200. package/dist/components/status.js +6 -0
  201. package/dist/components/status.js.map +1 -0
  202. package/dist/components/surface.js +1 -1
  203. package/dist/components/switch.js +1 -1
  204. package/dist/components/table.js +1 -1
  205. package/dist/components/tabs.js +1 -1
  206. package/dist/components/tag.js +10 -0
  207. package/dist/components/tag.js.map +1 -0
  208. package/dist/components/timeline.js +8 -0
  209. package/dist/components/timeline.js.map +1 -0
  210. package/dist/components/toast.js +2 -2
  211. package/dist/components/tooltip.js +1 -1
  212. package/dist/index.js +380 -251
  213. package/dist/index.js.map +1 -1
  214. package/dist/primitives/accordion.js +1 -1
  215. package/dist/primitives/alert-dialog.js +1 -1
  216. package/dist/primitives/autocomplete.js +1 -1
  217. package/dist/primitives/avatar.js +1 -1
  218. package/dist/primitives/button.js +1 -1
  219. package/dist/primitives/checkbox-group.js +1 -1
  220. package/dist/primitives/checkbox.js +1 -1
  221. package/dist/primitives/collapsible.js +1 -1
  222. package/dist/primitives/combobox.js +1 -1
  223. package/dist/primitives/context-menu.js +1 -1
  224. package/dist/primitives/csp-provider.js +1 -1
  225. package/dist/primitives/dialog.js +1 -1
  226. package/dist/primitives/direction-provider.js +1 -1
  227. package/dist/primitives/drawer.js +1 -1
  228. package/dist/primitives/field.js +1 -1
  229. package/dist/primitives/fieldset.js +1 -1
  230. package/dist/primitives/form.js +1 -1
  231. package/dist/primitives/input.js +1 -1
  232. package/dist/primitives/menu.js +1 -1
  233. package/dist/primitives/menubar.js +1 -1
  234. package/dist/primitives/meter.js +1 -1
  235. package/dist/primitives/navigation-menu.js +1 -1
  236. package/dist/primitives/number-field.js +1 -1
  237. package/dist/primitives/otp-field.js +1 -1
  238. package/dist/primitives/popover.js +1 -1
  239. package/dist/primitives/preview-card.js +1 -1
  240. package/dist/primitives/progress.js +1 -1
  241. package/dist/primitives/radio-group.js +1 -1
  242. package/dist/primitives/radio.js +1 -1
  243. package/dist/primitives/scroll-area.js +1 -1
  244. package/dist/primitives/select.js +1 -1
  245. package/dist/primitives/separator.js +1 -1
  246. package/dist/primitives/slider.js +1 -1
  247. package/dist/primitives/switch.js +1 -1
  248. package/dist/primitives/tabs.js +1 -1
  249. package/dist/primitives/toast.js +1 -1
  250. package/dist/primitives/toggle-group.js +1 -1
  251. package/dist/primitives/toggle.js +1 -1
  252. package/dist/primitives/toolbar.js +1 -1
  253. package/dist/primitives/tooltip.js +1 -1
  254. package/dist/primitives.js +1 -1
  255. package/dist/scripts/theme-generator/config.d.ts.map +1 -1
  256. package/dist/scripts/theme-generator/config.js +229 -5
  257. package/dist/scripts/theme-generator/config.js.map +1 -1
  258. package/dist/src/components/actor-display/actor-display.d.ts +33 -0
  259. package/dist/src/components/actor-display/actor-display.d.ts.map +1 -0
  260. package/dist/src/components/actor-display/index.d.ts +2 -0
  261. package/dist/src/components/actor-display/index.d.ts.map +1 -0
  262. package/dist/src/components/address-input/address-input.d.ts +42 -0
  263. package/dist/src/components/address-input/address-input.d.ts.map +1 -0
  264. package/dist/src/components/address-input/index.d.ts +2 -0
  265. package/dist/src/components/address-input/index.d.ts.map +1 -0
  266. package/dist/src/components/array-display/array-display.d.ts +30 -0
  267. package/dist/src/components/array-display/array-display.d.ts.map +1 -0
  268. package/dist/src/components/array-display/index.d.ts +2 -0
  269. package/dist/src/components/array-display/index.d.ts.map +1 -0
  270. package/dist/src/components/avatar/avatar.d.ts +80 -0
  271. package/dist/src/components/avatar/avatar.d.ts.map +1 -0
  272. package/dist/src/components/avatar/index.d.ts +2 -0
  273. package/dist/src/components/avatar/index.d.ts.map +1 -0
  274. package/dist/src/components/avatar-group/avatar-group.d.ts +35 -0
  275. package/dist/src/components/avatar-group/avatar-group.d.ts.map +1 -0
  276. package/dist/src/components/avatar-group/index.d.ts +2 -0
  277. package/dist/src/components/avatar-group/index.d.ts.map +1 -0
  278. package/dist/src/components/button/button.d.ts +4 -4
  279. package/dist/src/components/chip/chip.d.ts +78 -0
  280. package/dist/src/components/chip/chip.d.ts.map +1 -0
  281. package/dist/src/components/chip/index.d.ts +2 -0
  282. package/dist/src/components/chip/index.d.ts.map +1 -0
  283. package/dist/src/components/circular-progress-bar/circular-progress-bar.d.ts +35 -0
  284. package/dist/src/components/circular-progress-bar/circular-progress-bar.d.ts.map +1 -0
  285. package/dist/src/components/circular-progress-bar/index.d.ts +2 -0
  286. package/dist/src/components/circular-progress-bar/index.d.ts.map +1 -0
  287. package/dist/src/components/color-sample/color-sample.d.ts +56 -0
  288. package/dist/src/components/color-sample/color-sample.d.ts.map +1 -0
  289. package/dist/src/components/color-sample/index.d.ts +2 -0
  290. package/dist/src/components/color-sample/index.d.ts.map +1 -0
  291. package/dist/src/components/data-grid/data-grid.d.ts +25 -0
  292. package/dist/src/components/data-grid/data-grid.d.ts.map +1 -0
  293. package/dist/src/components/data-grid/index.d.ts +3 -0
  294. package/dist/src/components/data-grid/index.d.ts.map +1 -0
  295. package/dist/src/components/data-grid/types.d.ts +103 -0
  296. package/dist/src/components/data-grid/types.d.ts.map +1 -0
  297. package/dist/src/components/data-grid/use-data-grid-edit.d.ts +34 -0
  298. package/dist/src/components/data-grid/use-data-grid-edit.d.ts.map +1 -0
  299. package/dist/src/components/double-text-input/double-text-input.d.ts +47 -0
  300. package/dist/src/components/double-text-input/double-text-input.d.ts.map +1 -0
  301. package/dist/src/components/double-text-input/index.d.ts +2 -0
  302. package/dist/src/components/double-text-input/index.d.ts.map +1 -0
  303. package/dist/src/components/emails-display/emails-display.d.ts +30 -0
  304. package/dist/src/components/emails-display/emails-display.d.ts.map +1 -0
  305. package/dist/src/components/emails-display/index.d.ts +2 -0
  306. package/dist/src/components/emails-display/index.d.ts.map +1 -0
  307. package/dist/src/components/expandable-list/expandable-list.d.ts +41 -0
  308. package/dist/src/components/expandable-list/expandable-list.d.ts.map +1 -0
  309. package/dist/src/components/expandable-list/index.d.ts +2 -0
  310. package/dist/src/components/expandable-list/index.d.ts.map +1 -0
  311. package/dist/src/components/json-display/index.d.ts +2 -0
  312. package/dist/src/components/json-display/index.d.ts.map +1 -0
  313. package/dist/src/components/json-display/json-display.d.ts +29 -0
  314. package/dist/src/components/json-display/json-display.d.ts.map +1 -0
  315. package/dist/src/components/link-chip/index.d.ts +2 -0
  316. package/dist/src/components/link-chip/index.d.ts.map +1 -0
  317. package/dist/src/components/link-chip/link-chip.d.ts +50 -0
  318. package/dist/src/components/link-chip/link-chip.d.ts.map +1 -0
  319. package/dist/src/components/links-display/index.d.ts +2 -0
  320. package/dist/src/components/links-display/index.d.ts.map +1 -0
  321. package/dist/src/components/links-display/links-display.d.ts +37 -0
  322. package/dist/src/components/links-display/links-display.d.ts.map +1 -0
  323. package/dist/src/components/menu-item/index.d.ts +2 -0
  324. package/dist/src/components/menu-item/index.d.ts.map +1 -0
  325. package/dist/src/components/menu-item/menu-item.d.ts +104 -0
  326. package/dist/src/components/menu-item/menu-item.d.ts.map +1 -0
  327. package/dist/src/components/notification-counter/index.d.ts +2 -0
  328. package/dist/src/components/notification-counter/index.d.ts.map +1 -0
  329. package/dist/src/components/notification-counter/notification-counter.d.ts +51 -0
  330. package/dist/src/components/notification-counter/notification-counter.d.ts.map +1 -0
  331. package/dist/src/components/overflowing-text/index.d.ts +2 -0
  332. package/dist/src/components/overflowing-text/index.d.ts.map +1 -0
  333. package/dist/src/components/overflowing-text/overflowing-text.d.ts +48 -0
  334. package/dist/src/components/overflowing-text/overflowing-text.d.ts.map +1 -0
  335. package/dist/src/components/phones-display/index.d.ts +2 -0
  336. package/dist/src/components/phones-display/index.d.ts.map +1 -0
  337. package/dist/src/components/phones-display/phones-display.d.ts +31 -0
  338. package/dist/src/components/phones-display/phones-display.d.ts.map +1 -0
  339. package/dist/src/components/pill/index.d.ts +2 -0
  340. package/dist/src/components/pill/index.d.ts.map +1 -0
  341. package/dist/src/components/pill/pill.d.ts +31 -0
  342. package/dist/src/components/pill/pill.d.ts.map +1 -0
  343. package/dist/src/components/rating/index.d.ts +2 -0
  344. package/dist/src/components/rating/index.d.ts.map +1 -0
  345. package/dist/src/components/rating/rating.d.ts +37 -0
  346. package/dist/src/components/rating/rating.d.ts.map +1 -0
  347. package/dist/src/components/record-board/index.d.ts +2 -0
  348. package/dist/src/components/record-board/index.d.ts.map +1 -0
  349. package/dist/src/components/record-board/record-board.d.ts +75 -0
  350. package/dist/src/components/record-board/record-board.d.ts.map +1 -0
  351. package/dist/src/components/sidebar/sidebar.d.ts.map +1 -1
  352. package/dist/src/components/status/index.d.ts +2 -0
  353. package/dist/src/components/status/index.d.ts.map +1 -0
  354. package/dist/src/components/status/status.d.ts +52 -0
  355. package/dist/src/components/status/status.d.ts.map +1 -0
  356. package/dist/src/components/tabs/tabs.d.ts.map +1 -1
  357. package/dist/src/components/tag/index.d.ts +2 -0
  358. package/dist/src/components/tag/index.d.ts.map +1 -0
  359. package/dist/src/components/tag/tag.d.ts +153 -0
  360. package/dist/src/components/tag/tag.d.ts.map +1 -0
  361. package/dist/src/components/timeline/index.d.ts +2 -0
  362. package/dist/src/components/timeline/index.d.ts.map +1 -0
  363. package/dist/src/components/timeline/timeline.d.ts +155 -0
  364. package/dist/src/components/timeline/timeline.d.ts.map +1 -0
  365. package/dist/src/index.d.ts +26 -0
  366. package/dist/src/index.d.ts.map +1 -1
  367. package/dist/src/utils/use-is-dark-mode.d.ts +18 -0
  368. package/dist/src/utils/use-is-dark-mode.d.ts.map +1 -0
  369. package/dist/styles/reki-standalone.css +1 -1
  370. package/dist/styles/reki.css +19 -0
  371. package/dist/styles/theme-fedramp.css +6 -0
  372. package/dist/styles/theme-reki.css +164 -10
  373. package/package.json +118 -4
  374. package/scripts/component-registry/index.ts +6 -11
  375. package/scripts/extract-demo-examples.ts +323 -0
  376. package/scripts/generate-stories.ts +205 -0
  377. package/scripts/theme-generator/config.ts +230 -5
  378. package/dist/chunks/button-nc5p1h28cwes0tjw.js.map +0 -1
  379. package/dist/chunks/command-palette-fe5cjfdgsg3t17vq.js.map +0 -1
  380. package/dist/chunks/sidebar-noz668nhdu2gso12.js.map +0 -1
  381. package/dist/chunks/tabs-e4pcjkw94kpe35x0.js.map +0 -1
@@ -0,0 +1,3395 @@
1
+ "use client";
2
+ import { jsxs as St, jsx as q, Fragment as jn } from "react/jsx-runtime";
3
+ import L, { useRef as O, useMemo as A, useLayoutEffect as Yn, useEffect as T, useCallback as $, useState as F, memo as Kn, useReducer as Un, useContext as pe, createContext as Ke, cloneElement as Wn, forwardRef as Vn } from "react";
4
+ import { unstable_batchedUpdates as et, createPortal as Hn } from "react-dom";
5
+ import { C as _n } from "./color-sample-h7hspma3rb91go3z.js";
6
+ import { c as rn } from "./cn-ct4n7r74mh8y0f48.js";
7
+ function qn() {
8
+ for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++)
9
+ t[n] = arguments[n];
10
+ return A(
11
+ () => (r) => {
12
+ t.forEach((o) => o(r));
13
+ },
14
+ // eslint-disable-next-line react-hooks/exhaustive-deps
15
+ t
16
+ );
17
+ }
18
+ const ut = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u";
19
+ function Ee(e) {
20
+ const t = Object.prototype.toString.call(e);
21
+ return t === "[object Window]" || // In Electron context the Window object serializes to [object global]
22
+ t === "[object global]";
23
+ }
24
+ function It(e) {
25
+ return "nodeType" in e;
26
+ }
27
+ function X(e) {
28
+ var t, n;
29
+ return e ? Ee(e) ? e : It(e) && (t = (n = e.ownerDocument) == null ? void 0 : n.defaultView) != null ? t : window : window;
30
+ }
31
+ function Nt(e) {
32
+ const {
33
+ Document: t
34
+ } = X(e);
35
+ return e instanceof t;
36
+ }
37
+ function Ue(e) {
38
+ return Ee(e) ? !1 : e instanceof X(e).HTMLElement;
39
+ }
40
+ function on(e) {
41
+ return e instanceof X(e).SVGElement;
42
+ }
43
+ function Ae(e) {
44
+ return e ? Ee(e) ? e.document : It(e) ? Nt(e) ? e : Ue(e) || on(e) ? e.ownerDocument : document : document : document;
45
+ }
46
+ const Q = ut ? Yn : T;
47
+ function dt(e) {
48
+ const t = O(e);
49
+ return Q(() => {
50
+ t.current = e;
51
+ }), $(function() {
52
+ for (var n = arguments.length, r = new Array(n), o = 0; o < n; o++)
53
+ r[o] = arguments[o];
54
+ return t.current == null ? void 0 : t.current(...r);
55
+ }, []);
56
+ }
57
+ function Gn() {
58
+ const e = O(null), t = $((r, o) => {
59
+ e.current = setInterval(r, o);
60
+ }, []), n = $(() => {
61
+ e.current !== null && (clearInterval(e.current), e.current = null);
62
+ }, []);
63
+ return [t, n];
64
+ }
65
+ function Xe(e, t) {
66
+ t === void 0 && (t = [e]);
67
+ const n = O(e);
68
+ return Q(() => {
69
+ n.current !== e && (n.current = e);
70
+ }, t), n;
71
+ }
72
+ function We(e, t) {
73
+ const n = O();
74
+ return A(
75
+ () => {
76
+ const r = e(n.current);
77
+ return n.current = r, r;
78
+ },
79
+ // eslint-disable-next-line react-hooks/exhaustive-deps
80
+ [...t]
81
+ );
82
+ }
83
+ function ot(e) {
84
+ const t = dt(e), n = O(null), r = $(
85
+ (o) => {
86
+ o !== n.current && t?.(o, n.current), n.current = o;
87
+ },
88
+ //eslint-disable-next-line
89
+ []
90
+ );
91
+ return [n, r];
92
+ }
93
+ function it(e) {
94
+ const t = O();
95
+ return T(() => {
96
+ t.current = e;
97
+ }, [e]), t.current;
98
+ }
99
+ let yt = {};
100
+ function Ve(e, t) {
101
+ return A(() => {
102
+ if (t)
103
+ return t;
104
+ const n = yt[e] == null ? 0 : yt[e] + 1;
105
+ return yt[e] = n, e + "-" + n;
106
+ }, [e, t]);
107
+ }
108
+ function sn(e) {
109
+ return function(t) {
110
+ for (var n = arguments.length, r = new Array(n > 1 ? n - 1 : 0), o = 1; o < n; o++)
111
+ r[o - 1] = arguments[o];
112
+ return r.reduce((i, s) => {
113
+ const a = Object.entries(s);
114
+ for (const [l, c] of a) {
115
+ const d = i[l];
116
+ d != null && (i[l] = d + e * c);
117
+ }
118
+ return i;
119
+ }, {
120
+ ...t
121
+ });
122
+ };
123
+ }
124
+ const Re = /* @__PURE__ */ sn(1), je = /* @__PURE__ */ sn(-1);
125
+ function Jn(e) {
126
+ return "clientX" in e && "clientY" in e;
127
+ }
128
+ function ft(e) {
129
+ if (!e)
130
+ return !1;
131
+ const {
132
+ KeyboardEvent: t
133
+ } = X(e.target);
134
+ return t && e instanceof t;
135
+ }
136
+ function Qn(e) {
137
+ if (!e)
138
+ return !1;
139
+ const {
140
+ TouchEvent: t
141
+ } = X(e.target);
142
+ return t && e instanceof t;
143
+ }
144
+ function st(e) {
145
+ if (Qn(e)) {
146
+ if (e.touches && e.touches.length) {
147
+ const {
148
+ clientX: t,
149
+ clientY: n
150
+ } = e.touches[0];
151
+ return {
152
+ x: t,
153
+ y: n
154
+ };
155
+ } else if (e.changedTouches && e.changedTouches.length) {
156
+ const {
157
+ clientX: t,
158
+ clientY: n
159
+ } = e.changedTouches[0];
160
+ return {
161
+ x: t,
162
+ y: n
163
+ };
164
+ }
165
+ }
166
+ return Jn(e) ? {
167
+ x: e.clientX,
168
+ y: e.clientY
169
+ } : null;
170
+ }
171
+ const be = /* @__PURE__ */ Object.freeze({
172
+ Translate: {
173
+ toString(e) {
174
+ if (!e)
175
+ return;
176
+ const {
177
+ x: t,
178
+ y: n
179
+ } = e;
180
+ return "translate3d(" + (t ? Math.round(t) : 0) + "px, " + (n ? Math.round(n) : 0) + "px, 0)";
181
+ }
182
+ },
183
+ Scale: {
184
+ toString(e) {
185
+ if (!e)
186
+ return;
187
+ const {
188
+ scaleX: t,
189
+ scaleY: n
190
+ } = e;
191
+ return "scaleX(" + t + ") scaleY(" + n + ")";
192
+ }
193
+ },
194
+ Transform: {
195
+ toString(e) {
196
+ if (e)
197
+ return [be.Translate.toString(e), be.Scale.toString(e)].join(" ");
198
+ }
199
+ },
200
+ Transition: {
201
+ toString(e) {
202
+ let {
203
+ property: t,
204
+ duration: n,
205
+ easing: r
206
+ } = e;
207
+ return t + " " + n + "ms " + r;
208
+ }
209
+ }
210
+ }), Kt = "a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";
211
+ function Zn(e) {
212
+ return e.matches(Kt) ? e : e.querySelector(Kt);
213
+ }
214
+ const er = {
215
+ display: "none"
216
+ };
217
+ function tr(e) {
218
+ let {
219
+ id: t,
220
+ value: n
221
+ } = e;
222
+ return L.createElement("div", {
223
+ id: t,
224
+ style: er
225
+ }, n);
226
+ }
227
+ function nr(e) {
228
+ let {
229
+ id: t,
230
+ announcement: n,
231
+ ariaLiveType: r = "assertive"
232
+ } = e;
233
+ const o = {
234
+ position: "fixed",
235
+ top: 0,
236
+ left: 0,
237
+ width: 1,
238
+ height: 1,
239
+ margin: -1,
240
+ border: 0,
241
+ padding: 0,
242
+ overflow: "hidden",
243
+ clip: "rect(0 0 0 0)",
244
+ clipPath: "inset(100%)",
245
+ whiteSpace: "nowrap"
246
+ };
247
+ return L.createElement("div", {
248
+ id: t,
249
+ style: o,
250
+ role: "status",
251
+ "aria-live": r,
252
+ "aria-atomic": !0
253
+ }, n);
254
+ }
255
+ function rr() {
256
+ const [e, t] = F("");
257
+ return {
258
+ announce: $((r) => {
259
+ r != null && t(r);
260
+ }, []),
261
+ announcement: e
262
+ };
263
+ }
264
+ const an = /* @__PURE__ */ Ke(null);
265
+ function or(e) {
266
+ const t = pe(an);
267
+ T(() => {
268
+ if (!t)
269
+ throw new Error("useDndMonitor must be used within a children of <DndContext>");
270
+ return t(e);
271
+ }, [e, t]);
272
+ }
273
+ function ir() {
274
+ const [e] = F(() => /* @__PURE__ */ new Set()), t = $((r) => (e.add(r), () => e.delete(r)), [e]);
275
+ return [$((r) => {
276
+ let {
277
+ type: o,
278
+ event: i
279
+ } = r;
280
+ e.forEach((s) => {
281
+ var a;
282
+ return (a = s[o]) == null ? void 0 : a.call(s, i);
283
+ });
284
+ }, [e]), t];
285
+ }
286
+ const sr = {
287
+ draggable: `
288
+ To pick up a draggable item, press the space bar.
289
+ While dragging, use the arrow keys to move the item.
290
+ Press space again to drop the item in its new position, or press escape to cancel.
291
+ `
292
+ }, ar = {
293
+ onDragStart(e) {
294
+ let {
295
+ active: t
296
+ } = e;
297
+ return "Picked up draggable item " + t.id + ".";
298
+ },
299
+ onDragOver(e) {
300
+ let {
301
+ active: t,
302
+ over: n
303
+ } = e;
304
+ return n ? "Draggable item " + t.id + " was moved over droppable area " + n.id + "." : "Draggable item " + t.id + " is no longer over a droppable area.";
305
+ },
306
+ onDragEnd(e) {
307
+ let {
308
+ active: t,
309
+ over: n
310
+ } = e;
311
+ return n ? "Draggable item " + t.id + " was dropped over droppable area " + n.id : "Draggable item " + t.id + " was dropped.";
312
+ },
313
+ onDragCancel(e) {
314
+ let {
315
+ active: t
316
+ } = e;
317
+ return "Dragging was cancelled. Draggable item " + t.id + " was dropped.";
318
+ }
319
+ };
320
+ function lr(e) {
321
+ let {
322
+ announcements: t = ar,
323
+ container: n,
324
+ hiddenTextDescribedById: r,
325
+ screenReaderInstructions: o = sr
326
+ } = e;
327
+ const {
328
+ announce: i,
329
+ announcement: s
330
+ } = rr(), a = Ve("DndLiveRegion"), [l, c] = F(!1);
331
+ if (T(() => {
332
+ c(!0);
333
+ }, []), or(A(() => ({
334
+ onDragStart(u) {
335
+ let {
336
+ active: f
337
+ } = u;
338
+ i(t.onDragStart({
339
+ active: f
340
+ }));
341
+ },
342
+ onDragMove(u) {
343
+ let {
344
+ active: f,
345
+ over: g
346
+ } = u;
347
+ t.onDragMove && i(t.onDragMove({
348
+ active: f,
349
+ over: g
350
+ }));
351
+ },
352
+ onDragOver(u) {
353
+ let {
354
+ active: f,
355
+ over: g
356
+ } = u;
357
+ i(t.onDragOver({
358
+ active: f,
359
+ over: g
360
+ }));
361
+ },
362
+ onDragEnd(u) {
363
+ let {
364
+ active: f,
365
+ over: g
366
+ } = u;
367
+ i(t.onDragEnd({
368
+ active: f,
369
+ over: g
370
+ }));
371
+ },
372
+ onDragCancel(u) {
373
+ let {
374
+ active: f,
375
+ over: g
376
+ } = u;
377
+ i(t.onDragCancel({
378
+ active: f,
379
+ over: g
380
+ }));
381
+ }
382
+ }), [i, t])), !l)
383
+ return null;
384
+ const d = L.createElement(L.Fragment, null, L.createElement(tr, {
385
+ id: r,
386
+ value: o.draggable
387
+ }), L.createElement(nr, {
388
+ id: a,
389
+ announcement: s
390
+ }));
391
+ return n ? Hn(d, n) : d;
392
+ }
393
+ var k;
394
+ (function(e) {
395
+ e.DragStart = "dragStart", e.DragMove = "dragMove", e.DragEnd = "dragEnd", e.DragCancel = "dragCancel", e.DragOver = "dragOver", e.RegisterDroppable = "registerDroppable", e.SetDroppableDisabled = "setDroppableDisabled", e.UnregisterDroppable = "unregisterDroppable";
396
+ })(k || (k = {}));
397
+ function at() {
398
+ }
399
+ function Ut(e, t) {
400
+ return A(
401
+ () => ({
402
+ sensor: e,
403
+ options: t ?? {}
404
+ }),
405
+ // eslint-disable-next-line react-hooks/exhaustive-deps
406
+ [e, t]
407
+ );
408
+ }
409
+ function cr() {
410
+ for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++)
411
+ t[n] = arguments[n];
412
+ return A(
413
+ () => [...t].filter((r) => r != null),
414
+ // eslint-disable-next-line react-hooks/exhaustive-deps
415
+ [...t]
416
+ );
417
+ }
418
+ const Z = /* @__PURE__ */ Object.freeze({
419
+ x: 0,
420
+ y: 0
421
+ });
422
+ function ur(e, t) {
423
+ return Math.sqrt(Math.pow(e.x - t.x, 2) + Math.pow(e.y - t.y, 2));
424
+ }
425
+ function dr(e, t) {
426
+ const n = st(e);
427
+ if (!n)
428
+ return "0 0";
429
+ const r = {
430
+ x: (n.x - t.left) / t.width * 100,
431
+ y: (n.y - t.top) / t.height * 100
432
+ };
433
+ return r.x + "% " + r.y + "%";
434
+ }
435
+ function fr(e, t) {
436
+ let {
437
+ data: {
438
+ value: n
439
+ }
440
+ } = e, {
441
+ data: {
442
+ value: r
443
+ }
444
+ } = t;
445
+ return n - r;
446
+ }
447
+ function gr(e, t) {
448
+ let {
449
+ data: {
450
+ value: n
451
+ }
452
+ } = e, {
453
+ data: {
454
+ value: r
455
+ }
456
+ } = t;
457
+ return r - n;
458
+ }
459
+ function Wt(e) {
460
+ let {
461
+ left: t,
462
+ top: n,
463
+ height: r,
464
+ width: o
465
+ } = e;
466
+ return [{
467
+ x: t,
468
+ y: n
469
+ }, {
470
+ x: t + o,
471
+ y: n
472
+ }, {
473
+ x: t,
474
+ y: n + r
475
+ }, {
476
+ x: t + o,
477
+ y: n + r
478
+ }];
479
+ }
480
+ function ln(e, t) {
481
+ if (!e || e.length === 0)
482
+ return null;
483
+ const [n] = e;
484
+ return n[t];
485
+ }
486
+ const cn = (e) => {
487
+ let {
488
+ collisionRect: t,
489
+ droppableRects: n,
490
+ droppableContainers: r
491
+ } = e;
492
+ const o = Wt(t), i = [];
493
+ for (const s of r) {
494
+ const {
495
+ id: a
496
+ } = s, l = n.get(a);
497
+ if (l) {
498
+ const c = Wt(l), d = o.reduce((f, g, x) => f + ur(c[x], g), 0), u = Number((d / 4).toFixed(4));
499
+ i.push({
500
+ id: a,
501
+ data: {
502
+ droppableContainer: s,
503
+ value: u
504
+ }
505
+ });
506
+ }
507
+ }
508
+ return i.sort(fr);
509
+ };
510
+ function hr(e, t) {
511
+ const n = Math.max(t.top, e.top), r = Math.max(t.left, e.left), o = Math.min(t.left + t.width, e.left + e.width), i = Math.min(t.top + t.height, e.top + e.height), s = o - r, a = i - n;
512
+ if (r < o && n < i) {
513
+ const l = t.width * t.height, c = e.width * e.height, d = s * a, u = d / (l + c - d);
514
+ return Number(u.toFixed(4));
515
+ }
516
+ return 0;
517
+ }
518
+ const vr = (e) => {
519
+ let {
520
+ collisionRect: t,
521
+ droppableRects: n,
522
+ droppableContainers: r
523
+ } = e;
524
+ const o = [];
525
+ for (const i of r) {
526
+ const {
527
+ id: s
528
+ } = i, a = n.get(s);
529
+ if (a) {
530
+ const l = hr(a, t);
531
+ l > 0 && o.push({
532
+ id: s,
533
+ data: {
534
+ droppableContainer: i,
535
+ value: l
536
+ }
537
+ });
538
+ }
539
+ }
540
+ return o.sort(gr);
541
+ };
542
+ function pr(e, t, n) {
543
+ return {
544
+ ...e,
545
+ scaleX: t && n ? t.width / n.width : 1,
546
+ scaleY: t && n ? t.height / n.height : 1
547
+ };
548
+ }
549
+ function un(e, t) {
550
+ return e && t ? {
551
+ x: e.left - t.left,
552
+ y: e.top - t.top
553
+ } : Z;
554
+ }
555
+ function br(e) {
556
+ return function(n) {
557
+ for (var r = arguments.length, o = new Array(r > 1 ? r - 1 : 0), i = 1; i < r; i++)
558
+ o[i - 1] = arguments[i];
559
+ return o.reduce((s, a) => ({
560
+ ...s,
561
+ top: s.top + e * a.y,
562
+ bottom: s.bottom + e * a.y,
563
+ left: s.left + e * a.x,
564
+ right: s.right + e * a.x
565
+ }), {
566
+ ...n
567
+ });
568
+ };
569
+ }
570
+ const mr = /* @__PURE__ */ br(1);
571
+ function dn(e) {
572
+ if (e.startsWith("matrix3d(")) {
573
+ const t = e.slice(9, -1).split(/, /);
574
+ return {
575
+ x: +t[12],
576
+ y: +t[13],
577
+ scaleX: +t[0],
578
+ scaleY: +t[5]
579
+ };
580
+ } else if (e.startsWith("matrix(")) {
581
+ const t = e.slice(7, -1).split(/, /);
582
+ return {
583
+ x: +t[4],
584
+ y: +t[5],
585
+ scaleX: +t[0],
586
+ scaleY: +t[3]
587
+ };
588
+ }
589
+ return null;
590
+ }
591
+ function yr(e, t, n) {
592
+ const r = dn(t);
593
+ if (!r)
594
+ return e;
595
+ const {
596
+ scaleX: o,
597
+ scaleY: i,
598
+ x: s,
599
+ y: a
600
+ } = r, l = e.left - s - (1 - o) * parseFloat(n), c = e.top - a - (1 - i) * parseFloat(n.slice(n.indexOf(" ") + 1)), d = o ? e.width / o : e.width, u = i ? e.height / i : e.height;
601
+ return {
602
+ width: d,
603
+ height: u,
604
+ top: c,
605
+ right: l + d,
606
+ bottom: c + u,
607
+ left: l
608
+ };
609
+ }
610
+ const wr = {
611
+ ignoreTransform: !1
612
+ };
613
+ function Ie(e, t) {
614
+ t === void 0 && (t = wr);
615
+ let n = e.getBoundingClientRect();
616
+ if (t.ignoreTransform) {
617
+ const {
618
+ transform: c,
619
+ transformOrigin: d
620
+ } = X(e).getComputedStyle(e);
621
+ c && (n = yr(n, c, d));
622
+ }
623
+ const {
624
+ top: r,
625
+ left: o,
626
+ width: i,
627
+ height: s,
628
+ bottom: a,
629
+ right: l
630
+ } = n;
631
+ return {
632
+ top: r,
633
+ left: o,
634
+ width: i,
635
+ height: s,
636
+ bottom: a,
637
+ right: l
638
+ };
639
+ }
640
+ function Vt(e) {
641
+ return Ie(e, {
642
+ ignoreTransform: !0
643
+ });
644
+ }
645
+ function xr(e) {
646
+ const t = e.innerWidth, n = e.innerHeight;
647
+ return {
648
+ top: 0,
649
+ left: 0,
650
+ right: t,
651
+ bottom: n,
652
+ width: t,
653
+ height: n
654
+ };
655
+ }
656
+ function Dr(e, t) {
657
+ return t === void 0 && (t = X(e).getComputedStyle(e)), t.position === "fixed";
658
+ }
659
+ function Sr(e, t) {
660
+ t === void 0 && (t = X(e).getComputedStyle(e));
661
+ const n = /(auto|scroll|overlay)/;
662
+ return ["overflow", "overflowX", "overflowY"].some((o) => {
663
+ const i = t[o];
664
+ return typeof i == "string" ? n.test(i) : !1;
665
+ });
666
+ }
667
+ function gt(e, t) {
668
+ const n = [];
669
+ function r(o) {
670
+ if (t != null && n.length >= t || !o)
671
+ return n;
672
+ if (Nt(o) && o.scrollingElement != null && !n.includes(o.scrollingElement))
673
+ return n.push(o.scrollingElement), n;
674
+ if (!Ue(o) || on(o) || n.includes(o))
675
+ return n;
676
+ const i = X(e).getComputedStyle(o);
677
+ return o !== e && Sr(o, i) && n.push(o), Dr(o, i) ? n : r(o.parentNode);
678
+ }
679
+ return e ? r(e) : n;
680
+ }
681
+ function fn(e) {
682
+ const [t] = gt(e, 1);
683
+ return t ?? null;
684
+ }
685
+ function wt(e) {
686
+ return !ut || !e ? null : Ee(e) ? e : It(e) ? Nt(e) || e === Ae(e).scrollingElement ? window : Ue(e) ? e : null : null;
687
+ }
688
+ function gn(e) {
689
+ return Ee(e) ? e.scrollX : e.scrollLeft;
690
+ }
691
+ function hn(e) {
692
+ return Ee(e) ? e.scrollY : e.scrollTop;
693
+ }
694
+ function Ct(e) {
695
+ return {
696
+ x: gn(e),
697
+ y: hn(e)
698
+ };
699
+ }
700
+ var P;
701
+ (function(e) {
702
+ e[e.Forward = 1] = "Forward", e[e.Backward = -1] = "Backward";
703
+ })(P || (P = {}));
704
+ function vn(e) {
705
+ return !ut || !e ? !1 : e === document.scrollingElement;
706
+ }
707
+ function pn(e) {
708
+ const t = {
709
+ x: 0,
710
+ y: 0
711
+ }, n = vn(e) ? {
712
+ height: window.innerHeight,
713
+ width: window.innerWidth
714
+ } : {
715
+ height: e.clientHeight,
716
+ width: e.clientWidth
717
+ }, r = {
718
+ x: e.scrollWidth - n.width,
719
+ y: e.scrollHeight - n.height
720
+ }, o = e.scrollTop <= t.y, i = e.scrollLeft <= t.x, s = e.scrollTop >= r.y, a = e.scrollLeft >= r.x;
721
+ return {
722
+ isTop: o,
723
+ isLeft: i,
724
+ isBottom: s,
725
+ isRight: a,
726
+ maxScroll: r,
727
+ minScroll: t
728
+ };
729
+ }
730
+ const Cr = {
731
+ x: 0.2,
732
+ y: 0.2
733
+ };
734
+ function Rr(e, t, n, r, o) {
735
+ let {
736
+ top: i,
737
+ left: s,
738
+ right: a,
739
+ bottom: l
740
+ } = n;
741
+ r === void 0 && (r = 10), o === void 0 && (o = Cr);
742
+ const {
743
+ isTop: c,
744
+ isBottom: d,
745
+ isLeft: u,
746
+ isRight: f
747
+ } = pn(e), g = {
748
+ x: 0,
749
+ y: 0
750
+ }, x = {
751
+ x: 0,
752
+ y: 0
753
+ }, v = {
754
+ height: t.height * o.y,
755
+ width: t.width * o.x
756
+ };
757
+ return !c && i <= t.top + v.height ? (g.y = P.Backward, x.y = r * Math.abs((t.top + v.height - i) / v.height)) : !d && l >= t.bottom - v.height && (g.y = P.Forward, x.y = r * Math.abs((t.bottom - v.height - l) / v.height)), !f && a >= t.right - v.width ? (g.x = P.Forward, x.x = r * Math.abs((t.right - v.width - a) / v.width)) : !u && s <= t.left + v.width && (g.x = P.Backward, x.x = r * Math.abs((t.left + v.width - s) / v.width)), {
758
+ direction: g,
759
+ speed: x
760
+ };
761
+ }
762
+ function Er(e) {
763
+ if (e === document.scrollingElement) {
764
+ const {
765
+ innerWidth: i,
766
+ innerHeight: s
767
+ } = window;
768
+ return {
769
+ top: 0,
770
+ left: 0,
771
+ right: i,
772
+ bottom: s,
773
+ width: i,
774
+ height: s
775
+ };
776
+ }
777
+ const {
778
+ top: t,
779
+ left: n,
780
+ right: r,
781
+ bottom: o
782
+ } = e.getBoundingClientRect();
783
+ return {
784
+ top: t,
785
+ left: n,
786
+ right: r,
787
+ bottom: o,
788
+ width: e.clientWidth,
789
+ height: e.clientHeight
790
+ };
791
+ }
792
+ function bn(e) {
793
+ return e.reduce((t, n) => Re(t, Ct(n)), Z);
794
+ }
795
+ function Ar(e) {
796
+ return e.reduce((t, n) => t + gn(n), 0);
797
+ }
798
+ function Ir(e) {
799
+ return e.reduce((t, n) => t + hn(n), 0);
800
+ }
801
+ function mn(e, t) {
802
+ if (t === void 0 && (t = Ie), !e)
803
+ return;
804
+ const {
805
+ top: n,
806
+ left: r,
807
+ bottom: o,
808
+ right: i
809
+ } = t(e);
810
+ fn(e) && (o <= 0 || i <= 0 || n >= window.innerHeight || r >= window.innerWidth) && e.scrollIntoView({
811
+ block: "center",
812
+ inline: "center"
813
+ });
814
+ }
815
+ const Nr = [["x", ["left", "right"], Ar], ["y", ["top", "bottom"], Ir]];
816
+ class Ot {
817
+ constructor(t, n) {
818
+ this.rect = void 0, this.width = void 0, this.height = void 0, this.top = void 0, this.bottom = void 0, this.right = void 0, this.left = void 0;
819
+ const r = gt(n), o = bn(r);
820
+ this.rect = {
821
+ ...t
822
+ }, this.width = t.width, this.height = t.height;
823
+ for (const [i, s, a] of Nr)
824
+ for (const l of s)
825
+ Object.defineProperty(this, l, {
826
+ get: () => {
827
+ const c = a(r), d = o[i] - c;
828
+ return this.rect[l] + d;
829
+ },
830
+ enumerable: !0
831
+ });
832
+ Object.defineProperty(this, "rect", {
833
+ enumerable: !1
834
+ });
835
+ }
836
+ }
837
+ class Be {
838
+ constructor(t) {
839
+ this.target = void 0, this.listeners = [], this.removeAll = () => {
840
+ this.listeners.forEach((n) => {
841
+ var r;
842
+ return (r = this.target) == null ? void 0 : r.removeEventListener(...n);
843
+ });
844
+ }, this.target = t;
845
+ }
846
+ add(t, n, r) {
847
+ var o;
848
+ (o = this.target) == null || o.addEventListener(t, n, r), this.listeners.push([t, n, r]);
849
+ }
850
+ }
851
+ function Or(e) {
852
+ const {
853
+ EventTarget: t
854
+ } = X(e);
855
+ return e instanceof t ? e : Ae(e);
856
+ }
857
+ function xt(e, t) {
858
+ const n = Math.abs(e.x), r = Math.abs(e.y);
859
+ return typeof t == "number" ? Math.sqrt(n ** 2 + r ** 2) > t : "x" in t && "y" in t ? n > t.x && r > t.y : "x" in t ? n > t.x : "y" in t ? r > t.y : !1;
860
+ }
861
+ var G;
862
+ (function(e) {
863
+ e.Click = "click", e.DragStart = "dragstart", e.Keydown = "keydown", e.ContextMenu = "contextmenu", e.Resize = "resize", e.SelectionChange = "selectionchange", e.VisibilityChange = "visibilitychange";
864
+ })(G || (G = {}));
865
+ function Ht(e) {
866
+ e.preventDefault();
867
+ }
868
+ function Tr(e) {
869
+ e.stopPropagation();
870
+ }
871
+ var C;
872
+ (function(e) {
873
+ e.Space = "Space", e.Down = "ArrowDown", e.Right = "ArrowRight", e.Left = "ArrowLeft", e.Up = "ArrowUp", e.Esc = "Escape", e.Enter = "Enter", e.Tab = "Tab";
874
+ })(C || (C = {}));
875
+ const yn = {
876
+ start: [C.Space, C.Enter],
877
+ cancel: [C.Esc],
878
+ end: [C.Space, C.Enter, C.Tab]
879
+ }, Mr = (e, t) => {
880
+ let {
881
+ currentCoordinates: n
882
+ } = t;
883
+ switch (e.code) {
884
+ case C.Right:
885
+ return {
886
+ ...n,
887
+ x: n.x + 25
888
+ };
889
+ case C.Left:
890
+ return {
891
+ ...n,
892
+ x: n.x - 25
893
+ };
894
+ case C.Down:
895
+ return {
896
+ ...n,
897
+ y: n.y + 25
898
+ };
899
+ case C.Up:
900
+ return {
901
+ ...n,
902
+ y: n.y - 25
903
+ };
904
+ }
905
+ };
906
+ class Tt {
907
+ constructor(t) {
908
+ this.props = void 0, this.autoScrollEnabled = !1, this.referenceCoordinates = void 0, this.listeners = void 0, this.windowListeners = void 0, this.props = t;
909
+ const {
910
+ event: {
911
+ target: n
912
+ }
913
+ } = t;
914
+ this.props = t, this.listeners = new Be(Ae(n)), this.windowListeners = new Be(X(n)), this.handleKeyDown = this.handleKeyDown.bind(this), this.handleCancel = this.handleCancel.bind(this), this.attach();
915
+ }
916
+ attach() {
917
+ this.handleStart(), this.windowListeners.add(G.Resize, this.handleCancel), this.windowListeners.add(G.VisibilityChange, this.handleCancel), setTimeout(() => this.listeners.add(G.Keydown, this.handleKeyDown));
918
+ }
919
+ handleStart() {
920
+ const {
921
+ activeNode: t,
922
+ onStart: n
923
+ } = this.props, r = t.node.current;
924
+ r && mn(r), n(Z);
925
+ }
926
+ handleKeyDown(t) {
927
+ if (ft(t)) {
928
+ const {
929
+ active: n,
930
+ context: r,
931
+ options: o
932
+ } = this.props, {
933
+ keyboardCodes: i = yn,
934
+ coordinateGetter: s = Mr,
935
+ scrollBehavior: a = "smooth"
936
+ } = o, {
937
+ code: l
938
+ } = t;
939
+ if (i.end.includes(l)) {
940
+ this.handleEnd(t);
941
+ return;
942
+ }
943
+ if (i.cancel.includes(l)) {
944
+ this.handleCancel(t);
945
+ return;
946
+ }
947
+ const {
948
+ collisionRect: c
949
+ } = r.current, d = c ? {
950
+ x: c.left,
951
+ y: c.top
952
+ } : Z;
953
+ this.referenceCoordinates || (this.referenceCoordinates = d);
954
+ const u = s(t, {
955
+ active: n,
956
+ context: r.current,
957
+ currentCoordinates: d
958
+ });
959
+ if (u) {
960
+ const f = je(u, d), g = {
961
+ x: 0,
962
+ y: 0
963
+ }, {
964
+ scrollableAncestors: x
965
+ } = r.current;
966
+ for (const v of x) {
967
+ const h = t.code, {
968
+ isTop: p,
969
+ isRight: m,
970
+ isLeft: b,
971
+ isBottom: S,
972
+ maxScroll: R,
973
+ minScroll: D
974
+ } = pn(v), y = Er(v), w = {
975
+ x: Math.min(h === C.Right ? y.right - y.width / 2 : y.right, Math.max(h === C.Right ? y.left : y.left + y.width / 2, u.x)),
976
+ y: Math.min(h === C.Down ? y.bottom - y.height / 2 : y.bottom, Math.max(h === C.Down ? y.top : y.top + y.height / 2, u.y))
977
+ }, N = h === C.Right && !m || h === C.Left && !b, M = h === C.Down && !S || h === C.Up && !p;
978
+ if (N && w.x !== u.x) {
979
+ const E = v.scrollLeft + f.x, Y = h === C.Right && E <= R.x || h === C.Left && E >= D.x;
980
+ if (Y && !f.y) {
981
+ v.scrollTo({
982
+ left: E,
983
+ behavior: a
984
+ });
985
+ return;
986
+ }
987
+ Y ? g.x = v.scrollLeft - E : g.x = h === C.Right ? v.scrollLeft - R.x : v.scrollLeft - D.x, g.x && v.scrollBy({
988
+ left: -g.x,
989
+ behavior: a
990
+ });
991
+ break;
992
+ } else if (M && w.y !== u.y) {
993
+ const E = v.scrollTop + f.y, Y = h === C.Down && E <= R.y || h === C.Up && E >= D.y;
994
+ if (Y && !f.x) {
995
+ v.scrollTo({
996
+ top: E,
997
+ behavior: a
998
+ });
999
+ return;
1000
+ }
1001
+ Y ? g.y = v.scrollTop - E : g.y = h === C.Down ? v.scrollTop - R.y : v.scrollTop - D.y, g.y && v.scrollBy({
1002
+ top: -g.y,
1003
+ behavior: a
1004
+ });
1005
+ break;
1006
+ }
1007
+ }
1008
+ this.handleMove(t, Re(je(u, this.referenceCoordinates), g));
1009
+ }
1010
+ }
1011
+ }
1012
+ handleMove(t, n) {
1013
+ const {
1014
+ onMove: r
1015
+ } = this.props;
1016
+ t.preventDefault(), r(n);
1017
+ }
1018
+ handleEnd(t) {
1019
+ const {
1020
+ onEnd: n
1021
+ } = this.props;
1022
+ t.preventDefault(), this.detach(), n();
1023
+ }
1024
+ handleCancel(t) {
1025
+ const {
1026
+ onCancel: n
1027
+ } = this.props;
1028
+ t.preventDefault(), this.detach(), n();
1029
+ }
1030
+ detach() {
1031
+ this.listeners.removeAll(), this.windowListeners.removeAll();
1032
+ }
1033
+ }
1034
+ Tt.activators = [{
1035
+ eventName: "onKeyDown",
1036
+ handler: (e, t, n) => {
1037
+ let {
1038
+ keyboardCodes: r = yn,
1039
+ onActivation: o
1040
+ } = t, {
1041
+ active: i
1042
+ } = n;
1043
+ const {
1044
+ code: s
1045
+ } = e.nativeEvent;
1046
+ if (r.start.includes(s)) {
1047
+ const a = i.activatorNode.current;
1048
+ return a && e.target !== a ? !1 : (e.preventDefault(), o?.({
1049
+ event: e.nativeEvent
1050
+ }), !0);
1051
+ }
1052
+ return !1;
1053
+ }
1054
+ }];
1055
+ function _t(e) {
1056
+ return !!(e && "distance" in e);
1057
+ }
1058
+ function qt(e) {
1059
+ return !!(e && "delay" in e);
1060
+ }
1061
+ class Mt {
1062
+ constructor(t, n, r) {
1063
+ var o;
1064
+ r === void 0 && (r = Or(t.event.target)), this.props = void 0, this.events = void 0, this.autoScrollEnabled = !0, this.document = void 0, this.activated = !1, this.initialCoordinates = void 0, this.timeoutId = null, this.listeners = void 0, this.documentListeners = void 0, this.windowListeners = void 0, this.props = t, this.events = n;
1065
+ const {
1066
+ event: i
1067
+ } = t, {
1068
+ target: s
1069
+ } = i;
1070
+ this.props = t, this.events = n, this.document = Ae(s), this.documentListeners = new Be(this.document), this.listeners = new Be(r), this.windowListeners = new Be(X(s)), this.initialCoordinates = (o = st(i)) != null ? o : Z, this.handleStart = this.handleStart.bind(this), this.handleMove = this.handleMove.bind(this), this.handleEnd = this.handleEnd.bind(this), this.handleCancel = this.handleCancel.bind(this), this.handleKeydown = this.handleKeydown.bind(this), this.removeTextSelection = this.removeTextSelection.bind(this), this.attach();
1071
+ }
1072
+ attach() {
1073
+ const {
1074
+ events: t,
1075
+ props: {
1076
+ options: {
1077
+ activationConstraint: n,
1078
+ bypassActivationConstraint: r
1079
+ }
1080
+ }
1081
+ } = this;
1082
+ if (this.listeners.add(t.move.name, this.handleMove, {
1083
+ passive: !1
1084
+ }), this.listeners.add(t.end.name, this.handleEnd), t.cancel && this.listeners.add(t.cancel.name, this.handleCancel), this.windowListeners.add(G.Resize, this.handleCancel), this.windowListeners.add(G.DragStart, Ht), this.windowListeners.add(G.VisibilityChange, this.handleCancel), this.windowListeners.add(G.ContextMenu, Ht), this.documentListeners.add(G.Keydown, this.handleKeydown), n) {
1085
+ if (r != null && r({
1086
+ event: this.props.event,
1087
+ activeNode: this.props.activeNode,
1088
+ options: this.props.options
1089
+ }))
1090
+ return this.handleStart();
1091
+ if (qt(n)) {
1092
+ this.timeoutId = setTimeout(this.handleStart, n.delay), this.handlePending(n);
1093
+ return;
1094
+ }
1095
+ if (_t(n)) {
1096
+ this.handlePending(n);
1097
+ return;
1098
+ }
1099
+ }
1100
+ this.handleStart();
1101
+ }
1102
+ detach() {
1103
+ this.listeners.removeAll(), this.windowListeners.removeAll(), setTimeout(this.documentListeners.removeAll, 50), this.timeoutId !== null && (clearTimeout(this.timeoutId), this.timeoutId = null);
1104
+ }
1105
+ handlePending(t, n) {
1106
+ const {
1107
+ active: r,
1108
+ onPending: o
1109
+ } = this.props;
1110
+ o(r, t, this.initialCoordinates, n);
1111
+ }
1112
+ handleStart() {
1113
+ const {
1114
+ initialCoordinates: t
1115
+ } = this, {
1116
+ onStart: n
1117
+ } = this.props;
1118
+ t && (this.activated = !0, this.documentListeners.add(G.Click, Tr, {
1119
+ capture: !0
1120
+ }), this.removeTextSelection(), this.documentListeners.add(G.SelectionChange, this.removeTextSelection), n(t));
1121
+ }
1122
+ handleMove(t) {
1123
+ var n;
1124
+ const {
1125
+ activated: r,
1126
+ initialCoordinates: o,
1127
+ props: i
1128
+ } = this, {
1129
+ onMove: s,
1130
+ options: {
1131
+ activationConstraint: a
1132
+ }
1133
+ } = i;
1134
+ if (!o)
1135
+ return;
1136
+ const l = (n = st(t)) != null ? n : Z, c = je(o, l);
1137
+ if (!r && a) {
1138
+ if (_t(a)) {
1139
+ if (a.tolerance != null && xt(c, a.tolerance))
1140
+ return this.handleCancel();
1141
+ if (xt(c, a.distance))
1142
+ return this.handleStart();
1143
+ }
1144
+ if (qt(a) && xt(c, a.tolerance))
1145
+ return this.handleCancel();
1146
+ this.handlePending(a, c);
1147
+ return;
1148
+ }
1149
+ t.cancelable && t.preventDefault(), s(l);
1150
+ }
1151
+ handleEnd() {
1152
+ const {
1153
+ onAbort: t,
1154
+ onEnd: n
1155
+ } = this.props;
1156
+ this.detach(), this.activated || t(this.props.active), n();
1157
+ }
1158
+ handleCancel() {
1159
+ const {
1160
+ onAbort: t,
1161
+ onCancel: n
1162
+ } = this.props;
1163
+ this.detach(), this.activated || t(this.props.active), n();
1164
+ }
1165
+ handleKeydown(t) {
1166
+ t.code === C.Esc && this.handleCancel();
1167
+ }
1168
+ removeTextSelection() {
1169
+ var t;
1170
+ (t = this.document.getSelection()) == null || t.removeAllRanges();
1171
+ }
1172
+ }
1173
+ const Lr = {
1174
+ cancel: {
1175
+ name: "pointercancel"
1176
+ },
1177
+ move: {
1178
+ name: "pointermove"
1179
+ },
1180
+ end: {
1181
+ name: "pointerup"
1182
+ }
1183
+ };
1184
+ class Lt extends Mt {
1185
+ constructor(t) {
1186
+ const {
1187
+ event: n
1188
+ } = t, r = Ae(n.target);
1189
+ super(t, Lr, r);
1190
+ }
1191
+ }
1192
+ Lt.activators = [{
1193
+ eventName: "onPointerDown",
1194
+ handler: (e, t) => {
1195
+ let {
1196
+ nativeEvent: n
1197
+ } = e, {
1198
+ onActivation: r
1199
+ } = t;
1200
+ return !n.isPrimary || n.button !== 0 ? !1 : (r?.({
1201
+ event: n
1202
+ }), !0);
1203
+ }
1204
+ }];
1205
+ const kr = {
1206
+ move: {
1207
+ name: "mousemove"
1208
+ },
1209
+ end: {
1210
+ name: "mouseup"
1211
+ }
1212
+ };
1213
+ var Rt;
1214
+ (function(e) {
1215
+ e[e.RightClick = 2] = "RightClick";
1216
+ })(Rt || (Rt = {}));
1217
+ class Pr extends Mt {
1218
+ constructor(t) {
1219
+ super(t, kr, Ae(t.event.target));
1220
+ }
1221
+ }
1222
+ Pr.activators = [{
1223
+ eventName: "onMouseDown",
1224
+ handler: (e, t) => {
1225
+ let {
1226
+ nativeEvent: n
1227
+ } = e, {
1228
+ onActivation: r
1229
+ } = t;
1230
+ return n.button === Rt.RightClick ? !1 : (r?.({
1231
+ event: n
1232
+ }), !0);
1233
+ }
1234
+ }];
1235
+ const Dt = {
1236
+ cancel: {
1237
+ name: "touchcancel"
1238
+ },
1239
+ move: {
1240
+ name: "touchmove"
1241
+ },
1242
+ end: {
1243
+ name: "touchend"
1244
+ }
1245
+ };
1246
+ class zr extends Mt {
1247
+ constructor(t) {
1248
+ super(t, Dt);
1249
+ }
1250
+ static setup() {
1251
+ return window.addEventListener(Dt.move.name, t, {
1252
+ capture: !1,
1253
+ passive: !1
1254
+ }), function() {
1255
+ window.removeEventListener(Dt.move.name, t);
1256
+ };
1257
+ function t() {
1258
+ }
1259
+ }
1260
+ }
1261
+ zr.activators = [{
1262
+ eventName: "onTouchStart",
1263
+ handler: (e, t) => {
1264
+ let {
1265
+ nativeEvent: n
1266
+ } = e, {
1267
+ onActivation: r
1268
+ } = t;
1269
+ const {
1270
+ touches: o
1271
+ } = n;
1272
+ return o.length > 1 ? !1 : (r?.({
1273
+ event: n
1274
+ }), !0);
1275
+ }
1276
+ }];
1277
+ var Fe;
1278
+ (function(e) {
1279
+ e[e.Pointer = 0] = "Pointer", e[e.DraggableRect = 1] = "DraggableRect";
1280
+ })(Fe || (Fe = {}));
1281
+ var lt;
1282
+ (function(e) {
1283
+ e[e.TreeOrder = 0] = "TreeOrder", e[e.ReversedTreeOrder = 1] = "ReversedTreeOrder";
1284
+ })(lt || (lt = {}));
1285
+ function Br(e) {
1286
+ let {
1287
+ acceleration: t,
1288
+ activator: n = Fe.Pointer,
1289
+ canScroll: r,
1290
+ draggingRect: o,
1291
+ enabled: i,
1292
+ interval: s = 5,
1293
+ order: a = lt.TreeOrder,
1294
+ pointerCoordinates: l,
1295
+ scrollableAncestors: c,
1296
+ scrollableAncestorRects: d,
1297
+ delta: u,
1298
+ threshold: f
1299
+ } = e;
1300
+ const g = $r({
1301
+ delta: u,
1302
+ disabled: !i
1303
+ }), [x, v] = Gn(), h = O({
1304
+ x: 0,
1305
+ y: 0
1306
+ }), p = O({
1307
+ x: 0,
1308
+ y: 0
1309
+ }), m = A(() => {
1310
+ switch (n) {
1311
+ case Fe.Pointer:
1312
+ return l ? {
1313
+ top: l.y,
1314
+ bottom: l.y,
1315
+ left: l.x,
1316
+ right: l.x
1317
+ } : null;
1318
+ case Fe.DraggableRect:
1319
+ return o;
1320
+ }
1321
+ }, [n, o, l]), b = O(null), S = $(() => {
1322
+ const D = b.current;
1323
+ if (!D)
1324
+ return;
1325
+ const y = h.current.x * p.current.x, w = h.current.y * p.current.y;
1326
+ D.scrollBy(y, w);
1327
+ }, []), R = A(() => a === lt.TreeOrder ? [...c].reverse() : c, [a, c]);
1328
+ T(
1329
+ () => {
1330
+ if (!i || !c.length || !m) {
1331
+ v();
1332
+ return;
1333
+ }
1334
+ for (const D of R) {
1335
+ if (r?.(D) === !1)
1336
+ continue;
1337
+ const y = c.indexOf(D), w = d[y];
1338
+ if (!w)
1339
+ continue;
1340
+ const {
1341
+ direction: N,
1342
+ speed: M
1343
+ } = Rr(D, w, m, t, f);
1344
+ for (const E of ["x", "y"])
1345
+ g[E][N[E]] || (M[E] = 0, N[E] = 0);
1346
+ if (M.x > 0 || M.y > 0) {
1347
+ v(), b.current = D, x(S, s), h.current = M, p.current = N;
1348
+ return;
1349
+ }
1350
+ }
1351
+ h.current = {
1352
+ x: 0,
1353
+ y: 0
1354
+ }, p.current = {
1355
+ x: 0,
1356
+ y: 0
1357
+ }, v();
1358
+ },
1359
+ // eslint-disable-next-line react-hooks/exhaustive-deps
1360
+ [
1361
+ t,
1362
+ S,
1363
+ r,
1364
+ v,
1365
+ i,
1366
+ s,
1367
+ // eslint-disable-next-line react-hooks/exhaustive-deps
1368
+ JSON.stringify(m),
1369
+ // eslint-disable-next-line react-hooks/exhaustive-deps
1370
+ JSON.stringify(g),
1371
+ x,
1372
+ c,
1373
+ R,
1374
+ d,
1375
+ // eslint-disable-next-line react-hooks/exhaustive-deps
1376
+ JSON.stringify(f)
1377
+ ]
1378
+ );
1379
+ }
1380
+ const Fr = {
1381
+ x: {
1382
+ [P.Backward]: !1,
1383
+ [P.Forward]: !1
1384
+ },
1385
+ y: {
1386
+ [P.Backward]: !1,
1387
+ [P.Forward]: !1
1388
+ }
1389
+ };
1390
+ function $r(e) {
1391
+ let {
1392
+ delta: t,
1393
+ disabled: n
1394
+ } = e;
1395
+ const r = it(t);
1396
+ return We((o) => {
1397
+ if (n || !r || !o)
1398
+ return Fr;
1399
+ const i = {
1400
+ x: Math.sign(t.x - r.x),
1401
+ y: Math.sign(t.y - r.y)
1402
+ };
1403
+ return {
1404
+ x: {
1405
+ [P.Backward]: o.x[P.Backward] || i.x === -1,
1406
+ [P.Forward]: o.x[P.Forward] || i.x === 1
1407
+ },
1408
+ y: {
1409
+ [P.Backward]: o.y[P.Backward] || i.y === -1,
1410
+ [P.Forward]: o.y[P.Forward] || i.y === 1
1411
+ }
1412
+ };
1413
+ }, [n, t, r]);
1414
+ }
1415
+ function Xr(e, t) {
1416
+ const n = t != null ? e.get(t) : void 0, r = n ? n.node.current : null;
1417
+ return We((o) => {
1418
+ var i;
1419
+ return t == null ? null : (i = r ?? o) != null ? i : null;
1420
+ }, [r, t]);
1421
+ }
1422
+ function jr(e, t) {
1423
+ return A(() => e.reduce((n, r) => {
1424
+ const {
1425
+ sensor: o
1426
+ } = r, i = o.activators.map((s) => ({
1427
+ eventName: s.eventName,
1428
+ handler: t(s.handler, r)
1429
+ }));
1430
+ return [...n, ...i];
1431
+ }, []), [e, t]);
1432
+ }
1433
+ var Ye;
1434
+ (function(e) {
1435
+ e[e.Always = 0] = "Always", e[e.BeforeDragging = 1] = "BeforeDragging", e[e.WhileDragging = 2] = "WhileDragging";
1436
+ })(Ye || (Ye = {}));
1437
+ var Et;
1438
+ (function(e) {
1439
+ e.Optimized = "optimized";
1440
+ })(Et || (Et = {}));
1441
+ const Gt = /* @__PURE__ */ new Map();
1442
+ function Yr(e, t) {
1443
+ let {
1444
+ dragging: n,
1445
+ dependencies: r,
1446
+ config: o
1447
+ } = t;
1448
+ const [i, s] = F(null), {
1449
+ frequency: a,
1450
+ measure: l,
1451
+ strategy: c
1452
+ } = o, d = O(e), u = h(), f = Xe(u), g = $(function(p) {
1453
+ p === void 0 && (p = []), !f.current && s((m) => m === null ? p : m.concat(p.filter((b) => !m.includes(b))));
1454
+ }, [f]), x = O(null), v = We((p) => {
1455
+ if (u && !n)
1456
+ return Gt;
1457
+ if (!p || p === Gt || d.current !== e || i != null) {
1458
+ const m = /* @__PURE__ */ new Map();
1459
+ for (let b of e) {
1460
+ if (!b)
1461
+ continue;
1462
+ if (i && i.length > 0 && !i.includes(b.id) && b.rect.current) {
1463
+ m.set(b.id, b.rect.current);
1464
+ continue;
1465
+ }
1466
+ const S = b.node.current, R = S ? new Ot(l(S), S) : null;
1467
+ b.rect.current = R, R && m.set(b.id, R);
1468
+ }
1469
+ return m;
1470
+ }
1471
+ return p;
1472
+ }, [e, i, n, u, l]);
1473
+ return T(() => {
1474
+ d.current = e;
1475
+ }, [e]), T(
1476
+ () => {
1477
+ u || g();
1478
+ },
1479
+ // eslint-disable-next-line react-hooks/exhaustive-deps
1480
+ [n, u]
1481
+ ), T(
1482
+ () => {
1483
+ i && i.length > 0 && s(null);
1484
+ },
1485
+ //eslint-disable-next-line react-hooks/exhaustive-deps
1486
+ [JSON.stringify(i)]
1487
+ ), T(
1488
+ () => {
1489
+ u || typeof a != "number" || x.current !== null || (x.current = setTimeout(() => {
1490
+ g(), x.current = null;
1491
+ }, a));
1492
+ },
1493
+ // eslint-disable-next-line react-hooks/exhaustive-deps
1494
+ [a, u, g, ...r]
1495
+ ), {
1496
+ droppableRects: v,
1497
+ measureDroppableContainers: g,
1498
+ measuringScheduled: i != null
1499
+ };
1500
+ function h() {
1501
+ switch (c) {
1502
+ case Ye.Always:
1503
+ return !1;
1504
+ case Ye.BeforeDragging:
1505
+ return n;
1506
+ default:
1507
+ return !n;
1508
+ }
1509
+ }
1510
+ }
1511
+ function kt(e, t) {
1512
+ return We((n) => e ? n || (typeof t == "function" ? t(e) : e) : null, [t, e]);
1513
+ }
1514
+ function Kr(e, t) {
1515
+ return kt(e, t);
1516
+ }
1517
+ function Ur(e) {
1518
+ let {
1519
+ callback: t,
1520
+ disabled: n
1521
+ } = e;
1522
+ const r = dt(t), o = A(() => {
1523
+ if (n || typeof window > "u" || typeof window.MutationObserver > "u")
1524
+ return;
1525
+ const {
1526
+ MutationObserver: i
1527
+ } = window;
1528
+ return new i(r);
1529
+ }, [r, n]);
1530
+ return T(() => () => o?.disconnect(), [o]), o;
1531
+ }
1532
+ function ht(e) {
1533
+ let {
1534
+ callback: t,
1535
+ disabled: n
1536
+ } = e;
1537
+ const r = dt(t), o = A(
1538
+ () => {
1539
+ if (n || typeof window > "u" || typeof window.ResizeObserver > "u")
1540
+ return;
1541
+ const {
1542
+ ResizeObserver: i
1543
+ } = window;
1544
+ return new i(r);
1545
+ },
1546
+ // eslint-disable-next-line react-hooks/exhaustive-deps
1547
+ [n]
1548
+ );
1549
+ return T(() => () => o?.disconnect(), [o]), o;
1550
+ }
1551
+ function Wr(e) {
1552
+ return new Ot(Ie(e), e);
1553
+ }
1554
+ function Jt(e, t, n) {
1555
+ t === void 0 && (t = Wr);
1556
+ const [r, o] = F(null);
1557
+ function i() {
1558
+ o((l) => {
1559
+ if (!e)
1560
+ return null;
1561
+ if (e.isConnected === !1) {
1562
+ var c;
1563
+ return (c = l ?? n) != null ? c : null;
1564
+ }
1565
+ const d = t(e);
1566
+ return JSON.stringify(l) === JSON.stringify(d) ? l : d;
1567
+ });
1568
+ }
1569
+ const s = Ur({
1570
+ callback(l) {
1571
+ if (e)
1572
+ for (const c of l) {
1573
+ const {
1574
+ type: d,
1575
+ target: u
1576
+ } = c;
1577
+ if (d === "childList" && u instanceof HTMLElement && u.contains(e)) {
1578
+ i();
1579
+ break;
1580
+ }
1581
+ }
1582
+ }
1583
+ }), a = ht({
1584
+ callback: i
1585
+ });
1586
+ return Q(() => {
1587
+ i(), e ? (a?.observe(e), s?.observe(document.body, {
1588
+ childList: !0,
1589
+ subtree: !0
1590
+ })) : (a?.disconnect(), s?.disconnect());
1591
+ }, [e]), r;
1592
+ }
1593
+ function Vr(e) {
1594
+ const t = kt(e);
1595
+ return un(e, t);
1596
+ }
1597
+ const Qt = [];
1598
+ function Hr(e) {
1599
+ const t = O(e), n = We((r) => e ? r && r !== Qt && e && t.current && e.parentNode === t.current.parentNode ? r : gt(e) : Qt, [e]);
1600
+ return T(() => {
1601
+ t.current = e;
1602
+ }, [e]), n;
1603
+ }
1604
+ function _r(e) {
1605
+ const [t, n] = F(null), r = O(e), o = $((i) => {
1606
+ const s = wt(i.target);
1607
+ s && n((a) => a ? (a.set(s, Ct(s)), new Map(a)) : null);
1608
+ }, []);
1609
+ return T(() => {
1610
+ const i = r.current;
1611
+ if (e !== i) {
1612
+ s(i);
1613
+ const a = e.map((l) => {
1614
+ const c = wt(l);
1615
+ return c ? (c.addEventListener("scroll", o, {
1616
+ passive: !0
1617
+ }), [c, Ct(c)]) : null;
1618
+ }).filter((l) => l != null);
1619
+ n(a.length ? new Map(a) : null), r.current = e;
1620
+ }
1621
+ return () => {
1622
+ s(e), s(i);
1623
+ };
1624
+ function s(a) {
1625
+ a.forEach((l) => {
1626
+ const c = wt(l);
1627
+ c?.removeEventListener("scroll", o);
1628
+ });
1629
+ }
1630
+ }, [o, e]), A(() => e.length ? t ? Array.from(t.values()).reduce((i, s) => Re(i, s), Z) : bn(e) : Z, [e, t]);
1631
+ }
1632
+ function Zt(e, t) {
1633
+ t === void 0 && (t = []);
1634
+ const n = O(null);
1635
+ return T(
1636
+ () => {
1637
+ n.current = null;
1638
+ },
1639
+ // eslint-disable-next-line react-hooks/exhaustive-deps
1640
+ t
1641
+ ), T(() => {
1642
+ const r = e !== Z;
1643
+ r && !n.current && (n.current = e), !r && n.current && (n.current = null);
1644
+ }, [e]), n.current ? je(e, n.current) : Z;
1645
+ }
1646
+ function qr(e) {
1647
+ T(
1648
+ () => {
1649
+ if (!ut)
1650
+ return;
1651
+ const t = e.map((n) => {
1652
+ let {
1653
+ sensor: r
1654
+ } = n;
1655
+ return r.setup == null ? void 0 : r.setup();
1656
+ });
1657
+ return () => {
1658
+ for (const n of t)
1659
+ n?.();
1660
+ };
1661
+ },
1662
+ // TO-DO: Sensors length could theoretically change which would not be a valid dependency
1663
+ // eslint-disable-next-line react-hooks/exhaustive-deps
1664
+ e.map((t) => {
1665
+ let {
1666
+ sensor: n
1667
+ } = t;
1668
+ return n;
1669
+ })
1670
+ );
1671
+ }
1672
+ function Gr(e, t) {
1673
+ return A(() => e.reduce((n, r) => {
1674
+ let {
1675
+ eventName: o,
1676
+ handler: i
1677
+ } = r;
1678
+ return n[o] = (s) => {
1679
+ i(s, t);
1680
+ }, n;
1681
+ }, {}), [e, t]);
1682
+ }
1683
+ function wn(e) {
1684
+ return A(() => e ? xr(e) : null, [e]);
1685
+ }
1686
+ const en = [];
1687
+ function Jr(e, t) {
1688
+ t === void 0 && (t = Ie);
1689
+ const [n] = e, r = wn(n ? X(n) : null), [o, i] = F(en);
1690
+ function s() {
1691
+ i(() => e.length ? e.map((l) => vn(l) ? r : new Ot(t(l), l)) : en);
1692
+ }
1693
+ const a = ht({
1694
+ callback: s
1695
+ });
1696
+ return Q(() => {
1697
+ a?.disconnect(), s(), e.forEach((l) => a?.observe(l));
1698
+ }, [e]), o;
1699
+ }
1700
+ function xn(e) {
1701
+ if (!e)
1702
+ return null;
1703
+ if (e.children.length > 1)
1704
+ return e;
1705
+ const t = e.children[0];
1706
+ return Ue(t) ? t : e;
1707
+ }
1708
+ function Qr(e) {
1709
+ let {
1710
+ measure: t
1711
+ } = e;
1712
+ const [n, r] = F(null), o = $((c) => {
1713
+ for (const {
1714
+ target: d
1715
+ } of c)
1716
+ if (Ue(d)) {
1717
+ r((u) => {
1718
+ const f = t(d);
1719
+ return u ? {
1720
+ ...u,
1721
+ width: f.width,
1722
+ height: f.height
1723
+ } : f;
1724
+ });
1725
+ break;
1726
+ }
1727
+ }, [t]), i = ht({
1728
+ callback: o
1729
+ }), s = $((c) => {
1730
+ const d = xn(c);
1731
+ i?.disconnect(), d && i?.observe(d), r(d ? t(d) : null);
1732
+ }, [t, i]), [a, l] = ot(s);
1733
+ return A(() => ({
1734
+ nodeRef: a,
1735
+ rect: n,
1736
+ setRef: l
1737
+ }), [n, a, l]);
1738
+ }
1739
+ const Zr = [{
1740
+ sensor: Lt,
1741
+ options: {}
1742
+ }, {
1743
+ sensor: Tt,
1744
+ options: {}
1745
+ }], eo = {
1746
+ current: {}
1747
+ }, rt = {
1748
+ draggable: {
1749
+ measure: Vt
1750
+ },
1751
+ droppable: {
1752
+ measure: Vt,
1753
+ strategy: Ye.WhileDragging,
1754
+ frequency: Et.Optimized
1755
+ },
1756
+ dragOverlay: {
1757
+ measure: Ie
1758
+ }
1759
+ };
1760
+ class $e extends Map {
1761
+ get(t) {
1762
+ var n;
1763
+ return t != null && (n = super.get(t)) != null ? n : void 0;
1764
+ }
1765
+ toArray() {
1766
+ return Array.from(this.values());
1767
+ }
1768
+ getEnabled() {
1769
+ return this.toArray().filter((t) => {
1770
+ let {
1771
+ disabled: n
1772
+ } = t;
1773
+ return !n;
1774
+ });
1775
+ }
1776
+ getNodeFor(t) {
1777
+ var n, r;
1778
+ return (n = (r = this.get(t)) == null ? void 0 : r.node.current) != null ? n : void 0;
1779
+ }
1780
+ }
1781
+ const to = {
1782
+ activatorEvent: null,
1783
+ active: null,
1784
+ activeNode: null,
1785
+ activeNodeRect: null,
1786
+ collisions: null,
1787
+ containerNodeRect: null,
1788
+ draggableNodes: /* @__PURE__ */ new Map(),
1789
+ droppableRects: /* @__PURE__ */ new Map(),
1790
+ droppableContainers: /* @__PURE__ */ new $e(),
1791
+ over: null,
1792
+ dragOverlay: {
1793
+ nodeRef: {
1794
+ current: null
1795
+ },
1796
+ rect: null,
1797
+ setRef: at
1798
+ },
1799
+ scrollableAncestors: [],
1800
+ scrollableAncestorRects: [],
1801
+ measuringConfiguration: rt,
1802
+ measureDroppableContainers: at,
1803
+ windowRect: null,
1804
+ measuringScheduled: !1
1805
+ }, Dn = {
1806
+ activatorEvent: null,
1807
+ activators: [],
1808
+ active: null,
1809
+ activeNodeRect: null,
1810
+ ariaDescribedById: {
1811
+ draggable: ""
1812
+ },
1813
+ dispatch: at,
1814
+ draggableNodes: /* @__PURE__ */ new Map(),
1815
+ over: null,
1816
+ measureDroppableContainers: at
1817
+ }, He = /* @__PURE__ */ Ke(Dn), Sn = /* @__PURE__ */ Ke(to);
1818
+ function no() {
1819
+ return {
1820
+ draggable: {
1821
+ active: null,
1822
+ initialCoordinates: {
1823
+ x: 0,
1824
+ y: 0
1825
+ },
1826
+ nodes: /* @__PURE__ */ new Map(),
1827
+ translate: {
1828
+ x: 0,
1829
+ y: 0
1830
+ }
1831
+ },
1832
+ droppable: {
1833
+ containers: new $e()
1834
+ }
1835
+ };
1836
+ }
1837
+ function ro(e, t) {
1838
+ switch (t.type) {
1839
+ case k.DragStart:
1840
+ return {
1841
+ ...e,
1842
+ draggable: {
1843
+ ...e.draggable,
1844
+ initialCoordinates: t.initialCoordinates,
1845
+ active: t.active
1846
+ }
1847
+ };
1848
+ case k.DragMove:
1849
+ return e.draggable.active == null ? e : {
1850
+ ...e,
1851
+ draggable: {
1852
+ ...e.draggable,
1853
+ translate: {
1854
+ x: t.coordinates.x - e.draggable.initialCoordinates.x,
1855
+ y: t.coordinates.y - e.draggable.initialCoordinates.y
1856
+ }
1857
+ }
1858
+ };
1859
+ case k.DragEnd:
1860
+ case k.DragCancel:
1861
+ return {
1862
+ ...e,
1863
+ draggable: {
1864
+ ...e.draggable,
1865
+ active: null,
1866
+ initialCoordinates: {
1867
+ x: 0,
1868
+ y: 0
1869
+ },
1870
+ translate: {
1871
+ x: 0,
1872
+ y: 0
1873
+ }
1874
+ }
1875
+ };
1876
+ case k.RegisterDroppable: {
1877
+ const {
1878
+ element: n
1879
+ } = t, {
1880
+ id: r
1881
+ } = n, o = new $e(e.droppable.containers);
1882
+ return o.set(r, n), {
1883
+ ...e,
1884
+ droppable: {
1885
+ ...e.droppable,
1886
+ containers: o
1887
+ }
1888
+ };
1889
+ }
1890
+ case k.SetDroppableDisabled: {
1891
+ const {
1892
+ id: n,
1893
+ key: r,
1894
+ disabled: o
1895
+ } = t, i = e.droppable.containers.get(n);
1896
+ if (!i || r !== i.key)
1897
+ return e;
1898
+ const s = new $e(e.droppable.containers);
1899
+ return s.set(n, {
1900
+ ...i,
1901
+ disabled: o
1902
+ }), {
1903
+ ...e,
1904
+ droppable: {
1905
+ ...e.droppable,
1906
+ containers: s
1907
+ }
1908
+ };
1909
+ }
1910
+ case k.UnregisterDroppable: {
1911
+ const {
1912
+ id: n,
1913
+ key: r
1914
+ } = t, o = e.droppable.containers.get(n);
1915
+ if (!o || r !== o.key)
1916
+ return e;
1917
+ const i = new $e(e.droppable.containers);
1918
+ return i.delete(n), {
1919
+ ...e,
1920
+ droppable: {
1921
+ ...e.droppable,
1922
+ containers: i
1923
+ }
1924
+ };
1925
+ }
1926
+ default:
1927
+ return e;
1928
+ }
1929
+ }
1930
+ function oo(e) {
1931
+ let {
1932
+ disabled: t
1933
+ } = e;
1934
+ const {
1935
+ active: n,
1936
+ activatorEvent: r,
1937
+ draggableNodes: o
1938
+ } = pe(He), i = it(r), s = it(n?.id);
1939
+ return T(() => {
1940
+ if (!t && !r && i && s != null) {
1941
+ if (!ft(i) || document.activeElement === i.target)
1942
+ return;
1943
+ const a = o.get(s);
1944
+ if (!a)
1945
+ return;
1946
+ const {
1947
+ activatorNode: l,
1948
+ node: c
1949
+ } = a;
1950
+ if (!l.current && !c.current)
1951
+ return;
1952
+ requestAnimationFrame(() => {
1953
+ for (const d of [l.current, c.current]) {
1954
+ if (!d)
1955
+ continue;
1956
+ const u = Zn(d);
1957
+ if (u) {
1958
+ u.focus();
1959
+ break;
1960
+ }
1961
+ }
1962
+ });
1963
+ }
1964
+ }, [r, t, o, s, i]), null;
1965
+ }
1966
+ function Cn(e, t) {
1967
+ let {
1968
+ transform: n,
1969
+ ...r
1970
+ } = t;
1971
+ return e != null && e.length ? e.reduce((o, i) => i({
1972
+ transform: o,
1973
+ ...r
1974
+ }), n) : n;
1975
+ }
1976
+ function io(e) {
1977
+ return A(
1978
+ () => ({
1979
+ draggable: {
1980
+ ...rt.draggable,
1981
+ ...e?.draggable
1982
+ },
1983
+ droppable: {
1984
+ ...rt.droppable,
1985
+ ...e?.droppable
1986
+ },
1987
+ dragOverlay: {
1988
+ ...rt.dragOverlay,
1989
+ ...e?.dragOverlay
1990
+ }
1991
+ }),
1992
+ // eslint-disable-next-line react-hooks/exhaustive-deps
1993
+ [e?.draggable, e?.droppable, e?.dragOverlay]
1994
+ );
1995
+ }
1996
+ function so(e) {
1997
+ let {
1998
+ activeNode: t,
1999
+ measure: n,
2000
+ initialRect: r,
2001
+ config: o = !0
2002
+ } = e;
2003
+ const i = O(!1), {
2004
+ x: s,
2005
+ y: a
2006
+ } = typeof o == "boolean" ? {
2007
+ x: o,
2008
+ y: o
2009
+ } : o;
2010
+ Q(() => {
2011
+ if (!s && !a || !t) {
2012
+ i.current = !1;
2013
+ return;
2014
+ }
2015
+ if (i.current || !r)
2016
+ return;
2017
+ const c = t?.node.current;
2018
+ if (!c || c.isConnected === !1)
2019
+ return;
2020
+ const d = n(c), u = un(d, r);
2021
+ if (s || (u.x = 0), a || (u.y = 0), i.current = !0, Math.abs(u.x) > 0 || Math.abs(u.y) > 0) {
2022
+ const f = fn(c);
2023
+ f && f.scrollBy({
2024
+ top: u.y,
2025
+ left: u.x
2026
+ });
2027
+ }
2028
+ }, [t, s, a, r, n]);
2029
+ }
2030
+ const vt = /* @__PURE__ */ Ke({
2031
+ ...Z,
2032
+ scaleX: 1,
2033
+ scaleY: 1
2034
+ });
2035
+ var ve;
2036
+ (function(e) {
2037
+ e[e.Uninitialized = 0] = "Uninitialized", e[e.Initializing = 1] = "Initializing", e[e.Initialized = 2] = "Initialized";
2038
+ })(ve || (ve = {}));
2039
+ const ao = /* @__PURE__ */ Kn(function(t) {
2040
+ var n, r, o, i;
2041
+ let {
2042
+ id: s,
2043
+ accessibility: a,
2044
+ autoScroll: l = !0,
2045
+ children: c,
2046
+ sensors: d = Zr,
2047
+ collisionDetection: u = vr,
2048
+ measuring: f,
2049
+ modifiers: g,
2050
+ ...x
2051
+ } = t;
2052
+ const v = Un(ro, void 0, no), [h, p] = v, [m, b] = ir(), [S, R] = F(ve.Uninitialized), D = S === ve.Initialized, {
2053
+ draggable: {
2054
+ active: y,
2055
+ nodes: w,
2056
+ translate: N
2057
+ },
2058
+ droppable: {
2059
+ containers: M
2060
+ }
2061
+ } = h, E = y != null ? w.get(y) : null, Y = O({
2062
+ initial: null,
2063
+ translated: null
2064
+ }), J = A(() => {
2065
+ var B;
2066
+ return y != null ? {
2067
+ id: y,
2068
+ // It's possible for the active node to unmount while dragging
2069
+ data: (B = E?.data) != null ? B : eo,
2070
+ rect: Y
2071
+ } : null;
2072
+ }, [y, E]), ee = O(null), [Ne, _e] = F(null), [K, qe] = F(null), oe = Xe(x, Object.values(x)), Oe = Ve("DndDescribedBy", s), Ge = A(() => M.getEnabled(), [M]), j = io(f), {
2073
+ droppableRects: ie,
2074
+ measureDroppableContainers: me,
2075
+ measuringScheduled: Te
2076
+ } = Yr(Ge, {
2077
+ dragging: D,
2078
+ dependencies: [N.x, N.y],
2079
+ config: j.droppable
2080
+ }), H = Xr(w, y), Je = A(() => K ? st(K) : null, [K]), ce = Xn(), se = Kr(H, j.draggable.measure);
2081
+ so({
2082
+ activeNode: y != null ? w.get(y) : null,
2083
+ config: ce.layoutShiftCompensation,
2084
+ initialRect: se,
2085
+ measure: j.draggable.measure
2086
+ });
2087
+ const I = Jt(H, j.draggable.measure, se), Me = Jt(H ? H.parentElement : null), te = O({
2088
+ activatorEvent: null,
2089
+ active: null,
2090
+ activeNode: H,
2091
+ collisionRect: null,
2092
+ collisions: null,
2093
+ droppableRects: ie,
2094
+ draggableNodes: w,
2095
+ draggingNode: null,
2096
+ draggingNodeRect: null,
2097
+ droppableContainers: M,
2098
+ over: null,
2099
+ scrollableAncestors: [],
2100
+ scrollAdjustedTranslate: null
2101
+ }), ye = M.getNodeFor((n = te.current.over) == null ? void 0 : n.id), ae = Qr({
2102
+ measure: j.dragOverlay.measure
2103
+ }), we = (r = ae.nodeRef.current) != null ? r : H, xe = D ? (o = ae.rect) != null ? o : I : null, Pt = !!(ae.nodeRef.current && ae.rect), zt = Vr(Pt ? null : I), pt = wn(we ? X(we) : null), ue = Hr(D ? ye ?? H : null), Qe = Jr(ue), Ze = Cn(g, {
2104
+ transform: {
2105
+ x: N.x - zt.x,
2106
+ y: N.y - zt.y,
2107
+ scaleX: 1,
2108
+ scaleY: 1
2109
+ },
2110
+ activatorEvent: K,
2111
+ active: J,
2112
+ activeNodeRect: I,
2113
+ containerNodeRect: Me,
2114
+ draggingNodeRect: xe,
2115
+ over: te.current.over,
2116
+ overlayNodeRect: ae.rect,
2117
+ scrollableAncestors: ue,
2118
+ scrollableAncestorRects: Qe,
2119
+ windowRect: pt
2120
+ }), Bt = Je ? Re(Je, N) : null, Ft = _r(ue), Ln = Zt(Ft), kn = Zt(Ft, [I]), De = Re(Ze, Ln), Se = xe ? mr(xe, Ze) : null, Le = J && Se ? u({
2121
+ active: J,
2122
+ collisionRect: Se,
2123
+ droppableRects: ie,
2124
+ droppableContainers: Ge,
2125
+ pointerCoordinates: Bt
2126
+ }) : null, $t = ln(Le, "id"), [de, Xt] = F(null), Pn = Pt ? Ze : Re(Ze, kn), zn = pr(Pn, (i = de?.rect) != null ? i : null, I), bt = O(null), jt = $(
2127
+ (B, U) => {
2128
+ let {
2129
+ sensor: W,
2130
+ options: fe
2131
+ } = U;
2132
+ if (ee.current == null)
2133
+ return;
2134
+ const _ = w.get(ee.current);
2135
+ if (!_)
2136
+ return;
2137
+ const V = B.nativeEvent, ne = new W({
2138
+ active: ee.current,
2139
+ activeNode: _,
2140
+ event: V,
2141
+ options: fe,
2142
+ // Sensors need to be instantiated with refs for arguments that change over time
2143
+ // otherwise they are frozen in time with the stale arguments
2144
+ context: te,
2145
+ onAbort(z) {
2146
+ if (!w.get(z))
2147
+ return;
2148
+ const {
2149
+ onDragAbort: re
2150
+ } = oe.current, le = {
2151
+ id: z
2152
+ };
2153
+ re?.(le), m({
2154
+ type: "onDragAbort",
2155
+ event: le
2156
+ });
2157
+ },
2158
+ onPending(z, ge, re, le) {
2159
+ if (!w.get(z))
2160
+ return;
2161
+ const {
2162
+ onDragPending: Pe
2163
+ } = oe.current, he = {
2164
+ id: z,
2165
+ constraint: ge,
2166
+ initialCoordinates: re,
2167
+ offset: le
2168
+ };
2169
+ Pe?.(he), m({
2170
+ type: "onDragPending",
2171
+ event: he
2172
+ });
2173
+ },
2174
+ onStart(z) {
2175
+ const ge = ee.current;
2176
+ if (ge == null)
2177
+ return;
2178
+ const re = w.get(ge);
2179
+ if (!re)
2180
+ return;
2181
+ const {
2182
+ onDragStart: le
2183
+ } = oe.current, ke = {
2184
+ activatorEvent: V,
2185
+ active: {
2186
+ id: ge,
2187
+ data: re.data,
2188
+ rect: Y
2189
+ }
2190
+ };
2191
+ et(() => {
2192
+ le?.(ke), R(ve.Initializing), p({
2193
+ type: k.DragStart,
2194
+ initialCoordinates: z,
2195
+ active: ge
2196
+ }), m({
2197
+ type: "onDragStart",
2198
+ event: ke
2199
+ }), _e(bt.current), qe(V);
2200
+ });
2201
+ },
2202
+ onMove(z) {
2203
+ p({
2204
+ type: k.DragMove,
2205
+ coordinates: z
2206
+ });
2207
+ },
2208
+ onEnd: Ce(k.DragEnd),
2209
+ onCancel: Ce(k.DragCancel)
2210
+ });
2211
+ bt.current = ne;
2212
+ function Ce(z) {
2213
+ return async function() {
2214
+ const {
2215
+ active: re,
2216
+ collisions: le,
2217
+ over: ke,
2218
+ scrollAdjustedTranslate: Pe
2219
+ } = te.current;
2220
+ let he = null;
2221
+ if (re && Pe) {
2222
+ const {
2223
+ cancelDrop: ze
2224
+ } = oe.current;
2225
+ he = {
2226
+ activatorEvent: V,
2227
+ active: re,
2228
+ collisions: le,
2229
+ delta: Pe,
2230
+ over: ke
2231
+ }, z === k.DragEnd && typeof ze == "function" && await Promise.resolve(ze(he)) && (z = k.DragCancel);
2232
+ }
2233
+ ee.current = null, et(() => {
2234
+ p({
2235
+ type: z
2236
+ }), R(ve.Uninitialized), Xt(null), _e(null), qe(null), bt.current = null;
2237
+ const ze = z === k.DragEnd ? "onDragEnd" : "onDragCancel";
2238
+ if (he) {
2239
+ const mt = oe.current[ze];
2240
+ mt?.(he), m({
2241
+ type: ze,
2242
+ event: he
2243
+ });
2244
+ }
2245
+ });
2246
+ };
2247
+ }
2248
+ },
2249
+ // eslint-disable-next-line react-hooks/exhaustive-deps
2250
+ [w]
2251
+ ), Bn = $((B, U) => (W, fe) => {
2252
+ const _ = W.nativeEvent, V = w.get(fe);
2253
+ if (
2254
+ // Another sensor is already instantiating
2255
+ ee.current !== null || // No active draggable
2256
+ !V || // Event has already been captured
2257
+ _.dndKit || _.defaultPrevented
2258
+ )
2259
+ return;
2260
+ const ne = {
2261
+ active: V
2262
+ };
2263
+ B(W, U.options, ne) === !0 && (_.dndKit = {
2264
+ capturedBy: U.sensor
2265
+ }, ee.current = fe, jt(W, U));
2266
+ }, [w, jt]), Yt = jr(d, Bn);
2267
+ qr(d), Q(() => {
2268
+ I && S === ve.Initializing && R(ve.Initialized);
2269
+ }, [I, S]), T(
2270
+ () => {
2271
+ const {
2272
+ onDragMove: B
2273
+ } = oe.current, {
2274
+ active: U,
2275
+ activatorEvent: W,
2276
+ collisions: fe,
2277
+ over: _
2278
+ } = te.current;
2279
+ if (!U || !W)
2280
+ return;
2281
+ const V = {
2282
+ active: U,
2283
+ activatorEvent: W,
2284
+ collisions: fe,
2285
+ delta: {
2286
+ x: De.x,
2287
+ y: De.y
2288
+ },
2289
+ over: _
2290
+ };
2291
+ et(() => {
2292
+ B?.(V), m({
2293
+ type: "onDragMove",
2294
+ event: V
2295
+ });
2296
+ });
2297
+ },
2298
+ // eslint-disable-next-line react-hooks/exhaustive-deps
2299
+ [De.x, De.y]
2300
+ ), T(
2301
+ () => {
2302
+ const {
2303
+ active: B,
2304
+ activatorEvent: U,
2305
+ collisions: W,
2306
+ droppableContainers: fe,
2307
+ scrollAdjustedTranslate: _
2308
+ } = te.current;
2309
+ if (!B || ee.current == null || !U || !_)
2310
+ return;
2311
+ const {
2312
+ onDragOver: V
2313
+ } = oe.current, ne = fe.get($t), Ce = ne && ne.rect.current ? {
2314
+ id: ne.id,
2315
+ rect: ne.rect.current,
2316
+ data: ne.data,
2317
+ disabled: ne.disabled
2318
+ } : null, z = {
2319
+ active: B,
2320
+ activatorEvent: U,
2321
+ collisions: W,
2322
+ delta: {
2323
+ x: _.x,
2324
+ y: _.y
2325
+ },
2326
+ over: Ce
2327
+ };
2328
+ et(() => {
2329
+ Xt(Ce), V?.(z), m({
2330
+ type: "onDragOver",
2331
+ event: z
2332
+ });
2333
+ });
2334
+ },
2335
+ // eslint-disable-next-line react-hooks/exhaustive-deps
2336
+ [$t]
2337
+ ), Q(() => {
2338
+ te.current = {
2339
+ activatorEvent: K,
2340
+ active: J,
2341
+ activeNode: H,
2342
+ collisionRect: Se,
2343
+ collisions: Le,
2344
+ droppableRects: ie,
2345
+ draggableNodes: w,
2346
+ draggingNode: we,
2347
+ draggingNodeRect: xe,
2348
+ droppableContainers: M,
2349
+ over: de,
2350
+ scrollableAncestors: ue,
2351
+ scrollAdjustedTranslate: De
2352
+ }, Y.current = {
2353
+ initial: xe,
2354
+ translated: Se
2355
+ };
2356
+ }, [J, H, Le, Se, w, we, xe, ie, M, de, ue, De]), Br({
2357
+ ...ce,
2358
+ delta: N,
2359
+ draggingRect: Se,
2360
+ pointerCoordinates: Bt,
2361
+ scrollableAncestors: ue,
2362
+ scrollableAncestorRects: Qe
2363
+ });
2364
+ const Fn = A(() => ({
2365
+ active: J,
2366
+ activeNode: H,
2367
+ activeNodeRect: I,
2368
+ activatorEvent: K,
2369
+ collisions: Le,
2370
+ containerNodeRect: Me,
2371
+ dragOverlay: ae,
2372
+ draggableNodes: w,
2373
+ droppableContainers: M,
2374
+ droppableRects: ie,
2375
+ over: de,
2376
+ measureDroppableContainers: me,
2377
+ scrollableAncestors: ue,
2378
+ scrollableAncestorRects: Qe,
2379
+ measuringConfiguration: j,
2380
+ measuringScheduled: Te,
2381
+ windowRect: pt
2382
+ }), [J, H, I, K, Le, Me, ae, w, M, ie, de, me, ue, Qe, j, Te, pt]), $n = A(() => ({
2383
+ activatorEvent: K,
2384
+ activators: Yt,
2385
+ active: J,
2386
+ activeNodeRect: I,
2387
+ ariaDescribedById: {
2388
+ draggable: Oe
2389
+ },
2390
+ dispatch: p,
2391
+ draggableNodes: w,
2392
+ over: de,
2393
+ measureDroppableContainers: me
2394
+ }), [K, Yt, J, I, p, Oe, w, de, me]);
2395
+ return L.createElement(an.Provider, {
2396
+ value: b
2397
+ }, L.createElement(He.Provider, {
2398
+ value: $n
2399
+ }, L.createElement(Sn.Provider, {
2400
+ value: Fn
2401
+ }, L.createElement(vt.Provider, {
2402
+ value: zn
2403
+ }, c)), L.createElement(oo, {
2404
+ disabled: a?.restoreFocus === !1
2405
+ })), L.createElement(lr, {
2406
+ ...a,
2407
+ hiddenTextDescribedById: Oe
2408
+ }));
2409
+ function Xn() {
2410
+ const B = Ne?.autoScrollEnabled === !1, U = typeof l == "object" ? l.enabled === !1 : l === !1, W = D && !B && !U;
2411
+ return typeof l == "object" ? {
2412
+ ...l,
2413
+ enabled: W
2414
+ } : {
2415
+ enabled: W
2416
+ };
2417
+ }
2418
+ }), lo = /* @__PURE__ */ Ke(null), tn = "button", co = "Draggable";
2419
+ function uo(e) {
2420
+ let {
2421
+ id: t,
2422
+ data: n,
2423
+ disabled: r = !1,
2424
+ attributes: o
2425
+ } = e;
2426
+ const i = Ve(co), {
2427
+ activators: s,
2428
+ activatorEvent: a,
2429
+ active: l,
2430
+ activeNodeRect: c,
2431
+ ariaDescribedById: d,
2432
+ draggableNodes: u,
2433
+ over: f
2434
+ } = pe(He), {
2435
+ role: g = tn,
2436
+ roleDescription: x = "draggable",
2437
+ tabIndex: v = 0
2438
+ } = o ?? {}, h = l?.id === t, p = pe(h ? vt : lo), [m, b] = ot(), [S, R] = ot(), D = Gr(s, t), y = Xe(n);
2439
+ Q(
2440
+ () => (u.set(t, {
2441
+ id: t,
2442
+ key: i,
2443
+ node: m,
2444
+ activatorNode: S,
2445
+ data: y
2446
+ }), () => {
2447
+ const N = u.get(t);
2448
+ N && N.key === i && u.delete(t);
2449
+ }),
2450
+ // eslint-disable-next-line react-hooks/exhaustive-deps
2451
+ [u, t]
2452
+ );
2453
+ const w = A(() => ({
2454
+ role: g,
2455
+ tabIndex: v,
2456
+ "aria-disabled": r,
2457
+ "aria-pressed": h && g === tn ? !0 : void 0,
2458
+ "aria-roledescription": x,
2459
+ "aria-describedby": d.draggable
2460
+ }), [r, g, v, h, x, d.draggable]);
2461
+ return {
2462
+ active: l,
2463
+ activatorEvent: a,
2464
+ activeNodeRect: c,
2465
+ attributes: w,
2466
+ isDragging: h,
2467
+ listeners: r ? void 0 : D,
2468
+ node: m,
2469
+ over: f,
2470
+ setNodeRef: b,
2471
+ setActivatorNodeRef: R,
2472
+ transform: p
2473
+ };
2474
+ }
2475
+ function Rn() {
2476
+ return pe(Sn);
2477
+ }
2478
+ const fo = "Droppable", go = {
2479
+ timeout: 25
2480
+ };
2481
+ function En(e) {
2482
+ let {
2483
+ data: t,
2484
+ disabled: n = !1,
2485
+ id: r,
2486
+ resizeObserverConfig: o
2487
+ } = e;
2488
+ const i = Ve(fo), {
2489
+ active: s,
2490
+ dispatch: a,
2491
+ over: l,
2492
+ measureDroppableContainers: c
2493
+ } = pe(He), d = O({
2494
+ disabled: n
2495
+ }), u = O(!1), f = O(null), g = O(null), {
2496
+ disabled: x,
2497
+ updateMeasurementsFor: v,
2498
+ timeout: h
2499
+ } = {
2500
+ ...go,
2501
+ ...o
2502
+ }, p = Xe(v ?? r), m = $(
2503
+ () => {
2504
+ if (!u.current) {
2505
+ u.current = !0;
2506
+ return;
2507
+ }
2508
+ g.current != null && clearTimeout(g.current), g.current = setTimeout(() => {
2509
+ c(Array.isArray(p.current) ? p.current : [p.current]), g.current = null;
2510
+ }, h);
2511
+ },
2512
+ //eslint-disable-next-line react-hooks/exhaustive-deps
2513
+ [h]
2514
+ ), b = ht({
2515
+ callback: m,
2516
+ disabled: x || !s
2517
+ }), S = $((w, N) => {
2518
+ b && (N && (b.unobserve(N), u.current = !1), w && b.observe(w));
2519
+ }, [b]), [R, D] = ot(S), y = Xe(t);
2520
+ return T(() => {
2521
+ !b || !R.current || (b.disconnect(), u.current = !1, b.observe(R.current));
2522
+ }, [R, b]), T(
2523
+ () => (a({
2524
+ type: k.RegisterDroppable,
2525
+ element: {
2526
+ id: r,
2527
+ key: i,
2528
+ disabled: n,
2529
+ node: R,
2530
+ rect: f,
2531
+ data: y
2532
+ }
2533
+ }), () => a({
2534
+ type: k.UnregisterDroppable,
2535
+ key: i,
2536
+ id: r
2537
+ })),
2538
+ // eslint-disable-next-line react-hooks/exhaustive-deps
2539
+ [r]
2540
+ ), T(() => {
2541
+ n !== d.current.disabled && (a({
2542
+ type: k.SetDroppableDisabled,
2543
+ id: r,
2544
+ key: i,
2545
+ disabled: n
2546
+ }), d.current.disabled = n);
2547
+ }, [r, i, n, a]), {
2548
+ active: s,
2549
+ rect: f,
2550
+ isOver: l?.id === r,
2551
+ node: R,
2552
+ over: l,
2553
+ setNodeRef: D
2554
+ };
2555
+ }
2556
+ function ho(e) {
2557
+ let {
2558
+ animation: t,
2559
+ children: n
2560
+ } = e;
2561
+ const [r, o] = F(null), [i, s] = F(null), a = it(n);
2562
+ return !n && !r && a && o(a), Q(() => {
2563
+ if (!i)
2564
+ return;
2565
+ const l = r?.key, c = r?.props.id;
2566
+ if (l == null || c == null) {
2567
+ o(null);
2568
+ return;
2569
+ }
2570
+ Promise.resolve(t(c, i)).then(() => {
2571
+ o(null);
2572
+ });
2573
+ }, [t, r, i]), L.createElement(L.Fragment, null, n, r ? Wn(r, {
2574
+ ref: s
2575
+ }) : null);
2576
+ }
2577
+ const vo = {
2578
+ x: 0,
2579
+ y: 0,
2580
+ scaleX: 1,
2581
+ scaleY: 1
2582
+ };
2583
+ function po(e) {
2584
+ let {
2585
+ children: t
2586
+ } = e;
2587
+ return L.createElement(He.Provider, {
2588
+ value: Dn
2589
+ }, L.createElement(vt.Provider, {
2590
+ value: vo
2591
+ }, t));
2592
+ }
2593
+ const bo = {
2594
+ position: "fixed",
2595
+ touchAction: "none"
2596
+ }, mo = (e) => ft(e) ? "transform 250ms ease" : void 0, yo = /* @__PURE__ */ Vn((e, t) => {
2597
+ let {
2598
+ as: n,
2599
+ activatorEvent: r,
2600
+ adjustScale: o,
2601
+ children: i,
2602
+ className: s,
2603
+ rect: a,
2604
+ style: l,
2605
+ transform: c,
2606
+ transition: d = mo
2607
+ } = e;
2608
+ if (!a)
2609
+ return null;
2610
+ const u = o ? c : {
2611
+ ...c,
2612
+ scaleX: 1,
2613
+ scaleY: 1
2614
+ }, f = {
2615
+ ...bo,
2616
+ width: a.width,
2617
+ height: a.height,
2618
+ top: a.top,
2619
+ left: a.left,
2620
+ transform: be.Transform.toString(u),
2621
+ transformOrigin: o && r ? dr(r, a) : void 0,
2622
+ transition: typeof d == "function" ? d(r) : d,
2623
+ ...l
2624
+ };
2625
+ return L.createElement(n, {
2626
+ className: s,
2627
+ style: f,
2628
+ ref: t
2629
+ }, i);
2630
+ }), wo = (e) => (t) => {
2631
+ let {
2632
+ active: n,
2633
+ dragOverlay: r
2634
+ } = t;
2635
+ const o = {}, {
2636
+ styles: i,
2637
+ className: s
2638
+ } = e;
2639
+ if (i != null && i.active)
2640
+ for (const [a, l] of Object.entries(i.active))
2641
+ l !== void 0 && (o[a] = n.node.style.getPropertyValue(a), n.node.style.setProperty(a, l));
2642
+ if (i != null && i.dragOverlay)
2643
+ for (const [a, l] of Object.entries(i.dragOverlay))
2644
+ l !== void 0 && r.node.style.setProperty(a, l);
2645
+ return s != null && s.active && n.node.classList.add(s.active), s != null && s.dragOverlay && r.node.classList.add(s.dragOverlay), function() {
2646
+ for (const [l, c] of Object.entries(o))
2647
+ n.node.style.setProperty(l, c);
2648
+ s != null && s.active && n.node.classList.remove(s.active);
2649
+ };
2650
+ }, xo = (e) => {
2651
+ let {
2652
+ transform: {
2653
+ initial: t,
2654
+ final: n
2655
+ }
2656
+ } = e;
2657
+ return [{
2658
+ transform: be.Transform.toString(t)
2659
+ }, {
2660
+ transform: be.Transform.toString(n)
2661
+ }];
2662
+ }, Do = {
2663
+ duration: 250,
2664
+ easing: "ease",
2665
+ keyframes: xo,
2666
+ sideEffects: /* @__PURE__ */ wo({
2667
+ styles: {
2668
+ active: {
2669
+ opacity: "0"
2670
+ }
2671
+ }
2672
+ })
2673
+ };
2674
+ function So(e) {
2675
+ let {
2676
+ config: t,
2677
+ draggableNodes: n,
2678
+ droppableContainers: r,
2679
+ measuringConfiguration: o
2680
+ } = e;
2681
+ return dt((i, s) => {
2682
+ if (t === null)
2683
+ return;
2684
+ const a = n.get(i);
2685
+ if (!a)
2686
+ return;
2687
+ const l = a.node.current;
2688
+ if (!l)
2689
+ return;
2690
+ const c = xn(s);
2691
+ if (!c)
2692
+ return;
2693
+ const {
2694
+ transform: d
2695
+ } = X(s).getComputedStyle(s), u = dn(d);
2696
+ if (!u)
2697
+ return;
2698
+ const f = typeof t == "function" ? t : Co(t);
2699
+ return mn(l, o.draggable.measure), f({
2700
+ active: {
2701
+ id: i,
2702
+ data: a.data,
2703
+ node: l,
2704
+ rect: o.draggable.measure(l)
2705
+ },
2706
+ draggableNodes: n,
2707
+ dragOverlay: {
2708
+ node: s,
2709
+ rect: o.dragOverlay.measure(c)
2710
+ },
2711
+ droppableContainers: r,
2712
+ measuringConfiguration: o,
2713
+ transform: u
2714
+ });
2715
+ });
2716
+ }
2717
+ function Co(e) {
2718
+ const {
2719
+ duration: t,
2720
+ easing: n,
2721
+ sideEffects: r,
2722
+ keyframes: o
2723
+ } = {
2724
+ ...Do,
2725
+ ...e
2726
+ };
2727
+ return (i) => {
2728
+ let {
2729
+ active: s,
2730
+ dragOverlay: a,
2731
+ transform: l,
2732
+ ...c
2733
+ } = i;
2734
+ if (!t)
2735
+ return;
2736
+ const d = {
2737
+ x: a.rect.left - s.rect.left,
2738
+ y: a.rect.top - s.rect.top
2739
+ }, u = {
2740
+ scaleX: l.scaleX !== 1 ? s.rect.width * l.scaleX / a.rect.width : 1,
2741
+ scaleY: l.scaleY !== 1 ? s.rect.height * l.scaleY / a.rect.height : 1
2742
+ }, f = {
2743
+ x: l.x - d.x,
2744
+ y: l.y - d.y,
2745
+ ...u
2746
+ }, g = o({
2747
+ ...c,
2748
+ active: s,
2749
+ dragOverlay: a,
2750
+ transform: {
2751
+ initial: l,
2752
+ final: f
2753
+ }
2754
+ }), [x] = g, v = g[g.length - 1];
2755
+ if (JSON.stringify(x) === JSON.stringify(v))
2756
+ return;
2757
+ const h = r?.({
2758
+ active: s,
2759
+ dragOverlay: a,
2760
+ ...c
2761
+ }), p = a.node.animate(g, {
2762
+ duration: t,
2763
+ easing: n,
2764
+ fill: "forwards"
2765
+ });
2766
+ return new Promise((m) => {
2767
+ p.onfinish = () => {
2768
+ h?.(), m();
2769
+ };
2770
+ });
2771
+ };
2772
+ }
2773
+ let nn = 0;
2774
+ function Ro(e) {
2775
+ return A(() => {
2776
+ if (e != null)
2777
+ return nn++, nn;
2778
+ }, [e]);
2779
+ }
2780
+ const Eo = /* @__PURE__ */ L.memo((e) => {
2781
+ let {
2782
+ adjustScale: t = !1,
2783
+ children: n,
2784
+ dropAnimation: r,
2785
+ style: o,
2786
+ transition: i,
2787
+ modifiers: s,
2788
+ wrapperElement: a = "div",
2789
+ className: l,
2790
+ zIndex: c = 999
2791
+ } = e;
2792
+ const {
2793
+ activatorEvent: d,
2794
+ active: u,
2795
+ activeNodeRect: f,
2796
+ containerNodeRect: g,
2797
+ draggableNodes: x,
2798
+ droppableContainers: v,
2799
+ dragOverlay: h,
2800
+ over: p,
2801
+ measuringConfiguration: m,
2802
+ scrollableAncestors: b,
2803
+ scrollableAncestorRects: S,
2804
+ windowRect: R
2805
+ } = Rn(), D = pe(vt), y = Ro(u?.id), w = Cn(s, {
2806
+ activatorEvent: d,
2807
+ active: u,
2808
+ activeNodeRect: f,
2809
+ containerNodeRect: g,
2810
+ draggingNodeRect: h.rect,
2811
+ over: p,
2812
+ overlayNodeRect: h.rect,
2813
+ scrollableAncestors: b,
2814
+ scrollableAncestorRects: S,
2815
+ transform: D,
2816
+ windowRect: R
2817
+ }), N = kt(f), M = So({
2818
+ config: r,
2819
+ draggableNodes: x,
2820
+ droppableContainers: v,
2821
+ measuringConfiguration: m
2822
+ }), E = N ? h.setRef : void 0;
2823
+ return L.createElement(po, null, L.createElement(ho, {
2824
+ animation: M
2825
+ }, u && y ? L.createElement(yo, {
2826
+ key: y,
2827
+ id: u.id,
2828
+ ref: E,
2829
+ as: a,
2830
+ activatorEvent: d,
2831
+ adjustScale: t,
2832
+ className: l,
2833
+ transition: i,
2834
+ rect: N,
2835
+ style: {
2836
+ zIndex: c,
2837
+ ...o
2838
+ },
2839
+ transform: w
2840
+ }, n) : null));
2841
+ });
2842
+ function An(e, t, n) {
2843
+ const r = e.slice();
2844
+ return r.splice(n < 0 ? r.length + n : n, 0, r.splice(t, 1)[0]), r;
2845
+ }
2846
+ function Ao(e, t) {
2847
+ return e.reduce((n, r, o) => {
2848
+ const i = t.get(r);
2849
+ return i && (n[o] = i), n;
2850
+ }, Array(e.length));
2851
+ }
2852
+ function tt(e) {
2853
+ return e !== null && e >= 0;
2854
+ }
2855
+ function Io(e, t) {
2856
+ if (e === t)
2857
+ return !0;
2858
+ if (e.length !== t.length)
2859
+ return !1;
2860
+ for (let n = 0; n < e.length; n++)
2861
+ if (e[n] !== t[n])
2862
+ return !1;
2863
+ return !0;
2864
+ }
2865
+ function No(e) {
2866
+ return typeof e == "boolean" ? {
2867
+ draggable: e,
2868
+ droppable: e
2869
+ } : e;
2870
+ }
2871
+ const In = (e) => {
2872
+ let {
2873
+ rects: t,
2874
+ activeIndex: n,
2875
+ overIndex: r,
2876
+ index: o
2877
+ } = e;
2878
+ const i = An(t, r, n), s = t[o], a = i[o];
2879
+ return !a || !s ? null : {
2880
+ x: a.left - s.left,
2881
+ y: a.top - s.top,
2882
+ scaleX: a.width / s.width,
2883
+ scaleY: a.height / s.height
2884
+ };
2885
+ }, nt = {
2886
+ scaleX: 1,
2887
+ scaleY: 1
2888
+ }, Oo = (e) => {
2889
+ var t;
2890
+ let {
2891
+ activeIndex: n,
2892
+ activeNodeRect: r,
2893
+ index: o,
2894
+ rects: i,
2895
+ overIndex: s
2896
+ } = e;
2897
+ const a = (t = i[n]) != null ? t : r;
2898
+ if (!a)
2899
+ return null;
2900
+ if (o === n) {
2901
+ const c = i[s];
2902
+ return c ? {
2903
+ x: 0,
2904
+ y: n < s ? c.top + c.height - (a.top + a.height) : c.top - a.top,
2905
+ ...nt
2906
+ } : null;
2907
+ }
2908
+ const l = To(i, o, n);
2909
+ return o > n && o <= s ? {
2910
+ x: 0,
2911
+ y: -a.height - l,
2912
+ ...nt
2913
+ } : o < n && o >= s ? {
2914
+ x: 0,
2915
+ y: a.height + l,
2916
+ ...nt
2917
+ } : {
2918
+ x: 0,
2919
+ y: 0,
2920
+ ...nt
2921
+ };
2922
+ };
2923
+ function To(e, t, n) {
2924
+ const r = e[t], o = e[t - 1], i = e[t + 1];
2925
+ return r ? n < t ? o ? r.top - (o.top + o.height) : i ? i.top - (r.top + r.height) : 0 : i ? i.top - (r.top + r.height) : o ? r.top - (o.top + o.height) : 0 : 0;
2926
+ }
2927
+ const Nn = "Sortable", On = /* @__PURE__ */ L.createContext({
2928
+ activeIndex: -1,
2929
+ containerId: Nn,
2930
+ disableTransforms: !1,
2931
+ items: [],
2932
+ overIndex: -1,
2933
+ useDragOverlay: !1,
2934
+ sortedRects: [],
2935
+ strategy: In,
2936
+ disabled: {
2937
+ draggable: !1,
2938
+ droppable: !1
2939
+ }
2940
+ });
2941
+ function Mo(e) {
2942
+ let {
2943
+ children: t,
2944
+ id: n,
2945
+ items: r,
2946
+ strategy: o = In,
2947
+ disabled: i = !1
2948
+ } = e;
2949
+ const {
2950
+ active: s,
2951
+ dragOverlay: a,
2952
+ droppableRects: l,
2953
+ over: c,
2954
+ measureDroppableContainers: d
2955
+ } = Rn(), u = Ve(Nn, n), f = a.rect !== null, g = A(() => r.map((D) => typeof D == "object" && "id" in D ? D.id : D), [r]), x = s != null, v = s ? g.indexOf(s.id) : -1, h = c ? g.indexOf(c.id) : -1, p = O(g), m = !Io(g, p.current), b = h !== -1 && v === -1 || m, S = No(i);
2956
+ Q(() => {
2957
+ m && x && d(g);
2958
+ }, [m, g, x, d]), T(() => {
2959
+ p.current = g;
2960
+ }, [g]);
2961
+ const R = A(
2962
+ () => ({
2963
+ activeIndex: v,
2964
+ containerId: u,
2965
+ disabled: S,
2966
+ disableTransforms: b,
2967
+ items: g,
2968
+ overIndex: h,
2969
+ useDragOverlay: f,
2970
+ sortedRects: Ao(g, l),
2971
+ strategy: o
2972
+ }),
2973
+ // eslint-disable-next-line react-hooks/exhaustive-deps
2974
+ [v, u, S.draggable, S.droppable, b, g, h, l, f, o]
2975
+ );
2976
+ return L.createElement(On.Provider, {
2977
+ value: R
2978
+ }, t);
2979
+ }
2980
+ const Lo = (e) => {
2981
+ let {
2982
+ id: t,
2983
+ items: n,
2984
+ activeIndex: r,
2985
+ overIndex: o
2986
+ } = e;
2987
+ return An(n, r, o).indexOf(t);
2988
+ }, ko = (e) => {
2989
+ let {
2990
+ containerId: t,
2991
+ isSorting: n,
2992
+ wasDragging: r,
2993
+ index: o,
2994
+ items: i,
2995
+ newIndex: s,
2996
+ previousItems: a,
2997
+ previousContainerId: l,
2998
+ transition: c
2999
+ } = e;
3000
+ return !c || !r || a !== i && o === s ? !1 : n ? !0 : s !== o && t === l;
3001
+ }, Po = {
3002
+ duration: 200,
3003
+ easing: "ease"
3004
+ }, Tn = "transform", zo = /* @__PURE__ */ be.Transition.toString({
3005
+ property: Tn,
3006
+ duration: 0,
3007
+ easing: "linear"
3008
+ }), Bo = {
3009
+ roleDescription: "sortable"
3010
+ };
3011
+ function Fo(e) {
3012
+ let {
3013
+ disabled: t,
3014
+ index: n,
3015
+ node: r,
3016
+ rect: o
3017
+ } = e;
3018
+ const [i, s] = F(null), a = O(n);
3019
+ return Q(() => {
3020
+ if (!t && n !== a.current && r.current) {
3021
+ const l = o.current;
3022
+ if (l) {
3023
+ const c = Ie(r.current, {
3024
+ ignoreTransform: !0
3025
+ }), d = {
3026
+ x: l.left - c.left,
3027
+ y: l.top - c.top,
3028
+ scaleX: l.width / c.width,
3029
+ scaleY: l.height / c.height
3030
+ };
3031
+ (d.x || d.y) && s(d);
3032
+ }
3033
+ }
3034
+ n !== a.current && (a.current = n);
3035
+ }, [t, n, r, o]), T(() => {
3036
+ i && s(null);
3037
+ }, [i]), i;
3038
+ }
3039
+ function $o(e) {
3040
+ let {
3041
+ animateLayoutChanges: t = ko,
3042
+ attributes: n,
3043
+ disabled: r,
3044
+ data: o,
3045
+ getNewIndex: i = Lo,
3046
+ id: s,
3047
+ strategy: a,
3048
+ resizeObserverConfig: l,
3049
+ transition: c = Po
3050
+ } = e;
3051
+ const {
3052
+ items: d,
3053
+ containerId: u,
3054
+ activeIndex: f,
3055
+ disabled: g,
3056
+ disableTransforms: x,
3057
+ sortedRects: v,
3058
+ overIndex: h,
3059
+ useDragOverlay: p,
3060
+ strategy: m
3061
+ } = pe(On), b = Xo(r, g), S = d.indexOf(s), R = A(() => ({
3062
+ sortable: {
3063
+ containerId: u,
3064
+ index: S,
3065
+ items: d
3066
+ },
3067
+ ...o
3068
+ }), [u, o, S, d]), D = A(() => d.slice(d.indexOf(s)), [d, s]), {
3069
+ rect: y,
3070
+ node: w,
3071
+ isOver: N,
3072
+ setNodeRef: M
3073
+ } = En({
3074
+ id: s,
3075
+ data: R,
3076
+ disabled: b.droppable,
3077
+ resizeObserverConfig: {
3078
+ updateMeasurementsFor: D,
3079
+ ...l
3080
+ }
3081
+ }), {
3082
+ active: E,
3083
+ activatorEvent: Y,
3084
+ activeNodeRect: J,
3085
+ attributes: ee,
3086
+ setNodeRef: Ne,
3087
+ listeners: _e,
3088
+ isDragging: K,
3089
+ over: qe,
3090
+ setActivatorNodeRef: oe,
3091
+ transform: Oe
3092
+ } = uo({
3093
+ id: s,
3094
+ data: R,
3095
+ attributes: {
3096
+ ...Bo,
3097
+ ...n
3098
+ },
3099
+ disabled: b.draggable
3100
+ }), Ge = qn(M, Ne), j = !!E, ie = j && !x && tt(f) && tt(h), me = !p && K, Te = me && ie ? Oe : null, Je = ie ? Te ?? (a ?? m)({
3101
+ rects: v,
3102
+ activeNodeRect: J,
3103
+ activeIndex: f,
3104
+ overIndex: h,
3105
+ index: S
3106
+ }) : null, ce = tt(f) && tt(h) ? i({
3107
+ id: s,
3108
+ items: d,
3109
+ activeIndex: f,
3110
+ overIndex: h
3111
+ }) : S, se = E?.id, I = O({
3112
+ activeId: se,
3113
+ items: d,
3114
+ newIndex: ce,
3115
+ containerId: u
3116
+ }), Me = d !== I.current.items, te = t({
3117
+ active: E,
3118
+ containerId: u,
3119
+ isDragging: K,
3120
+ isSorting: j,
3121
+ id: s,
3122
+ index: S,
3123
+ items: d,
3124
+ newIndex: I.current.newIndex,
3125
+ previousItems: I.current.items,
3126
+ previousContainerId: I.current.containerId,
3127
+ transition: c,
3128
+ wasDragging: I.current.activeId != null
3129
+ }), ye = Fo({
3130
+ disabled: !te,
3131
+ index: S,
3132
+ node: w,
3133
+ rect: y
3134
+ });
3135
+ return T(() => {
3136
+ j && I.current.newIndex !== ce && (I.current.newIndex = ce), u !== I.current.containerId && (I.current.containerId = u), d !== I.current.items && (I.current.items = d);
3137
+ }, [j, ce, u, d]), T(() => {
3138
+ if (se === I.current.activeId)
3139
+ return;
3140
+ if (se != null && I.current.activeId == null) {
3141
+ I.current.activeId = se;
3142
+ return;
3143
+ }
3144
+ const we = setTimeout(() => {
3145
+ I.current.activeId = se;
3146
+ }, 50);
3147
+ return () => clearTimeout(we);
3148
+ }, [se]), {
3149
+ active: E,
3150
+ activeIndex: f,
3151
+ attributes: ee,
3152
+ data: R,
3153
+ rect: y,
3154
+ index: S,
3155
+ newIndex: ce,
3156
+ items: d,
3157
+ isOver: N,
3158
+ isSorting: j,
3159
+ isDragging: K,
3160
+ listeners: _e,
3161
+ node: w,
3162
+ overIndex: h,
3163
+ over: qe,
3164
+ setNodeRef: Ge,
3165
+ setActivatorNodeRef: oe,
3166
+ setDroppableNodeRef: M,
3167
+ setDraggableNodeRef: Ne,
3168
+ transform: ye ?? Je,
3169
+ transition: ae()
3170
+ };
3171
+ function ae() {
3172
+ if (
3173
+ // Temporarily disable transitions for a single frame to set up derived transforms
3174
+ ye || // Or to prevent items jumping to back to their "new" position when items change
3175
+ Me && I.current.newIndex === S
3176
+ )
3177
+ return zo;
3178
+ if (!(me && !ft(Y) || !c) && (j || te))
3179
+ return be.Transition.toString({
3180
+ ...c,
3181
+ property: Tn
3182
+ });
3183
+ }
3184
+ }
3185
+ function Xo(e, t) {
3186
+ var n, r;
3187
+ return typeof e == "boolean" ? {
3188
+ draggable: e,
3189
+ // Backwards compatibility
3190
+ droppable: !1
3191
+ } : {
3192
+ draggable: (n = e?.draggable) != null ? n : t.draggable,
3193
+ droppable: (r = e?.droppable) != null ? r : t.droppable
3194
+ };
3195
+ }
3196
+ function ct(e) {
3197
+ if (!e)
3198
+ return !1;
3199
+ const t = e.data.current;
3200
+ return !!(t && "sortable" in t && typeof t.sortable == "object" && "containerId" in t.sortable && "items" in t.sortable && "index" in t.sortable);
3201
+ }
3202
+ const jo = [C.Down, C.Right, C.Up, C.Left], Yo = (e, t) => {
3203
+ let {
3204
+ context: {
3205
+ active: n,
3206
+ collisionRect: r,
3207
+ droppableRects: o,
3208
+ droppableContainers: i,
3209
+ over: s,
3210
+ scrollableAncestors: a
3211
+ }
3212
+ } = t;
3213
+ if (jo.includes(e.code)) {
3214
+ if (e.preventDefault(), !n || !r)
3215
+ return;
3216
+ const l = [];
3217
+ i.getEnabled().forEach((u) => {
3218
+ if (!u || u != null && u.disabled)
3219
+ return;
3220
+ const f = o.get(u.id);
3221
+ if (f)
3222
+ switch (e.code) {
3223
+ case C.Down:
3224
+ r.top < f.top && l.push(u);
3225
+ break;
3226
+ case C.Up:
3227
+ r.top > f.top && l.push(u);
3228
+ break;
3229
+ case C.Left:
3230
+ r.left > f.left && l.push(u);
3231
+ break;
3232
+ case C.Right:
3233
+ r.left < f.left && l.push(u);
3234
+ break;
3235
+ }
3236
+ });
3237
+ const c = cn({
3238
+ collisionRect: r,
3239
+ droppableRects: o,
3240
+ droppableContainers: l
3241
+ });
3242
+ let d = ln(c, "id");
3243
+ if (d === s?.id && c.length > 1 && (d = c[1].id), d != null) {
3244
+ const u = i.get(n.id), f = i.get(d), g = f ? o.get(f.id) : null, x = f?.node.current;
3245
+ if (x && g && u && f) {
3246
+ const h = gt(x).some((D, y) => a[y] !== D), p = Mn(u, f), m = Ko(u, f), b = h || !p ? {
3247
+ x: 0,
3248
+ y: 0
3249
+ } : {
3250
+ x: m ? r.width - g.width : 0,
3251
+ y: m ? r.height - g.height : 0
3252
+ }, S = {
3253
+ x: g.left,
3254
+ y: g.top
3255
+ };
3256
+ return b.x && b.y ? S : je(S, b);
3257
+ }
3258
+ }
3259
+ }
3260
+ };
3261
+ function Mn(e, t) {
3262
+ return !ct(e) || !ct(t) ? !1 : e.data.current.sortable.containerId === t.data.current.sortable.containerId;
3263
+ }
3264
+ function Ko(e, t) {
3265
+ return !ct(e) || !ct(t) || !Mn(e, t) ? !1 : e.data.current.sortable.index < t.data.current.sortable.index;
3266
+ }
3267
+ const Jo = {}, Qo = {}, At = "column:";
3268
+ function Uo({ id: e, children: t }) {
3269
+ const { attributes: n, listeners: r, setNodeRef: o, transform: i, transition: s, isDragging: a } = $o({ id: e });
3270
+ return /* @__PURE__ */ q(
3271
+ "div",
3272
+ {
3273
+ ref: o,
3274
+ style: { transform: be.Transform.toString(i), transition: s },
3275
+ ...n,
3276
+ ...r,
3277
+ className: rn(
3278
+ "cursor-grab rounded-md bg-reki-base p-2 ring ring-reki-hairline",
3279
+ "active:cursor-grabbing",
3280
+ a && "opacity-50"
3281
+ ),
3282
+ children: t
3283
+ }
3284
+ );
3285
+ }
3286
+ function Wo({
3287
+ column: e,
3288
+ records: t,
3289
+ getRecordId: n,
3290
+ renderCard: r,
3291
+ renderColumnHeader: o
3292
+ }) {
3293
+ const { setNodeRef: i } = En({ id: `${At}${e.id}` }), s = t.map(n);
3294
+ return /* @__PURE__ */ St("section", { className: "flex w-72 shrink-0 flex-col gap-2", children: [
3295
+ /* @__PURE__ */ q("header", { className: "flex items-center gap-2 px-1 text-sm font-medium text-reki-default", children: o ? o(e, t.length) : /* @__PURE__ */ St(jn, { children: [
3296
+ e.color ? /* @__PURE__ */ q(_n, { colorName: e.color, variant: "circle" }) : null,
3297
+ /* @__PURE__ */ q("span", { className: "min-w-0 truncate", children: e.title }),
3298
+ /* @__PURE__ */ q("span", { className: "ml-auto text-xs text-reki-subtle tabular-nums", children: t.length })
3299
+ ] }) }),
3300
+ /* @__PURE__ */ q(Mo, { items: s, strategy: Oo, children: /* @__PURE__ */ q(
3301
+ "div",
3302
+ {
3303
+ ref: i,
3304
+ className: "flex min-h-16 flex-col gap-2 rounded-md bg-reki-recessed p-2",
3305
+ children: t.map((a) => /* @__PURE__ */ q(Uo, { id: n(a), children: r(a) }, n(a)))
3306
+ }
3307
+ ) })
3308
+ ] });
3309
+ }
3310
+ function Zo({
3311
+ columns: e,
3312
+ records: t,
3313
+ getRecordId: n,
3314
+ getColumnId: r,
3315
+ renderCard: o,
3316
+ onMove: i,
3317
+ renderColumnHeader: s,
3318
+ className: a
3319
+ }) {
3320
+ const [l, c] = F(null), d = cr(
3321
+ Ut(Lt, {
3322
+ activationConstraint: { distance: 4 }
3323
+ }),
3324
+ Ut(Tt, {
3325
+ coordinateGetter: Yo
3326
+ })
3327
+ ), u = A(() => {
3328
+ const h = /* @__PURE__ */ new Map();
3329
+ for (const p of e)
3330
+ h.set(p.id, []);
3331
+ for (const p of t) {
3332
+ const m = r(p), b = h.get(m);
3333
+ b && b.push(p);
3334
+ }
3335
+ return h;
3336
+ }, [e, t, r]), f = A(() => {
3337
+ const h = /* @__PURE__ */ new Map();
3338
+ for (const p of t)
3339
+ h.set(n(p), p);
3340
+ return h;
3341
+ }, [t, n]), g = (h) => {
3342
+ c(String(h.active.id));
3343
+ }, x = (h) => {
3344
+ c(null);
3345
+ const { active: p, over: m } = h;
3346
+ if (!m)
3347
+ return;
3348
+ const b = String(p.id), S = f.get(b);
3349
+ if (!S)
3350
+ return;
3351
+ const R = r(S), D = String(m.id);
3352
+ let y, w;
3353
+ if (D.startsWith(At))
3354
+ y = D.slice(At.length), w = u.get(y)?.length ?? 0;
3355
+ else {
3356
+ const N = f.get(D);
3357
+ if (!N)
3358
+ return;
3359
+ y = r(N);
3360
+ const M = u.get(y) ?? [], E = M.findIndex((Y) => n(Y) === D);
3361
+ w = E < 0 ? M.length : E;
3362
+ }
3363
+ D !== b && i?.({ recordId: b, fromColumnId: R, toColumnId: y, toIndex: w });
3364
+ }, v = l ? f.get(l) : void 0;
3365
+ return /* @__PURE__ */ St(
3366
+ ao,
3367
+ {
3368
+ sensors: d,
3369
+ collisionDetection: cn,
3370
+ onDragStart: g,
3371
+ onDragEnd: x,
3372
+ onDragCancel: () => c(null),
3373
+ children: [
3374
+ /* @__PURE__ */ q("div", { className: rn("flex h-full gap-3 overflow-x-auto p-1", a), children: e.map((h) => /* @__PURE__ */ q(
3375
+ Wo,
3376
+ {
3377
+ column: h,
3378
+ records: u.get(h.id) ?? [],
3379
+ getRecordId: n,
3380
+ renderCard: o,
3381
+ renderColumnHeader: s
3382
+ },
3383
+ h.id
3384
+ )) }),
3385
+ /* @__PURE__ */ q(Eo, { children: v ? /* @__PURE__ */ q("div", { className: "cursor-grabbing rounded-md bg-reki-base p-2 shadow-lg shadow-reki-tip-shadow ring ring-reki-hairline", children: o(v) }) : null })
3386
+ ]
3387
+ }
3388
+ );
3389
+ }
3390
+ export {
3391
+ Qo as R,
3392
+ Jo as a,
3393
+ Zo as b
3394
+ };
3395
+ //# sourceMappingURL=record-board-iapx3cw5rusehrta.js.map