@aussieljk/forkbook 0.0.1-10 → 0.0.1-12

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 (346) hide show
  1. package/README.md +1 -1
  2. package/assets/create/rendererAssets/common/button.css +6 -6
  3. package/assets/create/rendererAssets/common/header.css +5 -5
  4. package/assets/create/rendererAssets/common/page.css +10 -10
  5. package/assets/server/template.ejs +6 -3
  6. package/dist/_browser-chunks/{Color-X63I7FHI.js → Color-TA43572R.js} +2 -2
  7. package/dist/_browser-chunks/{DocsRenderer-JXND3PVQ.js → DocsRenderer-DKXSW2OY.js} +2 -2
  8. package/dist/_browser-chunks/{WithTooltip-5S6F2P7L.js → WithTooltip-66AWY4VQ.js} +5 -4
  9. package/dist/_browser-chunks/{chunk-RBCHTR7C.js → chunk-2ELGJRFZ.js} +1 -1
  10. package/dist/_browser-chunks/{chunk-DYNTDJ3O.js → chunk-2UKY4NXZ.js} +1 -1
  11. package/dist/_browser-chunks/{chunk-I4ATZPNZ.js → chunk-2WMECYEY.js} +3 -3
  12. package/dist/_browser-chunks/{chunk-6ELMKWKX.js → chunk-2WZWS7GJ.js} +1 -1
  13. package/dist/_browser-chunks/{chunk-N3NRW5XX.js → chunk-2YWS25WY.js} +1 -1
  14. package/dist/_browser-chunks/{chunk-NGMQJMCY.js → chunk-3O4QUF3D.js} +1 -1
  15. package/dist/_browser-chunks/{chunk-GNZY6LOW.js → chunk-5MRMYSUN.js} +4 -4
  16. package/dist/_browser-chunks/{chunk-RMYQ3QN3.js → chunk-5XGERZHU.js} +15 -12
  17. package/dist/_browser-chunks/{chunk-5WMXI5GW.js → chunk-AQVUHXWY.js} +6 -4
  18. package/dist/_browser-chunks/{chunk-ZHKZKFY4.js → chunk-ARZTIHZK.js} +6 -10
  19. package/dist/_browser-chunks/{chunk-DS2WQZGO.js → chunk-D2Z5KXPS.js} +12 -41
  20. package/dist/_browser-chunks/{chunk-EQKMUQF3.js → chunk-DT7BB545.js} +3 -2
  21. package/dist/_browser-chunks/{chunk-76222HQR.js → chunk-E6QKKKLO.js} +20 -5
  22. package/dist/_browser-chunks/{chunk-5Z65SURM.js → chunk-F22A5EGD.js} +4 -4
  23. package/dist/_browser-chunks/{chunk-3M5T7BW4.js → chunk-GGALYEQS.js} +1 -1
  24. package/dist/_browser-chunks/{chunk-TTBPZQ24.js → chunk-HGIW4I4J.js} +11 -18
  25. package/dist/_browser-chunks/{chunk-46Z7NGAS.js → chunk-HX443LKV.js} +1 -1
  26. package/dist/_browser-chunks/{chunk-KYSD26D6.js → chunk-IGD46SQI.js} +90 -83
  27. package/dist/_browser-chunks/{chunk-LTCXWKZO.js → chunk-QSYOMLRG.js} +667 -624
  28. package/dist/_browser-chunks/{chunk-2JT76G3E.js → chunk-SBOQ4QPY.js} +15 -15
  29. package/dist/_browser-chunks/{chunk-O24AZJZ7.js → chunk-UDR26TXA.js} +2 -2
  30. package/dist/_browser-chunks/{chunk-5I7E4GMO.js → chunk-WY2LUGOH.js} +1 -1
  31. package/dist/_browser-chunks/{chunk-7DQREF4S.js → chunk-XV3AEPJW.js} +1 -1
  32. package/dist/_browser-chunks/{matchers-YLBYSYAF.js → matchers-2HVLNCVO.js} +4 -4
  33. package/dist/_browser-chunks/{react-dom-client-4OHE3QDV.js → react-dom-client-SLBUX3U3.js} +1 -1
  34. package/dist/_node-chunks/{attached-runtime-PDBJ2EGV.js → attached-runtime-AU2RZM4Y.js} +28 -29
  35. package/dist/_node-chunks/{builder-manager-VLL26RPG.js → builder-manager-UPXA2KKT.js} +39 -28
  36. package/dist/_node-chunks/{chunk-FR2ZDWKJ.js → chunk-22A63J7O.js} +7 -7
  37. package/dist/_node-chunks/{chunk-ZBWAA2EY.js → chunk-22TWJGGQ.js} +28 -43
  38. package/dist/_node-chunks/{chunk-M4QNXI37.js → chunk-2GJBHF56.js} +6 -6
  39. package/dist/_node-chunks/{chunk-TNFH4Y4G.js → chunk-2MGPZNKV.js} +280 -306
  40. package/dist/_node-chunks/{chunk-KRWR44KT.js → chunk-2Q3YWQSK.js} +6 -6
  41. package/dist/_node-chunks/{chunk-6DRVJCYP.js → chunk-2W525A4I.js} +7 -7
  42. package/dist/_node-chunks/{chunk-ZFLK7MY5.js → chunk-2X3WAH7V.js} +7 -7
  43. package/dist/_node-chunks/{chunk-FERXOKZY.js → chunk-34DNGOCZ.js} +8 -8
  44. package/dist/_node-chunks/{chunk-ID3WA6WR.js → chunk-3MJZ5GI2.js} +6 -6
  45. package/dist/_node-chunks/{chunk-AAL6X7YG.js → chunk-3X67K6EI.js} +136 -114
  46. package/dist/_node-chunks/{chunk-QGC3UWR5.js → chunk-5KMW5XXM.js} +6 -6
  47. package/dist/_node-chunks/{chunk-FXBZWUW3.js → chunk-5MYXWAKD.js} +512 -1033
  48. package/dist/_node-chunks/chunk-5N7YRHXJ.js +20 -0
  49. package/dist/_node-chunks/{chunk-QGVU7IFS.js → chunk-6772LYNF.js} +7 -7
  50. package/dist/_node-chunks/{chunk-IGOX6TUG.js → chunk-76M6JG5T.js} +7 -7
  51. package/dist/_node-chunks/{chunk-MKUA4ZCG.js → chunk-7F6TIY4T.js} +8 -8
  52. package/dist/_node-chunks/{chunk-KWNBN3DV.js → chunk-7SBWGNA7.js} +10 -10
  53. package/dist/_node-chunks/chunk-ABCEMTIP.js +20 -0
  54. package/dist/_node-chunks/{chunk-JVWXCB3L.js → chunk-AHNN3TQH.js} +8 -8
  55. package/dist/_node-chunks/{chunk-CEDR5CNM.js → chunk-BDATIKVV.js} +7 -7
  56. package/dist/_node-chunks/{chunk-K4O2ZAMU.js → chunk-BMM74ZQW.js} +6 -6
  57. package/dist/_node-chunks/{chunk-DR7NW2MI.js → chunk-BOWRRVJM.js} +6 -6
  58. package/dist/_node-chunks/{chunk-FRBE7ES4.js → chunk-BTDLJXAT.js} +6 -6
  59. package/dist/_node-chunks/{chunk-GKHLTHYM.js → chunk-C2HVGXLD.js} +224 -181
  60. package/dist/_node-chunks/chunk-CWIJ2D5F.js +18 -0
  61. package/dist/_node-chunks/{chunk-QOFBJXPH.js → chunk-DNX4BLMS.js} +7 -7
  62. package/dist/_node-chunks/{chunk-G2ZUFOHU.js → chunk-DXR3YGRT.js} +6 -6
  63. package/dist/_node-chunks/{chunk-GBVWRZHP.js → chunk-EFZAYIPN.js} +6 -6
  64. package/dist/_node-chunks/{chunk-MY7UVHPL.js → chunk-FAR3NIPG.js} +8 -8
  65. package/dist/_node-chunks/{chunk-MBPHOLXB.js → chunk-FFUIQJRI.js} +32 -40
  66. package/dist/_node-chunks/{chunk-TZIT6SZP.js → chunk-FKI7K3GE.js} +6 -6
  67. package/dist/_node-chunks/{chunk-VSHYJR23.js → chunk-FR67COFW.js} +7 -7
  68. package/dist/_node-chunks/chunk-FUDG3QKB.js +25 -0
  69. package/dist/_node-chunks/chunk-G6GOV7H7.js +19 -0
  70. package/dist/_node-chunks/{chunk-DRCP3DQF.js → chunk-H7UVQBCQ.js} +8 -8
  71. package/dist/_node-chunks/{chunk-CSFNS7HA.js → chunk-HMQUTLMS.js} +6 -6
  72. package/dist/_node-chunks/{chunk-VG2KFIOW.js → chunk-HPXM4SGT.js} +9 -9
  73. package/dist/_node-chunks/{chunk-MQC7ZY6L.js → chunk-HW4T3OXA.js} +7 -7
  74. package/dist/_node-chunks/{chunk-QVLHVO4X.js → chunk-HW7RCOV4.js} +8 -8
  75. package/dist/_node-chunks/{chunk-NGFFEW2B.js → chunk-IFHNMS7I.js} +19 -19
  76. package/dist/_node-chunks/{chunk-IL7YA7QJ.js → chunk-IKUSSZJ3.js} +10 -10
  77. package/dist/_node-chunks/{chunk-OPG46TLN.js → chunk-IOXDHKFF.js} +7 -7
  78. package/dist/_node-chunks/chunk-J3CNNXKQ.js +11 -0
  79. package/dist/_node-chunks/{chunk-ACSO4HQP.js → chunk-JB4457FJ.js} +6 -6
  80. package/dist/_node-chunks/{chunk-T5VZYRL2.js → chunk-JHX35YKT.js} +6 -6
  81. package/dist/_node-chunks/{chunk-CKE4R4NL.js → chunk-JKPKEYSH.js} +6 -6
  82. package/dist/_node-chunks/{chunk-RC4HPD5Q.js → chunk-JMFTALJW.js} +6 -6
  83. package/dist/_node-chunks/{chunk-BDU3ZUMK.js → chunk-JXS4P2RM.js} +7 -7
  84. package/dist/_node-chunks/{chunk-7CV4VEA2.js → chunk-K2K6KTBC.js} +8 -8
  85. package/dist/_node-chunks/{chunk-THDTJJMO.js → chunk-KMC5WWQS.js} +7 -7
  86. package/dist/_node-chunks/{chunk-FJFB7TWU.js → chunk-KQTFSKC6.js} +8 -8
  87. package/dist/_node-chunks/{chunk-GQYATLH6.js → chunk-KZPWZM2E.js} +37 -34
  88. package/dist/_node-chunks/{chunk-FZ453CHY.js → chunk-LTJ4AYDM.js} +6 -6
  89. package/dist/_node-chunks/{chunk-LH5QBX2U.js → chunk-MNNESU33.js} +497 -475
  90. package/dist/_node-chunks/{chunk-FQGQ5KHN.js → chunk-MNQVVJZN.js} +6 -6
  91. package/dist/_node-chunks/{chunk-CZ3V3HHK.js → chunk-NO7MF6VR.js} +6 -6
  92. package/dist/_node-chunks/{chunk-MIWBXEUH.js → chunk-NPSIAK46.js} +6 -6
  93. package/dist/_node-chunks/{chunk-GGE7TBVX.js → chunk-NUSHY22I.js} +62 -7
  94. package/dist/_node-chunks/{chunk-YU5TVYPS.js → chunk-NXRZL2PR.js} +6 -6
  95. package/dist/_node-chunks/{chunk-7O2UIVID.js → chunk-O2CCUB5T.js} +7 -7
  96. package/dist/_node-chunks/{chunk-BNEC3EBC.js → chunk-ORSH2FXG.js} +6 -6
  97. package/dist/_node-chunks/{chunk-LX2XSPPL.js → chunk-OSNOV4EH.js} +7 -7
  98. package/dist/_node-chunks/{chunk-BPL3ERBH.js → chunk-PHB6QBHM.js} +10 -10
  99. package/dist/_node-chunks/{chunk-63LPGIV4.js → chunk-POA32M7F.js} +21 -21
  100. package/dist/_node-chunks/{chunk-QFXAGOIO.js → chunk-Q64ESHBN.js} +8 -8
  101. package/dist/_node-chunks/{chunk-SYUOBOB5.js → chunk-QBWGJYHY.js} +6 -6
  102. package/dist/_node-chunks/{chunk-7OY4VMAT.js → chunk-QSKVNZCF.js} +7 -7
  103. package/dist/_node-chunks/{chunk-MRCPS4S3.js → chunk-QX6RXAEU.js} +6 -6
  104. package/dist/_node-chunks/{chunk-RJXAXHDJ.js → chunk-R73PEGQU.js} +9 -9
  105. package/dist/_node-chunks/{chunk-3CSGIJKG.js → chunk-RHH7VDIY.js} +8 -8
  106. package/dist/_node-chunks/{chunk-BXDMSX3D.js → chunk-RMJNWFPV.js} +9 -9
  107. package/dist/_node-chunks/{chunk-GJSYGBI5.js → chunk-RT2LVWTC.js} +7 -7
  108. package/dist/_node-chunks/{chunk-5NRWU7S2.js → chunk-SPCPGRYF.js} +7 -7
  109. package/dist/_node-chunks/{chunk-FWAF5NBL.js → chunk-SUHBBHKR.js} +6 -6
  110. package/dist/_node-chunks/{chunk-SGEPJMTU.js → chunk-TXZTC6LA.js} +22 -22
  111. package/dist/_node-chunks/{chunk-5SMIGUYF.js → chunk-U5HVQTHI.js} +6 -6
  112. package/dist/_node-chunks/{chunk-LG3NMXCM.js → chunk-UFZUSE3Y.js} +6 -6
  113. package/dist/_node-chunks/{chunk-DQ44ZAEM.js → chunk-UGQFYYBC.js} +6 -6
  114. package/dist/_node-chunks/{chunk-R2ZCFA7I.js → chunk-UKLCYEZU.js} +7 -7
  115. package/dist/_node-chunks/{chunk-IUPE4SU2.js → chunk-VJEN2JM3.js} +8 -8
  116. package/dist/_node-chunks/{chunk-WVRM6DQU.js → chunk-W5ZAUN5R.js} +7 -7
  117. package/dist/_node-chunks/{chunk-7KD5DKGZ.js → chunk-WNEWL2PL.js} +6 -6
  118. package/dist/_node-chunks/{chunk-6DHTL5G2.js → chunk-WUVQ465T.js} +6 -6
  119. package/dist/_node-chunks/{chunk-3W4KR5GX.js → chunk-XCNYQV2M.js} +19 -15
  120. package/dist/_node-chunks/{chunk-VUMGWJ6Y.js → chunk-XOAWAXUH.js} +7 -7
  121. package/dist/_node-chunks/chunk-Y472MP5U.js +281 -0
  122. package/dist/_node-chunks/{chunk-HCP5DG52.js → chunk-ZCKTYMZT.js} +320 -316
  123. package/dist/_node-chunks/{chunk-ECOW63CV.js → chunk-ZUK5ZLPP.js} +8 -8
  124. package/dist/_node-chunks/dist-2DPC664Y.js +27 -0
  125. package/dist/_node-chunks/dist-XBFUDMFQ.js +16 -0
  126. package/dist/_node-chunks/{local-runtime-V5YTRN24.js → local-runtime-Z667YPXR.js} +19 -20
  127. package/dist/_node-chunks/{mdx-plugin-CBOD52VP.js → mdx-plugin-BPRPTZNP.js} +13 -13
  128. package/dist/_node-chunks/{monorepo-GF6H53U4.js → monorepo-GO54BY34.js} +11 -11
  129. package/dist/_node-chunks/{monorepo-optimized-tests-relaxed-limits-no-story-deletion-K4TTV2DQ.js → monorepo-optimized-tests-relaxed-limits-no-story-deletion-PEHFNJQ5.js} +11 -11
  130. package/dist/_node-chunks/optimized-tests-W7U4ZRWX.js +22 -0
  131. package/dist/_node-chunks/{pattern-copy-play-M2QNC4IZ.js → pattern-copy-play-64HQIVWK.js} +9 -9
  132. package/dist/_node-chunks/postinstallAddon-XM2BHKDN.js +20 -0
  133. package/dist/_node-chunks/{rehype-external-links-3IDE4CYH.js → rehype-external-links-2BSEZ7AC.js} +9 -9
  134. package/dist/_node-chunks/{rehype-slug-GKB3WS3U.js → rehype-slug-6253EA36.js} +9 -9
  135. package/dist/_node-chunks/{relaxed-limits-C6QU365N.js → relaxed-limits-4PAAPG3J.js} +11 -11
  136. package/dist/_node-chunks/{run-XWBUPXLN.js → run-3SQW3FRF.js} +18 -18
  137. package/dist/_node-chunks/{run-TMVS3KKA.js → run-XJT3YVMZ.js} +16 -16
  138. package/dist/_node-chunks/{setup-KEEJK4WI.js → setup-JIYCTADZ.js} +8 -8
  139. package/dist/_node-chunks/{vitest.config.4.template-74HEE4WJ.js → vitest.config.4.template-W74SGWHT.js} +7 -7
  140. package/dist/actions/decorator.js +12 -20
  141. package/dist/addon-a11y/index.js +2 -2
  142. package/dist/addon-a11y/manager.js +12 -12
  143. package/dist/addon-a11y/preset.js +7 -7
  144. package/dist/addon-a11y/preview.js +2 -2
  145. package/dist/addon-docs/blocks.d.ts +10 -6
  146. package/dist/addon-docs/blocks.js +28 -30
  147. package/dist/addon-docs/index.js +3 -3
  148. package/dist/addon-docs/manager.js +3 -3
  149. package/dist/addon-docs/preset.js +10 -10
  150. package/dist/addon-docs/preview.js +1 -1
  151. package/dist/addon-links/preview.d.ts +1 -1
  152. package/dist/addon-mcp/preset.js +9 -9
  153. package/dist/addon-mcp/tools/preview-stories/preview-stories-app-script.js +15 -15
  154. package/dist/addon-ondevice-controls/index.js +1 -1
  155. package/dist/addon-ondevice-controls/register.js +1 -1
  156. package/dist/addon-pseudo-states/index.js +1 -1
  157. package/dist/addon-pseudo-states/preview.js +1 -1
  158. package/dist/addon-themes/postinstall.js +7 -7
  159. package/dist/addon-vitest/constants.js +8 -8
  160. package/dist/addon-vitest/manager.js +18 -9
  161. package/dist/addon-vitest/node/coverage-reporter.js +11 -11
  162. package/dist/addon-vitest/node/vitest.js +28 -28
  163. package/dist/addon-vitest/postinstall.js +10 -10
  164. package/dist/addon-vitest/preset.js +15 -15
  165. package/dist/addon-vitest/vitest-plugin/global-setup.js +21 -21
  166. package/dist/addon-vitest/vitest-plugin/index.js +68 -58
  167. package/dist/babel/index.js +11 -11
  168. package/dist/bin/core.js +106 -88
  169. package/dist/bin/dispatcher.js +10 -10
  170. package/dist/bin/loader.js +8 -8
  171. package/dist/builder-vite/index.js +18 -18
  172. package/dist/builder-vite/preset.js +13 -13
  173. package/dist/channels/index.d.ts +1 -1
  174. package/dist/channels/index.js +1 -1
  175. package/dist/{chunk-Dr3R0DXk.d.ts → chunk-B-NVyPqN.d.ts} +2 -2
  176. package/dist/{chunk-Fg1Fm__9.d.ts → chunk-BmCH-L7_.d.ts} +393 -383
  177. package/dist/{chunk-CNqjcOmK.d.ts → chunk-Bn1RoGAP.d.ts} +1 -1
  178. package/dist/{chunk-BXLImeLy.d.ts → chunk-CfEntHiI.d.ts} +18 -3
  179. package/dist/{chunk-D0NUmzXp.d.ts → chunk-IMedIHPn.d.ts} +3 -3
  180. package/dist/{chunk-CYuvV2sR.d.ts → chunk-evfhuBNU.d.ts} +1 -1
  181. package/dist/cli/index.d.ts +2 -2
  182. package/dist/cli/index.js +25 -30
  183. package/dist/cli/tools/sdk/child-host.d.ts +1 -1
  184. package/dist/cli/tools/sdk/child-host.js +17 -17
  185. package/dist/cli/tools/sdk/index.d.ts +2 -2
  186. package/dist/cli/tools/sdk/index.js +18 -18
  187. package/dist/cli-commands/bin/index.js +7 -7
  188. package/dist/client-logger/index.js +2 -1
  189. package/dist/common/index.d.ts +5 -5
  190. package/dist/common/index.js +34 -35
  191. package/dist/components/index.d.ts +6 -6
  192. package/dist/components/index.js +152 -162
  193. package/dist/core-server/index.d.ts +6 -5
  194. package/dist/core-server/index.js +688 -152
  195. package/dist/core-server/presets/common-manager.js +227 -316
  196. package/dist/core-server/presets/common-override-preset.js +10 -10
  197. package/dist/core-server/presets/common-preset.js +73 -268
  198. package/dist/create/bin/index.js +7 -7
  199. package/dist/create/index.js +15 -15
  200. package/dist/csf/csf-utils.d.ts +1 -1
  201. package/dist/csf/index.d.ts +1 -1
  202. package/dist/csf/index.js +10 -10
  203. package/dist/csf-tools/index.d.ts +41 -37
  204. package/dist/csf-tools/index.js +13 -13
  205. package/dist/instrumenter/index.d.ts +1 -1
  206. package/dist/instrumenter/index.js +1 -1
  207. package/dist/manager/_manager-chunks/{globals-runtime-CJL1dQtn.js → globals-runtime--RDllwDw.js} +629 -436
  208. package/dist/manager/_manager-chunks/{globals-runtime-DvV_TF3-.js → globals-runtime-B4NRbNSS.js} +2 -2
  209. package/dist/manager/_manager-chunks/{globals-runtime-wjkxyMn0.js → globals-runtime-BC43T1rL.js} +4150 -50
  210. package/dist/manager/_manager-chunks/{globals-runtime-CfurFwS_.js → globals-runtime-BFVFUcji.js} +2 -2
  211. package/dist/manager/_manager-chunks/{globals-runtime-BKQscPdC.js → globals-runtime-BWciJpaD.js} +103 -101
  212. package/dist/manager/_manager-chunks/{globals-runtime-CA8AuIRT.js → globals-runtime-BnQ7i5wq.js} +232 -228
  213. package/dist/manager/_manager-chunks/globals-runtime-BtduS2C2.js +10601 -0
  214. package/dist/manager/_manager-chunks/globals-runtime-BzuYs3dZ.js +1971 -0
  215. package/dist/manager/_manager-chunks/{globals-runtime-BY3epqww.js → globals-runtime-CS41oTca.js} +2 -1
  216. package/dist/manager/_manager-chunks/{globals-runtime-DBba3I9c.js → globals-runtime-CdLHkSK1.js} +260 -401
  217. package/dist/manager/_manager-chunks/globals-runtime-CoTrrHG3.js +1163 -0
  218. package/dist/manager/_manager-chunks/{globals-runtime-BweHuXkK.js → globals-runtime-DCmvKMN5.js} +2 -2
  219. package/dist/manager/_manager-chunks/globals-runtime-DgO0hT2p.js +32 -0
  220. package/dist/manager/_manager-chunks/{globals-runtime-CvIgTRVu.js → globals-runtime-DhygDQ09.js} +5 -5
  221. package/dist/manager/_manager-chunks/{globals-runtime-NwJK8t0T.js → globals-runtime-DweLlyBa.js} +5 -4
  222. package/dist/manager/_manager-chunks/globals-runtime-Me9Bl-sx.js +156 -0
  223. package/dist/manager/_manager-chunks/globals-runtime-nQMRiA0J.js +19 -0
  224. package/dist/manager/_manager-chunks/{globals-runtime-Bj5KDUJi.js → globals-runtime-oRjPg2jY.js} +1 -1
  225. package/dist/manager/_manager-chunks/{runtime-Bs3bEhuy.js → runtime-1BcYUf7-.js} +24 -42
  226. package/dist/manager/_manager-chunks/{runtime-CBQsKmch.js → runtime-B2VQIT0n.js} +739 -554
  227. package/dist/manager/_manager-chunks/runtime-BBaBlpAS.js +552 -0
  228. package/dist/manager/_manager-chunks/{runtime-B_nqedQW.js → runtime-BFgSyEE6.js} +13 -13
  229. package/dist/manager/_manager-chunks/{runtime-jj8qYc2n.js → runtime-CE_oqcpl.js} +6 -6
  230. package/dist/manager/_manager-chunks/{runtime-DtCVCy4G.js → runtime-CRqm7NXD.js} +49 -49
  231. package/dist/manager/_manager-chunks/{runtime-5B2mWjEm.js → runtime-CZtDJIYj.js} +3 -3
  232. package/dist/manager/_manager-chunks/{runtime-eBAgOym6.js → runtime-D3Gk2bTl.js} +846 -835
  233. package/dist/manager/_manager-chunks/{runtime-DG61zYUm.js → runtime-Db8fJ2MP.js} +67 -500
  234. package/dist/manager/_manager-chunks/{runtime-j9yqh0tr.js → runtime-Dj8tizGo.js} +101 -101
  235. package/dist/manager/globals-runtime.js +1 -1
  236. package/dist/manager/runtime.js +1 -1
  237. package/dist/manager-api/index.d.ts +1 -1
  238. package/dist/manager-api/index.js +444 -428
  239. package/dist/manager-errors.d.ts +1 -1
  240. package/dist/mcp/index.js +9 -9
  241. package/dist/mocking-utils/index.js +15 -19
  242. package/dist/nextjs-vite/export-mocks/router/index.js +1 -1
  243. package/dist/nextjs-vite/index.d.ts +1 -1
  244. package/dist/nextjs-vite/index.js +4 -4
  245. package/dist/nextjs-vite/node/index.js +7 -7
  246. package/dist/nextjs-vite/preset.js +12 -12
  247. package/dist/nextjs-vite/preview.js +1 -1
  248. package/dist/nextjs-vite/vite-plugin/index.d.ts +2 -2
  249. package/dist/nextjs-vite/vite-plugin/index.js +9 -9
  250. package/dist/nextjs-vite-plugin/index.js +15 -15
  251. package/dist/nextjs-vite-plugin/mocks/storybook.global.js +8 -8
  252. package/dist/nextjs-vite-plugin/plugins/next-mocks/alias/router/index.js +1 -1
  253. package/dist/node-logger/index.d.ts +16 -16
  254. package/dist/node-logger/index.js +9 -9
  255. package/dist/oxc-parser/index.js +14 -11
  256. package/dist/oxc-parser/worker.js +10 -10
  257. package/dist/preview/_chunks/{runtime-BJwGQok8.js → runtime-4BNaFIif.js} +180 -21
  258. package/dist/preview/_chunks/{runtime-BUnOhg9h.js → runtime-BSJ0Ov_b.js} +2 -2
  259. package/dist/preview/_chunks/{runtime-BhSZ1Mwt.js → runtime-Bjm1gBLN.js} +6 -19
  260. package/dist/preview/_chunks/{runtime-Bcv1hJky.js → runtime-CBKlMZg2.js} +4148 -48
  261. package/dist/preview/_chunks/{runtime-BPwAnlRx.js → runtime-CElbz0uN.js} +1 -1
  262. package/dist/preview/_chunks/{runtime-BZ4pNS3g.js → runtime-C_nyb8QT.js} +3 -3
  263. package/dist/preview/_chunks/{runtime-BgPhfM5P.js → runtime-CzTPeFXg.js} +676 -376
  264. package/dist/preview/_chunks/{runtime-WapFVPAh.js → runtime-DZ7fvh0y.js} +1 -1
  265. package/dist/preview/runtime.js +1 -1
  266. package/dist/preview-api/index.d.ts +2 -2
  267. package/dist/preview-api/index.js +5 -5
  268. package/dist/preview-errors.d.ts +1 -1
  269. package/dist/react/docgen/docgen-worker.js +11 -11
  270. package/dist/react/entry-preview-argtypes.js +1 -1
  271. package/dist/react/entry-preview-docs.js +1 -1
  272. package/dist/react/entry-preview.js +1 -1
  273. package/dist/react/index.d.ts +1 -1
  274. package/dist/react/index.js +5 -5
  275. package/dist/react/preset.js +13 -13
  276. package/dist/react/preview.js +4 -4
  277. package/dist/react-native/bin/get-stories.js +8 -8
  278. package/dist/react-native/index.d.ts +37 -36
  279. package/dist/react-native/index.js +30 -34
  280. package/dist/react-native/metro/node.d.ts +1 -1
  281. package/dist/react-native/metro/node.js +10 -10
  282. package/dist/react-native/metro/withForkbook.d.ts +7 -7
  283. package/dist/react-native/metro/withForkbook.js +14 -14
  284. package/dist/react-native/preview.js +4 -1
  285. package/dist/react-native/scripts/generate.js +8 -8
  286. package/dist/react-native/stub.js +1 -1
  287. package/dist/react-native-ui/index.d.ts +4 -3
  288. package/dist/react-native-ui/index.js +1 -8
  289. package/dist/react-native-ui-common/index.d.ts +7 -6
  290. package/dist/react-native-ui-common/index.js +6 -6
  291. package/dist/react-vite/node/index.js +7 -7
  292. package/dist/react-vite/preset.js +7 -7
  293. package/dist/server-errors.d.ts +1 -1
  294. package/dist/server-errors.js +9 -9
  295. package/dist/shared/open-service/index.d.ts +1 -1
  296. package/dist/shared/open-service/index.js +1 -1
  297. package/dist/shared/open-service/services/docgen/worker/docgen-worker.js +9 -9
  298. package/dist/shared/open-service/toolsets/docs/public.d.ts +2 -2
  299. package/dist/telemetry/index.d.ts +38 -274
  300. package/dist/telemetry/index.js +11 -66
  301. package/dist/test/index.js +125 -112
  302. package/dist/types/index.d.ts +1 -1
  303. package/dist/types/index.js +2 -2
  304. package/package.json +15 -15
  305. package/template/nextjs-vite/cli/js/Button.jsx +2 -2
  306. package/template/nextjs-vite/cli/js/Header.jsx +1 -1
  307. package/template/nextjs-vite/cli/js/Page.jsx +1 -1
  308. package/template/nextjs-vite/cli/ts/Button.tsx +2 -2
  309. package/template/nextjs-vite/cli/ts/Header.tsx +1 -1
  310. package/template/nextjs-vite/cli/ts/Page.tsx +1 -1
  311. package/template/react/cli/js/Button.jsx +2 -2
  312. package/template/react/cli/js/Header.jsx +1 -1
  313. package/template/react/cli/js/Page.jsx +1 -1
  314. package/template/react/cli/ts/Button.tsx +2 -2
  315. package/template/react/cli/ts/Header.tsx +1 -1
  316. package/template/react/cli/ts/Page.tsx +1 -1
  317. package/template/react-vite/cli/js/Button.jsx +2 -2
  318. package/template/react-vite/cli/js/Header.jsx +1 -1
  319. package/template/react-vite/cli/js/Page.jsx +1 -1
  320. package/template/react-vite/cli/ts/Button.tsx +2 -2
  321. package/template/react-vite/cli/ts/Header.tsx +1 -1
  322. package/template/react-vite/cli/ts/Page.tsx +1 -1
  323. package/dist/_node-chunks/chunk-BMJPOQ2S.js +0 -11
  324. package/dist/_node-chunks/chunk-C3PLG47Q.js +0 -25
  325. package/dist/_node-chunks/chunk-DNV3LPV3.js +0 -33
  326. package/dist/_node-chunks/chunk-DPILYJH4.js +0 -33
  327. package/dist/_node-chunks/chunk-EBWZKN2I.js +0 -1297
  328. package/dist/_node-chunks/chunk-ENBDAHOV.js +0 -18
  329. package/dist/_node-chunks/chunk-FAEOR2AW.js +0 -40
  330. package/dist/_node-chunks/chunk-HVOSLI2K.js +0 -20
  331. package/dist/_node-chunks/chunk-ND323XCC.js +0 -33
  332. package/dist/_node-chunks/chunk-PEL4YXU6.js +0 -19
  333. package/dist/_node-chunks/chunk-T6IU66AM.js +0 -69
  334. package/dist/_node-chunks/chunk-TY2ZY7AO.js +0 -155
  335. package/dist/_node-chunks/chunk-ZD5TUA6I.js +0 -20
  336. package/dist/_node-chunks/dist-7OJKTBKL.js +0 -27
  337. package/dist/_node-chunks/dist-MWP6WLW4.js +0 -16
  338. package/dist/_node-chunks/optimized-tests-KOTSVWTN.js +0 -22
  339. package/dist/_node-chunks/postinstallAddon-WXKJL6DP.js +0 -20
  340. package/dist/_node-chunks/session-id-VMH57SKN.js +0 -23
  341. package/dist/manager/_manager-chunks/globals-runtime-Bs75QQ_I.js +0 -9987
  342. package/dist/manager/_manager-chunks/globals-runtime-WZKaeKm9.js +0 -4091
  343. package/dist/manager/_manager-chunks/runtime-5o_11Jae.js +0 -78
  344. package/dist/preview/_chunks/runtime-BsMjBzuq.js +0 -53
  345. package/dist/preview/_chunks/runtime-C1jgT6tJ.js +0 -4091
  346. package/dist/preview/_chunks/runtime-CkOhMcXf.js +0 -387
