@aussieljk/forkbook 0.0.0-stage → 0.0.1-2

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 (598) hide show
  1. package/LICENSE +22 -0
  2. package/README.md +77 -2
  3. package/assets/addon-vitest/templates/vitest.config.4.template.ts +36 -0
  4. package/assets/browser/favicon-wrapper.svg +46 -0
  5. package/assets/browser/favicon.svg +1 -0
  6. package/assets/browser/nunito-sans-bold-italic.woff2 +0 -0
  7. package/assets/browser/nunito-sans-bold.woff2 +0 -0
  8. package/assets/browser/nunito-sans-italic.woff2 +0 -0
  9. package/assets/browser/nunito-sans-regular.woff2 +0 -0
  10. package/assets/builder-vite/iframe.html +99 -0
  11. package/assets/create/rendererAssets/.eslintrc.json +16 -0
  12. package/assets/create/rendererAssets/common/Configure.mdx +388 -0
  13. package/assets/create/rendererAssets/common/assets/accessibility.png +0 -0
  14. package/assets/create/rendererAssets/common/assets/accessibility.svg +1 -0
  15. package/assets/create/rendererAssets/common/assets/addon-library.png +0 -0
  16. package/assets/create/rendererAssets/common/assets/assets.png +0 -0
  17. package/assets/create/rendererAssets/common/assets/avif-test-image.avif +0 -0
  18. package/assets/create/rendererAssets/common/assets/context.png +0 -0
  19. package/assets/create/rendererAssets/common/assets/discord.svg +1 -0
  20. package/assets/create/rendererAssets/common/assets/docs.png +0 -0
  21. package/assets/create/rendererAssets/common/assets/figma-plugin.png +0 -0
  22. package/assets/create/rendererAssets/common/assets/github.svg +1 -0
  23. package/assets/create/rendererAssets/common/assets/share.png +0 -0
  24. package/assets/create/rendererAssets/common/assets/styling.png +0 -0
  25. package/assets/create/rendererAssets/common/assets/testing.png +0 -0
  26. package/assets/create/rendererAssets/common/assets/theming.png +0 -0
  27. package/assets/create/rendererAssets/common/assets/tutorials.svg +1 -0
  28. package/assets/create/rendererAssets/common/assets/youtube.svg +1 -0
  29. package/assets/create/rendererAssets/common/button.css +30 -0
  30. package/assets/create/rendererAssets/common/header.css +32 -0
  31. package/assets/create/rendererAssets/common/page.css +68 -0
  32. package/assets/create/templates/react-native/index.expo.js +20 -0
  33. package/assets/create/templates/react-native/index.js +25 -0
  34. package/assets/docs/addon-backgrounds.gif +0 -0
  35. package/assets/docs/addon-controls-args-annotated.png +0 -0
  36. package/assets/docs/addon-controls-args-background-color.png +0 -0
  37. package/assets/docs/addon-controls-args-background-string.png +0 -0
  38. package/assets/docs/addon-controls-args-docs.png +0 -0
  39. package/assets/docs/addon-controls-args-logging.png +0 -0
  40. package/assets/docs/addon-controls-args-no-annotation.png +0 -0
  41. package/assets/docs/addon-controls-args-reflow-slider.png +0 -0
  42. package/assets/docs/addon-controls-args-reflow.png +0 -0
  43. package/assets/docs/addon-controls-args-template.png +0 -0
  44. package/assets/docs/addon-controls-expanded.png +0 -0
  45. package/assets/docs/addon-controls-hero.gif +0 -0
  46. package/assets/docs/addon-controls-install.png +0 -0
  47. package/assets/docs/hero.gif +0 -0
  48. package/assets/docs/highlight.png +0 -0
  49. package/assets/docs/message-reference.png +0 -0
  50. package/assets/docs/viewport.png +0 -0
  51. package/assets/react-native/metro-env.d.ts +69 -0
  52. package/assets/server/addon.tsconfig.json +6 -0
  53. package/assets/server/base-preview-body.html +116 -0
  54. package/assets/server/base-preview-head.html +494 -0
  55. package/assets/server/openBrowser.applescript +94 -0
  56. package/assets/server/template.ejs +87 -0
  57. package/dist/.build-stamp +0 -0
  58. package/dist/_browser-chunks/Color-PCLE2J36.js +1025 -0
  59. package/dist/_browser-chunks/DocsRenderer-JXND3PVQ.js +10 -0
  60. package/dist/_browser-chunks/WithTooltip-XSQFTBMB.js +1619 -0
  61. package/dist/_browser-chunks/chunk-2JDQ35OA.js +247 -0
  62. package/dist/_browser-chunks/chunk-2JT76G3E.js +104 -0
  63. package/dist/_browser-chunks/chunk-2MEPHP35.js +17 -0
  64. package/dist/_browser-chunks/chunk-2SCZVUKW.js +24 -0
  65. package/dist/_browser-chunks/chunk-46Z7NGAS.js +41 -0
  66. package/dist/_browser-chunks/chunk-4ATQOMJB.js +30 -0
  67. package/dist/_browser-chunks/chunk-52CW7FF7.js +49 -0
  68. package/dist/_browser-chunks/chunk-5I7E4GMO.js +62 -0
  69. package/dist/_browser-chunks/chunk-5P4QA6MY.js +20 -0
  70. package/dist/_browser-chunks/chunk-5WMXI5GW.js +816 -0
  71. package/dist/_browser-chunks/chunk-66OCZ54D.js +2604 -0
  72. package/dist/_browser-chunks/chunk-6SXYJQST.js +253 -0
  73. package/dist/_browser-chunks/chunk-AYRF6EJB.js +36 -0
  74. package/dist/_browser-chunks/chunk-B4AUNNU4.js +156 -0
  75. package/dist/_browser-chunks/chunk-BCP2FFXF.js +369 -0
  76. package/dist/_browser-chunks/chunk-C3D4HEFY.js +3396 -0
  77. package/dist/_browser-chunks/chunk-CFAOWGL7.js +43 -0
  78. package/dist/_browser-chunks/chunk-CFWWCCZV.js +223 -0
  79. package/dist/_browser-chunks/chunk-CNED6RYH.js +18 -0
  80. package/dist/_browser-chunks/chunk-DRQKCCAG.js +136 -0
  81. package/dist/_browser-chunks/chunk-ECQ75MKQ.js +0 -0
  82. package/dist/_browser-chunks/chunk-EIYAKDGP.js +302 -0
  83. package/dist/_browser-chunks/chunk-ENKK74N4.js +12 -0
  84. package/dist/_browser-chunks/chunk-FENFYI4X.js +698 -0
  85. package/dist/_browser-chunks/chunk-FJGWSWL5.js +155 -0
  86. package/dist/_browser-chunks/chunk-FVSEPWWX.js +2810 -0
  87. package/dist/_browser-chunks/chunk-GNZY6LOW.js +10116 -0
  88. package/dist/_browser-chunks/chunk-IE4ULIOQ.js +14 -0
  89. package/dist/_browser-chunks/chunk-IMSF75WX.js +42 -0
  90. package/dist/_browser-chunks/chunk-IWQGIXJS.js +14 -0
  91. package/dist/_browser-chunks/chunk-JMC7AIKT.js +108 -0
  92. package/dist/_browser-chunks/chunk-JPUOQJUI.js +8 -0
  93. package/dist/_browser-chunks/chunk-JSBKXXXF.js +218 -0
  94. package/dist/_browser-chunks/chunk-JWSKPMPC.js +73 -0
  95. package/dist/_browser-chunks/chunk-JYVGARBG.js +2943 -0
  96. package/dist/_browser-chunks/chunk-KBK7GKBN.js +35 -0
  97. package/dist/_browser-chunks/chunk-KQ7CRO2B.js +108 -0
  98. package/dist/_browser-chunks/chunk-LAWXTSXK.js +18 -0
  99. package/dist/_browser-chunks/chunk-LE2LTDW3.js +14 -0
  100. package/dist/_browser-chunks/chunk-LEVSOOLQ.js +48 -0
  101. package/dist/_browser-chunks/chunk-LV5PIKV4.js +93 -0
  102. package/dist/_browser-chunks/chunk-MDOL7KML.js +56 -0
  103. package/dist/_browser-chunks/chunk-MFMDGWP6.js +34 -0
  104. package/dist/_browser-chunks/chunk-MLBOOZL4.js +67 -0
  105. package/dist/_browser-chunks/chunk-NQUD4B7H.js +91 -0
  106. package/dist/_browser-chunks/chunk-NULBREPZ.js +43 -0
  107. package/dist/_browser-chunks/chunk-NZMVUW5T.js +7 -0
  108. package/dist/_browser-chunks/chunk-OD6IBQCC.js +117 -0
  109. package/dist/_browser-chunks/chunk-ODVJ3XZJ.js +157 -0
  110. package/dist/_browser-chunks/chunk-OQWFVDIN.js +386 -0
  111. package/dist/_browser-chunks/chunk-OVH3USFB.js +20 -0
  112. package/dist/_browser-chunks/chunk-OZZPSYQR.js +14 -0
  113. package/dist/_browser-chunks/chunk-P6PK47TQ.js +1970 -0
  114. package/dist/_browser-chunks/chunk-PFRNG3UC.js +22 -0
  115. package/dist/_browser-chunks/chunk-PJSMZ27A.js +13 -0
  116. package/dist/_browser-chunks/chunk-QC4HFS6K.js +41 -0
  117. package/dist/_browser-chunks/chunk-QDXFODK4.js +274 -0
  118. package/dist/_browser-chunks/chunk-RBCHTR7C.js +28 -0
  119. package/dist/_browser-chunks/chunk-RMYQ3QN3.js +294 -0
  120. package/dist/_browser-chunks/chunk-RNTIV5CE.js +411 -0
  121. package/dist/_browser-chunks/chunk-RSPAQWVJ.js +80 -0
  122. package/dist/_browser-chunks/chunk-S6TK43XQ.js +836 -0
  123. package/dist/_browser-chunks/chunk-SC67XZST.js +18 -0
  124. package/dist/_browser-chunks/chunk-SFVA4SBT.js +683 -0
  125. package/dist/_browser-chunks/chunk-SZYFOQMT.js +25 -0
  126. package/dist/_browser-chunks/chunk-TBJCJXK4.js +18 -0
  127. package/dist/_browser-chunks/chunk-UMDO3KB7.js +205 -0
  128. package/dist/_browser-chunks/chunk-V2G23FV7.js +11 -0
  129. package/dist/_browser-chunks/chunk-V5M7Q4HT.js +88 -0
  130. package/dist/_browser-chunks/chunk-W5M6NPS3.js +198 -0
  131. package/dist/_browser-chunks/chunk-W7NE2JXW.js +84 -0
  132. package/dist/_browser-chunks/chunk-WGVAAM43.js +1110 -0
  133. package/dist/_browser-chunks/chunk-WHQRNHXD.js +8 -0
  134. package/dist/_browser-chunks/chunk-WOSOWBCA.js +12 -0
  135. package/dist/_browser-chunks/chunk-WZ7KR7SH.js +85 -0
  136. package/dist/_browser-chunks/chunk-YEKO6BHJ.js +20 -0
  137. package/dist/_browser-chunks/chunk-YI2IBIQS.js +7 -0
  138. package/dist/_browser-chunks/chunk-YTIT5NA5.js +1966 -0
  139. package/dist/_browser-chunks/chunk-ZEHRUHTA.js +6 -0
  140. package/dist/_browser-chunks/chunk-ZTQ5MEJ5.js +203 -0
  141. package/dist/_browser-chunks/matchers-YLBYSYAF.js +1263 -0
  142. package/dist/_browser-chunks/react-dom-client-4OHE3QDV.js +9 -0
  143. package/dist/_node-chunks/attached-runtime-I2G4WLJI.js +282 -0
  144. package/dist/_node-chunks/builder-manager-VVHYQXCH.js +1661 -0
  145. package/dist/_node-chunks/chunk-2BUPBPFB.js +82 -0
  146. package/dist/_node-chunks/chunk-2DSIDINN.js +884 -0
  147. package/dist/_node-chunks/chunk-2RU7BKEW.js +23 -0
  148. package/dist/_node-chunks/chunk-34EO2PUT.js +26 -0
  149. package/dist/_node-chunks/chunk-3BKIBF5S.js +3008 -0
  150. package/dist/_node-chunks/chunk-3SDUYDXH.js +98 -0
  151. package/dist/_node-chunks/chunk-3T4ZSNPH.js +662 -0
  152. package/dist/_node-chunks/chunk-3W7F2B7P.js +79 -0
  153. package/dist/_node-chunks/chunk-3Y6AAY5H.js +80 -0
  154. package/dist/_node-chunks/chunk-42UWAGPW.js +1193 -0
  155. package/dist/_node-chunks/chunk-4FEANXWU.js +1986 -0
  156. package/dist/_node-chunks/chunk-5DQFEZEA.js +40 -0
  157. package/dist/_node-chunks/chunk-6KEHV53S.js +1218 -0
  158. package/dist/_node-chunks/chunk-6LMWA44H.js +3837 -0
  159. package/dist/_node-chunks/chunk-6YKBRP72.js +20 -0
  160. package/dist/_node-chunks/chunk-7GUDZVRQ.js +110 -0
  161. package/dist/_node-chunks/chunk-B5J7Q7J4.js +21 -0
  162. package/dist/_node-chunks/chunk-BS2WMZMR.js +90 -0
  163. package/dist/_node-chunks/chunk-BSKFCWQD.js +47 -0
  164. package/dist/_node-chunks/chunk-BXVYT7SB.js +36 -0
  165. package/dist/_node-chunks/chunk-CCOTJ4FC.js +688 -0
  166. package/dist/_node-chunks/chunk-CQKMLL5J.js +33 -0
  167. package/dist/_node-chunks/chunk-CXRU72ET.js +63 -0
  168. package/dist/_node-chunks/chunk-DC7DKR5K.js +20 -0
  169. package/dist/_node-chunks/chunk-DHJFTB4K.js +25 -0
  170. package/dist/_node-chunks/chunk-DUR55DJJ.js +1094 -0
  171. package/dist/_node-chunks/chunk-E6YESGLX.js +7032 -0
  172. package/dist/_node-chunks/chunk-EHUNOMDD.js +52345 -0
  173. package/dist/_node-chunks/chunk-ET7PWEO7.js +298 -0
  174. package/dist/_node-chunks/chunk-EWOX7HPJ.js +20 -0
  175. package/dist/_node-chunks/chunk-F3ZFKBHY.js +844 -0
  176. package/dist/_node-chunks/chunk-FK7KGTV7.js +26 -0
  177. package/dist/_node-chunks/chunk-FPZB5OI7.js +35 -0
  178. package/dist/_node-chunks/chunk-FW2HQUBQ.js +25 -0
  179. package/dist/_node-chunks/chunk-FY6UXW6G.js +11 -0
  180. package/dist/_node-chunks/chunk-GEFQN7K3.js +499 -0
  181. package/dist/_node-chunks/chunk-GRBLDJCR.js +989 -0
  182. package/dist/_node-chunks/chunk-H32DYT6P.js +87 -0
  183. package/dist/_node-chunks/chunk-H4PPVMP5.js +23 -0
  184. package/dist/_node-chunks/chunk-HMP2G23X.js +25 -0
  185. package/dist/_node-chunks/chunk-ICPBH3E7.js +59 -0
  186. package/dist/_node-chunks/chunk-IDEL2J23.js +23 -0
  187. package/dist/_node-chunks/chunk-IK4FGZLR.js +223 -0
  188. package/dist/_node-chunks/chunk-JDXXX6LB.js +68 -0
  189. package/dist/_node-chunks/chunk-JGGFYIG5.js +5468 -0
  190. package/dist/_node-chunks/chunk-JPAZLYJ3.js +29 -0
  191. package/dist/_node-chunks/chunk-JZOO7GGC.js +48 -0
  192. package/dist/_node-chunks/chunk-KISMCCP5.js +4744 -0
  193. package/dist/_node-chunks/chunk-LCK4ZQKG.js +115 -0
  194. package/dist/_node-chunks/chunk-LO56I6E2.js +132 -0
  195. package/dist/_node-chunks/chunk-LXBD4UL4.js +104 -0
  196. package/dist/_node-chunks/chunk-MA24JW6C.js +7162 -0
  197. package/dist/_node-chunks/chunk-MK2KYAI6.js +5414 -0
  198. package/dist/_node-chunks/chunk-NDWKJ4CL.js +2102 -0
  199. package/dist/_node-chunks/chunk-NIBT7XDZ.js +168 -0
  200. package/dist/_node-chunks/chunk-NPO45IMH.js +33 -0
  201. package/dist/_node-chunks/chunk-OISX4AGQ.js +414 -0
  202. package/dist/_node-chunks/chunk-OUW6R7C3.js +26 -0
  203. package/dist/_node-chunks/chunk-OWNFOGTA.js +194 -0
  204. package/dist/_node-chunks/chunk-Q7QNUM5H.js +49 -0
  205. package/dist/_node-chunks/chunk-QEQLR22M.js +1877 -0
  206. package/dist/_node-chunks/chunk-RRN2V55B.js +45 -0
  207. package/dist/_node-chunks/chunk-RWFIFGO5.js +144 -0
  208. package/dist/_node-chunks/chunk-RXNJDRGO.js +209 -0
  209. package/dist/_node-chunks/chunk-RZMQ7S3L.js +92 -0
  210. package/dist/_node-chunks/chunk-SIEXZVCR.js +51 -0
  211. package/dist/_node-chunks/chunk-SLWQNBGO.js +2034 -0
  212. package/dist/_node-chunks/chunk-SVTBJ7Q3.js +35 -0
  213. package/dist/_node-chunks/chunk-SWO5CDYU.js +32 -0
  214. package/dist/_node-chunks/chunk-TD5PLLQG.js +121 -0
  215. package/dist/_node-chunks/chunk-TEQGGSP7.js +33 -0
  216. package/dist/_node-chunks/chunk-TFCEV2XX.js +155 -0
  217. package/dist/_node-chunks/chunk-TFEWM4E3.js +1073 -0
  218. package/dist/_node-chunks/chunk-TINO74G5.js +21 -0
  219. package/dist/_node-chunks/chunk-TNJIXE37.js +40 -0
  220. package/dist/_node-chunks/chunk-TWI4GVH7.js +19 -0
  221. package/dist/_node-chunks/chunk-U5W53R2J.js +1011 -0
  222. package/dist/_node-chunks/chunk-UBOGWBEA.js +148 -0
  223. package/dist/_node-chunks/chunk-UMUBKI6E.js +3787 -0
  224. package/dist/_node-chunks/chunk-UVINFLGY.js +56 -0
  225. package/dist/_node-chunks/chunk-V2DY426G.js +1133 -0
  226. package/dist/_node-chunks/chunk-VLOXOXXE.js +45 -0
  227. package/dist/_node-chunks/chunk-W4OMYLSP.js +1297 -0
  228. package/dist/_node-chunks/chunk-WAXVSN3O.js +18 -0
  229. package/dist/_node-chunks/chunk-WCULS5TP.js +3767 -0
  230. package/dist/_node-chunks/chunk-WNZ2UMFM.js +153 -0
  231. package/dist/_node-chunks/chunk-WZJF2OUH.js +74 -0
  232. package/dist/_node-chunks/chunk-XGIUVY52.js +611 -0
  233. package/dist/_node-chunks/chunk-XHL2LVBM.js +415 -0
  234. package/dist/_node-chunks/chunk-XI6B6P47.js +59 -0
  235. package/dist/_node-chunks/chunk-XLP2ZKXV.js +60 -0
  236. package/dist/_node-chunks/chunk-YCMRA6RX.js +95 -0
  237. package/dist/_node-chunks/chunk-YZFWBA5L.js +2700 -0
  238. package/dist/_node-chunks/chunk-ZMAMXQKP.js +4731 -0
  239. package/dist/_node-chunks/chunk-ZWBCQ4MJ.js +110 -0
  240. package/dist/_node-chunks/dist-VTSTZKUB.js +16 -0
  241. package/dist/_node-chunks/globby-OEMHPBFY.js +2884 -0
  242. package/dist/_node-chunks/jiti-NFX6UU74.js +3848 -0
  243. package/dist/_node-chunks/lib-MDVARD7W.js +366 -0
  244. package/dist/_node-chunks/local-runtime-NTKIN2QT.js +78 -0
  245. package/dist/_node-chunks/mdx-plugin-MWISDWDQ.js +5680 -0
  246. package/dist/_node-chunks/monorepo-LIRFMQXE.js +121 -0
  247. package/dist/_node-chunks/monorepo-optimized-tests-relaxed-limits-no-story-deletion-CPDW4XTW.js +121 -0
  248. package/dist/_node-chunks/optimized-tests-HDOLR3EY.js +22 -0
  249. package/dist/_node-chunks/pattern-copy-play-EKHIUAU2.js +807 -0
  250. package/dist/_node-chunks/postinstallAddon-GYGMWDL6.js +20 -0
  251. package/dist/_node-chunks/rehype-external-links-BUN3HUCO.js +121 -0
  252. package/dist/_node-chunks/rehype-slug-PLADX223.js +52 -0
  253. package/dist/_node-chunks/relaxed-limits-GBHW6KIQ.js +117 -0
  254. package/dist/_node-chunks/run-KDTIZNSY.js +103 -0
  255. package/dist/_node-chunks/run-NL66VTNR.js +4532 -0
  256. package/dist/_node-chunks/session-id-KIIVOQLR.js +23 -0
  257. package/dist/_node-chunks/setup-MGC7BQO6.js +278 -0
  258. package/dist/_node-chunks/vitest.config.4.template-JH2THZFG.js +54 -0
  259. package/dist/actions/decorator.d.ts +7 -0
  260. package/dist/actions/decorator.js +43 -0
  261. package/dist/actions/index.d.ts +67 -0
  262. package/dist/actions/index.js +28 -0
  263. package/dist/addon-a11y/index.d.ts +52 -0
  264. package/dist/addon-a11y/index.js +16 -0
  265. package/dist/addon-a11y/manager.js +1429 -0
  266. package/dist/addon-a11y/preset.js +18 -0
  267. package/dist/addon-a11y/preview.d.ts +17 -0
  268. package/dist/addon-a11y/preview.js +15 -0
  269. package/dist/addon-docs/blocks.d.ts +1061 -0
  270. package/dist/addon-docs/blocks.js +2461 -0
  271. package/dist/addon-docs/index.d.ts +236 -0
  272. package/dist/addon-docs/index.js +16 -0
  273. package/dist/addon-docs/manager.js +90 -0
  274. package/dist/addon-docs/mdx-react-shim.d.ts +1 -0
  275. package/dist/addon-docs/mdx-react-shim.js +2 -0
  276. package/dist/addon-docs/preset.js +378 -0
  277. package/dist/addon-docs/preview.d.ts +4 -0
  278. package/dist/addon-docs/preview.js +7 -0
  279. package/dist/addon-links/index.d.ts +22 -0
  280. package/dist/addon-links/index.js +20 -0
  281. package/dist/addon-links/manager.js +14 -0
  282. package/dist/addon-links/preview.d.ts +6 -0
  283. package/dist/addon-links/preview.js +9 -0
  284. package/dist/addon-links/react/index.d.ts +25 -0
  285. package/dist/addon-links/react/index.js +52 -0
  286. package/dist/addon-mcp/preset.js +1345 -0
  287. package/dist/addon-mcp/preview.js +29 -0
  288. package/dist/addon-mcp/tools/preview-stories/preview-stories-app-script.js +1153 -0
  289. package/dist/addon-ondevice-actions/index.d.ts +4 -0
  290. package/dist/addon-ondevice-actions/index.js +7 -0
  291. package/dist/addon-ondevice-actions/register.js +7 -0
  292. package/dist/addon-ondevice-controls/index.d.ts +6 -0
  293. package/dist/addon-ondevice-controls/index.js +14 -0
  294. package/dist/addon-ondevice-controls/register.js +10 -0
  295. package/dist/addon-pseudo-states/index.d.ts +35 -0
  296. package/dist/addon-pseudo-states/index.js +15 -0
  297. package/dist/addon-pseudo-states/manager.js +53 -0
  298. package/dist/addon-pseudo-states/preview.d.ts +9 -0
  299. package/dist/addon-pseudo-states/preview.js +10 -0
  300. package/dist/addon-themes/index.d.ts +80 -0
  301. package/dist/addon-themes/index.js +104 -0
  302. package/dist/addon-themes/manager.js +97 -0
  303. package/dist/addon-themes/postinstall.js +33 -0
  304. package/dist/addon-themes/preview.d.ts +6 -0
  305. package/dist/addon-themes/preview.js +8 -0
  306. package/dist/addon-vitest/constants.d.ts +132 -0
  307. package/dist/addon-vitest/constants.js +66 -0
  308. package/dist/addon-vitest/index.d.ts +4 -0
  309. package/dist/addon-vitest/index.js +8 -0
  310. package/dist/addon-vitest/manager.js +665 -0
  311. package/dist/addon-vitest/node/coverage-reporter.js +1284 -0
  312. package/dist/addon-vitest/node/vitest.js +674 -0
  313. package/dist/addon-vitest/postinstall.js +24 -0
  314. package/dist/addon-vitest/preset.js +943 -0
  315. package/dist/addon-vitest/vitest-plugin/global-setup.js +162 -0
  316. package/dist/addon-vitest/vitest-plugin/index.d.ts +56 -0
  317. package/dist/addon-vitest/vitest-plugin/index.js +463 -0
  318. package/dist/addon-vitest/vitest-plugin/setup-file-with-project-annotations.js +9 -0
  319. package/dist/addon-vitest/vitest-plugin/setup-file.browser.4.js +20 -0
  320. package/dist/addon-vitest/vitest-plugin/setup-file.js +50 -0
  321. package/dist/addon-vitest/vitest-plugin/test-utils.js +128 -0
  322. package/dist/babel/index.d.ts +2301 -0
  323. package/dist/babel/index.js +61 -0
  324. package/dist/backgrounds/index.d.ts +6 -0
  325. package/dist/backgrounds/index.js +15 -0
  326. package/dist/bin/core.js +1705 -0
  327. package/dist/bin/dispatcher.js +43 -0
  328. package/dist/bin/loader.js +115 -0
  329. package/dist/builder-vite/index.d.ts +50 -0
  330. package/dist/builder-vite/index.js +245 -0
  331. package/dist/builder-vite/preset.js +27 -0
  332. package/dist/channels/index.d.ts +2 -0
  333. package/dist/channels/index.js +352 -0
  334. package/dist/chunk-B2t1tGRh.d.ts +284 -0
  335. package/dist/chunk-BCoJQE-f.d.ts +602 -0
  336. package/dist/chunk-BGkgZp-H.d.ts +214 -0
  337. package/dist/chunk-BTVrWliM.d.ts +115 -0
  338. package/dist/chunk-BXLImeLy.d.ts +197 -0
  339. package/dist/chunk-BfBzpgct.d.ts +916 -0
  340. package/dist/chunk-Bpi2tz-6.d.ts +511 -0
  341. package/dist/chunk-BxWufQms.d.ts +142 -0
  342. package/dist/chunk-C-bavsOH.d.ts +34 -0
  343. package/dist/chunk-C2p5r3Vt.d.ts +13001 -0
  344. package/dist/chunk-C6PAgHLT.d.ts +12 -0
  345. package/dist/chunk-CMeX4WRe.d.ts +179 -0
  346. package/dist/chunk-Ct9xd6IM.d.ts +65 -0
  347. package/dist/chunk-CwQKNaYL.d.ts +15 -0
  348. package/dist/chunk-D7DwV41f.d.ts +3622 -0
  349. package/dist/chunk-DEVFdzxR.d.ts +253 -0
  350. package/dist/chunk-DaVb55-_.d.ts +124 -0
  351. package/dist/chunk-DgRNfmj_.d.ts +40 -0
  352. package/dist/chunk-DoIGKY33.d.ts +666 -0
  353. package/dist/chunk-Dr3R0DXk.d.ts +40 -0
  354. package/dist/chunk-DtHByo32.d.ts +55 -0
  355. package/dist/chunk-Dw1z1Pki.d.ts +933 -0
  356. package/dist/chunk-DzuY9DXg.d.ts +79 -0
  357. package/dist/chunk-FjDVzZTj.d.ts +62 -0
  358. package/dist/chunk-Kt1tW-D1.d.ts +59 -0
  359. package/dist/chunk-XP8oHzpE.d.ts +6 -0
  360. package/dist/chunk-gCX81nOr.d.ts +61 -0
  361. package/dist/chunk-pcFXCimE.d.ts +741 -0
  362. package/dist/cli/index.d.ts +1174 -0
  363. package/dist/cli/index.js +5613 -0
  364. package/dist/cli/skills/content/index.d.ts +72 -0
  365. package/dist/cli/skills/content/index.js +335 -0
  366. package/dist/cli/tools/sdk/child-host.d.ts +61 -0
  367. package/dist/cli/tools/sdk/child-host.js +131 -0
  368. package/dist/cli/tools/sdk/index.d.ts +137 -0
  369. package/dist/cli/tools/sdk/index.js +44 -0
  370. package/dist/cli-commands/bin/index.js +25 -0
  371. package/dist/client-logger/index.d.ts +31 -0
  372. package/dist/client-logger/index.js +63 -0
  373. package/dist/common/index.d.ts +1103 -0
  374. package/dist/common/index.js +364 -0
  375. package/dist/components/index.d.ts +1924 -0
  376. package/dist/components/index.js +13759 -0
  377. package/dist/core-events/index.d.ts +155 -0
  378. package/dist/core-events/index.js +136 -0
  379. package/dist/core-server/index.d.ts +2200 -0
  380. package/dist/core-server/index.js +4165 -0
  381. package/dist/core-server/presets/common-manager.css +170 -0
  382. package/dist/core-server/presets/common-manager.js +4168 -0
  383. package/dist/core-server/presets/common-override-preset.js +81 -0
  384. package/dist/core-server/presets/common-preset.js +2187 -0
  385. package/dist/create/bin/index.js +23 -0
  386. package/dist/create/index.js +25 -0
  387. package/dist/csf/csf-utils.d.ts +2 -0
  388. package/dist/csf/csf-utils.js +19 -0
  389. package/dist/csf/index.d.ts +7 -0
  390. package/dist/csf/index.js +2142 -0
  391. package/dist/csf-tools/index.d.ts +1157 -0
  392. package/dist/csf-tools/index.js +736 -0
  393. package/dist/docs-tools/index.d.ts +197 -0
  394. package/dist/docs-tools/index.js +61 -0
  395. package/dist/highlight/index.d.ts +10 -0
  396. package/dist/highlight/index.js +15 -0
  397. package/dist/instrumenter/index.d.ts +113 -0
  398. package/dist/instrumenter/index.js +2595 -0
  399. package/dist/manager/_manager-chunks/globals-runtime-8HkdnU2F.js +6144 -0
  400. package/dist/manager/_manager-chunks/globals-runtime-BIKBO23x.js +3389 -0
  401. package/dist/manager/_manager-chunks/globals-runtime-BdGkqNEt.js +45 -0
  402. package/dist/manager/_manager-chunks/globals-runtime-BmphMP6z.js +1190 -0
  403. package/dist/manager/_manager-chunks/globals-runtime-BvM-NY2g.js +13307 -0
  404. package/dist/manager/_manager-chunks/globals-runtime-C02fvgcd.js +9243 -0
  405. package/dist/manager/_manager-chunks/globals-runtime-DkAPXCvc.js +9766 -0
  406. package/dist/manager/_manager-chunks/globals-runtime-DpNYC-qi.js +5564 -0
  407. package/dist/manager/_manager-chunks/globals-runtime-DtcOnYHR.js +5357 -0
  408. package/dist/manager/_manager-chunks/globals-runtime-DwFqpqya.js +722 -0
  409. package/dist/manager/_manager-chunks/globals-runtime-FC201B7s.js +6837 -0
  410. package/dist/manager/_manager-chunks/globals-runtime-Rp_zjGnh.js +121 -0
  411. package/dist/manager/_manager-chunks/globals-runtime-ZHrQFa3-.js +10463 -0
  412. package/dist/manager/_manager-chunks/globals-runtime-eLPTIfX-.js +7759 -0
  413. package/dist/manager/_manager-chunks/globals-runtime-qKvCZHFY.js +4468 -0
  414. package/dist/manager/_manager-chunks/globals-runtime-sGpNlIJ1.js +5102 -0
  415. package/dist/manager/_manager-chunks/runtime-B1L9TH89.js +452 -0
  416. package/dist/manager/_manager-chunks/runtime-BK0zF7FN.js +22 -0
  417. package/dist/manager/_manager-chunks/runtime-BhkT2CXl.js +1408 -0
  418. package/dist/manager/_manager-chunks/runtime-Bly6WJLN.js +998 -0
  419. package/dist/manager/_manager-chunks/runtime-D0UOWx0U.js +979 -0
  420. package/dist/manager/_manager-chunks/runtime-D94Vq3oR.js +4014 -0
  421. package/dist/manager/_manager-chunks/runtime-DMig8mT7.js +77 -0
  422. package/dist/manager/_manager-chunks/runtime-EITvVbkG.js +46 -0
  423. package/dist/manager/_manager-chunks/runtime-cp5pazY2.js +8936 -0
  424. package/dist/manager/_manager-chunks/runtime-eDVAYF7N.js +6860 -0
  425. package/dist/manager/_manager-chunks/runtime-i-PDAHLR.js +2493 -0
  426. package/dist/manager/globals-runtime.js +2 -0
  427. package/dist/manager/globals.d.ts +23 -0
  428. package/dist/manager/globals.js +26 -0
  429. package/dist/manager/manager-stores.d.ts +2 -0
  430. package/dist/manager/manager-stores.js +19 -0
  431. package/dist/manager/runtime.js +2 -0
  432. package/dist/manager-api/index.d.ts +2 -0
  433. package/dist/manager-api/index.js +3257 -0
  434. package/dist/manager-errors.d.ts +89 -0
  435. package/dist/manager-errors.js +20 -0
  436. package/dist/mcp/index.d.ts +270 -0
  437. package/dist/mcp/index.js +305 -0
  438. package/dist/mocking-utils/index.d.ts +689 -0
  439. package/dist/mocking-utils/index.js +521 -0
  440. package/dist/mocking-utils/mocker-runtime.js +1254 -0
  441. package/dist/nextjs-vite/config/preview.js +3 -0
  442. package/dist/nextjs-vite/export-mocks/cache/index.d.ts +25 -0
  443. package/dist/nextjs-vite/export-mocks/cache/index.js +29 -0
  444. package/dist/nextjs-vite/export-mocks/headers/index.d.ts +37 -0
  445. package/dist/nextjs-vite/export-mocks/headers/index.js +54 -0
  446. package/dist/nextjs-vite/export-mocks/link/index.d.ts +9 -0
  447. package/dist/nextjs-vite/export-mocks/link/index.js +59 -0
  448. package/dist/nextjs-vite/export-mocks/navigation/index.d.ts +28 -0
  449. package/dist/nextjs-vite/export-mocks/navigation/index.js +58 -0
  450. package/dist/nextjs-vite/export-mocks/router/index.d.ts +34 -0
  451. package/dist/nextjs-vite/export-mocks/router/index.js +63 -0
  452. package/dist/nextjs-vite/index.d.ts +92 -0
  453. package/dist/nextjs-vite/index.js +58 -0
  454. package/dist/nextjs-vite/node/index.d.ts +6 -0
  455. package/dist/nextjs-vite/node/index.js +20 -0
  456. package/dist/nextjs-vite/preset.js +648 -0
  457. package/dist/nextjs-vite/preview.d.ts +20 -0
  458. package/dist/nextjs-vite/preview.js +11 -0
  459. package/dist/nextjs-vite/vite-plugin/index.d.ts +6 -0
  460. package/dist/nextjs-vite/vite-plugin/index.js +19 -0
  461. package/dist/nextjs-vite-plugin/index.d.ts +28 -0
  462. package/dist/nextjs-vite-plugin/index.js +923 -0
  463. package/dist/nextjs-vite-plugin/mocks/storybook.global.js +29 -0
  464. package/dist/nextjs-vite-plugin/plugins/next-image/alias/image-context.js +8 -0
  465. package/dist/nextjs-vite-plugin/plugins/next-image/alias/image-default-loader.js +23 -0
  466. package/dist/nextjs-vite-plugin/plugins/next-image/alias/next-image.js +28 -0
  467. package/dist/nextjs-vite-plugin/plugins/next-image/alias/next-legacy-image.js +17 -0
  468. package/dist/nextjs-vite-plugin/plugins/next-mocks/alias/cache/index.js +29 -0
  469. package/dist/nextjs-vite-plugin/plugins/next-mocks/alias/dynamic/index.js +40 -0
  470. package/dist/nextjs-vite-plugin/plugins/next-mocks/alias/headers/index.js +55 -0
  471. package/dist/nextjs-vite-plugin/plugins/next-mocks/alias/link/index.js +63 -0
  472. package/dist/nextjs-vite-plugin/plugins/next-mocks/alias/navigation/index.js +71 -0
  473. package/dist/nextjs-vite-plugin/plugins/next-mocks/alias/router/index.js +74 -0
  474. package/dist/nextjs-vite-plugin/plugins/next-mocks/alias/rsc/server-only.js +7 -0
  475. package/dist/nextjs-vite-plugin/plugins/next-mocks/alias/safe-stable-stringify/index.js +13 -0
  476. package/dist/nextjs-vite-plugin/plugins/next-mocks/compatibility/draft-mode.compat.js +7 -0
  477. package/dist/node-logger/index.d.ts +495 -0
  478. package/dist/node-logger/index.js +42 -0
  479. package/dist/oxc-parser/index.d.ts +99 -0
  480. package/dist/oxc-parser/index.js +275 -0
  481. package/dist/oxc-parser/worker.js +37 -0
  482. package/dist/preview/_chunks/runtime-BIzIdDbb.js +10263 -0
  483. package/dist/preview/_chunks/runtime-BTPtVY1p.js +1102 -0
  484. package/dist/preview/_chunks/runtime-BZSnICCg.js +8484 -0
  485. package/dist/preview/_chunks/runtime-BdGkqNEt.js +45 -0
  486. package/dist/preview/_chunks/runtime-BwSxqk3t.js +63 -0
  487. package/dist/preview/_chunks/runtime-CqHxptiK.js +6143 -0
  488. package/dist/preview/_chunks/runtime-CsV4HZPV.js +5064 -0
  489. package/dist/preview/_chunks/runtime-CxZK_Ln3.js +284 -0
  490. package/dist/preview/_chunks/runtime-DZToXfvO.js +9767 -0
  491. package/dist/preview/_chunks/runtime-DrTjJkPY.js +3872 -0
  492. package/dist/preview/_chunks/runtime-DuHdxMFA.js +387 -0
  493. package/dist/preview/_chunks/runtime-iXdo8CR8.js +3635 -0
  494. package/dist/preview/_chunks/runtime-q3wt0e_N.js +6838 -0
  495. package/dist/preview/globals.d.ts +16 -0
  496. package/dist/preview/globals.js +20 -0
  497. package/dist/preview/runtime.js +6 -0
  498. package/dist/preview-api/index.d.ts +4 -0
  499. package/dist/preview-api/index.js +147 -0
  500. package/dist/preview-errors.d.ts +186 -0
  501. package/dist/preview-errors.js +56 -0
  502. package/dist/react/docgen/docgen-worker.js +38 -0
  503. package/dist/react/entry-preview-argtypes.js +9 -0
  504. package/dist/react/entry-preview-docs.js +12 -0
  505. package/dist/react/entry-preview-rsc.js +11 -0
  506. package/dist/react/entry-preview.js +21 -0
  507. package/dist/react/index.d.ts +119 -0
  508. package/dist/react/index.js +26 -0
  509. package/dist/react/preset.js +301 -0
  510. package/dist/react/preview.d.ts +2 -0
  511. package/dist/react/preview.js +11 -0
  512. package/dist/react-native/bin/get-stories.js +34 -0
  513. package/dist/react-native/index.d.ts +160 -0
  514. package/dist/react-native/index.js +1547 -0
  515. package/dist/react-native/metro/node.d.ts +83 -0
  516. package/dist/react-native/metro/node.js +21 -0
  517. package/dist/react-native/metro/withStorybook.d.ts +2269 -0
  518. package/dist/react-native/metro/withStorybook.js +138 -0
  519. package/dist/react-native/preview.d.ts +6 -0
  520. package/dist/react-native/preview.js +20 -0
  521. package/dist/react-native/scripts/generate.d.ts +22 -0
  522. package/dist/react-native/scripts/generate.js +18 -0
  523. package/dist/react-native/stub.js +20 -0
  524. package/dist/react-native-theming/index.d.ts +175 -0
  525. package/dist/react-native-theming/index.js +2591 -0
  526. package/dist/react-native-ui/index.d.ts +130 -0
  527. package/dist/react-native-ui/index.js +1448 -0
  528. package/dist/react-native-ui-common/index.d.ts +230 -0
  529. package/dist/react-native-ui-common/index.js +514 -0
  530. package/dist/react-vite/index.d.ts +4 -0
  531. package/dist/react-vite/index.js +8 -0
  532. package/dist/react-vite/node/index.d.ts +6 -0
  533. package/dist/react-vite/node/index.js +20 -0
  534. package/dist/react-vite/preset.d.ts +6 -0
  535. package/dist/react-vite/preset.js +21 -0
  536. package/dist/router/index.d.ts +141 -0
  537. package/dist/router/index.js +1217 -0
  538. package/dist/server-errors.d.ts +2 -0
  539. package/dist/server-errors.js +149 -0
  540. package/dist/shared/open-service/index.d.ts +3 -0
  541. package/dist/shared/open-service/index.js +115 -0
  542. package/dist/shared/open-service/services/docgen/worker/docgen-worker.js +75 -0
  543. package/dist/shared/open-service/toolsets/docs/public.d.ts +1296 -0
  544. package/dist/shared/open-service/toolsets/docs/public.js +991 -0
  545. package/dist/telemetry/index.d.ts +314 -0
  546. package/dist/telemetry/index.js +103 -0
  547. package/dist/test/index.d.ts +158 -0
  548. package/dist/test/index.js +19421 -0
  549. package/dist/theming/create.d.ts +15 -0
  550. package/dist/theming/create.js +11 -0
  551. package/dist/theming/index.d.ts +54 -0
  552. package/dist/theming/index.js +511 -0
  553. package/dist/types/index.d.ts +2 -0
  554. package/dist/types/index.js +48 -0
  555. package/dist/viewport/index.d.ts +275 -0
  556. package/dist/viewport/index.js +21 -0
  557. package/package.json +1054 -4
  558. package/template/nextjs-vite/cli/.eslintrc.json +6 -0
  559. package/template/nextjs-vite/cli/js/Button.jsx +42 -0
  560. package/template/nextjs-vite/cli/js/Button.stories.js +49 -0
  561. package/template/nextjs-vite/cli/js/Configure.mdx +470 -0
  562. package/template/nextjs-vite/cli/js/Header.jsx +58 -0
  563. package/template/nextjs-vite/cli/js/Header.stories.js +30 -0
  564. package/template/nextjs-vite/cli/js/Page.jsx +68 -0
  565. package/template/nextjs-vite/cli/js/Page.stories.js +28 -0
  566. package/template/nextjs-vite/cli/ts/Button.stories.ts +54 -0
  567. package/template/nextjs-vite/cli/ts/Button.tsx +39 -0
  568. package/template/nextjs-vite/cli/ts/Configure.mdx +446 -0
  569. package/template/nextjs-vite/cli/ts/Header.stories.ts +34 -0
  570. package/template/nextjs-vite/cli/ts/Header.tsx +54 -0
  571. package/template/nextjs-vite/cli/ts/Page.stories.ts +33 -0
  572. package/template/nextjs-vite/cli/ts/Page.tsx +73 -0
  573. package/template/react/cli/.eslintrc.json +5 -0
  574. package/template/react/cli/js/Button.jsx +39 -0
  575. package/template/react/cli/js/Button.stories.js +49 -0
  576. package/template/react/cli/js/Header.jsx +56 -0
  577. package/template/react/cli/js/Header.stories.js +29 -0
  578. package/template/react/cli/js/Page.jsx +69 -0
  579. package/template/react/cli/js/Page.stories.js +28 -0
  580. package/template/react/cli/ts/Button.stories.ts +54 -0
  581. package/template/react/cli/ts/Button.tsx +37 -0
  582. package/template/react/cli/ts/Header.stories.ts +34 -0
  583. package/template/react/cli/ts/Header.tsx +56 -0
  584. package/template/react/cli/ts/Page.stories.ts +33 -0
  585. package/template/react/cli/ts/Page.tsx +73 -0
  586. package/template/react-vite/cli/.eslintrc.json +5 -0
  587. package/template/react-vite/cli/js/Button.jsx +39 -0
  588. package/template/react-vite/cli/js/Button.stories.js +49 -0
  589. package/template/react-vite/cli/js/Header.jsx +56 -0
  590. package/template/react-vite/cli/js/Header.stories.js +29 -0
  591. package/template/react-vite/cli/js/Page.jsx +69 -0
  592. package/template/react-vite/cli/js/Page.stories.js +28 -0
  593. package/template/react-vite/cli/ts/Button.stories.ts +54 -0
  594. package/template/react-vite/cli/ts/Button.tsx +37 -0
  595. package/template/react-vite/cli/ts/Header.stories.ts +34 -0
  596. package/template/react-vite/cli/ts/Header.tsx +56 -0
  597. package/template/react-vite/cli/ts/Page.stories.ts +33 -0
  598. package/template/react-vite/cli/ts/Page.tsx +73 -0
