@donotdev/cli 0.1.0 → 0.1.42

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 (390) hide show
  1. package/LICENSE.md +1 -1
  2. package/README.md +0 -0
  3. package/dependencies-matrix.json +175 -72
  4. package/dist/bin/commands/agent-setup.js +936 -428
  5. package/dist/bin/commands/build.js +4363 -883
  6. package/dist/bin/commands/bump.js +1296 -780
  7. package/dist/bin/commands/cacheout.js +494 -363
  8. package/dist/bin/commands/coach.js +632 -431
  9. package/dist/bin/commands/create-app.js +1316 -799
  10. package/dist/bin/commands/create-project.js +1355 -827
  11. package/dist/bin/commands/db.js +26158 -18868
  12. package/dist/bin/commands/deploy.js +5983 -1971
  13. package/dist/bin/commands/dev.js +1223 -657
  14. package/dist/bin/commands/doctor.js +1100 -528
  15. package/dist/bin/commands/emu.js +1380 -757
  16. package/dist/bin/commands/format.js +494 -363
  17. package/dist/bin/commands/get-demo.js +1210 -715
  18. package/dist/bin/commands/make-admin.js +16073 -8700
  19. package/dist/bin/commands/preview.js +1227 -658
  20. package/dist/bin/commands/seed.js +26171 -18881
  21. package/dist/bin/commands/setup-cicd.js +1475 -880
  22. package/dist/bin/commands/setup.js +1574 -956
  23. package/dist/bin/commands/staging.js +5984 -1972
  24. package/dist/bin/commands/sync-secrets.js +1423 -676
  25. package/dist/bin/commands/type-check.js +976 -469
  26. package/dist/bin/commands/wai.js +499 -368
  27. package/dist/bin/dndev.js +43 -19
  28. package/dist/bin/donotdev.js +43 -19
  29. package/dist/index.js +6166 -2133
  30. package/guidelines/DEPENDENCIES.md +155 -0
  31. package/{templates/root-consumer/guides/dndev/advanced/VERSION_CONTROL.md.example → guidelines/VERSION_CONTROL.md} +7 -11
  32. package/package.json +2 -1
  33. package/templates/app-demo/.env.example +1 -1
  34. package/templates/app-demo/entities/Contact.ts.example +0 -0
  35. package/templates/app-demo/entities/ExampleEntity.ts.example +0 -0
  36. package/templates/app-demo/entities/demo.ts.example +0 -0
  37. package/templates/app-demo/index.html.example +0 -0
  38. package/templates/app-demo/public/apple-touch-icon.png.example +0 -0
  39. package/templates/app-demo/public/fonts/fonts.css.example +0 -0
  40. package/templates/app-demo/public/icon-192x192.png.example +0 -0
  41. package/templates/app-demo/public/icon-512x512.png.example +0 -0
  42. package/templates/app-demo/src/App.tsx.example +0 -0
  43. package/templates/app-demo/src/config/app.ts.example +0 -0
  44. package/templates/app-demo/src/entities/booking.ts.example +0 -0
  45. package/templates/app-demo/src/entities/onboarding.ts.example +0 -0
  46. package/templates/app-demo/src/entities/product.ts.example +0 -0
  47. package/templates/app-demo/src/entities/quote.ts.example +0 -0
  48. package/templates/app-demo/src/globals.css.example +0 -0
  49. package/templates/app-demo/src/main.tsx.example +0 -0
  50. package/templates/app-demo/src/pages/ChangelogPage.tsx.example +0 -0
  51. package/templates/app-demo/src/pages/ConditionalFormPage.tsx.example +0 -0
  52. package/templates/app-demo/src/pages/DashboardPage.tsx.example +0 -0
  53. package/templates/app-demo/src/pages/HomePage.tsx.example +0 -0
  54. package/templates/app-demo/src/pages/OnboardingPage.tsx.example +0 -0
  55. package/templates/app-demo/src/pages/PricingPage.tsx.example +0 -0
  56. package/templates/app-demo/src/pages/ProductsPage.tsx.example +0 -0
  57. package/templates/app-demo/src/pages/ProfilePage.tsx.example +0 -0
  58. package/templates/app-demo/src/pages/SettingsPage.tsx.example +0 -0
  59. package/templates/app-demo/src/pages/ShowcaseDetailPage.tsx.example +0 -0
  60. package/templates/app-demo/src/pages/ShowcasePage.tsx.example +0 -0
  61. package/templates/app-demo/src/pages/components/ComponentRenderer.tsx.example +0 -0
  62. package/templates/app-demo/src/pages/components/ComponentsData.tsx.example +0 -0
  63. package/templates/app-demo/src/pages/components/componentConfig.ts.example +0 -0
  64. package/templates/app-demo/src/pages/legal/LegalPage.tsx.example +0 -0
  65. package/templates/app-demo/src/pages/legal/PrivacyPage.tsx.example +0 -0
  66. package/templates/app-demo/src/pages/legal/TermsPage.tsx.example +0 -0
  67. package/templates/app-demo/src/themes.css.example +27 -0
  68. package/templates/app-demo/tsconfig.json.example +0 -0
  69. package/templates/app-demo/vite.config.ts.example +0 -0
  70. package/templates/app-dndev/index.html.example +0 -3
  71. package/templates/app-dndev/src/App.tsx.example +0 -0
  72. package/templates/app-dndev/src/components/CockpitLayout.css.example +0 -0
  73. package/templates/app-dndev/src/components/CockpitLayout.tsx.example +0 -0
  74. package/templates/app-dndev/src/components/Kanban.css.example +0 -0
  75. package/templates/app-dndev/src/components/ModeToggle.tsx.example +0 -0
  76. package/templates/app-dndev/src/components/OverlaySlot.tsx.example +0 -0
  77. package/templates/app-dndev/src/components/TerminalPanel.css.example +0 -0
  78. package/templates/app-dndev/src/components/TerminalPanel.tsx.example +0 -0
  79. package/templates/app-dndev/src/components/markdown-prose.css.example +0 -0
  80. package/templates/app-dndev/src/components/phases/CaptainLog.tsx.example +0 -0
  81. package/templates/app-dndev/src/components/phases/ContextTabs.tsx.example +0 -0
  82. package/templates/app-dndev/src/components/phases/PhaseCard.tsx.example +0 -0
  83. package/templates/app-dndev/src/components/phases/PhaseDetail.tsx.example +0 -0
  84. package/templates/app-dndev/src/components/phases/ReviewPanel.tsx.example +0 -0
  85. package/templates/app-dndev/src/components/phases/phaseData.ts.example +0 -0
  86. package/templates/app-dndev/src/config/app.ts.example +0 -0
  87. package/templates/app-dndev/src/config/commands.ts.example +0 -0
  88. package/templates/app-dndev/src/config/legal.ts.example +0 -0
  89. package/templates/app-dndev/src/config/providers.ts.example +1 -1
  90. package/templates/app-dndev/src/globals.css.example +0 -0
  91. package/templates/app-dndev/src/hooks/useDndevFile.ts.example +0 -0
  92. package/templates/app-dndev/src/main.tsx.example +0 -0
  93. package/templates/app-dndev/src/pages/BoardPage.tsx.example +0 -0
  94. package/templates/app-dndev/src/pages/GrillPage.tsx.example +0 -0
  95. package/templates/app-dndev/src/pages/HomePage.tsx.example +0 -0
  96. package/templates/app-dndev/src/pages/NotFoundPage.tsx.example +0 -0
  97. package/templates/app-dndev/src/pages/PhasesPage.tsx.example +0 -0
  98. package/templates/app-dndev/src/pages/SettingsPage.tsx.example +0 -0
  99. package/templates/app-dndev/src/pages/legal/LegalNoticePage.tsx.example +0 -0
  100. package/templates/app-dndev/src/pages/legal/PrivacyPage.tsx.example +0 -0
  101. package/templates/app-dndev/src/pages/legal/TermsPage.tsx.example +0 -0
  102. package/templates/app-dndev/src/stores/dndevStore.ts.example +0 -0
  103. package/templates/app-dndev/src/themes.css.example +26 -0
  104. package/templates/app-dndev/terminal-sidecar.cjs.example +0 -0
  105. package/templates/app-dndev/vite.config.ts.example +0 -0
  106. package/templates/app-expo/.env.example +0 -32
  107. package/templates/app-expo/.expo/README.md.example +0 -0
  108. package/templates/app-expo/.gitignore.example +0 -0
  109. package/templates/app-expo/README.md.example +1 -1
  110. package/templates/app-expo/app/.gitkeep +0 -0
  111. package/templates/app-expo/app/_layout.tsx.example +0 -0
  112. package/templates/app-expo/app/form.tsx.example +0 -0
  113. package/templates/app-expo/app/index.tsx.example +0 -0
  114. package/templates/app-expo/app/list.tsx.example +0 -0
  115. package/templates/app-expo/app/profile.tsx.example +0 -0
  116. package/templates/app-expo/app/signin.tsx.example +0 -0
  117. package/templates/app-expo/app.json.example +0 -0
  118. package/templates/app-expo/assets/adaptive-icon.png +0 -0
  119. package/templates/app-expo/assets/favicon.png +0 -0
  120. package/templates/app-expo/assets/icon.png +0 -0
  121. package/templates/app-expo/assets/splash.png +0 -0
  122. package/templates/app-expo/babel.config.js.example +0 -0
  123. package/templates/app-expo/eas.json.example +0 -0
  124. package/templates/app-expo/expo-env.d.ts.example +0 -0
  125. package/templates/app-expo/metro.config.js.example +0 -0
  126. package/templates/app-expo/service-account-key.json.example +1 -1
  127. package/templates/app-expo/src/config/app.ts.example +0 -0
  128. package/templates/app-expo/src/config/providers.ts.example +1 -1
  129. package/templates/app-expo/tsconfig.json.example +0 -0
  130. package/templates/app-next/.env.example +0 -33
  131. package/templates/app-next/next.config.ts.example +0 -2
  132. package/templates/app-next/postcss.config.js.example +0 -0
  133. package/templates/app-next/service-account-key.json.example +0 -0
  134. package/templates/app-next/src/app/ClientLayout.tsx.example +0 -0
  135. package/templates/app-next/src/app/layout.tsx.example +13 -4
  136. package/templates/app-next/src/app/not-found.tsx.example +0 -0
  137. package/templates/app-next/src/config/app.ts.example +0 -0
  138. package/templates/app-next/src/config/legal.ts.example +0 -0
  139. package/templates/app-next/src/config/providers.ts.example +1 -1
  140. package/templates/app-next/src/globals.css.example +0 -0
  141. package/templates/app-next/src/locales/dndev_en.json.example +0 -0
  142. package/templates/app-next/src/locales/home_en.json.example +6 -6
  143. package/templates/app-next/src/pages/HomePage.tsx.example +0 -0
  144. package/templates/app-next/src/pages/legal/LegalNoticePage.tsx.example +0 -0
  145. package/templates/app-next/src/pages/legal/PrivacyPage.tsx.example +0 -0
  146. package/templates/app-next/src/pages/legal/TermsPage.tsx.example +0 -0
  147. package/templates/app-next/src/pages/locales/example_en.json.example +0 -0
  148. package/templates/app-next/src/themes.css.example +28 -1
  149. package/templates/app-vite/.env.example +0 -33
  150. package/templates/app-vite/csp.example.json +44 -0
  151. package/templates/app-vite/index.html.example +0 -3
  152. package/templates/app-vite/service-account-key.json.example +0 -0
  153. package/templates/app-vite/src/App.tsx.example +0 -0
  154. package/templates/app-vite/src/config/app.ts.example +0 -0
  155. package/templates/app-vite/src/config/legal.ts.example +0 -0
  156. package/templates/app-vite/src/config/providers.ts.example +1 -1
  157. package/templates/app-vite/src/globals.css.example +0 -0
  158. package/templates/app-vite/src/locales/dndev_en.json.example +0 -0
  159. package/templates/app-vite/src/locales/home_en.json.example +6 -6
  160. package/templates/app-vite/src/main.tsx.example +0 -0
  161. package/templates/app-vite/src/pages/FormPageExample.tsx.example +0 -0
  162. package/templates/app-vite/src/pages/HomePage.tsx.example +1 -1
  163. package/templates/app-vite/src/pages/ListPageExample.tsx.example +0 -0
  164. package/templates/app-vite/src/pages/NotFoundPage.tsx.example +0 -0
  165. package/templates/app-vite/src/pages/legal/LegalNoticePage.tsx.example +0 -0
  166. package/templates/app-vite/src/pages/legal/PrivacyPage.tsx.example +0 -0
  167. package/templates/app-vite/src/pages/legal/TermsPage.tsx.example +0 -0
  168. package/templates/app-vite/src/pages/locales/example_en.json.example +0 -0
  169. package/templates/app-vite/src/themes.css.example +26 -0
  170. package/templates/deploy-config/.firebaserc.example +0 -0
  171. package/templates/deploy-config/firestore.indexes.json.example +0 -0
  172. package/templates/deploy-config/firestore.rules.example +0 -0
  173. package/templates/deploy-config/storage.rules.example +0 -0
  174. package/templates/deploy-config/tsconfig.functions.json.example +0 -0
  175. package/templates/deploy-config/vercel.json.example +2 -2
  176. package/templates/functions-firebase/.env.example +2 -2
  177. package/templates/functions-firebase/README.md.example +3 -3
  178. package/templates/functions-firebase/build.mjs.example +0 -0
  179. package/templates/functions-firebase/functions.config.js.example +0 -0
  180. package/templates/functions-firebase/functions.yaml.example +0 -0
  181. package/templates/functions-firebase/src/auth/getCustomClaims.ts.example +0 -0
  182. package/templates/functions-firebase/src/auth/getUserAuthStatus.ts.example +0 -0
  183. package/templates/functions-firebase/src/auth/index.ts.example +0 -0
  184. package/templates/functions-firebase/src/auth/removeCustomClaims.ts.example +0 -0
  185. package/templates/functions-firebase/src/auth/setCustomClaims.ts.example +0 -0
  186. package/templates/functions-firebase/src/billing/handleStripeWebhook.ts.example +0 -0
  187. package/templates/functions-firebase/src/billing/index.ts.example +0 -0
  188. package/templates/functions-firebase/src/billing/processPaymentSuccess.ts.example +0 -0
  189. package/templates/functions-firebase/src/billing/refreshSubscriptionStatus.ts.example +0 -0
  190. package/templates/functions-firebase/src/crud/createEntity.ts.example +0 -0
  191. package/templates/functions-firebase/src/crud/deleteEntity.ts.example +0 -0
  192. package/templates/functions-firebase/src/crud/getEntity.ts.example +0 -0
  193. package/templates/functions-firebase/src/crud/index.ts.example +0 -0
  194. package/templates/functions-firebase/src/crud/listEntities.ts.example +0 -0
  195. package/templates/functions-firebase/src/crud/updateEntity.ts.example +0 -0
  196. package/templates/functions-firebase/src/index.ts.example +0 -0
  197. package/templates/functions-firebase/src/oauth/checkGitHubAccess.ts.example +0 -0
  198. package/templates/functions-firebase/src/oauth/disconnect.ts.example +0 -0
  199. package/templates/functions-firebase/src/oauth/exchangeToken.ts.example +0 -0
  200. package/templates/functions-firebase/src/oauth/getConnections.ts.example +0 -0
  201. package/templates/functions-firebase/src/oauth/grantGitHubAccess.ts.example +0 -0
  202. package/templates/functions-firebase/src/oauth/index.ts.example +0 -0
  203. package/templates/functions-firebase/src/oauth/refreshToken.ts.example +0 -0
  204. package/templates/functions-firebase/src/oauth/revokeGitHubAccess.ts.example +0 -0
  205. package/templates/functions-firebase/tsconfig.json.example +0 -0
  206. package/templates/functions-supabase/supabase/config.toml.example +0 -0
  207. package/templates/functions-supabase/supabase/functions/.env.example +0 -0
  208. package/templates/functions-supabase/supabase/functions/cancel-subscription/index.ts.example +0 -0
  209. package/templates/functions-supabase/supabase/functions/change-plan/index.ts.example +0 -0
  210. package/templates/functions-supabase/supabase/functions/create-checkout-session/index.ts.example +0 -0
  211. package/templates/functions-supabase/supabase/functions/create-customer-portal/index.ts.example +0 -0
  212. package/templates/functions-supabase/supabase/functions/crud/index.ts.example +0 -0
  213. package/templates/functions-supabase/supabase/functions/delete-account/index.ts.example +0 -0
  214. package/templates/functions-supabase/supabase/functions/deno.json.example +0 -0
  215. package/templates/functions-supabase/supabase/functions/disconnect-oauth/index.ts.example +0 -0
  216. package/templates/functions-supabase/supabase/functions/exchange-token/index.ts.example +0 -0
  217. package/templates/functions-supabase/supabase/functions/get-connections/index.ts.example +0 -0
  218. package/templates/functions-supabase/supabase/functions/get-custom-claims/index.ts.example +0 -0
  219. package/templates/functions-supabase/supabase/functions/get-user-auth-status/index.ts.example +0 -0
  220. package/templates/functions-supabase/supabase/functions/refresh-subscription-status/index.ts.example +0 -0
  221. package/templates/functions-supabase/supabase/functions/refresh-token/index.ts.example +0 -0
  222. package/templates/functions-supabase/supabase/functions/remove-custom-claims/index.ts.example +0 -0
  223. package/templates/functions-supabase/supabase/functions/set-custom-claims/index.ts.example +0 -0
  224. package/templates/functions-supabase/supabase/migrations/20250101000000_idempotency.sql +3 -0
  225. package/templates/functions-supabase/supabase/migrations/20250101000001_rate_limits.sql +3 -0
  226. package/templates/functions-supabase/supabase/migrations/20250101000002_cleanup_jobs.sql +0 -0
  227. package/templates/functions-supabase/supabase/migrations/20250101000003_operation_metrics.sql +3 -0
  228. package/templates/functions-supabase/supabase/migrations/20250101000004_crud_bulk.sql +192 -0
  229. package/templates/functions-vercel/.env.example +3 -3
  230. package/templates/functions-vercel/README.md.example +2 -2
  231. package/templates/functions-vercel/build.mjs.example +0 -0
  232. package/templates/functions-vercel/src/api/auth/getCustomClaims.ts.example +0 -0
  233. package/templates/functions-vercel/src/api/auth/getUserAuthStatus.ts.example +0 -0
  234. package/templates/functions-vercel/src/api/auth/removeCustomClaims.ts.example +0 -0
  235. package/templates/functions-vercel/src/api/auth/setCustomClaims.ts.example +0 -0
  236. package/templates/functions-vercel/src/api/billing/handleStripeWebhook.ts.example +0 -0
  237. package/templates/functions-vercel/src/api/billing/processPaymentSuccess.ts.example +0 -0
  238. package/templates/functions-vercel/src/api/billing/refreshSubscriptionStatus.ts.example +0 -0
  239. package/templates/functions-vercel/src/api/crud/createEntity.ts.example +0 -0
  240. package/templates/functions-vercel/src/api/crud/deleteEntity.ts.example +0 -0
  241. package/templates/functions-vercel/src/api/crud/getEntity.ts.example +0 -0
  242. package/templates/functions-vercel/src/api/crud/listEntities.ts.example +0 -0
  243. package/templates/functions-vercel/src/api/crud/updateEntity.ts.example +0 -0
  244. package/templates/functions-vercel/src/api/oauth/checkGitHubAccess.ts.example +0 -0
  245. package/templates/functions-vercel/src/api/oauth/disconnect.ts.example +0 -0
  246. package/templates/functions-vercel/src/api/oauth/exchangeToken.ts.example +0 -0
  247. package/templates/functions-vercel/src/api/oauth/getConnections.ts.example +0 -0
  248. package/templates/functions-vercel/src/api/oauth/grantGitHubAccess.ts.example +0 -0
  249. package/templates/functions-vercel/src/api/oauth/refreshToken.ts.example +0 -0
  250. package/templates/functions-vercel/src/api/oauth/revokeGitHubAccess.ts.example +0 -0
  251. package/templates/functions-vercel/tsconfig.json.example +0 -0
  252. package/templates/functions-vercel/vercel.json.example +0 -0
  253. package/templates/github-consumer/.github/workflows/ci.yml.example +0 -0
  254. package/templates/overlay-firebase/env.fragment.example +0 -0
  255. package/templates/overlay-firebase/env.fragment.expo.example +0 -0
  256. package/templates/overlay-firebase/env.fragment.nextjs.example +0 -0
  257. package/templates/overlay-firebase/src/config/providers.expo.ts.example +0 -0
  258. package/templates/overlay-firebase/src/config/providers.ts.example +0 -0
  259. package/templates/overlay-supabase/env.fragment.example +0 -0
  260. package/templates/overlay-supabase/env.fragment.expo.example +0 -0
  261. package/templates/overlay-supabase/env.fragment.nextjs.example +0 -0
  262. package/templates/overlay-supabase/src/config/providers.expo.ts.example +1 -1
  263. package/templates/overlay-supabase/src/config/providers.ts.example +1 -1
  264. package/templates/overlay-vercel/env.fragment.example +0 -0
  265. package/templates/overlay-vercel/env.fragment.nextjs.example +0 -0
  266. package/templates/overlay-vercel/src/config/providers.ts.example +0 -0
  267. package/templates/preset-admin/src/pages/DashboardPage.tsx.example +0 -0
  268. package/templates/preset-admin/src/pages/EntityPage.tsx.example +0 -0
  269. package/templates/preset-admin/src/pages/ReportsPage.tsx.example +0 -0
  270. package/templates/preset-admin/src/pages/SettingsPage.tsx.example +0 -0
  271. package/templates/preset-admin/src/pages/UsersPage.tsx.example +0 -0
  272. package/templates/preset-ecommerce/src/pages/CartPage.tsx.example +0 -0
  273. package/templates/preset-ecommerce/src/pages/CatalogPage.tsx.example +0 -0
  274. package/templates/preset-ecommerce/src/pages/CheckoutPage.tsx.example +0 -0
  275. package/templates/preset-ecommerce/src/pages/HomePage.tsx.example +0 -0
  276. package/templates/preset-ecommerce/src/pages/ProductPage.tsx.example +0 -0
  277. package/templates/preset-landing/src/pages/AboutPage.tsx.example +0 -0
  278. package/templates/preset-landing/src/pages/ContactPage.tsx.example +0 -0
  279. package/templates/preset-landing/src/pages/HomePage.tsx.example +0 -0
  280. package/templates/preset-saas/src/pages/DashboardPage.tsx.example +0 -0
  281. package/templates/preset-saas/src/pages/HomePage.tsx.example +0 -0
  282. package/templates/preset-saas/src/pages/PricingPage.tsx.example +0 -0
  283. package/templates/preset-saas/src/pages/ProfilePage.tsx.example +0 -0
  284. package/templates/preset-saas/src/pages/SettingsPage.tsx.example +0 -0
  285. package/templates/root-consumer/.claude/agents/architect.md.example +0 -0
  286. package/templates/root-consumer/.claude/agents/builder.md.example +0 -0
  287. package/templates/root-consumer/.claude/agents/coder.md.example +0 -0
  288. package/templates/root-consumer/.claude/agents/extractor.md.example +0 -0
  289. package/templates/root-consumer/.claude/agents/polisher.md.example +0 -0
  290. package/templates/root-consumer/.claude/agents/prompt-engineer.md.example +0 -0
  291. package/templates/root-consumer/.claude/hooks/guard-bash.sh.example +61 -0
  292. package/templates/root-consumer/.claude/hooks/guard-write.sh.example +56 -0
  293. package/templates/root-consumer/.claude/hooks/session-start.sh.example +50 -0
  294. package/templates/root-consumer/.claude/hooks/typecheck-stop.sh.example +18 -0
  295. package/templates/root-consumer/.claude/rules/consumer-ux.md.example +32 -0
  296. package/templates/root-consumer/.claude/rules/definition-of-done.md.example +32 -0
  297. package/templates/root-consumer/.claude/rules/framework.md.example +39 -0
  298. package/templates/root-consumer/.claude/rules/git.md.example +14 -0
  299. package/templates/root-consumer/.claude/rules/security.md.example +13 -0
  300. package/templates/root-consumer/.claude/settings.json.example +100 -4
  301. package/templates/root-consumer/.claude/skills/brainstorm/SKILL.md.example +0 -0
  302. package/templates/root-consumer/.claude/skills/build/SKILL.md.example +22 -27
  303. package/templates/root-consumer/.claude/skills/design/SKILL.md.example +0 -0
  304. package/templates/root-consumer/.claude/skills/design/output-template.md +0 -0
  305. package/templates/root-consumer/.claude/skills/grill/SKILL.md.example +26 -15
  306. package/templates/root-consumer/.claude/skills/polish/SKILL.md.example +50 -37
  307. package/templates/root-consumer/.claude/skills/techdebt/SKILL.md.example +0 -0
  308. package/templates/root-consumer/.cursor/mcp.json.example +0 -0
  309. package/templates/root-consumer/.cursor/rules/no-docs.mdc.example +5 -1
  310. package/templates/root-consumer/.dndev/args.json.example +0 -0
  311. package/templates/root-consumer/.dndev.secrets.example +0 -0
  312. package/templates/root-consumer/.env.example +0 -1
  313. package/templates/root-consumer/.gemini/settings.json.example +0 -0
  314. package/templates/root-consumer/.gitignore.example +1 -0
  315. package/templates/root-consumer/.mcp.json.example +0 -0
  316. package/templates/root-consumer/.prettierrc.cjs.example +0 -0
  317. package/templates/root-consumer/AGENTS.md.example +63 -0
  318. package/templates/root-consumer/CLAUDE.md.example +1 -1
  319. package/templates/root-consumer/README.md.example +11 -33
  320. package/templates/root-consumer/entities/index.ts.example +0 -0
  321. package/templates/root-consumer/eslint.config.js.example +0 -0
  322. package/templates/root-consumer/tsconfig.json.example +0 -0
  323. package/templates/app-demo/public/manifest.json.example +0 -10
  324. package/templates/app-dndev/public/manifest.json.example +0 -10
  325. package/templates/root-consumer/.claude/commands/brainstorm.md.example +0 -175
  326. package/templates/root-consumer/.claude/commands/build.md.example +0 -131
  327. package/templates/root-consumer/.claude/commands/design.md.example +0 -184
  328. package/templates/root-consumer/.claude/commands/grill.md.example +0 -135
  329. package/templates/root-consumer/.claude/commands/polish.md.example +0 -146
  330. package/templates/root-consumer/.claude/commands/techdebt.md.example +0 -28
  331. package/templates/root-consumer/.claude/statusline.py.example +0 -79
  332. package/templates/root-consumer/.clinerules.example +0 -1
  333. package/templates/root-consumer/.cursorrules.example +0 -1
  334. package/templates/root-consumer/.github/copilot-instructions.md.example +0 -1
  335. package/templates/root-consumer/.windsurfrules.example +0 -1
  336. package/templates/root-consumer/AI.md.example +0 -108
  337. package/templates/root-consumer/CONVENTIONS.md.example +0 -1
  338. package/templates/root-consumer/GEMINI.md.example +0 -1
  339. package/templates/root-consumer/guides/dndev/AGENT_START_HERE.md.example +0 -135
  340. package/templates/root-consumer/guides/dndev/COMPONENTS_ADV.md.example +0 -276
  341. package/templates/root-consumer/guides/dndev/COMPONENTS_ATOMIC.md.example +0 -180
  342. package/templates/root-consumer/guides/dndev/COMPONENTS_CRUD.md.example +0 -234
  343. package/templates/root-consumer/guides/dndev/COMPONENTS_UI.md.example +0 -136
  344. package/templates/root-consumer/guides/dndev/COMPONENT_API.md.example +0 -195
  345. package/templates/root-consumer/guides/dndev/ENV_SETUP.md.example +0 -219
  346. package/templates/root-consumer/guides/dndev/GOTCHAS.md.example +0 -197
  347. package/templates/root-consumer/guides/dndev/INDEX.md.example +0 -60
  348. package/templates/root-consumer/guides/dndev/SETUP_APP_CONFIG.md.example +0 -132
  349. package/templates/root-consumer/guides/dndev/SETUP_AUTH.md.example +0 -133
  350. package/templates/root-consumer/guides/dndev/SETUP_BILLING.md.example +0 -114
  351. package/templates/root-consumer/guides/dndev/SETUP_BLOG.md.example +0 -280
  352. package/templates/root-consumer/guides/dndev/SETUP_CICD.md.example +0 -115
  353. package/templates/root-consumer/guides/dndev/SETUP_CRUD.md.example +0 -334
  354. package/templates/root-consumer/guides/dndev/SETUP_FIREBASE.md.example +0 -231
  355. package/templates/root-consumer/guides/dndev/SETUP_FUNCTIONS.md.example +0 -9
  356. package/templates/root-consumer/guides/dndev/SETUP_I18N.md.example +0 -233
  357. package/templates/root-consumer/guides/dndev/SETUP_LAYOUTS.md.example +0 -158
  358. package/templates/root-consumer/guides/dndev/SETUP_OAUTH.md.example +0 -54
  359. package/templates/root-consumer/guides/dndev/SETUP_OAUTH_PROVIDERS.md.example +0 -60
  360. package/templates/root-consumer/guides/dndev/SETUP_PAGES.md.example +0 -205
  361. package/templates/root-consumer/guides/dndev/SETUP_PWA.md.example +0 -213
  362. package/templates/root-consumer/guides/dndev/SETUP_SOC2.md.example +0 -234
  363. package/templates/root-consumer/guides/dndev/SETUP_STRIPE.md.example +0 -62
  364. package/templates/root-consumer/guides/dndev/SETUP_SUPABASE.md.example +0 -215
  365. package/templates/root-consumer/guides/dndev/SETUP_TESTING.md.example +0 -184
  366. package/templates/root-consumer/guides/dndev/SETUP_THEMES.md.example +0 -111
  367. package/templates/root-consumer/guides/dndev/SETUP_VERCEL.md.example +0 -260
  368. package/templates/root-consumer/guides/dndev/USE_ROUTING.md.example +0 -499
  369. package/templates/root-consumer/guides/dndev/advanced/APP_CHECK.md.example +0 -111
  370. package/templates/root-consumer/guides/dndev/advanced/COOKIE_REFERENCE.md.example +0 -252
  371. package/templates/root-consumer/guides/dndev/advanced/EMULATORS.md.example +0 -48
  372. package/templates/root-consumer/guides/dndev/essences_reference.css.example +0 -288
  373. package/templates/root-consumer/guides/wai-way/WAI_WAY_CLI.md.example +0 -402
  374. package/templates/root-consumer/guides/wai-way/agents/architect.md.example +0 -78
  375. package/templates/root-consumer/guides/wai-way/agents/builder.md.example +0 -97
  376. package/templates/root-consumer/guides/wai-way/agents/extractor.md.example +0 -363
  377. package/templates/root-consumer/guides/wai-way/agents/polisher.md.example +0 -133
  378. package/templates/root-consumer/guides/wai-way/blueprints/0_brainstorm.md.example +0 -315
  379. package/templates/root-consumer/guides/wai-way/blueprints/1_scaffold.md.example +0 -133
  380. package/templates/root-consumer/guides/wai-way/blueprints/2_entities.md.example +0 -111
  381. package/templates/root-consumer/guides/wai-way/blueprints/3_compose.md.example +0 -150
  382. package/templates/root-consumer/guides/wai-way/blueprints/4_configure.md.example +0 -238
  383. package/templates/root-consumer/guides/wai-way/context_map.json.example +0 -127
  384. package/templates/root-consumer/guides/wai-way/entity_patterns.md.example +0 -839
  385. package/templates/root-consumer/guides/wai-way/hld_template.md.example +0 -138
  386. package/templates/root-consumer/guides/wai-way/lld_template.md.example +0 -103
  387. package/templates/root-consumer/guides/wai-way/page_patterns.md.example +0 -722
  388. package/templates/root-consumer/guides/wai-way/prd_template.md.example +0 -140
  389. package/templates/root-consumer/guides/wai-way/presets_guide.md.example +0 -217
  390. package/templates/root-consumer/guides/wai-way/spec_template.md.example +0 -313
@@ -4,11 +4,11 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
5
  var __getProtoOf = Object.getPrototypeOf;
6
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __require = /* @__PURE__ */ ((x2) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x2, {
8
- get: (a, b3) => (typeof require !== "undefined" ? require : a)[b3]
9
- }) : x2)(function(x2) {
7
+ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
8
+ get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
9
+ }) : x)(function(x) {
10
10
  if (typeof require !== "undefined") return require.apply(this, arguments);
11
- throw Error('Dynamic require of "' + x2 + '" is not supported');
11
+ throw Error('Dynamic require of "' + x + '" is not supported');
12
12
  });
13
13
  var __esm = (fn, res) => function __init() {
14
14
  return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
@@ -37,50 +37,456 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
37
37
  mod
38
38
  ));
39
39
 
