six-degrees 0.7.0 → 1.0.0

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 (360) hide show
  1. package/.next/standalone/.next/BUILD_ID +1 -1
  2. package/.next/standalone/.next/app-path-routes-manifest.json +1 -0
  3. package/.next/standalone/.next/build-manifest.json +3 -3
  4. package/.next/standalone/.next/prerender-manifest.json +32 -4
  5. package/.next/standalone/.next/routes-manifest.json +6 -0
  6. package/.next/standalone/.next/server/app/_global-error.html +1 -1
  7. package/.next/standalone/.next/server/app/_global-error.rsc +1 -1
  8. package/.next/standalone/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  9. package/.next/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  10. package/.next/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  11. package/.next/standalone/.next/server/app/_not-found/page.js.nft.json +1 -1
  12. package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  13. package/.next/standalone/.next/server/app/_not-found.html +1 -1
  14. package/.next/standalone/.next/server/app/_not-found.rsc +16 -16
  15. package/.next/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +16 -16
  16. package/.next/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +14 -14
  17. package/.next/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  18. package/.next/standalone/.next/server/app/api/admin-delete/route.js +1 -1
  19. package/.next/standalone/.next/server/app/api/admin-delete/route.js.nft.json +1 -1
  20. package/.next/standalone/.next/server/app/api/admin-update/route.js +1 -1
  21. package/.next/standalone/.next/server/app/api/admin-update/route.js.nft.json +1 -1
  22. package/.next/standalone/.next/server/app/api/bridges/route.js +1 -1
  23. package/.next/standalone/.next/server/app/api/bridges/route.js.nft.json +1 -1
  24. package/.next/standalone/.next/server/app/api/bulk-import/route.js +1 -1
  25. package/.next/standalone/.next/server/app/api/bulk-import/route.js.nft.json +1 -1
  26. package/.next/standalone/.next/server/app/api/company-scores/legacy/route.js.nft.json +1 -1
  27. package/.next/standalone/.next/server/app/api/company-scores/route.js.nft.json +1 -1
  28. package/.next/standalone/.next/server/app/api/connections/route.js +1 -1
  29. package/.next/standalone/.next/server/app/api/connections/route.js.nft.json +1 -1
  30. package/.next/standalone/.next/server/app/api/data/backup/route.js.nft.json +1 -1
  31. package/.next/standalone/.next/server/app/api/data/csv/route.js.nft.json +1 -1
  32. package/.next/standalone/.next/server/app/api/data/export/route.js.nft.json +1 -1
  33. package/.next/standalone/.next/server/app/api/data/import/route.js.nft.json +1 -1
  34. package/.next/standalone/.next/server/app/api/data/restart/route.js.nft.json +1 -1
  35. package/.next/standalone/.next/server/app/api/data/restore/route.js.nft.json +1 -1
  36. package/.next/standalone/.next/server/app/api/data/reveal/route.js.nft.json +1 -1
  37. package/.next/standalone/.next/server/app/api/data/route.js.nft.json +1 -1
  38. package/.next/standalone/.next/server/app/api/delete-cluster/route.js +1 -1
  39. package/.next/standalone/.next/server/app/api/delete-cluster/route.js.nft.json +1 -1
  40. package/.next/standalone/.next/server/app/api/ingest/route.js +1 -1
  41. package/.next/standalone/.next/server/app/api/ingest/route.js.nft.json +1 -1
  42. package/.next/standalone/.next/server/app/api/network/route.js +1 -1
  43. package/.next/standalone/.next/server/app/api/network/route.js.nft.json +1 -1
  44. package/.next/standalone/.next/server/app/api/notifications/route.js +1 -1
  45. package/.next/standalone/.next/server/app/api/notifications/route.js.nft.json +1 -1
  46. package/.next/standalone/.next/server/app/api/outreach/route.js +3 -3
  47. package/.next/standalone/.next/server/app/api/outreach/route.js.nft.json +1 -1
  48. package/.next/standalone/.next/server/app/api/queue/route.js +1 -1
  49. package/.next/standalone/.next/server/app/api/queue/route.js.nft.json +1 -1
  50. package/.next/standalone/.next/server/app/api/scraper/route.js +4 -4
  51. package/.next/standalone/.next/server/app/api/scraper/route.js.nft.json +1 -1
  52. package/.next/standalone/.next/server/app/api/settings/route.js.nft.json +1 -1
  53. package/.next/standalone/.next/server/app/api/settings/sector-preview/route.js.nft.json +1 -1
  54. package/.next/standalone/.next/server/app/api/settings/sector-suggestions/route.js.nft.json +1 -1
  55. package/.next/standalone/.next/server/app/api/setup-profile/route.js +1 -1
  56. package/.next/standalone/.next/server/app/api/setup-profile/route.js.nft.json +1 -1
  57. package/.next/standalone/.next/server/app/api/social/crm/route.js.nft.json +1 -1
  58. package/.next/standalone/.next/server/app/api/social/messages/route.js.nft.json +1 -1
  59. package/.next/standalone/.next/server/app/api/social/route.js +1 -1
  60. package/.next/standalone/.next/server/app/api/social/route.js.nft.json +1 -1
  61. package/.next/standalone/.next/server/app/api/unlock/route.js +1 -1
  62. package/.next/standalone/.next/server/app/api/unlock/route.js.nft.json +1 -1
  63. package/.next/standalone/.next/server/app/api/update/route.js.nft.json +1 -1
  64. package/.next/standalone/.next/server/app/api/update-images/route.js +1 -1
  65. package/.next/standalone/.next/server/app/api/update-images/route.js.nft.json +1 -1
  66. package/.next/standalone/.next/server/app/api/users/route.js +1 -1
  67. package/.next/standalone/.next/server/app/api/users/route.js.nft.json +1 -1
  68. package/.next/standalone/.next/server/app/avatars/[file]/route.js.nft.json +1 -1
  69. package/.next/standalone/.next/server/app/import/page.js.nft.json +1 -1
  70. package/.next/standalone/.next/server/app/import/page_client-reference-manifest.js +1 -1
  71. package/.next/standalone/.next/server/app/import.html +1 -1
  72. package/.next/standalone/.next/server/app/import.rsc +18 -18
  73. package/.next/standalone/.next/server/app/import.segments/_full.segment.rsc +18 -18
  74. package/.next/standalone/.next/server/app/import.segments/_tree.segment.rsc +2 -2
  75. package/.next/standalone/.next/server/app/import.segments/import/__PAGE__.segment.rsc +16 -16
  76. package/.next/standalone/.next/server/app/index.html +1 -1
  77. package/.next/standalone/.next/server/app/index.rsc +19 -19
  78. package/.next/standalone/.next/server/app/index.segments/__PAGE__.segment.rsc +16 -16
  79. package/.next/standalone/.next/server/app/index.segments/_full.segment.rsc +19 -19
  80. package/.next/standalone/.next/server/app/index.segments/_tree.segment.rsc +2 -2
  81. package/.next/standalone/.next/server/app/insights/page/app-paths-manifest.json +3 -0
  82. package/.next/standalone/.next/server/app/insights/page/build-manifest.json +20 -0
  83. package/.next/standalone/.next/server/app/insights/page/next-font-manifest.json +11 -0
  84. package/.next/standalone/.next/server/app/insights/page/react-loadable-manifest.json +1 -0
  85. package/.next/standalone/.next/server/app/insights/page/server-reference-manifest.json +4 -0
  86. package/.next/standalone/.next/server/app/insights/page.js +13 -0
  87. package/.next/standalone/.next/server/app/insights/page.js.map +5 -0
  88. package/.next/standalone/.next/server/app/insights/page.js.nft.json +1 -0
  89. package/.next/standalone/.next/server/app/insights/page_client-reference-manifest.js +3 -0
  90. package/.next/standalone/.next/server/app/insights.html +1 -0
  91. package/.next/standalone/.next/server/app/insights.meta +26 -0
  92. package/.next/standalone/.next/server/app/insights.rsc +35 -0
  93. package/.next/standalone/.next/server/app/insights.segments/_full.segment.rsc +35 -0
  94. package/.next/standalone/.next/server/app/insights.segments/_tree.segment.rsc +4 -0
  95. package/.next/standalone/.next/server/app/insights.segments/insights/__PAGE__.segment.rsc +33 -0
  96. package/.next/standalone/.next/server/app/launch/page.js.nft.json +1 -1
  97. package/.next/standalone/.next/server/app/launch/page_client-reference-manifest.js +1 -1
  98. package/.next/standalone/.next/server/app/launch.html +2 -2
  99. package/.next/standalone/.next/server/app/launch.rsc +18 -18
  100. package/.next/standalone/.next/server/app/launch.segments/_full.segment.rsc +18 -18
  101. package/.next/standalone/.next/server/app/launch.segments/_tree.segment.rsc +2 -2
  102. package/.next/standalone/.next/server/app/launch.segments/launch/__PAGE__.segment.rsc +16 -16
  103. package/.next/standalone/.next/server/app/page.js.nft.json +1 -1
  104. package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
  105. package/.next/standalone/.next/server/app/paths/page.js.nft.json +1 -1
  106. package/.next/standalone/.next/server/app/paths/page_client-reference-manifest.js +1 -1
  107. package/.next/standalone/.next/server/app/paths.html +1 -1
  108. package/.next/standalone/.next/server/app/paths.rsc +19 -19
  109. package/.next/standalone/.next/server/app/paths.segments/_full.segment.rsc +19 -19
  110. package/.next/standalone/.next/server/app/paths.segments/_tree.segment.rsc +2 -2
  111. package/.next/standalone/.next/server/app/paths.segments/paths/__PAGE__.segment.rsc +16 -16
  112. package/.next/standalone/.next/server/app/profile/page.js.nft.json +1 -1
  113. package/.next/standalone/.next/server/app/profile/page_client-reference-manifest.js +1 -1
  114. package/.next/standalone/.next/server/app/profile.html +1 -1
  115. package/.next/standalone/.next/server/app/profile.rsc +19 -19
  116. package/.next/standalone/.next/server/app/profile.segments/_full.segment.rsc +19 -19
  117. package/.next/standalone/.next/server/app/profile.segments/_tree.segment.rsc +2 -2
  118. package/.next/standalone/.next/server/app/profile.segments/profile/__PAGE__.segment.rsc +16 -16
  119. package/.next/standalone/.next/server/app/queue/page.js.nft.json +1 -1
  120. package/.next/standalone/.next/server/app/queue/page_client-reference-manifest.js +1 -1
  121. package/.next/standalone/.next/server/app/queue.html +1 -1
  122. package/.next/standalone/.next/server/app/queue.rsc +19 -19
  123. package/.next/standalone/.next/server/app/queue.segments/_full.segment.rsc +19 -19
  124. package/.next/standalone/.next/server/app/queue.segments/_tree.segment.rsc +2 -2
  125. package/.next/standalone/.next/server/app/queue.segments/queue/__PAGE__.segment.rsc +21 -20
  126. package/.next/standalone/.next/server/app/scores/page.js.nft.json +1 -1
  127. package/.next/standalone/.next/server/app/scores/page_client-reference-manifest.js +1 -1
  128. package/.next/standalone/.next/server/app/scores.html +1 -1
  129. package/.next/standalone/.next/server/app/scores.rsc +18 -18
  130. package/.next/standalone/.next/server/app/scores.segments/_full.segment.rsc +18 -18
  131. package/.next/standalone/.next/server/app/scores.segments/_tree.segment.rsc +2 -2
  132. package/.next/standalone/.next/server/app/scores.segments/scores/__PAGE__.segment.rsc +16 -16
  133. package/.next/standalone/.next/server/app/settings/page.js.nft.json +1 -1
  134. package/.next/standalone/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  135. package/.next/standalone/.next/server/app/settings.html +1 -1
  136. package/.next/standalone/.next/server/app/settings.rsc +19 -19
  137. package/.next/standalone/.next/server/app/settings.segments/_full.segment.rsc +19 -19
  138. package/.next/standalone/.next/server/app/settings.segments/_tree.segment.rsc +2 -2
  139. package/.next/standalone/.next/server/app/settings.segments/settings/__PAGE__.segment.rsc +16 -16
  140. package/.next/standalone/.next/server/app/setup/page.js.nft.json +1 -1
  141. package/.next/standalone/.next/server/app/setup/page_client-reference-manifest.js +1 -1
  142. package/.next/standalone/.next/server/app/setup.html +1 -1
  143. package/.next/standalone/.next/server/app/setup.rsc +19 -19
  144. package/.next/standalone/.next/server/app/setup.segments/_full.segment.rsc +19 -19
  145. package/.next/standalone/.next/server/app/setup.segments/_tree.segment.rsc +2 -2
  146. package/.next/standalone/.next/server/app/setup.segments/setup/__PAGE__.segment.rsc +16 -16
  147. package/.next/standalone/.next/server/app/social/page.js.nft.json +1 -1
  148. package/.next/standalone/.next/server/app/social/page_client-reference-manifest.js +1 -1
  149. package/.next/standalone/.next/server/app/social.html +1 -1
  150. package/.next/standalone/.next/server/app/social.rsc +18 -18
  151. package/.next/standalone/.next/server/app/social.segments/_full.segment.rsc +18 -18
  152. package/.next/standalone/.next/server/app/social.segments/_tree.segment.rsc +2 -2
  153. package/.next/standalone/.next/server/app/social.segments/social/__PAGE__.segment.rsc +16 -16
  154. package/.next/standalone/.next/server/app-paths-manifest.json +1 -0
  155. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__063s0x7._.js → [root-of-the-server]__0r-0t-9._.js} +1 -1
  156. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0ra6xyg._.js +15 -0
  157. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__20rwfdw._.js → [root-of-the-server]__0rcpjad._.js} +5 -2
  158. package/.next/standalone/.next/server/chunks/_1_fynia._.js +7 -7
  159. package/.next/standalone/.next/server/chunks/_1itd1o_._.js +1 -1
  160. package/.next/standalone/.next/server/chunks/lib_02iz_9q._.js +2 -2
  161. package/.next/standalone/.next/server/chunks/lib_05agvk3._.js +2 -2
  162. package/.next/standalone/.next/server/chunks/lib_0v84u66._.js +2 -2
  163. package/.next/standalone/.next/server/chunks/lib_db-client_0_dch35.js +9 -9
  164. package/.next/standalone/.next/server/chunks/{lib_rpc_0jnfp2e.js → lib_rpc_00nndai.js} +1 -1
  165. package/.next/standalone/.next/server/chunks/{lib_rpc_0b17r6v.js → lib_rpc_03ibb-x.js} +1 -1
  166. package/.next/standalone/.next/server/chunks/{lib_rpc_0doq0t-.js → lib_rpc_03ri3ji.js} +1 -1
  167. package/.next/standalone/.next/server/chunks/{lib_rpc_0fd2rlw.js → lib_rpc_078ce48.js} +1 -1
  168. package/.next/standalone/.next/server/chunks/lib_rpc_0a69mgr.js +3 -0
  169. package/.next/standalone/.next/server/chunks/{lib_rpc_005abye.js → lib_rpc_0cej3t8.js} +1 -1
  170. package/.next/standalone/.next/server/chunks/lib_rpc_0cmh4g6.js +3 -0
  171. package/.next/standalone/.next/server/chunks/lib_rpc_0nx2_pc.js +3 -0
  172. package/.next/standalone/.next/server/chunks/lib_rpc_0r79-w1.js +3 -0
  173. package/.next/standalone/.next/server/chunks/lib_rpc_0yx8ynd.js +3 -0
  174. package/.next/standalone/.next/server/chunks/lib_rpc_12p-o9-.js +3 -0
  175. package/.next/standalone/.next/server/chunks/lib_rpc_1466dnb.js +3 -0
  176. package/.next/standalone/.next/server/chunks/{lib_rpc_0is4qoc.js → lib_rpc_1hjjjr4.js} +1 -1
  177. package/.next/standalone/.next/server/chunks/lib_rpc_1sryxv6.js +3 -0
  178. package/.next/standalone/.next/server/chunks/lib_rpc_1trn-x5.js +3 -0
  179. package/.next/standalone/.next/server/chunks/lib_rpc_1ygu_mv.js +3 -0
  180. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0egamyq._.js +3 -0
  181. package/.next/standalone/.next/server/chunks/ssr/_04am_h8._.js +3 -0
  182. package/.next/standalone/.next/server/chunks/ssr/_07zb7lu._.js +1 -1
  183. package/.next/standalone/.next/server/chunks/ssr/_0_79idq._.js +1 -1
  184. package/.next/standalone/.next/server/chunks/ssr/_0gds903._.js +3 -0
  185. package/.next/standalone/.next/server/chunks/ssr/_0klqt9z._.js +3 -0
  186. package/.next/standalone/.next/server/chunks/ssr/{_1k9qfsk._.js → _14jak5s._.js} +6 -2
  187. package/.next/standalone/.next/server/chunks/ssr/_14nxd3q._.js +1 -1
  188. package/.next/standalone/.next/server/chunks/ssr/_1cj2yog._.js +3 -0
  189. package/.next/standalone/.next/server/chunks/ssr/_1fm1ih_._.js +1 -1
  190. package/.next/standalone/.next/server/chunks/ssr/_1hdqw0-._.js +7 -0
  191. package/.next/standalone/.next/server/chunks/ssr/_1k2nmbw._.js +1 -1
  192. package/.next/standalone/.next/server/chunks/ssr/{_0gy11ar._.js → _1r62six._.js} +6 -2
  193. package/.next/standalone/.next/server/chunks/ssr/_next-internal_server_app_insights_page_actions_0-0tf75.js +3 -0
  194. package/.next/standalone/.next/server/chunks/ssr/app_components_0uuff77._.js +2 -2
  195. package/.next/standalone/.next/server/chunks/ssr/app_components_1j3q-h5._.js +2 -2
  196. package/.next/standalone/.next/server/chunks/ssr/{_01o3i5y._.js → app_components_settings_SectorPicker_1c-29qw.js} +2 -6
  197. package/.next/standalone/.next/server/chunks/ssr/app_components_ui_0pdmz2z.js +3 -0
  198. package/.next/standalone/.next/server/chunks/ssr/app_insights_page_1d_chja.js +3 -0
  199. package/.next/standalone/.next/server/chunks/ssr/app_page_1fazqbf.js +14 -14
  200. package/.next/standalone/.next/server/chunks/ssr/app_queue_page_0c6znd6.js +3 -3
  201. package/.next/standalone/.next/server/chunks/ssr/app_settings_page_1f8mjj_.js +1 -1
  202. package/.next/standalone/.next/server/chunks/ssr/app_setup_page_1-282zx.js +4 -4
  203. package/.next/standalone/.next/server/middleware-build-manifest.js +3 -3
  204. package/.next/standalone/.next/server/middleware-manifest.json +5 -5
  205. package/.next/standalone/.next/server/next-font-manifest.js +1 -1
  206. package/.next/standalone/.next/server/next-font-manifest.json +4 -0
  207. package/.next/standalone/.next/server/pages/404.html +1 -1
  208. package/.next/standalone/.next/server/pages/500.html +1 -1
  209. package/.next/standalone/.next/server/prefetch-hints.json +14 -0
  210. package/.next/standalone/.next/server/server-reference-manifest.js +1 -1
  211. package/.next/standalone/.next/server/server-reference-manifest.json +1 -1
  212. package/.next/standalone/.next/static/chunks/02wnf8dkxegxg.js +34 -0
  213. package/.next/standalone/.next/static/chunks/0hggugbh84m4t.js +21 -0
  214. package/.next/{static/chunks/2eo9pqq9gay3r.js → standalone/.next/static/chunks/0ka4prpk3w9wn.js} +4 -4
  215. package/.next/standalone/.next/static/chunks/0s_xxwp7z88vv.js +1 -0
  216. package/.next/standalone/.next/static/chunks/1-nnl8amfm4yh.js +57 -0
  217. package/.next/{static/chunks/44yn0tcd9dfk3.js → standalone/.next/static/chunks/1bkt_hhjzvbh8.js} +1 -1
  218. package/.next/standalone/.next/static/chunks/1cmphb3kh2ers.css +3 -0
  219. package/.next/{static/chunks/1qbjermbf68xj.js → standalone/.next/static/chunks/1d8yv3k_atka7.js} +1 -1
  220. package/.next/standalone/.next/static/chunks/1ods5h86raivz.js +1 -0
  221. package/.next/standalone/.next/static/chunks/23hc51oa4vkhc.js +5 -0
  222. package/.next/standalone/.next/static/chunks/27n8k9wxlz5-7.js +1 -0
  223. package/.next/standalone/.next/static/chunks/{0p3g5tfostsep.js → 2q9i7pcxcnph1.js} +2 -2
  224. package/.next/{static/chunks/2zf4jmz9l3li2.js → standalone/.next/static/chunks/2w-y83mjlpnse.js} +1 -1
  225. package/.next/standalone/.next/static/chunks/2ws1xf293j-tm.js +5 -0
  226. package/.next/standalone/.next/static/chunks/3cqn-r-y5rrw1.js +5 -0
  227. package/.next/standalone/.next/static/chunks/3opgg1efrx8q6.js +1 -0
  228. package/.next/standalone/.next/static/chunks/3p51fpxxi4d5y.js +34 -0
  229. package/.next/{static/chunks/0an_b6zi1r_qq.js → standalone/.next/static/chunks/3y40z6of3r9py.js} +1 -5
  230. package/.next/standalone/.next/static/chunks/403dpflln8ah5.js +1 -0
  231. package/.next/standalone/CHANGELOG.md +83 -0
  232. package/.next/standalone/README.md +40 -14
  233. package/.next/standalone/SECURITY.md +17 -4
  234. package/.next/standalone/app/api/outreach/route.js +13 -73
  235. package/.next/standalone/app/api/scraper/route.js +106 -5
  236. package/.next/standalone/app/components/AppHeader.js +22 -6
  237. package/.next/standalone/app/components/AppTabs.js +4 -0
  238. package/.next/standalone/app/components/AutoConnect.js +286 -0
  239. package/.next/standalone/app/components/ChainView.js +75 -2
  240. package/.next/standalone/app/components/FilterPanel.js +8 -1
  241. package/.next/standalone/app/components/LinkedInLimits.js +38 -13
  242. package/.next/standalone/app/components/OutlinkQuest.js +32 -11
  243. package/.next/standalone/app/components/ScanStatusBar.js +18 -3
  244. package/.next/standalone/app/components/ScanTrail.js +13 -3
  245. package/.next/standalone/app/components/SeparationView.js +6 -22
  246. package/.next/standalone/app/components/Sidebar.js +147 -38
  247. package/.next/standalone/app/components/insights/Boards.js +275 -0
  248. package/.next/standalone/app/components/insights/PeopleView.js +266 -0
  249. package/.next/standalone/app/components/insights/Rail.js +156 -0
  250. package/.next/standalone/app/components/insights/Report.js +382 -0
  251. package/.next/standalone/app/components/insights/parts.js +239 -0
  252. package/.next/standalone/app/components/settings/UsageSection.js +50 -3
  253. package/.next/standalone/app/globals.css +2 -3
  254. package/.next/standalone/app/insights/page.js +220 -0
  255. package/.next/standalone/app/page.js +1 -17
  256. package/.next/standalone/app/queue/page.js +30 -18
  257. package/.next/standalone/app/setup/page.js +71 -13
  258. package/.next/standalone/install.sh +7 -6
  259. package/.next/standalone/lib/auto-connect.js +145 -0
  260. package/.next/standalone/lib/companies.js +1 -1
  261. package/.next/standalone/lib/in-progress.js +46 -0
  262. package/.next/standalone/lib/insights-board.js +613 -0
  263. package/.next/standalone/lib/linkedin-limits.js +36 -11
  264. package/.next/standalone/lib/requests-client.js +10 -0
  265. package/.next/standalone/lib/requests.js +124 -0
  266. package/.next/standalone/lib/scan-state.js +1 -0
  267. package/.next/standalone/lib/scanner-setup.js +82 -3
  268. package/.next/standalone/lib/scraper-client.js +18 -5
  269. package/.next/standalone/lib/settings.js +6 -0
  270. package/.next/standalone/lib/usage.js +5 -0
  271. package/.next/standalone/package-lock.json +2 -2
  272. package/.next/standalone/package.json +1 -1
  273. package/.next/standalone/scripts/build-app.mjs +167 -11
  274. package/.next/standalone/scripts/build-desktop.mjs +3 -2
  275. package/.next/standalone/scripts/ci-mac-signing.sh +128 -0
  276. package/.next/standalone/scripts/entitlements/electron.plist +23 -0
  277. package/.next/standalone/scripts/entitlements/node.plist +27 -0
  278. package/.next/standalone/scripts/mac-sign.mjs +563 -0
  279. package/.next/standalone/scripts/make-dmg-background.mjs +2 -1
  280. package/.next/standalone/scripts/scrape.py +569 -9
  281. package/.next/standalone/scripts/set-signing-secrets.sh +96 -0
  282. package/.next/static/chunks/02wnf8dkxegxg.js +34 -0
  283. package/.next/static/chunks/0hggugbh84m4t.js +21 -0
  284. package/.next/{standalone/.next/static/chunks/2eo9pqq9gay3r.js → static/chunks/0ka4prpk3w9wn.js} +4 -4
  285. package/.next/static/chunks/0s_xxwp7z88vv.js +1 -0
  286. package/.next/static/chunks/1-nnl8amfm4yh.js +57 -0
  287. package/.next/{standalone/.next/static/chunks/44yn0tcd9dfk3.js → static/chunks/1bkt_hhjzvbh8.js} +1 -1
  288. package/.next/static/chunks/1cmphb3kh2ers.css +3 -0
  289. package/.next/{standalone/.next/static/chunks/1qbjermbf68xj.js → static/chunks/1d8yv3k_atka7.js} +1 -1
  290. package/.next/static/chunks/1ods5h86raivz.js +1 -0
  291. package/.next/static/chunks/23hc51oa4vkhc.js +5 -0
  292. package/.next/static/chunks/27n8k9wxlz5-7.js +1 -0
  293. package/.next/static/chunks/{0p3g5tfostsep.js → 2q9i7pcxcnph1.js} +2 -2
  294. package/.next/{standalone/.next/static/chunks/2zf4jmz9l3li2.js → static/chunks/2w-y83mjlpnse.js} +1 -1
  295. package/.next/static/chunks/2ws1xf293j-tm.js +5 -0
  296. package/.next/static/chunks/3cqn-r-y5rrw1.js +5 -0
  297. package/.next/static/chunks/3opgg1efrx8q6.js +1 -0
  298. package/.next/static/chunks/3p51fpxxi4d5y.js +34 -0
  299. package/.next/{standalone/.next/static/chunks/0an_b6zi1r_qq.js → static/chunks/3y40z6of3r9py.js} +1 -5
  300. package/.next/static/chunks/403dpflln8ah5.js +1 -0
  301. package/CHANGELOG.md +83 -0
  302. package/README.md +40 -14
  303. package/SECURITY.md +17 -4
  304. package/lib/auto-connect.js +145 -0
  305. package/lib/companies.js +1 -1
  306. package/lib/in-progress.js +46 -0
  307. package/lib/insights-board.js +613 -0
  308. package/lib/linkedin-limits.js +36 -11
  309. package/lib/requests-client.js +10 -0
  310. package/lib/requests.js +124 -0
  311. package/lib/scan-state.js +1 -0
  312. package/lib/scanner-setup.js +82 -3
  313. package/lib/scraper-client.js +18 -5
  314. package/lib/settings.js +6 -0
  315. package/lib/usage.js +5 -0
  316. package/package.json +1 -1
  317. package/scripts/scrape.py +569 -9
  318. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0_4y8z7._.js +0 -8
  319. package/.next/standalone/.next/server/chunks/_02twlca._.js +0 -10
  320. package/.next/standalone/.next/server/chunks/lib_rpc_0nef_n7.js +0 -3
  321. package/.next/standalone/.next/server/chunks/lib_rpc_0plrzra.js +0 -3
  322. package/.next/standalone/.next/server/chunks/lib_rpc_13a4m0c.js +0 -3
  323. package/.next/standalone/.next/server/chunks/lib_rpc_1if17c-.js +0 -3
  324. package/.next/standalone/.next/server/chunks/lib_rpc_1j-zw7v.js +0 -3
  325. package/.next/standalone/.next/server/chunks/lib_rpc_1sngt-q.js +0 -3
  326. package/.next/standalone/.next/server/chunks/lib_rpc_1v2sgme.js +0 -3
  327. package/.next/standalone/.next/server/chunks/lib_rpc_1vh-tgx.js +0 -3
  328. package/.next/standalone/.next/server/chunks/lib_rpc_1zaubz7.js +0 -3
  329. package/.next/standalone/.next/server/chunks/ssr/_02sband._.js +0 -7
  330. package/.next/standalone/.next/server/chunks/ssr/_189g8lg._.js +0 -3
  331. package/.next/standalone/.next/server/chunks/ssr/_1f_n00p._.js +0 -3
  332. package/.next/standalone/.next/server/chunks/ssr/app_components_0t908t-._.js +0 -3
  333. package/.next/standalone/.next/static/chunks/0e3g0sil79cus.js +0 -21
  334. package/.next/standalone/.next/static/chunks/0zd0t7e60bn4z.js +0 -1
  335. package/.next/standalone/.next/static/chunks/163b-20vwa06i.js +0 -34
  336. package/.next/standalone/.next/static/chunks/1pa-2v1ajvrko.js +0 -1
  337. package/.next/standalone/.next/static/chunks/23_1z47al92nz.js +0 -57
  338. package/.next/standalone/.next/static/chunks/260bomtr214m8.js +0 -34
  339. package/.next/standalone/.next/static/chunks/2xk2ra4piiuod.js +0 -34
  340. package/.next/standalone/.next/static/chunks/3b0-14cxqsprt.js +0 -1
  341. package/.next/standalone/.next/static/chunks/3jarus1_38s2z.js +0 -1
  342. package/.next/standalone/.next/static/chunks/3ssu341hav_sq.css +0 -3
  343. package/.next/standalone/.next/static/chunks/3v1qd3sqhqn0d.js +0 -1
  344. package/.next/static/chunks/0e3g0sil79cus.js +0 -21
  345. package/.next/static/chunks/0zd0t7e60bn4z.js +0 -1
  346. package/.next/static/chunks/163b-20vwa06i.js +0 -34
  347. package/.next/static/chunks/1pa-2v1ajvrko.js +0 -1
  348. package/.next/static/chunks/23_1z47al92nz.js +0 -57
  349. package/.next/static/chunks/260bomtr214m8.js +0 -34
  350. package/.next/static/chunks/2xk2ra4piiuod.js +0 -34
  351. package/.next/static/chunks/3b0-14cxqsprt.js +0 -1
  352. package/.next/static/chunks/3jarus1_38s2z.js +0 -1
  353. package/.next/static/chunks/3ssu341hav_sq.css +0 -3
  354. package/.next/static/chunks/3v1qd3sqhqn0d.js +0 -1
  355. /package/.next/standalone/.next/static/{ZVpLBK-2vpllv2HxOFs2d → mwCGF3OV3CWV4SjUgg5T8}/_buildManifest.js +0 -0
  356. /package/.next/standalone/.next/static/{ZVpLBK-2vpllv2HxOFs2d → mwCGF3OV3CWV4SjUgg5T8}/_clientMiddlewareManifest.js +0 -0
  357. /package/.next/standalone/.next/static/{ZVpLBK-2vpllv2HxOFs2d → mwCGF3OV3CWV4SjUgg5T8}/_ssgManifest.js +0 -0
  358. /package/.next/static/{ZVpLBK-2vpllv2HxOFs2d → mwCGF3OV3CWV4SjUgg5T8}/_buildManifest.js +0 -0
  359. /package/.next/static/{ZVpLBK-2vpllv2HxOFs2d → mwCGF3OV3CWV4SjUgg5T8}/_clientMiddlewareManifest.js +0 -0
  360. /package/.next/static/{ZVpLBK-2vpllv2HxOFs2d → mwCGF3OV3CWV4SjUgg5T8}/_ssgManifest.js +0 -0