@@ -0,0 +1,1254 @@
1
+ // ../../node_modules/@vitest/mocker/dist/chunk-registry.js
2
+ var MockerRegistry = class {
3
+ registryByUrl = /* @__PURE__ */ new Map();
4
+ registryById = /* @__PURE__ */ new Map();
5
+ clear() {
6
+ this.registryByUrl.clear(), this.registryById.clear();
7
+ }
8
+ keys() {
9
+ return this.registryByUrl.keys();
10
+ }
11
+ add(mock) {
12
+ this.registryByUrl.set(mock.url, mock), this.registryById.set(mock.id, mock);
13
+ }
14
+ register(typeOrEvent, raw, id, url, factoryOrRedirect) {
15
+ let type = typeof typeOrEvent == "object" ? typeOrEvent.type : typeOrEvent;
16
+ if (typeof typeOrEvent == "object") {
17
+ let event = typeOrEvent;
18
+ if (event instanceof AutomockedModule || event instanceof AutospiedModule || event instanceof ManualMockedModule || event instanceof RedirectedModule)
19
+ throw new TypeError(`[vitest] Cannot register a mock that is already defined. Expected a JSON representation from \`MockedModule.toJSON\`, instead got "${event.type}". Use "registry.add()" to update a mock instead.`);
20
+ if (event.type === "automock") {
21
+ let module = AutomockedModule.fromJSON(event);
22
+ return this.add(module), module;
23
+ } else if (event.type === "autospy") {
24
+ let module = AutospiedModule.fromJSON(event);
25
+ return this.add(module), module;
26
+ } else if (event.type === "redirect") {
27
+ let module = RedirectedModule.fromJSON(event);
28
+ return this.add(module), module;
29
+ } else throw event.type === "manual" ? new Error("Cannot set serialized manual mock. Define a factory function manually with `ManualMockedModule.fromJSON()`.") : new Error(`Unknown mock type: ${event.type}`);
30
+ }
31
+ if (typeof raw != "string")
32
+ throw new TypeError("[vitest] Mocks require a raw string.");
33
+ if (typeof url != "string")
34
+ throw new TypeError("[vitest] Mocks require a url string.");
35
+ if (typeof id != "string")
36
+ throw new TypeError("[vitest] Mocks require an id string.");
37
+ if (type === "manual") {
38
+ if (typeof factoryOrRedirect != "function")
39
+ throw new TypeError("[vitest] Manual mocks require a factory function.");
40
+ let mock = new ManualMockedModule(raw, id, url, factoryOrRedirect);
41
+ return this.add(mock), mock;
42
+ } else if (type === "automock" || type === "autospy") {
43
+ let mock = type === "automock" ? new AutomockedModule(raw, id, url) : new AutospiedModule(raw, id, url);
44
+ return this.add(mock), mock;
45
+ } else if (type === "redirect") {
46
+ if (typeof factoryOrRedirect != "string")
47
+ throw new TypeError("[vitest] Redirect mocks require a redirect string.");
48
+ let mock = new RedirectedModule(raw, id, url, factoryOrRedirect);
49
+ return this.add(mock), mock;
50
+ } else
51
+ throw new Error(`[vitest] Unknown mock type: ${type}`);
52
+ }
53
+ delete(id) {
54
+ this.registryByUrl.delete(id);
55
+ }
56
+ get(id) {
57
+ return this.registryByUrl.get(id);
58
+ }
59
+ getById(id) {
60
+ return this.registryById.get(id);
61
+ }
62
+ has(id) {
63
+ return this.registryByUrl.has(id);
64
+ }
65
+ }, AutomockedModule = class {
66
+ type = "automock";
67
+ constructor(raw, id, url) {
68
+ this.raw = raw, this.id = id, this.url = url;
69
+ }
70
+ static fromJSON(data) {
71
+ return new AutospiedModule(data.raw, data.id, data.url);
72
+ }
73
+ toJSON() {
74
+ return {
75
+ type: this.type,
76
+ url: this.url,
77
+ raw: this.raw,
78
+ id: this.id
79
+ };
80
+ }
81
+ }, AutospiedModule = class _AutospiedModule {
82
+ type = "autospy";
83
+ constructor(raw, id, url) {
84
+ this.raw = raw, this.id = id, this.url = url;
85
+ }
86
+ static fromJSON(data) {
87
+ return new _AutospiedModule(data.raw, data.id, data.url);
88
+ }
89
+ toJSON() {
90
+ return {
91
+ type: this.type,
92
+ url: this.url,
93
+ id: this.id,
94
+ raw: this.raw
95
+ };
96
+ }
97
+ }, RedirectedModule = class _RedirectedModule {
98
+ type = "redirect";
99
+ constructor(raw, id, url, redirect) {
100
+ this.raw = raw, this.id = id, this.url = url, this.redirect = redirect;
101
+ }
102
+ static fromJSON(data) {
103
+ return new _RedirectedModule(data.raw, data.id, data.url, data.redirect);
104
+ }
105
+ toJSON() {
106
+ return {
107
+ type: this.type,
108
+ url: this.url,
109
+ raw: this.raw,
110
+ id: this.id,
111
+ redirect: this.redirect
112
+ };
113
+ }
114
+ }, ManualMockedModule = class _ManualMockedModule {
115
+ cache;
116
+ type = "manual";
117
+ constructor(raw, id, url, factory) {
118
+ this.raw = raw, this.id = id, this.url = url, this.factory = factory;
119
+ }
120
+ async resolve() {
121
+ if (this.cache)
122
+ return this.cache;
123
+ let exports;
124
+ try {
125
+ exports = await this.factory();
126
+ } catch (err) {
127
+ let vitestError = new Error('[vitest] There was an error when mocking a module. If you are using "vi.mock" factory, make sure there are no top level variables inside, since this call is hoisted to top of the file. Read more: https://vitest.dev/api/vi.html#vi-mock');
128
+ throw vitestError.cause = err, vitestError;
129
+ }
130
+ if (exports === null || typeof exports != "object" || Array.isArray(exports))
131
+ throw new TypeError(`[vitest] vi.mock("${this.raw}", factory?: () => unknown) is not returning an object. Did you mean to return an object with a "default" key?`);
132
+ return this.cache = exports;
133
+ }
134
+ static fromJSON(data, factory) {
135
+ return new _ManualMockedModule(data.raw, data.id, data.url, factory);
136
+ }
137
+ toJSON() {
138
+ return {
139
+ type: this.type,
140
+ url: this.url,
141
+ id: this.id,
142
+ raw: this.raw
143
+ };
144
+ }
145
+ };
146
+
147
+ // ../../node_modules/@vitest/mocker/dist/index.js
148
+ function mockObject(options, object, mockExports = {}) {
149
+ let finalizers = new Array(), refs = new RefTracker(), define = (container, key, value) => {
150
+ try {
151
+ return container[key] = value, !0;
152
+ } catch {
153
+ return !1;
154
+ }
155
+ }, mockPropertiesOf = (container, newContainer) => {
156
+ let containerType = getType(container), isModule = containerType === "Module" || !!container.__esModule;
157
+ for (let { key: property, descriptor } of getAllMockableProperties(container, isModule, options.globalConstructors)) {
158
+ if (!isModule && descriptor.get) {
159
+ try {
160
+ Object.defineProperty(newContainer, property, descriptor);
161
+ } catch {
162
+ }
163
+ continue;
164
+ }
165
+ if (isSpecialProp(property, containerType))
166
+ continue;
167
+ let value = container[property], refId = refs.getId(value);
168
+ if (refId !== void 0) {
169
+ finalizers.push(() => define(newContainer, property, refs.getMockedValue(refId)));
170
+ continue;
171
+ }
172
+ let type = getType(value);
173
+ if (Array.isArray(value)) {
174
+ define(newContainer, property, []);
175
+ continue;
176
+ }
177
+ let isFunction = type.includes("Function") && typeof value == "function";
178
+ if ((!isFunction || value._isMockFunction) && type !== "Object" && type !== "Module") {
179
+ define(newContainer, property, value);
180
+ continue;
181
+ }
182
+ if (define(newContainer, property, isFunction ? value : {})) {
183
+ if (isFunction) {
184
+ let mockFunction = function() {
185
+ if (this instanceof newContainer[property])
186
+ for (let { key, descriptor: descriptor2 } of getAllMockableProperties(this, !1, options.globalConstructors)) {
187
+ if (descriptor2.get)
188
+ continue;
189
+ let value2 = this[key];
190
+ if (getType(value2).includes("Function") && typeof value2 == "function") {
191
+ let original = this[key], mock2 = spyOn(this, key).mockImplementation(original), origMockReset = mock2.mockReset;
192
+ mock2.mockRestore = mock2.mockReset = () => (origMockReset.call(mock2), mock2.mockImplementation(original), mock2);
193
+ }
194
+ }
195
+ };
196
+ if (!options.spyOn)
197
+ throw new Error("[@vitest/mocker] `spyOn` is not defined. This is a Vitest error. Please open a new issue with reproduction.");
198
+ let spyOn = options.spyOn, mock = spyOn(newContainer, property);
199
+ if (options.type === "automock") {
200
+ mock.mockImplementation(mockFunction);
201
+ let origMockReset = mock.mockReset;
202
+ mock.mockRestore = mock.mockReset = () => (origMockReset.call(mock), mock.mockImplementation(mockFunction), mock);
203
+ }
204
+ Object.defineProperty(newContainer[property], "length", { value: 0 });
205
+ }
206
+ refs.track(value, newContainer[property]), mockPropertiesOf(value, newContainer[property]);
207
+ }
208
+ }
209
+ }, mockedObject = mockExports;
210
+ mockPropertiesOf(object, mockedObject);
211
+ for (let finalizer of finalizers)
212
+ finalizer();
213
+ return mockedObject;
214
+ }
215
+ var RefTracker = class {
216
+ idMap = /* @__PURE__ */ new Map();
217
+ mockedValueMap = /* @__PURE__ */ new Map();
218
+ getId(value) {
219
+ return this.idMap.get(value);
220
+ }
221
+ getMockedValue(id) {
222
+ return this.mockedValueMap.get(id);
223
+ }
224
+ track(originalValue, mockedValue) {
225
+ let newId = this.idMap.size;
226
+ return this.idMap.set(originalValue, newId), this.mockedValueMap.set(newId, mockedValue), newId;
227
+ }
228
+ };
229
+ function getType(value) {
230
+ return Object.prototype.toString.apply(value).slice(8, -1);
231
+ }
232
+ function isSpecialProp(prop, parentType) {
233
+ return parentType.includes("Function") && typeof prop == "string" && [
234
+ "arguments",
235
+ "callee",
236
+ "caller",
237
+ "length",
238
+ "name"
239
+ ].includes(prop);
240
+ }
241
+ function getAllMockableProperties(obj, isModule, constructors) {
242
+ let { Map: Map2, Object: Object2, Function: Function2, RegExp: RegExp2, Array: Array2 } = constructors, allProps = new Map2(), curr = obj;
243
+ do {
244
+ if (curr === Object2.prototype || curr === Function2.prototype || curr === RegExp2.prototype)
245
+ break;
246
+ collectOwnProperties(curr, (key) => {
247
+ let descriptor = Object2.getOwnPropertyDescriptor(curr, key);
248
+ descriptor && allProps.set(key, {
249
+ key,
250
+ descriptor
251
+ });
252
+ });
253
+ } while (curr = Object2.getPrototypeOf(curr));
254
+ if (isModule && !allProps.has("default") && "default" in obj) {
255
+ let descriptor = Object2.getOwnPropertyDescriptor(obj, "default");
256
+ descriptor && allProps.set("default", {
257
+ key: "default",
258
+ descriptor
259
+ });
260
+ }
261
+ return Array2.from(allProps.values());
262
+ }
263
+ function collectOwnProperties(obj, collector) {
264
+ let collect = typeof collector == "function" ? collector : (key) => collector.add(key);
265
+ Object.getOwnPropertyNames(obj).forEach(collect), Object.getOwnPropertySymbols(obj).forEach(collect);
266
+ }
267
+
268
+ // ../../node_modules/@vitest/mocker/dist/chunk-pathe.M-eThtNZ.js
269
+ var _DRIVE_LETTER_START_RE = /^[A-Za-z]:\//;
270
+ function normalizeWindowsPath(input = "") {
271
+ return input && input.replace(/\\/g, "/").replace(_DRIVE_LETTER_START_RE, (r) => r.toUpperCase());
272
+ }
273
+ var _UNC_REGEX = /^[/\\]{2}/, _IS_ABSOLUTE_RE = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/, _DRIVE_LETTER_RE = /^[A-Za-z]:$/, _EXTNAME_RE = /.(\.[^./]+|\.)$/, normalize = function(path) {
274
+ if (path.length === 0)
275
+ return ".";
276
+ path = normalizeWindowsPath(path);
277
+ let isUNCPath = path.match(_UNC_REGEX), isPathAbsolute = isAbsolute(path), trailingSeparator = path[path.length - 1] === "/";
278
+ return path = normalizeString(path, !isPathAbsolute), path.length === 0 ? isPathAbsolute ? "/" : trailingSeparator ? "./" : "." : (trailingSeparator && (path += "/"), _DRIVE_LETTER_RE.test(path) && (path += "/"), isUNCPath ? isPathAbsolute ? `//${path}` : `//./${path}` : isPathAbsolute && !isAbsolute(path) ? `/${path}` : path);
279
+ }, join = function(...segments) {
280
+ let path = "";
281
+ for (let seg of segments)
282
+ if (seg)
283
+ if (path.length > 0) {
284
+ let pathTrailing = path[path.length - 1] === "/", segLeading = seg[0] === "/";
285
+ pathTrailing && segLeading ? path += seg.slice(1) : path += pathTrailing || segLeading ? seg : `/${seg}`;
286
+ } else
287
+ path += seg;
288
+ return normalize(path);
289
+ };
290
+ function normalizeString(path, allowAboveRoot) {
291
+ let res = "", lastSegmentLength = 0, lastSlash = -1, dots = 0, char = null;
292
+ for (let index2 = 0; index2 <= path.length; ++index2) {
293
+ if (index2 < path.length)
294
+ char = path[index2];
295
+ else {
296
+ if (char === "/")
297
+ break;
298
+ char = "/";
299
+ }
300
+ if (char === "/") {
301
+ if (!(lastSlash === index2 - 1 || dots === 1)) if (dots === 2) {
302
+ if (res.length < 2 || lastSegmentLength !== 2 || res[res.length - 1] !== "." || res[res.length - 2] !== ".") {
303
+ if (res.length > 2) {
304
+ let lastSlashIndex = res.lastIndexOf("/");
305
+ lastSlashIndex === -1 ? (res = "", lastSegmentLength = 0) : (res = res.slice(0, lastSlashIndex), lastSegmentLength = res.length - 1 - res.lastIndexOf("/")), lastSlash = index2, dots = 0;
306
+ continue;
307
+ } else if (res.length > 0) {
308
+ res = "", lastSegmentLength = 0, lastSlash = index2, dots = 0;
309
+ continue;
310
+ }
311
+ }
312
+ allowAboveRoot && (res += res.length > 0 ? "/.." : "..", lastSegmentLength = 2);
313
+ } else
314
+ res.length > 0 ? res += `/${path.slice(lastSlash + 1, index2)}` : res = path.slice(lastSlash + 1, index2), lastSegmentLength = index2 - lastSlash - 1;
315
+ lastSlash = index2, dots = 0;
316
+ } else char === "." && dots !== -1 ? ++dots : dots = -1;
317
+ }
318
+ return res;
319
+ }
320
+ var isAbsolute = function(p2) {
321
+ return _IS_ABSOLUTE_RE.test(p2);
322
+ }, extname = function(p2) {
323
+ if (p2 === "..") return "";
324
+ let match = _EXTNAME_RE.exec(normalizeWindowsPath(p2));
325
+ return match && match[1] || "";
326
+ };
327
+
328
+ // ../../node_modules/@vitest/mocker/dist/chunk-mocker.js
329
+ var f = {
330
+ reset: [0, 0],
331
+ bold: [1, 22, "\x1B[22m\x1B[1m"],
332
+ dim: [2, 22, "\x1B[22m\x1B[2m"],
333
+ italic: [3, 23],
334
+ underline: [4, 24],
335
+ inverse: [7, 27],
336
+ hidden: [8, 28],
337
+ strikethrough: [9, 29],
338
+ black: [30, 39],
339
+ red: [31, 39],
340
+ green: [32, 39],
341
+ yellow: [33, 39],
342
+ blue: [34, 39],
343
+ magenta: [35, 39],
344
+ cyan: [36, 39],
345
+ white: [37, 39],
346
+ gray: [90, 39],
347
+ bgBlack: [40, 49],
348
+ bgRed: [41, 49],
349
+ bgGreen: [42, 49],
350
+ bgYellow: [43, 49],
351
+ bgBlue: [44, 49],
352
+ bgMagenta: [45, 49],
353
+ bgCyan: [46, 49],
354
+ bgWhite: [47, 49],
355
+ blackBright: [90, 39],
356
+ redBright: [91, 39],
357
+ greenBright: [92, 39],
358
+ yellowBright: [93, 39],
359
+ blueBright: [94, 39],
360
+ magentaBright: [95, 39],
361
+ cyanBright: [96, 39],
362
+ whiteBright: [97, 39],
363
+ bgBlackBright: [100, 49],
364
+ bgRedBright: [101, 49],
365
+ bgGreenBright: [102, 49],
366
+ bgYellowBright: [103, 49],
367
+ bgBlueBright: [104, 49],
368
+ bgMagentaBright: [105, 49],
369
+ bgCyanBright: [106, 49],
370
+ bgWhiteBright: [107, 49]
371
+ }, h = Object.entries(f);
372
+ function a(n) {
373
+ return String(n);
374
+ }
375
+ a.open = "";
376
+ a.close = "";
377
+ function C(n = !1) {
378
+ let e = typeof process < "u" ? process : void 0, i = e?.env || {}, g = e?.argv || [];
379
+ return !("NO_COLOR" in i || g.includes("--no-color")) && ("FORCE_COLOR" in i || g.includes("--color") || e?.platform === "win32" || n && i.TERM !== "dumb" || "CI" in i) || typeof window < "u" && !!window.chrome;
380
+ }
381
+ function p(n = !1) {
382
+ let e = C(n), i = (r, t, c, o) => {
383
+ let l = "", s = 0;
384
+ do
385
+ l += r.substring(s, o) + c, s = o + t.length, o = r.indexOf(t, s);
386
+ while (~o);
387
+ return l + r.substring(s);
388
+ }, g = (r, t, c = r) => {
389
+ let o = (l) => {
390
+ let s = String(l), b = s.indexOf(t, r.length);
391
+ return ~b ? r + i(s, t, c, b) + t : r + s + t;
392
+ };
393
+ return o.open = r, o.close = t, o;
394
+ }, u = {
395
+ isColorSupported: e
396
+ }, d = (r) => `\x1B[${r}m`;
397
+ for (let [r, t] of h)
398
+ u[r] = e ? g(
399
+ d(t[0]),
400
+ d(t[1]),
401
+ t[2]
402
+ ) : a;
403
+ return u;
404
+ }
405
+ p();
406
+ function _mergeNamespaces(n, m) {
407
+ return m.forEach(function(e) {
408
+ e && typeof e != "string" && !Array.isArray(e) && Object.keys(e).forEach(function(k) {
409
+ if (k !== "default" && !(k in n)) {
410
+ var d = Object.getOwnPropertyDescriptor(e, k);
411
+ Object.defineProperty(n, k, d.get ? d : {
412
+ enumerable: !0,
413
+ get: function() {
414
+ return e[k];
415
+ }
416
+ });
417
+ }
418
+ });
419
+ }), Object.freeze(n);
420
+ }
421
+ function getDefaultExportFromCjs(x) {
422
+ return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x.default : x;
423
+ }
424
+ var reactIs$1 = { exports: {} }, reactIs_production = {};
425
+ var hasRequiredReactIs_production;
426
+ function requireReactIs_production() {
427
+ if (hasRequiredReactIs_production) return reactIs_production;
428
+ hasRequiredReactIs_production = 1;
429
+ var REACT_ELEMENT_TYPE = /* @__PURE__ */ Symbol.for("react.transitional.element"), REACT_PORTAL_TYPE = /* @__PURE__ */ Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = /* @__PURE__ */ Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = /* @__PURE__ */ Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = /* @__PURE__ */ Symbol.for("react.profiler"), REACT_CONSUMER_TYPE = /* @__PURE__ */ Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = /* @__PURE__ */ Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = /* @__PURE__ */ Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = /* @__PURE__ */ Symbol.for("react.suspense"), REACT_SUSPENSE_LIST_TYPE = /* @__PURE__ */ Symbol.for("react.suspense_list"), REACT_MEMO_TYPE = /* @__PURE__ */ Symbol.for("react.memo"), REACT_LAZY_TYPE = /* @__PURE__ */ Symbol.for("react.lazy"), REACT_VIEW_TRANSITION_TYPE = /* @__PURE__ */ Symbol.for("react.view_transition"), REACT_CLIENT_REFERENCE = /* @__PURE__ */ Symbol.for("react.client.reference");
430
+ function typeOf(object) {
431
+ if (typeof object == "object" && object !== null) {
432
+ var $$typeof = object.$$typeof;
433
+ switch ($$typeof) {
434
+ case REACT_ELEMENT_TYPE:
435
+ switch (object = object.type, object) {
436
+ case REACT_FRAGMENT_TYPE:
437
+ case REACT_PROFILER_TYPE:
438
+ case REACT_STRICT_MODE_TYPE:
439
+ case REACT_SUSPENSE_TYPE:
440
+ case REACT_SUSPENSE_LIST_TYPE:
441
+ case REACT_VIEW_TRANSITION_TYPE:
442
+ return object;
443
+ default:
444
+ switch (object = object && object.$$typeof, object) {
445
+ case REACT_CONTEXT_TYPE:
446
+ case REACT_FORWARD_REF_TYPE:
447
+ case REACT_LAZY_TYPE:
448
+ case REACT_MEMO_TYPE:
449
+ return object;
450
+ case REACT_CONSUMER_TYPE:
451
+ return object;
452
+ default:
453
+ return $$typeof;
454
+ }
455
+ }
456
+ case REACT_PORTAL_TYPE:
457
+ return $$typeof;
458
+ }
459
+ }
460
+ }
461
+ return reactIs_production.ContextConsumer = REACT_CONSUMER_TYPE, reactIs_production.ContextProvider = REACT_CONTEXT_TYPE, reactIs_production.Element = REACT_ELEMENT_TYPE, reactIs_production.ForwardRef = REACT_FORWARD_REF_TYPE, reactIs_production.Fragment = REACT_FRAGMENT_TYPE, reactIs_production.Lazy = REACT_LAZY_TYPE, reactIs_production.Memo = REACT_MEMO_TYPE, reactIs_production.Portal = REACT_PORTAL_TYPE, reactIs_production.Profiler = REACT_PROFILER_TYPE, reactIs_production.StrictMode = REACT_STRICT_MODE_TYPE, reactIs_production.Suspense = REACT_SUSPENSE_TYPE, reactIs_production.SuspenseList = REACT_SUSPENSE_LIST_TYPE, reactIs_production.isContextConsumer = function(object) {
462
+ return typeOf(object) === REACT_CONSUMER_TYPE;
463
+ }, reactIs_production.isContextProvider = function(object) {
464
+ return typeOf(object) === REACT_CONTEXT_TYPE;
465
+ }, reactIs_production.isElement = function(object) {
466
+ return typeof object == "object" && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
467
+ }, reactIs_production.isForwardRef = function(object) {
468
+ return typeOf(object) === REACT_FORWARD_REF_TYPE;
469
+ }, reactIs_production.isFragment = function(object) {
470
+ return typeOf(object) === REACT_FRAGMENT_TYPE;
471
+ }, reactIs_production.isLazy = function(object) {
472
+ return typeOf(object) === REACT_LAZY_TYPE;
473
+ }, reactIs_production.isMemo = function(object) {
474
+ return typeOf(object) === REACT_MEMO_TYPE;
475
+ }, reactIs_production.isPortal = function(object) {
476
+ return typeOf(object) === REACT_PORTAL_TYPE;
477
+ }, reactIs_production.isProfiler = function(object) {
478
+ return typeOf(object) === REACT_PROFILER_TYPE;
479
+ }, reactIs_production.isStrictMode = function(object) {
480
+ return typeOf(object) === REACT_STRICT_MODE_TYPE;
481
+ }, reactIs_production.isSuspense = function(object) {
482
+ return typeOf(object) === REACT_SUSPENSE_TYPE;
483
+ }, reactIs_production.isSuspenseList = function(object) {
484
+ return typeOf(object) === REACT_SUSPENSE_LIST_TYPE;
485
+ }, reactIs_production.isValidElementType = function(type) {
486
+ return typeof type == "string" || typeof type == "function" || type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type == "object" && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_CONSUMER_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_CLIENT_REFERENCE || type.getModuleId !== void 0);
487
+ }, reactIs_production.typeOf = typeOf, reactIs_production;
488
+ }
489
+ var hasRequiredReactIs$1;
490
+ function requireReactIs$1() {
491
+ return hasRequiredReactIs$1 || (hasRequiredReactIs$1 = 1, reactIs$1.exports = requireReactIs_production()), reactIs$1.exports;
492
+ }
493
+ var reactIsExports$1 = requireReactIs$1(), index$1 = getDefaultExportFromCjs(reactIsExports$1), ReactIs19 = _mergeNamespaces({
494
+ __proto__: null,
495
+ default: index$1
496
+ }, [reactIsExports$1]), reactIs = { exports: {} }, reactIs_production_min = {};
497
+ var hasRequiredReactIs_production_min;
498
+ function requireReactIs_production_min() {
499
+ if (hasRequiredReactIs_production_min) return reactIs_production_min;
500
+ hasRequiredReactIs_production_min = 1;
501
+ var b = /* @__PURE__ */ Symbol.for("react.element"), c = /* @__PURE__ */ Symbol.for("react.portal"), d = /* @__PURE__ */ Symbol.for("react.fragment"), e = /* @__PURE__ */ Symbol.for("react.strict_mode"), f2 = /* @__PURE__ */ Symbol.for("react.profiler"), g = /* @__PURE__ */ Symbol.for("react.provider"), h2 = /* @__PURE__ */ Symbol.for("react.context"), k = /* @__PURE__ */ Symbol.for("react.server_context"), l = /* @__PURE__ */ Symbol.for("react.forward_ref"), m = /* @__PURE__ */ Symbol.for("react.suspense"), n = /* @__PURE__ */ Symbol.for("react.suspense_list"), p2 = /* @__PURE__ */ Symbol.for("react.memo"), q = /* @__PURE__ */ Symbol.for("react.lazy"), t = /* @__PURE__ */ Symbol.for("react.offscreen"), u;
502
+ u = /* @__PURE__ */ Symbol.for("react.module.reference");
503
+ function v(a2) {
504
+ if (typeof a2 == "object" && a2 !== null) {
505
+ var r = a2.$$typeof;
506
+ switch (r) {
507
+ case b:
508
+ switch (a2 = a2.type, a2) {
509
+ case d:
510
+ case f2:
511
+ case e:
512
+ case m:
513
+ case n:
514
+ return a2;
515
+ default:
516
+ switch (a2 = a2 && a2.$$typeof, a2) {
517
+ case k:
518
+ case h2:
519
+ case l:
520
+ case q:
521
+ case p2:
522
+ case g:
523
+ return a2;
524
+ default:
525
+ return r;
526
+ }
527
+ }
528
+ case c:
529
+ return r;
530
+ }
531
+ }
532
+ }
533
+ return reactIs_production_min.ContextConsumer = h2, reactIs_production_min.ContextProvider = g, reactIs_production_min.Element = b, reactIs_production_min.ForwardRef = l, reactIs_production_min.Fragment = d, reactIs_production_min.Lazy = q, reactIs_production_min.Memo = p2, reactIs_production_min.Portal = c, reactIs_production_min.Profiler = f2, reactIs_production_min.StrictMode = e, reactIs_production_min.Suspense = m, reactIs_production_min.SuspenseList = n, reactIs_production_min.isAsyncMode = function() {
534
+ return !1;
535
+ }, reactIs_production_min.isConcurrentMode = function() {
536
+ return !1;
537
+ }, reactIs_production_min.isContextConsumer = function(a2) {
538
+ return v(a2) === h2;
539
+ }, reactIs_production_min.isContextProvider = function(a2) {
540
+ return v(a2) === g;
541
+ }, reactIs_production_min.isElement = function(a2) {
542
+ return typeof a2 == "object" && a2 !== null && a2.$$typeof === b;
543
+ }, reactIs_production_min.isForwardRef = function(a2) {
544
+ return v(a2) === l;
545
+ }, reactIs_production_min.isFragment = function(a2) {
546
+ return v(a2) === d;
547
+ }, reactIs_production_min.isLazy = function(a2) {
548
+ return v(a2) === q;
549
+ }, reactIs_production_min.isMemo = function(a2) {
550
+ return v(a2) === p2;
551
+ }, reactIs_production_min.isPortal = function(a2) {
552
+ return v(a2) === c;
553
+ }, reactIs_production_min.isProfiler = function(a2) {
554
+ return v(a2) === f2;
555
+ }, reactIs_production_min.isStrictMode = function(a2) {
556
+ return v(a2) === e;
557
+ }, reactIs_production_min.isSuspense = function(a2) {
558
+ return v(a2) === m;
559
+ }, reactIs_production_min.isSuspenseList = function(a2) {
560
+ return v(a2) === n;
561
+ }, reactIs_production_min.isValidElementType = function(a2) {
562
+ return typeof a2 == "string" || typeof a2 == "function" || a2 === d || a2 === f2 || a2 === e || a2 === m || a2 === n || a2 === t || typeof a2 == "object" && a2 !== null && (a2.$$typeof === q || a2.$$typeof === p2 || a2.$$typeof === g || a2.$$typeof === h2 || a2.$$typeof === l || a2.$$typeof === u || a2.getModuleId !== void 0);
563
+ }, reactIs_production_min.typeOf = v, reactIs_production_min;
564
+ }
565
+ var hasRequiredReactIs;
566
+ function requireReactIs() {
567
+ return hasRequiredReactIs || (hasRequiredReactIs = 1, reactIs.exports = requireReactIs_production_min()), reactIs.exports;
568
+ }
569
+ var reactIsExports = requireReactIs(), index = getDefaultExportFromCjs(reactIsExports), ReactIs18 = _mergeNamespaces({
570
+ __proto__: null,
571
+ default: index
572
+ }, [reactIsExports]), reactIsMethods = [
573
+ "isAsyncMode",
574
+ "isConcurrentMode",
575
+ "isContextConsumer",
576
+ "isContextProvider",
577
+ "isElement",
578
+ "isForwardRef",
579
+ "isFragment",
580
+ "isLazy",
581
+ "isMemo",
582
+ "isPortal",
583
+ "isProfiler",
584
+ "isStrictMode",
585
+ "isSuspense",
586
+ "isSuspenseList",
587
+ "isValidElementType"
588
+ ];
589
+ Object.fromEntries(reactIsMethods.map((m) => [m, (v) => ReactIs18[m](v) || ReactIs19[m](v)]));
590
+ var getPromiseValue = () => "Promise{\u2026}";
591
+ try {
592
+ let { getPromiseDetails, kPending, kRejected } = process.binding("util");
593
+ Array.isArray(getPromiseDetails(Promise.resolve())) && (getPromiseValue = (value, options) => {
594
+ let [state, innerValue] = getPromiseDetails(value);
595
+ return state === kPending ? "Promise{<pending>}" : `Promise${state === kRejected ? "!" : ""}{${options.inspect(innerValue, options)}}`;
596
+ });
597
+ } catch {
598
+ }
599
+ function createSimpleStackTrace(options) {
600
+ let { message = "$$stack trace error", stackTraceLimit = 1 } = options || {}, limit = Error.stackTraceLimit, prepareStackTrace = Error.prepareStackTrace;
601
+ Error.stackTraceLimit = stackTraceLimit, Error.prepareStackTrace = (e) => e.stack;
602
+ let stackTrace = new Error(message).stack || "";
603
+ return Error.prepareStackTrace = prepareStackTrace, Error.stackTraceLimit = limit, stackTrace;
604
+ }
605
+ var jsTokens_1, hasRequiredJsTokens;
606
+ function requireJsTokens() {
607
+ if (hasRequiredJsTokens) return jsTokens_1;
608
+ hasRequiredJsTokens = 1;
609
+ var Identifier, JSXIdentifier, JSXPunctuator, JSXString, JSXText, KeywordsWithExpressionAfter, KeywordsWithNoLineTerminatorAfter, LineTerminatorSequence, MultiLineComment, Newline, NumericLiteral, Punctuator, RegularExpressionLiteral, SingleLineComment, StringLiteral, Template, TokensNotPrecedingObjectLiteral, TokensPrecedingExpression, WhiteSpace;
610
+ return RegularExpressionLiteral = /\/(?![*\/])(?:\[(?:(?![\]\\]).|\\.)*\]|(?![\/\\]).|\\.)*(\/[$_\u200C\u200D\p{ID_Continue}]*|\\)?/uy, Punctuator = /--|\+\+|=>|\.{3}|\??\.(?!\d)|(?:&&|\|\||\?\?|[+\-%&|^]|\*{1,2}|<{1,2}|>{1,3}|!=?|={1,2}|\/(?![\/*]))=?|[?~,:;[\](){}]/y, Identifier = /(\x23?)(?=[$_\p{ID_Start}\\])(?:[$_\u200C\u200D\p{ID_Continue}]|\\u[\da-fA-F]{4}|\\u\{[\da-fA-F]+\})+/uy, StringLiteral = /(['"])(?:(?!\1)[^\\\n\r]|\\(?:\r\n|[^]))*(\1)?/y, NumericLiteral = /(?:0[xX][\da-fA-F](?:_?[\da-fA-F])*|0[oO][0-7](?:_?[0-7])*|0[bB][01](?:_?[01])*)n?|0n|[1-9](?:_?\d)*n|(?:(?:0(?!\d)|0\d*[89]\d*|[1-9](?:_?\d)*)(?:\.(?:\d(?:_?\d)*)?)?|\.\d(?:_?\d)*)(?:[eE][+-]?\d(?:_?\d)*)?|0[0-7]+/y, Template = /[`}](?:[^`\\$]|\\[^]|\$(?!\{))*(`|\$\{)?/y, WhiteSpace = /[\t\v\f\ufeff\p{Zs}]+/uy, LineTerminatorSequence = /\r?\n|[\r\u2028\u2029]/y, MultiLineComment = /\/\*(?:[^*]|\*(?!\/))*(\*\/)?/y, SingleLineComment = /\/\/.*/y, JSXPunctuator = /[<>.:={}]|\/(?![\/*])/y, JSXIdentifier = /[$_\p{ID_Start}][$_\u200C\u200D\p{ID_Continue}-]*/uy, JSXString = /(['"])(?:(?!\1)[^])*(\1)?/y, JSXText = /[^<>{}]+/y, TokensPrecedingExpression = /^(?:[\/+-]|\.{3}|\?(?:InterpolationIn(?:JSX|Template)|NoLineTerminatorHere|NonExpressionParenEnd|UnaryIncDec))?$|[{}([,;<>=*%&|^!~?:]$/, TokensNotPrecedingObjectLiteral = /^(?:=>|[;\]){}]|else|\?(?:NoLineTerminatorHere|NonExpressionParenEnd))?$/, KeywordsWithExpressionAfter = /^(?:await|case|default|delete|do|else|instanceof|new|return|throw|typeof|void|yield)$/, KeywordsWithNoLineTerminatorAfter = /^(?:return|throw|yield)$/, Newline = RegExp(LineTerminatorSequence.source), jsTokens_1 = function* (input, { jsx = !1 } = {}) {
611
+ var braces, firstCodePoint, isExpression, lastIndex, lastSignificantToken, length, match, mode, nextLastIndex, nextLastSignificantToken, parenNesting, postfixIncDec, punctuator, stack;
612
+ for ({ length } = input, lastIndex = 0, lastSignificantToken = "", stack = [{ tag: "JS" }], braces = [], parenNesting = 0, postfixIncDec = !1; lastIndex < length; ) {
613
+ switch (mode = stack[stack.length - 1], mode.tag) {
614
+ case "JS":
615
+ case "JSNonExpressionParen":
616
+ case "InterpolationInTemplate":
617
+ case "InterpolationInJSX":
618
+ if (input[lastIndex] === "/" && (TokensPrecedingExpression.test(lastSignificantToken) || KeywordsWithExpressionAfter.test(lastSignificantToken)) && (RegularExpressionLiteral.lastIndex = lastIndex, match = RegularExpressionLiteral.exec(input))) {
619
+ lastIndex = RegularExpressionLiteral.lastIndex, lastSignificantToken = match[0], postfixIncDec = !0, yield {
620
+ type: "RegularExpressionLiteral",
621
+ value: match[0],
622
+ closed: match[1] !== void 0 && match[1] !== "\\"
623
+ };
624
+ continue;
625
+ }
626
+ if (Punctuator.lastIndex = lastIndex, match = Punctuator.exec(input)) {
627
+ switch (punctuator = match[0], nextLastIndex = Punctuator.lastIndex, nextLastSignificantToken = punctuator, punctuator) {
628
+ case "(":
629
+ lastSignificantToken === "?NonExpressionParenKeyword" && stack.push({
630
+ tag: "JSNonExpressionParen",
631
+ nesting: parenNesting
632
+ }), parenNesting++, postfixIncDec = !1;
633
+ break;
634
+ case ")":
635
+ parenNesting--, postfixIncDec = !0, mode.tag === "JSNonExpressionParen" && parenNesting === mode.nesting && (stack.pop(), nextLastSignificantToken = "?NonExpressionParenEnd", postfixIncDec = !1);
636
+ break;
637
+ case "{":
638
+ Punctuator.lastIndex = 0, isExpression = !TokensNotPrecedingObjectLiteral.test(lastSignificantToken) && (TokensPrecedingExpression.test(lastSignificantToken) || KeywordsWithExpressionAfter.test(lastSignificantToken)), braces.push(isExpression), postfixIncDec = !1;
639
+ break;
640
+ case "}":
641
+ switch (mode.tag) {
642
+ case "InterpolationInTemplate":
643
+ if (braces.length === mode.nesting) {
644
+ Template.lastIndex = lastIndex, match = Template.exec(input), lastIndex = Template.lastIndex, lastSignificantToken = match[0], match[1] === "${" ? (lastSignificantToken = "?InterpolationInTemplate", postfixIncDec = !1, yield {
645
+ type: "TemplateMiddle",
646
+ value: match[0]
647
+ }) : (stack.pop(), postfixIncDec = !0, yield {
648
+ type: "TemplateTail",
649
+ value: match[0],
650
+ closed: match[1] === "`"
651
+ });
652
+ continue;
653
+ }
654
+ break;
655
+ case "InterpolationInJSX":
656
+ if (braces.length === mode.nesting) {
657
+ stack.pop(), lastIndex += 1, lastSignificantToken = "}", yield {
658
+ type: "JSXPunctuator",
659
+ value: "}"
660
+ };
661
+ continue;
662
+ }
663
+ }
664
+ postfixIncDec = braces.pop(), nextLastSignificantToken = postfixIncDec ? "?ExpressionBraceEnd" : "}";
665
+ break;
666
+ case "]":
667
+ postfixIncDec = !0;
668
+ break;
669
+ case "++":
670
+ case "--":
671
+ nextLastSignificantToken = postfixIncDec ? "?PostfixIncDec" : "?UnaryIncDec";
672
+ break;
673
+ case "<":
674
+ if (jsx && (TokensPrecedingExpression.test(lastSignificantToken) || KeywordsWithExpressionAfter.test(lastSignificantToken))) {
675
+ stack.push({ tag: "JSXTag" }), lastIndex += 1, lastSignificantToken = "<", yield {
676
+ type: "JSXPunctuator",
677
+ value: punctuator
678
+ };
679
+ continue;
680
+ }
681
+ postfixIncDec = !1;
682
+ break;
683
+ default:
684
+ postfixIncDec = !1;
685
+ }
686
+ lastIndex = nextLastIndex, lastSignificantToken = nextLastSignificantToken, yield {
687
+ type: "Punctuator",
688
+ value: punctuator
689
+ };
690
+ continue;
691
+ }
692
+ if (Identifier.lastIndex = lastIndex, match = Identifier.exec(input)) {
693
+ switch (lastIndex = Identifier.lastIndex, nextLastSignificantToken = match[0], match[0]) {
694
+ case "for":
695
+ case "if":
696
+ case "while":
697
+ case "with":
698
+ lastSignificantToken !== "." && lastSignificantToken !== "?." && (nextLastSignificantToken = "?NonExpressionParenKeyword");
699
+ }
700
+ lastSignificantToken = nextLastSignificantToken, postfixIncDec = !KeywordsWithExpressionAfter.test(match[0]), yield {
701
+ type: match[1] === "#" ? "PrivateIdentifier" : "IdentifierName",
702
+ value: match[0]
703
+ };
704
+ continue;
705
+ }
706
+ if (StringLiteral.lastIndex = lastIndex, match = StringLiteral.exec(input)) {
707
+ lastIndex = StringLiteral.lastIndex, lastSignificantToken = match[0], postfixIncDec = !0, yield {
708
+ type: "StringLiteral",
709
+ value: match[0],
710
+ closed: match[2] !== void 0
711
+ };
712
+ continue;
713
+ }
714
+ if (NumericLiteral.lastIndex = lastIndex, match = NumericLiteral.exec(input)) {
715
+ lastIndex = NumericLiteral.lastIndex, lastSignificantToken = match[0], postfixIncDec = !0, yield {
716
+ type: "NumericLiteral",
717
+ value: match[0]
718
+ };
719
+ continue;
720
+ }
721
+ if (Template.lastIndex = lastIndex, match = Template.exec(input)) {
722
+ lastIndex = Template.lastIndex, lastSignificantToken = match[0], match[1] === "${" ? (lastSignificantToken = "?InterpolationInTemplate", stack.push({
723
+ tag: "InterpolationInTemplate",
724
+ nesting: braces.length
725
+ }), postfixIncDec = !1, yield {
726
+ type: "TemplateHead",
727
+ value: match[0]
728
+ }) : (postfixIncDec = !0, yield {
729
+ type: "NoSubstitutionTemplate",
730
+ value: match[0],
731
+ closed: match[1] === "`"
732
+ });
733
+ continue;
734
+ }
735
+ break;
736
+ case "JSXTag":
737
+ case "JSXTagEnd":
738
+ if (JSXPunctuator.lastIndex = lastIndex, match = JSXPunctuator.exec(input)) {
739
+ switch (lastIndex = JSXPunctuator.lastIndex, nextLastSignificantToken = match[0], match[0]) {
740
+ case "<":
741
+ stack.push({ tag: "JSXTag" });
742
+ break;
743
+ case ">":
744
+ stack.pop(), lastSignificantToken === "/" || mode.tag === "JSXTagEnd" ? (nextLastSignificantToken = "?JSX", postfixIncDec = !0) : stack.push({ tag: "JSXChildren" });
745
+ break;
746
+ case "{":
747
+ stack.push({
748
+ tag: "InterpolationInJSX",
749
+ nesting: braces.length
750
+ }), nextLastSignificantToken = "?InterpolationInJSX", postfixIncDec = !1;
751
+ break;
752
+ case "/":
753
+ lastSignificantToken === "<" && (stack.pop(), stack[stack.length - 1].tag === "JSXChildren" && stack.pop(), stack.push({ tag: "JSXTagEnd" }));
754
+ }
755
+ lastSignificantToken = nextLastSignificantToken, yield {
756
+ type: "JSXPunctuator",
757
+ value: match[0]
758
+ };
759
+ continue;
760
+ }
761
+ if (JSXIdentifier.lastIndex = lastIndex, match = JSXIdentifier.exec(input)) {
762
+ lastIndex = JSXIdentifier.lastIndex, lastSignificantToken = match[0], yield {
763
+ type: "JSXIdentifier",
764
+ value: match[0]
765
+ };
766
+ continue;
767
+ }
768
+ if (JSXString.lastIndex = lastIndex, match = JSXString.exec(input)) {
769
+ lastIndex = JSXString.lastIndex, lastSignificantToken = match[0], yield {
770
+ type: "JSXString",
771
+ value: match[0],
772
+ closed: match[2] !== void 0
773
+ };
774
+ continue;
775
+ }
776
+ break;
777
+ case "JSXChildren":
778
+ if (JSXText.lastIndex = lastIndex, match = JSXText.exec(input)) {
779
+ lastIndex = JSXText.lastIndex, lastSignificantToken = match[0], yield {
780
+ type: "JSXText",
781
+ value: match[0]
782
+ };
783
+ continue;
784
+ }
785
+ switch (input[lastIndex]) {
786
+ case "<":
787
+ stack.push({ tag: "JSXTag" }), lastIndex++, lastSignificantToken = "<", yield {
788
+ type: "JSXPunctuator",
789
+ value: "<"
790
+ };
791
+ continue;
792
+ case "{":
793
+ stack.push({
794
+ tag: "InterpolationInJSX",
795
+ nesting: braces.length
796
+ }), lastIndex++, lastSignificantToken = "?InterpolationInJSX", postfixIncDec = !1, yield {
797
+ type: "JSXPunctuator",
798
+ value: "{"
799
+ };
800
+ continue;
801
+ }
802
+ }
803
+ if (WhiteSpace.lastIndex = lastIndex, match = WhiteSpace.exec(input)) {
804
+ lastIndex = WhiteSpace.lastIndex, yield {
805
+ type: "WhiteSpace",
806
+ value: match[0]
807
+ };
808
+ continue;
809
+ }
810
+ if (LineTerminatorSequence.lastIndex = lastIndex, match = LineTerminatorSequence.exec(input)) {
811
+ lastIndex = LineTerminatorSequence.lastIndex, postfixIncDec = !1, KeywordsWithNoLineTerminatorAfter.test(lastSignificantToken) && (lastSignificantToken = "?NoLineTerminatorHere"), yield {
812
+ type: "LineTerminatorSequence",
813
+ value: match[0]
814
+ };
815
+ continue;
816
+ }
817
+ if (MultiLineComment.lastIndex = lastIndex, match = MultiLineComment.exec(input)) {
818
+ lastIndex = MultiLineComment.lastIndex, Newline.test(match[0]) && (postfixIncDec = !1, KeywordsWithNoLineTerminatorAfter.test(lastSignificantToken) && (lastSignificantToken = "?NoLineTerminatorHere")), yield {
819
+ type: "MultiLineComment",
820
+ value: match[0],
821
+ closed: match[1] !== void 0
822
+ };
823
+ continue;
824
+ }
825
+ if (SingleLineComment.lastIndex = lastIndex, match = SingleLineComment.exec(input)) {
826
+ lastIndex = SingleLineComment.lastIndex, postfixIncDec = !1, yield {
827
+ type: "SingleLineComment",
828
+ value: match[0]
829
+ };
830
+ continue;
831
+ }
832
+ firstCodePoint = String.fromCodePoint(input.codePointAt(lastIndex)), lastIndex += firstCodePoint.length, lastSignificantToken = firstCodePoint, postfixIncDec = !1, yield {
833
+ type: mode.tag.startsWith("JSX") ? "JSXInvalid" : "Invalid",
834
+ value: firstCodePoint
835
+ };
836
+ }
837
+ }, jsTokens_1;
838
+ }
839
+ requireJsTokens();
840
+ var reservedWords = {
841
+ keyword: [
842
+ "break",
843
+ "case",
844
+ "catch",
845
+ "continue",
846
+ "debugger",
847
+ "default",
848
+ "do",
849
+ "else",
850
+ "finally",
851
+ "for",
852
+ "function",
853
+ "if",
854
+ "return",
855
+ "switch",
856
+ "throw",
857
+ "try",
858
+ "var",
859
+ "const",
860
+ "while",
861
+ "with",
862
+ "new",
863
+ "this",
864
+ "super",
865
+ "class",
866
+ "extends",
867
+ "export",
868
+ "import",
869
+ "null",
870
+ "true",
871
+ "false",
872
+ "in",
873
+ "instanceof",
874
+ "typeof",
875
+ "void",
876
+ "delete"
877
+ ],
878
+ strict: [
879
+ "implements",
880
+ "interface",
881
+ "let",
882
+ "package",
883
+ "private",
884
+ "protected",
885
+ "public",
886
+ "static",
887
+ "yield"
888
+ ]
889
+ };
890
+ new Set(reservedWords.keyword);
891
+ new Set(reservedWords.strict);
892
+ var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", intToChar = new Uint8Array(64), charToInt = new Uint8Array(128);
893
+ for (let i = 0; i < chars.length; i++) {
894
+ let c = chars.charCodeAt(i);
895
+ intToChar[i] = c, charToInt[c] = i;
896
+ }
897
+ var UrlType;
898
+ (function(UrlType2) {
899
+ UrlType2[UrlType2.Empty = 1] = "Empty", UrlType2[UrlType2.Hash = 2] = "Hash", UrlType2[UrlType2.Query = 3] = "Query", UrlType2[UrlType2.RelativePath = 4] = "RelativePath", UrlType2[UrlType2.AbsolutePath = 5] = "AbsolutePath", UrlType2[UrlType2.SchemeRelative = 6] = "SchemeRelative", UrlType2[UrlType2.Absolute = 7] = "Absolute";
900
+ })(UrlType || (UrlType = {}));
901
+ var _DRIVE_LETTER_START_RE2 = /^[A-Za-z]:\//;
902
+ function normalizeWindowsPath2(input = "") {
903
+ return input && input.replace(/\\/g, "/").replace(_DRIVE_LETTER_START_RE2, (r) => r.toUpperCase());
904
+ }
905
+ var _IS_ABSOLUTE_RE2 = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/;
906
+ function cwd() {
907
+ return typeof process < "u" && typeof process.cwd == "function" ? process.cwd().replace(/\\/g, "/") : "/";
908
+ }
909
+ var resolve = function(...arguments_) {
910
+ arguments_ = arguments_.map((argument) => normalizeWindowsPath2(argument));
911
+ let resolvedPath = "", resolvedAbsolute = !1;
912
+ for (let index2 = arguments_.length - 1; index2 >= -1 && !resolvedAbsolute; index2--) {
913
+ let path = index2 >= 0 ? arguments_[index2] : cwd();
914
+ !path || path.length === 0 || (resolvedPath = `${path}/${resolvedPath}`, resolvedAbsolute = isAbsolute2(path));
915
+ }
916
+ return resolvedPath = normalizeString2(resolvedPath, !resolvedAbsolute), resolvedAbsolute && !isAbsolute2(resolvedPath) ? `/${resolvedPath}` : resolvedPath.length > 0 ? resolvedPath : ".";
917
+ };
918
+ function normalizeString2(path, allowAboveRoot) {
919
+ let res = "", lastSegmentLength = 0, lastSlash = -1, dots = 0, char = null;
920
+ for (let index2 = 0; index2 <= path.length; ++index2) {
921
+ if (index2 < path.length)
922
+ char = path[index2];
923
+ else {
924
+ if (char === "/")
925
+ break;
926
+ char = "/";
927
+ }
928
+ if (char === "/") {
929
+ if (!(lastSlash === index2 - 1 || dots === 1)) if (dots === 2) {
930
+ if (res.length < 2 || lastSegmentLength !== 2 || res[res.length - 1] !== "." || res[res.length - 2] !== ".") {
931
+ if (res.length > 2) {
932
+ let lastSlashIndex = res.lastIndexOf("/");
933
+ lastSlashIndex === -1 ? (res = "", lastSegmentLength = 0) : (res = res.slice(0, lastSlashIndex), lastSegmentLength = res.length - 1 - res.lastIndexOf("/")), lastSlash = index2, dots = 0;
934
+ continue;
935
+ } else if (res.length > 0) {
936
+ res = "", lastSegmentLength = 0, lastSlash = index2, dots = 0;
937
+ continue;
938
+ }
939
+ }
940
+ allowAboveRoot && (res += res.length > 0 ? "/.." : "..", lastSegmentLength = 2);
941
+ } else
942
+ res.length > 0 ? res += `/${path.slice(lastSlash + 1, index2)}` : res = path.slice(lastSlash + 1, index2), lastSegmentLength = index2 - lastSlash - 1;
943
+ lastSlash = index2, dots = 0;
944
+ } else char === "." && dots !== -1 ? ++dots : dots = -1;
945
+ }
946
+ return res;
947
+ }
948
+ var isAbsolute2 = function(p2) {
949
+ return _IS_ABSOLUTE_RE2.test(p2);
950
+ }, CHROME_IE_STACK_REGEXP = /^\s*at .*(?:\S:\d+|\(native\))/m, SAFARI_NATIVE_CODE_REGEXP = /^(?:eval@)?(?:\[native code\])?$/;
951
+ function extractLocation(urlLike) {
952
+ if (!urlLike.includes(":"))
953
+ return [urlLike];
954
+ let parts = /(.+?)(?::(\d+))?(?::(\d+))?$/.exec(urlLike.replace(/^\(|\)$/g, ""));
955
+ if (!parts)
956
+ return [urlLike];
957
+ let url = parts[1];
958
+ if (url.startsWith("async ") && (url = url.slice(6)), url.startsWith("http:") || url.startsWith("https:")) {
959
+ let urlObj = new URL(url);
960
+ urlObj.searchParams.delete("import"), urlObj.searchParams.delete("browserv"), url = urlObj.pathname + urlObj.hash + urlObj.search;
961
+ }
962
+ if (url.startsWith("/@fs/")) {
963
+ let isWindows = /^\/@fs\/[a-zA-Z]:\//.test(url);
964
+ url = url.slice(isWindows ? 5 : 4);
965
+ }
966
+ return [
967
+ url,
968
+ parts[2] || void 0,
969
+ parts[3] || void 0
970
+ ];
971
+ }
972
+ function parseSingleFFOrSafariStack(raw) {
973
+ let line = raw.trim();
974
+ if (SAFARI_NATIVE_CODE_REGEXP.test(line) || (line.includes(" > eval") && (line = line.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g, ":$1")), !line.includes("@") && !line.includes(":")))
975
+ return null;
976
+ let functionNameRegex = /((.*".+"[^@]*)?[^@]*)(@)/, matches = line.match(functionNameRegex), functionName = matches && matches[1] ? matches[1] : void 0, [url, lineNumber, columnNumber] = extractLocation(line.replace(functionNameRegex, ""));
977
+ return !url || !lineNumber || !columnNumber ? null : {
978
+ file: url,
979
+ method: functionName || "",
980
+ line: Number.parseInt(lineNumber),
981
+ column: Number.parseInt(columnNumber)
982
+ };
983
+ }
984
+ function parseSingleStack(raw) {
985
+ let line = raw.trim();
986
+ return CHROME_IE_STACK_REGEXP.test(line) ? parseSingleV8Stack(line) : parseSingleFFOrSafariStack(line);
987
+ }
988
+ function parseSingleV8Stack(raw) {
989
+ let line = raw.trim();
990
+ if (!CHROME_IE_STACK_REGEXP.test(line))
991
+ return null;
992
+ line.includes("(eval ") && (line = line.replace(/eval code/g, "eval").replace(/(\(eval at [^()]*)|(,.*$)/g, ""));
993
+ let sanitizedLine = line.replace(/^\s+/, "").replace(/\(eval code/g, "(").replace(/^.*?\s+/, ""), location2 = sanitizedLine.match(/ (\(.+\)$)/);
994
+ sanitizedLine = location2 ? sanitizedLine.replace(location2[0], "") : sanitizedLine;
995
+ let [url, lineNumber, columnNumber] = extractLocation(location2 ? location2[1] : sanitizedLine), method = location2 && sanitizedLine || "", file = url && ["eval", "<anonymous>"].includes(url) ? void 0 : url;
996
+ return !file || !lineNumber || !columnNumber ? null : (method.startsWith("async ") && (method = method.slice(6)), file.startsWith("file://") && (file = file.slice(7)), file = file.startsWith("node:") || file.startsWith("internal:") ? file : resolve(file), method && (method = method.replace(/__vite_ssr_import_\d+__\./g, "")), {
997
+ method,
998
+ file,
999
+ line: Number.parseInt(lineNumber),
1000
+ column: Number.parseInt(columnNumber)
1001
+ });
1002
+ }
1003
+ function createCompilerHints(options) {
1004
+ let globalThisAccessor = options?.globalThisKey || "__vitest_mocker__";
1005
+ function _mocker() {
1006
+ return typeof globalThis[globalThisAccessor] < "u" ? globalThis[globalThisAccessor] : new Proxy({}, { get(_, name) {
1007
+ throw new Error(`Vitest mocker was not initialized in this environment. vi.${String(name)}() is forbidden.`);
1008
+ } });
1009
+ }
1010
+ return {
1011
+ hoisted(factory) {
1012
+ if (typeof factory != "function")
1013
+ throw new TypeError(`vi.hoisted() expects a function, but received a ${typeof factory}`);
1014
+ return factory();
1015
+ },
1016
+ mock(path, factory) {
1017
+ if (typeof path != "string")
1018
+ throw new TypeError(`vi.mock() expects a string path, but received a ${typeof path}`);
1019
+ let importer = getImporter("mock");
1020
+ _mocker().queueMock(path, importer, typeof factory == "function" ? () => factory(() => _mocker().importActual(path, importer)) : factory);
1021
+ },
1022
+ unmock(path) {
1023
+ if (typeof path != "string")
1024
+ throw new TypeError(`vi.unmock() expects a string path, but received a ${typeof path}`);
1025
+ _mocker().queueUnmock(path, getImporter("unmock"));
1026
+ },
1027
+ doMock(path, factory) {
1028
+ if (typeof path != "string")
1029
+ throw new TypeError(`vi.doMock() expects a string path, but received a ${typeof path}`);
1030
+ let importer = getImporter("doMock");
1031
+ _mocker().queueMock(path, importer, typeof factory == "function" ? () => factory(() => _mocker().importActual(path, importer)) : factory);
1032
+ },
1033
+ doUnmock(path) {
1034
+ if (typeof path != "string")
1035
+ throw new TypeError(`vi.doUnmock() expects a string path, but received a ${typeof path}`);
1036
+ _mocker().queueUnmock(path, getImporter("doUnmock"));
1037
+ },
1038
+ async importActual(path) {
1039
+ return _mocker().importActual(path, getImporter("importActual"));
1040
+ },
1041
+ async importMock(path) {
1042
+ return _mocker().importMock(path, getImporter("importMock"));
1043
+ }
1044
+ };
1045
+ }
1046
+ function getImporter(name) {
1047
+ let stackArray = createSimpleStackTrace({ stackTraceLimit: 5 }).split(`
1048
+ `), importerStackIndex = stackArray.findIndex((stack2) => stack2.includes(` at Object.${name}`) || stack2.includes(`${name}@`)), stack = parseSingleStack(stackArray[importerStackIndex + 1]);
1049
+ return stack?.file || "";
1050
+ }
1051
+ var hot = import.meta.hot || {
1052
+ on: warn,
1053
+ off: warn,
1054
+ send: warn
1055
+ };
1056
+ function warn() {
1057
+ console.warn("Vitest mocker cannot work if Vite didn't establish WS connection.");
1058
+ }
1059
+ var { now } = Date, ModuleMocker = class {
1060
+ registry = new MockerRegistry();
1061
+ queue = /* @__PURE__ */ new Set();
1062
+ mockedIds = /* @__PURE__ */ new Set();
1063
+ constructor(interceptor, rpc3, spyOn, config) {
1064
+ this.interceptor = interceptor, this.rpc = rpc3, this.spyOn = spyOn, this.config = config;
1065
+ }
1066
+ async prepare() {
1067
+ this.queue.size && await Promise.all([...this.queue.values()]);
1068
+ }
1069
+ async resolveFactoryModule(id) {
1070
+ let mock = this.registry.get(id);
1071
+ if (!mock || mock.type !== "manual")
1072
+ throw new Error(`Mock ${id} wasn't registered. This is probably a Vitest error. Please, open a new issue with reproduction.`);
1073
+ return await mock.resolve();
1074
+ }
1075
+ getFactoryModule(id) {
1076
+ let mock = this.registry.get(id);
1077
+ if (!mock || mock.type !== "manual")
1078
+ throw new Error(`Mock ${id} wasn't registered. This is probably a Vitest error. Please, open a new issue with reproduction.`);
1079
+ if (!mock.cache)
1080
+ throw new Error(`Mock ${id} wasn't resolved. This is probably a Vitest error. Please, open a new issue with reproduction.`);
1081
+ return mock.cache;
1082
+ }
1083
+ async invalidate() {
1084
+ let ids = Array.from(this.mockedIds);
1085
+ ids.length && (await this.rpc.invalidate(ids), await this.interceptor.invalidate(), this.registry.clear());
1086
+ }
1087
+ async importActual(id, importer) {
1088
+ let resolved = await this.rpc.resolveId(id, importer);
1089
+ if (resolved == null)
1090
+ throw new Error(`[vitest] Cannot resolve "${id}" imported from "${importer}"`);
1091
+ let ext = extname(resolved.id), url = new URL(resolved.url, location.href), query = `_vitest_original&ext${ext}`, actualUrl = `${url.pathname}${url.search ? `${url.search}&${query}` : `?${query}`}${url.hash}`;
1092
+ return this.wrapDynamicImport(() => import(
1093
+ /* @vite-ignore */
1094
+ actualUrl
1095
+ )).then((mod) => {
1096
+ if (!resolved.optimized || typeof mod.default > "u")
1097
+ return mod;
1098
+ let m = mod.default;
1099
+ return m?.__esModule ? m : {
1100
+ ...typeof m == "object" && !Array.isArray(m) || typeof m == "function" ? m : {},
1101
+ default: m
1102
+ };
1103
+ });
1104
+ }
1105
+ async importMock(rawId, importer) {
1106
+ await this.prepare();
1107
+ let { resolvedId, resolvedUrl, redirectUrl } = await this.rpc.resolveMock(rawId, importer, { mock: "auto" }), mockUrl = this.resolveMockPath(cleanVersion(resolvedUrl)), mock = this.registry.get(mockUrl);
1108
+ if (!mock)
1109
+ if (redirectUrl) {
1110
+ let resolvedRedirect = new URL(this.resolveMockPath(cleanVersion(redirectUrl)), location.href).toString();
1111
+ mock = new RedirectedModule(rawId, resolvedId, mockUrl, resolvedRedirect);
1112
+ } else
1113
+ mock = new AutomockedModule(rawId, resolvedId, mockUrl);
1114
+ if (mock.type === "manual")
1115
+ return await mock.resolve();
1116
+ if (mock.type === "automock" || mock.type === "autospy") {
1117
+ let url = new URL(`/@id/${resolvedId}`, location.href), query = url.search ? `${url.search}&t=${now()}` : `?t=${now()}`, moduleObject = await import(
1118
+ /* @vite-ignore */
1119
+ `${url.pathname}${query}&mock=${mock.type}${url.hash}`
1120
+ );
1121
+ return this.mockObject(moduleObject, mock.type);
1122
+ }
1123
+ return import(
1124
+ /* @vite-ignore */
1125
+ mock.redirect
1126
+ );
1127
+ }
1128
+ mockObject(object, moduleType = "automock") {
1129
+ return mockObject({
1130
+ globalConstructors: {
1131
+ Object,
1132
+ Function,
1133
+ Array,
1134
+ Map,
1135
+ RegExp
1136
+ },
1137
+ spyOn: this.spyOn,
1138
+ type: moduleType
1139
+ }, object);
1140
+ }
1141
+ queueMock(rawId, importer, factoryOrOptions) {
1142
+ let promise = this.rpc.resolveMock(rawId, importer, { mock: typeof factoryOrOptions == "function" ? "factory" : factoryOrOptions?.spy ? "spy" : "auto" }).then(async ({ redirectUrl, resolvedId, resolvedUrl, needsInterop, mockType }) => {
1143
+ let mockUrl = this.resolveMockPath(cleanVersion(resolvedUrl));
1144
+ this.mockedIds.add(resolvedId);
1145
+ let factory = typeof factoryOrOptions == "function" ? async () => {
1146
+ let data = await factoryOrOptions();
1147
+ return needsInterop ? { default: data } : data;
1148
+ } : void 0, mockRedirect = typeof redirectUrl == "string" ? new URL(this.resolveMockPath(cleanVersion(redirectUrl)), location.href).toString() : null, module;
1149
+ mockType === "manual" ? module = this.registry.register("manual", rawId, resolvedId, mockUrl, factory) : mockType === "autospy" ? module = this.registry.register("autospy", rawId, resolvedId, mockUrl) : mockType === "redirect" ? module = this.registry.register("redirect", rawId, resolvedId, mockUrl, mockRedirect) : module = this.registry.register("automock", rawId, resolvedId, mockUrl), await this.interceptor.register(module);
1150
+ }).finally(() => {
1151
+ this.queue.delete(promise);
1152
+ });
1153
+ this.queue.add(promise);
1154
+ }
1155
+ queueUnmock(id, importer) {
1156
+ let promise = this.rpc.resolveId(id, importer).then(async (resolved) => {
1157
+ if (!resolved)
1158
+ return;
1159
+ let mockUrl = this.resolveMockPath(cleanVersion(resolved.url));
1160
+ this.mockedIds.add(resolved.id), this.registry.delete(mockUrl), await this.interceptor.delete(mockUrl);
1161
+ }).finally(() => {
1162
+ this.queue.delete(promise);
1163
+ });
1164
+ this.queue.add(promise);
1165
+ }
1166
+ // We need to await mock registration before importing the actual module
1167
+ // In case there is a mocked module in the import chain
1168
+ wrapDynamicImport(moduleFactory) {
1169
+ return typeof moduleFactory == "function" ? new Promise((resolve2, reject) => {
1170
+ this.prepare().finally(() => {
1171
+ moduleFactory().then(resolve2, reject);
1172
+ });
1173
+ }) : moduleFactory;
1174
+ }
1175
+ resolveMockPath(path) {
1176
+ let config = this.config, fsRoot = join("/@fs/", config.root);
1177
+ return path.startsWith(config.root) ? path.slice(config.root.length) : path.startsWith(fsRoot) ? path.slice(fsRoot.length) : path;
1178
+ }
1179
+ }, versionRegexp = /(\?|&)v=\w{8}/;
1180
+ function cleanVersion(url) {
1181
+ return url.replace(versionRegexp, "");
1182
+ }
1183
+
1184
+ // src/mocking-utils/mocker-runtime.js
1185
+ var ModuleMockerInterceptor = class {
1186
+ // A registry for runtime mocks (e.g., `sb.mock('path', () => ({}))`)
1187
+ mocks = new MockerRegistry();
1188
+ constructor() {
1189
+ }
1190
+ /**
1191
+ * Called by ModuleMocker when `sb.mock()` is executed. We just store the mock in our registry.
1192
+ * The dynamic MSW handler will pick it up on the next relevant network request. Currently, we
1193
+ * don't use this.mocks in any way. Mocks will be registered in the user's preview file and live
1194
+ * until the end. There is no way to invalidate or delete them.
1195
+ */
1196
+ async register(module) {
1197
+ this.mocks.add(module);
1198
+ }
1199
+ async delete(url) {
1200
+ this.mocks.delete(url);
1201
+ }
1202
+ async invalidate() {
1203
+ this.mocks.clear();
1204
+ }
1205
+ }, rpc2 = (method) => {
1206
+ switch (method) {
1207
+ case "resolveId":
1208
+ return Promise.resolve({
1209
+ id: "",
1210
+ url: "",
1211
+ optimized: !1
1212
+ });
1213
+ case "resolveMock":
1214
+ return Promise.resolve({
1215
+ mockType: "dummy",
1216
+ resolvedId: "",
1217
+ resolvedUrl: "",
1218
+ redirectUrl: "",
1219
+ needsInterop: !1
1220
+ });
1221
+ case "invalidate":
1222
+ return Promise.resolve();
1223
+ }
1224
+ }, BuildModuleMocker = class extends ModuleMocker {
1225
+ queueMock() {
1226
+ }
1227
+ };
1228
+ function registerModuleMocker(interceptor) {
1229
+ let mocker = new BuildModuleMocker(
1230
+ interceptor("__vitest_mocker__"),
1231
+ {
1232
+ resolveId(id, importer) {
1233
+ return rpc2("resolveId", { id, importer });
1234
+ },
1235
+ resolveMock(id, importer, options) {
1236
+ return rpc2("resolveMock", { id, importer, options });
1237
+ },
1238
+ async invalidate(ids) {
1239
+ return rpc2("invalidate", { ids });
1240
+ }
1241
+ },
1242
+ (...args) => globalThis.__STORYBOOK_MODULE_TEST__.spyOn(...args),
1243
+ {
1244
+ root: ""
1245
+ }
1246
+ );
1247
+ return globalThis.__vitest_mocker__ = mocker, createCompilerHints({
1248
+ globalThisKey: "__vitest_mocker__"
1249
+ });
1250
+ }
1251
+ globalThis.__STORYBOOK_MOCKER__ = registerModuleMocker(() => new ModuleMockerInterceptor());
1252
+ export {
1253
+ ModuleMockerInterceptor
1254
+ };