af360 0.1.14 → 0.1.16

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 (289) hide show
  1. package/dist/.next/BUILD_ID +1 -1
  2. package/dist/.next/app-build-manifest.json +139 -130
  3. package/dist/.next/app-path-routes-manifest.json +17 -17
  4. package/dist/.next/build-manifest.json +5 -5
  5. package/dist/.next/prerender-manifest.json +45 -45
  6. package/dist/.next/server/app/_not-found/page.js +2 -2
  7. package/dist/.next/server/app/_not-found/page.js.nft.json +1 -1
  8. package/dist/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  9. package/dist/.next/server/app/_not-found.html +1 -1
  10. package/dist/.next/server/app/_not-found.meta +8 -0
  11. package/dist/.next/server/app/_not-found.rsc +4 -4
  12. package/dist/.next/server/app/ahead/page.js +2 -2
  13. package/dist/.next/server/app/ahead/page.js.nft.json +1 -1
  14. package/dist/.next/server/app/ahead/page_client-reference-manifest.js +1 -1
  15. package/dist/.next/server/app/ahead.html +1 -1
  16. package/dist/.next/server/app/ahead.meta +8 -0
  17. package/dist/.next/server/app/ahead.rsc +5 -5
  18. package/dist/.next/server/app/api/browse/route.js +1 -1
  19. package/dist/.next/server/app/api/browse/route.js.nft.json +1 -1
  20. package/dist/.next/server/app/api/browse/route_client-reference-manifest.js +1 -1
  21. package/dist/.next/server/app/api/card/route.js +1 -1
  22. package/dist/.next/server/app/api/card/route.js.nft.json +1 -1
  23. package/dist/.next/server/app/api/card/route_client-reference-manifest.js +1 -1
  24. package/dist/.next/server/app/api/check/route.js +1 -1
  25. package/dist/.next/server/app/api/check/route.js.nft.json +1 -1
  26. package/dist/.next/server/app/api/check/route_client-reference-manifest.js +1 -1
  27. package/dist/.next/server/app/api/config/route.js +1 -1
  28. package/dist/.next/server/app/api/config/route.js.nft.json +1 -1
  29. package/dist/.next/server/app/api/config/route_client-reference-manifest.js +1 -1
  30. package/dist/.next/server/app/api/connections/route.js +3 -3
  31. package/dist/.next/server/app/api/connections/route.js.nft.json +1 -1
  32. package/dist/.next/server/app/api/connections/route_client-reference-manifest.js +1 -1
  33. package/dist/.next/server/app/api/connectors/github/route.js +1 -1
  34. package/dist/.next/server/app/api/connectors/github/route.js.nft.json +1 -1
  35. package/dist/.next/server/app/api/connectors/github/route_client-reference-manifest.js +1 -1
  36. package/dist/.next/server/app/api/consent/route.js +1 -1
  37. package/dist/.next/server/app/api/consent/route.js.nft.json +1 -1
  38. package/dist/.next/server/app/api/consent/route_client-reference-manifest.js +1 -1
  39. package/dist/.next/server/app/api/context/route.js +3 -3
  40. package/dist/.next/server/app/api/context/route.js.nft.json +1 -1
  41. package/dist/.next/server/app/api/context/route_client-reference-manifest.js +1 -1
  42. package/dist/.next/server/app/api/discover/route.js +1 -1
  43. package/dist/.next/server/app/api/discover/route.js.nft.json +1 -1
  44. package/dist/.next/server/app/api/discover/route_client-reference-manifest.js +1 -1
  45. package/dist/.next/server/app/api/expiry/route.js +1 -1
  46. package/dist/.next/server/app/api/expiry/route.js.nft.json +1 -1
  47. package/dist/.next/server/app/api/expiry/route_client-reference-manifest.js +1 -1
  48. package/dist/.next/server/app/api/first-light/route.js +1 -1
  49. package/dist/.next/server/app/api/first-light/route.js.nft.json +1 -1
  50. package/dist/.next/server/app/api/first-light/route_client-reference-manifest.js +1 -1
  51. package/dist/.next/server/app/api/handoff/route.js +1 -1
  52. package/dist/.next/server/app/api/handoff/route.js.nft.json +1 -1
  53. package/dist/.next/server/app/api/handoff/route_client-reference-manifest.js +1 -1
  54. package/dist/.next/server/app/api/health/route.js +1 -1
  55. package/dist/.next/server/app/api/health/route.js.nft.json +1 -1
  56. package/dist/.next/server/app/api/health/route_client-reference-manifest.js +1 -1
  57. package/dist/.next/server/app/api/incidents/route.js +1 -1
  58. package/dist/.next/server/app/api/incidents/route.js.nft.json +1 -1
  59. package/dist/.next/server/app/api/incidents/route_client-reference-manifest.js +1 -1
  60. package/dist/.next/server/app/api/insights/route.js +1 -1
  61. package/dist/.next/server/app/api/insights/route.js.nft.json +1 -1
  62. package/dist/.next/server/app/api/insights/route_client-reference-manifest.js +1 -1
  63. package/dist/.next/server/app/api/log/route.js +1 -1
  64. package/dist/.next/server/app/api/log/route.js.nft.json +1 -1
  65. package/dist/.next/server/app/api/log/route_client-reference-manifest.js +1 -1
  66. package/dist/.next/server/app/api/pulse/route.js +1 -1
  67. package/dist/.next/server/app/api/pulse/route.js.nft.json +1 -1
  68. package/dist/.next/server/app/api/pulse/route_client-reference-manifest.js +1 -1
  69. package/dist/.next/server/app/api/radar/route.js +1 -1
  70. package/dist/.next/server/app/api/radar/route.js.nft.json +1 -1
  71. package/dist/.next/server/app/api/radar/route_client-reference-manifest.js +1 -1
  72. package/dist/.next/server/app/api/report/route.js +1 -1
  73. package/dist/.next/server/app/api/report/route.js.nft.json +1 -1
  74. package/dist/.next/server/app/api/report/route_client-reference-manifest.js +1 -1
  75. package/dist/.next/server/app/api/services/route.js +1 -1
  76. package/dist/.next/server/app/api/services/route.js.nft.json +1 -1
  77. package/dist/.next/server/app/api/services/route_client-reference-manifest.js +1 -1
  78. package/dist/.next/server/app/api/status/route.js +1 -1
  79. package/dist/.next/server/app/api/status/route.js.nft.json +1 -1
  80. package/dist/.next/server/app/api/status/route_client-reference-manifest.js +1 -1
  81. package/dist/.next/server/app/connections/page.js +2 -2
  82. package/dist/.next/server/app/connections/page.js.nft.json +1 -1
  83. package/dist/.next/server/app/connections/page_client-reference-manifest.js +1 -1
  84. package/dist/.next/server/app/connections.html +1 -1
  85. package/dist/.next/server/app/connections.meta +8 -0
  86. package/dist/.next/server/app/connections.rsc +5 -5
  87. package/dist/.next/server/app/dashboard/page.js +2 -2
  88. package/dist/.next/server/app/dashboard/page.js.nft.json +1 -1
  89. package/dist/.next/server/app/dashboard/page_client-reference-manifest.js +1 -1
  90. package/dist/.next/server/app/dashboard.html +1 -1
  91. package/dist/.next/server/app/dashboard.meta +8 -0
  92. package/dist/.next/server/app/dashboard.rsc +4 -4
  93. package/dist/.next/server/app/discoveries/page.js +2 -2
  94. package/dist/.next/server/app/discoveries/page.js.nft.json +1 -1
  95. package/dist/.next/server/app/discoveries/page_client-reference-manifest.js +1 -1
  96. package/dist/.next/server/app/discoveries.html +1 -1
  97. package/dist/.next/server/app/discoveries.meta +8 -0
  98. package/dist/.next/server/app/discoveries.rsc +5 -5
  99. package/dist/.next/server/app/expiry/page.js +2 -2
  100. package/dist/.next/server/app/expiry/page.js.nft.json +1 -1
  101. package/dist/.next/server/app/expiry/page_client-reference-manifest.js +1 -1
  102. package/dist/.next/server/app/expiry.html +1 -1
  103. package/dist/.next/server/app/expiry.meta +8 -0
  104. package/dist/.next/server/app/expiry.rsc +4 -4
  105. package/dist/.next/server/app/fleet/page.js +2 -2
  106. package/dist/.next/server/app/fleet/page.js.nft.json +1 -1
  107. package/dist/.next/server/app/fleet/page_client-reference-manifest.js +1 -1
  108. package/dist/.next/server/app/fleet.html +1 -1
  109. package/dist/.next/server/app/fleet.meta +8 -0
  110. package/dist/.next/server/app/fleet.rsc +4 -4
  111. package/dist/.next/server/app/home/page.js +2 -2
  112. package/dist/.next/server/app/home/page.js.nft.json +1 -1
  113. package/dist/.next/server/app/home/page_client-reference-manifest.js +1 -1
  114. package/dist/.next/server/app/home.html +1 -1
  115. package/dist/.next/server/app/home.meta +8 -0
  116. package/dist/.next/server/app/home.rsc +4 -4
  117. package/dist/.next/server/app/legal/privacy/page.js +2 -2
  118. package/dist/.next/server/app/legal/privacy/page.js.nft.json +1 -1
  119. package/dist/.next/server/app/legal/privacy/page_client-reference-manifest.js +1 -1
  120. package/dist/.next/server/app/legal/terms/page.js +2 -2
  121. package/dist/.next/server/app/legal/terms/page.js.nft.json +1 -1
  122. package/dist/.next/server/app/legal/terms/page_client-reference-manifest.js +1 -1
  123. package/dist/.next/server/app/log/page.js +2 -2
  124. package/dist/.next/server/app/log/page.js.nft.json +1 -1
  125. package/dist/.next/server/app/log/page_client-reference-manifest.js +1 -1
  126. package/dist/.next/server/app/log.html +1 -1
  127. package/dist/.next/server/app/log.meta +8 -0
  128. package/dist/.next/server/app/log.rsc +5 -5
  129. package/dist/.next/server/app/page.js +2 -2
  130. package/dist/.next/server/app/page.js.nft.json +1 -1
  131. package/dist/.next/server/app/page_client-reference-manifest.js +1 -1
  132. package/dist/.next/server/app/projects/page.js +2 -2
  133. package/dist/.next/server/app/projects/page.js.nft.json +1 -1
  134. package/dist/.next/server/app/projects/page_client-reference-manifest.js +1 -1
  135. package/dist/.next/server/app/projects.html +1 -1
  136. package/dist/.next/server/app/projects.meta +8 -0
  137. package/dist/.next/server/app/projects.rsc +5 -5
  138. package/dist/.next/server/app/radar/page.js +2 -65
  139. package/dist/.next/server/app/radar/page.js.nft.json +1 -1
  140. package/dist/.next/server/app/radar/page_client-reference-manifest.js +1 -1
  141. package/dist/.next/server/app/radar.html +1 -1
  142. package/dist/.next/server/app/radar.meta +8 -0
  143. package/dist/.next/server/app/radar.rsc +5 -5
  144. package/dist/.next/server/app/report/page.js +2 -2
  145. package/dist/.next/server/app/report/page.js.nft.json +1 -1
  146. package/dist/.next/server/app/report/page_client-reference-manifest.js +1 -1
  147. package/dist/.next/server/app/report.html +1 -1
  148. package/dist/.next/server/app/report.meta +8 -0
  149. package/dist/.next/server/app/report.rsc +5 -5
  150. package/dist/.next/server/app/settings/page.js +2 -2
  151. package/dist/.next/server/app/settings/page.js.nft.json +1 -1
  152. package/dist/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  153. package/dist/.next/server/app/settings.html +1 -1
  154. package/dist/.next/server/app/settings.meta +8 -0
  155. package/dist/.next/server/app/settings.rsc +5 -5
  156. package/dist/.next/server/app/sites/page.js +2 -2
  157. package/dist/.next/server/app/sites/page.js.nft.json +1 -1
  158. package/dist/.next/server/app/sites/page_client-reference-manifest.js +1 -1
  159. package/dist/.next/server/app/sites.html +1 -1
  160. package/dist/.next/server/app/sites.meta +8 -0
  161. package/dist/.next/server/app/sites.rsc +5 -5
  162. package/dist/.next/server/app/welcome/page.js +2 -2
  163. package/dist/.next/server/app/welcome/page.js.nft.json +1 -1
  164. package/dist/.next/server/app/welcome/page_client-reference-manifest.js +1 -1
  165. package/dist/.next/server/app/welcome.html +1 -1
  166. package/dist/.next/server/app/welcome.meta +8 -0
  167. package/dist/.next/server/app/welcome.rsc +5 -5
  168. package/dist/.next/server/app-paths-manifest.json +17 -17
  169. package/dist/.next/server/chunks/1155.js +1 -1
  170. package/dist/.next/server/chunks/1232.js +1 -0
  171. package/dist/.next/server/chunks/2346.js +1 -1
  172. package/dist/.next/server/chunks/2465.js +64 -1
  173. package/dist/.next/server/chunks/2817.js +1 -1
  174. package/dist/.next/server/chunks/3897.js +22 -0
  175. package/dist/.next/server/chunks/4134.js +1 -1
  176. package/dist/.next/server/chunks/5277.js +1 -0
  177. package/dist/.next/server/chunks/5611.js +1 -1
  178. package/dist/.next/server/chunks/572.js +1 -1
  179. package/dist/.next/server/chunks/6992.js +1 -1
  180. package/dist/.next/server/chunks/7511.js +1 -1
  181. package/dist/.next/server/chunks/7719.js +1 -1
  182. package/dist/.next/server/chunks/8150.js +1 -1
  183. package/dist/.next/server/chunks/8549.js +1 -1
  184. package/dist/.next/server/chunks/876.js +1 -1
  185. package/dist/.next/server/chunks/9170.js +1 -1
  186. package/dist/.next/server/chunks/9655.js +11 -0
  187. package/dist/.next/server/middleware-build-manifest.js +1 -1
  188. package/dist/.next/server/middleware-manifest.json +5 -5
  189. package/dist/.next/server/pages/404.html +1 -1
  190. package/dist/.next/server/pages/500.html +1 -1
  191. package/dist/.next/server/pages/_document.js.nft.json +1 -1
  192. package/dist/.next/server/pages/_error.js +3 -3
  193. package/dist/.next/server/pages/_error.js.nft.json +1 -1
  194. package/dist/.next/server/pages-manifest.json +1 -1
  195. package/dist/.next/server/server-reference-manifest.json +1 -1
  196. package/dist/.next/static/chunks/1255-5cd2fe06309409a0.js +1 -0
  197. package/dist/.next/static/chunks/2619-3c9e02e22d10480a.js +1 -0
  198. package/dist/.next/static/chunks/3192-7e153722ff079fc6.js +1 -0
  199. package/dist/.next/static/chunks/5623-53fb7cea5de0afef.js +1 -0
  200. package/dist/.next/static/chunks/7897-52f8a153c1970ef0.js +1 -0
  201. package/dist/.next/static/chunks/8050-6c17ccfd85ac3208.js +1 -0
  202. package/dist/.next/static/chunks/app/ahead/page-f5789a03967af6e1.js +1 -0
  203. package/dist/.next/static/chunks/app/connections/page-5b833f9485623b92.js +1 -0
  204. package/dist/.next/static/chunks/app/discoveries/{page-52696e6ee0c8d3d5.js → page-337bb60e4cbdcebb.js} +1 -1
  205. package/dist/.next/static/chunks/app/{error-37987420de14c10c.js → error-b32d8c6d4bfa070e.js} +1 -1
  206. package/dist/.next/static/chunks/app/{layout-d14e087b541b48b1.js → layout-0f3f0098b5d1e6be.js} +1 -1
  207. package/dist/.next/static/chunks/app/log/page-1711fe02581c58e8.js +1 -0
  208. package/dist/.next/static/chunks/app/projects/page-b05c7b0c3284db79.js +1 -0
  209. package/dist/.next/static/chunks/app/radar/page-2c972e78ae153706.js +1 -0
  210. package/dist/.next/static/chunks/app/report/page-6bd98ca320f3730c.js +1 -0
  211. package/dist/.next/static/chunks/app/settings/{page-a38c457b7c57567b.js → page-d50e8193d000c9be.js} +1 -1
  212. package/dist/.next/static/chunks/app/sites/page-80cc0a08ae2339a8.js +1 -0
  213. package/dist/.next/static/chunks/app/welcome/{page-d26225bed7e1ad39.js → page-f2cd15c4b50942bc.js} +1 -1
  214. package/dist/.next/static/chunks/main-8e42304858de4a63.js +1 -0
  215. package/dist/.next/static/css/5ddef273a3ac3217.css +1 -0
  216. package/dist/.next/static/css/fbb4cf81dde34731.css +1 -0
  217. package/dist/build-id.json +228 -228
  218. package/dist/node_modules/@next/env/package.json +1 -1
  219. package/dist/node_modules/next/dist/build/swc/index.js +1 -1
  220. package/dist/node_modules/next/dist/build/webpack-config.js +2 -2
  221. package/dist/node_modules/next/dist/compiled/hash.js/sha256/256.js +1 -0
  222. package/dist/node_modules/next/dist/compiled/hash.js/sha256/package.json +1 -0
  223. package/dist/node_modules/next/dist/compiled/next-server/app-page-experimental.runtime.prod.js +13 -13
  224. package/dist/node_modules/next/dist/compiled/next-server/app-page-turbo-experimental.runtime.prod.js +13 -13
  225. package/dist/node_modules/next/dist/compiled/next-server/app-page-turbo.runtime.prod.js +10 -10
  226. package/dist/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js +11 -11
  227. package/dist/node_modules/next/dist/compiled/next-server/app-route.runtime.prod.js +2 -2
  228. package/dist/node_modules/next/dist/compiled/next-server/pages-turbo.runtime.prod.js +9 -9
  229. package/dist/node_modules/next/dist/compiled/next-server/pages.runtime.prod.js +8 -8
  230. package/dist/node_modules/next/dist/lib/has-necessary-dependencies.js +2 -0
  231. package/dist/node_modules/next/dist/lib/verify-typescript-setup.js +19 -0
  232. package/dist/node_modules/next/dist/server/base-server.js +2 -5
  233. package/dist/node_modules/next/dist/server/dev/hot-reloader-turbopack.js +1 -1
  234. package/dist/node_modules/next/dist/server/dev/hot-reloader-webpack.js +1 -1
  235. package/dist/node_modules/next/dist/server/image-optimizer.js +65 -2
  236. package/dist/node_modules/next/dist/server/lib/app-info-log.js +1 -1
  237. package/dist/node_modules/next/dist/server/lib/incremental-cache/file-system-cache.js +197 -23
  238. package/dist/node_modules/next/dist/server/lib/incremental-cache/index.js +36 -17
  239. package/dist/node_modules/next/dist/server/lib/incremental-cache/memory-cache.external.js +3 -3
  240. package/dist/node_modules/next/dist/server/lib/incremental-cache/shared-cache-controls.external.js +14 -6
  241. package/dist/node_modules/next/dist/server/lib/match-next-data-pathname.js +3 -1
  242. package/dist/node_modules/next/dist/server/lib/node-fs-methods.js +14 -0
  243. package/dist/node_modules/next/dist/server/lib/route-cache-key.js +77 -0
  244. package/dist/node_modules/next/dist/server/lib/start-server.js +1 -1
  245. package/dist/node_modules/next/dist/server/next-server.js +8 -6
  246. package/dist/node_modules/next/dist/server/response-cache/index.js +31 -15
  247. package/dist/node_modules/next/dist/server/route-matcher-providers/app-page-route-matcher-provider.js +2 -2
  248. package/dist/node_modules/next/dist/server/route-modules/pages/pages-handler.js +6 -1
  249. package/dist/node_modules/next/dist/server/route-modules/route-module.js +9 -2
  250. package/dist/node_modules/next/dist/shared/lib/canary-only.js +1 -1
  251. package/dist/node_modules/next/dist/shared/lib/router/utils/app-paths.js +17 -1
  252. package/dist/node_modules/next/dist/shared/lib/router/utils/escape-path-delimiters.js +1 -1
  253. package/dist/node_modules/next/dist/telemetry/anonymous-meta.js +1 -1
  254. package/dist/node_modules/next/dist/telemetry/events/version.js +2 -2
  255. package/dist/node_modules/next/package.json +11 -11
  256. package/dist/node_modules/source-map-js/lib/quick-sort.js +10 -1
  257. package/dist/node_modules/source-map-js/lib/source-map-consumer.js +51 -3
  258. package/dist/node_modules/source-map-js/lib/source-map-generator.js +6 -4
  259. package/dist/node_modules/source-map-js/lib/source-node.js +7 -0
  260. package/dist/node_modules/source-map-js/package.json +1 -1
  261. package/dist/package.json +3 -3
  262. package/dist/shell/bin/af360-bridge.exe +0 -0
  263. package/docs/legal/PRIVACY.md +1 -1
  264. package/lib/mask.mjs +21 -1
  265. package/package.json +3 -3
  266. package/scripts/mcp-server.mjs +19 -9
  267. package/shell/bin/af360-bridge.exe +0 -0
  268. package/dist/.next/server/chunks/1331.js +0 -22
  269. package/dist/.next/server/chunks/6584.js +0 -1
  270. package/dist/.next/server/chunks/8134.js +0 -11
  271. package/dist/.next/server/chunks/9946.js +0 -1
  272. package/dist/.next/static/chunks/1255-612df69cb02f2021.js +0 -1
  273. package/dist/.next/static/chunks/1681-b233404f9ec2fc2e.js +0 -1
  274. package/dist/.next/static/chunks/2036-e29441d605c493a4.js +0 -1
  275. package/dist/.next/static/chunks/3192-6b341d547a49fa85.js +0 -1
  276. package/dist/.next/static/chunks/5623-ec4f1a6f7695d8d1.js +0 -1
  277. package/dist/.next/static/chunks/7897-6e6c509aea495560.js +0 -1
  278. package/dist/.next/static/chunks/app/ahead/page-e72bed448dd40bd5.js +0 -1
  279. package/dist/.next/static/chunks/app/connections/page-5d6cae02e6f2b49a.js +0 -1
  280. package/dist/.next/static/chunks/app/log/page-45b4cfd8f1a29d09.js +0 -1
  281. package/dist/.next/static/chunks/app/projects/page-75a41d4a90675d93.js +0 -1
  282. package/dist/.next/static/chunks/app/radar/page-4b4aad549dffcd3a.js +0 -1
  283. package/dist/.next/static/chunks/app/report/page-145496e8f0d5bc86.js +0 -1
  284. package/dist/.next/static/chunks/app/sites/page-96a7dcf3c1e9aa19.js +0 -1
  285. package/dist/.next/static/chunks/main-6828c74376f2b965.js +0 -1
  286. package/dist/.next/static/css/94d302c686de7e23.css +0 -1
  287. package/dist/.next/static/css/9b639a814d15c5ff.css +0 -1
  288. /package/dist/.next/static/{0b943e6aa8d5ffe860588 → be31a391928486d5659f1}/_buildManifest.js +0 -0
  289. /package/dist/.next/static/{0b943e6aa8d5ffe860588 → be31a391928486d5659f1}/_ssgManifest.js +0 -0