@@ -1,4091 +0,0 @@
1
- import { n as __esmMin, r as __exportAll } from "./runtime-BdGkqNEt.js";
2
- import { l as getConfig, u as init_dom_esm } from "./runtime-Bcv1hJky.js";
3
- //#region ../node_modules/@testing-library/user-event/dist/esm/utils/misc/isElementType.js
4
- function isElementType(element, tag, props) {
5
- if (element.namespaceURI && element.namespaceURI !== "http://www.w3.org/1999/xhtml") return false;
6
- tag = Array.isArray(tag) ? tag : [tag];
7
- if (!tag.includes(element.tagName.toLowerCase())) return false;
8
- if (props) return Object.entries(props).every(([k, v]) => element[k] === v);
9
- return true;
10
- }
11
- //#endregion
12
- //#region ../node_modules/@testing-library/user-event/dist/esm/utils/misc/getWindow.js
13
- function getWindow(node) {
14
- var _node_ownerDocument;
15
- if (isDocument$1(node) && node.defaultView) return node.defaultView;
16
- else if ((_node_ownerDocument = node.ownerDocument) === null || _node_ownerDocument === void 0 ? void 0 : _node_ownerDocument.defaultView) return node.ownerDocument.defaultView;
17
- throw new Error(`Could not determine window of node. Node was ${describe(node)}`);
18
- }
19
- function isDocument$1(node) {
20
- return node.nodeType === 9;
21
- }
22
- function describe(val) {
23
- return typeof val === "function" ? `function ${val.name}` : val === null ? "null" : String(val);
24
- }
25
- //#endregion
26
- //#region ../node_modules/@testing-library/user-event/dist/esm/utils/dataTransfer/Blob.js
27
- function readBlobText(blob, FileReader) {
28
- return new Promise((res, rej) => {
29
- const fr = new FileReader();
30
- fr.onerror = rej;
31
- fr.onabort = rej;
32
- fr.onload = () => {
33
- res(String(fr.result));
34
- };
35
- fr.readAsText(blob);
36
- });
37
- }
38
- //#endregion
39
- //#region ../node_modules/@testing-library/user-event/dist/esm/utils/dataTransfer/FileList.js
40
- function createFileList(window, files) {
41
- const list = {
42
- ...files,
43
- length: files.length,
44
- item: (index) => list[index],
45
- [Symbol.iterator]: function* nextFile() {
46
- for (let i = 0; i < list.length; i++) yield list[i];
47
- }
48
- };
49
- list.constructor = window.FileList;
50
- /* istanbul ignore else */ if (window.FileList) Object.setPrototypeOf(list, window.FileList.prototype);
51
- Object.freeze(list);
52
- return list;
53
- }
54
- //#endregion
55
- //#region ../node_modules/@testing-library/user-event/dist/esm/utils/dataTransfer/DataTransfer.js
56
- function _define_property$8(obj, key, value) {
57
- if (key in obj) Object.defineProperty(obj, key, {
58
- value,
59
- enumerable: true,
60
- configurable: true,
61
- writable: true
62
- });
63
- else obj[key] = value;
64
- return obj;
65
- }
66
- function getTypeMatcher(type, exact) {
67
- const [group, sub] = type.split("/");
68
- const isGroup = !sub || sub === "*";
69
- return (item) => {
70
- return exact ? item.type === (isGroup ? group : type) : isGroup ? item.type.startsWith(`${group}/`) : item.type === group;
71
- };
72
- }
73
- function createDataTransferStub(window) {
74
- return new class DataTransferStub {
75
- getData(format) {
76
- var _this_items_find;
77
- const match = (_this_items_find = this.items.find(getTypeMatcher(format, true))) !== null && _this_items_find !== void 0 ? _this_items_find : this.items.find(getTypeMatcher(format, false));
78
- let text = "";
79
- match === null || match === void 0 || match.getAsString((t) => {
80
- text = t;
81
- });
82
- return text;
83
- }
84
- setData(format, data) {
85
- const matchIndex = this.items.findIndex(getTypeMatcher(format, true));
86
- const item = new DataTransferItemStub(data, format);
87
- if (matchIndex >= 0) this.items.splice(matchIndex, 1, item);
88
- else this.items.push(item);
89
- }
90
- clearData(format) {
91
- if (format) {
92
- const matchIndex = this.items.findIndex(getTypeMatcher(format, true));
93
- if (matchIndex >= 0) this.items.remove(matchIndex);
94
- } else this.items.clear();
95
- }
96
- get types() {
97
- const t = [];
98
- if (this.files.length) t.push("Files");
99
- this.items.forEach((i) => t.push(i.type));
100
- Object.freeze(t);
101
- return t;
102
- }
103
- /* istanbul ignore next */ setDragImage() {}
104
- constructor() {
105
- _define_property$8(this, "dropEffect", "none");
106
- _define_property$8(this, "effectAllowed", "uninitialized");
107
- _define_property$8(this, "items", new DataTransferItemListStub());
108
- _define_property$8(this, "files", createFileList(window, []));
109
- }
110
- }();
111
- }
112
- function createDataTransfer(window, files = []) {
113
- const dt = typeof window.DataTransfer === "undefined" ? createDataTransferStub(window) : /* istanbul ignore next */ new window.DataTransfer();
114
- Object.defineProperty(dt, "files", { get: () => createFileList(window, files) });
115
- return dt;
116
- }
117
- async function getBlobFromDataTransferItem(window, item) {
118
- if (item.kind === "file") return item.getAsFile();
119
- return new window.Blob([await new Promise((r) => item.getAsString(r))], { type: item.type });
120
- }
121
- var DataTransferItemStub, DataTransferItemListStub;
122
- function init_DataTransfer() {
123
- return (init_DataTransfer = __esmMin((() => {
124
- DataTransferItemStub = class {
125
- getAsFile() {
126
- return this.file;
127
- }
128
- getAsString(callback) {
129
- if (typeof this.data === "string") callback(this.data);
130
- }
131
- /* istanbul ignore next */ webkitGetAsEntry() {
132
- throw new Error("not implemented");
133
- }
134
- constructor(dataOrFile, type) {
135
- _define_property$8(this, "kind", void 0);
136
- _define_property$8(this, "type", void 0);
137
- _define_property$8(this, "file", null);
138
- _define_property$8(this, "data", void 0);
139
- if (typeof dataOrFile === "string") {
140
- this.kind = "string";
141
- this.type = String(type);
142
- this.data = dataOrFile;
143
- } else {
144
- this.kind = "file";
145
- this.type = dataOrFile.type;
146
- this.file = dataOrFile;
147
- }
148
- }
149
- };
150
- DataTransferItemListStub = class extends Array {
151
- add(...args) {
152
- const item = new DataTransferItemStub(args[0], args[1]);
153
- this.push(item);
154
- return item;
155
- }
156
- clear() {
157
- this.splice(0, this.length);
158
- }
159
- remove(index) {
160
- this.splice(index, 1);
161
- }
162
- };
163
- })))();
164
- }
165
- //#endregion
166
- //#region ../node_modules/@testing-library/user-event/dist/esm/utils/dataTransfer/Clipboard.js
167
- function _define_property$7(obj, key, value) {
168
- if (key in obj) Object.defineProperty(obj, key, {
169
- value,
170
- enumerable: true,
171
- configurable: true,
172
- writable: true
173
- });
174
- else obj[key] = value;
175
- return obj;
176
- }
177
- function createClipboardItem(window, ...blobs) {
178
- const dataMap = Object.fromEntries(blobs.map((b) => [typeof b === "string" ? "text/plain" : b.type, Promise.resolve(b)]));
179
- /* istanbul ignore if */ if (typeof window.ClipboardItem !== "undefined") return new window.ClipboardItem(dataMap);
180
- return new class ClipboardItem {
181
- get types() {
182
- return Array.from(Object.keys(this.data));
183
- }
184
- async getType(type) {
185
- const value = await this.data[type];
186
- if (!value) throw new Error(`${type} is not one of the available MIME types on this item.`);
187
- return value instanceof window.Blob ? value : new window.Blob([value], { type });
188
- }
189
- constructor(d) {
190
- _define_property$7(this, "data", void 0);
191
- this.data = d;
192
- }
193
- }(dataMap);
194
- }
195
- function createClipboardStub(window, control) {
196
- return Object.assign(new class Clipboard extends window.EventTarget {
197
- async read() {
198
- return Array.from(this.items);
199
- }
200
- async readText() {
201
- let text = "";
202
- for (const item of this.items) {
203
- const type = item.types.includes("text/plain") ? "text/plain" : item.types.find((t) => t.startsWith("text/"));
204
- if (type) text += await item.getType(type).then((b) => readBlobText(b, window.FileReader));
205
- }
206
- return text;
207
- }
208
- async write(data) {
209
- this.items = data;
210
- }
211
- async writeText(text) {
212
- this.items = [createClipboardItem(window, text)];
213
- }
214
- constructor(...args) {
215
- super(...args), _define_property$7(this, "items", []);
216
- }
217
- }(), { [ClipboardStubControl]: control });
218
- }
219
- function isClipboardStub(clipboard) {
220
- return !!(clipboard === null || clipboard === void 0 ? void 0 : clipboard[ClipboardStubControl]);
221
- }
222
- function attachClipboardStubToView(window) {
223
- if (isClipboardStub(window.navigator.clipboard)) return window.navigator.clipboard[ClipboardStubControl];
224
- const realClipboard = Object.getOwnPropertyDescriptor(window.navigator, "clipboard");
225
- let stub;
226
- const control = {
227
- resetClipboardStub: () => {
228
- stub = createClipboardStub(window, control);
229
- },
230
- detachClipboardStub: () => {
231
- /* istanbul ignore if */ if (realClipboard) Object.defineProperty(window.navigator, "clipboard", realClipboard);
232
- else Object.defineProperty(window.navigator, "clipboard", {
233
- value: void 0,
234
- configurable: true
235
- });
236
- }
237
- };
238
- stub = createClipboardStub(window, control);
239
- Object.defineProperty(window.navigator, "clipboard", {
240
- get: () => stub,
241
- configurable: true
242
- });
243
- return stub[ClipboardStubControl];
244
- }
245
- function resetClipboardStubOnView(window) {
246
- if (isClipboardStub(window.navigator.clipboard)) window.navigator.clipboard[ClipboardStubControl].resetClipboardStub();
247
- }
248
- function detachClipboardStubFromView(window) {
249
- if (isClipboardStub(window.navigator.clipboard)) window.navigator.clipboard[ClipboardStubControl].detachClipboardStub();
250
- }
251
- async function readDataTransferFromClipboard(document) {
252
- const window = document.defaultView;
253
- const clipboard = window === null || window === void 0 ? void 0 : window.navigator.clipboard;
254
- const items = clipboard && await clipboard.read();
255
- if (!items) throw new Error("The Clipboard API is unavailable.");
256
- const dt = createDataTransfer(window);
257
- for (const item of items) for (const type of item.types) dt.setData(type, await item.getType(type).then((b) => readBlobText(b, window.FileReader)));
258
- return dt;
259
- }
260
- async function writeDataTransferToClipboard(document, clipboardData) {
261
- const window = getWindow(document);
262
- const clipboard = window.navigator.clipboard;
263
- const items = [];
264
- for (let i = 0; i < clipboardData.items.length; i++) {
265
- const dtItem = clipboardData.items[i];
266
- const blob = await getBlobFromDataTransferItem(window, dtItem);
267
- items.push(createClipboardItem(window, blob));
268
- }
269
- if (!(clipboard && await clipboard.write(items).then(
270
- () => true,
271
- /* istanbul ignore next */
272
- () => false
273
- ))) throw new Error("The Clipboard API is unavailable.");
274
- }
275
- var ClipboardStubControl, g;
276
- function init_Clipboard() {
277
- return (init_Clipboard = __esmMin((() => {
278
- init_DataTransfer();
279
- ClipboardStubControl = Symbol("Manage ClipboardSub");
280
- g = globalThis;
281
- /* istanbul ignore else */ if (typeof g.afterEach === "function") g.afterEach(() => {
282
- if (typeof globalThis.window !== "undefined") resetClipboardStubOnView(globalThis.window);
283
- });
284
- /* istanbul ignore else */ if (typeof g.afterAll === "function") g.afterAll(() => {
285
- if (typeof globalThis.window !== "undefined") detachClipboardStubFromView(globalThis.window);
286
- });
287
- })))();
288
- }
289
- //#endregion
290
- //#region ../node_modules/@testing-library/user-event/dist/esm/utils/focus/selector.js
291
- var FOCUSABLE_SELECTOR;
292
- function init_selector() {
293
- return (init_selector = __esmMin((() => {
294
- FOCUSABLE_SELECTOR = [
295
- "input:not([type=hidden]):not([disabled])",
296
- "button:not([disabled])",
297
- "select:not([disabled])",
298
- "textarea:not([disabled])",
299
- "[contenteditable=\"\"]",
300
- "[contenteditable=\"true\"]",
301
- "a[href]",
302
- "[tabindex]:not([disabled])",
303
- "details > summary"
304
- ].join(", ");
305
- })))();
306
- }
307
- //#endregion
308
- //#region ../node_modules/@testing-library/user-event/dist/esm/utils/focus/isFocusable.js
309
- function isFocusable(element) {
310
- return element.matches(FOCUSABLE_SELECTOR);
311
- }
312
- function init_isFocusable() {
313
- return (init_isFocusable = __esmMin((() => {
314
- init_selector();
315
- })))();
316
- }
317
- //#endregion
318
- //#region ../node_modules/@testing-library/user-event/dist/esm/utils/misc/cloneEvent.js
319
- function cloneEvent(event) {
320
- return new event.constructor(event.type, event);
321
- }
322
- //#endregion
323
- //#region ../node_modules/@testing-library/user-event/dist/esm/utils/misc/isDisabled.js
324
- function isDisabled(element) {
325
- for (let el = element; el; el = el.parentElement) if (isElementType(el, [
326
- "button",
327
- "input",
328
- "select",
329
- "textarea",
330
- "optgroup",
331
- "option"
332
- ])) {
333
- if (el.hasAttribute("disabled")) return true;
334
- } else if (isElementType(el, "fieldset")) {
335
- var _el_querySelector;
336
- if (el.hasAttribute("disabled") && !((_el_querySelector = el.querySelector(":scope > legend")) === null || _el_querySelector === void 0 ? void 0 : _el_querySelector.contains(element))) return true;
337
- } else if (el.tagName.includes("-")) {
338
- if (el.constructor.formAssociated && el.hasAttribute("disabled")) return true;
339
- }
340
- return false;
341
- }
342
- function init_isDisabled() {
343
- return (init_isDisabled = __esmMin((() => {})))();
344
- }
345
- //#endregion
346
- //#region ../node_modules/@testing-library/user-event/dist/esm/utils/focus/getActiveElement.js
347
- function getActiveElement(document) {
348
- const activeElement = document.activeElement;
349
- if (activeElement === null || activeElement === void 0 ? void 0 : activeElement.shadowRoot) {
350
- const activeElementInShadowTree = getActiveElement(activeElement.shadowRoot);
351
- if (activeElementInShadowTree) return activeElementInShadowTree;
352
- }
353
- if (isDisabled(activeElement)) return document.ownerDocument ? /* istanbul ignore next */ document.ownerDocument.body : document.body;
354
- return activeElement;
355
- }
356
- function getActiveElementOrBody(document) {
357
- var _getActiveElement;
358
- return (_getActiveElement = getActiveElement(document)) !== null && _getActiveElement !== void 0 ? _getActiveElement : /* istanbul ignore next */ document.body;
359
- }
360
- function init_getActiveElement() {
361
- return (init_getActiveElement = __esmMin((() => {
362
- init_isDisabled();
363
- })))();
364
- }
365
- //#endregion
366
- //#region ../node_modules/@testing-library/user-event/dist/esm/utils/misc/findClosest.js
367
- function findClosest(element, callback) {
368
- let el = element;
369
- do {
370
- if (callback(el)) return el;
371
- el = el.parentElement;
372
- } while (el && el !== element.ownerDocument.body);
373
- }
374
- //#endregion
375
- //#region ../node_modules/@testing-library/user-event/dist/esm/utils/edit/isContentEditable.js
376
- function isContentEditable(element) {
377
- return element.hasAttribute("contenteditable") && (element.getAttribute("contenteditable") == "true" || element.getAttribute("contenteditable") == "");
378
- }
379
- /**
380
- * If a node is a contenteditable or inside one, return that element.
381
- */ function getContentEditable(node) {
382
- const element = getElement$1(node);
383
- return element && (element.closest("[contenteditable=\"\"]") || element.closest("[contenteditable=\"true\"]"));
384
- }
385
- function getElement$1(node) {
386
- return node.nodeType === 1 ? node : node.parentElement;
387
- }
388
- //#endregion
389
- //#region ../node_modules/@testing-library/user-event/dist/esm/utils/click/isClickableInput.js
390
- function isClickableInput(element) {
391
- return isElementType(element, "button") || isElementType(element, "input") && element.type in clickableInputTypes;
392
- }
393
- var clickableInputTypes;
394
- function init_isClickableInput() {
395
- return (init_isClickableInput = __esmMin((() => {
396
- clickableInputTypes = /*#__PURE__*/ function(clickableInputTypes) {
397
- clickableInputTypes["button"] = "button";
398
- clickableInputTypes["color"] = "color";
399
- clickableInputTypes["file"] = "file";
400
- clickableInputTypes["image"] = "image";
401
- clickableInputTypes["reset"] = "reset";
402
- clickableInputTypes["submit"] = "submit";
403
- clickableInputTypes["checkbox"] = "checkbox";
404
- clickableInputTypes["radio"] = "radio";
405
- return clickableInputTypes;
406
- }(clickableInputTypes || {});
407
- })))();
408
- }
409
- //#endregion
410
- //#region ../node_modules/@testing-library/user-event/dist/esm/utils/edit/isEditable.js
411
- function isEditable(element) {
412
- return isEditableInputOrTextArea(element) && !element.readOnly || isContentEditable(element);
413
- }
414
- function isEditableInputOrTextArea(element) {
415
- return isElementType(element, "textarea") || isElementType(element, "input") && element.type in editableInputTypes;
416
- }
417
- var editableInputTypes;
418
- function init_isEditable() {
419
- return (init_isEditable = __esmMin((() => {
420
- editableInputTypes = /*#__PURE__*/ function(editableInputTypes) {
421
- editableInputTypes["text"] = "text";
422
- editableInputTypes["date"] = "date";
423
- editableInputTypes["datetime-local"] = "datetime-local";
424
- editableInputTypes["email"] = "email";
425
- editableInputTypes["month"] = "month";
426
- editableInputTypes["number"] = "number";
427
- editableInputTypes["password"] = "password";
428
- editableInputTypes["search"] = "search";
429
- editableInputTypes["tel"] = "tel";
430
- editableInputTypes["time"] = "time";
431
- editableInputTypes["url"] = "url";
432
- editableInputTypes["week"] = "week";
433
- return editableInputTypes;
434
- }(editableInputTypes || {});
435
- })))();
436
- }
437
- //#endregion
438
- //#region ../node_modules/@testing-library/user-event/dist/esm/utils/focus/selection.js
439
- /**
440
- * Determine if the element has its own selection implementation
441
- * and does not interact with the Document Selection API.
442
- */ function hasOwnSelection(node) {
443
- return isElement$1(node) && isEditableInputOrTextArea(node);
444
- }
445
- function hasNoSelection(node) {
446
- return isElement$1(node) && isClickableInput(node);
447
- }
448
- function isElement$1(node) {
449
- return node.nodeType === 1;
450
- }
451
- function init_selection() {
452
- return (init_selection = __esmMin((() => {
453
- init_isClickableInput();
454
- init_isEditable();
455
- })))();
456
- }
457
- //#endregion
458
- //#region ../node_modules/@testing-library/user-event/dist/esm/event/selection/updateSelectionOnFocus.js
459
- /**
460
- * Reset the Document Selection when moving focus into an element
461
- * with own selection implementation.
462
- */ function updateSelectionOnFocus(element) {
463
- const selection = element.ownerDocument.getSelection();
464
- /* istanbul ignore if */ if (!(selection === null || selection === void 0 ? void 0 : selection.focusNode)) return;
465
- if (hasOwnSelection(element)) {
466
- const contenteditable = getContentEditable(selection.focusNode);
467
- if (contenteditable) {
468
- if (!selection.isCollapsed) {
469
- var _contenteditable_firstChild;
470
- const focusNode = ((_contenteditable_firstChild = contenteditable.firstChild) === null || _contenteditable_firstChild === void 0 ? void 0 : _contenteditable_firstChild.nodeType) === 3 ? contenteditable.firstChild : contenteditable;
471
- selection.setBaseAndExtent(focusNode, 0, focusNode, 0);
472
- }
473
- } else selection.setBaseAndExtent(element, 0, element, 0);
474
- }
475
- }
476
- function init_updateSelectionOnFocus() {
477
- return (init_updateSelectionOnFocus = __esmMin((() => {
478
- init_Clipboard();
479
- init_selection();
480
- })))();
481
- }
482
- //#endregion
483
- //#region ../node_modules/@testing-library/user-event/dist/esm/event/wrapEvent.js
484
- function wrapEvent(cb, _element) {
485
- return getConfig().eventWrapper(cb);
486
- }
487
- function init_wrapEvent() {
488
- return (init_wrapEvent = __esmMin((() => {
489
- init_dom_esm();
490
- })))();
491
- }
492
- //#endregion
493
- //#region ../node_modules/@testing-library/user-event/dist/esm/event/focus.js
494
- /**
495
- * Focus closest focusable element.
496
- */ function focusElement(element) {
497
- const target = findClosest(element, isFocusable);
498
- const activeElement = getActiveElement(element.ownerDocument);
499
- if ((target !== null && target !== void 0 ? target : element.ownerDocument.body) === activeElement) return;
500
- else if (target) wrapEvent(() => target.focus());
501
- else wrapEvent(() => activeElement === null || activeElement === void 0 ? void 0 : activeElement.blur());
502
- updateSelectionOnFocus(target !== null && target !== void 0 ? target : element.ownerDocument.body);
503
- }
504
- function blurElement(element) {
505
- if (!isFocusable(element)) return;
506
- if (!(getActiveElement(element.ownerDocument) === element)) return;
507
- wrapEvent(() => element.blur());
508
- }
509
- function init_focus() {
510
- return (init_focus = __esmMin((() => {
511
- init_Clipboard();
512
- init_getActiveElement();
513
- init_isFocusable();
514
- init_updateSelectionOnFocus();
515
- init_wrapEvent();
516
- })))();
517
- }
518
- //#endregion
519
- //#region ../node_modules/@testing-library/user-event/dist/esm/event/behavior/registry.js
520
- var behavior;
521
- function init_registry() {
522
- return (init_registry = __esmMin((() => {
523
- behavior = {};
524
- })))();
525
- }
526
- //#endregion
527
- //#region ../node_modules/@testing-library/user-event/dist/esm/event/behavior/click.js
528
- function init_click() {
529
- return (init_click = __esmMin((() => {
530
- init_Clipboard();
531
- init_isFocusable();
532
- init_focus();
533
- init_registry();
534
- behavior.click = (event, target, instance) => {
535
- const context = target.closest("button,input,label,select,textarea");
536
- const control = context && isElementType(context, "label") && context.control;
537
- if (control && control !== target) return () => {
538
- if (isFocusable(control)) {
539
- focusElement(control);
540
- instance.dispatchEvent(control, cloneEvent(event));
541
- }
542
- };
543
- else if (isElementType(target, "input", { type: "file" })) return () => {
544
- blurElement(target);
545
- target.dispatchEvent(new (getWindow(target)).Event("fileDialog"));
546
- focusElement(target);
547
- };
548
- };
549
- })))();
550
- }
551
- //#endregion
552
- //#region ../node_modules/@testing-library/user-event/dist/esm/document/UI.js
553
- function isUIValue(value) {
554
- return typeof value === "object" && UIValue in value;
555
- }
556
- function isUISelectionStart(start) {
557
- return !!start && typeof start === "object" && UISelection in start;
558
- }
559
- function setUIValue(element, value) {
560
- if (element[InitialValue] === void 0) element[InitialValue] = element.value;
561
- element[UIValue] = value;
562
- element.value = Object.assign(new String(value), { [UIValue]: true });
563
- }
564
- function getUIValue(element) {
565
- return element[UIValue] === void 0 ? element.value : String(element[UIValue]);
566
- }
567
- /** Flag the IDL value as clean. This does not change the value. */ function setUIValueClean(element) {
568
- element[UIValue] = void 0;
569
- }
570
- function clearInitialValue(element) {
571
- element[InitialValue] = void 0;
572
- }
573
- function getInitialValue(element) {
574
- return element[InitialValue];
575
- }
576
- function setUISelectionRaw(element, selection) {
577
- element[UISelection] = selection;
578
- }
579
- function setUISelection(element, { focusOffset: focusOffsetParam, anchorOffset: anchorOffsetParam = focusOffsetParam }, mode = "replace") {
580
- const valueLength = getUIValue(element).length;
581
- const sanitizeOffset = (o) => Math.max(0, Math.min(valueLength, o));
582
- const anchorOffset = mode === "replace" || element[UISelection] === void 0 ? sanitizeOffset(anchorOffsetParam) : element[UISelection].anchorOffset;
583
- const focusOffset = sanitizeOffset(focusOffsetParam);
584
- const startOffset = Math.min(anchorOffset, focusOffset);
585
- const endOffset = Math.max(anchorOffset, focusOffset);
586
- element[UISelection] = {
587
- anchorOffset,
588
- focusOffset
589
- };
590
- if (element.selectionStart === startOffset && element.selectionEnd === endOffset) return;
591
- const startObj = Object.assign(new Number(startOffset), { [UISelection]: true });
592
- try {
593
- element.setSelectionRange(startObj, endOffset);
594
- } catch {}
595
- }
596
- function getUISelection(element) {
597
- var _element_UISelection, _element_selectionStart, _element_selectionEnd;
598
- const sel = (_element_UISelection = element[UISelection]) !== null && _element_UISelection !== void 0 ? _element_UISelection : {
599
- anchorOffset: (_element_selectionStart = element.selectionStart) !== null && _element_selectionStart !== void 0 ? _element_selectionStart : 0,
600
- focusOffset: (_element_selectionEnd = element.selectionEnd) !== null && _element_selectionEnd !== void 0 ? _element_selectionEnd : 0
601
- };
602
- return {
603
- ...sel,
604
- startOffset: Math.min(sel.anchorOffset, sel.focusOffset),
605
- endOffset: Math.max(sel.anchorOffset, sel.focusOffset)
606
- };
607
- }
608
- function hasUISelection(element) {
609
- return !!element[UISelection];
610
- }
611
- /** Flag the IDL selection as clean. This does not change the selection. */ function setUISelectionClean(element) {
612
- element[UISelection] = void 0;
613
- }
614
- var UIValue, UISelection, InitialValue;
615
- function init_UI() {
616
- return (init_UI = __esmMin((() => {
617
- UIValue = Symbol("Displayed value in UI");
618
- UISelection = Symbol("Displayed selection in UI");
619
- InitialValue = Symbol("Initial value to compare on blur");
620
- })))();
621
- }
622
- //#endregion
623
- //#region ../node_modules/@testing-library/user-event/dist/esm/utils/edit/timeValue.js
624
- function buildTimeValue(value) {
625
- const onlyDigitsValue = value.replace(/\D/g, "");
626
- if (onlyDigitsValue.length < 2) return value;
627
- const firstDigit = parseInt(onlyDigitsValue[0], 10);
628
- const secondDigit = parseInt(onlyDigitsValue[1], 10);
629
- if (firstDigit >= 3 || firstDigit === 2 && secondDigit >= 4) {
630
- let index;
631
- if (firstDigit >= 3) index = 1;
632
- else index = 2;
633
- return build(onlyDigitsValue, index);
634
- }
635
- if (value.length === 2) return value;
636
- return build(onlyDigitsValue, 2);
637
- }
638
- function build(onlyDigitsValue, index) {
639
- const hours = onlyDigitsValue.slice(0, index);
640
- const validHours = Math.min(parseInt(hours, 10), 23);
641
- const minuteCharacters = onlyDigitsValue.slice(index);
642
- const parsedMinutes = parseInt(minuteCharacters, 10);
643
- const validMinutes = Math.min(parsedMinutes, 59);
644
- return `${validHours.toString().padStart(2, "0")}:${validMinutes.toString().padStart(2, "0")}`;
645
- }
646
- function isValidDateOrTimeValue(element, value) {
647
- const clone = element.cloneNode();
648
- clone.value = value;
649
- return clone.value === value;
650
- }
651
- var parseInt;
652
- function init_timeValue() {
653
- return (init_timeValue = __esmMin((() => {
654
- parseInt = globalThis.parseInt;
655
- })))();
656
- }
657
- //#endregion
658
- //#region ../node_modules/@testing-library/user-event/dist/esm/utils/edit/maxLength.js
659
- function getMaxLength(element) {
660
- var _element_getAttribute;
661
- const attr = (_element_getAttribute = element.getAttribute("maxlength")) !== null && _element_getAttribute !== void 0 ? _element_getAttribute : "";
662
- return /^\d+$/.test(attr) && Number(attr) >= 0 ? Number(attr) : void 0;
663
- }
664
- function supportsMaxLength(element) {
665
- return isElementType(element, "textarea") || isElementType(element, "input") && element.type in maxLengthSupportedTypes;
666
- }
667
- var maxLengthSupportedTypes;
668
- function init_maxLength() {
669
- return (init_maxLength = __esmMin((() => {
670
- maxLengthSupportedTypes = /*#__PURE__*/ function(maxLengthSupportedTypes) {
671
- maxLengthSupportedTypes["email"] = "email";
672
- maxLengthSupportedTypes["password"] = "password";
673
- maxLengthSupportedTypes["search"] = "search";
674
- maxLengthSupportedTypes["telephone"] = "telephone";
675
- maxLengthSupportedTypes["text"] = "text";
676
- maxLengthSupportedTypes["url"] = "url";
677
- return maxLengthSupportedTypes;
678
- }(maxLengthSupportedTypes || {});
679
- })))();
680
- }
681
- //#endregion
682
- //#region ../node_modules/@testing-library/user-event/dist/esm/utils/focus/cursor.js
683
- function getNextCursorPosition(node, offset, direction, inputType) {
684
- if (isTextNode(node) && offset + direction >= 0 && offset + direction <= node.nodeValue.length) return {
685
- node,
686
- offset: offset + direction
687
- };
688
- const nextNode = getNextCharacterContentNode(node, offset, direction);
689
- if (nextNode) {
690
- if (isTextNode(nextNode)) return {
691
- node: nextNode,
692
- offset: direction > 0 ? Math.min(1, nextNode.nodeValue.length) : Math.max(nextNode.nodeValue.length - 1, 0)
693
- };
694
- else if (isElementType(nextNode, "br")) {
695
- const nextPlusOne = getNextCharacterContentNode(nextNode, void 0, direction);
696
- if (!nextPlusOne) {
697
- if (direction < 0 && inputType === "deleteContentBackward") return {
698
- node: nextNode.parentNode,
699
- offset: getOffset(nextNode)
700
- };
701
- return;
702
- } else if (isTextNode(nextPlusOne)) return {
703
- node: nextPlusOne,
704
- offset: direction > 0 ? 0 : nextPlusOne.nodeValue.length
705
- };
706
- else if (direction < 0 && isElementType(nextPlusOne, "br")) return {
707
- node: nextNode.parentNode,
708
- offset: getOffset(nextNode)
709
- };
710
- else return {
711
- node: nextPlusOne.parentNode,
712
- offset: getOffset(nextPlusOne) + (direction > 0 ? 0 : 1)
713
- };
714
- } else return {
715
- node: nextNode.parentNode,
716
- offset: getOffset(nextNode) + (direction > 0 ? 1 : 0)
717
- };
718
- }
719
- }
720
- function getNextCharacterContentNode(node, offset, direction) {
721
- const nextOffset = Number(offset) + (direction < 0 ? -1 : 0);
722
- if (offset !== void 0 && isElement(node) && nextOffset >= 0 && nextOffset < node.children.length) node = node.children[nextOffset];
723
- return walkNodes(node, direction === 1 ? "next" : "previous", isTreatedAsCharacterContent);
724
- }
725
- function isTreatedAsCharacterContent(node) {
726
- if (isTextNode(node)) return true;
727
- if (isElement(node)) {
728
- if (isElementType(node, ["input", "textarea"])) return node.type !== "hidden";
729
- else if (isElementType(node, "br")) return true;
730
- }
731
- return false;
732
- }
733
- function getOffset(node) {
734
- let i = 0;
735
- while (node.previousSibling) {
736
- i++;
737
- node = node.previousSibling;
738
- }
739
- return i;
740
- }
741
- function isElement(node) {
742
- return node.nodeType === 1;
743
- }
744
- function isTextNode(node) {
745
- return node.nodeType === 3;
746
- }
747
- function walkNodes(node, direction, callback) {
748
- for (;;) {
749
- var _node_ownerDocument;
750
- const sibling = node[`${direction}Sibling`];
751
- if (sibling) {
752
- node = getDescendant(sibling, direction === "next" ? "first" : "last");
753
- if (callback(node)) return node;
754
- } else if (node.parentNode && (!isElement(node.parentNode) || !isContentEditable(node.parentNode) && node.parentNode !== ((_node_ownerDocument = node.ownerDocument) === null || _node_ownerDocument === void 0 ? void 0 : _node_ownerDocument.body))) node = node.parentNode;
755
- else break;
756
- }
757
- }
758
- function getDescendant(node, direction) {
759
- while (node.hasChildNodes()) node = node[`${direction}Child`];
760
- return node;
761
- }
762
- function init_cursor() {
763
- return (init_cursor = __esmMin((() => {})))();
764
- }
765
- //#endregion
766
- //#region ../node_modules/@testing-library/user-event/dist/esm/document/trackValue.js
767
- function isReact17Element(element) {
768
- return Object.getOwnPropertyNames(element).some((k) => k.startsWith("__react")) && getWindow(element).REACT_VERSION === 17;
769
- }
770
- function startTrackValue(element) {
771
- if (!isReact17Element(element)) return;
772
- element[TrackChanges] = {
773
- previousValue: String(element.value),
774
- tracked: []
775
- };
776
- }
777
- function trackOrSetValue(element, v) {
778
- var _element_TrackChanges_tracked, _element_TrackChanges;
779
- (_element_TrackChanges = element[TrackChanges]) === null || _element_TrackChanges === void 0 || (_element_TrackChanges_tracked = _element_TrackChanges.tracked) == null || _element_TrackChanges_tracked.push(v);
780
- if (!element[TrackChanges]) {
781
- setUIValueClean(element);
782
- setUISelection(element, { focusOffset: v.length });
783
- }
784
- }
785
- function commitValueAfterInput(element, cursorOffset) {
786
- var _changes_tracked;
787
- const changes = element[TrackChanges];
788
- element[TrackChanges] = void 0;
789
- if (!(changes === null || changes === void 0 ? void 0 : (_changes_tracked = changes.tracked) === null || _changes_tracked === void 0 ? void 0 : _changes_tracked.length)) return;
790
- const isJustReactStateUpdate = changes.tracked.length === 2 && changes.tracked[0] === changes.previousValue && changes.tracked[1] === element.value;
791
- if (!isJustReactStateUpdate) setUIValueClean(element);
792
- if (hasUISelection(element)) setUISelection(element, { focusOffset: isJustReactStateUpdate ? cursorOffset : element.value.length });
793
- }
794
- var TrackChanges;
795
- function init_trackValue() {
796
- return (init_trackValue = __esmMin((() => {
797
- init_Clipboard();
798
- init_UI();
799
- TrackChanges = Symbol("Track programmatic changes for React workaround");
800
- })))();
801
- }
802
- //#endregion
803
- //#region ../node_modules/@testing-library/user-event/dist/esm/event/selection/getTargetTypeAndSelection.js
804
- /**
805
- * Determine which selection logic and selection ranges to consider.
806
- */ function getTargetTypeAndSelection(node) {
807
- const element = getElement(node);
808
- if (element && hasOwnSelection(element)) return {
809
- type: "input",
810
- selection: getUISelection(element)
811
- };
812
- const selection = element === null || element === void 0 ? void 0 : element.ownerDocument.getSelection();
813
- return {
814
- type: getContentEditable(node) && (selection === null || selection === void 0 ? void 0 : selection.anchorNode) && getContentEditable(selection.anchorNode) ? "contenteditable" : "default",
815
- selection
816
- };
817
- }
818
- function getElement(node) {
819
- return node.nodeType === 1 ? node : node.parentElement;
820
- }
821
- function init_getTargetTypeAndSelection() {
822
- return (init_getTargetTypeAndSelection = __esmMin((() => {
823
- init_UI();
824
- init_Clipboard();
825
- init_selection();
826
- })))();
827
- }
828
- //#endregion
829
- //#region ../node_modules/@testing-library/user-event/dist/esm/event/selection/getInputRange.js
830
- /**
831
- * Get the range that would be overwritten by input.
832
- */ function getInputRange(focusNode) {
833
- const typeAndSelection = getTargetTypeAndSelection(focusNode);
834
- if (typeAndSelection.type === "input") return typeAndSelection.selection;
835
- else if (typeAndSelection.type === "contenteditable") {
836
- var _typeAndSelection_selection;
837
- return (_typeAndSelection_selection = typeAndSelection.selection) === null || _typeAndSelection_selection === void 0 ? void 0 : _typeAndSelection_selection.getRangeAt(0);
838
- }
839
- }
840
- function init_getInputRange() {
841
- return (init_getInputRange = __esmMin((() => {
842
- init_getTargetTypeAndSelection();
843
- })))();
844
- }
845
- //#endregion
846
- //#region ../node_modules/@testing-library/user-event/dist/esm/event/selection/setSelection.js
847
- /**
848
- * Set the selection
849
- */ function setSelection({ focusNode, focusOffset, anchorNode = focusNode, anchorOffset = focusOffset }) {
850
- var _anchorNode_ownerDocument_getSelection, _anchorNode_ownerDocument;
851
- if (getTargetTypeAndSelection(focusNode).type === "input") return setUISelection(focusNode, {
852
- anchorOffset,
853
- focusOffset
854
- });
855
- (_anchorNode_ownerDocument = anchorNode.ownerDocument) === null || _anchorNode_ownerDocument === void 0 || (_anchorNode_ownerDocument_getSelection = _anchorNode_ownerDocument.getSelection()) == null || _anchorNode_ownerDocument_getSelection.setBaseAndExtent(anchorNode, anchorOffset, focusNode, focusOffset);
856
- }
857
- function init_setSelection() {
858
- return (init_setSelection = __esmMin((() => {
859
- init_UI();
860
- init_Clipboard();
861
- init_getTargetTypeAndSelection();
862
- })))();
863
- }
864
- //#endregion
865
- //#region ../node_modules/@testing-library/user-event/dist/esm/event/input.js
866
- function isDateOrTime(element) {
867
- return isElementType(element, "input") && ["date", "time"].includes(element.type);
868
- }
869
- function input(instance, element, data, inputType = "insertText") {
870
- const inputRange = getInputRange(element);
871
- /* istanbul ignore if */ if (!inputRange) return;
872
- if (!isDateOrTime(element)) {
873
- if (!instance.dispatchUIEvent(element, "beforeinput", {
874
- inputType,
875
- data
876
- })) return;
877
- }
878
- if ("startContainer" in inputRange) editContenteditable(instance, element, inputRange, data, inputType);
879
- else editInputElement(instance, element, inputRange, data, inputType);
880
- }
881
- function editContenteditable(instance, element, inputRange, data, inputType) {
882
- let del = false;
883
- if (!inputRange.collapsed) {
884
- del = true;
885
- inputRange.deleteContents();
886
- } else if (["deleteContentBackward", "deleteContentForward"].includes(inputType)) {
887
- const nextPosition = getNextCursorPosition(inputRange.startContainer, inputRange.startOffset, inputType === "deleteContentBackward" ? -1 : 1, inputType);
888
- if (nextPosition) {
889
- del = true;
890
- const delRange = inputRange.cloneRange();
891
- if (delRange.comparePoint(nextPosition.node, nextPosition.offset) < 0) delRange.setStart(nextPosition.node, nextPosition.offset);
892
- else delRange.setEnd(nextPosition.node, nextPosition.offset);
893
- delRange.deleteContents();
894
- }
895
- }
896
- if (data) {
897
- if (inputRange.endContainer.nodeType === 3) {
898
- const offset = inputRange.endOffset;
899
- inputRange.endContainer.insertData(offset, data);
900
- inputRange.setStart(inputRange.endContainer, offset + data.length);
901
- inputRange.setEnd(inputRange.endContainer, offset + data.length);
902
- } else {
903
- const text = element.ownerDocument.createTextNode(data);
904
- inputRange.insertNode(text);
905
- inputRange.setStart(text, data.length);
906
- inputRange.setEnd(text, data.length);
907
- }
908
- }
909
- if (del || data) instance.dispatchUIEvent(element, "input", { inputType });
910
- }
911
- function editInputElement(instance, element, inputRange, data, inputType) {
912
- let dataToInsert = data;
913
- if (supportsMaxLength(element)) {
914
- const maxLength = getMaxLength(element);
915
- if (maxLength !== void 0 && data.length > 0) {
916
- const selectionLength = inputRange.endOffset - inputRange.startOffset;
917
- const spaceUntilMaxLength = maxLength - element.value.length + selectionLength;
918
- if (spaceUntilMaxLength > 0) dataToInsert = data.substring(0, spaceUntilMaxLength);
919
- else return;
920
- }
921
- }
922
- const { newValue, newOffset, oldValue } = calculateNewValue(dataToInsert, element, inputRange, inputType);
923
- if (newValue === oldValue && newOffset === inputRange.startOffset && newOffset === inputRange.endOffset) return;
924
- if (isElementType(element, "input", { type: "number" }) && !isValidNumberInput(newValue)) return;
925
- setUIValue(element, newValue);
926
- setSelection({
927
- focusNode: element,
928
- anchorOffset: newOffset,
929
- focusOffset: newOffset
930
- });
931
- if (isDateOrTime(element)) {
932
- if (isValidDateOrTimeValue(element, newValue)) {
933
- commitInput(instance, element, newOffset, {});
934
- instance.dispatchUIEvent(element, "change");
935
- clearInitialValue(element);
936
- }
937
- } else commitInput(instance, element, newOffset, {
938
- data,
939
- inputType
940
- });
941
- }
942
- function calculateNewValue(inputData, node, { startOffset, endOffset }, inputType) {
943
- const value = getUIValue(node);
944
- const prologEnd = Math.max(0, startOffset === endOffset && inputType === "deleteContentBackward" ? startOffset - 1 : startOffset);
945
- const prolog = value.substring(0, prologEnd);
946
- const epilogStart = Math.min(value.length, startOffset === endOffset && inputType === "deleteContentForward" ? startOffset + 1 : endOffset);
947
- let newValue = `${prolog}${inputData}${value.substring(epilogStart, value.length)}`;
948
- let newOffset = prologEnd + inputData.length;
949
- if (isElementType(node, "input", { type: "time" })) {
950
- const builtValue = buildTimeValue(newValue);
951
- if (builtValue !== "" && isValidDateOrTimeValue(node, builtValue)) {
952
- newValue = builtValue;
953
- newOffset = builtValue.length;
954
- }
955
- }
956
- return {
957
- oldValue: value,
958
- newValue,
959
- newOffset
960
- };
961
- }
962
- function commitInput(instance, element, newOffset, inputInit) {
963
- instance.dispatchUIEvent(element, "input", inputInit);
964
- commitValueAfterInput(element, newOffset);
965
- }
966
- function isValidNumberInput(value) {
967
- var _value_match, _value_match1;
968
- const valueParts = value.split("e", 2);
969
- return !(/[^\d.\-e]/.test(value) || Number((_value_match = value.match(/-/g)) === null || _value_match === void 0 ? void 0 : _value_match.length) > 2 || Number((_value_match1 = value.match(/\./g)) === null || _value_match1 === void 0 ? void 0 : _value_match1.length) > 1 || valueParts[1] && !/^-?\d*$/.test(valueParts[1]));
970
- }
971
- function init_input() {
972
- return (init_input = __esmMin((() => {
973
- init_UI();
974
- init_Clipboard();
975
- init_timeValue();
976
- init_maxLength();
977
- init_cursor();
978
- init_trackValue();
979
- init_getInputRange();
980
- init_setSelection();
981
- })))();
982
- }
983
- //#endregion
984
- //#region ../node_modules/@testing-library/user-event/dist/esm/event/behavior/cut.js
985
- function init_cut() {
986
- return (init_cut = __esmMin((() => {
987
- init_Clipboard();
988
- init_isEditable();
989
- init_input();
990
- init_registry();
991
- behavior.cut = (event, target, instance) => {
992
- return () => {
993
- if (isEditable(target)) input(instance, target, "", "deleteByCut");
994
- };
995
- };
996
- })))();
997
- }
998
- //#endregion
999
- //#region ../node_modules/@testing-library/user-event/dist/esm/document/getValueOrTextContent.js
1000
- function getValueOrTextContent(element) {
1001
- // istanbul ignore if
1002
- if (!element) return null;
1003
- if (isContentEditable(element)) return element.textContent;
1004
- return getUIValue(element);
1005
- }
1006
- function init_getValueOrTextContent() {
1007
- return (init_getValueOrTextContent = __esmMin((() => {
1008
- init_Clipboard();
1009
- init_UI();
1010
- })))();
1011
- }
1012
- //#endregion
1013
- //#region ../node_modules/@testing-library/user-event/dist/esm/utils/misc/isVisible.js
1014
- function isVisible(element) {
1015
- const window = getWindow(element);
1016
- for (let el = element; el === null || el === void 0 ? void 0 : el.ownerDocument; el = el.parentElement) {
1017
- const { display, visibility } = window.getComputedStyle(el);
1018
- if (display === "none") return false;
1019
- if (visibility === "hidden") return false;
1020
- }
1021
- return true;
1022
- }
1023
- function init_isVisible() {
1024
- return (init_isVisible = __esmMin((() => {})))();
1025
- }
1026
- //#endregion
1027
- //#region ../node_modules/@testing-library/user-event/dist/esm/utils/focus/getTabDestination.js
1028
- function getTabDestination(activeElement, shift) {
1029
- const document = activeElement.ownerDocument;
1030
- const focusableElements = document.querySelectorAll(FOCUSABLE_SELECTOR);
1031
- const enabledElements = Array.from(focusableElements).filter((el) => el === activeElement || !(Number(el.getAttribute("tabindex")) < 0 || isDisabled(el)));
1032
- if (Number(activeElement.getAttribute("tabindex")) >= 0) enabledElements.sort((a, b) => {
1033
- const i = Number(a.getAttribute("tabindex"));
1034
- const j = Number(b.getAttribute("tabindex"));
1035
- if (i === j) return 0;
1036
- else if (i === 0) return 1;
1037
- else if (j === 0) return -1;
1038
- return i - j;
1039
- });
1040
- const checkedRadio = {};
1041
- let prunedElements = [document.body];
1042
- const activeRadioGroup = isElementType(activeElement, "input", { type: "radio" }) ? activeElement.name : void 0;
1043
- enabledElements.forEach((currentElement) => {
1044
- const el = currentElement;
1045
- if (isElementType(el, "input", { type: "radio" }) && el.name) {
1046
- if (el === activeElement) {
1047
- prunedElements.push(el);
1048
- return;
1049
- } else if (el.name === activeRadioGroup) return;
1050
- if (el.checked) {
1051
- prunedElements = prunedElements.filter((e) => !isElementType(e, "input", {
1052
- type: "radio",
1053
- name: el.name
1054
- }));
1055
- prunedElements.push(el);
1056
- checkedRadio[el.name] = el;
1057
- return;
1058
- }
1059
- if (typeof checkedRadio[el.name] !== "undefined") return;
1060
- }
1061
- prunedElements.push(el);
1062
- });
1063
- for (let index = prunedElements.findIndex((el) => el === activeElement);;) {
1064
- index += shift ? -1 : 1;
1065
- if (index === prunedElements.length) index = 0;
1066
- else if (index === -1) index = prunedElements.length - 1;
1067
- if (prunedElements[index] === activeElement || prunedElements[index] === document.body || isVisible(prunedElements[index])) return prunedElements[index];
1068
- }
1069
- }
1070
- function init_getTabDestination() {
1071
- return (init_getTabDestination = __esmMin((() => {
1072
- init_isDisabled();
1073
- init_isVisible();
1074
- init_selector();
1075
- })))();
1076
- }
1077
- //#endregion
1078
- //#region ../node_modules/@testing-library/user-event/dist/esm/event/selection/moveSelection.js
1079
- /**
1080
- * Move the selection
1081
- */ function moveSelection(node, direction) {
1082
- if (hasOwnSelection(node)) {
1083
- const selection = getUISelection(node);
1084
- setSelection({
1085
- focusNode: node,
1086
- focusOffset: selection.startOffset === selection.endOffset ? selection.focusOffset + direction : direction < 0 ? selection.startOffset : selection.endOffset
1087
- });
1088
- } else {
1089
- const selection = node.ownerDocument.getSelection();
1090
- if (!(selection === null || selection === void 0 ? void 0 : selection.focusNode)) return;
1091
- if (selection.isCollapsed) {
1092
- const nextPosition = getNextCursorPosition(selection.focusNode, selection.focusOffset, direction);
1093
- if (nextPosition) setSelection({
1094
- focusNode: nextPosition.node,
1095
- focusOffset: nextPosition.offset
1096
- });
1097
- } else selection[direction < 0 ? "collapseToStart" : "collapseToEnd"]();
1098
- }
1099
- }
1100
- function init_moveSelection() {
1101
- return (init_moveSelection = __esmMin((() => {
1102
- init_UI();
1103
- init_Clipboard();
1104
- init_cursor();
1105
- init_selection();
1106
- init_setSelection();
1107
- })))();
1108
- }
1109
- //#endregion
1110
- //#region ../node_modules/@testing-library/user-event/dist/esm/event/selection/selectAll.js
1111
- /**
1112
- * Expand a selection like the browser does when pressing Ctrl+A.
1113
- */ function selectAll(target) {
1114
- var _getContentEditable;
1115
- if (hasOwnSelection(target)) return setSelection({
1116
- focusNode: target,
1117
- anchorOffset: 0,
1118
- focusOffset: getUIValue(target).length
1119
- });
1120
- const focusNode = (_getContentEditable = getContentEditable(target)) !== null && _getContentEditable !== void 0 ? _getContentEditable : target.ownerDocument.body;
1121
- setSelection({
1122
- focusNode,
1123
- anchorOffset: 0,
1124
- focusOffset: focusNode.childNodes.length
1125
- });
1126
- }
1127
- function isAllSelected(target) {
1128
- var _getContentEditable;
1129
- if (hasOwnSelection(target)) return getUISelection(target).startOffset === 0 && getUISelection(target).endOffset === getUIValue(target).length;
1130
- const focusNode = (_getContentEditable = getContentEditable(target)) !== null && _getContentEditable !== void 0 ? _getContentEditable : target.ownerDocument.body;
1131
- const selection = target.ownerDocument.getSelection();
1132
- return (selection === null || selection === void 0 ? void 0 : selection.anchorNode) === focusNode && selection.focusNode === focusNode && selection.anchorOffset === 0 && selection.focusOffset === focusNode.childNodes.length;
1133
- }
1134
- function init_selectAll() {
1135
- return (init_selectAll = __esmMin((() => {
1136
- init_UI();
1137
- init_Clipboard();
1138
- init_selection();
1139
- init_setSelection();
1140
- })))();
1141
- }
1142
- //#endregion
1143
- //#region ../node_modules/@testing-library/user-event/dist/esm/event/selection/setSelectionRange.js
1144
- /**
1145
- * Backward-compatible selection.
1146
- *
1147
- * Handles input elements and contenteditable if it only contains a single text node.
1148
- */ function setSelectionRange(element, anchorOffset, focusOffset) {
1149
- var _element_firstChild;
1150
- if (hasOwnSelection(element)) return setSelection({
1151
- focusNode: element,
1152
- anchorOffset,
1153
- focusOffset
1154
- });
1155
- /* istanbul ignore else */ if (isContentEditable(element) && ((_element_firstChild = element.firstChild) === null || _element_firstChild === void 0 ? void 0 : _element_firstChild.nodeType) === 3) return setSelection({
1156
- focusNode: element.firstChild,
1157
- anchorOffset,
1158
- focusOffset
1159
- });
1160
- /* istanbul ignore next */ throw new Error("Not implemented. The result of this interaction is unreliable.");
1161
- }
1162
- function init_setSelectionRange() {
1163
- return (init_setSelectionRange = __esmMin((() => {
1164
- init_Clipboard();
1165
- init_selection();
1166
- init_setSelection();
1167
- })))();
1168
- }
1169
- //#endregion
1170
- //#region ../node_modules/@testing-library/user-event/dist/esm/event/radio.js
1171
- function walkRadio(instance, el, direction) {
1172
- const window = getWindow(el);
1173
- const group = Array.from(el.ownerDocument.querySelectorAll(el.name ? `input[type="radio"][name="${window.CSS.escape(el.name)}"]` : `input[type="radio"][name=""], input[type="radio"]:not([name])`));
1174
- for (let i = group.findIndex((e) => e === el) + direction;; i += direction) {
1175
- if (!group[i]) i = direction > 0 ? 0 : group.length - 1;
1176
- if (group[i] === el) return;
1177
- if (isDisabled(group[i])) continue;
1178
- focusElement(group[i]);
1179
- instance.dispatchUIEvent(group[i], "click");
1180
- return;
1181
- }
1182
- }
1183
- function init_radio() {
1184
- return (init_radio = __esmMin((() => {
1185
- init_Clipboard();
1186
- init_isDisabled();
1187
- init_focus();
1188
- })))();
1189
- }
1190
- //#endregion
1191
- //#region ../node_modules/@testing-library/user-event/dist/esm/event/behavior/keydown.js
1192
- var keydownBehavior, combinationBehavior;
1193
- function init_keydown() {
1194
- return (init_keydown = __esmMin((() => {
1195
- init_UI();
1196
- init_getValueOrTextContent();
1197
- init_Clipboard();
1198
- init_isEditable();
1199
- init_getTabDestination();
1200
- init_selection();
1201
- init_focus();
1202
- init_input();
1203
- init_moveSelection();
1204
- init_selectAll();
1205
- init_setSelectionRange();
1206
- init_radio();
1207
- init_registry();
1208
- behavior.keydown = (event, target, instance) => {
1209
- var _ref;
1210
- var _keydownBehavior_event_key;
1211
- return (_ref = (_keydownBehavior_event_key = keydownBehavior[event.key]) === null || _keydownBehavior_event_key === void 0 ? void 0 : _keydownBehavior_event_key.call(keydownBehavior, event, target, instance)) !== null && _ref !== void 0 ? _ref : combinationBehavior(event, target, instance);
1212
- };
1213
- keydownBehavior = {
1214
- ArrowDown: (event, target, instance) => {
1215
- /* istanbul ignore else */ if (isElementType(target, "input", { type: "radio" })) return () => walkRadio(instance, target, 1);
1216
- },
1217
- ArrowLeft: (event, target, instance) => {
1218
- if (isElementType(target, "input", { type: "radio" })) return () => walkRadio(instance, target, -1);
1219
- return () => moveSelection(target, -1);
1220
- },
1221
- ArrowRight: (event, target, instance) => {
1222
- if (isElementType(target, "input", { type: "radio" })) return () => walkRadio(instance, target, 1);
1223
- return () => moveSelection(target, 1);
1224
- },
1225
- ArrowUp: (event, target, instance) => {
1226
- /* istanbul ignore else */ if (isElementType(target, "input", { type: "radio" })) return () => walkRadio(instance, target, -1);
1227
- },
1228
- Backspace: (event, target, instance) => {
1229
- if (isEditable(target)) return () => {
1230
- input(instance, target, "", "deleteContentBackward");
1231
- };
1232
- },
1233
- Delete: (event, target, instance) => {
1234
- if (isEditable(target)) return () => {
1235
- input(instance, target, "", "deleteContentForward");
1236
- };
1237
- },
1238
- End: (event, target) => {
1239
- if (isElementType(target, ["input", "textarea"]) || isContentEditable(target)) return () => {
1240
- var _ref;
1241
- var _getValueOrTextContent;
1242
- const newPos = (_ref = (_getValueOrTextContent = getValueOrTextContent(target)) === null || _getValueOrTextContent === void 0 ? void 0 : _getValueOrTextContent.length) !== null && _ref !== void 0 ? _ref : /* istanbul ignore next */ 0;
1243
- setSelectionRange(target, newPos, newPos);
1244
- };
1245
- },
1246
- Home: (event, target) => {
1247
- if (isElementType(target, ["input", "textarea"]) || isContentEditable(target)) return () => {
1248
- setSelectionRange(target, 0, 0);
1249
- };
1250
- },
1251
- PageDown: (event, target) => {
1252
- if (isElementType(target, ["input"])) return () => {
1253
- const newPos = getUIValue(target).length;
1254
- setSelectionRange(target, newPos, newPos);
1255
- };
1256
- },
1257
- PageUp: (event, target) => {
1258
- if (isElementType(target, ["input"])) return () => {
1259
- setSelectionRange(target, 0, 0);
1260
- };
1261
- },
1262
- Tab: (event, target, instance) => {
1263
- return () => {
1264
- const dest = getTabDestination(target, instance.system.keyboard.modifiers.Shift);
1265
- focusElement(dest);
1266
- if (hasOwnSelection(dest)) setUISelection(dest, {
1267
- anchorOffset: 0,
1268
- focusOffset: dest.value.length
1269
- });
1270
- };
1271
- }
1272
- };
1273
- combinationBehavior = (event, target, instance) => {
1274
- if (event.code === "KeyA" && instance.system.keyboard.modifiers.Control) return () => selectAll(target);
1275
- };
1276
- })))();
1277
- }
1278
- //#endregion
1279
- //#region ../node_modules/@testing-library/user-event/dist/esm/event/behavior/keypress.js
1280
- var ClickInputOnEnter, SubmitSingleInputOnEnter;
1281
- function init_keypress() {
1282
- return (init_keypress = __esmMin((() => {
1283
- init_Clipboard();
1284
- init_isEditable();
1285
- init_input();
1286
- init_registry();
1287
- behavior.keypress = (event, target, instance) => {
1288
- if (event.key === "Enter") {
1289
- if (isElementType(target, "button") || isElementType(target, "input") && ClickInputOnEnter.includes(target.type) || isElementType(target, "a") && Boolean(target.href)) return () => {
1290
- instance.dispatchUIEvent(target, "click");
1291
- };
1292
- else if (isElementType(target, "input")) {
1293
- const form = target.form;
1294
- const submit = form === null || form === void 0 ? void 0 : form.querySelector("input[type=\"submit\"], button:not([type]), button[type=\"submit\"]");
1295
- if (submit) return () => instance.dispatchUIEvent(submit, "click");
1296
- else if (form && SubmitSingleInputOnEnter.includes(target.type) && form.querySelectorAll("input").length === 1) return () => instance.dispatchUIEvent(form, "submit");
1297
- else return;
1298
- }
1299
- }
1300
- if (isEditable(target)) {
1301
- const inputType = event.key === "Enter" ? isContentEditable(target) && !instance.system.keyboard.modifiers.Shift ? "insertParagraph" : "insertLineBreak" : "insertText";
1302
- const inputData = event.key === "Enter" ? "\n" : event.key;
1303
- return () => input(instance, target, inputData, inputType);
1304
- }
1305
- };
1306
- ClickInputOnEnter = [
1307
- "button",
1308
- "color",
1309
- "file",
1310
- "image",
1311
- "reset",
1312
- "submit"
1313
- ];
1314
- SubmitSingleInputOnEnter = [
1315
- "email",
1316
- "month",
1317
- "password",
1318
- "search",
1319
- "tel",
1320
- "text",
1321
- "url",
1322
- "week"
1323
- ];
1324
- })))();
1325
- }
1326
- //#endregion
1327
- //#region ../node_modules/@testing-library/user-event/dist/esm/event/behavior/keyup.js
1328
- var keyupBehavior;
1329
- function init_keyup() {
1330
- return (init_keyup = __esmMin((() => {
1331
- init_isClickableInput();
1332
- init_Clipboard();
1333
- init_registry();
1334
- behavior.keyup = (event, target, instance) => {
1335
- var _keyupBehavior_event_key;
1336
- return (_keyupBehavior_event_key = keyupBehavior[event.key]) === null || _keyupBehavior_event_key === void 0 ? void 0 : _keyupBehavior_event_key.call(keyupBehavior, event, target, instance);
1337
- };
1338
- keyupBehavior = { " ": (event, target, instance) => {
1339
- if (isClickableInput(target)) return () => instance.dispatchUIEvent(target, "click");
1340
- } };
1341
- })))();
1342
- }
1343
- //#endregion
1344
- //#region ../node_modules/@testing-library/user-event/dist/esm/event/behavior/paste.js
1345
- function init_paste() {
1346
- return (init_paste = __esmMin((() => {
1347
- init_Clipboard();
1348
- init_isEditable();
1349
- init_input();
1350
- init_registry();
1351
- behavior.paste = (event, target, instance) => {
1352
- if (isEditable(target)) return () => {
1353
- var _event_clipboardData;
1354
- const insertData = (_event_clipboardData = event.clipboardData) === null || _event_clipboardData === void 0 ? void 0 : _event_clipboardData.getData("text");
1355
- if (insertData) input(instance, target, insertData, "insertFromPaste");
1356
- };
1357
- };
1358
- })))();
1359
- }
1360
- //#endregion
1361
- //#region ../node_modules/@testing-library/user-event/dist/esm/event/eventMap.js
1362
- function getEventClass(type) {
1363
- return eventMap[type].EventType;
1364
- }
1365
- function isMouseEvent(type) {
1366
- return mouseEvents.includes(getEventClass(type));
1367
- }
1368
- function isKeyboardEvent(type) {
1369
- return getEventClass(type) === "KeyboardEvent";
1370
- }
1371
- var eventMap, mouseEvents;
1372
- function init_eventMap() {
1373
- return (init_eventMap = __esmMin((() => {
1374
- eventMap = {
1375
- auxclick: {
1376
- EventType: "PointerEvent",
1377
- defaultInit: {
1378
- bubbles: true,
1379
- cancelable: true,
1380
- composed: true
1381
- }
1382
- },
1383
- beforeinput: {
1384
- EventType: "InputEvent",
1385
- defaultInit: {
1386
- bubbles: true,
1387
- cancelable: true,
1388
- composed: true
1389
- }
1390
- },
1391
- blur: {
1392
- EventType: "FocusEvent",
1393
- defaultInit: {
1394
- bubbles: false,
1395
- cancelable: false,
1396
- composed: true
1397
- }
1398
- },
1399
- click: {
1400
- EventType: "PointerEvent",
1401
- defaultInit: {
1402
- bubbles: true,
1403
- cancelable: true,
1404
- composed: true
1405
- }
1406
- },
1407
- contextmenu: {
1408
- EventType: "PointerEvent",
1409
- defaultInit: {
1410
- bubbles: true,
1411
- cancelable: true,
1412
- composed: true
1413
- }
1414
- },
1415
- copy: {
1416
- EventType: "ClipboardEvent",
1417
- defaultInit: {
1418
- bubbles: true,
1419
- cancelable: true,
1420
- composed: true
1421
- }
1422
- },
1423
- change: {
1424
- EventType: "Event",
1425
- defaultInit: {
1426
- bubbles: true,
1427
- cancelable: false
1428
- }
1429
- },
1430
- cut: {
1431
- EventType: "ClipboardEvent",
1432
- defaultInit: {
1433
- bubbles: true,
1434
- cancelable: true,
1435
- composed: true
1436
- }
1437
- },
1438
- dblclick: {
1439
- EventType: "MouseEvent",
1440
- defaultInit: {
1441
- bubbles: true,
1442
- cancelable: true,
1443
- composed: true
1444
- }
1445
- },
1446
- focus: {
1447
- EventType: "FocusEvent",
1448
- defaultInit: {
1449
- bubbles: false,
1450
- cancelable: false,
1451
- composed: true
1452
- }
1453
- },
1454
- focusin: {
1455
- EventType: "FocusEvent",
1456
- defaultInit: {
1457
- bubbles: true,
1458
- cancelable: false,
1459
- composed: true
1460
- }
1461
- },
1462
- focusout: {
1463
- EventType: "FocusEvent",
1464
- defaultInit: {
1465
- bubbles: true,
1466
- cancelable: false,
1467
- composed: true
1468
- }
1469
- },
1470
- keydown: {
1471
- EventType: "KeyboardEvent",
1472
- defaultInit: {
1473
- bubbles: true,
1474
- cancelable: true,
1475
- composed: true
1476
- }
1477
- },
1478
- keypress: {
1479
- EventType: "KeyboardEvent",
1480
- defaultInit: {
1481
- bubbles: true,
1482
- cancelable: true,
1483
- composed: true
1484
- }
1485
- },
1486
- keyup: {
1487
- EventType: "KeyboardEvent",
1488
- defaultInit: {
1489
- bubbles: true,
1490
- cancelable: true,
1491
- composed: true
1492
- }
1493
- },
1494
- paste: {
1495
- EventType: "ClipboardEvent",
1496
- defaultInit: {
1497
- bubbles: true,
1498
- cancelable: true,
1499
- composed: true
1500
- }
1501
- },
1502
- input: {
1503
- EventType: "InputEvent",
1504
- defaultInit: {
1505
- bubbles: true,
1506
- cancelable: false,
1507
- composed: true
1508
- }
1509
- },
1510
- mousedown: {
1511
- EventType: "MouseEvent",
1512
- defaultInit: {
1513
- bubbles: true,
1514
- cancelable: true,
1515
- composed: true
1516
- }
1517
- },
1518
- mouseenter: {
1519
- EventType: "MouseEvent",
1520
- defaultInit: {
1521
- bubbles: false,
1522
- cancelable: false,
1523
- composed: true
1524
- }
1525
- },
1526
- mouseleave: {
1527
- EventType: "MouseEvent",
1528
- defaultInit: {
1529
- bubbles: false,
1530
- cancelable: false,
1531
- composed: true
1532
- }
1533
- },
1534
- mousemove: {
1535
- EventType: "MouseEvent",
1536
- defaultInit: {
1537
- bubbles: true,
1538
- cancelable: true,
1539
- composed: true
1540
- }
1541
- },
1542
- mouseout: {
1543
- EventType: "MouseEvent",
1544
- defaultInit: {
1545
- bubbles: true,
1546
- cancelable: true,
1547
- composed: true
1548
- }
1549
- },
1550
- mouseover: {
1551
- EventType: "MouseEvent",
1552
- defaultInit: {
1553
- bubbles: true,
1554
- cancelable: true,
1555
- composed: true
1556
- }
1557
- },
1558
- mouseup: {
1559
- EventType: "MouseEvent",
1560
- defaultInit: {
1561
- bubbles: true,
1562
- cancelable: true,
1563
- composed: true
1564
- }
1565
- },
1566
- pointerover: {
1567
- EventType: "PointerEvent",
1568
- defaultInit: {
1569
- bubbles: true,
1570
- cancelable: true,
1571
- composed: true
1572
- }
1573
- },
1574
- pointerenter: {
1575
- EventType: "PointerEvent",
1576
- defaultInit: {
1577
- bubbles: false,
1578
- cancelable: false
1579
- }
1580
- },
1581
- pointerdown: {
1582
- EventType: "PointerEvent",
1583
- defaultInit: {
1584
- bubbles: true,
1585
- cancelable: true,
1586
- composed: true
1587
- }
1588
- },
1589
- pointermove: {
1590
- EventType: "PointerEvent",
1591
- defaultInit: {
1592
- bubbles: true,
1593
- cancelable: true,
1594
- composed: true
1595
- }
1596
- },
1597
- pointerup: {
1598
- EventType: "PointerEvent",
1599
- defaultInit: {
1600
- bubbles: true,
1601
- cancelable: true,
1602
- composed: true
1603
- }
1604
- },
1605
- pointercancel: {
1606
- EventType: "PointerEvent",
1607
- defaultInit: {
1608
- bubbles: true,
1609
- cancelable: false,
1610
- composed: true
1611
- }
1612
- },
1613
- pointerout: {
1614
- EventType: "PointerEvent",
1615
- defaultInit: {
1616
- bubbles: true,
1617
- cancelable: true,
1618
- composed: true
1619
- }
1620
- },
1621
- pointerleave: {
1622
- EventType: "PointerEvent",
1623
- defaultInit: {
1624
- bubbles: false,
1625
- cancelable: false
1626
- }
1627
- },
1628
- submit: {
1629
- EventType: "Event",
1630
- defaultInit: {
1631
- bubbles: true,
1632
- cancelable: true
1633
- }
1634
- }
1635
- };
1636
- mouseEvents = ["MouseEvent", "PointerEvent"];
1637
- })))();
1638
- }
1639
- //#endregion
1640
- //#region ../node_modules/@testing-library/user-event/dist/esm/event/createEvent.js
1641
- function createEvent(type, target, init) {
1642
- const window = getWindow(target);
1643
- const { EventType, defaultInit } = eventMap[type];
1644
- const event = new (getEventConstructors(window))[EventType](type, defaultInit);
1645
- var eventInit = {};
1646
- for (var key in init) if (Object.prototype.hasOwnProperty.call(init, key)) eventInit[key] = init[key];
1647
- eventInit.view = window;
1648
- eventInitializer[EventType].forEach(function(f) {
1649
- f(event, eventInit);
1650
- });
1651
- return event;
1652
- }
1653
- /* istanbul ignore next */ function getEventConstructors(window) {
1654
- var _window_Event, _window_AnimationEvent, _window_ClipboardEvent, _window_PopStateEvent, _window_ProgressEvent, _window_TransitionEvent, _window_UIEvent, _window_CompositionEvent, _window_FocusEvent, _window_InputEvent, _window_KeyboardEvent, _window_MouseEvent, _window_DragEvent, _window_PointerEvent, _window_TouchEvent;
1655
- const Event = (_window_Event = window.Event) !== null && _window_Event !== void 0 ? _window_Event : class Event {};
1656
- const AnimationEvent = (_window_AnimationEvent = window.AnimationEvent) !== null && _window_AnimationEvent !== void 0 ? _window_AnimationEvent : class AnimationEvent extends Event {};
1657
- const ClipboardEvent = (_window_ClipboardEvent = window.ClipboardEvent) !== null && _window_ClipboardEvent !== void 0 ? _window_ClipboardEvent : class ClipboardEvent extends Event {};
1658
- const PopStateEvent = (_window_PopStateEvent = window.PopStateEvent) !== null && _window_PopStateEvent !== void 0 ? _window_PopStateEvent : class PopStateEvent extends Event {};
1659
- const ProgressEvent = (_window_ProgressEvent = window.ProgressEvent) !== null && _window_ProgressEvent !== void 0 ? _window_ProgressEvent : class ProgressEvent extends Event {};
1660
- const TransitionEvent = (_window_TransitionEvent = window.TransitionEvent) !== null && _window_TransitionEvent !== void 0 ? _window_TransitionEvent : class TransitionEvent extends Event {};
1661
- const UIEvent = (_window_UIEvent = window.UIEvent) !== null && _window_UIEvent !== void 0 ? _window_UIEvent : class UIEvent extends Event {};
1662
- const CompositionEvent = (_window_CompositionEvent = window.CompositionEvent) !== null && _window_CompositionEvent !== void 0 ? _window_CompositionEvent : class CompositionEvent extends UIEvent {};
1663
- const FocusEvent = (_window_FocusEvent = window.FocusEvent) !== null && _window_FocusEvent !== void 0 ? _window_FocusEvent : class FocusEvent extends UIEvent {};
1664
- const InputEvent = (_window_InputEvent = window.InputEvent) !== null && _window_InputEvent !== void 0 ? _window_InputEvent : class InputEvent extends UIEvent {};
1665
- const KeyboardEvent = (_window_KeyboardEvent = window.KeyboardEvent) !== null && _window_KeyboardEvent !== void 0 ? _window_KeyboardEvent : class KeyboardEvent extends UIEvent {};
1666
- const MouseEvent = (_window_MouseEvent = window.MouseEvent) !== null && _window_MouseEvent !== void 0 ? _window_MouseEvent : class MouseEvent extends UIEvent {};
1667
- return {
1668
- Event,
1669
- AnimationEvent,
1670
- ClipboardEvent,
1671
- PopStateEvent,
1672
- ProgressEvent,
1673
- TransitionEvent,
1674
- UIEvent,
1675
- CompositionEvent,
1676
- FocusEvent,
1677
- InputEvent,
1678
- KeyboardEvent,
1679
- MouseEvent,
1680
- DragEvent: (_window_DragEvent = window.DragEvent) !== null && _window_DragEvent !== void 0 ? _window_DragEvent : class DragEvent extends MouseEvent {},
1681
- PointerEvent: (_window_PointerEvent = window.PointerEvent) !== null && _window_PointerEvent !== void 0 ? _window_PointerEvent : class PointerEvent extends MouseEvent {},
1682
- TouchEvent: (_window_TouchEvent = window.TouchEvent) !== null && _window_TouchEvent !== void 0 ? _window_TouchEvent : class TouchEvent extends UIEvent {}
1683
- };
1684
- }
1685
- function assignProps(obj, props) {
1686
- for (const [key, value] of Object.entries(props)) Object.defineProperty(obj, key, { get: () => value !== null && value !== void 0 ? value : null });
1687
- }
1688
- function sanitizeNumber(n) {
1689
- return Number(n !== null && n !== void 0 ? n : 0);
1690
- }
1691
- function initClipboardEvent(event, { clipboardData }) {
1692
- assignProps(event, { clipboardData });
1693
- }
1694
- function initFocusEvent(event, { relatedTarget }) {
1695
- assignProps(event, { relatedTarget });
1696
- }
1697
- function initInputEvent(event, { data, inputType, isComposing }) {
1698
- assignProps(event, {
1699
- data,
1700
- isComposing: Boolean(isComposing),
1701
- inputType: String(inputType)
1702
- });
1703
- }
1704
- function initUIEvent(event, { view, detail }) {
1705
- assignProps(event, {
1706
- view,
1707
- detail: sanitizeNumber(detail !== null && detail !== void 0 ? detail : 0)
1708
- });
1709
- }
1710
- function initUIEventModifiers(event, { altKey, ctrlKey, metaKey, shiftKey, modifierAltGraph, modifierCapsLock, modifierFn, modifierFnLock, modifierNumLock, modifierScrollLock, modifierSymbol, modifierSymbolLock }) {
1711
- assignProps(event, {
1712
- altKey: Boolean(altKey),
1713
- ctrlKey: Boolean(ctrlKey),
1714
- metaKey: Boolean(metaKey),
1715
- shiftKey: Boolean(shiftKey),
1716
- getModifierState(k) {
1717
- return Boolean({
1718
- Alt: altKey,
1719
- AltGraph: modifierAltGraph,
1720
- CapsLock: modifierCapsLock,
1721
- Control: ctrlKey,
1722
- Fn: modifierFn,
1723
- FnLock: modifierFnLock,
1724
- Meta: metaKey,
1725
- NumLock: modifierNumLock,
1726
- ScrollLock: modifierScrollLock,
1727
- Shift: shiftKey,
1728
- Symbol: modifierSymbol,
1729
- SymbolLock: modifierSymbolLock
1730
- }[k]);
1731
- }
1732
- });
1733
- }
1734
- function initKeyboardEvent(event, { key, code, location, repeat, isComposing, charCode }) {
1735
- assignProps(event, {
1736
- key: String(key),
1737
- code: String(code),
1738
- location: sanitizeNumber(location),
1739
- repeat: Boolean(repeat),
1740
- isComposing: Boolean(isComposing),
1741
- charCode
1742
- });
1743
- }
1744
- function initMouseEvent(event, { x, y, screenX, screenY, clientX = x, clientY = y, button, buttons, relatedTarget, offsetX, offsetY, pageX, pageY }) {
1745
- assignProps(event, {
1746
- screenX: sanitizeNumber(screenX),
1747
- screenY: sanitizeNumber(screenY),
1748
- clientX: sanitizeNumber(clientX),
1749
- x: sanitizeNumber(clientX),
1750
- clientY: sanitizeNumber(clientY),
1751
- y: sanitizeNumber(clientY),
1752
- button: sanitizeNumber(button),
1753
- buttons: sanitizeNumber(buttons),
1754
- relatedTarget,
1755
- offsetX: sanitizeNumber(offsetX),
1756
- offsetY: sanitizeNumber(offsetY),
1757
- pageX: sanitizeNumber(pageX),
1758
- pageY: sanitizeNumber(pageY)
1759
- });
1760
- }
1761
- function initPointerEvent(event, { pointerId, width, height, pressure, tangentialPressure, tiltX, tiltY, twist, pointerType, isPrimary, buttons }) {
1762
- assignProps(event, {
1763
- pointerId: sanitizeNumber(pointerId),
1764
- width: sanitizeNumber(width !== null && width !== void 0 ? width : 1),
1765
- height: sanitizeNumber(height !== null && height !== void 0 ? height : 1),
1766
- pressure: sanitizeNumber(pressure !== null && pressure !== void 0 ? pressure : buttons ? .5 : 0),
1767
- tangentialPressure: sanitizeNumber(tangentialPressure),
1768
- tiltX: sanitizeNumber(tiltX),
1769
- tiltY: sanitizeNumber(tiltY),
1770
- twist: sanitizeNumber(twist),
1771
- pointerType: String(pointerType),
1772
- isPrimary: Boolean(isPrimary)
1773
- });
1774
- }
1775
- var eventInitializer;
1776
- function init_createEvent() {
1777
- return (init_createEvent = __esmMin((() => {
1778
- init_Clipboard();
1779
- init_eventMap();
1780
- eventInitializer = {
1781
- ClipboardEvent: [initClipboardEvent],
1782
- Event: [],
1783
- FocusEvent: [initUIEvent, initFocusEvent],
1784
- InputEvent: [initUIEvent, initInputEvent],
1785
- MouseEvent: [
1786
- initUIEvent,
1787
- initUIEventModifiers,
1788
- initMouseEvent
1789
- ],
1790
- PointerEvent: [
1791
- initUIEvent,
1792
- initUIEventModifiers,
1793
- initMouseEvent,
1794
- initPointerEvent
1795
- ],
1796
- KeyboardEvent: [
1797
- initUIEvent,
1798
- initUIEventModifiers,
1799
- initKeyboardEvent
1800
- ]
1801
- };
1802
- })))();
1803
- }
1804
- //#endregion
1805
- //#region ../node_modules/@testing-library/user-event/dist/esm/event/dispatchEvent.js
1806
- function dispatchUIEvent(target, type, init, preventDefault = false) {
1807
- if (isMouseEvent(type) || isKeyboardEvent(type)) init = {
1808
- ...init,
1809
- ...this.system.getUIEventModifiers()
1810
- };
1811
- const event = createEvent(type, target, init);
1812
- return dispatchEvent.call(this, target, event, preventDefault);
1813
- }
1814
- function dispatchEvent(target, event, preventDefault = false) {
1815
- var _behavior_type;
1816
- const type = event.type;
1817
- const behaviorImplementation = preventDefault ? () => {} : (_behavior_type = behavior[type]) === null || _behavior_type === void 0 ? void 0 : _behavior_type.call(behavior, event, target, this);
1818
- if (behaviorImplementation) {
1819
- event.preventDefault();
1820
- let defaultPrevented = false;
1821
- Object.defineProperty(event, "defaultPrevented", { get: () => defaultPrevented });
1822
- Object.defineProperty(event, "preventDefault", { value: () => {
1823
- defaultPrevented = event.cancelable;
1824
- } });
1825
- wrapEvent(() => target.dispatchEvent(event));
1826
- if (!defaultPrevented) behaviorImplementation();
1827
- return !defaultPrevented;
1828
- }
1829
- return wrapEvent(() => target.dispatchEvent(event));
1830
- }
1831
- function dispatchDOMEvent(target, type, init) {
1832
- const event = createEvent(type, target, init);
1833
- wrapEvent(() => target.dispatchEvent(event));
1834
- }
1835
- function init_dispatchEvent() {
1836
- return (init_dispatchEvent = __esmMin((() => {
1837
- init_click();
1838
- init_cut();
1839
- init_keydown();
1840
- init_keypress();
1841
- init_keyup();
1842
- init_paste();
1843
- init_registry();
1844
- init_wrapEvent();
1845
- init_eventMap();
1846
- init_createEvent();
1847
- })))();
1848
- }
1849
- //#endregion
1850
- //#region ../node_modules/@testing-library/user-event/dist/esm/document/patchFocus.js
1851
- function patchFocus(HTMLElement) {
1852
- if (HTMLElement.prototype[patched]) return;
1853
- const { focus, blur } = HTMLElement.prototype;
1854
- Object.defineProperties(HTMLElement.prototype, {
1855
- focus: {
1856
- configurable: true,
1857
- value: patchedFocus,
1858
- writable: true
1859
- },
1860
- blur: {
1861
- configurable: true,
1862
- value: patchedBlur,
1863
- writable: true
1864
- },
1865
- [patched]: {
1866
- configurable: true,
1867
- get: () => ({
1868
- focus,
1869
- blur
1870
- })
1871
- }
1872
- });
1873
- let activeCall;
1874
- function patchedFocus(options) {
1875
- if (this.ownerDocument.visibilityState !== "hidden") return focus.call(this, options);
1876
- const blurred = getActiveTarget(this.ownerDocument);
1877
- if (blurred === this) return;
1878
- const thisCall = Symbol("focus call");
1879
- activeCall = thisCall;
1880
- if (blurred) {
1881
- blur.call(blurred);
1882
- dispatchDOMEvent(blurred, "blur", { relatedTarget: this });
1883
- dispatchDOMEvent(blurred, "focusout", { relatedTarget: activeCall === thisCall ? this : null });
1884
- }
1885
- if (activeCall === thisCall) {
1886
- focus.call(this, options);
1887
- dispatchDOMEvent(this, "focus", { relatedTarget: blurred });
1888
- }
1889
- if (activeCall === thisCall) dispatchDOMEvent(this, "focusin", { relatedTarget: blurred });
1890
- }
1891
- function patchedBlur() {
1892
- if (this.ownerDocument.visibilityState !== "hidden") return blur.call(this);
1893
- const blurred = getActiveTarget(this.ownerDocument);
1894
- if (blurred !== this) return;
1895
- activeCall = Symbol("blur call");
1896
- blur.call(this);
1897
- dispatchDOMEvent(blurred, "blur", { relatedTarget: null });
1898
- dispatchDOMEvent(blurred, "focusout", { relatedTarget: null });
1899
- }
1900
- }
1901
- function getActiveTarget(document) {
1902
- const active = getActiveElement(document);
1903
- return (active === null || active === void 0 ? void 0 : active.tagName) === "BODY" ? null : active;
1904
- }
1905
- var patched;
1906
- function init_patchFocus() {
1907
- return (init_patchFocus = __esmMin((() => {
1908
- init_dispatchEvent();
1909
- init_Clipboard();
1910
- init_getActiveElement();
1911
- init_dom_esm();
1912
- patched = Symbol("patched focus/blur methods");
1913
- })))();
1914
- }
1915
- //#endregion
1916
- //#region ../node_modules/@testing-library/user-event/dist/esm/document/interceptor.js
1917
- function prepareInterceptor(element, propName, interceptorImpl) {
1918
- const prototypeDescriptor = Object.getOwnPropertyDescriptor(element.constructor.prototype, propName);
1919
- const objectDescriptor = Object.getOwnPropertyDescriptor(element, propName);
1920
- const target = (prototypeDescriptor === null || prototypeDescriptor === void 0 ? void 0 : prototypeDescriptor.set) ? "set" : "value";
1921
- /* istanbul ignore if */ if (typeof (prototypeDescriptor === null || prototypeDescriptor === void 0 ? void 0 : prototypeDescriptor[target]) !== "function" || prototypeDescriptor[target][Interceptor]) throw new Error(`Element ${element.tagName} does not implement "${String(propName)}".`);
1922
- function intercept(...args) {
1923
- const { applyNative = false, realArgs, then } = interceptorImpl.call(this, ...args);
1924
- const realFunc = (!applyNative && objectDescriptor || prototypeDescriptor)[target];
1925
- if (target === "set") realFunc.call(this, realArgs);
1926
- else realFunc.call(this, ...realArgs);
1927
- then === null || then === void 0 || then();
1928
- }
1929
- intercept[Interceptor] = Interceptor;
1930
- Object.defineProperty(element, propName, {
1931
- ...objectDescriptor !== null && objectDescriptor !== void 0 ? objectDescriptor : prototypeDescriptor,
1932
- [target]: intercept
1933
- });
1934
- }
1935
- function prepareValueInterceptor(element) {
1936
- prepareInterceptor(element, "value", function interceptorImpl(v) {
1937
- const isUI = isUIValue(v);
1938
- if (isUI) startTrackValue(this);
1939
- return {
1940
- applyNative: !!isUI,
1941
- realArgs: sanitizeValue(this, v),
1942
- then: isUI ? void 0 : () => trackOrSetValue(this, String(v))
1943
- };
1944
- });
1945
- }
1946
- function sanitizeValue(element, v) {
1947
- if (isElementType(element, "input", { type: "number" }) && String(v) !== "" && !Number.isNaN(Number(v))) return String(Number(v));
1948
- return String(v);
1949
- }
1950
- function prepareSelectionInterceptor(element) {
1951
- prepareInterceptor(element, "setSelectionRange", function interceptorImpl(start, ...others) {
1952
- const isUI = isUISelectionStart(start);
1953
- return {
1954
- applyNative: !!isUI,
1955
- realArgs: [Number(start), ...others],
1956
- then: () => isUI ? void 0 : setUISelectionClean(element)
1957
- };
1958
- });
1959
- prepareInterceptor(element, "selectionStart", function interceptorImpl(v) {
1960
- return {
1961
- realArgs: v,
1962
- then: () => setUISelectionClean(element)
1963
- };
1964
- });
1965
- prepareInterceptor(element, "selectionEnd", function interceptorImpl(v) {
1966
- return {
1967
- realArgs: v,
1968
- then: () => setUISelectionClean(element)
1969
- };
1970
- });
1971
- prepareInterceptor(element, "select", function interceptorImpl() {
1972
- return {
1973
- realArgs: [],
1974
- then: () => setUISelectionRaw(element, {
1975
- anchorOffset: 0,
1976
- focusOffset: getUIValue(element).length
1977
- })
1978
- };
1979
- });
1980
- }
1981
- function prepareRangeTextInterceptor(element) {
1982
- prepareInterceptor(element, "setRangeText", function interceptorImpl(...realArgs) {
1983
- return {
1984
- realArgs,
1985
- then: () => {
1986
- setUIValueClean(element);
1987
- setUISelectionClean(element);
1988
- }
1989
- };
1990
- });
1991
- }
1992
- var Interceptor;
1993
- function init_interceptor() {
1994
- return (init_interceptor = __esmMin((() => {
1995
- init_Clipboard();
1996
- init_trackValue();
1997
- init_UI();
1998
- Interceptor = Symbol("Interceptor for programmatical calls");
1999
- })))();
2000
- }
2001
- //#endregion
2002
- //#region ../node_modules/@testing-library/user-event/dist/esm/document/prepareDocument.js
2003
- function prepareDocument(document) {
2004
- if (document[isPrepared]) return;
2005
- document.addEventListener("focus", (e) => {
2006
- const el = e.target;
2007
- prepareElement(el);
2008
- }, {
2009
- capture: true,
2010
- passive: true
2011
- });
2012
- // istanbul ignore else
2013
- if (document.activeElement) prepareElement(document.activeElement);
2014
- document.addEventListener("blur", (e) => {
2015
- const el = e.target;
2016
- const initialValue = getInitialValue(el);
2017
- if (initialValue !== void 0) {
2018
- if (el.value !== initialValue) dispatchDOMEvent(el, "change");
2019
- clearInitialValue(el);
2020
- }
2021
- }, {
2022
- capture: true,
2023
- passive: true
2024
- });
2025
- document[isPrepared] = isPrepared;
2026
- }
2027
- function prepareElement(el) {
2028
- if (el[isPrepared]) return;
2029
- if (isElementType(el, ["input", "textarea"])) {
2030
- prepareValueInterceptor(el);
2031
- prepareSelectionInterceptor(el);
2032
- prepareRangeTextInterceptor(el);
2033
- }
2034
- el[isPrepared] = isPrepared;
2035
- }
2036
- var isPrepared;
2037
- function init_prepareDocument() {
2038
- return (init_prepareDocument = __esmMin((() => {
2039
- init_dispatchEvent();
2040
- init_Clipboard();
2041
- init_UI();
2042
- init_dom_esm();
2043
- init_interceptor();
2044
- isPrepared = Symbol("Node prepared with document state workarounds");
2045
- })))();
2046
- }
2047
- //#endregion
2048
- //#region ../node_modules/@testing-library/user-event/dist/esm/utils/misc/getDocumentFromNode.js
2049
- function getDocumentFromNode(el) {
2050
- return isDocument(el) ? el : el.ownerDocument;
2051
- }
2052
- function isDocument(node) {
2053
- return node.nodeType === 9;
2054
- }
2055
- //#endregion
2056
- //#region ../node_modules/@testing-library/user-event/dist/esm/utils/misc/level.js
2057
- function setLevelRef(instance, level) {
2058
- instance.levelRefs[level] = {};
2059
- }
2060
- function getLevelRef(instance, level) {
2061
- return instance.levelRefs[level];
2062
- }
2063
- var ApiLevel;
2064
- function init_level() {
2065
- return (init_level = __esmMin((() => {
2066
- ApiLevel = /*#__PURE__*/ function(ApiLevel) {
2067
- ApiLevel[ApiLevel["Trigger"] = 2] = "Trigger";
2068
- ApiLevel[ApiLevel["Call"] = 1] = "Call";
2069
- return ApiLevel;
2070
- }({});
2071
- })))();
2072
- }
2073
- //#endregion
2074
- //#region ../node_modules/@testing-library/user-event/dist/esm/utils/misc/wait.js
2075
- function wait(config) {
2076
- const delay = config.delay;
2077
- if (typeof delay !== "number") return;
2078
- return Promise.all([new Promise((resolve) => globalThis.setTimeout(() => resolve(), delay)), config.advanceTimers(delay)]);
2079
- }
2080
- //#endregion
2081
- //#region ../node_modules/@testing-library/user-event/dist/esm/options.js
2082
- var PointerEventsCheckLevel;
2083
- function init_options() {
2084
- return (init_options = __esmMin((() => {
2085
- PointerEventsCheckLevel = /*#__PURE__*/ function(PointerEventsCheckLevel) {
2086
- /**
2087
- * Check pointer events on every user interaction that triggers a bunch of events.
2088
- * E.g. once for releasing a mouse button even though this triggers `pointerup`, `mouseup`, `click`, etc...
2089
- */ PointerEventsCheckLevel[PointerEventsCheckLevel["EachTrigger"] = 4] = "EachTrigger";
2090
- /** Check each target once per call to pointer (related) API */ PointerEventsCheckLevel[PointerEventsCheckLevel["EachApiCall"] = 2] = "EachApiCall";
2091
- /** Check each event target once */ PointerEventsCheckLevel[PointerEventsCheckLevel["EachTarget"] = 1] = "EachTarget";
2092
- /** No pointer events check */ PointerEventsCheckLevel[PointerEventsCheckLevel["Never"] = 0] = "Never";
2093
- return PointerEventsCheckLevel;
2094
- }({});
2095
- })))();
2096
- }
2097
- //#endregion
2098
- //#region ../node_modules/@testing-library/user-event/dist/esm/system/keyboard.js
2099
- function _define_property$6(obj, key, value) {
2100
- if (key in obj) Object.defineProperty(obj, key, {
2101
- value,
2102
- enumerable: true,
2103
- configurable: true,
2104
- writable: true
2105
- });
2106
- else obj[key] = value;
2107
- return obj;
2108
- }
2109
- function isModifierKey(key) {
2110
- return modifierKeys.includes(key);
2111
- }
2112
- function isModifierLock(key) {
2113
- return modifierLocks.includes(key);
2114
- }
2115
- var DOM_KEY_LOCATION, modifierKeys, modifierLocks, KeyboardHost;
2116
- function init_keyboard() {
2117
- return (init_keyboard = __esmMin((() => {
2118
- init_Clipboard();
2119
- init_getActiveElement();
2120
- DOM_KEY_LOCATION = /*#__PURE__*/ function(DOM_KEY_LOCATION) {
2121
- DOM_KEY_LOCATION[DOM_KEY_LOCATION["STANDARD"] = 0] = "STANDARD";
2122
- DOM_KEY_LOCATION[DOM_KEY_LOCATION["LEFT"] = 1] = "LEFT";
2123
- DOM_KEY_LOCATION[DOM_KEY_LOCATION["RIGHT"] = 2] = "RIGHT";
2124
- DOM_KEY_LOCATION[DOM_KEY_LOCATION["NUMPAD"] = 3] = "NUMPAD";
2125
- return DOM_KEY_LOCATION;
2126
- }({});
2127
- modifierKeys = [
2128
- "Alt",
2129
- "AltGraph",
2130
- "Control",
2131
- "Fn",
2132
- "Meta",
2133
- "Shift",
2134
- "Symbol"
2135
- ];
2136
- modifierLocks = [
2137
- "CapsLock",
2138
- "FnLock",
2139
- "NumLock",
2140
- "ScrollLock",
2141
- "SymbolLock"
2142
- ];
2143
- KeyboardHost = class {
2144
- isKeyPressed(keyDef) {
2145
- return this.pressed.has(String(keyDef.code));
2146
- }
2147
- getPressedKeys() {
2148
- return this.pressed.values().map((p) => p.keyDef);
2149
- }
2150
- /** Press a key */ async keydown(instance, keyDef) {
2151
- const key = String(keyDef.key);
2152
- const code = String(keyDef.code);
2153
- const target = getActiveElementOrBody(instance.config.document);
2154
- this.setKeydownTarget(target);
2155
- this.pressed.add(code, keyDef);
2156
- if (isModifierKey(key)) this.modifiers[key] = true;
2157
- const unprevented = instance.dispatchUIEvent(target, "keydown", {
2158
- key,
2159
- code
2160
- });
2161
- if (isModifierLock(key) && !this.modifiers[key]) {
2162
- this.modifiers[key] = true;
2163
- this.modifierLockStart[key] = true;
2164
- }
2165
- if (unprevented) this.pressed.setUnprevented(code);
2166
- if (unprevented && this.hasKeyPress(key)) instance.dispatchUIEvent(getActiveElementOrBody(instance.config.document), "keypress", {
2167
- key,
2168
- code,
2169
- charCode: keyDef.key === "Enter" ? 13 : String(keyDef.key).charCodeAt(0)
2170
- });
2171
- }
2172
- /** Release a key */ async keyup(instance, keyDef) {
2173
- const key = String(keyDef.key);
2174
- const code = String(keyDef.code);
2175
- const unprevented = this.pressed.isUnprevented(code);
2176
- this.pressed.delete(code);
2177
- if (isModifierKey(key) && !this.pressed.values().find((p) => p.keyDef.key === key)) this.modifiers[key] = false;
2178
- instance.dispatchUIEvent(getActiveElementOrBody(instance.config.document), "keyup", {
2179
- key,
2180
- code
2181
- }, !unprevented);
2182
- if (isModifierLock(key) && this.modifiers[key]) {
2183
- if (this.modifierLockStart[key]) this.modifierLockStart[key] = false;
2184
- else this.modifiers[key] = false;
2185
- }
2186
- }
2187
- setKeydownTarget(target) {
2188
- if (target !== this.lastKeydownTarget) this.carryChar = "";
2189
- this.lastKeydownTarget = target;
2190
- }
2191
- hasKeyPress(key) {
2192
- return (key.length === 1 || key === "Enter") && !this.modifiers.Control && !this.modifiers.Alt;
2193
- }
2194
- constructor(system) {
2195
- _define_property$6(this, "system", void 0);
2196
- _define_property$6(this, "modifiers", {
2197
- Alt: false,
2198
- AltGraph: false,
2199
- CapsLock: false,
2200
- Control: false,
2201
- Fn: false,
2202
- FnLock: false,
2203
- Meta: false,
2204
- NumLock: false,
2205
- ScrollLock: false,
2206
- Shift: false,
2207
- Symbol: false,
2208
- SymbolLock: false
2209
- });
2210
- _define_property$6(this, "pressed", new class {
2211
- add(code, keyDef) {
2212
- var _this_registry, _code, _;
2213
- (_ = (_this_registry = this.registry)[_code = code]) !== null && _ !== void 0 || (_this_registry[_code] = {
2214
- keyDef,
2215
- unpreventedDefault: false
2216
- });
2217
- }
2218
- has(code) {
2219
- return !!this.registry[code];
2220
- }
2221
- setUnprevented(code) {
2222
- const o = this.registry[code];
2223
- if (o) o.unpreventedDefault = true;
2224
- }
2225
- isUnprevented(code) {
2226
- var _this_registry_code;
2227
- return !!((_this_registry_code = this.registry[code]) === null || _this_registry_code === void 0 ? void 0 : _this_registry_code.unpreventedDefault);
2228
- }
2229
- delete(code) {
2230
- delete this.registry[code];
2231
- }
2232
- values() {
2233
- return Object.values(this.registry);
2234
- }
2235
- constructor() {
2236
- _define_property$6(this, "registry", {});
2237
- }
2238
- }());
2239
- _define_property$6(this, "carryChar", "");
2240
- _define_property$6(this, "lastKeydownTarget", void 0);
2241
- _define_property$6(this, "modifierLockStart", {});
2242
- this.system = system;
2243
- }
2244
- };
2245
- })))();
2246
- }
2247
- //#endregion
2248
- //#region ../node_modules/@testing-library/user-event/dist/esm/keyboard/keyMap.js
2249
- var defaultKeyMap$1;
2250
- function init_keyMap() {
2251
- return (init_keyMap = __esmMin((() => {
2252
- init_keyboard();
2253
- defaultKeyMap$1 = [
2254
- ..."0123456789".split("").map((c) => ({
2255
- code: `Digit${c}`,
2256
- key: c
2257
- })),
2258
- ...")!@#$%^&*(".split("").map((c, i) => ({
2259
- code: `Digit${i}`,
2260
- key: c,
2261
- shiftKey: true
2262
- })),
2263
- ..."abcdefghijklmnopqrstuvwxyz".split("").map((c) => ({
2264
- code: `Key${c.toUpperCase()}`,
2265
- key: c
2266
- })),
2267
- ..."ABCDEFGHIJKLMNOPQRSTUVWXYZ".split("").map((c) => ({
2268
- code: `Key${c}`,
2269
- key: c,
2270
- shiftKey: true
2271
- })),
2272
- {
2273
- code: "BracketLeft",
2274
- key: "["
2275
- },
2276
- {
2277
- code: "BracketLeft",
2278
- key: "{",
2279
- shiftKey: true
2280
- },
2281
- {
2282
- code: "BracketRight",
2283
- key: "]"
2284
- },
2285
- {
2286
- code: "BracketRight",
2287
- key: "}",
2288
- shiftKey: true
2289
- },
2290
- {
2291
- code: "Space",
2292
- key: " "
2293
- },
2294
- {
2295
- code: "AltLeft",
2296
- key: "Alt",
2297
- location: DOM_KEY_LOCATION.LEFT
2298
- },
2299
- {
2300
- code: "AltRight",
2301
- key: "Alt",
2302
- location: DOM_KEY_LOCATION.RIGHT
2303
- },
2304
- {
2305
- code: "ShiftLeft",
2306
- key: "Shift",
2307
- location: DOM_KEY_LOCATION.LEFT
2308
- },
2309
- {
2310
- code: "ShiftRight",
2311
- key: "Shift",
2312
- location: DOM_KEY_LOCATION.RIGHT
2313
- },
2314
- {
2315
- code: "ControlLeft",
2316
- key: "Control",
2317
- location: DOM_KEY_LOCATION.LEFT
2318
- },
2319
- {
2320
- code: "ControlRight",
2321
- key: "Control",
2322
- location: DOM_KEY_LOCATION.RIGHT
2323
- },
2324
- {
2325
- code: "MetaLeft",
2326
- key: "Meta",
2327
- location: DOM_KEY_LOCATION.LEFT
2328
- },
2329
- {
2330
- code: "MetaRight",
2331
- key: "Meta",
2332
- location: DOM_KEY_LOCATION.RIGHT
2333
- },
2334
- {
2335
- code: "OSLeft",
2336
- key: "OS",
2337
- location: DOM_KEY_LOCATION.LEFT
2338
- },
2339
- {
2340
- code: "OSRight",
2341
- key: "OS",
2342
- location: DOM_KEY_LOCATION.RIGHT
2343
- },
2344
- {
2345
- code: "ContextMenu",
2346
- key: "ContextMenu"
2347
- },
2348
- {
2349
- code: "Tab",
2350
- key: "Tab"
2351
- },
2352
- {
2353
- code: "CapsLock",
2354
- key: "CapsLock"
2355
- },
2356
- {
2357
- code: "Backspace",
2358
- key: "Backspace"
2359
- },
2360
- {
2361
- code: "Enter",
2362
- key: "Enter"
2363
- },
2364
- {
2365
- code: "Escape",
2366
- key: "Escape"
2367
- },
2368
- {
2369
- code: "ArrowUp",
2370
- key: "ArrowUp"
2371
- },
2372
- {
2373
- code: "ArrowDown",
2374
- key: "ArrowDown"
2375
- },
2376
- {
2377
- code: "ArrowLeft",
2378
- key: "ArrowLeft"
2379
- },
2380
- {
2381
- code: "ArrowRight",
2382
- key: "ArrowRight"
2383
- },
2384
- {
2385
- code: "Home",
2386
- key: "Home"
2387
- },
2388
- {
2389
- code: "End",
2390
- key: "End"
2391
- },
2392
- {
2393
- code: "Delete",
2394
- key: "Delete"
2395
- },
2396
- {
2397
- code: "PageUp",
2398
- key: "PageUp"
2399
- },
2400
- {
2401
- code: "PageDown",
2402
- key: "PageDown"
2403
- },
2404
- {
2405
- code: "Fn",
2406
- key: "Fn"
2407
- },
2408
- {
2409
- code: "Symbol",
2410
- key: "Symbol"
2411
- },
2412
- {
2413
- code: "AltRight",
2414
- key: "AltGraph"
2415
- }
2416
- ];
2417
- })))();
2418
- }
2419
- //#endregion
2420
- //#region ../node_modules/@testing-library/user-event/dist/esm/pointer/keyMap.js
2421
- var defaultKeyMap;
2422
- function init_keyMap$1() {
2423
- return (init_keyMap$1 = __esmMin((() => {
2424
- defaultKeyMap = [
2425
- {
2426
- name: "MouseLeft",
2427
- pointerType: "mouse",
2428
- button: "primary"
2429
- },
2430
- {
2431
- name: "MouseRight",
2432
- pointerType: "mouse",
2433
- button: "secondary"
2434
- },
2435
- {
2436
- name: "MouseMiddle",
2437
- pointerType: "mouse",
2438
- button: "auxiliary"
2439
- },
2440
- {
2441
- name: "TouchA",
2442
- pointerType: "touch"
2443
- },
2444
- {
2445
- name: "TouchB",
2446
- pointerType: "touch"
2447
- },
2448
- {
2449
- name: "TouchC",
2450
- pointerType: "touch"
2451
- }
2452
- ];
2453
- })))();
2454
- }
2455
- //#endregion
2456
- //#region ../node_modules/@testing-library/user-event/dist/esm/system/pointer/buttons.js
2457
- function _define_property$5(obj, key, value) {
2458
- if (key in obj) Object.defineProperty(obj, key, {
2459
- value,
2460
- enumerable: true,
2461
- configurable: true,
2462
- writable: true
2463
- });
2464
- else obj[key] = value;
2465
- return obj;
2466
- }
2467
- function getMouseButtonId(button = 0) {
2468
- if (button in MouseButton) return MouseButton[button];
2469
- return Number(button);
2470
- }
2471
- function getMouseEventButton(button) {
2472
- button = getMouseButtonId(button);
2473
- if (button in MouseButtonFlip) return MouseButtonFlip[button];
2474
- return button;
2475
- }
2476
- var Buttons, MouseButton, MouseButtonFlip;
2477
- function init_buttons() {
2478
- return (init_buttons = __esmMin((() => {
2479
- Buttons = class {
2480
- getButtons() {
2481
- let v = 0;
2482
- for (const button of Object.keys(this.pressed)) v |= 2 ** Number(button);
2483
- return v;
2484
- }
2485
- down(keyDef) {
2486
- const button = getMouseButtonId(keyDef.button);
2487
- if (button in this.pressed) {
2488
- this.pressed[button].push(keyDef);
2489
- return;
2490
- }
2491
- this.pressed[button] = [keyDef];
2492
- return button;
2493
- }
2494
- up(keyDef) {
2495
- const button = getMouseButtonId(keyDef.button);
2496
- if (button in this.pressed) {
2497
- this.pressed[button] = this.pressed[button].filter((k) => k.name !== keyDef.name);
2498
- if (this.pressed[button].length === 0) {
2499
- delete this.pressed[button];
2500
- return button;
2501
- }
2502
- }
2503
- }
2504
- constructor() {
2505
- _define_property$5(this, "pressed", {});
2506
- }
2507
- };
2508
- MouseButton = {
2509
- primary: 0,
2510
- secondary: 1,
2511
- auxiliary: 2,
2512
- back: 3,
2513
- X1: 3,
2514
- forward: 4,
2515
- X2: 4
2516
- };
2517
- MouseButtonFlip = {
2518
- 1: 2,
2519
- 2: 1
2520
- };
2521
- })))();
2522
- }
2523
- //#endregion
2524
- //#region ../node_modules/@testing-library/user-event/dist/esm/system/pointer/device.js
2525
- function _define_property$4(obj, key, value) {
2526
- if (key in obj) Object.defineProperty(obj, key, {
2527
- value,
2528
- enumerable: true,
2529
- configurable: true,
2530
- writable: true
2531
- });
2532
- else obj[key] = value;
2533
- return obj;
2534
- }
2535
- var Device;
2536
- function init_device() {
2537
- return (init_device = __esmMin((() => {
2538
- Device = class {
2539
- get countPressed() {
2540
- return this.pressedKeys.size;
2541
- }
2542
- isPressed(keyDef) {
2543
- return this.pressedKeys.has(keyDef.name);
2544
- }
2545
- addPressed(keyDef) {
2546
- return this.pressedKeys.add(keyDef.name);
2547
- }
2548
- removePressed(keyDef) {
2549
- return this.pressedKeys.delete(keyDef.name);
2550
- }
2551
- constructor() {
2552
- _define_property$4(this, "pressedKeys", /* @__PURE__ */ new Set());
2553
- }
2554
- };
2555
- })))();
2556
- }
2557
- //#endregion
2558
- //#region ../node_modules/@testing-library/user-event/dist/esm/utils/misc/getTreeDiff.js
2559
- function getTreeDiff(a, b) {
2560
- const treeA = [];
2561
- for (let el = a; el; el = el.parentElement) treeA.push(el);
2562
- const treeB = [];
2563
- for (let el = b; el; el = el.parentElement) treeB.push(el);
2564
- let i = 0;
2565
- for (;; i++) if (i >= treeA.length || i >= treeB.length || treeA[treeA.length - 1 - i] !== treeB[treeB.length - 1 - i]) break;
2566
- return [
2567
- treeA.slice(0, treeA.length - i),
2568
- treeB.slice(0, treeB.length - i),
2569
- treeB.slice(treeB.length - i)
2570
- ];
2571
- }
2572
- //#endregion
2573
- //#region ../node_modules/@testing-library/user-event/dist/esm/event/selection/resolveCaretPosition.js
2574
- function resolveCaretPosition({ target, node, offset }) {
2575
- if (hasOwnSelection(target)) return {
2576
- node: target,
2577
- offset: offset !== null && offset !== void 0 ? offset : getUIValue(target).length
2578
- };
2579
- else if (node) return {
2580
- node,
2581
- offset: offset !== null && offset !== void 0 ? offset : node.nodeType === 3 ? node.nodeValue.length : node.childNodes.length
2582
- };
2583
- return findNodeAtTextOffset(target, offset);
2584
- }
2585
- function findNodeAtTextOffset(node, offset, isRoot = true) {
2586
- let i = offset === void 0 ? node.childNodes.length - 1 : 0;
2587
- const step = offset === void 0 ? -1 : 1;
2588
- while (offset === void 0 ? i >= (isRoot ? Math.max(node.childNodes.length - 1, 0) : 0) : i <= node.childNodes.length) {
2589
- if (offset && i === node.childNodes.length) throw new Error("The given offset is out of bounds.");
2590
- const c = node.childNodes.item(i);
2591
- const text = String(c.textContent);
2592
- if (text.length) {
2593
- if (offset !== void 0 && text.length < offset) offset -= text.length;
2594
- else if (c.nodeType === 1) return findNodeAtTextOffset(c, offset, false);
2595
- else if (c.nodeType === 3) return {
2596
- node: c,
2597
- offset: offset !== null && offset !== void 0 ? offset : c.nodeValue.length
2598
- };
2599
- }
2600
- i += step;
2601
- }
2602
- return {
2603
- node,
2604
- offset: node.childNodes.length
2605
- };
2606
- }
2607
- function init_resolveCaretPosition() {
2608
- return (init_resolveCaretPosition = __esmMin((() => {
2609
- init_UI();
2610
- init_Clipboard();
2611
- init_selection();
2612
- })))();
2613
- }
2614
- //#endregion
2615
- //#region ../node_modules/@testing-library/user-event/dist/esm/event/selection/setSelectionPerMouse.js
2616
- function setSelectionPerMouseDown({ document, target, clickCount, node, offset }) {
2617
- if (hasNoSelection(target)) return;
2618
- const targetHasOwnSelection = hasOwnSelection(target);
2619
- const text = String(targetHasOwnSelection ? getUIValue(target) : target.textContent);
2620
- const [start, end] = node ? [offset, offset] : getTextRange(text, offset, clickCount);
2621
- if (targetHasOwnSelection) {
2622
- setUISelection(target, {
2623
- anchorOffset: start !== null && start !== void 0 ? start : text.length,
2624
- focusOffset: end !== null && end !== void 0 ? end : text.length
2625
- });
2626
- return {
2627
- node: target,
2628
- start: start !== null && start !== void 0 ? start : 0,
2629
- end: end !== null && end !== void 0 ? end : text.length
2630
- };
2631
- } else {
2632
- const { node: startNode, offset: startOffset } = resolveCaretPosition({
2633
- target,
2634
- node,
2635
- offset: start
2636
- });
2637
- const { node: endNode, offset: endOffset } = resolveCaretPosition({
2638
- target,
2639
- node,
2640
- offset: end
2641
- });
2642
- const range = target.ownerDocument.createRange();
2643
- try {
2644
- range.setStart(startNode, startOffset);
2645
- range.setEnd(endNode, endOffset);
2646
- } catch {
2647
- throw new Error("The given offset is out of bounds.");
2648
- }
2649
- const selection = document.getSelection();
2650
- selection === null || selection === void 0 || selection.removeAllRanges();
2651
- selection === null || selection === void 0 || selection.addRange(range.cloneRange());
2652
- return range;
2653
- }
2654
- }
2655
- function getTextRange(text, pos, clickCount) {
2656
- if (clickCount % 3 === 1 || text.length === 0) return [pos, pos];
2657
- const textPos = pos !== null && pos !== void 0 ? pos : text.length;
2658
- if (clickCount % 3 === 2) return [textPos - text.substr(0, pos).match(/(\w+|\s+|\W)?$/)[0].length, pos === void 0 ? pos : pos + text.substr(pos).match(/^(\w+|\s+|\W)?/)[0].length];
2659
- return [textPos - text.substr(0, pos).match(/[^\r\n]*$/)[0].length, pos === void 0 ? pos : pos + text.substr(pos).match(/^[^\r\n]*/)[0].length];
2660
- }
2661
- function init_setSelectionPerMouse() {
2662
- return (init_setSelectionPerMouse = __esmMin((() => {
2663
- init_UI();
2664
- init_Clipboard();
2665
- init_selection();
2666
- init_resolveCaretPosition();
2667
- })))();
2668
- }
2669
- //#endregion
2670
- //#region ../node_modules/@testing-library/user-event/dist/esm/event/selection/modifySelectionPerMouse.js
2671
- function modifySelectionPerMouseMove(selectionRange, { document, target, node, offset }) {
2672
- const selectionFocus = resolveCaretPosition({
2673
- target,
2674
- node,
2675
- offset
2676
- });
2677
- if ("node" in selectionRange) {
2678
- /* istanbul ignore else */ if (selectionFocus.node === selectionRange.node) {
2679
- const anchorOffset = selectionFocus.offset < selectionRange.start ? selectionRange.end : selectionRange.start;
2680
- const focusOffset = selectionFocus.offset > selectionRange.end || selectionFocus.offset < selectionRange.start ? selectionFocus.offset : selectionRange.end;
2681
- setUISelection(selectionRange.node, {
2682
- anchorOffset,
2683
- focusOffset
2684
- });
2685
- }
2686
- } else {
2687
- const range = selectionRange.cloneRange();
2688
- const cmp = range.comparePoint(selectionFocus.node, selectionFocus.offset);
2689
- if (cmp < 0) range.setStart(selectionFocus.node, selectionFocus.offset);
2690
- else if (cmp > 0) range.setEnd(selectionFocus.node, selectionFocus.offset);
2691
- const selection = document.getSelection();
2692
- selection === null || selection === void 0 || selection.removeAllRanges();
2693
- selection === null || selection === void 0 || selection.addRange(range.cloneRange());
2694
- }
2695
- }
2696
- function init_modifySelectionPerMouse() {
2697
- return (init_modifySelectionPerMouse = __esmMin((() => {
2698
- init_UI();
2699
- init_Clipboard();
2700
- init_resolveCaretPosition();
2701
- })))();
2702
- }
2703
- //#endregion
2704
- //#region ../node_modules/@testing-library/user-event/dist/esm/system/pointer/shared.js
2705
- function isDifferentPointerPosition(positionA, positionB) {
2706
- var _positionA_coords, _positionB_coords, _positionA_coords1, _positionB_coords1, _positionA_coords2, _positionB_coords2, _positionA_coords3, _positionB_coords3, _positionA_coords4, _positionB_coords4, _positionA_coords5, _positionB_coords5, _positionA_coords6, _positionB_coords6, _positionA_coords7, _positionB_coords7, _positionA_coords8, _positionB_coords8, _positionA_coords9, _positionB_coords9, _positionA_caret, _positionB_caret, _positionA_caret1, _positionB_caret1;
2707
- return positionA.target !== positionB.target || ((_positionA_coords = positionA.coords) === null || _positionA_coords === void 0 ? void 0 : _positionA_coords.x) !== ((_positionB_coords = positionB.coords) === null || _positionB_coords === void 0 ? void 0 : _positionB_coords.x) || ((_positionA_coords1 = positionA.coords) === null || _positionA_coords1 === void 0 ? void 0 : _positionA_coords1.y) !== ((_positionB_coords1 = positionB.coords) === null || _positionB_coords1 === void 0 ? void 0 : _positionB_coords1.y) || ((_positionA_coords2 = positionA.coords) === null || _positionA_coords2 === void 0 ? void 0 : _positionA_coords2.clientX) !== ((_positionB_coords2 = positionB.coords) === null || _positionB_coords2 === void 0 ? void 0 : _positionB_coords2.clientX) || ((_positionA_coords3 = positionA.coords) === null || _positionA_coords3 === void 0 ? void 0 : _positionA_coords3.clientY) !== ((_positionB_coords3 = positionB.coords) === null || _positionB_coords3 === void 0 ? void 0 : _positionB_coords3.clientY) || ((_positionA_coords4 = positionA.coords) === null || _positionA_coords4 === void 0 ? void 0 : _positionA_coords4.offsetX) !== ((_positionB_coords4 = positionB.coords) === null || _positionB_coords4 === void 0 ? void 0 : _positionB_coords4.offsetX) || ((_positionA_coords5 = positionA.coords) === null || _positionA_coords5 === void 0 ? void 0 : _positionA_coords5.offsetY) !== ((_positionB_coords5 = positionB.coords) === null || _positionB_coords5 === void 0 ? void 0 : _positionB_coords5.offsetY) || ((_positionA_coords6 = positionA.coords) === null || _positionA_coords6 === void 0 ? void 0 : _positionA_coords6.pageX) !== ((_positionB_coords6 = positionB.coords) === null || _positionB_coords6 === void 0 ? void 0 : _positionB_coords6.pageX) || ((_positionA_coords7 = positionA.coords) === null || _positionA_coords7 === void 0 ? void 0 : _positionA_coords7.pageY) !== ((_positionB_coords7 = positionB.coords) === null || _positionB_coords7 === void 0 ? void 0 : _positionB_coords7.pageY) || ((_positionA_coords8 = positionA.coords) === null || _positionA_coords8 === void 0 ? void 0 : _positionA_coords8.screenX) !== ((_positionB_coords8 = positionB.coords) === null || _positionB_coords8 === void 0 ? void 0 : _positionB_coords8.screenX) || ((_positionA_coords9 = positionA.coords) === null || _positionA_coords9 === void 0 ? void 0 : _positionA_coords9.screenY) !== ((_positionB_coords9 = positionB.coords) === null || _positionB_coords9 === void 0 ? void 0 : _positionB_coords9.screenY) || ((_positionA_caret = positionA.caret) === null || _positionA_caret === void 0 ? void 0 : _positionA_caret.node) !== ((_positionB_caret = positionB.caret) === null || _positionB_caret === void 0 ? void 0 : _positionB_caret.node) || ((_positionA_caret1 = positionA.caret) === null || _positionA_caret1 === void 0 ? void 0 : _positionA_caret1.offset) !== ((_positionB_caret1 = positionB.caret) === null || _positionB_caret1 === void 0 ? void 0 : _positionB_caret1.offset);
2708
- }
2709
- //#endregion
2710
- //#region ../node_modules/@testing-library/user-event/dist/esm/system/pointer/mouse.js
2711
- function _define_property$3(obj, key, value) {
2712
- if (key in obj) Object.defineProperty(obj, key, {
2713
- value,
2714
- enumerable: true,
2715
- configurable: true,
2716
- writable: true
2717
- });
2718
- else obj[key] = value;
2719
- return obj;
2720
- }
2721
- var Mouse;
2722
- function init_mouse() {
2723
- return (init_mouse = __esmMin((() => {
2724
- init_click();
2725
- init_cut();
2726
- init_keydown();
2727
- init_keypress();
2728
- init_keyup();
2729
- init_paste();
2730
- init_dom_esm();
2731
- init_Clipboard();
2732
- init_isDisabled();
2733
- init_focus();
2734
- init_setSelectionPerMouse();
2735
- init_modifySelectionPerMouse();
2736
- init_buttons();
2737
- Mouse = class {
2738
- move(instance, position, isPrevented) {
2739
- const prevPosition = this.position;
2740
- const prevTarget = this.getTarget(instance);
2741
- this.position = position;
2742
- if (!isDifferentPointerPosition(prevPosition, position)) return;
2743
- const nextTarget = this.getTarget(instance);
2744
- const init = this.getEventInit("mousemove");
2745
- const [leave, enter] = getTreeDiff(prevTarget, nextTarget);
2746
- return {
2747
- leave: () => {
2748
- if (prevTarget !== nextTarget) {
2749
- instance.dispatchUIEvent(prevTarget, "mouseout", init);
2750
- leave.forEach((el) => instance.dispatchUIEvent(el, "mouseleave", init));
2751
- }
2752
- },
2753
- enter: () => {
2754
- if (prevTarget !== nextTarget) {
2755
- instance.dispatchUIEvent(nextTarget, "mouseover", init);
2756
- enter.forEach((el) => instance.dispatchUIEvent(el, "mouseenter", init));
2757
- }
2758
- },
2759
- move: () => {
2760
- if (isPrevented) return;
2761
- instance.dispatchUIEvent(nextTarget, "mousemove", init);
2762
- this.modifySelecting(instance);
2763
- }
2764
- };
2765
- }
2766
- down(instance, keyDef, isPrevented) {
2767
- const button = this.buttons.down(keyDef);
2768
- if (button === void 0) return;
2769
- const target = this.getTarget(instance);
2770
- this.buttonDownTarget[button] = target;
2771
- const init = this.getEventInit("mousedown", keyDef.button);
2772
- const disabled = isDisabled(target);
2773
- if (!isPrevented && (disabled || instance.dispatchUIEvent(target, "mousedown", init))) {
2774
- this.startSelecting(instance, init.detail);
2775
- focusElement(target);
2776
- }
2777
- if (!disabled && getMouseEventButton(keyDef.button) === 2) instance.dispatchUIEvent(target, "contextmenu", this.getEventInit("contextmenu", keyDef.button));
2778
- }
2779
- up(instance, keyDef, isPrevented) {
2780
- const button = this.buttons.up(keyDef);
2781
- if (button === void 0) return;
2782
- const target = this.getTarget(instance);
2783
- if (!isDisabled(target)) {
2784
- if (!isPrevented) {
2785
- const mouseUpInit = this.getEventInit("mouseup", keyDef.button);
2786
- instance.dispatchUIEvent(target, "mouseup", mouseUpInit);
2787
- this.endSelecting();
2788
- }
2789
- const clickTarget = getTreeDiff(this.buttonDownTarget[button], target)[2][0];
2790
- if (clickTarget) {
2791
- const init = this.getEventInit("click", keyDef.button);
2792
- if (init.detail) {
2793
- instance.dispatchUIEvent(clickTarget, init.button === 0 ? "click" : "auxclick", init);
2794
- if (init.button === 0 && init.detail === 2) instance.dispatchUIEvent(clickTarget, "dblclick", {
2795
- ...this.getEventInit("dblclick", keyDef.button),
2796
- detail: init.detail
2797
- });
2798
- }
2799
- }
2800
- }
2801
- }
2802
- resetClickCount() {
2803
- this.clickCount.reset();
2804
- }
2805
- getEventInit(type, button) {
2806
- const init = { ...this.position.coords };
2807
- init.button = getMouseEventButton(button);
2808
- init.buttons = this.buttons.getButtons();
2809
- if (type === "mousedown") init.detail = this.clickCount.getOnDown(init.button);
2810
- else if (type === "mouseup") init.detail = this.clickCount.getOnUp(init.button);
2811
- else if (type === "click" || type === "auxclick") init.detail = this.clickCount.incOnClick(init.button);
2812
- return init;
2813
- }
2814
- getTarget(instance) {
2815
- var _this_position_target;
2816
- return (_this_position_target = this.position.target) !== null && _this_position_target !== void 0 ? _this_position_target : instance.config.document.body;
2817
- }
2818
- startSelecting(instance, clickCount) {
2819
- var _this_position_caret, _this_position_caret1;
2820
- this.selecting = setSelectionPerMouseDown({
2821
- document: instance.config.document,
2822
- target: this.getTarget(instance),
2823
- node: (_this_position_caret = this.position.caret) === null || _this_position_caret === void 0 ? void 0 : _this_position_caret.node,
2824
- offset: (_this_position_caret1 = this.position.caret) === null || _this_position_caret1 === void 0 ? void 0 : _this_position_caret1.offset,
2825
- clickCount
2826
- });
2827
- }
2828
- modifySelecting(instance) {
2829
- var _this_position_caret, _this_position_caret1;
2830
- if (!this.selecting) return;
2831
- modifySelectionPerMouseMove(this.selecting, {
2832
- document: instance.config.document,
2833
- target: this.getTarget(instance),
2834
- node: (_this_position_caret = this.position.caret) === null || _this_position_caret === void 0 ? void 0 : _this_position_caret.node,
2835
- offset: (_this_position_caret1 = this.position.caret) === null || _this_position_caret1 === void 0 ? void 0 : _this_position_caret1.offset
2836
- });
2837
- }
2838
- endSelecting() {
2839
- this.selecting = void 0;
2840
- }
2841
- constructor() {
2842
- _define_property$3(this, "position", {});
2843
- _define_property$3(this, "buttons", new Buttons());
2844
- _define_property$3(this, "selecting", void 0);
2845
- _define_property$3(this, "buttonDownTarget", {});
2846
- _define_property$3(this, "clickCount", new class {
2847
- incOnClick(button) {
2848
- const current = this.down[button] === void 0 ? void 0 : Number(this.down[button]) + 1;
2849
- this.count = this.count[button] === void 0 ? {} : { [button]: Number(this.count[button]) + 1 };
2850
- return current;
2851
- }
2852
- getOnDown(button) {
2853
- var _this_count_button, _this_count_button1;
2854
- this.down = { [button]: (_this_count_button = this.count[button]) !== null && _this_count_button !== void 0 ? _this_count_button : 0 };
2855
- this.count = { [button]: (_this_count_button1 = this.count[button]) !== null && _this_count_button1 !== void 0 ? _this_count_button1 : 0 };
2856
- return Number(this.count[button]) + 1;
2857
- }
2858
- getOnUp(button) {
2859
- return this.down[button] === void 0 ? void 0 : Number(this.down[button]) + 1;
2860
- }
2861
- reset() {
2862
- this.count = {};
2863
- }
2864
- constructor() {
2865
- _define_property$3(this, "down", {});
2866
- _define_property$3(this, "count", {});
2867
- }
2868
- }());
2869
- }
2870
- };
2871
- })))();
2872
- }
2873
- //#endregion
2874
- //#region ../node_modules/@testing-library/user-event/dist/esm/utils/pointer/cssPointerEvents.js
2875
- function hasPointerEvents(instance, element) {
2876
- var _checkPointerEvents;
2877
- return ((_checkPointerEvents = checkPointerEvents(instance, element)) === null || _checkPointerEvents === void 0 ? void 0 : _checkPointerEvents.pointerEvents) !== "none";
2878
- }
2879
- function closestPointerEventsDeclaration(element) {
2880
- const window = getWindow(element);
2881
- for (let el = element, tree = []; el === null || el === void 0 ? void 0 : el.ownerDocument; el = el.parentElement) {
2882
- tree.push(el);
2883
- const pointerEvents = window.getComputedStyle(el).pointerEvents;
2884
- if (pointerEvents && !["inherit", "unset"].includes(pointerEvents)) return {
2885
- pointerEvents,
2886
- tree
2887
- };
2888
- }
2889
- }
2890
- function checkPointerEvents(instance, element) {
2891
- const lastCheck = element[PointerEventsCheck];
2892
- if (!(instance.config.pointerEventsCheck !== PointerEventsCheckLevel.Never && (!lastCheck || hasBitFlag(instance.config.pointerEventsCheck, PointerEventsCheckLevel.EachApiCall) && lastCheck[ApiLevel.Call] !== getLevelRef(instance, ApiLevel.Call) || hasBitFlag(instance.config.pointerEventsCheck, PointerEventsCheckLevel.EachTrigger) && lastCheck[ApiLevel.Trigger] !== getLevelRef(instance, ApiLevel.Trigger)))) return lastCheck === null || lastCheck === void 0 ? void 0 : lastCheck.result;
2893
- const declaration = closestPointerEventsDeclaration(element);
2894
- element[PointerEventsCheck] = {
2895
- [ApiLevel.Call]: getLevelRef(instance, ApiLevel.Call),
2896
- [ApiLevel.Trigger]: getLevelRef(instance, ApiLevel.Trigger),
2897
- result: declaration
2898
- };
2899
- return declaration;
2900
- }
2901
- function assertPointerEvents(instance, element) {
2902
- const declaration = checkPointerEvents(instance, element);
2903
- if ((declaration === null || declaration === void 0 ? void 0 : declaration.pointerEvents) === "none") throw new Error([
2904
- `Unable to perform pointer interaction as the element ${declaration.tree.length > 1 ? "inherits" : "has"} \`pointer-events: none\`:`,
2905
- "",
2906
- printTree(declaration.tree)
2907
- ].join("\n"));
2908
- }
2909
- function printTree(tree) {
2910
- return tree.reverse().map((el, i) => [
2911
- "".padEnd(i),
2912
- el.tagName,
2913
- el.id && `#${el.id}`,
2914
- el.hasAttribute("data-testid") && `(testId=${el.getAttribute("data-testid")})`,
2915
- getLabelDescr(el),
2916
- tree.length > 1 && i === 0 && " <-- This element declared `pointer-events: none`",
2917
- tree.length > 1 && i === tree.length - 1 && " <-- Asserted pointer events here"
2918
- ].filter(Boolean).join("")).join("\n");
2919
- }
2920
- function getLabelDescr(element) {
2921
- var _element_labels;
2922
- let label;
2923
- if (element.hasAttribute("aria-label")) label = element.getAttribute("aria-label");
2924
- else if (element.hasAttribute("aria-labelledby")) {
2925
- var _element_ownerDocument_getElementById_textContent, _element_ownerDocument_getElementById;
2926
- label = (_element_ownerDocument_getElementById = element.ownerDocument.getElementById(element.getAttribute("aria-labelledby"))) === null || _element_ownerDocument_getElementById === void 0 ? void 0 : (_element_ownerDocument_getElementById_textContent = _element_ownerDocument_getElementById.textContent) === null || _element_ownerDocument_getElementById_textContent === void 0 ? void 0 : _element_ownerDocument_getElementById_textContent.trim();
2927
- } else if (isElementType(element, [
2928
- "button",
2929
- "input",
2930
- "meter",
2931
- "output",
2932
- "progress",
2933
- "select",
2934
- "textarea"
2935
- ]) && ((_element_labels = element.labels) === null || _element_labels === void 0 ? void 0 : _element_labels.length)) label = Array.from(element.labels).map((el) => {
2936
- var _el_textContent;
2937
- return (_el_textContent = el.textContent) === null || _el_textContent === void 0 ? void 0 : _el_textContent.trim();
2938
- }).join("|");
2939
- else if (isElementType(element, "button")) {
2940
- var _element_textContent;
2941
- label = (_element_textContent = element.textContent) === null || _element_textContent === void 0 ? void 0 : _element_textContent.trim();
2942
- }
2943
- label = label === null || label === void 0 ? void 0 : label.replace(/\n/g, " ");
2944
- if (Number(label === null || label === void 0 ? void 0 : label.length) > 30) label = `${label === null || label === void 0 ? void 0 : label.substring(0, 29)}…`;
2945
- return label ? `(label=${label})` : "";
2946
- }
2947
- function hasBitFlag(conf, flag) {
2948
- return (conf & flag) > 0;
2949
- }
2950
- var PointerEventsCheck;
2951
- function init_cssPointerEvents() {
2952
- return (init_cssPointerEvents = __esmMin((() => {
2953
- init_options();
2954
- init_level();
2955
- PointerEventsCheck = Symbol("Last check for pointer-events");
2956
- })))();
2957
- }
2958
- //#endregion
2959
- //#region ../node_modules/@testing-library/user-event/dist/esm/system/pointer/pointer.js
2960
- function _define_property$2(obj, key, value) {
2961
- if (key in obj) Object.defineProperty(obj, key, {
2962
- value,
2963
- enumerable: true,
2964
- configurable: true,
2965
- writable: true
2966
- });
2967
- else obj[key] = value;
2968
- return obj;
2969
- }
2970
- var Pointer;
2971
- function init_pointer() {
2972
- return (init_pointer = __esmMin((() => {
2973
- init_Clipboard();
2974
- init_cssPointerEvents();
2975
- init_buttons();
2976
- Pointer = class {
2977
- init(instance) {
2978
- const target = this.getTarget(instance);
2979
- const [, enter] = getTreeDiff(null, target);
2980
- const init = this.getEventInit();
2981
- assertPointerEvents(instance, target);
2982
- instance.dispatchUIEvent(target, "pointerover", init);
2983
- enter.forEach((el) => instance.dispatchUIEvent(el, "pointerenter", init));
2984
- return this;
2985
- }
2986
- move(instance, position) {
2987
- const prevPosition = this.position;
2988
- const prevTarget = this.getTarget(instance);
2989
- this.position = position;
2990
- if (!isDifferentPointerPosition(prevPosition, position)) return;
2991
- const nextTarget = this.getTarget(instance);
2992
- const init = this.getEventInit(-1);
2993
- const [leave, enter] = getTreeDiff(prevTarget, nextTarget);
2994
- return {
2995
- leave: () => {
2996
- if (hasPointerEvents(instance, prevTarget)) {
2997
- if (prevTarget !== nextTarget) {
2998
- instance.dispatchUIEvent(prevTarget, "pointerout", init);
2999
- leave.forEach((el) => instance.dispatchUIEvent(el, "pointerleave", init));
3000
- }
3001
- }
3002
- },
3003
- enter: () => {
3004
- assertPointerEvents(instance, nextTarget);
3005
- if (prevTarget !== nextTarget) {
3006
- instance.dispatchUIEvent(nextTarget, "pointerover", init);
3007
- enter.forEach((el) => instance.dispatchUIEvent(el, "pointerenter", init));
3008
- }
3009
- },
3010
- move: () => {
3011
- instance.dispatchUIEvent(nextTarget, "pointermove", init);
3012
- }
3013
- };
3014
- }
3015
- down(instance, button = 0) {
3016
- if (this.isDown) return;
3017
- const target = this.getTarget(instance);
3018
- assertPointerEvents(instance, target);
3019
- this.isDown = true;
3020
- this.isPrevented = !instance.dispatchUIEvent(target, "pointerdown", this.getEventInit(button));
3021
- }
3022
- up(instance, button = 0) {
3023
- if (!this.isDown) return;
3024
- const target = this.getTarget(instance);
3025
- assertPointerEvents(instance, target);
3026
- this.isPrevented = false;
3027
- this.isDown = false;
3028
- instance.dispatchUIEvent(target, "pointerup", this.getEventInit(button));
3029
- }
3030
- release(instance) {
3031
- const target = this.getTarget(instance);
3032
- const [leave] = getTreeDiff(target, null);
3033
- const init = this.getEventInit();
3034
- /* istanbul ignore else */ if (hasPointerEvents(instance, target)) {
3035
- instance.dispatchUIEvent(target, "pointerout", init);
3036
- leave.forEach((el) => instance.dispatchUIEvent(el, "pointerleave", init));
3037
- }
3038
- this.isCancelled = true;
3039
- }
3040
- getTarget(instance) {
3041
- var _this_position_target;
3042
- return (_this_position_target = this.position.target) !== null && _this_position_target !== void 0 ? _this_position_target : instance.config.document.body;
3043
- }
3044
- getEventInit(button) {
3045
- return {
3046
- ...this.position.coords,
3047
- pointerId: this.pointerId,
3048
- pointerType: this.pointerType,
3049
- isPrimary: this.isPrimary,
3050
- button: getMouseEventButton(button),
3051
- buttons: this.buttons.getButtons()
3052
- };
3053
- }
3054
- constructor({ pointerId, pointerType, isPrimary }, buttons) {
3055
- _define_property$2(this, "pointerId", void 0);
3056
- _define_property$2(this, "pointerType", void 0);
3057
- _define_property$2(this, "isPrimary", void 0);
3058
- _define_property$2(this, "buttons", void 0);
3059
- _define_property$2(this, "isMultitouch", false);
3060
- _define_property$2(this, "isCancelled", false);
3061
- _define_property$2(this, "isDown", false);
3062
- _define_property$2(this, "isPrevented", false);
3063
- _define_property$2(this, "position", {});
3064
- this.pointerId = pointerId;
3065
- this.pointerType = pointerType;
3066
- this.isPrimary = isPrimary;
3067
- this.isMultitouch = !isPrimary;
3068
- this.buttons = buttons;
3069
- }
3070
- };
3071
- })))();
3072
- }
3073
- //#endregion
3074
- //#region ../node_modules/@testing-library/user-event/dist/esm/system/pointer/index.js
3075
- function _define_property$1(obj, key, value) {
3076
- if (key in obj) Object.defineProperty(obj, key, {
3077
- value,
3078
- enumerable: true,
3079
- configurable: true,
3080
- writable: true
3081
- });
3082
- else obj[key] = value;
3083
- return obj;
3084
- }
3085
- var PointerHost;
3086
- function init_pointer$1() {
3087
- return (init_pointer$1 = __esmMin((() => {
3088
- init_buttons();
3089
- init_device();
3090
- init_mouse();
3091
- init_pointer();
3092
- PointerHost = class {
3093
- isKeyPressed(keyDef) {
3094
- return this.devices.get(keyDef.pointerType).isPressed(keyDef);
3095
- }
3096
- async press(instance, keyDef, position) {
3097
- this.devices.get(keyDef.pointerType).addPressed(keyDef);
3098
- this.buttons.down(keyDef);
3099
- const pointerName = this.getPointerName(keyDef);
3100
- const pointer = keyDef.pointerType === "touch" ? this.pointers.new(pointerName, keyDef.pointerType, this.buttons) : this.pointers.get(pointerName);
3101
- pointer.position = position;
3102
- if (pointer.pointerType !== "touch") this.mouse.position = position;
3103
- if (pointer.pointerType === "touch") pointer.init(instance);
3104
- pointer.down(instance, keyDef.button);
3105
- if (pointer.pointerType !== "touch") this.mouse.down(instance, keyDef, pointer.isPrevented);
3106
- }
3107
- async move(instance, pointerName, position) {
3108
- const pointer = this.pointers.get(pointerName);
3109
- const pointermove = pointer.move(instance, position);
3110
- const mousemove = pointer.pointerType === "touch" ? void 0 : this.mouse.move(instance, position, pointer.isPrevented);
3111
- pointermove === null || pointermove === void 0 || pointermove.leave();
3112
- mousemove === null || mousemove === void 0 || mousemove.leave();
3113
- pointermove === null || pointermove === void 0 || pointermove.enter();
3114
- mousemove === null || mousemove === void 0 || mousemove.enter();
3115
- pointermove === null || pointermove === void 0 || pointermove.move();
3116
- mousemove === null || mousemove === void 0 || mousemove.move();
3117
- }
3118
- async release(instance, keyDef, position) {
3119
- const device = this.devices.get(keyDef.pointerType);
3120
- device.removePressed(keyDef);
3121
- this.buttons.up(keyDef);
3122
- const pointer = this.pointers.get(this.getPointerName(keyDef));
3123
- const isPrevented = pointer.isPrevented;
3124
- pointer.position = position;
3125
- if (pointer.pointerType !== "touch") this.mouse.position = position;
3126
- if (device.countPressed === 0) pointer.up(instance, keyDef.button);
3127
- if (pointer.pointerType === "touch") pointer.release(instance);
3128
- if (pointer.pointerType === "touch" && !pointer.isMultitouch) {
3129
- const mousemove = this.mouse.move(instance, position, isPrevented);
3130
- mousemove === null || mousemove === void 0 || mousemove.leave();
3131
- mousemove === null || mousemove === void 0 || mousemove.enter();
3132
- mousemove === null || mousemove === void 0 || mousemove.move();
3133
- this.mouse.down(instance, keyDef, isPrevented);
3134
- }
3135
- if (!pointer.isMultitouch) {
3136
- const mousemove = this.mouse.move(instance, position, isPrevented);
3137
- mousemove === null || mousemove === void 0 || mousemove.leave();
3138
- mousemove === null || mousemove === void 0 || mousemove.enter();
3139
- mousemove === null || mousemove === void 0 || mousemove.move();
3140
- this.mouse.up(instance, keyDef, isPrevented);
3141
- }
3142
- }
3143
- getPointerName(keyDef) {
3144
- return keyDef.pointerType === "touch" ? keyDef.name : keyDef.pointerType;
3145
- }
3146
- getPreviousPosition(pointerName) {
3147
- return this.pointers.has(pointerName) ? this.pointers.get(pointerName).position : void 0;
3148
- }
3149
- resetClickCount() {
3150
- this.mouse.resetClickCount();
3151
- }
3152
- getMouseTarget(instance) {
3153
- var _this_mouse_position_target;
3154
- return (_this_mouse_position_target = this.mouse.position.target) !== null && _this_mouse_position_target !== void 0 ? _this_mouse_position_target : instance.config.document.body;
3155
- }
3156
- setMousePosition(position) {
3157
- this.mouse.position = position;
3158
- this.pointers.get("mouse").position = position;
3159
- }
3160
- constructor(system) {
3161
- _define_property$1(this, "system", void 0);
3162
- _define_property$1(this, "mouse", void 0);
3163
- _define_property$1(this, "buttons", void 0);
3164
- _define_property$1(this, "devices", new class {
3165
- get(k) {
3166
- var _this_registry, _k, _;
3167
- return (_ = (_this_registry = this.registry)[_k = k]) !== null && _ !== void 0 ? _ : _this_registry[_k] = new Device();
3168
- }
3169
- constructor() {
3170
- _define_property$1(this, "registry", {});
3171
- }
3172
- }());
3173
- _define_property$1(this, "pointers", new class {
3174
- new(pointerName, pointerType, buttons) {
3175
- const isPrimary = pointerType !== "touch" || !Object.values(this.registry).some((p) => p.pointerType === "touch" && !p.isCancelled);
3176
- if (!isPrimary) Object.values(this.registry).forEach((p) => {
3177
- if (p.pointerType === pointerType && !p.isCancelled) p.isMultitouch = true;
3178
- });
3179
- this.registry[pointerName] = new Pointer({
3180
- pointerId: this.nextId++,
3181
- pointerType,
3182
- isPrimary
3183
- }, buttons);
3184
- return this.registry[pointerName];
3185
- }
3186
- get(pointerName) {
3187
- if (!this.has(pointerName)) throw new Error(`Trying to access pointer "${pointerName}" which does not exist.`);
3188
- return this.registry[pointerName];
3189
- }
3190
- has(pointerName) {
3191
- return pointerName in this.registry;
3192
- }
3193
- constructor() {
3194
- _define_property$1(this, "registry", {});
3195
- _define_property$1(this, "nextId", 1);
3196
- }
3197
- }());
3198
- this.system = system;
3199
- this.buttons = new Buttons();
3200
- this.mouse = new Mouse();
3201
- this.pointers.new("mouse", "mouse", this.buttons);
3202
- }
3203
- };
3204
- })))();
3205
- }
3206
- //#endregion
3207
- //#region ../node_modules/@testing-library/user-event/dist/esm/system/index.js
3208
- function _define_property(obj, key, value) {
3209
- if (key in obj) Object.defineProperty(obj, key, {
3210
- value,
3211
- enumerable: true,
3212
- configurable: true,
3213
- writable: true
3214
- });
3215
- else obj[key] = value;
3216
- return obj;
3217
- }
3218
- var System;
3219
- function init_system() {
3220
- return (init_system = __esmMin((() => {
3221
- init_keyboard();
3222
- init_pointer$1();
3223
- System = class {
3224
- getUIEventModifiers() {
3225
- return {
3226
- altKey: this.keyboard.modifiers.Alt,
3227
- ctrlKey: this.keyboard.modifiers.Control,
3228
- metaKey: this.keyboard.modifiers.Meta,
3229
- shiftKey: this.keyboard.modifiers.Shift,
3230
- modifierAltGraph: this.keyboard.modifiers.AltGraph,
3231
- modifierCapsLock: this.keyboard.modifiers.CapsLock,
3232
- modifierFn: this.keyboard.modifiers.Fn,
3233
- modifierFnLock: this.keyboard.modifiers.FnLock,
3234
- modifierNumLock: this.keyboard.modifiers.NumLock,
3235
- modifierScrollLock: this.keyboard.modifiers.ScrollLock,
3236
- modifierSymbol: this.keyboard.modifiers.Symbol,
3237
- modifierSymbolLock: this.keyboard.modifiers.SymbolLock
3238
- };
3239
- }
3240
- constructor() {
3241
- _define_property(this, "keyboard", new KeyboardHost(this));
3242
- _define_property(this, "pointer", new PointerHost(this));
3243
- }
3244
- };
3245
- })))();
3246
- }
3247
- //#endregion
3248
- //#region ../node_modules/@testing-library/user-event/dist/esm/convenience/click.js
3249
- async function click$1(element) {
3250
- const pointerIn = [];
3251
- if (!this.config.skipHover) pointerIn.push({ target: element });
3252
- pointerIn.push({
3253
- keys: "[MouseLeft]",
3254
- target: element
3255
- });
3256
- return this.pointer(pointerIn);
3257
- }
3258
- async function dblClick$1(element) {
3259
- return this.pointer([{ target: element }, "[MouseLeft][MouseLeft]"]);
3260
- }
3261
- async function tripleClick$1(element) {
3262
- return this.pointer([{ target: element }, "[MouseLeft][MouseLeft][MouseLeft]"]);
3263
- }
3264
- //#endregion
3265
- //#region ../node_modules/@testing-library/user-event/dist/esm/convenience/hover.js
3266
- async function hover$1(element) {
3267
- return this.pointer({ target: element });
3268
- }
3269
- async function unhover$1(element) {
3270
- assertPointerEvents(this, this.system.pointer.getMouseTarget(this));
3271
- return this.pointer({ target: element.ownerDocument.body });
3272
- }
3273
- function init_hover() {
3274
- return (init_hover = __esmMin((() => {
3275
- init_Clipboard();
3276
- init_cssPointerEvents();
3277
- })))();
3278
- }
3279
- //#endregion
3280
- //#region ../node_modules/@testing-library/user-event/dist/esm/convenience/tab.js
3281
- async function tab$1({ shift } = {}) {
3282
- return this.keyboard(shift === true ? "{Shift>}{Tab}{/Shift}" : shift === false ? "[/ShiftLeft][/ShiftRight]{Tab}" : "{Tab}");
3283
- }
3284
- //#endregion
3285
- //#region ../node_modules/@testing-library/user-event/dist/esm/utils/keyDef/readNextDescriptor.js
3286
- /**
3287
- * Read the next key definition from user input
3288
- *
3289
- * Describe key per `{descriptor}` or `[descriptor]`.
3290
- * Everything else will be interpreted as a single character as descriptor - e.g. `a`.
3291
- * Brackets `{` and `[` can be escaped by doubling - e.g. `foo[[bar` translates to `foo[bar`.
3292
- * A previously pressed key can be released per `{/descriptor}`.
3293
- * Keeping the key pressed can be written as `{descriptor>}`.
3294
- * When keeping the key pressed you can choose how long the key is pressed `{descriptor>3}`.
3295
- * You can then release the key per `{descriptor>3/}` or keep it pressed and continue with the next key.
3296
- */ function readNextDescriptor(text, context) {
3297
- let pos = 0;
3298
- const startBracket = text[pos] in bracketDict ? text[pos] : "";
3299
- pos += startBracket.length;
3300
- const type = new RegExp(`^\\${startBracket}{2}`).test(text) ? "" : startBracket;
3301
- return {
3302
- type,
3303
- ...type === "" ? readPrintableChar(text, pos, context) : readTag(text, pos, type, context)
3304
- };
3305
- }
3306
- function readPrintableChar(text, pos, context) {
3307
- const descriptor = text[pos];
3308
- assertDescriptor(descriptor, text, pos, context);
3309
- pos += descriptor.length;
3310
- return {
3311
- consumedLength: pos,
3312
- descriptor,
3313
- releasePrevious: false,
3314
- releaseSelf: true,
3315
- repeat: 1
3316
- };
3317
- }
3318
- function readTag(text, pos, startBracket, context) {
3319
- var _ref;
3320
- var _text_slice_match, _text_slice_match1;
3321
- const releasePreviousModifier = text[pos] === "/" ? "/" : "";
3322
- pos += releasePreviousModifier.length;
3323
- const escapedDescriptor = startBracket === "{" && text[pos] === "\\";
3324
- pos += Number(escapedDescriptor);
3325
- const descriptor = escapedDescriptor ? text[pos] : (_text_slice_match = text.slice(pos).match(startBracket === "{" ? /^\w+|^[^}>/]/ : /^\w+/)) === null || _text_slice_match === void 0 ? void 0 : _text_slice_match[0];
3326
- assertDescriptor(descriptor, text, pos, context);
3327
- pos += descriptor.length;
3328
- const repeatModifier = (_ref = (_text_slice_match1 = text.slice(pos).match(/^>\d+/)) === null || _text_slice_match1 === void 0 ? void 0 : _text_slice_match1[0]) !== null && _ref !== void 0 ? _ref : "";
3329
- pos += repeatModifier.length;
3330
- const releaseSelfModifier = text[pos] === "/" || !repeatModifier && text[pos] === ">" ? text[pos] : "";
3331
- pos += releaseSelfModifier.length;
3332
- const expectedEndBracket = bracketDict[startBracket];
3333
- const endBracket = text[pos] === expectedEndBracket ? expectedEndBracket : "";
3334
- if (!endBracket) throw new Error(getErrorMessage([
3335
- !repeatModifier && "repeat modifier",
3336
- !releaseSelfModifier && "release modifier",
3337
- `"${expectedEndBracket}"`
3338
- ].filter(Boolean).join(" or "), text[pos], text, context));
3339
- pos += endBracket.length;
3340
- return {
3341
- consumedLength: pos,
3342
- descriptor,
3343
- releasePrevious: !!releasePreviousModifier,
3344
- repeat: repeatModifier ? Math.max(Number(repeatModifier.substr(1)), 1) : 1,
3345
- releaseSelf: hasReleaseSelf(releaseSelfModifier, repeatModifier)
3346
- };
3347
- }
3348
- function assertDescriptor(descriptor, text, pos, context) {
3349
- if (!descriptor) throw new Error(getErrorMessage("key descriptor", text[pos], text, context));
3350
- }
3351
- function hasReleaseSelf(releaseSelfModifier, repeatModifier) {
3352
- if (releaseSelfModifier) return releaseSelfModifier === "/";
3353
- if (repeatModifier) return false;
3354
- }
3355
- function getErrorMessage(expected, found, text, context) {
3356
- return `Expected ${expected} but found "${found !== null && found !== void 0 ? found : ""}" in "${text}"
3357
- See ${context === "pointer" ? `https://testing-library.com/docs/user-event/pointer#pressing-a-button-or-touching-the-screen` : `https://testing-library.com/docs/user-event/keyboard`}
3358
- for more information about how userEvent parses your input.`;
3359
- }
3360
- var bracketDict;
3361
- function init_readNextDescriptor() {
3362
- return (init_readNextDescriptor = __esmMin((() => {
3363
- bracketDict = {
3364
- "{": "}",
3365
- "[": "]"
3366
- };
3367
- })))();
3368
- }
3369
- //#endregion
3370
- //#region ../node_modules/@testing-library/user-event/dist/esm/keyboard/parseKeyDef.js
3371
- /**
3372
- * Parse key definitions per `keyboardMap`
3373
- *
3374
- * Keys can be referenced by `{key}` or `{special}` as well as physical locations per `[code]`.
3375
- * Everything else will be interpreted as a typed character - e.g. `a`.
3376
- * Brackets `{` and `[` can be escaped by doubling - e.g. `foo[[bar` translates to `foo[bar`.
3377
- * Keeping the key pressed can be written as `{key>}`.
3378
- * When keeping the key pressed you can choose how long (how many keydown and keypress) the key is pressed `{key>3}`.
3379
- * You can then release the key per `{key>3/}` or keep it pressed and continue with the next key.
3380
- */ function parseKeyDef$1(keyboardMap, text) {
3381
- const defs = [];
3382
- do {
3383
- var _keyboardMap_find;
3384
- const { type, descriptor, consumedLength, releasePrevious, releaseSelf = true, repeat } = readNextDescriptor(text, "keyboard");
3385
- const keyDef = (_keyboardMap_find = keyboardMap.find((def) => {
3386
- if (type === "[") {
3387
- var _def_code;
3388
- return ((_def_code = def.code) === null || _def_code === void 0 ? void 0 : _def_code.toLowerCase()) === descriptor.toLowerCase();
3389
- } else if (type === "{") {
3390
- var _def_key;
3391
- return ((_def_key = def.key) === null || _def_key === void 0 ? void 0 : _def_key.toLowerCase()) === descriptor.toLowerCase();
3392
- }
3393
- return def.key === descriptor;
3394
- })) !== null && _keyboardMap_find !== void 0 ? _keyboardMap_find : {
3395
- key: "Unknown",
3396
- code: "Unknown",
3397
- [type === "[" ? "code" : "key"]: descriptor
3398
- };
3399
- defs.push({
3400
- keyDef,
3401
- releasePrevious,
3402
- releaseSelf,
3403
- repeat
3404
- });
3405
- text = text.slice(consumedLength);
3406
- } while (text);
3407
- return defs;
3408
- }
3409
- function init_parseKeyDef() {
3410
- return (init_parseKeyDef = __esmMin((() => {
3411
- init_Clipboard();
3412
- init_readNextDescriptor();
3413
- })))();
3414
- }
3415
- //#endregion
3416
- //#region ../node_modules/@testing-library/user-event/dist/esm/keyboard/index.js
3417
- async function keyboard$1(text) {
3418
- const actions = parseKeyDef$1(this.config.keyboardMap, text);
3419
- for (let i = 0; i < actions.length; i++) {
3420
- await wait(this.config);
3421
- await keyboardAction(this, actions[i]);
3422
- }
3423
- }
3424
- async function keyboardAction(instance, { keyDef, releasePrevious, releaseSelf, repeat }) {
3425
- const { system } = instance;
3426
- if (system.keyboard.isKeyPressed(keyDef)) await system.keyboard.keyup(instance, keyDef);
3427
- if (!releasePrevious) {
3428
- for (let i = 1; i <= repeat; i++) {
3429
- await system.keyboard.keydown(instance, keyDef);
3430
- if (i < repeat) await wait(instance.config);
3431
- }
3432
- if (releaseSelf) await system.keyboard.keyup(instance, keyDef);
3433
- }
3434
- }
3435
- async function releaseAllKeys(instance) {
3436
- for (const k of instance.system.keyboard.getPressedKeys()) await instance.system.keyboard.keyup(instance, k);
3437
- }
3438
- function init_keyboard$1() {
3439
- return (init_keyboard$1 = __esmMin((() => {
3440
- init_Clipboard();
3441
- init_parseKeyDef();
3442
- })))();
3443
- }
3444
- //#endregion
3445
- //#region ../node_modules/@testing-library/user-event/dist/esm/document/copySelection.js
3446
- function copySelection(target) {
3447
- const data = hasOwnSelection(target) ? { "text/plain": readSelectedValueFromInput(target) } : { "text/plain": String(target.ownerDocument.getSelection()) };
3448
- const dt = createDataTransfer(getWindow(target));
3449
- for (const type in data) if (data[type]) dt.setData(type, data[type]);
3450
- return dt;
3451
- }
3452
- function readSelectedValueFromInput(target) {
3453
- const sel = getUISelection(target);
3454
- return getUIValue(target).substring(sel.startOffset, sel.endOffset);
3455
- }
3456
- function init_copySelection() {
3457
- return (init_copySelection = __esmMin((() => {
3458
- init_DataTransfer();
3459
- init_Clipboard();
3460
- init_selection();
3461
- init_UI();
3462
- })))();
3463
- }
3464
- //#endregion
3465
- //#region ../node_modules/@testing-library/user-event/dist/esm/clipboard/copy.js
3466
- async function copy$1() {
3467
- var _doc_activeElement;
3468
- const doc = this.config.document;
3469
- const target = (_doc_activeElement = doc.activeElement) !== null && _doc_activeElement !== void 0 ? _doc_activeElement : /* istanbul ignore next */ doc.body;
3470
- const clipboardData = copySelection(target);
3471
- if (clipboardData.items.length === 0) return;
3472
- if (this.dispatchUIEvent(target, "copy", { clipboardData }) && this.config.writeToClipboard) await writeDataTransferToClipboard(doc, clipboardData);
3473
- return clipboardData;
3474
- }
3475
- function init_copy() {
3476
- return (init_copy = __esmMin((() => {
3477
- init_Clipboard();
3478
- init_copySelection();
3479
- })))();
3480
- }
3481
- //#endregion
3482
- //#region ../node_modules/@testing-library/user-event/dist/esm/clipboard/cut.js
3483
- async function cut$1() {
3484
- var _doc_activeElement;
3485
- const doc = this.config.document;
3486
- const target = (_doc_activeElement = doc.activeElement) !== null && _doc_activeElement !== void 0 ? _doc_activeElement : /* istanbul ignore next */ doc.body;
3487
- const clipboardData = copySelection(target);
3488
- if (clipboardData.items.length === 0) return;
3489
- if (this.dispatchUIEvent(target, "cut", { clipboardData }) && this.config.writeToClipboard) await writeDataTransferToClipboard(target.ownerDocument, clipboardData);
3490
- return clipboardData;
3491
- }
3492
- function init_cut$1() {
3493
- return (init_cut$1 = __esmMin((() => {
3494
- init_Clipboard();
3495
- init_copySelection();
3496
- })))();
3497
- }
3498
- //#endregion
3499
- //#region ../node_modules/@testing-library/user-event/dist/esm/clipboard/paste.js
3500
- async function paste$1(clipboardData) {
3501
- var _doc_activeElement, _ref;
3502
- const doc = this.config.document;
3503
- const target = (_doc_activeElement = doc.activeElement) !== null && _doc_activeElement !== void 0 ? _doc_activeElement : /* istanbul ignore next */ doc.body;
3504
- const dataTransfer = (_ref = typeof clipboardData === "string" ? getClipboardDataFromString(doc, clipboardData) : clipboardData) !== null && _ref !== void 0 ? _ref : await readDataTransferFromClipboard(doc).catch(() => {
3505
- throw new Error("`userEvent.paste()` without `clipboardData` requires the `ClipboardAPI` to be available.");
3506
- });
3507
- this.dispatchUIEvent(target, "paste", { clipboardData: dataTransfer });
3508
- }
3509
- function getClipboardDataFromString(doc, text) {
3510
- const dt = createDataTransfer(getWindow(doc));
3511
- dt.setData("text", text);
3512
- return dt;
3513
- }
3514
- function init_paste$1() {
3515
- return (init_paste$1 = __esmMin((() => {
3516
- init_DataTransfer();
3517
- init_Clipboard();
3518
- })))();
3519
- }
3520
- //#endregion
3521
- //#region ../node_modules/@testing-library/user-event/dist/esm/pointer/parseKeyDef.js
3522
- function parseKeyDef(pointerMap, keys) {
3523
- const defs = [];
3524
- do {
3525
- const { descriptor, consumedLength, releasePrevious, releaseSelf = true } = readNextDescriptor(keys, "pointer");
3526
- const keyDef = pointerMap.find((p) => p.name === descriptor);
3527
- if (keyDef) defs.push({
3528
- keyDef,
3529
- releasePrevious,
3530
- releaseSelf
3531
- });
3532
- keys = keys.slice(consumedLength);
3533
- } while (keys);
3534
- return defs;
3535
- }
3536
- function init_parseKeyDef$1() {
3537
- return (init_parseKeyDef$1 = __esmMin((() => {
3538
- init_Clipboard();
3539
- init_readNextDescriptor();
3540
- })))();
3541
- }
3542
- //#endregion
3543
- //#region ../node_modules/@testing-library/user-event/dist/esm/pointer/index.js
3544
- async function pointer$1(input) {
3545
- const { pointerMap } = this.config;
3546
- const actions = [];
3547
- (Array.isArray(input) ? input : [input]).forEach((actionInput) => {
3548
- if (typeof actionInput === "string") actions.push(...parseKeyDef(pointerMap, actionInput));
3549
- else if ("keys" in actionInput) actions.push(...parseKeyDef(pointerMap, actionInput.keys).map((i) => ({
3550
- ...actionInput,
3551
- ...i
3552
- })));
3553
- else actions.push(actionInput);
3554
- });
3555
- for (let i = 0; i < actions.length; i++) {
3556
- await wait(this.config);
3557
- await pointerAction(this, actions[i]);
3558
- }
3559
- this.system.pointer.resetClickCount();
3560
- }
3561
- async function pointerAction(instance, action) {
3562
- var _action_target, _action_coords, _action_node, _action_offset;
3563
- var _previousPosition_caret, _previousPosition_caret1;
3564
- const pointerName = "pointerName" in action && action.pointerName ? action.pointerName : "keyDef" in action ? instance.system.pointer.getPointerName(action.keyDef) : "mouse";
3565
- const previousPosition = instance.system.pointer.getPreviousPosition(pointerName);
3566
- const position = {
3567
- target: (_action_target = action.target) !== null && _action_target !== void 0 ? _action_target : getPrevTarget(instance, previousPosition),
3568
- coords: (_action_coords = action.coords) !== null && _action_coords !== void 0 ? _action_coords : previousPosition === null || previousPosition === void 0 ? void 0 : previousPosition.coords,
3569
- caret: {
3570
- node: (_action_node = action.node) !== null && _action_node !== void 0 ? _action_node : hasCaretPosition(action) ? void 0 : previousPosition === null || previousPosition === void 0 ? void 0 : (_previousPosition_caret = previousPosition.caret) === null || _previousPosition_caret === void 0 ? void 0 : _previousPosition_caret.node,
3571
- offset: (_action_offset = action.offset) !== null && _action_offset !== void 0 ? _action_offset : hasCaretPosition(action) ? void 0 : previousPosition === null || previousPosition === void 0 ? void 0 : (_previousPosition_caret1 = previousPosition.caret) === null || _previousPosition_caret1 === void 0 ? void 0 : _previousPosition_caret1.offset
3572
- }
3573
- };
3574
- if ("keyDef" in action) {
3575
- if (instance.system.pointer.isKeyPressed(action.keyDef)) {
3576
- setLevelRef(instance, ApiLevel.Trigger);
3577
- await instance.system.pointer.release(instance, action.keyDef, position);
3578
- }
3579
- if (!action.releasePrevious) {
3580
- setLevelRef(instance, ApiLevel.Trigger);
3581
- await instance.system.pointer.press(instance, action.keyDef, position);
3582
- if (action.releaseSelf) {
3583
- setLevelRef(instance, ApiLevel.Trigger);
3584
- await instance.system.pointer.release(instance, action.keyDef, position);
3585
- }
3586
- }
3587
- } else {
3588
- setLevelRef(instance, ApiLevel.Trigger);
3589
- await instance.system.pointer.move(instance, pointerName, position);
3590
- }
3591
- }
3592
- function hasCaretPosition(action) {
3593
- var _ref, _action_target;
3594
- return !!((_ref = (_action_target = action.target) !== null && _action_target !== void 0 ? _action_target : action.node) !== null && _ref !== void 0 ? _ref : action.offset !== void 0);
3595
- }
3596
- function getPrevTarget(instance, position) {
3597
- var _position_target;
3598
- if (!position) throw new Error("This pointer has no previous position. Provide a target property!");
3599
- return (_position_target = position.target) !== null && _position_target !== void 0 ? _position_target : instance.config.document.body;
3600
- }
3601
- function init_pointer$2() {
3602
- return (init_pointer$2 = __esmMin((() => {
3603
- init_Clipboard();
3604
- init_level();
3605
- init_parseKeyDef$1();
3606
- })))();
3607
- }
3608
- //#endregion
3609
- //#region ../node_modules/@testing-library/user-event/dist/esm/utility/clear.js
3610
- async function clear$1(element) {
3611
- if (!isEditable(element) || isDisabled(element)) throw new Error("clear()` is only supported on editable elements.");
3612
- focusElement(element);
3613
- if (element.ownerDocument.activeElement !== element) throw new Error("The element to be cleared could not be focused.");
3614
- selectAll(element);
3615
- if (!isAllSelected(element)) throw new Error("The element content to be cleared could not be selected.");
3616
- input(this, element, "", "deleteContentBackward");
3617
- }
3618
- function init_clear() {
3619
- return (init_clear = __esmMin((() => {
3620
- init_click();
3621
- init_cut();
3622
- init_keydown();
3623
- init_keypress();
3624
- init_keyup();
3625
- init_paste();
3626
- init_dom_esm();
3627
- init_Clipboard();
3628
- init_isEditable();
3629
- init_isDisabled();
3630
- init_focus();
3631
- init_input();
3632
- init_selectAll();
3633
- })))();
3634
- }
3635
- //#endregion
3636
- //#region ../node_modules/@testing-library/user-event/dist/esm/utility/selectOptions.js
3637
- async function selectOptions$1(select, values) {
3638
- return selectOptionsBase.call(this, true, select, values);
3639
- }
3640
- async function deselectOptions$1(select, values) {
3641
- return selectOptionsBase.call(this, false, select, values);
3642
- }
3643
- async function selectOptionsBase(newValue, select, values) {
3644
- if (!newValue && !select.multiple) throw getConfig().getElementError(`Unable to deselect an option in a non-multiple select. Use selectOptions to change the selection instead.`, select);
3645
- const valArray = Array.isArray(values) ? values : [values];
3646
- const allOptions = Array.from(select.querySelectorAll("option, [role=\"option\"]"));
3647
- const selectedOptions = valArray.map((val) => {
3648
- if (typeof val !== "string" && allOptions.includes(val)) return val;
3649
- else {
3650
- const matchingOption = allOptions.find((o) => o.value === val || o.innerHTML === val);
3651
- if (matchingOption) return matchingOption;
3652
- else throw getConfig().getElementError(`Value "${String(val)}" not found in options`, select);
3653
- }
3654
- }).filter((option) => !isDisabled(option));
3655
- if (isDisabled(select) || !selectedOptions.length) return;
3656
- const selectOption = (option) => {
3657
- option.selected = newValue;
3658
- this.dispatchUIEvent(select, "input", {
3659
- bubbles: true,
3660
- cancelable: false,
3661
- composed: true
3662
- });
3663
- this.dispatchUIEvent(select, "change");
3664
- };
3665
- if (isElementType(select, "select")) {
3666
- if (select.multiple) for (const option of selectedOptions) {
3667
- const withPointerEvents = this.config.pointerEventsCheck === 0 ? true : hasPointerEvents(this, option);
3668
- if (withPointerEvents) {
3669
- this.dispatchUIEvent(option, "pointerover");
3670
- this.dispatchUIEvent(select, "pointerenter");
3671
- this.dispatchUIEvent(option, "mouseover");
3672
- this.dispatchUIEvent(select, "mouseenter");
3673
- this.dispatchUIEvent(option, "pointermove");
3674
- this.dispatchUIEvent(option, "mousemove");
3675
- this.dispatchUIEvent(option, "pointerdown");
3676
- this.dispatchUIEvent(option, "mousedown");
3677
- }
3678
- focusElement(select);
3679
- if (withPointerEvents) {
3680
- this.dispatchUIEvent(option, "pointerup");
3681
- this.dispatchUIEvent(option, "mouseup");
3682
- }
3683
- selectOption(option);
3684
- if (withPointerEvents) this.dispatchUIEvent(option, "click");
3685
- await wait(this.config);
3686
- }
3687
- else if (selectedOptions.length === 1) {
3688
- const withPointerEvents = this.config.pointerEventsCheck === 0 ? true : hasPointerEvents(this, select);
3689
- if (withPointerEvents) await this.click(select);
3690
- else focusElement(select);
3691
- selectOption(selectedOptions[0]);
3692
- if (withPointerEvents) {
3693
- this.dispatchUIEvent(select, "pointerover");
3694
- this.dispatchUIEvent(select, "pointerenter");
3695
- this.dispatchUIEvent(select, "mouseover");
3696
- this.dispatchUIEvent(select, "mouseenter");
3697
- this.dispatchUIEvent(select, "pointerup");
3698
- this.dispatchUIEvent(select, "mouseup");
3699
- this.dispatchUIEvent(select, "click");
3700
- }
3701
- await wait(this.config);
3702
- } else throw getConfig().getElementError(`Cannot select multiple options on a non-multiple select`, select);
3703
- } else if (select.getAttribute("role") === "listbox") for (const option of selectedOptions) {
3704
- await this.click(option);
3705
- await this.unhover(option);
3706
- }
3707
- else throw getConfig().getElementError(`Cannot select options on elements that are neither select nor listbox elements`, select);
3708
- }
3709
- function init_selectOptions() {
3710
- return (init_selectOptions = __esmMin((() => {
3711
- init_dom_esm();
3712
- init_Clipboard();
3713
- init_isDisabled();
3714
- init_cssPointerEvents();
3715
- init_click();
3716
- init_cut();
3717
- init_keydown();
3718
- init_keypress();
3719
- init_keyup();
3720
- init_paste();
3721
- init_focus();
3722
- })))();
3723
- }
3724
- //#endregion
3725
- //#region ../node_modules/@testing-library/user-event/dist/esm/utility/type.js
3726
- async function type$1(element, text, { skipClick = this.config.skipClick, skipAutoClose = this.config.skipAutoClose, initialSelectionStart, initialSelectionEnd } = {}) {
3727
- if (element.disabled) return;
3728
- if (!skipClick) await this.click(element);
3729
- if (initialSelectionStart !== void 0) setSelectionRange(element, initialSelectionStart, initialSelectionEnd !== null && initialSelectionEnd !== void 0 ? initialSelectionEnd : initialSelectionStart);
3730
- await this.keyboard(text);
3731
- if (!skipAutoClose) await releaseAllKeys(this);
3732
- }
3733
- function init_type() {
3734
- return (init_type = __esmMin((() => {
3735
- init_keyboard$1();
3736
- init_Clipboard();
3737
- init_setSelectionRange();
3738
- })))();
3739
- }
3740
- //#endregion
3741
- //#region ../node_modules/@testing-library/user-event/dist/esm/utils/edit/setFiles.js
3742
- function restoreProperty(obj, prop, descriptor) {
3743
- if (descriptor) Object.defineProperty(obj, prop, descriptor);
3744
- else delete obj[prop];
3745
- }
3746
- function setFiles(el, files) {
3747
- var _el_fakeFiles;
3748
- (_el_fakeFiles = el[fakeFiles]) === null || _el_fakeFiles === void 0 || _el_fakeFiles.restore();
3749
- const typeDescr = Object.getOwnPropertyDescriptor(el, "type");
3750
- const valueDescr = Object.getOwnPropertyDescriptor(el, "value");
3751
- const filesDescr = Object.getOwnPropertyDescriptor(el, "files");
3752
- function restore() {
3753
- restoreProperty(el, "type", typeDescr);
3754
- restoreProperty(el, "value", valueDescr);
3755
- restoreProperty(el, "files", filesDescr);
3756
- }
3757
- el[fakeFiles] = { restore };
3758
- Object.defineProperties(el, {
3759
- files: {
3760
- configurable: true,
3761
- get: () => files
3762
- },
3763
- value: {
3764
- configurable: true,
3765
- get: () => files.length ? `C:\\fakepath\\${files[0].name}` : "",
3766
- set(v) {
3767
- if (v === "") restore();
3768
- else {
3769
- var _valueDescr_set;
3770
- valueDescr === null || valueDescr === void 0 || (_valueDescr_set = valueDescr.set) == null || _valueDescr_set.call(el, v);
3771
- }
3772
- }
3773
- },
3774
- type: {
3775
- configurable: true,
3776
- get: () => "file",
3777
- set(v) {
3778
- if (v !== "file") {
3779
- restore();
3780
- el.type = v;
3781
- }
3782
- }
3783
- }
3784
- });
3785
- }
3786
- var fakeFiles;
3787
- function init_setFiles() {
3788
- return (init_setFiles = __esmMin((() => {
3789
- fakeFiles = Symbol("files and value properties are mocked");
3790
- })))();
3791
- }
3792
- //#endregion
3793
- //#region ../node_modules/@testing-library/user-event/dist/esm/utility/upload.js
3794
- async function upload$1(element, fileOrFiles) {
3795
- const input = isElementType(element, "label") ? element.control : element;
3796
- if (!input || !isElementType(input, "input", { type: "file" })) throw new TypeError(`The ${input === element ? "given" : "associated"} ${input === null || input === void 0 ? void 0 : input.tagName} element does not accept file uploads`);
3797
- if (isDisabled(element)) return;
3798
- const files = (Array.isArray(fileOrFiles) ? fileOrFiles : [fileOrFiles]).filter((file) => !this.config.applyAccept || isAcceptableFile(file, input.accept)).slice(0, input.multiple ? void 0 : 1);
3799
- const fileDialog = () => {
3800
- var _input_files;
3801
- if (files.length === ((_input_files = input.files) === null || _input_files === void 0 ? void 0 : _input_files.length) && files.every((f, i) => {
3802
- var _input_files;
3803
- return f === ((_input_files = input.files) === null || _input_files === void 0 ? void 0 : _input_files.item(i));
3804
- })) return;
3805
- setFiles(input, createFileList(getWindow(element), files));
3806
- this.dispatchUIEvent(input, "input");
3807
- this.dispatchUIEvent(input, "change");
3808
- };
3809
- input.addEventListener("fileDialog", fileDialog);
3810
- await this.click(element);
3811
- input.removeEventListener("fileDialog", fileDialog);
3812
- }
3813
- function normalize(nameOrType) {
3814
- return nameOrType.toLowerCase().replace(/(\.|\/)jpg\b/g, "$1jpeg");
3815
- }
3816
- function isAcceptableFile(file, accept) {
3817
- if (!accept) return true;
3818
- const wildcards = [
3819
- "audio/*",
3820
- "image/*",
3821
- "video/*"
3822
- ];
3823
- return normalize(accept).trim().split(/\s*,\s*/).some((acceptToken) => {
3824
- if (acceptToken.startsWith(".")) return normalize(file.name).endsWith(acceptToken);
3825
- else if (wildcards.includes(acceptToken)) return normalize(file.type).startsWith(acceptToken.replace("*", ""));
3826
- return normalize(file.type) === acceptToken;
3827
- });
3828
- }
3829
- function init_upload() {
3830
- return (init_upload = __esmMin((() => {
3831
- init_Clipboard();
3832
- init_setFiles();
3833
- init_isDisabled();
3834
- })))();
3835
- }
3836
- //#endregion
3837
- //#region ../node_modules/@testing-library/user-event/dist/esm/setup/api.js
3838
- var userEventApi;
3839
- function init_api() {
3840
- return (init_api = __esmMin((() => {
3841
- init_hover();
3842
- init_keyboard$1();
3843
- init_copy();
3844
- init_cut$1();
3845
- init_paste$1();
3846
- init_pointer$2();
3847
- init_clear();
3848
- init_selectOptions();
3849
- init_type();
3850
- init_upload();
3851
- userEventApi = {
3852
- click: click$1,
3853
- dblClick: dblClick$1,
3854
- tripleClick: tripleClick$1,
3855
- hover: hover$1,
3856
- unhover: unhover$1,
3857
- tab: tab$1,
3858
- keyboard: keyboard$1,
3859
- copy: copy$1,
3860
- cut: cut$1,
3861
- paste: paste$1,
3862
- pointer: pointer$1,
3863
- clear: clear$1,
3864
- deselectOptions: deselectOptions$1,
3865
- selectOptions: selectOptions$1,
3866
- type: type$1,
3867
- upload: upload$1
3868
- };
3869
- })))();
3870
- }
3871
- //#endregion
3872
- //#region ../node_modules/@testing-library/user-event/dist/esm/setup/wrapAsync.js
3873
- /**
3874
- * Wrap an internal Promise
3875
- */ function wrapAsync(implementation) {
3876
- return getConfig().asyncWrapper(implementation);
3877
- }
3878
- function init_wrapAsync() {
3879
- return (init_wrapAsync = __esmMin((() => {
3880
- init_dom_esm();
3881
- })))();
3882
- }
3883
- //#endregion
3884
- //#region ../node_modules/@testing-library/user-event/dist/esm/setup/setup.js
3885
- function createConfig(options = {}, defaults = defaultOptionsSetup, node) {
3886
- const document = getDocument(options, node, defaults);
3887
- return {
3888
- ...defaults,
3889
- ...options,
3890
- document
3891
- };
3892
- }
3893
- /**
3894
- * Start a "session" with userEvent.
3895
- * All APIs returned by this function share an input device state and a default configuration.
3896
- */ function setupMain(options = {}) {
3897
- var _config_document_defaultView;
3898
- const config = createConfig(options);
3899
- prepareDocument(config.document);
3900
- patchFocus(getWindow(config.document).HTMLElement);
3901
- attachClipboardStubToView((_config_document_defaultView = config.document.defaultView) !== null && _config_document_defaultView !== void 0 ? _config_document_defaultView : /* istanbul ignore next */ globalThis.window);
3902
- return createInstance(config).api;
3903
- }
3904
- /**
3905
- * Setup in direct call per `userEvent.anyApi()`
3906
- */ function setupDirect({ keyboardState, pointerState, ...options } = {}, node) {
3907
- var _ref;
3908
- const config = createConfig(options, defaultOptionsDirect, node);
3909
- prepareDocument(config.document);
3910
- patchFocus(getWindow(config.document).HTMLElement);
3911
- const system = (_ref = pointerState !== null && pointerState !== void 0 ? pointerState : keyboardState) !== null && _ref !== void 0 ? _ref : new System();
3912
- return {
3913
- api: createInstance(config, system).api,
3914
- system
3915
- };
3916
- }
3917
- /**
3918
- * Create a set of callbacks with different default settings but the same state.
3919
- */ function setupSub(options) {
3920
- return createInstance({
3921
- ...this.config,
3922
- ...options
3923
- }, this.system).api;
3924
- }
3925
- function wrapAndBindImpl(instance, impl) {
3926
- function method(...args) {
3927
- setLevelRef(instance, ApiLevel.Call);
3928
- return wrapAsync(() => impl.apply(instance, args).then(async (ret) => {
3929
- await wait(instance.config);
3930
- return ret;
3931
- }));
3932
- }
3933
- Object.defineProperty(method, "name", { get: () => impl.name });
3934
- return method;
3935
- }
3936
- function createInstance(config, system = new System()) {
3937
- const instance = {};
3938
- Object.assign(instance, {
3939
- config,
3940
- dispatchEvent: dispatchEvent.bind(instance),
3941
- dispatchUIEvent: dispatchUIEvent.bind(instance),
3942
- system,
3943
- levelRefs: {},
3944
- ...userEventApi
3945
- });
3946
- return {
3947
- instance,
3948
- api: {
3949
- ...Object.fromEntries(Object.entries(userEventApi).map(([name, api]) => [name, wrapAndBindImpl(instance, api)])),
3950
- setup: setupSub.bind(instance)
3951
- }
3952
- };
3953
- }
3954
- function getDocument(options, node, defaults) {
3955
- var _ref, _options_document;
3956
- return (_ref = (_options_document = options.document) !== null && _options_document !== void 0 ? _options_document : node && getDocumentFromNode(node)) !== null && _ref !== void 0 ? _ref : defaults.document;
3957
- }
3958
- var defaultOptionsDirect, defaultOptionsSetup;
3959
- function init_setup() {
3960
- return (init_setup = __esmMin((() => {
3961
- init_patchFocus();
3962
- init_prepareDocument();
3963
- init_dispatchEvent();
3964
- init_Clipboard();
3965
- init_level();
3966
- init_options();
3967
- init_dom_esm();
3968
- init_keyMap();
3969
- init_keyMap$1();
3970
- init_system();
3971
- init_api();
3972
- init_wrapAsync();
3973
- defaultOptionsDirect = {
3974
- applyAccept: true,
3975
- autoModify: true,
3976
- delay: 0,
3977
- document: globalThis.document,
3978
- keyboardMap: defaultKeyMap$1,
3979
- pointerMap: defaultKeyMap,
3980
- pointerEventsCheck: PointerEventsCheckLevel.EachApiCall,
3981
- skipAutoClose: false,
3982
- skipClick: false,
3983
- skipHover: false,
3984
- writeToClipboard: false,
3985
- advanceTimers: () => Promise.resolve()
3986
- };
3987
- defaultOptionsSetup = {
3988
- ...defaultOptionsDirect,
3989
- writeToClipboard: true
3990
- };
3991
- })))();
3992
- }
3993
- //#endregion
3994
- //#region ../node_modules/@testing-library/user-event/dist/esm/setup/directApi.js
3995
- var directApi_exports = /* @__PURE__ */ __exportAll({
3996
- clear: () => clear,
3997
- click: () => click,
3998
- copy: () => copy,
3999
- cut: () => cut,
4000
- dblClick: () => dblClick,
4001
- deselectOptions: () => deselectOptions,
4002
- hover: () => hover,
4003
- keyboard: () => keyboard,
4004
- paste: () => paste,
4005
- pointer: () => pointer,
4006
- selectOptions: () => selectOptions,
4007
- tab: () => tab,
4008
- tripleClick: () => tripleClick,
4009
- type: () => type,
4010
- unhover: () => unhover,
4011
- upload: () => upload
4012
- });
4013
- function clear(element) {
4014
- return setupDirect().api.clear(element);
4015
- }
4016
- function click(element, options = {}) {
4017
- return setupDirect(options, element).api.click(element);
4018
- }
4019
- function copy(options = {}) {
4020
- return setupDirect(options).api.copy();
4021
- }
4022
- function cut(options = {}) {
4023
- return setupDirect(options).api.cut();
4024
- }
4025
- function dblClick(element, options = {}) {
4026
- return setupDirect(options).api.dblClick(element);
4027
- }
4028
- function deselectOptions(select, values, options = {}) {
4029
- return setupDirect(options).api.deselectOptions(select, values);
4030
- }
4031
- function hover(element, options = {}) {
4032
- return setupDirect(options).api.hover(element);
4033
- }
4034
- async function keyboard(text, options = {}) {
4035
- const { api, system } = setupDirect(options);
4036
- return api.keyboard(text).then(() => system);
4037
- }
4038
- async function pointer(input, options = {}) {
4039
- const { api, system } = setupDirect(options);
4040
- return api.pointer(input).then(() => system);
4041
- }
4042
- function paste(clipboardData, options) {
4043
- return setupDirect(options).api.paste(clipboardData);
4044
- }
4045
- function selectOptions(select, values, options = {}) {
4046
- return setupDirect(options).api.selectOptions(select, values);
4047
- }
4048
- function tripleClick(element, options = {}) {
4049
- return setupDirect(options).api.tripleClick(element);
4050
- }
4051
- function type(element, text, options = {}) {
4052
- return setupDirect(options, element).api.type(element, text, options);
4053
- }
4054
- function unhover(element, options = {}) {
4055
- const { api, system } = setupDirect(options);
4056
- system.pointer.setMousePosition({ target: element });
4057
- return api.unhover(element);
4058
- }
4059
- function upload(element, fileOrFiles, options = {}) {
4060
- return setupDirect(options).api.upload(element, fileOrFiles);
4061
- }
4062
- function tab(options = {}) {
4063
- return setupDirect().api.tab(options);
4064
- }
4065
- function init_directApi() {
4066
- return (init_directApi = __esmMin((() => {
4067
- init_setup();
4068
- })))();
4069
- }
4070
- //#endregion
4071
- //#region ../node_modules/@testing-library/user-event/dist/esm/setup/index.js
4072
- var userEvent;
4073
- function init_setup$1() {
4074
- return (init_setup$1 = __esmMin((() => {
4075
- init_setup();
4076
- init_directApi();
4077
- userEvent = {
4078
- ...directApi_exports,
4079
- setup: setupMain
4080
- };
4081
- })))();
4082
- }
4083
- //#endregion
4084
- //#region ../node_modules/@testing-library/user-event/dist/esm/index.js
4085
- function init_esm() {
4086
- return (init_esm = __esmMin((() => {
4087
- init_setup$1();
4088
- })))();
4089
- }
4090
- //#endregion
4091
- export { init_setup$1 as n, userEvent as r, init_esm as t };