@wrdagency/blockout 0.1.9 → 1.0.0

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