mada-design-system 0.4.0 → 0.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (836) hide show
  1. package/index.cjs.js +1 -1
  2. package/index.cjs10.js +1 -1
  3. package/index.cjs100.js +1 -1
  4. package/index.cjs101.js +1 -1
  5. package/index.cjs102.js +1 -1
  6. package/index.cjs103.js +1 -1
  7. package/index.cjs104.js +1 -1
  8. package/index.cjs105.js +1 -5
  9. package/index.cjs106.js +1 -1
  10. package/index.cjs107.js +1 -1
  11. package/index.cjs108.js +1 -1
  12. package/index.cjs109.js +1 -1
  13. package/index.cjs11.js +1 -1
  14. package/index.cjs110.js +1 -1
  15. package/index.cjs111.js +5 -1
  16. package/index.cjs112.js +1 -1
  17. package/index.cjs113.js +1 -1
  18. package/index.cjs114.js +1 -1
  19. package/index.cjs115.js +1 -1
  20. package/index.cjs116.js +1 -1
  21. package/index.cjs117.js +1 -1
  22. package/index.cjs118.js +1 -4
  23. package/index.cjs119.js +1 -1
  24. package/index.cjs12.js +1 -1
  25. package/index.cjs120.js +1 -2
  26. package/index.cjs121.js +1 -1
  27. package/index.cjs122.js +1 -2
  28. package/index.cjs123.js +1 -1
  29. package/index.cjs124.js +4 -1
  30. package/index.cjs125.js +1 -1
  31. package/index.cjs126.js +2 -1
  32. package/index.cjs127.js +1 -1
  33. package/index.cjs128.js +2 -1
  34. package/index.cjs129.js +1 -20
  35. package/index.cjs13.js +1 -1
  36. package/index.cjs130.js +1 -1
  37. package/index.cjs131.js +1 -1
  38. package/index.cjs132.js +1 -1
  39. package/index.cjs133.js +1 -1
  40. package/index.cjs134.js +1 -1
  41. package/index.cjs135.js +1 -1
  42. package/index.cjs136.js +1 -1
  43. package/index.cjs137.js +20 -1
  44. package/index.cjs138.js +1 -1
  45. package/index.cjs139.js +1 -1
  46. package/index.cjs140.js +1 -1
  47. package/index.cjs141.js +1 -1
  48. package/index.cjs142.js +1 -1
  49. package/index.cjs143.js +1 -1
  50. package/index.cjs144.js +1 -1
  51. package/index.cjs145.js +1 -1
  52. package/index.cjs146.js +1 -1
  53. package/index.cjs147.js +1 -1
  54. package/index.cjs148.js +1 -1
  55. package/index.cjs149.js +1 -1
  56. package/index.cjs15.js +1 -1
  57. package/index.cjs150.js +1 -1
  58. package/index.cjs151.js +1 -1
  59. package/index.cjs152.js +1 -1
  60. package/index.cjs153.js +1 -1
  61. package/index.cjs154.js +1 -1
  62. package/index.cjs155.js +1 -1
  63. package/index.cjs156.js +1 -1
  64. package/index.cjs157.js +1 -1
  65. package/index.cjs158.js +1 -1
  66. package/index.cjs159.js +1 -1
  67. package/index.cjs16.js +1 -1
  68. package/index.cjs160.js +1 -1
  69. package/index.cjs161.js +1 -1
  70. package/index.cjs162.js +1 -1
  71. package/index.cjs163.js +1 -1
  72. package/index.cjs164.js +1 -1
  73. package/index.cjs165.js +1 -1
  74. package/index.cjs166.js +1 -1
  75. package/index.cjs167.js +1 -1
  76. package/index.cjs168.js +1 -1
  77. package/index.cjs169.js +1 -1
  78. package/index.cjs17.js +1 -1
  79. package/index.cjs170.js +1 -1
  80. package/index.cjs171.js +1 -1
  81. package/index.cjs172.js +1 -1
  82. package/index.cjs173.js +1 -1
  83. package/index.cjs174.js +1 -1
  84. package/index.cjs175.js +1 -1
  85. package/index.cjs176.js +1 -1
  86. package/index.cjs177.js +1 -1
  87. package/index.cjs178.js +1 -1
  88. package/index.cjs179.js +1 -1
  89. package/index.cjs18.js +1 -1
  90. package/index.cjs180.js +1 -1
  91. package/index.cjs181.js +1 -1
  92. package/index.cjs182.js +1 -1
  93. package/index.cjs183.js +1 -1
  94. package/index.cjs185.js +1 -1
  95. package/index.cjs186.js +1 -1
  96. package/index.cjs187.js +1 -1
  97. package/index.cjs188.js +1 -1
  98. package/index.cjs189.js +1 -1
  99. package/index.cjs19.js +1 -1
  100. package/index.cjs190.js +1 -1
  101. package/index.cjs191.js +1 -1
  102. package/index.cjs192.js +1 -1
  103. package/index.cjs193.js +1 -4
  104. package/index.cjs194.js +1 -1
  105. package/index.cjs195.js +1 -1
  106. package/index.cjs196.js +1 -1
  107. package/index.cjs197.js +1 -1
  108. package/index.cjs198.js +1 -3
  109. package/index.cjs199.js +1 -1
  110. package/index.cjs20.js +1 -1
  111. package/index.cjs200.js +1 -1
  112. package/index.cjs201.js +4 -1
  113. package/index.cjs202.js +1 -1
  114. package/index.cjs203.js +1 -1
  115. package/index.cjs204.js +1 -1
  116. package/index.cjs205.js +1 -1
  117. package/index.cjs206.js +1 -1
  118. package/index.cjs207.js +1 -1
  119. package/index.cjs208.js +1 -1
  120. package/index.cjs209.js +3 -1
  121. package/index.cjs21.js +1 -1
  122. package/index.cjs210.js +1 -1
  123. package/index.cjs211.js +1 -1
  124. package/index.cjs212.js +1 -1
  125. package/index.cjs213.js +1 -1
  126. package/index.cjs214.js +1 -1
  127. package/index.cjs215.js +1 -1
  128. package/index.cjs216.js +1 -1
  129. package/index.cjs217.js +1 -1
  130. package/index.cjs218.js +1 -1
  131. package/index.cjs219.js +1 -1
  132. package/index.cjs22.js +1 -1
  133. package/index.cjs220.js +1 -1
  134. package/index.cjs221.js +1 -1
  135. package/index.cjs222.js +1 -1
  136. package/index.cjs223.js +1 -1
  137. package/index.cjs224.js +1 -1
  138. package/index.cjs225.js +1 -1
  139. package/index.cjs226.js +1 -1
  140. package/index.cjs227.js +1 -1
  141. package/index.cjs228.js +1 -1
  142. package/index.cjs229.js +1 -1
  143. package/index.cjs23.js +1 -1
  144. package/index.cjs230.js +1 -1
  145. package/index.cjs231.js +1 -1
  146. package/index.cjs232.js +1 -1
  147. package/index.cjs233.js +1 -1
  148. package/index.cjs234.js +1 -1
  149. package/index.cjs235.js +1 -1
  150. package/index.cjs236.js +1 -1
  151. package/index.cjs237.js +1 -1
  152. package/index.cjs238.js +1 -2
  153. package/index.cjs239.js +1 -1
  154. package/index.cjs24.js +1 -1
  155. package/index.cjs240.js +3 -1
  156. package/index.cjs241.js +1 -1
  157. package/index.cjs242.js +1 -1
  158. package/index.cjs243.js +1 -1
  159. package/index.cjs244.js +1 -1
  160. package/index.cjs245.js +1 -1
  161. package/index.cjs246.js +1 -1
  162. package/index.cjs247.js +1 -1
  163. package/index.cjs248.js +1 -1
  164. package/index.cjs249.js +1 -1
  165. package/index.cjs25.js +1 -1
  166. package/index.cjs250.js +1 -1
  167. package/index.cjs251.js +1 -1
  168. package/index.cjs252.js +1 -1
  169. package/index.cjs253.js +1 -1
  170. package/index.cjs254.js +1 -2
  171. package/index.cjs255.js +2 -1
  172. package/index.cjs256.js +1 -1
  173. package/index.cjs257.js +1 -1
  174. package/index.cjs258.js +1 -1
  175. package/index.cjs259.js +1 -1
  176. package/index.cjs26.js +1 -1
  177. package/index.cjs260.js +1 -1
  178. package/index.cjs261.js +1 -1
  179. package/index.cjs262.js +1 -1
  180. package/index.cjs263.js +1 -1
  181. package/index.cjs264.js +1 -1
  182. package/index.cjs265.js +1 -15
  183. package/index.cjs266.js +1 -1
  184. package/index.cjs267.js +1 -1
  185. package/index.cjs268.js +1 -1
  186. package/index.cjs269.js +1 -1
  187. package/index.cjs27.js +1 -1
  188. package/index.cjs270.js +1 -1
  189. package/index.cjs271.js +2 -1
  190. package/index.cjs272.js +1 -1
  191. package/index.cjs273.js +1 -1
  192. package/index.cjs274.js +1 -1
  193. package/index.cjs275.js +1 -1
  194. package/index.cjs276.js +1 -1
  195. package/index.cjs277.js +1 -1
  196. package/index.cjs278.js +1 -1
  197. package/index.cjs279.js +1 -1
  198. package/index.cjs28.js +1 -1
  199. package/index.cjs280.js +1 -1
  200. package/index.cjs281.js +1 -1
  201. package/index.cjs282.js +1 -1
  202. package/index.cjs283.js +1 -1
  203. package/index.cjs284.js +1 -1
  204. package/index.cjs285.js +1 -1
  205. package/index.cjs286.js +15 -1
  206. package/index.cjs287.js +1 -1
  207. package/index.cjs288.js +1 -1
  208. package/index.cjs289.js +1 -1
  209. package/index.cjs29.js +1 -1
  210. package/index.cjs290.js +1 -1
  211. package/index.cjs291.js +1 -1
  212. package/index.cjs292.js +1 -1
  213. package/index.cjs293.js +1 -1
  214. package/index.cjs294.js +1 -3
  215. package/index.cjs295.js +1 -1
  216. package/index.cjs296.js +1 -1
  217. package/index.cjs297.js +1 -1
  218. package/index.cjs298.js +1 -1
  219. package/index.cjs299.js +1 -1
  220. package/index.cjs3.js +1 -1
  221. package/index.cjs30.js +1 -1
  222. package/index.cjs300.js +1 -1
  223. package/index.cjs301.js +1 -1
  224. package/index.cjs302.js +1 -1
  225. package/index.cjs303.js +1 -1
  226. package/index.cjs304.js +1 -1
  227. package/index.cjs305.js +1 -1
  228. package/index.cjs306.js +1 -1
  229. package/index.cjs307.js +1 -1
  230. package/index.cjs308.js +1 -1
  231. package/index.cjs309.js +1 -1
  232. package/index.cjs31.js +1 -1
  233. package/index.cjs310.js +1 -1
  234. package/index.cjs311.js +1 -1
  235. package/index.cjs312.js +1 -1
  236. package/index.cjs313.js +1 -1
  237. package/index.cjs314.js +1 -1
  238. package/index.cjs315.js +1 -1
  239. package/index.cjs316.js +1 -1
  240. package/index.cjs317.js +1 -1
  241. package/index.cjs318.js +1 -1
  242. package/index.cjs319.js +1 -1
  243. package/index.cjs32.js +1 -1
  244. package/index.cjs320.js +1 -1
  245. package/index.cjs321.js +1 -1
  246. package/index.cjs322.js +1 -1
  247. package/index.cjs323.js +1 -1
  248. package/index.cjs324.js +1 -1
  249. package/index.cjs325.js +1 -1
  250. package/index.cjs327.js +1 -1
  251. package/index.cjs329.js +1 -1
  252. package/index.cjs33.js +1 -1
  253. package/index.cjs330.js +1 -1
  254. package/index.cjs334.js +1 -1
  255. package/index.cjs339.js +1 -1
  256. package/index.cjs34.js +1 -1
  257. package/index.cjs340.js +1 -1
  258. package/index.cjs341.js +1 -1
  259. package/index.cjs342.js +1 -1
  260. package/index.cjs343.js +1 -1
  261. package/index.cjs344.js +1 -1
  262. package/index.cjs345.js +1 -1
  263. package/index.cjs346.js +1 -1
  264. package/index.cjs347.js +1 -1
  265. package/index.cjs348.js +1 -1
  266. package/index.cjs349.js +1 -1
  267. package/index.cjs35.js +1 -1
  268. package/index.cjs350.js +1 -1
  269. package/index.cjs351.js +1 -1
  270. package/index.cjs352.js +1 -1
  271. package/index.cjs353.js +1 -1
  272. package/index.cjs354.js +1 -1
  273. package/index.cjs355.js +1 -1
  274. package/index.cjs356.js +1 -1
  275. package/index.cjs357.js +1 -1
  276. package/index.cjs358.js +1 -1
  277. package/index.cjs359.js +1 -1
  278. package/index.cjs36.js +1 -5
  279. package/index.cjs360.js +1 -1
  280. package/index.cjs361.js +1 -1
  281. package/index.cjs362.js +1 -1
  282. package/index.cjs363.js +1 -1
  283. package/index.cjs364.js +1 -1
  284. package/index.cjs365.js +1 -1
  285. package/index.cjs366.js +1 -1
  286. package/index.cjs367.js +1 -1
  287. package/index.cjs368.js +1 -1
  288. package/index.cjs369.js +1 -1
  289. package/index.cjs37.js +5 -1
  290. package/index.cjs370.js +1 -1
  291. package/index.cjs371.js +1 -1
  292. package/index.cjs372.js +1 -1
  293. package/index.cjs373.js +1 -2
  294. package/index.cjs374.js +1 -1
  295. package/index.cjs375.js +1 -1
  296. package/index.cjs376.js +1 -1
  297. package/index.cjs377.js +1 -1
  298. package/index.cjs378.js +1 -1
  299. package/index.cjs379.js +1 -1
  300. package/index.cjs38.js +1 -1
  301. package/index.cjs380.js +1 -1
  302. package/index.cjs381.js +1 -1
  303. package/index.cjs382.js +1 -1
  304. package/index.cjs383.js +1 -74
  305. package/index.cjs384.js +1 -1
  306. package/index.cjs385.js +1 -1
  307. package/index.cjs386.js +1 -1
  308. package/index.cjs387.js +1 -1
  309. package/index.cjs388.js +1 -1
  310. package/index.cjs389.js +1 -1
  311. package/index.cjs39.js +1 -1
  312. package/index.cjs390.js +1 -1
  313. package/index.cjs391.js +1 -1
  314. package/index.cjs392.js +2 -1
  315. package/index.cjs393.js +1 -1
  316. package/index.cjs394.js +1 -1
  317. package/index.cjs395.js +1 -1
  318. package/index.cjs396.js +1 -1
  319. package/index.cjs397.js +1 -1
  320. package/index.cjs398.js +1 -1
  321. package/index.cjs399.js +1 -1
  322. package/index.cjs4.js +1 -1
  323. package/index.cjs40.js +1 -1
  324. package/index.cjs400.js +1 -1
  325. package/index.cjs401.js +1 -1
  326. package/index.cjs402.js +1 -1
  327. package/index.cjs403.js +1 -1
  328. package/index.cjs404.js +1 -1
  329. package/index.cjs405.js +74 -1
  330. package/index.cjs406.js +1 -1
  331. package/index.cjs407.js +1 -1
  332. package/index.cjs408.js +1 -0
  333. package/index.cjs409.js +1 -0
  334. package/index.cjs41.js +1 -1
  335. package/index.cjs410.js +1 -0
  336. package/index.cjs411.js +1 -0
  337. package/index.cjs412.js +1 -0
  338. package/index.cjs413.js +1 -0
  339. package/index.cjs414.js +1 -0
  340. package/index.cjs415.js +1 -0
  341. package/index.cjs416.js +1 -0
  342. package/index.cjs417.js +1 -0
  343. package/index.cjs418.js +1 -0
  344. package/index.cjs419.js +1 -0
  345. package/index.cjs42.js +1 -6
  346. package/index.cjs420.js +1 -0
  347. package/index.cjs421.js +1 -0
  348. package/index.cjs422.js +1 -0
  349. package/index.cjs423.js +1 -0
  350. package/index.cjs424.js +1 -0
  351. package/index.cjs425.js +1 -0
  352. package/index.cjs426.js +1 -0
  353. package/index.cjs427.js +1 -0
  354. package/index.cjs428.js +1 -0
  355. package/index.cjs429.js +1 -0
  356. package/index.cjs43.js +6 -1
  357. package/index.cjs430.js +1 -0
  358. package/index.cjs44.js +1 -1
  359. package/index.cjs45.js +1 -1
  360. package/index.cjs46.js +1 -1
  361. package/index.cjs47.js +1 -9
  362. package/index.cjs48.js +9 -1
  363. package/index.cjs49.js +1 -7
  364. package/index.cjs50.js +7 -1
  365. package/index.cjs51.js +1 -1
  366. package/index.cjs52.js +1 -1
  367. package/index.cjs53.js +1 -1
  368. package/index.cjs54.js +1 -1
  369. package/index.cjs55.js +1 -1
  370. package/index.cjs56.js +1 -1
  371. package/index.cjs57.js +1 -3
  372. package/index.cjs58.js +3 -1
  373. package/index.cjs59.js +1 -1
  374. package/index.cjs60.js +1 -7
  375. package/index.cjs61.js +7 -1
  376. package/index.cjs62.js +1 -1
  377. package/index.cjs63.js +1 -6
  378. package/index.cjs64.js +6 -1
  379. package/index.cjs65.js +1 -1
  380. package/index.cjs66.js +1 -1
  381. package/index.cjs67.js +1 -1
  382. package/index.cjs68.js +1 -1
  383. package/index.cjs69.js +1 -11
  384. package/index.cjs7.js +1 -1
  385. package/index.cjs70.js +11 -1
  386. package/index.cjs71.js +1 -1
  387. package/index.cjs72.js +1 -5
  388. package/index.cjs73.js +5 -11
  389. package/index.cjs74.js +11 -1
  390. package/index.cjs75.js +1 -33
  391. package/index.cjs76.js +33 -1
  392. package/index.cjs77.js +1 -1
  393. package/index.cjs78.js +1 -1
  394. package/index.cjs79.js +1 -1
  395. package/index.cjs8.js +1 -1
  396. package/index.cjs80.js +1 -1
  397. package/index.cjs81.js +1 -1
  398. package/index.cjs82.js +1 -1
  399. package/index.cjs83.js +1 -1
  400. package/index.cjs84.js +1 -1
  401. package/index.cjs85.js +1 -1
  402. package/index.cjs86.js +1 -1
  403. package/index.cjs87.js +1 -1
  404. package/index.cjs88.js +1 -1
  405. package/index.cjs89.js +1 -1
  406. package/index.cjs9.js +1 -1
  407. package/index.cjs90.js +1 -1
  408. package/index.cjs91.js +1 -1
  409. package/index.cjs92.js +1 -1
  410. package/index.cjs93.js +1 -1
  411. package/index.cjs94.js +1 -1
  412. package/index.cjs95.js +1 -1
  413. package/index.cjs96.js +1 -1
  414. package/index.cjs97.js +1 -1
  415. package/index.cjs98.js +1 -1
  416. package/index.cjs99.js +1 -1
  417. package/index.es.d.ts +15 -3
  418. package/index.es.js +316 -314
  419. package/index.es10.js +7 -7
  420. package/index.es100.js +469 -86
  421. package/index.es101.js +21 -20
  422. package/index.es102.js +137 -22
  423. package/index.es103.js +6 -1709
  424. package/index.es104.js +3 -35
  425. package/index.es105.js +11 -2596
  426. package/index.es106.js +80 -314
  427. package/index.es107.js +21 -11
  428. package/index.es108.js +24 -11
  429. package/index.es109.js +1713 -11
  430. package/index.es11.js +2 -2
  431. package/index.es110.js +35 -8
  432. package/index.es111.js +2590 -27
  433. package/index.es112.js +321 -37
  434. package/index.es113.js +4 -4
  435. package/index.es114.js +5 -5
  436. package/index.es115.js +5 -5
  437. package/index.es116.js +7 -10
  438. package/index.es117.js +32 -10
  439. package/index.es118.js +37 -2568
  440. package/index.es119.js +12 -142
  441. package/index.es12.js +7 -7
  442. package/index.es120.js +11 -117
  443. package/index.es121.js +11 -137
  444. package/index.es122.js +11 -223
  445. package/index.es123.js +11 -516
  446. package/index.es124.js +2567 -9
  447. package/index.es125.js +142 -12
  448. package/index.es126.js +117 -11
  449. package/index.es127.js +137 -11
  450. package/index.es128.js +223 -11
  451. package/index.es129.js +513 -202
  452. package/index.es13.js +4 -4
  453. package/index.es130.js +4 -4
  454. package/index.es131.js +10 -4
  455. package/index.es132.js +5 -5
  456. package/index.es133.js +378 -10
  457. package/index.es134.js +5 -5
  458. package/index.es135.js +5 -5
  459. package/index.es136.js +5 -5
  460. package/index.es137.js +205 -11
  461. package/index.es138.js +5 -5
  462. package/index.es139.js +5 -2
  463. package/index.es140.js +10 -1
  464. package/index.es141.js +11 -2
  465. package/index.es142.js +11 -2
  466. package/index.es143.js +11 -2
  467. package/index.es144.js +11 -2
  468. package/index.es145.js +5 -5
  469. package/index.es146.js +5 -5
  470. package/index.es147.js +2 -11
  471. package/index.es148.js +2 -11
  472. package/index.es149.js +2 -3
  473. package/index.es15.js +9 -9
  474. package/index.es150.js +2 -11
  475. package/index.es151.js +2 -11
  476. package/index.es152.js +2 -11
  477. package/index.es153.js +5 -5
  478. package/index.es154.js +5 -5
  479. package/index.es155.js +11 -2
  480. package/index.es156.js +11 -2
  481. package/index.es157.js +5 -5
  482. package/index.es158.js +5 -5
  483. package/index.es159.js +5 -5
  484. package/index.es16.js +1 -1
  485. package/index.es160.js +5 -5
  486. package/index.es161.js +2 -11
  487. package/index.es162.js +2 -22
  488. package/index.es163.js +5 -5
  489. package/index.es164.js +11 -22
  490. package/index.es165.js +5 -5
  491. package/index.es166.js +5 -5
  492. package/index.es167.js +11 -12
  493. package/index.es168.js +22 -11
  494. package/index.es169.js +5 -5
  495. package/index.es17.js +2 -2
  496. package/index.es170.js +5 -5
  497. package/index.es171.js +5 -5
  498. package/index.es172.js +10 -469
  499. package/index.es173.js +10 -138
  500. package/index.es174.js +11 -6
  501. package/index.es175.js +11 -2338
  502. package/index.es176.js +11 -2152
  503. package/index.es177.js +2338 -11
  504. package/index.es178.js +2154 -3
  505. package/index.es179.js +10 -479
  506. package/index.es18.js +1 -1
  507. package/index.es180.js +13 -232
  508. package/index.es181.js +8 -54
  509. package/index.es182.js +3 -33
  510. package/index.es183.js +479 -11
  511. package/index.es185.js +2 -39
  512. package/index.es186.js +57 -17
  513. package/index.es187.js +56 -34
  514. package/index.es188.js +30 -1223
  515. package/index.es189.js +12 -14
  516. package/index.es19.js +1 -1
  517. package/index.es190.js +233 -8
  518. package/index.es191.js +51 -47
  519. package/index.es192.js +39 -2
  520. package/index.es193.js +2 -2261
  521. package/index.es194.js +7 -10
  522. package/index.es195.js +2 -13
  523. package/index.es196.js +18 -13
  524. package/index.es197.js +34 -105
  525. package/index.es198.js +1223 -24
  526. package/index.es199.js +49 -50
  527. package/index.es20.js +2 -2
  528. package/index.es200.js +2 -371
  529. package/index.es201.js +2260 -61
  530. package/index.es202.js +2 -48
  531. package/index.es203.js +45 -6
  532. package/index.es204.js +52 -5
  533. package/index.es205.js +11 -47
  534. package/index.es206.js +13 -22
  535. package/index.es207.js +13 -6
  536. package/index.es208.js +106 -10
  537. package/index.es209.js +25 -11
  538. package/index.es21.js +6 -6
  539. package/index.es210.js +50 -16
  540. package/index.es211.js +358 -217
  541. package/index.es212.js +61 -24
  542. package/index.es213.js +48 -12
  543. package/index.es214.js +6 -279
  544. package/index.es215.js +5 -262
  545. package/index.es216.js +47 -17
  546. package/index.es217.js +22 -15
  547. package/index.es218.js +7 -21
  548. package/index.es219.js +10 -8
  549. package/index.es22.js +3 -3
  550. package/index.es220.js +11 -5
  551. package/index.es221.js +17 -5
  552. package/index.es222.js +230 -5
  553. package/index.es223.js +25 -2
  554. package/index.es224.js +11 -57
  555. package/index.es225.js +278 -56
  556. package/index.es226.js +261 -3
  557. package/index.es227.js +17 -2
  558. package/index.es228.js +14 -12
  559. package/index.es229.js +20 -24
  560. package/index.es23.js +16 -8
  561. package/index.es230.js +7 -10
  562. package/index.es231.js +5 -39
  563. package/index.es232.js +5 -2000
  564. package/index.es233.js +5 -7
  565. package/index.es234.js +3 -72
  566. package/index.es235.js +6 -24
  567. package/index.es236.js +28 -2
  568. package/index.es237.js +160 -7
  569. package/index.es238.js +237 -326
  570. package/index.es239.js +9 -50
  571. package/index.es24.js +1 -1
  572. package/index.es240.js +95 -30
  573. package/index.es241.js +4 -34
  574. package/index.es242.js +2 -53
  575. package/index.es243.js +13 -119
  576. package/index.es244.js +24 -8
  577. package/index.es245.js +11 -163
  578. package/index.es246.js +38 -309
  579. package/index.es247.js +1992 -119
  580. package/index.es248.js +6 -179
  581. package/index.es249.js +71 -25
  582. package/index.es25.js +2 -2
  583. package/index.es250.js +22 -59
  584. package/index.es251.js +2 -5
  585. package/index.es252.js +2 -36
  586. package/index.es253.js +2 -26
  587. package/index.es254.js +8 -186
  588. package/index.es255.js +327 -138
  589. package/index.es256.js +51 -2
  590. package/index.es257.js +30 -8
  591. package/index.es258.js +34 -2
  592. package/index.es259.js +53 -98
  593. package/index.es26.js +1 -1
  594. package/index.es260.js +116 -23
  595. package/index.es261.js +8 -38
  596. package/index.es262.js +163 -2
  597. package/index.es263.js +308 -58
  598. package/index.es264.js +125 -15
  599. package/index.es265.js +178 -242
  600. package/index.es266.js +25 -73
  601. package/index.es267.js +61 -4
  602. package/index.es268.js +5 -58
  603. package/index.es269.js +36 -11
  604. package/index.es27.js +5 -5
  605. package/index.es270.js +25 -6
  606. package/index.es271.js +185 -35
  607. package/index.es272.js +138 -27
  608. package/index.es273.js +97 -290
  609. package/index.es274.js +23 -88
  610. package/index.es275.js +39 -3
  611. package/index.es276.js +2 -8
  612. package/index.es277.js +68 -15
  613. package/index.es278.js +83 -145
  614. package/index.es279.js +48 -2
  615. package/index.es28.js +1 -1
  616. package/index.es280.js +8 -68
  617. package/index.es281.js +4 -84
  618. package/index.es282.js +47 -43
  619. package/index.es283.js +2 -9
  620. package/index.es284.js +59 -4
  621. package/index.es285.js +14 -49
  622. package/index.es286.js +242 -36
  623. package/index.es287.js +74 -3
  624. package/index.es288.js +5 -11
  625. package/index.es289.js +57 -119
  626. package/index.es29.js +6 -6
  627. package/index.es290.js +11 -7
  628. package/index.es291.js +6 -7
  629. package/index.es292.js +35 -7
  630. package/index.es293.js +27 -351
  631. package/index.es294.js +291 -95
  632. package/index.es295.js +89 -8
  633. package/index.es296.js +3 -3
  634. package/index.es297.js +8 -206
  635. package/index.es298.js +16 -116
  636. package/index.es299.js +146 -6
  637. package/index.es3.js +1 -1
  638. package/index.es30.js +36 -97
  639. package/index.es300.js +38 -8
  640. package/index.es301.js +10 -15
  641. package/index.es302.js +8 -2
  642. package/index.es303.js +348 -42
  643. package/index.es304.js +3 -52
  644. package/index.es305.js +206 -6
  645. package/index.es306.js +119 -23
  646. package/index.es307.js +6 -20
  647. package/index.es308.js +7 -31
  648. package/index.es309.js +116 -6
  649. package/index.es31.js +90 -115
  650. package/index.es310.js +7 -3
  651. package/index.es311.js +7 -6
  652. package/index.es312.js +15 -3
  653. package/index.es313.js +15 -19
  654. package/index.es314.js +5 -67
  655. package/index.es315.js +7 -15
  656. package/index.es316.js +3 -15
  657. package/index.es317.js +3 -4
  658. package/index.es318.js +3 -5
  659. package/index.es319.js +6 -17
  660. package/index.es32.js +117 -65
  661. package/index.es320.js +5 -17
  662. package/index.es321.js +4 -17
  663. package/index.es322.js +117 -17
  664. package/index.es323.js +3 -16
  665. package/index.es324.js +2 -17
  666. package/index.es325.js +2 -17
  667. package/index.es327.js +1 -1
  668. package/index.es329.js +1 -1
  669. package/index.es33.js +69 -53
  670. package/index.es330.js +1 -1
  671. package/index.es334.js +1 -1
  672. package/index.es339.js +6 -58
  673. package/index.es34.js +53 -70
  674. package/index.es340.js +31 -12
  675. package/index.es341.js +59 -4
  676. package/index.es342.js +12 -9
  677. package/index.es343.js +4 -55
  678. package/index.es344.js +10 -2
  679. package/index.es345.js +55 -2
  680. package/index.es346.js +3 -15
  681. package/index.es347.js +5 -336
  682. package/index.es348.js +17 -5
  683. package/index.es349.js +17 -5
  684. package/index.es35.js +69 -1208
  685. package/index.es350.js +17 -7
  686. package/index.es351.js +17 -19
  687. package/index.es352.js +17 -4
  688. package/index.es353.js +17 -6
  689. package/index.es354.js +17 -3
  690. package/index.es355.js +5 -71
  691. package/index.es356.js +24 -4
  692. package/index.es357.js +20 -6
  693. package/index.es358.js +6 -30
  694. package/index.es359.js +3 -10
  695. package/index.es36.js +1203 -55
  696. package/index.es360.js +18 -7
  697. package/index.es361.js +66 -6
  698. package/index.es362.js +16 -2
  699. package/index.es363.js +5 -2
  700. package/index.es364.js +4 -10
  701. package/index.es365.js +6 -3
  702. package/index.es366.js +335 -8
  703. package/index.es367.js +19 -4
  704. package/index.es368.js +4 -46
  705. package/index.es369.js +4 -23
  706. package/index.es37.js +55 -43
  707. package/index.es370.js +3 -2
  708. package/index.es371.js +69 -64
  709. package/index.es372.js +4 -66
  710. package/index.es373.js +15 -77
  711. package/index.es374.js +6 -258
  712. package/index.es375.js +29 -31
  713. package/index.es376.js +8 -6
  714. package/index.es377.js +9 -131
  715. package/index.es378.js +9 -17
  716. package/index.es379.js +2 -7
  717. package/index.es38.js +50 -17
  718. package/index.es380.js +2 -6
  719. package/index.es381.js +2 -2
  720. package/index.es382.js +70 -3
  721. package/index.es383.js +92 -251
  722. package/index.es384.js +2 -8
  723. package/index.es385.js +2 -3
  724. package/index.es386.js +9 -2
  725. package/index.es387.js +10 -1
  726. package/index.es388.js +4 -174
  727. package/index.es389.js +4 -2
  728. package/index.es39.js +13 -240
  729. package/index.es390.js +46 -2
  730. package/index.es391.js +25 -2
  731. package/index.es392.js +78 -2
  732. package/index.es393.js +258 -7
  733. package/index.es394.js +31 -6
  734. package/index.es395.js +6 -20
  735. package/index.es396.js +132 -51
  736. package/index.es397.js +17 -251
  737. package/index.es398.js +6 -42
  738. package/index.es399.js +2 -16
  739. package/index.es4.js +6 -6
  740. package/index.es40.js +245 -18
  741. package/index.es400.js +67 -10
  742. package/index.es401.js +65 -47
  743. package/index.es402.js +5 -25
  744. package/index.es403.js +3 -128
  745. package/index.es404.js +2 -112
  746. package/index.es405.js +242 -64
  747. package/index.es406.js +7 -8
  748. package/index.es407.js +3 -7
  749. package/index.es408.js +176 -0
  750. package/index.es409.js +4 -0
  751. package/index.es41.js +18 -116
  752. package/index.es410.js +4 -0
  753. package/index.es411.js +4 -0
  754. package/index.es412.js +4 -0
  755. package/index.es413.js +9 -0
  756. package/index.es414.js +10 -0
  757. package/index.es415.js +9 -0
  758. package/index.es416.js +22 -0
  759. package/index.es417.js +53 -0
  760. package/index.es418.js +251 -0
  761. package/index.es419.js +45 -0
  762. package/index.es42.js +109 -283
  763. package/index.es420.js +18 -0
  764. package/index.es421.js +12 -0
  765. package/index.es422.js +50 -0
  766. package/index.es423.js +28 -0
  767. package/index.es424.js +131 -0
  768. package/index.es425.js +114 -0
  769. package/index.es426.js +4 -0
  770. package/index.es427.js +4 -0
  771. package/index.es428.js +75 -0
  772. package/index.es429.js +11 -0
  773. package/index.es43.js +289 -13
  774. package/index.es430.js +9 -0
  775. package/index.es44.js +13 -306
  776. package/index.es45.js +297 -208
  777. package/index.es46.js +207 -139
  778. package/index.es47.js +141 -81
  779. package/index.es48.js +82 -166
  780. package/index.es49.js +167 -201
  781. package/index.es50.js +201 -43
  782. package/index.es51.js +48 -79
  783. package/index.es52.js +79 -41
  784. package/index.es53.js +40 -36
  785. package/index.es54.js +36 -57
  786. package/index.es55.js +54 -80
  787. package/index.es56.js +80 -261
  788. package/index.es57.js +264 -30
  789. package/index.es58.js +29 -19
  790. package/index.es59.js +22 -37
  791. package/index.es60.js +37 -52
  792. package/index.es61.js +51 -26
  793. package/index.es62.js +27 -71
  794. package/index.es63.js +67 -137
  795. package/index.es64.js +138 -14
  796. package/index.es65.js +14 -130
  797. package/index.es66.js +111 -400
  798. package/index.es67.js +422 -5
  799. package/index.es68.js +6 -12
  800. package/index.es69.js +11 -37
  801. package/index.es7.js +8 -8
  802. package/index.es70.js +33 -45
  803. package/index.es71.js +42 -124
  804. package/index.es72.js +122 -65
  805. package/index.es73.js +63 -89
  806. package/index.es74.js +101 -35
  807. package/index.es75.js +35 -75
  808. package/index.es76.js +74 -36
  809. package/index.es77.js +36 -20
  810. package/index.es78.js +20 -92
  811. package/index.es79.js +90 -19
  812. package/index.es8.js +2 -2
  813. package/index.es80.js +22 -8
  814. package/index.es81.js +7 -79
  815. package/index.es82.js +79 -6
  816. package/index.es83.js +7 -4
  817. package/index.es84.js +4 -79
  818. package/index.es85.js +79 -32
  819. package/index.es86.js +28 -44
  820. package/index.es87.js +48 -8
  821. package/index.es88.js +8 -16
  822. package/index.es89.js +16 -45
  823. package/index.es9.js +10 -10
  824. package/index.es90.js +45 -4
  825. package/index.es91.js +4 -115
  826. package/index.es92.js +114 -4
  827. package/index.es93.js +5 -7
  828. package/index.es94.js +7 -29
  829. package/index.es95.js +29 -28
  830. package/index.es96.js +28 -11
  831. package/index.es97.js +11 -126
  832. package/index.es98.js +110 -110
  833. package/index.es99.js +126 -11
  834. package/package.json +1 -3
  835. package/style.css +1 -1
  836. package/dist +0 -10