40
+ // node_modules/.bun/fast-string-truncated-width@1.2.1/node_modules/fast-string-truncated-width/dist/utils.js
41
+ var isAmbiguous, isFullWidth, isWide;
42
+ var init_utils = __esm({
43
+ "node_modules/.bun/fast-string-truncated-width@1.2.1/node_modules/fast-string-truncated-width/dist/utils.js"() {
44
+ init_utils2();
45
+ isAmbiguous = (x) => {
46
+ return x === 161 || x === 164 || x === 167 || x === 168 || x === 170 || x === 173 || x === 174 || x >= 176 && x <= 180 || x >= 182 && x <= 186 || x >= 188 && x <= 191 || x === 198 || x === 208 || x === 215 || x === 216 || x >= 222 && x <= 225 || x === 230 || x >= 232 && x <= 234 || x === 236 || x === 237 || x === 240 || x === 242 || x === 243 || x >= 247 && x <= 250 || x === 252 || x === 254 || x === 257 || x === 273 || x === 275 || x === 283 || x === 294 || x === 295 || x === 299 || x >= 305 && x <= 307 || x === 312 || x >= 319 && x <= 322 || x === 324 || x >= 328 && x <= 331 || x === 333 || x === 338 || x === 339 || x === 358 || x === 359 || x === 363 || x === 462 || x === 464 || x === 466 || x === 468 || x === 470 || x === 472 || x === 474 || x === 476 || x === 593 || x === 609 || x === 708 || x === 711 || x >= 713 && x <= 715 || x === 717 || x === 720 || x >= 728 && x <= 731 || x === 733 || x === 735 || x >= 768 && x <= 879 || x >= 913 && x <= 929 || x >= 931 && x <= 937 || x >= 945 && x <= 961 || x >= 963 && x <= 969 || x === 1025 || x >= 1040 && x <= 1103 || x === 1105 || x === 8208 || x >= 8211 && x <= 8214 || x === 8216 || x === 8217 || x === 8220 || x === 8221 || x >= 8224 && x <= 8226 || x >= 8228 && x <= 8231 || x === 8240 || x === 8242 || x === 8243 || x === 8245 || x === 8251 || x === 8254 || x === 8308 || x === 8319 || x >= 8321 && x <= 8324 || x === 8364 || x === 8451 || x === 8453 || x === 8457 || x === 8467 || x === 8470 || x === 8481 || x === 8482 || x === 8486 || x === 8491 || x === 8531 || x === 8532 || x >= 8539 && x <= 8542 || x >= 8544 && x <= 8555 || x >= 8560 && x <= 8569 || x === 8585 || x >= 8592 && x <= 8601 || x === 8632 || x === 8633 || x === 8658 || x === 8660 || x === 8679 || x === 8704 || x === 8706 || x === 8707 || x === 8711 || x === 8712 || x === 8715 || x === 8719 || x === 8721 || x === 8725 || x === 8730 || x >= 8733 && x <= 8736 || x === 8739 || x === 8741 || x >= 8743 && x <= 8748 || x === 8750 || x >= 8756 && x <= 8759 || x === 8764 || x === 8765 || x === 8776 || x === 8780 || x === 8786 || x === 8800 || x === 8801 || x >= 8804 && x <= 8807 || x === 8810 || x === 8811 || x === 8814 || x === 8815 || x === 8834 || x === 8835 || x === 8838 || x === 8839 || x === 8853 || x === 8857 || x === 8869 || x === 8895 || x === 8978 || x >= 9312 && x <= 9449 || x >= 9451 && x <= 9547 || x >= 9552 && x <= 9587 || x >= 9600 && x <= 9615 || x >= 9618 && x <= 9621 || x === 9632 || x === 9633 || x >= 9635 && x <= 9641 || x === 9650 || x === 9651 || x === 9654 || x === 9655 || x === 9660 || x === 9661 || x === 9664 || x === 9665 || x >= 9670 && x <= 9672 || x === 9675 || x >= 9678 && x <= 9681 || x >= 9698 && x <= 9701 || x === 9711 || x === 9733 || x === 9734 || x === 9737 || x === 9742 || x === 9743 || x === 9756 || x === 9758 || x === 9792 || x === 9794 || x === 9824 || x === 9825 || x >= 9827 && x <= 9829 || x >= 9831 && x <= 9834 || x === 9836 || x === 9837 || x === 9839 || x === 9886 || x === 9887 || x === 9919 || x >= 9926 && x <= 9933 || x >= 9935 && x <= 9939 || x >= 9941 && x <= 9953 || x === 9955 || x === 9960 || x === 9961 || x >= 9963 && x <= 9969 || x === 9972 || x >= 9974 && x <= 9977 || x === 9979 || x === 9980 || x === 9982 || x === 9983 || x === 10045 || x >= 10102 && x <= 10111 || x >= 11094 && x <= 11097 || x >= 12872 && x <= 12879 || x >= 57344 && x <= 63743 || x >= 65024 && x <= 65039 || x === 65533 || x >= 127232 && x <= 127242 || x >= 127248 && x <= 127277 || x >= 127280 && x <= 127337 || x >= 127344 && x <= 127373 || x === 127375 || x === 127376 || x >= 127387 && x <= 127404 || x >= 917760 && x <= 917999 || x >= 983040 && x <= 1048573 || x >= 1048576 && x <= 1114109;
47
+ };
48
+ isFullWidth = (x) => {
49
+ return x === 12288 || x >= 65281 && x <= 65376 || x >= 65504 && x <= 65510;
50
+ };
51
+ isWide = (x) => {
52
+ return x >= 4352 && x <= 4447 || x === 8986 || x === 8987 || x === 9001 || x === 9002 || x >= 9193 && x <= 9196 || x === 9200 || x === 9203 || x === 9725 || x === 9726 || x === 9748 || x === 9749 || x >= 9800 && x <= 9811 || x === 9855 || x === 9875 || x === 9889 || x === 9898 || x === 9899 || x === 9917 || x === 9918 || x === 9924 || x === 9925 || x === 9934 || x === 9940 || x === 9962 || x === 9970 || x === 9971 || x === 9973 || x === 9978 || x === 9981 || x === 9989 || x === 9994 || x === 9995 || x === 10024 || x === 10060 || x === 10062 || x >= 10067 && x <= 10069 || x === 10071 || x >= 10133 && x <= 10135 || x === 10160 || x === 10175 || x === 11035 || x === 11036 || x === 11088 || x === 11093 || x >= 11904 && x <= 11929 || x >= 11931 && x <= 12019 || x >= 12032 && x <= 12245 || x >= 12272 && x <= 12287 || x >= 12289 && x <= 12350 || x >= 12353 && x <= 12438 || x >= 12441 && x <= 12543 || x >= 12549 && x <= 12591 || x >= 12593 && x <= 12686 || x >= 12688 && x <= 12771 || x >= 12783 && x <= 12830 || x >= 12832 && x <= 12871 || x >= 12880 && x <= 19903 || x >= 19968 && x <= 42124 || x >= 42128 && x <= 42182 || x >= 43360 && x <= 43388 || x >= 44032 && x <= 55203 || x >= 63744 && x <= 64255 || x >= 65040 && x <= 65049 || x >= 65072 && x <= 65106 || x >= 65108 && x <= 65126 || x >= 65128 && x <= 65131 || x >= 94176 && x <= 94180 || x === 94192 || x === 94193 || x >= 94208 && x <= 100343 || x >= 100352 && x <= 101589 || x >= 101632 && x <= 101640 || x >= 110576 && x <= 110579 || x >= 110581 && x <= 110587 || x === 110589 || x === 110590 || x >= 110592 && x <= 110882 || x === 110898 || x >= 110928 && x <= 110930 || x === 110933 || x >= 110948 && x <= 110951 || x >= 110960 && x <= 111355 || x === 126980 || x === 127183 || x === 127374 || x >= 127377 && x <= 127386 || x >= 127488 && x <= 127490 || x >= 127504 && x <= 127547 || x >= 127552 && x <= 127560 || x === 127568 || x === 127569 || x >= 127584 && x <= 127589 || x >= 127744 && x <= 127776 || x >= 127789 && x <= 127797 || x >= 127799 && x <= 127868 || x >= 127870 && x <= 127891 || x >= 127904 && x <= 127946 || x >= 127951 && x <= 127955 || x >= 127968 && x <= 127984 || x === 127988 || x >= 127992 && x <= 128062 || x === 128064 || x >= 128066 && x <= 128252 || x >= 128255 && x <= 128317 || x >= 128331 && x <= 128334 || x >= 128336 && x <= 128359 || x === 128378 || x === 128405 || x === 128406 || x === 128420 || x >= 128507 && x <= 128591 || x >= 128640 && x <= 128709 || x === 128716 || x >= 128720 && x <= 128722 || x >= 128725 && x <= 128727 || x >= 128732 && x <= 128735 || x === 128747 || x === 128748 || x >= 128756 && x <= 128764 || x >= 128992 && x <= 129003 || x === 129008 || x >= 129292 && x <= 129338 || x >= 129340 && x <= 129349 || x >= 129351 && x <= 129535 || x >= 129648 && x <= 129660 || x >= 129664 && x <= 129672 || x >= 129680 && x <= 129725 || x >= 129727 && x <= 129733 || x >= 129742 && x <= 129755 || x >= 129760 && x <= 129768 || x >= 129776 && x <= 129784 || x >= 131072 && x <= 196605 || x >= 196608 && x <= 262141;
53
+ };
54
+ }
55
+ });
56
+
57
+ // node_modules/.bun/fast-string-truncated-width@1.2.1/node_modules/fast-string-truncated-width/dist/index.js
58
+ var ANSI_RE, CONTROL_RE, TAB_RE, EMOJI_RE, LATIN_RE, MODIFIER_RE, NO_TRUNCATION, getStringTruncatedWidth, dist_default;
59
+ var init_dist = __esm({
60
+ "node_modules/.bun/fast-string-truncated-width@1.2.1/node_modules/fast-string-truncated-width/dist/index.js"() {
61
+ init_utils2();
62
+ init_utils();
63
+ ANSI_RE = /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/y;
64
+ CONTROL_RE = /[\x00-\x08\x0A-\x1F\x7F-\x9F]{1,1000}/y;
65
+ TAB_RE = /\t{1,1000}/y;
66
+ EMOJI_RE = new RegExp("[\\u{1F1E6}-\\u{1F1FF}]{2}|\\u{1F3F4}[\\u{E0061}-\\u{E007A}]{2}[\\u{E0030}-\\u{E0039}\\u{E0061}-\\u{E007A}]{1,3}\\u{E007F}|(?:\\p{Emoji}\\uFE0F\\u20E3?|\\p{Emoji_Modifier_Base}\\p{Emoji_Modifier}?|\\p{Emoji_Presentation})(?:\\u200D(?:\\p{Emoji_Modifier_Base}\\p{Emoji_Modifier}?|\\p{Emoji_Presentation}|\\p{Emoji}\\uFE0F\\u20E3?))*", "yu");
67
+ LATIN_RE = /(?:[\x20-\x7E\xA0-\xFF](?!\uFE0F)){1,1000}/y;
68
+ MODIFIER_RE = new RegExp("\\p{M}+", "gu");
69
+ NO_TRUNCATION = { limit: Infinity, ellipsis: "" };
70
+ getStringTruncatedWidth = (input, truncationOptions = {}, widthOptions = {}) => {
71
+ const LIMIT = truncationOptions.limit ?? Infinity;
72
+ const ELLIPSIS = truncationOptions.ellipsis ?? "";
73
+ const ELLIPSIS_WIDTH = truncationOptions?.ellipsisWidth ?? (ELLIPSIS ? getStringTruncatedWidth(ELLIPSIS, NO_TRUNCATION, widthOptions).width : 0);
74
+ const ANSI_WIDTH = widthOptions.ansiWidth ?? 0;
75
+ const CONTROL_WIDTH = widthOptions.controlWidth ?? 0;
76
+ const TAB_WIDTH = widthOptions.tabWidth ?? 8;
77
+ const AMBIGUOUS_WIDTH = widthOptions.ambiguousWidth ?? 1;
78
+ const EMOJI_WIDTH = widthOptions.emojiWidth ?? 2;
79
+ const FULL_WIDTH_WIDTH = widthOptions.fullWidthWidth ?? 2;
80
+ const REGULAR_WIDTH = widthOptions.regularWidth ?? 1;
81
+ const WIDE_WIDTH = widthOptions.wideWidth ?? 2;
82
+ let indexPrev = 0;
83
+ let index = 0;
84
+ let length = input.length;
85
+ let lengthExtra = 0;
86
+ let truncationEnabled = false;
87
+ let truncationIndex = length;
88
+ let truncationLimit = Math.max(0, LIMIT - ELLIPSIS_WIDTH);
89
+ let unmatchedStart = 0;
90
+ let unmatchedEnd = 0;
91
+ let width = 0;
92
+ let widthExtra = 0;
93
+ outer: while (true) {
94
+ if (unmatchedEnd > unmatchedStart || index >= length && index > indexPrev) {
95
+ const unmatched = input.slice(unmatchedStart, unmatchedEnd) || input.slice(indexPrev, index);
96
+ lengthExtra = 0;
97
+ for (const char of unmatched.replaceAll(MODIFIER_RE, "")) {
98
+ const codePoint = char.codePointAt(0) || 0;
99
+ if (isFullWidth(codePoint)) {
100
+ widthExtra = FULL_WIDTH_WIDTH;
101
+ } else if (isWide(codePoint)) {
102
+ widthExtra = WIDE_WIDTH;
103
+ } else if (AMBIGUOUS_WIDTH !== REGULAR_WIDTH && isAmbiguous(codePoint)) {
104
+ widthExtra = AMBIGUOUS_WIDTH;
105
+ } else {
106
+ widthExtra = REGULAR_WIDTH;
107
+ }
108
+ if (width + widthExtra > truncationLimit) {
109
+ truncationIndex = Math.min(truncationIndex, Math.max(unmatchedStart, indexPrev) + lengthExtra);
110
+ }
111
+ if (width + widthExtra > LIMIT) {
112
+ truncationEnabled = true;
113
+ break outer;
114
+ }
115
+ lengthExtra += char.length;
116
+ width += widthExtra;
117
+ }
118
+ unmatchedStart = unmatchedEnd = 0;
119
+ }
120
+ if (index >= length)
121
+ break;
122
+ LATIN_RE.lastIndex = index;
123
+ if (LATIN_RE.test(input)) {
124
+ lengthExtra = LATIN_RE.lastIndex - index;
125
+ widthExtra = lengthExtra * REGULAR_WIDTH;
126
+ if (width + widthExtra > truncationLimit) {
127
+ truncationIndex = Math.min(truncationIndex, index + Math.floor((truncationLimit - width) / REGULAR_WIDTH));
128
+ }
129
+ if (width + widthExtra > LIMIT) {
130
+ truncationEnabled = true;
131
+ break;
132
+ }
133
+ width += widthExtra;
134
+ unmatchedStart = indexPrev;
135
+ unmatchedEnd = index;
136
+ index = indexPrev = LATIN_RE.lastIndex;
137
+ continue;
138
+ }
139
+ ANSI_RE.lastIndex = index;
140
+ if (ANSI_RE.test(input)) {
141
+ if (width + ANSI_WIDTH > truncationLimit) {
142
+ truncationIndex = Math.min(truncationIndex, index);
143
+ }
144
+ if (width + ANSI_WIDTH > LIMIT) {
145
+ truncationEnabled = true;
146
+ break;
147
+ }
148
+ width += ANSI_WIDTH;
149
+ unmatchedStart = indexPrev;
150
+ unmatchedEnd = index;
151
+ index = indexPrev = ANSI_RE.lastIndex;
152
+ continue;
153
+ }
154
+ CONTROL_RE.lastIndex = index;
155
+ if (CONTROL_RE.test(input)) {
156
+ lengthExtra = CONTROL_RE.lastIndex - index;
157
+ widthExtra = lengthExtra * CONTROL_WIDTH;
158
+ if (width + widthExtra > truncationLimit) {
159
+ truncationIndex = Math.min(truncationIndex, index + Math.floor((truncationLimit - width) / CONTROL_WIDTH));
160
+ }
161
+ if (width + widthExtra > LIMIT) {
162
+ truncationEnabled = true;
163
+ break;
164
+ }
165
+ width += widthExtra;
166
+ unmatchedStart = indexPrev;
167
+ unmatchedEnd = index;
168
+ index = indexPrev = CONTROL_RE.lastIndex;
169
+ continue;
170
+ }
171
+ TAB_RE.lastIndex = index;
172
+ if (TAB_RE.test(input)) {
173
+ lengthExtra = TAB_RE.lastIndex - index;
174
+ widthExtra = lengthExtra * TAB_WIDTH;
175
+ if (width + widthExtra > truncationLimit) {
176
+ truncationIndex = Math.min(truncationIndex, index + Math.floor((truncationLimit - width) / TAB_WIDTH));
177
+ }
178
+ if (width + widthExtra > LIMIT) {
179
+ truncationEnabled = true;
180
+ break;
181
+ }
182
+ width += widthExtra;
183
+ unmatchedStart = indexPrev;
184
+ unmatchedEnd = index;
185
+ index = indexPrev = TAB_RE.lastIndex;
186
+ continue;
187
+ }
188
+ EMOJI_RE.lastIndex = index;
189
+ if (EMOJI_RE.test(input)) {
190
+ if (width + EMOJI_WIDTH > truncationLimit) {
191
+ truncationIndex = Math.min(truncationIndex, index);
192
+ }
193
+ if (width + EMOJI_WIDTH > LIMIT) {
194
+ truncationEnabled = true;
195
+ break;
196
+ }
197
+ width += EMOJI_WIDTH;
198
+ unmatchedStart = indexPrev;
199
+ unmatchedEnd = index;
200
+ index = indexPrev = EMOJI_RE.lastIndex;
201
+ continue;
202
+ }
203
+ index += 1;
204
+ }
205
+ return {
206
+ width: truncationEnabled ? truncationLimit : width,
207
+ index: truncationEnabled ? truncationIndex : length,
208
+ truncated: truncationEnabled,
209
+ ellipsed: truncationEnabled && LIMIT >= ELLIPSIS_WIDTH
210
+ };
211
+ };
212
+ dist_default = getStringTruncatedWidth;
213
+ }
214
+ });
215
+
216
+ // node_modules/.bun/fast-string-width@1.1.0/node_modules/fast-string-width/dist/index.js
217
+ var NO_TRUNCATION2, fastStringWidth, dist_default2;
218
+ var init_dist2 = __esm({
219
+ "node_modules/.bun/fast-string-width@1.1.0/node_modules/fast-string-width/dist/index.js"() {
220
+ init_utils2();
221
+ init_dist();
222
+ NO_TRUNCATION2 = {
223
+ limit: Infinity,
224
+ ellipsis: "",
225
+ ellipsisWidth: 0
226
+ };
227
+ fastStringWidth = (input, options = {}) => {
228
+ return dist_default(input, NO_TRUNCATION2, options).width;
229
+ };
230
+ dist_default2 = fastStringWidth;
231
+ }
232
+ });
233
+
234
+ // node_modules/.bun/fast-wrap-ansi@0.1.6/node_modules/fast-wrap-ansi/lib/main.js
235
+ function wrapAnsi(string, columns, options) {
236
+ return String(string).normalize().split(CRLF_OR_LF).map((line) => exec(line, columns, options)).join("\n");
237
+ }
238
+ var ESC, CSI, END_CODE, ANSI_ESCAPE_BELL, ANSI_CSI, ANSI_OSC, ANSI_SGR_TERMINATOR, ANSI_ESCAPE_LINK, GROUP_REGEX, getClosingCode, wrapAnsiCode, wrapAnsiHyperlink, wrapWord, stringVisibleTrimSpacesRight, exec, CRLF_OR_LF;
239
+ var init_main = __esm({
240
+ "node_modules/.bun/fast-wrap-ansi@0.1.6/node_modules/fast-wrap-ansi/lib/main.js"() {
241
+ init_utils2();
242
+ init_dist2();
243
+ ESC = "\x1B";
244
+ CSI = "\x9B";
245
+ END_CODE = 39;
246
+ ANSI_ESCAPE_BELL = "\x07";
247
+ ANSI_CSI = "[";
248
+ ANSI_OSC = "]";
249
+ ANSI_SGR_TERMINATOR = "m";
250
+ ANSI_ESCAPE_LINK = `${ANSI_OSC}8;;`;
251
+ GROUP_REGEX = new RegExp(`(?:\\${ANSI_CSI}(?<code>\\d+)m|\\${ANSI_ESCAPE_LINK}(?<uri>.*)${ANSI_ESCAPE_BELL})`, "y");
252
+ getClosingCode = (openingCode) => {
253
+ if (openingCode >= 30 && openingCode <= 37)
254
+ return 39;
255
+ if (openingCode >= 90 && openingCode <= 97)
256
+ return 39;
257
+ if (openingCode >= 40 && openingCode <= 47)
258
+ return 49;
259
+ if (openingCode >= 100 && openingCode <= 107)
260
+ return 49;
261
+ if (openingCode === 1 || openingCode === 2)
262
+ return 22;
263
+ if (openingCode === 3)
264
+ return 23;
265
+ if (openingCode === 4)
266
+ return 24;
267
+ if (openingCode === 7)
268
+ return 27;
269
+ if (openingCode === 8)
270
+ return 28;
271
+ if (openingCode === 9)
272
+ return 29;
273
+ if (openingCode === 0)
274
+ return 0;
275
+ return void 0;
276
+ };
277
+ wrapAnsiCode = (code) => `${ESC}${ANSI_CSI}${code}${ANSI_SGR_TERMINATOR}`;
278
+ wrapAnsiHyperlink = (url) => `${ESC}${ANSI_ESCAPE_LINK}${url}${ANSI_ESCAPE_BELL}`;
279
+ wrapWord = (rows, word, columns) => {
280
+ const characters = word[Symbol.iterator]();
281
+ let isInsideEscape = false;
282
+ let isInsideLinkEscape = false;
283
+ let lastRow = rows.at(-1);
284
+ let visible = lastRow === void 0 ? 0 : dist_default2(lastRow);
285
+ let currentCharacter = characters.next();
286
+ let nextCharacter = characters.next();
287
+ let rawCharacterIndex = 0;
288
+ while (!currentCharacter.done) {
289
+ const character = currentCharacter.value;
290
+ const characterLength = dist_default2(character);
291
+ if (visible + characterLength <= columns) {
292
+ rows[rows.length - 1] += character;
293
+ } else {
294
+ rows.push(character);
295
+ visible = 0;
296
+ }
297
+ if (character === ESC || character === CSI) {
298
+ isInsideEscape = true;
299
+ isInsideLinkEscape = word.startsWith(ANSI_ESCAPE_LINK, rawCharacterIndex + 1);
300
+ }
301
+ if (isInsideEscape) {
302
+ if (isInsideLinkEscape) {
303
+ if (character === ANSI_ESCAPE_BELL) {
304
+ isInsideEscape = false;
305
+ isInsideLinkEscape = false;
306
+ }
307
+ } else if (character === ANSI_SGR_TERMINATOR) {
308
+ isInsideEscape = false;
309
+ }
310
+ } else {
311
+ visible += characterLength;
312
+ if (visible === columns && !nextCharacter.done) {
313
+ rows.push("");
314
+ visible = 0;
315
+ }
316
+ }
317
+ currentCharacter = nextCharacter;
318
+ nextCharacter = characters.next();
319
+ rawCharacterIndex += character.length;
320
+ }
321
+ lastRow = rows.at(-1);
322
+ if (!visible && lastRow !== void 0 && lastRow.length && rows.length > 1) {
323
+ rows[rows.length - 2] += rows.pop();
324
+ }
325
+ };
326
+ stringVisibleTrimSpacesRight = (string) => {
327
+ const words = string.split(" ");
328
+ let last = words.length;
329
+ while (last) {
330
+ if (dist_default2(words[last - 1])) {
331
+ break;
332
+ }
333
+ last--;
334
+ }
335
+ if (last === words.length) {
336
+ return string;
337
+ }
338
+ return words.slice(0, last).join(" ") + words.slice(last).join("");
339
+ };
340
+ exec = (string, columns, options = {}) => {
341
+ if (options.trim !== false && string.trim() === "") {
342
+ return "";
343
+ }
344
+ let returnValue = "";
345
+ let escapeCode;
346
+ let escapeUrl;
347
+ const words = string.split(" ");
348
+ let rows = [""];
349
+ let rowLength = 0;
350
+ for (let index = 0; index < words.length; index++) {
351
+ const word = words[index];
352
+ if (options.trim !== false) {
353
+ const row = rows.at(-1) ?? "";
354
+ const trimmed = row.trimStart();
355
+ if (row.length !== trimmed.length) {
356
+ rows[rows.length - 1] = trimmed;
357
+ rowLength = dist_default2(trimmed);
358
+ }
359
+ }
360
+ if (index !== 0) {
361
+ if (rowLength >= columns && (options.wordWrap === false || options.trim === false)) {
362
+ rows.push("");
363
+ rowLength = 0;
364
+ }
365
+ if (rowLength || options.trim === false) {
366
+ rows[rows.length - 1] += " ";
367
+ rowLength++;
368
+ }
369
+ }
370
+ const wordLength = dist_default2(word);
371
+ if (options.hard && wordLength > columns) {
372
+ const remainingColumns = columns - rowLength;
373
+ const breaksStartingThisLine = 1 + Math.floor((wordLength - remainingColumns - 1) / columns);
374
+ const breaksStartingNextLine = Math.floor((wordLength - 1) / columns);
375
+ if (breaksStartingNextLine < breaksStartingThisLine) {
376
+ rows.push("");
377
+ }
378
+ wrapWord(rows, word, columns);
379
+ rowLength = dist_default2(rows.at(-1) ?? "");
380
+ continue;
381
+ }
382
+ if (rowLength + wordLength > columns && rowLength && wordLength) {
383
+ if (options.wordWrap === false && rowLength < columns) {
384
+ wrapWord(rows, word, columns);
385
+ rowLength = dist_default2(rows.at(-1) ?? "");
386
+ continue;
387
+ }
388
+ rows.push("");
389
+ rowLength = 0;
390
+ }
391
+ if (rowLength + wordLength > columns && options.wordWrap === false) {
392
+ wrapWord(rows, word, columns);
393
+ rowLength = dist_default2(rows.at(-1) ?? "");
394
+ continue;
395
+ }
396
+ rows[rows.length - 1] += word;
397
+ rowLength += wordLength;
398
+ }
399
+ if (options.trim !== false) {
400
+ rows = rows.map((row) => stringVisibleTrimSpacesRight(row));
401
+ }
402
+ const preString = rows.join("\n");
403
+ let inSurrogate = false;
404
+ for (let i = 0; i < preString.length; i++) {
405
+ const character = preString[i];
406
+ returnValue += character;
407
+ if (!inSurrogate) {
408
+ inSurrogate = character >= "\uD800" && character <= "\uDBFF";
409
+ } else {
410
+ continue;
411
+ }
412
+ if (character === ESC || character === CSI) {
413
+ GROUP_REGEX.lastIndex = i + 1;
414
+ const groupsResult = GROUP_REGEX.exec(preString);
415
+ const groups = groupsResult?.groups;
416
+ if (groups?.code !== void 0) {
417
+ const code = Number.parseFloat(groups.code);
418
+ escapeCode = code === END_CODE ? void 0 : code;
419
+ } else if (groups?.uri !== void 0) {
420
+ escapeUrl = groups.uri.length === 0 ? void 0 : groups.uri;
421
+ }
422
+ }
423
+ if (preString[i + 1] === "\n") {
424
+ if (escapeUrl) {
425
+ returnValue += wrapAnsiHyperlink("");
426
+ }
427
+ const closingCode = escapeCode ? getClosingCode(escapeCode) : void 0;
428
+ if (escapeCode && closingCode) {
429
+ returnValue += wrapAnsiCode(closingCode);
430
+ }
431
+ } else if (character === "\n") {
432
+ if (escapeCode && getClosingCode(escapeCode)) {
433
+ returnValue += wrapAnsiCode(escapeCode);
434
+ }
435
+ if (escapeUrl) {
436
+ returnValue += wrapAnsiHyperlink(escapeUrl);
437
+ }
438
+ }
439
+ }
440
+ return returnValue;
441
+ };
442
+ CRLF_OR_LF = /\r?\n/;
443
+ }
444
+ });
445
+
40
446
  // node_modules/.bun/sisteransi@1.0.5/node_modules/sisteransi/src/index.js