@@ -0,0 +1 @@
1
+ "use strict";exports.id=5277,exports.ids=[1232,5277],exports.modules={1232:(a,b,c)=>{c.d(b,{dK:()=>e,fI:()=>function a(b,c=0){if("string"==typeof b)return e(b);if(null===b||"object"!=typeof b)return b;if(c>=12)return"[too deeply nested for af360 to mask - not shown]";if(Array.isArray(b))return b.map(b=>a(b,c+1));let d={};for(let[f,g]of Object.entries(b))d[e(f)]=a(g,c+1);return d}});let d="[secret masked]";function e(a){let b=a;return(b=(b=(b=(b=(b=(b=(b=(b=(b=b.replace(/-----BEGIN [A-Z ]*PRIVATE KEY-----[\s\S]*?-----END [A-Z ]*PRIVATE KEY-----/g,d)).replace(/\b([A-Za-z0-9_.-]*(?:SECRET|TOKEN|PASSWORD|PASSWD|API[_-]?KEY|APIKEY|ACCESS[_-]?KEY|PRIVATE[_-]?KEY|CLIENT[_-]?SECRET|AUTH|CREDENTIAL|[A-Z0-9]_KEY|^KEY)[A-Za-z0-9_.-]*)(\s*[:=]\s*)(["'`]?)([^\s"'`,;]{4,})\3/gi,(a,b,c)=>`${b}${c}${d}`)).replace(/\b([A-Za-z0-9_.-]*(?:URL|URI|DSN|CONN)[A-Za-z0-9_.-]*)(\s*[:=]\s*)(["'`]?)([^\s"'`,;]{4,})\3/gi,(a,b,c)=>/[A-Za-z]/.test(b)&&(b.includes("_")||b===b.toUpperCase())?`${b}${c}${d}`:a)).replace(/\b([A-Za-z][A-Za-z0-9+.-]*):\/\/([^\s/:@]{1,128}):([^\s/@]{1,256})@/g,(a,b,c)=>`${b}://${c}:${d}@`).replace(/(^|[\s(<'"`=,])([A-Za-z0-9._%+-]{1,64}):([^\s:@/\\]{4,128})@((?:[A-Za-z0-9-]+\.)+[A-Za-z]{2,}|\d{1,3}(?:\.\d{1,3}){3}|localhost)(?=[:/?\s'"`)>,]|$)/g,(a,b,c,e,f)=>`${b}${c}:${d}@${f}`)).replace(/gh[pousr]_[A-Za-z0-9]{16,}|github_pat_[A-Za-z0-9_]{20,}/g,d)).replace(/(?<![A-Za-z0-9])(AKIA[0-9A-Z]{12,}|ASIA[0-9A-Z]{12,}|sk_(?:live|test)_[0-9A-Za-z]{10,}|rk_(?:live|test)_[0-9A-Za-z]{10,}|pk_live_[0-9A-Za-z]{10,}|glpat-[A-Za-z0-9_-]{16,}|AIza[0-9A-Za-z_-]{30,}|ya29\.[0-9A-Za-z_-]{20,}|xox[baprs]-[0-9A-Za-z-]{8,}|npm_[A-Za-z0-9]{30,}|dop_v1_[a-f0-9]{40,}|SG\.[A-Za-z0-9_-]{20,}\.[A-Za-z0-9_-]{20,}|hf_[A-Za-z0-9]{30,}|sk-ant-[A-Za-z0-9_-]{20,}|sk-[A-Za-z0-9]{32,})(?![A-Za-z0-9])/g,d)).replace(/\b(bearer|basic)\s+[A-Za-z0-9._~+/=-]{12,}/gi,(a,b)=>`${b} ${d}`)).replace(/(?<![A-Za-z0-9])eyJ[A-Za-z0-9_-]{8,}\.[A-Za-z0-9_-]{8,}\.[A-Za-z0-9_-]{8,}(?![A-Za-z0-9])/g,d)).replace(/(?<![A-Za-z0-9])[0-9a-f]{32,}(?![A-Za-z0-9])/gi,d)).replace(/(?<![A-Za-z0-9])[A-Za-z0-9+/]{40,}={0,2}(?![A-Za-z0-9+/=])/g,a=>!function(a){if(!a.includes("/")||a.includes("+")||/[A-Z=]/.test(a))return!1;let b=a.split("/").filter(Boolean);return b.length>=2&&b.every(a=>/^[a-z0-9]+$/.test(a)&&/[a-z]/.test(a))}(a)?d:a)}},35060:(a,b,c)=>{c.d(b,{EO:()=>r,hQ:()=>n,tQ:()=>o,tl:()=>p});var d=c(29021),e=c.n(d),f=c(33873),g=c.n(f),h=c(21820),i=c.n(h),j=c(79646);let k=(0,c(28354).promisify)(j.execFile),l=["core.fsmonitor=","core.hooksPath=/nonexistent-af360","core.pager=cat","core.editor=false","core.sshCommand=","credential.helper=","diff.external=","protocol.ext.allow=never","uploadpack.packObjectsHook="].flatMap(a=>["-c",a]),m={GIT_CONFIG_NOSYSTEM:"1",GIT_TERMINAL_PROMPT:"0",GIT_ASKPASS:"",GIT_OPTIONAL_LOCKS:"0"};function n(a){try{let b=g().join(a,".git");if(e().statSync(b).isDirectory())return b;let c=/^gitdir:\s*(.+)$/m.exec(e().readFileSync(b,"utf8"));if(!c)return null;let d=c[1].trim();return g().isAbsolute(d)?d:g().join(a,d)}catch{return null}}function o(a,b){return[...l,...b?function(a){let b=n(a);if(null===b)return[];let c=g().join(b,"config"),d=[],f=new Set,h=(a,b)=>{f.has(`${a}:${b}`)||(f.add(`${a}:${b}`),"filter"===a?d.push("-c",`filter.${b}.clean=`,"-c",`filter.${b}.smudge=`,"-c",`filter.${b}.process=`):d.push("-c",`diff.${b}.textconv=`,"-c",`diff.${b}.command=`))},j=new Set,k=[{file:c,depth:0}],l=0;for(;k.length>0&&l<16;){let a,{file:b,depth:c}=k.shift(),d=g().resolve(b).toLowerCase();if(j.has(d))continue;j.add(d);try{a=e().readFileSync(b,"utf8")}catch{continue}for(let b of(l++,a.matchAll(/^\s*\[\s*(filter|diff)\s+"([^"]+)"\s*\]/gim)))h(b[1].toLowerCase(),b[2]);if(c>=5)continue;let f=!1;for(let d of a.split(/\r?\n/)){let a=/^\s*\[\s*([^\]\s]+)/.exec(d);if(a&&(f=/^includeif$/i.test(a[1])||/^include$/i.test(a[1])),!f)continue;let e=/^\s*path\s*=\s*(.+?)\s*$/i.exec(d);if(!e)continue;let h=e[1].replace(/^["']|["']$/g,"");h.startsWith("~/")&&(h=g().join(i().homedir(),h.slice(2)));let j=g().isAbsolute(h)?h:g().resolve(g().dirname(b),h);k.push({file:j,depth:c+1})}}return d}(b):[],...a]}function p(a=process.env){return{...a,...m}}let q=()=>{};function r(a,b,c){let d=k(a,b,c),e=d.child;return e?.on("error",q),e?.stdout?.on("error",q),e?.stderr?.on("error",q),e?.stdin?.on("error",q),d}},35919:(a,b,c)=>{function d(a){let b={branchLine:null,entries:[],ahead:null,behind:null,complete:!1};if(!a)return b;let c=a.replace(/[\r\n]+$/,"").split("\n").map(a=>a.replace(/\r$/,""));if(0===c.length||!c[0].startsWith("##"))return b;let d=c[0].slice(2).trim(),f=null,g=null;if(d.includes("...")){let a=/\bahead (\d+)/.exec(d),b=/\bbehind (\d+)/.exec(d);f=a?parseInt(a[1],10):0,g=b?parseInt(b[1],10):0}let h=[];for(let a of c.slice(1)){if(a.length<4)continue;let b=a.slice(0,2),c=a.slice(3);if(/^[RC]/.test(b)&&c.includes(" -> ")){let[a,d]=c.split(" -> ");h.push({xy:b,path:e(d),from:e(a)})}else h.push({xy:b,path:e(c)})}return{branchLine:d,entries:h,ahead:f,behind:g,complete:!0}}function e(a){let b=a.trim();return b.startsWith('"')&&b.endsWith('"')&&b.length>1?b.slice(1,-1):b}c.d(b,{MV:()=>g,d2:()=>d,l0:()=>f});let f="letters: M changed, A added, D deleted, R renamed, C copied, ?? not tracked yet, U conflicted - first column is what is staged for the next commit, second is what is only on disk";function g(a){return a.trim()||"?"}}};
@@ -3,4 +3,4 @@ exports.id=5611,exports.ids=[5611],exports.modules={11124:(a,b,c)=>{"use strict"
3
3
  lib: "${c}/_next/static/~partytown/"
4
4
  };
5
5
  `}}),(0,d.jsx)("script",{"data-partytown":"",dangerouslySetInnerHTML:{__html:a()}}),(f.worker||[]).map((a,c)=>{let{strategy:d,src:f,children:h,dangerouslySetInnerHTML:i,...j}=a,k={};if(f)k.src=f;else if(i&&i.__html)k.dangerouslySetInnerHTML={__html:i.__html};else if(h)k.dangerouslySetInnerHTML={__html:"string"==typeof h?h:Array.isArray(h)?h.join(""):""};else throw Object.defineProperty(Error("Invalid usage of next/script. Did you forget to include a src attribute or an inline script? https://nextjs.org/docs/messages/invalid-script"),"__NEXT_ERROR_CODE",{value:"E82",enumerable:!1,configurable:!0});return(0,e.createElement)("script",{...k,...j,type:"text/partytown",key:f||c,nonce:b.nonce,"data-nscript":"worker",crossOrigin:b.crossOrigin||g})})]})}catch(a){return(0,i.default)(a)&&"MODULE_NOT_FOUND"!==a.code&&console.warn(`Warning: ${a.message}`),null}}(a,b),j=(c.beforeInteractive||[]).filter(a=>a.src).map((a,c)=>{let{strategy:d,...h}=a;return(0,e.createElement)("script",{...h,key:h.src||c,defer:h.defer??!f,nonce:h.nonce||b.nonce,"data-nscript":"beforeInteractive",crossOrigin:b.crossOrigin||g})});return(0,d.jsxs)(d.Fragment,{children:[h,j]})}class v extends e.default.Component{static #a=this.contextType=j.HtmlContext;getCssLinks(a){let{assetPrefix:b,assetQueryString:c,dynamicImports:e,dynamicCssManifest:f,crossOrigin:g,optimizeCss:h}=this.context,i=a.allFiles.filter(a=>a.endsWith(".css")),j=new Set(a.sharedFiles),l=new Set([]),m=Array.from(new Set(e.filter(a=>a.endsWith(".css"))));if(m.length){let a=new Set(i);l=new Set(m=m.filter(b=>!(a.has(b)||j.has(b)))),i.push(...m)}let n=[];return i.forEach(a=>{let e=j.has(a),i=l.has(a),m=f.has(a);h||n.push((0,d.jsx)("link",{nonce:this.props.nonce,rel:"preload",href:`${b}/_next/${(0,k.encodeURIPath)(a)}${c}`,as:"style",crossOrigin:this.props.crossOrigin||g},`${a}-preload`)),n.push((0,d.jsx)("link",{nonce:this.props.nonce,rel:"stylesheet",href:`${b}/_next/${(0,k.encodeURIPath)(a)}${c}`,crossOrigin:this.props.crossOrigin||g,"data-n-g":i?void 0:e?"":void 0,"data-n-p":e||i||m?void 0:""},a))}),0===n.length?null:n}getPreloadDynamicChunks(){let{dynamicImports:a,assetPrefix:b,assetQueryString:c,crossOrigin:e}=this.context;return a.map(a=>a.endsWith(".js")?(0,d.jsx)("link",{rel:"preload",href:`${b}/_next/${(0,k.encodeURIPath)(a)}${c}`,as:"script",nonce:this.props.nonce,crossOrigin:this.props.crossOrigin||e},a):null).filter(Boolean)}getPreloadMainLinks(a){let{assetPrefix:b,assetQueryString:c,scriptLoader:e,crossOrigin:f}=this.context,g=a.allFiles.filter(a=>a.endsWith(".js"));return[...(e.beforeInteractive||[]).map(a=>(0,d.jsx)("link",{nonce:this.props.nonce,rel:"preload",href:a.src,as:"script",crossOrigin:this.props.crossOrigin||f},a.src)),...g.map(a=>(0,d.jsx)("link",{nonce:this.props.nonce,rel:"preload",href:`${b}/_next/${(0,k.encodeURIPath)(a)}${c}`,as:"script",crossOrigin:this.props.crossOrigin||f},a))]}getBeforeInteractiveInlineScripts(){let{scriptLoader:a}=this.context,{nonce:b,crossOrigin:c}=this.props;return(a.beforeInteractive||[]).filter(a=>!a.src&&(a.dangerouslySetInnerHTML||a.children)).map((a,d)=>{let{strategy:f,children:g,dangerouslySetInnerHTML:h,src:i,...j}=a,k="";return h&&h.__html?k=h.__html:g&&(k="string"==typeof g?g:Array.isArray(g)?g.join(""):""),(0,e.createElement)("script",{...j,dangerouslySetInnerHTML:{__html:k},key:j.id||d,nonce:b,"data-nscript":"beforeInteractive",crossOrigin:c||void 0})})}getDynamicChunks(a){return s(this.context,this.props,a)}getPreNextScripts(){return u(this.context,this.props)}getScripts(a){return t(this.context,this.props,a)}getPolyfillScripts(){return q(this.context,this.props)}render(){let{styles:a,ampPath:b,inAmpMode:f,hybridAmp:g,canonicalBase:h,__NEXT_DATA__:i,dangerousAsPath:j,headTags:n,unstable_runtimeJS:o,unstable_JsPreload:q,disableOptimizedLoading:s,optimizeCss:t,assetPrefix:u,nextFontManifest:v}=this.context,w=!1===o,x=!1===q||!s;this.context.docComponentsRendered.Head=!0;let{head:y}=this.context,z=[],A=[];y&&(y.forEach(a=>{a&&"link"===a.type&&"preload"===a.props.rel&&"style"===a.props.as?z.push(a):a&&A.push(e.default.cloneElement(a,{"data-next-head":""}))}),y=z.concat(A));let B=e.default.Children.toArray(this.props.children).filter(Boolean),C=!1,D=!1;y=e.default.Children.map(y||[],a=>{if(!a)return a;let{type:b,props:c}=a;if(f){let d="";if("meta"===b&&"viewport"===c.name?d='name="viewport"':"link"===b&&"canonical"===c.rel?D=!0:"script"===b&&(c.src&&-1>c.src.indexOf("ampproject")||c.dangerouslySetInnerHTML&&(!c.type||"text/javascript"===c.type))&&(d="<script",Object.keys(c).forEach(a=>{d+=` ${a}="${c[a]}"`}),d+="/>"),d)return console.warn(`Found conflicting amp tag "${a.type}" with conflicting prop ${d} in ${i.page}. https://nextjs.org/docs/messages/conflicting-amp-tag`),null}else"link"===b&&"amphtml"===c.rel&&(C=!0);return a});let E=p(this.context.buildManifest,this.context.__NEXT_DATA__.page,f),F=function(a,b,c=""){if(!a)return{preconnect:null,preload:null};let e=a.pages["/_app"],f=a.pages[b],g=Array.from(new Set([...e??[],...f??[]]));return{preconnect:0===g.length&&(e||f)?(0,d.jsx)("link",{"data-next-font":a.pagesUsingSizeAdjust?"size-adjust":"",rel:"preconnect",href:"/",crossOrigin:"anonymous"}):null,preload:g?g.map(a=>{let b=/\.(woff|woff2|eot|ttf|otf)$/.exec(a)[1];return(0,d.jsx)("link",{rel:"preload",href:`${c}/_next/${(0,k.encodeURIPath)(a)}`,as:"font",type:`font/${b}`,crossOrigin:"anonymous","data-next-font":a.includes("-s")?"size-adjust":""},a)}):null}}(v,j,u),G=((0,m.getTracedMetadata)((0,l.getTracer)().getTracePropagationData(),this.context.experimentalClientTraceMetadata)||[]).map(({key:a,value:b},c)=>(0,d.jsx)("meta",{name:a,content:b},`next-trace-data-${c}`));return(0,d.jsxs)("head",{...function(a){let{crossOrigin:b,nonce:c,...d}=a;return d}(this.props),children:[this.context.isDevelopment&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("style",{"data-next-hide-fouc":!0,"data-ampdevmode":f?"true":void 0,dangerouslySetInnerHTML:{__html:"body{display:none}"}}),(0,d.jsx)("noscript",{"data-next-hide-fouc":!0,"data-ampdevmode":f?"true":void 0,children:(0,d.jsx)("style",{dangerouslySetInnerHTML:{__html:"body{display:block}"}})})]}),y,B,F.preconnect,F.preload,f&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("meta",{name:"viewport",content:"width=device-width,minimum-scale=1,initial-scale=1"}),!D&&(0,d.jsx)("link",{rel:"canonical",href:h+c(77782).cleanAmpPath(j)}),(0,d.jsx)("link",{rel:"preload",as:"script",href:"https://cdn.ampproject.org/v0.js"}),(0,d.jsx)(r,{styles:a}),(0,d.jsx)("style",{"amp-boilerplate":"",dangerouslySetInnerHTML:{__html:"body{-webkit-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-moz-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-ms-animation:-amp-start 8s steps(1,end) 0s 1 normal both;animation:-amp-start 8s steps(1,end) 0s 1 normal both}@-webkit-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-moz-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-ms-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-o-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}"}}),(0,d.jsx)("noscript",{children:(0,d.jsx)("style",{"amp-boilerplate":"",dangerouslySetInnerHTML:{__html:"body{-webkit-animation:none;-moz-animation:none;-ms-animation:none;animation:none}"}})}),(0,d.jsx)("script",{async:!0,src:"https://cdn.ampproject.org/v0.js"})]}),!f&&(0,d.jsxs)(d.Fragment,{children:[!C&&g&&(0,d.jsx)("link",{rel:"amphtml",href:h+(b||`${j}${j.includes("?")?"&":"?"}amp=1`)}),this.getBeforeInteractiveInlineScripts(),!t&&this.getCssLinks(E),!t&&(0,d.jsx)("noscript",{"data-n-css":this.props.nonce??""}),!w&&!x&&this.getPreloadDynamicChunks(),!w&&!x&&this.getPreloadMainLinks(E),!s&&!w&&this.getPolyfillScripts(),!s&&!w&&this.getPreNextScripts(),!s&&!w&&this.getDynamicChunks(E),!s&&!w&&this.getScripts(E),t&&this.getCssLinks(E),t&&(0,d.jsx)("noscript",{"data-n-css":this.props.nonce??""}),this.context.isDevelopment&&(0,d.jsx)("noscript",{id:"__next_css__DO_NOT_USE__"}),G,a||null]}),e.default.createElement(e.default.Fragment,{},...n||[])]})}}class w extends e.default.Component{static #a=this.contextType=j.HtmlContext;getDynamicChunks(a){return s(this.context,this.props,a)}getPreNextScripts(){return u(this.context,this.props)}getScripts(a){return t(this.context,this.props,a)}getPolyfillScripts(){return q(this.context,this.props)}static getInlineScriptSource(a){let{__NEXT_DATA__:b,largePageDataBytes:d}=a;try{let e=JSON.stringify(b);if(o.has(b.page))return(0,h.htmlEscapeJsonString)(e);let f=Buffer.from(e).byteLength,g=c(63135).A;return d&&f>d&&(o.add(b.page),console.warn(`Warning: data for page "${b.page}"${b.page===a.dangerousAsPath?"":` (path "${a.dangerousAsPath}")`} is ${g(f)} which exceeds the threshold of ${g(d)}, this amount of data can reduce performance.
6
- See more info here: https://nextjs.org/docs/messages/large-page-data`)),(0,h.htmlEscapeJsonString)(e)}catch(a){if((0,i.default)(a)&&-1!==a.message.indexOf("circular structure"))throw Object.defineProperty(Error(`Circular structure in "getInitialProps" result of page "${b.page}". https://nextjs.org/docs/messages/circular-structure`),"__NEXT_ERROR_CODE",{value:"E490",enumerable:!1,configurable:!0});throw a}}render(){let{assetPrefix:a,inAmpMode:b,buildManifest:c,unstable_runtimeJS:e,docComponentsRendered:f,assetQueryString:g,disableOptimizedLoading:h,crossOrigin:i}=this.context,j=!1===e;if(f.NextScript=!0,b)return null;let l=p(this.context.buildManifest,this.context.__NEXT_DATA__.page,b);return(0,d.jsxs)(d.Fragment,{children:[!j&&c.devFiles?c.devFiles.map(b=>(0,d.jsx)("script",{src:`${a}/_next/${(0,k.encodeURIPath)(b)}${g}`,nonce:this.props.nonce,crossOrigin:this.props.crossOrigin||i},b)):null,j?null:(0,d.jsx)("script",{id:"__NEXT_DATA__",type:"application/json",nonce:this.props.nonce,crossOrigin:this.props.crossOrigin||i,dangerouslySetInnerHTML:{__html:w.getInlineScriptSource(this.context)}}),h&&!j&&this.getPolyfillScripts(),h&&!j&&this.getPreNextScripts(),h&&!j&&this.getDynamicChunks(l),h&&!j&&this.getScripts(l)]})}}function x(a){let{inAmpMode:b,docComponentsRendered:c,locale:f,scriptLoader:g,__NEXT_DATA__:h}=(0,j.useHtmlContext)();return c.Html=!0,!function(a,b,c){var d,f,g,h;if(!c.children)return;let i=[],j=Array.isArray(c.children)?c.children:[c.children],k=null==(f=j.find(a=>a.type===v))||null==(d=f.props)?void 0:d.children,l=null==(h=j.find(a=>"body"===a.type))||null==(g=h.props)?void 0:g.children,m=[...Array.isArray(k)?k:[k],...Array.isArray(l)?l:[l]];e.default.Children.forEach(m,b=>{var c;if(b&&(null==(c=b.type)?void 0:c.__nextScript)){if("beforeInteractive"===b.props.strategy){a.beforeInteractive=(a.beforeInteractive||[]).concat([{...b.props}]);return}else if(["lazyOnload","afterInteractive","worker"].includes(b.props.strategy))return void i.push(b.props);else if(void 0===b.props.strategy)return void i.push({...b.props,strategy:"afterInteractive"})}}),b.scriptLoader=i}(g,h,a),(0,d.jsx)("html",{...a,lang:a.lang||f||void 0,amp:b?"":void 0,"data-ampdevmode":void 0})}function y(){let{docComponentsRendered:a}=(0,j.useHtmlContext)();return a.Main=!0,(0,d.jsx)("next-js-internal-body-render-target",{})}class z extends e.default.Component{static getInitialProps(a){return a.defaultGetInitialProps(a)}render(){return(0,d.jsxs)(x,{children:[(0,d.jsx)(v,{nonce:this.props.nonce}),(0,d.jsxs)("body",{children:[(0,d.jsx)(y,{}),(0,d.jsx)(w,{nonce:this.props.nonce})]})]})}}z[f.NEXT_BUILTIN_DOCUMENT]=function(){return(0,d.jsxs)(x,{children:[(0,d.jsx)(v,{}),(0,d.jsxs)("body",{children:[(0,d.jsx)(y,{}),(0,d.jsx)(w,{})]})]})}},67466:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),!function(a,b){for(var c in b)Object.defineProperty(a,c,{enumerable:!0,get:b[c]})}(b,{normalizeAppPath:function(){return f},normalizeRscURL:function(){return g}});let d=c(70221),e=c(92815);function f(a){return(0,d.ensureLeadingSlash)(a.split("/").reduce((a,b,c,d)=>!b||(0,e.isGroupSegment)(b)||"@"===b[0]||("page"===b||"route"===b)&&c===d.length-1?a:a+"/"+b,""))}function g(a){return a.replace(/\.rsc($|\?)/,"$1")}},69111:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),!function(a,b){for(var c in b)Object.defineProperty(a,c,{enumerable:!0,get:b[c]})}(b,{INTERCEPTION_ROUTE_MARKERS:function(){return e},extractInterceptionRouteInformation:function(){return g},isInterceptionRouteAppPath:function(){return f}});let d=c(67466),e=["(..)(..)","(.)","(..)","(...)"];function f(a){return void 0!==a.split("/").find(a=>e.find(b=>a.startsWith(b)))}function g(a){let b,c,f;for(let d of a.split("/"))if(c=e.find(a=>d.startsWith(a))){[b,f]=a.split(c,2);break}if(!b||!c||!f)throw Object.defineProperty(Error("Invalid interception route: "+a+". Must be in the format /<intercepting route>/(..|...|..)(..)/<intercepted route>"),"__NEXT_ERROR_CODE",{value:"E269",enumerable:!1,configurable:!0});switch(b=(0,d.normalizeAppPath)(b),c){case"(.)":f="/"===b?"/"+f:b+"/"+f;break;case"(..)":if("/"===b)throw Object.defineProperty(Error("Invalid interception route: "+a+". Cannot use (..) marker at the root level, use (.) instead."),"__NEXT_ERROR_CODE",{value:"E207",enumerable:!1,configurable:!0});f=b.split("/").slice(0,-1).concat(f).join("/");break;case"(...)":f="/"+f;break;case"(..)(..)":let g=b.split("/");if(g.length<=2)throw Object.defineProperty(Error("Invalid interception route: "+a+". Cannot use (..)(..) marker at the root level or one level up."),"__NEXT_ERROR_CODE",{value:"E486",enumerable:!1,configurable:!0});f=g.slice(0,-2).concat(f).join("/");break;default:throw Object.defineProperty(Error("Invariant: unexpected marker"),"__NEXT_ERROR_CODE",{value:"E112",enumerable:!1,configurable:!0})}return{interceptingRoute:b,interceptedRoute:f}}},70221:(a,b)=>{"use strict";function c(a){return a.startsWith("/")?a:"/"+a}Object.defineProperty(b,"__esModule",{value:!0}),Object.defineProperty(b,"ensureLeadingSlash",{enumerable:!0,get:function(){return c}})},70772:(a,b)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),!function(a,b){for(var c in b)Object.defineProperty(a,c,{enumerable:!0,get:b[c]})}(b,{AppRenderSpan:function(){return i},AppRouteRouteHandlersSpan:function(){return l},BaseServerSpan:function(){return c},LoadComponentsSpan:function(){return d},LogSpanAllowList:function(){return p},MiddlewareSpan:function(){return n},NextNodeServerSpan:function(){return f},NextServerSpan:function(){return e},NextVanillaSpanAllowlist:function(){return o},NodeSpan:function(){return k},RenderSpan:function(){return h},ResolveMetadataSpan:function(){return m},RouterSpan:function(){return j},StartServerSpan:function(){return g}});var c=function(a){return a.handleRequest="BaseServer.handleRequest",a.run="BaseServer.run",a.pipe="BaseServer.pipe",a.getStaticHTML="BaseServer.getStaticHTML",a.render="BaseServer.render",a.renderToResponseWithComponents="BaseServer.renderToResponseWithComponents",a.renderToResponse="BaseServer.renderToResponse",a.renderToHTML="BaseServer.renderToHTML",a.renderError="BaseServer.renderError",a.renderErrorToResponse="BaseServer.renderErrorToResponse",a.renderErrorToHTML="BaseServer.renderErrorToHTML",a.render404="BaseServer.render404",a}(c||{}),d=function(a){return a.loadDefaultErrorComponents="LoadComponents.loadDefaultErrorComponents",a.loadComponents="LoadComponents.loadComponents",a}(d||{}),e=function(a){return a.getRequestHandler="NextServer.getRequestHandler",a.getServer="NextServer.getServer",a.getServerRequestHandler="NextServer.getServerRequestHandler",a.createServer="createServer.createServer",a}(e||{}),f=function(a){return a.compression="NextNodeServer.compression",a.getBuildId="NextNodeServer.getBuildId",a.createComponentTree="NextNodeServer.createComponentTree",a.clientComponentLoading="NextNodeServer.clientComponentLoading",a.getLayoutOrPageModule="NextNodeServer.getLayoutOrPageModule",a.generateStaticRoutes="NextNodeServer.generateStaticRoutes",a.generateFsStaticRoutes="NextNodeServer.generateFsStaticRoutes",a.generatePublicRoutes="NextNodeServer.generatePublicRoutes",a.generateImageRoutes="NextNodeServer.generateImageRoutes.route",a.sendRenderResult="NextNodeServer.sendRenderResult",a.proxyRequest="NextNodeServer.proxyRequest",a.runApi="NextNodeServer.runApi",a.render="NextNodeServer.render",a.renderHTML="NextNodeServer.renderHTML",a.imageOptimizer="NextNodeServer.imageOptimizer",a.getPagePath="NextNodeServer.getPagePath",a.getRoutesManifest="NextNodeServer.getRoutesManifest",a.findPageComponents="NextNodeServer.findPageComponents",a.getFontManifest="NextNodeServer.getFontManifest",a.getServerComponentManifest="NextNodeServer.getServerComponentManifest",a.getRequestHandler="NextNodeServer.getRequestHandler",a.renderToHTML="NextNodeServer.renderToHTML",a.renderError="NextNodeServer.renderError",a.renderErrorToHTML="NextNodeServer.renderErrorToHTML",a.render404="NextNodeServer.render404",a.startResponse="NextNodeServer.startResponse",a.route="route",a.onProxyReq="onProxyReq",a.apiResolver="apiResolver",a.internalFetch="internalFetch",a}(f||{}),g=function(a){return a.startServer="startServer.startServer",a}(g||{}),h=function(a){return a.getServerSideProps="Render.getServerSideProps",a.getStaticProps="Render.getStaticProps",a.renderToString="Render.renderToString",a.renderDocument="Render.renderDocument",a.createBodyResult="Render.createBodyResult",a}(h||{}),i=function(a){return a.renderToString="AppRender.renderToString",a.renderToReadableStream="AppRender.renderToReadableStream",a.getBodyResult="AppRender.getBodyResult",a.fetch="AppRender.fetch",a}(i||{}),j=function(a){return a.executeRoute="Router.executeRoute",a}(j||{}),k=function(a){return a.runHandler="Node.runHandler",a}(k||{}),l=function(a){return a.runHandler="AppRouteRouteHandlers.runHandler",a}(l||{}),m=function(a){return a.generateMetadata="ResolveMetadata.generateMetadata",a.generateViewport="ResolveMetadata.generateViewport",a}(m||{}),n=function(a){return a.execute="Middleware.execute",a}(n||{});let o=new Set(["Middleware.execute","BaseServer.handleRequest","Render.getServerSideProps","Render.getStaticProps","AppRender.fetch","AppRender.getBodyResult","Render.renderDocument","Node.runHandler","AppRouteRouteHandlers.runHandler","ResolveMetadata.generateMetadata","ResolveMetadata.generateViewport","NextNodeServer.createComponentTree","NextNodeServer.findPageComponents","NextNodeServer.getLayoutOrPageModule","NextNodeServer.startResponse","NextNodeServer.clientComponentLoading"]),p=new Set(["NextNodeServer.findPageComponents","NextNodeServer.createComponentTree","NextNodeServer.clientComponentLoading"])},71905:(a,b)=>{"use strict";function c(a){return Object.prototype.toString.call(a)}function d(a){if("[object Object]"!==c(a))return!1;let b=Object.getPrototypeOf(a);return null===b||b.hasOwnProperty("isPrototypeOf")}Object.defineProperty(b,"__esModule",{value:!0}),!function(a,b){for(var c in b)Object.defineProperty(a,c,{enumerable:!0,get:b[c]})}(b,{getObjectClassLabel:function(){return c},isPlainObject:function(){return d}})},75201:a=>{"use strict";a.exports=["chrome 64","edge 79","firefox 67","opera 51","safari 12"]},76915:(a,b)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),!function(a,b){for(var c in b)Object.defineProperty(a,c,{enumerable:!0,get:b[c]})}(b,{DecodeError:function(){return o},MiddlewareNotFoundError:function(){return s},MissingStaticPage:function(){return r},NormalizeError:function(){return p},PageNotFoundError:function(){return q},SP:function(){return m},ST:function(){return n},WEB_VITALS:function(){return c},execOnce:function(){return d},getDisplayName:function(){return i},getLocationOrigin:function(){return g},getURL:function(){return h},isAbsoluteUrl:function(){return f},isResSent:function(){return j},loadGetInitialProps:function(){return l},normalizeRepeatedSlashes:function(){return k},stringifyError:function(){return t}});let c=["CLS","FCP","FID","INP","LCP","TTFB"];function d(a){let b,c=!1;return function(){for(var d=arguments.length,e=Array(d),f=0;f<d;f++)e[f]=arguments[f];return c||(c=!0,b=a(...e)),b}}let e=/^[a-zA-Z][a-zA-Z\d+\-.]*?:/,f=a=>e.test(a);function g(){let{protocol:a,hostname:b,port:c}=window.location;return a+"//"+b+(c?":"+c:"")}function h(){let{href:a}=window.location,b=g();return a.substring(b.length)}function i(a){return"string"==typeof a?a:a.displayName||a.name||"Unknown"}function j(a){return a.finished||a.headersSent}function k(a){let b=a.split("?");return b[0].replace(/\\/g,"/").replace(/\/\/+/g,"/")+(b[1]?"?"+b.slice(1).join("?"):"")}async function l(a,b){let c=b.res||b.ctx&&b.ctx.res;if(!a.getInitialProps)return b.ctx&&b.Component?{pageProps:await l(b.Component,b.ctx)}:{};let d=await a.getInitialProps(b);if(c&&j(c))return d;if(!d)throw Object.defineProperty(Error('"'+i(a)+'.getInitialProps()" should resolve to an object. But found "'+d+'" instead.'),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0});return d}let m="undefined"!=typeof performance,n=m&&["mark","measure","getEntriesByName"].every(a=>"function"==typeof performance[a]);class o extends Error{}class p extends Error{}class q extends Error{constructor(a){super(),this.code="ENOENT",this.name="PageNotFoundError",this.message="Cannot find module for page: "+a}}class r extends Error{constructor(a,b){super(),this.message="Failed to load static file for page: "+a+" "+b}}class s extends Error{constructor(){super(),this.code="ENOENT",this.message="Cannot find the middleware module"}}function t(a){return JSON.stringify({message:a.message,stack:a.stack})}},77782:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),!function(a,b){for(var c in b)Object.defineProperty(a,c,{enumerable:!0,get:b[c]})}(b,{cleanAmpPath:function(){return f},debounce:function(){return g},isBlockedPage:function(){return e}});let d=c(82199);function e(a){return d.BLOCKED_PAGES.includes(a)}function f(a){return a.match(/\?amp=(y|yes|true|1)/)&&(a=a.replace(/\?amp=(y|yes|true|1)&?/,"?")),a.match(/&amp=(y|yes|true|1)/)&&(a=a.replace(/&amp=(y|yes|true|1)/,"")),a=a.replace(/\?$/,"")}function g(a,b,c=1/0){let d,e,f,h=0,i=0;function j(){let g=Date.now(),k=i+b-g;k<=0||h+c>=g?(d=void 0,a.apply(f,e)):d=setTimeout(j,k)}return function(...a){e=a,f=this,i=Date.now(),void 0===d&&(h=i,d=setTimeout(j,b))}}},80092:(a,b,c)=>{"use strict";a.exports=c(63885).vendored.contexts.HtmlContext},82199:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),!function(a,b){for(var c in b)Object.defineProperty(a,c,{enumerable:!0,get:b[c]})}(b,{APP_BUILD_MANIFEST:function(){return u},APP_CLIENT_INTERNALS:function(){return _},APP_PATHS_MANIFEST:function(){return r},APP_PATH_ROUTES_MANIFEST:function(){return s},AdapterOutputType:function(){return f},BARREL_OPTIMIZATION_PREFIX:function(){return S},BLOCKED_PAGES:function(){return N},BUILD_ID_FILE:function(){return M},BUILD_MANIFEST:function(){return t},CLIENT_PUBLIC_FILES_PATH:function(){return O},CLIENT_REFERENCE_MANIFEST:function(){return T},CLIENT_STATIC_FILES_PATH:function(){return P},CLIENT_STATIC_FILES_RUNTIME_AMP:function(){return ab},CLIENT_STATIC_FILES_RUNTIME_MAIN:function(){return Z},CLIENT_STATIC_FILES_RUNTIME_MAIN_APP:function(){return $},CLIENT_STATIC_FILES_RUNTIME_POLYFILLS:function(){return ad},CLIENT_STATIC_FILES_RUNTIME_POLYFILLS_SYMBOL:function(){return ae},CLIENT_STATIC_FILES_RUNTIME_REACT_REFRESH:function(){return aa},CLIENT_STATIC_FILES_RUNTIME_WEBPACK:function(){return ac},COMPILER_INDEXES:function(){return g},COMPILER_NAMES:function(){return e},CONFIG_FILES:function(){return L},DEFAULT_RUNTIME_WEBPACK:function(){return af},DEFAULT_SANS_SERIF_FONT:function(){return ak},DEFAULT_SERIF_FONT:function(){return aj},DEV_CLIENT_MIDDLEWARE_MANIFEST:function(){return I},DEV_CLIENT_PAGES_MANIFEST:function(){return E},DYNAMIC_CSS_MANIFEST:function(){return Y},EDGE_RUNTIME_WEBPACK:function(){return ag},EDGE_UNSUPPORTED_NODE_APIS:function(){return ap},EXPORT_DETAIL:function(){return z},EXPORT_MARKER:function(){return y},FUNCTIONS_CONFIG_MANIFEST:function(){return v},IMAGES_MANIFEST:function(){return C},INTERCEPTION_ROUTE_REWRITE_MANIFEST:function(){return X},MIDDLEWARE_BUILD_MANIFEST:function(){return V},MIDDLEWARE_MANIFEST:function(){return F},MIDDLEWARE_REACT_LOADABLE_MANIFEST:function(){return W},MODERN_BROWSERSLIST_TARGET:function(){return d.default},NEXT_BUILTIN_DOCUMENT:function(){return R},NEXT_FONT_MANIFEST:function(){return x},PAGES_MANIFEST:function(){return p},PHASE_DEVELOPMENT_SERVER:function(){return m},PHASE_EXPORT:function(){return j},PHASE_INFO:function(){return o},PHASE_PRODUCTION_BUILD:function(){return k},PHASE_PRODUCTION_SERVER:function(){return l},PHASE_TEST:function(){return n},PRERENDER_MANIFEST:function(){return A},REACT_LOADABLE_MANIFEST:function(){return J},ROUTES_MANIFEST:function(){return B},RSC_MODULE_TYPES:function(){return ao},SERVER_DIRECTORY:function(){return K},SERVER_FILES_MANIFEST:function(){return D},SERVER_PROPS_ID:function(){return ai},SERVER_REFERENCE_MANIFEST:function(){return U},STATIC_PROPS_ID:function(){return ah},STATIC_STATUS_PAGES:function(){return al},STRING_LITERAL_DROP_BUNDLE:function(){return Q},SUBRESOURCE_INTEGRITY_MANIFEST:function(){return w},SYSTEM_ENTRYPOINTS:function(){return aq},TRACE_OUTPUT_VERSION:function(){return am},TURBOPACK_CLIENT_BUILD_MANIFEST:function(){return H},TURBOPACK_CLIENT_MIDDLEWARE_MANIFEST:function(){return G},TURBO_TRACE_DEFAULT_MEMORY_LIMIT:function(){return an},UNDERSCORE_NOT_FOUND_ROUTE:function(){return h},UNDERSCORE_NOT_FOUND_ROUTE_ENTRY:function(){return i},WEBPACK_STATS:function(){return q}});let d=c(87020)._(c(75201)),e={client:"client",server:"server",edgeServer:"edge-server"};var f=function(a){return a.PAGES="PAGES",a.PAGES_API="PAGES_API",a.APP_PAGE="APP_PAGE",a.APP_ROUTE="APP_ROUTE",a.PRERENDER="PRERENDER",a.STATIC_FILE="STATIC_FILE",a.MIDDLEWARE="MIDDLEWARE",a}({});let g={[e.client]:0,[e.server]:1,[e.edgeServer]:2},h="/_not-found",i=""+h+"/page",j="phase-export",k="phase-production-build",l="phase-production-server",m="phase-development-server",n="phase-test",o="phase-info",p="pages-manifest.json",q="webpack-stats.json",r="app-paths-manifest.json",s="app-path-routes-manifest.json",t="build-manifest.json",u="app-build-manifest.json",v="functions-config-manifest.json",w="subresource-integrity-manifest",x="next-font-manifest",y="export-marker.json",z="export-detail.json",A="prerender-manifest.json",B="routes-manifest.json",C="images-manifest.json",D="required-server-files.json",E="_devPagesManifest.json",F="middleware-manifest.json",G="_clientMiddlewareManifest.json",H="client-build-manifest.json",I="_devMiddlewareManifest.json",J="react-loadable-manifest.json",K="server",L=["next.config.js","next.config.mjs","next.config.ts"],M="BUILD_ID",N=["/_document","/_app","/_error"],O="public",P="static",Q="__NEXT_DROP_CLIENT_FILE__",R="__NEXT_BUILTIN_DOCUMENT__",S="__barrel_optimize__",T="client-reference-manifest",U="server-reference-manifest",V="middleware-build-manifest",W="middleware-react-loadable-manifest",X="interception-route-rewrite-manifest",Y="dynamic-css-manifest",Z="main",$=""+Z+"-app",_="app-pages-internals",aa="react-refresh",ab="amp",ac="webpack",ad="polyfills",ae=Symbol(ad),af="webpack-runtime",ag="edge-runtime-webpack",ah="__N_SSG",ai="__N_SSP",aj={name:"Times New Roman",xAvgCharWidth:821,azAvgWidth:854.3953488372093,unitsPerEm:2048},ak={name:"Arial",xAvgCharWidth:904,azAvgWidth:934.5116279069767,unitsPerEm:2048},al=["/500"],am=1,an=6e3,ao={client:"client",server:"server"},ap=["clearImmediate","setImmediate","BroadcastChannel","ByteLengthQueuingStrategy","CompressionStream","CountQueuingStrategy","DecompressionStream","DomException","MessageChannel","MessageEvent","MessagePort","ReadableByteStreamController","ReadableStreamBYOBRequest","ReadableStreamDefaultController","TransformStreamDefaultController","WritableStreamDefaultController"],aq=new Set([Z,aa,ab,$]);("function"==typeof b.default||"object"==typeof b.default&&null!==b.default)&&void 0===b.default.__esModule&&(Object.defineProperty(b.default,"__esModule",{value:!0}),Object.assign(b.default,b),a.exports=b.default)},87020:(a,b)=>{"use strict";b._=function(a){return a&&a.__esModule?a:{default:a}}},88272:(a,b)=>{"use strict";function c(a,b){if(b)return a.filter(({key:a})=>b.includes(a))}Object.defineProperty(b,"__esModule",{value:!0}),Object.defineProperty(b,"getTracedMetadata",{enumerable:!0,get:function(){return c}})},88893:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),Object.defineProperty(b,"getPageFiles",{enumerable:!0,get:function(){return f}});let d=c(98440),e=c(29107);function f(a,b){let c=(0,d.denormalizePagePath)((0,e.normalizePagePath)(b)),f=a.pages[c];return f||(console.warn(`Could not find files for ${c} in .next/build-manifest.json`),[])}},92815:(a,b)=>{"use strict";function c(a){return"("===a[0]&&a.endsWith(")")}function d(a){return a.startsWith("@")&&"@children"!==a}function e(a,b){if(a.includes(f)){let a=JSON.stringify(b);return"{}"!==a?f+"?"+a:f}return a}Object.defineProperty(b,"__esModule",{value:!0}),!function(a,b){for(var c in b)Object.defineProperty(a,c,{enumerable:!0,get:b[c]})}(b,{DEFAULT_SEGMENT_KEY:function(){return g},PAGE_SEGMENT_KEY:function(){return f},addSearchParamsIfPageSegment:function(){return e},isGroupSegment:function(){return c},isParallelRouteSegment:function(){return d}});let f="__PAGE__",g="__DEFAULT__"},95074:(a,b)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),!function(a,b){for(var c in b)Object.defineProperty(a,c,{enumerable:!0,get:b[c]})}(b,{ESCAPE_REGEX:function(){return d},htmlEscapeAttributeString:function(){return h},htmlEscapeJsonString:function(){return g}});let c={"&":"\\u0026",">":"\\u003e","<":"\\u003c","\u2028":"\\u2028","\u2029":"\\u2029"},d=/[&><\u2028\u2029]/g,e={"&":"&amp;",'"':"&quot;","'":"&#39;","<":"&lt;",">":"&gt;"},f=/[&"'<>]/g;function g(a){return a.replace(d,a=>c[a])}function h(a){return a.replace(f,a=>e[a])}},96234:(a,b)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),!function(a,b){for(var c in b)Object.defineProperty(a,c,{enumerable:!0,get:b[c]})}(b,{getSortedRouteObjects:function(){return e},getSortedRoutes:function(){return d}});class c{insert(a){this._insert(a.split("/").filter(Boolean),[],!1)}smoosh(){return this._smoosh()}_smoosh(a){void 0===a&&(a="/");let b=[...this.children.keys()].sort();null!==this.slugName&&b.splice(b.indexOf("[]"),1),null!==this.restSlugName&&b.splice(b.indexOf("[...]"),1),null!==this.optionalRestSlugName&&b.splice(b.indexOf("[[...]]"),1);let c=b.map(b=>this.children.get(b)._smoosh(""+a+b+"/")).reduce((a,b)=>[...a,...b],[]);if(null!==this.slugName&&c.push(...this.children.get("[]")._smoosh(a+"["+this.slugName+"]/")),!this.placeholder){let b="/"===a?"/":a.slice(0,-1);if(null!=this.optionalRestSlugName)throw Object.defineProperty(Error('You cannot define a route with the same specificity as a optional catch-all route ("'+b+'" and "'+b+"[[..."+this.optionalRestSlugName+']]").'),"__NEXT_ERROR_CODE",{value:"E458",enumerable:!1,configurable:!0});c.unshift(b)}return null!==this.restSlugName&&c.push(...this.children.get("[...]")._smoosh(a+"[..."+this.restSlugName+"]/")),null!==this.optionalRestSlugName&&c.push(...this.children.get("[[...]]")._smoosh(a+"[[..."+this.optionalRestSlugName+"]]/")),c}_insert(a,b,d){if(0===a.length){this.placeholder=!1;return}if(d)throw Object.defineProperty(Error("Catch-all must be the last part of the URL."),"__NEXT_ERROR_CODE",{value:"E392",enumerable:!1,configurable:!0});let e=a[0];if(e.startsWith("[")&&e.endsWith("]")){let c=e.slice(1,-1),g=!1;if(c.startsWith("[")&&c.endsWith("]")&&(c=c.slice(1,-1),g=!0),c.startsWith("…"))throw Object.defineProperty(Error("Detected a three-dot character ('…') at ('"+c+"'). Did you mean ('...')?"),"__NEXT_ERROR_CODE",{value:"E147",enumerable:!1,configurable:!0});if(c.startsWith("...")&&(c=c.substring(3),d=!0),c.startsWith("[")||c.endsWith("]"))throw Object.defineProperty(Error("Segment names may not start or end with extra brackets ('"+c+"')."),"__NEXT_ERROR_CODE",{value:"E421",enumerable:!1,configurable:!0});if(c.startsWith("."))throw Object.defineProperty(Error("Segment names may not start with erroneous periods ('"+c+"')."),"__NEXT_ERROR_CODE",{value:"E288",enumerable:!1,configurable:!0});function f(a,c){if(null!==a&&a!==c)throw Object.defineProperty(Error("You cannot use different slug names for the same dynamic path ('"+a+"' !== '"+c+"')."),"__NEXT_ERROR_CODE",{value:"E337",enumerable:!1,configurable:!0});b.forEach(a=>{if(a===c)throw Object.defineProperty(Error('You cannot have the same slug name "'+c+'" repeat within a single dynamic path'),"__NEXT_ERROR_CODE",{value:"E247",enumerable:!1,configurable:!0});if(a.replace(/\W/g,"")===e.replace(/\W/g,""))throw Object.defineProperty(Error('You cannot have the slug names "'+a+'" and "'+c+'" differ only by non-word symbols within a single dynamic path'),"__NEXT_ERROR_CODE",{value:"E499",enumerable:!1,configurable:!0})}),b.push(c)}if(d)if(g){if(null!=this.restSlugName)throw Object.defineProperty(Error('You cannot use both an required and optional catch-all route at the same level ("[...'+this.restSlugName+']" and "'+a[0]+'" ).'),"__NEXT_ERROR_CODE",{value:"E299",enumerable:!1,configurable:!0});f(this.optionalRestSlugName,c),this.optionalRestSlugName=c,e="[[...]]"}else{if(null!=this.optionalRestSlugName)throw Object.defineProperty(Error('You cannot use both an optional and required catch-all route at the same level ("[[...'+this.optionalRestSlugName+']]" and "'+a[0]+'").'),"__NEXT_ERROR_CODE",{value:"E300",enumerable:!1,configurable:!0});f(this.restSlugName,c),this.restSlugName=c,e="[...]"}else{if(g)throw Object.defineProperty(Error('Optional route parameters are not yet supported ("'+a[0]+'").'),"__NEXT_ERROR_CODE",{value:"E435",enumerable:!1,configurable:!0});f(this.slugName,c),this.slugName=c,e="[]"}}this.children.has(e)||this.children.set(e,new c),this.children.get(e)._insert(a.slice(1),b,d)}constructor(){this.placeholder=!0,this.children=new Map,this.slugName=null,this.restSlugName=null,this.optionalRestSlugName=null}}function d(a){let b=new c;return a.forEach(a=>b.insert(a)),b.smoosh()}function e(a,b){let c={},e=[];for(let d=0;d<a.length;d++){let f=b(a[d]);c[f]=d,e[d]=f}return d(e).map(b=>a[c[b]])}},98440:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),Object.defineProperty(b,"denormalizePagePath",{enumerable:!0,get:function(){return f}});let d=c(11124),e=c(35582);function f(a){let b=(0,e.normalizePathSep)(a);return b.startsWith("/index/")&&!(0,d.isDynamicRoute)(b)?b.slice(6):"/index"!==b?b:"/"}}};
6
+ See more info here: https://nextjs.org/docs/messages/large-page-data`)),(0,h.htmlEscapeJsonString)(e)}catch(a){if((0,i.default)(a)&&-1!==a.message.indexOf("circular structure"))throw Object.defineProperty(Error(`Circular structure in "getInitialProps" result of page "${b.page}". https://nextjs.org/docs/messages/circular-structure`),"__NEXT_ERROR_CODE",{value:"E490",enumerable:!1,configurable:!0});throw a}}render(){let{assetPrefix:a,inAmpMode:b,buildManifest:c,unstable_runtimeJS:e,docComponentsRendered:f,assetQueryString:g,disableOptimizedLoading:h,crossOrigin:i}=this.context,j=!1===e;if(f.NextScript=!0,b)return null;let l=p(this.context.buildManifest,this.context.__NEXT_DATA__.page,b);return(0,d.jsxs)(d.Fragment,{children:[!j&&c.devFiles?c.devFiles.map(b=>(0,d.jsx)("script",{src:`${a}/_next/${(0,k.encodeURIPath)(b)}${g}`,nonce:this.props.nonce,crossOrigin:this.props.crossOrigin||i},b)):null,j?null:(0,d.jsx)("script",{id:"__NEXT_DATA__",type:"application/json",nonce:this.props.nonce,crossOrigin:this.props.crossOrigin||i,dangerouslySetInnerHTML:{__html:w.getInlineScriptSource(this.context)}}),h&&!j&&this.getPolyfillScripts(),h&&!j&&this.getPreNextScripts(),h&&!j&&this.getDynamicChunks(l),h&&!j&&this.getScripts(l)]})}}function x(a){let{inAmpMode:b,docComponentsRendered:c,locale:f,scriptLoader:g,__NEXT_DATA__:h}=(0,j.useHtmlContext)();return c.Html=!0,!function(a,b,c){var d,f,g,h;if(!c.children)return;let i=[],j=Array.isArray(c.children)?c.children:[c.children],k=null==(f=j.find(a=>a.type===v))||null==(d=f.props)?void 0:d.children,l=null==(h=j.find(a=>"body"===a.type))||null==(g=h.props)?void 0:g.children,m=[...Array.isArray(k)?k:[k],...Array.isArray(l)?l:[l]];e.default.Children.forEach(m,b=>{var c;if(b&&(null==(c=b.type)?void 0:c.__nextScript)){if("beforeInteractive"===b.props.strategy){a.beforeInteractive=(a.beforeInteractive||[]).concat([{...b.props}]);return}else if(["lazyOnload","afterInteractive","worker"].includes(b.props.strategy))return void i.push(b.props);else if(void 0===b.props.strategy)return void i.push({...b.props,strategy:"afterInteractive"})}}),b.scriptLoader=i}(g,h,a),(0,d.jsx)("html",{...a,lang:a.lang||f||void 0,amp:b?"":void 0,"data-ampdevmode":void 0})}function y(){let{docComponentsRendered:a}=(0,j.useHtmlContext)();return a.Main=!0,(0,d.jsx)("next-js-internal-body-render-target",{})}class z extends e.default.Component{static getInitialProps(a){return a.defaultGetInitialProps(a)}render(){return(0,d.jsxs)(x,{children:[(0,d.jsx)(v,{nonce:this.props.nonce}),(0,d.jsxs)("body",{children:[(0,d.jsx)(y,{}),(0,d.jsx)(w,{nonce:this.props.nonce})]})]})}}z[f.NEXT_BUILTIN_DOCUMENT]=function(){return(0,d.jsxs)(x,{children:[(0,d.jsx)(v,{}),(0,d.jsxs)("body",{children:[(0,d.jsx)(y,{}),(0,d.jsx)(w,{})]})]})}},67466:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),!function(a,b){for(var c in b)Object.defineProperty(a,c,{enumerable:!0,get:b[c]})}(b,{normalizeAppPath:function(){return f},normalizeRscURL:function(){return h},selectAppPageEntry:function(){return g}});let d=c(70221),e=c(92815);function f(a){return(0,d.ensureLeadingSlash)(a.split("/").reduce((a,b,c,d)=>!b||(0,e.isGroupSegment)(b)||"@"===b[0]||("page"===b||"route"===b)&&c===d.length-1?a:a+"/"+b,""))}function g(a,b,c){let d;for(let e of(void 0===c&&(c=a=>f(a).replace(/%5F/g,"_")),b))c(e)===a&&(void 0===d||d<e)&&(d=e);if(void 0===d)throw Error("Invariant: no direct app page entry found for "+a);return d}function h(a){return a.replace(/\.rsc($|\?)/,"$1")}},69111:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),!function(a,b){for(var c in b)Object.defineProperty(a,c,{enumerable:!0,get:b[c]})}(b,{INTERCEPTION_ROUTE_MARKERS:function(){return e},extractInterceptionRouteInformation:function(){return g},isInterceptionRouteAppPath:function(){return f}});let d=c(67466),e=["(..)(..)","(.)","(..)","(...)"];function f(a){return void 0!==a.split("/").find(a=>e.find(b=>a.startsWith(b)))}function g(a){let b,c,f;for(let d of a.split("/"))if(c=e.find(a=>d.startsWith(a))){[b,f]=a.split(c,2);break}if(!b||!c||!f)throw Object.defineProperty(Error("Invalid interception route: "+a+". Must be in the format /<intercepting route>/(..|...|..)(..)/<intercepted route>"),"__NEXT_ERROR_CODE",{value:"E269",enumerable:!1,configurable:!0});switch(b=(0,d.normalizeAppPath)(b),c){case"(.)":f="/"===b?"/"+f:b+"/"+f;break;case"(..)":if("/"===b)throw Object.defineProperty(Error("Invalid interception route: "+a+". Cannot use (..) marker at the root level, use (.) instead."),"__NEXT_ERROR_CODE",{value:"E207",enumerable:!1,configurable:!0});f=b.split("/").slice(0,-1).concat(f).join("/");break;case"(...)":f="/"+f;break;case"(..)(..)":let g=b.split("/");if(g.length<=2)throw Object.defineProperty(Error("Invalid interception route: "+a+". Cannot use (..)(..) marker at the root level or one level up."),"__NEXT_ERROR_CODE",{value:"E486",enumerable:!1,configurable:!0});f=g.slice(0,-2).concat(f).join("/");break;default:throw Object.defineProperty(Error("Invariant: unexpected marker"),"__NEXT_ERROR_CODE",{value:"E112",enumerable:!1,configurable:!0})}return{interceptingRoute:b,interceptedRoute:f}}},70221:(a,b)=>{"use strict";function c(a){return a.startsWith("/")?a:"/"+a}Object.defineProperty(b,"__esModule",{value:!0}),Object.defineProperty(b,"ensureLeadingSlash",{enumerable:!0,get:function(){return c}})},70772:(a,b)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),!function(a,b){for(var c in b)Object.defineProperty(a,c,{enumerable:!0,get:b[c]})}(b,{AppRenderSpan:function(){return i},AppRouteRouteHandlersSpan:function(){return l},BaseServerSpan:function(){return c},LoadComponentsSpan:function(){return d},LogSpanAllowList:function(){return p},MiddlewareSpan:function(){return n},NextNodeServerSpan:function(){return f},NextServerSpan:function(){return e},NextVanillaSpanAllowlist:function(){return o},NodeSpan:function(){return k},RenderSpan:function(){return h},ResolveMetadataSpan:function(){return m},RouterSpan:function(){return j},StartServerSpan:function(){return g}});var c=function(a){return a.handleRequest="BaseServer.handleRequest",a.run="BaseServer.run",a.pipe="BaseServer.pipe",a.getStaticHTML="BaseServer.getStaticHTML",a.render="BaseServer.render",a.renderToResponseWithComponents="BaseServer.renderToResponseWithComponents",a.renderToResponse="BaseServer.renderToResponse",a.renderToHTML="BaseServer.renderToHTML",a.renderError="BaseServer.renderError",a.renderErrorToResponse="BaseServer.renderErrorToResponse",a.renderErrorToHTML="BaseServer.renderErrorToHTML",a.render404="BaseServer.render404",a}(c||{}),d=function(a){return a.loadDefaultErrorComponents="LoadComponents.loadDefaultErrorComponents",a.loadComponents="LoadComponents.loadComponents",a}(d||{}),e=function(a){return a.getRequestHandler="NextServer.getRequestHandler",a.getServer="NextServer.getServer",a.getServerRequestHandler="NextServer.getServerRequestHandler",a.createServer="createServer.createServer",a}(e||{}),f=function(a){return a.compression="NextNodeServer.compression",a.getBuildId="NextNodeServer.getBuildId",a.createComponentTree="NextNodeServer.createComponentTree",a.clientComponentLoading="NextNodeServer.clientComponentLoading",a.getLayoutOrPageModule="NextNodeServer.getLayoutOrPageModule",a.generateStaticRoutes="NextNodeServer.generateStaticRoutes",a.generateFsStaticRoutes="NextNodeServer.generateFsStaticRoutes",a.generatePublicRoutes="NextNodeServer.generatePublicRoutes",a.generateImageRoutes="NextNodeServer.generateImageRoutes.route",a.sendRenderResult="NextNodeServer.sendRenderResult",a.proxyRequest="NextNodeServer.proxyRequest",a.runApi="NextNodeServer.runApi",a.render="NextNodeServer.render",a.renderHTML="NextNodeServer.renderHTML",a.imageOptimizer="NextNodeServer.imageOptimizer",a.getPagePath="NextNodeServer.getPagePath",a.getRoutesManifest="NextNodeServer.getRoutesManifest",a.findPageComponents="NextNodeServer.findPageComponents",a.getFontManifest="NextNodeServer.getFontManifest",a.getServerComponentManifest="NextNodeServer.getServerComponentManifest",a.getRequestHandler="NextNodeServer.getRequestHandler",a.renderToHTML="NextNodeServer.renderToHTML",a.renderError="NextNodeServer.renderError",a.renderErrorToHTML="NextNodeServer.renderErrorToHTML",a.render404="NextNodeServer.render404",a.startResponse="NextNodeServer.startResponse",a.route="route",a.onProxyReq="onProxyReq",a.apiResolver="apiResolver",a.internalFetch="internalFetch",a}(f||{}),g=function(a){return a.startServer="startServer.startServer",a}(g||{}),h=function(a){return a.getServerSideProps="Render.getServerSideProps",a.getStaticProps="Render.getStaticProps",a.renderToString="Render.renderToString",a.renderDocument="Render.renderDocument",a.createBodyResult="Render.createBodyResult",a}(h||{}),i=function(a){return a.renderToString="AppRender.renderToString",a.renderToReadableStream="AppRender.renderToReadableStream",a.getBodyResult="AppRender.getBodyResult",a.fetch="AppRender.fetch",a}(i||{}),j=function(a){return a.executeRoute="Router.executeRoute",a}(j||{}),k=function(a){return a.runHandler="Node.runHandler",a}(k||{}),l=function(a){return a.runHandler="AppRouteRouteHandlers.runHandler",a}(l||{}),m=function(a){return a.generateMetadata="ResolveMetadata.generateMetadata",a.generateViewport="ResolveMetadata.generateViewport",a}(m||{}),n=function(a){return a.execute="Middleware.execute",a}(n||{});let o=new Set(["Middleware.execute","BaseServer.handleRequest","Render.getServerSideProps","Render.getStaticProps","AppRender.fetch","AppRender.getBodyResult","Render.renderDocument","Node.runHandler","AppRouteRouteHandlers.runHandler","ResolveMetadata.generateMetadata","ResolveMetadata.generateViewport","NextNodeServer.createComponentTree","NextNodeServer.findPageComponents","NextNodeServer.getLayoutOrPageModule","NextNodeServer.startResponse","NextNodeServer.clientComponentLoading"]),p=new Set(["NextNodeServer.findPageComponents","NextNodeServer.createComponentTree","NextNodeServer.clientComponentLoading"])},71905:(a,b)=>{"use strict";function c(a){return Object.prototype.toString.call(a)}function d(a){if("[object Object]"!==c(a))return!1;let b=Object.getPrototypeOf(a);return null===b||b.hasOwnProperty("isPrototypeOf")}Object.defineProperty(b,"__esModule",{value:!0}),!function(a,b){for(var c in b)Object.defineProperty(a,c,{enumerable:!0,get:b[c]})}(b,{getObjectClassLabel:function(){return c},isPlainObject:function(){return d}})},75201:a=>{"use strict";a.exports=["chrome 64","edge 79","firefox 67","opera 51","safari 12"]},76915:(a,b)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),!function(a,b){for(var c in b)Object.defineProperty(a,c,{enumerable:!0,get:b[c]})}(b,{DecodeError:function(){return o},MiddlewareNotFoundError:function(){return s},MissingStaticPage:function(){return r},NormalizeError:function(){return p},PageNotFoundError:function(){return q},SP:function(){return m},ST:function(){return n},WEB_VITALS:function(){return c},execOnce:function(){return d},getDisplayName:function(){return i},getLocationOrigin:function(){return g},getURL:function(){return h},isAbsoluteUrl:function(){return f},isResSent:function(){return j},loadGetInitialProps:function(){return l},normalizeRepeatedSlashes:function(){return k},stringifyError:function(){return t}});let c=["CLS","FCP","FID","INP","LCP","TTFB"];function d(a){let b,c=!1;return function(){for(var d=arguments.length,e=Array(d),f=0;f<d;f++)e[f]=arguments[f];return c||(c=!0,b=a(...e)),b}}let e=/^[a-zA-Z][a-zA-Z\d+\-.]*?:/,f=a=>e.test(a);function g(){let{protocol:a,hostname:b,port:c}=window.location;return a+"//"+b+(c?":"+c:"")}function h(){let{href:a}=window.location,b=g();return a.substring(b.length)}function i(a){return"string"==typeof a?a:a.displayName||a.name||"Unknown"}function j(a){return a.finished||a.headersSent}function k(a){let b=a.split("?");return b[0].replace(/\\/g,"/").replace(/\/\/+/g,"/")+(b[1]?"?"+b.slice(1).join("?"):"")}async function l(a,b){let c=b.res||b.ctx&&b.ctx.res;if(!a.getInitialProps)return b.ctx&&b.Component?{pageProps:await l(b.Component,b.ctx)}:{};let d=await a.getInitialProps(b);if(c&&j(c))return d;if(!d)throw Object.defineProperty(Error('"'+i(a)+'.getInitialProps()" should resolve to an object. But found "'+d+'" instead.'),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0});return d}let m="undefined"!=typeof performance,n=m&&["mark","measure","getEntriesByName"].every(a=>"function"==typeof performance[a]);class o extends Error{}class p extends Error{}class q extends Error{constructor(a){super(),this.code="ENOENT",this.name="PageNotFoundError",this.message="Cannot find module for page: "+a}}class r extends Error{constructor(a,b){super(),this.message="Failed to load static file for page: "+a+" "+b}}class s extends Error{constructor(){super(),this.code="ENOENT",this.message="Cannot find the middleware module"}}function t(a){return JSON.stringify({message:a.message,stack:a.stack})}},77782:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),!function(a,b){for(var c in b)Object.defineProperty(a,c,{enumerable:!0,get:b[c]})}(b,{cleanAmpPath:function(){return f},debounce:function(){return g},isBlockedPage:function(){return e}});let d=c(82199);function e(a){return d.BLOCKED_PAGES.includes(a)}function f(a){return a.match(/\?amp=(y|yes|true|1)/)&&(a=a.replace(/\?amp=(y|yes|true|1)&?/,"?")),a.match(/&amp=(y|yes|true|1)/)&&(a=a.replace(/&amp=(y|yes|true|1)/,"")),a=a.replace(/\?$/,"")}function g(a,b,c=1/0){let d,e,f,h=0,i=0;function j(){let g=Date.now(),k=i+b-g;k<=0||h+c>=g?(d=void 0,a.apply(f,e)):d=setTimeout(j,k)}return function(...a){e=a,f=this,i=Date.now(),void 0===d&&(h=i,d=setTimeout(j,b))}}},80092:(a,b,c)=>{"use strict";a.exports=c(63885).vendored.contexts.HtmlContext},82199:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),!function(a,b){for(var c in b)Object.defineProperty(a,c,{enumerable:!0,get:b[c]})}(b,{APP_BUILD_MANIFEST:function(){return u},APP_CLIENT_INTERNALS:function(){return _},APP_PATHS_MANIFEST:function(){return r},APP_PATH_ROUTES_MANIFEST:function(){return s},AdapterOutputType:function(){return f},BARREL_OPTIMIZATION_PREFIX:function(){return S},BLOCKED_PAGES:function(){return N},BUILD_ID_FILE:function(){return M},BUILD_MANIFEST:function(){return t},CLIENT_PUBLIC_FILES_PATH:function(){return O},CLIENT_REFERENCE_MANIFEST:function(){return T},CLIENT_STATIC_FILES_PATH:function(){return P},CLIENT_STATIC_FILES_RUNTIME_AMP:function(){return ab},CLIENT_STATIC_FILES_RUNTIME_MAIN:function(){return Z},CLIENT_STATIC_FILES_RUNTIME_MAIN_APP:function(){return $},CLIENT_STATIC_FILES_RUNTIME_POLYFILLS:function(){return ad},CLIENT_STATIC_FILES_RUNTIME_POLYFILLS_SYMBOL:function(){return ae},CLIENT_STATIC_FILES_RUNTIME_REACT_REFRESH:function(){return aa},CLIENT_STATIC_FILES_RUNTIME_WEBPACK:function(){return ac},COMPILER_INDEXES:function(){return g},COMPILER_NAMES:function(){return e},CONFIG_FILES:function(){return L},DEFAULT_RUNTIME_WEBPACK:function(){return af},DEFAULT_SANS_SERIF_FONT:function(){return ak},DEFAULT_SERIF_FONT:function(){return aj},DEV_CLIENT_MIDDLEWARE_MANIFEST:function(){return I},DEV_CLIENT_PAGES_MANIFEST:function(){return E},DYNAMIC_CSS_MANIFEST:function(){return Y},EDGE_RUNTIME_WEBPACK:function(){return ag},EDGE_UNSUPPORTED_NODE_APIS:function(){return ap},EXPORT_DETAIL:function(){return z},EXPORT_MARKER:function(){return y},FUNCTIONS_CONFIG_MANIFEST:function(){return v},IMAGES_MANIFEST:function(){return C},INTERCEPTION_ROUTE_REWRITE_MANIFEST:function(){return X},MIDDLEWARE_BUILD_MANIFEST:function(){return V},MIDDLEWARE_MANIFEST:function(){return F},MIDDLEWARE_REACT_LOADABLE_MANIFEST:function(){return W},MODERN_BROWSERSLIST_TARGET:function(){return d.default},NEXT_BUILTIN_DOCUMENT:function(){return R},NEXT_FONT_MANIFEST:function(){return x},PAGES_MANIFEST:function(){return p},PHASE_DEVELOPMENT_SERVER:function(){return m},PHASE_EXPORT:function(){return j},PHASE_INFO:function(){return o},PHASE_PRODUCTION_BUILD:function(){return k},PHASE_PRODUCTION_SERVER:function(){return l},PHASE_TEST:function(){return n},PRERENDER_MANIFEST:function(){return A},REACT_LOADABLE_MANIFEST:function(){return J},ROUTES_MANIFEST:function(){return B},RSC_MODULE_TYPES:function(){return ao},SERVER_DIRECTORY:function(){return K},SERVER_FILES_MANIFEST:function(){return D},SERVER_PROPS_ID:function(){return ai},SERVER_REFERENCE_MANIFEST:function(){return U},STATIC_PROPS_ID:function(){return ah},STATIC_STATUS_PAGES:function(){return al},STRING_LITERAL_DROP_BUNDLE:function(){return Q},SUBRESOURCE_INTEGRITY_MANIFEST:function(){return w},SYSTEM_ENTRYPOINTS:function(){return aq},TRACE_OUTPUT_VERSION:function(){return am},TURBOPACK_CLIENT_BUILD_MANIFEST:function(){return H},TURBOPACK_CLIENT_MIDDLEWARE_MANIFEST:function(){return G},TURBO_TRACE_DEFAULT_MEMORY_LIMIT:function(){return an},UNDERSCORE_NOT_FOUND_ROUTE:function(){return h},UNDERSCORE_NOT_FOUND_ROUTE_ENTRY:function(){return i},WEBPACK_STATS:function(){return q}});let d=c(87020)._(c(75201)),e={client:"client",server:"server",edgeServer:"edge-server"};var f=function(a){return a.PAGES="PAGES",a.PAGES_API="PAGES_API",a.APP_PAGE="APP_PAGE",a.APP_ROUTE="APP_ROUTE",a.PRERENDER="PRERENDER",a.STATIC_FILE="STATIC_FILE",a.MIDDLEWARE="MIDDLEWARE",a}({});let g={[e.client]:0,[e.server]:1,[e.edgeServer]:2},h="/_not-found",i=""+h+"/page",j="phase-export",k="phase-production-build",l="phase-production-server",m="phase-development-server",n="phase-test",o="phase-info",p="pages-manifest.json",q="webpack-stats.json",r="app-paths-manifest.json",s="app-path-routes-manifest.json",t="build-manifest.json",u="app-build-manifest.json",v="functions-config-manifest.json",w="subresource-integrity-manifest",x="next-font-manifest",y="export-marker.json",z="export-detail.json",A="prerender-manifest.json",B="routes-manifest.json",C="images-manifest.json",D="required-server-files.json",E="_devPagesManifest.json",F="middleware-manifest.json",G="_clientMiddlewareManifest.json",H="client-build-manifest.json",I="_devMiddlewareManifest.json",J="react-loadable-manifest.json",K="server",L=["next.config.js","next.config.mjs","next.config.ts"],M="BUILD_ID",N=["/_document","/_app","/_error"],O="public",P="static",Q="__NEXT_DROP_CLIENT_FILE__",R="__NEXT_BUILTIN_DOCUMENT__",S="__barrel_optimize__",T="client-reference-manifest",U="server-reference-manifest",V="middleware-build-manifest",W="middleware-react-loadable-manifest",X="interception-route-rewrite-manifest",Y="dynamic-css-manifest",Z="main",$=""+Z+"-app",_="app-pages-internals",aa="react-refresh",ab="amp",ac="webpack",ad="polyfills",ae=Symbol(ad),af="webpack-runtime",ag="edge-runtime-webpack",ah="__N_SSG",ai="__N_SSP",aj={name:"Times New Roman",xAvgCharWidth:821,azAvgWidth:854.3953488372093,unitsPerEm:2048},ak={name:"Arial",xAvgCharWidth:904,azAvgWidth:934.5116279069767,unitsPerEm:2048},al=["/500"],am=1,an=6e3,ao={client:"client",server:"server"},ap=["clearImmediate","setImmediate","BroadcastChannel","ByteLengthQueuingStrategy","CompressionStream","CountQueuingStrategy","DecompressionStream","DomException","MessageChannel","MessageEvent","MessagePort","ReadableByteStreamController","ReadableStreamBYOBRequest","ReadableStreamDefaultController","TransformStreamDefaultController","WritableStreamDefaultController"],aq=new Set([Z,aa,ab,$]);("function"==typeof b.default||"object"==typeof b.default&&null!==b.default)&&void 0===b.default.__esModule&&(Object.defineProperty(b.default,"__esModule",{value:!0}),Object.assign(b.default,b),a.exports=b.default)},87020:(a,b)=>{"use strict";b._=function(a){return a&&a.__esModule?a:{default:a}}},88272:(a,b)=>{"use strict";function c(a,b){if(b)return a.filter(({key:a})=>b.includes(a))}Object.defineProperty(b,"__esModule",{value:!0}),Object.defineProperty(b,"getTracedMetadata",{enumerable:!0,get:function(){return c}})},88893:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),Object.defineProperty(b,"getPageFiles",{enumerable:!0,get:function(){return f}});let d=c(98440),e=c(29107);function f(a,b){let c=(0,d.denormalizePagePath)((0,e.normalizePagePath)(b)),f=a.pages[c];return f||(console.warn(`Could not find files for ${c} in .next/build-manifest.json`),[])}},92815:(a,b)=>{"use strict";function c(a){return"("===a[0]&&a.endsWith(")")}function d(a){return a.startsWith("@")&&"@children"!==a}function e(a,b){if(a.includes(f)){let a=JSON.stringify(b);return"{}"!==a?f+"?"+a:f}return a}Object.defineProperty(b,"__esModule",{value:!0}),!function(a,b){for(var c in b)Object.defineProperty(a,c,{enumerable:!0,get:b[c]})}(b,{DEFAULT_SEGMENT_KEY:function(){return g},PAGE_SEGMENT_KEY:function(){return f},addSearchParamsIfPageSegment:function(){return e},isGroupSegment:function(){return c},isParallelRouteSegment:function(){return d}});let f="__PAGE__",g="__DEFAULT__"},95074:(a,b)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),!function(a,b){for(var c in b)Object.defineProperty(a,c,{enumerable:!0,get:b[c]})}(b,{ESCAPE_REGEX:function(){return d},htmlEscapeAttributeString:function(){return h},htmlEscapeJsonString:function(){return g}});let c={"&":"\\u0026",">":"\\u003e","<":"\\u003c","\u2028":"\\u2028","\u2029":"\\u2029"},d=/[&><\u2028\u2029]/g,e={"&":"&amp;",'"':"&quot;","'":"&#39;","<":"&lt;",">":"&gt;"},f=/[&"'<>]/g;function g(a){return a.replace(d,a=>c[a])}function h(a){return a.replace(f,a=>e[a])}},96234:(a,b)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),!function(a,b){for(var c in b)Object.defineProperty(a,c,{enumerable:!0,get:b[c]})}(b,{getSortedRouteObjects:function(){return e},getSortedRoutes:function(){return d}});class c{insert(a){this._insert(a.split("/").filter(Boolean),[],!1)}smoosh(){return this._smoosh()}_smoosh(a){void 0===a&&(a="/");let b=[...this.children.keys()].sort();null!==this.slugName&&b.splice(b.indexOf("[]"),1),null!==this.restSlugName&&b.splice(b.indexOf("[...]"),1),null!==this.optionalRestSlugName&&b.splice(b.indexOf("[[...]]"),1);let c=b.map(b=>this.children.get(b)._smoosh(""+a+b+"/")).reduce((a,b)=>[...a,...b],[]);if(null!==this.slugName&&c.push(...this.children.get("[]")._smoosh(a+"["+this.slugName+"]/")),!this.placeholder){let b="/"===a?"/":a.slice(0,-1);if(null!=this.optionalRestSlugName)throw Object.defineProperty(Error('You cannot define a route with the same specificity as a optional catch-all route ("'+b+'" and "'+b+"[[..."+this.optionalRestSlugName+']]").'),"__NEXT_ERROR_CODE",{value:"E458",enumerable:!1,configurable:!0});c.unshift(b)}return null!==this.restSlugName&&c.push(...this.children.get("[...]")._smoosh(a+"[..."+this.restSlugName+"]/")),null!==this.optionalRestSlugName&&c.push(...this.children.get("[[...]]")._smoosh(a+"[[..."+this.optionalRestSlugName+"]]/")),c}_insert(a,b,d){if(0===a.length){this.placeholder=!1;return}if(d)throw Object.defineProperty(Error("Catch-all must be the last part of the URL."),"__NEXT_ERROR_CODE",{value:"E392",enumerable:!1,configurable:!0});let e=a[0];if(e.startsWith("[")&&e.endsWith("]")){let c=e.slice(1,-1),g=!1;if(c.startsWith("[")&&c.endsWith("]")&&(c=c.slice(1,-1),g=!0),c.startsWith("…"))throw Object.defineProperty(Error("Detected a three-dot character ('…') at ('"+c+"'). Did you mean ('...')?"),"__NEXT_ERROR_CODE",{value:"E147",enumerable:!1,configurable:!0});if(c.startsWith("...")&&(c=c.substring(3),d=!0),c.startsWith("[")||c.endsWith("]"))throw Object.defineProperty(Error("Segment names may not start or end with extra brackets ('"+c+"')."),"__NEXT_ERROR_CODE",{value:"E421",enumerable:!1,configurable:!0});if(c.startsWith("."))throw Object.defineProperty(Error("Segment names may not start with erroneous periods ('"+c+"')."),"__NEXT_ERROR_CODE",{value:"E288",enumerable:!1,configurable:!0});function f(a,c){if(null!==a&&a!==c)throw Object.defineProperty(Error("You cannot use different slug names for the same dynamic path ('"+a+"' !== '"+c+"')."),"__NEXT_ERROR_CODE",{value:"E337",enumerable:!1,configurable:!0});b.forEach(a=>{if(a===c)throw Object.defineProperty(Error('You cannot have the same slug name "'+c+'" repeat within a single dynamic path'),"__NEXT_ERROR_CODE",{value:"E247",enumerable:!1,configurable:!0});if(a.replace(/\W/g,"")===e.replace(/\W/g,""))throw Object.defineProperty(Error('You cannot have the slug names "'+a+'" and "'+c+'" differ only by non-word symbols within a single dynamic path'),"__NEXT_ERROR_CODE",{value:"E499",enumerable:!1,configurable:!0})}),b.push(c)}if(d)if(g){if(null!=this.restSlugName)throw Object.defineProperty(Error('You cannot use both an required and optional catch-all route at the same level ("[...'+this.restSlugName+']" and "'+a[0]+'" ).'),"__NEXT_ERROR_CODE",{value:"E299",enumerable:!1,configurable:!0});f(this.optionalRestSlugName,c),this.optionalRestSlugName=c,e="[[...]]"}else{if(null!=this.optionalRestSlugName)throw Object.defineProperty(Error('You cannot use both an optional and required catch-all route at the same level ("[[...'+this.optionalRestSlugName+']]" and "'+a[0]+'").'),"__NEXT_ERROR_CODE",{value:"E300",enumerable:!1,configurable:!0});f(this.restSlugName,c),this.restSlugName=c,e="[...]"}else{if(g)throw Object.defineProperty(Error('Optional route parameters are not yet supported ("'+a[0]+'").'),"__NEXT_ERROR_CODE",{value:"E435",enumerable:!1,configurable:!0});f(this.slugName,c),this.slugName=c,e="[]"}}this.children.has(e)||this.children.set(e,new c),this.children.get(e)._insert(a.slice(1),b,d)}constructor(){this.placeholder=!0,this.children=new Map,this.slugName=null,this.restSlugName=null,this.optionalRestSlugName=null}}function d(a){let b=new c;return a.forEach(a=>b.insert(a)),b.smoosh()}function e(a,b){let c={},e=[];for(let d=0;d<a.length;d++){let f=b(a[d]);c[f]=d,e[d]=f}return d(e).map(b=>a[c[b]])}},98440:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),Object.defineProperty(b,"denormalizePagePath",{enumerable:!0,get:function(){return f}});let d=c(11124),e=c(35582);function f(a){let b=(0,e.normalizePathSep)(a);return b.startsWith("/index/")&&!(0,d.isDynamicRoute)(b)?b.slice(6):"/index"!==b?b:"/"}}};
@@ -1 +1 @@
1
- "use strict";exports.id=572,exports.ids=[572],exports.modules={33090:(a,b,c)=>{c.d(b,{c6:()=>i,cN:()=>h,pF:()=>f,pw:()=>g});let d=globalThis,e=d.__af360Incidents??(d.__af360Incidents=[]);function f(a,b,c){!e.some(b=>b.subjectId===a&&!b.endedTs)&&(e.push({id:`${a}:${Date.now()}`,subjectId:a,subject:b,detail:c,startedTs:Date.now(),acknowledged:!1}),e.length>100&&e.splice(0,e.length-100))}function g(a){let b=e.find(b=>b.subjectId===a&&!b.endedTs);b&&(b.endedTs=Date.now())}function h(a){let b=e.find(b=>b.subjectId===a&&!b.endedTs);return!!b&&(b.acknowledged=!0,!0)}function i(){return[...e].reverse()}},39478:(a,b,c)=>{c.d(b,{An:()=>l,Fu:()=>j,I8:()=>r,ml:()=>k});var d=c(22191),e=c(33090),f=c(83720);let g=["server","content-type","x-powered-by","strict-transport-security","cache-control","content-security-policy"],h=globalThis,i=h.__af360Health??(h.__af360Health=new Map);function j(a){for(let[b,c]of i)a.some(a=>a.id===b)||(c.timer&&clearInterval(c.timer),i.delete(b));for(let b of a){let a=i.get(b.id);if(a){a.entry=b;continue}let c={entry:b,history:[]};i.set(b.id,c),n(c),c.timer=setInterval(()=>void n(c),6e4),c.timer.unref?.()}}function k(a){return a.map(a=>{let b=i.get(a.id),c=b?.history??[],d=c[c.length-1];return{entry:a,current:[...c].reverse().find(a=>!a.soft)??null,history:c,sinceText:function(a){let b=a[a.length-1];if(!b)return"First check in progress…";let c=p(a,b.ok)??b.ts;if(b.ok){let a=(0,f.Cp)(c,Date.now());return null===a?`Up since ${f.lt.core}`:`Up for ${a}`}let d=new Date(c),e=new Date().toDateString()===d.toDateString(),g=d.toLocaleTimeString([],{hour:"numeric",minute:"2-digit"});return`Down since ${e?g:`${d.toLocaleDateString([],{month:"short",day:"numeric"})} ${g}`}`}(c.filter(a=>!a.soft)),checking:d?.soft===!0||void 0}})}function l(a,b=!1){let c=a.map(a=>i.get(a.id)).filter(a=>!!a);if(0===c.length)return!1;let d=c.map(a=>a.history[a.history.length-1]);return!(d.some(a=>!a||a.ok)||d.some(a=>"number"==typeof a.status))&&(d.every(a=>a.error===q)||b)}async function m(a){let b=Date.now(),c=new AbortController,d=setTimeout(()=>c.abort(),15e3);try{let d=await fetch(a,{signal:c.signal,cache:"no-store",redirect:"follow"}),e={};for(let a of g){let b=d.headers.get(a);b&&(e[a]=b.slice(0,120))}return{ts:b,ok:d.ok,status:d.status,ms:Date.now()-b,headers:e}}catch(a){return{ts:b,ok:!1,ms:Date.now()-b,error:r(a)}}finally{clearTimeout(d)}}async function n(a){let b=await m(a.entry.url);if(!b.ok){o(a,{...b,soft:!0});for(let c=1;c<3&&(await new Promise(a=>setTimeout(a,4e3)),!(b=await m(a.entry.url)).ok);c++)c<2&&o(a,{...b,soft:!0})}let c=function(a){for(let b=a.history.length-1;b>=0;b--)if(!a.history[b].soft)return a.history[b]}(a);o(a,b);let g=a.entry.label||a.entry.url;if(b.ok||c&&!c.ok){if(b.ok&&c&&!c.ok){let c=p(a.history.filter(a=>!a.soft).slice(0,-1),!1),h=c?(0,f.Cp)(c,b.ts):null,i=c?null===h?` - ${f.I5.outage}`:` - down for ${h}`:"";(0,d.logEvent)(`${g} is back up${i}.`,"closed"),(0,e.pw)(a.entry.id)}}else{let c=b.status?`HTTP ${b.status}`:b.error??"couldn't connect";(0,d.logEvent)(`${g} stopped answering (${c}).`),(0,e.pF)(a.entry.id,g,c)}}function o(a,b){a.history.push(b);let c=Date.now()-864e5;for(;a.history.length&&a.history[0].ts<c;)a.history.shift()}function p(a,b){let c=null;for(let d=a.length-1;d>=0&&a[d].ok===b;d--)c=a[d].ts;return c}let q="address not found";function r(a){let b=a instanceof Error?"AbortError"===a.name?"timed out":a.message:String(a);return/ENOTFOUND|EAI_AGAIN/.test(b)?q:/ECONNREFUSED/.test(b)?"connection refused":/CERT|certificate/i.test(b)?"certificate problem":/timed out|abort/i.test(b)?"timed out":"couldn't connect"}},40572:(a,b,c)=>{c.d(b,{HF:()=>h,y3:()=>g});var d=c(39478);let e=globalThis,f=e.__af360Services??(e.__af360Services=new Map);function g(a){for(let[b,c]of f)a.some(a=>a.id===b)||(c.timer&&clearInterval(c.timer),f.delete(b));for(let b of a){let a=f.get(b.id);if(a){if(a.entry.endpoint===b.endpoint){a.entry=b;continue}a.timer&&clearInterval(a.timer),f.delete(b.id)}let c={entry:b};f.set(b.id,c),j(c),c.timer=setInterval(()=>void j(c),3e5),c.timer.unref?.()}}function h(a){return a.map(a=>{let b=f.get(a.id),c=b?.last;return{entry:a,current:c&&!c.soft?c:null,since:b?.since??null,checking:c?.soft===!0||void 0}})}async function i(a){let b=Date.now(),c=new AbortController,e=setTimeout(()=>c.abort(),15e3);try{let d=await fetch(a,{signal:c.signal,cache:"no-store",redirect:"follow"});return{ts:b,ok:d.ok,status:d.status,ms:Date.now()-b}}catch(a){return{ts:b,ok:!1,ms:Date.now()-b,error:(0,d.I8)(a)}}finally{clearTimeout(e)}}async function j(a){let b=await i(a.entry.endpoint);if(!b.ok){k(a,{...b,soft:!0});for(let c=1;c<3&&(await new Promise(a=>setTimeout(a,4e3)),!(b=await i(a.entry.endpoint)).ok);c++)c<2&&k(a,{...b,soft:!0})}k(a,b)}function k(a,b){let c=a.last&&!a.last.soft?a.last:void 0;a.last=b,!b.soft&&(c&&c.ok===b.ok||(a.since=b.ts))}}};
1
+ "use strict";exports.id=572,exports.ids=[572],exports.modules={33090:(a,b,c)=>{c.d(b,{c6:()=>i,cN:()=>h,pF:()=>f,pw:()=>g});let d=globalThis,e=d.__af360Incidents??(d.__af360Incidents=[]);function f(a,b,c){!e.some(b=>b.subjectId===a&&!b.endedTs)&&(e.push({id:`${a}:${Date.now()}`,subjectId:a,subject:b,detail:c,startedTs:Date.now(),acknowledged:!1}),e.length>100&&e.splice(0,e.length-100))}function g(a){let b=e.find(b=>b.subjectId===a&&!b.endedTs);b&&(b.endedTs=Date.now())}function h(a){let b=e.find(b=>b.subjectId===a&&!b.endedTs);return!!b&&(b.acknowledged=!0,!0)}function i(){return[...e].reverse()}},39478:(a,b,c)=>{c.d(b,{An:()=>l,Fu:()=>j,I8:()=>r,ml:()=>k});var d=c(22191),e=c(33090),f=c(83720);let g=["server","content-type","x-powered-by","strict-transport-security","cache-control","content-security-policy"],h=globalThis,i=h.__af360Health??(h.__af360Health=new Map);function j(a){for(let[b,c]of i)a.some(a=>a.id===b)||(c.timer&&clearInterval(c.timer),i.delete(b));for(let b of a){let a=i.get(b.id);if(a){a.entry=b;continue}let c={entry:b,history:[]};i.set(b.id,c),n(c),c.timer=setInterval(()=>void n(c),6e4),c.timer.unref?.()}}function k(a){return a.map(a=>{let b=i.get(a.id),c=b?.history??[],d=c[c.length-1];return{entry:a,current:[...c].reverse().find(a=>!a.soft)??null,history:c,sinceText:function(a){let b=a[a.length-1];if(!b)return"First check in progress…";let c=p(a,b.ok)??b.ts;if(b.ok){let a=(0,f.Cp)(c,Date.now());return null===a?`Up since ${f.lt.core}`:`Up for ${a}`}let d=new Date(c),e=new Date().toDateString()===d.toDateString(),g=d.toLocaleTimeString([],{hour:"numeric",minute:"2-digit"});return`Down since ${e?g:`${d.toLocaleDateString([],{month:"short",day:"numeric"})} ${g}`}`}(c.filter(a=>!a.soft)),checking:d?.soft===!0||void 0}})}function l(a,b=!1){let c=a.map(a=>i.get(a.id)).filter(a=>!!a);if(0===c.length)return!1;let d=c.map(a=>a.history[a.history.length-1]);return!(d.some(a=>!a||a.ok)||d.some(a=>"number"==typeof a.status))&&(d.every(a=>a.error===q)||b)}async function m(a){let b=Date.now(),c=new AbortController,d=setTimeout(()=>c.abort(),15e3);try{let d=await fetch(a,{signal:c.signal,cache:"no-store",redirect:"follow"}),e={};for(let a of g){let b=d.headers.get(a);b&&(e[a]=b.slice(0,120))}return{ts:b,ok:d.ok,status:d.status,ms:Date.now()-b,headers:e}}catch(a){return{ts:b,ok:!1,ms:Date.now()-b,error:r(a)}}finally{clearTimeout(d)}}async function n(a){let b=await m(a.entry.url);if(!b.ok){o(a,{...b,soft:!0});for(let c=1;c<3&&(await new Promise(a=>setTimeout(a,4e3)),!(b=await m(a.entry.url)).ok);c++)c<2&&o(a,{...b,soft:!0})}let c=function(a){for(let b=a.history.length-1;b>=0;b--)if(!a.history[b].soft)return a.history[b]}(a);o(a,b);let g=a.entry.label||a.entry.url;if(b.ok||c&&!c.ok){if(b.ok&&c&&!c.ok){let c=p(a.history.filter(a=>!a.soft).slice(0,-1),!1),h=c?(0,f.Cp)(c,b.ts):null,i=c?null===h?` - ${f.I5.outage}`:` - down for ${h}`:"";(0,d.logEvent)(`${g} is back up${i}.`,"closed"),(0,e.pw)(a.entry.id)}}else{let c=b.status?`HTTP ${b.status}`:b.error??"couldn't connect";(0,d.logEvent)(`${g} stopped answering (${c}).`,"change"),"dependency"!==a.entry.role&&(0,e.pF)(a.entry.id,g,c)}}function o(a,b){a.history.push(b);let c=Date.now()-864e5;for(;a.history.length&&a.history[0].ts<c;)a.history.shift()}function p(a,b){let c=null;for(let d=a.length-1;d>=0&&a[d].ok===b;d--)c=a[d].ts;return c}let q="address not found";function r(a){let b=a instanceof Error?"AbortError"===a.name?"timed out":a.message:String(a);return/ENOTFOUND|EAI_AGAIN/.test(b)?q:/ECONNREFUSED/.test(b)?"connection refused":/CERT|certificate/i.test(b)?"certificate problem":/timed out|abort/i.test(b)?"timed out":"couldn't connect"}},40572:(a,b,c)=>{c.d(b,{HF:()=>h,y3:()=>g});var d=c(39478);let e=globalThis,f=e.__af360Services??(e.__af360Services=new Map);function g(a){for(let[b,c]of f)a.some(a=>a.id===b)||(c.timer&&clearInterval(c.timer),f.delete(b));for(let b of a){let a=f.get(b.id);if(a){if(a.entry.endpoint===b.endpoint){a.entry=b;continue}a.timer&&clearInterval(a.timer),f.delete(b.id)}let c={entry:b};f.set(b.id,c),j(c),c.timer=setInterval(()=>void j(c),3e5),c.timer.unref?.()}}function h(a){return a.map(a=>{let b=f.get(a.id),c=b?.last;return{entry:a,current:c&&!c.soft?c:null,since:b?.since??null,checking:c?.soft===!0||void 0}})}async function i(a){let b=Date.now(),c=new AbortController,e=setTimeout(()=>c.abort(),15e3);try{let d=await fetch(a,{signal:c.signal,cache:"no-store",redirect:"follow"});return{ts:b,ok:d.ok,status:d.status,ms:Date.now()-b}}catch(a){return{ts:b,ok:!1,ms:Date.now()-b,error:(0,d.I8)(a)}}finally{clearTimeout(e)}}async function j(a){let b=await i(a.entry.endpoint);if(!b.ok){k(a,{...b,soft:!0});for(let c=1;c<3&&(await new Promise(a=>setTimeout(a,4e3)),!(b=await i(a.entry.endpoint)).ok);c++)c<2&&k(a,{...b,soft:!0})}k(a,b)}function k(a,b){let c=a.last&&!a.last.soft?a.last:void 0;a.last=b,!b.soft&&(c&&c.ok===b.ok||(a.since=b.ts))}}};
@@ -1 +1 @@
1
- "use strict";exports.id=6992,exports.ids=[6992],exports.modules={65970:(a,b,c)=>{c.d(b,{Cp:()=>k,I:()=>i,I5:()=>g,fF:()=>h,lt:()=>f,nW:()=>d,p0:()=>j});function d(a,b=Date.now()){let c="number"==typeof a?a:new Date(a).getTime();return Number.isFinite(c)&&b-c<0}let e="a time this machine's clock has not reached yet",f={core:e,at:`at ${e}`,recorded:`recorded at ${e}`,since:`since ${e}`},g={outage:"af360 cannot say for how long: this outage is dated as ending before it began"};function h(a,b=Date.now()){let c="number"==typeof a?a:new Date(a).getTime(),d=b-c;if(d<0)return f.recorded;if(d<6e4)return"just now";if(d<36e5)return`${Math.floor(d/6e4)} min ago`;if(d<864e5)return l(Math.floor(d/36e5),"hour")+" ago";if(d<12096e5)return l(Math.floor(d/864e5),"day")+" ago";if(d<48384e5)return l(Math.floor(d/6048e5),"week")+" ago";let e=new Date(c);return e.toLocaleDateString([],{month:"short",day:"numeric",...e.getFullYear()!==new Date(b).getFullYear()?{year:"numeric"}:{}})}function i(a,b=Date.now()){let c=b-("number"==typeof a?a:new Date(a).getTime());return c<0?f.since:`for ${l(Math.floor(c/864e5),"day")}`}function j(a){return a<6e4?"less than a minute":a<36e5?l(Math.floor(a/6e4),"minute"):a<864e5?l(Math.floor(a/36e5),"hour"):l(Math.floor(a/864e5),"day")}function k(a,b){let c=b-a;return c>=0?j(c):null}function l(a,b){return`${a} ${b}${1===a?"":"s"}`}},83720:(a,b,c)=>{c.d(b,{AQ:()=>h,Cp:()=>d.Cp,I:()=>d.I,I5:()=>d.I5,KN:()=>g,OL:()=>f,lt:()=>d.lt,nW:()=>d.nW,p0:()=>d.p0,rq:()=>e});var d=c(65970);function e(a=Date.now()){let b=new Date("number"==typeof a?a:new Date(a).getTime()),c=a=>String(a).padStart(2,"0");return`${b.getFullYear()}-${c(b.getMonth()+1)}-${c(b.getDate())}`}function f(a){return new Date("number"==typeof a?a:new Date(a).getTime()).toLocaleDateString([],{month:"long",day:"numeric",year:"numeric"})}function g(a){return(0,d.fF)(a)}function h(a){return Math.floor((new Date(a).getTime()-Date.now())/864e5)}},86992:(a,b,c)=>{c.d(b,{wt:()=>v,wm:()=>z,R$:()=>E});var d=c(29021),e=c(33873),f=c.n(e),g=c(34631),h=c.n(g),i=c(22191),j=c(83720);let k=new Map;function l(a,b,c=a){let d=Date.now(),e=k.get(c);if(void 0===e||!(d-e<6e5)){if(k.set(c,d),"1"===process.env.AF360_DEBUG)return void console.error(`[af360] ${a}`,b??"");console.error(`[af360] ${a}`)}}let m=globalThis,n=m.__af360Ssl??(m.__af360Ssl=new Map),o=m.__af360Rdap??(m.__af360Rdap=new Map),p=[/let'?s encrypt/i,/google trust/i,/cloudflare/i,/zerossl/i],q={sslManaged:"Auto-renews - nothing to do. I'll flag it if renewal doesn't happen.",sslManagedLate:"This should have auto-renewed by now and hasn't - check with your host.",sslUnknown:"Can't tell if this renews itself - check with your host.",domain:"Usually auto-renews if billing is active.",ladder30:"No sign this one renews itself, and it expires in under a month - a good week to check with your host.",ladder7:"No sign this one renews itself and it expires within the week - this is the one to deal with today.",ladder2:"No sign this one renews itself and it expires in under 48 hours.",ladderGone:"This certificate has already expired - visitors are seeing a warning page."};function r(a){return a<0?0:a<=2?2:a<=7?7:a<=30?30:null}function s(a){let b=r(a);return 0===b?{chip:"red",rung:b,judgment:q.ladderGone}:2===b?{chip:"red",rung:b,judgment:q.ladder2}:7===b?{chip:"red",rung:b,judgment:q.ladder7}:30===b?{chip:"amber",rung:b,judgment:q.ladder30}:{chip:"calm",rung:b,judgment:q.sslUnknown}}async function t(){try{let{github:a,state:b}=await c.e(8150).then(c.bind(c,18150)),d=a.expiry(await b());return d?[d]:[]}catch{return[]}}async function u(a){let b=[],e=[],g=/\.(?:crt|cer|pem)$/i,h=new Set(["node_modules",".git","dist","build",".next","out","vendor",".venv"]),i=new Set;async function j(a,k){let l;if(!(k>3)&&!(b.length+e.length>40)){try{l=await d.promises.readdir(a,{withFileTypes:!0})}catch{return}for(let m of l){let l=f().join(a,m.name);if(m.isDirectory()){if(h.has(m.name)||m.name.startsWith(".")&&".certs"!==m.name)continue;await j(l,k+1)}else if(g.test(m.name)){let a;if(i.has(l.toLowerCase()))continue;i.add(l.toLowerCase());try{a=await d.promises.readFile(l,"utf8")}catch{e.push({kind:"localcert",name:l,reason:"af360 could not open this certificate file"});continue}if(!/-----BEGIN CERTIFICATE-----/.test(a))continue;try{let{X509Certificate:d}=await Promise.resolve().then(c.t.bind(c,55511,23)),g=new d(a),h=new Date(g.validTo);if(isNaN(h.getTime())){e.push({kind:"localcert",name:l,reason:"af360 read this certificate but could not read its expiry date"});continue}b.push({...y(`localcert:${l.toLowerCase()}`,"ssl",f().basename(l),h.toISOString()),issuer:g.issuer?.split("\n")[0]??void 0,note:l})}catch{e.push({kind:"localcert",name:l,reason:"af360 found a certificate here and could not read it"})}}}}}for(let b of a)await j(b,0);return{items:b,unknowns:e}}async function v(a){let b=[],c=[];try{let d=await u(a.roots);b.push(...d.items),c.push(...d.unknowns)}catch{}let d=[...new Set(a.urls.map(a=>{try{return new URL(a.url).hostname}catch{return null}}).filter(a=>!!a))],e=!0===a.domainLookup;for(let a of(await Promise.all(d.map(async a=>{let[d,f]=await Promise.all([function(a){let b=n.get(a);return b&&Date.now()-b.ts<432e5?Promise.resolve(b.value):new Promise(b=>{let c=!1,d=d=>{c||(c=!0,n.set(a,{ts:Date.now(),value:d}),b(d))};try{if(D(a))return d({validTo:null,issuer:null});let b=h().connect({host:a,port:443,servername:a,rejectUnauthorized:!1,timeout:1e4});b.on("secureConnect",()=>{let a=b.getPeerCertificate(),c=a?.valid_to?new Date(a.valid_to):null,e=a?.valid_from?new Date(a.valid_from):null,f=a?.issuer?[a.issuer.O,a.issuer.CN].filter(Boolean).join(" "):null;b.destroy(),d({validTo:c&&!isNaN(c.getTime())?c.toISOString():null,issuer:f||null,serial:a?.serialNumber||void 0,validFrom:e&&!isNaN(e.getTime())?e.toISOString():void 0})}),b.on("timeout",()=>{b.destroy(),d({validTo:null,issuer:null})}),b.on("error",()=>d({validTo:null,issuer:null}))}catch{d({validTo:null,issuer:null})}})}(a),e?B(a):Promise.resolve(A)]);d.validTo?b.push(function(a,b){let c=!!b.issuer&&p.some(a=>a.test(b.issuer)),d={...y(`ssl:${a}`,"ssl",a,b.validTo),issuer:b.issuer??void 0,serial:b.serial,validFrom:b.validFrom};if(!c){let b=s(d.daysLeft),c=`${a}@${b.rung}`;return null===b.rung||x.has(c)||(x.add(c),(0,i.logEvent)(`${a}'s certificate expires in ${d.daysLeft} day${1===d.daysLeft?"":"s"} and af360 has no sign it renews itself.`)),{...d,managed:!1,chip:b.chip,judgment:b.judgment}}let e=d.daysLeft<0?"red":d.daysLeft<7?"amber":"calm";return"calm"===e||x.has(a)||(x.add(a),(0,i.logEvent)(`${a}'s certificate should have auto-renewed by now - it hasn't.`)),"calm"===e&&x.delete(a),{...d,managed:!0,chip:e,judgment:"calm"===e?q.sslManaged:q.sslManagedLate}}(a,d)):c.push({kind:"ssl",name:a,reason:"couldn't read the certificate"}),f.date?b.push({...y(`domain:${a}`,"domain",a,f.date),judgment:q.domain}):c.push({kind:"domain",name:a,reason:f.reason??"the public registry didn't share a date"})})),await t())){let c=y(a.id,"manual",a.name,a.date),d=s(c.daysLeft);b.push({...c,chip:d.chip,rung:d.rung,judgment:d.judgment,manual:!1})}for(let c of a.manualExpiries){if(isNaN(new Date(c.date).getTime()))continue;let a=y(c.id,"manual",c.name,new Date(c.date).toISOString()),d=function(a,b=!1){if(b)return{chip:"calm",rung:null,passed:a<0};let c=r(a);return 0===c?{chip:"amber",rung:c,passed:!0}:2===c||7===c?{chip:"red",rung:c,passed:!1}:30===c?{chip:"amber",rung:c,passed:!1}:{chip:"calm",rung:c,passed:!1}}(a.daysLeft,!0===c.done);b.push({...a,note:c.note,manual:!0,cost:!0===c.cost||void 0,done:!0===c.done||void 0,passed:d.passed||void 0,rung:d.rung,chip:d.chip})}return b.sort((a,b)=>a.date.localeCompare(b.date)),{items:b,unknowns:c}}let w=globalThis,x=w.__af360SslFlagged??(w.__af360SslFlagged=new Set);function y(a,b,c,d){let e=(0,j.AQ)(d);return{id:a,kind:b,name:c,date:d,daysLeft:e,chip:z(e)}}function z(a){return a<7?"red":a<30?"amber":"calm"}let A={date:null,reason:"af360 hasn't asked - checking renewal dates means sending this address to a public registry, and that is off until you turn it on in Settings"};async function B(a){if(D(a))return{date:null};let b=o.get(a),c=b?.value.soft?6e4:b?.value.failed?6e5:432e5;if(b&&Date.now()-b.ts<c)return b.value;let d=a.split("."),e=[];for(let a=0;a<=d.length-2;a++)e.push(d.slice(a).join("."));let f={date:null};for(let a of e){let b=await C(a);if(b.date){f=b;break}b.reason&&(f=b)}if(!f.date&&b?.value.date){let c={date:b.value.date};return o.set(a,{ts:Date.now(),value:c}),c}return o.set(a,{ts:Date.now(),value:f}),f}async function C(a){let b=new AbortController,c=setTimeout(()=>b.abort(),2e4);try{let c=await fetch(`https://rdap.org/domain/${encodeURIComponent(a)}`,{headers:{accept:"application/rdap+json","user-agent":"af360/0.1"},redirect:"follow",signal:b.signal,cache:"no-store"});if(404===c.status)return{date:null};if(429===c.status)return{date:null,reason:"the registry is limiting lookups right now - I'll retry soon",failed:!0};if(!c.ok)return l(`Could not check the renewal date for ${a} just now, will retry.`,`RDAP answered ${c.status}`,`rdap:${a}`),{date:null,reason:"the registry lookup failed - I'll retry soon",failed:!0};let d=await c.json(),e=(d?.events??[]).find(a=>a?.eventAction==="expiration");if(!e?.eventDate)return{date:null};let f=new Date(e.eventDate);return isNaN(f.getTime())?{date:null}:{date:f.toISOString()}}catch(b){return l(`Could not check the renewal date for ${a} just now, will retry.`,b,`rdap:${a}`),{date:null,reason:"still checking the renewal date - I'll have this shortly",failed:!0,soft:!0}}finally{clearTimeout(c)}}function D(a){return/^\d{1,3}(\.\d{1,3}){3}$/.test(a)||a.includes(":")||/^\[.*\]$/.test(a)}function E(){let a=Date.now();for(let b of o.values())if(b.value.soft&&a-b.ts<12e4)return!0;return!1}}};
1
+ "use strict";exports.id=6992,exports.ids=[6992],exports.modules={65970:(a,b,c)=>{c.d(b,{Cp:()=>k,I:()=>i,I5:()=>g,fF:()=>h,lt:()=>f,nW:()=>d,p0:()=>j});function d(a,b=Date.now()){let c="number"==typeof a?a:new Date(a).getTime();return Number.isFinite(c)&&b-c<0}let e="a time this machine's clock has not reached yet",f={core:e,at:`at ${e}`,recorded:`recorded at ${e}`,since:`since ${e}`},g={outage:"af360 cannot say for how long: this outage is dated as ending before it began"};function h(a,b=Date.now()){let c="number"==typeof a?a:new Date(a).getTime(),d=b-c;if(d<0)return f.recorded;if(d<6e4)return"just now";if(d<36e5)return`${Math.floor(d/6e4)} min ago`;if(d<864e5)return l(Math.floor(d/36e5),"hour")+" ago";if(d<12096e5)return l(Math.floor(d/864e5),"day")+" ago";if(d<48384e5)return l(Math.floor(d/6048e5),"week")+" ago";let e=new Date(c);return e.toLocaleDateString([],{month:"short",day:"numeric",...e.getFullYear()!==new Date(b).getFullYear()?{year:"numeric"}:{}})}function i(a,b=Date.now()){let c=b-("number"==typeof a?a:new Date(a).getTime());return c<0?f.since:`for ${l(Math.floor(c/864e5),"day")}`}function j(a){return a<6e4?"less than a minute":a<36e5?l(Math.floor(a/6e4),"minute"):a<864e5?l(Math.floor(a/36e5),"hour"):l(Math.floor(a/864e5),"day")}function k(a,b){let c=b-a;return c>=0?j(c):null}function l(a,b){return`${a} ${b}${1===a?"":"s"}`}},83720:(a,b,c)=>{c.d(b,{AQ:()=>h,Cp:()=>d.Cp,I:()=>d.I,I5:()=>d.I5,KN:()=>g,OL:()=>f,lt:()=>d.lt,nW:()=>d.nW,p0:()=>d.p0,rq:()=>e});var d=c(65970);function e(a=Date.now()){let b=new Date("number"==typeof a?a:new Date(a).getTime()),c=a=>String(a).padStart(2,"0");return`${b.getFullYear()}-${c(b.getMonth()+1)}-${c(b.getDate())}`}function f(a){return new Date("number"==typeof a?a:new Date(a).getTime()).toLocaleDateString([],{month:"long",day:"numeric",year:"numeric"})}function g(a){return(0,d.fF)(a)}function h(a){return Math.floor((new Date(a).getTime()-Date.now())/864e5)}},86992:(a,b,c)=>{c.d(b,{wt:()=>v,wm:()=>z,R$:()=>E});var d=c(29021),e=c(33873),f=c.n(e),g=c(34631),h=c.n(g),i=c(22191),j=c(83720);let k=new Map;function l(a,b,c=a){let d=Date.now(),e=k.get(c);if(void 0===e||!(d-e<6e5)){if(k.set(c,d),"1"===process.env.AF360_DEBUG)return void console.error(`[af360] ${a}`,b??"");console.error(`[af360] ${a}`)}}let m=globalThis,n=m.__af360Ssl??(m.__af360Ssl=new Map),o=m.__af360Rdap??(m.__af360Rdap=new Map),p=[/let'?s encrypt/i,/google trust/i,/cloudflare/i,/zerossl/i],q={sslManaged:"Auto-renews - nothing to do. I'll flag it if renewal doesn't happen.",sslManagedLate:"This should have auto-renewed by now and hasn't - check with your host.",sslUnknown:"Can't tell if this renews itself - check with your host.",domain:"Usually auto-renews if billing is active.",ladder30:"No sign this one renews itself, and it expires in under a month - a good week to check with your host.",ladder7:"No sign this one renews itself and it expires within the week - this is the one to deal with today.",ladder2:"No sign this one renews itself and it expires in under 48 hours.",ladderGone:"This certificate has already expired - visitors are seeing a warning page."};function r(a){return a<0?0:a<=2?2:a<=7?7:a<=30?30:null}function s(a){let b=r(a);return 0===b?{chip:"red",rung:b,judgment:q.ladderGone}:2===b?{chip:"red",rung:b,judgment:q.ladder2}:7===b?{chip:"red",rung:b,judgment:q.ladder7}:30===b?{chip:"amber",rung:b,judgment:q.ladder30}:{chip:"calm",rung:b,judgment:q.sslUnknown}}async function t(){try{let{github:a,state:b}=await Promise.all([c.e(8150),c.e(1232)]).then(c.bind(c,18150)),d=a.expiry(await b());return d?[d]:[]}catch{return[]}}async function u(a){let b=[],e=[],g=/\.(?:crt|cer|pem)$/i,h=new Set(["node_modules",".git","dist","build",".next","out","vendor",".venv"]),i=new Set;async function j(a,k){let l;if(!(k>3)&&!(b.length+e.length>40)){try{l=await d.promises.readdir(a,{withFileTypes:!0})}catch{return}for(let m of l){let l=f().join(a,m.name);if(m.isDirectory()){if(h.has(m.name)||m.name.startsWith(".")&&".certs"!==m.name)continue;await j(l,k+1)}else if(g.test(m.name)){let a;if(i.has(l.toLowerCase()))continue;i.add(l.toLowerCase());try{a=await d.promises.readFile(l,"utf8")}catch{e.push({kind:"localcert",name:l,reason:"af360 could not open this certificate file"});continue}if(!/-----BEGIN CERTIFICATE-----/.test(a))continue;try{let{X509Certificate:d}=await Promise.resolve().then(c.t.bind(c,55511,23)),g=new d(a),h=new Date(g.validTo);if(isNaN(h.getTime())){e.push({kind:"localcert",name:l,reason:"af360 read this certificate but could not read its expiry date"});continue}b.push({...y(`localcert:${l.toLowerCase()}`,"ssl",f().basename(l),h.toISOString()),issuer:g.issuer?.split("\n")[0]??void 0,note:l})}catch{e.push({kind:"localcert",name:l,reason:"af360 found a certificate here and could not read it"})}}}}}for(let b of a)await j(b,0);return{items:b,unknowns:e}}async function v(a){let b=[],c=[];try{let d=await u(a.roots);b.push(...d.items),c.push(...d.unknowns)}catch{}let d=[...new Set(a.urls.filter(a=>"dependency"!==a.role).map(a=>{try{return new URL(a.url).hostname}catch{return null}}).filter(a=>!!a))],e=!0===a.domainLookup;for(let a of(await Promise.all(d.map(async a=>{let[d,f]=await Promise.all([function(a){let b=n.get(a);return b&&Date.now()-b.ts<432e5?Promise.resolve(b.value):new Promise(b=>{let c=!1,d=d=>{c||(c=!0,n.set(a,{ts:Date.now(),value:d}),b(d))};try{if(D(a))return d({validTo:null,issuer:null});let b=h().connect({host:a,port:443,servername:a,rejectUnauthorized:!1,timeout:1e4});b.on("secureConnect",()=>{let a=b.getPeerCertificate(),c=a?.valid_to?new Date(a.valid_to):null,e=a?.valid_from?new Date(a.valid_from):null,f=a?.issuer?[a.issuer.O,a.issuer.CN].filter(Boolean).join(" "):null;b.destroy(),d({validTo:c&&!isNaN(c.getTime())?c.toISOString():null,issuer:f||null,serial:a?.serialNumber||void 0,validFrom:e&&!isNaN(e.getTime())?e.toISOString():void 0})}),b.on("timeout",()=>{b.destroy(),d({validTo:null,issuer:null})}),b.on("error",()=>d({validTo:null,issuer:null}))}catch{d({validTo:null,issuer:null})}})}(a),e?B(a):Promise.resolve(A)]);d.validTo?b.push(function(a,b){let c=!!b.issuer&&p.some(a=>a.test(b.issuer)),d={...y(`ssl:${a}`,"ssl",a,b.validTo),issuer:b.issuer??void 0,serial:b.serial,validFrom:b.validFrom};if(!c){let b=s(d.daysLeft),c=`${a}@${b.rung}`;return null===b.rung||x.has(c)||(x.add(c),(0,i.logEvent)(`${a}'s certificate expires in ${d.daysLeft} day${1===d.daysLeft?"":"s"} and af360 has no sign it renews itself.`,"change")),{...d,managed:!1,chip:b.chip,judgment:b.judgment}}let e=d.daysLeft<0?"red":d.daysLeft<7?"amber":"calm";return"calm"===e||x.has(a)||(x.add(a),(0,i.logEvent)(`${a}'s certificate should have auto-renewed by now - it hasn't.`,"change")),"calm"===e&&x.delete(a),{...d,managed:!0,chip:e,judgment:"calm"===e?q.sslManaged:q.sslManagedLate}}(a,d)):c.push({kind:"ssl",name:a,reason:"couldn't read the certificate"}),f.date?b.push({...y(`domain:${a}`,"domain",a,f.date),judgment:q.domain}):c.push({kind:"domain",name:a,reason:f.reason??"the public registry didn't share a date"})})),await t())){let c=y(a.id,"manual",a.name,a.date),d=s(c.daysLeft);b.push({...c,chip:d.chip,rung:d.rung,judgment:d.judgment,manual:!1})}for(let c of a.manualExpiries){if(isNaN(new Date(c.date).getTime()))continue;let a=y(c.id,"manual",c.name,new Date(c.date).toISOString()),d=function(a,b=!1){if(b)return{chip:"calm",rung:null,passed:a<0};let c=r(a);return 0===c?{chip:"amber",rung:c,passed:!0}:2===c||7===c?{chip:"red",rung:c,passed:!1}:30===c?{chip:"amber",rung:c,passed:!1}:{chip:"calm",rung:c,passed:!1}}(a.daysLeft,!0===c.done);b.push({...a,note:c.note,manual:!0,cost:!0===c.cost||void 0,done:!0===c.done||void 0,passed:d.passed||void 0,rung:d.rung,chip:d.chip})}return b.sort((a,b)=>a.date.localeCompare(b.date)),{items:b,unknowns:c}}let w=globalThis,x=w.__af360SslFlagged??(w.__af360SslFlagged=new Set);function y(a,b,c,d){let e=(0,j.AQ)(d);return{id:a,kind:b,name:c,date:d,daysLeft:e,chip:z(e)}}function z(a){return a<7?"red":a<30?"amber":"calm"}let A={date:null,reason:"af360 hasn't asked - checking renewal dates means sending this address to a public registry, and that is off until you turn it on in Settings"};async function B(a){if(D(a))return{date:null};let b=o.get(a),c=b?.value.soft?6e4:b?.value.failed?6e5:432e5;if(b&&Date.now()-b.ts<c)return b.value;let d=a.split("."),e=[];for(let a=0;a<=d.length-2;a++)e.push(d.slice(a).join("."));let f={date:null};for(let a of e){let b=await C(a);if(b.date){f=b;break}b.reason&&(f=b)}if(!f.date&&b?.value.date){let c={date:b.value.date};return o.set(a,{ts:Date.now(),value:c}),c}return o.set(a,{ts:Date.now(),value:f}),f}async function C(a){let b=new AbortController,c=setTimeout(()=>b.abort(),2e4);try{let c=await fetch(`https://rdap.org/domain/${encodeURIComponent(a)}`,{headers:{accept:"application/rdap+json","user-agent":"af360/0.1"},redirect:"follow",signal:b.signal,cache:"no-store"});if(404===c.status)return{date:null};if(429===c.status)return{date:null,reason:"the registry is limiting lookups right now - I'll retry soon",failed:!0};if(!c.ok)return l(`Could not check the renewal date for ${a} just now, will retry.`,`RDAP answered ${c.status}`,`rdap:${a}`),{date:null,reason:"the registry lookup failed - I'll retry soon",failed:!0};let d=await c.json(),e=(d?.events??[]).find(a=>a?.eventAction==="expiration");if(!e?.eventDate)return{date:null};let f=new Date(e.eventDate);return isNaN(f.getTime())?{date:null}:{date:f.toISOString()}}catch(b){return l(`Could not check the renewal date for ${a} just now, will retry.`,b,`rdap:${a}`),{date:null,reason:"still checking the renewal date - I'll have this shortly",failed:!0,soft:!0}}finally{clearTimeout(c)}}function D(a){return/^\d{1,3}(\.\d{1,3}){3}$/.test(a)||a.includes(":")||/^\[.*\]$/.test(a)}function E(){let a=Date.now();for(let b of o.values())if(b.value.soft&&a-b.ts<12e4)return!0;return!1}}};
@@ -1 +1 @@
1
- "use strict";exports.id=7511,exports.ids=[7511],exports.modules={27511:(a,b,c)=>{c.d(b,{cc:()=>u,Uj:()=>B,ou:()=>C,ct:()=>K,kc:()=>L,aA:()=>t,G2:()=>F,yn:()=>w,j4:()=>N,Wj:()=>s});var d=c(21124),e=c(38301),f=c(73450),g=c(60521),h=c(7240),i=c(71322),j=c(99511),k=c(31296),l=c(78530),m=c(72338),n=c(40850),o=c(95938);let p={unreachable:"no connection",down:"GitHub down",expired:"token expired",unauthorized:"token refused",forbidden:"not granted",ratelimited:"rate limit",timeout:"no answer",moved:"remote moved","past-ceiling":"past the scan limit"},q=Object.fromEntries(Object.keys(p).map(a=>[a,`GitHub not checked (${p[a]})`]));var r=c(80891);function s(a){let b=(0,l.kj)();(0,l.cO)();let[c,f]=(0,e.useState)(null),[g,h]=(0,e.useState)(null),i=(0,l.Je)(),j=a=>{h(a),setTimeout(()=>h(b=>b===a?null:b),4500)},m=async(c,d,e,f)=>{let g=await a.doIgnore(c,d,e,f);j(g.ok?i((0,n.ph)("toast.ignored",k.UI.radar.ignoredToast,e)):g.message??b("common.somethingWrong",k.UI.common.somethingWrong))},o=(0,d.jsxs)(d.Fragment,{children:[g&&(0,d.jsx)("div",{className:"toast",role:"status",children:g}),c&&(0,d.jsx)("div",{className:"confirm-overlay",role:"dialog","aria-modal":"true",children:(0,d.jsxs)("div",{className:"confirm",children:[(0,d.jsx)("p",{children:c.message}),(0,d.jsxs)("div",{className:"setup-actions",children:[(0,d.jsx)("button",{className:"b",onClick:()=>{m(c.id,c.kind,c.label,c.snapshot),f(null)},children:b("act.ignoreIt",k.UI.radar.ignoreIt)}),(0,d.jsx)("button",{className:"b accent",onClick:()=>f(null),children:b("act.keepWatching",k.UI.radar.keepWatching)})]})]})})]});return{requestIgnore:(a,b,c,d,e,g)=>{d?f({id:a,kind:b,label:c,message:e,snapshot:g}):m(a,b,c,g)},ignoreThen:m,showToast:j,overlays:o}}function t({view:a,onChange:b}){return(0,d.jsx)(j.fn,{view:a,onChange:b})}function u({value:a,onChange:b,showLabel:c=k.UI.common.show,hideLabel:e=k.UI.common.collapse,showKey:f="btn.show",hideKey:g="btn.collapse"}){return(0,d.jsx)("button",{className:"collapse","aria-expanded":!a,onClick:()=>b(!a),children:a?(0,d.jsx)(l.T,{k:f,en:c}):(0,d.jsx)(l.T,{k:g,en:e})})}function v({pinned:a,onPin:b,onIgnore:c}){let e=(0,l.kj)(),f=(0,l.cO)();return(0,d.jsx)(j.ob,{actions:[{label:a?e("act.unpin",k.UI.radar.unpin):e("act.pin",k.UI.radar.pinLabel),title:f.pin,onClick:b,effect:a?e("eff.unpin",k.UI.radar.effUnpin):e("eff.pin",k.UI.radar.effPin)},{label:e("act.ignore",k.UI.radar.ignoreLabel),title:f.ignore,onClick:c,effect:e("eff.ignore",k.UI.radar.effIgnore)}]})}let w=a=>a.path.toLowerCase();function x(a){if(!a)return null;let b=new Date(a).getTime();if(!Number.isFinite(b))return null;let c=Date.now()-b;return c<0?null:Math.floor(c/864e5)}function y({p:a,tone:b,cockpit:c}){let e=(0,l.kj)(),i=null!==b&&"clean"!==b,j=(0,l.cO)(),n=x(a.lastActivity),o=c.isDupe(a.name)&&("dormant"===a.staleness||"forgotten"===a.staleness)?(0,g.ih)(a,c.projects):null,p=o&&"unproven"!==o.kind?o.others:[],q=p.length>0?p.map(a=>(0,h.oV)(a.path,26)).join(", "):null,s=null!==q,t=[];return a.changedTotal>0&&t.push((0,d.jsxs)("b",{...(0,r.uN)(j.unsaved),children:[a.changedTotal," unsaved"]},"u")),a.deleted>0&&t.push((0,d.jsxs)("b",{...(0,r.uN)(j.deleted),children:[a.deleted," deleted"]},"del")),(a.ahead??0)>0&&t.push(a.uncommitted>0?(0,d.jsxs)("span",{...(0,r.uN)(j.unpushed),children:[a.ahead," unpushed"]},"a"):(0,d.jsxs)("b",{...(0,r.uN)(j.unpushed),children:[a.ahead," unpushed"]},"a")),(0,g.ze)(a)&&t.push((0,d.jsx)("b",{...(0,r.uN)(j.onlyHere),children:"only on this machine"},"nr")),a.isGit||a.looksDownloaded||t.push((0,d.jsx)("span",{...(0,r.uN)(j.noHistory),children:"no git history"},"ng")),s&&0===a.uncommitted&&null!==n&&t.push((0,d.jsxs)("span",{...(0,r.uN)(j.dormant),children:["dormant ",n,"d"]},"d")),q&&o?.kind==="duplicate"?t.push((0,d.jsxs)("span",{...(0,r.uN)(j.duplicate),children:["duplicate of ",q]},"dup")):q&&o?.kind==="sharesName"&&t.push((0,d.jsxs)("span",{...(0,r.uN)(j.sharesName),children:["shares a name with ",q]},"dup")),null===b?t.push((0,d.jsx)("span",{className:"dim-t",children:(0,d.jsx)(m.h,{children:e("common.checking",k.UI.common.checking)})},"chk")):i||t.push((0,d.jsx)("span",{className:"okw",...(0,r.uN)(j.clean),children:"clean ✓"},"ok")),a.looksDownloaded?t.push((0,d.jsx)("span",{...(0,r.uN)(j.downloadedCopy),children:"looks downloaded"},"dl")):a.lastActivity&&!(s&&0===a.uncommitted)&&t.push((0,d.jsxs)("span",{children:[a.lastCommit?i?"last commit ":"committed ":"touched ",(0,d.jsx)(f.fV,{ts:a.lastActivity})]},"t")),(0,d.jsx)("div",{className:"c-fact",children:t.map((a,b)=>(0,d.jsxs)("span",{children:[b>0&&" \xb7 ",a]},b))})}function z(a,b=(a,b)=>b){return[w(a),"project",a.name,(0,g.ze)(a),b("confirm.projectShort",k.UI.radar.confirmProjectShort),{uncommitted:a.uncommitted,hasRemote:a.hasRemote}]}function A({p:a,cockpit:b}){let c=(0,e.useContext)(f.vC),h=(0,l.kj)(),i=(0,l.cO)(),j=(b.cfg?.roots??[]).find(b=>b.toLowerCase()===w(a));return(0,d.jsxs)(d.Fragment,{children:[a.looksDownloaded?(0,d.jsx)("span",{children:"Looks like something downloaded rather than something you wrote."}):(0,g.ze)(a)?(0,d.jsx)("span",{children:"No remote copy exists - one disk failure and it's gone."}):a.hasRemote?(0,d.jsxs)("span",{...(0,r.uN)(i.remote),children:["Backed up to a remote ✓",(a.ahead??0)>0&&(0,d.jsxs)(d.Fragment,{children:[" - ",a.ahead," commit",1===a.ahead?"":"s"," not pushed yet"]})]}):null,c&&a.isGit&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("span",{className:"mono",children:["branch ",a.branch??"-"," \xb7 remote ",a.remoteUrl??a.remoteName??"-",null!=a.ahead&&null!=a.behind&&(0,d.jsxs)(d.Fragment,{children:[" \xb7 ",a.ahead," ahead / ",a.behind," behind"]}),null!=a.commitCount&&(0,d.jsxs)(d.Fragment,{children:[" \xb7 ",a.commitCount," commits"]})]}),a.dirtyFiles.length>0&&(0,d.jsxs)("span",{className:"mono",children:["changed: ",a.dirtyFiles.join(", "),a.changedTotal>a.dirtyFiles.length?` … +${a.changedTotal-a.dirtyFiles.length} more`:""]}),a.deletedFiles.length>0&&(0,d.jsxs)("span",{className:"mono",children:["deleted: ",a.deletedFiles.join(", "),a.deleted>a.deletedFiles.length?` … +${a.deleted-a.deletedFiles.length} more`:""]})]}),c&&(0,d.jsx)("span",{className:"mono",children:a.path}),j&&(0,d.jsx)("button",{className:"b danger",style:{justifySelf:"start"},...(0,r.uN)(i.unwatch),onClick:()=>b.post({action:"removeRoot",path:j}).then(a=>{a.ok&&b.resolveRow(j)}),children:h("act.stopWatchingFolder",k.UI.radar.stopWatchingFolder)})]})}function B({p:a,tone:b,cockpit:c,change:e,open:f,onToggle:g,onIgnoreRequest:j,onToast:m}){let n=null!==b&&"clean"!==b,o=c.isPinned(w(a)),p=(0,l.kj)();return(0,l.cO)(),(0,d.jsxs)("div",{[i.J6]:w(a),className:`card${n?" warn":""}${o?" pinned":""}`,children:[(0,d.jsxs)("div",{className:"c-top",children:[(0,d.jsx)("span",{className:`dot ${null===b?"u":n?"a":"g"}`,"aria-hidden":!0}),(0,d.jsx)("b",{children:a.name}),e&&(0,d.jsx)("span",{className:"chg",children:e})]}),(0,d.jsx)(y,{p:a,tone:b,cockpit:c}),(0,d.jsx)(D,{p:a,cockpit:c}),(0,d.jsx)("div",{className:"c-path",children:(0,h.oV)(a.path,40)}),(0,d.jsxs)("div",{className:"c-foot",children:[(0,d.jsx)("button",{className:"b2 q",onClick:g,"aria-expanded":f,children:f?(0,d.jsx)(l.T,{k:"btn.hide",en:k.UI.common.hide}):(0,d.jsx)(l.T,{k:"btn.details",en:k.UI.common.details})}),!c.demo&&(0,d.jsx)(i.Fb,{cockpit:c,project:a,onToast:m,link:!0}),!c.demo&&(0,d.jsx)(i.r8,{path:a.path}),(0,d.jsx)(v,{pinned:o,onPin:()=>c.togglePin(w(a)),onIgnore:()=>j(...z(a,p))})]}),f&&(0,d.jsx)("div",{className:"c-detail",children:(0,d.jsx)(A,{p:a,cockpit:c})})]})}function C({p:a,tone:b,cockpit:c,change:e,open:f,onToggle:g,onIgnoreRequest:j}){let k=null!==b&&"clean"!==b,m=c.isPinned(w(a)),n=c.isDupe(a.name),o=(0,l.kj)();return(0,l.cO)(),(0,d.jsxs)("div",{[i.J6]:w(a),className:`irow${k?" warn":""}`,children:[(0,d.jsxs)("div",{className:"irow-line",children:[(0,d.jsxs)("button",{className:"irow-main",onClick:g,"aria-expanded":f,children:[(0,d.jsx)("span",{className:`dot ${null===b?"u":k?"a":"g"}`,"aria-hidden":!0}),(0,d.jsxs)("span",{className:"irow-name",children:[a.name,n&&(0,d.jsxs)("span",{className:"irow-parent",children:[" (",function(a){let b=a.split(/[\\/]/).filter(Boolean);return b.length>1?b[b.length-2]:a}(a.path),")"]})]}),e&&(0,d.jsx)("span",{className:"chg",children:e}),(0,d.jsx)("span",{className:`irow-truth${k?" warn":""}`,children:(0,d.jsx)(E,{p:a,tone:b,cockpit:c})}),(0,d.jsx)("span",{className:"irow-path",children:(0,h.oV)(a.path,40)})]}),(0,d.jsx)(D,{p:a,cockpit:c}),(0,d.jsxs)("span",{className:"qk",children:[!c.demo&&(0,d.jsx)(i.r8,{path:a.path}),(0,d.jsx)(v,{pinned:m,onPin:()=>c.togglePin(w(a)),onIgnore:()=>j(...z(a,o))})]})]}),f&&(0,d.jsx)("div",{className:"irow-detail",children:(0,d.jsx)(A,{p:a,cockpit:c})})]})}function D({p:a,cockpit:b}){var c;let e=(0,l.kj)(),g=b.radar?.github??null;if(!g)return null;let h=(c=a.path,g?g.byPath[c.toLowerCase()]??null:null),i=function(a){if(!a)return null;let b=/[/@]github\.com[:/]+([^/]+)\/([^/]+?)(?:\.git)?\/?$/.exec(a);return b?`${b[1]}/${b[2]}`:null}(a.remoteUrl),j=i?(0,d.jsxs)("span",{className:"gh-prov",children:[(0,d.jsx)(o.En,{children:i}),h?.ok?(0,d.jsxs)(d.Fragment,{children:[" \xb7 ",e("connections.ghCardChecked",k.UI.connections.ghCardChecked)," ",(0,d.jsx)(f.fV,{ts:g.at})]}):h?null:(0,d.jsxs)(d.Fragment,{children:[" \xb7 ",e("connections.ghCardNever",k.UI.connections.ghCardNever)]})]}):null;if(!h)return g.outage?(0,d.jsxs)("span",{className:"gh-chips",children:[j,(0,d.jsx)(o.En,{children:(0,d.jsx)("span",{className:"chip plain",children:"GitHub not checked yet"})})]}):null;if(!h.ok)return(0,d.jsxs)("span",{className:"gh-chips",children:[j,(0,d.jsx)(o.En,{children:(0,d.jsx)("span",{className:"chip plain",children:q[h.kind]})})]});let m=h.value,n=[];if(m.ci.ok&&m.ci.value){let a=m.ci.value,b="passing"===a.state?"calm":"failing"===a.state?"bad":"plain",c="passing"===a.state?"✓":"failing"===a.state?"✗":"\xb7";n.push((0,d.jsxs)("span",{className:`chip ${b}`,children:["CI ",c," ",a.branch]},"ci"))}else{let a;m.ci.ok||n.push((0,d.jsx)("span",{className:"chip plain",children:(a=m.ci.kind,`CI not checked (${p[a]})`)},"ci"))}if(m.prCount.ok&&m.prCount.value>0){let a=m.prCount.value;n.push((0,d.jsxs)("span",{className:"chip plain",children:[a,m.prCapped?"+":""," PR",1!==a||m.prCapped?"s":""]},"pr"))}if(m.issueCount.ok&&m.issueCount.value>0){let a=m.issueCount.value;n.push((0,d.jsxs)("span",{className:"chip plain",children:[a," issue",1===a?"":"s"]},"is"))}return("confirmed"===m.backup.verdict&&n.push((0,d.jsx)("span",{className:"chip calm",...(0,r.uN)("af360 asked GitHub, and GitHub has this exact commit"),children:"GitHub confirms"},"bk")),0===n.length)?j?(0,d.jsx)("span",{className:"gh-chips",children:j}):null:(0,d.jsxs)("span",{className:"gh-chips",children:[j,(0,d.jsx)(o.En,{children:n})]})}function E({p:a,tone:b,cockpit:c}){let e=(0,l.cO)(),h=c.isDupe(a.name)&&("dormant"===a.staleness||"forgotten"===a.staleness)?(0,g.ih)(a,c.projects):null,i=h?.kind==="duplicate",j=x(a.lastActivity);return a.looksDownloaded?(0,d.jsx)("span",{...(0,r.uN)(e.downloadedCopy),children:"looks downloaded"}):a.uncommitted>0?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("span",{...(0,r.uN)(e.unsaved),children:[a.uncommitted," unsaved"]})," \xb7 last commit ",a.lastActivity?(0,d.jsx)(f.fV,{ts:a.lastActivity}):"never"]}):(0,g.ze)(a)?(0,d.jsx)("span",{...(0,r.uN)(e.onlyHere),children:"only on this machine"}):(a.ahead??0)>0?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("span",{...(0,r.uN)(e.unpushed),children:[a.ahead," unpushed"]})," \xb7 committed ",a.lastActivity?(0,d.jsx)(f.fV,{ts:a.lastActivity}):"-"]}):"clean"!==b&&i&&null!==j?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("span",{...(0,r.uN)(e.dormant),children:["dormant ",j,"d"]})," \xb7 ",(0,d.jsx)("span",{...(0,r.uN)(e.duplicate),children:"duplicate"})]}):a.lastActivity?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("span",{...(0,r.uN)(e.clean),children:"clean ✓"})," \xb7 committed ",(0,d.jsx)(f.fV,{ts:a.lastActivity})]}):(0,d.jsx)("span",{...(0,r.uN)(e.noHistory),children:"no history"})}function F(a,b){return a.find(a=>a.subjectId===b)??null}function G(a){let b=a.entry.label||P(a.entry.url),c=!!a.current&&!a.current.ok;return[a.entry.id,"url",b,c,k.UI.radar.confirmSite,{down:c}]}function H({u:a,incident:b}){let c=(0,e.useContext)(f.vC),g=(0,l.kj)();(0,l.cO)();let h=a.current;if(!h)return(0,d.jsx)("span",{children:(0,d.jsx)(m.h,{children:g("site.firstCheck",k.UI.radar.firstCheck)})});if(!h.ok)return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("b",{children:Q(a.sinceText)}),c&&h.status?` \xb7 HTTP ${h.status}`:"",b?.acknowledged?" \xb7 being handled ✓":""]});let i=Q(a.sinceText).replace(/^up for /,"up "),j=b?.endedTs?(0,d.jsxs)(d.Fragment,{children:["last incident ",(0,d.jsx)(f.fV,{ts:b.endedTs})]}):(0,d.jsx)(d.Fragment,{children:"no incidents while watching"});return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("span",{className:"okw",children:i})," \xb7 ","number"==typeof h.ms?`${h.ms} ms`:"-",c&&h.status?` \xb7 HTTP ${h.status}`:""," \xb7 ",j]})}function I({u:a,cockpit:b}){let c=a.current,e=P(a.entry.url),f=b.expiry?.items.find(a=>"ssl"===a.kind&&a.name===e),g=Object.entries(c?.headers??{}),h=["strict-transport-security","content-security-policy"].filter(a=>!(c?.headers??{})[a]);return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("span",{className:"mono",children:["HTTP ",c?.status??"-"," \xb7 total ","number"==typeof c?.ms?`${c.ms} ms`:"-"," \xb7 checked ",c?new Date(c.ts).toLocaleTimeString():"-"]}),f&&(0,d.jsxs)("span",{className:"mono",children:["cert: ",f.issuer??"unknown issuer",f.serial?` \xb7 serial ${f.serial}`:""]}),g.length>0&&(0,d.jsxs)("span",{className:"mono",children:["headers: ",g.map(([a,b])=>`${a}: ${b}`).join(" \xb7 ")]}),h.length>0&&(0,d.jsxs)("span",{className:"mono",children:["missing: ",h.join(", ")]})]})}function J({u:a,cockpit:b,incident:c}){let g=(0,l.kj)(),h=(0,l.cO)(),i=(0,e.useContext)(f.vC);return(0,d.jsxs)(d.Fragment,{children:[c&&!c.endedTs&&(0,d.jsxs)("span",{children:["Ongoing: down since ",(0,d.jsx)(f.fV,{ts:c.startedTs,skewForm:"core"}),c.acknowledged?" \xb7 being handled ✓":""]}),i&&(0,d.jsx)(I,{u:a,cockpit:b}),(0,d.jsx)("a",{href:a.entry.url,target:"_blank",rel:"noreferrer",children:a.entry.url}),(0,d.jsx)("button",{className:"b danger",style:{justifySelf:"start"},...(0,r.uN)(h.unwatch),onClick:()=>b.post({action:"removeUrl",id:a.entry.id}).then(c=>{c.ok&&b.resolveRow(a.entry.id)}),children:g("act.stopWatchingSite",k.UI.radar.stopWatchingSite)})]})}function K({u:a,tone:b,cockpit:c,incident:e,open:f,onToggle:g,onIgnoreRequest:j,extra:m}){let n=a.current,o="red"===b;(0,l.kj)(),(0,l.cO)();let p=c.isPinned(a.entry.id),q=a.entry.label||P(a.entry.url);return(0,d.jsxs)("div",{className:`card site${o?" bad":""}${p?" pinned":""}`,children:[(0,d.jsxs)("div",{children:[(0,d.jsxs)("div",{className:"c-top",children:[(0,d.jsx)("span",{className:`dot ${null===b||!n?"u":o?"r":"g"}`,"aria-hidden":!0}),(0,d.jsx)("b",{children:q})]}),(0,d.jsx)("div",{className:"c-fact",children:(0,d.jsx)(H,{u:a,incident:e})}),(0,d.jsx)("div",{className:"c-path",children:(0,h.oV)(a.entry.url,44)}),(0,d.jsxs)("div",{className:"c-foot",children:[(0,d.jsx)("button",{className:"b2 q",onClick:g,"aria-expanded":f,children:f?(0,d.jsx)(l.T,{k:"btn.hide",en:k.UI.common.hide}):(0,d.jsx)(l.T,{k:"btn.details",en:k.UI.common.details})}),(0,d.jsx)(i.r8,{path:a.entry.url,label:k.UI.radar.copyAddress,labelKey:"btn.copyAddress"}),(0,d.jsx)(v,{pinned:p,onPin:()=>c.togglePin(a.entry.id),onIgnore:()=>j(...G(a))}),m]})]}),(0,d.jsx)(M,{history:a.history}),f&&(0,d.jsx)("div",{className:"c-detail",style:{gridColumn:"1 / -1"},children:(0,d.jsx)(J,{u:a,cockpit:c,incident:e})})]})}function L({u:a,tone:b,cockpit:c,incident:e,open:f,onToggle:g,onIgnoreRequest:j,extra:n}){let o=a.current,p="red"===b,q=(0,l.kj)();(0,l.cO)();let r=c.isPinned(a.entry.id),s=a.entry.label||P(a.entry.url);return(0,d.jsxs)("div",{className:`irow${p?" bad":""}`,children:[(0,d.jsxs)("div",{className:"irow-line",children:[(0,d.jsxs)("button",{className:"irow-main",onClick:g,"aria-expanded":f,children:[(0,d.jsx)("span",{className:`dot ${null===b||!o?"u":p?"r":"g"}`,"aria-hidden":!0}),(0,d.jsx)("span",{className:"irow-name",children:s}),(0,d.jsx)("span",{className:`irow-truth${p?" bad":""}`,children:o?p?Q(a.sinceText):`${Q(a.sinceText).replace(/^up for /,"up ")} \xb7 ${o.ms} ms`:(0,d.jsx)(m.h,{children:q("site.firstCheck",k.UI.radar.firstCheck)})}),(0,d.jsx)("span",{className:"irow-path",children:(0,h.oV)(a.entry.url,36)})]}),(0,d.jsxs)("span",{className:"qk",children:[(0,d.jsx)(i.r8,{path:a.entry.url,label:k.UI.radar.copyAddress,labelKey:"btn.copyAddress"}),(0,d.jsx)(v,{pinned:r,onPin:()=>c.togglePin(a.entry.id),onIgnore:()=>j(...G(a))}),n]})]}),f&&(0,d.jsxs)("div",{className:"irow-detail",children:[(0,d.jsx)("div",{style:{maxInlineSize:260},children:(0,d.jsx)(M,{history:a.history})}),(0,d.jsx)(J,{u:a,cockpit:c,incident:e})]})]})}function M({history:a}){let b=(0,l.kj)();if((0,l.cO)(),a.length<10){let c=a.length>0?Math.round((Date.now()-a[0].ts)/6e4):0,e=c>0?c:0;return(0,d.jsx)("div",{className:"spark",children:(0,d.jsxs)("span",{className:"spark-wait",children:[b("site.historyBuilds",k.UI.radar.historyBuilds),e>0?` \xb7 ${e}m watched`:(0,d.jsx)(m.g,{})]})})}let c=a.length>40?function(a,b){let c=[];for(let d=0;d<40;d++)c.push(a[Math.round(d*(a.length-1)/(b-1))]);return c}(a,40):a,e=c.filter(a=>a.ok&&"number"==typeof a.ms).map(a=>a.ms),f=Math.max(...e,1),g=Math.min(...e),h=a=>130*a/(c.length-1),i=c.map((a,b)=>a.ok&&"number"==typeof a.ms?`${h(b).toFixed(1)},${(30-(a.ms-g)/Math.max(1,f-g)*20).toFixed(1)}`:null).filter(Boolean);return(0,d.jsxs)("div",{className:"spark",children:[(0,d.jsxs)("svg",{viewBox:"0 0 130 34",preserveAspectRatio:"none",role:"img","aria-label":b("site.sparkAria",k.UI.radar.sparkAria),children:[(0,d.jsx)("polygon",{points:`0,34 ${i.join(" ")} 130,34`,fill:"color-mix(in srgb, var(--ok) 12%, transparent)"}),(0,d.jsx)("polyline",{points:i.join(" "),fill:"none",stroke:"var(--ok)",strokeWidth:"1.5"}),c.map((a,b)=>!a.ok&&(0,d.jsx)("rect",{x:h(b)-1.2,y:29,width:2.4,height:4,fill:"var(--bad)"},b))]}),(0,d.jsxs)("span",{className:"cap",children:["24h \xb7 ",g,"-",f," ms"]})]})}function N(a,b,c,d=[]){let[f,g]=(0,e.useState)(null);return O(()=>{let d=()=>{let d=a.current;if(!d||0===b)return;let e=d.firstElementChild;if(!e)return;let f=getComputedStyle(d),h=f.gridTemplateColumns.split(" ").filter(a=>"none"!==a&&""!==a).length||1,i=parseFloat(f.rowGap)||0,j=parseFloat(f.columnGap)||0,k=e.getBoundingClientRect(),l=k.height+i;if(l<=0)return;let m=(d.getBoundingClientRect().width-(h-1)*j)/h,n=Math.max(1,Math.floor(h/Math.max(1,Math.round((k.width+j)/(m+j))))),o=d.getBoundingClientRect().top,p=Math.min(b,Math.max(1,Math.floor((window.innerHeight-o-c+i)/l))*n);g(a=>a===p?a:p)};d();let e=setTimeout(d,120);return window.addEventListener("resize",d),()=>{clearTimeout(e),window.removeEventListener("resize",d)}},[b,c,...d]),null==f?b:Math.min(f,b)}let O=e.useEffect;function P(a){try{return new URL(a).hostname}catch{return a}}function Q(a){return a.charAt(0).toLowerCase()+a.slice(1)}},99511:(a,b,c)=>{c.d(b,{fn:()=>m,hf:()=>l,ob:()=>k,tU:()=>n});var d=c(21124),e=c(38301),f=c(23312),g=c(31296),h=c(78530),i=c(95938),j=c(80891);function k({actions:a,label:b}){let[c,i]=(0,e.useState)(!1),[k,l]=(0,e.useState)(null),m=(0,e.useRef)(null),n=(0,e.useRef)(null),o=(0,e.useId)(),p=(0,h.kj)(),q=(0,h.cO)();return((0,e.useCallback)(()=>{let a=m.current?.firstElementChild;if(!a)return;let b=a.getBoundingClientRect(),c=n.current?.offsetHeight??0,d=window.innerHeight-b.bottom,e=c>0&&d<c+8&&b.top>d;l({top:e?b.top-c-4:b.bottom+4,end:Math.max(4,window.innerWidth-b.right),flip:e})},[]),0===a.length)?null:(0,d.jsxs)("div",{className:"ovf",ref:m,children:[(0,d.jsxs)("button",{className:"ovf-btn",type:"button","aria-haspopup":"menu","aria-expanded":c,"aria-controls":o,...(0,j.uN)(q.moreActions),onClick:()=>i(a=>!a),children:[(0,d.jsx)(h.T,{k:"btn.more",en:b??g.UI.radar.moreActions})," ",(0,d.jsx)("span",{"aria-hidden":!0,children:"▾"})]}),c&&"undefined"!=typeof document&&(0,f.createPortal)((0,d.jsx)("div",{className:"ovf-menu",id:o,role:"menu",ref:n,"aria-label":p("act.moreAria",g.UI.radar.moreActionsAria),style:k?{insetBlockStart:k.top,insetInlineEnd:k.end}:{visibility:"hidden"},children:a.map(a=>(0,d.jsxs)("button",{role:"menuitem",type:"button",...(0,j.uN)(a.title),className:a.danger?"danger":void 0,onClick:()=>{i(!1),a.onClick()},children:[a.label,a.effect&&(0,d.jsx)("span",{children:a.effect})]},a.label))}),document.body)]})}function l({done:a,total:b,working:c}){let e=(0,h.kj)();(0,h.cO)();let f="ar"===(0,h.uU)();return b>0&&a<b?(0,d.jsxs)("div",{className:"streamline",role:"status","aria-live":"polite",children:[(0,d.jsx)("i",{"aria-hidden":!0}),f?(0,d.jsxs)(d.Fragment,{children:[e("stream.countingLead","")," ",(0,d.jsx)(i.V,{n:a})," ",e("stream.countingMid","")," ",(0,d.jsx)(i.V,{n:b})," ",e("stream.countingTail","")]}):g.UI.stream.counting(a,b)]}):c?(0,d.jsxs)("div",{className:"streamline",role:"status","aria-live":"polite",children:[(0,d.jsx)("i",{"aria-hidden":!0}),e("stream.starting",g.UI.stream.starting)]}):null}function m({view:a,onChange:b}){let c=(0,h.kj)();return(0,h.cO)(),(0,d.jsxs)("div",{className:"viewseg",role:"group","aria-label":c("radar.viewAria",g.UI.radar.viewAria),children:[(0,d.jsx)("button",{type:"button",className:"cards"===a?"on":"","aria-pressed":"cards"===a,onClick:()=>b("cards"),children:(0,d.jsx)(h.T,{k:"btn.grid",en:g.UI.radar.viewGrid})}),(0,d.jsx)("button",{type:"button",className:"rows"===a?"on":"","aria-pressed":"rows"===a,onClick:()=>b("rows"),children:(0,d.jsx)(h.T,{k:"btn.rows",en:g.UI.radar.viewRows})})]})}function n({tabs:a,active:b,onChange:c,label:e,vertical:f}){return(0,d.jsx)("div",{className:`tabs${f?" tabs-v":""}`,role:"tablist","aria-orientation":f?"vertical":void 0,"aria-label":e,children:a.map(a=>(0,d.jsxs)("button",{type:"button",role:"tab",id:`tab-${a.id}`,className:a.id===b?"on":"","aria-selected":a.id===b,"aria-controls":`panel-${a.id}`,onClick:()=>c(a.id),children:[a.label,void 0!==a.count&&(0,d.jsx)("span",{className:"tabn",children:a.count})]},a.id))})}}};
1
+ "use strict";exports.id=7511,exports.ids=[7511],exports.modules={27511:(a,b,c)=>{c.d(b,{cc:()=>u,Uj:()=>B,ou:()=>C,ct:()=>K,kc:()=>L,aA:()=>t,G2:()=>F,yn:()=>w,j4:()=>N,Wj:()=>s});var d=c(21124),e=c(38301),f=c(96197),g=c(60521),h=c(7240),i=c(71322),j=c(99511),k=c(31296),l=c(78530),m=c(72338),n=c(40850),o=c(95938);let p={unreachable:"no connection",down:"GitHub down",expired:"token expired",unauthorized:"token refused",forbidden:"not granted",ratelimited:"rate limit",timeout:"no answer",moved:"remote moved","past-ceiling":"past the scan limit"},q=Object.fromEntries(Object.keys(p).map(a=>[a,`GitHub not checked (${p[a]})`]));var r=c(80891);function s(a){let b=(0,l.kj)();(0,l.cO)();let[c,f]=(0,e.useState)(null),[g,h]=(0,e.useState)(null),i=(0,l.Je)(),j=a=>{h(a),setTimeout(()=>h(b=>b===a?null:b),4500)},m=async(c,d,e,f)=>{let g=await a.doIgnore(c,d,e,f);j(g.ok?i((0,n.ph)("toast.ignored",k.UI.radar.ignoredToast,e)):g.message??b("common.somethingWrong",k.UI.common.somethingWrong))},o=(0,d.jsxs)(d.Fragment,{children:[g&&(0,d.jsx)("div",{className:"toast",role:"status",children:g}),c&&(0,d.jsx)("div",{className:"confirm-overlay",role:"dialog","aria-modal":"true",children:(0,d.jsxs)("div",{className:"confirm",children:[(0,d.jsx)("p",{children:c.message}),(0,d.jsxs)("div",{className:"setup-actions",children:[(0,d.jsx)("button",{className:"b",onClick:()=>{m(c.id,c.kind,c.label,c.snapshot),f(null)},children:b("act.ignoreIt",k.UI.radar.ignoreIt)}),(0,d.jsx)("button",{className:"b accent",onClick:()=>f(null),children:b("act.keepWatching",k.UI.radar.keepWatching)})]})]})})]});return{requestIgnore:(a,b,c,d,e,g)=>{d?f({id:a,kind:b,label:c,message:e,snapshot:g}):m(a,b,c,g)},ignoreThen:m,showToast:j,overlays:o}}function t({view:a,onChange:b}){return(0,d.jsx)(j.fn,{view:a,onChange:b})}function u({value:a,onChange:b,showLabel:c=k.UI.common.show,hideLabel:e=k.UI.common.collapse,showKey:f="btn.show",hideKey:g="btn.collapse"}){return(0,d.jsx)("button",{className:"collapse","aria-expanded":!a,onClick:()=>b(!a),children:a?(0,d.jsx)(l.T,{k:f,en:c}):(0,d.jsx)(l.T,{k:g,en:e})})}function v({pinned:a,onPin:b,onIgnore:c}){let e=(0,l.kj)(),f=(0,l.cO)();return(0,d.jsx)(j.ob,{actions:[{label:a?e("act.unpin",k.UI.radar.unpin):e("act.pin",k.UI.radar.pinLabel),title:f.pin,onClick:b,effect:a?e("eff.unpin",k.UI.radar.effUnpin):e("eff.pin",k.UI.radar.effPin)},{label:e("act.ignore",k.UI.radar.ignoreLabel),title:f.ignore,onClick:c,effect:e("eff.ignore",k.UI.radar.effIgnore)}]})}let w=a=>a.path.toLowerCase();function x(a){if(!a)return null;let b=new Date(a).getTime();if(!Number.isFinite(b))return null;let c=Date.now()-b;return c<0?null:Math.floor(c/864e5)}function y({p:a,tone:b,cockpit:c}){let e=(0,l.kj)(),i=null!==b&&"clean"!==b,j=(0,l.cO)(),n=x(a.lastActivity),o=c.isDupe(a.name)&&("dormant"===a.staleness||"forgotten"===a.staleness)?(0,g.ih)(a,c.projects):null,p=o&&"unproven"!==o.kind?o.others:[],q=p.length>0?p.map(a=>(0,h.oV)(a.path,26)).join(", "):null,s=null!==q,t=[];return a.changedTotal>0&&t.push((0,d.jsxs)("b",{...(0,r.uN)(j.unsaved),children:[a.changedTotal," unsaved"]},"u")),a.deleted>0&&t.push((0,d.jsxs)("b",{...(0,r.uN)(j.deleted),children:[a.deleted," deleted"]},"del")),(a.ahead??0)>0&&t.push(a.uncommitted>0?(0,d.jsxs)("span",{...(0,r.uN)(j.unpushed),children:[a.ahead," unpushed"]},"a"):(0,d.jsxs)("b",{...(0,r.uN)(j.unpushed),children:[a.ahead," unpushed"]},"a")),(0,g.ze)(a)&&t.push((0,d.jsx)("b",{...(0,r.uN)(j.onlyHere),children:"only on this machine"},"nr")),a.isGit||a.looksDownloaded||t.push((0,d.jsx)("span",{...(0,r.uN)(j.noHistory),children:"no git history"},"ng")),s&&0===a.uncommitted&&null!==n&&t.push((0,d.jsxs)("span",{...(0,r.uN)(j.dormant),children:["dormant ",n,"d"]},"d")),q&&o?.kind==="duplicate"?t.push((0,d.jsxs)("span",{...(0,r.uN)(j.duplicate),children:["duplicate of ",q]},"dup")):q&&o?.kind==="sharesName"&&t.push((0,d.jsxs)("span",{...(0,r.uN)(j.sharesName),children:["shares a name with ",q]},"dup")),null===b?t.push((0,d.jsx)("span",{className:"dim-t",children:(0,d.jsx)(m.hI,{children:e("common.checking",k.UI.common.checking)})},"chk")):i||t.push((0,d.jsx)("span",{className:"okw",...(0,r.uN)(j.clean),children:"clean ✓"},"ok")),a.looksDownloaded?t.push((0,d.jsx)("span",{...(0,r.uN)(j.downloadedCopy),children:"looks downloaded"},"dl")):a.lastActivity&&!(s&&0===a.uncommitted)&&t.push((0,d.jsxs)("span",{children:[a.lastCommit?i?"last commit ":"committed ":"touched ",(0,d.jsx)(f.fV,{ts:a.lastActivity})]},"t")),(0,d.jsx)("div",{className:"c-fact",children:t.map((a,b)=>(0,d.jsxs)("span",{children:[b>0&&" \xb7 ",a]},b))})}function z(a,b=(a,b)=>b){return[w(a),"project",a.name,(0,g.ze)(a),b("confirm.projectShort",k.UI.radar.confirmProjectShort),{uncommitted:a.uncommitted,hasRemote:a.hasRemote}]}function A({p:a,cockpit:b}){let c=(0,e.useContext)(f.vC),h=(0,l.kj)(),i=(0,l.cO)(),j=(b.cfg?.roots??[]).find(b=>b.toLowerCase()===w(a));return(0,d.jsxs)(d.Fragment,{children:[a.looksDownloaded?(0,d.jsx)("span",{children:"Looks like something downloaded rather than something you wrote."}):(0,g.ze)(a)?(0,d.jsx)("span",{children:"No remote copy exists - one disk failure and it's gone."}):a.hasRemote?(0,d.jsxs)("span",{...(0,r.uN)(i.remote),children:["Backed up to a remote ✓",(a.ahead??0)>0&&(0,d.jsxs)(d.Fragment,{children:[" - ",a.ahead," commit",1===a.ahead?"":"s"," not pushed yet"]})]}):null,c&&a.isGit&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("span",{className:"mono",children:["branch ",a.branch??"-"," \xb7 remote ",a.remoteUrl??a.remoteName??"-",null!=a.ahead&&null!=a.behind&&(0,d.jsxs)(d.Fragment,{children:[" \xb7 ",a.ahead," ahead / ",a.behind," behind"]}),null!=a.commitCount&&(0,d.jsxs)(d.Fragment,{children:[" \xb7 ",a.commitCount," commits"]})]}),a.dirtyFiles.length>0&&(0,d.jsxs)("span",{className:"mono",children:["changed: ",a.dirtyFiles.join(", "),a.changedTotal>a.dirtyFiles.length?` … +${a.changedTotal-a.dirtyFiles.length} more`:""]}),a.deletedFiles.length>0&&(0,d.jsxs)("span",{className:"mono",children:["deleted: ",a.deletedFiles.join(", "),a.deleted>a.deletedFiles.length?` … +${a.deleted-a.deletedFiles.length} more`:""]})]}),c&&(0,d.jsx)("span",{className:"mono",children:a.path}),j&&(0,d.jsx)("button",{className:"b danger",style:{justifySelf:"start"},...(0,r.uN)(i.unwatch),onClick:()=>b.post({action:"removeRoot",path:j}).then(a=>{a.ok&&b.resolveRow(j)}),children:h("act.stopWatchingFolder",k.UI.radar.stopWatchingFolder)})]})}function B({p:a,tone:b,cockpit:c,change:e,open:f,onToggle:g,onIgnoreRequest:j,onToast:m}){let n=null!==b&&"clean"!==b,o=c.isPinned(w(a)),p=(0,l.kj)();return(0,l.cO)(),(0,d.jsxs)("div",{[i.J6]:w(a),className:`card${n?" warn":""}${o?" pinned":""}`,children:[(0,d.jsxs)("div",{className:"c-top",children:[(0,d.jsx)("span",{className:`dot ${null===b?"u":n?"a":"g"}`,"aria-hidden":!0}),(0,d.jsx)("b",{children:a.name}),e&&(0,d.jsx)("span",{className:"chg",children:e})]}),(0,d.jsx)(y,{p:a,tone:b,cockpit:c}),(0,d.jsx)(D,{p:a,cockpit:c}),(0,d.jsx)("div",{className:"c-path",children:(0,h.oV)(a.path,40)}),(0,d.jsxs)("div",{className:"c-foot",children:[(0,d.jsx)("button",{className:"b2 q",onClick:g,"aria-expanded":f,children:f?(0,d.jsx)(l.T,{k:"btn.hide",en:k.UI.common.hide}):(0,d.jsx)(l.T,{k:"btn.details",en:k.UI.common.details})}),!c.demo&&(0,d.jsx)(i.Fb,{cockpit:c,project:a,onToast:m,link:!0}),!c.demo&&(0,d.jsx)(i.r8,{path:a.path}),(0,d.jsx)(v,{pinned:o,onPin:()=>c.togglePin(w(a)),onIgnore:()=>j(...z(a,p))})]}),f&&(0,d.jsx)("div",{className:"c-detail",children:(0,d.jsx)(A,{p:a,cockpit:c})})]})}function C({p:a,tone:b,cockpit:c,change:e,open:f,onToggle:g,onIgnoreRequest:j}){let k=null!==b&&"clean"!==b,m=c.isPinned(w(a)),n=c.isDupe(a.name),o=(0,l.kj)();return(0,l.cO)(),(0,d.jsxs)("div",{[i.J6]:w(a),className:`irow${k?" warn":""}`,children:[(0,d.jsxs)("div",{className:"irow-line",children:[(0,d.jsxs)("button",{className:"irow-main",onClick:g,"aria-expanded":f,children:[(0,d.jsx)("span",{className:`dot ${null===b?"u":k?"a":"g"}`,"aria-hidden":!0}),(0,d.jsxs)("span",{className:"irow-name",children:[a.name,n&&(0,d.jsxs)("span",{className:"irow-parent",children:[" (",function(a){let b=a.split(/[\\/]/).filter(Boolean);return b.length>1?b[b.length-2]:a}(a.path),")"]})]}),e&&(0,d.jsx)("span",{className:"chg",children:e}),(0,d.jsx)("span",{className:`irow-truth${k?" warn":""}`,children:(0,d.jsx)(E,{p:a,tone:b,cockpit:c})}),(0,d.jsx)("span",{className:"irow-path",children:(0,h.oV)(a.path,40)})]}),(0,d.jsx)(D,{p:a,cockpit:c}),(0,d.jsxs)("span",{className:"qk",children:[!c.demo&&(0,d.jsx)(i.r8,{path:a.path}),(0,d.jsx)(v,{pinned:m,onPin:()=>c.togglePin(w(a)),onIgnore:()=>j(...z(a,o))})]})]}),f&&(0,d.jsx)("div",{className:"irow-detail",children:(0,d.jsx)(A,{p:a,cockpit:c})})]})}function D({p:a,cockpit:b}){var c;let e=(0,l.kj)(),g=b.radar?.github??null;if(!g)return null;let h=(c=a.path,g?g.byPath[c.toLowerCase()]??null:null),i=function(a){if(!a)return null;let b=/[/@]github\.com[:/]+([^/]+)\/([^/]+?)(?:\.git)?\/?$/.exec(a);return b?`${b[1]}/${b[2]}`:null}(a.remoteUrl),j=i?(0,d.jsxs)("span",{className:"gh-prov",children:[(0,d.jsx)(o.En,{children:i}),h?.ok?(0,d.jsxs)(d.Fragment,{children:[" \xb7 ",e("connections.ghCardChecked",k.UI.connections.ghCardChecked)," ",(0,d.jsx)(f.fV,{ts:g.at})]}):h?null:(0,d.jsxs)(d.Fragment,{children:[" \xb7 ",e("connections.ghCardNever",k.UI.connections.ghCardNever)]})]}):null;if(!h)return g.outage?(0,d.jsxs)("span",{className:"gh-chips",children:[j,(0,d.jsx)(o.En,{children:(0,d.jsx)("span",{className:"chip plain",children:"GitHub not checked yet"})})]}):null;if(!h.ok)return(0,d.jsxs)("span",{className:"gh-chips",children:[j,(0,d.jsx)(o.En,{children:(0,d.jsx)("span",{className:"chip plain",children:q[h.kind]})})]});let m=h.value,n=[];if(m.ci.ok&&m.ci.value){let a=m.ci.value,b="passing"===a.state?"calm":"failing"===a.state?"bad":"plain",c="passing"===a.state?"✓":"failing"===a.state?"✗":"\xb7";n.push((0,d.jsxs)("span",{className:`chip ${b}`,children:["CI ",c," ",a.branch]},"ci"))}else{let a;m.ci.ok||n.push((0,d.jsx)("span",{className:"chip plain",children:(a=m.ci.kind,`CI not checked (${p[a]})`)},"ci"))}if(m.prCount.ok&&m.prCount.value>0){let a=m.prCount.value;n.push((0,d.jsxs)("span",{className:"chip plain",children:[a,m.prCapped?"+":""," PR",1!==a||m.prCapped?"s":""]},"pr"))}if(m.issueCount.ok&&m.issueCount.value>0){let a=m.issueCount.value;n.push((0,d.jsxs)("span",{className:"chip plain",children:[a," issue",1===a?"":"s"]},"is"))}return("confirmed"===m.backup.verdict&&n.push((0,d.jsx)("span",{className:"chip calm",...(0,r.uN)("af360 asked GitHub, and GitHub has this exact commit"),children:"GitHub confirms"},"bk")),0===n.length)?j?(0,d.jsx)("span",{className:"gh-chips",children:j}):null:(0,d.jsxs)("span",{className:"gh-chips",children:[j,(0,d.jsx)(o.En,{children:n})]})}function E({p:a,tone:b,cockpit:c}){let e=(0,l.cO)(),h=c.isDupe(a.name)&&("dormant"===a.staleness||"forgotten"===a.staleness)?(0,g.ih)(a,c.projects):null,i=h?.kind==="duplicate",j=x(a.lastActivity);return a.looksDownloaded?(0,d.jsx)("span",{...(0,r.uN)(e.downloadedCopy),children:"looks downloaded"}):a.uncommitted>0?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("span",{...(0,r.uN)(e.unsaved),children:[a.uncommitted," unsaved"]})," \xb7 last commit ",a.lastActivity?(0,d.jsx)(f.fV,{ts:a.lastActivity}):"never"]}):(0,g.ze)(a)?(0,d.jsx)("span",{...(0,r.uN)(e.onlyHere),children:"only on this machine"}):(a.ahead??0)>0?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("span",{...(0,r.uN)(e.unpushed),children:[a.ahead," unpushed"]})," \xb7 committed ",a.lastActivity?(0,d.jsx)(f.fV,{ts:a.lastActivity}):"-"]}):"clean"!==b&&i&&null!==j?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("span",{...(0,r.uN)(e.dormant),children:["dormant ",j,"d"]})," \xb7 ",(0,d.jsx)("span",{...(0,r.uN)(e.duplicate),children:"duplicate"})]}):a.lastActivity?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("span",{...(0,r.uN)(e.clean),children:"clean ✓"})," \xb7 committed ",(0,d.jsx)(f.fV,{ts:a.lastActivity})]}):(0,d.jsx)("span",{...(0,r.uN)(e.noHistory),children:"no history"})}function F(a,b){return a.find(a=>a.subjectId===b)??null}function G(a){let b=a.entry.label||P(a.entry.url),c=!!a.current&&!a.current.ok;return[a.entry.id,"url",b,c,k.UI.radar.confirmSite,{down:c}]}function H({u:a,incident:b}){let c=(0,e.useContext)(f.vC),g=(0,l.kj)();(0,l.cO)();let h=a.current;if(!h)return(0,d.jsx)("span",{children:(0,d.jsx)(m.hI,{children:g("site.firstCheck",k.UI.radar.firstCheck)})});if("dependency"===a.entry.role)return(0,d.jsxs)("span",{children:[h.ok?g("site.depAnswered",k.UI.radar.depAnswered):g("site.depNoAnswer",k.UI.radar.depNoAnswer)," ",(0,d.jsx)(f.fV,{ts:h.ts})]});if(!h.ok)return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("b",{children:Q(a.sinceText)}),c&&h.status?` \xb7 HTTP ${h.status}`:"",b?.acknowledged?" \xb7 being handled ✓":""]});let i=Q(a.sinceText).replace(/^up for /,"up "),j=b?.endedTs?(0,d.jsxs)(d.Fragment,{children:["last incident ",(0,d.jsx)(f.fV,{ts:b.endedTs})]}):(0,d.jsx)(d.Fragment,{children:"no incidents while watching"});return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("span",{className:"okw",children:i})," \xb7 ","number"==typeof h.ms?`${h.ms} ms`:"-",c&&h.status?` \xb7 HTTP ${h.status}`:""," \xb7 ",j]})}function I({u:a,cockpit:b}){let c=a.current,e=P(a.entry.url),f=b.expiry?.items.find(a=>"ssl"===a.kind&&a.name===e),g=Object.entries(c?.headers??{}),h=["strict-transport-security","content-security-policy"].filter(a=>!(c?.headers??{})[a]);return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("span",{className:"mono",children:["HTTP ",c?.status??"-"," \xb7 total ","number"==typeof c?.ms?`${c.ms} ms`:"-"," \xb7 checked ",c?new Date(c.ts).toLocaleTimeString():"-"]}),f&&(0,d.jsxs)("span",{className:"mono",children:["cert: ",f.issuer??"unknown issuer",f.serial?` \xb7 serial ${f.serial}`:""]}),g.length>0&&(0,d.jsxs)("span",{className:"mono",children:["headers: ",g.map(([a,b])=>`${a}: ${b}`).join(" \xb7 ")]}),h.length>0&&(0,d.jsxs)("span",{className:"mono",children:["missing: ",h.join(", ")]})]})}function J({u:a,cockpit:b,incident:c}){let g=(0,l.kj)(),h=(0,l.cO)(),i=(0,e.useContext)(f.vC);return(0,d.jsxs)(d.Fragment,{children:[c&&!c.endedTs&&(0,d.jsxs)("span",{children:["Ongoing: down since ",(0,d.jsx)(f.fV,{ts:c.startedTs,skewForm:"core"}),c.acknowledged?" \xb7 being handled ✓":""]}),i&&(0,d.jsx)(I,{u:a,cockpit:b}),(0,d.jsx)("a",{href:a.entry.url,target:"_blank",rel:"noreferrer",children:a.entry.url}),(0,d.jsx)("button",{className:"b danger",style:{justifySelf:"start"},...(0,r.uN)(h.unwatch),onClick:()=>b.post({action:"removeUrl",id:a.entry.id}).then(c=>{c.ok&&b.resolveRow(a.entry.id)}),children:g("act.stopWatchingSite",k.UI.radar.stopWatchingSite)})]})}function K({u:a,tone:b,cockpit:c,incident:e,open:f,onToggle:g,onIgnoreRequest:j,extra:m}){let n=a.current,o="red"===b;(0,l.kj)(),(0,l.cO)();let p=c.isPinned(a.entry.id),q=a.entry.label||P(a.entry.url);return(0,d.jsxs)("div",{className:`card site${o?" bad":""}${p?" pinned":""}`,children:[(0,d.jsxs)("div",{children:[(0,d.jsxs)("div",{className:"c-top",children:[(0,d.jsx)("span",{className:`dot ${null===b||!n||"dependency"===a.entry.role?"u":o?"r":"g"}`,"aria-hidden":!0}),(0,d.jsx)("b",{children:q})]}),(0,d.jsx)("div",{className:"c-fact",children:(0,d.jsx)(H,{u:a,incident:e})}),(0,d.jsx)("div",{className:"c-path",children:(0,h.oV)(a.entry.url,44)}),(0,d.jsxs)("div",{className:"c-foot",children:[(0,d.jsx)("button",{className:"b2 q",onClick:g,"aria-expanded":f,children:f?(0,d.jsx)(l.T,{k:"btn.hide",en:k.UI.common.hide}):(0,d.jsx)(l.T,{k:"btn.details",en:k.UI.common.details})}),(0,d.jsx)(i.r8,{path:a.entry.url,label:k.UI.radar.copyAddress,labelKey:"btn.copyAddress"}),(0,d.jsx)(v,{pinned:p,onPin:()=>c.togglePin(a.entry.id),onIgnore:()=>j(...G(a))}),m]})]}),(0,d.jsx)(M,{history:a.history}),f&&(0,d.jsx)("div",{className:"c-detail",style:{gridColumn:"1 / -1"},children:(0,d.jsx)(J,{u:a,cockpit:c,incident:e})})]})}function L({u:a,tone:b,cockpit:c,incident:e,open:f,onToggle:g,onIgnoreRequest:j,extra:n}){let o=a.current,p="red"===b,q=(0,l.kj)();(0,l.cO)();let r=c.isPinned(a.entry.id),s=a.entry.label||P(a.entry.url);return(0,d.jsxs)("div",{className:`irow${p?" bad":""}`,children:[(0,d.jsxs)("div",{className:"irow-line",children:[(0,d.jsxs)("button",{className:"irow-main",onClick:g,"aria-expanded":f,children:[(0,d.jsx)("span",{className:`dot ${null===b||!o||"dependency"===a.entry.role?"u":p?"r":"g"}`,"aria-hidden":!0}),(0,d.jsx)("span",{className:"irow-name",children:s}),(0,d.jsx)("span",{className:`irow-truth${p?" bad":""}`,children:o?"dependency"===a.entry.role?(0,d.jsx)(H,{u:a,incident:null}):p?Q(a.sinceText):`${Q(a.sinceText).replace(/^up for /,"up ")} \xb7 ${o.ms} ms`:(0,d.jsx)(m.hI,{children:q("site.firstCheck",k.UI.radar.firstCheck)})}),(0,d.jsx)("span",{className:"irow-path",children:(0,h.oV)(a.entry.url,36)})]}),(0,d.jsxs)("span",{className:"qk",children:[(0,d.jsx)(i.r8,{path:a.entry.url,label:k.UI.radar.copyAddress,labelKey:"btn.copyAddress"}),(0,d.jsx)(v,{pinned:r,onPin:()=>c.togglePin(a.entry.id),onIgnore:()=>j(...G(a))}),n]})]}),f&&(0,d.jsxs)("div",{className:"irow-detail",children:[(0,d.jsx)("div",{style:{maxInlineSize:260},children:(0,d.jsx)(M,{history:a.history})}),(0,d.jsx)(J,{u:a,cockpit:c,incident:e})]})]})}function M({history:a}){let b=(0,l.kj)();if((0,l.cO)(),a.length<10){let c=a.length>0?Math.round((Date.now()-a[0].ts)/6e4):0,e=c>0?c:0;return(0,d.jsx)("div",{className:"spark",children:(0,d.jsxs)("span",{className:"spark-wait",children:[b("site.historyBuilds",k.UI.radar.historyBuilds),e>0?` \xb7 ${e}m watched`:(0,d.jsx)(m.gy,{})]})})}let c=a.length>40?function(a,b){let c=[];for(let d=0;d<40;d++)c.push(a[Math.round(d*(a.length-1)/(b-1))]);return c}(a,40):a,e=c.filter(a=>a.ok&&"number"==typeof a.ms).map(a=>a.ms),f=Math.max(...e,1),g=Math.min(...e),h=a=>130*a/(c.length-1),i=c.map((a,b)=>a.ok&&"number"==typeof a.ms?`${h(b).toFixed(1)},${(30-(a.ms-g)/Math.max(1,f-g)*20).toFixed(1)}`:null).filter(Boolean);return(0,d.jsxs)("div",{className:"spark",children:[(0,d.jsxs)("svg",{viewBox:"0 0 130 34",preserveAspectRatio:"none",role:"img","aria-label":b("site.sparkAria",k.UI.radar.sparkAria),children:[(0,d.jsx)("polygon",{points:`0,34 ${i.join(" ")} 130,34`,fill:"color-mix(in srgb, var(--ok) 12%, transparent)"}),(0,d.jsx)("polyline",{points:i.join(" "),fill:"none",stroke:"var(--ok)",strokeWidth:"1.5"}),c.map((a,b)=>!a.ok&&(0,d.jsx)("rect",{x:h(b)-1.2,y:29,width:2.4,height:4,fill:"var(--bad)"},b))]}),(0,d.jsxs)("span",{className:"cap",children:["24h \xb7 ",g,"-",f," ms"]})]})}function N(a,b,c,d=[]){let[f,g]=(0,e.useState)(null);return O(()=>{let d=()=>{let d=a.current;if(!d||0===b)return;let e=d.firstElementChild;if(!e)return;let f=getComputedStyle(d),h=f.gridTemplateColumns.split(" ").filter(a=>"none"!==a&&""!==a).length||1,i=parseFloat(f.rowGap)||0,j=parseFloat(f.columnGap)||0,k=e.getBoundingClientRect(),l=k.height+i;if(l<=0)return;let m=(d.getBoundingClientRect().width-(h-1)*j)/h,n=Math.max(1,Math.floor(h/Math.max(1,Math.round((k.width+j)/(m+j))))),o=d.getBoundingClientRect().top,p=Math.min(b,Math.max(1,Math.floor((window.innerHeight-o-c+i)/l))*n);g(a=>a===p?a:p)};d();let e=setTimeout(d,120);return window.addEventListener("resize",d),()=>{clearTimeout(e),window.removeEventListener("resize",d)}},[b,c,...d]),null==f?b:Math.min(f,b)}let O=e.useEffect;function P(a){try{return new URL(a).hostname}catch{return a}}function Q(a){return a.charAt(0).toLowerCase()+a.slice(1)}},99511:(a,b,c)=>{c.d(b,{fn:()=>m,hf:()=>l,ob:()=>k,tU:()=>n});var d=c(21124),e=c(38301),f=c(23312),g=c(31296),h=c(78530),i=c(95938),j=c(80891);function k({actions:a,label:b}){let[c,i]=(0,e.useState)(!1),[k,l]=(0,e.useState)(null),m=(0,e.useRef)(null),n=(0,e.useRef)(null),o=(0,e.useId)(),p=(0,h.kj)(),q=(0,h.cO)();return((0,e.useCallback)(()=>{let a=m.current?.firstElementChild;if(!a)return;let b=a.getBoundingClientRect(),c=n.current?.offsetHeight??0,d=window.innerHeight-b.bottom,e=c>0&&d<c+8&&b.top>d;l({top:e?b.top-c-4:b.bottom+4,end:Math.max(4,window.innerWidth-b.right),flip:e})},[]),0===a.length)?null:(0,d.jsxs)("div",{className:"ovf",ref:m,children:[(0,d.jsxs)("button",{className:"ovf-btn",type:"button","aria-haspopup":"menu","aria-expanded":c,"aria-controls":o,...(0,j.uN)(q.moreActions),onClick:()=>i(a=>!a),children:[(0,d.jsx)(h.T,{k:"btn.more",en:b??g.UI.radar.moreActions})," ",(0,d.jsx)("span",{"aria-hidden":!0,children:"▾"})]}),c&&"undefined"!=typeof document&&(0,f.createPortal)((0,d.jsx)("div",{className:"ovf-menu",id:o,role:"menu",ref:n,"aria-label":p("act.moreAria",g.UI.radar.moreActionsAria),style:k?{insetBlockStart:k.top,insetInlineEnd:k.end}:{visibility:"hidden"},children:a.map(a=>(0,d.jsxs)("button",{role:"menuitem",type:"button",...(0,j.uN)(a.title),className:a.danger?"danger":void 0,onClick:()=>{i(!1),a.onClick()},children:[a.label,a.effect&&(0,d.jsx)("span",{children:a.effect})]},a.label))}),document.body)]})}function l({done:a,total:b,working:c}){let e=(0,h.kj)();(0,h.cO)();let f="ar"===(0,h.uU)();return b>0&&a<b?(0,d.jsxs)("div",{className:"streamline",role:"status","aria-live":"polite",children:[(0,d.jsx)("i",{"aria-hidden":!0}),f?(0,d.jsxs)(d.Fragment,{children:[e("stream.countingLead","")," ",(0,d.jsx)(i.V,{n:a})," ",e("stream.countingMid","")," ",(0,d.jsx)(i.V,{n:b})," ",e("stream.countingTail","")]}):g.UI.stream.counting(a,b)]}):c?(0,d.jsxs)("div",{className:"streamline",role:"status","aria-live":"polite",children:[(0,d.jsx)("i",{"aria-hidden":!0}),e("stream.starting",g.UI.stream.starting)]}):null}function m({view:a,onChange:b}){let c=(0,h.kj)();return(0,h.cO)(),(0,d.jsxs)("div",{className:"viewseg",role:"group","aria-label":c("radar.viewAria",g.UI.radar.viewAria),children:[(0,d.jsx)("button",{type:"button",className:"cards"===a?"on":"","aria-pressed":"cards"===a,onClick:()=>b("cards"),children:(0,d.jsx)(h.T,{k:"btn.grid",en:g.UI.radar.viewGrid})}),(0,d.jsx)("button",{type:"button",className:"rows"===a?"on":"","aria-pressed":"rows"===a,onClick:()=>b("rows"),children:(0,d.jsx)(h.T,{k:"btn.rows",en:g.UI.radar.viewRows})})]})}function n({tabs:a,active:b,onChange:c,label:e,vertical:f}){return(0,d.jsx)("div",{className:`tabs${f?" tabs-v":""}`,role:"tablist","aria-orientation":f?"vertical":void 0,"aria-label":e,children:a.map(a=>(0,d.jsxs)("button",{type:"button",role:"tab",id:`tab-${a.id}`,className:a.id===b?"on":"","aria-selected":a.id===b,"aria-controls":`panel-${a.id}`,onClick:()=>c(a.id),children:[a.label,void 0!==a.count&&(0,d.jsx)("span",{className:"tabn",children:a.count})]},a.id))})}}};
@@ -1 +1 @@
1
- "use strict";exports.id=7719,exports.ids=[7719],exports.modules={7719:(a,b,c)=>{c.d(b,{jC:()=>G,eK:()=>E,RF:()=>u,f0:()=>l,KX:()=>r,hE:()=>v});var d=c(29021),e=c(35060),f=c(21820),g=c.n(f),h=c(33873),i=c.n(h),j=c(22191),k=c(35919);function l(a){return"string"==typeof a&&!!a&&a.toLowerCase().split(/[\\/]+/).includes("windowsapps")}c(79551);let m=e.EO;function n(a){if(a.split(/[\\/]/).some(a=>"downloads"===a.toLowerCase()))return!0;let b=i().basename(a);return/-(main|master)$/i.test(b)||/\(\d+\)$/.test(b)||/[-_]v?\d+(\.\d+)+$/i.test(b)}let o=globalThis,p=o.__af360Changes??(o.__af360Changes=new Map);function q(){return Object.fromEntries([...p].map(([a,b])=>[a,b.text]))}function r(a){for(let b of a)p.delete(b.toLowerCase())}let s=new Set(["node_modules",".git",".next","dist","build","out",".venv","venv","__pycache__"]),t=globalThis;function u(a,b){let c=a.toLowerCase();return b.some(a=>{let b=a.toLowerCase().replace(/[\\/]+$/,"");return c===b||c.startsWith(b+"\\")||c.startsWith(b+"/")})}async function v(a,b={}){let c=b.exclude??[],d=a.join("|")+"::x:"+c.join("|"),e=t.__af360Radar,f=Math.min(b.maxAgeMs??864e5,864e5);if(e&&e.key===d&&!b.fresh){let a=Date.now()-e.ts;if(a<3e4||a<f)return{...e.result,changes:q()}}let g=[],h=[];for(let b of a)if(!u(b,c)){if(!await K(b)){g.push(b);continue}await w(b,0,h,c)}let i=(await A(h,4,x)).sort((a,b)=>(b.lastActivity??"").localeCompare(a.lastActivity??""));if(e&&e.key===d){let a=new Map(e.result.projects.map(a=>[a.path.toLowerCase(),a]));for(let b of i){let c=b.path.toLowerCase(),d=a.get(c);if(!d){p.set(c,{text:"New since last look",ts:Date.now()});continue}d.remoteKnown&&b.remoteKnown?!d.hasRemote||b.hasRemote||b.looksDownloaded?!d.hasRemote&&b.hasRemote?((0,j.logEvent)(`${b.name} is now backed up.`,"closed"),p.set(c,{text:"Now backed up ✓",ts:Date.now()})):d.uncommitted!==b.uncommitted&&d.statusKnown&&b.statusKnown&&p.set(c,{text:`Uncommitted changes ${d.uncommitted} → ${b.uncommitted}`,ts:Date.now()}):((0,j.logEvent)(`New risk: ${b.name} isn't backed up anywhere.`),p.set(c,{text:"Lost its remote since last look",ts:Date.now()})):d.uncommitted!==b.uncommitted&&d.statusKnown&&b.statusKnown&&p.set(c,{text:`Uncommitted changes ${d.uncommitted} → ${b.uncommitted}`,ts:Date.now()})}}let k={projects:i,missingRoots:g,scannedAt:Date.now(),changes:q()};return t.__af360Radar={key:d,ts:Date.now(),result:k},a.length>0&&(0,j.logEvent)(`Scanned ${a.length} folder${1===a.length?"":"s"} - found ${i.length} project${1===i.length?"":"s"}.`),k}async function w(a,b,c,e=[]){let f;if(!(u(a,e)||l(a))){if(await I(a))return void c.push(a);if(!(b>=3)){try{f=await d.promises.readdir(a,{withFileTypes:!0})}catch{return}for(let d of f)d.isSymbolicLink()||!d.isDirectory()||d.name.startsWith(".")||s.has(d.name)||await w(i().join(a,d.name),b+1,c,e)}}}async function x(a){let b=await J(a),c=!1,e=0,f=null,g=null,h=null,j=null,l=null,m=null,o=null,p=null,q=[],r=0,s=0,t=[],u=!1,v=!1,w=null,x=!1;if(b){let b=await y(a),d=await z(a);w=d.sha,x=d.known;let[i,n,A,C,D,E]=await Promise.all([B(a,["remote"]),B(a,["status","--porcelain","--branch"]),B(a,["log","-1","--format=%cI"]),B(a,["rev-parse","--abbrev-ref","HEAD"]),B(a,["log","--max-parents=0","-1","--format=%aI"]),B(a,["rev-list","--count","HEAD"])]);u=null!==b,c=null!==b&&b.length>0||!!i,l=b?.[0]?.name??(i?i.split("\n")[0].trim():null),m=b?.[0]?.url??null,l&&!m&&(m=await B(a,["remote","get-url",l]));let F=(0,k.d2)(n);if(F.complete||(F=(0,k.d2)(await B(a,["status","--porcelain","--branch"]))),v=F.complete,F.complete){e=F.entries.length;let a=a=>a.includes("D"),b=F.entries.filter(b=>a(b.xy)),c=F.entries.filter(b=>!a(b.xy));r=b.length,s=c.length,q=c.slice(0,10).map(a=>a.path),t=b.slice(0,10).map(a=>a.path),o=F.ahead,p=F.behind}f=A||null,g=D||null,h=E&&parseInt(E,10)||null,j=C||null}let A=f;if(!A)try{A=(await d.promises.stat(a)).mtime.toISOString()}catch{}return{name:i().basename(a),path:a,isGit:b,hasRemote:c,uncommitted:e,lastCommit:f,firstCommit:g,commitCount:h,lastActivity:A,staleness:A?function(a){let b=(Date.now()-new Date(a).getTime())/864e5;return b<7?"active":b<30?"quiet":b<90?"dormant":"forgotten"}(A):null,looksDownloaded:n(a),remoteKnown:u,statusKnown:v,headSha:w,headShaKnown:x,branch:j,remoteName:l,remoteUrl:m,ahead:o,behind:p,dirtyFiles:q,deleted:r,deletedFiles:t,changedTotal:s}}async function y(a){let b,c=(0,e.hQ)(a);if(null===c)return null;try{b=await d.promises.readFile(i().join(c,"config"),"utf8")}catch{return null}let f=[],g=!1;for(let a of b.split(/\r?\n/)){let b=a.trim();if(b.startsWith("[")){let a=/^\[remote\s+"([^"]+)"\]/.exec(b);g=!!a,a&&f.push({name:a[1],url:null});continue}if(!g||0===f.length)continue;let c=/^url\s*=\s*(.+)$/.exec(b);c&&(f[f.length-1].url=c[1].trim())}return f}async function z(a){let b,c=(0,e.hQ)(a);if(null===c)return{sha:null,known:!1};try{b=await d.promises.readFile(i().join(c,"HEAD"),"utf8")}catch{return{sha:null,known:!1}}let f=a=>/^[0-9a-f]{40}$|^[0-9a-f]{64}$/i.test(a),g=b.trim();if(f(g))return{sha:g.toLowerCase(),known:!0};let h=/^ref:\s*(.+)$/.exec(g);if(!h)return{sha:null,known:!1};let j=h[1].trim();try{let a=(await d.promises.readFile(i().join(c,...j.split("/")),"utf8")).trim();if(f(a))return{sha:a.toLowerCase(),known:!0}}catch{}try{for(let a of(await d.promises.readFile(i().join(c,"packed-refs"),"utf8")).split(/\r?\n/)){let b=a.trim();if(!b||b.startsWith("#")||b.startsWith("^"))continue;let c=b.indexOf(" ");if(!(c<0)&&b.slice(c+1).trim()===j){let a=b.slice(0,c).trim();if(f(a))return{sha:a.toLowerCase(),known:!0}}}return{sha:null,known:!0}}catch{return{sha:null,known:!0}}}async function A(a,b,c){let d=Array(a.length),e=0,f=Array.from({length:Math.min(b,a.length)},async()=>{for(;e<a.length;){let b=e++;d[b]=await c(a[b])}});return await Promise.all(f),d}async function B(a,b){try{let{stdout:c}=await m("git",(0,e.tQ)(b,a),{cwd:a,timeout:8e3,windowsHide:!0,env:(0,e.tl)()});return c.trim()}catch{return null}}let C=new Set([...s,"AppData","Application Data","Program Files","Program Files (x86)","Windows","Library","Music","Pictures","Videos","Saved Games"]),D=["dev","projects","code","src","repos","sites"];async function E(a=[],b=[],c){let d=g().homedir(),e=[d,...["Desktop","Documents","Downloads"].map(a=>i().join(d,a))];for(let a of"CDEFGHIJKLMNOPQRSTUVWXYZ"){let b=`${a}:\\`;if(await K(b))for(let a of D)e.push(i().join(b,a))}let f=new Set(a.map(a=>a.toLowerCase())),h=new Set,k=[],l=[],m=!1,o=[];for(let a of e){if(u(a,b)||!await K(a)||h.has(a.toLowerCase()))continue;if(m){o.push(a);continue}let d=[];await H(a,0,h,d,b);let g=d.filter(a=>!f.has(a.toLowerCase())),j={path:a,found:g.length};l.push(j);let p=g.map(a=>({name:i().basename(a),path:a,looksDownloaded:n(a)}));if(k.push(...p),c)try{c({place:j,found:p,placesDone:l.length,placesPlanned:e.length})}catch{}k.length>=100&&(m=!0)}k.sort((a,b)=>Number(a.looksDownloaded)-Number(b.looksDownloaded)),(0,j.logEvent)(`Searched ${l.length} places - found ${k.length} project${1===k.length?"":"s"}.`);let p={candidates:k,places:l,unvisited:o,capped:m,cap:100};return F.__af360Discover={ts:Date.now(),result:p},p}let F=globalThis;function G(){return F.__af360Discover?.result??null}async function H(a,b,c,e,f=[]){let g;if(!(e.length>=100)){try{g=await d.promises.readdir(a,{withFileTypes:!0})}catch{return}for(let d of g){if(e.length>=100)return;if(d.isSymbolicLink()||!d.isDirectory()||d.name.startsWith(".")||C.has(d.name))continue;let g=i().join(a,d.name);if(u(g,f))continue;let h=g.toLowerCase();if(!c.has(h)){if(await I(g)){c.add(h),e.push(g);continue}b+1<3&&await H(g,b+1,c,e,f)}}}}async function I(a){return await J(a)||await L(i().join(a,"package.json"))}async function J(a){let b=i().join(a,".git");return await K(b)||await L(b)}async function K(a){try{return(await d.promises.stat(a)).isDirectory()}catch{return!1}}async function L(a){try{return(await d.promises.stat(a)).isFile()}catch{return!1}}}};
1
+ "use strict";exports.id=7719,exports.ids=[7719],exports.modules={7719:(a,b,c)=>{c.d(b,{jC:()=>J,eK:()=>H,RF:()=>w,f0:()=>m,KX:()=>s,hE:()=>x});var d=c(29021),e=c(35060),f=c(21820),g=c.n(f),h=c(33873),i=c.n(h),j=c(22191),k=c(35919),l=c(92328);function m(a){return"string"==typeof a&&!!a&&a.toLowerCase().split(/[\\/]+/).includes("windowsapps")}c(79551);let n=e.EO;function o(a){if(a.split(/[\\/]/).some(a=>"downloads"===a.toLowerCase()))return!0;let b=i().basename(a);return/-(main|master)$/i.test(b)||/\(\d+\)$/.test(b)||/[-_]v?\d+(\.\d+)+$/i.test(b)}let p=globalThis,q=p.__af360Changes??(p.__af360Changes=new Map);function r(){return Object.fromEntries([...q].map(([a,b])=>[a,b.text]))}function s(a){for(let b of a)q.delete(b.toLowerCase())}let t=new Set(["node_modules",".git",".next","dist","build","out",".venv","venv","__pycache__"]),u=globalThis;async function v(a){void 0===u.__af360RadarHeld&&(u.__af360RadarHeld=await (0,l.cO)());let b=u.__af360RadarHeld;return b&&b.key===a?b.result:null}function w(a,b){let c=a.toLowerCase();return b.some(a=>{let b=a.toLowerCase().replace(/[\\/]+$/,"");return c===b||c.startsWith(b+"\\")||c.startsWith(b+"/")})}async function x(a,b={}){let c=b.exclude??[],d=a.join("|")+"::x:"+c.join("|"),e=u.__af360Radar,f=Math.min(b.maxAgeMs??864e5,864e5);if(e&&e.key===d&&!b.fresh){let a=Date.now()-e.ts;if(a<3e4||a<f)return{...e.result,changes:r()}}if(b.allowHeld&&!b.fresh&&!(e&&e.key===d)){let e=await v(d);if(e)return u.__af360RadarBg||(u.__af360RadarBg=x(a,{maxAgeMs:b.maxAgeMs,exclude:c}).catch(()=>null).finally(()=>{u.__af360RadarBg=void 0})),{...e,changes:r(),held:!0}}let g=[],h=[];for(let b of a)if(!w(b,c)){if(!await N(b)){g.push(b);continue}await z(b,0,h,c)}let k=new Set,m=h.filter(a=>{let b=i().resolve(a).toLowerCase().replace(/[\\/]+$/,"");return!k.has(b)&&(k.add(b),!0)}),n=(await D(m,4,A)).sort((a,b)=>(b.lastActivity??"").localeCompare(a.lastActivity??""));if(e&&e.key===d){let a=new Map(e.result.projects.map(a=>[a.path.toLowerCase(),a]));for(let b of n){let c=b.path.toLowerCase(),d=a.get(c);if(!d){q.set(c,{text:"New since last look",ts:Date.now()});continue}d.remoteKnown&&b.remoteKnown?!d.hasRemote||b.hasRemote||b.looksDownloaded?!d.hasRemote&&b.hasRemote?((0,j.logEvent)(`${b.name} is now backed up.`,"closed"),q.set(c,{text:"Now backed up ✓",ts:Date.now()})):d.uncommitted!==b.uncommitted&&d.statusKnown&&b.statusKnown&&q.set(c,{text:`Uncommitted changes ${d.uncommitted} → ${b.uncommitted}`,ts:Date.now()}):((0,j.logEvent)(`New risk: ${b.name} isn't backed up anywhere.`,"change"),q.set(c,{text:"Lost its remote since last look",ts:Date.now()})):d.uncommitted!==b.uncommitted&&d.statusKnown&&b.statusKnown&&q.set(c,{text:`Uncommitted changes ${d.uncommitted} → ${b.uncommitted}`,ts:Date.now()})}}let o=await y(a,n.map(a=>a.path),c),p={projects:n,missingRoots:g,scannedAt:Date.now(),changes:r(),siblings:o};return u.__af360Radar={key:d,ts:Date.now(),result:p},u.__af360RadarHeld={key:d,result:{projects:n,missingRoots:g,scannedAt:p.scannedAt,siblings:o}},(0,l.LX)(d,p),a.length>0&&(0,j.logEvent)(`Scanned ${a.length} folder${1===a.length?"":"s"} - found ${n.length} project${1===n.length?"":"s"}.`,"look"),p}async function y(a,b,c){let e=a=>i().resolve(a).toLowerCase().replace(/[\\/]+$/,""),f=a.map(e),g=new Set([...f,...b.map(e)]),h=(a,b)=>a.startsWith(b+"\\")||a.startsWith(b+"/"),j=new Map;for(let b of a){let a=i().dirname(i().resolve(b));e(a)!==e(b)&&(j.has(e(a))||j.set(e(a),b))}let k=[];for(let[a,b]of j){let j,l=i().dirname(i().resolve(b));if(!(w(l,c)||m(l))){try{j=await d.promises.readdir(l,{withFileTypes:!0})}catch{continue}for(let n of j){if(n.isSymbolicLink()||!n.isDirectory()||n.name.startsWith(".")||t.has(n.name))continue;let j=i().join(l,n.name),o=e(j);if(o===a||g.has(o)||f.some(a=>h(o,a)||h(a,o))||w(j,c)||m(j)||!await L(j))continue;let p=null;try{let a=(await d.promises.stat(j)).birthtimeMs;p=a>0?a:null}catch{}k.push({name:n.name,path:j,createdAt:p,nextTo:b})}}}return k.sort((a,b)=>a.path.localeCompare(b.path))}async function z(a,b,c,e=[]){let f;if(!(w(a,e)||m(a))){if(await L(a))return void c.push(a);if(!(b>=3)){try{f=await d.promises.readdir(a,{withFileTypes:!0})}catch{return}for(let d of f)d.isSymbolicLink()||!d.isDirectory()||d.name.startsWith(".")||t.has(d.name)||await z(i().join(a,d.name),b+1,c,e)}}}async function A(a){let b=await M(a),c=!1,e=0,f=null,g=null,h=null,j=null,l=null,m=null,n=null,p=null,q=[],r=0,s=0,t=[],u=!1,v=!1,w=null,x=!1;if(b){let b=await B(a),d=await C(a);w=d.sha,x=d.known;let[i,o,y,z,A,D]=await Promise.all([E(a,["remote"]),E(a,["status","--porcelain","--branch"]),E(a,["log","-1","--format=%cI"]),E(a,["rev-parse","--abbrev-ref","HEAD"]),E(a,["log","--max-parents=0","-1","--format=%aI"]),E(a,["rev-list","--count","HEAD"])]);u=null!==b,c=null!==b&&b.length>0||!!i,l=b?.[0]?.name??(i?i.split("\n")[0].trim():null),m=b?.[0]?.url??null,l&&!m&&(m=await E(a,["remote","get-url",l]));let F=(0,k.d2)(o);if(F.complete||(F=(0,k.d2)(await E(a,["status","--porcelain","--branch"]))),v=F.complete,F.complete){e=F.entries.length;let a=a=>a.includes("D"),b=F.entries.filter(b=>a(b.xy)),c=F.entries.filter(b=>!a(b.xy));r=b.length,s=c.length,q=c.slice(0,10).map(a=>a.path),t=b.slice(0,10).map(a=>a.path),n=F.ahead,p=F.behind}f=y||null,g=A||null,h=D&&parseInt(D,10)||null,j=z||null}let y=f;if(!y)try{y=(await d.promises.stat(a)).mtime.toISOString()}catch{}return{name:i().basename(a),path:a,isGit:b,hasRemote:c,uncommitted:e,lastCommit:f,firstCommit:g,commitCount:h,lastActivity:y,staleness:y?function(a){let b=(Date.now()-new Date(a).getTime())/864e5;return b<7?"active":b<30?"quiet":b<90?"dormant":"forgotten"}(y):null,looksDownloaded:o(a),remoteKnown:u,statusKnown:v,headSha:w,headShaKnown:x,branch:j,remoteName:l,remoteUrl:m,ahead:n,behind:p,dirtyFiles:q,deleted:r,deletedFiles:t,changedTotal:s}}async function B(a){let b,c=(0,e.hQ)(a);if(null===c)return null;try{b=await d.promises.readFile(i().join(c,"config"),"utf8")}catch{return null}let f=[],g=!1;for(let a of b.split(/\r?\n/)){let b=a.trim();if(b.startsWith("[")){let a=/^\[remote\s+"([^"]+)"\]/.exec(b);g=!!a,a&&f.push({name:a[1],url:null});continue}if(!g||0===f.length)continue;let c=/^url\s*=\s*(.+)$/.exec(b);c&&(f[f.length-1].url=c[1].trim())}return f}async function C(a){let b,c=(0,e.hQ)(a);if(null===c)return{sha:null,known:!1};try{b=await d.promises.readFile(i().join(c,"HEAD"),"utf8")}catch{return{sha:null,known:!1}}let f=a=>/^[0-9a-f]{40}$|^[0-9a-f]{64}$/i.test(a),g=b.trim();if(f(g))return{sha:g.toLowerCase(),known:!0};let h=/^ref:\s*(.+)$/.exec(g);if(!h)return{sha:null,known:!1};let j=h[1].trim();try{let a=(await d.promises.readFile(i().join(c,...j.split("/")),"utf8")).trim();if(f(a))return{sha:a.toLowerCase(),known:!0}}catch{}try{for(let a of(await d.promises.readFile(i().join(c,"packed-refs"),"utf8")).split(/\r?\n/)){let b=a.trim();if(!b||b.startsWith("#")||b.startsWith("^"))continue;let c=b.indexOf(" ");if(!(c<0)&&b.slice(c+1).trim()===j){let a=b.slice(0,c).trim();if(f(a))return{sha:a.toLowerCase(),known:!0}}}return{sha:null,known:!0}}catch{return{sha:null,known:!0}}}async function D(a,b,c){let d=Array(a.length),e=0,f=Array.from({length:Math.min(b,a.length)},async()=>{for(;e<a.length;){let b=e++;d[b]=await c(a[b])}});return await Promise.all(f),d}async function E(a,b){try{let{stdout:c}=await n("git",(0,e.tQ)(b,a),{cwd:a,timeout:8e3,windowsHide:!0,env:(0,e.tl)()});return c.trim()}catch{return null}}let F=new Set([...t,"AppData","Application Data","Program Files","Program Files (x86)","Windows","Library","Music","Pictures","Videos","Saved Games"]),G=["dev","projects","code","src","repos","sites"];async function H(a=[],b=[],c){let d=g().homedir(),e=[d,...["Desktop","Documents","Downloads"].map(a=>i().join(d,a))];for(let a of"CDEFGHIJKLMNOPQRSTUVWXYZ"){let b=`${a}:\\`;if(await N(b))for(let a of G)e.push(i().join(b,a))}let f=new Set(a.map(a=>a.toLowerCase())),h=new Set,k=[],l=[],m=!1,n=[];for(let a of e){if(w(a,b)||!await N(a)||h.has(a.toLowerCase()))continue;if(m){n.push(a);continue}let d=[];await K(a,0,h,d,b);let g=d.filter(a=>!f.has(a.toLowerCase())),j={path:a,found:g.length};l.push(j);let p=g.map(a=>({name:i().basename(a),path:a,looksDownloaded:o(a)}));if(k.push(...p),c)try{c({place:j,found:p,placesDone:l.length,placesPlanned:e.length})}catch{}k.length>=100&&(m=!0)}k.sort((a,b)=>Number(a.looksDownloaded)-Number(b.looksDownloaded)),(0,j.logEvent)(`Searched ${l.length} places - found ${k.length} project${1===k.length?"":"s"}.`,"look");let p={candidates:k,places:l,unvisited:n,capped:m,cap:100};return I.__af360Discover={ts:Date.now(),result:p},p}let I=globalThis;function J(){return I.__af360Discover?.result??null}async function K(a,b,c,e,f=[]){let g;if(!(e.length>=100)){try{g=await d.promises.readdir(a,{withFileTypes:!0})}catch{return}for(let d of g){if(e.length>=100)return;if(d.isSymbolicLink()||!d.isDirectory()||d.name.startsWith(".")||F.has(d.name))continue;let g=i().join(a,d.name);if(w(g,f))continue;let h=g.toLowerCase();if(!c.has(h)){if(await L(g)){c.add(h),e.push(g);continue}b+1<3&&await K(g,b+1,c,e,f)}}}}async function L(a){return await M(a)||await O(i().join(a,"package.json"))}async function M(a){let b=i().join(a,".git");return await N(b)||await O(b)}async function N(a){try{return(await d.promises.stat(a)).isDirectory()}catch{return!1}}async function O(a){try{return(await d.promises.stat(a)).isFile()}catch{return!1}}},92328:(a,b,c)=>{c.d(b,{FG:()=>i,LX:()=>o,cO:()=>n,uy:()=>j});var d=c(79748),e=c(33873),f=c(5731),g=c(1232);let h=e.join(f.lF,"held-look.json");async function i(a=h){try{let c;var b=await (0,d.readFile)(a,"utf8");try{c=JSON.parse(b)}catch{return null}if(!c||"object"!=typeof c||1!==c.v||"number"!=typeof c.at||!Number.isFinite(c.at)||c.at<=0||!Array.isArray(c.insights)||!Array.isArray(c.failed)||!Array.isArray(c.unscanned))return null;for(let a of c.insights)if(!a||"object"!=typeof a||"string"!=typeof a.id||""===a.id||"string"!=typeof a.verdict||""===a.verdict||"string"!=typeof a.cat||""===a.cat)return null;for(let a of c.failed)if("string"!=typeof a)return null;for(let a of c.unscanned)if("string"!=typeof a)return null;return{insights:c.insights,failed:c.failed,unscanned:c.unscanned,at:c.at}}catch{return null}}async function j(a,b=h){a&&"number"==typeof a.at&&await k(b,JSON.stringify({v:1,at:a.at,insights:a.insights,failed:a.failed,unscanned:a.unscanned})+"\n")}async function k(a,b){let c=`${a}.${process.pid}.tmp`;try{await (0,d.writeFile)(c,b,"utf8"),await (0,d.rename)(c,a)}catch{try{await (0,d.unlink)(c)}catch{}}}let l=e.join(f.lF,"held-radar.json"),m=a=>"string"==typeof a?(0,g.dK)(a):a;async function n(a=l){try{return function(a){let b;try{b=JSON.parse(a)}catch{return null}if(!b||"object"!=typeof b||1!==b.v||"string"!=typeof b.key)return null;let c=b.result;if(!c||"object"!=typeof c||"number"!=typeof c.scannedAt||!Number.isFinite(c.scannedAt)||c.scannedAt<=0||!Array.isArray(c.projects)||!Array.isArray(c.missingRoots))return null;for(let a of c.projects)if(!a||"string"!=typeof a.path||"string"!=typeof a.name)return null;let d=new Set;for(let a of c.projects){let b=a.path.toLowerCase().replace(/[\\/]+$/,"");if(d.has(b))return null;d.add(b)}for(let a of c.missingRoots)if("string"!=typeof a)return null;let e=Array.isArray(c.siblings)?c.siblings:[];for(let a of e)if(!a||"string"!=typeof a.path||"string"!=typeof a.name)return null;return{key:b.key,result:{projects:c.projects,missingRoots:c.missingRoots,scannedAt:c.scannedAt,siblings:e}}}(await (0,d.readFile)(a,"utf8"))}catch{return null}}async function o(a,b,c=l){if("string"!=typeof a||!b||"number"!=typeof b.scannedAt)return;let d=(b.projects??[]).map(a=>({...a,remoteUrl:m(a.remoteUrl),branch:m(a.branch),dirtyFiles:Array.isArray(a.dirtyFiles)?a.dirtyFiles.map(m):a.dirtyFiles,deletedFiles:Array.isArray(a.deletedFiles)?a.deletedFiles.map(m):a.deletedFiles}));await k(c,JSON.stringify({v:1,key:a,result:{projects:d,missingRoots:b.missingRoots??[],scannedAt:b.scannedAt,siblings:b.siblings??[]}})+"\n")}}};
@@ -1 +1 @@
1
- "use strict";exports.id=8150,exports.ids=[6995,8150],exports.modules={1232:(a,b,c)=>{c.d(b,{dK:()=>e,fI:()=>function a(b,c=0){if("string"==typeof b)return e(b);if(null===b||"object"!=typeof b)return b;if(c>=12)return"[too deeply nested for af360 to mask - not shown]";if(Array.isArray(b))return b.map(b=>a(b,c+1));let d={};for(let[f,g]of Object.entries(b))d[e(f)]=a(g,c+1);return d}});let d="[secret masked]";function e(a){let b=a;return(b=(b=(b=(b=(b=(b=(b=(b=(b=b.replace(/-----BEGIN [A-Z ]*PRIVATE KEY-----[\s\S]*?-----END [A-Z ]*PRIVATE KEY-----/g,d)).replace(/\b([A-Za-z0-9_.-]*(?:SECRET|TOKEN|PASSWORD|PASSWD|API[_-]?KEY|APIKEY|ACCESS[_-]?KEY|PRIVATE[_-]?KEY|CLIENT[_-]?SECRET|AUTH|CREDENTIAL|[A-Z0-9]_KEY|^KEY)[A-Za-z0-9_.-]*)(\s*[:=]\s*)(["'`]?)([^\s"'`,;]{4,})\3/gi,(a,b,c)=>`${b}${c}${d}`)).replace(/\b([A-Za-z0-9_.-]*(?:URL|URI|DSN|CONN)[A-Za-z0-9_.-]*)(\s*[:=]\s*)(["'`]?)([^\s"'`,;]{4,})\3/gi,(a,b,c)=>/[A-Za-z]/.test(b)&&(b.includes("_")||b===b.toUpperCase())?`${b}${c}${d}`:a)).replace(/\b([A-Za-z][A-Za-z0-9+.-]*):\/\/([^\s/:@]{1,128}):([^\s/@]{1,256})@/g,(a,b,c)=>`${b}://${c}:${d}@`).replace(/(^|[\s(<'"`=,])([A-Za-z0-9._%+-]{1,64}):([^\s:@/\\]{4,128})@((?:[A-Za-z0-9-]+\.)+[A-Za-z]{2,}|\d{1,3}(?:\.\d{1,3}){3}|localhost)(?=[:/?\s'"`)>,]|$)/g,(a,b,c,e,f)=>`${b}${c}:${d}@${f}`)).replace(/gh[pousr]_[A-Za-z0-9]{16,}|github_pat_[A-Za-z0-9_]{20,}/g,d)).replace(/(?<![A-Za-z0-9])(AKIA[0-9A-Z]{12,}|ASIA[0-9A-Z]{12,}|sk_(?:live|test)_[0-9A-Za-z]{10,}|rk_(?:live|test)_[0-9A-Za-z]{10,}|pk_live_[0-9A-Za-z]{10,}|glpat-[A-Za-z0-9_-]{16,}|AIza[0-9A-Za-z_-]{30,}|ya29\.[0-9A-Za-z_-]{20,}|xox[baprs]-[0-9A-Za-z-]{8,}|npm_[A-Za-z0-9]{30,}|dop_v1_[a-f0-9]{40,}|SG\.[A-Za-z0-9_-]{20,}\.[A-Za-z0-9_-]{20,}|hf_[A-Za-z0-9]{30,}|sk-ant-[A-Za-z0-9_-]{20,}|sk-[A-Za-z0-9]{32,})(?![A-Za-z0-9])/g,d)).replace(/\b(bearer|basic)\s+[A-Za-z0-9._~+/=-]{12,}/gi,(a,b)=>`${b} ${d}`)).replace(/(?<![A-Za-z0-9])eyJ[A-Za-z0-9_-]{8,}\.[A-Za-z0-9_-]{8,}\.[A-Za-z0-9_-]{8,}(?![A-Za-z0-9])/g,d)).replace(/(?<![A-Za-z0-9])[0-9a-f]{32,}(?![A-Za-z0-9])/gi,d)).replace(/(?<![A-Za-z0-9])[A-Za-z0-9+/]{40,}={0,2}(?![A-Za-z0-9+/=])/g,d)}},4683:(a,b,c)=>{c.d(b,{APP_CONFIGURED:()=>h,II:()=>k,f2:()=>l,Zd:()=>t,Re:()=>s});var d=c(73024),e=c(76760);let f=["githubClientId"],g=process.env.AF360_GITHUB_CLIENT_ID??function(){let a=function(){let a,b;try{a=(0,d.readFileSync)(function(){let a=process.env.AF360_APP_IDENTITY;return a||e.join(void 0,"app-identity.json")}(),"utf8")}catch{return{ok:!1,reason:"af360 could not read its own app identity file"}}try{b=JSON.parse(a)}catch{return{ok:!1,reason:"af360's app identity file is not readable JSON"}}if(!b||"object"!=typeof b||Array.isArray(b))return{ok:!1,reason:"af360's app identity file is not a JSON object"};let c=Object.keys(b).filter(a=>!f.includes(a));if(c.length>0)return{ok:!1,reason:`af360's app identity file carries a key that may not ship: ${c.join(", ")}`};let g=b.githubClientId;return"string"!=typeof g||0===g.length?{ok:!1,reason:"af360's app identity file carries no GitHub client id"}:{ok:!0,githubClientId:g}}();return a.ok&&a.githubClientId?a.githubClientId:"REPLACE_WITH_APP_CLIENT_ID"}(),h=!g.startsWith("REPLACE_WITH"),i="https://github.com",j=`${i}/login/device`,k=process.env.AF360_GITHUB_APP_SLUG??"af360-app",l=Object.freeze({arrived:"GitHub's answer arrived on this machine",declined:"you declined the authorization on GitHub - nothing was stored",refused:"GitHub refused the authorization - nothing was stored",expired:"the sign-in code expired before it was used, so af360 stopped asking - nothing was stored",cancelled:"you cancelled the authorization in af360 - nothing was stored",issued:"GitHub issued a sign-in code and af360 is waiting for you to enter it","slow-down":"GitHub asked af360 to check less often, and af360 slowed down"});Object.freeze(["issued","slow-down"]);let m=Object.freeze({expired_token:"that sign-in code had expired before it was used - press Connect to get a fresh one",access_denied:"the sign-in was declined on GitHub, so nothing was stored",incorrect_device_code:"GitHub did not recognise this sign-in attempt, so nothing was stored - press Connect to start a fresh one",unsupported_grant_type:"GitHub would not accept the way af360 asked, so nothing was stored - this is af360's own registration and not something to fix here",device_flow_disabled:"GitHub says device sign-in is turned off for af360, so nothing was stored - this is af360's own registration and not something to fix here",incorrect_client_credentials:"GitHub did not recognise af360 itself, so nothing was stored - this is af360's own registration and not something to fix here",unverified_user_email:"GitHub needs a verified email address on your account before it will complete this"});function n(a){return m[a]??"GitHub refused to complete the sign-in, so nothing was stored - press Connect to try again"}let o=Object.freeze({access_denied:"declined",expired_token:"expired"});async function p(a,b){let c=new AbortController,d=setTimeout(()=>c.abort(),15e3);try{return await q(a,b,c)}finally{clearTimeout(d)}}async function q(a,b,c){let d,e;try{d=await fetch(`${i}${a}`,{method:"POST",signal:c.signal,redirect:"error",headers:{accept:"application/json","content-type":"application/x-www-form-urlencoded","user-agent":"af360"},body:new URLSearchParams(b).toString()})}catch(a){return{ok:!1,reason:a?.name==="AbortError"?"GitHub did not answer in time":"this machine could not reach GitHub"}}if(!d.ok){var f;return{ok:!1,reason:404===(f=d.status)?"GitHub did not recognise af360's app registration":401===f||403===f?"GitHub would not accept af360's app credentials":`GitHub answered ${f}`}}try{e=await d.json()}catch(a){if(a?.name==="AbortError")return{ok:!1,reason:"GitHub did not answer in time"};return{ok:!1,reason:"GitHub's answer was not readable"}}return e&&"object"==typeof e?{ok:!0,json:e}:{ok:!1,reason:"GitHub's answer was not readable"}}let r=(a,b)=>"number"==typeof a&&Number.isFinite(a)&&a>0?a:b;async function s(){let a=await p("/login/device/code",{client_id:g});if(!a.ok)return a;let b=a.json;if("string"==typeof b.error)return{ok:!1,reason:n(b.error)};let c="string"==typeof b.device_code?b.device_code:"",d="string"==typeof b.user_code?b.user_code:"";return c&&d?{ok:!0,device:{deviceCode:c,userCode:d,verificationUri:"string"==typeof b.verification_uri&&b.verification_uri?b.verification_uri:j,expiresAt:Date.now()+1e3*r(b.expires_in,900),intervalMs:Math.max(5e3,1e3*r(b.interval,5))}}:{ok:!1,reason:"GitHub did not send a sign-in code"}}async function t(a,b={}){let c=b.cancelled??(()=>!1),d=b.sleep??(a=>new Promise(b=>setTimeout(b,a))),e=a.intervalMs;for(;;){if(c())return{ok:!1,ending:"cancelled",reason:l.cancelled};if(Date.now()>=a.expiresAt)return{ok:!1,ending:"expired",reason:l.expired};if(await d(e),c())return{ok:!1,ending:"cancelled",reason:l.cancelled};let f=await p("/login/oauth/access_token",{client_id:g,device_code:a.deviceCode,grant_type:"urn:ietf:params:oauth:grant-type:device_code"});if(!f.ok)continue;let h=f.json,i="string"==typeof h.error?h.error:"";if("authorization_pending"===i)continue;if("slow_down"===i){e=Math.max(5e3,("number"==typeof h.interval&&Number.isFinite(h.interval)&&h.interval>0?1e3*h.interval:0)||e+5e3),b.onEnding?.("slow-down");continue}if(i)return{ok:!1,ending:o[i]??"refused",reason:n(i)};let j="string"==typeof h.access_token?h.access_token:"";if(!j)return{ok:!1,ending:"refused",reason:"GitHub returned no access token"};let k=Date.now();return{ok:!0,ending:"arrived",tokens:{accessToken:j,accessExpiresAt:"number"==typeof h.expires_in&&Number.isFinite(h.expires_in)&&h.expires_in>0?k+1e3*h.expires_in:0,refreshToken:"",refreshExpiresAt:0,refreshOffered:"string"==typeof h.refresh_token&&h.refresh_token.length>0,refreshOfferedLifetimeMs:"number"==typeof h.refresh_token_expires_in&&Number.isFinite(h.refresh_token_expires_in)&&h.refresh_token_expires_in>0?1e3*h.refresh_token_expires_in:0}}}}},18150:(a,b,c)=>{c.d(b,{PC:()=>B,y6:()=>M,github:()=>y,state:()=>J,M_:()=>L,ZL:()=>F,fn:()=>I});var d=c(1232);let e=a=>({ok:!0,value:a}),f=(a,b)=>({ok:!1,kind:a,reason:(0,d.dK)(b)}),g="https://api.github.com";async function h(a,b){let c=new AbortController,d=setTimeout(()=>c.abort(),8e3);try{return await i(a,b,c)}finally{clearTimeout(d)}}async function i(a,b,c){let d,h,i;try{d=await fetch(g+a,{signal:c.signal,redirect:"manual",headers:{authorization:`Bearer ${b}`,accept:"application/vnd.github+json","x-github-api-version":"2022-11-28","user-agent":"af360"}})}catch(c){if(c?.name==="AbortError")return f("timeout","GitHub did not answer in time");let a=c?.code??c?.name,b="string"==typeof a&&/^[A-Z][A-Z0-9_]{2,31}$/.test(a)?a:null;return f("unreachable",b?`af360 could not open a connection to GitHub (${b})`:"af360 could not open a connection to GitHub")}if(301===d.status||308===d.status){let a=function(a){let b;if(!a)return null;try{b=new URL(a,g)}catch{return null}if(b.origin!==new URL(g).origin)return null;let c=b.pathname.replace(/^\/+/,"").split("/").filter(Boolean);if(3!==c.length||"repos"!==c[0])return null;let[,d,e]=c,f=a=>/^[A-Za-z0-9._-]{1,100}$/.test(a)&&"."!==a&&".."!==a;return f(d)&&f(e)?`${d}/${e}`:null}(d.headers.get("location"));return f("moved",a?`GitHub now calls this repository ${a}`:"GitHub says this repository has moved, and did not say where")}let k=d.headers.get("github-authentication-token-expiration"),l=d.headers.get("x-oauth-scopes"),m=d.headers.get("x-ratelimit-remaining"),n=null===m?null:Number.parseInt(m,10);if((403===d.status||429===d.status)&&0===n)return f("ratelimited","your GitHub rate limit is spent - it refills on its own");if(401===d.status)return f("unauthorized","GitHub did not accept the token - it may have been revoked or have expired");if(d.status>=500)return f("down",`GitHub answered ${d.status}`);try{h=await j(d)}catch(a){if(a?.name==="AbortError")return f("timeout","GitHub did not answer in time");throw a}if(null===h)return f("down","GitHub's answer was larger than af360 will read");if(!d.ok)return f(404===d.status||403===d.status?"forbidden":"down",404===d.status?"GitHub has no repository there that this token can see":"GitHub accepted the token but this is outside what it was granted");try{i=JSON.parse(h)}catch{return f("down","GitHub's answer was not readable")}return e({body:i,tokenExpiry:k,oauthScopes:l,rateRemaining:n})}async function j(a){let b=Number.parseInt(a.headers.get("content-length")??"",10);if(Number.isFinite(b)&&b>524288)return null;let c=a.body?.getReader();if(!c)return await a.text();let d=[],e=0;for(;;){let{done:a,value:b}=await c.read();if(a)break;if(b){if((e+=b.byteLength)>524288)return await c.cancel().catch(()=>{}),null;d.push(b)}}let f=new Uint8Array(e),g=0;for(let a of d)f.set(a,g),g+=a.byteLength;return new TextDecoder("utf-8").decode(f)}let k=a=>encodeURIComponent(a),l=(a,b)=>h(`/user/installations/${encodeURIComponent(String(a))}/repositories?per_page=100`,b);var m=c(71011),n=c(46995);let o="dpapi:v1:",p=new Map;async function q(a){if("string"!=typeof a||!a)return{stored:a,encrypted:!1};let b=await (0,n.bridge)("protect",a);if(!b.ok)return{stored:a,encrypted:!1,reason:b.reason};let c=o+b.out;return p.set(c,a),{stored:c,encrypted:!0}}async function r(a){if("string"!=typeof a||!a)return{ok:!1,reason:"empty"};if(!("string"==typeof a&&a.startsWith(o)))return{ok:!0,token:a,encrypted:!1};let b=p.get(a);if(void 0!==b)return{ok:!0,token:b,encrypted:!0};let c=await (0,n.bridge)("unprotect",a.slice(o.length));return c.ok?(p.set(a,c.out),{ok:!0,token:c.out,encrypted:!0}):{ok:!1,reason:c.reason,encrypted:!0}}let s={unreachable:"not checked this scan - af360 could not open a connection to GitHub",down:"not checked this scan - GitHub did not answer properly",expired:"not checked this scan - the GitHub token has expired",unauthorized:"not checked this scan - GitHub would not accept the token",forbidden:"not checked this scan - the token is fine, but this is outside what af360 was granted",ratelimited:"not checked this scan - your GitHub rate limit is spent",timeout:"not checked this scan - GitHub did not answer in time",moved:"not checked - your remote points at a name GitHub has moved, and it will stay unchecked until the remote is updated","past-ceiling":"not checked - af360 asks GitHub about a limited number of repositories each scan, and this one is past that"},t={unreachable:"no connection",down:"GitHub down",expired:"token expired",unauthorized:"token refused",forbidden:"not granted",ratelimited:"rate limit",timeout:"no answer",moved:"remote moved","past-ceiling":"past the scan limit"};Object.fromEntries(Object.keys(t).map(a=>[a,`GitHub not checked (${t[a]})`]));var u=c(4683);let v=new Set(["read:org","read:user","read:packages","read:discussion","read:project","read:audit_log","read:gpg_key","read:public_key","user:email","read:enterprise","read:network"]),w=new Set(["read"]);async function x(a,b,c,d){var g;let i,j=await h(`/repos/${k(b)}/${k(c)}`,d);if(!j.ok)return f(j.kind,j.reason);let l="string"==typeof j.value.body.default_branch?j.value.body.default_branch:null,m=a.branch||l;if(!m)return f("down","GitHub did not name a default branch and local git did not name one either");let[n,o,p]=await Promise.all([h(`/repos/${k(b)}/${k(c)}/actions/runs?branch=${k(m)}&per_page=1&exclude_pull_requests=true`,d),h(`/repos/${k(b)}/${k(c)}/pulls?state=open&per_page=100`,d),(g=a).statusKnown&&0===g.ahead&&0===g.behind&&g.headSha?h(`/repos/${k(b)}/${k(c)}/branches/${k(m)}`,d):Promise.resolve(null)]),q=n.ok?e(function(a,b){if(!a)return null;let c=Date.parse(a.updated_at??a.created_at??""),d=a.conclusion??null;return{state:"success"===d?"passing":"failure"===d||"timed_out"===d||"startup_failure"===d?"failing":null===d?"running":"other",conclusion:d,workflow:"string"==typeof a.name&&a.name?a.name:"a workflow",branch:a.head_branch||b,at:Number.isFinite(c)?c:Date.now(),runNumber:"number"==typeof a.run_number?a.run_number:null}}(n.value.body?.workflow_runs?.[0],m)):f(n.kind,n.reason),r=o.ok?o.value.body??[]:null,s=o.ok?e((o.value.body??[]).length):f(o.kind,o.reason),t=null!==r&&r.length>=100,u="number"==typeof j.value.body.open_issues_count?j.value.body.open_issues_count:null;return i=null===u?f("down","GitHub did not say how many issues are open"):o.ok?e(Math.max(0,u-(r?.length??0))):f(o.kind,"af360 could not separate issues from pull requests this scan"),e({owner:b,name:c,fullName:j.value.body.full_name??`${b}/${c}`,defaultBranch:l,branch:m,ci:q,prCount:s,prCapped:t,issueCount:i,backup:function(a,b,c){if(!a.statusKnown)return{verdict:"unmeasured",reason:"local git did not finish answering, so there was nothing to confirm against"};if(!a.headSha)return{verdict:"unmeasured",reason:"af360 could not read this project's current commit"};if(null===a.ahead||null===a.behind)return{verdict:"unmeasured",reason:"local git did not report this branch's position against its remote"};if(a.ahead>0)return{verdict:"unmeasured",reason:"local git already reports commits that are not pushed - there is no claim to confirm"};if(a.behind>0)return{verdict:"unmeasured",reason:"this machine is behind its remote, so the two tips are expected to differ"};if(!c)return{verdict:"unmeasured",reason:"af360 did not ask GitHub for this branch"};if(!c.ok)return{verdict:"unmeasured",reason:c.reason};let d=c.value.body.commit?.sha;return"string"==typeof d&&d?d===a.headSha?{verdict:"confirmed",sha:d,branch:b}:{verdict:"refuted",localSha:a.headSha,remoteSha:d,branch:b}:{verdict:"unmeasured",reason:"GitHub did not name a commit for that branch"}}(a,m,p)})}let y={id:"github",label:"GitHub",host:"api.github.com",verify:async function a(a){let b,c=await h("/user",a);if(!c.ok)return{kind:"unreached",unreached:c.kind,reason:c.reason};let d="string"==typeof c.value.body.login?c.value.body.login:"";if(!d)return{kind:"unreached",unreached:"down",reason:"GitHub did not say who this token belongs to"};if(c.value.oauthScopes){let b=function(a){let b=a.split(",").map(a=>a.trim()).filter(Boolean);if(0===b.length)return{readOnly:!0,detail:"a classic token with no scopes - it can read public repositories only"};let c=b.filter(a=>!v.has(a));return 0===c.length?{readOnly:!0,detail:`classic token, read-only scopes (${b.join(", ")})`}:{readOnly:!1,detail:`it carries the ${c.join(", ")} scope${1===c.length?"":"s"}, which can write`}}(c.value.oauthScopes);if(!b.readOnly)return{kind:"refused-write",detail:b.detail};let e=await h("/user/repos?per_page=100&sort=pushed",a);if(!e.ok)return{kind:"unreached",unreached:e.kind,reason:`${e.reason} - af360 could not check what this token can reach, so nothing was stored`};let f=function(a){let b=a.filter(a=>a.permissions?.push||a.permissions?.admin||a.permissions?.maintain);if(0===b.length)return{readOnly:!0,detail:`fine-grained token, read-only on all ${a.length} repositor${1===a.length?"y":"ies"} it can see`};let c=b.slice(0,3).map(a=>a.full_name??"a repository").join(", "),d=b.length>3?` and ${b.length-3} more`:"";return{readOnly:!1,detail:`it can push to ${c}${d}`}}(e.value.body??[]);return f.readOnly?{kind:"ok",login:d,scopesRead:!0,expiryKnown:!1,repoNames:(e.value.body??[]).map(a=>a.full_name??"").filter(Boolean)}:{kind:"refused-write",detail:f.detail}}let e=await h("/user/installations?per_page=100",a);if(!e.ok)return{kind:"unreached",unreached:e.kind,reason:`${e.reason} - af360 could not check what it was granted, so nothing was stored`};let f=e.value.body.installations??[],g=f.filter(a=>a.app_slug===u.II);if(f.length>0&&0===g.length)return{kind:"unreached",unreached:"down",reason:`GitHub returned ${f.length} installation${1===f.length?"":"s"}, none of them af360's own, so af360 could not confirm the grant it was reading was its own - nothing was stored`};let i=function(a){if(0===a.length)return{readOnly:!0,detail:"the App is authorized but not installed on any account yet"};let b=[];for(let c of a)for(let[a,d]of Object.entries(c.permissions??{}))w.has(String(d).toLowerCase())||b.push(`${a}: ${d}${c.account?.login?` on ${c.account.login}`:""}`);return 0===b.length?{readOnly:!0,detail:`the App is installed read-only on ${a.length} account${1===a.length?"":"s"}`}:{readOnly:!1,detail:`the installation grants ${b.slice(0,3).join(", ")}${b.length>3?` and ${b.length-3} more`:""}`}}(g);if(!i.readOnly)return{kind:"refused-write",detail:i.detail};let j=[],k=0;for(let c of g){if("number"!=typeof c.id)continue;b??=c.id;let d=await l(c.id,a);if(!d.ok){k++;continue}for(let a of d.value.body.repositories??[])a.full_name&&j.push(a.full_name)}return{kind:"ok",login:d,repoNames:j,scopesRead:!0,expiryKnown:!1,installationId:b,installationCount:g.length,reposUnread:k}},facts:async function a(a){let b,c=Date.now(),d=await I();if(!d)return{at:c,byPath:{},outage:{kind:"unauthorized",reason:"af360 holds no GitHub token"}};if(d.expiresAt&&Date.parse(d.expiresAt)<=c)return{at:c,byPath:{},outage:{kind:"expired",reason:"the GitHub token's expiry date has passed"}};let e=a.map(a=>({s:a,repo:function(a){if(!a)return null;let b=a.trim(),c=null,d=null,e=/^(?:[A-Za-z0-9._-]+@)?([A-Za-z0-9._-]+):(.+)$/.exec(b);if(e&&!/^[A-Za-z][A-Za-z0-9+.-]*:\/\//.test(b))c=e[1].toLowerCase(),d=e[2];else try{let a=new URL(b);c=a.hostname.toLowerCase(),d=a.pathname}catch{return null}if("github.com"!==c&&"www.github.com"!==c)return null;let f=(d??"").replace(/^\/+/,"").replace(/\.git$/i,"").split("/").filter(Boolean);if(2!==f.length)return null;let[g,h]=f,i=a=>/^[A-Za-z0-9._-]{1,100}$/.test(a)&&"."!==a&&".."!==a;return i(g)&&i(h)?{owner:g,name:h}:null}(a.remoteUrl)})).filter(a=>null!==a.repo),g={},h=e.slice(0,25);for(let a of e.slice(25))g[a.s.path.toLowerCase()]=f("past-ceiling","af360 asks GitHub about at most 25 repositories in one scan, and this one was past that");let i=0,j=Array.from({length:Math.min(4,h.length)},async()=>{for(;;){if(b)return;let a=i++;if(a>=h.length)return;let{s:c,repo:e}=h[a],f=await x(c,e.owner,e.name,d.token);if(!f.ok&&("ratelimited"===f.kind||"expired"===f.kind)){b={kind:f.kind,reason:f.reason};return}g[c.path.toLowerCase()]=f}});return await Promise.all(j),{at:c,byPath:g,outage:b}},expiry:function(a){return a.connected&&a.expiryKnown&&a.expiresAt&&Number.isFinite(Date.parse(a.expiresAt))?{id:"connector:github",name:"GitHub token (af360 stops seeing CI, PRs and issues)",date:a.expiresAt}:null},unmeasuredLine:a=>s[a]},z=null,A=null,B="This build of af360 has no GitHub App registration, so it cannot renew access",C=0,D=6e4;function E(a,b){C=b+D,D=Math.min(2*D,18e5),A!==a&&(A=a,z={ok:!1,reason:a})}function F(){let a=z;return z=null,a}async function G(a){let b=await r(a.token);if(!b.ok)return null;let c=a.refreshToken;if(c){let a=await r(c);c=a.ok?a.token:void 0}return{...a,token:b.token,refreshToken:c}}async function H(a){let b={...a,token:(await q(a.token)).stored};return a.refreshToken&&(b.refreshToken=(await q(a.refreshToken)).stored),b}async function I(a=Date.now()){try{let b=await (0,m.G5)(),d=b.config?.connectors?.github;if(!d||"string"!=typeof d.token||!d.token)return null;let e=await G(d);if(!e)return null;let f=e.expiresAt?Date.parse(e.expiresAt):NaN;if(!Number.isFinite(f)||f-a>3e5)return A=null,C=0,D=6e4,e;if(!e.refreshToken)return e;let{APP_CONFIGURED:g}=await Promise.resolve().then(c.bind(c,4683));if(!g)return E(B,a),e;if(A&&a<C)return e;return E("af360 cannot renew this sign-in with GitHub - press Connect to sign in again",a),e}catch{return null}}async function J(){let a,b={id:y.id,label:y.label,connected:!1},d=null;try{let a=await (0,m.G5)();d=a.config?.connectors?.github??null}catch{return b}if(!d?.token)return b;if(!(await r(d.token)).ok)return{...b,connected:!0,unreadable:!0,login:d.login,repoNames:d.repoNames,repoCount:d.repoNames?.length,connectedAt:d.connectedAt};let e=!1;try{let{cachedGithubScan:b}=await c.e(6988).then(c.bind(c,26988)),d=await b(),f=d?.outage?.kind;if(!f){for(let a of Object.values(d?.byPath??{}))if(!a.ok&&("unauthorized"===a.kind||"expired"===a.kind)){f=a.kind;break}}("unauthorized"===f||"expired"===f)&&(a=f),d&&!d.outage&&(e=Object.values(d.byPath??{}).some(a=>a.ok))}catch{}return K&&(e=!0),{...b,connected:!0,refusal:a,verified:e,login:d.login,repoNames:d.repoNames,repoCount:d.repoNames?.length,reposKnown:d.reposKnown,installationCount:d.installationCount,expiryKnown:!1,connectedAt:d.connectedAt}}let K=!1;async function L(a,b,c){let d=await (0,m.G5)();if("unreadable"===d.status||!d.config)throw Error("af360 could not read its own settings, so it did not store anything");let e=d.config;e.connectors={...e.connectors,github:await H({token:a,login:b.login,repoNames:b.repoNames,reposKnown:(b.reposUnread??0)===0,installationId:b.installationId,installationCount:b.installationCount,connectedAt:Date.now(),...c?{expiresAt:new Date(c.expiresAt).toISOString(),refreshToken:c.refreshToken,refreshExpiresAt:new Date(c.refreshExpiresAt).toISOString()}:{}})},await (0,m.ql)(e),K=!0}async function M(){var a;let b=await (0,m.G5)();if("unreadable"===b.status||!b.config)throw Error("af360 could not read its own settings, so it changed nothing");let c=b.config;"string"==typeof(a=c.connectors?.github?.token)?p.delete(a):p.clear(),c.connectors&&delete c.connectors.github,await (0,m.ql)(c),K=!1}},46995:(a,b,c)=>{c.d(b,{$:()=>i,bridge:()=>k});var d=c(79646),e=c(29021),f=c(33873),g=c(79551);let h=f.resolve(f.dirname((0,g.fileURLToPath)("file:///C:/dev/af360/lib/bridge.mjs")),"..");function i(){let a=process.env.AF360_BRIDGE;return a?(0,e.existsSync)(a)?a:null:j()}function j(){for(let a of[f.join(h,"af360-bridge.exe"),f.join(h,"shell","bin","af360-bridge.exe")])if((0,e.existsSync)(a))return a;return null}function k(a,b="",{fixedPath:c=!1,timeout:e=15e3}={}){let f=c?j():i();return f?new Promise(c=>{let g=(0,d.execFile)(f,[a],{windowsHide:!0,timeout:e,maxBuffer:1e6},(a,b,d)=>{if(a)return void c({ok:!1,reason:String(d||"").trim()||(a.killed?"timeout":"failed")});c({ok:!0,out:String(b||"").trim()})});g.stdin.on("error",()=>{}),g.stdin.end(b)}):Promise.resolve({ok:!1,reason:"absent"})}}};
1
+ "use strict";exports.id=8150,exports.ids=[6995,8150],exports.modules={4683:(a,b,c)=>{c.d(b,{APP_CONFIGURED:()=>h,II:()=>k,f2:()=>l,Zd:()=>t,Re:()=>s});var d=c(73024),e=c(76760);let f=["githubClientId"],g=process.env.AF360_GITHUB_CLIENT_ID??function(){let a=function(){let a,b;try{a=(0,d.readFileSync)(function(){let a=process.env.AF360_APP_IDENTITY;return a||e.join(void 0,"app-identity.json")}(),"utf8")}catch{return{ok:!1,reason:"af360 could not read its own app identity file"}}try{b=JSON.parse(a)}catch{return{ok:!1,reason:"af360's app identity file is not readable JSON"}}if(!b||"object"!=typeof b||Array.isArray(b))return{ok:!1,reason:"af360's app identity file is not a JSON object"};let c=Object.keys(b).filter(a=>!f.includes(a));if(c.length>0)return{ok:!1,reason:`af360's app identity file carries a key that may not ship: ${c.join(", ")}`};let g=b.githubClientId;return"string"!=typeof g||0===g.length?{ok:!1,reason:"af360's app identity file carries no GitHub client id"}:{ok:!0,githubClientId:g}}();return a.ok&&a.githubClientId?a.githubClientId:"REPLACE_WITH_APP_CLIENT_ID"}(),h=!g.startsWith("REPLACE_WITH"),i="https://github.com",j=`${i}/login/device`,k=process.env.AF360_GITHUB_APP_SLUG??"af360-app",l=Object.freeze({arrived:"GitHub's answer arrived on this machine",declined:"you declined the authorization on GitHub - nothing was stored",refused:"GitHub refused the authorization - nothing was stored",expired:"the sign-in code expired before it was used, so af360 stopped asking - nothing was stored",cancelled:"you cancelled the authorization in af360 - nothing was stored",issued:"GitHub issued a sign-in code and af360 is waiting for you to enter it","slow-down":"GitHub asked af360 to check less often, and af360 slowed down"});Object.freeze(["issued","slow-down"]);let m=Object.freeze({expired_token:"that sign-in code had expired before it was used - press Connect to get a fresh one",access_denied:"the sign-in was declined on GitHub, so nothing was stored",incorrect_device_code:"GitHub did not recognise this sign-in attempt, so nothing was stored - press Connect to start a fresh one",unsupported_grant_type:"GitHub would not accept the way af360 asked, so nothing was stored - this is af360's own registration and not something to fix here",device_flow_disabled:"GitHub says device sign-in is turned off for af360, so nothing was stored - this is af360's own registration and not something to fix here",incorrect_client_credentials:"GitHub did not recognise af360 itself, so nothing was stored - this is af360's own registration and not something to fix here",unverified_user_email:"GitHub needs a verified email address on your account before it will complete this"});function n(a){return m[a]??"GitHub refused to complete the sign-in, so nothing was stored - press Connect to try again"}let o=Object.freeze({access_denied:"declined",expired_token:"expired"});async function p(a,b){let c=new AbortController,d=setTimeout(()=>c.abort(),15e3);try{return await q(a,b,c)}finally{clearTimeout(d)}}async function q(a,b,c){let d,e;try{d=await fetch(`${i}${a}`,{method:"POST",signal:c.signal,redirect:"error",headers:{accept:"application/json","content-type":"application/x-www-form-urlencoded","user-agent":"af360"},body:new URLSearchParams(b).toString()})}catch(a){return{ok:!1,reason:a?.name==="AbortError"?"GitHub did not answer in time":"this machine could not reach GitHub"}}if(!d.ok){var f;return{ok:!1,reason:404===(f=d.status)?"GitHub did not recognise af360's app registration":401===f||403===f?"GitHub would not accept af360's app credentials":`GitHub answered ${f}`}}try{e=await d.json()}catch(a){if(a?.name==="AbortError")return{ok:!1,reason:"GitHub did not answer in time"};return{ok:!1,reason:"GitHub's answer was not readable"}}return e&&"object"==typeof e?{ok:!0,json:e}:{ok:!1,reason:"GitHub's answer was not readable"}}let r=(a,b)=>"number"==typeof a&&Number.isFinite(a)&&a>0?a:b;async function s(){let a=await p("/login/device/code",{client_id:g});if(!a.ok)return a;let b=a.json;if("string"==typeof b.error)return{ok:!1,reason:n(b.error)};let c="string"==typeof b.device_code?b.device_code:"",d="string"==typeof b.user_code?b.user_code:"";return c&&d?{ok:!0,device:{deviceCode:c,userCode:d,verificationUri:"string"==typeof b.verification_uri&&b.verification_uri?b.verification_uri:j,expiresAt:Date.now()+1e3*r(b.expires_in,900),intervalMs:Math.max(5e3,1e3*r(b.interval,5))}}:{ok:!1,reason:"GitHub did not send a sign-in code"}}async function t(a,b={}){let c=b.cancelled??(()=>!1),d=b.sleep??(a=>new Promise(b=>setTimeout(b,a))),e=a.intervalMs;for(;;){if(c())return{ok:!1,ending:"cancelled",reason:l.cancelled};if(Date.now()>=a.expiresAt)return{ok:!1,ending:"expired",reason:l.expired};if(await d(e),c())return{ok:!1,ending:"cancelled",reason:l.cancelled};let f=await p("/login/oauth/access_token",{client_id:g,device_code:a.deviceCode,grant_type:"urn:ietf:params:oauth:grant-type:device_code"});if(!f.ok)continue;let h=f.json,i="string"==typeof h.error?h.error:"";if("authorization_pending"===i)continue;if("slow_down"===i){e=Math.max(5e3,("number"==typeof h.interval&&Number.isFinite(h.interval)&&h.interval>0?1e3*h.interval:0)||e+5e3),b.onEnding?.("slow-down");continue}if(i)return{ok:!1,ending:o[i]??"refused",reason:n(i)};let j="string"==typeof h.access_token?h.access_token:"";if(!j)return{ok:!1,ending:"refused",reason:"GitHub returned no access token"};let k=Date.now();return{ok:!0,ending:"arrived",tokens:{accessToken:j,accessExpiresAt:"number"==typeof h.expires_in&&Number.isFinite(h.expires_in)&&h.expires_in>0?k+1e3*h.expires_in:0,refreshToken:"",refreshExpiresAt:0,refreshOffered:"string"==typeof h.refresh_token&&h.refresh_token.length>0,refreshOfferedLifetimeMs:"number"==typeof h.refresh_token_expires_in&&Number.isFinite(h.refresh_token_expires_in)&&h.refresh_token_expires_in>0?1e3*h.refresh_token_expires_in:0}}}}},18150:(a,b,c)=>{c.d(b,{PC:()=>B,y6:()=>M,github:()=>y,state:()=>J,M_:()=>L,ZL:()=>F,fn:()=>I});var d=c(1232);let e=a=>({ok:!0,value:a}),f=(a,b)=>({ok:!1,kind:a,reason:(0,d.dK)(b)}),g="https://api.github.com";async function h(a,b){let c=new AbortController,d=setTimeout(()=>c.abort(),8e3);try{return await i(a,b,c)}finally{clearTimeout(d)}}async function i(a,b,c){let d,h,i;try{d=await fetch(g+a,{signal:c.signal,redirect:"manual",headers:{authorization:`Bearer ${b}`,accept:"application/vnd.github+json","x-github-api-version":"2022-11-28","user-agent":"af360"}})}catch(c){if(c?.name==="AbortError")return f("timeout","GitHub did not answer in time");let a=c?.code??c?.name,b="string"==typeof a&&/^[A-Z][A-Z0-9_]{2,31}$/.test(a)?a:null;return f("unreachable",b?`af360 could not open a connection to GitHub (${b})`:"af360 could not open a connection to GitHub")}if(301===d.status||308===d.status){let a=function(a){let b;if(!a)return null;try{b=new URL(a,g)}catch{return null}if(b.origin!==new URL(g).origin)return null;let c=b.pathname.replace(/^\/+/,"").split("/").filter(Boolean);if(3!==c.length||"repos"!==c[0])return null;let[,d,e]=c,f=a=>/^[A-Za-z0-9._-]{1,100}$/.test(a)&&"."!==a&&".."!==a;return f(d)&&f(e)?`${d}/${e}`:null}(d.headers.get("location"));return f("moved",a?`GitHub now calls this repository ${a}`:"GitHub says this repository has moved, and did not say where")}let k=d.headers.get("github-authentication-token-expiration"),l=d.headers.get("x-oauth-scopes"),m=d.headers.get("x-ratelimit-remaining"),n=null===m?null:Number.parseInt(m,10);if((403===d.status||429===d.status)&&0===n)return f("ratelimited","your GitHub rate limit is spent - it refills on its own");if(401===d.status)return f("unauthorized","GitHub did not accept the token - it may have been revoked or have expired");if(d.status>=500)return f("down",`GitHub answered ${d.status}`);try{h=await j(d)}catch(a){if(a?.name==="AbortError")return f("timeout","GitHub did not answer in time");throw a}if(null===h)return f("down","GitHub's answer was larger than af360 will read");if(!d.ok)return f(404===d.status||403===d.status?"forbidden":"down",404===d.status?"GitHub has no repository there that this token can see":"GitHub accepted the token but this is outside what it was granted");try{i=JSON.parse(h)}catch{return f("down","GitHub's answer was not readable")}return e({body:i,tokenExpiry:k,oauthScopes:l,rateRemaining:n})}async function j(a){let b=Number.parseInt(a.headers.get("content-length")??"",10);if(Number.isFinite(b)&&b>524288)return null;let c=a.body?.getReader();if(!c)return await a.text();let d=[],e=0;for(;;){let{done:a,value:b}=await c.read();if(a)break;if(b){if((e+=b.byteLength)>524288)return await c.cancel().catch(()=>{}),null;d.push(b)}}let f=new Uint8Array(e),g=0;for(let a of d)f.set(a,g),g+=a.byteLength;return new TextDecoder("utf-8").decode(f)}let k=a=>encodeURIComponent(a),l=(a,b)=>h(`/user/installations/${encodeURIComponent(String(a))}/repositories?per_page=100`,b);var m=c(71011),n=c(46995);let o="dpapi:v1:",p=new Map;async function q(a){if("string"!=typeof a||!a)return{stored:a,encrypted:!1};let b=await (0,n.bridge)("protect",a);if(!b.ok)return{stored:a,encrypted:!1,reason:b.reason};let c=o+b.out;return p.set(c,a),{stored:c,encrypted:!0}}async function r(a){if("string"!=typeof a||!a)return{ok:!1,reason:"empty"};if(!("string"==typeof a&&a.startsWith(o)))return{ok:!0,token:a,encrypted:!1};let b=p.get(a);if(void 0!==b)return{ok:!0,token:b,encrypted:!0};let c=await (0,n.bridge)("unprotect",a.slice(o.length));return c.ok?(p.set(a,c.out),{ok:!0,token:c.out,encrypted:!0}):{ok:!1,reason:c.reason,encrypted:!0}}let s={unreachable:"not checked this scan - af360 could not open a connection to GitHub",down:"not checked this scan - GitHub did not answer properly",expired:"not checked this scan - the GitHub token has expired",unauthorized:"not checked this scan - GitHub would not accept the token",forbidden:"not checked this scan - the token is fine, but this is outside what af360 was granted",ratelimited:"not checked this scan - your GitHub rate limit is spent",timeout:"not checked this scan - GitHub did not answer in time",moved:"not checked - your remote points at a name GitHub has moved, and it will stay unchecked until the remote is updated","past-ceiling":"not checked - af360 asks GitHub about a limited number of repositories each scan, and this one is past that"},t={unreachable:"no connection",down:"GitHub down",expired:"token expired",unauthorized:"token refused",forbidden:"not granted",ratelimited:"rate limit",timeout:"no answer",moved:"remote moved","past-ceiling":"past the scan limit"};Object.fromEntries(Object.keys(t).map(a=>[a,`GitHub not checked (${t[a]})`]));var u=c(4683);let v=new Set(["read:org","read:user","read:packages","read:discussion","read:project","read:audit_log","read:gpg_key","read:public_key","user:email","read:enterprise","read:network"]),w=new Set(["read"]);async function x(a,b,c,d){var g;let i,j=await h(`/repos/${k(b)}/${k(c)}`,d);if(!j.ok)return f(j.kind,j.reason);let l="string"==typeof j.value.body.default_branch?j.value.body.default_branch:null,m=a.branch||l;if(!m)return f("down","GitHub did not name a default branch and local git did not name one either");let[n,o,p]=await Promise.all([h(`/repos/${k(b)}/${k(c)}/actions/runs?branch=${k(m)}&per_page=1&exclude_pull_requests=true`,d),h(`/repos/${k(b)}/${k(c)}/pulls?state=open&per_page=100`,d),(g=a).statusKnown&&0===g.ahead&&0===g.behind&&g.headSha?h(`/repos/${k(b)}/${k(c)}/branches/${k(m)}`,d):Promise.resolve(null)]),q=n.ok?e(function(a,b){if(!a)return null;let c=Date.parse(a.updated_at??a.created_at??""),d=a.conclusion??null;return{state:"success"===d?"passing":"failure"===d||"timed_out"===d||"startup_failure"===d?"failing":null===d?"running":"other",conclusion:d,workflow:"string"==typeof a.name&&a.name?a.name:"a workflow",branch:a.head_branch||b,at:Number.isFinite(c)?c:Date.now(),runNumber:"number"==typeof a.run_number?a.run_number:null}}(n.value.body?.workflow_runs?.[0],m)):f(n.kind,n.reason),r=o.ok?o.value.body??[]:null,s=o.ok?e((o.value.body??[]).length):f(o.kind,o.reason),t=null!==r&&r.length>=100,u="number"==typeof j.value.body.open_issues_count?j.value.body.open_issues_count:null;return i=null===u?f("down","GitHub did not say how many issues are open"):o.ok?e(Math.max(0,u-(r?.length??0))):f(o.kind,"af360 could not separate issues from pull requests this scan"),e({owner:b,name:c,fullName:j.value.body.full_name??`${b}/${c}`,defaultBranch:l,branch:m,ci:q,prCount:s,prCapped:t,issueCount:i,backup:function(a,b,c){if(!a.statusKnown)return{verdict:"unmeasured",reason:"local git did not finish answering, so there was nothing to confirm against"};if(!a.headSha)return{verdict:"unmeasured",reason:"af360 could not read this project's current commit"};if(null===a.ahead||null===a.behind)return{verdict:"unmeasured",reason:"local git did not report this branch's position against its remote"};if(a.ahead>0)return{verdict:"unmeasured",reason:"local git already reports commits that are not pushed - there is no claim to confirm"};if(a.behind>0)return{verdict:"unmeasured",reason:"this machine is behind its remote, so the two tips are expected to differ"};if(!c)return{verdict:"unmeasured",reason:"af360 did not ask GitHub for this branch"};if(!c.ok)return{verdict:"unmeasured",reason:c.reason};let d=c.value.body.commit?.sha;return"string"==typeof d&&d?d===a.headSha?{verdict:"confirmed",sha:d,branch:b}:{verdict:"refuted",localSha:a.headSha,remoteSha:d,branch:b}:{verdict:"unmeasured",reason:"GitHub did not name a commit for that branch"}}(a,m,p)})}let y={id:"github",label:"GitHub",host:"api.github.com",verify:async function a(a){let b,c=await h("/user",a);if(!c.ok)return{kind:"unreached",unreached:c.kind,reason:c.reason};let d="string"==typeof c.value.body.login?c.value.body.login:"";if(!d)return{kind:"unreached",unreached:"down",reason:"GitHub did not say who this token belongs to"};if(c.value.oauthScopes){let b=function(a){let b=a.split(",").map(a=>a.trim()).filter(Boolean);if(0===b.length)return{readOnly:!0,detail:"a classic token with no scopes - it can read public repositories only"};let c=b.filter(a=>!v.has(a));return 0===c.length?{readOnly:!0,detail:`classic token, read-only scopes (${b.join(", ")})`}:{readOnly:!1,detail:`it carries the ${c.join(", ")} scope${1===c.length?"":"s"}, which can write`}}(c.value.oauthScopes);if(!b.readOnly)return{kind:"refused-write",detail:b.detail};let e=await h("/user/repos?per_page=100&sort=pushed",a);if(!e.ok)return{kind:"unreached",unreached:e.kind,reason:`${e.reason} - af360 could not check what this token can reach, so nothing was stored`};let f=function(a){let b=a.filter(a=>a.permissions?.push||a.permissions?.admin||a.permissions?.maintain);if(0===b.length)return{readOnly:!0,detail:`fine-grained token, read-only on all ${a.length} repositor${1===a.length?"y":"ies"} it can see`};let c=b.slice(0,3).map(a=>a.full_name??"a repository").join(", "),d=b.length>3?` and ${b.length-3} more`:"";return{readOnly:!1,detail:`it can push to ${c}${d}`}}(e.value.body??[]);return f.readOnly?{kind:"ok",login:d,scopesRead:!0,expiryKnown:!1,repoNames:(e.value.body??[]).map(a=>a.full_name??"").filter(Boolean)}:{kind:"refused-write",detail:f.detail}}let e=await h("/user/installations?per_page=100",a);if(!e.ok)return{kind:"unreached",unreached:e.kind,reason:`${e.reason} - af360 could not check what it was granted, so nothing was stored`};let f=e.value.body.installations??[],g=f.filter(a=>a.app_slug===u.II);if(f.length>0&&0===g.length)return{kind:"unreached",unreached:"down",reason:`GitHub returned ${f.length} installation${1===f.length?"":"s"}, none of them af360's own, so af360 could not confirm the grant it was reading was its own - nothing was stored`};let i=function(a){if(0===a.length)return{readOnly:!0,detail:"the App is authorized but not installed on any account yet"};let b=[];for(let c of a)for(let[a,d]of Object.entries(c.permissions??{}))w.has(String(d).toLowerCase())||b.push(`${a}: ${d}${c.account?.login?` on ${c.account.login}`:""}`);return 0===b.length?{readOnly:!0,detail:`the App is installed read-only on ${a.length} account${1===a.length?"":"s"}`}:{readOnly:!1,detail:`the installation grants ${b.slice(0,3).join(", ")}${b.length>3?` and ${b.length-3} more`:""}`}}(g);if(!i.readOnly)return{kind:"refused-write",detail:i.detail};let j=[],k=0;for(let c of g){if("number"!=typeof c.id)continue;b??=c.id;let d=await l(c.id,a);if(!d.ok){k++;continue}for(let a of d.value.body.repositories??[])a.full_name&&j.push(a.full_name)}return{kind:"ok",login:d,repoNames:j,scopesRead:!0,expiryKnown:!1,installationId:b,installationCount:g.length,reposUnread:k}},facts:async function a(a){let b,c=Date.now(),d=await I();if(!d)return{at:c,byPath:{},outage:{kind:"unauthorized",reason:"af360 holds no GitHub token"}};if(d.expiresAt&&Date.parse(d.expiresAt)<=c)return{at:c,byPath:{},outage:{kind:"expired",reason:"the GitHub token's expiry date has passed"}};let e=a.map(a=>({s:a,repo:function(a){if(!a)return null;let b=a.trim(),c=null,d=null,e=/^(?:[A-Za-z0-9._-]+@)?([A-Za-z0-9._-]+):(.+)$/.exec(b);if(e&&!/^[A-Za-z][A-Za-z0-9+.-]*:\/\//.test(b))c=e[1].toLowerCase(),d=e[2];else try{let a=new URL(b);c=a.hostname.toLowerCase(),d=a.pathname}catch{return null}if("github.com"!==c&&"www.github.com"!==c)return null;let f=(d??"").replace(/^\/+/,"").replace(/\.git$/i,"").split("/").filter(Boolean);if(2!==f.length)return null;let[g,h]=f,i=a=>/^[A-Za-z0-9._-]{1,100}$/.test(a)&&"."!==a&&".."!==a;return i(g)&&i(h)?{owner:g,name:h}:null}(a.remoteUrl)})).filter(a=>null!==a.repo),g={},h=e.slice(0,25);for(let a of e.slice(25))g[a.s.path.toLowerCase()]=f("past-ceiling","af360 asks GitHub about at most 25 repositories in one scan, and this one was past that");let i=0,j=Array.from({length:Math.min(4,h.length)},async()=>{for(;;){if(b)return;let a=i++;if(a>=h.length)return;let{s:c,repo:e}=h[a],f=await x(c,e.owner,e.name,d.token);if(!f.ok&&("ratelimited"===f.kind||"expired"===f.kind)){b={kind:f.kind,reason:f.reason};return}g[c.path.toLowerCase()]=f}});return await Promise.all(j),{at:c,byPath:g,outage:b}},expiry:function(a){return a.connected&&a.expiryKnown&&a.expiresAt&&Number.isFinite(Date.parse(a.expiresAt))?{id:"connector:github",name:"GitHub token (af360 stops seeing CI, PRs and issues)",date:a.expiresAt}:null},unmeasuredLine:a=>s[a]},z=null,A=null,B="This build of af360 has no GitHub App registration, so it cannot renew access",C=0,D=6e4;function E(a,b){C=b+D,D=Math.min(2*D,18e5),A!==a&&(A=a,z={ok:!1,reason:a})}function F(){let a=z;return z=null,a}async function G(a){let b=await r(a.token);if(!b.ok)return null;let c=a.refreshToken;if(c){let a=await r(c);c=a.ok?a.token:void 0}return{...a,token:b.token,refreshToken:c}}async function H(a){let b={...a,token:(await q(a.token)).stored};return a.refreshToken&&(b.refreshToken=(await q(a.refreshToken)).stored),b}async function I(a=Date.now()){try{let b=await (0,m.G5)(),d=b.config?.connectors?.github;if(!d||"string"!=typeof d.token||!d.token)return null;let e=await G(d);if(!e)return null;let f=e.expiresAt?Date.parse(e.expiresAt):NaN;if(!Number.isFinite(f)||f-a>3e5)return A=null,C=0,D=6e4,e;if(!e.refreshToken)return e;let{APP_CONFIGURED:g}=await Promise.resolve().then(c.bind(c,4683));if(!g)return E(B,a),e;if(A&&a<C)return e;return E("af360 cannot renew this sign-in with GitHub - press Connect to sign in again",a),e}catch{return null}}async function J(){let a,b={id:y.id,label:y.label,connected:!1},d=null;try{let a=await (0,m.G5)();d=a.config?.connectors?.github??null}catch{return b}if(!d?.token)return b;if(!(await r(d.token)).ok)return{...b,connected:!0,unreadable:!0,login:d.login,repoNames:d.repoNames,repoCount:d.repoNames?.length,connectedAt:d.connectedAt};let e=!1;try{let{cachedGithubScan:b}=await c.e(6988).then(c.bind(c,26988)),d=await b(),f=d?.outage?.kind;if(!f){for(let a of Object.values(d?.byPath??{}))if(!a.ok&&("unauthorized"===a.kind||"expired"===a.kind)){f=a.kind;break}}("unauthorized"===f||"expired"===f)&&(a=f),d&&!d.outage&&(e=Object.values(d.byPath??{}).some(a=>a.ok))}catch{}return K&&(e=!0),{...b,connected:!0,refusal:a,verified:e,login:d.login,repoNames:d.repoNames,repoCount:d.repoNames?.length,reposKnown:d.reposKnown,installationCount:d.installationCount,expiryKnown:!1,connectedAt:d.connectedAt}}let K=!1;async function L(a,b,c){let d=await (0,m.G5)();if("unreadable"===d.status||!d.config)throw Error("af360 could not read its own settings, so it did not store anything");let e=d.config;e.connectors={...e.connectors,github:await H({token:a,login:b.login,repoNames:b.repoNames,reposKnown:(b.reposUnread??0)===0,installationId:b.installationId,installationCount:b.installationCount,connectedAt:Date.now(),...c?{expiresAt:new Date(c.expiresAt).toISOString(),refreshToken:c.refreshToken,refreshExpiresAt:new Date(c.refreshExpiresAt).toISOString()}:{}})},await (0,m.ql)(e),K=!0}async function M(){var a;let b=await (0,m.G5)();if("unreadable"===b.status||!b.config)throw Error("af360 could not read its own settings, so it changed nothing");let c=b.config;"string"==typeof(a=c.connectors?.github?.token)?p.delete(a):p.clear(),c.connectors&&delete c.connectors.github,await (0,m.ql)(c),K=!1}},46995:(a,b,c)=>{c.d(b,{$:()=>i,bridge:()=>k});var d=c(79646),e=c(29021),f=c(33873),g=c(79551);let h=f.resolve(f.dirname((0,g.fileURLToPath)("file:///C:/dev/af360/lib/bridge.mjs")),"..");function i(){let a=process.env.AF360_BRIDGE;return a?(0,e.existsSync)(a)?a:null:j()}function j(){for(let a of[f.join(h,"af360-bridge.exe"),f.join(h,"shell","bin","af360-bridge.exe")])if((0,e.existsSync)(a))return a;return null}function k(a,b="",{fixedPath:c=!1,timeout:e=15e3}={}){let f=c?j():i();return f?new Promise(c=>{let g=(0,d.execFile)(f,[a],{windowsHide:!0,timeout:e,maxBuffer:1e6},(a,b,d)=>{if(a)return void c({ok:!1,reason:String(d||"").trim()||(a.killed?"timeout":"failed")});c({ok:!0,out:String(b||"").trim()})});g.stdin.on("error",()=>{}),g.stdin.end(b)}):Promise.resolve({ok:!1,reason:"absent"})}}};