package/index.es105.js CHANGED
@@ -1,2598 +1,13 @@
1
- import M, { createContext as Ne, useMemo as A, memo as yn, useReducer as mn, useState as K, useRef as P, useCallback as U, useEffect as O, useContext as de, cloneElement as wn, forwardRef as Dn } from "react";
2
- import { unstable_batchedUpdates as Be, createPortal as xn } from "react-dom";
3
- import { getWindow as J, useLatestValue as Ae, useUniqueId as Ue, getEventCoordinates as $e, add as ye, useIsomorphicLayoutEffect as fe, getOwnerDocument as me, useInterval as Cn, usePrevious as Ke, useLazyMemo as Me, subtract as Xe, canUseDOM as at, isHTMLElement as He, useNodeRef as je, isKeyboardEvent as lt, findFirstFocusableNode as Sn, CSS as rt, useEvent as ct, isWindow as ut, isNode as Rn, isDocument as Yt, isSVGElement as En } from "./index.es180.js";
4
- import { useAnnouncement as An, HiddenText as On, LiveRegion as Nn } from "./index.es181.js";
5
- const Ut = /* @__PURE__ */ Ne(null);
6
- function Mn(e) {
7
- const t = de(Ut);
8
- O(() => {
9
- if (!t)
10
- throw new Error("useDndMonitor must be used within a children of <DndContext>");
11
- return t(e);
12
- }, [e, t]);
13
- }
14
- function Tn() {
15
- const [e] = K(() => /* @__PURE__ */ new Set()), t = U((r) => (e.add(r), () => e.delete(r)), [e]);
16
- return [U((r) => {
17
- let {
18
- type: i,
19
- event: o
20
- } = r;
21
- e.forEach((a) => {
22
- var s;
23
- return (s = a[i]) == null ? void 0 : s.call(a, o);
24
- });
25
- }, [e]), t];
26
- }
27
- const Ln = {
28
- draggable: `
29
- To pick up a draggable item, press the space bar.
30
- While dragging, use the arrow keys to move the item.
31
- Press space again to drop the item in its new position, or press escape to cancel.
32
- `
33
- }, kn = {
34
- onDragStart(e) {
35
- let {
36
- active: t
37
- } = e;
38
- return "Picked up draggable item " + t.id + ".";
39
- },
40
- onDragOver(e) {
41
- let {
42
- active: t,
43
- over: n
44
- } = e;
45
- return n ? "Draggable item " + t.id + " was moved over droppable area " + n.id + "." : "Draggable item " + t.id + " is no longer over a droppable area.";
46
- },
47
- onDragEnd(e) {
48
- let {
49
- active: t,
50
- over: n
51
- } = e;
52
- return n ? "Draggable item " + t.id + " was dropped over droppable area " + n.id : "Draggable item " + t.id + " was dropped.";
53
- },
54
- onDragCancel(e) {
55
- let {
56
- active: t
57
- } = e;
58
- return "Dragging was cancelled. Draggable item " + t.id + " was dropped.";
59
- }
60
- };
61
- function In(e) {
62
- let {
63
- announcements: t = kn,
64
- container: n,
65
- hiddenTextDescribedById: r,
66
- screenReaderInstructions: i = Ln
67
- } = e;
68
- const {
69
- announce: o,
70
- announcement: a
71
- } = An(), s = Ue("DndLiveRegion"), [l, c] = K(!1);
72
- if (O(() => {
73
- c(!0);
74
- }, []), Mn(A(() => ({
75
- onDragStart(u) {
76
- let {
77
- active: g
78
- } = u;
79
- o(t.onDragStart({
80
- active: g
81
- }));
82
- },
83
- onDragMove(u) {
84
- let {
85
- active: g,
86
- over: f
87
- } = u;
88
- t.onDragMove && o(t.onDragMove({
89
- active: g,
90
- over: f
91
- }));
92
- },
93
- onDragOver(u) {
94
- let {
95
- active: g,
96
- over: f
97
- } = u;
98
- o(t.onDragOver({
99
- active: g,
100
- over: f
101
- }));
102
- },
103
- onDragEnd(u) {
104
- let {
105
- active: g,
106
- over: f
107
- } = u;
108
- o(t.onDragEnd({
109
- active: g,
110
- over: f
111
- }));
112
- },
113
- onDragCancel(u) {
114
- let {
115
- active: g,
116
- over: f
117
- } = u;
118
- o(t.onDragCancel({
119
- active: g,
120
- over: f
121
- }));
122
- }
123
- }), [o, t])), !l)
124
- return null;
125
- const d = M.createElement(M.Fragment, null, M.createElement(On, {
126
- id: r,
127
- value: i.draggable
128
- }), M.createElement(Nn, {
129
- id: s,
130
- announcement: a
131
- }));
132
- return n ? xn(d, n) : d;
133
- }
134
- var N;
135
- (function(e) {
136
- e.DragStart = "dragStart", e.DragMove = "dragMove", e.DragEnd = "dragEnd", e.DragCancel = "dragCancel", e.DragOver = "dragOver", e.RegisterDroppable = "registerDroppable", e.SetDroppableDisabled = "setDroppableDisabled", e.UnregisterDroppable = "unregisterDroppable";
137
- })(N || (N = {}));
138
- function We() {
139
- }
140
- function eo(e, t) {
141
- return A(
142
- () => ({
143
- sensor: e,
144
- options: t ?? {}
145
- }),
146
- // eslint-disable-next-line react-hooks/exhaustive-deps
147
- [e, t]
148
- );
149
- }
150
- function to() {
151
- for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++)
152
- t[n] = arguments[n];
153
- return A(
154
- () => [...t].filter((r) => r != null),
155
- // eslint-disable-next-line react-hooks/exhaustive-deps
156
- [...t]
157
- );
158
- }
159
- const H = /* @__PURE__ */ Object.freeze({
160
- x: 0,
161
- y: 0
162
- });
163
- function Pn(e, t) {
164
- return Math.sqrt(Math.pow(e.x - t.x, 2) + Math.pow(e.y - t.y, 2));
165
- }
166
- function zn(e, t) {
167
- const n = $e(e);
168
- if (!n)
169
- return "0 0";
170
- const r = {
171
- x: (n.x - t.left) / t.width * 100,
172
- y: (n.y - t.top) / t.height * 100
173
- };
174
- return r.x + "% " + r.y + "%";
175
- }
176
- function Bn(e, t) {
177
- let {
178
- data: {
179
- value: n
180
- }
181
- } = e, {
182
- data: {
183
- value: r
184
- }
185
- } = t;
186
- return n - r;
187
- }
188
- function Fn(e, t) {
189
- let {
190
- data: {
191
- value: n
192
- }
193
- } = e, {
194
- data: {
195
- value: r
196
- }
197
- } = t;
198
- return r - n;
199
- }
200
- function $n(e, t) {
201
- if (!e || e.length === 0)
202
- return null;
203
- const [n] = e;
204
- return t ? n[t] : n;
205
- }
206
- function Lt(e, t, n) {
207
- return t === void 0 && (t = e.left), n === void 0 && (n = e.top), {
208
- x: t + e.width * 0.5,
209
- y: n + e.height * 0.5
210
- };
211
- }
212
- const no = (e) => {
213
- let {
214
- collisionRect: t,
215
- droppableRects: n,
216
- droppableContainers: r
217
- } = e;
218
- const i = Lt(t, t.left, t.top), o = [];
219
- for (const a of r) {
220
- const {
221
- id: s
222
- } = a, l = n.get(s);
223
- if (l) {
224
- const c = Pn(Lt(l), i);
225
- o.push({
226
- id: s,
227
- data: {
228
- droppableContainer: a,
229
- value: c
230
- }
231
- });
232
- }
233
- }
234
- return o.sort(Bn);
235
- };
236
- function Kn(e, t) {
237
- const n = Math.max(t.top, e.top), r = Math.max(t.left, e.left), i = Math.min(t.left + t.width, e.left + e.width), o = Math.min(t.top + t.height, e.top + e.height), a = i - r, s = o - n;
238
- if (r < i && n < o) {
239
- const l = t.width * t.height, c = e.width * e.height, d = a * s, u = d / (l + c - d);
240
- return Number(u.toFixed(4));
241
- }
242
- return 0;
243
- }
244
- const Xn = (e) => {
245
- let {
246
- collisionRect: t,
247
- droppableRects: n,
248
- droppableContainers: r
249
- } = e;
250
- const i = [];
251
- for (const o of r) {
252
- const {
253
- id: a
254
- } = o, s = n.get(a);
255
- if (s) {
256
- const l = Kn(s, t);
257
- l > 0 && i.push({
258
- id: a,
259
- data: {
260
- droppableContainer: o,
261
- value: l
262
- }
263
- });
264
- }
265
- }
266
- return i.sort(Fn);
267
- };
268
- function jn(e, t, n) {
269
- return {
270
- ...e,
271
- scaleX: t && n ? t.width / n.width : 1,
272
- scaleY: t && n ? t.height / n.height : 1
273
- };
274
- }
275
- function Ht(e, t) {
276
- return e && t ? {
277
- x: e.left - t.left,
278
- y: e.top - t.top
279
- } : H;
280
- }
281
- function Wn(e) {
282
- return function(n) {
283
- for (var r = arguments.length, i = new Array(r > 1 ? r - 1 : 0), o = 1; o < r; o++)
284
- i[o - 1] = arguments[o];
285
- return i.reduce((a, s) => ({
286
- ...a,
287
- top: a.top + e * s.y,
288
- bottom: a.bottom + e * s.y,
289
- left: a.left + e * s.x,
290
- right: a.right + e * s.x
291
- }), {
292
- ...n
293
- });
294
- };
295
- }
296
- const Yn = /* @__PURE__ */ Wn(1);
297
- function _t(e) {
298
- if (e.startsWith("matrix3d(")) {
299
- const t = e.slice(9, -1).split(/, /);
300
- return {
301
- x: +t[12],
302
- y: +t[13],
303
- scaleX: +t[0],
304
- scaleY: +t[5]
305
- };
306
- } else if (e.startsWith("matrix(")) {
307
- const t = e.slice(7, -1).split(/, /);
308
- return {
309
- x: +t[4],
310
- y: +t[5],
311
- scaleX: +t[0],
312
- scaleY: +t[3]
313
- };
314
- }
315
- return null;
316
- }
317
- function Un(e, t, n) {
318
- const r = _t(t);
319
- if (!r)
320
- return e;
321
- const {
322
- scaleX: i,
323
- scaleY: o,
324
- x: a,
325
- y: s
326
- } = r, l = e.left - a - (1 - i) * parseFloat(n), c = e.top - s - (1 - o) * parseFloat(n.slice(n.indexOf(" ") + 1)), d = i ? e.width / i : e.width, u = o ? e.height / o : e.height;
327
- return {
328
- width: d,
329
- height: u,
330
- top: c,
331
- right: l + d,
332
- bottom: c + u,
333
- left: l
334
- };
335
- }
336
- const Hn = {
337
- ignoreTransform: !1
338
- };
339
- function Te(e, t) {
340
- t === void 0 && (t = Hn);
341
- let n = e.getBoundingClientRect();
342
- if (t.ignoreTransform) {
343
- const {
344
- transform: c,
345
- transformOrigin: d
346
- } = J(e).getComputedStyle(e);
347
- c && (n = Un(n, c, d));
348
- }
349
- const {
350
- top: r,
351
- left: i,
352
- width: o,
353
- height: a,
354
- bottom: s,
355
- right: l
356
- } = n;
357
- return {
358
- top: r,
359
- left: i,
360
- width: o,
361
- height: a,
362
- bottom: s,
363
- right: l
364
- };
365
- }
366
- function kt(e) {
367
- return Te(e, {
368
- ignoreTransform: !0
369
- });
370
- }
371
- function _n(e) {
372
- const t = e.innerWidth, n = e.innerHeight;
373
- return {
374
- top: 0,
375
- left: 0,
376
- right: t,
377
- bottom: n,
378
- width: t,
379
- height: n
380
- };
381
- }
382
- function qn(e, t) {
383
- return t === void 0 && (t = J(e).getComputedStyle(e)), t.position === "fixed";
384
- }
385
- function Jn(e, t) {
386
- t === void 0 && (t = J(e).getComputedStyle(e));
387
- const n = /(auto|scroll|overlay)/;
388
- return ["overflow", "overflowX", "overflowY"].some((i) => {
389
- const o = t[i];
390
- return typeof o == "string" ? n.test(o) : !1;
391
- });
392
- }
393
- function dt(e, t) {
394
- const n = [];
395
- function r(i) {
396
- if (t != null && n.length >= t || !i)
397
- return n;
398
- if (Yt(i) && i.scrollingElement != null && !n.includes(i.scrollingElement))
399
- return n.push(i.scrollingElement), n;
400
- if (!He(i) || En(i) || n.includes(i))
401
- return n;
402
- const o = J(e).getComputedStyle(i);
403
- return i !== e && Jn(i, o) && n.push(i), qn(i, o) ? n : r(i.parentNode);
404
- }
405
- return e ? r(e) : n;
406
- }
407
- function qt(e) {
408
- const [t] = dt(e, 1);
409
- return t ?? null;
410
- }
411
- function et(e) {
412
- return !at || !e ? null : ut(e) ? e : Rn(e) ? Yt(e) || e === me(e).scrollingElement ? window : He(e) ? e : null : null;
413
- }
414
- function Jt(e) {
415
- return ut(e) ? e.scrollX : e.scrollLeft;
416
- }
417
- function Vt(e) {
418
- return ut(e) ? e.scrollY : e.scrollTop;
419
- }
420
- function ot(e) {
421
- return {
422
- x: Jt(e),
423
- y: Vt(e)
424
- };
425
- }
426
- var L;
427
- (function(e) {
428
- e[e.Forward = 1] = "Forward", e[e.Backward = -1] = "Backward";
429
- })(L || (L = {}));
430
- function Gt(e) {
431
- return !at || !e ? !1 : e === document.scrollingElement;
432
- }
433
- function Qt(e) {
434
- const t = {
435
- x: 0,
436
- y: 0
437
- }, n = Gt(e) ? {
438
- height: window.innerHeight,
439
- width: window.innerWidth
440
- } : {
441
- height: e.clientHeight,
442
- width: e.clientWidth
443
- }, r = {
444
- x: e.scrollWidth - n.width,
445
- y: e.scrollHeight - n.height
446
- }, i = e.scrollTop <= t.y, o = e.scrollLeft <= t.x, a = e.scrollTop >= r.y, s = e.scrollLeft >= r.x;
447
- return {
448
- isTop: i,
449
- isLeft: o,
450
- isBottom: a,
451
- isRight: s,
452
- maxScroll: r,
453
- minScroll: t
454
- };
455
- }
456
- const Vn = {
457
- x: 0.2,
458
- y: 0.2
459
- };
460
- function Gn(e, t, n, r, i) {
461
- let {
462
- top: o,
463
- left: a,
464
- right: s,
465
- bottom: l
466
- } = n;
467
- r === void 0 && (r = 10), i === void 0 && (i = Vn);
468
- const {
469
- isTop: c,
470
- isBottom: d,
471
- isLeft: u,
472
- isRight: g
473
- } = Qt(e), f = {
474
- x: 0,
475
- y: 0
476
- }, x = {
477
- x: 0,
478
- y: 0
479
- }, h = {
480
- height: t.height * i.y,
481
- width: t.width * i.x
482
- };
483
- return !c && o <= t.top + h.height ? (f.y = L.Backward, x.y = r * Math.abs((t.top + h.height - o) / h.height)) : !d && l >= t.bottom - h.height && (f.y = L.Forward, x.y = r * Math.abs((t.bottom - h.height - l) / h.height)), !g && s >= t.right - h.width ? (f.x = L.Forward, x.x = r * Math.abs((t.right - h.width - s) / h.width)) : !u && a <= t.left + h.width && (f.x = L.Backward, x.x = r * Math.abs((t.left + h.width - a) / h.width)), {
484
- direction: f,
485
- speed: x
486
- };
487
- }
488
- function Qn(e) {
489
- if (e === document.scrollingElement) {
490
- const {
491
- innerWidth: o,
492
- innerHeight: a
493
- } = window;
494
- return {
495
- top: 0,
496
- left: 0,
497
- right: o,
498
- bottom: a,
499
- width: o,
500
- height: a
501
- };
502
- }
503
- const {
504
- top: t,
505
- left: n,
506
- right: r,
507
- bottom: i
508
- } = e.getBoundingClientRect();
509
- return {
510
- top: t,
511
- left: n,
512
- right: r,
513
- bottom: i,
514
- width: e.clientWidth,
515
- height: e.clientHeight
516
- };
517
- }
518
- function Zt(e) {
519
- return e.reduce((t, n) => ye(t, ot(n)), H);
520
- }
521
- function Zn(e) {
522
- return e.reduce((t, n) => t + Jt(n), 0);
523
- }
524
- function er(e) {
525
- return e.reduce((t, n) => t + Vt(n), 0);
526
- }
527
- function en(e, t) {
528
- if (t === void 0 && (t = Te), !e)
529
- return;
530
- const {
531
- top: n,
532
- left: r,
533
- bottom: i,
534
- right: o
535
- } = t(e);
536
- qt(e) && (i <= 0 || o <= 0 || n >= window.innerHeight || r >= window.innerWidth) && e.scrollIntoView({
537
- block: "center",
538
- inline: "center"
539
- });
540
- }
541
- const tr = [["x", ["left", "right"], Zn], ["y", ["top", "bottom"], er]];
542
- class ft {
543
- constructor(t, n) {
544
- 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;
545
- const r = dt(n), i = Zt(r);
546
- this.rect = {
547
- ...t
548
- }, this.width = t.width, this.height = t.height;
549
- for (const [o, a, s] of tr)
550
- for (const l of a)
551
- Object.defineProperty(this, l, {
552
- get: () => {
553
- const c = s(r), d = i[o] - c;
554
- return this.rect[l] + d;
555
- },
556
- enumerable: !0
557
- });
558
- Object.defineProperty(this, "rect", {
559
- enumerable: !1
560
- });
561
- }
562
- }
563
- class Se {
564
- constructor(t) {
565
- this.target = void 0, this.listeners = [], this.removeAll = () => {
566
- this.listeners.forEach((n) => {
567
- var r;
568
- return (r = this.target) == null ? void 0 : r.removeEventListener(...n);
569
- });
570
- }, this.target = t;
571
- }
572
- add(t, n, r) {
573
- var i;
574
- (i = this.target) == null || i.addEventListener(t, n, r), this.listeners.push([t, n, r]);
575
- }
576
- }
577
- function nr(e) {
578
- const {
579
- EventTarget: t
580
- } = J(e);
581
- return e instanceof t ? e : me(e);
582
- }
583
- function tt(e, t) {
584
- const n = Math.abs(e.x), r = Math.abs(e.y);
585
- 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;
586
- }
587
- var j;
588
- (function(e) {
589
- e.Click = "click", e.DragStart = "dragstart", e.Keydown = "keydown", e.ContextMenu = "contextmenu", e.Resize = "resize", e.SelectionChange = "selectionchange", e.VisibilityChange = "visibilitychange";
590
- })(j || (j = {}));
591
- function It(e) {
592
- e.preventDefault();
593
- }
594
- function rr(e) {
595
- e.stopPropagation();
596
- }
597
- var D;
598
- (function(e) {
599
- e.Space = "Space", e.Down = "ArrowDown", e.Right = "ArrowRight", e.Left = "ArrowLeft", e.Up = "ArrowUp", e.Esc = "Escape", e.Enter = "Enter", e.Tab = "Tab";
600
- })(D || (D = {}));
601
- const tn = {
602
- start: [D.Space, D.Enter],
603
- cancel: [D.Esc],
604
- end: [D.Space, D.Enter, D.Tab]
605
- }, or = (e, t) => {
606
- let {
607
- currentCoordinates: n
608
- } = t;
609
- switch (e.code) {
610
- case D.Right:
611
- return {
612
- ...n,
613
- x: n.x + 25
614
- };
615
- case D.Left:
616
- return {
617
- ...n,
618
- x: n.x - 25
619
- };
620
- case D.Down:
621
- return {
622
- ...n,
623
- y: n.y + 25
624
- };
625
- case D.Up:
626
- return {
627
- ...n,
628
- y: n.y - 25
629
- };
630
- }
631
- };
632
- class nn {
633
- constructor(t) {
634
- this.props = void 0, this.autoScrollEnabled = !1, this.referenceCoordinates = void 0, this.listeners = void 0, this.windowListeners = void 0, this.props = t;
635
- const {
636
- event: {
637
- target: n
638
- }
639
- } = t;
640
- this.props = t, this.listeners = new Se(me(n)), this.windowListeners = new Se(J(n)), this.handleKeyDown = this.handleKeyDown.bind(this), this.handleCancel = this.handleCancel.bind(this), this.attach();
641
- }
642
- attach() {
643
- this.handleStart(), this.windowListeners.add(j.Resize, this.handleCancel), this.windowListeners.add(j.VisibilityChange, this.handleCancel), setTimeout(() => this.listeners.add(j.Keydown, this.handleKeyDown));
644
- }
645
- handleStart() {
646
- const {
647
- activeNode: t,
648
- onStart: n
649
- } = this.props, r = t.node.current;
650
- r && en(r), n(H);
651
- }
652
- handleKeyDown(t) {
653
- if (lt(t)) {
654
- const {
655
- active: n,
656
- context: r,
657
- options: i
658
- } = this.props, {
659
- keyboardCodes: o = tn,
660
- coordinateGetter: a = or,
661
- scrollBehavior: s = "smooth"
662
- } = i, {
663
- code: l
664
- } = t;
665
- if (o.end.includes(l)) {
666
- this.handleEnd(t);
667
- return;
668
- }
669
- if (o.cancel.includes(l)) {
670
- this.handleCancel(t);
671
- return;
672
- }
673
- const {
674
- collisionRect: c
675
- } = r.current, d = c ? {
676
- x: c.left,
677
- y: c.top
678
- } : H;
679
- this.referenceCoordinates || (this.referenceCoordinates = d);
680
- const u = a(t, {
681
- active: n,
682
- context: r.current,
683
- currentCoordinates: d
684
- });
685
- if (u) {
686
- const g = Xe(u, d), f = {
687
- x: 0,
688
- y: 0
689
- }, {
690
- scrollableAncestors: x
691
- } = r.current;
692
- for (const h of x) {
693
- const v = t.code, {
694
- isTop: y,
695
- isRight: w,
696
- isLeft: m,
697
- isBottom: T,
698
- maxScroll: C,
699
- minScroll: S
700
- } = Qt(h), p = Qn(h), b = {
701
- x: Math.min(v === D.Right ? p.right - p.width / 2 : p.right, Math.max(v === D.Right ? p.left : p.left + p.width / 2, u.x)),
702
- y: Math.min(v === D.Down ? p.bottom - p.height / 2 : p.bottom, Math.max(v === D.Down ? p.top : p.top + p.height / 2, u.y))
703
- }, R = v === D.Right && !w || v === D.Left && !m, k = v === D.Down && !T || v === D.Up && !y;
704
- if (R && b.x !== u.x) {
705
- const E = h.scrollLeft + g.x, V = v === D.Right && E <= C.x || v === D.Left && E >= S.x;
706
- if (V && !g.y) {
707
- h.scrollTo({
708
- left: E,
709
- behavior: s
710
- });
711
- return;
712
- }
713
- V ? f.x = h.scrollLeft - E : f.x = v === D.Right ? h.scrollLeft - C.x : h.scrollLeft - S.x, f.x && h.scrollBy({
714
- left: -f.x,
715
- behavior: s
716
- });
717
- break;
718
- } else if (k && b.y !== u.y) {
719
- const E = h.scrollTop + g.y, V = v === D.Down && E <= C.y || v === D.Up && E >= S.y;
720
- if (V && !g.x) {
721
- h.scrollTo({
722
- top: E,
723
- behavior: s
724
- });
725
- return;
726
- }
727
- V ? f.y = h.scrollTop - E : f.y = v === D.Down ? h.scrollTop - C.y : h.scrollTop - S.y, f.y && h.scrollBy({
728
- top: -f.y,
729
- behavior: s
730
- });
731
- break;
732
- }
733
- }
734
- this.handleMove(t, ye(Xe(u, this.referenceCoordinates), f));
735
- }
736
- }
737
- }
738
- handleMove(t, n) {
739
- const {
740
- onMove: r
741
- } = this.props;
742
- t.preventDefault(), r(n);
743
- }
744
- handleEnd(t) {
745
- const {
746
- onEnd: n
747
- } = this.props;
748
- t.preventDefault(), this.detach(), n();
749
- }
750
- handleCancel(t) {
751
- const {
752
- onCancel: n
753
- } = this.props;
754
- t.preventDefault(), this.detach(), n();
755
- }
756
- detach() {
757
- this.listeners.removeAll(), this.windowListeners.removeAll();
758
- }
759
- }
760
- nn.activators = [{
761
- eventName: "onKeyDown",
762
- handler: (e, t, n) => {
763
- let {
764
- keyboardCodes: r = tn,
765
- onActivation: i
766
- } = t, {
767
- active: o
768
- } = n;
769
- const {
770
- code: a
771
- } = e.nativeEvent;
772
- if (r.start.includes(a)) {
773
- const s = o.activatorNode.current;
774
- return s && e.target !== s ? !1 : (e.preventDefault(), i == null || i({
775
- event: e.nativeEvent
776
- }), !0);
777
- }
778
- return !1;
779
- }
780
- }];
781
- function Pt(e) {
782
- return !!(e && "distance" in e);
783
- }
784
- function zt(e) {
785
- return !!(e && "delay" in e);
786
- }
787
- class ht {
788
- constructor(t, n, r) {
789
- var i;
790
- r === void 0 && (r = nr(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;
791
- const {
792
- event: o
793
- } = t, {
794
- target: a
795
- } = o;
796
- this.props = t, this.events = n, this.document = me(a), this.documentListeners = new Se(this.document), this.listeners = new Se(r), this.windowListeners = new Se(J(a)), this.initialCoordinates = (i = $e(o)) != null ? i : H, 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();
797
- }
798
- attach() {
799
- const {
800
- events: t,
801
- props: {
802
- options: {
803
- activationConstraint: n,
804
- bypassActivationConstraint: r
805
- }
806
- }
807
- } = this;
808
- if (this.listeners.add(t.move.name, this.handleMove, {
809
- passive: !1
810
- }), this.listeners.add(t.end.name, this.handleEnd), t.cancel && this.listeners.add(t.cancel.name, this.handleCancel), this.windowListeners.add(j.Resize, this.handleCancel), this.windowListeners.add(j.DragStart, It), this.windowListeners.add(j.VisibilityChange, this.handleCancel), this.windowListeners.add(j.ContextMenu, It), this.documentListeners.add(j.Keydown, this.handleKeydown), n) {
811
- if (r != null && r({
812
- event: this.props.event,
813
- activeNode: this.props.activeNode,
814
- options: this.props.options
815
- }))
816
- return this.handleStart();
817
- if (zt(n)) {
818
- this.timeoutId = setTimeout(this.handleStart, n.delay), this.handlePending(n);
819
- return;
820
- }
821
- if (Pt(n)) {
822
- this.handlePending(n);
823
- return;
824
- }
825
- }
826
- this.handleStart();
827
- }
828
- detach() {
829
- this.listeners.removeAll(), this.windowListeners.removeAll(), setTimeout(this.documentListeners.removeAll, 50), this.timeoutId !== null && (clearTimeout(this.timeoutId), this.timeoutId = null);
830
- }
831
- handlePending(t, n) {
832
- const {
833
- active: r,
834
- onPending: i
835
- } = this.props;
836
- i(r, t, this.initialCoordinates, n);
837
- }
838
- handleStart() {
839
- const {
840
- initialCoordinates: t
841
- } = this, {
842
- onStart: n
843
- } = this.props;
844
- t && (this.activated = !0, this.documentListeners.add(j.Click, rr, {
845
- capture: !0
846
- }), this.removeTextSelection(), this.documentListeners.add(j.SelectionChange, this.removeTextSelection), n(t));
847
- }
848
- handleMove(t) {
849
- var n;
850
- const {
851
- activated: r,
852
- initialCoordinates: i,
853
- props: o
854
- } = this, {
855
- onMove: a,
856
- options: {
857
- activationConstraint: s
858
- }
859
- } = o;
860
- if (!i)
861
- return;
862
- const l = (n = $e(t)) != null ? n : H, c = Xe(i, l);
863
- if (!r && s) {
864
- if (Pt(s)) {
865
- if (s.tolerance != null && tt(c, s.tolerance))
866
- return this.handleCancel();
867
- if (tt(c, s.distance))
868
- return this.handleStart();
869
- }
870
- if (zt(s) && tt(c, s.tolerance))
871
- return this.handleCancel();
872
- this.handlePending(s, c);
873
- return;
874
- }
875
- t.cancelable && t.preventDefault(), a(l);
876
- }
877
- handleEnd() {
878
- const {
879
- onAbort: t,
880
- onEnd: n
881
- } = this.props;
882
- this.detach(), this.activated || t(this.props.active), n();
883
- }
884
- handleCancel() {
885
- const {
886
- onAbort: t,
887
- onCancel: n
888
- } = this.props;
889
- this.detach(), this.activated || t(this.props.active), n();
890
- }
891
- handleKeydown(t) {
892
- t.code === D.Esc && this.handleCancel();
893
- }
894
- removeTextSelection() {
895
- var t;
896
- (t = this.document.getSelection()) == null || t.removeAllRanges();
897
- }
898
- }
899
- const ir = {
900
- cancel: {
901
- name: "pointercancel"
902
- },
903
- move: {
904
- name: "pointermove"
905
- },
906
- end: {
907
- name: "pointerup"
908
- }
909
- };
910
- class rn extends ht {
911
- constructor(t) {
912
- const {
913
- event: n
914
- } = t, r = me(n.target);
915
- super(t, ir, r);
916
- }
917
- }
918
- rn.activators = [{
919
- eventName: "onPointerDown",
920
- handler: (e, t) => {
921
- let {
922
- nativeEvent: n
923
- } = e, {
924
- onActivation: r
925
- } = t;
926
- return !n.isPrimary || n.button !== 0 ? !1 : (r == null || r({
927
- event: n
928
- }), !0);
929
- }
930
- }];
931
- const sr = {
932
- move: {
933
- name: "mousemove"
934
- },
935
- end: {
936
- name: "mouseup"
937
- }
938
- };
939
- var it;
940
- (function(e) {
941
- e[e.RightClick = 2] = "RightClick";
942
- })(it || (it = {}));
943
- class ar extends ht {
944
- constructor(t) {
945
- super(t, sr, me(t.event.target));
946
- }
947
- }
948
- ar.activators = [{
949
- eventName: "onMouseDown",
950
- handler: (e, t) => {
951
- let {
952
- nativeEvent: n
953
- } = e, {
954
- onActivation: r
955
- } = t;
956
- return n.button === it.RightClick ? !1 : (r == null || r({
957
- event: n
958
- }), !0);
959
- }
960
- }];
961
- const nt = {
962
- cancel: {
963
- name: "touchcancel"
964
- },
965
- move: {
966
- name: "touchmove"
967
- },
968
- end: {
969
- name: "touchend"
970
- }
971
- };
972
- class lr extends ht {
973
- constructor(t) {
974
- super(t, nt);
975
- }
976
- static setup() {
977
- return window.addEventListener(nt.move.name, t, {
978
- capture: !1,
979
- passive: !1
980
- }), function() {
981
- window.removeEventListener(nt.move.name, t);
982
- };
983
- function t() {
984
- }
985
- }
986
- }
987
- lr.activators = [{
988
- eventName: "onTouchStart",
989
- handler: (e, t) => {
990
- let {
991
- nativeEvent: n
992
- } = e, {
993
- onActivation: r
994
- } = t;
995
- const {
996
- touches: i
997
- } = n;
998
- return i.length > 1 ? !1 : (r == null || r({
999
- event: n
1000
- }), !0);
1001
- }
1002
- }];
1003
- var Re;
1004
- (function(e) {
1005
- e[e.Pointer = 0] = "Pointer", e[e.DraggableRect = 1] = "DraggableRect";
1006
- })(Re || (Re = {}));
1007
- var Ye;
1008
- (function(e) {
1009
- e[e.TreeOrder = 0] = "TreeOrder", e[e.ReversedTreeOrder = 1] = "ReversedTreeOrder";
1010
- })(Ye || (Ye = {}));
1011
- function cr(e) {
1012
- let {
1013
- acceleration: t,
1014
- activator: n = Re.Pointer,
1015
- canScroll: r,
1016
- draggingRect: i,
1017
- enabled: o,
1018
- interval: a = 5,
1019
- order: s = Ye.TreeOrder,
1020
- pointerCoordinates: l,
1021
- scrollableAncestors: c,
1022
- scrollableAncestorRects: d,
1023
- delta: u,
1024
- threshold: g
1025
- } = e;
1026
- const f = dr({
1027
- delta: u,
1028
- disabled: !o
1029
- }), [x, h] = Cn(), v = P({
1030
- x: 0,
1031
- y: 0
1032
- }), y = P({
1033
- x: 0,
1034
- y: 0
1035
- }), w = A(() => {
1036
- switch (n) {
1037
- case Re.Pointer:
1038
- return l ? {
1039
- top: l.y,
1040
- bottom: l.y,
1041
- left: l.x,
1042
- right: l.x
1043
- } : null;
1044
- case Re.DraggableRect:
1045
- return i;
1046
- }
1047
- }, [n, i, l]), m = P(null), T = U(() => {
1048
- const S = m.current;
1049
- if (!S)
1050
- return;
1051
- const p = v.current.x * y.current.x, b = v.current.y * y.current.y;
1052
- S.scrollBy(p, b);
1053
- }, []), C = A(() => s === Ye.TreeOrder ? [...c].reverse() : c, [s, c]);
1054
- O(
1055
- () => {
1056
- if (!o || !c.length || !w) {
1057
- h();
1058
- return;
1059
- }
1060
- for (const S of C) {
1061
- if ((r == null ? void 0 : r(S)) === !1)
1062
- continue;
1063
- const p = c.indexOf(S), b = d[p];
1064
- if (!b)
1065
- continue;
1066
- const {
1067
- direction: R,
1068
- speed: k
1069
- } = Gn(S, b, w, t, g);
1070
- for (const E of ["x", "y"])
1071
- f[E][R[E]] || (k[E] = 0, R[E] = 0);
1072
- if (k.x > 0 || k.y > 0) {
1073
- h(), m.current = S, x(T, a), v.current = k, y.current = R;
1074
- return;
1075
- }
1076
- }
1077
- v.current = {
1078
- x: 0,
1079
- y: 0
1080
- }, y.current = {
1081
- x: 0,
1082
- y: 0
1083
- }, h();
1084
- },
1085
- // eslint-disable-next-line react-hooks/exhaustive-deps
1086
- [
1087
- t,
1088
- T,
1089
- r,
1090
- h,
1091
- o,
1092
- a,
1093
- // eslint-disable-next-line react-hooks/exhaustive-deps
1094
- JSON.stringify(w),
1095
- // eslint-disable-next-line react-hooks/exhaustive-deps
1096
- JSON.stringify(f),
1097
- x,
1098
- c,
1099
- C,
1100
- d,
1101
- // eslint-disable-next-line react-hooks/exhaustive-deps
1102
- JSON.stringify(g)
1103
- ]
1104
- );
1105
- }
1106
- const ur = {
1107
- x: {
1108
- [L.Backward]: !1,
1109
- [L.Forward]: !1
1110
- },
1111
- y: {
1112
- [L.Backward]: !1,
1113
- [L.Forward]: !1
1114
- }
1115
- };
1116
- function dr(e) {
1117
- let {
1118
- delta: t,
1119
- disabled: n
1120
- } = e;
1121
- const r = Ke(t);
1122
- return Me((i) => {
1123
- if (n || !r || !i)
1124
- return ur;
1125
- const o = {
1126
- x: Math.sign(t.x - r.x),
1127
- y: Math.sign(t.y - r.y)
1128
- };
1129
- return {
1130
- x: {
1131
- [L.Backward]: i.x[L.Backward] || o.x === -1,
1132
- [L.Forward]: i.x[L.Forward] || o.x === 1
1133
- },
1134
- y: {
1135
- [L.Backward]: i.y[L.Backward] || o.y === -1,
1136
- [L.Forward]: i.y[L.Forward] || o.y === 1
1137
- }
1138
- };
1139
- }, [n, t, r]);
1140
- }
1141
- function fr(e, t) {
1142
- const n = t != null ? e.get(t) : void 0, r = n ? n.node.current : null;
1143
- return Me((i) => {
1144
- var o;
1145
- return t == null ? null : (o = r ?? i) != null ? o : null;
1146
- }, [r, t]);
1147
- }
1148
- function hr(e, t) {
1149
- return A(() => e.reduce((n, r) => {
1150
- const {
1151
- sensor: i
1152
- } = r, o = i.activators.map((a) => ({
1153
- eventName: a.eventName,
1154
- handler: t(a.handler, r)
1155
- }));
1156
- return [...n, ...o];
1157
- }, []), [e, t]);
1158
- }
1159
- var Oe;
1160
- (function(e) {
1161
- e[e.Always = 0] = "Always", e[e.BeforeDragging = 1] = "BeforeDragging", e[e.WhileDragging = 2] = "WhileDragging";
1162
- })(Oe || (Oe = {}));
1163
- var st;
1164
- (function(e) {
1165
- e.Optimized = "optimized";
1166
- })(st || (st = {}));
1167
- const Bt = /* @__PURE__ */ new Map();
1168
- function gr(e, t) {
1169
- let {
1170
- dragging: n,
1171
- dependencies: r,
1172
- config: i
1173
- } = t;
1174
- const [o, a] = K(null), {
1175
- frequency: s,
1176
- measure: l,
1177
- strategy: c
1178
- } = i, d = P(e), u = v(), g = Ae(u), f = U(function(y) {
1179
- y === void 0 && (y = []), !g.current && a((w) => w === null ? y : w.concat(y.filter((m) => !w.includes(m))));
1180
- }, [g]), x = P(null), h = Me((y) => {
1181
- if (u && !n)
1182
- return Bt;
1183
- if (!y || y === Bt || d.current !== e || o != null) {
1184
- const w = /* @__PURE__ */ new Map();
1185
- for (let m of e) {
1186
- if (!m)
1187
- continue;
1188
- if (o && o.length > 0 && !o.includes(m.id) && m.rect.current) {
1189
- w.set(m.id, m.rect.current);
1190
- continue;
1191
- }
1192
- const T = m.node.current, C = T ? new ft(l(T), T) : null;
1193
- m.rect.current = C, C && w.set(m.id, C);
1194
- }
1195
- return w;
1196
- }
1197
- return y;
1198
- }, [e, o, n, u, l]);
1199
- return O(() => {
1200
- d.current = e;
1201
- }, [e]), O(
1202
- () => {
1203
- u || f();
1204
- },
1205
- // eslint-disable-next-line react-hooks/exhaustive-deps
1206
- [n, u]
1207
- ), O(
1208
- () => {
1209
- o && o.length > 0 && a(null);
1210
- },
1211
- //eslint-disable-next-line react-hooks/exhaustive-deps
1212
- [JSON.stringify(o)]
1213
- ), O(
1214
- () => {
1215
- u || typeof s != "number" || x.current !== null || (x.current = setTimeout(() => {
1216
- f(), x.current = null;
1217
- }, s));
1218
- },
1219
- // eslint-disable-next-line react-hooks/exhaustive-deps
1220
- [s, u, f, ...r]
1221
- ), {
1222
- droppableRects: h,
1223
- measureDroppableContainers: f,
1224
- measuringScheduled: o != null
1225
- };
1226
- function v() {
1227
- switch (c) {
1228
- case Oe.Always:
1229
- return !1;
1230
- case Oe.BeforeDragging:
1231
- return n;
1232
- default:
1233
- return !n;
1234
- }
1235
- }
1236
- }
1237
- function gt(e, t) {
1238
- return Me((n) => e ? n || (typeof t == "function" ? t(e) : e) : null, [t, e]);
1239
- }
1240
- function vr(e, t) {
1241
- return gt(e, t);
1242
- }
1243
- function pr(e) {
1244
- let {
1245
- callback: t,
1246
- disabled: n
1247
- } = e;
1248
- const r = ct(t), i = A(() => {
1249
- if (n || typeof window > "u" || typeof window.MutationObserver > "u")
1250
- return;
1251
- const {
1252
- MutationObserver: o
1253
- } = window;
1254
- return new o(r);
1255
- }, [r, n]);
1256
- return O(() => () => i == null ? void 0 : i.disconnect(), [i]), i;
1257
- }
1258
- function _e(e) {
1259
- let {
1260
- callback: t,
1261
- disabled: n
1262
- } = e;
1263
- const r = ct(t), i = A(
1264
- () => {
1265
- if (n || typeof window > "u" || typeof window.ResizeObserver > "u")
1266
- return;
1267
- const {
1268
- ResizeObserver: o
1269
- } = window;
1270
- return new o(r);
1271
- },
1272
- // eslint-disable-next-line react-hooks/exhaustive-deps
1273
- [n]
1274
- );
1275
- return O(() => () => i == null ? void 0 : i.disconnect(), [i]), i;
1276
- }
1277
- function br(e) {
1278
- return new ft(Te(e), e);
1279
- }
1280
- function Ft(e, t, n) {
1281
- t === void 0 && (t = br);
1282
- const [r, i] = K(null);
1283
- function o() {
1284
- i((l) => {
1285
- if (!e)
1286
- return null;
1287
- if (e.isConnected === !1) {
1288
- var c;
1289
- return (c = l ?? n) != null ? c : null;
1290
- }
1291
- const d = t(e);
1292
- return JSON.stringify(l) === JSON.stringify(d) ? l : d;
1293
- });
1294
- }
1295
- const a = pr({
1296
- callback(l) {
1297
- if (e)
1298
- for (const c of l) {
1299
- const {
1300
- type: d,
1301
- target: u
1302
- } = c;
1303
- if (d === "childList" && u instanceof HTMLElement && u.contains(e)) {
1304
- o();
1305
- break;
1306
- }
1307
- }
1308
- }
1309
- }), s = _e({
1310
- callback: o
1311
- });
1312
- return fe(() => {
1313
- o(), e ? (s == null || s.observe(e), a == null || a.observe(document.body, {
1314
- childList: !0,
1315
- subtree: !0
1316
- })) : (s == null || s.disconnect(), a == null || a.disconnect());
1317
- }, [e]), r;
1318
- }
1319
- function yr(e) {
1320
- const t = gt(e);
1321
- return Ht(e, t);
1322
- }
1323
- const $t = [];
1324
- function mr(e) {
1325
- const t = P(e), n = Me((r) => e ? r && r !== $t && e && t.current && e.parentNode === t.current.parentNode ? r : dt(e) : $t, [e]);
1326
- return O(() => {
1327
- t.current = e;
1328
- }, [e]), n;
1329
- }
1330
- function wr(e) {
1331
- const [t, n] = K(null), r = P(e), i = U((o) => {
1332
- const a = et(o.target);
1333
- a && n((s) => s ? (s.set(a, ot(a)), new Map(s)) : null);
1334
- }, []);
1335
- return O(() => {
1336
- const o = r.current;
1337
- if (e !== o) {
1338
- a(o);
1339
- const s = e.map((l) => {
1340
- const c = et(l);
1341
- return c ? (c.addEventListener("scroll", i, {
1342
- passive: !0
1343
- }), [c, ot(c)]) : null;
1344
- }).filter((l) => l != null);
1345
- n(s.length ? new Map(s) : null), r.current = e;
1346
- }
1347
- return () => {
1348
- a(e), a(o);
1349
- };
1350
- function a(s) {
1351
- s.forEach((l) => {
1352
- const c = et(l);
1353
- c == null || c.removeEventListener("scroll", i);
1354
- });
1355
- }
1356
- }, [i, e]), A(() => e.length ? t ? Array.from(t.values()).reduce((o, a) => ye(o, a), H) : Zt(e) : H, [e, t]);
1357
- }
1358
- function Kt(e, t) {
1359
- t === void 0 && (t = []);
1360
- const n = P(null);
1361
- return O(
1362
- () => {
1363
- n.current = null;
1364
- },
1365
- // eslint-disable-next-line react-hooks/exhaustive-deps
1366
- t
1367
- ), O(() => {
1368
- const r = e !== H;
1369
- r && !n.current && (n.current = e), !r && n.current && (n.current = null);
1370
- }, [e]), n.current ? Xe(e, n.current) : H;
1371
- }
1372
- function Dr(e) {
1373
- O(
1374
- () => {
1375
- if (!at)
1376
- return;
1377
- const t = e.map((n) => {
1378
- let {
1379
- sensor: r
1380
- } = n;
1381
- return r.setup == null ? void 0 : r.setup();
1382
- });
1383
- return () => {
1384
- for (const n of t)
1385
- n == null || n();
1386
- };
1387
- },
1388
- // TO-DO: Sensors length could theoretically change which would not be a valid dependency
1389
- // eslint-disable-next-line react-hooks/exhaustive-deps
1390
- e.map((t) => {
1391
- let {
1392
- sensor: n
1393
- } = t;
1394
- return n;
1395
- })
1396
- );
1397
- }
1398
- function xr(e, t) {
1399
- return A(() => e.reduce((n, r) => {
1400
- let {
1401
- eventName: i,
1402
- handler: o
1403
- } = r;
1404
- return n[i] = (a) => {
1405
- o(a, t);
1406
- }, n;
1407
- }, {}), [e, t]);
1408
- }
1409
- function on(e) {
1410
- return A(() => e ? _n(e) : null, [e]);
1411
- }
1412
- const Xt = [];
1413
- function Cr(e, t) {
1414
- t === void 0 && (t = Te);
1415
- const [n] = e, r = on(n ? J(n) : null), [i, o] = K(Xt);
1416
- function a() {
1417
- o(() => e.length ? e.map((l) => Gt(l) ? r : new ft(t(l), l)) : Xt);
1418
- }
1419
- const s = _e({
1420
- callback: a
1421
- });
1422
- return fe(() => {
1423
- s == null || s.disconnect(), a(), e.forEach((l) => s == null ? void 0 : s.observe(l));
1424
- }, [e]), i;
1425
- }
1426
- function sn(e) {
1427
- if (!e)
1428
- return null;
1429
- if (e.children.length > 1)
1430
- return e;
1431
- const t = e.children[0];
1432
- return He(t) ? t : e;
1433
- }
1434
- function Sr(e) {
1435
- let {
1436
- measure: t
1437
- } = e;
1438
- const [n, r] = K(null), i = U((c) => {
1439
- for (const {
1440
- target: d
1441
- } of c)
1442
- if (He(d)) {
1443
- r((u) => {
1444
- const g = t(d);
1445
- return u ? {
1446
- ...u,
1447
- width: g.width,
1448
- height: g.height
1449
- } : g;
1450
- });
1451
- break;
1452
- }
1453
- }, [t]), o = _e({
1454
- callback: i
1455
- }), a = U((c) => {
1456
- const d = sn(c);
1457
- o == null || o.disconnect(), d && (o == null || o.observe(d)), r(d ? t(d) : null);
1458
- }, [t, o]), [s, l] = je(a);
1459
- return A(() => ({
1460
- nodeRef: s,
1461
- rect: n,
1462
- setRef: l
1463
- }), [n, s, l]);
1464
- }
1465
- const Rr = [{
1466
- sensor: rn,
1467
- options: {}
1468
- }, {
1469
- sensor: nn,
1470
- options: {}
1471
- }], Er = {
1472
- current: {}
1473
- }, Fe = {
1474
- draggable: {
1475
- measure: kt
1476
- },
1477
- droppable: {
1478
- measure: kt,
1479
- strategy: Oe.WhileDragging,
1480
- frequency: st.Optimized
1481
- },
1482
- dragOverlay: {
1483
- measure: Te
1484
- }
1485
- };
1486
- class Ee extends Map {
1487
- get(t) {
1488
- var n;
1489
- return t != null && (n = super.get(t)) != null ? n : void 0;
1490
- }
1491
- toArray() {
1492
- return Array.from(this.values());
1493
- }
1494
- getEnabled() {
1495
- return this.toArray().filter((t) => {
1496
- let {
1497
- disabled: n
1498
- } = t;
1499
- return !n;
1500
- });
1501
- }
1502
- getNodeFor(t) {
1503
- var n, r;
1504
- return (n = (r = this.get(t)) == null ? void 0 : r.node.current) != null ? n : void 0;
1505
- }
1506
- }
1507
- const Ar = {
1508
- activatorEvent: null,
1509
- active: null,
1510
- activeNode: null,
1511
- activeNodeRect: null,
1512
- collisions: null,
1513
- containerNodeRect: null,
1514
- draggableNodes: /* @__PURE__ */ new Map(),
1515
- droppableRects: /* @__PURE__ */ new Map(),
1516
- droppableContainers: /* @__PURE__ */ new Ee(),
1517
- over: null,
1518
- dragOverlay: {
1519
- nodeRef: {
1520
- current: null
1521
- },
1522
- rect: null,
1523
- setRef: We
1524
- },
1525
- scrollableAncestors: [],
1526
- scrollableAncestorRects: [],
1527
- measuringConfiguration: Fe,
1528
- measureDroppableContainers: We,
1529
- windowRect: null,
1530
- measuringScheduled: !1
1531
- }, an = {
1532
- activatorEvent: null,
1533
- activators: [],
1534
- active: null,
1535
- activeNodeRect: null,
1536
- ariaDescribedById: {
1537
- draggable: ""
1538
- },
1539
- dispatch: We,
1540
- draggableNodes: /* @__PURE__ */ new Map(),
1541
- over: null,
1542
- measureDroppableContainers: We
1543
- }, Le = /* @__PURE__ */ Ne(an), ln = /* @__PURE__ */ Ne(Ar);
1544
- function Or() {
1545
- return {
1546
- draggable: {
1547
- active: null,
1548
- initialCoordinates: {
1549
- x: 0,
1550
- y: 0
1551
- },
1552
- nodes: /* @__PURE__ */ new Map(),
1553
- translate: {
1554
- x: 0,
1555
- y: 0
1556
- }
1557
- },
1558
- droppable: {
1559
- containers: new Ee()
1560
- }
1561
- };
1562
- }
1563
- function Nr(e, t) {
1564
- switch (t.type) {
1565
- case N.DragStart:
1566
- return {
1567
- ...e,
1568
- draggable: {
1569
- ...e.draggable,
1570
- initialCoordinates: t.initialCoordinates,
1571
- active: t.active
1572
- }
1573
- };
1574
- case N.DragMove:
1575
- return e.draggable.active == null ? e : {
1576
- ...e,
1577
- draggable: {
1578
- ...e.draggable,
1579
- translate: {
1580
- x: t.coordinates.x - e.draggable.initialCoordinates.x,
1581
- y: t.coordinates.y - e.draggable.initialCoordinates.y
1582
- }
1583
- }
1584
- };
1585
- case N.DragEnd:
1586
- case N.DragCancel:
1587
- return {
1588
- ...e,
1589
- draggable: {
1590
- ...e.draggable,
1591
- active: null,
1592
- initialCoordinates: {
1593
- x: 0,
1594
- y: 0
1595
- },
1596
- translate: {
1597
- x: 0,
1598
- y: 0
1599
- }
1600
- }
1601
- };
1602
- case N.RegisterDroppable: {
1603
- const {
1604
- element: n
1605
- } = t, {
1606
- id: r
1607
- } = n, i = new Ee(e.droppable.containers);
1608
- return i.set(r, n), {
1609
- ...e,
1610
- droppable: {
1611
- ...e.droppable,
1612
- containers: i
1613
- }
1614
- };
1615
- }
1616
- case N.SetDroppableDisabled: {
1617
- const {
1618
- id: n,
1619
- key: r,
1620
- disabled: i
1621
- } = t, o = e.droppable.containers.get(n);
1622
- if (!o || r !== o.key)
1623
- return e;
1624
- const a = new Ee(e.droppable.containers);
1625
- return a.set(n, {
1626
- ...o,
1627
- disabled: i
1628
- }), {
1629
- ...e,
1630
- droppable: {
1631
- ...e.droppable,
1632
- containers: a
1633
- }
1634
- };
1635
- }
1636
- case N.UnregisterDroppable: {
1637
- const {
1638
- id: n,
1639
- key: r
1640
- } = t, i = e.droppable.containers.get(n);
1641
- if (!i || r !== i.key)
1642
- return e;
1643
- const o = new Ee(e.droppable.containers);
1644
- return o.delete(n), {
1645
- ...e,
1646
- droppable: {
1647
- ...e.droppable,
1648
- containers: o
1649
- }
1650
- };
1651
- }
1652
- default:
1653
- return e;
1654
- }
1655
- }
1656
- function Mr(e) {
1657
- let {
1658
- disabled: t
1659
- } = e;
1660
- const {
1661
- active: n,
1662
- activatorEvent: r,
1663
- draggableNodes: i
1664
- } = de(Le), o = Ke(r), a = Ke(n == null ? void 0 : n.id);
1665
- return O(() => {
1666
- if (!t && !r && o && a != null) {
1667
- if (!lt(o) || document.activeElement === o.target)
1668
- return;
1669
- const s = i.get(a);
1670
- if (!s)
1671
- return;
1672
- const {
1673
- activatorNode: l,
1674
- node: c
1675
- } = s;
1676
- if (!l.current && !c.current)
1677
- return;
1678
- requestAnimationFrame(() => {
1679
- for (const d of [l.current, c.current]) {
1680
- if (!d)
1681
- continue;
1682
- const u = Sn(d);
1683
- if (u) {
1684
- u.focus();
1685
- break;
1686
- }
1687
- }
1688
- });
1689
- }
1690
- }, [r, t, i, a, o]), null;
1691
- }
1692
- function cn(e, t) {
1693
- let {
1694
- transform: n,
1695
- ...r
1696
- } = t;
1697
- return e != null && e.length ? e.reduce((i, o) => o({
1698
- transform: i,
1699
- ...r
1700
- }), n) : n;
1701
- }
1702
- function Tr(e) {
1703
- return A(
1704
- () => ({
1705
- draggable: {
1706
- ...Fe.draggable,
1707
- ...e == null ? void 0 : e.draggable
1708
- },
1709
- droppable: {
1710
- ...Fe.droppable,
1711
- ...e == null ? void 0 : e.droppable
1712
- },
1713
- dragOverlay: {
1714
- ...Fe.dragOverlay,
1715
- ...e == null ? void 0 : e.dragOverlay
1716
- }
1717
- }),
1718
- // eslint-disable-next-line react-hooks/exhaustive-deps
1719
- [e == null ? void 0 : e.draggable, e == null ? void 0 : e.droppable, e == null ? void 0 : e.dragOverlay]
1720
- );
1721
- }
1722
- function Lr(e) {
1723
- let {
1724
- activeNode: t,
1725
- measure: n,
1726
- initialRect: r,
1727
- config: i = !0
1728
- } = e;
1729
- const o = P(!1), {
1730
- x: a,
1731
- y: s
1732
- } = typeof i == "boolean" ? {
1733
- x: i,
1734
- y: i
1735
- } : i;
1736
- fe(() => {
1737
- if (!a && !s || !t) {
1738
- o.current = !1;
1739
- return;
1740
- }
1741
- if (o.current || !r)
1742
- return;
1743
- const c = t == null ? void 0 : t.node.current;
1744
- if (!c || c.isConnected === !1)
1745
- return;
1746
- const d = n(c), u = Ht(d, r);
1747
- if (a || (u.x = 0), s || (u.y = 0), o.current = !0, Math.abs(u.x) > 0 || Math.abs(u.y) > 0) {
1748
- const g = qt(c);
1749
- g && g.scrollBy({
1750
- top: u.y,
1751
- left: u.x
1752
- });
1753
- }
1754
- }, [t, a, s, r, n]);
1755
- }
1756
- const qe = /* @__PURE__ */ Ne({
1757
- ...H,
1758
- scaleX: 1,
1759
- scaleY: 1
1760
- });
1761
- var se;
1762
- (function(e) {
1763
- e[e.Uninitialized = 0] = "Uninitialized", e[e.Initializing = 1] = "Initializing", e[e.Initialized = 2] = "Initialized";
1764
- })(se || (se = {}));
1765
- const ro = /* @__PURE__ */ yn(function(t) {
1766
- var n, r, i, o;
1767
- let {
1768
- id: a,
1769
- accessibility: s,
1770
- autoScroll: l = !0,
1771
- children: c,
1772
- sensors: d = Rr,
1773
- collisionDetection: u = Xn,
1774
- measuring: g,
1775
- modifiers: f,
1776
- ...x
1777
- } = t;
1778
- const h = mn(Nr, void 0, Or), [v, y] = h, [w, m] = Tn(), [T, C] = K(se.Uninitialized), S = T === se.Initialized, {
1779
- draggable: {
1780
- active: p,
1781
- nodes: b,
1782
- translate: R
1783
- },
1784
- droppable: {
1785
- containers: k
1786
- }
1787
- } = v, E = p != null ? b.get(p) : null, V = P({
1788
- initial: null,
1789
- translated: null
1790
- }), G = A(() => {
1791
- var z;
1792
- return p != null ? {
1793
- id: p,
1794
- // It's possible for the active node to unmount while dragging
1795
- data: (z = E == null ? void 0 : E.data) != null ? z : Er,
1796
- rect: V
1797
- } : null;
1798
- }, [p, E]), ee = P(null), [vt, pt] = K(null), [Q, bt] = K(null), ae = Ae(x, Object.values(x)), Je = Ue("DndDescribedBy", a), yt = A(() => k.getEnabled(), [k]), le = Tr(g), {
1799
- droppableRects: he,
1800
- measureDroppableContainers: ke,
1801
- measuringScheduled: mt
1802
- } = gr(yt, {
1803
- dragging: S,
1804
- dependencies: [R.x, R.y],
1805
- config: le.droppable
1806
- }), W = fr(b, p), wt = A(() => Q ? $e(Q) : null, [Q]), Dt = bn(), xt = vr(W, le.draggable.measure);
1807
- Lr({
1808
- activeNode: p != null ? b.get(p) : null,
1809
- config: Dt.layoutShiftCompensation,
1810
- initialRect: xt,
1811
- measure: le.draggable.measure
1812
- });
1813
- const Y = Ft(W, le.draggable.measure, xt), Ve = Ft(W ? W.parentElement : null), ce = P({
1814
- activatorEvent: null,
1815
- active: null,
1816
- activeNode: W,
1817
- collisionRect: null,
1818
- collisions: null,
1819
- droppableRects: he,
1820
- draggableNodes: b,
1821
- draggingNode: null,
1822
- draggingNodeRect: null,
1823
- droppableContainers: k,
1824
- over: null,
1825
- scrollableAncestors: [],
1826
- scrollAdjustedTranslate: null
1827
- }), Ct = k.getNodeFor((n = ce.current.over) == null ? void 0 : n.id), ue = Sr({
1828
- measure: le.dragOverlay.measure
1829
- }), Ie = (r = ue.nodeRef.current) != null ? r : W, ge = S ? (i = ue.rect) != null ? i : Y : null, St = !!(ue.nodeRef.current && ue.rect), Rt = yr(St ? null : Y), Ge = on(Ie ? J(Ie) : null), te = mr(S ? Ct ?? W : null), Pe = Cr(te), ze = cn(f, {
1830
- transform: {
1831
- x: R.x - Rt.x,
1832
- y: R.y - Rt.y,
1833
- scaleX: 1,
1834
- scaleY: 1
1835
- },
1836
- activatorEvent: Q,
1837
- active: G,
1838
- activeNodeRect: Y,
1839
- containerNodeRect: Ve,
1840
- draggingNodeRect: ge,
1841
- over: ce.current.over,
1842
- overlayNodeRect: ue.rect,
1843
- scrollableAncestors: te,
1844
- scrollableAncestorRects: Pe,
1845
- windowRect: Ge
1846
- }), Et = wt ? ye(wt, R) : null, At = wr(te), un = Kt(At), dn = Kt(At, [Y]), ve = ye(ze, un), pe = ge ? Yn(ge, ze) : null, we = G && pe ? u({
1847
- active: G,
1848
- collisionRect: pe,
1849
- droppableRects: he,
1850
- droppableContainers: yt,
1851
- pointerCoordinates: Et
1852
- }) : null, Ot = $n(we, "id"), [ne, Nt] = K(null), fn = St ? ze : ye(ze, dn), hn = jn(fn, (o = ne == null ? void 0 : ne.rect) != null ? o : null, Y), Qe = P(null), Mt = U(
1853
- (z, B) => {
1854
- let {
1855
- sensor: F,
1856
- options: re
1857
- } = B;
1858
- if (ee.current == null)
1859
- return;
1860
- const X = b.get(ee.current);
1861
- if (!X)
1862
- return;
1863
- const $ = z.nativeEvent, _ = new F({
1864
- active: ee.current,
1865
- activeNode: X,
1866
- event: $,
1867
- options: re,
1868
- // Sensors need to be instantiated with refs for arguments that change over time
1869
- // otherwise they are frozen in time with the stale arguments
1870
- context: ce,
1871
- onAbort(I) {
1872
- if (!b.get(I))
1873
- return;
1874
- const {
1875
- onDragAbort: q
1876
- } = ae.current, Z = {
1877
- id: I
1878
- };
1879
- q == null || q(Z), w({
1880
- type: "onDragAbort",
1881
- event: Z
1882
- });
1883
- },
1884
- onPending(I, oe, q, Z) {
1885
- if (!b.get(I))
1886
- return;
1887
- const {
1888
- onDragPending: xe
1889
- } = ae.current, ie = {
1890
- id: I,
1891
- constraint: oe,
1892
- initialCoordinates: q,
1893
- offset: Z
1894
- };
1895
- xe == null || xe(ie), w({
1896
- type: "onDragPending",
1897
- event: ie
1898
- });
1899
- },
1900
- onStart(I) {
1901
- const oe = ee.current;
1902
- if (oe == null)
1903
- return;
1904
- const q = b.get(oe);
1905
- if (!q)
1906
- return;
1907
- const {
1908
- onDragStart: Z
1909
- } = ae.current, De = {
1910
- activatorEvent: $,
1911
- active: {
1912
- id: oe,
1913
- data: q.data,
1914
- rect: V
1915
- }
1916
- };
1917
- Be(() => {
1918
- Z == null || Z(De), C(se.Initializing), y({
1919
- type: N.DragStart,
1920
- initialCoordinates: I,
1921
- active: oe
1922
- }), w({
1923
- type: "onDragStart",
1924
- event: De
1925
- }), pt(Qe.current), bt($);
1926
- });
1927
- },
1928
- onMove(I) {
1929
- y({
1930
- type: N.DragMove,
1931
- coordinates: I
1932
- });
1933
- },
1934
- onEnd: be(N.DragEnd),
1935
- onCancel: be(N.DragCancel)
1936
- });
1937
- Qe.current = _;
1938
- function be(I) {
1939
- return async function() {
1940
- const {
1941
- active: q,
1942
- collisions: Z,
1943
- over: De,
1944
- scrollAdjustedTranslate: xe
1945
- } = ce.current;
1946
- let ie = null;
1947
- if (q && xe) {
1948
- const {
1949
- cancelDrop: Ce
1950
- } = ae.current;
1951
- ie = {
1952
- activatorEvent: $,
1953
- active: q,
1954
- collisions: Z,
1955
- delta: xe,
1956
- over: De
1957
- }, I === N.DragEnd && typeof Ce == "function" && await Promise.resolve(Ce(ie)) && (I = N.DragCancel);
1958
- }
1959
- ee.current = null, Be(() => {
1960
- y({
1961
- type: I
1962
- }), C(se.Uninitialized), Nt(null), pt(null), bt(null), Qe.current = null;
1963
- const Ce = I === N.DragEnd ? "onDragEnd" : "onDragCancel";
1964
- if (ie) {
1965
- const Ze = ae.current[Ce];
1966
- Ze == null || Ze(ie), w({
1967
- type: Ce,
1968
- event: ie
1969
- });
1970
- }
1971
- });
1972
- };
1973
- }
1974
- },
1975
- // eslint-disable-next-line react-hooks/exhaustive-deps
1976
- [b]
1977
- ), gn = U((z, B) => (F, re) => {
1978
- const X = F.nativeEvent, $ = b.get(re);
1979
- if (
1980
- // Another sensor is already instantiating
1981
- ee.current !== null || // No active draggable
1982
- !$ || // Event has already been captured
1983
- X.dndKit || X.defaultPrevented
1984
- )
1985
- return;
1986
- const _ = {
1987
- active: $
1988
- };
1989
- z(F, B.options, _) === !0 && (X.dndKit = {
1990
- capturedBy: B.sensor
1991
- }, ee.current = re, Mt(F, B));
1992
- }, [b, Mt]), Tt = hr(d, gn);
1993
- Dr(d), fe(() => {
1994
- Y && T === se.Initializing && C(se.Initialized);
1995
- }, [Y, T]), O(
1996
- () => {
1997
- const {
1998
- onDragMove: z
1999
- } = ae.current, {
2000
- active: B,
2001
- activatorEvent: F,
2002
- collisions: re,
2003
- over: X
2004
- } = ce.current;
2005
- if (!B || !F)
2006
- return;
2007
- const $ = {
2008
- active: B,
2009
- activatorEvent: F,
2010
- collisions: re,
2011
- delta: {
2012
- x: ve.x,
2013
- y: ve.y
2014
- },
2015
- over: X
2016
- };
2017
- Be(() => {
2018
- z == null || z($), w({
2019
- type: "onDragMove",
2020
- event: $
2021
- });
2022
- });
2023
- },
2024
- // eslint-disable-next-line react-hooks/exhaustive-deps
2025
- [ve.x, ve.y]
2026
- ), O(
2027
- () => {
2028
- const {
2029
- active: z,
2030
- activatorEvent: B,
2031
- collisions: F,
2032
- droppableContainers: re,
2033
- scrollAdjustedTranslate: X
2034
- } = ce.current;
2035
- if (!z || ee.current == null || !B || !X)
2036
- return;
2037
- const {
2038
- onDragOver: $
2039
- } = ae.current, _ = re.get(Ot), be = _ && _.rect.current ? {
2040
- id: _.id,
2041
- rect: _.rect.current,
2042
- data: _.data,
2043
- disabled: _.disabled
2044
- } : null, I = {
2045
- active: z,
2046
- activatorEvent: B,
2047
- collisions: F,
2048
- delta: {
2049
- x: X.x,
2050
- y: X.y
2051
- },
2052
- over: be
2053
- };
2054
- Be(() => {
2055
- Nt(be), $ == null || $(I), w({
2056
- type: "onDragOver",
2057
- event: I
2058
- });
2059
- });
2060
- },
2061
- // eslint-disable-next-line react-hooks/exhaustive-deps
2062
- [Ot]
2063
- ), fe(() => {
2064
- ce.current = {
2065
- activatorEvent: Q,
2066
- active: G,
2067
- activeNode: W,
2068
- collisionRect: pe,
2069
- collisions: we,
2070
- droppableRects: he,
2071
- draggableNodes: b,
2072
- draggingNode: Ie,
2073
- draggingNodeRect: ge,
2074
- droppableContainers: k,
2075
- over: ne,
2076
- scrollableAncestors: te,
2077
- scrollAdjustedTranslate: ve
2078
- }, V.current = {
2079
- initial: ge,
2080
- translated: pe
2081
- };
2082
- }, [G, W, we, pe, b, Ie, ge, he, k, ne, te, ve]), cr({
2083
- ...Dt,
2084
- delta: R,
2085
- draggingRect: pe,
2086
- pointerCoordinates: Et,
2087
- scrollableAncestors: te,
2088
- scrollableAncestorRects: Pe
2089
- });
2090
- const vn = A(() => ({
2091
- active: G,
2092
- activeNode: W,
2093
- activeNodeRect: Y,
2094
- activatorEvent: Q,
2095
- collisions: we,
2096
- containerNodeRect: Ve,
2097
- dragOverlay: ue,
2098
- draggableNodes: b,
2099
- droppableContainers: k,
2100
- droppableRects: he,
2101
- over: ne,
2102
- measureDroppableContainers: ke,
2103
- scrollableAncestors: te,
2104
- scrollableAncestorRects: Pe,
2105
- measuringConfiguration: le,
2106
- measuringScheduled: mt,
2107
- windowRect: Ge
2108
- }), [G, W, Y, Q, we, Ve, ue, b, k, he, ne, ke, te, Pe, le, mt, Ge]), pn = A(() => ({
2109
- activatorEvent: Q,
2110
- activators: Tt,
2111
- active: G,
2112
- activeNodeRect: Y,
2113
- ariaDescribedById: {
2114
- draggable: Je
2115
- },
2116
- dispatch: y,
2117
- draggableNodes: b,
2118
- over: ne,
2119
- measureDroppableContainers: ke
2120
- }), [Q, Tt, G, Y, y, Je, b, ne, ke]);
2121
- return M.createElement(Ut.Provider, {
2122
- value: m
2123
- }, M.createElement(Le.Provider, {
2124
- value: pn
2125
- }, M.createElement(ln.Provider, {
2126
- value: vn
2127
- }, M.createElement(qe.Provider, {
2128
- value: hn
2129
- }, c)), M.createElement(Mr, {
2130
- disabled: (s == null ? void 0 : s.restoreFocus) === !1
2131
- })), M.createElement(In, {
2132
- ...s,
2133
- hiddenTextDescribedById: Je
2134
- }));
2135
- function bn() {
2136
- const z = (vt == null ? void 0 : vt.autoScrollEnabled) === !1, B = typeof l == "object" ? l.enabled === !1 : l === !1, F = S && !z && !B;
2137
- return typeof l == "object" ? {
2138
- ...l,
2139
- enabled: F
2140
- } : {
2141
- enabled: F
2142
- };
2143
- }
2144
- }), kr = /* @__PURE__ */ Ne(null), jt = "button", Ir = "Draggable";
2145
- function oo(e) {
2146
- let {
2147
- id: t,
2148
- data: n,
2149
- disabled: r = !1,
2150
- attributes: i
2151
- } = e;
2152
- const o = Ue(Ir), {
2153
- activators: a,
2154
- activatorEvent: s,
2155
- active: l,
2156
- activeNodeRect: c,
2157
- ariaDescribedById: d,
2158
- draggableNodes: u,
2159
- over: g
2160
- } = de(Le), {
2161
- role: f = jt,
2162
- roleDescription: x = "draggable",
2163
- tabIndex: h = 0
2164
- } = i ?? {}, v = (l == null ? void 0 : l.id) === t, y = de(v ? qe : kr), [w, m] = je(), [T, C] = je(), S = xr(a, t), p = Ae(n);
2165
- fe(
2166
- () => (u.set(t, {
2167
- id: t,
2168
- key: o,
2169
- node: w,
2170
- activatorNode: T,
2171
- data: p
2172
- }), () => {
2173
- const R = u.get(t);
2174
- R && R.key === o && u.delete(t);
2175
- }),
2176
- // eslint-disable-next-line react-hooks/exhaustive-deps
2177
- [u, t]
2178
- );
2179
- const b = A(() => ({
2180
- role: f,
2181
- tabIndex: h,
2182
- "aria-disabled": r,
2183
- "aria-pressed": v && f === jt ? !0 : void 0,
2184
- "aria-roledescription": x,
2185
- "aria-describedby": d.draggable
2186
- }), [r, f, h, v, x, d.draggable]);
2187
- return {
2188
- active: l,
2189
- activatorEvent: s,
2190
- activeNodeRect: c,
2191
- attributes: b,
2192
- isDragging: v,
2193
- listeners: r ? void 0 : S,
2194
- node: w,
2195
- over: g,
2196
- setNodeRef: m,
2197
- setActivatorNodeRef: C,
2198
- transform: y
2199
- };
2200
- }
2201
- function Pr() {
2202
- return de(ln);
2203
- }
2204
- const zr = "Droppable", Br = {
2205
- timeout: 25
2206
- };
2207
- function io(e) {
2208
- let {
2209
- data: t,
2210
- disabled: n = !1,
2211
- id: r,
2212
- resizeObserverConfig: i
2213
- } = e;
2214
- const o = Ue(zr), {
2215
- active: a,
2216
- dispatch: s,
2217
- over: l,
2218
- measureDroppableContainers: c
2219
- } = de(Le), d = P({
2220
- disabled: n
2221
- }), u = P(!1), g = P(null), f = P(null), {
2222
- disabled: x,
2223
- updateMeasurementsFor: h,
2224
- timeout: v
2225
- } = {
2226
- ...Br,
2227
- ...i
2228
- }, y = Ae(h ?? r), w = U(
2229
- () => {
2230
- if (!u.current) {
2231
- u.current = !0;
2232
- return;
2233
- }
2234
- f.current != null && clearTimeout(f.current), f.current = setTimeout(() => {
2235
- c(Array.isArray(y.current) ? y.current : [y.current]), f.current = null;
2236
- }, v);
2237
- },
2238
- //eslint-disable-next-line react-hooks/exhaustive-deps
2239
- [v]
2240
- ), m = _e({
2241
- callback: w,
2242
- disabled: x || !a
2243
- }), T = U((b, R) => {
2244
- m && (R && (m.unobserve(R), u.current = !1), b && m.observe(b));
2245
- }, [m]), [C, S] = je(T), p = Ae(t);
2246
- return O(() => {
2247
- !m || !C.current || (m.disconnect(), u.current = !1, m.observe(C.current));
2248
- }, [C, m]), O(
2249
- () => (s({
2250
- type: N.RegisterDroppable,
2251
- element: {
2252
- id: r,
2253
- key: o,
2254
- disabled: n,
2255
- node: C,
2256
- rect: g,
2257
- data: p
2258
- }
2259
- }), () => s({
2260
- type: N.UnregisterDroppable,
2261
- key: o,
2262
- id: r
2263
- })),
2264
- // eslint-disable-next-line react-hooks/exhaustive-deps
2265
- [r]
2266
- ), O(() => {
2267
- n !== d.current.disabled && (s({
2268
- type: N.SetDroppableDisabled,
2269
- id: r,
2270
- key: o,
2271
- disabled: n
2272
- }), d.current.disabled = n);
2273
- }, [r, o, n, s]), {
2274
- active: a,
2275
- rect: g,
2276
- isOver: (l == null ? void 0 : l.id) === r,
2277
- node: C,
2278
- over: l,
2279
- setNodeRef: S
2280
- };
2281
- }
2282
- function Fr(e) {
2283
- let {
2284
- animation: t,
2285
- children: n
2286
- } = e;
2287
- const [r, i] = K(null), [o, a] = K(null), s = Ke(n);
2288
- return !n && !r && s && i(s), fe(() => {
2289
- if (!o)
2290
- return;
2291
- const l = r == null ? void 0 : r.key, c = r == null ? void 0 : r.props.id;
2292
- if (l == null || c == null) {
2293
- i(null);
2294
- return;
2295
- }
2296
- Promise.resolve(t(c, o)).then(() => {
2297
- i(null);
2298
- });
2299
- }, [t, r, o]), M.createElement(M.Fragment, null, n, r ? wn(r, {
2300
- ref: a
2301
- }) : null);
2302
- }
2303
- const $r = {
2304
- x: 0,
2305
- y: 0,
2306
- scaleX: 1,
2307
- scaleY: 1
2308
- };
2309
- function Kr(e) {
2310
- let {
2311
- children: t
2312
- } = e;
2313
- return M.createElement(Le.Provider, {
2314
- value: an
2315
- }, M.createElement(qe.Provider, {
2316
- value: $r
2317
- }, t));
2318
- }
2319
- const Xr = {
2320
- position: "fixed",
2321
- touchAction: "none"
2322
- }, jr = (e) => lt(e) ? "transform 250ms ease" : void 0, Wr = /* @__PURE__ */ Dn((e, t) => {
2323
- let {
2324
- as: n,
2325
- activatorEvent: r,
2326
- adjustScale: i,
2327
- children: o,
2328
- className: a,
2329
- rect: s,
2330
- style: l,
2331
- transform: c,
2332
- transition: d = jr
2333
- } = e;
2334
- if (!s)
2335
- return null;
2336
- const u = i ? c : {
2337
- ...c,
2338
- scaleX: 1,
2339
- scaleY: 1
2340
- }, g = {
2341
- ...Xr,
2342
- width: s.width,
2343
- height: s.height,
2344
- top: s.top,
2345
- left: s.left,
2346
- transform: rt.Transform.toString(u),
2347
- transformOrigin: i && r ? zn(r, s) : void 0,
2348
- transition: typeof d == "function" ? d(r) : d,
2349
- ...l
2350
- };
2351
- return M.createElement(n, {
2352
- className: a,
2353
- style: g,
2354
- ref: t
2355
- }, o);
2356
- }), Yr = (e) => (t) => {
2357
- let {
2358
- active: n,
2359
- dragOverlay: r
2360
- } = t;
2361
- const i = {}, {
2362
- styles: o,
2363
- className: a
2364
- } = e;
2365
- if (o != null && o.active)
2366
- for (const [s, l] of Object.entries(o.active))
2367
- l !== void 0 && (i[s] = n.node.style.getPropertyValue(s), n.node.style.setProperty(s, l));
2368
- if (o != null && o.dragOverlay)
2369
- for (const [s, l] of Object.entries(o.dragOverlay))
2370
- l !== void 0 && r.node.style.setProperty(s, l);
2371
- return a != null && a.active && n.node.classList.add(a.active), a != null && a.dragOverlay && r.node.classList.add(a.dragOverlay), function() {
2372
- for (const [l, c] of Object.entries(i))
2373
- n.node.style.setProperty(l, c);
2374
- a != null && a.active && n.node.classList.remove(a.active);
2375
- };
2376
- }, Ur = (e) => {
2377
- let {
2378
- transform: {
2379
- initial: t,
2380
- final: n
2381
- }
2382
- } = e;
2383
- return [{
2384
- transform: rt.Transform.toString(t)
2385
- }, {
2386
- transform: rt.Transform.toString(n)
2387
- }];
2388
- }, Hr = {
2389
- duration: 250,
2390
- easing: "ease",
2391
- keyframes: Ur,
2392
- sideEffects: /* @__PURE__ */ Yr({
2393
- styles: {
2394
- active: {
2395
- opacity: "0"
2396
- }
2397
- }
2398
- })
2399
- };
2400
- function _r(e) {
2401
- let {
2402
- config: t,
2403
- draggableNodes: n,
2404
- droppableContainers: r,
2405
- measuringConfiguration: i
2406
- } = e;
2407
- return ct((o, a) => {
2408
- if (t === null)
2409
- return;
2410
- const s = n.get(o);
2411
- if (!s)
2412
- return;
2413
- const l = s.node.current;
2414
- if (!l)
2415
- return;
2416
- const c = sn(a);
2417
- if (!c)
2418
- return;
2419
- const {
2420
- transform: d
2421
- } = J(a).getComputedStyle(a), u = _t(d);
2422
- if (!u)
2423
- return;
2424
- const g = typeof t == "function" ? t : qr(t);
2425
- return en(l, i.draggable.measure), g({
2426
- active: {
2427
- id: o,
2428
- data: s.data,
2429
- node: l,
2430
- rect: i.draggable.measure(l)
2431
- },
2432
- draggableNodes: n,
2433
- dragOverlay: {
2434
- node: a,
2435
- rect: i.dragOverlay.measure(c)
2436
- },
2437
- droppableContainers: r,
2438
- measuringConfiguration: i,
2439
- transform: u
2440
- });
2441
- });
2442
- }
2443
- function qr(e) {
2444
- const {
2445
- duration: t,
2446
- easing: n,
2447
- sideEffects: r,
2448
- keyframes: i
2449
- } = {
2450
- ...Hr,
2451
- ...e
2452
- };
2453
- return (o) => {
2454
- let {
2455
- active: a,
2456
- dragOverlay: s,
2457
- transform: l,
2458
- ...c
2459
- } = o;
2460
- if (!t)
2461
- return;
2462
- const d = {
2463
- x: s.rect.left - a.rect.left,
2464
- y: s.rect.top - a.rect.top
2465
- }, u = {
2466
- scaleX: l.scaleX !== 1 ? a.rect.width * l.scaleX / s.rect.width : 1,
2467
- scaleY: l.scaleY !== 1 ? a.rect.height * l.scaleY / s.rect.height : 1
2468
- }, g = {
2469
- x: l.x - d.x,
2470
- y: l.y - d.y,
2471
- ...u
2472
- }, f = i({
2473
- ...c,
2474
- active: a,
2475
- dragOverlay: s,
2476
- transform: {
2477
- initial: l,
2478
- final: g
2479
- }
2480
- }), [x] = f, h = f[f.length - 1];
2481
- if (JSON.stringify(x) === JSON.stringify(h))
2482
- return;
2483
- const v = r == null ? void 0 : r({
2484
- active: a,
2485
- dragOverlay: s,
2486
- ...c
2487
- }), y = s.node.animate(f, {
2488
- duration: t,
2489
- easing: n,
2490
- fill: "forwards"
2491
- });
2492
- return new Promise((w) => {
2493
- y.onfinish = () => {
2494
- v == null || v(), w();
2495
- };
2496
- });
2497
- };
2498
- }
2499
- let Wt = 0;
2500
- function Jr(e) {
2501
- return A(() => {
2502
- if (e != null)
2503
- return Wt++, Wt;
2504
- }, [e]);
2505
- }
2506
- const so = /* @__PURE__ */ M.memo((e) => {
2507
- let {
2508
- adjustScale: t = !1,
2509
- children: n,
2510
- dropAnimation: r,
2511
- style: i,
2512
- transition: o,
2513
- modifiers: a,
2514
- wrapperElement: s = "div",
2515
- className: l,
2516
- zIndex: c = 999
2517
- } = e;
2518
- const {
2519
- activatorEvent: d,
2520
- active: u,
2521
- activeNodeRect: g,
2522
- containerNodeRect: f,
2523
- draggableNodes: x,
2524
- droppableContainers: h,
2525
- dragOverlay: v,
2526
- over: y,
2527
- measuringConfiguration: w,
2528
- scrollableAncestors: m,
2529
- scrollableAncestorRects: T,
2530
- windowRect: C
2531
- } = Pr(), S = de(qe), p = Jr(u == null ? void 0 : u.id), b = cn(a, {
2532
- activatorEvent: d,
2533
- active: u,
2534
- activeNodeRect: g,
2535
- containerNodeRect: f,
2536
- draggingNodeRect: v.rect,
2537
- over: y,
2538
- overlayNodeRect: v.rect,
2539
- scrollableAncestors: m,
2540
- scrollableAncestorRects: T,
2541
- transform: S,
2542
- windowRect: C
2543
- }), R = gt(g), k = _r({
2544
- config: r,
2545
- draggableNodes: x,
2546
- droppableContainers: h,
2547
- measuringConfiguration: w
2548
- }), E = R ? v.setRef : void 0;
2549
- return M.createElement(Kr, null, M.createElement(Fr, {
2550
- animation: k
2551
- }, u && p ? M.createElement(Wr, {
2552
- key: p,
2553
- id: u.id,
2554
- ref: E,
2555
- as: s,
2556
- activatorEvent: d,
2557
- adjustScale: t,
2558
- className: l,
2559
- transition: o,
2560
- rect: R,
2561
- style: {
2562
- zIndex: c,
2563
- ...i
2564
- },
2565
- transform: b
2566
- }, n) : null));
2567
- });
1
+ import e from "./index.es188.js";
2
+ const a = e("ExpandMore", [
3
+ [
4
+ "path",
5
+ {
6
+ d: "M16.59 8.29492L12 12.8749L7.41 8.29492L6 9.70492L12 15.7049L18 9.70492L16.59 8.29492Z",
7
+ key: "1h4imv"
8
+ }
9
+ ]
10
+ ]);
2568
11
  export {
2569
- Re as AutoScrollActivator,
2570
- ro as DndContext,
2571
- so as DragOverlay,
2572
- D as KeyboardCode,
2573
- nn as KeyboardSensor,
2574
- st as MeasuringFrequency,
2575
- Oe as MeasuringStrategy,
2576
- ar as MouseSensor,
2577
- rn as PointerSensor,
2578
- lr as TouchSensor,
2579
- Ye as TraversalOrder,
2580
- cn as applyModifiers,
2581
- no as closestCenter,
2582
- kn as defaultAnnouncements,
2583
- H as defaultCoordinates,
2584
- Hr as defaultDropAnimation,
2585
- Yr as defaultDropAnimationSideEffects,
2586
- or as defaultKeyboardCoordinateGetter,
2587
- Ln as defaultScreenReaderInstructions,
2588
- Te as getClientRect,
2589
- $n as getFirstCollision,
2590
- dt as getScrollableAncestors,
2591
- Xn as rectIntersection,
2592
- Pr as useDndContext,
2593
- Mn as useDndMonitor,
2594
- oo as useDraggable,
2595
- io as useDroppable,
2596
- eo as useSensor,
2597
- to as useSensors
12
+ a as default
2598
13
  };