41
447
  var require_src = __commonJS({
42
448
  "node_modules/.bun/sisteransi@1.0.5/node_modules/sisteransi/src/index.js"(exports, module) {
43
449
  "use strict";
44
- init_utils();
45
- var ESC = "\x1B";
46
- var CSI = `${ESC}[`;
450
+ init_utils2();
451
+ var ESC2 = "\x1B";
452
+ var CSI2 = `${ESC2}[`;
47
453
  var beep = "\x07";
48
454
  var cursor = {
49
- to(x2, y3) {
50
- if (!y3) return `${CSI}${x2 + 1}G`;
51
- return `${CSI}${y3 + 1};${x2 + 1}H`;
455
+ to(x, y2) {
456
+ if (!y2) return `${CSI2}${x + 1}G`;
457
+ return `${CSI2}${y2 + 1};${x + 1}H`;
52
458
  },
53
- move(x2, y3) {
459
+ move(x, y2) {
54
460
  let ret = "";
55
- if (x2 < 0) ret += `${CSI}${-x2}D`;
56
- else if (x2 > 0) ret += `${CSI}${x2}C`;
57
- if (y3 < 0) ret += `${CSI}${-y3}A`;
58
- else if (y3 > 0) ret += `${CSI}${y3}B`;
461
+ if (x < 0) ret += `${CSI2}${-x}D`;
462
+ else if (x > 0) ret += `${CSI2}${x}C`;
463
+ if (y2 < 0) ret += `${CSI2}${-y2}A`;
464
+ else if (y2 > 0) ret += `${CSI2}${y2}B`;
59
465
  return ret;
60
466
  },
61
- up: (count = 1) => `${CSI}${count}A`,
62
- down: (count = 1) => `${CSI}${count}B`,
63
- forward: (count = 1) => `${CSI}${count}C`,
64
- backward: (count = 1) => `${CSI}${count}D`,
65
- nextLine: (count = 1) => `${CSI}E`.repeat(count),
66
- prevLine: (count = 1) => `${CSI}F`.repeat(count),
67
- left: `${CSI}G`,
68
- hide: `${CSI}?25l`,
69
- show: `${CSI}?25h`,
70
- save: `${ESC}7`,
71
- restore: `${ESC}8`
467
+ up: (count = 1) => `${CSI2}${count}A`,
468
+ down: (count = 1) => `${CSI2}${count}B`,
469
+ forward: (count = 1) => `${CSI2}${count}C`,
470
+ backward: (count = 1) => `${CSI2}${count}D`,
471
+ nextLine: (count = 1) => `${CSI2}E`.repeat(count),
472
+ prevLine: (count = 1) => `${CSI2}F`.repeat(count),
473
+ left: `${CSI2}G`,
474
+ hide: `${CSI2}?25l`,
475
+ show: `${CSI2}?25h`,
476
+ save: `${ESC2}7`,
477
+ restore: `${ESC2}8`
72
478
  };
73
479
  var scroll = {
74
- up: (count = 1) => `${CSI}S`.repeat(count),
75
- down: (count = 1) => `${CSI}T`.repeat(count)
480
+ up: (count = 1) => `${CSI2}S`.repeat(count),
481
+ down: (count = 1) => `${CSI2}T`.repeat(count)
76
482
  };
77
483
  var erase = {
78
- screen: `${CSI}2J`,
79
- up: (count = 1) => `${CSI}1J`.repeat(count),
80
- down: (count = 1) => `${CSI}J`.repeat(count),
81
- line: `${CSI}2K`,
82
- lineEnd: `${CSI}K`,
83
- lineStart: `${CSI}1K`,
484
+ screen: `${CSI2}2J`,
485
+ up: (count = 1) => `${CSI2}1J`.repeat(count),
486
+ down: (count = 1) => `${CSI2}J`.repeat(count),
487
+ line: `${CSI2}2K`,
488
+ lineEnd: `${CSI2}K`,
489
+ lineStart: `${CSI2}1K`,
84
490
  lines(count) {
85
491
  let clear = "";
86
492
  for (let i = 0; i < count; i++)
@@ -94,709 +500,587 @@ var require_src = __commonJS({
94
500
  }
95
501
  });
96
502
 
97
- // node_modules/.bun/picocolors@1.1.1/node_modules/picocolors/picocolors.js
98
- var require_picocolors = __commonJS({
99
- "node_modules/.bun/picocolors@1.1.1/node_modules/picocolors/picocolors.js"(exports, module) {
100
- init_utils();
101
- var p2 = process || {};
102
- var argv = p2.argv || [];
103
- var env = p2.env || {};
104
- var isColorSupported = !(!!env.NO_COLOR || argv.includes("--no-color")) && (!!env.FORCE_COLOR || argv.includes("--color") || p2.platform === "win32" || (p2.stdout || {}).isTTY && env.TERM !== "dumb" || !!env.CI);
105
- var formatter = (open, close, replace = open) => (input) => {
106
- let string = "" + input, index = string.indexOf(close, open.length);
107
- return ~index ? open + replaceClose(string, close, replace, index) + close : open + string + close;
108
- };
109
- var replaceClose = (string, close, replace, index) => {
110
- let result = "", cursor = 0;
111
- do {
112
- result += string.substring(cursor, index) + replace;
113
- cursor = index + close.length;
114
- index = string.indexOf(close, cursor);
115
- } while (~index);
116
- return result + string.substring(cursor);
117
- };
118
- var createColors = (enabled = isColorSupported) => {
119
- let f = enabled ? formatter : () => String;
120
- return {
121
- isColorSupported: enabled,
122
- reset: f("\x1B[0m", "\x1B[0m"),
123
- bold: f("\x1B[1m", "\x1B[22m", "\x1B[22m\x1B[1m"),
124
- dim: f("\x1B[2m", "\x1B[22m", "\x1B[22m\x1B[2m"),
125
- italic: f("\x1B[3m", "\x1B[23m"),
126
- underline: f("\x1B[4m", "\x1B[24m"),
127
- inverse: f("\x1B[7m", "\x1B[27m"),
128
- hidden: f("\x1B[8m", "\x1B[28m"),
129
- strikethrough: f("\x1B[9m", "\x1B[29m"),
130
- black: f("\x1B[30m", "\x1B[39m"),
131
- red: f("\x1B[31m", "\x1B[39m"),
132
- green: f("\x1B[32m", "\x1B[39m"),
133
- yellow: f("\x1B[33m", "\x1B[39m"),
134
- blue: f("\x1B[34m", "\x1B[39m"),
135
- magenta: f("\x1B[35m", "\x1B[39m"),
136
- cyan: f("\x1B[36m", "\x1B[39m"),
137
- white: f("\x1B[37m", "\x1B[39m"),
138
- gray: f("\x1B[90m", "\x1B[39m"),
139
- bgBlack: f("\x1B[40m", "\x1B[49m"),
140
- bgRed: f("\x1B[41m", "\x1B[49m"),
141
- bgGreen: f("\x1B[42m", "\x1B[49m"),
142
- bgYellow: f("\x1B[43m", "\x1B[49m"),
143
- bgBlue: f("\x1B[44m", "\x1B[49m"),
144
- bgMagenta: f("\x1B[45m", "\x1B[49m"),
145
- bgCyan: f("\x1B[46m", "\x1B[49m"),
146
- bgWhite: f("\x1B[47m", "\x1B[49m"),
147
- blackBright: f("\x1B[90m", "\x1B[39m"),
148
- redBright: f("\x1B[91m", "\x1B[39m"),
149
- greenBright: f("\x1B[92m", "\x1B[39m"),
150
- yellowBright: f("\x1B[93m", "\x1B[39m"),
151
- blueBright: f("\x1B[94m", "\x1B[39m"),
152
- magentaBright: f("\x1B[95m", "\x1B[39m"),
153
- cyanBright: f("\x1B[96m", "\x1B[39m"),
154
- whiteBright: f("\x1B[97m", "\x1B[39m"),
155
- bgBlackBright: f("\x1B[100m", "\x1B[49m"),
156
- bgRedBright: f("\x1B[101m", "\x1B[49m"),
157
- bgGreenBright: f("\x1B[102m", "\x1B[49m"),
158
- bgYellowBright: f("\x1B[103m", "\x1B[49m"),
159
- bgBlueBright: f("\x1B[104m", "\x1B[49m"),
160
- bgMagentaBright: f("\x1B[105m", "\x1B[49m"),
161
- bgCyanBright: f("\x1B[106m", "\x1B[49m"),
162
- bgWhiteBright: f("\x1B[107m", "\x1B[49m")
163
- };
164
- };
165
- module.exports = createColors();
166
- module.exports.createColors = createColors;
167
- }
168
- });
169
-
170
- // node_modules/.bun/@clack+core@0.5.0/node_modules/@clack/core/dist/index.mjs
171
- import { stdin as j, stdout as M } from "node:process";
172
- import * as g from "node:readline";
173
- import O from "node:readline";
174
- import { Writable as X } from "node:stream";
175
- function DD({ onlyFirst: e2 = false } = {}) {
176
- const t = ["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?(?:\\u0007|\\u001B\\u005C|\\u009C))", "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|");
177
- return new RegExp(t, e2 ? void 0 : "g");
178
- }
179
- function P(e2) {
180
- if (typeof e2 != "string") throw new TypeError(`Expected a \`string\`, got \`${typeof e2}\``);
181
- return e2.replace(uD, "");
182
- }
183
- function L(e2) {
184
- return e2 && e2.__esModule && Object.prototype.hasOwnProperty.call(e2, "default") ? e2.default : e2;
185
- }
186
- function p(e2, u2 = {}) {
187
- if (typeof e2 != "string" || e2.length === 0 || (u2 = { ambiguousIsNarrow: true, ...u2 }, e2 = P(e2), e2.length === 0)) return 0;
188
- e2 = e2.replace(sD(), " ");
189
- const t = u2.ambiguousIsNarrow ? 1 : 2;
190
- let F2 = 0;
191
- for (const s of e2) {
192
- const i = s.codePointAt(0);
193
- if (i <= 31 || i >= 127 && i <= 159 || i >= 768 && i <= 879) continue;
194
- switch (eD.eastAsianWidth(s)) {
195
- case "F":
196
- case "W":
197
- F2 += 2;
198
- break;
199
- case "A":
200
- F2 += t;
201
- break;
202
- default:
203
- F2 += 1;
204
- }
205
- }
206
- return F2;
503
+ // node_modules/.bun/@clack+core@1.2.0/node_modules/@clack/core/dist/index.mjs
504
+ import { styleText as y } from "node:util";
505
+ import { stdout as S, stdin as $ } from "node:process";
506
+ import * as _ from "node:readline";
507
+ import P from "node:readline";
508
+ import { ReadStream as D } from "node:tty";
509
+ function d(r, t2, e) {
510
+ if (!e.some((o) => !o.disabled)) return r;
511
+ const s = r + t2, i = Math.max(e.length - 1, 0), n = s < 0 ? i : s > i ? 0 : s;
512
+ return e[n].disabled ? d(n, t2 < 0 ? -1 : 1, e) : n;
207
513
  }
208
- function rD() {
209
- const e2 = /* @__PURE__ */ new Map();
210
- for (const [u2, t] of Object.entries(r)) {
211
- for (const [F2, s] of Object.entries(t)) r[F2] = { open: `\x1B[${s[0]}m`, close: `\x1B[${s[1]}m` }, t[F2] = r[F2], e2.set(s[0], s[1]);
212
- Object.defineProperty(r, u2, { value: t, enumerable: false });
213
- }
214
- return Object.defineProperty(r, "codes", { value: e2, enumerable: false }), r.color.close = "\x1B[39m", r.bgColor.close = "\x1B[49m", r.color.ansi = N(), r.color.ansi256 = I(), r.color.ansi16m = R(), r.bgColor.ansi = N(w), r.bgColor.ansi256 = I(w), r.bgColor.ansi16m = R(w), Object.defineProperties(r, { rgbToAnsi256: { value: (u2, t, F2) => u2 === t && t === F2 ? u2 < 8 ? 16 : u2 > 248 ? 231 : Math.round((u2 - 8) / 247 * 24) + 232 : 16 + 36 * Math.round(u2 / 255 * 5) + 6 * Math.round(t / 255 * 5) + Math.round(F2 / 255 * 5), enumerable: false }, hexToRgb: { value: (u2) => {
215
- const t = /[a-f\d]{6}|[a-f\d]{3}/i.exec(u2.toString(16));
216
- if (!t) return [0, 0, 0];
217
- let [F2] = t;
218
- F2.length === 3 && (F2 = [...F2].map((i) => i + i).join(""));
219
- const s = Number.parseInt(F2, 16);
220
- return [s >> 16 & 255, s >> 8 & 255, s & 255];
221
- }, enumerable: false }, hexToAnsi256: { value: (u2) => r.rgbToAnsi256(...r.hexToRgb(u2)), enumerable: false }, ansi256ToAnsi: { value: (u2) => {
222
- if (u2 < 8) return 30 + u2;
223
- if (u2 < 16) return 90 + (u2 - 8);
224
- let t, F2, s;
225
- if (u2 >= 232) t = ((u2 - 232) * 10 + 8) / 255, F2 = t, s = t;
226
- else {
227
- u2 -= 16;
228
- const C2 = u2 % 36;
229
- t = Math.floor(u2 / 36) / 5, F2 = Math.floor(C2 / 6) / 5, s = C2 % 6 / 5;
230
- }
231
- const i = Math.max(t, F2, s) * 2;
232
- if (i === 0) return 30;
233
- let D2 = 30 + (Math.round(s) << 2 | Math.round(F2) << 1 | Math.round(t));
234
- return i === 2 && (D2 += 60), D2;
235
- }, enumerable: false }, rgbToAnsi: { value: (u2, t, F2) => r.ansi256ToAnsi(r.rgbToAnsi256(u2, t, F2)), enumerable: false }, hexToAnsi: { value: (u2) => r.ansi256ToAnsi(r.hexToAnsi256(u2)), enumerable: false } }), r;
236
- }
237
- function Y(e2, u2, t) {
238
- return String(e2).normalize().replace(/\r\n/g, `
239
- `).split(`
240
- `).map((F2) => lD(F2, u2, t)).join(`
241
- `);
242
- }
243
- function $(e2, u2) {
244
- if (typeof e2 == "string") return B.aliases.get(e2) === u2;
245
- for (const t of e2) if (t !== void 0 && $(t, u2)) return true;
514
+ function V(r, t2) {
515
+ if (typeof r == "string") return u.aliases.get(r) === t2;
516
+ for (const e of r) if (e !== void 0 && V(e, t2)) return true;
246
517
  return false;
247
518
  }
248
- function BD(e2, u2) {
249
- if (e2 === u2) return;
250
- const t = e2.split(`
251
- `), F2 = u2.split(`
252
- `), s = [];
253
- for (let i = 0; i < Math.max(t.length, F2.length); i++) t[i] !== F2[i] && s.push(i);
254
- return s;
519
+ function j(r, t2) {
520
+ if (r === t2) return;
521
+ const e = r.split(`
522
+ `), s = t2.split(`
523
+ `), i = Math.max(e.length, s.length), n = [];
524
+ for (let o = 0; o < i; o++) e[o] !== s[o] && n.push(o);
525
+ return { lines: n, numLinesBefore: e.length, numLinesAfter: s.length, numLines: i };
255
526
  }
256
- function pD(e2) {
257
- return e2 === S;
527
+ function q(r) {
528
+ return r === C;
258
529
  }
259
- function m(e2, u2) {
260
- const t = e2;
261
- t.isTTY && t.setRawMode(u2);
530
+ function w(r, t2) {
531
+ const e = r;
532
+ e.isTTY && e.setRawMode(t2);
262
533
  }
263
- function fD({ input: e2 = j, output: u2 = M, overwrite: t = true, hideCursor: F2 = true } = {}) {
264
- const s = g.createInterface({ input: e2, output: u2, prompt: "", tabSize: 1 });
265
- g.emitKeypressEvents(e2, s), e2.isTTY && e2.setRawMode(true);
266
- const i = (D2, { name: C2, sequence: n }) => {
267
- const E = String(D2);
268
- if ($([E, C2, n], "cancel")) {
269
- F2 && u2.write(import_sisteransi.cursor.show), process.exit(0);
534
+ function z({ input: r = $, output: t2 = S, overwrite: e = true, hideCursor: s = true } = {}) {
535
+ const i = _.createInterface({ input: r, output: t2, prompt: "", tabSize: 1 });
536
+ _.emitKeypressEvents(r, i), r instanceof D && r.isTTY && r.setRawMode(true);
537
+ const n = (o, { name: a, sequence: h }) => {
538
+ const l = String(o);
539
+ if (V([l, a, h], "cancel")) {
540
+ s && t2.write(import_sisteransi.cursor.show), process.exit(0);
270
541
  return;
271
542
  }
272
- if (!t) return;
273
- const a = C2 === "return" ? 0 : -1, o2 = C2 === "return" ? -1 : 0;
274
- g.moveCursor(u2, a, o2, () => {
275
- g.clearLine(u2, 1, () => {
276
- e2.once("keypress", i);
543
+ if (!e) return;
544
+ const f = a === "return" ? 0 : -1, v = a === "return" ? -1 : 0;
545
+ _.moveCursor(t2, f, v, () => {
546
+ _.clearLine(t2, 1, () => {
547
+ r.once("keypress", n);
277
548
  });
278
549
  });
279
550
  };
280
- return F2 && u2.write(import_sisteransi.cursor.hide), e2.once("keypress", i), () => {
281
- e2.off("keypress", i), F2 && u2.write(import_sisteransi.cursor.show), e2.isTTY && !AD && e2.setRawMode(false), s.terminal = false, s.close();
551
+ return s && t2.write(import_sisteransi.cursor.hide), r.once("keypress", n), () => {
552
+ r.off("keypress", n), s && t2.write(import_sisteransi.cursor.show), r instanceof D && r.isTTY && !Y && r.setRawMode(false), i.terminal = false, i.close();
282
553
  };
283
554
  }
284
- var import_sisteransi, import_picocolors, uD, W, tD, eD, FD, sD, w, N, I, R, r, iD, CD, ED, d, oD, y, V, nD, G, _, z, K, aD, k, hD, lD, xD, B, AD, S, gD, vD, h, x, dD, A, OD, PD, J, LD, RD;
285
- var init_dist = __esm({
286
- "node_modules/.bun/@clack+core@0.5.0/node_modules/@clack/core/dist/index.mjs"() {
287
- init_utils();
555
+ function R(r, t2, e, s = e) {
556
+ const i = O(r ?? S);
557
+ return wrapAnsi(t2, i - e.length, { hard: true, trim: false }).split(`
558
+ `).map((n, o) => `${o === 0 ? s : e}${n}`).join(`
559
+ `);
560
+ }
561
+ var import_sisteransi, E, G, u, Y, C, O, A, p, Q, nt, at;
562
+ var init_dist3 = __esm({
563
+ "node_modules/.bun/@clack+core@1.2.0/node_modules/@clack/core/dist/index.mjs"() {
564
+ init_utils2();
565
+ init_main();
288
566
  import_sisteransi = __toESM(require_src(), 1);
289
- import_picocolors = __toESM(require_picocolors(), 1);
290
- uD = DD();
291
- W = { exports: {} };
292
- (function(e2) {
293
- var u2 = {};
294
- e2.exports = u2, u2.eastAsianWidth = function(F2) {
295
- var s = F2.charCodeAt(0), i = F2.length == 2 ? F2.charCodeAt(1) : 0, D2 = s;
296
- return 55296 <= s && s <= 56319 && 56320 <= i && i <= 57343 && (s &= 1023, i &= 1023, D2 = s << 10 | i, D2 += 65536), D2 == 12288 || 65281 <= D2 && D2 <= 65376 || 65504 <= D2 && D2 <= 65510 ? "F" : D2 == 8361 || 65377 <= D2 && D2 <= 65470 || 65474 <= D2 && D2 <= 65479 || 65482 <= D2 && D2 <= 65487 || 65490 <= D2 && D2 <= 65495 || 65498 <= D2 && D2 <= 65500 || 65512 <= D2 && D2 <= 65518 ? "H" : 4352 <= D2 && D2 <= 4447 || 4515 <= D2 && D2 <= 4519 || 4602 <= D2 && D2 <= 4607 || 9001 <= D2 && D2 <= 9002 || 11904 <= D2 && D2 <= 11929 || 11931 <= D2 && D2 <= 12019 || 12032 <= D2 && D2 <= 12245 || 12272 <= D2 && D2 <= 12283 || 12289 <= D2 && D2 <= 12350 || 12353 <= D2 && D2 <= 12438 || 12441 <= D2 && D2 <= 12543 || 12549 <= D2 && D2 <= 12589 || 12593 <= D2 && D2 <= 12686 || 12688 <= D2 && D2 <= 12730 || 12736 <= D2 && D2 <= 12771 || 12784 <= D2 && D2 <= 12830 || 12832 <= D2 && D2 <= 12871 || 12880 <= D2 && D2 <= 13054 || 13056 <= D2 && D2 <= 19903 || 19968 <= D2 && D2 <= 42124 || 42128 <= D2 && D2 <= 42182 || 43360 <= D2 && D2 <= 43388 || 44032 <= D2 && D2 <= 55203 || 55216 <= D2 && D2 <= 55238 || 55243 <= D2 && D2 <= 55291 || 63744 <= D2 && D2 <= 64255 || 65040 <= D2 && D2 <= 65049 || 65072 <= D2 && D2 <= 65106 || 65108 <= D2 && D2 <= 65126 || 65128 <= D2 && D2 <= 65131 || 110592 <= D2 && D2 <= 110593 || 127488 <= D2 && D2 <= 127490 || 127504 <= D2 && D2 <= 127546 || 127552 <= D2 && D2 <= 127560 || 127568 <= D2 && D2 <= 127569 || 131072 <= D2 && D2 <= 194367 || 177984 <= D2 && D2 <= 196605 || 196608 <= D2 && D2 <= 262141 ? "W" : 32 <= D2 && D2 <= 126 || 162 <= D2 && D2 <= 163 || 165 <= D2 && D2 <= 166 || D2 == 172 || D2 == 175 || 10214 <= D2 && D2 <= 10221 || 10629 <= D2 && D2 <= 10630 ? "Na" : D2 == 161 || D2 == 164 || 167 <= D2 && D2 <= 168 || D2 == 170 || 173 <= D2 && D2 <= 174 || 176 <= D2 && D2 <= 180 || 182 <= D2 && D2 <= 186 || 188 <= D2 && D2 <= 191 || D2 == 198 || D2 == 208 || 215 <= D2 && D2 <= 216 || 222 <= D2 && D2 <= 225 || D2 == 230 || 232 <= D2 && D2 <= 234 || 236 <= D2 && D2 <= 237 || D2 == 240 || 242 <= D2 && D2 <= 243 || 247 <= D2 && D2 <= 250 || D2 == 252 || D2 == 254 || D2 == 257 || D2 == 273 || D2 == 275 || D2 == 283 || 294 <= D2 && D2 <= 295 || D2 == 299 || 305 <= D2 && D2 <= 307 || D2 == 312 || 319 <= D2 && D2 <= 322 || D2 == 324 || 328 <= D2 && D2 <= 331 || D2 == 333 || 338 <= D2 && D2 <= 339 || 358 <= D2 && D2 <= 359 || D2 == 363 || D2 == 462 || D2 == 464 || D2 == 466 || D2 == 468 || D2 == 470 || D2 == 472 || D2 == 474 || D2 == 476 || D2 == 593 || D2 == 609 || D2 == 708 || D2 == 711 || 713 <= D2 && D2 <= 715 || D2 == 717 || D2 == 720 || 728 <= D2 && D2 <= 731 || D2 == 733 || D2 == 735 || 768 <= D2 && D2 <= 879 || 913 <= D2 && D2 <= 929 || 931 <= D2 && D2 <= 937 || 945 <= D2 && D2 <= 961 || 963 <= D2 && D2 <= 969 || D2 == 1025 || 1040 <= D2 && D2 <= 1103 || D2 == 1105 || D2 == 8208 || 8211 <= D2 && D2 <= 8214 || 8216 <= D2 && D2 <= 8217 || 8220 <= D2 && D2 <= 8221 || 8224 <= D2 && D2 <= 8226 || 8228 <= D2 && D2 <= 8231 || D2 == 8240 || 8242 <= D2 && D2 <= 8243 || D2 == 8245 || D2 == 8251 || D2 == 8254 || D2 == 8308 || D2 == 8319 || 8321 <= D2 && D2 <= 8324 || D2 == 8364 || D2 == 8451 || D2 == 8453 || D2 == 8457 || D2 == 8467 || D2 == 8470 || 8481 <= D2 && D2 <= 8482 || D2 == 8486 || D2 == 8491 || 8531 <= D2 && D2 <= 8532 || 8539 <= D2 && D2 <= 8542 || 8544 <= D2 && D2 <= 8555 || 8560 <= D2 && D2 <= 8569 || D2 == 8585 || 8592 <= D2 && D2 <= 8601 || 8632 <= D2 && D2 <= 8633 || D2 == 8658 || D2 == 8660 || D2 == 8679 || D2 == 8704 || 8706 <= D2 && D2 <= 8707 || 8711 <= D2 && D2 <= 8712 || D2 == 8715 || D2 == 8719 || D2 == 8721 || D2 == 8725 || D2 == 8730 || 8733 <= D2 && D2 <= 8736 || D2 == 8739 || D2 == 8741 || 8743 <= D2 && D2 <= 8748 || D2 == 8750 || 8756 <= D2 && D2 <= 8759 || 8764 <= D2 && D2 <= 8765 || D2 == 8776 || D2 == 8780 || D2 == 8786 || 8800 <= D2 && D2 <= 8801 || 8804 <= D2 && D2 <= 8807 || 8810 <= D2 && D2 <= 8811 || 8814 <= D2 && D2 <= 8815 || 8834 <= D2 && D2 <= 8835 || 8838 <= D2 && D2 <= 8839 || D2 == 8853 || D2 == 8857 || D2 == 8869 || D2 == 8895 || D2 == 8978 || 9312 <= D2 && D2 <= 9449 || 9451 <= D2 && D2 <= 9547 || 9552 <= D2 && D2 <= 9587 || 9600 <= D2 && D2 <= 9615 || 9618 <= D2 && D2 <= 9621 || 9632 <= D2 && D2 <= 9633 || 9635 <= D2 && D2 <= 9641 || 9650 <= D2 && D2 <= 9651 || 9654 <= D2 && D2 <= 9655 || 9660 <= D2 && D2 <= 9661 || 9664 <= D2 && D2 <= 9665 || 9670 <= D2 && D2 <= 9672 || D2 == 9675 || 9678 <= D2 && D2 <= 9681 || 9698 <= D2 && D2 <= 9701 || D2 == 9711 || 9733 <= D2 && D2 <= 9734 || D2 == 9737 || 9742 <= D2 && D2 <= 9743 || 9748 <= D2 && D2 <= 9749 || D2 == 9756 || D2 == 9758 || D2 == 9792 || D2 == 9794 || 9824 <= D2 && D2 <= 9825 || 9827 <= D2 && D2 <= 9829 || 9831 <= D2 && D2 <= 9834 || 9836 <= D2 && D2 <= 9837 || D2 == 9839 || 9886 <= D2 && D2 <= 9887 || 9918 <= D2 && D2 <= 9919 || 9924 <= D2 && D2 <= 9933 || 9935 <= D2 && D2 <= 9953 || D2 == 9955 || 9960 <= D2 && D2 <= 9983 || D2 == 10045 || D2 == 10071 || 10102 <= D2 && D2 <= 10111 || 11093 <= D2 && D2 <= 11097 || 12872 <= D2 && D2 <= 12879 || 57344 <= D2 && D2 <= 63743 || 65024 <= D2 && D2 <= 65039 || D2 == 65533 || 127232 <= D2 && D2 <= 127242 || 127248 <= D2 && D2 <= 127277 || 127280 <= D2 && D2 <= 127337 || 127344 <= D2 && D2 <= 127386 || 917760 <= D2 && D2 <= 917999 || 983040 <= D2 && D2 <= 1048573 || 1048576 <= D2 && D2 <= 1114109 ? "A" : "N";
297
- }, u2.characterLength = function(F2) {
298
- var s = this.eastAsianWidth(F2);
299
- return s == "F" || s == "W" || s == "A" ? 2 : 1;
300
- };
301
- function t(F2) {
302
- return F2.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g) || [];
303
- }
304
- u2.length = function(F2) {
305
- for (var s = t(F2), i = 0, D2 = 0; D2 < s.length; D2++) i = i + this.characterLength(s[D2]);
306
- return i;
307
- }, u2.slice = function(F2, s, i) {
308
- textLen = u2.length(F2), s = s || 0, i = i || 1, s < 0 && (s = textLen + s), i < 0 && (i = textLen + i);
309
- for (var D2 = "", C2 = 0, n = t(F2), E = 0; E < n.length; E++) {
310
- var a = n[E], o2 = u2.length(a);
311
- if (C2 >= s - (o2 == 2 ? 1 : 0)) if (C2 + o2 <= i) D2 += a;
312
- else break;
313
- C2 += o2;
314
- }
315
- return D2;
316
- };
317
- })(W);
318
- tD = W.exports;
319
- eD = L(tD);
320
- FD = function() {
321
- return /\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67)\uDB40\uDC7F|(?:\uD83E\uDDD1\uD83C\uDFFF\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFC-\uDFFF])|\uD83D\uDC68(?:\uD83C\uDFFB(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|[\u2695\u2696\u2708]\uFE0F|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))?|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])\uFE0F|\u200D(?:(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D[\uDC66\uDC67])|\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC)?|(?:\uD83D\uDC69(?:\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69]))|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC69(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83E\uDDD1(?:\u200D(?:\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDE36\u200D\uD83C\uDF2B|\uD83C\uDFF3\uFE0F\u200D\u26A7|\uD83D\uDC3B\u200D\u2744|(?:(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\uD83C\uDFF4\u200D\u2620|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])\u200D[\u2640\u2642]|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u3030\u303D\u3297\u3299]|\uD83C[\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]|\uD83D[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3])\uFE0F|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDE35\u200D\uD83D\uDCAB|\uD83D\uDE2E\u200D\uD83D\uDCA8|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83E\uDDD1(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83D\uDC69(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDF4\uD83C\uDDF2|\uD83D\uDC08\u200D\u2B1B|\u2764\uFE0F\u200D(?:\uD83D\uDD25|\uD83E\uDE79)|\uD83D\uDC41\uFE0F|\uD83C\uDFF3\uFE0F|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|[#\*0-9]\uFE0F\u20E3|\u2764\uFE0F|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|\uD83C\uDFF4|(?:[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270C\u270D]|\uD83D[\uDD74\uDD90])(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC08\uDC15\uDC3B\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE2E\uDE35\uDE36\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5]|\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD]|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF]|[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0D\uDD0E\uDD10-\uDD17\uDD1D\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78\uDD7A-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCB\uDDD0\uDDE0-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6]|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26A7\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5-\uDED7\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDD77\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g;
322
- };
323
- sD = L(FD);
324
- w = 10;
325
- N = (e2 = 0) => (u2) => `\x1B[${u2 + e2}m`;
326
- I = (e2 = 0) => (u2) => `\x1B[${38 + e2};5;${u2}m`;
327
- R = (e2 = 0) => (u2, t, F2) => `\x1B[${38 + e2};2;${u2};${t};${F2}m`;
328
- r = { modifier: { reset: [0, 0], bold: [1, 22], dim: [2, 22], italic: [3, 23], underline: [4, 24], overline: [53, 55], inverse: [7, 27], hidden: [8, 28], strikethrough: [9, 29] }, color: { black: [30, 39], red: [31, 39], green: [32, 39], yellow: [33, 39], blue: [34, 39], magenta: [35, 39], cyan: [36, 39], white: [37, 39], blackBright: [90, 39], gray: [90, 39], grey: [90, 39], redBright: [91, 39], greenBright: [92, 39], yellowBright: [93, 39], blueBright: [94, 39], magentaBright: [95, 39], cyanBright: [96, 39], whiteBright: [97, 39] }, bgColor: { bgBlack: [40, 49], bgRed: [41, 49], bgGreen: [42, 49], bgYellow: [43, 49], bgBlue: [44, 49], bgMagenta: [45, 49], bgCyan: [46, 49], bgWhite: [47, 49], bgBlackBright: [100, 49], bgGray: [100, 49], bgGrey: [100, 49], bgRedBright: [101, 49], bgGreenBright: [102, 49], bgYellowBright: [103, 49], bgBlueBright: [104, 49], bgMagentaBright: [105, 49], bgCyanBright: [106, 49], bgWhiteBright: [107, 49] } };
329
- Object.keys(r.modifier);
330
- iD = Object.keys(r.color);
331
- CD = Object.keys(r.bgColor);
332
- [...iD, ...CD];
333
- ED = rD();
334
- d = /* @__PURE__ */ new Set(["\x1B", "\x9B"]);
335
- oD = 39;
336
- y = "\x07";
337
- V = "[";
338
- nD = "]";
339
- G = "m";
340
- _ = `${nD}8;;`;
341
- z = (e2) => `${d.values().next().value}${V}${e2}${G}`;
342
- K = (e2) => `${d.values().next().value}${_}${e2}${y}`;
343
- aD = (e2) => e2.split(" ").map((u2) => p(u2));
344
- k = (e2, u2, t) => {
345
- const F2 = [...u2];
346
- let s = false, i = false, D2 = p(P(e2[e2.length - 1]));
347
- for (const [C2, n] of F2.entries()) {
348
- const E = p(n);
349
- if (D2 + E <= t ? e2[e2.length - 1] += n : (e2.push(n), D2 = 0), d.has(n) && (s = true, i = F2.slice(C2 + 1).join("").startsWith(_)), s) {
350
- i ? n === y && (s = false, i = false) : n === G && (s = false);
351
- continue;
352
- }
353
- D2 += E, D2 === t && C2 < F2.length - 1 && (e2.push(""), D2 = 0);
354
- }
355
- !D2 && e2[e2.length - 1].length > 0 && e2.length > 1 && (e2[e2.length - 2] += e2.pop());
356
- };
357
- hD = (e2) => {
358
- const u2 = e2.split(" ");
359
- let t = u2.length;
360
- for (; t > 0 && !(p(u2[t - 1]) > 0); ) t--;
361
- return t === u2.length ? e2 : u2.slice(0, t).join(" ") + u2.slice(t).join("");
362
- };
363
- lD = (e2, u2, t = {}) => {
364
- if (t.trim !== false && e2.trim() === "") return "";
365
- let F2 = "", s, i;
366
- const D2 = aD(e2);
367
- let C2 = [""];
368
- for (const [E, a] of e2.split(" ").entries()) {
369
- t.trim !== false && (C2[C2.length - 1] = C2[C2.length - 1].trimStart());
370
- let o2 = p(C2[C2.length - 1]);
371
- if (E !== 0 && (o2 >= u2 && (t.wordWrap === false || t.trim === false) && (C2.push(""), o2 = 0), (o2 > 0 || t.trim === false) && (C2[C2.length - 1] += " ", o2++)), t.hard && D2[E] > u2) {
372
- const c = u2 - o2, f = 1 + Math.floor((D2[E] - c - 1) / u2);
373
- Math.floor((D2[E] - 1) / u2) < f && C2.push(""), k(C2, a, u2);
374
- continue;
375
- }
376
- if (o2 + D2[E] > u2 && o2 > 0 && D2[E] > 0) {
377
- if (t.wordWrap === false && o2 < u2) {
378
- k(C2, a, u2);
379
- continue;
380
- }
381
- C2.push("");
382
- }
383
- if (o2 + D2[E] > u2 && t.wordWrap === false) {
384
- k(C2, a, u2);
385
- continue;
386
- }
387
- C2[C2.length - 1] += a;
388
- }
389
- t.trim !== false && (C2 = C2.map((E) => hD(E)));
390
- const n = [...C2.join(`
391
- `)];
392
- for (const [E, a] of n.entries()) {
393
- if (F2 += a, d.has(a)) {
394
- const { groups: c } = new RegExp(`(?:\\${V}(?<code>\\d+)m|\\${_}(?<uri>.*)${y})`).exec(n.slice(E).join("")) || { groups: {} };
395
- if (c.code !== void 0) {
396
- const f = Number.parseFloat(c.code);
397
- s = f === oD ? void 0 : f;
398
- } else c.uri !== void 0 && (i = c.uri.length === 0 ? void 0 : c.uri);
399
- }
400
- const o2 = ED.codes.get(Number(s));
401
- n[E + 1] === `
402
- ` ? (i && (F2 += K("")), s && o2 && (F2 += z(o2))) : a === `
403
- ` && (s && o2 && (F2 += z(s)), i && (F2 += K(i)));
404
- }
405
- return F2;
406
- };
407
- xD = ["up", "down", "left", "right", "space", "enter", "cancel"];
408
- B = { actions: new Set(xD), aliases: /* @__PURE__ */ new Map([["k", "up"], ["j", "down"], ["h", "left"], ["l", "right"], ["", "cancel"], ["escape", "cancel"]]) };
409
- AD = globalThis.process.platform.startsWith("win");
410
- S = /* @__PURE__ */ Symbol("clack:cancel");
411
- gD = Object.defineProperty;
412
- vD = (e2, u2, t) => u2 in e2 ? gD(e2, u2, { enumerable: true, configurable: true, writable: true, value: t }) : e2[u2] = t;
413
- h = (e2, u2, t) => (vD(e2, typeof u2 != "symbol" ? u2 + "" : u2, t), t);
414
- x = class {
415
- constructor(u2, t = true) {
416
- h(this, "input"), h(this, "output"), h(this, "_abortSignal"), h(this, "rl"), h(this, "opts"), h(this, "_render"), h(this, "_track", false), h(this, "_prevFrame", ""), h(this, "_subscribers", /* @__PURE__ */ new Map()), h(this, "_cursor", 0), h(this, "state", "initial"), h(this, "error", ""), h(this, "value");
417
- const { input: F2 = j, output: s = M, render: i, signal: D2, ...C2 } = u2;
418
- this.opts = C2, this.onKeypress = this.onKeypress.bind(this), this.close = this.close.bind(this), this.render = this.render.bind(this), this._render = i.bind(this), this._track = t, this._abortSignal = D2, this.input = F2, this.output = s;
567
+ E = ["up", "down", "left", "right", "space", "enter", "cancel"];
568
+ G = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
569
+ u = { actions: new Set(E), aliases: /* @__PURE__ */ new Map([["k", "up"], ["j", "down"], ["h", "left"], ["l", "right"], ["", "cancel"], ["escape", "cancel"]]), messages: { cancel: "Canceled", error: "Something went wrong" }, withGuide: true, date: { monthNames: [...G], messages: { required: "Please enter a valid date", invalidMonth: "There are only 12 months in a year", invalidDay: (r, t2) => `There are only ${r} days in ${t2}`, afterMin: (r) => `Date must be on or after ${r.toISOString().slice(0, 10)}`, beforeMax: (r) => `Date must be on or before ${r.toISOString().slice(0, 10)}` } } };
570
+ Y = globalThis.process.platform.startsWith("win");
571
+ C = /* @__PURE__ */ Symbol("clack:cancel");
572
+ O = (r) => "columns" in r && typeof r.columns == "number" ? r.columns : 80;
573
+ A = (r) => "rows" in r && typeof r.rows == "number" ? r.rows : 20;
574
+ p = class {
575
+ input;
576
+ output;
577
+ _abortSignal;
578
+ rl;
579
+ opts;
580
+ _render;
581
+ _track = false;
582
+ _prevFrame = "";
583
+ _subscribers = /* @__PURE__ */ new Map();
584
+ _cursor = 0;
585
+ state = "initial";
586
+ error = "";
587
+ value;
588
+ userInput = "";
589
+ constructor(t2, e = true) {
590
+ const { input: s = $, output: i = S, render: n, signal: o, ...a } = t2;
591
+ this.opts = a, this.onKeypress = this.onKeypress.bind(this), this.close = this.close.bind(this), this.render = this.render.bind(this), this._render = n.bind(this), this._track = e, this._abortSignal = o, this.input = s, this.output = i;
419
592
  }
420
593
  unsubscribe() {
421
594
  this._subscribers.clear();
422
595
  }
423
- setSubscriber(u2, t) {
424
- const F2 = this._subscribers.get(u2) ?? [];
425
- F2.push(t), this._subscribers.set(u2, F2);
596
+ setSubscriber(t2, e) {
597
+ const s = this._subscribers.get(t2) ?? [];
598
+ s.push(e), this._subscribers.set(t2, s);
426
599
  }
427
- on(u2, t) {
428
- this.setSubscriber(u2, { cb: t });
600
+ on(t2, e) {
601
+ this.setSubscriber(t2, { cb: e });
429
602
  }
430
- once(u2, t) {
431
- this.setSubscriber(u2, { cb: t, once: true });
603
+ once(t2, e) {
604
+ this.setSubscriber(t2, { cb: e, once: true });
432
605
  }
433
- emit(u2, ...t) {
434
- const F2 = this._subscribers.get(u2) ?? [], s = [];
435
- for (const i of F2) i.cb(...t), i.once && s.push(() => F2.splice(F2.indexOf(i), 1));
436
- for (const i of s) i();
606
+ emit(t2, ...e) {
607
+ const s = this._subscribers.get(t2) ?? [], i = [];
608
+ for (const n of s) n.cb(...e), n.once && i.push(() => s.splice(s.indexOf(n), 1));
609
+ for (const n of i) n();
437
610
  }
438
611
  prompt() {
439
- return new Promise((u2, t) => {
612
+ return new Promise((t2) => {
440
613
  if (this._abortSignal) {
441
- if (this._abortSignal.aborted) return this.state = "cancel", this.close(), u2(S);
614
+ if (this._abortSignal.aborted) return this.state = "cancel", this.close(), t2(C);
442
615
  this._abortSignal.addEventListener("abort", () => {
443
616
  this.state = "cancel", this.close();
444
617
  }, { once: true });
445
618
  }
446
- const F2 = new X();
447
- F2._write = (s, i, D2) => {
448
- this._track && (this.value = this.rl?.line.replace(/\t/g, ""), this._cursor = this.rl?.cursor ?? 0, this.emit("value", this.value)), D2();
449
- }, this.input.pipe(F2), this.rl = O.createInterface({ input: this.input, output: F2, tabSize: 2, prompt: "", escapeCodeTimeout: 50, terminal: true }), O.emitKeypressEvents(this.input, this.rl), this.rl.prompt(), this.opts.initialValue !== void 0 && this._track && this.rl.write(this.opts.initialValue), this.input.on("keypress", this.onKeypress), m(this.input, true), this.output.on("resize", this.render), this.render(), this.once("submit", () => {
450
- this.output.write(import_sisteransi.cursor.show), this.output.off("resize", this.render), m(this.input, false), u2(this.value);
619
+ this.rl = P.createInterface({ input: this.input, tabSize: 2, prompt: "", escapeCodeTimeout: 50, terminal: true }), this.rl.prompt(), this.opts.initialUserInput !== void 0 && this._setUserInput(this.opts.initialUserInput, true), this.input.on("keypress", this.onKeypress), w(this.input, true), this.output.on("resize", this.render), this.render(), this.once("submit", () => {
620
+ this.output.write(import_sisteransi.cursor.show), this.output.off("resize", this.render), w(this.input, false), t2(this.value);
451
621
  }), this.once("cancel", () => {
452
- this.output.write(import_sisteransi.cursor.show), this.output.off("resize", this.render), m(this.input, false), u2(S);
622
+ this.output.write(import_sisteransi.cursor.show), this.output.off("resize", this.render), w(this.input, false), t2(C);
453
623
  });
454
624
  });
455
625
  }
456
- onKeypress(u2, t) {
457
- if (this.state === "error" && (this.state = "active"), t?.name && (!this._track && B.aliases.has(t.name) && this.emit("cursor", B.aliases.get(t.name)), B.actions.has(t.name) && this.emit("cursor", t.name)), u2 && (u2.toLowerCase() === "y" || u2.toLowerCase() === "n") && this.emit("confirm", u2.toLowerCase() === "y"), u2 === " " && this.opts.placeholder && (this.value || (this.rl?.write(this.opts.placeholder), this.emit("value", this.opts.placeholder))), u2 && this.emit("key", u2.toLowerCase()), t?.name === "return") {
626
+ _isActionKey(t2, e) {
627
+ return t2 === " ";
628
+ }
629
+ _setValue(t2) {
630
+ this.value = t2, this.emit("value", this.value);
631
+ }
632
+ _setUserInput(t2, e) {
633
+ this.userInput = t2 ?? "", this.emit("userInput", this.userInput), e && this._track && this.rl && (this.rl.write(this.userInput), this._cursor = this.rl.cursor);
634
+ }
635
+ _clearUserInput() {
636
+ this.rl?.write(null, { ctrl: true, name: "u" }), this._setUserInput("");
637
+ }
638
+ onKeypress(t2, e) {
639
+ if (this._track && e.name !== "return" && (e.name && this._isActionKey(t2, e) && this.rl?.write(null, { ctrl: true, name: "h" }), this._cursor = this.rl?.cursor ?? 0, this._setUserInput(this.rl?.line)), this.state === "error" && (this.state = "active"), e?.name && (!this._track && u.aliases.has(e.name) && this.emit("cursor", u.aliases.get(e.name)), u.actions.has(e.name) && this.emit("cursor", e.name)), t2 && (t2.toLowerCase() === "y" || t2.toLowerCase() === "n") && this.emit("confirm", t2.toLowerCase() === "y"), this.emit("key", t2?.toLowerCase(), e), e?.name === "return") {
458
640
  if (this.opts.validate) {
459
- const F2 = this.opts.validate(this.value);
460
- F2 && (this.error = F2 instanceof Error ? F2.message : F2, this.state = "error", this.rl?.write(this.value));
641
+ const s = this.opts.validate(this.value);
642
+ s && (this.error = s instanceof Error ? s.message : s, this.state = "error", this.rl?.write(this.userInput));
461
643
  }
462
644
  this.state !== "error" && (this.state = "submit");
463
645
  }
464
- $([u2, t?.name, t?.sequence], "cancel") && (this.state = "cancel"), (this.state === "submit" || this.state === "cancel") && this.emit("finalize"), this.render(), (this.state === "submit" || this.state === "cancel") && this.close();
646
+ V([t2, e?.name, e?.sequence], "cancel") && (this.state = "cancel"), (this.state === "submit" || this.state === "cancel") && this.emit("finalize"), this.render(), (this.state === "submit" || this.state === "cancel") && this.close();
465
647
  }
466
648
  close() {
467
649
  this.input.unpipe(), this.input.removeListener("keypress", this.onKeypress), this.output.write(`
468
- `), m(this.input, false), this.rl?.close(), this.rl = void 0, this.emit(`${this.state}`, this.value), this.unsubscribe();
650
+ `), w(this.input, false), this.rl?.close(), this.rl = void 0, this.emit(`${this.state}`, this.value), this.unsubscribe();
469
651
  }
470
652
  restoreCursor() {
471
- const u2 = Y(this._prevFrame, process.stdout.columns, { hard: true }).split(`
653
+ const t2 = wrapAnsi(this._prevFrame, process.stdout.columns, { hard: true, trim: false }).split(`
472
654
  `).length - 1;
473
- this.output.write(import_sisteransi.cursor.move(-999, u2 * -1));
655
+ this.output.write(import_sisteransi.cursor.move(-999, t2 * -1));
474
656
  }
475
657
  render() {
476
- const u2 = Y(this._render(this) ?? "", process.stdout.columns, { hard: true });
477
- if (u2 !== this._prevFrame) {
658
+ const t2 = wrapAnsi(this._render(this) ?? "", process.stdout.columns, { hard: true, trim: false });
659
+ if (t2 !== this._prevFrame) {
478
660
  if (this.state === "initial") this.output.write(import_sisteransi.cursor.hide);
479
661
  else {
480
- const t = BD(this._prevFrame, u2);
481
- if (this.restoreCursor(), t && t?.length === 1) {
482
- const F2 = t[0];
483
- this.output.write(import_sisteransi.cursor.move(0, F2)), this.output.write(import_sisteransi.erase.lines(1));
484
- const s = u2.split(`
662
+ const e = j(this._prevFrame, t2), s = A(this.output);
663
+ if (this.restoreCursor(), e) {
664
+ const i = Math.max(0, e.numLinesAfter - s), n = Math.max(0, e.numLinesBefore - s);
665
+ let o = e.lines.find((a) => a >= i);
666
+ if (o === void 0) {
667
+ this._prevFrame = t2;
668
+ return;
669
+ }
670
+ if (e.lines.length === 1) {
671
+ this.output.write(import_sisteransi.cursor.move(0, o - n)), this.output.write(import_sisteransi.erase.lines(1));
672
+ const a = t2.split(`
485
673
  `);
486
- this.output.write(s[F2]), this._prevFrame = u2, this.output.write(import_sisteransi.cursor.move(0, s.length - F2 - 1));
487
- return;
488
- }
489
- if (t && t?.length > 1) {
490
- const F2 = t[0];
491
- this.output.write(import_sisteransi.cursor.move(0, F2)), this.output.write(import_sisteransi.erase.down());
492
- const s = u2.split(`
493
- `).slice(F2);
494
- this.output.write(s.join(`
495
- `)), this._prevFrame = u2;
496
- return;
674
+ this.output.write(a[o]), this._prevFrame = t2, this.output.write(import_sisteransi.cursor.move(0, a.length - o - 1));
675
+ return;
676
+ } else if (e.lines.length > 1) {
677
+ if (i < n) o = i;
678
+ else {
679
+ const h = o - n;
680
+ h > 0 && this.output.write(import_sisteransi.cursor.move(0, h));
681
+ }
682
+ this.output.write(import_sisteransi.erase.down());
683
+ const a = t2.split(`
684
+ `).slice(o);
685
+ this.output.write(a.join(`
686
+ `)), this._prevFrame = t2;
687
+ return;
688
+ }
497
689
  }
498
690
  this.output.write(import_sisteransi.erase.down());
499
691
  }
500
- this.output.write(u2), this.state === "initial" && (this.state = "active"), this._prevFrame = u2;
692
+ this.output.write(t2), this.state === "initial" && (this.state = "active"), this._prevFrame = t2;
501
693
  }
502
694
  }
503
695
  };
504
- dD = class extends x {
696
+ Q = class extends p {
505
697
  get cursor() {
506
698
  return this.value ? 0 : 1;
507
699
  }
508
700
  get _value() {
509
701
  return this.cursor === 0;
510
702
  }
511
- constructor(u2) {
512
- super(u2, false), this.value = !!u2.initialValue, this.on("value", () => {
703
+ constructor(t2) {
704
+ super(t2, false), this.value = !!t2.initialValue, this.on("userInput", () => {
513
705
  this.value = this._value;
514
- }), this.on("confirm", (t) => {
515
- this.output.write(import_sisteransi.cursor.move(0, -1)), this.value = t, this.state = "submit", this.close();
706
+ }), this.on("confirm", (e) => {
707
+ this.output.write(import_sisteransi.cursor.move(0, -1)), this.value = e, this.state = "submit", this.close();
516
708
  }), this.on("cursor", () => {
517
709
  this.value = !this.value;
518
710
  });
519
711
  }
520
712
  };
521
- A = /* @__PURE__ */ new WeakMap();
522
- OD = Object.defineProperty;
523
- PD = (e2, u2, t) => u2 in e2 ? OD(e2, u2, { enumerable: true, configurable: true, writable: true, value: t }) : e2[u2] = t;
524
- J = (e2, u2, t) => (PD(e2, typeof u2 != "symbol" ? u2 + "" : u2, t), t);
525
- LD = class extends x {
526
- constructor(u2) {
527
- super(u2, false), J(this, "options"), J(this, "cursor", 0), this.options = u2.options, this.cursor = this.options.findIndex(({ value: t }) => t === u2.initialValue), this.cursor === -1 && (this.cursor = 0), this.changeValue(), this.on("cursor", (t) => {
528
- switch (t) {
713
+ nt = class extends p {
714
+ options;
715
+ cursor = 0;
716
+ get _selectedValue() {
717
+ return this.options[this.cursor];
718
+ }
719
+ changeValue() {
720
+ this.value = this._selectedValue.value;
721
+ }
722
+ constructor(t2) {
723
+ super(t2, false), this.options = t2.options;
724
+ const e = this.options.findIndex(({ value: i }) => i === t2.initialValue), s = e === -1 ? 0 : e;
725
+ this.cursor = this.options[s].disabled ? d(s, 1, this.options) : s, this.changeValue(), this.on("cursor", (i) => {
726
+ switch (i) {
529
727
  case "left":
530
728
  case "up":
531
- this.cursor = this.cursor === 0 ? this.options.length - 1 : this.cursor - 1;
729
+ this.cursor = d(this.cursor, -1, this.options);
532
730
  break;
533
731
  case "down":
534
732
  case "right":
535
- this.cursor = this.cursor === this.options.length - 1 ? 0 : this.cursor + 1;
733
+ this.cursor = d(this.cursor, 1, this.options);
536
734
  break;
537
735
  }
538
736
  this.changeValue();
539
737
  });
540
738
  }
541
- get _value() {
542
- return this.options[this.cursor];
543
- }
544
- changeValue() {
545
- this.value = this._value.value;
546
- }
547
739
  };
548
- RD = class extends x {
549
- get valueWithCursor() {
550
- if (this.state === "submit") return this.value;
551
- if (this.cursor >= this.value.length) return `${this.value}\u2588`;
552
- const u2 = this.value.slice(0, this.cursor), [t, ...F2] = this.value.slice(this.cursor);
553
- return `${u2}${import_picocolors.default.inverse(t)}${F2.join("")}`;
740
+ at = class extends p {
741
+ get userInputWithCursor() {
742
+ if (this.state === "submit") return this.userInput;
743
+ const t2 = this.userInput;
744
+ if (this.cursor >= t2.length) return `${this.userInput}\u2588`;
745
+ const e = t2.slice(0, this.cursor), [s, ...i] = t2.slice(this.cursor);
746
+ return `${e}${y("inverse", s)}${i.join("")}`;
554
747
  }
555
748
  get cursor() {
556
749
  return this._cursor;
557
750
  }
558
- constructor(u2) {
559
- super(u2), this.on("finalize", () => {
560
- this.value || (this.value = u2.defaultValue);
751
+ constructor(t2) {
752
+ super({ ...t2, initialUserInput: t2.initialUserInput ?? t2.initialValue }), this.on("userInput", (e) => {
753
+ this._setValue(e);
754
+ }), this.on("finalize", () => {
755
+ this.value || (this.value = t2.defaultValue), this.value === void 0 && (this.value = "");
561
756
  });
562
757
  }
563
758
  };
564
759
  }
565
760
  });
566
761
 
567
- // node_modules/.bun/@clack+prompts@0.11.0/node_modules/@clack/prompts/dist/index.mjs
568
- import { stripVTControlCharacters as S2 } from "node:util";
569
- import y2 from "node:process";
570
- function ce() {
571
- return y2.platform !== "win32" ? y2.env.TERM !== "linux" : !!y2.env.CI || !!y2.env.WT_SESSION || !!y2.env.TERMINUS_SUBLIME || y2.env.ConEmuTask === "{cmd::Cmder}" || y2.env.TERM_PROGRAM === "Terminus-Sublime" || y2.env.TERM_PROGRAM === "vscode" || y2.env.TERM === "xterm-256color" || y2.env.TERM === "alacritty" || y2.env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
762
+ // node_modules/.bun/@clack+prompts@1.2.0/node_modules/@clack/prompts/dist/index.mjs
763
+ import { styleText as t, stripVTControlCharacters as ne } from "node:util";
764
+ import P2 from "node:process";
765
+ import { existsSync as Xe, lstatSync as we, readdirSync as ze } from "node:fs";
766
+ import { dirname as be, join as Qe } from "node:path";
767
+ function Ze() {
768
+ return P2.platform !== "win32" ? P2.env.TERM !== "linux" : !!P2.env.CI || !!P2.env.WT_SESSION || !!P2.env.TERMINUS_SUBLIME || P2.env.ConEmuTask === "{cmd::Cmder}" || P2.env.TERM_PROGRAM === "Terminus-Sublime" || P2.env.TERM_PROGRAM === "vscode" || P2.env.TERM === "xterm-256color" || P2.env.TERM === "alacritty" || P2.env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
572
769
  }
573
- var import_picocolors2, import_sisteransi2, V2, u, le, L2, W2, C, ue, o, d2, k2, P2, A2, T, F, $e, _2, me, de, pe, q, D, U, K2, b2, G2, he, ye, ve, Me, xe, Ie, Se, M2, J2, Y2;
574
- var init_dist2 = __esm({
575
- "node_modules/.bun/@clack+prompts@0.11.0/node_modules/@clack/prompts/dist/index.mjs"() {
576
- init_utils();
577
- init_dist();
578
- init_dist();
579
- import_picocolors2 = __toESM(require_picocolors(), 1);
770
+ var import_sisteransi2, ee, ae, w2, _e, oe, ue, F, le, d2, E2, Ie, Ee, z2, H2, te, U, J, xe, se, ce, Ge, $e, de, Oe, he, pe, me, ge, V2, ye, et2, Y2, ot2, O2, pt, mt, gt, ft, vt, wt, Ct, fe, Ve, re, _t, je, Ot;
771
+ var init_dist4 = __esm({
772
+ "node_modules/.bun/@clack+prompts@1.2.0/node_modules/@clack/prompts/dist/index.mjs"() {
773
+ init_utils2();
774
+ init_dist3();
775
+ init_dist3();
776
+ init_main();
777
+ init_dist2();
580
778
  import_sisteransi2 = __toESM(require_src(), 1);
581
- V2 = ce();
582
- u = (t, n) => V2 ? t : n;
583
- le = u("\u25C6", "*");
584
- L2 = u("\u25A0", "x");
585
- W2 = u("\u25B2", "x");
586
- C = u("\u25C7", "o");
587
- ue = u("\u250C", "T");
588
- o = u("\u2502", "|");
589
- d2 = u("\u2514", "\u2014");
590
- k2 = u("\u25CF", ">");
591
- P2 = u("\u25CB", " ");
592
- A2 = u("\u25FB", "[\u2022]");
593
- T = u("\u25FC", "[+]");
594
- F = u("\u25FB", "[ ]");
595
- $e = u("\u25AA", "\u2022");
596
- _2 = u("\u2500", "-");
597
- me = u("\u256E", "+");
598
- de = u("\u251C", "+");
599
- pe = u("\u256F", "+");
600
- q = u("\u25CF", "\u2022");
601
- D = u("\u25C6", "*");
602
- U = u("\u25B2", "!");
603
- K2 = u("\u25A0", "x");
604
- b2 = (t) => {
605
- switch (t) {
779
+ ee = Ze();
780
+ ae = () => process.env.CI === "true";
781
+ w2 = (e, i) => ee ? e : i;
782
+ _e = w2("\u25C6", "*");
783
+ oe = w2("\u25A0", "x");
784
+ ue = w2("\u25B2", "x");
785
+ F = w2("\u25C7", "o");
786
+ le = w2("\u250C", "T");
787
+ d2 = w2("\u2502", "|");
788
+ E2 = w2("\u2514", "\u2014");
789
+ Ie = w2("\u2510", "T");
790
+ Ee = w2("\u2518", "\u2014");
791
+ z2 = w2("\u25CF", ">");
792
+ H2 = w2("\u25CB", " ");
793
+ te = w2("\u25FB", "[\u2022]");
794
+ U = w2("\u25FC", "[+]");
795
+ J = w2("\u25FB", "[ ]");
796
+ xe = w2("\u25AA", "\u2022");
797
+ se = w2("\u2500", "-");
798
+ ce = w2("\u256E", "+");
799
+ Ge = w2("\u251C", "+");
800
+ $e = w2("\u256F", "+");
801
+ de = w2("\u2570", "+");
802
+ Oe = w2("\u256D", "+");
803
+ he = w2("\u25CF", "\u2022");
804
+ pe = w2("\u25C6", "*");
805
+ me = w2("\u25B2", "!");
806
+ ge = w2("\u25A0", "x");
807
+ V2 = (e) => {
808
+ switch (e) {
606
809
  case "initial":
607
810
  case "active":
608
- return import_picocolors2.default.cyan(le);
811
+ return t("cyan", _e);
609
812
  case "cancel":
610
- return import_picocolors2.default.red(L2);
813
+ return t("red", oe);
611
814
  case "error":
612
- return import_picocolors2.default.yellow(W2);
815
+ return t("yellow", ue);
613
816
  case "submit":
614
- return import_picocolors2.default.green(C);
817
+ return t("green", F);
615
818
  }
616
819
  };
617
- G2 = (t) => {
618
- const { cursor: n, options: r2, style: i } = t, s = t.maxItems ?? Number.POSITIVE_INFINITY, c = Math.max(process.stdout.rows - 4, 0), a = Math.min(c, Math.max(s, 5));
619
- let l2 = 0;
620
- n >= l2 + a - 3 ? l2 = Math.max(Math.min(n - a + 3, r2.length - a), 0) : n < l2 + 2 && (l2 = Math.max(n - 2, 0));
621
- const $2 = a < r2.length && l2 > 0, g2 = a < r2.length && l2 + a < r2.length;
622
- return r2.slice(l2, l2 + a).map((p2, v2, f) => {
623
- const j2 = v2 === 0 && $2, E = v2 === f.length - 1 && g2;
624
- return j2 || E ? import_picocolors2.default.dim("...") : i(p2, v2 + l2 === n);
625
- });
626
- };
627
- he = (t) => new RD({ validate: t.validate, placeholder: t.placeholder, defaultValue: t.defaultValue, initialValue: t.initialValue, render() {
628
- const n = `${import_picocolors2.default.gray(o)}
629
- ${b2(this.state)} ${t.message}
630
- `, r2 = t.placeholder ? import_picocolors2.default.inverse(t.placeholder[0]) + import_picocolors2.default.dim(t.placeholder.slice(1)) : import_picocolors2.default.inverse(import_picocolors2.default.hidden("_")), i = this.value ? this.valueWithCursor : r2;
631
- switch (this.state) {
820
+ ye = (e) => {
821
+ switch (e) {
822
+ case "initial":
823
+ case "active":
824
+ return t("cyan", d2);
825
+ case "cancel":
826
+ return t("red", d2);
632
827
  case "error":
633
- return `${n.trim()}
634
- ${import_picocolors2.default.yellow(o)} ${i}
635
- ${import_picocolors2.default.yellow(d2)} ${import_picocolors2.default.yellow(this.error)}
636
- `;
828
+ return t("yellow", d2);
637
829
  case "submit":
638
- return `${n}${import_picocolors2.default.gray(o)} ${import_picocolors2.default.dim(this.value || t.placeholder)}`;
639
- case "cancel":
640
- return `${n}${import_picocolors2.default.gray(o)} ${import_picocolors2.default.strikethrough(import_picocolors2.default.dim(this.value ?? ""))}${this.value?.trim() ? `
641
- ${import_picocolors2.default.gray(o)}` : ""}`;
642
- default:
643
- return `${n}${import_picocolors2.default.cyan(o)} ${i}
644
- ${import_picocolors2.default.cyan(d2)}
645
- `;
646
- }
647
- } }).prompt();
648
- ye = (t) => {
649
- const n = t.active ?? "Yes", r2 = t.inactive ?? "No";
650
- return new dD({ active: n, inactive: r2, initialValue: t.initialValue ?? true, render() {
651
- const i = `${import_picocolors2.default.gray(o)}
652
- ${b2(this.state)} ${t.message}
653
- `, s = this.value ? n : r2;
654
- switch (this.state) {
655
- case "submit":
656
- return `${i}${import_picocolors2.default.gray(o)} ${import_picocolors2.default.dim(s)}`;
657
- case "cancel":
658
- return `${i}${import_picocolors2.default.gray(o)} ${import_picocolors2.default.strikethrough(import_picocolors2.default.dim(s))}
659
- ${import_picocolors2.default.gray(o)}`;
660
- default:
661
- return `${i}${import_picocolors2.default.cyan(o)} ${this.value ? `${import_picocolors2.default.green(k2)} ${n}` : `${import_picocolors2.default.dim(P2)} ${import_picocolors2.default.dim(n)}`} ${import_picocolors2.default.dim("/")} ${this.value ? `${import_picocolors2.default.dim(P2)} ${import_picocolors2.default.dim(r2)}` : `${import_picocolors2.default.green(k2)} ${r2}`}
662
- ${import_picocolors2.default.cyan(d2)}
663
- `;
664
- }
665
- } }).prompt();
666
- };
667
- ve = (t) => {
668
- const n = (r2, i) => {
669
- const s = r2.label ?? String(r2.value);
670
- switch (i) {
671
- case "selected":
672
- return `${import_picocolors2.default.dim(s)}`;
673
- case "active":
674
- return `${import_picocolors2.default.green(k2)} ${s} ${r2.hint ? import_picocolors2.default.dim(`(${r2.hint})`) : ""}`;
675
- case "cancelled":
676
- return `${import_picocolors2.default.strikethrough(import_picocolors2.default.dim(s))}`;
677
- default:
678
- return `${import_picocolors2.default.dim(P2)} ${import_picocolors2.default.dim(s)}`;
679
- }
680
- };
681
- return new LD({ options: t.options, initialValue: t.initialValue, render() {
682
- const r2 = `${import_picocolors2.default.gray(o)}
683
- ${b2(this.state)} ${t.message}
684
- `;
830
+ return t("green", d2);
831
+ }
832
+ };
833
+ et2 = (e, i, s, r, u2) => {
834
+ let n = i, o = 0;
835
+ for (let c2 = s; c2 < r; c2++) {
836
+ const a = e[c2];
837
+ if (n = n - a.length, o++, n <= u2) break;
838
+ }
839
+ return { lineCount: n, removals: o };
840
+ };
841
+ Y2 = ({ cursor: e, options: i, style: s, output: r = process.stdout, maxItems: u2 = Number.POSITIVE_INFINITY, columnPadding: n = 0, rowPadding: o = 4 }) => {
842
+ const c2 = O(r) - n, a = A(r), l = t("dim", "..."), $2 = Math.max(a - o, 0), y2 = Math.max(Math.min(u2, $2), 5);
843
+ let p2 = 0;
844
+ e >= y2 - 3 && (p2 = Math.max(Math.min(e - y2 + 3, i.length - y2), 0));
845
+ let m = y2 < i.length && p2 > 0, g = y2 < i.length && p2 + y2 < i.length;
846
+ const S2 = Math.min(p2 + y2, i.length), h = [];
847
+ let f = 0;
848
+ m && f++, g && f++;
849
+ const v = p2 + (m ? 1 : 0), T = S2 - (g ? 1 : 0);
850
+ for (let b = v; b < T; b++) {
851
+ const x = wrapAnsi(s(i[b], b === e), c2, { hard: true, trim: false }).split(`
852
+ `);
853
+ h.push(x), f += x.length;
854
+ }
855
+ if (f > $2) {
856
+ let b = 0, x = 0, G2 = f;
857
+ const M2 = e - v, R2 = (j2, D2) => et2(h, G2, j2, D2, $2);
858
+ m ? ({ lineCount: G2, removals: b } = R2(0, M2), G2 > $2 && ({ lineCount: G2, removals: x } = R2(M2 + 1, h.length))) : ({ lineCount: G2, removals: x } = R2(M2 + 1, h.length), G2 > $2 && ({ lineCount: G2, removals: b } = R2(0, M2))), b > 0 && (m = true, h.splice(0, b)), x > 0 && (g = true, h.splice(h.length - x, x));
859
+ }
860
+ const C2 = [];
861
+ m && C2.push(l);
862
+ for (const b of h) for (const x of b) C2.push(x);
863
+ return g && C2.push(l), C2;
864
+ };
865
+ ot2 = (e) => {
866
+ const i = e.active ?? "Yes", s = e.inactive ?? "No";
867
+ return new Q({ active: i, inactive: s, signal: e.signal, input: e.input, output: e.output, initialValue: e.initialValue ?? true, render() {
868
+ const r = e.withGuide ?? u.withGuide, u2 = `${V2(this.state)} `, n = r ? `${t("gray", d2)} ` : "", o = R(e.output, e.message, n, u2), c2 = `${r ? `${t("gray", d2)}
869
+ ` : ""}${o}
870
+ `, a = this.value ? i : s;
685
871
  switch (this.state) {
686
- case "submit":
687
- return `${r2}${import_picocolors2.default.gray(o)} ${n(this.options[this.cursor], "selected")}`;
688
- case "cancel":
689
- return `${r2}${import_picocolors2.default.gray(o)} ${n(this.options[this.cursor], "cancelled")}
690
- ${import_picocolors2.default.gray(o)}`;
691
- default:
692
- return `${r2}${import_picocolors2.default.cyan(o)} ${G2({ cursor: this.cursor, options: this.options, maxItems: t.maxItems, style: (i, s) => n(i, s ? "active" : "inactive") }).join(`
693
- ${import_picocolors2.default.cyan(o)} `)}
694
- ${import_picocolors2.default.cyan(d2)}
872
+ case "submit": {
873
+ const l = r ? `${t("gray", d2)} ` : "";
874
+ return `${c2}${l}${t("dim", a)}`;
875
+ }
876
+ case "cancel": {
877
+ const l = r ? `${t("gray", d2)} ` : "";
878
+ return `${c2}${l}${t(["strikethrough", "dim"], a)}${r ? `
879
+ ${t("gray", d2)}` : ""}`;
880
+ }
881
+ default: {
882
+ const l = r ? `${t("cyan", d2)} ` : "", $2 = r ? t("cyan", E2) : "";
883
+ return `${c2}${l}${this.value ? `${t("green", z2)} ${i}` : `${t("dim", H2)} ${t("dim", i)}`}${e.vertical ? r ? `
884
+ ${t("cyan", d2)} ` : `
885
+ ` : ` ${t("dim", "/")} `}${this.value ? `${t("dim", H2)} ${t("dim", s)}` : `${t("green", z2)} ${s}`}
886
+ ${$2}
695
887
  `;
888
+ }
696
889
  }
697
890
  } }).prompt();
698
891
  };
699
- Me = (t = "", n = "") => {
700
- const r2 = `
701
- ${t}
702
- `.split(`
703
- `), i = S2(n).length, s = Math.max(r2.reduce((a, l2) => {
704
- const $2 = S2(l2);
705
- return $2.length > a ? $2.length : a;
706
- }, 0), i) + 2, c = r2.map((a) => `${import_picocolors2.default.gray(o)} ${import_picocolors2.default.dim(a)}${" ".repeat(s - S2(a).length)}${import_picocolors2.default.gray(o)}`).join(`
892
+ O2 = { message: (e = [], { symbol: i = t("gray", d2), secondarySymbol: s = t("gray", d2), output: r = process.stdout, spacing: u2 = 1, withGuide: n } = {}) => {
893
+ const o = [], c2 = n ?? u.withGuide, a = c2 ? s : "", l = c2 ? `${i} ` : "", $2 = c2 ? `${s} ` : "";
894
+ for (let p2 = 0; p2 < u2; p2++) o.push(a);
895
+ const y2 = Array.isArray(e) ? e : e.split(`
707
896
  `);
708
- process.stdout.write(`${import_picocolors2.default.gray(o)}
709
- ${import_picocolors2.default.green(C)} ${import_picocolors2.default.reset(n)} ${import_picocolors2.default.gray(_2.repeat(Math.max(s - i - 1, 1)) + me)}
710
- ${c}
711
- ${import_picocolors2.default.gray(de + _2.repeat(s + 2) + pe)}
897
+ if (y2.length > 0) {
898
+ const [p2, ...m] = y2;
899
+ p2.length > 0 ? o.push(`${l}${p2}`) : o.push(c2 ? i : "");
900
+ for (const g of m) g.length > 0 ? o.push(`${$2}${g}`) : o.push(c2 ? s : "");
901
+ }
902
+ r.write(`${o.join(`
903
+ `)}
712
904
  `);
713
- };
714
- xe = (t = "") => {
715
- process.stdout.write(`${import_picocolors2.default.gray(d2)} ${import_picocolors2.default.red(t)}
905
+ }, info: (e, i) => {
906
+ O2.message(e, { ...i, symbol: t("blue", he) });
907
+ }, success: (e, i) => {
908
+ O2.message(e, { ...i, symbol: t("green", pe) });
909
+ }, step: (e, i) => {
910
+ O2.message(e, { ...i, symbol: t("green", F) });
911
+ }, warn: (e, i) => {
912
+ O2.message(e, { ...i, symbol: t("yellow", me) });
913
+ }, warning: (e, i) => {
914
+ O2.warn(e, i);
915
+ }, error: (e, i) => {
916
+ O2.message(e, { ...i, symbol: t("red", ge) });
917
+ } };
918
+ pt = (e = "", i) => {
919
+ const s = i?.output ?? process.stdout, r = i?.withGuide ?? u.withGuide ? `${t("gray", E2)} ` : "";
920
+ s.write(`${r}${t("red", e)}
716
921
 
717
922
  `);
718
923
  };
719
- Ie = (t = "") => {
720
- process.stdout.write(`${import_picocolors2.default.gray(ue)} ${t}
924
+ mt = (e = "", i) => {
925
+ const s = i?.output ?? process.stdout, r = i?.withGuide ?? u.withGuide ? `${t("gray", le)} ` : "";
926
+ s.write(`${r}${e}
721
927
  `);
722
928
  };
723
- Se = (t = "") => {
724
- process.stdout.write(`${import_picocolors2.default.gray(o)}
725
- ${import_picocolors2.default.gray(d2)} ${t}
929
+ gt = (e = "", i) => {
930
+ const s = i?.output ?? process.stdout, r = i?.withGuide ?? u.withGuide ? `${t("gray", d2)}
931
+ ${t("gray", E2)} ` : "";
932
+ s.write(`${r}${e}
726
933
 
727
934
  `);
728
935
  };
729
- M2 = { message: (t = "", { symbol: n = import_picocolors2.default.gray(o) } = {}) => {
730
- const r2 = [`${import_picocolors2.default.gray(o)}`];
731
- if (t) {
732
- const [i, ...s] = t.split(`
733
- `);
734
- r2.push(`${n} ${i}`, ...s.map((c) => `${import_picocolors2.default.gray(o)} ${c}`));
735
- }
736
- process.stdout.write(`${r2.join(`
737
- `)}
936
+ ft = (e) => t("dim", e);
937
+ vt = (e, i, s) => {
938
+ const r = { hard: true, trim: false }, u2 = wrapAnsi(e, i, r).split(`
939
+ `), n = u2.reduce((a, l) => Math.max(dist_default2(l), a), 0), o = u2.map(s).reduce((a, l) => Math.max(dist_default2(l), a), 0), c2 = i - (o - n);
940
+ return wrapAnsi(e, c2, r);
941
+ };
942
+ wt = (e = "", i = "", s) => {
943
+ const r = s?.output ?? P2.stdout, u2 = s?.withGuide ?? u.withGuide, n = s?.format ?? ft, o = ["", ...vt(e, O(r) - 6, n).split(`
944
+ `).map(n), ""], c2 = dist_default2(i), a = Math.max(o.reduce((p2, m) => {
945
+ const g = dist_default2(m);
946
+ return g > p2 ? g : p2;
947
+ }, 0), c2) + 2, l = o.map((p2) => `${t("gray", d2)} ${p2}${" ".repeat(a - dist_default2(p2))}${t("gray", d2)}`).join(`
948
+ `), $2 = u2 ? `${t("gray", d2)}
949
+ ` : "", y2 = u2 ? Ge : de;
950
+ r.write(`${$2}${t("green", F)} ${t("reset", i)} ${t("gray", se.repeat(Math.max(a - c2 - 1, 1)) + ce)}
951
+ ${l}
952
+ ${t("gray", y2 + se.repeat(a + 2) + $e)}
738
953
  `);
739
- }, info: (t) => {
740
- M2.message(t, { symbol: import_picocolors2.default.blue(q) });
741
- }, success: (t) => {
742
- M2.message(t, { symbol: import_picocolors2.default.green(D) });
743
- }, step: (t) => {
744
- M2.message(t, { symbol: import_picocolors2.default.green(C) });
745
- }, warn: (t) => {
746
- M2.message(t, { symbol: import_picocolors2.default.yellow(U) });
747
- }, warning: (t) => {
748
- M2.warn(t);
749
- }, error: (t) => {
750
- M2.message(t, { symbol: import_picocolors2.default.red(K2) });
751
- } };
752
- J2 = `${import_picocolors2.default.gray(o)} `;
753
- Y2 = ({ indicator: t = "dots" } = {}) => {
754
- const n = V2 ? ["\u25D2", "\u25D0", "\u25D3", "\u25D1"] : ["\u2022", "o", "O", "0"], r2 = V2 ? 80 : 120, i = process.env.CI === "true";
755
- let s, c, a = false, l2 = "", $2, g2 = performance.now();
756
- const p2 = (m2) => {
757
- const h2 = m2 > 1 ? "Something went wrong" : "Canceled";
758
- a && N2(h2, m2);
759
- }, v2 = () => p2(2), f = () => p2(1), j2 = () => {
760
- process.on("uncaughtExceptionMonitor", v2), process.on("unhandledRejection", v2), process.on("SIGINT", f), process.on("SIGTERM", f), process.on("exit", p2);
761
- }, E = () => {
762
- process.removeListener("uncaughtExceptionMonitor", v2), process.removeListener("unhandledRejection", v2), process.removeListener("SIGINT", f), process.removeListener("SIGTERM", f), process.removeListener("exit", p2);
763
- }, B2 = () => {
764
- if ($2 === void 0) return;
765
- i && process.stdout.write(`
954
+ };
955
+ Ct = (e) => t("magenta", e);
956
+ fe = ({ indicator: e = "dots", onCancel: i, output: s = process.stdout, cancelMessage: r, errorMessage: u2, frames: n = ee ? ["\u25D2", "\u25D0", "\u25D3", "\u25D1"] : ["\u2022", "o", "O", "0"], delay: o = ee ? 80 : 120, signal: c2, ...a } = {}) => {
957
+ const l = ae();
958
+ let $2, y2, p2 = false, m = false, g = "", S2, h = performance.now();
959
+ const f = O(s), v = a?.styleFrame ?? Ct, T = (_2) => {
960
+ const A2 = _2 > 1 ? u2 ?? u.messages.error : r ?? u.messages.cancel;
961
+ m = _2 === 1, p2 && (W(A2, _2), m && typeof i == "function" && i());
962
+ }, C2 = () => T(2), b = () => T(1), x = () => {
963
+ process.on("uncaughtExceptionMonitor", C2), process.on("unhandledRejection", C2), process.on("SIGINT", b), process.on("SIGTERM", b), process.on("exit", T), c2 && c2.addEventListener("abort", b);
964
+ }, G2 = () => {
965
+ process.removeListener("uncaughtExceptionMonitor", C2), process.removeListener("unhandledRejection", C2), process.removeListener("SIGINT", b), process.removeListener("SIGTERM", b), process.removeListener("exit", T), c2 && c2.removeEventListener("abort", b);
966
+ }, M2 = () => {
967
+ if (S2 === void 0) return;
968
+ l && s.write(`
766
969
  `);
767
- const m2 = $2.split(`
970
+ const _2 = wrapAnsi(S2, f, { hard: true, trim: false }).split(`
768
971
  `);
769
- process.stdout.write(import_sisteransi2.cursor.move(-999, m2.length - 1)), process.stdout.write(import_sisteransi2.erase.down(m2.length));
770
- }, R2 = (m2) => m2.replace(/\.+$/, ""), O2 = (m2) => {
771
- const h2 = (performance.now() - m2) / 1e3, w2 = Math.floor(h2 / 60), I2 = Math.floor(h2 % 60);
772
- return w2 > 0 ? `[${w2}m ${I2}s]` : `[${I2}s]`;
773
- }, H = (m2 = "") => {
774
- a = true, s = fD(), l2 = R2(m2), g2 = performance.now(), process.stdout.write(`${import_picocolors2.default.gray(o)}
972
+ _2.length > 1 && s.write(import_sisteransi2.cursor.up(_2.length - 1)), s.write(import_sisteransi2.cursor.to(0)), s.write(import_sisteransi2.erase.down());
973
+ }, R2 = (_2) => _2.replace(/\.+$/, ""), j2 = (_2) => {
974
+ const A2 = (performance.now() - _2) / 1e3, k = Math.floor(A2 / 60), L = Math.floor(A2 % 60);
975
+ return k > 0 ? `[${k}m ${L}s]` : `[${L}s]`;
976
+ }, D2 = a.withGuide ?? u.withGuide, ie = (_2 = "") => {
977
+ p2 = true, $2 = z({ output: s }), g = R2(_2), h = performance.now(), D2 && s.write(`${t("gray", d2)}
775
978
  `);
776
- let h2 = 0, w2 = 0;
777
- j2(), c = setInterval(() => {
778
- if (i && l2 === $2) return;
779
- B2(), $2 = l2;
780
- const I2 = import_picocolors2.default.magenta(n[h2]);
781
- if (i) process.stdout.write(`${I2} ${l2}...`);
782
- else if (t === "timer") process.stdout.write(`${I2} ${l2} ${O2(g2)}`);
979
+ let A2 = 0, k = 0;
980
+ x(), y2 = setInterval(() => {
981
+ if (l && g === S2) return;
982
+ M2(), S2 = g;
983
+ const L = v(n[A2]);
984
+ let Z;
985
+ if (l) Z = `${L} ${g}...`;
986
+ else if (e === "timer") Z = `${L} ${g} ${j2(h)}`;
783
987
  else {
784
- const z2 = ".".repeat(Math.floor(w2)).slice(0, 3);
785
- process.stdout.write(`${I2} ${l2}${z2}`);
786
- }
787
- h2 = h2 + 1 < n.length ? h2 + 1 : 0, w2 = w2 < n.length ? w2 + 0.125 : 0;
788
- }, r2);
789
- }, N2 = (m2 = "", h2 = 0) => {
790
- a = false, clearInterval(c), B2();
791
- const w2 = h2 === 0 ? import_picocolors2.default.green(C) : h2 === 1 ? import_picocolors2.default.red(L2) : import_picocolors2.default.red(W2);
792
- l2 = R2(m2 ?? l2), t === "timer" ? process.stdout.write(`${w2} ${l2} ${O2(g2)}
793
- `) : process.stdout.write(`${w2} ${l2}
794
- `), E(), s();
988
+ const Be = ".".repeat(Math.floor(k)).slice(0, 3);
989
+ Z = `${L} ${g}${Be}`;
990
+ }
991
+ const Ne = wrapAnsi(Z, f, { hard: true, trim: false });
992
+ s.write(Ne), A2 = A2 + 1 < n.length ? A2 + 1 : 0, k = k < 4 ? k + 0.125 : 0;
993
+ }, o);
994
+ }, W = (_2 = "", A2 = 0, k = false) => {
995
+ if (!p2) return;
996
+ p2 = false, clearInterval(y2), M2();
997
+ const L = A2 === 0 ? t("green", F) : A2 === 1 ? t("red", oe) : t("red", ue);
998
+ g = _2 ?? g, k || (e === "timer" ? s.write(`${L} ${g} ${j2(h)}
999
+ `) : s.write(`${L} ${g}
1000
+ `)), G2(), $2();
795
1001
  };
796
- return { start: H, stop: N2, message: (m2 = "") => {
797
- l2 = R2(m2 ?? l2);
1002
+ return { start: ie, stop: (_2 = "") => W(_2, 0), message: (_2 = "") => {
1003
+ g = R2(_2 ?? g);
1004
+ }, cancel: (_2 = "") => W(_2, 1), error: (_2 = "") => W(_2, 2), clear: () => W("", 0, true), get isCancelled() {
1005
+ return m;
798
1006
  } };
799
1007
  };
1008
+ Ve = { light: w2("\u2500", "-"), heavy: w2("\u2501", "="), block: w2("\u2588", "#") };
1009
+ re = (e, i) => e.includes(`
1010
+ `) ? e.split(`
1011
+ `).map((s) => i(s)).join(`
1012
+ `) : i(e);
1013
+ _t = (e) => {
1014
+ const i = (s, r) => {
1015
+ const u2 = s.label ?? String(s.value);
1016
+ switch (r) {
1017
+ case "disabled":
1018
+ return `${t("gray", H2)} ${re(u2, (n) => t("gray", n))}${s.hint ? ` ${t("dim", `(${s.hint ?? "disabled"})`)}` : ""}`;
1019
+ case "selected":
1020
+ return `${re(u2, (n) => t("dim", n))}`;
1021
+ case "active":
1022
+ return `${t("green", z2)} ${u2}${s.hint ? ` ${t("dim", `(${s.hint})`)}` : ""}`;
1023
+ case "cancelled":
1024
+ return `${re(u2, (n) => t(["strikethrough", "dim"], n))}`;
1025
+ default:
1026
+ return `${t("dim", H2)} ${re(u2, (n) => t("dim", n))}`;
1027
+ }
1028
+ };
1029
+ return new nt({ options: e.options, signal: e.signal, input: e.input, output: e.output, initialValue: e.initialValue, render() {
1030
+ const s = e.withGuide ?? u.withGuide, r = `${V2(this.state)} `, u2 = `${ye(this.state)} `, n = R(e.output, e.message, u2, r), o = `${s ? `${t("gray", d2)}
1031
+ ` : ""}${n}
1032
+ `;
1033
+ switch (this.state) {
1034
+ case "submit": {
1035
+ const c2 = s ? `${t("gray", d2)} ` : "", a = R(e.output, i(this.options[this.cursor], "selected"), c2);
1036
+ return `${o}${a}`;
1037
+ }
1038
+ case "cancel": {
1039
+ const c2 = s ? `${t("gray", d2)} ` : "", a = R(e.output, i(this.options[this.cursor], "cancelled"), c2);
1040
+ return `${o}${a}${s ? `
1041
+ ${t("gray", d2)}` : ""}`;
1042
+ }
1043
+ default: {
1044
+ const c2 = s ? `${t("cyan", d2)} ` : "", a = s ? t("cyan", E2) : "", l = o.split(`
1045
+ `).length, $2 = s ? 2 : 1;
1046
+ return `${o}${c2}${Y2({ output: e.output, cursor: this.cursor, options: this.options, maxItems: e.maxItems, columnPadding: c2.length, rowPadding: l + $2, style: (y2, p2) => i(y2, y2.disabled ? "disabled" : p2 ? "active" : "inactive") }).join(`
1047
+ ${c2}`)}
1048
+ ${a}
1049
+ `;
1050
+ }
1051
+ }
1052
+ } }).prompt();
1053
+ };
1054
+ je = `${t("gray", d2)} `;
1055
+ Ot = (e) => new at({ validate: e.validate, placeholder: e.placeholder, defaultValue: e.defaultValue, initialValue: e.initialValue, output: e.output, signal: e.signal, input: e.input, render() {
1056
+ const i = e?.withGuide ?? u.withGuide, s = `${`${i ? `${t("gray", d2)}
1057
+ ` : ""}${V2(this.state)} `}${e.message}
1058
+ `, r = e.placeholder ? t("inverse", e.placeholder[0]) + t("dim", e.placeholder.slice(1)) : t(["inverse", "hidden"], "_"), u2 = this.userInput ? this.userInputWithCursor : r, n = this.value ?? "";
1059
+ switch (this.state) {
1060
+ case "error": {
1061
+ const o = this.error ? ` ${t("yellow", this.error)}` : "", c2 = i ? `${t("yellow", d2)} ` : "", a = i ? t("yellow", E2) : "";
1062
+ return `${s.trim()}
1063
+ ${c2}${u2}
1064
+ ${a}${o}
1065
+ `;
1066
+ }
1067
+ case "submit": {
1068
+ const o = n ? ` ${t("dim", n)}` : "", c2 = i ? t("gray", d2) : "";
1069
+ return `${s}${c2}${o}`;
1070
+ }
1071
+ case "cancel": {
1072
+ const o = n ? ` ${t(["strikethrough", "dim"], n)}` : "", c2 = i ? t("gray", d2) : "";
1073
+ return `${s}${c2}${o}${n.trim() ? `
1074
+ ${c2}` : ""}`;
1075
+ }
1076
+ default: {
1077
+ const o = i ? `${t("cyan", d2)} ` : "", c2 = i ? t("cyan", E2) : "";
1078
+ return `${s}${o}${u2}
1079
+ ${c2}
1080
+ `;
1081
+ }
1082
+ }
1083
+ } }).prompt();
800
1084
  }
801
1085
  });
802
1086
 
@@ -845,9 +1129,9 @@ var colors, currentLogLevel, log, error, warn, info, success;
845
1129
  var init_cli_output = __esm({
846
1130
  "packages/tooling/src/utils/cli-output.ts"() {
847
1131
  "use strict";
848
- init_utils();
849
- init_dist2();
850
- init_dist2();
1132
+ init_utils2();
1133
+ init_dist4();
1134
+ init_dist4();
851
1135
  colors = {
852
1136
  reset: "\x1B[0m",
853
1137
  // Success (green)
@@ -882,7 +1166,7 @@ var init_cli_output = __esm({
882
1166
  error(...args) {
883
1167
  if (currentLogLevel < 0 /* Quiet */) return;
884
1168
  const message = formatMessage(...args);
885
- M2.error(colorize(message, colors.brightRed));
1169
+ O2.error(colorize(message, colors.brightRed));
886
1170
  },
887
1171
  /**
888
1172
  * Logs a warning message (shows at Normal level and above)
@@ -891,7 +1175,7 @@ var init_cli_output = __esm({
891
1175
  warn(...args) {
892
1176
  if (currentLogLevel < 1 /* Normal */) return;
893
1177
  const message = formatMessage(...args);
894
- M2.warn(colorize(message, colors.brightYellow));
1178
+ O2.warn(colorize(message, colors.brightYellow));
895
1179
  },
896
1180
  /**
897
1181
  * Logs an info message (shows at Normal level and above)
@@ -900,7 +1184,7 @@ var init_cli_output = __esm({
900
1184
  info(...args) {
901
1185
  if (currentLogLevel < 1 /* Normal */) return;
902
1186
  const message = formatMessage(...args);
903
- M2.info(colorize(message, colors.brightCyan));
1187
+ O2.info(colorize(message, colors.brightCyan));
904
1188
  },
905
1189
  /**
906
1190
  * Logs a success message (shows at Normal level and above)
@@ -909,7 +1193,7 @@ var init_cli_output = __esm({
909
1193
  success(...args) {
910
1194
  if (currentLogLevel < 1 /* Normal */) return;
911
1195
  const message = formatMessage(...args);
912
- M2.success(colorize(message, colors.brightGreen));
1196
+ O2.success(colorize(message, colors.brightGreen));
913
1197
  },
914
1198
  /**
915
1199
  * Logs a debug message (only shows at Verbose level and above)
@@ -918,7 +1202,7 @@ var init_cli_output = __esm({
918
1202
  debug(...args) {
919
1203
  if (currentLogLevel < 2 /* Verbose */) return;
920
1204
  const timeStamp = (/* @__PURE__ */ new Date()).toISOString().slice(11, 19);
921
- M2.message(
1205
+ O2.message(
922
1206
  colorize(
923
1207
  `[${timeStamp}] \u{1F50D} DEBUG: ${formatMessage(...args)}`,
924
1208
  colors.gray
@@ -932,7 +1216,7 @@ var init_cli_output = __esm({
932
1216
  trace(...args) {
933
1217
  if (currentLogLevel < 3 /* Debug */) return;
934
1218
  const timeStamp = (/* @__PURE__ */ new Date()).toISOString().slice(11, 19);
935
- M2.message(
1219
+ O2.message(
936
1220
  colorize(
937
1221
  `[${timeStamp}] \u{1F52C} TRACE: ${formatMessage(...args)}`,
938
1222
  colors.gray
@@ -959,7 +1243,7 @@ var DO_NOT_DEV_ERROR_CODES, DoNotDevError;
959
1243
  var init_errors = __esm({
960
1244
  "packages/tooling/src/utils/errors.ts"() {
961
1245
  "use strict";
962
- init_utils();
1246
+ init_utils2();
963
1247
  DO_NOT_DEV_ERROR_CODES = {
964
1248
  CONFIGURATION_ERROR: "configuration-error",
965
1249
  CONFIG_NOT_FOUND: "config-not-found",
@@ -1100,7 +1384,7 @@ var init_errors = __esm({
1100
1384
  var require_array = __commonJS({
1101
1385
  "node_modules/.bun/fast-glob@3.3.3/node_modules/fast-glob/out/utils/array.js"(exports) {
1102
1386
  "use strict";
1103
- init_utils();
1387
+ init_utils2();
1104
1388
  Object.defineProperty(exports, "__esModule", { value: true });
1105
1389
  exports.splitWhen = exports.flatten = void 0;
1106
1390
  function flatten(items) {
@@ -1128,7 +1412,7 @@ var require_array = __commonJS({
1128
1412
  var require_errno = __commonJS({
1129
1413
  "node_modules/.bun/fast-glob@3.3.3/node_modules/fast-glob/out/utils/errno.js"(exports) {
1130
1414
  "use strict";
1131
- init_utils();
1415
+ init_utils2();
1132
1416
  Object.defineProperty(exports, "__esModule", { value: true });
1133
1417
  exports.isEnoentCodeError = void 0;
1134
1418
  function isEnoentCodeError(error2) {
@@ -1142,7 +1426,7 @@ var require_errno = __commonJS({
1142
1426
  var require_fs = __commonJS({
1143
1427
  "node_modules/.bun/fast-glob@3.3.3/node_modules/fast-glob/out/utils/fs.js"(exports) {
1144
1428
  "use strict";
1145
- init_utils();
1429
+ init_utils2();
1146
1430
  Object.defineProperty(exports, "__esModule", { value: true });
1147
1431
  exports.createDirentFromStats = void 0;
1148
1432
  var DirentFromStats = class {
@@ -1168,7 +1452,7 @@ var require_fs = __commonJS({
1168
1452
  var require_path = __commonJS({
1169
1453
  "node_modules/.bun/fast-glob@3.3.3/node_modules/fast-glob/out/utils/path.js"(exports) {
1170
1454
  "use strict";
1171
- init_utils();
1455
+ init_utils2();
1172
1456
  Object.defineProperty(exports, "__esModule", { value: true });
1173
1457
  exports.convertPosixPathToPattern = exports.convertWindowsPathToPattern = exports.convertPathToPattern = exports.escapePosixPath = exports.escapeWindowsPath = exports.escape = exports.removeLeadingDotSegment = exports.makeAbsolute = exports.unixify = void 0;
1174
1458
  var os = __require("os");
@@ -1221,7 +1505,7 @@ var require_path = __commonJS({
1221
1505
  // node_modules/.bun/is-extglob@2.1.1/node_modules/is-extglob/index.js
1222
1506
  var require_is_extglob = __commonJS({
1223
1507
  "node_modules/.bun/is-extglob@2.1.1/node_modules/is-extglob/index.js"(exports, module) {
1224
- init_utils();
1508
+ init_utils2();
1225
1509
  module.exports = function isExtglob(str) {
1226
1510
  if (typeof str !== "string" || str === "") {
1227
1511
  return false;
@@ -1239,7 +1523,7 @@ var require_is_extglob = __commonJS({
1239
1523
  // node_modules/.bun/is-glob@4.0.3/node_modules/is-glob/index.js
1240
1524
  var require_is_glob = __commonJS({
1241
1525
  "node_modules/.bun/is-glob@4.0.3/node_modules/is-glob/index.js"(exports, module) {
1242
- init_utils();
1526
+ init_utils2();
1243
1527
  var isExtglob = require_is_extglob();
1244
1528
  var chars = { "{": "}", "(": ")", "[": "]" };
1245
1529
  var strictCheck = function(str) {
@@ -1372,7 +1656,7 @@ var require_is_glob = __commonJS({
1372
1656
  var require_glob_parent = __commonJS({
1373
1657
  "node_modules/.bun/glob-parent@5.1.2/node_modules/glob-parent/index.js"(exports, module) {
1374
1658
  "use strict";
1375
- init_utils();
1659
+ init_utils2();
1376
1660
  var isGlob = require_is_glob();
1377
1661
  var pathPosixDirname = __require("path").posix.dirname;
1378
1662
  var isWin32 = __require("os").platform() === "win32";
@@ -1402,7 +1686,7 @@ var require_glob_parent = __commonJS({
1402
1686
  var require_utils = __commonJS({
1403
1687
  "node_modules/.bun/braces@3.0.3/node_modules/braces/lib/utils.js"(exports) {
1404
1688
  "use strict";
1405
- init_utils();
1689
+ init_utils2();
1406
1690
  exports.isInteger = (num) => {
1407
1691
  if (typeof num === "number") {
1408
1692
  return Number.isInteger(num);
@@ -1485,7 +1769,7 @@ var require_utils = __commonJS({
1485
1769
  var require_stringify = __commonJS({
1486
1770
  "node_modules/.bun/braces@3.0.3/node_modules/braces/lib/stringify.js"(exports, module) {
1487
1771
  "use strict";
1488
- init_utils();
1772
+ init_utils2();
1489
1773
  var utils = require_utils();
1490
1774
  module.exports = (ast, options = {}) => {
1491
1775
  const stringify2 = (node, parent = {}) => {
@@ -1517,7 +1801,7 @@ var require_stringify = __commonJS({
1517
1801
  var require_is_number = __commonJS({
1518
1802
  "node_modules/.bun/is-number@7.0.0/node_modules/is-number/index.js"(exports, module) {
1519
1803
  "use strict";
1520
- init_utils();
1804
+ init_utils2();
1521
1805
  module.exports = function(num) {
1522
1806
  if (typeof num === "number") {
1523
1807
  return num - num === 0;
@@ -1534,7 +1818,7 @@ var require_is_number = __commonJS({
1534
1818
  var require_to_regex_range = __commonJS({
1535
1819
  "node_modules/.bun/to-regex-range@5.0.1/node_modules/to-regex-range/index.js"(exports, module) {
1536
1820
  "use strict";
1537
- init_utils();
1821
+ init_utils2();
1538
1822
  var isNumber = require_is_number();
1539
1823
  var toRegexRange = (min, max, options) => {
1540
1824
  if (isNumber(min) === false) {
@@ -1559,8 +1843,8 @@ var require_to_regex_range = __commonJS({
1559
1843
  return toRegexRange.cache[cacheKey].result;
1560
1844
  }
1561
1845
  let a = Math.min(min, max);
1562
- let b3 = Math.max(min, max);
1563
- if (Math.abs(a - b3) === 1) {
1846
+ let b = Math.max(min, max);
1847
+ if (Math.abs(a - b) === 1) {
1564
1848
  let result = min + "|" + max;
1565
1849
  if (opts.capture) {
1566
1850
  return `(${result})`;
@@ -1571,7 +1855,7 @@ var require_to_regex_range = __commonJS({
1571
1855
  return `(?:${result})`;
1572
1856
  }
1573
1857
  let isPadded = hasPadding(min) || hasPadding(max);
1574
- let state = { min, max, a, b: b3 };
1858
+ let state = { min, max, a, b };
1575
1859
  let positives = [];
1576
1860
  let negatives = [];
1577
1861
  if (isPadded) {
@@ -1579,12 +1863,12 @@ var require_to_regex_range = __commonJS({
1579
1863
  state.maxLen = String(state.max).length;
1580
1864
  }
1581
1865
  if (a < 0) {
1582
- let newMin = b3 < 0 ? Math.abs(b3) : 1;
1866
+ let newMin = b < 0 ? Math.abs(b) : 1;
1583
1867
  negatives = splitToPatterns(newMin, Math.abs(a), state, opts);
1584
1868
  a = state.a = 0;
1585
1869
  }
1586
- if (b3 >= 0) {
1587
- positives = splitToPatterns(a, b3, state, opts);
1870
+ if (b >= 0) {
1871
+ positives = splitToPatterns(a, b, state, opts);
1588
1872
  }
1589
1873
  state.negatives = negatives;
1590
1874
  state.positives = positives;
@@ -1688,13 +1972,13 @@ var require_to_regex_range = __commonJS({
1688
1972
  }
1689
1973
  return result;
1690
1974
  }
1691
- function zip(a, b3) {
1975
+ function zip(a, b) {
1692
1976
  let arr = [];
1693
- for (let i = 0; i < a.length; i++) arr.push([a[i], b3[i]]);
1977
+ for (let i = 0; i < a.length; i++) arr.push([a[i], b[i]]);
1694
1978
  return arr;
1695
1979
  }
1696
- function compare(a, b3) {
1697
- return a > b3 ? 1 : b3 > a ? -1 : 0;
1980
+ function compare(a, b) {
1981
+ return a > b ? 1 : b > a ? -1 : 0;
1698
1982
  }
1699
1983
  function contains(arr, key, val) {
1700
1984
  return arr.some((ele) => ele[key] === val);
@@ -1712,8 +1996,8 @@ var require_to_regex_range = __commonJS({
1712
1996
  }
1713
1997
  return "";
1714
1998
  }
1715
- function toCharacterClass(a, b3, options) {
1716
- return `[${a}${b3 - a === 1 ? "" : "-"}${b3}]`;
1999
+ function toCharacterClass(a, b, options) {
2000
+ return `[${a}${b - a === 1 ? "" : "-"}${b}]`;
1717
2001
  }
1718
2002
  function hasPadding(str) {
1719
2003
  return /^-?(0+)\d/.test(str);
@@ -1746,7 +2030,7 @@ var require_to_regex_range = __commonJS({
1746
2030
  var require_fill_range = __commonJS({
1747
2031
  "node_modules/.bun/fill-range@7.1.1/node_modules/fill-range/index.js"(exports, module) {
1748
2032
  "use strict";
1749
- init_utils();
2033
+ init_utils2();
1750
2034
  var util = __require("util");
1751
2035
  var toRegexRange = require_to_regex_range();
1752
2036
  var isObject = (val) => val !== null && typeof val === "object" && !Array.isArray(val);
@@ -1792,17 +2076,17 @@ var require_fill_range = __commonJS({
1792
2076
  return negative ? "-" + input : input;
1793
2077
  };
1794
2078
  var toSequence = (parts, options, maxLen) => {
1795
- parts.negatives.sort((a, b3) => a < b3 ? -1 : a > b3 ? 1 : 0);
1796
- parts.positives.sort((a, b3) => a < b3 ? -1 : a > b3 ? 1 : 0);
2079
+ parts.negatives.sort((a, b) => a < b ? -1 : a > b ? 1 : 0);
2080
+ parts.positives.sort((a, b) => a < b ? -1 : a > b ? 1 : 0);
1797
2081
  let prefix = options.capture ? "" : "?:";
1798
2082
  let positives = "";
1799
2083
  let negatives = "";
1800
2084
  let result;
1801
2085
  if (parts.positives.length) {
1802
- positives = parts.positives.map((v2) => toMaxLen(String(v2), maxLen)).join("|");
2086
+ positives = parts.positives.map((v) => toMaxLen(String(v), maxLen)).join("|");
1803
2087
  }
1804
2088
  if (parts.negatives.length) {
1805
- negatives = `-(${prefix}${parts.negatives.map((v2) => toMaxLen(String(v2), maxLen)).join("|")})`;
2089
+ negatives = `-(${prefix}${parts.negatives.map((v) => toMaxLen(String(v), maxLen)).join("|")})`;
1806
2090
  }
1807
2091
  if (positives && negatives) {
1808
2092
  result = `${positives}|${negatives}`;
@@ -1814,13 +2098,13 @@ var require_fill_range = __commonJS({
1814
2098
  }
1815
2099
  return result;
1816
2100
  };
1817
- var toRange = (a, b3, isNumbers, options) => {
2101
+ var toRange = (a, b, isNumbers, options) => {
1818
2102
  if (isNumbers) {
1819
- return toRegexRange(a, b3, { wrap: false, ...options });
2103
+ return toRegexRange(a, b, { wrap: false, ...options });
1820
2104
  }
1821
2105
  let start = String.fromCharCode(a);
1822
- if (a === b3) return start;
1823
- let stop = String.fromCharCode(b3);
2106
+ if (a === b) return start;
2107
+ let stop = String.fromCharCode(b);
1824
2108
  return `[${start}-${stop}]`;
1825
2109
  };
1826
2110
  var toRegex = (start, end, options) => {
@@ -1846,14 +2130,14 @@ var require_fill_range = __commonJS({
1846
2130
  };
1847
2131
  var fillNumbers = (start, end, step = 1, options = {}) => {
1848
2132
  let a = Number(start);
1849
- let b3 = Number(end);
1850
- if (!Number.isInteger(a) || !Number.isInteger(b3)) {
2133
+ let b = Number(end);
2134
+ if (!Number.isInteger(a) || !Number.isInteger(b)) {
1851
2135
  if (options.strictRanges === true) throw rangeError([start, end]);
1852
2136
  return [];
1853
2137
  }
1854
2138
  if (a === 0) a = 0;
1855
- if (b3 === 0) b3 = 0;
1856
- let descending = a > b3;
2139
+ if (b === 0) b = 0;
2140
+ let descending = a > b;
1857
2141
  let startString = String(start);
1858
2142
  let endString = String(end);
1859
2143
  let stepString = String(step);
@@ -1869,7 +2153,7 @@ var require_fill_range = __commonJS({
1869
2153
  let push = (num) => parts[num < 0 ? "negatives" : "positives"].push(Math.abs(num));
1870
2154
  let range = [];
1871
2155
  let index = 0;
1872
- while (descending ? a >= b3 : a <= b3) {
2156
+ while (descending ? a >= b : a <= b) {
1873
2157
  if (options.toRegex === true && step > 1) {
1874
2158
  push(a);
1875
2159
  } else {
@@ -1889,16 +2173,16 @@ var require_fill_range = __commonJS({
1889
2173
  }
1890
2174
  let format = options.transform || ((val) => String.fromCharCode(val));
1891
2175
  let a = `${start}`.charCodeAt(0);
1892
- let b3 = `${end}`.charCodeAt(0);
1893
- let descending = a > b3;
1894
- let min = Math.min(a, b3);
1895
- let max = Math.max(a, b3);
2176
+ let b = `${end}`.charCodeAt(0);
2177
+ let descending = a > b;
2178
+ let min = Math.min(a, b);
2179
+ let max = Math.max(a, b);
1896
2180
  if (options.toRegex && step === 1) {
1897
2181
  return toRange(min, max, false, options);
1898
2182
  }
1899
2183
  let range = [];
1900
2184
  let index = 0;
1901
- while (descending ? a >= b3 : a <= b3) {
2185
+ while (descending ? a >= b : a <= b) {
1902
2186
  range.push(format(a, index));
1903
2187
  a = descending ? a - step : a + step;
1904
2188
  index++;
@@ -1941,7 +2225,7 @@ var require_fill_range = __commonJS({
1941
2225
  var require_compile = __commonJS({
1942
2226
  "node_modules/.bun/braces@3.0.3/node_modules/braces/lib/compile.js"(exports, module) {
1943
2227
  "use strict";
1944
- init_utils();
2228
+ init_utils2();
1945
2229
  var fill = require_fill_range();
1946
2230
  var utils = require_utils();
1947
2231
  var compile = (ast, options = {}) => {
@@ -1993,7 +2277,7 @@ var require_compile = __commonJS({
1993
2277
  var require_expand = __commonJS({
1994
2278
  "node_modules/.bun/braces@3.0.3/node_modules/braces/lib/expand.js"(exports, module) {
1995
2279
  "use strict";
1996
- init_utils();
2280
+ init_utils2();
1997
2281
  var fill = require_fill_range();
1998
2282
  var stringify2 = require_stringify();
1999
2283
  var utils = require_utils();
@@ -2088,7 +2372,7 @@ var require_expand = __commonJS({
2088
2372
  var require_constants = __commonJS({
2089
2373
  "node_modules/.bun/braces@3.0.3/node_modules/braces/lib/constants.js"(exports, module) {
2090
2374
  "use strict";
2091
- init_utils();
2375
+ init_utils2();
2092
2376
  module.exports = {
2093
2377
  MAX_LENGTH: 1e4,
2094
2378
  // Digits
@@ -2190,7 +2474,7 @@ var require_constants = __commonJS({
2190
2474
  var require_parse = __commonJS({
2191
2475
  "node_modules/.bun/braces@3.0.3/node_modules/braces/lib/parse.js"(exports, module) {
2192
2476
  "use strict";
2193
- init_utils();
2477
+ init_utils2();
2194
2478
  var stringify2 = require_stringify();
2195
2479
  var {
2196
2480
  MAX_LENGTH,
@@ -2429,7 +2713,7 @@ var require_parse = __commonJS({
2429
2713
  var require_braces = __commonJS({
2430
2714
  "node_modules/.bun/braces@3.0.3/node_modules/braces/index.js"(exports, module) {
2431
2715
  "use strict";
2432
- init_utils();
2716
+ init_utils2();
2433
2717
  var stringify2 = require_stringify();
2434
2718
  var compile = require_compile();
2435
2719
  var expand = require_expand();
@@ -2489,14 +2773,15 @@ var require_braces = __commonJS({
2489
2773
  }
2490
2774
  });
2491
2775
 
2492
- // node_modules/.bun/picomatch@2.3.1/node_modules/picomatch/lib/constants.js
2776
+ // node_modules/.bun/picomatch@2.3.2/node_modules/picomatch/lib/constants.js
2493
2777
  var require_constants2 = __commonJS({
2494
- "node_modules/.bun/picomatch@2.3.1/node_modules/picomatch/lib/constants.js"(exports, module) {
2778
+ "node_modules/.bun/picomatch@2.3.2/node_modules/picomatch/lib/constants.js"(exports, module) {
2495
2779
  "use strict";
2496
- init_utils();
2780
+ init_utils2();
2497
2781
  var path = __require("path");
2498
2782
  var WIN_SLASH = "\\\\/";
2499
2783
  var WIN_NO_SLASH = `[^${WIN_SLASH}]`;
2784
+ var DEFAULT_MAX_EXTGLOB_RECURSION = 0;
2500
2785
  var DOT_LITERAL = "\\.";
2501
2786
  var PLUS_LITERAL = "\\+";
2502
2787
  var QMARK_LITERAL = "\\?";
@@ -2544,6 +2829,7 @@ var require_constants2 = __commonJS({
2544
2829
  END_ANCHOR: `(?:[${WIN_SLASH}]|$)`
2545
2830
  };
2546
2831
  var POSIX_REGEX_SOURCE = {
2832
+ __proto__: null,
2547
2833
  alnum: "a-zA-Z0-9",
2548
2834
  alpha: "a-zA-Z",
2549
2835
  ascii: "\\x00-\\x7F",
@@ -2560,6 +2846,7 @@ var require_constants2 = __commonJS({
2560
2846
  xdigit: "A-Fa-f0-9"
2561
2847
  };
2562
2848
  module.exports = {
2849
+ DEFAULT_MAX_EXTGLOB_RECURSION,
2563
2850
  MAX_LENGTH: 1024 * 64,
2564
2851
  POSIX_REGEX_SOURCE,
2565
2852
  // regular expressions
@@ -2571,6 +2858,7 @@ var require_constants2 = __commonJS({
2571
2858
  REGEX_REMOVE_BACKSLASH: /(?:\[.*?[^\\]\]|\\(?=.))/g,
2572
2859
  // Replace globs with equivalent patterns to reduce parsing time.
2573
2860
  REPLACEMENTS: {
2861
+ __proto__: null,
2574
2862
  "***": "*",
2575
2863
  "**/**": "**",
2576
2864
  "**/**/**": "**"
@@ -2687,11 +2975,11 @@ var require_constants2 = __commonJS({
2687
2975
  }
2688
2976
  });
2689
2977
 
2690
- // node_modules/.bun/picomatch@2.3.1/node_modules/picomatch/lib/utils.js
2978
+ // node_modules/.bun/picomatch@2.3.2/node_modules/picomatch/lib/utils.js
2691
2979
  var require_utils2 = __commonJS({
2692
- "node_modules/.bun/picomatch@2.3.1/node_modules/picomatch/lib/utils.js"(exports) {
2980
+ "node_modules/.bun/picomatch@2.3.2/node_modules/picomatch/lib/utils.js"(exports) {
2693
2981
  "use strict";
2694
- init_utils();
2982
+ init_utils2();
2695
2983
  var path = __require("path");
2696
2984
  var win32 = process.platform === "win32";
2697
2985
  var {
@@ -2749,11 +3037,11 @@ var require_utils2 = __commonJS({
2749
3037
  }
2750
3038
  });
2751
3039
 
2752
- // node_modules/.bun/picomatch@2.3.1/node_modules/picomatch/lib/scan.js
3040
+ // node_modules/.bun/picomatch@2.3.2/node_modules/picomatch/lib/scan.js
2753
3041
  var require_scan = __commonJS({
2754
- "node_modules/.bun/picomatch@2.3.1/node_modules/picomatch/lib/scan.js"(exports, module) {
3042
+ "node_modules/.bun/picomatch@2.3.2/node_modules/picomatch/lib/scan.js"(exports, module) {
2755
3043
  "use strict";
2756
- init_utils();
3044
+ init_utils2();
2757
3045
  var utils = require_utils2();
2758
3046
  var {
2759
3047
  CHAR_ASTERISK,
@@ -3080,11 +3368,11 @@ var require_scan = __commonJS({
3080
3368
  }
3081
3369
  });
3082
3370
 
3083
- // node_modules/.bun/picomatch@2.3.1/node_modules/picomatch/lib/parse.js
3371
+ // node_modules/.bun/picomatch@2.3.2/node_modules/picomatch/lib/parse.js
3084
3372
  var require_parse2 = __commonJS({
3085
- "node_modules/.bun/picomatch@2.3.1/node_modules/picomatch/lib/parse.js"(exports, module) {
3373
+ "node_modules/.bun/picomatch@2.3.2/node_modules/picomatch/lib/parse.js"(exports, module) {
3086
3374
  "use strict";
3087
- init_utils();
3375
+ init_utils2();
3088
3376
  var constants2 = require_constants2();
3089
3377
  var utils = require_utils2();
3090
3378
  var {
@@ -3098,17 +3386,224 @@ var require_parse2 = __commonJS({
3098
3386
  if (typeof options.expandRange === "function") {
3099
3387
  return options.expandRange(...args, options);
3100
3388
  }
3101
- args.sort();
3102
- const value = `[${args.join("-")}]`;
3103
- try {
3104
- new RegExp(value);
3105
- } catch (ex) {
3106
- return args.map((v2) => utils.escapeRegex(v2)).join("..");
3389
+ args.sort();
3390
+ const value = `[${args.join("-")}]`;
3391
+ try {
3392
+ new RegExp(value);
3393
+ } catch (ex) {
3394
+ return args.map((v) => utils.escapeRegex(v)).join("..");
3395
+ }
3396
+ return value;
3397
+ };
3398
+ var syntaxError = (type, char) => {
3399
+ return `Missing ${type}: "${char}" - use "\\\\${char}" to match literal characters`;
3400
+ };
3401
+ var splitTopLevel = (input) => {
3402
+ const parts = [];
3403
+ let bracket = 0;
3404
+ let paren = 0;
3405
+ let quote = 0;
3406
+ let value = "";
3407
+ let escaped = false;
3408
+ for (const ch of input) {
3409
+ if (escaped === true) {
3410
+ value += ch;
3411
+ escaped = false;
3412
+ continue;
3413
+ }
3414
+ if (ch === "\\") {
3415
+ value += ch;
3416
+ escaped = true;
3417
+ continue;
3418
+ }
3419
+ if (ch === '"') {
3420
+ quote = quote === 1 ? 0 : 1;
3421
+ value += ch;
3422
+ continue;
3423
+ }
3424
+ if (quote === 0) {
3425
+ if (ch === "[") {
3426
+ bracket++;
3427
+ } else if (ch === "]" && bracket > 0) {
3428
+ bracket--;
3429
+ } else if (bracket === 0) {
3430
+ if (ch === "(") {
3431
+ paren++;
3432
+ } else if (ch === ")" && paren > 0) {
3433
+ paren--;
3434
+ } else if (ch === "|" && paren === 0) {
3435
+ parts.push(value);
3436
+ value = "";
3437
+ continue;
3438
+ }
3439
+ }
3440
+ }
3441
+ value += ch;
3442
+ }
3443
+ parts.push(value);
3444
+ return parts;
3445
+ };
3446
+ var isPlainBranch = (branch) => {
3447
+ let escaped = false;
3448
+ for (const ch of branch) {
3449
+ if (escaped === true) {
3450
+ escaped = false;
3451
+ continue;
3452
+ }
3453
+ if (ch === "\\") {
3454
+ escaped = true;
3455
+ continue;
3456
+ }
3457
+ if (/[?*+@!()[\]{}]/.test(ch)) {
3458
+ return false;
3459
+ }
3460
+ }
3461
+ return true;
3462
+ };
3463
+ var normalizeSimpleBranch = (branch) => {
3464
+ let value = branch.trim();
3465
+ let changed = true;
3466
+ while (changed === true) {
3467
+ changed = false;
3468
+ if (/^@\([^\\()[\]{}|]+\)$/.test(value)) {
3469
+ value = value.slice(2, -1);
3470
+ changed = true;
3471
+ }
3472
+ }
3473
+ if (!isPlainBranch(value)) {
3474
+ return;
3475
+ }
3476
+ return value.replace(/\\(.)/g, "$1");
3477
+ };
3478
+ var hasRepeatedCharPrefixOverlap = (branches) => {
3479
+ const values = branches.map(normalizeSimpleBranch).filter(Boolean);
3480
+ for (let i = 0; i < values.length; i++) {
3481
+ for (let j2 = i + 1; j2 < values.length; j2++) {
3482
+ const a = values[i];
3483
+ const b = values[j2];
3484
+ const char = a[0];
3485
+ if (!char || a !== char.repeat(a.length) || b !== char.repeat(b.length)) {
3486
+ continue;
3487
+ }
3488
+ if (a === b || a.startsWith(b) || b.startsWith(a)) {
3489
+ return true;
3490
+ }
3491
+ }
3492
+ }
3493
+ return false;
3494
+ };
3495
+ var parseRepeatedExtglob = (pattern, requireEnd = true) => {
3496
+ if (pattern[0] !== "+" && pattern[0] !== "*" || pattern[1] !== "(") {
3497
+ return;
3498
+ }
3499
+ let bracket = 0;
3500
+ let paren = 0;
3501
+ let quote = 0;
3502
+ let escaped = false;
3503
+ for (let i = 1; i < pattern.length; i++) {
3504
+ const ch = pattern[i];
3505
+ if (escaped === true) {
3506
+ escaped = false;
3507
+ continue;
3508
+ }
3509
+ if (ch === "\\") {
3510
+ escaped = true;
3511
+ continue;
3512
+ }
3513
+ if (ch === '"') {
3514
+ quote = quote === 1 ? 0 : 1;
3515
+ continue;
3516
+ }
3517
+ if (quote === 1) {
3518
+ continue;
3519
+ }
3520
+ if (ch === "[") {
3521
+ bracket++;
3522
+ continue;
3523
+ }
3524
+ if (ch === "]" && bracket > 0) {
3525
+ bracket--;
3526
+ continue;
3527
+ }
3528
+ if (bracket > 0) {
3529
+ continue;
3530
+ }
3531
+ if (ch === "(") {
3532
+ paren++;
3533
+ continue;
3534
+ }
3535
+ if (ch === ")") {
3536
+ paren--;
3537
+ if (paren === 0) {
3538
+ if (requireEnd === true && i !== pattern.length - 1) {
3539
+ return;
3540
+ }
3541
+ return {
3542
+ type: pattern[0],
3543
+ body: pattern.slice(2, i),
3544
+ end: i
3545
+ };
3546
+ }
3547
+ }
3548
+ }
3549
+ };
3550
+ var getStarExtglobSequenceOutput = (pattern) => {
3551
+ let index = 0;
3552
+ const chars = [];
3553
+ while (index < pattern.length) {
3554
+ const match = parseRepeatedExtglob(pattern.slice(index), false);
3555
+ if (!match || match.type !== "*") {
3556
+ return;
3557
+ }
3558
+ const branches = splitTopLevel(match.body).map((branch2) => branch2.trim());
3559
+ if (branches.length !== 1) {
3560
+ return;
3561
+ }
3562
+ const branch = normalizeSimpleBranch(branches[0]);
3563
+ if (!branch || branch.length !== 1) {
3564
+ return;
3565
+ }
3566
+ chars.push(branch);
3567
+ index += match.end + 1;
3568
+ }
3569
+ if (chars.length < 1) {
3570
+ return;
3107
3571
  }
3108
- return value;
3572
+ const source = chars.length === 1 ? utils.escapeRegex(chars[0]) : `[${chars.map((ch) => utils.escapeRegex(ch)).join("")}]`;
3573
+ return `${source}*`;
3109
3574
  };
3110
- var syntaxError = (type, char) => {
3111
- return `Missing ${type}: "${char}" - use "\\\\${char}" to match literal characters`;
3575
+ var repeatedExtglobRecursion = (pattern) => {
3576
+ let depth = 0;
3577
+ let value = pattern.trim();
3578
+ let match = parseRepeatedExtglob(value);
3579
+ while (match) {
3580
+ depth++;
3581
+ value = match.body.trim();
3582
+ match = parseRepeatedExtglob(value);
3583
+ }
3584
+ return depth;
3585
+ };
3586
+ var analyzeRepeatedExtglob = (body, options) => {
3587
+ if (options.maxExtglobRecursion === false) {
3588
+ return { risky: false };
3589
+ }
3590
+ const max = typeof options.maxExtglobRecursion === "number" ? options.maxExtglobRecursion : constants2.DEFAULT_MAX_EXTGLOB_RECURSION;
3591
+ const branches = splitTopLevel(body).map((branch) => branch.trim());
3592
+ if (branches.length > 1) {
3593
+ if (branches.some((branch) => branch === "") || branches.some((branch) => /^[*?]+$/.test(branch)) || hasRepeatedCharPrefixOverlap(branches)) {
3594
+ return { risky: true };
3595
+ }
3596
+ }
3597
+ for (const branch of branches) {
3598
+ const safeOutput = getStarExtglobSequenceOutput(branch);
3599
+ if (safeOutput) {
3600
+ return { risky: true, safeOutput };
3601
+ }
3602
+ if (repeatedExtglobRecursion(branch) > max) {
3603
+ return { risky: true };
3604
+ }
3605
+ }
3606
+ return { risky: false };
3112
3607
  };
3113
3608
  var parse2 = (input, options) => {
3114
3609
  if (typeof input !== "string") {
@@ -3241,6 +3736,8 @@ var require_parse2 = __commonJS({
3241
3736
  token.prev = prev;
3242
3737
  token.parens = state.parens;
3243
3738
  token.output = state.output;
3739
+ token.startIndex = state.index;
3740
+ token.tokensIndex = tokens.length;
3244
3741
  const output = (opts.capture ? "(" : "") + token.open;
3245
3742
  increment("parens");
3246
3743
  push({ type, value: value2, output: state.output ? "" : ONE_CHAR });
@@ -3248,6 +3745,26 @@ var require_parse2 = __commonJS({
3248
3745
  extglobs.push(token);
3249
3746
  };
3250
3747
  const extglobClose = (token) => {
3748
+ const literal = input.slice(token.startIndex, state.index + 1);
3749
+ const body = input.slice(token.startIndex + 2, state.index);
3750
+ const analysis = analyzeRepeatedExtglob(body, opts);
3751
+ if ((token.type === "plus" || token.type === "star") && analysis.risky) {
3752
+ const safeOutput = analysis.safeOutput ? (token.output ? "" : ONE_CHAR) + (opts.capture ? `(${analysis.safeOutput})` : analysis.safeOutput) : void 0;
3753
+ const open = tokens[token.tokensIndex];
3754
+ open.type = "text";
3755
+ open.value = literal;
3756
+ open.output = safeOutput || utils.escapeRegex(literal);
3757
+ for (let i = token.tokensIndex + 1; i < tokens.length; i++) {
3758
+ tokens[i].value = "";
3759
+ tokens[i].output = "";
3760
+ delete tokens[i].suffix;
3761
+ }
3762
+ state.output = token.output + open.output;
3763
+ state.backtrack = true;
3764
+ push({ type: "paren", extglob: true, value, output: "" });
3765
+ decrement("parens");
3766
+ return;
3767
+ }
3251
3768
  let output = token.close + (opts.capture ? ")" : "");
3252
3769
  let rest;
3253
3770
  if (token.type === "negate") {
@@ -3271,10 +3788,10 @@ var require_parse2 = __commonJS({
3271
3788
  };
3272
3789
  if (opts.fastpaths !== false && !/(^[*!]|[/()[\]{}"])/.test(input)) {
3273
3790
  let backslashes = false;
3274
- let output = input.replace(REGEX_SPECIAL_CHARS_BACKREF, (m2, esc, chars, first, rest, index) => {
3791
+ let output = input.replace(REGEX_SPECIAL_CHARS_BACKREF, (m, esc, chars, first, rest, index) => {
3275
3792
  if (first === "\\") {
3276
3793
  backslashes = true;
3277
- return m2;
3794
+ return m;
3278
3795
  }
3279
3796
  if (first === "?") {
3280
3797
  if (esc) {
@@ -3294,14 +3811,14 @@ var require_parse2 = __commonJS({
3294
3811
  }
3295
3812
  return star;
3296
3813
  }
3297
- return esc ? m2 : `\\${m2}`;
3814
+ return esc ? m : `\\${m}`;
3298
3815
  });
3299
3816
  if (backslashes === true) {
3300
3817
  if (opts.unescape === true) {
3301
3818
  output = output.replace(/\\/g, "");
3302
3819
  } else {
3303
- output = output.replace(/\\+/g, (m2) => {
3304
- return m2.length % 2 === 0 ? "\\\\" : m2 ? "\\" : "";
3820
+ output = output.replace(/\\+/g, (m) => {
3821
+ return m.length % 2 === 0 ? "\\\\" : m ? "\\" : "";
3305
3822
  });
3306
3823
  }
3307
3824
  }
@@ -3501,8 +4018,8 @@ var require_parse2 = __commonJS({
3501
4018
  brace.value = brace.output = "\\{";
3502
4019
  value = output = "\\}";
3503
4020
  state.output = out;
3504
- for (const t of toks) {
3505
- state.output += t.output || t.value;
4021
+ for (const t2 of toks) {
4022
+ state.output += t2.output || t2.value;
3506
4023
  }
3507
4024
  }
3508
4025
  push({ type: "brace", value, output });
@@ -3854,11 +4371,11 @@ var require_parse2 = __commonJS({
3854
4371
  }
3855
4372
  });
3856
4373
 
3857
- // node_modules/.bun/picomatch@2.3.1/node_modules/picomatch/lib/picomatch.js
4374
+ // node_modules/.bun/picomatch@2.3.2/node_modules/picomatch/lib/picomatch.js
3858
4375
  var require_picomatch = __commonJS({
3859
- "node_modules/.bun/picomatch@2.3.1/node_modules/picomatch/lib/picomatch.js"(exports, module) {
4376
+ "node_modules/.bun/picomatch@2.3.2/node_modules/picomatch/lib/picomatch.js"(exports, module) {
3860
4377
  "use strict";
3861
- init_utils();
4378
+ init_utils2();
3862
4379
  var path = __require("path");
3863
4380
  var scan = require_scan();
3864
4381
  var parse2 = require_parse2();
@@ -3996,11 +4513,11 @@ var require_picomatch = __commonJS({
3996
4513
  }
3997
4514
  });
3998
4515
 
3999
- // node_modules/.bun/picomatch@2.3.1/node_modules/picomatch/index.js
4516
+ // node_modules/.bun/picomatch@2.3.2/node_modules/picomatch/index.js
4000
4517
  var require_picomatch2 = __commonJS({
4001
- "node_modules/.bun/picomatch@2.3.1/node_modules/picomatch/index.js"(exports, module) {
4518
+ "node_modules/.bun/picomatch@2.3.2/node_modules/picomatch/index.js"(exports, module) {
4002
4519
  "use strict";
4003
- init_utils();
4520
+ init_utils2();
4004
4521
  module.exports = require_picomatch();
4005
4522
  }
4006
4523
  });
@@ -4009,15 +4526,15 @@ var require_picomatch2 = __commonJS({
4009
4526
  var require_micromatch = __commonJS({
4010
4527
  "node_modules/.bun/micromatch@4.0.8/node_modules/micromatch/index.js"(exports, module) {
4011
4528
  "use strict";
4012
- init_utils();
4529
+ init_utils2();
4013
4530
  var util = __require("util");
4014
4531
  var braces = require_braces();
4015
4532
  var picomatch = require_picomatch2();
4016
4533
  var utils = require_utils2();
4017
- var isEmptyString = (v2) => v2 === "" || v2 === "./";
4018
- var hasBraces = (v2) => {
4019
- const index = v2.indexOf("{");
4020
- return index > -1 && v2.indexOf("}", index) > -1;
4534
+ var isEmptyString = (v) => v === "" || v === "./";
4535
+ var hasBraces = (v) => {
4536
+ const index = v.indexOf("{");
4537
+ return index > -1 && v.indexOf("}", index) > -1;
4021
4538
  };
4022
4539
  var micromatch = (list, patterns, options) => {
4023
4540
  patterns = [].concat(patterns);
@@ -4137,7 +4654,7 @@ var require_micromatch = __commonJS({
4137
4654
  let regex = picomatch.makeRe(String(glob2), { ...options, capture: true });
4138
4655
  let match = regex.exec(posix ? utils.toPosixSlashes(input) : input);
4139
4656
  if (match) {
4140
- return match.slice(1).map((v2) => v2 === void 0 ? "" : v2);
4657
+ return match.slice(1).map((v) => v === void 0 ? "" : v);
4141
4658
  }
4142
4659
  };
4143
4660
  micromatch.makeRe = (...args) => picomatch.makeRe(...args);
@@ -4171,7 +4688,7 @@ var require_micromatch = __commonJS({
4171
4688
  var require_pattern = __commonJS({
4172
4689
  "node_modules/.bun/fast-glob@3.3.3/node_modules/fast-glob/out/utils/pattern.js"(exports) {
4173
4690
  "use strict";
4174
- init_utils();
4691
+ init_utils2();
4175
4692
  Object.defineProperty(exports, "__esModule", { value: true });
4176
4693
  exports.isAbsolute = exports.partitionAbsoluteAndRelative = exports.removeDuplicateSlashes = exports.matchAny = exports.convertPatternsToRe = exports.makeRe = exports.getPatternParts = exports.expandBraceExpansion = exports.expandPatternsWithBraceExpansion = exports.isAffectDepthOfReadingPattern = exports.endsWithSlashGlobStar = exports.hasGlobStar = exports.getBaseDirectory = exports.isPatternRelatedToParentDirectory = exports.getPatternsOutsideCurrentDirectory = exports.getPatternsInsideCurrentDirectory = exports.getPositivePatterns = exports.getNegativePatterns = exports.isPositivePattern = exports.isNegativePattern = exports.convertToNegativePattern = exports.convertToPositivePattern = exports.isDynamicPattern = exports.isStaticPattern = void 0;
4177
4694
  var path = __require("path");
@@ -4281,7 +4798,7 @@ var require_pattern = __commonJS({
4281
4798
  exports.expandPatternsWithBraceExpansion = expandPatternsWithBraceExpansion;
4282
4799
  function expandBraceExpansion(pattern) {
4283
4800
  const patterns = micromatch.braces(pattern, { expand: true, nodupes: true, keepEscaping: true });
4284
- patterns.sort((a, b3) => a.length - b3.length);
4801
+ patterns.sort((a, b) => a.length - b.length);
4285
4802
  return patterns.filter((pattern2) => pattern2 !== "");
4286
4803
  }
4287
4804
  exports.expandBraceExpansion = expandBraceExpansion;
@@ -4337,7 +4854,7 @@ var require_pattern = __commonJS({
4337
4854
  var require_merge2 = __commonJS({
4338
4855
  "node_modules/.bun/merge2@1.4.1/node_modules/merge2/index.js"(exports, module) {
4339
4856
  "use strict";
4340
- init_utils();
4857
+ init_utils2();
4341
4858
  var Stream = __require("stream");
4342
4859
  var PassThrough = Stream.PassThrough;
4343
4860
  var slice = Array.prototype.slice;
@@ -4457,7 +4974,7 @@ var require_merge2 = __commonJS({
4457
4974
  var require_stream = __commonJS({
4458
4975
  "node_modules/.bun/fast-glob@3.3.3/node_modules/fast-glob/out/utils/stream.js"(exports) {
4459
4976
  "use strict";
4460
- init_utils();
4977
+ init_utils2();
4461
4978
  Object.defineProperty(exports, "__esModule", { value: true });
4462
4979
  exports.merge = void 0;
4463
4980
  var merge2 = require_merge2();
@@ -4481,7 +4998,7 @@ var require_stream = __commonJS({
4481
4998
  var require_string = __commonJS({
4482
4999
  "node_modules/.bun/fast-glob@3.3.3/node_modules/fast-glob/out/utils/string.js"(exports) {
4483
5000
  "use strict";
4484
- init_utils();
5001
+ init_utils2();
4485
5002
  Object.defineProperty(exports, "__esModule", { value: true });
4486
5003
  exports.isEmpty = exports.isString = void 0;
4487
5004
  function isString(input) {
@@ -4499,7 +5016,7 @@ var require_string = __commonJS({
4499
5016
  var require_utils3 = __commonJS({
4500
5017
  "node_modules/.bun/fast-glob@3.3.3/node_modules/fast-glob/out/utils/index.js"(exports) {
4501
5018
  "use strict";
4502
- init_utils();
5019
+ init_utils2();
4503
5020
  Object.defineProperty(exports, "__esModule", { value: true });
4504
5021
  exports.string = exports.stream = exports.pattern = exports.path = exports.fs = exports.errno = exports.array = void 0;
4505
5022
  var array = require_array();
@@ -4523,7 +5040,7 @@ var require_utils3 = __commonJS({
4523
5040
  var require_tasks = __commonJS({
4524
5041
  "node_modules/.bun/fast-glob@3.3.3/node_modules/fast-glob/out/managers/tasks.js"(exports) {
4525
5042
  "use strict";
4526
- init_utils();
5043
+ init_utils2();
4527
5044
  Object.defineProperty(exports, "__esModule", { value: true });
4528
5045
  exports.convertPatternGroupToTask = exports.convertPatternGroupsToTasks = exports.groupPatternsByBaseDirectory = exports.getNegativePatternsAsPositive = exports.getPositivePatterns = exports.convertPatternsToTasks = exports.generate = void 0;
4529
5046
  var utils = require_utils3();
@@ -4620,7 +5137,7 @@ var require_tasks = __commonJS({
4620
5137
  var require_async = __commonJS({
4621
5138
  "node_modules/.bun/@nodelib+fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/providers/async.js"(exports) {
4622
5139
  "use strict";
4623
- init_utils();
5140
+ init_utils2();
4624
5141
  Object.defineProperty(exports, "__esModule", { value: true });
4625
5142
  exports.read = void 0;
4626
5143
  function read2(path, settings, callback) {
@@ -4663,7 +5180,7 @@ var require_async = __commonJS({
4663
5180
  var require_sync = __commonJS({
4664
5181
  "node_modules/.bun/@nodelib+fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/providers/sync.js"(exports) {
4665
5182
  "use strict";
4666
- init_utils();
5183
+ init_utils2();
4667
5184
  Object.defineProperty(exports, "__esModule", { value: true });
4668
5185
  exports.read = void 0;
4669
5186
  function read2(path, settings) {
@@ -4692,7 +5209,7 @@ var require_sync = __commonJS({
4692
5209
  var require_fs2 = __commonJS({
4693
5210
  "node_modules/.bun/@nodelib+fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/adapters/fs.js"(exports) {
4694
5211
  "use strict";
4695
- init_utils();
5212
+ init_utils2();
4696
5213
  Object.defineProperty(exports, "__esModule", { value: true });
4697
5214
  exports.createFileSystemAdapter = exports.FILE_SYSTEM_ADAPTER = void 0;
4698
5215
  var fs2 = __require("fs");
@@ -4716,7 +5233,7 @@ var require_fs2 = __commonJS({
4716
5233
  var require_settings = __commonJS({
4717
5234
  "node_modules/.bun/@nodelib+fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/settings.js"(exports) {
4718
5235
  "use strict";
4719
- init_utils();
5236
+ init_utils2();
4720
5237
  Object.defineProperty(exports, "__esModule", { value: true });
4721
5238
  var fs2 = require_fs2();
4722
5239
  var Settings = class {
@@ -4739,7 +5256,7 @@ var require_settings = __commonJS({
4739
5256
  var require_out = __commonJS({
4740
5257
  "node_modules/.bun/@nodelib+fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/index.js"(exports) {
4741
5258
  "use strict";
4742
- init_utils();
5259
+ init_utils2();
4743
5260
  Object.defineProperty(exports, "__esModule", { value: true });
4744
5261
  exports.statSync = exports.stat = exports.Settings = void 0;
4745
5262
  var async = require_async();
@@ -4771,7 +5288,7 @@ var require_out = __commonJS({
4771
5288
  // node_modules/.bun/queue-microtask@1.2.3/node_modules/queue-microtask/index.js
4772
5289
  var require_queue_microtask = __commonJS({
4773
5290
  "node_modules/.bun/queue-microtask@1.2.3/node_modules/queue-microtask/index.js"(exports, module) {
4774
- init_utils();
5291
+ init_utils2();
4775
5292
  var promise;
4776
5293
  module.exports = typeof queueMicrotask === "function" ? queueMicrotask.bind(typeof window !== "undefined" ? window : global) : (cb) => (promise || (promise = Promise.resolve())).then(cb).catch((err) => setTimeout(() => {
4777
5294
  throw err;
@@ -4782,7 +5299,7 @@ var require_queue_microtask = __commonJS({
4782
5299
  // node_modules/.bun/run-parallel@1.2.0/node_modules/run-parallel/index.js
4783
5300
  var require_run_parallel = __commonJS({
4784
5301
  "node_modules/.bun/run-parallel@1.2.0/node_modules/run-parallel/index.js"(exports, module) {
4785
- init_utils();
5302
+ init_utils2();
4786
5303
  module.exports = runParallel;
4787
5304
  var queueMicrotask2 = require_queue_microtask();
4788
5305
  function runParallel(tasks, cb) {
@@ -4834,7 +5351,7 @@ var require_run_parallel = __commonJS({
4834
5351
  var require_constants3 = __commonJS({
4835
5352
  "node_modules/.bun/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/constants.js"(exports) {
4836
5353
  "use strict";
4837
- init_utils();
5354
+ init_utils2();
4838
5355
  Object.defineProperty(exports, "__esModule", { value: true });
4839
5356
  exports.IS_SUPPORT_READDIR_WITH_FILE_TYPES = void 0;
4840
5357
  var NODE_PROCESS_VERSION_PARTS = process.versions.node.split(".");
@@ -4855,7 +5372,7 @@ var require_constants3 = __commonJS({
4855
5372
  var require_fs3 = __commonJS({
4856
5373
  "node_modules/.bun/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/utils/fs.js"(exports) {
4857
5374
  "use strict";
4858
- init_utils();
5375
+ init_utils2();
4859
5376
  Object.defineProperty(exports, "__esModule", { value: true });
4860
5377
  exports.createDirentFromStats = void 0;
4861
5378
  var DirentFromStats = class {
@@ -4881,7 +5398,7 @@ var require_fs3 = __commonJS({
4881
5398
  var require_utils4 = __commonJS({
4882
5399
  "node_modules/.bun/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/utils/index.js"(exports) {
4883
5400
  "use strict";
4884
- init_utils();
5401
+ init_utils2();
4885
5402
  Object.defineProperty(exports, "__esModule", { value: true });
4886
5403
  exports.fs = void 0;
4887
5404
  var fs2 = require_fs3();
@@ -4893,14 +5410,14 @@ var require_utils4 = __commonJS({
4893
5410
  var require_common = __commonJS({
4894
5411
  "node_modules/.bun/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/providers/common.js"(exports) {
4895
5412
  "use strict";
4896
- init_utils();
5413
+ init_utils2();
4897
5414
  Object.defineProperty(exports, "__esModule", { value: true });
4898
5415
  exports.joinPathSegments = void 0;
4899
- function joinPathSegments(a, b3, separator) {
5416
+ function joinPathSegments(a, b, separator) {
4900
5417
  if (a.endsWith(separator)) {
4901
- return a + b3;
5418
+ return a + b;
4902
5419
  }
4903
- return a + separator + b3;
5420
+ return a + separator + b;
4904
5421
  }
4905
5422
  exports.joinPathSegments = joinPathSegments;
4906
5423
  }
@@ -4910,7 +5427,7 @@ var require_common = __commonJS({
4910
5427
  var require_async2 = __commonJS({
4911
5428
  "node_modules/.bun/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/providers/async.js"(exports) {
4912
5429
  "use strict";
4913
- init_utils();
5430
+ init_utils2();
4914
5431
  Object.defineProperty(exports, "__esModule", { value: true });
4915
5432
  exports.readdir = exports.readdirWithFileTypes = exports.read = void 0;
4916
5433
  var fsStat = require_out();
@@ -5021,7 +5538,7 @@ var require_async2 = __commonJS({
5021
5538
  var require_sync2 = __commonJS({
5022
5539
  "node_modules/.bun/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/providers/sync.js"(exports) {
5023
5540
  "use strict";
5024
- init_utils();
5541
+ init_utils2();
5025
5542
  Object.defineProperty(exports, "__esModule", { value: true });
5026
5543
  exports.readdir = exports.readdirWithFileTypes = exports.read = void 0;
5027
5544
  var fsStat = require_out();
@@ -5081,7 +5598,7 @@ var require_sync2 = __commonJS({
5081
5598
  var require_fs4 = __commonJS({
5082
5599
  "node_modules/.bun/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/adapters/fs.js"(exports) {
5083
5600
  "use strict";
5084
- init_utils();
5601
+ init_utils2();
5085
5602
  Object.defineProperty(exports, "__esModule", { value: true });
5086
5603
  exports.createFileSystemAdapter = exports.FILE_SYSTEM_ADAPTER = void 0;
5087
5604
  var fs2 = __require("fs");
@@ -5107,7 +5624,7 @@ var require_fs4 = __commonJS({
5107
5624
  var require_settings2 = __commonJS({
5108
5625
  "node_modules/.bun/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/settings.js"(exports) {
5109
5626
  "use strict";
5110
- init_utils();
5627
+ init_utils2();
5111
5628
  Object.defineProperty(exports, "__esModule", { value: true });
5112
5629
  var path = __require("path");
5113
5630
  var fsStat = require_out();
@@ -5138,7 +5655,7 @@ var require_settings2 = __commonJS({
5138
5655
  var require_out2 = __commonJS({
5139
5656
  "node_modules/.bun/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/index.js"(exports) {
5140
5657
  "use strict";
5141
- init_utils();
5658
+ init_utils2();
5142
5659
  Object.defineProperty(exports, "__esModule", { value: true });
5143
5660
  exports.Settings = exports.scandirSync = exports.scandir = void 0;
5144
5661
  var async = require_async2();
@@ -5171,7 +5688,7 @@ var require_out2 = __commonJS({
5171
5688
  var require_reusify = __commonJS({
5172
5689
  "node_modules/.bun/reusify@1.1.0/node_modules/reusify/reusify.js"(exports, module) {
5173
5690
  "use strict";
5174
- init_utils();
5691
+ init_utils2();
5175
5692
  function reusify(Constructor) {
5176
5693
  var head = new Constructor();
5177
5694
  var tail = head;
@@ -5203,7 +5720,7 @@ var require_reusify = __commonJS({
5203
5720
  var require_queue = __commonJS({
5204
5721
  "node_modules/.bun/fastq@1.20.1/node_modules/fastq/queue.js"(exports, module) {
5205
5722
  "use strict";
5206
- init_utils();
5723
+ init_utils2();
5207
5724
  var reusify = require_reusify();
5208
5725
  function fastqueue(context, worker, _concurrency) {
5209
5726
  if (typeof context === "function") {
@@ -5488,7 +6005,7 @@ var require_queue = __commonJS({
5488
6005
  var require_common2 = __commonJS({
5489
6006
  "node_modules/.bun/@nodelib+fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/readers/common.js"(exports) {
5490
6007
  "use strict";
5491
- init_utils();
6008
+ init_utils2();
5492
6009
  Object.defineProperty(exports, "__esModule", { value: true });
5493
6010
  exports.joinPathSegments = exports.replacePathSegmentSeparator = exports.isAppliedFilter = exports.isFatalError = void 0;
5494
6011
  function isFatalError(settings, error2) {
@@ -5506,14 +6023,14 @@ var require_common2 = __commonJS({
5506
6023
  return filepath.split(/[/\\]/).join(separator);
5507
6024
  }
5508
6025
  exports.replacePathSegmentSeparator = replacePathSegmentSeparator;
5509
- function joinPathSegments(a, b3, separator) {
6026
+ function joinPathSegments(a, b, separator) {
5510
6027
  if (a === "") {
5511
- return b3;
6028
+ return b;
5512
6029
  }
5513
6030
  if (a.endsWith(separator)) {
5514
- return a + b3;
6031
+ return a + b;
5515
6032
  }
5516
- return a + separator + b3;
6033
+ return a + separator + b;
5517
6034
  }
5518
6035
  exports.joinPathSegments = joinPathSegments;
5519
6036
  }
@@ -5523,7 +6040,7 @@ var require_common2 = __commonJS({
5523
6040
  var require_reader = __commonJS({
5524
6041
  "node_modules/.bun/@nodelib+fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/readers/reader.js"(exports) {
5525
6042
  "use strict";
5526
- init_utils();
6043
+ init_utils2();
5527
6044
  Object.defineProperty(exports, "__esModule", { value: true });
5528
6045
  var common = require_common2();
5529
6046
  var Reader = class {
@@ -5541,7 +6058,7 @@ var require_reader = __commonJS({
5541
6058
  var require_async3 = __commonJS({
5542
6059
  "node_modules/.bun/@nodelib+fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/readers/async.js"(exports) {
5543
6060
  "use strict";
5544
- init_utils();
6061
+ init_utils2();
5545
6062
  Object.defineProperty(exports, "__esModule", { value: true });
5546
6063
  var events_1 = __require("events");
5547
6064
  var fsScandir = require_out2();
@@ -5645,7 +6162,7 @@ var require_async3 = __commonJS({
5645
6162
  var require_async4 = __commonJS({
5646
6163
  "node_modules/.bun/@nodelib+fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/providers/async.js"(exports) {
5647
6164
  "use strict";
5648
- init_utils();
6165
+ init_utils2();
5649
6166
  Object.defineProperty(exports, "__esModule", { value: true });
5650
6167
  var async_1 = require_async3();
5651
6168
  var AsyncProvider = class {
@@ -5682,7 +6199,7 @@ var require_async4 = __commonJS({
5682
6199
  var require_stream2 = __commonJS({
5683
6200
  "node_modules/.bun/@nodelib+fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/providers/stream.js"(exports) {
5684
6201
  "use strict";
5685
- init_utils();
6202
+ init_utils2();
5686
6203
  Object.defineProperty(exports, "__esModule", { value: true });
5687
6204
  var stream_1 = __require("stream");
5688
6205
  var async_1 = require_async3();
@@ -5724,7 +6241,7 @@ var require_stream2 = __commonJS({
5724
6241
  var require_sync3 = __commonJS({
5725
6242
  "node_modules/.bun/@nodelib+fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/readers/sync.js"(exports) {
5726
6243
  "use strict";
5727
- init_utils();
6244
+ init_utils2();
5728
6245
  Object.defineProperty(exports, "__esModule", { value: true });
5729
6246
  var fsScandir = require_out2();
5730
6247
  var common = require_common2();
@@ -5789,7 +6306,7 @@ var require_sync3 = __commonJS({
5789
6306
  var require_sync4 = __commonJS({
5790
6307
  "node_modules/.bun/@nodelib+fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/providers/sync.js"(exports) {
5791
6308
  "use strict";
5792
- init_utils();
6309
+ init_utils2();
5793
6310
  Object.defineProperty(exports, "__esModule", { value: true });
5794
6311
  var sync_1 = require_sync3();
5795
6312
  var SyncProvider = class {
@@ -5810,7 +6327,7 @@ var require_sync4 = __commonJS({
5810
6327
  var require_settings3 = __commonJS({
5811
6328
  "node_modules/.bun/@nodelib+fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/settings.js"(exports) {
5812
6329
  "use strict";
5813
- init_utils();
6330
+ init_utils2();
5814
6331
  Object.defineProperty(exports, "__esModule", { value: true });
5815
6332
  var path = __require("path");
5816
6333
  var fsScandir = require_out2();
@@ -5843,7 +6360,7 @@ var require_settings3 = __commonJS({
5843
6360
  var require_out3 = __commonJS({
5844
6361
  "node_modules/.bun/@nodelib+fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/index.js"(exports) {
5845
6362
  "use strict";
5846
- init_utils();
6363
+ init_utils2();
5847
6364
  Object.defineProperty(exports, "__esModule", { value: true });
5848
6365
  exports.Settings = exports.walkStream = exports.walkSync = exports.walk = void 0;
5849
6366
  var async_1 = require_async4();
@@ -5884,7 +6401,7 @@ var require_out3 = __commonJS({
5884
6401
  var require_reader2 = __commonJS({
5885
6402
  "node_modules/.bun/fast-glob@3.3.3/node_modules/fast-glob/out/readers/reader.js"(exports) {
5886
6403
  "use strict";
5887
- init_utils();
6404
+ init_utils2();
5888
6405
  Object.defineProperty(exports, "__esModule", { value: true });
5889
6406
  var path = __require("path");
5890
6407
  var fsStat = require_out();
@@ -5924,7 +6441,7 @@ var require_reader2 = __commonJS({
5924
6441
  var require_stream3 = __commonJS({
5925
6442
  "node_modules/.bun/fast-glob@3.3.3/node_modules/fast-glob/out/readers/stream.js"(exports) {
5926
6443
  "use strict";
5927
- init_utils();
6444
+ init_utils2();
5928
6445
  Object.defineProperty(exports, "__esModule", { value: true });
5929
6446
  var stream_1 = __require("stream");
5930
6447
  var fsStat = require_out();
@@ -5982,7 +6499,7 @@ var require_stream3 = __commonJS({
5982
6499
  var require_async5 = __commonJS({
5983
6500
  "node_modules/.bun/fast-glob@3.3.3/node_modules/fast-glob/out/readers/async.js"(exports) {
5984
6501
  "use strict";
5985
- init_utils();
6502
+ init_utils2();
5986
6503
  Object.defineProperty(exports, "__esModule", { value: true });
5987
6504
  var fsWalk = require_out3();
5988
6505
  var reader_1 = require_reader2();
@@ -6022,7 +6539,7 @@ var require_async5 = __commonJS({
6022
6539
  var require_matcher = __commonJS({
6023
6540
  "node_modules/.bun/fast-glob@3.3.3/node_modules/fast-glob/out/providers/matchers/matcher.js"(exports) {
6024
6541
  "use strict";
6025
- init_utils();
6542
+ init_utils2();
6026
6543
  Object.defineProperty(exports, "__esModule", { value: true });
6027
6544
  var utils = require_utils3();
6028
6545
  var Matcher = class {
@@ -6074,7 +6591,7 @@ var require_matcher = __commonJS({
6074
6591
  var require_partial = __commonJS({
6075
6592
  "node_modules/.bun/fast-glob@3.3.3/node_modules/fast-glob/out/providers/matchers/partial.js"(exports) {
6076
6593
  "use strict";
6077
- init_utils();
6594
+ init_utils2();
6078
6595
  Object.defineProperty(exports, "__esModule", { value: true });
6079
6596
  var matcher_1 = require_matcher();
6080
6597
  var PartialMatcher = class extends matcher_1.default {
@@ -6112,7 +6629,7 @@ var require_partial = __commonJS({
6112
6629
  var require_deep = __commonJS({
6113
6630
  "node_modules/.bun/fast-glob@3.3.3/node_modules/fast-glob/out/providers/filters/deep.js"(exports) {
6114
6631
  "use strict";
6115
- init_utils();
6632
+ init_utils2();
6116
6633
  Object.defineProperty(exports, "__esModule", { value: true });
6117
6634
  var utils = require_utils3();
6118
6635
  var partial_1 = require_partial();
@@ -6178,7 +6695,7 @@ var require_deep = __commonJS({
6178
6695
  var require_entry = __commonJS({
6179
6696
  "node_modules/.bun/fast-glob@3.3.3/node_modules/fast-glob/out/providers/filters/entry.js"(exports) {
6180
6697
  "use strict";
6181
- init_utils();
6698
+ init_utils2();
6182
6699
  Object.defineProperty(exports, "__esModule", { value: true });
6183
6700
  var utils = require_utils3();
6184
6701
  var EntryFilter = class {
@@ -6267,7 +6784,7 @@ var require_entry = __commonJS({
6267
6784
  var require_error = __commonJS({
6268
6785
  "node_modules/.bun/fast-glob@3.3.3/node_modules/fast-glob/out/providers/filters/error.js"(exports) {
6269
6786
  "use strict";
6270
- init_utils();
6787
+ init_utils2();
6271
6788
  Object.defineProperty(exports, "__esModule", { value: true });
6272
6789
  var utils = require_utils3();
6273
6790
  var ErrorFilter = class {
@@ -6289,7 +6806,7 @@ var require_error = __commonJS({
6289
6806
  var require_entry2 = __commonJS({
6290
6807
  "node_modules/.bun/fast-glob@3.3.3/node_modules/fast-glob/out/providers/transformers/entry.js"(exports) {
6291
6808
  "use strict";
6292
- init_utils();
6809
+ init_utils2();
6293
6810
  Object.defineProperty(exports, "__esModule", { value: true });
6294
6811
  var utils = require_utils3();
6295
6812
  var EntryTransformer = class {
@@ -6322,7 +6839,7 @@ var require_entry2 = __commonJS({
6322
6839
  var require_provider = __commonJS({
6323
6840
  "node_modules/.bun/fast-glob@3.3.3/node_modules/fast-glob/out/providers/provider.js"(exports) {
6324
6841
  "use strict";
6325
- init_utils();
6842
+ init_utils2();
6326
6843
  Object.defineProperty(exports, "__esModule", { value: true });
6327
6844
  var path = __require("path");
6328
6845
  var deep_1 = require_deep();
@@ -6377,7 +6894,7 @@ var require_provider = __commonJS({
6377
6894
  var require_async6 = __commonJS({
6378
6895
  "node_modules/.bun/fast-glob@3.3.3/node_modules/fast-glob/out/providers/async.js"(exports) {
6379
6896
  "use strict";
6380
- init_utils();
6897
+ init_utils2();
6381
6898
  Object.defineProperty(exports, "__esModule", { value: true });
6382
6899
  var async_1 = require_async5();
6383
6900
  var provider_1 = require_provider();
@@ -6407,7 +6924,7 @@ var require_async6 = __commonJS({
6407
6924
  var require_stream4 = __commonJS({
6408
6925
  "node_modules/.bun/fast-glob@3.3.3/node_modules/fast-glob/out/providers/stream.js"(exports) {
6409
6926
  "use strict";
6410
- init_utils();
6927
+ init_utils2();
6411
6928
  Object.defineProperty(exports, "__esModule", { value: true });
6412
6929
  var stream_1 = __require("stream");
6413
6930
  var stream_2 = require_stream3();
@@ -6442,7 +6959,7 @@ var require_stream4 = __commonJS({
6442
6959
  var require_sync5 = __commonJS({
6443
6960
  "node_modules/.bun/fast-glob@3.3.3/node_modules/fast-glob/out/readers/sync.js"(exports) {
6444
6961
  "use strict";
6445
- init_utils();
6962
+ init_utils2();
6446
6963
  Object.defineProperty(exports, "__esModule", { value: true });
6447
6964
  var fsStat = require_out();
6448
6965
  var fsWalk = require_out3();
@@ -6491,7 +7008,7 @@ var require_sync5 = __commonJS({
6491
7008
  var require_sync6 = __commonJS({
6492
7009
  "node_modules/.bun/fast-glob@3.3.3/node_modules/fast-glob/out/providers/sync.js"(exports) {
6493
7010
  "use strict";
6494
- init_utils();
7011
+ init_utils2();
6495
7012
  Object.defineProperty(exports, "__esModule", { value: true });
6496
7013
  var sync_1 = require_sync5();
6497
7014
  var provider_1 = require_provider();
@@ -6521,7 +7038,7 @@ var require_sync6 = __commonJS({
6521
7038
  var require_settings4 = __commonJS({
6522
7039
  "node_modules/.bun/fast-glob@3.3.3/node_modules/fast-glob/out/settings.js"(exports) {
6523
7040
  "use strict";
6524
- init_utils();
7041
+ init_utils2();
6525
7042
  Object.defineProperty(exports, "__esModule", { value: true });
6526
7043
  exports.DEFAULT_FILE_SYSTEM_ADAPTER = void 0;
6527
7044
  var fs2 = __require("fs");
@@ -6582,7 +7099,7 @@ var require_settings4 = __commonJS({
6582
7099
  var require_out4 = __commonJS({
6583
7100
  "node_modules/.bun/fast-glob@3.3.3/node_modules/fast-glob/out/index.js"(exports, module) {
6584
7101
  "use strict";
6585
- init_utils();
7102
+ init_utils2();
6586
7103
  var taskManager = require_tasks();
6587
7104
  var async_1 = require_async6();
6588
7105
  var stream_1 = require_stream4();
@@ -6701,7 +7218,7 @@ var I18N_PATHS, SCAN_PATTERNS, GLOB_OPTIONS;
6701
7218
  var init_constants = __esm({
6702
7219
  "packages/core/config/constants.js"() {
6703
7220
  "use strict";
6704
- init_utils();
7221
+ init_utils2();
6705
7222
  I18N_PATHS = {
6706
7223
  // Monorepo source structure (locales at root, not in src/)
6707
7224
  SOURCE_ROOT: "packages/core/i18n",
@@ -6863,7 +7380,7 @@ var import_fast_glob, constants, log2, PACKAGE_PATHS, PathResolver;
6863
7380
  var init_PathResolver = __esm({
6864
7381
  "packages/core/config/utils/PathResolver.ts"() {
6865
7382
  "use strict";
6866
- init_utils();
7383
+ init_utils2();
6867
7384
  import_fast_glob = __toESM(require_out4(), 1);
6868
7385
  init_constants();
6869
7386
  constants = {
@@ -7975,13 +8492,14 @@ async function openFile(filePath, flags) {
7975
8492
  const fs2 = await import("node:fs");
7976
8493
  return fs2.promises.open(filePath, flags);
7977
8494
  }
7978
- var pathResolverInstance, resolveFrameworkPackage, normalizePath, pathExists, read, readSync, write, writeSync, copy, removeSync, statSync2, ensureDir, findFiles, fromAppRoot, getRelativePathBetween, getDirname, getBasename, joinPath;
8495
+ var pathResolverInstance, getRepoRoot, resolveFrameworkPackage, normalizePath, pathExists, read, readSync, write, writeSync, copy, removeSync, statSync2, ensureDir, findFiles, fromAppRoot, getRelativePathBetween, getDirname, getBasename, joinPath;
7979
8496
  var init_pathResolver = __esm({
7980
8497
  "packages/tooling/src/utils/pathResolver.ts"() {
7981
8498
  "use strict";
7982
- init_utils();
8499
+ init_utils2();
7983
8500
  init_PathResolver();
7984
8501
  pathResolverInstance = PathResolver.getInstance({ debug: false });
8502
+ getRepoRoot = () => pathResolverInstance.getRepoRoot();
7985
8503
  resolveFrameworkPackage = (name, from) => pathResolverInstance.resolveFrameworkPackage(name, from || null);
7986
8504
  normalizePath = (...pathSegments) => {
7987
8505
  return pathResolverInstance.normalizePath(join2(...pathSegments));
@@ -8036,7 +8554,7 @@ function readPackageJson(filePath) {
8036
8554
  var init_typed_file_operations = __esm({
8037
8555
  "packages/tooling/src/utils/typed-file-operations.ts"() {
8038
8556
  "use strict";
8039
- init_utils();
8557
+ init_utils2();
8040
8558
  init_errors();
8041
8559
  init_pathResolver();
8042
8560
  }
@@ -8050,7 +8568,7 @@ import { dirname as dirname3, resolve as resolve3 } from "node:path";
8050
8568
  import process from "node:process";
8051
8569
  import { fileURLToPath as fileURLToPath3 } from "node:url";
8052
8570
  var require2, __filename, __dirname;
8053
- var init_utils = __esm({
8571
+ var init_utils2 = __esm({
8054
8572
  "packages/tooling/src/bundler/utils.ts"() {
8055
8573
  "use strict";
8056
8574
  require2 = createRequire3(import.meta.url);
@@ -8070,6 +8588,14 @@ var init_utils = __esm({
8070
8588
  });
8071
8589
 
8072
8590
  // packages/tooling/src/utils/app-detection.ts
8591
+ function createRootAppInfo(projectRoot) {
8592
+ return {
8593
+ name: "root",
8594
+ packageName: "root",
8595
+ path: projectRoot,
8596
+ framework: "vite"
8597
+ };
8598
+ }
8073
8599
  function detectApps(projectRoot) {
8074
8600
  const apps = [];
8075
8601
  const appsDir = joinPath(projectRoot, "apps");
@@ -8125,45 +8651,175 @@ function analyzeApp(appPath, appName) {
8125
8651
  } else if (pathExists(joinPath(appPath, "vite.config.ts")) || pathExists(joinPath(appPath, "vite.config.js")) || pathExists(joinPath(appPath, "vite.config.mjs")) || packageJson.dependencies?.vite || packageJson.devDependencies?.vite) {
8126
8652
  framework = "vite";
8127
8653
  }
8128
- const functionsPath = joinPath(appPath, "functions");
8129
- const functionsStat = statSync2(functionsPath);
8130
- const hasFunctions = pathExists(functionsPath) && (functionsStat?.isDirectory() ?? false);
8131
- let platform;
8132
- const firebaseJsonInFunctions = hasFunctions && pathExists(joinPath(functionsPath, "firebase.json"));
8133
- const firebaseJsonInApp = pathExists(joinPath(appPath, "firebase.json"));
8134
- if (firebaseJsonInFunctions || firebaseJsonInApp) {
8135
- platform = "firebase";
8654
+ const firebaseJsonPath = joinPath(appPath, "firebase.json");
8655
+ const hasFirebase = pathExists(firebaseJsonPath);
8656
+ const supabaseDir = joinPath(appPath, "supabase");
8657
+ const supabaseConfigPath = joinPath(supabaseDir, "config.toml");
8658
+ const hasSupabaseDep = !!(packageJson.dependencies?.["@donotdev/supabase"] || packageJson.dependencies?.["@supabase/supabase-js"]);
8659
+ let hasSupabase = pathExists(supabaseDir) || pathExists(supabaseConfigPath) || hasSupabaseDep;
8660
+ if (!hasSupabase) {
8661
+ try {
8662
+ const envPath = joinPath(appPath, ".env");
8663
+ if (pathExists(envPath)) {
8664
+ const envContent = readSync(envPath);
8665
+ if (envContent.match(/VITE_SUPABASE_URL=.+/)) {
8666
+ hasSupabase = true;
8667
+ }
8668
+ }
8669
+ } catch {
8670
+ }
8671
+ }
8672
+ let provider = "unknown";
8673
+ if (hasFirebase && hasSupabase) {
8674
+ provider = "both";
8675
+ } else if (hasFirebase) {
8676
+ provider = "firebase";
8677
+ } else if (hasSupabase) {
8678
+ provider = "supabase";
8136
8679
  }
8137
- if (!platform) {
8138
- const supabaseConfigPath = joinPath(appPath, "supabase", "config.toml");
8139
- const hasSupabaseDep = !!(packageJson.dependencies?.["@donotdev/supabase"] || packageJson.dependencies?.["@supabase/supabase-js"]);
8140
- if (pathExists(supabaseConfigPath) || hasSupabaseDep) {
8141
- platform = "supabase";
8680
+ let firebaseConfig;
8681
+ if (hasFirebase) {
8682
+ try {
8683
+ const config = readSync(firebaseJsonPath, { format: "json" });
8684
+ if (config && typeof config === "object") {
8685
+ const fb = config;
8686
+ firebaseConfig = {
8687
+ projectId: fb.projectId,
8688
+ hasHosting: !!fb.hosting,
8689
+ hasFunctions: !!fb.functions,
8690
+ hasFirestoreRules: !!fb.firestore?.rules,
8691
+ hasStorageRules: !!fb.storage?.rules
8692
+ };
8693
+ }
8694
+ } catch {
8695
+ firebaseConfig = {
8696
+ hasHosting: false,
8697
+ hasFunctions: false,
8698
+ hasFirestoreRules: false,
8699
+ hasStorageRules: false
8700
+ };
8701
+ }
8702
+ }
8703
+ const supabaseFunctionsDir = joinPath(supabaseDir, "functions");
8704
+ const supabaseMigrationsDir = joinPath(supabaseDir, "migrations");
8705
+ let supabaseConfig;
8706
+ if (hasSupabase) {
8707
+ let url;
8708
+ try {
8709
+ const envPath = joinPath(appPath, ".env");
8710
+ if (pathExists(envPath)) {
8711
+ const envContent = readSync(envPath);
8712
+ const urlMatch = envContent.match(/VITE_SUPABASE_URL=(.+)/);
8713
+ if (urlMatch && urlMatch[1]) {
8714
+ url = urlMatch[1].trim();
8715
+ }
8716
+ }
8717
+ } catch {
8718
+ }
8719
+ supabaseConfig = {
8720
+ url,
8721
+ hasFunctions: pathExists(supabaseFunctionsDir),
8722
+ hasMigrations: pathExists(supabaseMigrationsDir)
8723
+ };
8724
+ }
8725
+ let functions;
8726
+ if (hasFirebase && firebaseConfig?.hasFunctions) {
8727
+ const firebaseFunctionsDir = joinPath(appPath, "functions");
8728
+ const firebaseFunctionsStat = statSync2(firebaseFunctionsDir);
8729
+ if (pathExists(firebaseFunctionsDir) && (firebaseFunctionsStat?.isDirectory() ?? false)) {
8730
+ functions = "firebase";
8731
+ }
8732
+ }
8733
+ if (!functions && hasSupabase) {
8734
+ const sbFunctionsStat = statSync2(supabaseFunctionsDir);
8735
+ if (pathExists(supabaseFunctionsDir) && (sbFunctionsStat?.isDirectory() ?? false)) {
8736
+ functions = "supabase";
8142
8737
  }
8143
8738
  }
8144
- if (!platform) {
8739
+ if (!functions) {
8145
8740
  const vercelJsonPath = joinPath(appPath, "vercel.json");
8146
- if (pathExists(vercelJsonPath)) {
8147
- platform = "vercel";
8741
+ const apiDir = joinPath(appPath, "api");
8742
+ const apiDirStat = statSync2(apiDir);
8743
+ if (pathExists(vercelJsonPath) && pathExists(apiDir) && (apiDirStat?.isDirectory() ?? false)) {
8744
+ functions = "vercel";
8745
+ }
8746
+ }
8747
+ let hosting;
8748
+ if (hasFirebase && firebaseConfig?.hasHosting) {
8749
+ hosting = "firebase";
8750
+ }
8751
+ if (!hosting) {
8752
+ if (pathExists(joinPath(appPath, "vercel.json")) || pathExists(joinPath(appPath, ".vercel"))) {
8753
+ hosting = "vercel";
8148
8754
  }
8149
8755
  }
8150
8756
  return {
8151
8757
  name: appName,
8152
8758
  packageName: packageJson.name || appName,
8153
8759
  path: appPath,
8154
- packageJsonPath,
8155
8760
  framework,
8156
- hasFunctions,
8157
- functionsPath: hasFunctions ? functionsPath : void 0,
8158
- platform
8761
+ provider,
8762
+ functions,
8763
+ hosting,
8764
+ firebaseConfig,
8765
+ supabaseConfig
8159
8766
  };
8160
8767
  }
8768
+ function detectBackendFromProviders(appDir) {
8769
+ for (const candidate of PROVIDERS_CANDIDATES) {
8770
+ const filePath = joinPath(appDir, candidate);
8771
+ if (!pathExists(filePath)) continue;
8772
+ const content = readSync(filePath, { format: "text" });
8773
+ if (typeof content !== "string") continue;
8774
+ if (content.includes("@donotdev/firebase") || content.includes("FirebaseAuth") || content.includes("firebaseAuth")) {
8775
+ return "firebase";
8776
+ }
8777
+ if (content.includes("@donotdev/supabase") || content.includes("SupabaseAuth") || content.includes("supabaseAuth")) {
8778
+ return "supabase";
8779
+ }
8780
+ break;
8781
+ }
8782
+ return null;
8783
+ }
8784
+ function analyzeProjectTopology(projectRoot) {
8785
+ const apps = detectApps(projectRoot);
8786
+ const appBackends = /* @__PURE__ */ new Map();
8787
+ const backendOwners = /* @__PURE__ */ new Map();
8788
+ for (const app of apps) {
8789
+ let backend = app.provider === "firebase" || app.provider === "supabase" ? app.provider : null;
8790
+ if (!backend) {
8791
+ backend = detectBackendFromProviders(app.path);
8792
+ }
8793
+ appBackends.set(app.name, backend);
8794
+ if (pathExists(joinPath(app.path, "supabase", "config.toml"))) {
8795
+ backendOwners.set("supabase", app);
8796
+ }
8797
+ if (pathExists(joinPath(app.path, "firebase.json")) || pathExists(joinPath(app.path, "functions", "firebase.json"))) {
8798
+ backendOwners.set("firebase", app);
8799
+ }
8800
+ }
8801
+ return { apps, appBackends, backendOwners };
8802
+ }
8803
+ function findBackendApp(topology, appName) {
8804
+ const backend = topology.appBackends.get(appName);
8805
+ if (!backend) return void 0;
8806
+ return topology.backendOwners.get(backend);
8807
+ }
8808
+ var PROVIDERS_CANDIDATES;
8161
8809
  var init_app_detection = __esm({
8162
8810
  "packages/tooling/src/utils/app-detection.ts"() {
8163
8811
  "use strict";
8164
- init_utils();
8812
+ init_utils2();
8165
8813
  init_pathResolver();
8166
8814
  init_typed_file_operations();
8815
+ PROVIDERS_CANDIDATES = [
8816
+ "src/config/providers.ts",
8817
+ "src/config/providers.tsx",
8818
+ "src/providers.ts",
8819
+ "src/providers.tsx",
8820
+ "src/lib/providers.ts",
8821
+ "src/lib/providers.tsx"
8822
+ ];
8167
8823
  }
8168
8824
  });
8169
8825
 
@@ -8189,11 +8845,11 @@ async function selectApp(projectRoot, appName) {
8189
8845
  if (apps.length === 1) {
8190
8846
  return apps[0] || null;
8191
8847
  }
8192
- const selected = await ve({
8848
+ const selected = await _t({
8193
8849
  message: "Select app:",
8194
8850
  options: apps.map((app) => ({
8195
8851
  value: app.name,
8196
- label: `${app.name} (${app.framework === "nextjs" ? "Next.js" : "Vite"}${app.hasFunctions ? ` + ${app.platform || "functions"}` : ""})`
8852
+ label: `${app.name} (${app.framework === "nextjs" ? "Next.js" : "Vite"}${app.functions ? ` + ${app.functions} functions` : ""})`
8197
8853
  }))
8198
8854
  });
8199
8855
  if (typeof selected !== "string") {
@@ -8204,8 +8860,8 @@ async function selectApp(projectRoot, appName) {
8204
8860
  var init_app_selector = __esm({
8205
8861
  "packages/tooling/src/utils/app-selector.ts"() {
8206
8862
  "use strict";
8207
- init_utils();
8208
- init_dist2();
8863
+ init_utils2();
8864
+ init_dist4();
8209
8865
  init_app_detection();
8210
8866
  init_cli_output();
8211
8867
  }
@@ -8213,24 +8869,24 @@ var init_app_selector = __esm({
8213
8869
 
8214
8870
  // packages/tooling/src/utils/cli-input.ts
8215
8871
  async function askForInput(message, defaultValue = "") {
8216
- const result = await he({
8872
+ const result = await Ot({
8217
8873
  message,
8218
8874
  placeholder: defaultValue || void 0,
8219
8875
  defaultValue: defaultValue || void 0
8220
8876
  });
8221
- if (pD(result)) {
8222
- xe("Operation cancelled.");
8877
+ if (q(result)) {
8878
+ pt("Operation cancelled.");
8223
8879
  process.exit(0);
8224
8880
  }
8225
8881
  return result;
8226
8882
  }
8227
8883
  async function askForConfirmation(message, defaultValue = false) {
8228
- const result = await ye({
8884
+ const result = await ot2({
8229
8885
  message,
8230
8886
  initialValue: defaultValue
8231
8887
  });
8232
- if (pD(result)) {
8233
- xe("Operation cancelled.");
8888
+ if (q(result)) {
8889
+ pt("Operation cancelled.");
8234
8890
  process.exit(0);
8235
8891
  }
8236
8892
  return result;
@@ -8241,13 +8897,13 @@ async function askForSelection(message, choices, defaultValue = 0) {
8241
8897
  label: choice.title,
8242
8898
  hint: choice.hint
8243
8899
  }));
8244
- const result = await ve({
8900
+ const result = await _t({
8245
8901
  message,
8246
8902
  options,
8247
8903
  initialValue: choices[defaultValue]?.value
8248
8904
  });
8249
- if (pD(result)) {
8250
- xe("Operation cancelled.");
8905
+ if (q(result)) {
8906
+ pt("Operation cancelled.");
8251
8907
  process.exit(0);
8252
8908
  }
8253
8909
  return result;
@@ -8255,8 +8911,8 @@ async function askForSelection(message, choices, defaultValue = 0) {
8255
8911
  var init_cli_input = __esm({
8256
8912
  "packages/tooling/src/utils/cli-input.ts"() {
8257
8913
  "use strict";
8258
- init_utils();
8259
- init_dist2();
8914
+ init_utils2();
8915
+ init_dist4();
8260
8916
  }
8261
8917
  });
8262
8918
 
@@ -8279,7 +8935,7 @@ function getErrorMessage(error2) {
8279
8935
  var init_error_handling = __esm({
8280
8936
  "packages/tooling/src/utils/error-handling.ts"() {
8281
8937
  "use strict";
8282
- init_utils();
8938
+ init_utils2();
8283
8939
  }
8284
8940
  });
8285
8941
 
@@ -8337,7 +8993,7 @@ async function validateToken(token) {
8337
8993
  const data = await res.json();
8338
8994
  return { username: data.user.username, email: data.user.email };
8339
8995
  }
8340
- async function validateProject(token, projectId, orgId) {
8996
+ async function fetchProjectDetails(token, projectId, orgId) {
8341
8997
  const q2 = orgId ? `?teamId=${encodeURIComponent(orgId)}` : "";
8342
8998
  const res = await fetch(
8343
8999
  `${VERCEL_API}/v9/projects/${encodeURIComponent(projectId)}${q2}`,
@@ -8350,7 +9006,14 @@ async function validateProject(token, projectId, orgId) {
8350
9006
  throw formatVercelError(res.status, body, "validate project");
8351
9007
  }
8352
9008
  const data = await res.json();
8353
- return { projectName: data.name };
9009
+ return {
9010
+ projectName: data.name,
9011
+ link: data.link ?? null
9012
+ };
9013
+ }
9014
+ async function validateProject(token, projectId, orgId) {
9015
+ const details = await fetchProjectDetails(token, projectId, orgId);
9016
+ return { projectName: details.projectName };
8354
9017
  }
8355
9018
  async function detectAccountType(token) {
8356
9019
  const res = await fetch(`${VERCEL_API}/v2/teams`, {
@@ -8361,10 +9024,10 @@ async function detectAccountType(token) {
8361
9024
  throw formatVercelError(res.status, body, "detect account type");
8362
9025
  }
8363
9026
  const data = await res.json();
8364
- const teams = data.teams.map((t) => ({
8365
- id: t.id,
8366
- name: t.name,
8367
- slug: t.slug
9027
+ const teams = data.teams.map((t2) => ({
9028
+ id: t2.id,
9029
+ name: t2.name,
9030
+ slug: t2.slug
8368
9031
  }));
8369
9032
  return { hasTeams: teams.length > 0, teams };
8370
9033
  }
@@ -8372,7 +9035,7 @@ var VERCEL_API;
8372
9035
  var init_vercel_api = __esm({
8373
9036
  "packages/tooling/src/apps/vercel-api.ts"() {
8374
9037
  "use strict";
8375
- init_utils();
9038
+ init_utils2();
8376
9039
  init_errors();
8377
9040
  VERCEL_API = "https://api.vercel.com";
8378
9041
  }
@@ -8476,7 +9139,7 @@ var LEGACY_PATHS, warnedLegacy, cachedSecretsPath, cachedSecrets;
8476
9139
  var init_secrets_resolver = __esm({
8477
9140
  "packages/tooling/src/utils/secrets-resolver.ts"() {
8478
9141
  "use strict";
8479
- init_utils();
9142
+ init_utils2();
8480
9143
  init_cli_output();
8481
9144
  init_pathResolver();
8482
9145
  LEGACY_PATHS = {
@@ -8503,7 +9166,7 @@ function resolvePerAppVar(appDir, varName) {
8503
9166
  return null;
8504
9167
  }
8505
9168
  function resolveVercelCredentials(appDir, projectRoot) {
8506
- const root = projectRoot ?? process.cwd();
9169
+ const root = projectRoot ?? getRepoRoot();
8507
9170
  const token = resolveSecret("VERCEL_TOKEN", root, { appDir })?.value ?? null;
8508
9171
  const orgId = resolvePerAppVar(appDir, "VERCEL_ORG_ID");
8509
9172
  const projectId = resolvePerAppVar(appDir, "VERCEL_PROJECT_ID");
@@ -8522,73 +9185,12 @@ function resolveVercelCredentials(appDir, projectRoot) {
8522
9185
  var init_vercel_token = __esm({
8523
9186
  "packages/tooling/src/cli/setup/vercel-token.ts"() {
8524
9187
  "use strict";
8525
- init_utils();
9188
+ init_utils2();
8526
9189
  init_pathResolver();
8527
9190
  init_secrets_resolver();
8528
9191
  }
8529
9192
  });
8530
9193
 
8531
- // packages/tooling/src/utils/cross-app-detection.ts
8532
- function detectBackendFromProviders(appDir) {
8533
- for (const candidate of PROVIDERS_CANDIDATES) {
8534
- const filePath = joinPath(appDir, candidate);
8535
- if (!pathExists(filePath)) continue;
8536
- const content = readSync(filePath, { format: "text" });
8537
- if (typeof content !== "string") continue;
8538
- if (content.includes("@donotdev/firebase") || content.includes("FirebaseAuth") || content.includes("firebaseAuth")) {
8539
- return "firebase";
8540
- }
8541
- if (content.includes("@donotdev/supabase") || content.includes("SupabaseAuth") || content.includes("supabaseAuth")) {
8542
- return "supabase";
8543
- }
8544
- break;
8545
- }
8546
- return null;
8547
- }
8548
- function analyzeProjectTopology(projectRoot) {
8549
- const apps = detectApps(projectRoot);
8550
- const appBackends = /* @__PURE__ */ new Map();
8551
- const backendOwners = /* @__PURE__ */ new Map();
8552
- for (const app of apps) {
8553
- let backend = app.platform === "firebase" || app.platform === "supabase" ? app.platform : null;
8554
- if (!backend) {
8555
- backend = detectBackendFromProviders(app.path);
8556
- }
8557
- appBackends.set(app.name, backend);
8558
- if (pathExists(joinPath(app.path, "supabase", "config.toml"))) {
8559
- backendOwners.set("supabase", app);
8560
- }
8561
- if (pathExists(joinPath(app.path, "firebase.json")) || pathExists(joinPath(app.path, "functions", "firebase.json"))) {
8562
- backendOwners.set("firebase", app);
8563
- }
8564
- }
8565
- if (!backendOwners.has("firebase") && (pathExists(joinPath(projectRoot, "firebase.json")) || pathExists(joinPath(projectRoot, ".firebaserc")))) {
8566
- }
8567
- return { apps, appBackends, backendOwners };
8568
- }
8569
- function findBackendApp(topology, appName) {
8570
- const backend = topology.appBackends.get(appName);
8571
- if (!backend) return void 0;
8572
- return topology.backendOwners.get(backend);
8573
- }
8574
- var PROVIDERS_CANDIDATES;
8575
- var init_cross_app_detection = __esm({
8576
- "packages/tooling/src/utils/cross-app-detection.ts"() {
8577
- "use strict";
8578
- init_utils();
8579
- init_app_detection();
8580
- init_pathResolver();
8581
- PROVIDERS_CANDIDATES = [
8582
- "src/config/providers.ts",
8583
- "src/config/providers.tsx",
8584
- "src/providers.ts",
8585
- "src/providers.tsx",
8586
- "src/lib/providers.ts",
8587
- "src/lib/providers.tsx"
8588
- ];
8589
- }
8590
- });
8591
-
8592
9194
  // packages/tooling/src/cli/setup/types.ts
8593
9195
  function computeOverallStatus(steps) {
8594
9196
  const hasFailure = steps.some((s) => s.status === "failed");
@@ -8602,7 +9204,7 @@ function computeOverallStatus(steps) {
8602
9204
  var init_types = __esm({
8603
9205
  "packages/tooling/src/cli/setup/types.ts"() {
8604
9206
  "use strict";
8605
- init_utils();
9207
+ init_utils2();
8606
9208
  }
8607
9209
  });
8608
9210
 
@@ -8682,7 +9284,7 @@ async function checkPrerequisites() {
8682
9284
  }
8683
9285
  }
8684
9286
  async function selectOrCreateProject() {
8685
- const s = Y2();
9287
+ const s = fe();
8686
9288
  s.start("Fetching Firebase projects...");
8687
9289
  const data = firebaseJson(["projects:list"]);
8688
9290
  if (data.status !== "success" || !Array.isArray(data.result) || !data.result.length) {
@@ -8724,7 +9326,7 @@ async function createProject() {
8724
9326
  ""
8725
9327
  );
8726
9328
  const displayName = await askForInput("Display name", projectId);
8727
- const s = Y2();
9329
+ const s = fe();
8728
9330
  s.start(`Creating Firebase project "${projectId}"...`);
8729
9331
  try {
8730
9332
  const data = firebaseJson([
@@ -8747,7 +9349,7 @@ async function createProject() {
8747
9349
  return { projectId, displayName };
8748
9350
  }
8749
9351
  async function ensureWebApp(projectId) {
8750
- const s = Y2();
9352
+ const s = fe();
8751
9353
  s.start("Getting web app config...");
8752
9354
  try {
8753
9355
  const data = firebaseJson([
@@ -8776,7 +9378,7 @@ async function ensureWebApp(projectId) {
8776
9378
  );
8777
9379
  process.exit(1);
8778
9380
  }
8779
- const s2 = Y2();
9381
+ const s2 = fe();
8780
9382
  s2.start("Retrieving SDK config...");
8781
9383
  await new Promise((resolve4) => setTimeout(resolve4, 2e3));
8782
9384
  const configData = firebaseJson([
@@ -8819,7 +9421,7 @@ function writeEnvFile(appDir, config, framework) {
8819
9421
  for (const line of existingLines) {
8820
9422
  const trimmed = line.trim();
8821
9423
  const isFirebaseVar = [...firebaseKeys].some(
8822
- (k3) => trimmed.startsWith(`${prefix}${k3}=`) || trimmed.startsWith(`# ${prefix}${k3}=`)
9424
+ (k) => trimmed.startsWith(`${prefix}${k}=`) || trimmed.startsWith(`# ${prefix}${k}=`)
8823
9425
  );
8824
9426
  if (!isFirebaseVar) {
8825
9427
  preserved.push(line);
@@ -8839,7 +9441,7 @@ function writeEnvFile(appDir, config, framework) {
8839
9441
  `${prefix}FIREBASE_FUNCTIONS_REGION=europe-west1`
8840
9442
  ];
8841
9443
  const content = [
8842
- ...preserved.filter((l2) => l2.trim() !== ""),
9444
+ ...preserved.filter((l) => l.trim() !== ""),
8843
9445
  "",
8844
9446
  ...firebaseBlock,
8845
9447
  ""
@@ -8879,7 +9481,7 @@ function updateFirebaseJson(projectRoot, projectId) {
8879
9481
  }
8880
9482
  }
8881
9483
  async function main(options = {}) {
8882
- Ie("Firebase Setup");
9484
+ mt("Firebase Setup");
8883
9485
  await checkPrerequisites();
8884
9486
  const projectRoot = process.cwd();
8885
9487
  let appDir = projectRoot;
@@ -8901,7 +9503,7 @@ async function main(options = {}) {
8901
9503
  writeEnvFile(appDir, sdkConfig, framework);
8902
9504
  updateFirebaserc(projectRoot, project.projectId);
8903
9505
  updateFirebaseJson(projectRoot, project.projectId);
8904
- Me(
9506
+ wt(
8905
9507
  [
8906
9508
  `Go to the Firebase Console:`,
8907
9509
  `https://console.firebase.google.com/project/${project.projectId}/settings/serviceaccounts/adminsdk`,
@@ -8914,7 +9516,7 @@ async function main(options = {}) {
8914
9516
  ].join("\n"),
8915
9517
  "Download Service Account Key"
8916
9518
  );
8917
- Me(
9519
+ wt(
8918
9520
  [
8919
9521
  `Enable these services in the Firebase Console:`,
8920
9522
  ``,
@@ -8932,7 +9534,7 @@ async function main(options = {}) {
8932
9534
  ].join("\n"),
8933
9535
  "Enable Firebase Services"
8934
9536
  );
8935
- Me(
9537
+ wt(
8936
9538
  [
8937
9539
  `Project: ${project.projectId}`,
8938
9540
  `App .env: ${appDir}/.env (Firebase config written)`,
@@ -8948,7 +9550,7 @@ async function main(options = {}) {
8948
9550
  ].join("\n"),
8949
9551
  "Setup Complete"
8950
9552
  );
8951
- Se(
9553
+ gt(
8952
9554
  "Firebase setup done. Complete the manual steps above, then run dndev emu start."
8953
9555
  );
8954
9556
  }
@@ -8956,7 +9558,7 @@ var firebase_default, firebaseWizard;
8956
9558
  var init_firebase = __esm({
8957
9559
  "packages/tooling/src/cli/setup/firebase.ts"() {
8958
9560
  "use strict";
8959
- init_utils();
9561
+ init_utils2();
8960
9562
  init_types();
8961
9563
  init_app_selector();
8962
9564
  init_cli_input();
@@ -9067,7 +9669,7 @@ var init_firebase = __esm({
9067
9669
  message: getErrorMessage(err)
9068
9670
  });
9069
9671
  }
9070
- Me(
9672
+ wt(
9071
9673
  [
9072
9674
  `Go to the Firebase Console:`,
9073
9675
  `https://console.firebase.google.com/project/${projectId}/settings/serviceaccounts/adminsdk`,
@@ -9086,7 +9688,7 @@ var init_firebase = __esm({
9086
9688
  message: "Download from Firebase Console",
9087
9689
  coachingTopic: "firebase-service-account"
9088
9690
  });
9089
- Me(
9691
+ wt(
9090
9692
  [
9091
9693
  `Enable these services in the Firebase Console:`,
9092
9694
  ``,
@@ -9117,7 +9719,6 @@ var init_firebase = __esm({
9117
9719
  });
9118
9720
 
9119
9721
  // packages/tooling/src/utils/supabase-management.ts
9120
- import { execSync, spawnSync as spawnSync2 } from "node:child_process";
9121
9722
  function extractProjectRef(supabaseUrl) {
9122
9723
  const match = supabaseUrl.match(/https?:\/\/([a-z0-9]+)\.supabase\.co/);
9123
9724
  if (!match?.[1]) {
@@ -9184,7 +9785,7 @@ Ensure SUPABASE_ACCESS_TOKEN is valid. Get one from: https://supabase.com/dashbo
9184
9785
  var init_supabase_management = __esm({
9185
9786
  "packages/tooling/src/utils/supabase-management.ts"() {
9186
9787
  "use strict";
9187
- init_utils();
9788
+ init_utils2();
9188
9789
  init_cli_output();
9189
9790
  init_pathResolver();
9190
9791
  }
@@ -9195,7 +9796,7 @@ var __dirname2, BaseGenerator;
9195
9796
  var init_base_generator = __esm({
9196
9797
  "packages/tooling/src/generators/base-generator.ts"() {
9197
9798
  "use strict";
9198
- init_utils();
9799
+ init_utils2();
9199
9800
  init_cli_output();
9200
9801
  init_errors();
9201
9802
  init_pathResolver();
@@ -9247,7 +9848,7 @@ var init_base_generator = __esm({
9247
9848
  * @author AMBROISE PARK Consulting
9248
9849
  */
9249
9850
  async run() {
9250
- Me(`Running ${this.name} Generator`);
9851
+ wt(`Running ${this.name} Generator`);
9251
9852
  const result = {
9252
9853
  filesGenerated: 0,
9253
9854
  filesSkipped: 0,
@@ -9452,7 +10053,7 @@ var init_base_generator = __esm({
9452
10053
  );
9453
10054
  }
9454
10055
  try {
9455
- return templateContent.replace(/\$\{([^}]+)\}/g, (_3, key) => {
10056
+ return templateContent.replace(/\$\{([^}]+)\}/g, (_2, key) => {
9456
10057
  try {
9457
10058
  const value = new Function(
9458
10059
  ...Object.keys(mergedContext),
@@ -9747,7 +10348,7 @@ var init_base_generator = __esm({
9747
10348
  * @author AMBROISE PARK Consulting
9748
10349
  */
9749
10350
  logSummary(result) {
9750
- Me(`${this.name} Generator Summary`);
10351
+ wt(`${this.name} Generator Summary`);
9751
10352
  if (this.dryRun) {
9752
10353
  log.info("DRY RUN - No files were actually written");
9753
10354
  }
@@ -9800,7 +10401,7 @@ function roleToSqlCondition(role) {
9800
10401
  }
9801
10402
  }
9802
10403
  function camelToSnake(str) {
9803
- return str.replace(/[A-Z]/g, (c) => `_${c.toLowerCase()}`);
10404
+ return str.replace(/[A-Z]/g, (c2) => `_${c2.toLowerCase()}`);
9804
10405
  }
9805
10406
  function fieldTypeToSql(fieldType) {
9806
10407
  return FIELD_TYPE_TO_SQL[fieldType] ?? null;
@@ -9860,7 +10461,7 @@ var HIDDEN_STATUSES, ROLE_LEVEL, FIELD_TYPE_TO_SQL, TECHNICAL_KEYS, SqlGenerator
9860
10461
  var init_sql_generator = __esm({
9861
10462
  "packages/tooling/src/generators/sql-generator.ts"() {
9862
10463
  "use strict";
9863
- init_utils();
10464
+ init_utils2();
9864
10465
  init_base_generator();
9865
10466
  init_cli_output();
9866
10467
  init_errors();
@@ -9963,7 +10564,7 @@ var init_sql_generator = __esm({
9963
10564
  extractEntityFromModule(entityModule, fileName) {
9964
10565
  const expectedName = fileName + "Entity";
9965
10566
  if (entityModule[expectedName]) return entityModule[expectedName];
9966
- const entityName = fileName.replace(/[-_](\w)/g, (_3, c) => c.toUpperCase()).replace(/^\w/, (c) => c.toUpperCase());
10567
+ const entityName = fileName.replace(/[-_](\w)/g, (_2, c2) => c2.toUpperCase()).replace(/^\w/, (c2) => c2.toUpperCase());
9967
10568
  if (entityModule[entityName]) return entityModule[entityName];
9968
10569
  for (const key of Object.keys(entityModule)) {
9969
10570
  const potential = entityModule[key];
@@ -10090,7 +10691,8 @@ CREATE TRIGGER ${triggerName}
10090
10691
  }
10091
10692
  buildTriggerSqlPerTable(tableName) {
10092
10693
  const quoted = this.safeTableName(tableName);
10093
- const triggerName = `${tableName}_updated_at`;
10694
+ const updatedAtTrigger = `${tableName}_updated_at`;
10695
+ const auditTrigger = `${tableName}_audit`;
10094
10696
  return `
10095
10697
  CREATE OR REPLACE FUNCTION set_updated_at_${tableName}()
10096
10698
  RETURNS TRIGGER AS $$
@@ -10100,11 +10702,28 @@ BEGIN
10100
10702
  END;
10101
10703
  $$ LANGUAGE plpgsql;
10102
10704
 
10103
- DROP TRIGGER IF EXISTS ${triggerName} ON ${quoted};
10104
- CREATE TRIGGER ${triggerName}
10705
+ DROP TRIGGER IF EXISTS ${updatedAtTrigger} ON ${quoted};
10706
+ CREATE TRIGGER ${updatedAtTrigger}
10105
10707
  BEFORE UPDATE ON ${quoted}
10106
10708
  FOR EACH ROW
10107
10709
  EXECUTE PROCEDURE set_updated_at_${tableName}();
10710
+
10711
+ CREATE OR REPLACE FUNCTION set_audit_fields_${tableName}()
10712
+ RETURNS TRIGGER AS $$
10713
+ BEGIN
10714
+ IF TG_OP = 'INSERT' THEN
10715
+ NEW.created_by_id = COALESCE(NEW.created_by_id, auth.uid());
10716
+ END IF;
10717
+ NEW.updated_by_id = auth.uid();
10718
+ RETURN NEW;
10719
+ END;
10720
+ $$ LANGUAGE plpgsql SECURITY DEFINER;
10721
+
10722
+ DROP TRIGGER IF EXISTS ${auditTrigger} ON ${quoted};
10723
+ CREATE TRIGGER ${auditTrigger}
10724
+ BEFORE INSERT OR UPDATE ON ${quoted}
10725
+ FOR EACH ROW
10726
+ EXECUTE PROCEDURE set_audit_fields_${tableName}();
10108
10727
  `;
10109
10728
  }
10110
10729
  async writeMigrationForEntity(entity, entityFileName, result) {
@@ -10166,6 +10785,8 @@ ${triggerSql}
10166
10785
  }
10167
10786
  const triggerFunc = "CREATE OR REPLACE FUNCTION set_updated_at()\nRETURNS TRIGGER AS $$\nBEGIN\n NEW.updated_at = now();\n RETURN NEW;\nEND;\n$$ LANGUAGE plpgsql;\n";
10168
10787
  parts.push(triggerFunc);
10788
+ const auditFunc = "CREATE OR REPLACE FUNCTION set_audit_fields()\nRETURNS TRIGGER AS $$\nBEGIN\n IF TG_OP = 'INSERT' THEN\n NEW.created_by_id = COALESCE(NEW.created_by_id, auth.uid());\n END IF;\n NEW.updated_by_id = auth.uid();\n RETURN NEW;\nEND;\n$$ LANGUAGE plpgsql SECURITY DEFINER;\n";
10789
+ parts.push(auditFunc);
10169
10790
  for (const { entity } of entities) {
10170
10791
  const tn = entity.collection;
10171
10792
  const q2 = this.safeTableName(tn);
@@ -10175,6 +10796,12 @@ CREATE TRIGGER ${tn}_updated_at
10175
10796
  BEFORE UPDATE ON ${q2}
10176
10797
  FOR EACH ROW
10177
10798
  EXECUTE PROCEDURE set_updated_at();
10799
+
10800
+ DROP TRIGGER IF EXISTS ${tn}_audit ON ${q2};
10801
+ CREATE TRIGGER ${tn}_audit
10802
+ BEFORE INSERT OR UPDATE ON ${q2}
10803
+ FOR EACH ROW
10804
+ EXECUTE PROCEDURE set_audit_fields();
10178
10805
  `);
10179
10806
  }
10180
10807
  const content = parts.join("\n");
@@ -10229,7 +10856,7 @@ function writeEnvFile2(appDir, supabaseUrl, supabasePublicKey, framework) {
10229
10856
  for (const line of existingLines) {
10230
10857
  const trimmed = line.trim();
10231
10858
  const isSupabaseVar = [...supabaseKeys].some(
10232
- (k3) => trimmed.startsWith(`${prefix}${k3}=`) || trimmed.startsWith(`# ${prefix}${k3}=`)
10859
+ (k) => trimmed.startsWith(`${prefix}${k}=`) || trimmed.startsWith(`# ${prefix}${k}=`)
10233
10860
  );
10234
10861
  if (!isSupabaseVar) {
10235
10862
  preserved.push(line);
@@ -10245,7 +10872,7 @@ function writeEnvFile2(appDir, supabaseUrl, supabasePublicKey, framework) {
10245
10872
  `${prefix}${keyVar}=${supabasePublicKey}`
10246
10873
  ];
10247
10874
  const content = [
10248
- ...preserved.filter((l2) => l2.trim() !== ""),
10875
+ ...preserved.filter((l) => l.trim() !== ""),
10249
10876
  "",
10250
10877
  ...supabaseBlock,
10251
10878
  ""
@@ -10352,7 +10979,7 @@ async function generateCrudFunction(supabaseDir, projectRoot) {
10352
10979
  log.success(`Generated CRUD Edge Function: ${crudFunctionPath}`);
10353
10980
  }
10354
10981
  async function main3(options = {}) {
10355
- Ie("Supabase Setup");
10982
+ mt("Supabase Setup");
10356
10983
  const projectRoot = process.cwd();
10357
10984
  let appDir = projectRoot;
10358
10985
  let framework = "vite";
@@ -10373,7 +11000,7 @@ async function main3(options = {}) {
10373
11000
  const prefix = framework === "nextjs" ? "NEXT_PUBLIC_" : "VITE_";
10374
11001
  const envPath = joinPath(appDir, ".env");
10375
11002
  log.error("Missing Supabase credentials.");
10376
- Me(
11003
+ wt(
10377
11004
  [
10378
11005
  `Fill in ${envPath}:`,
10379
11006
  ` ${prefix}SUPABASE_URL=https://your-project.supabase.co`,
@@ -10385,7 +11012,7 @@ async function main3(options = {}) {
10385
11012
  ].join("\n"),
10386
11013
  "Missing Public Credentials"
10387
11014
  );
10388
- Se("Setup aborted.");
11015
+ gt("Setup aborted.");
10389
11016
  return;
10390
11017
  }
10391
11018
  const supabaseUrl = existingConfig.url;
@@ -10403,7 +11030,7 @@ async function main3(options = {}) {
10403
11030
  missing.push(
10404
11031
  " SUPABASE_ACCESS_TOKEN=sbp_... (from https://supabase.com/dashboard/account/tokens)"
10405
11032
  );
10406
- Me(
11033
+ wt(
10407
11034
  [
10408
11035
  "Fill in .dndev.secrets at project root:",
10409
11036
  ...missing,
@@ -10412,7 +11039,7 @@ async function main3(options = {}) {
10412
11039
  ].join("\n"),
10413
11040
  "Missing Credentials"
10414
11041
  );
10415
- Se("Setup aborted.");
11042
+ gt("Setup aborted.");
10416
11043
  return;
10417
11044
  }
10418
11045
  const entitiesDir = joinPath(projectRoot, "entities");
@@ -10433,7 +11060,7 @@ async function main3(options = {}) {
10433
11060
  outputDir: joinPath(supabaseDir, "migrations"),
10434
11061
  singleFile: true
10435
11062
  });
10436
- const s = Y2();
11063
+ const s = fe();
10437
11064
  s.start("Generating SQL migrations from entities...");
10438
11065
  const result = await generator.run();
10439
11066
  if (result.success) {
@@ -10471,7 +11098,7 @@ async function main3(options = {}) {
10471
11098
  true
10472
11099
  );
10473
11100
  if (shouldPush) {
10474
- const s = Y2();
11101
+ const s = fe();
10475
11102
  s.start("Pushing migrations...");
10476
11103
  try {
10477
11104
  await executeMigration({ supabaseDir, supabaseUrl, accessToken });
@@ -10502,7 +11129,7 @@ async function main3(options = {}) {
10502
11129
  steps.push("\u274C Migration push failed (see error above)");
10503
11130
  const hasErrors = steps.some((s) => s.startsWith("\u274C"));
10504
11131
  const title = hasErrors ? "Setup Incomplete" : "Setup Complete";
10505
- Me(
11132
+ wt(
10506
11133
  [
10507
11134
  `Project URL: ${supabaseUrl}`,
10508
11135
  "",
@@ -10516,7 +11143,7 @@ async function main3(options = {}) {
10516
11143
  ].join("\n"),
10517
11144
  title
10518
11145
  );
10519
- Se(
11146
+ gt(
10520
11147
  hasErrors ? "Setup incomplete \u2014 see errors above." : "Supabase setup done."
10521
11148
  );
10522
11149
  }
@@ -10524,7 +11151,7 @@ var supabase_default, supabaseWizard;
10524
11151
  var init_supabase = __esm({
10525
11152
  "packages/tooling/src/cli/setup/supabase.ts"() {
10526
11153
  "use strict";
10527
- init_utils();
11154
+ init_utils2();
10528
11155
  init_types();
10529
11156
  init_app_selector();
10530
11157
  init_cli_input();
@@ -10584,7 +11211,7 @@ var init_supabase = __esm({
10584
11211
  outputDir: joinPath(supabaseDir, "migrations"),
10585
11212
  singleFile: true
10586
11213
  });
10587
- const s = Y2();
11214
+ const s = fe();
10588
11215
  s.start("Generating SQL from entities...");
10589
11216
  const result = await generator.run();
10590
11217
  if (result.success) {
@@ -10625,7 +11252,7 @@ var init_supabase = __esm({
10625
11252
  }
10626
11253
  const migrationsDir = joinPath(supabaseDir, "migrations");
10627
11254
  if (pathExists(migrationsDir)) {
10628
- const s = Y2();
11255
+ const s = fe();
10629
11256
  s.start("Pushing migrations...");
10630
11257
  try {
10631
11258
  await executeMigration({
@@ -10683,7 +11310,7 @@ var vercelWizard;
10683
11310
  var init_vercel = __esm({
10684
11311
  "packages/tooling/src/cli/setup/vercel.ts"() {
10685
11312
  "use strict";
10686
- init_utils();
11313
+ init_utils2();
10687
11314
  init_types();
10688
11315
  init_vercel_token();
10689
11316
  init_vercel_api();
@@ -10750,7 +11377,7 @@ var init_vercel = __esm({
10750
11377
  try {
10751
11378
  const account = await detectAccountType(token);
10752
11379
  if (account.hasTeams) {
10753
- const teamNames = account.teams.map((t) => t.name).join(", ");
11380
+ const teamNames = account.teams.map((t2) => t2.name).join(", ");
10754
11381
  log.info(`Account type: Team/Pro (teams: ${teamNames})`);
10755
11382
  if (!orgId) {
10756
11383
  log.warn(
@@ -10824,19 +11451,19 @@ var init_vercel = __esm({
10824
11451
  });
10825
11452
 
10826
11453
  // packages/cli/src/bin/commands/setup.ts
10827
- init_utils();
11454
+ init_utils2();
10828
11455
 
10829
11456
  // packages/tooling/src/index.ts
10830
- init_utils();
11457
+ init_utils2();
10831
11458
 
10832
11459
  // packages/tooling/src/cli/index.ts
10833
- init_utils();
11460
+ init_utils2();
10834
11461
 
10835
11462
  // packages/tooling/src/cli/setup/setup.ts
10836
- init_utils();
11463
+ init_utils2();
10837
11464
 
10838
11465
  // packages/tooling/src/cli/setup/validate-env.ts
10839
- init_utils();
11466
+ init_utils2();
10840
11467
  init_cli_output();
10841
11468
  init_pathResolver();
10842
11469
  init_secrets_resolver();
@@ -11004,18 +11631,18 @@ function validateAllApps(apps, _topology, projectRoot) {
11004
11631
  function printAllValidationResults(results, multiApp) {
11005
11632
  const allMissing = [];
11006
11633
  for (const { app, missing } of results) {
11007
- for (const m2 of missing) {
11008
- allMissing.push({ appName: app.name, m: m2 });
11634
+ for (const m of missing) {
11635
+ allMissing.push({ appName: app.name, m });
11009
11636
  }
11010
11637
  }
11011
11638
  if (allMissing.length === 0) {
11012
11639
  log.success("Credentials OK");
11013
11640
  return true;
11014
11641
  }
11015
- for (const { appName, m: m2 } of allMissing) {
11642
+ for (const { appName, m } of allMissing) {
11016
11643
  const prefix = multiApp ? `${appName}: ` : "";
11017
- const detail = m2.status === "empty" ? `empty in ${m2.envFile}` : m2.status === "no_env_file" ? `env file not found: ${m2.envFile}` : `missing \u2014 ${m2.envFile}`;
11018
- log.error(` ${prefix}${m2.varName} (${detail})`);
11644
+ const detail = m.status === "empty" ? `empty in ${m.envFile}` : m.status === "no_env_file" ? `env file not found: ${m.envFile}` : `missing \u2014 ${m.envFile}`;
11645
+ log.error(` ${prefix}${m.varName} (${detail})`);
11019
11646
  }
11020
11647
  log.warn(`Run 'dndev coach' to see where to get them.`);
11021
11648
  return false;
@@ -11023,8 +11650,8 @@ function printAllValidationResults(results, multiApp) {
11023
11650
 
11024
11651
  // packages/tooling/src/cli/setup/setup.ts
11025
11652
  init_cli_output();
11026
- init_cross_app_detection();
11027
- init_pathResolver();
11653
+ init_app_detection();
11654
+ init_app_detection();
11028
11655
  var WIZARD_REGISTRY = {
11029
11656
  firebase: async () => (await Promise.resolve().then(() => (init_firebase(), firebase_exports))).firebaseWizard,
11030
11657
  supabase: async () => (await Promise.resolve().then(() => (init_supabase(), supabase_exports))).supabaseWizard,
@@ -11063,26 +11690,17 @@ function buildSetupContext(app, projectRoot, topology, options) {
11063
11690
  }
11064
11691
  async function main4(options = {}) {
11065
11692
  const projectRoot = process.cwd();
11066
- Ie("DoNotDev Setup");
11693
+ mt("DoNotDev Setup");
11067
11694
  const topology = analyzeProjectTopology(projectRoot);
11068
11695
  let apps = topology.apps;
11069
11696
  if (apps.length === 0) {
11070
- apps = [
11071
- {
11072
- name: "root",
11073
- packageName: "root",
11074
- path: projectRoot,
11075
- packageJsonPath: joinPath(projectRoot, "package.json"),
11076
- framework: "vite",
11077
- hasFunctions: false
11078
- }
11079
- ];
11697
+ apps = [createRootAppInfo(projectRoot)];
11080
11698
  }
11081
11699
  const multiApp = apps.length > 1;
11082
11700
  const validationResults = validateAllApps(apps, topology, projectRoot);
11083
11701
  const allValid = printAllValidationResults(validationResults, multiApp);
11084
11702
  if (!allValid) {
11085
- Se("Fix missing values, then re-run.");
11703
+ gt("Fix missing values, then re-run.");
11086
11704
  return 1;
11087
11705
  }
11088
11706
  const allResults = [];
@@ -11093,7 +11711,7 @@ async function main4(options = {}) {
11093
11711
  const id = options.provider.toLowerCase();
11094
11712
  if (!WIZARD_REGISTRY[id]) {
11095
11713
  log.error(`Unknown provider: ${options.provider}`);
11096
- Se("Setup aborted.");
11714
+ gt("Setup aborted.");
11097
11715
  return 1;
11098
11716
  }
11099
11717
  const wizard = await WIZARD_REGISTRY[id]();
@@ -11119,14 +11737,14 @@ async function main4(options = {}) {
11119
11737
  }
11120
11738
  if (allResults.length === 0) {
11121
11739
  log.warn("No providers detected. Run: dndev setup <provider>");
11122
- Se("Nothing to set up.");
11740
+ gt("Nothing to set up.");
11123
11741
  return 0;
11124
11742
  }
11125
11743
  renderResults(allResults, multiApp);
11126
11744
  const hasFailures = allResults.some(
11127
- (r2) => r2.result.overallStatus === "failed"
11745
+ (r) => r.result.overallStatus === "failed"
11128
11746
  );
11129
- Se(
11747
+ gt(
11130
11748
  hasFailures ? "Setup incomplete \u2014 see errors above." : "Setup complete."
11131
11749
  );
11132
11750
  return hasFailures ? 1 : 0;