@@ -1,3 +1,3 @@
1
- module.exports=[54209,a=>{"use strict";var b=a.i(87924),c=a.i(72131),d=a.i(38246),e=a.i(36839),f=a.i(16874);function g(){let[a,d]=(0,c.useState)(null);return((0,c.useEffect)(()=>{fetch("/api/update").then(a=>a.json()).then(d).catch(()=>{})},[]),a)?a.installed?(0,b.jsx)(k,{local:a}):(0,b.jsx)(i,{local:a}):null}async function h(a){let b=await fetch("/api/update",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)}),c=await b.json().catch(()=>({}));return{ok:b.ok,d:c}}function i({local:a}){let[d,e]=(0,c.useState)(null),[g,j]=(0,c.useState)(null),[k,l]=(0,c.useState)(null),[m,n]=(0,c.useState)(null);async function o(a){j(a),l(null);try{let{ok:b,d:c}=await h({action:a});if(!b){l(c.error||"Something went wrong."),c.dirty&&e({dirty:c.dirty});return}"check"===a?e(c):(n(c),e(null))}catch(a){l(a.message)}finally{j(null)}}return(0,c.useEffect)(()=>{"updates"===new URLSearchParams(window.location.search).get("check")&&(document.getElementById("updates")?.scrollIntoView({block:"center"}),o("check"),window.history.replaceState(null,"",window.location.pathname))},[]),(0,b.jsxs)(f.Section,{id:"updates",title:"Updates",children:[m?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)(f.Body,{children:["Updated to ",(0,b.jsx)(f.Mono,{children:m.sha}),": “",m.subject,"”."]}),(0,b.jsx)(f.Body,{style:{color:m.needsRestart?"var(--sd-gold, #FFD700)":void 0},children:m.needsRestart?"Stop the app in your terminal and start it again: this update changed how it starts.":"The page will pick up most changes on its own. Restart the app if anything looks odd."})]}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)(f.Body,{children:["You are on ",(0,b.jsx)(f.Mono,{children:a.sha}),": “",a.subject,"”."]}),d&&0===d.behind&&(0,b.jsx)(f.Status,{tone:"ok",children:"You’re up to date."}),d&&d.behind>0&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)(f.Body,{style:{color:"var(--sd-green, #00ff88)"},children:[d.behind," update",1===d.behind?"":"s"," available."]}),(0,b.jsx)("pre",{style:q,children:d.commits.join("\n")})]}),d?.dirty?.length>0&&(0,b.jsxs)(f.Body,{children:["Changed files here:"," ",(0,b.jsx)(f.Mono,{children:d.dirty.join(", ")}),". Commit or discard them first: this will not throw away your work."]}),(0,b.jsxs)(p,{children:[(0,b.jsx)(f.Btn,{onClick:()=>o("check"),disabled:!!g,children:"check"===g?"Checking…":"Check for updates"}),d?.behind>0&&(0,b.jsx)(f.Btn,{onClick:()=>o("pull"),disabled:!!g,primary:!0,children:"pull"===g?"Updating…":`Install ${d.behind} update${1===d.behind?"":"s"}`})]})]}),k&&(0,b.jsx)(f.Body,{style:{color:"var(--sd-red, #ff7676)"},children:k}),(0,b.jsxs)(f.Body,{style:{fontSize:12,color:"var(--sd-fg-4, #667)",marginTop:12},children:["Nothing is checked automatically and nothing about you is sent: this runs the same ",(0,b.jsx)(f.Mono,{children:"git fetch"})," and ",(0,b.jsx)(f.Mono,{children:"git pull"})," you would type yourself."]})]})}let j=["checking","downloading","verifying","preparing","restarting"];function k({local:a}){let d="mac-app"===a.kind,[e,g]=(0,c.useState)(!1),[i,r]=(0,c.useState)(null),[s,t]=(0,c.useState)(null),[u,v]=(0,c.useState)(!1),[w,x]=(0,c.useState)(null),[y,z]=(0,c.useState)(a.job||null),[A,B]=(0,c.useState)(!1),[C,D]=(0,c.useState)(null),[E,F]=(0,c.useState)(null),[G,H]=(0,c.useState)(void 0),[I,J]=(0,c.useState)(0),[K,L]=(0,c.useState)(!1),M=!!(y&&j.includes(y.phase)),N=M&&("restarting"===y.phase||I>0);async function O(){g(!0),r(null),t(null),D(null),F(null),H(void 0),z(a=>a&&j.includes(a.phase)?a:null);try{let{ok:a,d:b}=await h({action:"check-release"});a?(r(b),x(new Date)):t(b.error||"Could not check.")}catch(a){t(a.message)}finally{g(!1)}}async function P(){B(!0),D(null),F(null),H(void 0),J(0),L(!1);try{let{ok:a,d:b}=await h({action:"install-release"});b.job&&z(b.job),!a&&(D(b.error||"The update could not start."),F(b.refusal||null),"fallback"in b&&H(b.fallback))}catch(a){D(a.message)}finally{B(!1)}}async function Q(){try{let{d:a}=await h({action:"cancel-install"});a.job&&z(a.job)}catch{}}async function R(){try{await navigator.clipboard.writeText(a.command),v(!0),setTimeout(()=>v(!1),1600)}catch{t("Could not copy. Select the line and copy it by hand.")}}(0,c.useEffect)(()=>{"#updates"===window.location.hash&&document.getElementById("updates")?.scrollIntoView({block:"start"}),"updates"!==new URLSearchParams(window.location.search).get("check")||(window.history.replaceState(null,"",window.location.pathname),a.job&&j.includes(a.job.phase)||(document.getElementById("updates")?.scrollIntoView({block:"center"}),O().then(()=>document.getElementById("updates")?.scrollIntoView({block:"end",behavior:"smooth"}))))},[a.job]),(0,c.useEffect)(()=>{if(!M)return;let a=!0,b=setTimeout(async()=>{try{if(N){let b=await fetch("/api/update",{cache:"no-store"}),c=await b.json();if(!a)return;if(!c.job||c.job.id!==y.id)return void window.location.reload();J(0),z(c.job)}else{let{ok:b,d:c}=await h({action:"update-status"});a&&b&&c.job&&z(c.job)}}catch{a&&J(a=>a+1)}},N?1500:600);return()=>{a=!1,clearTimeout(b)}},[y,I,M,N]),(0,c.useEffect)(()=>{if(!N)return;let a=setTimeout(()=>L(!0),6e4);return()=>clearTimeout(a)},[N]);let S=y?.phase==="failed",T=d&&i?.install?.possible,U=S&&"stale-check"===y.code||"not-checked"===E,V=void 0!==G?G:i?.fallback,W="windows-app"===a.kind||"linux-app"===a.kind,X=!W&&i?.newer&&(!d||V)&&(!T||S||C||a.lastUpdate?.tone==="bad"),Y=function({mac:a,kind:b,canInstall:c,fallback:d}){if(!a)return"source"===b?"A copy built from the source code updates by fetching the code and building it again, which it can't do while it runs. Stop it (Ctrl-C), then run this in the six-degrees folder. Your network stays where it is.":"This copy runs inside the terminal that started it, so it can't replace itself while it runs. Stop it first (Ctrl-C), then run this to start the newest version. Your network stays where it is.";if(!d)return null;let e=d.dataDir?` It opens the new version on the usual data folder, not on ${d.dataDir}: to use that one, quit it and open it again with --data-dir, as you opened this one.`:"";return"replace"===d.mode?`${c?"Or paste this into Terminal.":"Paste this into Terminal instead."} It closes this app, puts the new version in its place and opens it. Your network stays where it is.${e}`:`${c?"Or copy":"Copy"} this line, quit Six Degrees, then paste it into Terminal. It installs the new version at ${d.installsTo}, not where this copy is, and opens it: use that one from then on. Your network stays where it is.${e}`}({mac:d,kind:a.kind,canInstall:T,fallback:V});return(0,b.jsxs)(f.Section,{id:"updates",title:"Updates",children:[a.lastUpdate&&!M&&(0,b.jsx)(n,{report:a.lastUpdate}),(0,b.jsxs)(f.Body,{children:["You have version ",(0,b.jsx)(f.Mono,{children:a.version}),"."]}),M?(0,b.jsx)(m,{job:y,restarting:N,slow:K,onCancel:Q}):(0,b.jsxs)(b.Fragment,{children:[S&&(0,b.jsxs)(f.Status,{tone:"bad",children:[(0,b.jsx)("strong",{children:"The update didn’t finish."})," ",y.error," Nothing was changed."]}),y?.phase==="cancelled"&&(0,b.jsx)(f.Status,{children:"Cancelled. Nothing was changed."}),C&&(0,b.jsx)(f.Status,{tone:"bad",children:C}),i&&!i.latest&&(0,b.jsx)(f.Status,{children:"No release has been published yet."}),i?.latest&&!i.newer&&(0,b.jsxs)(f.Status,{tone:"ok",children:["You’re up to date: ",i.latest.version," is the newest version.",w&&(0,b.jsxs)("span",{style:{color:"var(--sd-fg-3, #8b9a9a)"},children:[" Checked at ",w.toLocaleTimeString([],{hour:"numeric",minute:"2-digit"}),"."]})]}),i?.newer&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)(f.Body,{style:{color:"var(--sd-green, #00ff88)"},children:["Version ",i.latest.version," is available."]}),T&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)(f.Body,{children:["It downloads ",i.install.size?`about ${l(i.install.size)} MB`:"the new version"," from GitHub, checks it, then closes, replaces itself and reopens. Your network isn’t touched, and a backup of it is made first."]}),(0,b.jsxs)(p,{children:[U?(0,b.jsx)(f.Btn,{onClick:O,disabled:e,primary:!0,children:e?"Checking…":"Check again"}):(0,b.jsx)(f.Btn,{onClick:P,disabled:A,primary:!0,children:A?"Starting…":S||C?"Try again":"Install and restart"}),(0,b.jsx)(o,{url:i.latest.url})]})]}),d&&!T&&i.install?.reason&&(0,b.jsx)(f.Body,{children:i.install.reason}),W&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)(f.Body,{children:["windows-app"===a.kind?"Download its Setup.exe from the release page and run it: it closes this copy, puts the new version in its place and opens it.":"Download its .deb (or .tar.gz) from the release page and install it over this one, after quitting Six Degrees."," ","Your network stays where it is."]}),(0,b.jsx)(p,{children:(0,b.jsx)("a",{href:(i.download||i.latest).url,target:"_blank",rel:"noreferrer",style:{display:"inline-block",padding:"8px 16px",borderRadius:8,fontSize:13,fontWeight:700,textDecoration:"none",background:"linear-gradient(135deg, #9B59B6, #3498DB)",color:"#fff"},children:"Open the release page"})})]}),X&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(f.Body,{children:Y}),a.testReleases?(0,b.jsx)("pre",{style:q,children:"Not shown in test mode: it would install the real release from GitHub into Applications."}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("pre",{style:q,children:a.command}),(0,b.jsxs)(p,{children:[(0,b.jsx)(f.Btn,{onClick:R,primary:!T,children:u?"Copied":"Copy"}),!T&&(0,b.jsx)(o,{url:i.latest.url})]})]})]}),!T&&!X&&!W&&(0,b.jsx)(p,{children:(0,b.jsx)(o,{url:i.latest.url})})]}),!i?.newer&&(0,b.jsx)(p,{children:(0,b.jsx)(f.Btn,{onClick:O,disabled:e,children:e?"Checking…":i?"Check again":"Check for updates"})})]}),s&&(0,b.jsx)(f.Body,{style:{color:"var(--sd-red, #ff7676)"},children:s}),(0,b.jsxs)(f.Body,{style:{fontSize:12,color:"var(--sd-fg-4, #667)",marginTop:12},children:["Nothing is checked automatically. The button asks GitHub for the newest version number, and nothing about you is sent.",d&&" Only a second click, Install and restart, downloads the new version."]}),a.testReleases&&(0,b.jsxs)(f.Body,{style:{fontSize:12,color:"var(--sd-gold, #FFD700)",marginTop:6},children:["Test mode: releases are read from ",(0,b.jsx)(f.Mono,{children:a.testReleases})," on this computer, not from GitHub."]})]})}let l=a=>Math.max(1,Math.round(a/1e6));function m({job:a,restarting:c,slow:d,onCancel:e}){let g=a.total?Math.min(100,Math.round(a.received/a.total*100)):null,h=c?"Restarting… Six Degrees closes and opens again in a moment.":"checking"===a.phase?"Asking GitHub for the newest version…":"downloading"===a.phase?`Downloading ${a.version}…${null!==g?` ${g}% (${l(a.received)} of ${l(a.total)} MB)`:""}`:"verifying"===a.phase?"Checking the download…":"Preparing the new version…";return(0,b.jsxs)("div",{role:"status","aria-live":"polite",style:{marginTop:12},children:[(0,b.jsx)(f.Body,{style:{color:"var(--sd-fg-1, #e8e8ee)"},children:h}),"downloading"===a.phase&&null!==g&&(0,b.jsx)("div",{role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":g,"aria-label":"Download",style:{height:6,borderRadius:3,background:"rgba(var(--sd-ink, 255, 255, 255), 0.08)",marginTop:10,overflow:"hidden",maxWidth:420},children:(0,b.jsx)("div",{style:{width:`${g}%`,height:"100%",background:"linear-gradient(90deg, #9B59B6, #3498DB)",transition:"width 0.4s ease"}})}),d&&(0,b.jsx)(f.Body,{children:"This is taking longer than it should. If Six Degrees doesn’t open again by itself, open it from your Applications folder."}),!c&&(0,b.jsx)(p,{children:(0,b.jsx)(f.Btn,{onClick:e,children:"Cancel"})})]})}function n({report:a}){let c=new Date(a.at).toLocaleString([],{dateStyle:"medium",timeStyle:"short"});return(0,b.jsxs)(f.Status,{tone:"ok"===a.tone?"ok":"bad",children:[a.text," ",(0,b.jsxs)("span",{style:{color:"var(--sd-fg-3, #8b9a9a)"},children:["(",c,")"]}),"ok"===a.tone&&a.previous&&(0,b.jsxs)("span",{style:{display:"block",fontSize:12.5,color:"var(--sd-fg-3, #8b9a9a)",marginTop:4},children:["A copy of the version you had is kept in ",(0,b.jsx)(f.Mono,{children:a.previous})," until the next update. To go back to it, open that file and drag the app it gives you into your Applications folder."]})]})}function o({url:a}){return a?(0,b.jsx)("a",{href:a,target:"_blank",rel:"noreferrer",style:{color:"var(--sd-blue, #3498DB)",fontSize:13.5},children:"What changed →"}):null}function p({children:a}){return(0,b.jsx)("div",{style:{display:"flex",gap:10,marginTop:12,flexWrap:"wrap",alignItems:"center"},children:a})}let q={background:"rgba(var(--sd-shade, 0, 0, 0), 0.45)",border:f.LINE,borderRadius:8,padding:12,margin:"8px 0 0",fontSize:12,lineHeight:1.7,color:"var(--sd-fg-2, #b9c6c6)",fontFamily:"ui-monospace, SFMono-Regular, Menlo, monospace",whiteSpace:"pre-wrap",maxHeight:180,overflow:"auto"};function r(a){if(!a)return"0 KB";if(a<1048576)return`${Math.max(1,Math.round(a/1024))} KB`;let b=a/1048576;return`${b<10?b.toFixed(1):Math.round(b)} MB`}let s=a=>Number(a||0).toLocaleString("en-US"),t=(a,b,c=`${b}s`)=>`${s(a)} ${1===Number(a)?b:c}`;function u(a,b=!0){if(!a)return null;let c=new Date(a);return Number.isNaN(c.getTime())?null:c.toLocaleString(void 0,b?{dateStyle:"medium",timeStyle:"short"}:{dateStyle:"medium"})}async function v(a,b){let c=await a.json().catch(()=>({}));if(!a.ok)throw Object.assign(Error(c.error||b),{data:c});return c}let w={display:"flex",gap:10,marginTop:12,flexWrap:"wrap",alignItems:"center"},x={fontSize:12,color:"var(--sd-fg-4, #667)",marginTop:10},y={fontSize:14,fontWeight:650,margin:"26px 0 4px",color:"var(--sd-fg-1, #e8e8ee)"},z={display:"flex",gap:8,alignItems:"flex-start",marginTop:12,fontSize:13,color:"var(--sd-fg-2, #c8d0d0)",lineHeight:1.5,cursor:"pointer"};function A({label:a,children:c}){return(0,b.jsxs)("div",{style:{display:"flex",gap:12,justifyContent:"space-between",padding:"7px 0",borderTop:f.LINE,fontSize:13.5},children:[(0,b.jsx)("span",{style:{color:"var(--sd-fg-3, #8b9a9a)"},children:a}),(0,b.jsx)("span",{style:{color:"var(--sd-fg-1, #e8e8ee)",textAlign:"right"},children:c})]})}function B({status:a}){let c=a?.last,d=a?.failed,e=d&&(!c||Date.parse(d.at)>Date.parse(c.at));return(0,b.jsxs)(b.Fragment,{children:[e&&(0,b.jsxs)(f.Status,{tone:"bad",children:["The last backup didn’t work (",u(d.at),"): ",d.message.replace(/\.$/,""),".",!c&&" There’s no backup yet."]}),c?c.verified?(0,b.jsxs)(f.Status,{tone:e?void 0:"ok",children:["Last backup: ",u(c.at),", verified",null!=c.people?` (${t(c.people,"person","people")})`:"","."]}):(0,b.jsxs)(f.Status,{tone:"bad",children:["Last backup: ",u(c.at),", but it didn’t pass its check, so it can’t be restored: ",c.problem," ","Click Back up now to make a new one."]}):!e&&(0,b.jsx)(f.Status,{children:"No backup yet. One is made each day Six Degrees is open with a network in it."})]})}function C({pending:a,info:c,busy:d,restarting:e,onRestart:g,onCancel:h}){let i=a.restoredFrom?(0,b.jsxs)(b.Fragment,{children:["The backup ",(0,b.jsx)(f.Mono,{children:a.restoredFrom})]}):(0,b.jsxs)(b.Fragment,{children:["The network in the copy",a.exportedAt?` saved ${u(a.exportedAt,!1)}`:""]});return(0,b.jsxs)(f.Status,{children:[(0,b.jsx)("div",{style:{fontWeight:650},children:a.restoredFrom?"A restore is waiting to finish.":"An import is waiting to finish."}),(0,b.jsxs)("div",{children:[i," ","(",t(a.people,"person","people"),a.photos?`, ${t(a.photos,"photo")}`:"",a.fromVersion?`, from Six Degrees ${a.fromVersion}`:"",")",a.replacedPeople>0?` replaces the ${t(a.replacedPeople,"person","people")} here the next time Six Degrees starts. A copy of what’s here now is kept in backups first, so it can be undone.`:" becomes the network here the next time Six Degrees starts."," ","Your LinkedIn search budget and any pause on scanning are kept."]}),a.error&&(0,b.jsxs)("div",{style:{color:"var(--sd-red, #ff7676)",marginTop:6},children:["The last try stopped: ",a.error.replace(/\.$/,""),". It tries again the next time Six Degrees starts."]}),e?(0,b.jsx)("div",{style:{marginTop:8},children:"Restarting… this page comes back in a few seconds."}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("div",{style:{marginTop:8},children:c.restart.how}),c.restart.command&&(0,b.jsx)("div",{style:{marginTop:6},children:(0,b.jsx)(f.Mono,{children:c.restart.command})}),(0,b.jsxs)("div",{style:w,children:[c.restart.canRestart&&(0,b.jsx)(f.Btn,{primary:!0,onClick:g,disabled:!!d,children:"restart"===d?"Restarting…":"Restart now"}),!a.started&&(0,b.jsx)(f.Btn,{onClick:h,disabled:!!d,children:"cancel"===d?"Cancelling…":a.restoredFrom?"Cancel the restore":"Cancel the import"})]})]})]})}function D(){let[a,d]=(0,c.useState)(null),[e,g]=(0,c.useState)(null),[h,i]=(0,c.useState)(null),[j,k]=(0,c.useState)(null),[l,m]=(0,c.useState)(null),[n,o]=(0,c.useState)(null),[p,q]=(0,c.useState)(null),[D,E]=(0,c.useState)(null),[F,G]=(0,c.useState)(null),[H,I]=(0,c.useState)(!0),[J,K]=(0,c.useState)(!0),[L,M]=(0,c.useState)(null),[N,O]=(0,c.useState)(!1),[P,Q]=(0,c.useState)(!1),R=(0,c.useRef)(null),S=(0,c.useRef)(!1),T=(0,c.useCallback)(()=>fetch("/api/data",{cache:"no-store"}).then(a=>v(a,"The data folder could not be read.")).then(a=>{let b=Date.parse(a.lastImport?.appliedAt||"");d({...a,importIsRecent:Number.isFinite(b)&&Date.now()-b<864e5}),g(null)}).catch(a=>g(a.message)),[]);async function U(){k(null);try{await navigator.clipboard.writeText(a.dataDir),k({tone:"ok",text:"Copied the folder’s path."})}catch{k({tone:"bad",text:"This window can’t copy. Select the path above and copy it instead."})}}async function V(){i("reveal"),k(null);try{await v(await fetch("/api/data/reveal",{method:"POST"}),"The folder could not be opened."),k({tone:"ok",text:"darwin"===a.platform?"Opened in Finder.":"Opened in your file browser."})}catch(a){k({tone:"bad",text:a.message})}finally{i(null)}}async function W(){i("backup"),m(null),o(null);try{let a,b=await v(await fetch("/api/data/backup",{method:"POST"}),"The backup could not be made.");await T();let c=b.backup;m({tone:"ok",text:`Backed up ${(a=c.people,t(a,"person","people"))}${c.photos?` and ${t(c.photos,"photo")}`:""} (${r(c.bytes)}), and checked it. This one stays until you delete it.`})}catch(a){await T(),m({tone:"bad",text:a.message})}finally{i(null)}}async function X(a){i(`reveal:${a}`),o(null);try{await v(await fetch("/api/data/reveal",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({backup:a})}),"The backup could not be shown.")}catch(b){o({name:a,tone:"bad",text:b.message})}finally{i(null)}}async function Y(b){i(`restore:${b}`),o(null),m(null);try{await v(await fetch("/api/data/restore",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:b,replace:a.people})}),"The backup could not be restored."),q(null),await T()}catch(a){a.data?.needsConfirm&&await T(),o({name:b,tone:"bad",text:a.message})}finally{i(null)}}async function Z(){i("export"),E(null);try{let a,b=await fetch("/api/data/export",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({photos:H,social:J})});b.ok||await v(b,"The backup file could not be made.");let c=await b.blob(),d=/filename="([^"]+)"/.exec(b.headers.get("content-disposition")||"")?.[1]||"Six Degrees backup.sixdegrees",e=URL.createObjectURL(c),f=document.createElement("a");f.href=e,f.download=d,f.style.position="fixed",f.style.left="-9999px",document.body.appendChild(f),f.click(),f.remove(),setTimeout(()=>URL.revokeObjectURL(e),6e4);let g=[(a=Number(b.headers.get("x-six-degrees-people")),t(a,"person","people"))];g.push(H?t(Number(b.headers.get("x-six-degrees-photos")),"photo"):"no photos"),E({tone:"ok",text:`Made “${d}” (${r(c.size)}: ${g.join(", ")}). Look for it in your Downloads folder, or wherever you chose to save it.`})}catch(a){E({tone:"bad",text:a.message})}finally{i(null)}}async function $(){if(L){i("import"),G(null);try{let b={"Content-Type":"application/octet-stream","X-Six-Degrees-Size":String(L.size)};a.people>0&&(b["X-Six-Degrees-Replace"]=String(a.people)),await v(await fetch("/api/data/import",{method:"POST",headers:b,body:L}),"The file could not be restored."),M(null),O(!1),R.current&&(R.current.value=""),await T()}catch(a){a.data?.needsConfirm&&(O(!1),await T()),G({tone:"bad",text:a.message})}finally{i(null)}}}async function _(){i("cancel"),G(null),m(null);let b=a.pending?.restoredFrom?m:G;try{await v(await fetch("/api/data/import",{method:"DELETE"}),"It could not be cancelled."),await T(),b({tone:"ok",text:"Cancelled. The network here stays as it is."})}catch(a){b({tone:"bad",text:a.message})}finally{i(null)}}async function aa(){i("restart"),G(null);try{await v(await fetch("/api/data/restart",{method:"POST"}),"Six Degrees could not restart."),Q(!0);let a=a=>new Promise(b=>setTimeout(b,a)),b=Date.now()+9e4;for(await a(2500);Date.now()<b;){try{if((await fetch("/api/data",{cache:"no-store"})).ok)return void window.location.reload()}catch{}await a(1e3)}Q(!1),G({tone:"bad",text:"Six Degrees didn’t come back. Quit it and open it again: it finishes as it starts."})}catch(a){G({tone:"bad",text:a.message})}finally{i(null)}}if((0,c.useEffect)(()=>{T()},[T]),(0,c.useEffect)(()=>{a&&!S.current&&(S.current=!0,"#data"===window.location.hash&&document.getElementById("data")?.scrollIntoView({block:"start"}))},[a]),!a)return(0,b.jsx)(f.Section,{id:"data",title:"Your data",children:e?(0,b.jsx)(f.Status,{tone:"bad",children:e}):(0,b.jsx)(f.Body,{children:"Loading…"})});let ab=a.pending,ac=a.photosInCopy||a.photos,ad=a.backups||[],ae=ad.reduce((a,b)=>a+(b.bytes||0),0),af=a.backupStatus||{},ag=af.keep||{},ah=!!(L&&L.size>a.maxImportBytes),ai=a.people>0,aj=a.lastImport,ak="darwin"===a.platform?"Show in Finder":"Show in folder",al=ab&&(0,b.jsx)(C,{pending:ab,info:a,busy:h,restarting:P,onRestart:aa,onCancel:_});return(0,b.jsxs)(f.Section,{id:"data",title:"Your data",intro:"Everything Six Degrees knows about your network is in one folder on this computer.",children:[(0,b.jsx)(f.Body,{children:(0,b.jsx)(f.Mono,{children:a.dataDir})}),(0,b.jsxs)("div",{style:w,children:[(0,b.jsx)(f.Btn,{onClick:U,children:"Copy the path"}),(0,b.jsx)(f.Btn,{onClick:V,disabled:"reveal"===h,children:"reveal"===h?"Opening…":"darwin"===a.platform?"Show in Finder":"Open the folder"})]}),j&&(0,b.jsx)(f.Status,{tone:j.tone,children:j.text}),(0,b.jsxs)("div",{style:{marginTop:16,borderBottom:f.LINE},children:[(0,b.jsxs)(A,{label:"Your network",children:[t(a.people,"person","people")," · ",r(a.databaseBytes)]}),(0,b.jsx)(A,{label:"Profile photos",children:a.photos.count?`${s(a.photos.count)} \xb7 ${r(a.photos.bytes)}`:"none saved yet"}),(0,b.jsx)(A,{label:"Backups",children:ad.length?`${t(ad.length,"copy","copies")} \xb7 ${r(ae)}`:"none yet"}),(0,b.jsx)(A,{label:"LinkedIn sign-in for scanning",children:a.linkedinSignIn?"kept here, never put in a copy":"not signed in on this computer"})]}),(0,b.jsx)("h3",{style:y,children:"Backups"}),(0,b.jsx)(B,{status:af}),(0,b.jsxs)("div",{style:w,children:[(0,b.jsx)(f.Btn,{onClick:W,disabled:!!h||P||0===a.people,children:"backup"===h?"Backing up…":"Back up now"}),0===a.people&&(0,b.jsx)("span",{style:{fontSize:13,color:"var(--sd-fg-3, #8b9a9a)"},children:"There’s no network here to back up yet."})]}),l&&(0,b.jsx)(f.Status,{tone:l.tone,children:l.text}),ab?.restoredFrom&&al,(0,b.jsxs)(f.Body,{style:x,children:["Each backup is your whole network with its photos, your settings and the scanner’s notes, checked as it’s made. Six Degrees makes one each day it’s open and before a new version first opens your data. It keeps the last ",ag.daily??7," daily backups, ",ag["before-update"]??3," from before new versions, and"," ",ag["before-import"]??3," from before an import or a restore (those for at least ",af.floorDays??30," days). Backups you make with Back up now stay until you delete them. The Social tab’s messages and notes are never in them, so deleting those there deletes them everywhere. Backups are on this computer only, so to keep one safe if the computer is lost, copy it somewhere else."]}),ad.length>0&&(0,b.jsxs)("details",{style:{marginTop:10,fontSize:13,color:"var(--sd-fg-3, #8b9a9a)"},children:[(0,b.jsxs)("summary",{style:{cursor:"pointer"},children:["The backups (",s(ad.length),")"]}),(0,b.jsx)("div",{style:{marginTop:6},children:ad.map(c=>{let d=p===c.name,e=n?.name===c.name?n:null;return(0,b.jsxs)("div",{style:{padding:"10px 0",borderTop:f.LINE},children:[(0,b.jsxs)("div",{style:{display:"flex",gap:10,justifyContent:"space-between",flexWrap:"wrap"},children:[(0,b.jsxs)("span",{style:{color:"var(--sd-fg-1, #e8e8ee)",fontWeight:600},children:["daily"===c.kind?"Daily":"before-update"===c.kind?c.version?`Before version ${c.version}`:"Before a new version":"before-import"===c.kind?"Before an import or a restore":c.byHand?"Put here by hand":"Made by you"," ",(0,b.jsxs)("span",{style:{fontWeight:400,color:"var(--sd-fg-3, #8b9a9a)"},children:["· ",u(c.at)]})]}),(0,b.jsx)("span",{children:r(c.bytes)})]}),(0,b.jsxs)("div",{style:{fontSize:12,color:"var(--sd-fg-4, #667)",marginTop:2},children:[(0,b.jsxs)("span",{style:{wordBreak:"break-all"},children:[c.name,c.folder?"/":""]})," · ",c.restorable?"sixdegrees"===c.format?"network, photos and files":c.withFiles?"network, with its photos and files beside it":"before-update"===c.kind?"network only (made before backups had photos)":"before-import"===c.kind?"network only (it had no photos or files to keep)":"network only":"not a backup Six Degrees can restore"]}),d?(0,b.jsxs)(f.Status,{children:[ai?`Replace the ${t(a.people,"person","people")} here with the network in this backup?`:"Restore the network in this backup?"," ","It’s checked first, and finishes when Six Degrees restarts. What’s here now is kept in backups first, so this can be undone. Your LinkedIn search budget and any pause on scanning are kept.","database"===c.format&&!c.withFiles&&" This backup holds the network only, so the photos and the scanner’s notes here now stay with it.",(0,b.jsxs)("div",{style:w,children:[(0,b.jsx)(f.Btn,{primary:!0,onClick:()=>Y(c.name),disabled:!!h,children:h===`restore:${c.name}`?"Checking the backup…":"Restore it"}),(0,b.jsx)(f.Btn,{onClick:()=>{q(null),o(null)},disabled:h===`restore:${c.name}`,children:"Cancel"})]})]}):(0,b.jsxs)("div",{style:{...w,marginTop:8},children:[c.restorable&&(0,b.jsx)(f.Btn,{onClick:()=>{q(c.name),o(null)},disabled:!!h||P||!!ab,children:"Restore"}),(0,b.jsx)(f.Btn,{onClick:()=>X(c.name),disabled:h===`reveal:${c.name}`,children:h===`reveal:${c.name}`?"Opening…":ak})]}),e&&(0,b.jsx)(f.Status,{tone:e.tone,children:e.text})]},c.name)})})]}),(0,b.jsx)(f.Body,{style:x,children:"The folder can’t be moved from here. A database that a sync service (iCloud Drive, Dropbox) copies while it’s open can be damaged, and this folder also holds your LinkedIn sign-in, which should never be synced. To use your network on another computer, export a backup file below and restore it there."}),(0,b.jsx)("h3",{style:y,children:"Move your network to another computer"}),(0,b.jsx)(f.Body,{children:"Export a backup file here, then on the new computer install Six Degrees, open Settings → Your data and restore from it. Sign in to LinkedIn again there before you scan: your sign-in never goes into a backup."}),(0,b.jsxs)("label",{style:z,children:[(0,b.jsx)("input",{type:"checkbox",checked:H,onChange:a=>I(a.target.checked),style:{marginTop:3}}),(0,b.jsxs)("span",{children:["Include profile photos",ac.count?` (${s(ac.count)}, ${r(ac.bytes)})`:"",". They can’t be downloaded again without a new scan."]})]}),(0,b.jsxs)("label",{style:z,children:[(0,b.jsx)("input",{type:"checkbox",checked:J,onChange:a=>K(a.target.checked),style:{marginTop:3}}),(0,b.jsx)("span",{children:"Include the Social tab: its findings, your CRM notes, stages and follow-ups, and any messages you keep there."})]}),(0,b.jsxs)("div",{style:w,children:[(0,b.jsx)(f.Btn,{primary:!0,onClick:Z,disabled:!!h||P||0===a.people,children:"export"===h?"Saving…":"Export backup file…"}),0===a.people&&(0,b.jsx)("span",{style:{fontSize:13,color:"var(--sd-fg-3, #8b9a9a)"},children:"There’s no network here to save yet."})]}),D&&(0,b.jsx)(f.Status,{tone:D.tone,children:D.text}),(0,b.jsx)(f.Body,{style:x,children:"The file holds the names, headlines and photos of the people in your network. Keep it private: don’t post it or share it, and delete it once it has been restored. A LinkedIn CSV import kept on this computer goes into the file too, and opens on the new one. With the Social tab included, the file also holds your CRM notes and any messages you keep, so it’s as private as your inbox."}),(0,b.jsx)("h3",{style:y,children:"Bring in a network from another computer"}),ab&&!ab.restoredFrom?al:ab?(0,b.jsx)(f.Body,{children:"A restore is waiting to finish (under Backups, above). Restart, or cancel it, before restoring anything else."}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(f.Body,{children:"Pick the backup file you exported on the other computer (a .sixdegrees file). It replaces the network here; the two networks are never merged. Your LinkedIn search budget and any pause on scanning are kept, with the other computer’s searches added."}),(0,b.jsx)("input",{ref:R,type:"file",accept:".sixdegrees",onChange:function(a){G(null),O(!1),M(a.target.files?.[0]||null)},style:{display:"none"}}),(0,b.jsxs)("div",{style:w,children:[(0,b.jsx)(f.Btn,{onClick:()=>R.current?.click(),disabled:!!h,children:"Restore from a file…"}),L&&(0,b.jsxs)("span",{style:{fontSize:13,color:"var(--sd-fg-2, #c8d0d0)",wordBreak:"break-all"},children:[L.name," · ",r(L.size)]})]}),ah&&(0,b.jsxs)(f.Status,{tone:"bad",children:["That file is ",r(L.size),". This copy can restore files up to ",r(a.maxImportBytes),"."]}),L&&ai&&!ah&&(0,b.jsxs)("label",{style:z,children:[(0,b.jsx)("input",{type:"checkbox",checked:N,onChange:a=>O(a.target.checked),style:{marginTop:3}}),(0,b.jsxs)("span",{children:["Replace the ",t(a.people,"person","people")," in this copy’s network with the network in this file. A copy of what’s here is kept in backups first. Your search budget and any pause on scanning are kept too."]})]}),L&&(0,b.jsx)("div",{style:w,children:(0,b.jsx)(f.Btn,{primary:!0,onClick:$,disabled:ah||ai&&!N||!!h,children:"import"===h?"Checking the file…":"Restore"})})]}),F&&(0,b.jsx)(f.Status,{tone:F.tone,children:F.text}),aj&&!ab&&(a.importIsRecent?(0,b.jsxs)(f.Status,{tone:"ok",children:[aj.restoredFrom?"Restored":"Imported"," ",u(aj.appliedAt),": ",t(aj.people,"person","people"),aj.restoredFrom?(0,b.jsxs)(b.Fragment,{children:[" from the backup ",(0,b.jsx)(f.Mono,{children:aj.restoredFrom})]}):aj.exportedAt?` from the copy saved ${u(aj.exportedAt,!1)}`:"",".",aj.keptDatabase&&(0,b.jsxs)(b.Fragment,{children:[" ","What was here before is kept in ",(0,b.jsx)(f.Mono,{children:aj.keptDatabase}),aj.keptFiles?", with its photos and files beside it":"",".",aj.keptAsIs&&" It couldn’t be read, so it was kept exactly as it was."," ","To go back to it, restore it from the backups above."]})]}):(0,b.jsxs)(f.Body,{style:x,children:["Last ",aj.restoredFrom?"restore":"import",": ",u(aj.appliedAt)," (",t(aj.people,"person","people"),").",aj.keptDatabase&&(0,b.jsxs)(b.Fragment,{children:[" What was here before is kept in ",(0,b.jsx)(f.Mono,{children:aj.keptDatabase}),", under Backups above."]})]}))]})}var E=a.i(803),F=a.i(79663),G=a.i(59534),H=a.i(54919),I=a.i(30889);a.i(59943);var J=a.i(29470),K=a.i(42510),L=a.i(31483);let M={lean:"Lean",strong:"Strong"},N=["wheel","touchstart","keydown","pointerdown"],O={1:"1st",2:"2nd",3:"3rd"},P=(a,b,c=`${b}s`)=>`${a.toLocaleString()} ${1===a?b:c}`,Q=G.DIRECTORY.filter(a=>"function"===a.kind).map(a=>a.label);function R(a,b,c){let[d,e]=c?["moved","moved"]:["moves","move"];if(!a&&!b)return c?"No one changed tier.":"No one changes tier.";let f=a=>1===a?d:e;return a&&b?`${P(a,"person","people")} ${f(a)} up a tier and ${b.toLocaleString()} ${f(b)} down.`:a?`${P(a,"person","people")} ${f(a)} up a tier.`:`${P(b,"person","people")} ${f(b)} down a tier.`}function S({onSaved:a}={}){let[d,e]=(0,c.useState)(null),[g,h]=(0,c.useState)(null),[i,j]=(0,c.useState)(null),[k,l]=(0,c.useState)(!1),[m,n]=(0,c.useState)(null),[o,p]=(0,c.useState)(null),[q,r]=(0,c.useState)({loading:!0}),[s,t]=(0,c.useState)(null),u=(0,c.useRef)(null),v=(0,c.useRef)(0),w=(0,c.useRef)(!1);function x(a){h(a),n(null),clearTimeout(u.current);let b=++v.current;if((0,F.sameFocus)(a,d))return void j(null);let c=(0,F.focusFingerprint)(a);j({key:c,loading:!0}),u.current=setTimeout(async()=>{try{let d=await fetch("/api/settings/sector-preview",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({sectorFocus:a})}),e=await d.json();if(b!==v.current)return;j(d.ok?{key:c,...e}:{key:c,error:e.error||"Could not work out what would change."})}catch{b===v.current&&j({key:c,error:"Could not reach the app to work out what would change."})}},250)}async function y(){var b,c;let d;l(!0),n(null),clearTimeout(u.current),v.current++;let f=await (0,L.saveSettings)({sectorFocus:g});(l(!1),f.settings&&(e(f.settings.sectorFocus),h(f.settings.sectorFocus),j(null)),f.error)?n({tone:"bad",text:f.error}):(n({tone:"ok",text:(b=f.settings.sectorFocus,c=f.effects?.sectorFocus,d=b.sectors.length?`Saved: ${b.sectors.map(a=>(0,H.sectorByKey)(a).label).join(" · ")} (${M[b.strength].toLowerCase()}).`:"Saved: no sector.",c?c.scored?`${d} Rescored your network (${P(c.people??c.scored,"person","people")}). ${R(c.up,c.down,!0)}`:`${d} There's no scanned network yet; it will apply when you scan.`:d)}),a?.())}(0,c.useEffect)(()=>{let a=!1;return(0,K.csvNetworkSource)().then(b=>{a||t(b)}),fetch("/api/settings").then(a=>a.json().then(b=>a.ok?b:Promise.reject(Error(b.error||"Could not load your sector.")))).then(b=>{if(a)return;let c=b.settings?.sectorFocus||{sectors:[],strength:"lean"};e(c),h(c)}).catch(b=>{a||p(b.message)}),fetch("/api/settings/sector-suggestions").then(a=>a.json().then(b=>a.ok?b:Promise.reject(Error(b.error||"Could not load suggestions.")))).then(b=>{a||r({scored:b.scored,list:b.suggestions||[]})}).catch(b=>{a||r({error:b.message})}),()=>{a=!0,clearTimeout(u.current)}},[]),(0,c.useEffect)(()=>{if(w.current||!g&&!o)return;w.current=!0;let a=document.getElementById("sector");if("#sector"!==window.location.hash||!a)return;let b=()=>a.scrollIntoView({block:"start"});b();let c=new ResizeObserver(b);c.observe(document.body);let d=()=>{for(let a of(c.disconnect(),clearTimeout(e),N))window.removeEventListener(a,d,!0)},e=setTimeout(d,2e3);for(let a of N)window.addEventListener(a,d,{capture:!0,passive:!0});return d},[g,o]);let z=g&&d&&!(0,F.sameFocus)(g,d);return(0,b.jsxs)(f.Section,{id:"sector",title:"Your sector",intro:"Pick up to three sectors you work in. Companies in them count for more when your network is scored, so the people there rank higher.",children:[o&&(0,b.jsx)(f.Status,{tone:"bad",children:o}),!g&&!o&&(0,b.jsx)(f.Body,{children:"Loading…"}),g&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(E.default,{sectors:g.sectors,onChange:a=>x({...g,sectors:a}),disabled:k,suggest:q}),(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:8,marginTop:14},children:[(0,b.jsx)("span",{style:{fontSize:13,color:"var(--sd-fg-3, #8b9a9a)"},children:"How much:"}),Object.keys(I.SECTOR_BONUS).map(a=>(0,b.jsxs)("button",{type:"button","aria-pressed":g.strength===a,disabled:k,onClick:()=>x({...g,strength:a}),style:{padding:"5px 12px",borderRadius:7,fontSize:12.5,fontWeight:600,cursor:"pointer",color:g.strength===a?"var(--sd-fg-1, #fff)":"var(--sd-fg-3, #8b9a9a)",background:g.strength===a?"rgba(52,152,219,0.25)":"transparent",border:f.LINE},children:[M[a]," · +",I.SECTOR_BONUS[a]]},a))]}),(0,b.jsx)(f.Body,{style:{fontSize:12.5},children:"Each company in your sectors gets +1 (lean) or +2 (strong) on its score out of 10, never above 10. A company in more than one of your picks still gets it once."}),(0,b.jsx)(T,{preview:z?i:null,draft:g}),(0,b.jsxs)("div",{style:{display:"flex",gap:8,flexWrap:"wrap",marginTop:14},children:[(0,b.jsx)(f.Btn,{primary:!0,onClick:y,disabled:!z||k,children:k?"Saving and rescoring…":"Save"}),z&&!k&&(0,b.jsx)(f.Btn,{onClick:()=>x(d),children:"Cancel"}),!z&&g.sectors.length>0&&!k&&(0,b.jsx)(f.Btn,{onClick:()=>x({...g,sectors:[]}),children:"Turn off"})]}),m&&(0,b.jsx)(f.Status,{tone:m.tone,children:m.text}),(0,b.jsxs)("ul",{style:{margin:"16px 0 0",paddingLeft:18,fontSize:12.5,color:"var(--sd-fg-4, #778)",lineHeight:1.7},children:[(0,b.jsx)("li",{children:"Tiers rank how reachable someone is through your network, not the people themselves."}),(0,b.jsxs)("li",{children:["A company score you set on ",(0,b.jsx)("a",{href:"#companies",style:{color:"var(--sd-blue, #3498DB)"},children:"Company scores"}),", below, always wins. Your sector never changes it."]}),(0,b.jsx)("li",{children:"If you scan highest tier first, people in your sectors come up sooner. Scanning newest first, the default, doesn’t go by tier."}),(0,b.jsx)("li",{children:"An industry includes its sectors. It counts a company in any of its sectors (Healthcare & Biotech counts a practice that is only in Dental), and a company whose industry the app’s list of well-known companies or the company’s own name gives (Meridian Health). Not one known only from its people’s job titles: a recruiter at Acme Widgets doesn’t make Acme a consulting firm."}),(0,b.jsx)("li",{children:"A narrower sector counts a company when its name says so (Smith Family Dental), it’s a well-known company in that sector, or at least half of the people you know there say so in their headlines (dentist, DDS, orthodontist). The words are a fixed list that comes with the app, the same on every computer. Nothing is sent anywhere."}),(0,b.jsxs)("li",{children:["Some sectors are work every kind of company has: ",Q.length>1?`${Q.slice(0,-1).join(", ")} and ${Q.at(-1)}`:Q.join(""),". For those a job title doesn’t count, since a recruiter at Acme Widgets doesn’t make it a recruiting firm. The company’s name does (Acme Staffing, Smith CPA), and so does a kind of firm in a headline (staffing agency, law firm, SaaS)."]}),s&&(0,b.jsxs)("li",{style:{color:"var(--sd-gold, #FFD700)"},children:["sample"===s?"The sample network open in this window":"The CSV import you have open"," isn’t changed by this, and isn’t counted in the suggestions. Your sector applies to networks you’ve scanned."]})]})]})]})}function T({preview:a,draft:c}){if(!a||a.key!==(0,F.focusFingerprint)(c))return null;let d={marginTop:12,padding:"10px 14px",borderRadius:8,fontSize:13,lineHeight:1.6,border:f.LINE,background:"rgba(var(--sd-ink, 255, 255, 255), 0.03)",color:"var(--sd-fg-2, #cfd8d8)"};if(a.loading)return(0,b.jsx)("div",{style:d,"aria-live":"polite",children:"Working out what would change…"});if(a.error)return(0,b.jsx)(f.Status,{tone:"bad",children:a.error});if(!a.scored)return(0,b.jsx)("div",{style:d,"aria-live":"polite",children:"There’s no scanned network yet, so nothing changes now. Your choice applies once you scan."});let e=(a,b)=>`${P(a,"company","companies")} ${1===a?"scores":"score"} ${b}`,g=[a.companiesUp&&e(a.companiesUp,"higher"),a.companiesDown&&e(a.companiesDown,"lower")].filter(Boolean).join(" and ");return(0,b.jsxs)("div",{style:d,"aria-live":"polite",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("b",{style:{color:"var(--sd-fg-1, #fff)"},children:"If you save:"})," ",g?`${g}.`:"No company changes score."," ",R(a.up,a.down,!1)]}),a.examples?.length>0&&(0,b.jsx)("div",{style:{marginTop:6,display:"flex",flexWrap:"wrap",gap:"4px 12px",fontSize:12.5},children:a.examples.map((a,c)=>(0,b.jsxs)("span",{title:a.company||void 0,children:[a.name,a.degree?(0,b.jsxs)("span",{style:{color:"var(--sd-fg-4, #667)"},children:[" (",O[a.degree]||`${a.degree}th`,")"]}):null," ",(0,b.jsx)("b",{style:{color:J.TIER_COLORS_CLASSIC[a.from]||"#889"},children:a.from||"–"})," → ",(0,b.jsx)("b",{style:{color:J.TIER_COLORS_CLASSIC[a.to]||"#889"},children:a.to})]},c))}),a.companyExamples?.length>0&&(0,b.jsx)("div",{style:{marginTop:4,fontSize:12,color:"var(--sd-fg-3, #8b9a9a)"},children:a.companyExamples.slice(0,3).map(a=>`${a.name} ${a.from} → ${a.to}`).join(" · ")})]})}let U=a=>`${Math.round(100*a)}%`,[V,W,X]=I.CURVE.map(([,a])=>a),Y=[{key:"curve",label:"On your network's curve",note:`Your top ${U(V)} are S, the next ${U(W-V)} A and the next ${U(X-W)} B, so any network has a top, even one full of companies the app doesn't know. It only lifts: nobody drops a tier because their network is strong, and nobody under ${I.CURVE_FLOOR} is lifted into S or A.`},{key:"fixed",label:"On the fixed scale",note:"The same lines for everyone: S from 7.5, A from 5.5, B from 4, C from 2.5. Easy to compare from one network to another, but a network outside well-known companies has almost nobody in S or A."}];function Z({onSaved:a}={}){let[d,e]=(0,c.useState)(null),[g,h]=(0,c.useState)(!1),[i,j]=(0,c.useState)(null),[k,l]=(0,c.useState)(null),[m,n]=(0,c.useState)(null);async function o(b){if(g||b===d)return;h(!0),j(null);let{settings:c,effects:f,error:i}=await (0,L.saveSettings)({tierScale:b});if(c&&e(c.tierScale),i)j({tone:"bad",text:i});else{let b,c=f?.tierScale;j({tone:"ok",text:c?`Saved. ${b=c.moved,`${b.toLocaleString()} ${1===b?"person":"people"}`} changed tier.`:"Saved."}),a?.()}h(!1)}return(0,c.useEffect)(()=>{let a=!1;return(0,K.csvNetworkSource)().then(b=>{a||n(b)}),fetch("/api/settings").then(a=>a.json().then(b=>a.ok?b:Promise.reject(Error(b.error||"Could not load how tiers are graded.")))).then(b=>{a||e(b.settings?.tierScale||"curve")}).catch(b=>{a||l(b.message)}),()=>{a=!0}},[]),(0,b.jsxs)(f.Section,{id:"tiers",title:"Tiers",intro:"How the S to D rings are drawn. A tier says where someone sits in your network, not what they're worth.",children:[k&&(0,b.jsx)(f.Status,{tone:"bad",children:k}),d&&(0,b.jsx)("div",{role:"radiogroup","aria-label":"How tiers are graded",style:{display:"grid",gap:8},children:Y.map(a=>{let c=d===a.key;return(0,b.jsxs)("button",{type:"button",role:"radio","aria-checked":c,disabled:g,onClick:()=>o(a.key),style:{textAlign:"left",padding:"12px 14px",borderRadius:8,cursor:g?"wait":c?"default":"pointer",color:"var(--sd-fg-1, #fff)",background:c?"rgba(155,89,182,0.14)":"rgba(var(--sd-ink, 255, 255, 255), 0.03)",border:c?"1px solid rgba(155,89,182,0.6)":f.LINE},children:[(0,b.jsxs)("div",{style:{fontSize:14,fontWeight:650},children:[c?"● ":"○ ",a.label,"curve"===a.key?" (recommended)":""]}),(0,b.jsx)(f.Body,{style:{marginTop:4},children:a.note})]},a.key)})}),m&&(0,b.jsxs)(f.Body,{style:{color:"var(--sd-gold, #FFD700)",marginTop:10},children:["sample"===m?"The sample network open in this window keeps its own tiers (they’re the same either way).":"The CSV import you have open is always graded on its own curve."," ","This applies to networks you’ve scanned."]}),i&&(0,b.jsx)(f.Status,{tone:i.tone,children:i.text})]})}let $=["csuite","owner","vp","director","manager","senior","ic","unknown","intern","student"],_=Object.freeze({points:Object.freeze({}),roles:Object.freeze([])});function aa(a=_){let b=Object.keys(a.points||{}).sort().map(b=>`${b}=${a.points[b]}`).join(","),c=(a.roles||[]).map(a=>`${a.text}=${a.points}`).sort().join(",");return b||c?`${b}|${c}`:"none"}let ab=[{key:"default",label:"As the app ranks them",ranking:_,note:"C-suite and founders first, then VPs, directors, managers."},{key:"founders",label:"Founders first",note:"Owners and entrepreneurs count like CEOs, and anyone who says founder counts as much: for meeting founders, or selling to them.",ranking:{points:{owner:10},roles:[{text:"founder",points:10},{text:"co-founder",points:10}]}},{key:"investors",label:"Investors",note:"Anyone who invests for a living rises to the top: for raising money.",ranking:{points:{},roles:["investor","venture","angel","general partner","managing partner","principal at","vc"].map(a=>({text:a,points:10}))}},{key:"role",label:"A role I’m looking for",note:"For outbound or hiring: add the role below, and everyone in it rises, whatever their level.",ranking:null}],ac=[10,9.5,9,8.5,8,7.5,7,6.5,6,5.5,5,4.5,4,3,2,1,0],ad={padding:"5px 8px",borderRadius:6,fontSize:12.5,cursor:"pointer",border:f.LINE,background:"rgba(var(--sd-shade, 0, 0, 0), 0.3)",color:"var(--sd-fg-1, #fff)"};function ae({onSaved:a}={}){let[d,e]=(0,c.useState)(null),[g,h]=(0,c.useState)(null),[i,j]=(0,c.useState)(""),[k,l]=(0,c.useState)(10),[m,n]=(0,c.useState)(!1),[o,p]=(0,c.useState)(null),[q,r]=(0,c.useState)(null),s=(0,c.useRef)(null);if((0,c.useEffect)(()=>{let a=!1;return fetch("/api/settings").then(a=>a.json().then(b=>a.ok?b:Promise.reject(Error(b.error||"Could not load your title ranking.")))).then(b=>{if(!a){let a=b.settings?.titleRanking||_;e(a),h(a)}}).catch(b=>{a||r(b.message)}),()=>{a=!0}},[]),!g)return q?(0,b.jsx)(f.Status,{tone:"bad",children:q}):null;let t=(a,b)=>{let c={...g.points};b===I.LEVELS[a].points?delete c[a]:c[a]=b,h({...g,points:c}),p(null)},u=ab.find(a=>a.ranking&&aa(a.ranking)===aa(g))?.key??null,v=aa(g)!==aa(d);async function w(){n(!0),p(null);let{settings:b,effects:c,error:d}=await (0,L.saveSettings)({titleRanking:g});if(b&&(e(b.titleRanking),h(b.titleRanking)),d)p({tone:"bad",text:d});else{let b,d=c?.titleRanking;p({tone:"ok",text:d?`Saved. ${b=d.moved,`${b.toLocaleString()} ${1===b?"person":"people"}`} changed tier.`:"Saved."}),a?.()}n(!1)}return(0,b.jsxs)(f.Section,{id:"titles",title:"Titles",intro:"How much each kind of title counts towards someone's power, out of 10. Change it if you value some people more than the app does: founders, investors, or a role you're looking for.",children:[(0,b.jsx)("div",{style:{display:"flex",gap:6,flexWrap:"wrap",marginBottom:6},children:ab.map(a=>(0,b.jsx)("button",{type:"button",onClick:()=>{p(null),a.ranking?h({points:{...a.ranking.points},roles:[...a.ranking.roles]}):s.current?.focus()},"aria-pressed":u===a.key,title:a.note,style:{padding:"6px 12px",borderRadius:16,fontSize:12.5,fontWeight:650,cursor:"pointer",border:u===a.key?"1px solid rgba(155,89,182,0.7)":f.LINE,background:u===a.key?"rgba(155,89,182,0.16)":"rgba(var(--sd-ink, 255, 255, 255), 0.03)",color:u===a.key?"var(--sd-fg-1, #fff)":"var(--sd-fg-2, #bbb)"},children:a.label},a.key))}),(0,b.jsx)(f.Body,{style:{marginBottom:14},children:ab.find(a=>a.key===u)?.note||"Your own ranking. Higher points rank higher; the company someone works at still weighs it."}),(0,b.jsx)("div",{style:{display:"grid",gridTemplateColumns:"1fr auto auto",gap:"6px 12px",alignItems:"center",maxWidth:520},children:$.map(a=>{let c=g.points?.[a]!=null;return[(0,b.jsx)("div",{style:{fontSize:13,color:c?"var(--sd-fg-1, #fff)":"var(--sd-fg-2, #ccc)",fontWeight:c?700:500},children:I.LEVELS[a].label},`${a}-l`),(0,b.jsx)("select",{"aria-label":`Points for ${I.LEVELS[a].label}`,value:g.points?.[a]??I.LEVELS[a].points,onChange:b=>t(a,Number(b.target.value)),style:{...ad,borderColor:c?"rgba(155,89,182,0.7)":void 0},children:ac.map(a=>(0,b.jsx)("option",{value:a,children:a},a))},`${a}-s`),(0,b.jsx)("div",{style:{fontSize:11,color:"var(--sd-fg-4, #667)",minWidth:70},children:c?(0,b.jsxs)("button",{type:"button",onClick:()=>t(a,I.LEVELS[a].points),style:{background:"none",border:"none",color:"var(--sd-fg-3, #9b9bd0)",cursor:"pointer",fontSize:11,padding:0},children:["back to ",I.LEVELS[a].points]}):"as it comes"},`${a}-d`)]})}),(0,b.jsx)("div",{style:{marginTop:18,fontSize:13.5,fontWeight:700,color:"var(--sd-fg-1, #eee)"},children:"Roles you’re looking for"}),(0,b.jsx)(f.Body,{style:{margin:"4px 0 10px"},children:"Anyone whose title has these words counts what you give them, whatever their level: for outbound to one role, or hiring for it. “Account executive” at 10 puts every account executive you can reach near the top."}),(0,b.jsxs)("form",{onSubmit:a=>{a.preventDefault(),(()=>{let a=i.trim().toLowerCase().replace(/\s+/g," ");if(a.length<2)return;let b=[...g.roles.filter(b=>b.text!==a),{text:a,points:k}];h({...g,roles:b.slice(-20)}),j(""),p(null)})()},style:{display:"flex",gap:8,flexWrap:"wrap",alignItems:"center"},children:[(0,b.jsx)("input",{ref:s,value:i,onChange:a=>j(a.target.value),placeholder:"e.g. head of growth, recruiter, founder",maxLength:60,style:{flex:"1 1 220px",padding:"7px 10px",borderRadius:6,fontSize:13,border:f.LINE,background:"rgba(var(--sd-shade, 0, 0, 0), 0.3)",color:"var(--sd-fg-1, #fff)"}}),(0,b.jsx)("select",{"aria-label":"Points for this role",value:k,onChange:a=>l(Number(a.target.value)),style:ad,children:ac.map(a=>(0,b.jsx)("option",{value:a,children:a},a))}),(0,b.jsx)(f.Btn,{type:"submit",disabled:i.trim().length<2||g.roles.length>=20,children:"Add"})]}),g.roles.length>0&&(0,b.jsx)("div",{style:{display:"flex",gap:6,flexWrap:"wrap",marginTop:10},children:g.roles.map(a=>(0,b.jsxs)("span",{style:{display:"inline-flex",alignItems:"center",gap:6,padding:"4px 6px 4px 11px",borderRadius:14,fontSize:12.5,border:"1px solid rgba(155,89,182,0.5)",background:"rgba(155,89,182,0.12)",color:"var(--sd-fg-1, #eee)"},children:[a.text," ",(0,b.jsx)("b",{style:{color:"var(--sd-fg-2, #d2b4ff)"},children:a.points}),(0,b.jsx)("button",{type:"button",onClick:()=>{var b;return b=a.text,void(h({...g,roles:g.roles.filter(a=>a.text!==b)}),p(null))},"aria-label":`Remove ${a.text}`,style:{background:"none",border:"none",color:"var(--sd-fg-3, #aaa)",cursor:"pointer",fontSize:13},children:"✕"})]},a.text))}),(0,b.jsxs)("div",{style:{display:"flex",gap:10,alignItems:"center",marginTop:16},children:[(0,b.jsx)(f.Btn,{primary:!0,onClick:w,disabled:!v||m,children:m?"Rescoring…":"Save and rescore"}),v&&(0,b.jsx)("span",{style:{fontSize:12,color:"var(--sd-fg-3, #999)"},children:"Not saved yet. Saving rescores everyone."})]}),o&&(0,b.jsx)(f.Status,{tone:o.tone,children:o.text})]})}var af=a.i(91621),ag=a.i(26338);let ah={none:"Plain",stars:"Stars",grid:"Grid",glow:"Glow",horizon:"Horizon"},ai={system:"System",rounded:"Rounded",mono:"Mono",serif:"Serif"},aj={S:"S tier",A:"A tier",B:"B tier",C:"C tier",D:"D tier"},ak={soft:"Soft",flat:"Flat",square:"Square",frosted:"Frosted glass",neon:"Neon",bold:"Bold outline"},al={solid:"Solid",droplet:"Glass droplets",flat:"Flat, like Obsidian",glow:"Glowing",plain:"Plain, outlined"},am={fontSize:11,fontWeight:700,color:"var(--sd-fg-4, #778)",letterSpacing:.6,textTransform:"uppercase",margin:"16px 0 8px"};function an({theme:a,width:c=168,height:d=96}){let e=.58*c,f=d/2,g=`p-${a.id}-${a.customised?"c":"p"}-${a.dots}`,h=Math.min(1,Math.max(0,a.glass)),i=af.TIER_KEYS.map((a,b)=>{let c=-Math.PI/2+2*b*Math.PI/af.TIER_KEYS.length,d=22+3*b;return{k:a,x:e+Math.cos(c)*d,y:f+Math.sin(c)*d,a:c}}),j=b=>"one"===a.lines?a.line:a.tiers[b];return(0,b.jsxs)("svg",{width:c,height:d,viewBox:`0 0 ${c} ${d}`,"aria-hidden":"true",style:{display:"block",borderRadius:8},children:[(0,b.jsxs)("defs",{children:[(0,b.jsxs)("radialGradient",{id:`${g}-glow`,children:[(0,b.jsx)("stop",{offset:"0",stopColor:a.bg2,stopOpacity:"0.8"}),(0,b.jsx)("stop",{offset:"1",stopColor:a.bg2,stopOpacity:"0"})]}),(0,b.jsxs)("radialGradient",{id:`${g}-glow2`,children:[(0,b.jsx)("stop",{offset:"0",stopColor:a.accent,stopOpacity:"0.55"}),(0,b.jsx)("stop",{offset:"1",stopColor:a.accent,stopOpacity:"0"})]}),(0,b.jsxs)("linearGradient",{id:`${g}-sun`,x1:"0",y1:"0",x2:"0",y2:"1",children:[(0,b.jsx)("stop",{offset:"0.45",stopColor:a.bg2,stopOpacity:"0"}),(0,b.jsx)("stop",{offset:"1",stopColor:a.bg2,stopOpacity:"0.45"})]}),af.TIER_KEYS.map(c=>(0,b.jsxs)("radialGradient",{id:`${g}-drop-${c}`,fx:"34%",fy:"30%",children:[(0,b.jsx)("stop",{offset:"0",stopColor:"#fff",stopOpacity:"0.95"}),(0,b.jsx)("stop",{offset:"0.25",stopColor:a.tiers[c],stopOpacity:"0.9"}),(0,b.jsx)("stop",{offset:"0.75",stopColor:a.tiers[c],stopOpacity:"0.5"}),(0,b.jsx)("stop",{offset:"1",stopColor:a.tiers[c],stopOpacity:"0.15"})]},c)),(0,b.jsxs)("filter",{id:`${g}-glow`,x:"-50%",y:"-50%",width:"200%",height:"200%",children:[(0,b.jsx)("feGaussianBlur",{stdDeviation:"1.6",result:"b"}),(0,b.jsxs)("feMerge",{children:[(0,b.jsx)("feMergeNode",{in:"b"}),(0,b.jsx)("feMergeNode",{in:"SourceGraphic"})]})]})]}),(0,b.jsx)("rect",{width:c,height:d,fill:a.bg}),"stars"===a.backdrop&&(0,b.jsxs)("g",{fill:"var(--sd-fg-1, #fff)",children:[(0,b.jsx)("circle",{cx:.8*c,cy:.2*d,r:28,fill:`url(#${g}-glow)`}),[[12,10],[40,70],[150,14],[128,80],[24,44],[96,8],[70,88],[158,52]].map(([a,c])=>(0,b.jsx)("circle",{cx:a,cy:c,r:.8,opacity:.85},`${a}-${c}`))]}),"grid"===a.backdrop&&(0,b.jsxs)("g",{stroke:a.bg2,strokeWidth:1,opacity:.9,children:[Array.from({length:9},(a,c)=>(0,b.jsx)("line",{x1:20*c,y1:0,x2:20*c,y2:d},`v${c}`)),Array.from({length:5},(a,d)=>(0,b.jsx)("line",{x1:0,y1:20*d,x2:c,y2:20*d},`h${d}`))]}),"glow"===a.backdrop&&(0,b.jsxs)("g",{children:[(0,b.jsx)("circle",{cx:.2*c,cy:.25*d,r:40,fill:`url(#${g}-glow)`}),(0,b.jsx)("circle",{cx:.85*c,cy:.4*d,r:36,fill:`url(#${g}-glow2)`})]}),"horizon"===a.backdrop&&(0,b.jsxs)("g",{children:[(0,b.jsx)("rect",{width:c,height:d,fill:`url(#${g}-sun)`}),Array.from({length:9},(e,f)=>(0,b.jsx)("line",{x1:21*f,y1:.62*d,x2:(f-4)*40+c/2,y2:d,stroke:a.bg2,strokeOpacity:.35},f)),(0,b.jsx)("line",{x1:0,y1:.62*d,x2:c,y2:.62*d,stroke:a.bg2,strokeOpacity:.5})]}),(0,b.jsx)("rect",{x:0,y:0,width:.24*c,height:d,fill:a.panel,fillOpacity:.92-.82*h}),(0,b.jsx)("rect",{x:.24*c,y:0,width:.75,height:d,fill:"var(--sd-fg-1, #fff)",fillOpacity:.12}),[0,1,2,3,4].map(d=>(0,b.jsx)("rect",{x:6,y:12+14*d,width:.24*c-12,height:6,rx:3,fill:a.tiers[af.TIER_KEYS[d]],fillOpacity:.55},d)),i.map(a=>(0,b.jsx)("line",{x1:e,y1:f,x2:a.x,y2:a.y,stroke:j(a.k),strokeOpacity:.55,strokeWidth:.8},`l${a.k}`)),i.map(c=>[0,1,2].map(d=>{let e=c.a+(d-1)*.5,f=c.x+9*Math.cos(e),g=c.y+9*Math.sin(e);return(0,b.jsxs)("g",{children:[(0,b.jsx)("line",{x1:c.x,y1:c.y,x2:f,y2:g,stroke:j(c.k),strokeOpacity:.4,strokeWidth:.6}),(0,b.jsx)("circle",{cx:f,cy:g,r:1.6,fill:a.tiers[af.TIER_KEYS[(af.TIER_KEYS.indexOf(c.k)+d+1)%5]],fillOpacity:.8})]},`k${c.k}${d}`)})),(0,b.jsx)("g",{filter:"glow"===a.dots?`url(#${g}-glow)`:void 0,children:i.map(c=>(0,b.jsx)("circle",{cx:c.x,cy:c.y,r:"S"===c.k?4.5:3.6,fill:"droplet"===a.dots?`url(#${g}-drop-${c.k})`:a.tiers[c.k],stroke:"droplet"===a.dots?a.tiers[c.k]:"plain"===a.dots?"#2b2b2b":"none",strokeOpacity:"plain"===a.dots?.75:.5,strokeWidth:.6},`d${c.k}`))}),(0,b.jsx)("circle",{cx:e,cy:f,r:5.5,fill:a.you,stroke:a.accent,strokeWidth:1.2})]})}function ao({name:a,value:c,onChange:d,title:e}){return(0,b.jsxs)("label",{title:e||a,style:{display:"flex",alignItems:"center",gap:8,padding:"6px 10px 6px 6px",borderRadius:8,background:"rgba(var(--sd-ink, 255, 255, 255), 0.04)",border:"1px solid rgba(var(--sd-ink, 255, 255, 255), 0.08)",cursor:"pointer"},children:[(0,b.jsx)("input",{type:"color",value:c,onChange:a=>d(a.target.value),style:{width:28,height:28,padding:0,border:"none",borderRadius:6,background:"none",cursor:"pointer"}}),(0,b.jsx)("span",{style:{fontSize:12.5,color:"var(--sd-fg-2, #cdd)"},children:a})]})}function ap({options:a,value:c,onPick:d}){return(0,b.jsx)("div",{style:{display:"flex",flexWrap:"wrap",gap:6},children:a.map(([a,e])=>(0,b.jsx)("button",{type:"button","aria-pressed":c===a,onClick:()=>d(a),style:{padding:"6px 12px",borderRadius:8,fontSize:12.5,fontWeight:600,cursor:"pointer",border:c===a?"1px solid var(--sd-accent)":"1px solid rgba(var(--sd-ink, 255, 255, 255), 0.1)",background:c===a?"color-mix(in srgb, var(--sd-accent) 18%, transparent)":"rgba(var(--sd-ink, 255, 255, 255), 0.03)",color:c===a?"var(--sd-fg-1, #fff)":"var(--sd-fg-3, #99a)"},children:e},a))})}function aq(){let a=(0,c.useSyncExternalStore)(ag.watchTheme,ag.themeNow,ag.serverTheme),d=(0,af.resolveTheme)(a),[e,g]=(0,c.useState)(""),[h,i]=(0,c.useState)(null),j=b=>(0,ag.setTheme)({base:a.base,custom:{...a.custom,...b}}),k=async()=>{let b=(0,af.encodeTheme)(a);try{await navigator.clipboard.writeText(b),i("Copied. Paste it into anyone’s Settings → Appearance.")}catch{g(b),i("Select the code below and copy it.")}},l=()=>{let a=(0,af.decodeTheme)(e);a?((0,ag.setTheme)(a),g(""),i(`Using it: ${(0,af.presetOf)(a.base).name}${Object.keys(a.custom).length?", made someone’s own":""}.`)):i("That isn’t a theme code: it starts with sd-theme:")};return(0,b.jsxs)(f.Section,{id:"appearance",title:"Appearance",intro:"How the whole app looks: pick one of ours, then make it yours. It changes as you go, and stays in this browser.",children:[(0,b.jsx)("div",{style:am,children:"Looks"}),(0,b.jsx)(f.Body,{style:{marginTop:-4,marginBottom:10,fontSize:12.5},children:"Daylight, Paper and Analyst are light; the rest are dark. Each has its own buttons and its own way of drawing the map’s dots."}),(0,b.jsx)("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(190px, 1fr))",gap:10},children:af.THEMES.map(c=>{let e=a.base===c.id,f=e?d:(0,af.resolveTheme)({base:c.id});return(0,b.jsxs)("button",{type:"button","aria-pressed":e,onClick:()=>(0,ag.setTheme)({base:c.id,custom:{}}),title:e&&d.customised?`${c.name}, with your changes. Click to go back to plain ${c.name}.`:c.blurb,style:{textAlign:"left",padding:8,borderRadius:12,cursor:"pointer",color:"var(--sd-fg-1, #fff)",border:e?"2px solid var(--sd-accent)":"1px solid rgba(var(--sd-ink, 255, 255, 255), 0.1)",background:e?"color-mix(in srgb, var(--sd-accent) 10%, transparent)":"rgba(var(--sd-ink, 255, 255, 255), 0.03)"},children:[(0,b.jsx)(an,{theme:f,width:172,height:96}),(0,b.jsxs)("div",{style:{display:"flex",alignItems:"baseline",gap:6,margin:"8px 2px 2px"},children:[(0,b.jsx)("span",{style:{fontSize:13.5,fontWeight:700},children:c.name}),e&&d.customised&&(0,b.jsx)("span",{style:{fontSize:10.5,fontWeight:700,color:"var(--sd-accent)"},children:"yours"})]}),(0,b.jsx)("div",{style:{fontSize:11.5,color:"var(--sd-fg-3, #889)",lineHeight:1.4,margin:"0 2px"},children:c.blurb})]},c.id)})}),(0,b.jsxs)("div",{style:{marginTop:22,padding:"4px 16px 16px",borderRadius:12,border:"1px solid rgba(var(--sd-ink, 255, 255, 255), 0.08)",background:"rgba(var(--sd-ink, 255, 255, 255), 0.02)"},children:[(0,b.jsxs)("div",{style:{display:"flex",alignItems:"baseline",gap:10,flexWrap:"wrap"},children:[(0,b.jsxs)("div",{style:{...am,flex:1},children:["Make it yours",d.customised?"":`: starting from ${(0,af.presetOf)(a.base).name}`]}),d.customised&&(0,b.jsxs)("button",{type:"button",onClick:()=>(0,ag.setTheme)({base:a.base,custom:{}}),style:{padding:"4px 10px",borderRadius:8,fontSize:11.5,cursor:"pointer",border:"1px solid rgba(var(--sd-ink, 255, 255, 255), 0.12)",background:"none",color:"var(--sd-fg-3, #aab)"},children:["Back to plain ",(0,af.presetOf)(a.base).name]})]}),(0,b.jsx)("div",{style:am,children:"Background"}),(0,b.jsxs)("div",{style:{display:"flex",flexWrap:"wrap",gap:8,marginBottom:10},children:[(0,b.jsx)(ao,{name:(0,af.isLight)(d)?"Colour (light)":"Colour",value:d.bg,onChange:a=>j({bg:a}),title:"Behind everything. A light colour makes the whole look light: dark words, dark borders"}),(0,b.jsx)(ao,{name:"Second colour",value:d.bg2,onChange:a=>j({bg2:a}),title:"The backdrop's: the nebula, the grid, the glow or the sunset"}),(0,b.jsx)(ao,{name:"Accent",value:d.accent,onChange:a=>j({accent:a}),title:"What's picked, and the backdrop's glow"})]}),(0,b.jsx)(ap,{value:d.backdrop,options:af.BACKDROPS.map(a=>[a,ah[a]]),onPick:a=>j({backdrop:a})}),(0,b.jsx)("div",{style:am,children:"Dots"}),(0,b.jsxs)("div",{style:{display:"flex",flexWrap:"wrap",gap:8},children:[af.TIER_KEYS.map(c=>(0,b.jsx)(ao,{name:aj[c],value:d.tiers[c],onChange:b=>j({tiers:{...a.custom.tiers||{},[c]:b}})},c)),(0,b.jsx)(ao,{name:"You",value:d.you,onChange:a=>j({you:a}),title:"Your own dot, in the middle of the map"})]}),(0,b.jsx)("div",{style:am,children:"Lines"}),(0,b.jsxs)("div",{style:{display:"flex",flexWrap:"wrap",alignItems:"center",gap:8},children:[(0,b.jsx)(ap,{value:d.lines,options:[["tier","As the person they lead to"],["one","One colour"]],onPick:a=>j({lines:a})}),"one"===d.lines&&(0,b.jsx)(ao,{name:"Line colour",value:d.line,onChange:a=>j({line:a})})]}),(0,b.jsx)("div",{style:am,children:"Buttons"}),(0,b.jsx)(ap,{value:d.buttons,options:af.BUTTONS.map(a=>[a,ak[a]]),onPick:a=>j({buttons:a})}),(0,b.jsx)("div",{style:am,children:"Dots on the map"}),(0,b.jsx)(ap,{value:d.dots,options:af.DOTS.map(a=>[a,al[a]]),onPick:a=>j({dots:a})}),(0,b.jsx)("div",{style:am,children:"Panels"}),(0,b.jsxs)("div",{style:{display:"flex",flexWrap:"wrap",alignItems:"center",gap:14},children:[(0,b.jsx)(ao,{name:"Tint",value:d.panel,onChange:a=>j({panel:a}),title:"The side panels' colour"}),(0,b.jsxs)("label",{style:{display:"flex",alignItems:"center",gap:10,fontSize:12.5,color:"var(--sd-fg-2, #cdd)"},children:["Glass",(0,b.jsx)("input",{type:"range",min:0,max:100,value:Math.round(100*d.glass),onChange:a=>j({glass:Number(a.target.value)/100}),style:{width:160,accentColor:"var(--sd-accent)"}}),(0,b.jsxs)("span",{style:{color:"var(--sd-fg-3, #889)",fontVariantNumeric:"tabular-nums",width:34},children:[Math.round(100*d.glass),"%"]})]})]}),(0,b.jsx)("div",{style:am,children:"Font"}),(0,b.jsx)(ap,{value:d.font,options:Object.keys(af.FONTS).map(a=>[a,ai[a]]),onPick:a=>j({font:a})}),(0,b.jsx)("div",{style:am,children:"Share it"}),(0,b.jsxs)("div",{style:{display:"flex",flexWrap:"wrap",gap:8,alignItems:"center"},children:[(0,b.jsx)("button",{type:"button",onClick:k,style:{padding:"7px 14px",borderRadius:8,fontSize:12.5,fontWeight:700,cursor:"pointer",border:"1px solid var(--sd-accent)",background:"color-mix(in srgb, var(--sd-accent) 16%, transparent)",color:"var(--sd-fg-1, #fff)"},children:"Copy theme code"}),(0,b.jsx)("input",{value:e,onChange:a=>g(a.target.value),placeholder:"Paste a theme code (sd-theme:…)",spellCheck:!1,onKeyDown:a=>{"Enter"===a.key&&l()},style:{flex:"1 1 220px",minWidth:0,padding:"7px 10px",borderRadius:8,fontSize:12,fontFamily:"ui-monospace, Menlo, monospace",border:"1px solid rgba(var(--sd-ink, 255, 255, 255), 0.12)",background:"rgba(var(--sd-shade, 0, 0, 0), 0.25)",color:"var(--sd-fg-1, #dde)"}}),(0,b.jsx)("button",{type:"button",onClick:l,disabled:!e.trim(),style:{padding:"7px 14px",borderRadius:8,fontSize:12.5,fontWeight:600,cursor:e.trim()?"pointer":"default",border:"1px solid rgba(var(--sd-ink, 255, 255, 255), 0.12)",background:"rgba(var(--sd-ink, 255, 255, 255), 0.04)",color:e.trim()?"var(--sd-fg-1, #dde)":"var(--sd-fg-4, #667)"},children:"Use it"})]}),h&&(0,b.jsx)(f.Body,{style:{fontSize:12,marginTop:8},children:h}),(0,b.jsx)(f.Body,{style:{fontSize:11.5,color:"var(--sd-fg-4, #667)",marginTop:8},children:"A code holds colours and choices only, nothing about your network."})]})]})}var ar=a.i(90017),as=a.i(8917);let at=[9,18],au=Math.ceil(.6*as.RESTRICTED_AT),av={ok:{label:"Well within",color:"#00ff88"},"above-default":{label:"Above the default",color:"#FFD700"},risky:{label:"Risky",color:"#FF8C42"},danger:{label:"Too close",color:"#ff6b6b"},paused:{label:"Paused",color:"#ff6b6b"},unknown:{label:"Can’t tell",color:"#8b9a9a"}};function aw({cooldown:a,searchesDay:b,lastPushback:c,searchesSincePushback:d,now:e=Date.now()}={}){return a?"paused":Number.isFinite(b)?b>=au||function({lastPushback:a,searchesSincePushback:b,now:c=Date.now()}={}){let d=a?.at;return Number.isFinite(d)&&c-d<864e5&&c>=d&&b>0}({lastPushback:c,searchesSincePushback:d,now:e})?"danger":b>as.RISKY_DAILY?"risky":b>as.SAFE_LIMITS.daily?"above-default":"ok":"unknown"}function ax(a,b=[]){return Math.max(Math.ceil(1.08*Math.max(0,...b.filter(Number.isFinite))),Math.ceil(1.05*(Number(a)||0)),1)}function ay(a){return new Date(a).toLocaleString(void 0,{weekday:"short",month:"short",day:"numeric",hour:"numeric",minute:"2-digit"}).replace(/ /g," ")}function az(a,b=Date.now()){if(!Number.isFinite(a))return"recently";let c=Math.round((b-a)/6e4);if(c<1)return"just now";if(c<60)return`${c} min ago`;let d=Math.round(c/60);return d<48?`${d} h ago`:`${Math.round(d/24)} days ago`}var aA=a.i(81273);let aB=a=>Number.isFinite(a)?a.toLocaleString("en-US"):"?",aC=(a,b,c=`${b}s`)=>`${aB(a)} ${1===a?b:c}`,aD={color:"var(--sd-blue, #3498DB)",textDecoration:"none",fontWeight:600},aE={fontSize:12,color:"var(--sd-fg-4, #778)",lineHeight:1.6,marginTop:4};function aF({level:a}){let c=av[a]||av.unknown;return(0,b.jsxs)("span",{role:"status",style:{display:"inline-flex",alignItems:"center",gap:7,padding:"4px 11px",borderRadius:999,fontSize:12.5,fontWeight:700,color:c.color,background:`${c.color}1f`,border:`1px solid ${c.color}55`,whiteSpace:"nowrap"},children:[(0,b.jsx)("span",{style:{width:7,height:7,borderRadius:"50%",background:c.color}}),c.label]})}let aG=(a,b)=>`${Math.max(0,Math.min(100,a/b*100))}%`;function aH({title:a,used:c,of:d,max:e,color:f,ticks:g=[],band:h,children:i}){return(0,b.jsxs)("div",{style:{marginTop:18},children:[(0,b.jsxs)("div",{style:{display:"flex",alignItems:"baseline",gap:10,flexWrap:"wrap"},children:[(0,b.jsx)("span",{style:{fontSize:13.5,fontWeight:650,color:"var(--sd-fg-1, #e8e8ee)"},children:a}),(0,b.jsxs)("span",{style:{marginLeft:"auto",fontSize:13,color:"var(--sd-fg-3, #8b9a9a)",fontVariantNumeric:"tabular-nums"},children:[(0,b.jsx)("b",{style:{fontSize:17,color:"var(--sd-fg-1, #fff)"},children:aB(c)}),d?` ${d}`:""]})]}),(0,b.jsxs)("div",{style:{position:"relative",height:10,borderRadius:5,marginTop:7,background:"rgba(var(--sd-ink, 255, 255, 255), 0.07)"},children:[h&&(0,b.jsx)("div",{title:h.title,style:{position:"absolute",top:0,bottom:0,left:aG(h.from,e),width:`calc(${aG(h.to,e)} - ${aG(h.from,e)})`,background:"repeating-linear-gradient(135deg, rgba(255,215,0,0.28) 0 4px, rgba(255,215,0,0.08) 4px 8px)"}}),(0,b.jsx)("div",{style:{position:"absolute",top:0,bottom:0,left:0,width:Number.isFinite(c)?aG(c,e):0,borderRadius:5,background:f,transition:"width 0.4s ease"}}),g.map(a=>(0,b.jsx)("div",{title:a.title,style:{position:"absolute",top:-3,bottom:-3,left:aG(a.at,e),width:2,marginLeft:-1,borderRadius:1,background:a.color||"rgba(var(--sd-ink, 255, 255, 255), 0.55)"}},a.at))]}),(g.length>0||h)&&(0,b.jsx)("div",{"aria-hidden":"true",style:{position:"relative",height:16,marginTop:3,fontSize:10.5,color:"var(--sd-fg-4, #778)",fontVariantNumeric:"tabular-nums"},children:(h?[h.from,h.to]:[]).filter(a=>!g.some(b=>b.at===a)).map(a=>({at:a,label:String(a),color:"rgba(255,215,0,0.75)"})).concat(g).map(a=>{let c=a.at/e*100;return(0,b.jsx)("span",{style:{position:"absolute",left:`${Math.min(100,c)}%`,whiteSpace:"nowrap",color:a.color||void 0,transform:c>94?"translateX(-100%)":c<4?"none":"translateX(-50%)"},children:a.label},a.at)})}),(0,b.jsx)("div",{style:{fontSize:12.5,color:"var(--sd-fg-3, #8b9a9a)",lineHeight:1.6,marginTop:2},children:i})]})}function aI({label:a,children:c}){return(0,b.jsxs)("div",{style:{display:"flex",gap:"4px 16px",flexWrap:"wrap",padding:"10px 0",borderTop:f.LINE,fontSize:13},children:[(0,b.jsx)("span",{style:{flex:"0 0 150px",color:"var(--sd-fg-1, #e8e8ee)",fontWeight:600},children:a}),(0,b.jsx)("span",{style:{flex:"1 1 280px",color:"var(--sd-fg-3, #8b9a9a)",lineHeight:1.6},children:c})]})}let aJ=(a,b)=>`${function(a,b=Date.now()){let c=a-b;if(!(c>0))return"now";if(c<6e4)return"in under a minute";let d=Math.round(c/6e4);if(d<60)return`in ${d} min`;let e=Math.floor(d/60);return e>=48?`in ${Math.round(e/24)} days`:`in ${e} h${d%60?` ${d%60} min`:""}`}(a,b)} (${ay(a)})`;function aK(){var a;let e,[g,h]=(0,c.useState)(null),[i,j]=(0,c.useState)(null),[k,l]=(0,c.useState)(!1),m=(0,c.useCallback)(()=>fetch("/api/scraper?usage=1",{cache:"no-store"}).then(a=>a.json().then(b=>a.ok&&!b.error?b:Promise.reject(Error(b.error||"The usage could not be read.")))).then(a=>{h(a),j(null)}).catch(a=>j(a.message)),[]);(0,c.useEffect)(()=>{m();let a=setInterval(m,3e4);return()=>clearInterval(a)},[m]);let n=async()=>{l(!0);try{let a=await fetch("/api/scraper",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"set-limits",...as.SAFE_LIMITS})});if(!a.ok)throw Error((await a.json().catch(()=>({}))).error||"The budget could not be saved.");await m()}catch(a){j(a.message)}finally{l(!1)}};if(!g)return(0,b.jsx)(f.Section,{id:"usage",title:"LinkedIn usage",children:(0,b.jsx)(f.Body,{children:i?`${i}`:"Counting…"})});let o=g.now,{limits:p={}}=g,q=g.searchesToday,r=aw({cooldown:g.cooldown,searchesDay:q,lastPushback:g.lastPushback,searchesSincePushback:g.searchesSincePushback,now:o}),s=function(a,b={},c={}){let d=function(a,{searchesDay:b,cooldown:c,lastPushback:d,now:e=Date.now()}={}){if("paused"===a){let a=String(c?.reason||"LinkedIn pushed back");return`Scanning is paused${c?.until?` until ${ay(c.until)}`:""}. ${a.charAt(0).toUpperCase()}${a.slice(1)}. Nothing that searches LinkedIn runs until then, so the account can recover.`}return"danger"===a?b>=au?`${b} searches in the last 24 hours. A real account was restricted after ${as.RESTRICTED_AT}. Stop scanning until this comes down: each search stops counting 24 hours after it was made.`:`LinkedIn pushed back ${az(d?.at,e)}, and searching has carried on since. Carrying on after a warning is what LinkedIn says turns it into a restriction. Leave it at least a day.`:"risky"===a?`More than ${as.RISKY_DAILY} searches in the last 24 hours. That is past what Six Degrees asks you to confirm, and a free account's whole month may be 250 to 350.`:"above-default"===a?`More than the default ${as.SAFE_LIMITS.daily} searches in the last 24 hours. The default leaves room under limits LinkedIn doesn’t publish.`:"unknown"===a?"The record of searches on this computer couldn’t be read, so the scanner counts today’s budget as used until it can.":null}(a,b),e="danger"===a&&b.searchesDay>=au;return[d,(0,as.limitNote)(c,{restriction:!e})].filter(Boolean)}(r,{searchesDay:q,cooldown:g.cooldown,lastPushback:g.lastPushback,now:o},p),t=p.daily>as.SAFE_LIMITS.daily||0===p.monthly||p.monthly>as.SAFE_LIMITS.monthly,u=function({leftDay:a,leftMonth:b,paused:c=!1}={}){let d=[a,b].filter(a=>Number.isFinite(a));if(!d.length)return null;let e=c?0:Math.max(0,Math.min(...d));return{searches:e,people:9*e,by:null!=a&&null!=b?a<=b?"day":"month":null!=a?"day":"month"}}({leftDay:g.leftToday,leftMonth:g.leftMonth,paused:!!g.cooldown}),v=(0,aA.paceOf)(p.pace),w=g.lastPushback,x=aw({searchesDay:q}),y=[{at:as.SAFE_LIMITS.daily,label:String(as.SAFE_LIMITS.daily),title:"The default budget"},{at:as.RISKY_DAILY,label:String(as.RISKY_DAILY),title:"Above this is risky",color:"#FF8C42"},{at:as.RESTRICTED_AT,label:String(as.RESTRICTED_AT),title:"A real account was restricted here",color:"#ff6b6b"}];p.daily&&!y.some(a=>a.at===p.daily)&&y.push({at:p.daily,label:`${p.daily} yours`,title:"Your daily budget",color:"var(--sd-blue, #3498DB)"});let z=ax(q,y.map(a=>a.at)),A=g.searchesMonth,B=p.monthly?[{at:p.monthly,label:`${p.monthly} yours`,title:"Your monthly budget",color:"var(--sd-blue, #3498DB)"}]:[],C=ax(A,[350,p.monthly||0]),D=p.monthly&&A>=p.monthly?"#ff6b6b":A>=250?"#FFD700":"#3498DB",E=g.searchesWeek,F=ax(E,[200]),G=g.profilesToday,H=Math.max(p.profiles||1,Number(G)||0);return(0,b.jsxs)(f.Section,{id:"usage",title:"LinkedIn usage",children:[(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:12,flexWrap:"wrap"},children:[(0,b.jsx)(aF,{level:r}),(0,b.jsx)("span",{style:{fontSize:13,color:"var(--sd-fg-3, #8b9a9a)",flex:"1 1 260px",lineHeight:1.5},children:"What Six Degrees has asked of your LinkedIn account from this computer, and how close that is to the line."})]}),s.length>0&&(0,b.jsxs)("div",{style:{marginTop:14,padding:"11px 14px",borderRadius:8,fontSize:13,lineHeight:1.6,color:"var(--sd-fg-2, #e3d9c4)",background:`${(av[r]||av.unknown).color}14`,border:`1px solid ${(av[r]||av.unknown).color}55`},children:[s.map((a,c)=>(0,b.jsx)("div",{style:{marginTop:6*!!c},children:a},c)),t&&(0,b.jsx)("button",{onClick:n,disabled:k,style:{marginTop:9,padding:"6px 12px",borderRadius:7,fontSize:12.5,fontWeight:650,cursor:k?"not-allowed":"pointer",background:"rgba(255,215,0,0.08)",color:"var(--sd-gold, #FFD700)",border:"1px solid rgba(255,215,0,0.4)"},children:k?"Saving…":`Back to ${as.SAFE_LIMITS.daily} a day, ${as.SAFE_LIMITS.monthly} a month`})]}),i&&(0,b.jsx)(f.Body,{style:{color:"var(--sd-red, #ff7676)"},children:i}),(0,b.jsxs)(aH,{title:"Searches in the last 24 hours",used:q,of:p.daily?`of ${p.daily} a day`:"no daily cap",max:z,color:(av[x]||av.unknown).color,ticks:y,children:[g.unreadable?null:p.daily?g.dayFreesAt?(0,b.jsxs)(b.Fragment,{children:["Your ",p.daily," a day are used. The next one frees ",aJ(g.dayFreesAt,o),"."]}):(0,b.jsxs)(b.Fragment,{children:[aC(g.leftToday,"search","searches")," left under your budget",g.cooldown?", once the pause ends":"","."]}):(0,b.jsx)(b.Fragment,{children:"No daily cap is set, so only the monthly one stops a scan."}),g.dayClearAt&&(0,b.jsxs)(b.Fragment,{children:[" All clear ",aJ(g.dayClearAt,o),", when the newest of these turns 24 hours old."]}),(0,b.jsxs)("div",{style:aE,children:[as.SAFE_LIMITS.daily," is the default budget. Over ",as.RISKY_DAILY," is risky: the budget picker asks first."," ",as.RESTRICTED_AT," is where a real account was restricted, on Sep 28, 2026, with searches run back to back."," ",au," (60% of that) or more shows as too close."]})]}),(0,b.jsxs)(aH,{title:"Searches this month",used:A,of:p.monthly?`of ${p.monthly} a month`:"no monthly cap",max:C,color:D,ticks:B,band:{from:250,to:350,title:"The range people report for a free account"},children:["LinkedIn’s month resets ",(a=g.monthResets,e=new Intl.DateTimeFormat("en-US",{timeZone:"America/Los_Angeles",month:"short",day:"numeric",hour:"numeric",minute:"2-digit"}).format(new Date(a)),`${e.replace(/ /g," ")} Pacific`)," (",ay(g.monthResets)," here).",p.monthly?Number.isFinite(g.leftMonth)&&(0,b.jsxs)(b.Fragment,{children:[" ",aC(g.leftMonth,"search","searches")," left under your budget."]}):(0,b.jsx)(b.Fragment,{children:" No monthly cap is set (Premium)."}),(0,b.jsxs)("div",{style:aE,children:["The shaded ",250," to ",350," is the range people report for a free account’s monthly search limit. LinkedIn doesn’t publish one, so it’s a guide, not a fact. Every page of someone’s connections is one search."]})]}),(0,b.jsxs)(aH,{title:"Searches in the last 7 days",used:E,of:"against Auto scan's 200",max:F,color:E>=200?"#FFD700":"#3498DB",ticks:[{at:200,label:String(200),title:"Auto scan stops here"}],children:["Auto scan stops at ",200," in any 7 days. A scan you start yourself stops only at your daily and monthly budget."]}),(0,b.jsxs)(aH,{title:"Profile views in the last 24 hours",used:G,of:`of ${p.profiles} a day`,max:H,color:G>=p.profiles?"#ff6b6b":"#9B59B6",children:[g.profilesFreeAt?(0,b.jsxs)(b.Fragment,{children:["Your ",p.profiles," a day are used. The next one frees ",aJ(g.profilesFreeAt,o),"."]}):Number.isFinite(G)&&(0,b.jsxs)(b.Fragment,{children:[aC(g.profilesLeftToday,"view","views")," left."]}),(0,b.jsxs)("div",{style:aE,children:["Each circle scan opens the person’s profile once. Profile views are what got an account restricted on Sep 9, 2026, after about 20 to 25 in an hour; at ",v.label," the scanner opens at most one every ",v.profileGap," seconds."]})]}),(0,b.jsxs)("div",{style:{marginTop:22},children:[(0,b.jsxs)(aI,{label:"Speed",children:[v.label,": about ",(0,aA.searchesPerHour)(p.pace)," searches an hour at most while a scan runs.",Number.isFinite(g.searchesLastHour)&&(0,b.jsxs)(b.Fragment,{children:[" In the last hour: ",aC(g.searchesLastHour,"search","searches"),"."]})," ",(0,b.jsx)(d.default,{href:"/setup",style:aD,children:"Change it on the Scan page"})]}),(0,b.jsx)(aI,{label:"Can still map",children:g.unreadable?(0,b.jsx)(b.Fragment,{children:"Can’t tell until the record of searches can be read."}):u?g.cooldown?(0,b.jsx)(b.Fragment,{children:"No one until the pause ends."}):0===u.searches?(0,b.jsxs)(b.Fragment,{children:["No one for now: your ","day"===u.by?"daily":"monthly"," budget is used."]}):(0,b.jsxs)(b.Fragment,{children:["About ",aB(u.people)," people: ",aC(u.searches,"search","searches")," left under your"," ","day"===u.by?"daily":"monthly"," budget, at about ",9," people a search.",(0,b.jsx)("span",{style:{color:"var(--sd-fg-4, #778)"},children:" An estimate: a page of results shows up to 10 people, and the last page of a list is usually short."})]}):(0,b.jsx)(b.Fragment,{children:"No cap is set, so there’s no count of what’s left."})}),(0,b.jsx)(aI,{label:"Last pushback",children:w?(0,b.jsxs)(b.Fragment,{children:[w.at?(0,b.jsxs)(b.Fragment,{children:[ay(w.at)," (",az(w.at,o),"): "]}):null,w.reason,".",w.active&&(0,b.jsxs)(b.Fragment,{children:[" Scanning is paused until ",ay(w.pausedUntil),"."]}),w.liftedAt&&(0,b.jsxs)(b.Fragment,{children:[" You lifted the pause ",ay(w.liftedAt),"; it would have run until ",ay(w.pausedUntil),"."]}),!w.active&&!w.liftedAt&&w.pausedUntil&&(0,b.jsxs)(b.Fragment,{children:[" The pause ended ",ay(w.pausedUntil),"."]}),g.searchesSincePushback>0&&(0,b.jsxs)(b.Fragment,{children:[" ",aC(g.searchesSincePushback,"search","searches")," since."]})]}):(0,b.jsx)(b.Fragment,{children:"None on record on this computer."})}),(0,b.jsxs)(aI,{label:"Auto scan",children:["However high your budget is set, Auto scan keeps under its own limits: ",40," searches in any 24 hours,"," ",200," in any 7 days, only from ",function([a,b]=at){let c=a=>`${a%12||12} ${a<12?"AM":"PM"}`;return`${c(a)} to ${c(b)}`}(at)," on this computer’s clock,"," ","an hour’s rest"," after every ",8," searches,"," ","and ",2," days off after any check from LinkedIn."]})]}),(0,b.jsxs)("div",{style:{...aE,marginTop:14,paddingTop:12,borderTop:f.LINE},children:["Where these numbers come from: Six Degrees writes down every search and profile view it makes on your LinkedIn account, on this computer, and counts them here. Searches you make yourself on linkedin.com aren’t in it, and LinkedIn shows no count of its own. The ",as.RESTRICTED_AT," searches and the 20 to 25 profile views are what happened to one real account, not safe limits. Change the budget on the"," ",(0,b.jsx)(d.default,{href:"/setup",style:aD,children:"Scan page"}),", under Fine-tune the scanner. Nothing here is sent anywhere."," ","Counted ",ay(o),"."]})]})}var aL=a.i(58834);let aM={"mac-app":"the Mac app","windows-app":"the Windows app","linux-app":"the Linux app",npm:"the npm package (npx six-degrees)",source:"a copy built from the source code",git:"a git checkout of the source code"};function aN(){let[a,e]=(0,c.useState)(null),[h,i]=(0,c.useState)(null),[j,k]=(0,c.useState)(0),l=()=>k(a=>a+1);if((0,c.useEffect)(()=>{fetch("/api/settings").then(a=>a.json().then(b=>a.ok?b:Promise.reject(Error(b.error||"Could not load settings.")))).then(e).catch(a=>i(a.message))},[]),aL.IS_DEMO)return(0,b.jsxs)("div",{style:{minHeight:"100vh",background:"var(--sd-page)",color:"rgba(var(--sd-ink, 255, 255, 255), 0.7)",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:12,textAlign:"center",padding:24,fontFamily:f.FONT},children:[(0,b.jsx)("h2",{style:{margin:0,fontSize:20,fontWeight:700,color:"var(--sd-fg-1, #fff)"},children:"Not part of the demo"}),(0,b.jsx)("p",{style:{margin:0,fontSize:13},children:"The public demo includes the Network Circle and Degrees views only."}),(0,b.jsx)(d.default,{href:"/",style:{fontSize:12,color:"rgba(var(--sd-ink, 255, 255, 255), 0.5)",textDecoration:"none"},children:"← Back to the network"})]});let m=a?.about;return(0,b.jsxs)("div",{style:{minHeight:"100vh",background:"var(--sd-page)",color:"var(--sd-fg-1, #fff)",fontFamily:f.FONT},children:[(0,b.jsxs)("header",{style:{padding:"16px 24px",borderBottom:f.LINE,display:"flex",alignItems:"center",gap:16},children:[(0,b.jsx)(d.default,{href:"/",style:{display:"flex",alignItems:"center",gap:6,color:"var(--sd-fg-3, #888)",textDecoration:"none",fontSize:13,fontWeight:600,padding:"6px 14px",borderRadius:6,background:"rgba(var(--sd-ink, 255, 255, 255), 0.06)",border:f.LINE},children:"← Back to Map"}),(0,b.jsx)("h1",{style:{fontSize:22,fontWeight:700,margin:0,background:"linear-gradient(135deg, #FFD700, #9B59B6, #3498DB)",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent"},children:"Settings"})]}),(0,b.jsxs)("main",{style:{maxWidth:980,margin:"0 auto",padding:"8px 24px 64px"},children:[h&&(0,b.jsx)(f.Body,{style:{color:"var(--sd-red, #ff7676)",marginTop:16},children:h}),(0,b.jsx)(g,{}),(0,b.jsx)(aK,{}),(0,b.jsx)(aq,{}),(0,b.jsxs)(f.Section,{id:"scoring",title:"Scores",children:[(0,b.jsxs)(f.Body,{children:["How someone’s power score is worked out, and the four things you can change about it:"," ",(0,b.jsx)("a",{href:"#sector",style:{color:"var(--sd-blue, #3498DB)",textDecoration:"none",fontWeight:600},children:"your field"}),","," ",(0,b.jsx)("a",{href:"#tiers",style:{color:"var(--sd-blue, #3498DB)",textDecoration:"none",fontWeight:600},children:"how tiers are graded"}),","," ",(0,b.jsx)("a",{href:"#titles",style:{color:"var(--sd-blue, #3498DB)",textDecoration:"none",fontWeight:600},children:"how titles rank"})," and"," ",(0,b.jsx)("a",{href:"#companies",style:{color:"var(--sd-blue, #3498DB)",textDecoration:"none",fontWeight:600},children:"any company’s score"}),". A change here rescores everyone. How your network holds together is in"," ",(0,b.jsx)(d.default,{href:"/profile?view=insights",style:{color:"var(--sd-blue, #3498DB)",textDecoration:"none",fontWeight:600},children:"Profile → Insights"}),"."]}),(0,b.jsx)(S,{onSaved:l}),(0,b.jsx)(Z,{onSaved:l}),(0,b.jsx)(ae,{onSaved:l}),(0,b.jsx)("div",{id:"companies",style:{marginTop:28},children:(0,b.jsx)(ar.default,{version:j})})]}),(0,b.jsx)(D,{}),(0,b.jsx)(f.Section,{id:"about",title:"About this copy",children:m?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)(f.Body,{children:["Version ",(0,b.jsx)(f.Mono,{children:m.version}),", running as ",aM[m.kind]||m.kind,"."]}),(0,b.jsxs)(f.Body,{children:["Your network is kept in ",(0,b.jsx)(f.Mono,{children:m.dataDir}),m.customDataDir?" (a folder you chose).":".",["mac-app","windows-app","linux-app"].includes(m.kind)&&" Help → Show the Data Folder opens it."]}),(0,b.jsx)(f.Body,{style:{fontSize:12,color:"var(--sd-fg-4, #667)",marginTop:10},children:"Settings are saved with your network, on this computer. Nothing here is sent anywhere."})]}):!h&&(0,b.jsx)(f.Body,{children:"Loading…"})})]})]})}a.s(["default",0,function(){return(0,b.jsx)(e.default,{children:(0,b.jsx)(aN,{})})}],54209)}];
1
+ module.exports=[54209,a=>{"use strict";var b=a.i(87924),c=a.i(72131),d=a.i(38246),e=a.i(36839),f=a.i(16874);function g(){let[a,d]=(0,c.useState)(null);return((0,c.useEffect)(()=>{fetch("/api/update").then(a=>a.json()).then(d).catch(()=>{})},[]),a)?a.installed?(0,b.jsx)(k,{local:a}):(0,b.jsx)(i,{local:a}):null}async function h(a){let b=await fetch("/api/update",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)}),c=await b.json().catch(()=>({}));return{ok:b.ok,d:c}}function i({local:a}){let[d,e]=(0,c.useState)(null),[g,j]=(0,c.useState)(null),[k,l]=(0,c.useState)(null),[m,n]=(0,c.useState)(null);async function o(a){j(a),l(null);try{let{ok:b,d:c}=await h({action:a});if(!b){l(c.error||"Something went wrong."),c.dirty&&e({dirty:c.dirty});return}"check"===a?e(c):(n(c),e(null))}catch(a){l(a.message)}finally{j(null)}}return(0,c.useEffect)(()=>{"updates"===new URLSearchParams(window.location.search).get("check")&&(document.getElementById("updates")?.scrollIntoView({block:"center"}),o("check"),window.history.replaceState(null,"",window.location.pathname))},[]),(0,b.jsxs)(f.Section,{id:"updates",title:"Updates",children:[m?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)(f.Body,{children:["Updated to ",(0,b.jsx)(f.Mono,{children:m.sha}),": “",m.subject,"”."]}),(0,b.jsx)(f.Body,{style:{color:m.needsRestart?"var(--sd-gold, #FFD700)":void 0},children:m.needsRestart?"Stop the app in your terminal and start it again: this update changed how it starts.":"The page will pick up most changes on its own. Restart the app if anything looks odd."})]}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)(f.Body,{children:["You are on ",(0,b.jsx)(f.Mono,{children:a.sha}),": “",a.subject,"”."]}),d&&0===d.behind&&(0,b.jsx)(f.Status,{tone:"ok",children:"You’re up to date."}),d&&d.behind>0&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)(f.Body,{style:{color:"var(--sd-green, #00ff88)"},children:[d.behind," update",1===d.behind?"":"s"," available."]}),(0,b.jsx)("pre",{style:q,children:d.commits.join("\n")})]}),d?.dirty?.length>0&&(0,b.jsxs)(f.Body,{children:["Changed files here:"," ",(0,b.jsx)(f.Mono,{children:d.dirty.join(", ")}),". Commit or discard them first: this will not throw away your work."]}),(0,b.jsxs)(p,{children:[(0,b.jsx)(f.Btn,{onClick:()=>o("check"),disabled:!!g,children:"check"===g?"Checking…":"Check for updates"}),d?.behind>0&&(0,b.jsx)(f.Btn,{onClick:()=>o("pull"),disabled:!!g,primary:!0,children:"pull"===g?"Updating…":`Install ${d.behind} update${1===d.behind?"":"s"}`})]})]}),k&&(0,b.jsx)(f.Body,{style:{color:"var(--sd-red, #ff7676)"},children:k}),(0,b.jsxs)(f.Body,{style:{fontSize:12,color:"var(--sd-fg-4, #667)",marginTop:12},children:["Nothing is checked automatically and nothing about you is sent: this runs the same ",(0,b.jsx)(f.Mono,{children:"git fetch"})," and ",(0,b.jsx)(f.Mono,{children:"git pull"})," you would type yourself."]})]})}let j=["checking","downloading","verifying","preparing","restarting"];function k({local:a}){let d="mac-app"===a.kind,[e,g]=(0,c.useState)(!1),[i,r]=(0,c.useState)(null),[s,t]=(0,c.useState)(null),[u,v]=(0,c.useState)(!1),[w,x]=(0,c.useState)(null),[y,z]=(0,c.useState)(a.job||null),[A,B]=(0,c.useState)(!1),[C,D]=(0,c.useState)(null),[E,F]=(0,c.useState)(null),[G,H]=(0,c.useState)(void 0),[I,J]=(0,c.useState)(0),[K,L]=(0,c.useState)(!1),M=!!(y&&j.includes(y.phase)),N=M&&("restarting"===y.phase||I>0);async function O(){g(!0),r(null),t(null),D(null),F(null),H(void 0),z(a=>a&&j.includes(a.phase)?a:null);try{let{ok:a,d:b}=await h({action:"check-release"});a?(r(b),x(new Date)):t(b.error||"Could not check.")}catch(a){t(a.message)}finally{g(!1)}}async function P(){B(!0),D(null),F(null),H(void 0),J(0),L(!1);try{let{ok:a,d:b}=await h({action:"install-release"});b.job&&z(b.job),!a&&(D(b.error||"The update could not start."),F(b.refusal||null),"fallback"in b&&H(b.fallback))}catch(a){D(a.message)}finally{B(!1)}}async function Q(){try{let{d:a}=await h({action:"cancel-install"});a.job&&z(a.job)}catch{}}async function R(){try{await navigator.clipboard.writeText(a.command),v(!0),setTimeout(()=>v(!1),1600)}catch{t("Could not copy. Select the line and copy it by hand.")}}(0,c.useEffect)(()=>{"#updates"===window.location.hash&&document.getElementById("updates")?.scrollIntoView({block:"start"}),"updates"!==new URLSearchParams(window.location.search).get("check")||(window.history.replaceState(null,"",window.location.pathname),a.job&&j.includes(a.job.phase)||(document.getElementById("updates")?.scrollIntoView({block:"center"}),O().then(()=>document.getElementById("updates")?.scrollIntoView({block:"end",behavior:"smooth"}))))},[a.job]),(0,c.useEffect)(()=>{if(!M)return;let a=!0,b=setTimeout(async()=>{try{if(N){let b=await fetch("/api/update",{cache:"no-store"}),c=await b.json();if(!a)return;if(!c.job||c.job.id!==y.id)return void window.location.reload();J(0),z(c.job)}else{let{ok:b,d:c}=await h({action:"update-status"});a&&b&&c.job&&z(c.job)}}catch{a&&J(a=>a+1)}},N?1500:600);return()=>{a=!1,clearTimeout(b)}},[y,I,M,N]),(0,c.useEffect)(()=>{if(!N)return;let a=setTimeout(()=>L(!0),6e4);return()=>clearTimeout(a)},[N]);let S=y?.phase==="failed",T=d&&i?.install?.possible,U=S&&"stale-check"===y.code||"not-checked"===E,V=void 0!==G?G:i?.fallback,W="windows-app"===a.kind||"linux-app"===a.kind,X=!W&&i?.newer&&(!d||V)&&(!T||S||C||a.lastUpdate?.tone==="bad"),Y=function({mac:a,kind:b,canInstall:c,fallback:d}){if(!a)return"source"===b?"A copy built from the source code updates by fetching the code and building it again, which it can't do while it runs. Stop it (Ctrl-C), then run this in the six-degrees folder. Your network stays where it is.":"This copy runs inside the terminal that started it, so it can't replace itself while it runs. Stop it first (Ctrl-C), then run this to start the newest version. Your network stays where it is.";if(!d)return null;let e=d.dataDir?` It opens the new version on the usual data folder, not on ${d.dataDir}: to use that one, quit it and open it again with --data-dir, as you opened this one.`:"";return"replace"===d.mode?`${c?"Or paste this into Terminal.":"Paste this into Terminal instead."} It closes this app, puts the new version in its place and opens it. Your network stays where it is.${e}`:`${c?"Or copy":"Copy"} this line, quit Six Degrees, then paste it into Terminal. It installs the new version at ${d.installsTo}, not where this copy is, and opens it: use that one from then on. Your network stays where it is.${e}`}({mac:d,kind:a.kind,canInstall:T,fallback:V});return(0,b.jsxs)(f.Section,{id:"updates",title:"Updates",children:[a.lastUpdate&&!M&&(0,b.jsx)(n,{report:a.lastUpdate}),(0,b.jsxs)(f.Body,{children:["You have version ",(0,b.jsx)(f.Mono,{children:a.version}),"."]}),M?(0,b.jsx)(m,{job:y,restarting:N,slow:K,onCancel:Q}):(0,b.jsxs)(b.Fragment,{children:[S&&(0,b.jsxs)(f.Status,{tone:"bad",children:[(0,b.jsx)("strong",{children:"The update didn’t finish."})," ",y.error," Nothing was changed."]}),y?.phase==="cancelled"&&(0,b.jsx)(f.Status,{children:"Cancelled. Nothing was changed."}),C&&(0,b.jsx)(f.Status,{tone:"bad",children:C}),i&&!i.latest&&(0,b.jsx)(f.Status,{children:"No release has been published yet."}),i?.latest&&!i.newer&&(0,b.jsxs)(f.Status,{tone:"ok",children:["You’re up to date: ",i.latest.version," is the newest version.",w&&(0,b.jsxs)("span",{style:{color:"var(--sd-fg-3, #8b9a9a)"},children:[" Checked at ",w.toLocaleTimeString([],{hour:"numeric",minute:"2-digit"}),"."]})]}),i?.newer&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)(f.Body,{style:{color:"var(--sd-green, #00ff88)"},children:["Version ",i.latest.version," is available."]}),T&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)(f.Body,{children:["It downloads ",i.install.size?`about ${l(i.install.size)} MB`:"the new version"," from GitHub, checks it, then closes, replaces itself and reopens. Your network isn’t touched, and a backup of it is made first."]}),(0,b.jsxs)(p,{children:[U?(0,b.jsx)(f.Btn,{onClick:O,disabled:e,primary:!0,children:e?"Checking…":"Check again"}):(0,b.jsx)(f.Btn,{onClick:P,disabled:A,primary:!0,children:A?"Starting…":S||C?"Try again":"Install and restart"}),(0,b.jsx)(o,{url:i.latest.url})]})]}),d&&!T&&i.install?.reason&&(0,b.jsx)(f.Body,{children:i.install.reason}),W&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)(f.Body,{children:["windows-app"===a.kind?"Download its Setup.exe from the release page and run it: it closes this copy, puts the new version in its place and opens it.":"Download its .deb (or .tar.gz) from the release page and install it over this one, after quitting Six Degrees."," ","Your network stays where it is."]}),(0,b.jsx)(p,{children:(0,b.jsx)("a",{href:(i.download||i.latest).url,target:"_blank",rel:"noreferrer",style:{display:"inline-block",padding:"8px 16px",borderRadius:8,fontSize:13,fontWeight:700,textDecoration:"none",background:"linear-gradient(135deg, #9B59B6, #3498DB)",color:"#fff"},children:"Open the release page"})})]}),X&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(f.Body,{children:Y}),a.testReleases?(0,b.jsx)("pre",{style:q,children:"Not shown in test mode: it would install the real release from GitHub into Applications."}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("pre",{style:q,children:a.command}),(0,b.jsxs)(p,{children:[(0,b.jsx)(f.Btn,{onClick:R,primary:!T,children:u?"Copied":"Copy"}),!T&&(0,b.jsx)(o,{url:i.latest.url})]})]})]}),!T&&!X&&!W&&(0,b.jsx)(p,{children:(0,b.jsx)(o,{url:i.latest.url})})]}),!i?.newer&&(0,b.jsx)(p,{children:(0,b.jsx)(f.Btn,{onClick:O,disabled:e,children:e?"Checking…":i?"Check again":"Check for updates"})})]}),s&&(0,b.jsx)(f.Body,{style:{color:"var(--sd-red, #ff7676)"},children:s}),(0,b.jsxs)(f.Body,{style:{fontSize:12,color:"var(--sd-fg-4, #667)",marginTop:12},children:["Nothing is checked automatically. The button asks GitHub for the newest version number, and nothing about you is sent.",d&&" Only a second click, Install and restart, downloads the new version."]}),a.testReleases&&(0,b.jsxs)(f.Body,{style:{fontSize:12,color:"var(--sd-gold, #FFD700)",marginTop:6},children:["Test mode: releases are read from ",(0,b.jsx)(f.Mono,{children:a.testReleases})," on this computer, not from GitHub."]})]})}let l=a=>Math.max(1,Math.round(a/1e6));function m({job:a,restarting:c,slow:d,onCancel:e}){let g=a.total?Math.min(100,Math.round(a.received/a.total*100)):null,h=c?"Restarting… Six Degrees closes and opens again in a moment.":"checking"===a.phase?"Asking GitHub for the newest version…":"downloading"===a.phase?`Downloading ${a.version}…${null!==g?` ${g}% (${l(a.received)} of ${l(a.total)} MB)`:""}`:"verifying"===a.phase?"Checking the download…":"Preparing the new version…";return(0,b.jsxs)("div",{role:"status","aria-live":"polite",style:{marginTop:12},children:[(0,b.jsx)(f.Body,{style:{color:"var(--sd-fg-1, #e8e8ee)"},children:h}),"downloading"===a.phase&&null!==g&&(0,b.jsx)("div",{role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":g,"aria-label":"Download",style:{height:6,borderRadius:3,background:"rgba(var(--sd-ink, 255, 255, 255), 0.08)",marginTop:10,overflow:"hidden",maxWidth:420},children:(0,b.jsx)("div",{style:{width:`${g}%`,height:"100%",background:"linear-gradient(90deg, #9B59B6, #3498DB)",transition:"width 0.4s ease"}})}),d&&(0,b.jsx)(f.Body,{children:"This is taking longer than it should. If Six Degrees doesn’t open again by itself, open it from your Applications folder."}),!c&&(0,b.jsx)(p,{children:(0,b.jsx)(f.Btn,{onClick:e,children:"Cancel"})})]})}function n({report:a}){let c=new Date(a.at).toLocaleString([],{dateStyle:"medium",timeStyle:"short"});return(0,b.jsxs)(f.Status,{tone:"ok"===a.tone?"ok":"bad",children:[a.text," ",(0,b.jsxs)("span",{style:{color:"var(--sd-fg-3, #8b9a9a)"},children:["(",c,")"]}),"ok"===a.tone&&a.previous&&(0,b.jsxs)("span",{style:{display:"block",fontSize:12.5,color:"var(--sd-fg-3, #8b9a9a)",marginTop:4},children:["A copy of the version you had is kept in ",(0,b.jsx)(f.Mono,{children:a.previous})," until the next update. To go back to it, open that file and drag the app it gives you into your Applications folder."]})]})}function o({url:a}){return a?(0,b.jsx)("a",{href:a,target:"_blank",rel:"noreferrer",style:{color:"var(--sd-blue, #3498DB)",fontSize:13.5},children:"What changed →"}):null}function p({children:a}){return(0,b.jsx)("div",{style:{display:"flex",gap:10,marginTop:12,flexWrap:"wrap",alignItems:"center"},children:a})}let q={background:"rgba(var(--sd-shade, 0, 0, 0), 0.45)",border:f.LINE,borderRadius:8,padding:12,margin:"8px 0 0",fontSize:12,lineHeight:1.7,color:"var(--sd-fg-2, #b9c6c6)",fontFamily:"ui-monospace, SFMono-Regular, Menlo, monospace",whiteSpace:"pre-wrap",maxHeight:180,overflow:"auto"};function r(a){if(!a)return"0 KB";if(a<1048576)return`${Math.max(1,Math.round(a/1024))} KB`;let b=a/1048576;return`${b<10?b.toFixed(1):Math.round(b)} MB`}let s=a=>Number(a||0).toLocaleString("en-US"),t=(a,b,c=`${b}s`)=>`${s(a)} ${1===Number(a)?b:c}`;function u(a,b=!0){if(!a)return null;let c=new Date(a);return Number.isNaN(c.getTime())?null:c.toLocaleString(void 0,b?{dateStyle:"medium",timeStyle:"short"}:{dateStyle:"medium"})}async function v(a,b){let c=await a.json().catch(()=>({}));if(!a.ok)throw Object.assign(Error(c.error||b),{data:c});return c}let w={display:"flex",gap:10,marginTop:12,flexWrap:"wrap",alignItems:"center"},x={fontSize:12,color:"var(--sd-fg-4, #667)",marginTop:10},y={fontSize:14,fontWeight:650,margin:"26px 0 4px",color:"var(--sd-fg-1, #e8e8ee)"},z={display:"flex",gap:8,alignItems:"flex-start",marginTop:12,fontSize:13,color:"var(--sd-fg-2, #c8d0d0)",lineHeight:1.5,cursor:"pointer"};function A({label:a,children:c}){return(0,b.jsxs)("div",{style:{display:"flex",gap:12,justifyContent:"space-between",padding:"7px 0",borderTop:f.LINE,fontSize:13.5},children:[(0,b.jsx)("span",{style:{color:"var(--sd-fg-3, #8b9a9a)"},children:a}),(0,b.jsx)("span",{style:{color:"var(--sd-fg-1, #e8e8ee)",textAlign:"right"},children:c})]})}function B({status:a}){let c=a?.last,d=a?.failed,e=d&&(!c||Date.parse(d.at)>Date.parse(c.at));return(0,b.jsxs)(b.Fragment,{children:[e&&(0,b.jsxs)(f.Status,{tone:"bad",children:["The last backup didn’t work (",u(d.at),"): ",d.message.replace(/\.$/,""),".",!c&&" There’s no backup yet."]}),c?c.verified?(0,b.jsxs)(f.Status,{tone:e?void 0:"ok",children:["Last backup: ",u(c.at),", verified",null!=c.people?` (${t(c.people,"person","people")})`:"","."]}):(0,b.jsxs)(f.Status,{tone:"bad",children:["Last backup: ",u(c.at),", but it didn’t pass its check, so it can’t be restored: ",c.problem," ","Click Back up now to make a new one."]}):!e&&(0,b.jsx)(f.Status,{children:"No backup yet. One is made each day Six Degrees is open with a network in it."})]})}function C({pending:a,info:c,busy:d,restarting:e,onRestart:g,onCancel:h}){let i=a.restoredFrom?(0,b.jsxs)(b.Fragment,{children:["The backup ",(0,b.jsx)(f.Mono,{children:a.restoredFrom})]}):(0,b.jsxs)(b.Fragment,{children:["The network in the copy",a.exportedAt?` saved ${u(a.exportedAt,!1)}`:""]});return(0,b.jsxs)(f.Status,{children:[(0,b.jsx)("div",{style:{fontWeight:650},children:a.restoredFrom?"A restore is waiting to finish.":"An import is waiting to finish."}),(0,b.jsxs)("div",{children:[i," ","(",t(a.people,"person","people"),a.photos?`, ${t(a.photos,"photo")}`:"",a.fromVersion?`, from Six Degrees ${a.fromVersion}`:"",")",a.replacedPeople>0?` replaces the ${t(a.replacedPeople,"person","people")} here the next time Six Degrees starts. A copy of what’s here now is kept in backups first, so it can be undone.`:" becomes the network here the next time Six Degrees starts."," ","Your LinkedIn search budget and any pause on scanning are kept."]}),a.error&&(0,b.jsxs)("div",{style:{color:"var(--sd-red, #ff7676)",marginTop:6},children:["The last try stopped: ",a.error.replace(/\.$/,""),". It tries again the next time Six Degrees starts."]}),e?(0,b.jsx)("div",{style:{marginTop:8},children:"Restarting… this page comes back in a few seconds."}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("div",{style:{marginTop:8},children:c.restart.how}),c.restart.command&&(0,b.jsx)("div",{style:{marginTop:6},children:(0,b.jsx)(f.Mono,{children:c.restart.command})}),(0,b.jsxs)("div",{style:w,children:[c.restart.canRestart&&(0,b.jsx)(f.Btn,{primary:!0,onClick:g,disabled:!!d,children:"restart"===d?"Restarting…":"Restart now"}),!a.started&&(0,b.jsx)(f.Btn,{onClick:h,disabled:!!d,children:"cancel"===d?"Cancelling…":a.restoredFrom?"Cancel the restore":"Cancel the import"})]})]})]})}function D(){let[a,d]=(0,c.useState)(null),[e,g]=(0,c.useState)(null),[h,i]=(0,c.useState)(null),[j,k]=(0,c.useState)(null),[l,m]=(0,c.useState)(null),[n,o]=(0,c.useState)(null),[p,q]=(0,c.useState)(null),[D,E]=(0,c.useState)(null),[F,G]=(0,c.useState)(null),[H,I]=(0,c.useState)(!0),[J,K]=(0,c.useState)(!0),[L,M]=(0,c.useState)(null),[N,O]=(0,c.useState)(!1),[P,Q]=(0,c.useState)(!1),R=(0,c.useRef)(null),S=(0,c.useRef)(!1),T=(0,c.useCallback)(()=>fetch("/api/data",{cache:"no-store"}).then(a=>v(a,"The data folder could not be read.")).then(a=>{let b=Date.parse(a.lastImport?.appliedAt||"");d({...a,importIsRecent:Number.isFinite(b)&&Date.now()-b<864e5}),g(null)}).catch(a=>g(a.message)),[]);async function U(){k(null);try{await navigator.clipboard.writeText(a.dataDir),k({tone:"ok",text:"Copied the folder’s path."})}catch{k({tone:"bad",text:"This window can’t copy. Select the path above and copy it instead."})}}async function V(){i("reveal"),k(null);try{await v(await fetch("/api/data/reveal",{method:"POST"}),"The folder could not be opened."),k({tone:"ok",text:"darwin"===a.platform?"Opened in Finder.":"Opened in your file browser."})}catch(a){k({tone:"bad",text:a.message})}finally{i(null)}}async function W(){i("backup"),m(null),o(null);try{let a,b=await v(await fetch("/api/data/backup",{method:"POST"}),"The backup could not be made.");await T();let c=b.backup;m({tone:"ok",text:`Backed up ${(a=c.people,t(a,"person","people"))}${c.photos?` and ${t(c.photos,"photo")}`:""} (${r(c.bytes)}), and checked it. This one stays until you delete it.`})}catch(a){await T(),m({tone:"bad",text:a.message})}finally{i(null)}}async function X(a){i(`reveal:${a}`),o(null);try{await v(await fetch("/api/data/reveal",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({backup:a})}),"The backup could not be shown.")}catch(b){o({name:a,tone:"bad",text:b.message})}finally{i(null)}}async function Y(b){i(`restore:${b}`),o(null),m(null);try{await v(await fetch("/api/data/restore",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:b,replace:a.people})}),"The backup could not be restored."),q(null),await T()}catch(a){a.data?.needsConfirm&&await T(),o({name:b,tone:"bad",text:a.message})}finally{i(null)}}async function Z(){i("export"),E(null);try{let a,b=await fetch("/api/data/export",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({photos:H,social:J})});b.ok||await v(b,"The backup file could not be made.");let c=await b.blob(),d=/filename="([^"]+)"/.exec(b.headers.get("content-disposition")||"")?.[1]||"Six Degrees backup.sixdegrees",e=URL.createObjectURL(c),f=document.createElement("a");f.href=e,f.download=d,f.style.position="fixed",f.style.left="-9999px",document.body.appendChild(f),f.click(),f.remove(),setTimeout(()=>URL.revokeObjectURL(e),6e4);let g=[(a=Number(b.headers.get("x-six-degrees-people")),t(a,"person","people"))];g.push(H?t(Number(b.headers.get("x-six-degrees-photos")),"photo"):"no photos"),E({tone:"ok",text:`Made “${d}” (${r(c.size)}: ${g.join(", ")}). Look for it in your Downloads folder, or wherever you chose to save it.`})}catch(a){E({tone:"bad",text:a.message})}finally{i(null)}}async function $(){if(L){i("import"),G(null);try{let b={"Content-Type":"application/octet-stream","X-Six-Degrees-Size":String(L.size)};a.people>0&&(b["X-Six-Degrees-Replace"]=String(a.people)),await v(await fetch("/api/data/import",{method:"POST",headers:b,body:L}),"The file could not be restored."),M(null),O(!1),R.current&&(R.current.value=""),await T()}catch(a){a.data?.needsConfirm&&(O(!1),await T()),G({tone:"bad",text:a.message})}finally{i(null)}}}async function _(){i("cancel"),G(null),m(null);let b=a.pending?.restoredFrom?m:G;try{await v(await fetch("/api/data/import",{method:"DELETE"}),"It could not be cancelled."),await T(),b({tone:"ok",text:"Cancelled. The network here stays as it is."})}catch(a){b({tone:"bad",text:a.message})}finally{i(null)}}async function aa(){i("restart"),G(null);try{await v(await fetch("/api/data/restart",{method:"POST"}),"Six Degrees could not restart."),Q(!0);let a=a=>new Promise(b=>setTimeout(b,a)),b=Date.now()+9e4;for(await a(2500);Date.now()<b;){try{if((await fetch("/api/data",{cache:"no-store"})).ok)return void window.location.reload()}catch{}await a(1e3)}Q(!1),G({tone:"bad",text:"Six Degrees didn’t come back. Quit it and open it again: it finishes as it starts."})}catch(a){G({tone:"bad",text:a.message})}finally{i(null)}}if((0,c.useEffect)(()=>{T()},[T]),(0,c.useEffect)(()=>{a&&!S.current&&(S.current=!0,"#data"===window.location.hash&&document.getElementById("data")?.scrollIntoView({block:"start"}))},[a]),!a)return(0,b.jsx)(f.Section,{id:"data",title:"Your data",children:e?(0,b.jsx)(f.Status,{tone:"bad",children:e}):(0,b.jsx)(f.Body,{children:"Loading…"})});let ab=a.pending,ac=a.photosInCopy||a.photos,ad=a.backups||[],ae=ad.reduce((a,b)=>a+(b.bytes||0),0),af=a.backupStatus||{},ag=af.keep||{},ah=!!(L&&L.size>a.maxImportBytes),ai=a.people>0,aj=a.lastImport,ak="darwin"===a.platform?"Show in Finder":"Show in folder",al=ab&&(0,b.jsx)(C,{pending:ab,info:a,busy:h,restarting:P,onRestart:aa,onCancel:_});return(0,b.jsxs)(f.Section,{id:"data",title:"Your data",intro:"Everything Six Degrees knows about your network is in one folder on this computer.",children:[(0,b.jsx)(f.Body,{children:(0,b.jsx)(f.Mono,{children:a.dataDir})}),(0,b.jsxs)("div",{style:w,children:[(0,b.jsx)(f.Btn,{onClick:U,children:"Copy the path"}),(0,b.jsx)(f.Btn,{onClick:V,disabled:"reveal"===h,children:"reveal"===h?"Opening…":"darwin"===a.platform?"Show in Finder":"Open the folder"})]}),j&&(0,b.jsx)(f.Status,{tone:j.tone,children:j.text}),(0,b.jsxs)("div",{style:{marginTop:16,borderBottom:f.LINE},children:[(0,b.jsxs)(A,{label:"Your network",children:[t(a.people,"person","people")," · ",r(a.databaseBytes)]}),(0,b.jsx)(A,{label:"Profile photos",children:a.photos.count?`${s(a.photos.count)} \xb7 ${r(a.photos.bytes)}`:"none saved yet"}),(0,b.jsx)(A,{label:"Backups",children:ad.length?`${t(ad.length,"copy","copies")} \xb7 ${r(ae)}`:"none yet"}),(0,b.jsx)(A,{label:"LinkedIn sign-in for scanning",children:a.linkedinSignIn?"kept here, never put in a copy":"not signed in on this computer"})]}),(0,b.jsx)("h3",{style:y,children:"Backups"}),(0,b.jsx)(B,{status:af}),(0,b.jsxs)("div",{style:w,children:[(0,b.jsx)(f.Btn,{onClick:W,disabled:!!h||P||0===a.people,children:"backup"===h?"Backing up…":"Back up now"}),0===a.people&&(0,b.jsx)("span",{style:{fontSize:13,color:"var(--sd-fg-3, #8b9a9a)"},children:"There’s no network here to back up yet."})]}),l&&(0,b.jsx)(f.Status,{tone:l.tone,children:l.text}),ab?.restoredFrom&&al,(0,b.jsxs)(f.Body,{style:x,children:["Each backup is your whole network with its photos, your settings and the scanner’s notes, checked as it’s made. Six Degrees makes one each day it’s open and before a new version first opens your data. It keeps the last ",ag.daily??7," daily backups, ",ag["before-update"]??3," from before new versions, and"," ",ag["before-import"]??3," from before an import or a restore (those for at least ",af.floorDays??30," days). Backups you make with Back up now stay until you delete them. The Social tab’s messages and notes are never in them, so deleting those there deletes them everywhere. Backups are on this computer only, so to keep one safe if the computer is lost, copy it somewhere else."]}),ad.length>0&&(0,b.jsxs)("details",{style:{marginTop:10,fontSize:13,color:"var(--sd-fg-3, #8b9a9a)"},children:[(0,b.jsxs)("summary",{style:{cursor:"pointer"},children:["The backups (",s(ad.length),")"]}),(0,b.jsx)("div",{style:{marginTop:6},children:ad.map(c=>{let d=p===c.name,e=n?.name===c.name?n:null;return(0,b.jsxs)("div",{style:{padding:"10px 0",borderTop:f.LINE},children:[(0,b.jsxs)("div",{style:{display:"flex",gap:10,justifyContent:"space-between",flexWrap:"wrap"},children:[(0,b.jsxs)("span",{style:{color:"var(--sd-fg-1, #e8e8ee)",fontWeight:600},children:["daily"===c.kind?"Daily":"before-update"===c.kind?c.version?`Before version ${c.version}`:"Before a new version":"before-import"===c.kind?"Before an import or a restore":c.byHand?"Put here by hand":"Made by you"," ",(0,b.jsxs)("span",{style:{fontWeight:400,color:"var(--sd-fg-3, #8b9a9a)"},children:["· ",u(c.at)]})]}),(0,b.jsx)("span",{children:r(c.bytes)})]}),(0,b.jsxs)("div",{style:{fontSize:12,color:"var(--sd-fg-4, #667)",marginTop:2},children:[(0,b.jsxs)("span",{style:{wordBreak:"break-all"},children:[c.name,c.folder?"/":""]})," · ",c.restorable?"sixdegrees"===c.format?"network, photos and files":c.withFiles?"network, with its photos and files beside it":"before-update"===c.kind?"network only (made before backups had photos)":"before-import"===c.kind?"network only (it had no photos or files to keep)":"network only":"not a backup Six Degrees can restore"]}),d?(0,b.jsxs)(f.Status,{children:[ai?`Replace the ${t(a.people,"person","people")} here with the network in this backup?`:"Restore the network in this backup?"," ","It’s checked first, and finishes when Six Degrees restarts. What’s here now is kept in backups first, so this can be undone. Your LinkedIn search budget and any pause on scanning are kept.","database"===c.format&&!c.withFiles&&" This backup holds the network only, so the photos and the scanner’s notes here now stay with it.",(0,b.jsxs)("div",{style:w,children:[(0,b.jsx)(f.Btn,{primary:!0,onClick:()=>Y(c.name),disabled:!!h,children:h===`restore:${c.name}`?"Checking the backup…":"Restore it"}),(0,b.jsx)(f.Btn,{onClick:()=>{q(null),o(null)},disabled:h===`restore:${c.name}`,children:"Cancel"})]})]}):(0,b.jsxs)("div",{style:{...w,marginTop:8},children:[c.restorable&&(0,b.jsx)(f.Btn,{onClick:()=>{q(c.name),o(null)},disabled:!!h||P||!!ab,children:"Restore"}),(0,b.jsx)(f.Btn,{onClick:()=>X(c.name),disabled:h===`reveal:${c.name}`,children:h===`reveal:${c.name}`?"Opening…":ak})]}),e&&(0,b.jsx)(f.Status,{tone:e.tone,children:e.text})]},c.name)})})]}),(0,b.jsx)(f.Body,{style:x,children:"The folder can’t be moved from here. A database that a sync service (iCloud Drive, Dropbox) copies while it’s open can be damaged, and this folder also holds your LinkedIn sign-in, which should never be synced. To use your network on another computer, export a backup file below and restore it there."}),(0,b.jsx)("h3",{style:y,children:"Move your network to another computer"}),(0,b.jsx)(f.Body,{children:"Export a backup file here, then on the new computer install Six Degrees, open Settings → Your data and restore from it. Sign in to LinkedIn again there before you scan: your sign-in never goes into a backup."}),(0,b.jsxs)("label",{style:z,children:[(0,b.jsx)("input",{type:"checkbox",checked:H,onChange:a=>I(a.target.checked),style:{marginTop:3}}),(0,b.jsxs)("span",{children:["Include profile photos",ac.count?` (${s(ac.count)}, ${r(ac.bytes)})`:"",". They can’t be downloaded again without a new scan."]})]}),(0,b.jsxs)("label",{style:z,children:[(0,b.jsx)("input",{type:"checkbox",checked:J,onChange:a=>K(a.target.checked),style:{marginTop:3}}),(0,b.jsx)("span",{children:"Include the Social tab: its findings, your CRM notes, stages and follow-ups, and any messages you keep there."})]}),(0,b.jsxs)("div",{style:w,children:[(0,b.jsx)(f.Btn,{primary:!0,onClick:Z,disabled:!!h||P||0===a.people,children:"export"===h?"Saving…":"Export backup file…"}),0===a.people&&(0,b.jsx)("span",{style:{fontSize:13,color:"var(--sd-fg-3, #8b9a9a)"},children:"There’s no network here to save yet."})]}),D&&(0,b.jsx)(f.Status,{tone:D.tone,children:D.text}),(0,b.jsx)(f.Body,{style:x,children:"The file holds the names, headlines and photos of the people in your network. Keep it private: don’t post it or share it, and delete it once it has been restored. A LinkedIn CSV import kept on this computer goes into the file too, and opens on the new one. With the Social tab included, the file also holds your CRM notes and any messages you keep, so it’s as private as your inbox."}),(0,b.jsx)("h3",{style:y,children:"Bring in a network from another computer"}),ab&&!ab.restoredFrom?al:ab?(0,b.jsx)(f.Body,{children:"A restore is waiting to finish (under Backups, above). Restart, or cancel it, before restoring anything else."}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(f.Body,{children:"Pick the backup file you exported on the other computer (a .sixdegrees file). It replaces the network here; the two networks are never merged. Your LinkedIn search budget and any pause on scanning are kept, with the other computer’s searches added."}),(0,b.jsx)("input",{ref:R,type:"file",accept:".sixdegrees",onChange:function(a){G(null),O(!1),M(a.target.files?.[0]||null)},style:{display:"none"}}),(0,b.jsxs)("div",{style:w,children:[(0,b.jsx)(f.Btn,{onClick:()=>R.current?.click(),disabled:!!h,children:"Restore from a file…"}),L&&(0,b.jsxs)("span",{style:{fontSize:13,color:"var(--sd-fg-2, #c8d0d0)",wordBreak:"break-all"},children:[L.name," · ",r(L.size)]})]}),ah&&(0,b.jsxs)(f.Status,{tone:"bad",children:["That file is ",r(L.size),". This copy can restore files up to ",r(a.maxImportBytes),"."]}),L&&ai&&!ah&&(0,b.jsxs)("label",{style:z,children:[(0,b.jsx)("input",{type:"checkbox",checked:N,onChange:a=>O(a.target.checked),style:{marginTop:3}}),(0,b.jsxs)("span",{children:["Replace the ",t(a.people,"person","people")," in this copy’s network with the network in this file. A copy of what’s here is kept in backups first. Your search budget and any pause on scanning are kept too."]})]}),L&&(0,b.jsx)("div",{style:w,children:(0,b.jsx)(f.Btn,{primary:!0,onClick:$,disabled:ah||ai&&!N||!!h,children:"import"===h?"Checking the file…":"Restore"})})]}),F&&(0,b.jsx)(f.Status,{tone:F.tone,children:F.text}),aj&&!ab&&(a.importIsRecent?(0,b.jsxs)(f.Status,{tone:"ok",children:[aj.restoredFrom?"Restored":"Imported"," ",u(aj.appliedAt),": ",t(aj.people,"person","people"),aj.restoredFrom?(0,b.jsxs)(b.Fragment,{children:[" from the backup ",(0,b.jsx)(f.Mono,{children:aj.restoredFrom})]}):aj.exportedAt?` from the copy saved ${u(aj.exportedAt,!1)}`:"",".",aj.keptDatabase&&(0,b.jsxs)(b.Fragment,{children:[" ","What was here before is kept in ",(0,b.jsx)(f.Mono,{children:aj.keptDatabase}),aj.keptFiles?", with its photos and files beside it":"",".",aj.keptAsIs&&" It couldn’t be read, so it was kept exactly as it was."," ","To go back to it, restore it from the backups above."]})]}):(0,b.jsxs)(f.Body,{style:x,children:["Last ",aj.restoredFrom?"restore":"import",": ",u(aj.appliedAt)," (",t(aj.people,"person","people"),").",aj.keptDatabase&&(0,b.jsxs)(b.Fragment,{children:[" What was here before is kept in ",(0,b.jsx)(f.Mono,{children:aj.keptDatabase}),", under Backups above."]})]}))]})}var E=a.i(803),F=a.i(79663),G=a.i(59534),H=a.i(54919),I=a.i(30889);a.i(59943);var J=a.i(29470),K=a.i(42510),L=a.i(31483);let M={lean:"Lean",strong:"Strong"},N=["wheel","touchstart","keydown","pointerdown"],O={1:"1st",2:"2nd",3:"3rd"},P=(a,b,c=`${b}s`)=>`${a.toLocaleString()} ${1===a?b:c}`,Q=G.DIRECTORY.filter(a=>"function"===a.kind).map(a=>a.label);function R(a,b,c){let[d,e]=c?["moved","moved"]:["moves","move"];if(!a&&!b)return c?"No one changed tier.":"No one changes tier.";let f=a=>1===a?d:e;return a&&b?`${P(a,"person","people")} ${f(a)} up a tier and ${b.toLocaleString()} ${f(b)} down.`:a?`${P(a,"person","people")} ${f(a)} up a tier.`:`${P(b,"person","people")} ${f(b)} down a tier.`}function S({onSaved:a}={}){let[d,e]=(0,c.useState)(null),[g,h]=(0,c.useState)(null),[i,j]=(0,c.useState)(null),[k,l]=(0,c.useState)(!1),[m,n]=(0,c.useState)(null),[o,p]=(0,c.useState)(null),[q,r]=(0,c.useState)({loading:!0}),[s,t]=(0,c.useState)(null),u=(0,c.useRef)(null),v=(0,c.useRef)(0),w=(0,c.useRef)(!1);function x(a){h(a),n(null),clearTimeout(u.current);let b=++v.current;if((0,F.sameFocus)(a,d))return void j(null);let c=(0,F.focusFingerprint)(a);j({key:c,loading:!0}),u.current=setTimeout(async()=>{try{let d=await fetch("/api/settings/sector-preview",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({sectorFocus:a})}),e=await d.json();if(b!==v.current)return;j(d.ok?{key:c,...e}:{key:c,error:e.error||"Could not work out what would change."})}catch{b===v.current&&j({key:c,error:"Could not reach the app to work out what would change."})}},250)}async function y(){var b,c;let d;l(!0),n(null),clearTimeout(u.current),v.current++;let f=await (0,L.saveSettings)({sectorFocus:g});(l(!1),f.settings&&(e(f.settings.sectorFocus),h(f.settings.sectorFocus),j(null)),f.error)?n({tone:"bad",text:f.error}):(n({tone:"ok",text:(b=f.settings.sectorFocus,c=f.effects?.sectorFocus,d=b.sectors.length?`Saved: ${b.sectors.map(a=>(0,H.sectorByKey)(a).label).join(" · ")} (${M[b.strength].toLowerCase()}).`:"Saved: no sector.",c?c.scored?`${d} Rescored your network (${P(c.people??c.scored,"person","people")}). ${R(c.up,c.down,!0)}`:`${d} There's no scanned network yet; it will apply when you scan.`:d)}),a?.())}(0,c.useEffect)(()=>{let a=!1;return(0,K.csvNetworkSource)().then(b=>{a||t(b)}),fetch("/api/settings").then(a=>a.json().then(b=>a.ok?b:Promise.reject(Error(b.error||"Could not load your sector.")))).then(b=>{if(a)return;let c=b.settings?.sectorFocus||{sectors:[],strength:"lean"};e(c),h(c)}).catch(b=>{a||p(b.message)}),fetch("/api/settings/sector-suggestions").then(a=>a.json().then(b=>a.ok?b:Promise.reject(Error(b.error||"Could not load suggestions.")))).then(b=>{a||r({scored:b.scored,list:b.suggestions||[]})}).catch(b=>{a||r({error:b.message})}),()=>{a=!0,clearTimeout(u.current)}},[]),(0,c.useEffect)(()=>{if(w.current||!g&&!o)return;w.current=!0;let a=document.getElementById("sector");if("#sector"!==window.location.hash||!a)return;let b=()=>a.scrollIntoView({block:"start"});b();let c=new ResizeObserver(b);c.observe(document.body);let d=()=>{for(let a of(c.disconnect(),clearTimeout(e),N))window.removeEventListener(a,d,!0)},e=setTimeout(d,2e3);for(let a of N)window.addEventListener(a,d,{capture:!0,passive:!0});return d},[g,o]);let z=g&&d&&!(0,F.sameFocus)(g,d);return(0,b.jsxs)(f.Section,{id:"sector",title:"Your sector",intro:"Pick up to three sectors you work in. Companies in them count for more when your network is scored, so the people there rank higher.",children:[o&&(0,b.jsx)(f.Status,{tone:"bad",children:o}),!g&&!o&&(0,b.jsx)(f.Body,{children:"Loading…"}),g&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(E.default,{sectors:g.sectors,onChange:a=>x({...g,sectors:a}),disabled:k,suggest:q}),(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:8,marginTop:14},children:[(0,b.jsx)("span",{style:{fontSize:13,color:"var(--sd-fg-3, #8b9a9a)"},children:"How much:"}),Object.keys(I.SECTOR_BONUS).map(a=>(0,b.jsxs)("button",{type:"button","aria-pressed":g.strength===a,disabled:k,onClick:()=>x({...g,strength:a}),style:{padding:"5px 12px",borderRadius:7,fontSize:12.5,fontWeight:600,cursor:"pointer",color:g.strength===a?"var(--sd-fg-1, #fff)":"var(--sd-fg-3, #8b9a9a)",background:g.strength===a?"rgba(52,152,219,0.25)":"transparent",border:f.LINE},children:[M[a]," · +",I.SECTOR_BONUS[a]]},a))]}),(0,b.jsx)(f.Body,{style:{fontSize:12.5},children:"Each company in your sectors gets +1 (lean) or +2 (strong) on its score out of 10, never above 10. A company in more than one of your picks still gets it once."}),(0,b.jsx)(T,{preview:z?i:null,draft:g}),(0,b.jsxs)("div",{style:{display:"flex",gap:8,flexWrap:"wrap",marginTop:14},children:[(0,b.jsx)(f.Btn,{primary:!0,onClick:y,disabled:!z||k,children:k?"Saving and rescoring…":"Save"}),z&&!k&&(0,b.jsx)(f.Btn,{onClick:()=>x(d),children:"Cancel"}),!z&&g.sectors.length>0&&!k&&(0,b.jsx)(f.Btn,{onClick:()=>x({...g,sectors:[]}),children:"Turn off"})]}),m&&(0,b.jsx)(f.Status,{tone:m.tone,children:m.text}),(0,b.jsxs)("ul",{style:{margin:"16px 0 0",paddingLeft:18,fontSize:12.5,color:"var(--sd-fg-4, #778)",lineHeight:1.7},children:[(0,b.jsx)("li",{children:"Tiers rank how reachable someone is through your network, not the people themselves."}),(0,b.jsxs)("li",{children:["A company score you set on ",(0,b.jsx)("a",{href:"#companies",style:{color:"var(--sd-blue, #3498DB)"},children:"Company scores"}),", below, always wins. Your sector never changes it."]}),(0,b.jsx)("li",{children:"If you scan highest tier first, people in your sectors come up sooner. Scanning newest first, the default, doesn’t go by tier."}),(0,b.jsx)("li",{children:"An industry includes its sectors. It counts a company in any of its sectors (Healthcare & Biotech counts a practice that is only in Dental), and a company whose industry the app’s list of well-known companies or the company’s own name gives (Meridian Health). Not one known only from its people’s job titles: a recruiter at Acme Widgets doesn’t make Acme a consulting firm."}),(0,b.jsx)("li",{children:"A narrower sector counts a company when its name says so (Smith Family Dental), it’s a well-known company in that sector, or at least half of the people you know there say so in their headlines (dentist, DDS, orthodontist). The words are a fixed list that comes with the app, the same on every computer. Nothing is sent anywhere."}),(0,b.jsxs)("li",{children:["Some sectors are work every kind of company has: ",Q.length>1?`${Q.slice(0,-1).join(", ")} and ${Q.at(-1)}`:Q.join(""),". For those a job title doesn’t count, since a recruiter at Acme Widgets doesn’t make it a recruiting firm. The company’s name does (Acme Staffing, Smith CPA), and so does a kind of firm in a headline (staffing agency, law firm, SaaS)."]}),s&&(0,b.jsxs)("li",{style:{color:"var(--sd-gold, #FFD700)"},children:["sample"===s?"The sample network open in this window":"The CSV import you have open"," isn’t changed by this, and isn’t counted in the suggestions. Your sector applies to networks you’ve scanned."]})]})]})]})}function T({preview:a,draft:c}){if(!a||a.key!==(0,F.focusFingerprint)(c))return null;let d={marginTop:12,padding:"10px 14px",borderRadius:8,fontSize:13,lineHeight:1.6,border:f.LINE,background:"rgba(var(--sd-ink, 255, 255, 255), 0.03)",color:"var(--sd-fg-2, #cfd8d8)"};if(a.loading)return(0,b.jsx)("div",{style:d,"aria-live":"polite",children:"Working out what would change…"});if(a.error)return(0,b.jsx)(f.Status,{tone:"bad",children:a.error});if(!a.scored)return(0,b.jsx)("div",{style:d,"aria-live":"polite",children:"There’s no scanned network yet, so nothing changes now. Your choice applies once you scan."});let e=(a,b)=>`${P(a,"company","companies")} ${1===a?"scores":"score"} ${b}`,g=[a.companiesUp&&e(a.companiesUp,"higher"),a.companiesDown&&e(a.companiesDown,"lower")].filter(Boolean).join(" and ");return(0,b.jsxs)("div",{style:d,"aria-live":"polite",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("b",{style:{color:"var(--sd-fg-1, #fff)"},children:"If you save:"})," ",g?`${g}.`:"No company changes score."," ",R(a.up,a.down,!1)]}),a.examples?.length>0&&(0,b.jsx)("div",{style:{marginTop:6,display:"flex",flexWrap:"wrap",gap:"4px 12px",fontSize:12.5},children:a.examples.map((a,c)=>(0,b.jsxs)("span",{title:a.company||void 0,children:[a.name,a.degree?(0,b.jsxs)("span",{style:{color:"var(--sd-fg-4, #667)"},children:[" (",O[a.degree]||`${a.degree}th`,")"]}):null," ",(0,b.jsx)("b",{style:{color:J.TIER_COLORS_CLASSIC[a.from]||"#889"},children:a.from||"–"})," → ",(0,b.jsx)("b",{style:{color:J.TIER_COLORS_CLASSIC[a.to]||"#889"},children:a.to})]},c))}),a.companyExamples?.length>0&&(0,b.jsx)("div",{style:{marginTop:4,fontSize:12,color:"var(--sd-fg-3, #8b9a9a)"},children:a.companyExamples.slice(0,3).map(a=>`${a.name} ${a.from} → ${a.to}`).join(" · ")})]})}let U=a=>`${Math.round(100*a)}%`,[V,W,X]=I.CURVE.map(([,a])=>a),Y=[{key:"curve",label:"On your network's curve",note:`Your top ${U(V)} are S, the next ${U(W-V)} A and the next ${U(X-W)} B, so any network has a top, even one full of companies the app doesn't know. It only lifts: nobody drops a tier because their network is strong, and nobody under ${I.CURVE_FLOOR} is lifted into S or A.`},{key:"fixed",label:"On the fixed scale",note:"The same lines for everyone: S from 7.5, A from 5.5, B from 4, C from 2.5. Easy to compare from one network to another, but a network outside well-known companies has almost nobody in S or A."}];function Z({onSaved:a}={}){let[d,e]=(0,c.useState)(null),[g,h]=(0,c.useState)(!1),[i,j]=(0,c.useState)(null),[k,l]=(0,c.useState)(null),[m,n]=(0,c.useState)(null);async function o(b){if(g||b===d)return;h(!0),j(null);let{settings:c,effects:f,error:i}=await (0,L.saveSettings)({tierScale:b});if(c&&e(c.tierScale),i)j({tone:"bad",text:i});else{let b,c=f?.tierScale;j({tone:"ok",text:c?`Saved. ${b=c.moved,`${b.toLocaleString()} ${1===b?"person":"people"}`} changed tier.`:"Saved."}),a?.()}h(!1)}return(0,c.useEffect)(()=>{let a=!1;return(0,K.csvNetworkSource)().then(b=>{a||n(b)}),fetch("/api/settings").then(a=>a.json().then(b=>a.ok?b:Promise.reject(Error(b.error||"Could not load how tiers are graded.")))).then(b=>{a||e(b.settings?.tierScale||"curve")}).catch(b=>{a||l(b.message)}),()=>{a=!0}},[]),(0,b.jsxs)(f.Section,{id:"tiers",title:"Tiers",intro:"How the S to D rings are drawn. A tier says where someone sits in your network, not what they're worth.",children:[k&&(0,b.jsx)(f.Status,{tone:"bad",children:k}),d&&(0,b.jsx)("div",{role:"radiogroup","aria-label":"How tiers are graded",style:{display:"grid",gap:8},children:Y.map(a=>{let c=d===a.key;return(0,b.jsxs)("button",{type:"button",role:"radio","aria-checked":c,disabled:g,onClick:()=>o(a.key),style:{textAlign:"left",padding:"12px 14px",borderRadius:8,cursor:g?"wait":c?"default":"pointer",color:"var(--sd-fg-1, #fff)",background:c?"rgba(155,89,182,0.14)":"rgba(var(--sd-ink, 255, 255, 255), 0.03)",border:c?"1px solid rgba(155,89,182,0.6)":f.LINE},children:[(0,b.jsxs)("div",{style:{fontSize:14,fontWeight:650},children:[c?"● ":"○ ",a.label,"curve"===a.key?" (recommended)":""]}),(0,b.jsx)(f.Body,{style:{marginTop:4},children:a.note})]},a.key)})}),m&&(0,b.jsxs)(f.Body,{style:{color:"var(--sd-gold, #FFD700)",marginTop:10},children:["sample"===m?"The sample network open in this window keeps its own tiers (they’re the same either way).":"The CSV import you have open is always graded on its own curve."," ","This applies to networks you’ve scanned."]}),i&&(0,b.jsx)(f.Status,{tone:i.tone,children:i.text})]})}let $=["csuite","owner","vp","director","manager","senior","ic","unknown","intern","student"],_=Object.freeze({points:Object.freeze({}),roles:Object.freeze([])});function aa(a=_){let b=Object.keys(a.points||{}).sort().map(b=>`${b}=${a.points[b]}`).join(","),c=(a.roles||[]).map(a=>`${a.text}=${a.points}`).sort().join(",");return b||c?`${b}|${c}`:"none"}let ab=[{key:"default",label:"As the app ranks them",ranking:_,note:"C-suite and founders first, then VPs, directors, managers."},{key:"founders",label:"Founders first",note:"Owners and entrepreneurs count like CEOs, and anyone who says founder counts as much: for meeting founders, or selling to them.",ranking:{points:{owner:10},roles:[{text:"founder",points:10},{text:"co-founder",points:10}]}},{key:"investors",label:"Investors",note:"Anyone who invests for a living rises to the top: for raising money.",ranking:{points:{},roles:["investor","venture","angel","general partner","managing partner","principal at","vc"].map(a=>({text:a,points:10}))}},{key:"role",label:"A role I’m looking for",note:"For outbound or hiring: add the role below, and everyone in it rises, whatever their level.",ranking:null}],ac=[10,9.5,9,8.5,8,7.5,7,6.5,6,5.5,5,4.5,4,3,2,1,0],ad={padding:"5px 8px",borderRadius:6,fontSize:12.5,cursor:"pointer",border:f.LINE,background:"rgba(var(--sd-shade, 0, 0, 0), 0.3)",color:"var(--sd-fg-1, #fff)"};function ae({onSaved:a}={}){let[d,e]=(0,c.useState)(null),[g,h]=(0,c.useState)(null),[i,j]=(0,c.useState)(""),[k,l]=(0,c.useState)(10),[m,n]=(0,c.useState)(!1),[o,p]=(0,c.useState)(null),[q,r]=(0,c.useState)(null),s=(0,c.useRef)(null);if((0,c.useEffect)(()=>{let a=!1;return fetch("/api/settings").then(a=>a.json().then(b=>a.ok?b:Promise.reject(Error(b.error||"Could not load your title ranking.")))).then(b=>{if(!a){let a=b.settings?.titleRanking||_;e(a),h(a)}}).catch(b=>{a||r(b.message)}),()=>{a=!0}},[]),!g)return q?(0,b.jsx)(f.Status,{tone:"bad",children:q}):null;let t=(a,b)=>{let c={...g.points};b===I.LEVELS[a].points?delete c[a]:c[a]=b,h({...g,points:c}),p(null)},u=ab.find(a=>a.ranking&&aa(a.ranking)===aa(g))?.key??null,v=aa(g)!==aa(d);async function w(){n(!0),p(null);let{settings:b,effects:c,error:d}=await (0,L.saveSettings)({titleRanking:g});if(b&&(e(b.titleRanking),h(b.titleRanking)),d)p({tone:"bad",text:d});else{let b,d=c?.titleRanking;p({tone:"ok",text:d?`Saved. ${b=d.moved,`${b.toLocaleString()} ${1===b?"person":"people"}`} changed tier.`:"Saved."}),a?.()}n(!1)}return(0,b.jsxs)(f.Section,{id:"titles",title:"Titles",intro:"How much each kind of title counts towards someone's power, out of 10. Change it if you value some people more than the app does: founders, investors, or a role you're looking for.",children:[(0,b.jsx)("div",{style:{display:"flex",gap:6,flexWrap:"wrap",marginBottom:6},children:ab.map(a=>(0,b.jsx)("button",{type:"button",onClick:()=>{p(null),a.ranking?h({points:{...a.ranking.points},roles:[...a.ranking.roles]}):s.current?.focus()},"aria-pressed":u===a.key,title:a.note,style:{padding:"6px 12px",borderRadius:16,fontSize:12.5,fontWeight:650,cursor:"pointer",border:u===a.key?"1px solid rgba(155,89,182,0.7)":f.LINE,background:u===a.key?"rgba(155,89,182,0.16)":"rgba(var(--sd-ink, 255, 255, 255), 0.03)",color:u===a.key?"var(--sd-fg-1, #fff)":"var(--sd-fg-2, #bbb)"},children:a.label},a.key))}),(0,b.jsx)(f.Body,{style:{marginBottom:14},children:ab.find(a=>a.key===u)?.note||"Your own ranking. Higher points rank higher; the company someone works at still weighs it."}),(0,b.jsx)("div",{style:{display:"grid",gridTemplateColumns:"1fr auto auto",gap:"6px 12px",alignItems:"center",maxWidth:520},children:$.map(a=>{let c=g.points?.[a]!=null;return[(0,b.jsx)("div",{style:{fontSize:13,color:c?"var(--sd-fg-1, #fff)":"var(--sd-fg-2, #ccc)",fontWeight:c?700:500},children:I.LEVELS[a].label},`${a}-l`),(0,b.jsx)("select",{"aria-label":`Points for ${I.LEVELS[a].label}`,value:g.points?.[a]??I.LEVELS[a].points,onChange:b=>t(a,Number(b.target.value)),style:{...ad,borderColor:c?"rgba(155,89,182,0.7)":void 0},children:ac.map(a=>(0,b.jsx)("option",{value:a,children:a},a))},`${a}-s`),(0,b.jsx)("div",{style:{fontSize:11,color:"var(--sd-fg-4, #667)",minWidth:70},children:c?(0,b.jsxs)("button",{type:"button",onClick:()=>t(a,I.LEVELS[a].points),style:{background:"none",border:"none",color:"var(--sd-fg-3, #9b9bd0)",cursor:"pointer",fontSize:11,padding:0},children:["back to ",I.LEVELS[a].points]}):"as it comes"},`${a}-d`)]})}),(0,b.jsx)("div",{style:{marginTop:18,fontSize:13.5,fontWeight:700,color:"var(--sd-fg-1, #eee)"},children:"Roles you’re looking for"}),(0,b.jsx)(f.Body,{style:{margin:"4px 0 10px"},children:"Anyone whose title has these words counts what you give them, whatever their level: for outbound to one role, or hiring for it. “Account executive” at 10 puts every account executive you can reach near the top."}),(0,b.jsxs)("form",{onSubmit:a=>{a.preventDefault(),(()=>{let a=i.trim().toLowerCase().replace(/\s+/g," ");if(a.length<2)return;let b=[...g.roles.filter(b=>b.text!==a),{text:a,points:k}];h({...g,roles:b.slice(-20)}),j(""),p(null)})()},style:{display:"flex",gap:8,flexWrap:"wrap",alignItems:"center"},children:[(0,b.jsx)("input",{ref:s,value:i,onChange:a=>j(a.target.value),placeholder:"e.g. head of growth, recruiter, founder",maxLength:60,style:{flex:"1 1 220px",padding:"7px 10px",borderRadius:6,fontSize:13,border:f.LINE,background:"rgba(var(--sd-shade, 0, 0, 0), 0.3)",color:"var(--sd-fg-1, #fff)"}}),(0,b.jsx)("select",{"aria-label":"Points for this role",value:k,onChange:a=>l(Number(a.target.value)),style:ad,children:ac.map(a=>(0,b.jsx)("option",{value:a,children:a},a))}),(0,b.jsx)(f.Btn,{type:"submit",disabled:i.trim().length<2||g.roles.length>=20,children:"Add"})]}),g.roles.length>0&&(0,b.jsx)("div",{style:{display:"flex",gap:6,flexWrap:"wrap",marginTop:10},children:g.roles.map(a=>(0,b.jsxs)("span",{style:{display:"inline-flex",alignItems:"center",gap:6,padding:"4px 6px 4px 11px",borderRadius:14,fontSize:12.5,border:"1px solid rgba(155,89,182,0.5)",background:"rgba(155,89,182,0.12)",color:"var(--sd-fg-1, #eee)"},children:[a.text," ",(0,b.jsx)("b",{style:{color:"var(--sd-fg-2, #d2b4ff)"},children:a.points}),(0,b.jsx)("button",{type:"button",onClick:()=>{var b;return b=a.text,void(h({...g,roles:g.roles.filter(a=>a.text!==b)}),p(null))},"aria-label":`Remove ${a.text}`,style:{background:"none",border:"none",color:"var(--sd-fg-3, #aaa)",cursor:"pointer",fontSize:13},children:"✕"})]},a.text))}),(0,b.jsxs)("div",{style:{display:"flex",gap:10,alignItems:"center",marginTop:16},children:[(0,b.jsx)(f.Btn,{primary:!0,onClick:w,disabled:!v||m,children:m?"Rescoring…":"Save and rescore"}),v&&(0,b.jsx)("span",{style:{fontSize:12,color:"var(--sd-fg-3, #999)"},children:"Not saved yet. Saving rescores everyone."})]}),o&&(0,b.jsx)(f.Status,{tone:o.tone,children:o.text})]})}var af=a.i(91621),ag=a.i(26338);let ah={none:"Plain",stars:"Stars",grid:"Grid",glow:"Glow",horizon:"Horizon"},ai={system:"System",rounded:"Rounded",mono:"Mono",serif:"Serif"},aj={S:"S tier",A:"A tier",B:"B tier",C:"C tier",D:"D tier"},ak={soft:"Soft",flat:"Flat",square:"Square",frosted:"Frosted glass",neon:"Neon",bold:"Bold outline"},al={solid:"Solid",droplet:"Glass droplets",flat:"Flat, like Obsidian",glow:"Glowing",plain:"Plain, outlined"},am={fontSize:11,fontWeight:700,color:"var(--sd-fg-4, #778)",letterSpacing:.6,textTransform:"uppercase",margin:"16px 0 8px"};function an({theme:a,width:c=168,height:d=96}){let e=.58*c,f=d/2,g=`p-${a.id}-${a.customised?"c":"p"}-${a.dots}`,h=Math.min(1,Math.max(0,a.glass)),i=af.TIER_KEYS.map((a,b)=>{let c=-Math.PI/2+2*b*Math.PI/af.TIER_KEYS.length,d=22+3*b;return{k:a,x:e+Math.cos(c)*d,y:f+Math.sin(c)*d,a:c}}),j=b=>"one"===a.lines?a.line:a.tiers[b];return(0,b.jsxs)("svg",{width:c,height:d,viewBox:`0 0 ${c} ${d}`,"aria-hidden":"true",style:{display:"block",borderRadius:8},children:[(0,b.jsxs)("defs",{children:[(0,b.jsxs)("radialGradient",{id:`${g}-glow`,children:[(0,b.jsx)("stop",{offset:"0",stopColor:a.bg2,stopOpacity:"0.8"}),(0,b.jsx)("stop",{offset:"1",stopColor:a.bg2,stopOpacity:"0"})]}),(0,b.jsxs)("radialGradient",{id:`${g}-glow2`,children:[(0,b.jsx)("stop",{offset:"0",stopColor:a.accent,stopOpacity:"0.55"}),(0,b.jsx)("stop",{offset:"1",stopColor:a.accent,stopOpacity:"0"})]}),(0,b.jsxs)("linearGradient",{id:`${g}-sun`,x1:"0",y1:"0",x2:"0",y2:"1",children:[(0,b.jsx)("stop",{offset:"0.45",stopColor:a.bg2,stopOpacity:"0"}),(0,b.jsx)("stop",{offset:"1",stopColor:a.bg2,stopOpacity:"0.45"})]}),af.TIER_KEYS.map(c=>(0,b.jsxs)("radialGradient",{id:`${g}-drop-${c}`,fx:"34%",fy:"30%",children:[(0,b.jsx)("stop",{offset:"0",stopColor:"#fff",stopOpacity:"0.95"}),(0,b.jsx)("stop",{offset:"0.25",stopColor:a.tiers[c],stopOpacity:"0.9"}),(0,b.jsx)("stop",{offset:"0.75",stopColor:a.tiers[c],stopOpacity:"0.5"}),(0,b.jsx)("stop",{offset:"1",stopColor:a.tiers[c],stopOpacity:"0.15"})]},c)),(0,b.jsxs)("filter",{id:`${g}-glow`,x:"-50%",y:"-50%",width:"200%",height:"200%",children:[(0,b.jsx)("feGaussianBlur",{stdDeviation:"1.6",result:"b"}),(0,b.jsxs)("feMerge",{children:[(0,b.jsx)("feMergeNode",{in:"b"}),(0,b.jsx)("feMergeNode",{in:"SourceGraphic"})]})]})]}),(0,b.jsx)("rect",{width:c,height:d,fill:a.bg}),"stars"===a.backdrop&&(0,b.jsxs)("g",{fill:"var(--sd-fg-1, #fff)",children:[(0,b.jsx)("circle",{cx:.8*c,cy:.2*d,r:28,fill:`url(#${g}-glow)`}),[[12,10],[40,70],[150,14],[128,80],[24,44],[96,8],[70,88],[158,52]].map(([a,c])=>(0,b.jsx)("circle",{cx:a,cy:c,r:.8,opacity:.85},`${a}-${c}`))]}),"grid"===a.backdrop&&(0,b.jsxs)("g",{stroke:a.bg2,strokeWidth:1,opacity:.9,children:[Array.from({length:9},(a,c)=>(0,b.jsx)("line",{x1:20*c,y1:0,x2:20*c,y2:d},`v${c}`)),Array.from({length:5},(a,d)=>(0,b.jsx)("line",{x1:0,y1:20*d,x2:c,y2:20*d},`h${d}`))]}),"glow"===a.backdrop&&(0,b.jsxs)("g",{children:[(0,b.jsx)("circle",{cx:.2*c,cy:.25*d,r:40,fill:`url(#${g}-glow)`}),(0,b.jsx)("circle",{cx:.85*c,cy:.4*d,r:36,fill:`url(#${g}-glow2)`})]}),"horizon"===a.backdrop&&(0,b.jsxs)("g",{children:[(0,b.jsx)("rect",{width:c,height:d,fill:`url(#${g}-sun)`}),Array.from({length:9},(e,f)=>(0,b.jsx)("line",{x1:21*f,y1:.62*d,x2:(f-4)*40+c/2,y2:d,stroke:a.bg2,strokeOpacity:.35},f)),(0,b.jsx)("line",{x1:0,y1:.62*d,x2:c,y2:.62*d,stroke:a.bg2,strokeOpacity:.5})]}),(0,b.jsx)("rect",{x:0,y:0,width:.24*c,height:d,fill:a.panel,fillOpacity:.92-.82*h}),(0,b.jsx)("rect",{x:.24*c,y:0,width:.75,height:d,fill:"var(--sd-fg-1, #fff)",fillOpacity:.12}),[0,1,2,3,4].map(d=>(0,b.jsx)("rect",{x:6,y:12+14*d,width:.24*c-12,height:6,rx:3,fill:a.tiers[af.TIER_KEYS[d]],fillOpacity:.55},d)),i.map(a=>(0,b.jsx)("line",{x1:e,y1:f,x2:a.x,y2:a.y,stroke:j(a.k),strokeOpacity:.55,strokeWidth:.8},`l${a.k}`)),i.map(c=>[0,1,2].map(d=>{let e=c.a+(d-1)*.5,f=c.x+9*Math.cos(e),g=c.y+9*Math.sin(e);return(0,b.jsxs)("g",{children:[(0,b.jsx)("line",{x1:c.x,y1:c.y,x2:f,y2:g,stroke:j(c.k),strokeOpacity:.4,strokeWidth:.6}),(0,b.jsx)("circle",{cx:f,cy:g,r:1.6,fill:a.tiers[af.TIER_KEYS[(af.TIER_KEYS.indexOf(c.k)+d+1)%5]],fillOpacity:.8})]},`k${c.k}${d}`)})),(0,b.jsx)("g",{filter:"glow"===a.dots?`url(#${g}-glow)`:void 0,children:i.map(c=>(0,b.jsx)("circle",{cx:c.x,cy:c.y,r:"S"===c.k?4.5:3.6,fill:"droplet"===a.dots?`url(#${g}-drop-${c.k})`:a.tiers[c.k],stroke:"droplet"===a.dots?a.tiers[c.k]:"plain"===a.dots?"#2b2b2b":"none",strokeOpacity:"plain"===a.dots?.75:.5,strokeWidth:.6},`d${c.k}`))}),(0,b.jsx)("circle",{cx:e,cy:f,r:5.5,fill:a.you,stroke:a.accent,strokeWidth:1.2})]})}function ao({name:a,value:c,onChange:d,title:e}){return(0,b.jsxs)("label",{title:e||a,style:{display:"flex",alignItems:"center",gap:8,padding:"6px 10px 6px 6px",borderRadius:8,background:"rgba(var(--sd-ink, 255, 255, 255), 0.04)",border:"1px solid rgba(var(--sd-ink, 255, 255, 255), 0.08)",cursor:"pointer"},children:[(0,b.jsx)("input",{type:"color",value:c,onChange:a=>d(a.target.value),style:{width:28,height:28,padding:0,border:"none",borderRadius:6,background:"none",cursor:"pointer"}}),(0,b.jsx)("span",{style:{fontSize:12.5,color:"var(--sd-fg-2, #cdd)"},children:a})]})}function ap({options:a,value:c,onPick:d}){return(0,b.jsx)("div",{style:{display:"flex",flexWrap:"wrap",gap:6},children:a.map(([a,e])=>(0,b.jsx)("button",{type:"button","aria-pressed":c===a,onClick:()=>d(a),style:{padding:"6px 12px",borderRadius:8,fontSize:12.5,fontWeight:600,cursor:"pointer",border:c===a?"1px solid var(--sd-accent)":"1px solid rgba(var(--sd-ink, 255, 255, 255), 0.1)",background:c===a?"color-mix(in srgb, var(--sd-accent) 18%, transparent)":"rgba(var(--sd-ink, 255, 255, 255), 0.03)",color:c===a?"var(--sd-fg-1, #fff)":"var(--sd-fg-3, #99a)"},children:e},a))})}function aq(){let a=(0,c.useSyncExternalStore)(ag.watchTheme,ag.themeNow,ag.serverTheme),d=(0,af.resolveTheme)(a),[e,g]=(0,c.useState)(""),[h,i]=(0,c.useState)(null),j=b=>(0,ag.setTheme)({base:a.base,custom:{...a.custom,...b}}),k=async()=>{let b=(0,af.encodeTheme)(a);try{await navigator.clipboard.writeText(b),i("Copied. Paste it into anyone’s Settings → Appearance.")}catch{g(b),i("Select the code below and copy it.")}},l=()=>{let a=(0,af.decodeTheme)(e);a?((0,ag.setTheme)(a),g(""),i(`Using it: ${(0,af.presetOf)(a.base).name}${Object.keys(a.custom).length?", made someone’s own":""}.`)):i("That isn’t a theme code: it starts with sd-theme:")};return(0,b.jsxs)(f.Section,{id:"appearance",title:"Appearance",intro:"How the whole app looks: pick one of ours, then make it yours. It changes as you go, and stays in this browser.",children:[(0,b.jsx)("div",{style:am,children:"Looks"}),(0,b.jsx)(f.Body,{style:{marginTop:-4,marginBottom:10,fontSize:12.5},children:"Daylight, Paper and Analyst are light; the rest are dark. Each has its own buttons and its own way of drawing the map’s dots."}),(0,b.jsx)("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(190px, 1fr))",gap:10},children:af.THEMES.map(c=>{let e=a.base===c.id,f=e?d:(0,af.resolveTheme)({base:c.id});return(0,b.jsxs)("button",{type:"button","aria-pressed":e,onClick:()=>(0,ag.setTheme)({base:c.id,custom:{}}),title:e&&d.customised?`${c.name}, with your changes. Click to go back to plain ${c.name}.`:c.blurb,style:{textAlign:"left",padding:8,borderRadius:12,cursor:"pointer",color:"var(--sd-fg-1, #fff)",border:e?"2px solid var(--sd-accent)":"1px solid rgba(var(--sd-ink, 255, 255, 255), 0.1)",background:e?"color-mix(in srgb, var(--sd-accent) 10%, transparent)":"rgba(var(--sd-ink, 255, 255, 255), 0.03)"},children:[(0,b.jsx)(an,{theme:f,width:172,height:96}),(0,b.jsxs)("div",{style:{display:"flex",alignItems:"baseline",gap:6,margin:"8px 2px 2px"},children:[(0,b.jsx)("span",{style:{fontSize:13.5,fontWeight:700},children:c.name}),e&&d.customised&&(0,b.jsx)("span",{style:{fontSize:10.5,fontWeight:700,color:"var(--sd-accent)"},children:"yours"})]}),(0,b.jsx)("div",{style:{fontSize:11.5,color:"var(--sd-fg-3, #889)",lineHeight:1.4,margin:"0 2px"},children:c.blurb})]},c.id)})}),(0,b.jsxs)("div",{style:{marginTop:22,padding:"4px 16px 16px",borderRadius:12,border:"1px solid rgba(var(--sd-ink, 255, 255, 255), 0.08)",background:"rgba(var(--sd-ink, 255, 255, 255), 0.02)"},children:[(0,b.jsxs)("div",{style:{display:"flex",alignItems:"baseline",gap:10,flexWrap:"wrap"},children:[(0,b.jsxs)("div",{style:{...am,flex:1},children:["Make it yours",d.customised?"":`: starting from ${(0,af.presetOf)(a.base).name}`]}),d.customised&&(0,b.jsxs)("button",{type:"button",onClick:()=>(0,ag.setTheme)({base:a.base,custom:{}}),style:{padding:"4px 10px",borderRadius:8,fontSize:11.5,cursor:"pointer",border:"1px solid rgba(var(--sd-ink, 255, 255, 255), 0.12)",background:"none",color:"var(--sd-fg-3, #aab)"},children:["Back to plain ",(0,af.presetOf)(a.base).name]})]}),(0,b.jsx)("div",{style:am,children:"Background"}),(0,b.jsxs)("div",{style:{display:"flex",flexWrap:"wrap",gap:8,marginBottom:10},children:[(0,b.jsx)(ao,{name:(0,af.isLight)(d)?"Colour (light)":"Colour",value:d.bg,onChange:a=>j({bg:a}),title:"Behind everything. A light colour makes the whole look light: dark words, dark borders"}),(0,b.jsx)(ao,{name:"Second colour",value:d.bg2,onChange:a=>j({bg2:a}),title:"The backdrop's: the nebula, the grid, the glow or the sunset"}),(0,b.jsx)(ao,{name:"Accent",value:d.accent,onChange:a=>j({accent:a}),title:"What's picked, and the backdrop's glow"})]}),(0,b.jsx)(ap,{value:d.backdrop,options:af.BACKDROPS.map(a=>[a,ah[a]]),onPick:a=>j({backdrop:a})}),(0,b.jsx)("div",{style:am,children:"Dots"}),(0,b.jsxs)("div",{style:{display:"flex",flexWrap:"wrap",gap:8},children:[af.TIER_KEYS.map(c=>(0,b.jsx)(ao,{name:aj[c],value:d.tiers[c],onChange:b=>j({tiers:{...a.custom.tiers||{},[c]:b}})},c)),(0,b.jsx)(ao,{name:"You",value:d.you,onChange:a=>j({you:a}),title:"Your own dot, in the middle of the map"})]}),(0,b.jsx)("div",{style:am,children:"Lines"}),(0,b.jsxs)("div",{style:{display:"flex",flexWrap:"wrap",alignItems:"center",gap:8},children:[(0,b.jsx)(ap,{value:d.lines,options:[["tier","As the person they lead to"],["one","One colour"]],onPick:a=>j({lines:a})}),"one"===d.lines&&(0,b.jsx)(ao,{name:"Line colour",value:d.line,onChange:a=>j({line:a})})]}),(0,b.jsx)("div",{style:am,children:"Buttons"}),(0,b.jsx)(ap,{value:d.buttons,options:af.BUTTONS.map(a=>[a,ak[a]]),onPick:a=>j({buttons:a})}),(0,b.jsx)("div",{style:am,children:"Dots on the map"}),(0,b.jsx)(ap,{value:d.dots,options:af.DOTS.map(a=>[a,al[a]]),onPick:a=>j({dots:a})}),(0,b.jsx)("div",{style:am,children:"Panels"}),(0,b.jsxs)("div",{style:{display:"flex",flexWrap:"wrap",alignItems:"center",gap:14},children:[(0,b.jsx)(ao,{name:"Tint",value:d.panel,onChange:a=>j({panel:a}),title:"The side panels' colour"}),(0,b.jsxs)("label",{style:{display:"flex",alignItems:"center",gap:10,fontSize:12.5,color:"var(--sd-fg-2, #cdd)"},children:["Glass",(0,b.jsx)("input",{type:"range",min:0,max:100,value:Math.round(100*d.glass),onChange:a=>j({glass:Number(a.target.value)/100}),style:{width:160,accentColor:"var(--sd-accent)"}}),(0,b.jsxs)("span",{style:{color:"var(--sd-fg-3, #889)",fontVariantNumeric:"tabular-nums",width:34},children:[Math.round(100*d.glass),"%"]})]})]}),(0,b.jsx)("div",{style:am,children:"Font"}),(0,b.jsx)(ap,{value:d.font,options:Object.keys(af.FONTS).map(a=>[a,ai[a]]),onPick:a=>j({font:a})}),(0,b.jsx)("div",{style:am,children:"Share it"}),(0,b.jsxs)("div",{style:{display:"flex",flexWrap:"wrap",gap:8,alignItems:"center"},children:[(0,b.jsx)("button",{type:"button",onClick:k,style:{padding:"7px 14px",borderRadius:8,fontSize:12.5,fontWeight:700,cursor:"pointer",border:"1px solid var(--sd-accent)",background:"color-mix(in srgb, var(--sd-accent) 16%, transparent)",color:"var(--sd-fg-1, #fff)"},children:"Copy theme code"}),(0,b.jsx)("input",{value:e,onChange:a=>g(a.target.value),placeholder:"Paste a theme code (sd-theme:…)",spellCheck:!1,onKeyDown:a=>{"Enter"===a.key&&l()},style:{flex:"1 1 220px",minWidth:0,padding:"7px 10px",borderRadius:8,fontSize:12,fontFamily:"ui-monospace, Menlo, monospace",border:"1px solid rgba(var(--sd-ink, 255, 255, 255), 0.12)",background:"rgba(var(--sd-shade, 0, 0, 0), 0.25)",color:"var(--sd-fg-1, #dde)"}}),(0,b.jsx)("button",{type:"button",onClick:l,disabled:!e.trim(),style:{padding:"7px 14px",borderRadius:8,fontSize:12.5,fontWeight:600,cursor:e.trim()?"pointer":"default",border:"1px solid rgba(var(--sd-ink, 255, 255, 255), 0.12)",background:"rgba(var(--sd-ink, 255, 255, 255), 0.04)",color:e.trim()?"var(--sd-fg-1, #dde)":"var(--sd-fg-4, #667)"},children:"Use it"})]}),h&&(0,b.jsx)(f.Body,{style:{fontSize:12,marginTop:8},children:h}),(0,b.jsx)(f.Body,{style:{fontSize:11.5,color:"var(--sd-fg-4, #667)",marginTop:8},children:"A code holds colours and choices only, nothing about your network."})]})]})}var ar=a.i(90017),as=a.i(8917);let at=[9,18],au=Math.ceil(.6*as.RESTRICTED_AT),av={ok:{label:"Well within",color:"#00ff88"},"above-default":{label:"Above the default",color:"#FFD700"},risky:{label:"Risky",color:"#FF8C42"},danger:{label:"Too close",color:"#ff6b6b"},paused:{label:"Paused",color:"#ff6b6b"},unknown:{label:"Can’t tell",color:"#8b9a9a"}};function aw({cooldown:a,searchesDay:b,lastPushback:c,searchesSincePushback:d,now:e=Date.now()}={}){return a?"paused":Number.isFinite(b)?b>=au||function({lastPushback:a,searchesSincePushback:b,now:c=Date.now()}={}){let d=a?.at;return Number.isFinite(d)&&c-d<864e5&&c>=d&&b>0}({lastPushback:c,searchesSincePushback:d,now:e})?"danger":b>as.RISKY_DAILY?"risky":b>as.SAFE_LIMITS.daily?"above-default":"ok":"unknown"}function ax(a,b=[]){return Math.max(Math.ceil(1.08*Math.max(0,...b.filter(Number.isFinite))),Math.ceil(1.05*(Number(a)||0)),1)}function ay(a){return new Date(a).toLocaleString(void 0,{weekday:"short",month:"short",day:"numeric",hour:"numeric",minute:"2-digit"}).replace(/ /g," ")}function az(a,b=Date.now()){if(!Number.isFinite(a))return"recently";let c=Math.round((b-a)/6e4);if(c<1)return"just now";if(c<60)return`${c} min ago`;let d=Math.round(c/60);return d<48?`${d} h ago`:`${Math.round(d/24)} days ago`}var aA=a.i(35364),aB=a.i(81273);let aC=a=>Number.isFinite(a)?a.toLocaleString("en-US"):"?",aD=(a,b,c=`${b}s`)=>`${aC(a)} ${1===a?b:c}`,aE={color:"var(--sd-blue, #3498DB)",textDecoration:"none",fontWeight:600},aF={fontSize:12,color:"var(--sd-fg-4, #778)",lineHeight:1.6,marginTop:4};function aG({level:a}){let c=av[a]||av.unknown;return(0,b.jsxs)("span",{role:"status",style:{display:"inline-flex",alignItems:"center",gap:7,padding:"4px 11px",borderRadius:999,fontSize:12.5,fontWeight:700,color:c.color,background:`${c.color}1f`,border:`1px solid ${c.color}55`,whiteSpace:"nowrap"},children:[(0,b.jsx)("span",{style:{width:7,height:7,borderRadius:"50%",background:c.color}}),c.label]})}let aH=(a,b)=>`${Math.max(0,Math.min(100,a/b*100))}%`;function aI({title:a,used:c,of:d,max:e,color:f,ticks:g=[],band:h,children:i}){return(0,b.jsxs)("div",{style:{marginTop:18},children:[(0,b.jsxs)("div",{style:{display:"flex",alignItems:"baseline",gap:10,flexWrap:"wrap"},children:[(0,b.jsx)("span",{style:{fontSize:13.5,fontWeight:650,color:"var(--sd-fg-1, #e8e8ee)"},children:a}),(0,b.jsxs)("span",{style:{marginLeft:"auto",fontSize:13,color:"var(--sd-fg-3, #8b9a9a)",fontVariantNumeric:"tabular-nums"},children:[(0,b.jsx)("b",{style:{fontSize:17,color:"var(--sd-fg-1, #fff)"},children:aC(c)}),d?` ${d}`:""]})]}),(0,b.jsxs)("div",{style:{position:"relative",height:10,borderRadius:5,marginTop:7,background:"rgba(var(--sd-ink, 255, 255, 255), 0.07)"},children:[h&&(0,b.jsx)("div",{title:h.title,style:{position:"absolute",top:0,bottom:0,left:aH(h.from,e),width:`calc(${aH(h.to,e)} - ${aH(h.from,e)})`,background:"repeating-linear-gradient(135deg, rgba(255,215,0,0.28) 0 4px, rgba(255,215,0,0.08) 4px 8px)"}}),(0,b.jsx)("div",{style:{position:"absolute",top:0,bottom:0,left:0,width:Number.isFinite(c)?aH(c,e):0,borderRadius:5,background:f,transition:"width 0.4s ease"}}),g.map(a=>(0,b.jsx)("div",{title:a.title,style:{position:"absolute",top:-3,bottom:-3,left:aH(a.at,e),width:2,marginLeft:-1,borderRadius:1,background:a.color||"rgba(var(--sd-ink, 255, 255, 255), 0.55)"}},a.at))]}),(g.length>0||h)&&(0,b.jsx)("div",{"aria-hidden":"true",style:{position:"relative",height:16,marginTop:3,fontSize:10.5,color:"var(--sd-fg-4, #778)",fontVariantNumeric:"tabular-nums"},children:(h?[h.from,h.to]:[]).filter(a=>!g.some(b=>b.at===a)).map(a=>({at:a,label:String(a),color:"rgba(255,215,0,0.75)"})).concat(g).map(a=>{let c=a.at/e*100;return(0,b.jsx)("span",{style:{position:"absolute",left:`${Math.min(100,c)}%`,whiteSpace:"nowrap",color:a.color||void 0,transform:c>94?"translateX(-100%)":c<4?"none":"translateX(-50%)"},children:a.label},a.at)})}),(0,b.jsx)("div",{style:{fontSize:12.5,color:"var(--sd-fg-3, #8b9a9a)",lineHeight:1.6,marginTop:2},children:i})]})}function aJ({day:a,week:c,freesAt:d,weekFreesAt:e,now:f}){let g=Number.isFinite(a)&&Number.isFinite(c),h=[{label:"Last 24 hours",used:a,cap:aA.INVITE_CAPS.day},{label:"Last 7 days",used:c,cap:aA.INVITE_CAPS.week}],i=g?Math.max(0,Math.min(aA.INVITE_CAPS.day-a,aA.INVITE_CAPS.week-c)):null;return(0,b.jsxs)("div",{style:{marginTop:18},"data-usage":"invites",children:[(0,b.jsx)("div",{style:{fontSize:13.5,fontWeight:650,color:"var(--sd-fg-1, #e8e8ee)"},children:"Connection requests (Auto)"}),h.map(a=>(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10,marginTop:8},children:[(0,b.jsx)("span",{style:{flex:"0 0 88px",fontSize:12,color:"var(--sd-fg-3, #8b9a9a)"},children:a.label}),(0,b.jsx)("div",{style:{position:"relative",flex:1,height:10,borderRadius:5,background:"rgba(var(--sd-ink, 255, 255, 255), 0.07)"},children:(0,b.jsx)("div",{style:{position:"absolute",top:0,bottom:0,left:0,borderRadius:5,transition:"width 0.4s ease",width:Number.isFinite(a.used)?aH(a.used,Math.max(a.cap,a.used)):0,background:a.used>=a.cap?"#ff6b6b":"linear-gradient(90deg, #FFD700, #FF6B35)"}})}),(0,b.jsxs)("span",{style:{flex:"0 0 auto",fontSize:13,color:"var(--sd-fg-3, #8b9a9a)",fontVariantNumeric:"tabular-nums",minWidth:58,textAlign:"right"},children:[(0,b.jsx)("b",{style:{fontSize:15,color:"var(--sd-fg-1, #fff)"},children:aC(a.used)})," of ",a.cap]})]},a.label)),(0,b.jsxs)("div",{style:{fontSize:12.5,color:"var(--sd-fg-3, #8b9a9a)",lineHeight:1.6,marginTop:6},children:[g?d?(0,b.jsxs)(b.Fragment,{children:["Auto’s ",aA.INVITE_CAPS.day," a day are used. The next one frees ",aL(d,f),"."]}):e?(0,b.jsxs)(b.Fragment,{children:["Auto’s ",aA.INVITE_CAPS.week," a week are used. The next one frees ",aL(e,f),"."]}):(0,b.jsxs)(b.Fragment,{children:[aD(i,"request")," left for Auto now."]}):null,(0,b.jsxs)("div",{style:aF,children:["Each press of Auto sends one request from the scanner’s Chrome, without a note, and opens their profile once (a profile view). It stops at ",aA.INVITE_CAPS.day," in any 24 hours and ",aA.INVITE_CAPS.week," in any 7 days. LinkedIn doesn’t publish its invitation limit; people commonly report about ",aA.REPORTED_WEEKLY_INVITES," a week."]})]})]})}function aK({label:a,children:c}){return(0,b.jsxs)("div",{style:{display:"flex",gap:"4px 16px",flexWrap:"wrap",padding:"10px 0",borderTop:f.LINE,fontSize:13},children:[(0,b.jsx)("span",{style:{flex:"0 0 150px",color:"var(--sd-fg-1, #e8e8ee)",fontWeight:600},children:a}),(0,b.jsx)("span",{style:{flex:"1 1 280px",color:"var(--sd-fg-3, #8b9a9a)",lineHeight:1.6},children:c})]})}let aL=(a,b)=>`${function(a,b=Date.now()){let c=a-b;if(!(c>0))return"now";if(c<6e4)return"in under a minute";let d=Math.round(c/6e4);if(d<60)return`in ${d} min`;let e=Math.floor(d/60);return e>=48?`in ${Math.round(e/24)} days`:`in ${e} h${d%60?` ${d%60} min`:""}`}(a,b)} (${ay(a)})`;function aM(){var a;let e,[g,h]=(0,c.useState)(null),[i,j]=(0,c.useState)(null),[k,l]=(0,c.useState)(!1),m=(0,c.useCallback)(()=>fetch("/api/scraper?usage=1",{cache:"no-store"}).then(a=>a.json().then(b=>a.ok&&!b.error?b:Promise.reject(Error(b.error||"The usage could not be read.")))).then(a=>{h(a),j(null)}).catch(a=>j(a.message)),[]);(0,c.useEffect)(()=>{m();let a=setInterval(m,3e4);return()=>clearInterval(a)},[m]);let n=async()=>{l(!0);try{let a=await fetch("/api/scraper",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"set-limits",...as.SAFE_LIMITS})});if(!a.ok)throw Error((await a.json().catch(()=>({}))).error||"The budget could not be saved.");await m()}catch(a){j(a.message)}finally{l(!1)}};if(!g)return(0,b.jsx)(f.Section,{id:"usage",title:"LinkedIn usage",children:(0,b.jsx)(f.Body,{children:i?`${i}`:"Counting…"})});let o=g.now,{limits:p={}}=g,q=g.searchesToday,r=aw({cooldown:g.cooldown,searchesDay:q,lastPushback:g.lastPushback,searchesSincePushback:g.searchesSincePushback,now:o}),s=function(a,b={},c={}){let d=function(a,{searchesDay:b,cooldown:c,lastPushback:d,now:e=Date.now()}={}){if("paused"===a){let a=String(c?.reason||"LinkedIn pushed back");return`Scanning is paused${c?.until?` until ${ay(c.until)}`:""}. ${a.charAt(0).toUpperCase()}${a.slice(1)}. Nothing that searches LinkedIn runs until then, so the account can recover.`}return"danger"===a?b>=au?`${b} searches in the last 24 hours. A real account was restricted after ${as.RESTRICTED_AT}. Stop scanning until this comes down: each search stops counting 24 hours after it was made.`:`LinkedIn pushed back ${az(d?.at,e)}, and searching has carried on since. Carrying on after a warning is what LinkedIn says turns it into a restriction. Leave it at least a day.`:"risky"===a?`More than ${as.RISKY_DAILY} searches in the last 24 hours. That is past what Six Degrees asks you to confirm, and a free account's whole month may be 250 to 350.`:"above-default"===a?`More than the default ${as.SAFE_LIMITS.daily} searches in the last 24 hours. The default leaves room under limits LinkedIn doesn’t publish.`:"unknown"===a?"The record of searches on this computer couldn’t be read, so the scanner counts today’s budget as used until it can.":null}(a,b),e="danger"===a&&b.searchesDay>=au;return[d,(0,as.limitNote)(c,{restriction:!e})].filter(Boolean)}(r,{searchesDay:q,cooldown:g.cooldown,lastPushback:g.lastPushback,now:o},p),t=p.daily>as.SAFE_LIMITS.daily||0===p.monthly||p.monthly>as.SAFE_LIMITS.monthly,u=function({leftDay:a,leftMonth:b,paused:c=!1}={}){let d=[a,b].filter(a=>Number.isFinite(a));if(!d.length)return null;let e=c?0:Math.max(0,Math.min(...d));return{searches:e,people:9*e,by:null!=a&&null!=b?a<=b?"day":"month":null!=a?"day":"month"}}({leftDay:g.leftToday,leftMonth:g.leftMonth,paused:!!g.cooldown}),v=(0,aB.paceOf)(p.pace),w=g.lastPushback,x=aw({searchesDay:q}),y=[{at:as.SAFE_LIMITS.daily,label:String(as.SAFE_LIMITS.daily),title:"The default budget"},{at:as.RISKY_DAILY,label:String(as.RISKY_DAILY),title:"Above this is risky",color:"#FF8C42"},{at:as.RESTRICTED_AT,label:String(as.RESTRICTED_AT),title:"A real account was restricted here",color:"#ff6b6b"}];p.daily&&!y.some(a=>a.at===p.daily)&&y.push({at:p.daily,label:`${p.daily} yours`,title:"Your daily budget",color:"var(--sd-blue, #3498DB)"});let z=ax(q,y.map(a=>a.at)),A=g.searchesMonth,B=p.monthly?[{at:p.monthly,label:`${p.monthly} yours`,title:"Your monthly budget",color:"var(--sd-blue, #3498DB)"}]:[],C=ax(A,[350,p.monthly||0]),D=p.monthly&&A>=p.monthly?"#ff6b6b":A>=250?"#FFD700":"#3498DB",E=g.searchesWeek,F=ax(E,[200]),G=g.profilesToday,H=Math.max(p.profiles||1,Number(G)||0);return(0,b.jsxs)(f.Section,{id:"usage",title:"LinkedIn usage",children:[(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:12,flexWrap:"wrap"},children:[(0,b.jsx)(aG,{level:r}),(0,b.jsx)("span",{style:{fontSize:13,color:"var(--sd-fg-3, #8b9a9a)",flex:"1 1 260px",lineHeight:1.5},children:"What Six Degrees has asked of your LinkedIn account from this computer, and how close that is to the line."})]}),s.length>0&&(0,b.jsxs)("div",{style:{marginTop:14,padding:"11px 14px",borderRadius:8,fontSize:13,lineHeight:1.6,color:"var(--sd-fg-2, #e3d9c4)",background:`${(av[r]||av.unknown).color}14`,border:`1px solid ${(av[r]||av.unknown).color}55`},children:[s.map((a,c)=>(0,b.jsx)("div",{style:{marginTop:6*!!c},children:a},c)),t&&(0,b.jsx)("button",{onClick:n,disabled:k,style:{marginTop:9,padding:"6px 12px",borderRadius:7,fontSize:12.5,fontWeight:650,cursor:k?"not-allowed":"pointer",background:"rgba(255,215,0,0.08)",color:"var(--sd-gold, #FFD700)",border:"1px solid rgba(255,215,0,0.4)"},children:k?"Saving…":`Back to ${as.SAFE_LIMITS.daily} a day, ${as.SAFE_LIMITS.monthly} a month`})]}),i&&(0,b.jsx)(f.Body,{style:{color:"var(--sd-red, #ff7676)"},children:i}),(0,b.jsxs)(aI,{title:"Searches in the last 24 hours",used:q,of:p.daily?`of ${p.daily} a day`:"no daily cap",max:z,color:(av[x]||av.unknown).color,ticks:y,children:[g.unreadable?null:p.daily?g.dayFreesAt?(0,b.jsxs)(b.Fragment,{children:["Your ",p.daily," a day are used. The next one frees ",aL(g.dayFreesAt,o),"."]}):(0,b.jsxs)(b.Fragment,{children:[aD(g.leftToday,"search","searches")," left under your budget",g.cooldown?", once the pause ends":"","."]}):(0,b.jsx)(b.Fragment,{children:"No daily cap is set, so only the monthly one stops a scan."}),g.dayClearAt&&(0,b.jsxs)(b.Fragment,{children:[" All clear ",aL(g.dayClearAt,o),", when the newest of these turns 24 hours old."]}),(0,b.jsxs)("div",{style:aF,children:[as.SAFE_LIMITS.daily," is the default budget. Over ",as.RISKY_DAILY," is risky: the budget picker asks first."," ",as.RESTRICTED_AT," is where a real account was restricted, on Sep 28, 2026, with searches run back to back."," ",au," (60% of that) or more shows as too close."]})]}),(0,b.jsxs)(aI,{title:"Searches this month",used:A,of:p.monthly?`of ${p.monthly} a month`:"no monthly cap",max:C,color:D,ticks:B,band:{from:250,to:350,title:"The range people report for a free account"},children:["LinkedIn’s month resets ",(a=g.monthResets,e=new Intl.DateTimeFormat("en-US",{timeZone:"America/Los_Angeles",month:"short",day:"numeric",hour:"numeric",minute:"2-digit"}).format(new Date(a)),`${e.replace(/ /g," ")} Pacific`)," (",ay(g.monthResets)," here).",p.monthly?Number.isFinite(g.leftMonth)&&(0,b.jsxs)(b.Fragment,{children:[" ",aD(g.leftMonth,"search","searches")," left under your budget."]}):(0,b.jsx)(b.Fragment,{children:" No monthly cap is set (Premium)."}),(0,b.jsxs)("div",{style:aF,children:["The shaded ",250," to ",350," is the range people report for a free account’s monthly search limit. LinkedIn doesn’t publish one, so it’s a guide, not a fact. Every page of someone’s connections is one search."]})]}),(0,b.jsxs)(aI,{title:"Searches in the last 7 days",used:E,of:"against Auto scan's 200",max:F,color:E>=200?"#FFD700":"#3498DB",ticks:[{at:200,label:String(200),title:"Auto scan stops here"}],children:["Auto scan stops at ",200," in any 7 days. A scan you start yourself stops only at your daily and monthly budget."]}),(0,b.jsxs)(aI,{title:"Profile views in the last 24 hours",used:G,of:`of ${p.profiles} a day`,max:H,color:G>=p.profiles?"#ff6b6b":"#9B59B6",children:[g.profilesFreeAt?(0,b.jsxs)(b.Fragment,{children:["Your ",p.profiles," a day are used. The next one frees ",aL(g.profilesFreeAt,o),"."]}):Number.isFinite(G)&&(0,b.jsxs)(b.Fragment,{children:[aD(g.profilesLeftToday,"view","views")," left."]}),(0,b.jsxs)("div",{style:aF,children:["Each circle scan opens the person’s profile once. Profile views are what got an account restricted on Sep 9, 2026, after about 20 to 25 in an hour; at ",v.label," the scanner opens at most one every ",v.profileGap," seconds."]})]}),(0,b.jsx)(aJ,{day:g.invitesToday,week:g.invitesWeek,freesAt:g.invitesFreeAt,weekFreesAt:g.invitesWeekFreeAt,now:o}),(0,b.jsxs)("div",{style:{marginTop:22},children:[(0,b.jsxs)(aK,{label:"Speed",children:[v.label,": about ",(0,aB.searchesPerHour)(p.pace)," searches an hour at most while a scan runs.",Number.isFinite(g.searchesLastHour)&&(0,b.jsxs)(b.Fragment,{children:[" In the last hour: ",aD(g.searchesLastHour,"search","searches"),"."]})," ",(0,b.jsx)(d.default,{href:"/setup",style:aE,children:"Change it on the Scan page"})]}),(0,b.jsx)(aK,{label:"Can still map",children:g.unreadable?(0,b.jsx)(b.Fragment,{children:"Can’t tell until the record of searches can be read."}):u?g.cooldown?(0,b.jsx)(b.Fragment,{children:"No one until the pause ends."}):0===u.searches?(0,b.jsxs)(b.Fragment,{children:["No one for now: your ","day"===u.by?"daily":"monthly"," budget is used."]}):(0,b.jsxs)(b.Fragment,{children:["About ",aC(u.people)," people: ",aD(u.searches,"search","searches")," left under your"," ","day"===u.by?"daily":"monthly"," budget, at about ",9," people a search.",(0,b.jsx)("span",{style:{color:"var(--sd-fg-4, #778)"},children:" An estimate: a page of results shows up to 10 people, and the last page of a list is usually short."})]}):(0,b.jsx)(b.Fragment,{children:"No cap is set, so there’s no count of what’s left."})}),(0,b.jsx)(aK,{label:"Last pushback",children:w?(0,b.jsxs)(b.Fragment,{children:[w.at?(0,b.jsxs)(b.Fragment,{children:[ay(w.at)," (",az(w.at,o),"): "]}):null,w.reason,".",w.active&&(0,b.jsxs)(b.Fragment,{children:[" Scanning is paused until ",ay(w.pausedUntil),"."]}),w.liftedAt&&(0,b.jsxs)(b.Fragment,{children:[" You lifted the pause ",ay(w.liftedAt),"; it would have run until ",ay(w.pausedUntil),"."]}),!w.active&&!w.liftedAt&&w.pausedUntil&&(0,b.jsxs)(b.Fragment,{children:[" The pause ended ",ay(w.pausedUntil),"."]}),g.searchesSincePushback>0&&(0,b.jsxs)(b.Fragment,{children:[" ",aD(g.searchesSincePushback,"search","searches")," since."]})]}):(0,b.jsx)(b.Fragment,{children:"None on record on this computer."})}),(0,b.jsxs)(aK,{label:"Auto scan",children:["However high your budget is set, Auto scan keeps under its own limits: ",40," searches in any 24 hours,"," ",200," in any 7 days, only from ",function([a,b]=at){let c=a=>`${a%12||12} ${a<12?"AM":"PM"}`;return`${c(a)} to ${c(b)}`}(at)," on this computer’s clock,"," ","an hour’s rest"," after every ",8," searches,"," ","and ",2," days off after any check from LinkedIn."]})]}),(0,b.jsxs)("div",{style:{...aF,marginTop:14,paddingTop:12,borderTop:f.LINE},children:["Where these numbers come from: Six Degrees writes down every search, profile view and Auto request it makes on your LinkedIn account, on this computer, and counts them here. Searches you make yourself on linkedin.com aren’t in it, and LinkedIn shows no count of its own. The ",as.RESTRICTED_AT," searches and the 20 to 25 profile views are what happened to one real account, not safe limits. Change the budget on the"," ",(0,b.jsx)(d.default,{href:"/setup",style:aE,children:"Scan page"}),", under Fine-tune the scanner. Nothing here is sent anywhere."," ","Counted ",ay(o),"."]})]})}var aN=a.i(58834);let aO={"mac-app":"the Mac app","windows-app":"the Windows app","linux-app":"the Linux app",npm:"the npm package (npx six-degrees)",source:"a copy built from the source code",git:"a git checkout of the source code"};function aP(){let[a,e]=(0,c.useState)(null),[h,i]=(0,c.useState)(null),[j,k]=(0,c.useState)(0),l=()=>k(a=>a+1);if((0,c.useEffect)(()=>{fetch("/api/settings").then(a=>a.json().then(b=>a.ok?b:Promise.reject(Error(b.error||"Could not load settings.")))).then(e).catch(a=>i(a.message))},[]),aN.IS_DEMO)return(0,b.jsxs)("div",{style:{minHeight:"100vh",background:"var(--sd-page)",color:"rgba(var(--sd-ink, 255, 255, 255), 0.7)",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:12,textAlign:"center",padding:24,fontFamily:f.FONT},children:[(0,b.jsx)("h2",{style:{margin:0,fontSize:20,fontWeight:700,color:"var(--sd-fg-1, #fff)"},children:"Not part of the demo"}),(0,b.jsx)("p",{style:{margin:0,fontSize:13},children:"The public demo includes the Network Circle and Degrees views only."}),(0,b.jsx)(d.default,{href:"/",style:{fontSize:12,color:"rgba(var(--sd-ink, 255, 255, 255), 0.5)",textDecoration:"none"},children:"← Back to the network"})]});let m=a?.about;return(0,b.jsxs)("div",{style:{minHeight:"100vh",background:"var(--sd-page)",color:"var(--sd-fg-1, #fff)",fontFamily:f.FONT},children:[(0,b.jsxs)("header",{style:{padding:"16px 24px",borderBottom:f.LINE,display:"flex",alignItems:"center",gap:16},children:[(0,b.jsx)(d.default,{href:"/",style:{display:"flex",alignItems:"center",gap:6,color:"var(--sd-fg-3, #888)",textDecoration:"none",fontSize:13,fontWeight:600,padding:"6px 14px",borderRadius:6,background:"rgba(var(--sd-ink, 255, 255, 255), 0.06)",border:f.LINE},children:"← Back to Map"}),(0,b.jsx)("h1",{style:{fontSize:22,fontWeight:700,margin:0,background:"linear-gradient(135deg, #FFD700, #9B59B6, #3498DB)",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent"},children:"Settings"})]}),(0,b.jsxs)("main",{style:{maxWidth:980,margin:"0 auto",padding:"8px 24px 64px"},children:[h&&(0,b.jsx)(f.Body,{style:{color:"var(--sd-red, #ff7676)",marginTop:16},children:h}),(0,b.jsx)(g,{}),(0,b.jsx)(aM,{}),(0,b.jsx)(aq,{}),(0,b.jsxs)(f.Section,{id:"scoring",title:"Scores",children:[(0,b.jsxs)(f.Body,{children:["How someone’s power score is worked out, and the four things you can change about it:"," ",(0,b.jsx)("a",{href:"#sector",style:{color:"var(--sd-blue, #3498DB)",textDecoration:"none",fontWeight:600},children:"your field"}),","," ",(0,b.jsx)("a",{href:"#tiers",style:{color:"var(--sd-blue, #3498DB)",textDecoration:"none",fontWeight:600},children:"how tiers are graded"}),","," ",(0,b.jsx)("a",{href:"#titles",style:{color:"var(--sd-blue, #3498DB)",textDecoration:"none",fontWeight:600},children:"how titles rank"})," and"," ",(0,b.jsx)("a",{href:"#companies",style:{color:"var(--sd-blue, #3498DB)",textDecoration:"none",fontWeight:600},children:"any company’s score"}),". A change here rescores everyone. How your network holds together is in"," ",(0,b.jsx)(d.default,{href:"/profile?view=insights",style:{color:"var(--sd-blue, #3498DB)",textDecoration:"none",fontWeight:600},children:"Profile → Insights"}),"."]}),(0,b.jsx)(S,{onSaved:l}),(0,b.jsx)(Z,{onSaved:l}),(0,b.jsx)(ae,{onSaved:l}),(0,b.jsx)("div",{id:"companies",style:{marginTop:28},children:(0,b.jsx)(ar.default,{version:j})})]}),(0,b.jsx)(D,{}),(0,b.jsx)(f.Section,{id:"about",title:"About this copy",children:m?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)(f.Body,{children:["Version ",(0,b.jsx)(f.Mono,{children:m.version}),", running as ",aO[m.kind]||m.kind,"."]}),(0,b.jsxs)(f.Body,{children:["Your network is kept in ",(0,b.jsx)(f.Mono,{children:m.dataDir}),m.customDataDir?" (a folder you chose).":".",["mac-app","windows-app","linux-app"].includes(m.kind)&&" Help → Show the Data Folder opens it."]}),(0,b.jsx)(f.Body,{style:{fontSize:12,color:"var(--sd-fg-4, #667)",marginTop:10},children:"Settings are saved with your network, on this computer. Nothing here is sent anywhere."})]}):!h&&(0,b.jsx)(f.Body,{children:"Loading…"})})]})]})}a.s(["default",0,function(){return(0,b.jsx)(e.default,{children:(0,b.jsx)(aP,{})})}],54209)}];
2
2
 
3
3
  //# sourceMappingURL=app_settings_page_1f8mjj_.js.map