six-degrees 0.4.11 → 0.5.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 (375) hide show
  1. package/.next/standalone/.next/BUILD_ID +1 -1
  2. package/.next/standalone/.next/build-manifest.json +3 -3
  3. package/.next/standalone/.next/prerender-manifest.json +9 -9
  4. package/.next/standalone/.next/server/app/_global-error.html +1 -1
  5. package/.next/standalone/.next/server/app/_global-error.rsc +1 -1
  6. package/.next/standalone/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  7. package/.next/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  8. package/.next/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  9. package/.next/standalone/.next/server/app/_not-found/page.js.nft.json +1 -1
  10. package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  11. package/.next/standalone/.next/server/app/_not-found.html +1 -1
  12. package/.next/standalone/.next/server/app/_not-found.rsc +12 -12
  13. package/.next/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +12 -12
  14. package/.next/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +11 -11
  15. package/.next/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  16. package/.next/standalone/.next/server/app/api/admin-delete/route.js +1 -1
  17. package/.next/standalone/.next/server/app/api/admin-delete/route.js.nft.json +1 -1
  18. package/.next/standalone/.next/server/app/api/admin-update/route.js +1 -1
  19. package/.next/standalone/.next/server/app/api/admin-update/route.js.nft.json +1 -1
  20. package/.next/standalone/.next/server/app/api/bridges/route.js +1 -1
  21. package/.next/standalone/.next/server/app/api/bridges/route.js.nft.json +1 -1
  22. package/.next/standalone/.next/server/app/api/bulk-import/route.js +1 -1
  23. package/.next/standalone/.next/server/app/api/bulk-import/route.js.nft.json +1 -1
  24. package/.next/standalone/.next/server/app/api/company-scores/legacy/route.js +1 -1
  25. package/.next/standalone/.next/server/app/api/company-scores/legacy/route.js.nft.json +1 -1
  26. package/.next/standalone/.next/server/app/api/company-scores/route.js +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/export/route.js.nft.json +1 -1
  31. package/.next/standalone/.next/server/app/api/data/import/route.js.nft.json +1 -1
  32. package/.next/standalone/.next/server/app/api/data/restart/route.js.nft.json +1 -1
  33. package/.next/standalone/.next/server/app/api/data/reveal/route.js.nft.json +1 -1
  34. package/.next/standalone/.next/server/app/api/data/route.js.nft.json +1 -1
  35. package/.next/standalone/.next/server/app/api/delete-cluster/route.js +1 -1
  36. package/.next/standalone/.next/server/app/api/delete-cluster/route.js.nft.json +1 -1
  37. package/.next/standalone/.next/server/app/api/ingest/route.js +1 -1
  38. package/.next/standalone/.next/server/app/api/ingest/route.js.nft.json +1 -1
  39. package/.next/standalone/.next/server/app/api/network/route.js +1 -1
  40. package/.next/standalone/.next/server/app/api/network/route.js.nft.json +1 -1
  41. package/.next/standalone/.next/server/app/api/notifications/route.js +1 -1
  42. package/.next/standalone/.next/server/app/api/notifications/route.js.nft.json +1 -1
  43. package/.next/standalone/.next/server/app/api/outreach/route.js +1 -1
  44. package/.next/standalone/.next/server/app/api/outreach/route.js.nft.json +1 -1
  45. package/.next/standalone/.next/server/app/api/queue/route.js +1 -1
  46. package/.next/standalone/.next/server/app/api/queue/route.js.nft.json +1 -1
  47. package/.next/standalone/.next/server/app/api/scraper/route.js +3 -2
  48. package/.next/standalone/.next/server/app/api/scraper/route.js.nft.json +1 -1
  49. package/.next/standalone/.next/server/app/api/settings/route.js +1 -1
  50. package/.next/standalone/.next/server/app/api/settings/route.js.nft.json +1 -1
  51. package/.next/standalone/.next/server/app/api/settings/sector-preview/route.js +1 -1
  52. package/.next/standalone/.next/server/app/api/settings/sector-preview/route.js.nft.json +1 -1
  53. package/.next/standalone/.next/server/app/api/settings/sector-suggestions/route.js +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 +3 -3
  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 +14 -14
  73. package/.next/standalone/.next/server/app/import.segments/_full.segment.rsc +14 -14
  74. package/.next/standalone/.next/server/app/import.segments/_tree.segment.rsc +1 -1
  75. package/.next/standalone/.next/server/app/import.segments/import/__PAGE__.segment.rsc +13 -13
  76. package/.next/standalone/.next/server/app/index.html +1 -1
  77. package/.next/standalone/.next/server/app/index.rsc +14 -14
  78. package/.next/standalone/.next/server/app/index.segments/__PAGE__.segment.rsc +13 -13
  79. package/.next/standalone/.next/server/app/index.segments/_full.segment.rsc +14 -14
  80. package/.next/standalone/.next/server/app/index.segments/_tree.segment.rsc +1 -1
  81. package/.next/standalone/.next/server/app/launch/page.js.nft.json +1 -1
  82. package/.next/standalone/.next/server/app/launch/page_client-reference-manifest.js +1 -1
  83. package/.next/standalone/.next/server/app/launch.html +2 -2
  84. package/.next/standalone/.next/server/app/launch.rsc +14 -14
  85. package/.next/standalone/.next/server/app/launch.segments/_full.segment.rsc +14 -14
  86. package/.next/standalone/.next/server/app/launch.segments/_tree.segment.rsc +1 -1
  87. package/.next/standalone/.next/server/app/launch.segments/launch/__PAGE__.segment.rsc +13 -13
  88. package/.next/standalone/.next/server/app/page.js.nft.json +1 -1
  89. package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
  90. package/.next/standalone/.next/server/app/paths/page.js.nft.json +1 -1
  91. package/.next/standalone/.next/server/app/paths/page_client-reference-manifest.js +1 -1
  92. package/.next/standalone/.next/server/app/paths.html +1 -1
  93. package/.next/standalone/.next/server/app/paths.rsc +14 -14
  94. package/.next/standalone/.next/server/app/paths.segments/_full.segment.rsc +14 -14
  95. package/.next/standalone/.next/server/app/paths.segments/_tree.segment.rsc +1 -1
  96. package/.next/standalone/.next/server/app/paths.segments/paths/__PAGE__.segment.rsc +13 -13
  97. package/.next/standalone/.next/server/app/profile/page.js.nft.json +1 -1
  98. package/.next/standalone/.next/server/app/profile/page_client-reference-manifest.js +1 -1
  99. package/.next/standalone/.next/server/app/profile.html +1 -1
  100. package/.next/standalone/.next/server/app/profile.rsc +14 -14
  101. package/.next/standalone/.next/server/app/profile.segments/_full.segment.rsc +14 -14
  102. package/.next/standalone/.next/server/app/profile.segments/_tree.segment.rsc +1 -1
  103. package/.next/standalone/.next/server/app/profile.segments/profile/__PAGE__.segment.rsc +13 -13
  104. package/.next/standalone/.next/server/app/queue/page.js.nft.json +1 -1
  105. package/.next/standalone/.next/server/app/queue/page_client-reference-manifest.js +1 -1
  106. package/.next/standalone/.next/server/app/queue.html +1 -1
  107. package/.next/standalone/.next/server/app/queue.rsc +14 -14
  108. package/.next/standalone/.next/server/app/queue.segments/_full.segment.rsc +14 -14
  109. package/.next/standalone/.next/server/app/queue.segments/_tree.segment.rsc +1 -1
  110. package/.next/standalone/.next/server/app/queue.segments/queue/__PAGE__.segment.rsc +13 -13
  111. package/.next/standalone/.next/server/app/scores/page.js.nft.json +1 -1
  112. package/.next/standalone/.next/server/app/scores/page_client-reference-manifest.js +1 -1
  113. package/.next/standalone/.next/server/app/scores.html +1 -1
  114. package/.next/standalone/.next/server/app/scores.rsc +14 -14
  115. package/.next/standalone/.next/server/app/scores.segments/_full.segment.rsc +14 -14
  116. package/.next/standalone/.next/server/app/scores.segments/_tree.segment.rsc +1 -1
  117. package/.next/standalone/.next/server/app/scores.segments/scores/__PAGE__.segment.rsc +13 -13
  118. package/.next/standalone/.next/server/app/settings/page.js.nft.json +1 -1
  119. package/.next/standalone/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  120. package/.next/standalone/.next/server/app/settings.html +1 -1
  121. package/.next/standalone/.next/server/app/settings.rsc +14 -14
  122. package/.next/standalone/.next/server/app/settings.segments/_full.segment.rsc +14 -14
  123. package/.next/standalone/.next/server/app/settings.segments/_tree.segment.rsc +1 -1
  124. package/.next/standalone/.next/server/app/settings.segments/settings/__PAGE__.segment.rsc +13 -13
  125. package/.next/standalone/.next/server/app/setup/page.js.nft.json +1 -1
  126. package/.next/standalone/.next/server/app/setup/page_client-reference-manifest.js +1 -1
  127. package/.next/standalone/.next/server/app/setup.html +1 -1
  128. package/.next/standalone/.next/server/app/setup.rsc +14 -14
  129. package/.next/standalone/.next/server/app/setup.segments/_full.segment.rsc +14 -14
  130. package/.next/standalone/.next/server/app/setup.segments/_tree.segment.rsc +1 -1
  131. package/.next/standalone/.next/server/app/setup.segments/setup/__PAGE__.segment.rsc +13 -13
  132. package/.next/standalone/.next/server/app/social/page.js.nft.json +1 -1
  133. package/.next/standalone/.next/server/app/social/page_client-reference-manifest.js +1 -1
  134. package/.next/standalone/.next/server/app/social.html +1 -1
  135. package/.next/standalone/.next/server/app/social.rsc +14 -14
  136. package/.next/standalone/.next/server/app/social.segments/_full.segment.rsc +14 -14
  137. package/.next/standalone/.next/server/app/social.segments/_tree.segment.rsc +1 -1
  138. package/.next/standalone/.next/server/app/social.segments/social/__PAGE__.segment.rsc +13 -13
  139. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0bat8nx._.js → [root-of-the-server]__13dx4sd._.js} +2 -2
  140. package/.next/standalone/.next/server/chunks/[root-of-the-server]__15wc9e-._.js +3 -0
  141. package/.next/standalone/.next/server/chunks/[root-of-the-server]__1kbl21f._.js +1 -1
  142. package/.next/standalone/.next/server/chunks/[root-of-the-server]__20rwfdw._.js +8 -0
  143. package/.next/standalone/.next/server/chunks/_072jl0y._.js +1 -1
  144. package/.next/standalone/.next/server/chunks/_1_fynia._.js +7 -7
  145. package/.next/standalone/.next/server/chunks/_1itd1o_._.js +1 -1
  146. package/.next/standalone/.next/server/chunks/_1iwkh8t._.js +1 -1
  147. package/.next/standalone/.next/server/chunks/lib_0851sk0._.js +8 -0
  148. package/.next/standalone/.next/server/chunks/lib_1q7p2ro._.js +8 -0
  149. package/.next/standalone/.next/server/chunks/lib_1r6l86l._.js +8 -0
  150. package/.next/standalone/.next/server/chunks/lib_db-client_15le7cw.js +8 -8
  151. package/.next/standalone/.next/server/chunks/lib_rpc_04s8mzr.js +3 -0
  152. package/.next/standalone/.next/server/chunks/lib_rpc_053z7as.js +3 -0
  153. package/.next/standalone/.next/server/chunks/lib_rpc_0b_-2te.js +3 -0
  154. package/.next/standalone/.next/server/chunks/lib_rpc_0dhbxdm.js +3 -0
  155. package/.next/standalone/.next/server/chunks/lib_rpc_0dxlk31.js +3 -0
  156. package/.next/standalone/.next/server/chunks/lib_rpc_0f8b-qc.js +3 -0
  157. package/.next/standalone/.next/server/chunks/lib_rpc_0pzie7_.js +3 -0
  158. package/.next/standalone/.next/server/chunks/lib_rpc_0r76fq_.js +3 -0
  159. package/.next/standalone/.next/server/chunks/lib_rpc_0ut7pjp.js +3 -0
  160. package/.next/standalone/.next/server/chunks/lib_rpc_15zyqaz.js +3 -0
  161. package/.next/standalone/.next/server/chunks/lib_rpc_18zpjtq.js +3 -0
  162. package/.next/standalone/.next/server/chunks/lib_rpc_1a8xkiz.js +3 -0
  163. package/.next/standalone/.next/server/chunks/lib_rpc_1e_55xo.js +3 -0
  164. package/.next/standalone/.next/server/chunks/lib_rpc_1oxfd1_.js +3 -0
  165. package/.next/standalone/.next/server/chunks/lib_rpc_1s0lod0.js +3 -0
  166. package/.next/standalone/.next/server/chunks/lib_scoring_1-e4ur0.js +1 -1
  167. package/.next/standalone/.next/server/chunks/ssr/_01kacen._.js +3 -0
  168. package/.next/standalone/.next/server/chunks/ssr/_03l7vge._.js +3 -0
  169. package/.next/standalone/.next/server/chunks/ssr/{_1ap1tu_._.js → _0gtv9jb._.js} +2 -2
  170. package/.next/standalone/.next/server/chunks/ssr/_0jdkqgi._.js +3 -0
  171. package/.next/standalone/.next/server/chunks/ssr/_0xi-fbs._.js +3 -0
  172. package/.next/standalone/.next/server/chunks/ssr/_0xmwmfv._.js +3 -0
  173. package/.next/standalone/.next/server/chunks/ssr/_1-b9hj7._.js +9 -0
  174. package/.next/standalone/.next/server/chunks/ssr/_112ewem._.js +3 -0
  175. package/.next/standalone/.next/server/chunks/ssr/_16ab63q._.js +3 -0
  176. package/.next/standalone/.next/server/chunks/ssr/_1fxm0-s._.js +3 -0
  177. package/.next/standalone/.next/server/chunks/ssr/_1ra1d3r._.js +9 -0
  178. package/.next/standalone/.next/server/chunks/ssr/app_141w189._.js +3 -0
  179. package/.next/standalone/.next/server/chunks/ssr/app_components_ui_0pdmz2z.js +3 -0
  180. package/.next/standalone/.next/server/chunks/ssr/app_page_1fazqbf.js +22 -10
  181. package/.next/standalone/.next/server/chunks/ssr/app_paths_page_1ol90m7.js +2 -2
  182. package/.next/standalone/.next/server/chunks/ssr/app_profile_page_0u3-l5y.js +1 -1
  183. package/.next/standalone/.next/server/chunks/ssr/app_queue_page_0c6znd6.js +6 -5
  184. package/.next/standalone/.next/server/chunks/ssr/app_settings_page_1f8mjj_.js +1 -1
  185. package/.next/standalone/.next/server/chunks/ssr/app_setup_page_1-282zx.js +19 -3
  186. package/.next/standalone/.next/server/chunks/ssr/app_social_page_0h7zxda.js +1 -2
  187. package/.next/standalone/.next/server/chunks/ssr/lib_0i8v-s3._.js +1 -1
  188. package/.next/standalone/.next/server/chunks/ssr/lib_13rapwj._.js +3 -0
  189. package/.next/standalone/.next/server/chunks/ssr/lib_galaxy-lab_108_lu-.js +1 -1
  190. package/.next/standalone/.next/server/middleware-build-manifest.js +3 -3
  191. package/.next/standalone/.next/server/middleware-manifest.json +5 -5
  192. package/.next/standalone/.next/server/pages/404.html +1 -1
  193. package/.next/standalone/.next/server/pages/500.html +1 -1
  194. package/.next/standalone/.next/server/server-reference-manifest.js +1 -1
  195. package/.next/standalone/.next/server/server-reference-manifest.json +1 -1
  196. package/.next/standalone/.next/static/chunks/03bziijw5srol.js +1 -0
  197. package/.next/standalone/.next/static/chunks/0bgq8wmopl_ig.js +7 -0
  198. package/.next/standalone/.next/static/chunks/0ezus6p2eb-vg.js +1 -0
  199. package/.next/standalone/.next/static/chunks/0g_fy2034bp0x.js +34 -0
  200. package/.next/standalone/.next/static/chunks/0q5dru4q6gxl5.js +22 -0
  201. package/.next/standalone/.next/static/chunks/0w-byiwb2zax8.js +2 -0
  202. package/.next/standalone/.next/static/chunks/1g7jcovdejc9-.js +1 -0
  203. package/.next/standalone/.next/static/chunks/1i51yylxdzht1.js +1 -0
  204. package/.next/standalone/.next/static/chunks/1zf8swaasjf1e.js +43 -0
  205. package/.next/standalone/.next/static/chunks/2rqtpccruavf2.js +1 -0
  206. package/.next/standalone/.next/static/chunks/2wgz9ietkqqe6.js +1 -0
  207. package/.next/standalone/.next/static/chunks/30x3oq_st7a5r.js +1 -0
  208. package/.next/standalone/.next/static/chunks/355ryio1b7sm1.js +1 -0
  209. package/.next/standalone/.next/static/chunks/3ap5hgma7n0o7.js +1 -0
  210. package/.next/standalone/.next/static/chunks/3fci6qi39-1n5.js +1 -0
  211. package/.next/standalone/.next/static/chunks/{24tvdun1cb3g1.js → 3sowbvbaj1s6n.js} +1 -1
  212. package/.next/standalone/CHANGELOG.md +187 -0
  213. package/.next/standalone/app/api/ingest/route.js +40 -1
  214. package/.next/standalone/app/api/scraper/route.js +7 -1
  215. package/.next/standalone/app/api/settings/sector-preview/route.js +2 -1
  216. package/.next/standalone/app/components/AppTabs.js +59 -0
  217. package/.next/standalone/app/components/ChainView.js +303 -89
  218. package/.next/standalone/app/components/CirclePanel.js +162 -0
  219. package/.next/standalone/app/components/CompanyScores.js +2 -2
  220. package/.next/standalone/app/components/FieldStep.js +4 -4
  221. package/.next/standalone/app/components/FilterPanel.js +121 -183
  222. package/.next/standalone/app/components/ForceGraph.js +41 -3
  223. package/.next/standalone/app/components/GalaxyLab.js +26 -31
  224. package/.next/standalone/app/components/LegacyScoresCard.js +2 -2
  225. package/.next/standalone/app/components/MapControls.js +154 -0
  226. package/.next/standalone/app/components/NoteDetail.js +118 -0
  227. package/.next/standalone/app/components/PathsAnalyzer.js +147 -110
  228. package/.next/standalone/app/components/PeopleMap.js +308 -0
  229. package/.next/standalone/app/components/ScanRadar.js +129 -0
  230. package/.next/standalone/app/components/ScanStatusBar.js +71 -27
  231. package/.next/standalone/app/components/SeparationView.js +626 -118
  232. package/.next/standalone/app/components/Sidebar.js +28 -2
  233. package/.next/standalone/app/components/settings/NetworkHealthSection.js +1 -1
  234. package/.next/standalone/app/components/settings/SectorSection.js +2 -2
  235. package/.next/standalone/app/components/settings/TierSection.js +1 -1
  236. package/.next/standalone/app/components/settings/TitleSection.js +149 -0
  237. package/.next/standalone/app/components/views.js +15 -14
  238. package/.next/standalone/app/page.js +89 -156
  239. package/.next/standalone/app/paths/page.js +39 -27
  240. package/.next/standalone/app/profile/page.js +33 -5
  241. package/.next/standalone/app/queue/page.js +56 -34
  242. package/.next/standalone/app/scores/page.js +16 -66
  243. package/.next/standalone/app/settings/page.js +27 -13
  244. package/.next/standalone/app/setup/page.js +298 -205
  245. package/.next/standalone/app/social/SocialHub.js +374 -0
  246. package/.next/standalone/app/social/page.js +10 -362
  247. package/.next/standalone/lib/chain-layout.js +105 -35
  248. package/.next/standalone/lib/degrees.js +0 -6
  249. package/.next/standalone/lib/dot-rings.js +25 -0
  250. package/.next/standalone/lib/galaxy-lab.js +65 -6
  251. package/.next/standalone/lib/ingest.js +2 -0
  252. package/.next/standalone/lib/island.js +40 -0
  253. package/.next/standalone/lib/linkedin-limits.js +6 -2
  254. package/.next/standalone/lib/map-heat.js +20 -0
  255. package/.next/standalone/lib/network-health.js +1 -1
  256. package/.next/standalone/lib/notifications.js +121 -0
  257. package/.next/standalone/lib/people-map.js +82 -0
  258. package/.next/standalone/lib/rarity.js +45 -3
  259. package/.next/standalone/lib/reach.js +7 -6
  260. package/.next/standalone/lib/rpc.js +15 -4
  261. package/.next/standalone/lib/scan-pace.js +46 -0
  262. package/.next/standalone/lib/scoring.js +39 -8
  263. package/.next/standalone/lib/scraper-client.js +19 -6
  264. package/.next/standalone/lib/sector-focus.js +4 -4
  265. package/.next/standalone/lib/separation.js +137 -10
  266. package/.next/standalone/lib/settings-effects.js +20 -11
  267. package/.next/standalone/lib/settings.js +3 -0
  268. package/.next/standalone/lib/tier-grid.js +99 -0
  269. package/.next/standalone/lib/title-ranking.js +83 -0
  270. package/.next/standalone/package-lock.json +2 -2
  271. package/.next/standalone/package.json +1 -1
  272. package/.next/standalone/scripts/scrape.py +51 -13
  273. package/.next/static/chunks/03bziijw5srol.js +1 -0
  274. package/.next/static/chunks/0bgq8wmopl_ig.js +7 -0
  275. package/.next/static/chunks/0ezus6p2eb-vg.js +1 -0
  276. package/.next/static/chunks/0g_fy2034bp0x.js +34 -0
  277. package/.next/static/chunks/0q5dru4q6gxl5.js +22 -0
  278. package/.next/static/chunks/0w-byiwb2zax8.js +2 -0
  279. package/.next/static/chunks/1g7jcovdejc9-.js +1 -0
  280. package/.next/static/chunks/1i51yylxdzht1.js +1 -0
  281. package/.next/static/chunks/1zf8swaasjf1e.js +43 -0
  282. package/.next/static/chunks/2rqtpccruavf2.js +1 -0
  283. package/.next/static/chunks/2wgz9ietkqqe6.js +1 -0
  284. package/.next/static/chunks/30x3oq_st7a5r.js +1 -0
  285. package/.next/static/chunks/355ryio1b7sm1.js +1 -0
  286. package/.next/static/chunks/3ap5hgma7n0o7.js +1 -0
  287. package/.next/static/chunks/3fci6qi39-1n5.js +1 -0
  288. package/.next/static/chunks/{24tvdun1cb3g1.js → 3sowbvbaj1s6n.js} +1 -1
  289. package/CHANGELOG.md +187 -0
  290. package/lib/chain-layout.js +105 -35
  291. package/lib/degrees.js +0 -6
  292. package/lib/dot-rings.js +25 -0
  293. package/lib/galaxy-lab.js +65 -6
  294. package/lib/ingest.js +2 -0
  295. package/lib/island.js +40 -0
  296. package/lib/linkedin-limits.js +6 -2
  297. package/lib/map-heat.js +20 -0
  298. package/lib/network-health.js +1 -1
  299. package/lib/notifications.js +121 -0
  300. package/lib/people-map.js +82 -0
  301. package/lib/rarity.js +45 -3
  302. package/lib/reach.js +7 -6
  303. package/lib/rpc.js +15 -4
  304. package/lib/scan-pace.js +46 -0
  305. package/lib/scoring.js +39 -8
  306. package/lib/scraper-client.js +19 -6
  307. package/lib/sector-focus.js +4 -4
  308. package/lib/separation.js +137 -10
  309. package/lib/settings-effects.js +20 -11
  310. package/lib/settings.js +3 -0
  311. package/lib/tier-grid.js +99 -0
  312. package/lib/title-ranking.js +83 -0
  313. package/package.json +1 -1
  314. package/scripts/scrape.py +51 -13
  315. package/.next/standalone/.next/server/chunks/[root-of-the-server]__17hjtzl._.js +0 -8
  316. package/.next/standalone/.next/server/chunks/[root-of-the-server]__20tmem7._.js +0 -3
  317. package/.next/standalone/.next/server/chunks/lib_rpc_03i8xef.js +0 -3
  318. package/.next/standalone/.next/server/chunks/lib_rpc_05gt5ya.js +0 -3
  319. package/.next/standalone/.next/server/chunks/lib_rpc_08fc3rp.js +0 -3
  320. package/.next/standalone/.next/server/chunks/lib_rpc_08r2t_q.js +0 -3
  321. package/.next/standalone/.next/server/chunks/lib_rpc_0btpv1t.js +0 -3
  322. package/.next/standalone/.next/server/chunks/lib_rpc_0c9d9ti.js +0 -8
  323. package/.next/standalone/.next/server/chunks/lib_rpc_0cm2ev3.js +0 -3
  324. package/.next/standalone/.next/server/chunks/lib_rpc_0iovswz.js +0 -3
  325. package/.next/standalone/.next/server/chunks/lib_rpc_0is8flp.js +0 -3
  326. package/.next/standalone/.next/server/chunks/lib_rpc_0v8ajtd.js +0 -3
  327. package/.next/standalone/.next/server/chunks/lib_rpc_0xgmvvt.js +0 -3
  328. package/.next/standalone/.next/server/chunks/lib_rpc_144mzbf.js +0 -3
  329. package/.next/standalone/.next/server/chunks/lib_rpc_1bggi0n.js +0 -3
  330. package/.next/standalone/.next/server/chunks/lib_rpc_1dkcu9f.js +0 -3
  331. package/.next/standalone/.next/server/chunks/lib_rpc_1o0jb6w.js +0 -3
  332. package/.next/standalone/.next/server/chunks/ssr/_0-85h6g._.js +0 -3
  333. package/.next/standalone/.next/server/chunks/ssr/_08cfj2b._.js +0 -3
  334. package/.next/standalone/.next/server/chunks/ssr/_0c_y09g._.js +0 -3
  335. package/.next/standalone/.next/server/chunks/ssr/_0j4-lc3._.js +0 -3
  336. package/.next/standalone/.next/server/chunks/ssr/_0l8cxmo._.js +0 -3
  337. package/.next/standalone/.next/server/chunks/ssr/_0xkur4p._.js +0 -3
  338. package/.next/standalone/.next/server/chunks/ssr/_14iv_zy._.js +0 -3
  339. package/.next/standalone/.next/server/chunks/ssr/_15x6q32._.js +0 -3
  340. package/.next/standalone/.next/server/chunks/ssr/_212xw8q._.js +0 -3
  341. package/.next/standalone/.next/server/chunks/ssr/app_components_19c2d9c._.js +0 -3
  342. package/.next/standalone/.next/server/chunks/ssr/app_scores_page_09wepvv.js +0 -3
  343. package/.next/standalone/.next/static/chunks/0a5iadnmt9u9k.js +0 -1
  344. package/.next/standalone/.next/static/chunks/15sjx07xhpn6p.js +0 -1
  345. package/.next/standalone/.next/static/chunks/160wjb73ddwqd.js +0 -6
  346. package/.next/standalone/.next/static/chunks/1a74dky22dxd6.js +0 -1
  347. package/.next/standalone/.next/static/chunks/1c_n0973t07l0.js +0 -2
  348. package/.next/standalone/.next/static/chunks/1e1n0kkz-psdb.js +0 -1
  349. package/.next/standalone/.next/static/chunks/236f0jtp68j_h.js +0 -1
  350. package/.next/standalone/.next/static/chunks/297e1z34yi--z.js +0 -1
  351. package/.next/standalone/.next/static/chunks/2_ak6qjxb6oa5.js +0 -1
  352. package/.next/standalone/.next/static/chunks/2kfhc58df2xyo.js +0 -1
  353. package/.next/standalone/.next/static/chunks/39hr8d-b2ibtw.js +0 -31
  354. package/.next/standalone/.next/static/chunks/3ui4d-uqkqj5d.js +0 -2
  355. package/.next/standalone/.next/static/chunks/3zw8bv7-mc4n6.js +0 -33
  356. package/.next/standalone/app/components/OrbitGraph.js +0 -737
  357. package/.next/static/chunks/0a5iadnmt9u9k.js +0 -1
  358. package/.next/static/chunks/15sjx07xhpn6p.js +0 -1
  359. package/.next/static/chunks/160wjb73ddwqd.js +0 -6
  360. package/.next/static/chunks/1a74dky22dxd6.js +0 -1
  361. package/.next/static/chunks/1c_n0973t07l0.js +0 -2
  362. package/.next/static/chunks/1e1n0kkz-psdb.js +0 -1
  363. package/.next/static/chunks/236f0jtp68j_h.js +0 -1
  364. package/.next/static/chunks/297e1z34yi--z.js +0 -1
  365. package/.next/static/chunks/2_ak6qjxb6oa5.js +0 -1
  366. package/.next/static/chunks/2kfhc58df2xyo.js +0 -1
  367. package/.next/static/chunks/39hr8d-b2ibtw.js +0 -31
  368. package/.next/static/chunks/3ui4d-uqkqj5d.js +0 -2
  369. package/.next/static/chunks/3zw8bv7-mc4n6.js +0 -33
  370. /package/.next/standalone/.next/static/{jqE2D3zWqSGz5su948Azf → I-cj79yE2IZ8taX2dZGp3}/_buildManifest.js +0 -0
  371. /package/.next/standalone/.next/static/{jqE2D3zWqSGz5su948Azf → I-cj79yE2IZ8taX2dZGp3}/_clientMiddlewareManifest.js +0 -0
  372. /package/.next/standalone/.next/static/{jqE2D3zWqSGz5su948Azf → I-cj79yE2IZ8taX2dZGp3}/_ssgManifest.js +0 -0
  373. /package/.next/static/{jqE2D3zWqSGz5su948Azf → I-cj79yE2IZ8taX2dZGp3}/_buildManifest.js +0 -0
  374. /package/.next/static/{jqE2D3zWqSGz5su948Azf → I-cj79yE2IZ8taX2dZGp3}/_clientMiddlewareManifest.js +0 -0
  375. /package/.next/static/{jqE2D3zWqSGz5su948Azf → I-cj79yE2IZ8taX2dZGp3}/_ssgManifest.js +0 -0
@@ -1,4 +1,5 @@
1
- module.exports=[78386,a=>{"use strict";var b=a.i(87924),c=a.i(72131),d=a.i(23310),e=a.i(58834),f=a.i(38246),g=a.i(91443);let h={S:25,A:15,B:10,C:5,D:2},i={S:100,A:60,B:35,C:15,D:5};var j=a.i(76939),k=a.i(56377);let l={S:"#FFD700",A:"#9B59B6",B:"#3498DB",C:"#95A5A6",D:"#BDC3C7"},m="1px solid rgba(255,255,255,0.1)";function n({person:a,size:c=36,ring:d}){let e=l[a?.tier]||"#667";return(0,b.jsxs)("div",{style:{position:"relative",width:c,height:c,flexShrink:0},children:[(0,b.jsx)("div",{style:{width:c,height:c,borderRadius:"50%",background:e,color:a?.tier==="S"?"#000":"#fff",display:"flex",alignItems:"center",justifyContent:"center",fontSize:.34*c,fontWeight:800,border:`2px solid ${d||e}`},children:(0,j.initialsFor)(a?.name||"?")}),(0,k.localPhoto)(a?.profile_image_url)&&(0,b.jsx)("img",{src:(0,k.localPhoto)(a.profile_image_url),alt:"",onError:a=>{a.currentTarget.style.display="none"},style:{position:"absolute",inset:0,width:c,height:c,borderRadius:"50%",objectFit:"cover",border:`2px solid ${d||e}`}})]})}function o({progress:a,size:c=86,color:d="#FF6B35",children:e}){let f=c/2-5,g=2*Math.PI*f;return(0,b.jsxs)("div",{style:{position:"relative",width:c,height:c},children:[(0,b.jsxs)("svg",{width:c,height:c,style:{position:"absolute",inset:0,transform:"rotate(-90deg)"},children:[(0,b.jsx)("circle",{cx:c/2,cy:c/2,r:f,fill:"none",stroke:"rgba(255,255,255,0.08)",strokeWidth:5}),(0,b.jsx)("circle",{cx:c/2,cy:c/2,r:f,fill:"none",stroke:d,strokeWidth:5,strokeLinecap:"round",strokeDasharray:`${g*Math.min(1,a)} ${g}`,style:{transition:"stroke-dasharray 0.5s ease"}})]}),(0,b.jsx)("div",{style:{position:"absolute",inset:9,display:"flex",alignItems:"center",justifyContent:"center"},children:e})]})}function p({recs:a,sentIds:d,added:e,mappedIds:j,reach:k,onSend:s,onUndo:t}){let u=(0,c.useMemo)(()=>(function({recs:a=[],sentIds:b=new Set,added:c=[],mappedIds:d=new Set,reach:e=null}){var f;let j,k,l,m=new Map,n=new Set;for(let b of[...a].sort((a,b)=>(b.priority||0)-(a.priority||0))){if(!b.bridge)continue;let a=`${b.bridge.id}|${b.profile_url||b.id}`;if(n.has(a))continue;n.add(a);let c=m.get(b.bridge.id);c||(c={bridge:b.bridge,people:[]},m.set(b.bridge.id,c)),c.people.push(b)}let o=new Map;for(let a of c){let b=a.unlocked_from_bridge_id;b&&o.set(b,[...o.get(b)||[],a])}let p=[],q=0,r=0;for(let{bridge:a,people:c}of m.values()){let d=c.filter(a=>b.has(a.id)),e=o.get(a.id)||[];r+=d.length,q+=d.reduce((a,b)=>a+(h[b.tier]||2),0),q+=e.reduce((a,b)=>a+(i[b.tier]||5),0);let f=Math.ceil(c.length/5)||1,g=0;for(;g<f-1&&c.slice(5*g,(g+1)*5).every(a=>b.has(a.id));)g++;let j=c.slice(5*g,(g+1)*5),k=j.filter(a=>b.has(a.id)).length,l=k===j.length&&g===f-1;p.push({bridge:a,people:c,stage:g+1,stages:f,targets:j,done:k,progress:j.length?k/j.length:1,complete:l,sent:d.length,added:e,value:j.filter(a=>!b.has(a.id)).reduce((a,b)=>a+(b.priority||0),0),open:{S:j.filter(a=>"S"===a.tier&&!b.has(a.id)).length,A:j.filter(a=>"A"===a.tier&&!b.has(a.id)).length}})}p.sort((a,b)=>a.complete-b.complete||(b.progress>0&&b.progress<1)-(a.progress>0&&a.progress<1)||b.progress-a.progress||b.value-a.value);let s=p.filter(a=>!a.complete).flatMap(a=>a.targets.filter(a=>!b.has(a.id)).map(b=>({person:b,cluster:a,score:(b.priority||0)*(1+.6*a.progress)}))).sort((a,b)=>b.score-a.score),t=new Set,u=[];for(let a of s){let b=a.person.profile_url||a.person.id;if(!t.has(b)&&(t.add(b),u.push(a),3===u.length))break}let v=c.filter(a=>a.unlocked_from_bridge_id).length;return{clusters:p,nextMoves:u,points:q,level:(k=((j=Math.floor(Math.sqrt(Math.max(0,f=q)/40))+1)-1)**2*40,l=j**2*40,{level:j,floor:k,next:l,progress:(f-k)/(l-k)}),sentTotal:r,addedTotal:v,newDoors:c.filter(a=>a.unlocked_from_bridge_id&&"todo"===(0,g.circleState)(a,e||{scanned:d,hidden:new Set})),clearedStages:p.reduce((a,b)=>a+(b.stage-1)+ +!!b.complete,0)}})({recs:a,sentIds:d,added:e,mappedIds:j,reach:k}),[a,d,e,j,k]),[v,w]=(0,c.useState)(null),[x,y]=(0,c.useState)(null),{level:z}=u;async function A(a,b){await s(a);let c=b.done+1,d=String(b.bridge.name||"").split(/[\s,]+/)[0];y(c>=b.targets.length?`+${h[a.tier]||2} \xb7 Stage ${b.stage} of ${d}'s circle cleared — the next 5 are up`:`+${h[a.tier]||2} \xb7 ${d}'s circle ${c}/${b.targets.length}`),setTimeout(()=>y(null),3500)}let B=u.clusters.find(a=>a.bridge.id===v);return(0,b.jsxs)("div",{style:{maxWidth:1100,margin:"0 auto",padding:"16px 20px 60px"},children:[(0,b.jsxs)("div",{style:{display:"flex",gap:16,alignItems:"center",flexWrap:"wrap",padding:16,borderRadius:12,border:m,background:"linear-gradient(135deg, rgba(255,107,53,0.10), rgba(155,89,182,0.08))"},children:[(0,b.jsxs)("div",{style:{width:64,height:64,borderRadius:16,background:"linear-gradient(135deg, #FFD700, #FF6B35)",color:"#000",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:[(0,b.jsx)("div",{style:{fontSize:10,fontWeight:800},children:"LEVEL"}),(0,b.jsx)("div",{style:{fontSize:26,fontWeight:900,lineHeight:1},children:z.level})]}),(0,b.jsxs)("div",{style:{flex:1,minWidth:220},children:[(0,b.jsxs)("div",{style:{fontSize:13,color:"#dfe6e9"},children:[(0,b.jsx)("b",{children:u.points})," points · ",(0,b.jsx)("b",{children:z.next-u.points})," to level ",z.level+1]}),(0,b.jsx)("div",{style:{height:8,borderRadius:4,background:"rgba(255,255,255,0.08)",marginTop:6,overflow:"hidden"},children:(0,b.jsx)("div",{style:{height:"100%",width:`${Math.round(100*z.progress)}%`,background:"linear-gradient(90deg, #FFD700, #FF6B35)",transition:"width 0.5s"}})}),(0,b.jsx)("div",{style:{fontSize:11.5,color:"#8b9a9a",marginTop:6},children:"Points come from invites you send and people who accept — not from browsing."})]}),[[u.sentTotal,"invites sent"],[u.addedTotal,"people added"],[u.clearedStages,"stages cleared"]].map(([a,c])=>(0,b.jsxs)("div",{style:{textAlign:"center",minWidth:80},children:[(0,b.jsx)("div",{style:{fontSize:24,fontWeight:900},children:a}),(0,b.jsx)("div",{style:{fontSize:11,color:"#8b9a9a"},children:c})]},c))]}),u.newDoors.length>0&&(0,b.jsxs)("div",{style:{marginTop:12,padding:"10px 14px",borderRadius:10,border:"1px solid rgba(0,255,136,0.3)",background:"rgba(0,255,136,0.06)",fontSize:13},children:["🚪 ",(0,b.jsxs)("b",{children:[u.newDoors.length," new ",1===u.newDoors.length?"door":"doors",":"]})," people you added through a circle, whose own circle isn’t mapped yet. That’s the next degree. ",(0,b.jsx)(f.default,{href:"/setup",style:{color:"#00ff88"},children:"Map them on the Scan page →"})]}),u.nextMoves.length>0&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("h3",{style:{margin:"22px 0 10px",fontSize:15},children:"Next best moves"}),(0,b.jsx)("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(300px, 1fr))",gap:12},children:u.nextMoves.map(({person:a,cluster:c},d)=>(0,b.jsxs)("div",{style:{padding:14,borderRadius:12,border:`1px solid ${l[a.tier]}55`,background:"rgba(255,255,255,0.03)",position:"relative"},children:[(0,b.jsxs)("div",{style:{position:"absolute",top:10,right:12,fontSize:11,fontWeight:800,color:"#FF6B35"},children:["#",d+1]}),(0,b.jsxs)("div",{style:{display:"flex",gap:10,alignItems:"center"},children:[(0,b.jsx)(n,{person:a,size:44}),(0,b.jsxs)("div",{style:{minWidth:0},children:[(0,b.jsx)("div",{style:{fontWeight:700,fontSize:14},children:a.name}),(0,b.jsx)("div",{style:{fontSize:11.5,color:"#8b9a9a",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",maxWidth:220},children:a.headline})]})]}),(0,b.jsxs)("div",{style:{fontSize:11.5,color:"#aab7b7",margin:"10px 0"},children:["via ",(0,b.jsx)("b",{style:{color:l[c.bridge.tier]},children:c.bridge.name})," · their circle ",c.done,"/",c.targets.length," this stage"]}),(0,b.jsxs)("div",{style:{display:"flex",gap:8},children:[a.profile_url&&(0,b.jsx)("a",{href:a.profile_url,target:"_blank",rel:"noopener noreferrer",style:r,children:"Open on LinkedIn"}),(0,b.jsxs)("button",{onClick:()=>A(a,c),style:q,children:["I sent an invite · +",h[a.tier]||2]})]})]},a.id))})]}),(0,b.jsx)("h3",{style:{margin:"26px 0 4px",fontSize:15},children:"Circles to work through"}),(0,b.jsxs)("div",{style:{fontSize:12,color:"#8b9a9a",marginBottom:12},children:["Each is one of your connections and the best people they know, ",5," at a time. Fill the ring to clear a stage."]}),(0,b.jsx)("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(190px, 1fr))",gap:12},children:u.clusters.map(a=>{let c=v===a.bridge.id;return(0,b.jsxs)("button",{onClick:()=>w(c?null:a.bridge.id),style:{padding:12,borderRadius:12,cursor:"pointer",textAlign:"center",color:"#fff",border:c?"1px solid #FF6B35":m,background:a.complete?"rgba(0,255,136,0.06)":"rgba(255,255,255,0.03)",display:"flex",flexDirection:"column",alignItems:"center",gap:6},children:[(0,b.jsx)(o,{progress:a.progress,color:a.complete?"#00ff88":"#FF6B35",children:(0,b.jsx)(n,{person:a.bridge,size:60})}),(0,b.jsx)("div",{style:{fontWeight:700,fontSize:13,maxWidth:170,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:a.bridge.name}),(0,b.jsx)("div",{style:{fontSize:11,color:a.complete?"#00ff88":"#aab7b7"},children:a.complete?"Circle cleared":`Stage ${a.stage} of ${a.stages} \xb7 ${a.done}/${a.targets.length}`}),(0,b.jsx)("div",{style:{display:"flex",gap:4},children:a.targets.map(a=>(0,b.jsx)("span",{title:a.name,style:{width:12,height:12,borderRadius:"50%",border:`2px solid ${l[a.tier]||"#667"}`,background:d.has(a.id)?l[a.tier]||"#667":"transparent"}},a.id))}),(0,b.jsxs)("div",{style:{fontSize:10.5,color:"#778"},children:[a.open.S?`${a.open.S} S \xb7 `:"",a.open.A?`${a.open.A} A \xb7 `:"",a.people.length," worth adding",a.added.length?` \xb7 ★ ${a.added.length} added`:""]})]},a.bridge.id)})}),B&&(0,b.jsxs)("div",{style:{marginTop:14,padding:16,borderRadius:12,border:"1px solid rgba(255,107,53,0.4)",background:"rgba(255,107,53,0.05)"},children:[(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10,marginBottom:10},children:[(0,b.jsx)(n,{person:B.bridge,size:40}),(0,b.jsxs)("div",{children:[(0,b.jsxs)("div",{style:{fontWeight:800},children:[B.bridge.name,"’s circle · stage ",B.stage," of ",B.stages]}),(0,b.jsxs)("div",{style:{fontSize:12,color:"#aab7b7"},children:["Ask ",B.bridge.name?.split(" ")[0]," for an intro, or invite them directly. Mark each one when it’s sent."]})]})]}),B.targets.map(a=>{let c=d.has(a.id);return(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10,padding:"8px 0",borderTop:"1px solid rgba(255,255,255,0.05)"},children:[(0,b.jsx)(n,{person:a,size:34,ring:c?"#00ff88":void 0}),(0,b.jsxs)("div",{style:{flex:1,minWidth:0},children:[(0,b.jsxs)("div",{style:{fontWeight:600,fontSize:13},children:[a.name," ",(0,b.jsx)("span",{style:{color:l[a.tier],fontSize:11},children:a.tier})]}),(0,b.jsx)("div",{style:{fontSize:11.5,color:"#8b9a9a",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:a.headline})]}),a.profile_url&&(0,b.jsx)("a",{href:a.profile_url,target:"_blank",rel:"noopener noreferrer",style:r,children:"LinkedIn"}),c?(0,b.jsx)("button",{onClick:()=>t(a),style:{...r,color:"#00ff88"},children:"Sent ✓ (undo)"}):(0,b.jsxs)("button",{onClick:()=>A(a,B),style:q,children:["Sent · +",h[a.tier]||2]})]},a.id)}),B.added.length>0&&(0,b.jsxs)("div",{style:{marginTop:10,fontSize:12,color:"#00ff88"},children:["★ Added from this circle: ",B.added.map(a=>a.name).join(", ")]})]}),x&&(0,b.jsx)("div",{role:"status",style:{position:"fixed",bottom:24,left:"50%",transform:"translateX(-50%)",padding:"10px 18px",borderRadius:24,background:"linear-gradient(135deg, #FFD700, #FF6B35)",color:"#000",fontWeight:800,fontSize:13,boxShadow:"0 8px 30px rgba(0,0,0,0.5)",zIndex:50},children:x})]})}let q={padding:"7px 12px",borderRadius:8,border:"none",cursor:"pointer",fontWeight:800,fontSize:12,background:"linear-gradient(135deg, #FF6B35, #FFD700)",color:"#000"},r={padding:"7px 12px",borderRadius:8,border:m,cursor:"pointer",fontWeight:600,fontSize:12,background:"rgba(255,255,255,0.05)",color:"#dfe6e9",textDecoration:"none"};var s=a.i(36839),t=a.i(75857),u=a.i(30889),v=a.i(76892),w=a.i(24475),x=a.i(90231),y=a.i(37732);let z={S:"#FFD700",A:"#9B59B6",B:"#3498DB",C:"#95A5A6",D:"#BDC3C7"};function A(){let{userId:a,userProfile:h}=(0,t.useUser)(),i=h?.sectors||[],[j,l]=(0,c.useState)([]),[m,n]=(0,c.useState)(!0),[o,q]=(0,c.useState)("all"),[r,s]=(0,c.useState)(new Set),A=(0,v.default)(),[B,C]=(0,c.useState)([]),[D,E]=(0,c.useState)({}),[F,G]=(0,c.useState)("quest"),[H,I]=(0,c.useState)([]),[J,K]=(0,c.useState)(()=>new Set),[L,M]=(0,c.useState)(null),[N,O]=(0,c.useState)(null),[P,Q]=(0,c.useState)(()=>"bridge");(0,c.useEffect)(()=>{},[]),(0,c.useEffect)(()=>{!e.IS_DEMO&&a&&b();async function b(){let[b,c,e]=await Promise.all([(0,d.loadNetwork)(a),fetch(`/api/outreach?userId=${a}`).then(a=>a.json()).catch(()=>({pending:[]})),(0,y.loadScanNotes)()]),f=b.degree1,h=b.degree2;I(f.filter(a=>a.unlocked_from_bridge_id)),K(new Set(h.map(a=>a.source_connection_id).filter(Boolean))),M((0,g.reachIndex)(f,h,e));let j=new Set(f.map(a=>a.profile_url)),k={};f.forEach(a=>{k[a.id]=a}),C(c.pending||[]),E(k),l(h.filter(a=>("S"===a.tier||"A"===a.tier||"B"===a.tier)&&!j.has(a.profile_url)).map(a=>{let b,c,d=k[a.source_connection_id],e=(b=parseFloat(a.power_score)||0,c=(a.headline||"").toLowerCase(),(0,u.rowCompanyScore)(a)>=u.TOP_COMPANY&&(b+=1),(i||[]).forEach(a=>{c.includes(a.toLowerCase())&&(b+=.5)}),"S"===a.tier?b*=1.5:"A"===a.tier&&(b*=1.2),b),f="S"===a.tier?50:"A"===a.tier?25:10;return{...a,bridge:d,priority:e,xp:f}}).sort((a,b)=>b.priority-a.priority)),n(!1)}},[a]);let R=(0,c.useMemo)(()=>new Set([...B,...j].filter(a=>(0,w.hasRequest)(a,A)).map(a=>a.id)),[B,j,A]),S=(0,c.useMemo)(()=>{let a=new Set,b=[];for(let c of[...B,...j]){let d=(0,x.keyFor)(c);!a.has(d)&&(0,w.hasRequest)(c,A)&&(a.add(d),b.push({...c,bridge:D[c.source_connection_id]||c.bridge||null}))}return b},[B,j,A,D]);if(e.IS_DEMO)return(0,b.jsxs)("div",{style:{minHeight:"100vh",background:"#0a0a1a",color:"rgba(255,255,255,0.7)",fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:10,textAlign:"center",padding:24},children:[(0,b.jsx)("h2",{style:{margin:0,fontSize:18,fontWeight:700,color:"#fff"},children:"Not part of the demo"}),(0,b.jsx)("div",{style:{fontSize:13},children:"The public demo includes the Network Circle and Degrees views only."}),(0,b.jsx)(f.default,{href:"/",style:{fontSize:12,color:"rgba(255,255,255,0.5)",textDecoration:"none"},children:"← Back to the network"})]});let T="all"===o?j:j.filter(a=>a.tier===o);N&&(T=T.filter(a=>a.bridge?.id===N));let U={S:0,A:0,B:0};j.forEach(a=>{void 0!==U[a.tier]&&U[a.tier]++});let V={};T.forEach(a=>{let b;V[b="bridge"===P?a.bridge?.id||"unknown":"company"===P?(a.company||"Unknown").trim()||"Unknown":a.tier]||(V[b]=[]),V[b].push(a)});let W={S:0,A:1,B:2},X=Object.entries(V).sort((a,b)=>{if("tier"===P)return(W[a[0]]||9)-(W[b[0]]||9);if("bridge"===P){let c=a[1][0]?.bridge,d=b[1][0]?.bridge,e=W[c?.tier]??9,f=W[d?.tier]??9;if(e!==f)return e-f}return b[1].length-a[1].length});function Y(a){s(b=>{let c=new Set(b);return c.has(a)?c.delete(a):c.add(a),c})}return m?(0,b.jsx)("div",{style:{minHeight:"100vh",display:"flex",alignItems:"center",justifyContent:"center",background:"#0a0a1a",color:"#fff"},children:"Loading..."}):(0,b.jsxs)("div",{style:{height:"100vh",background:"#0a0a1a",color:"#fff",fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',display:"flex",flexDirection:"column",overflow:"hidden"},children:[(0,b.jsxs)("header",{style:{padding:"14px 24px",borderBottom:"1px solid rgba(255,255,255,0.1)",flexShrink:0},children:[(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:12,marginBottom:10},children:[(0,b.jsxs)(f.default,{href:"/",style:{display:"flex",alignItems:"center",gap:6,color:"#888",textDecoration:"none",fontSize:13,fontWeight:600,padding:"6px 14px",borderRadius:6,background:"rgba(255,255,255,0.06)",border:"1px solid rgba(255,255,255,0.1)"},children:[(0,b.jsx)("span",{style:{fontSize:16},children:"←"})," Map"]}),(0,b.jsx)("h1",{style:{fontSize:20,fontWeight:700,margin:0,background:"linear-gradient(135deg, #FF6B35, #FFD700)",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent"},children:"Outlink"}),(0,b.jsxs)("div",{style:{display:"flex",gap:2,background:"rgba(255,255,255,0.06)",borderRadius:6,padding:2},children:[(0,b.jsx)("button",{onClick:()=>G("quest"),style:{padding:"5px 12px",borderRadius:4,border:"none",fontSize:11,fontWeight:700,cursor:"pointer",background:"quest"===F?"linear-gradient(135deg, #FFD700, #FF6B35)":"transparent",color:"quest"===F?"#000":"#FFD700"},children:"Circles"}),(0,b.jsxs)("button",{onClick:()=>G("recs"),style:{padding:"5px 12px",borderRadius:4,border:"none",fontSize:11,fontWeight:600,cursor:"pointer",background:"recs"===F?"#fff":"transparent",color:"recs"===F?"#000":"#888"},children:["To Add (",j.length,")"]}),(0,b.jsxs)("button",{onClick:()=>G("pending"),style:{padding:"5px 12px",borderRadius:4,border:"none",fontSize:11,fontWeight:600,cursor:"pointer",background:"pending"===F?"linear-gradient(135deg, #FF6B35, #FFD700)":"transparent",color:"pending"===F?"#000":"#FF6B35"},children:["Pending (",S.length,")"]})]}),(0,b.jsx)("div",{style:{marginLeft:"auto",display:"flex",gap:6},children:"recs"===F&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("button",{onClick:()=>Q("tier"),style:{padding:"4px 10px",borderRadius:4,border:"none",fontSize:10,fontWeight:600,cursor:"pointer",background:"tier"===P?"rgba(255,255,255,0.15)":"rgba(255,255,255,0.05)",color:"tier"===P?"#fff":"#666"},children:"By Tier"}),(0,b.jsx)("button",{onClick:()=>Q("bridge"),style:{padding:"4px 10px",borderRadius:4,border:"none",fontSize:10,fontWeight:600,cursor:"pointer",background:"bridge"===P?"rgba(255,255,255,0.15)":"rgba(255,255,255,0.05)",color:"bridge"===P?"#fff":"#666"},children:"By Bridge"}),(0,b.jsx)("button",{onClick:()=>Q("company"),style:{padding:"4px 10px",borderRadius:4,border:"none",fontSize:10,fontWeight:600,cursor:"pointer",background:"company"===P?"rgba(255,255,255,0.15)":"rgba(255,255,255,0.05)",color:"company"===P?"#fff":"#666"},children:"By Company"})]})})]}),(0,b.jsx)("div",{style:{display:"quest"===F?"none":"flex",gap:6},children:[{k:"all",l:`All (${j.length})`},{k:"S",l:`S (${U.S})`,c:z.S},{k:"A",l:`A (${U.A})`,c:z.A},{k:"B",l:`B (${U.B})`,c:z.B}].map(a=>(0,b.jsx)("button",{onClick:()=>q(a.k),style:{padding:"4px 12px",borderRadius:16,border:"none",fontSize:11,fontWeight:600,cursor:"pointer",background:o===a.k?a.c||"#fff":"rgba(255,255,255,0.06)",color:o===a.k?"#000":a.c||"#888"},children:a.l},a.k))})]}),"recs"===F&&r.size>0&&(0,b.jsxs)("div",{style:{padding:"10px 24px",background:"rgba(255,215,0,0.08)",borderBottom:"1px solid rgba(255,215,0,0.2)",display:"flex",alignItems:"center",gap:12,flexShrink:0},children:[(0,b.jsxs)("span",{style:{fontSize:12,color:"#FFD700",fontWeight:600},children:[r.size," selected"]}),(0,b.jsxs)("button",{onClick:function(){let a=T.filter(a=>r.has(a.id));if(0===a.length)return;if(1===a.length)return void window.open(a[0].profile_url,"_blank");let b=new Blob([`<!DOCTYPE html><html><head><title>Outlink — ${a.length} profiles</title>
1
+ module.exports=[78386,a=>{"use strict";var b=a.i(87924),c=a.i(72131),d=a.i(50944),e=a.i(41798),f=a.i(38246),g=a.i(75857),h=a.i(23310),i=a.i(76433),j=a.i(1328),k=a.i(90231),l=a.i(37732),m=a.i(16874),n=a.i(58834);let o=Object.freeze([{id:"new",label:"New"},{id:"contacted",label:"Contacted"},{id:"replied",label:"Replied"},{id:"meeting",label:"Meeting"},{id:"won",label:"Won/Partner"},{id:"not-now",label:"Not now"}]);o.map(a=>a.id);let p=a=>o.find(b=>b.id===a)?.label||"",q=a=>"string"==typeof a&&a.length>0&&a.length<300;function r(){return{version:1,settings:{awaitDays:7},people:{}}}function s(a=new Date){let b=a=>String(a).padStart(2,"0");return`${a.getFullYear()}-${b(a.getMonth()+1)}-${b(a.getDate())}`}let t=/^https:\/\/(www\.)?linkedin\.com\/in\/[^/?#\s]+$/,u={S:0,A:1,B:2,C:3,D:4},v=(a,b)=>(a.degree??9)<(b.degree??9)||(a.degree??9)===(b.degree??9)&&(u[a.tier]??9)<(u[b.tier]??9),w=a=>"sponsored"===a.kind;function x(a,b,c=7){let d=[];for(let e of a){if(w(e)||!1!==e.lastFromThem||!e.last)continue;let a=Math.floor((b-e.last)/864e5);a>=c&&d.push({contact:e,waited:a})}return d.sort((a,b)=>a.waited-b.waited)}function y(a,b,c=null){let d=String(b||"").trim().toLowerCase();return!d||[a.name,a.row?.company,a.row?.role,a.row?.headline,...a.crm?.tags||[],a.crm?.notes].filter(Boolean).join("\n").toLowerCase().includes(d)||!!c&&a.conversations.some(a=>c.has(a.id))}function z(a){let b=null==a?"":String(a);return/^[=+\-@\t\r]/.test(b)&&(b=`'${b}`),/[",\r\n]/.test(b)?`"${b.replace(/"/g,'""')}"`:b}let A=a=>a?new Date(a).toISOString().slice(0,10):"",B=["Name","Company","Profile","Connection","Stage","Tags","Last contact","Who wrote last","Next follow-up","Notes"];function C({id:a,keep:d,group:e,token:f}){let[g,h]=(0,c.useState)(null),[i,j]=(0,c.useState)(null),k=(0,c.useRef)(null),l=(0,c.useRef)(null);async function n(){let b=k.current,c=await fetch(`/api/social/messages?id=${encodeURIComponent(a)}&before=${g.start}&limit=200`).then(a=>a.json()).catch(()=>null);c&&!c.error&&(l.current=b?b.scrollHeight-b.scrollTop:null,h({...g,start:c.start,messages:[...c.messages,...g.messages]}))}(0,c.useEffect)(()=>{if(!d)return;let b=!0;return fetch(`/api/social/messages?id=${encodeURIComponent(a)}&limit=100`).then(a=>a.json()).then(a=>{b&&(a.error?j(a.error):(l.current="bottom",h(a)))}).catch(()=>{b&&j("It couldn’t be read.")}),()=>{b=!1}},[a,d,f]),(0,c.useLayoutEffect)(()=>{let a=k.current;a&&l.current&&("bottom"===l.current?a.scrollTop=a.scrollHeight:a.scrollTop=a.scrollHeight-l.current,l.current=null)},[g]);let o={padding:"10px 14px 14px",fontSize:12.5,color:"#8b9a9a"};return d?i?(0,b.jsx)("div",{style:{...o,color:"#ff9b9b"},children:i}):g?g.total?(0,b.jsxs)("div",{ref:k,style:{maxHeight:440,overflowY:"auto",padding:"8px 14px 12px",background:"rgba(0,0,0,0.2)"},children:[g.start>0&&(0,b.jsx)("div",{style:{textAlign:"center",margin:"4px 0 10px"},children:(0,b.jsxs)("button",{onClick:n,style:{background:"rgba(255,255,255,0.06)",border:m.LINE,borderRadius:6,color:"#cfe6f7",cursor:"pointer",fontSize:12,padding:"4px 12px"},children:["Show earlier (",g.start.toLocaleString()," more)"]})}),g.messages.map((a,c)=>{let d;return(0,b.jsx)("div",{style:{display:"flex",justifyContent:a.fromMe?"flex-end":"flex-start",margin:"6px 0"},children:(0,b.jsxs)("div",{style:{maxWidth:"72%"},children:[(0,b.jsx)("div",{style:{padding:"7px 11px",borderRadius:12,fontSize:13,lineHeight:1.45,whiteSpace:"pre-wrap",overflowWrap:"anywhere",background:a.fromMe?"rgba(52,152,219,0.35)":"rgba(255,255,255,0.08)",color:"#eef",borderBottomRightRadius:a.fromMe?4:12,borderBottomLeftRadius:a.fromMe?12:4},children:a.text||(0,b.jsx)("i",{style:{color:"#8b9a9a"},children:"(no words: an attachment or a reaction)"})}),(0,b.jsxs)("div",{style:{fontSize:10.5,color:"#778",marginTop:2,textAlign:a.fromMe?"right":"left"},children:[a.fromMe?"You":e?"Someone in the group":"Them"," · ",(d=a.t)?new Date(d).toLocaleString(void 0,{day:"numeric",month:"short",year:"numeric",hour:"numeric",minute:"2-digit"}):""]})]})},g.start+c)})]}):(0,b.jsx)("div",{style:o,children:"No messages are kept for this conversation yet. Choose your export folder again, or sync your messages, to bring them in."}):(0,b.jsx)("div",{style:o,children:"Opening…"}):(0,b.jsxs)("div",{style:o,children:["Turn on ",(0,b.jsx)("b",{children:"Keep my messages"})," to read them here."]})}let D={S:"#FFD700",A:"#9B59B6",B:"#3498DB",C:"#95A5A6",D:"#BDC3C7"},E={new:"#8b9a9a",contacted:"#3498DB",replied:"#00d4aa",meeting:"#ff9f43",won:"#FFD700","not-now":"#667"},F=a=>a?new Date(a).toLocaleDateString(void 0,{day:"numeric",month:"short",year:"numeric"}):"",G=a=>a?new Date(`${a}T12:00:00`).toLocaleDateString(void 0,{day:"numeric",month:"short",year:"numeric"}):"",H=a=>/^https:\/\/(www\.)?linkedin\.com\//.test(String(a||""))?a:null,I=(a,b,c=`${b}s`)=>`${a.toLocaleString()} ${1===a?b:c}`,J=[["inbox","Inbox"],["awaiting","Awaiting reply"],["due","Follow-ups due"],["pipeline","Pipeline"],["sent","Sent"],["received","Received"],["all","All"]],K=(a,b="#dfe8e8")=>({fontSize:10.5,padding:"1px 6px",borderRadius:4,background:a,color:b,whiteSpace:"nowrap"}),L={background:"rgba(255,255,255,0.06)",border:m.LINE,borderRadius:6,color:"#cfe6f7",cursor:"pointer",fontSize:12,padding:"4px 10px"},M={padding:"6px 10px",borderRadius:6,border:m.LINE,background:"rgba(0,0,0,0.3)",color:"#fff",fontSize:13};function N({net:a,asOf:d,keep:e,onKeep:f,switching:g,token:h,crmToken:j}){let[l,n]=(0,c.useState)(null),[u,C]=(0,c.useState)(null),[D,E]=(0,c.useState)("inbox"),[H,K]=(0,c.useState)(""),[P,Q]=(0,c.useState)(null),[S,U]=(0,c.useState)(null),[W,Y]=(0,c.useState)(100),[Z,$]=(0,c.useState)(null),_=(0,c.useRef)(null);(0,c.useEffect)(()=>{let a=!0;return fetch("/api/social/messages").then(a=>a.json()).then(b=>{a&&n(b)}).catch(()=>{a&&n({conversations:[],invitations:[],names:{},inviteNotes:{}})}),()=>{a=!1}},[h,e]),(0,c.useEffect)(()=>{let a=!0;return fetch("/api/social/crm").then(a=>a.json()).then(b=>{a&&C(b.crm||r())}).catch(()=>{a&&C(r())}),()=>{a=!1}},[j]),(0,c.useEffect)(()=>{let a=H.trim();if(!e||a.length<2)return;let b=!0,c=setTimeout(()=>{fetch(`/api/social/messages?q=${encodeURIComponent(a)}`).then(a=>a.json()).then(c=>{b&&Q({q:a,ids:new Set(c.ids||[])})}).catch(()=>{})},250);return()=>{b=!1,clearTimeout(c)}},[H,e,h]);let aa=S?.type==="person"?S.key:null,{contacts:ab,groups:ac}=(0,c.useMemo)(()=>(function({conversations:a=[],invitations:b=[],network:c={},crm:d=r(),names:e={},also:f=[]}={}){let g=c.degree1||[],h=c.degree2||[],j=[...g,...h,...c.degree3||[]],l=new Map,m=new Map;for(let a of j){let b=(0,k.keyFor)(a),c=l.get(b);(!c||v(a,c))&&l.set(b,a)}for(let[a,b]of l){let c=(0,i.nameKey)(b.name);c&&m.set(c,m.has(c)&&m.get(c)!==a?null:a)}let n=new Set(g.map(k.keyFor)),o=(0,k.routeIndex)(h),p=new Map(g.map(a=>[a.id,a])),s=a=>a.startsWith("name:")&&m.get(a.slice(5))||a,u=new Map,w=a=>{var b,c,f;let g=s(a),h=u.get(g);if(h)return h;let i=l.get(g)||null;return h={key:g,name:(b=g,c=i,f=e,c?.name?c.name:f[b]?f[b]:b.startsWith("name:")?b.slice(5).replace(/\b\w/g,a=>a.toUpperCase()):String(b||"").replace(/\/+$/,"").split("/").pop()),row:i,connection:n.has(g),degree:i?.degree??null,profileUrl:t.test(g)?g:i?.profile_url&&t.test((0,k.keyFor)(i))?(0,k.keyFor)(i):null,introducers:i&&2===i.degree?[...new Set((0,k.routesFor)(i,o,p).map(a=>a.bridge?.name).filter(Boolean))]:[],conversations:[],groups:[],last:null,lastFromThem:null,unread:null,threadUrl:null,count:0,theyWrote:!1,kind:null,invitesIn:[],invitesOut:[],request:null,crm:d?.people?.[g]||null,lastContact:null},u.set(g,h),h},x=[];for(let b of a){if(!b||!Array.isArray(b.people))continue;if(b.group){x.push({...b,people:b.people.map(s)});continue}if(!b.people.length){x.push({...b,unknown:!0});continue}let a=w(b.people[0]);a.conversations.push(b),a.count+=b.count||0,(!0===b.lastFromThem||null!=b.count&&null!=b.mine&&b.count>b.mine)&&(a.theyWrote=!0),b.last&&(!a.last||b.last>=a.last)?(a.last=b.last,a.lastFromThem=b.lastFromThem,a.unread=b.unread,a.threadUrl=b.threadUrl||a.threadUrl):a.last||b.last||(a.threadUrl=b.threadUrl||a.threadUrl)}for(let a of u.values()){a.conversations.sort((a,b)=>(b.last||0)-(a.last||0));let b=new Set(a.conversations.map(a=>a.kind||null));a.kind=1===b.size?[...b][0]:null}for(let a of x)for(let b of a.people)u.get(b)?.groups.push(a.id);for(let a of b){if(!a?.key)continue;let b=w(a.key);!a.name||b.row||e[b.key]||(b.name=a.name),("in"===a.dir?b.invitesIn:b.invitesOut).push(a)}for(let a of j){if("sent"!==a.outreach_status&&"accepted"!==a.outreach_status&&"pending"!==a.unlock_status)continue;let b=w((0,k.keyFor)(a)),c=b.connection||"accepted"===a.outreach_status?"accepted":"pending";b.request&&"accepted"!==c||(b.request={status:c})}for(let a of Object.keys(d?.people||{}))w(a);for(let a of f)q(a)&&w(a);for(let a of u.values()){let b=[a.last,...a.invitesIn.map(a=>a.t),...a.invitesOut.map(a=>a.t)].filter(Boolean);a.lastContact=b.length?Math.max(...b):null}return{contacts:u,groups:x}})({conversations:l?.conversations||[],invitations:l?.invitations||[],network:a||{},crm:u||r(),names:l?.names||{},also:aa?[aa]:[]}),[l,a,u,aa]),ad=(0,c.useMemo)(()=>{let b=new Map;for(let c of[...a?.degree1||[],...a?.degree2||[]])b.has((0,k.keyFor)(c))||b.set((0,k.keyFor)(c),c);let c=l?.names||{};return a=>ab.get(a)?.name||b.get(a)?.name||c[a]||null},[ab,a,l]),ae=u?.settings?.awaitDays||7,[af]=(0,c.useState)(()=>Date.now()),ag=d||af,ah=s(new Date(af)),ai=(0,c.useMemo)(()=>[...ab.values()],[ab]),aj=(0,c.useMemo)(()=>{let a=(a,b)=>({type:"person",key:a.key,c:a,sub:b,t:a.lastContact||0}),b=a=>null==a.lastFromThem?"":a.lastFromThem?`They wrote ${F(a.last)}`:`You wrote ${F(a.last)}`,c=ai.filter(a=>a.lastContact||a.crm||a.request).map(c=>a(c,b(c)||(c.invitesOut[0]?`You asked to connect ${F(c.invitesOut[0].t)}`:"")||(c.invitesIn[0]?`Asked to connect ${F(c.invitesIn[0].t)}`:"")||(c.request?`Tracked request \xb7 ${c.request.status}`:"")||(c.crm?.stage?p(c.crm.stage):"")));for(let a of ac)c.push({type:"group",id:a.id,g:a,sub:a.last?`${a.lastFromThem?"Someone wrote":"You wrote"} ${F(a.last)}`:"",t:a.last||0});return c.sort((a,b)=>b.t-a.t),{inbox:[...ai].filter(a=>!w(a)&&(!0===a.lastFromThem||a.unread>0)).sort((a,b)=>(b.unread>0)-(a.unread>0)||(b.last||0)-(a.last||0)).map(c=>a(c,c.unread>0?`${c.unread} unread \xb7 ${b(c)}`:b(c))),awaiting:x(ai,ag,ae).map(b=>a(b.contact,`You wrote ${F(b.contact.last)}, no reply for ${I(b.waited,"day")}`)),due:(function(a,b=s()){return[...a].filter(a=>a.crm?.followUp&&a.crm.followUp<=b).sort((a,b)=>a.crm.followUp.localeCompare(b.crm.followUp))})(ai,ah).map(b=>a(b,b.crm.followUp===ah?"Follow up today":`Follow up was due ${G(b.crm.followUp)}`)),pipeline:function(a){let b=Object.fromEntries(o.map(a=>[a.id,[]]));for(let c of a)c.crm?.stage&&b[c.crm.stage].push(c);for(let a of Object.values(b))a.sort((a,b)=>(b.lastContact||0)-(a.lastContact||0));return b}(ai),sent:(function(a,b,c=7){let d=[...a],e=new Map(x(d,b,c).map(a=>[a.contact.key,a.waited])),f=[];for(let a of d){let b=[];for(let c of a.invitesOut)b.push({type:"invite",id:c.id,t:c.t,status:a.connection?"accepted":"pending"});a.request&&b.push({type:"request",status:a.request.status}),e.has(a.key)&&b.push({type:"awaiting",t:a.last,waited:e.get(a.key)}),b.length&&f.push({contact:a,items:b,t:Math.max(0,...b.map(a=>a.t||0))})}return f.sort((a,b)=>b.t-a.t)})(ai,ag,ae).map(b=>a(b.contact,b.items.map(a=>"invite"===a.type?`Request ${F(a.t)} \xb7 ${a.status}`:"request"===a.type?`Tracked request \xb7 ${a.status}`:`No reply for ${I(a.waited,"day")}`).join(" · "))),received:(function(a){let b=[];for(let c of a)!c.connection&&c.invitesIn.length&&b.push({contact:c,t:Math.max(0,...c.invitesIn.map(a=>a.t||0))});return b.sort((a,b)=>b.t-a.t)})(ai).map(b=>a(b.contact,`Asked to connect ${F(b.t)}`)),all:c}},[ai,ac,ag,ae,ah]),ak=e&&P?.q===H.trim()?P.ids:null,al=H.trim().toLowerCase(),am=(0,c.useMemo)(()=>{let b="pipeline"===D?[]:aj[D];if(!al)return b;let c=b.filter(a=>"person"===a.type?y(a.c,al,ak):String(a.g.title||"").toLowerCase().includes(al)||a.g.people.some(a=>String(ad(a)||"").toLowerCase().includes(al))||ak?.has(a.g.id));if("all"===D&&al.length>=2&&a){let b=new Set(c.map(a=>a.key)),d=new Set;for(let e of[...a.degree1||[],...a.degree2||[]]){let a=(0,k.keyFor)(e);if(!(b.has(a)||d.has(a))&&[e.name,e.company,e.role,e.headline].some(a=>String(a||"").toLowerCase().includes(al))&&(d.add(a),c.push({type:"person",key:a,c:null,row:e,sub:"Nothing on file yet",t:0}),d.size>=50))break}}return c},[aj,D,al,ak,a,ad]),an=(0,c.useMemo)(()=>{if("pipeline"!==D)return null;let a={};for(let[b,c]of Object.entries(aj.pipeline))a[b]=al?c.filter(a=>y(a,al,ak)):c;return a},[aj,D,al,ak]),ao={inbox:aj.inbox.length,awaiting:aj.awaiting.length,due:aj.due.length,pipeline:Object.values(aj.pipeline).reduce((a,b)=>a+b.length,0),sent:aj.sent.length,received:aj.received.length,all:aj.all.length};async function ap(a,b){let c=await fetch("/api/social/crm",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({key:a,set:b})}),d=await c.json().catch(()=>({}));if(!c.ok)throw Error(d.error||"That couldn’t be saved.");C(b=>{let c={...b||r(),people:{...b?.people||{}}};return d.entry?c.people[a]=d.entry:delete c.people[a],c})}async function aq(a){let b=await fetch("/api/social/crm",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({settings:{awaitDays:a}})}),c=await b.json().catch(()=>({}));b.ok&&C(a=>({...a||r(),settings:c.settings}))}async function ar(){window.confirm("Delete your CRM: every stage, tag, note and follow-up date you added? This can’t be undone.")&&(await fetch("/api/social/crm",{method:"DELETE"}),C(r()),$("Your CRM notes are deleted."))}let as=!l||!u||!a,at={padding:"12px 14px",borderRadius:8,border:m.LINE,background:"rgba(255,255,255,0.03)",marginTop:10},au=S?.type==="group"?ac.find(a=>a.id===S.id):null,av=aa?ab.get(aa):null;return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("div",{style:at,children:[(0,b.jsxs)("label",{style:{display:"flex",gap:8,alignItems:"center",fontSize:13.5,color:"#fff",cursor:g?"default":"pointer"},children:[(0,b.jsx)("input",{type:"checkbox",checked:e,disabled:g,onChange:a=>f(a.target.checked)}),(0,b.jsx)("b",{children:"Keep my messages on this computer"}),(0,b.jsx)("span",{style:{fontSize:11.5,color:e?"#00ff88":"#8b9a9a"},children:e?"on":"off"})]}),(0,b.jsxs)(m.Body,{style:{margin:"6px 0 0",fontSize:12.5},children:["Off unless you turn it on. When it’s on, the messages themselves, including what other people wrote to you, and the notes sent with connection requests, are saved only in the app’s data folder on this computer. They’re never sent anywhere, and they aren’t in “Save a copy of my network”. ",(0,b.jsx)("i",{children:"Forget it"}),", or switching this off, deletes them. With it off, the CRM still shows who, when and who wrote last. Your own stages, tags, notes and follow-ups are always kept, on this computer only."]})]}),(0,b.jsxs)("div",{className:"crm-grid",style:{marginTop:10},children:[(0,b.jsxs)("div",{className:"pipeline"===D?"crm-wide":void 0,style:{...at,marginTop:0,padding:0,minWidth:0},children:[(0,b.jsx)("div",{role:"tablist","aria-label":"CRM views",style:{display:"flex",flexWrap:"wrap",gap:4,padding:"10px 10px 6px",borderBottom:m.LINE},children:J.map(([a,c])=>(0,b.jsxs)("button",{role:"tab","aria-selected":D===a,onClick:()=>{E(a),Y(100)},style:{...L,padding:"4px 9px",fontSize:12,background:D===a?"rgba(52,152,219,0.28)":"rgba(255,255,255,0.04)",color:D===a?"#fff":"#b8c4c4"},children:[c," ",(0,b.jsx)("span",{style:{color:D===a?"#cfe6f7":"#778"},children:as?"":ao[a].toLocaleString()})]},a))}),(0,b.jsxs)("div",{style:{padding:"8px 10px",borderBottom:m.LINE,display:"flex",gap:8,alignItems:"center",flexWrap:"wrap"},children:[(0,b.jsx)("input",{type:"search",value:H,onChange:a=>{K(a.target.value),Y(100)},placeholder:e?"Search names, companies, tags, notes, what was said":"Search names, companies, tags, notes","aria-label":"Search the CRM",style:{...M,flex:"1 1 180px",minWidth:0}}),(0,b.jsx)("button",{onClick:function(){var a;let b,c,d=ai.filter(a=>"sponsored"!==a.kind).sort((a,b)=>(b.lastContact||0)-(a.lastContact||0)),e=`Six Degrees CRM ${s()}.csv`;a=function(a){let b=[B.map(z).join(",")];for(let c of a)b.push([c.name,c.row?.company||"",c.profileUrl||"",c.connection?"Yes":"No",p(c.crm?.stage),(c.crm?.tags||[]).join("; "),A(c.lastContact),null==c.lastFromThem?"":c.lastFromThem?"Them":"You",c.crm?.followUp||"",c.crm?.notes||""].map(z).join(","));return`\uFEFF${b.join("\r\n")}\r
2
+ `}(d),b=URL.createObjectURL(new Blob([a],{type:"text/csv;charset=utf-8"})),(c=document.createElement("a")).href=b,c.download=e,c.style.position="fixed",c.style.left="-9999px",document.body.appendChild(c),c.click(),c.remove(),setTimeout(()=>URL.revokeObjectURL(b),6e4),$(`Made “${e}” (${I(d.length,"person","people")}). Look for it in your Downloads folder, or wherever you chose to save it. It holds your notes: keep it private.`)},disabled:as,style:L,title:"A spreadsheet of everyone here, with your stages, tags, follow-ups and notes",children:"Export CSV"})]}),"awaiting"===D&&(0,b.jsxs)("div",{style:{padding:"8px 12px",borderBottom:m.LINE,fontSize:12.5,color:"#b8c4c4",display:"flex",gap:6,alignItems:"center",flexWrap:"wrap"},children:["You wrote last and nothing came back for",(0,b.jsx)("input",{type:"number",min:1,max:365,value:ae,"aria-label":"Days with no reply",onChange:a=>{let b=Number(a.target.value);b>=1&&b<=365&&aq(b)},style:{...M,width:64,padding:"3px 6px"}}),"days or more",d?`, as of ${F(d)}`:"","."]}),Z&&(0,b.jsx)("div",{style:{padding:"8px 12px",fontSize:12.5,color:"#00ff88",borderBottom:m.LINE},children:Z}),as&&(0,b.jsx)("div",{style:{padding:12,fontSize:13,color:"#8b9a9a"},children:"Loading…"}),!as&&"pipeline"===D&&(0,b.jsx)(T,{pipeline:an,picked:aa,onPick:a=>{U({type:"person",key:a})}}),!as&&"pipeline"!==D&&0===am.length&&(0,b.jsx)("div",{style:{padding:12,fontSize:13,color:"#8b9a9a"},children:al?"Nothing matches that.":O[D]}),!as&&"pipeline"!==D&&(0,b.jsxs)("div",{children:[am.slice(0,W).map(a=>(0,b.jsx)(R,{r:a,nameOf:ad,active:"person"===a.type?aa===a.key:S?.id===a.id,onPick:()=>{U("person"===a.type?{type:"person",key:a.key}:{type:"group",id:a.id})}},"person"===a.type?`p:${a.key}`:`g:${a.id}`)),am.length>W&&(0,b.jsxs)("button",{onClick:()=>Y(W+100),style:{width:"100%",padding:10,background:"none",border:"none",color:"#3498DB",cursor:"pointer",fontSize:13},children:["Show ",Math.min(100,am.length-W).toLocaleString()," more of ",am.length.toLocaleString()]})]})]}),(0,b.jsxs)("div",{ref:_,className:"pipeline"===D?"crm-wide":void 0,style:{...at,marginTop:0,minWidth:0,scrollMarginTop:80},children:[!S&&(0,b.jsx)("div",{style:{fontSize:13,color:"#8b9a9a"},children:"Pick someone to see everything with them, and to add a stage, tags, notes or a follow-up."}),av&&(0,b.jsx)(V,{c:av,nameOf:ad,groups:ac,keep:e,token:h,inviteNotes:l?.inviteNotes||{},onChange:ap,onPickGroup:a=>{U({type:"group",id:a})}},av.key),au&&(0,b.jsx)(X,{g:au,contacts:ab,nameOf:ad,keep:e,token:h,onPick:a=>{U({type:"person",key:a})}})]})]}),(0,b.jsxs)("div",{style:{fontSize:11.5,color:"#778",marginTop:6},children:["Everyone from your export and the live sync, connections or not; groups are listed and marked. Sponsored messages are marked and kept out of the Inbox. Awaiting reply and warmth are judged as of the newest thing your data knows.",Object.keys(u?.people||{}).length>0&&(0,b.jsxs)(b.Fragment,{children:[" ","Your notes are in the app’s data folder, not in “Save a copy of my network”."," ",(0,b.jsx)("button",{onClick:ar,style:{background:"none",border:"none",color:"#ff9b9b",cursor:"pointer",fontSize:11.5,padding:0},children:"Delete my CRM notes"})]})]})]})}let O={inbox:"No one is waiting on a reply.",awaiting:"Nobody you wrote to is overdue a reply.",due:"No follow-ups are due. Set one on anyone, and it shows here on the day.",sent:"Nothing sent yet: choose your export folder above (its Invitations.csv), or mark requests sent in the app.",received:"No requests waiting on you, as far as your export shows.",all:"Nobody here yet. Choose your export folder above, or sync your messages."};function P({tier:a}){return(0,b.jsx)("span",{style:{width:8,height:8,borderRadius:"50%",background:D[a]||"#556",flexShrink:0,display:"inline-block"}})}function Q({c:a}){return(0,b.jsxs)(b.Fragment,{children:[a&&!a.connection&&(0,b.jsx)("span",{style:K("rgba(255,159,67,0.18)","#ffc58a"),children:2===a.degree?"2nd degree":"Not a connection"}),a?.kind==="sponsored"&&(0,b.jsx)("span",{style:K("rgba(255,255,255,0.08)"),children:"Sponsored"}),a?.kind==="inmail"&&(0,b.jsx)("span",{style:K("rgba(155,89,182,0.25)"),children:"InMail"}),a?.crm?.stage&&(0,b.jsx)("span",{style:K("rgba(255,255,255,0.06)",E[a.crm.stage]),children:p(a.crm.stage)})]})}function R({r:a,nameOf:c,active:d,onPick:e}){let f,g=null,h=null;if("person"===a.type){let c=a.c;f=c?.name||a.row?.name||a.key,g=c?.row?.tier||a.row?.tier,h=(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(Q,{c:c||{connection:a.row?.degree===1,degree:a.row?.degree}}),c?.unread>0&&(0,b.jsxs)("span",{style:K("#3498DB","#fff"),children:[c.unread," unread"]})]})}else f=S(a.g,c),h=(0,b.jsx)("span",{style:K("rgba(255,255,255,0.08)"),children:a.g.unknown?"To someone unnamed":"Group"});let i="person"===a.type?a.c?.row?.company||a.row?.company:null;return(0,b.jsxs)("div",{role:"button",tabIndex:0,"aria-pressed":d,onClick:e,onKeyDown:a=>{("Enter"===a.key||" "===a.key)&&(a.preventDefault(),e())},style:{padding:"8px 12px",borderBottom:"1px solid rgba(255,255,255,0.04)",cursor:"pointer",background:d?"rgba(52,152,219,0.14)":"none"},children:[(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:6,fontSize:13,minWidth:0,flexWrap:"wrap"},children:[(0,b.jsx)(P,{tier:g}),(0,b.jsx)("b",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",maxWidth:"100%"},children:f}),h]}),(0,b.jsx)("div",{style:{fontSize:11.5,color:"#8b9a9a",marginTop:2,paddingLeft:14,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:[i,a.sub].filter(Boolean).join(" · ")})]})}function S(a,b){if(a.title)return a.title;if(a.unknown)return"A conversation only you wrote in";let c=a.people.map(b).filter(Boolean);return c.length?`${c.slice(0,3).join(", ")}${a.people.length>3?` +${a.people.length-3}`:""}`:`${a.people.length} people`}function T({pipeline:a,picked:c,onPick:d}){return(0,b.jsx)("div",{className:"crm-board",children:o.map(e=>(0,b.jsxs)("div",{style:{minWidth:0},children:[(0,b.jsxs)("div",{style:{fontSize:12,fontWeight:650,color:E[e.id],margin:"0 0 6px",display:"flex",justifyContent:"space-between"},children:[(0,b.jsx)("span",{children:e.label}),(0,b.jsx)("span",{style:{color:"#778"},children:a[e.id].length.toLocaleString()})]}),0===a[e.id].length&&(0,b.jsx)("div",{style:{fontSize:11.5,color:"#667",padding:"6px 0"},children:"No one"}),a[e.id].slice(0,200).map(a=>(0,b.jsxs)("div",{role:"button",tabIndex:0,onClick:()=>d(a.key),onKeyDown:b=>{("Enter"===b.key||" "===b.key)&&(b.preventDefault(),d(a.key))},style:{padding:"7px 9px",marginBottom:6,borderRadius:6,border:m.LINE,cursor:"pointer",fontSize:12.5,background:c===a.key?"rgba(52,152,219,0.18)":"rgba(255,255,255,0.03)"},children:[(0,b.jsxs)("div",{style:{display:"flex",gap:6,alignItems:"center"},children:[(0,b.jsx)(P,{tier:a.row?.tier}),(0,b.jsx)("b",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:a.name})]}),(0,b.jsx)("div",{style:{color:"#8b9a9a",fontSize:11,marginTop:2},children:[a.row?.company,a.crm.followUp?`Follow up ${G(a.crm.followUp)}`:null].filter(Boolean).join(" · ")})]},a.key)),a[e.id].length>200&&(0,b.jsxs)("div",{style:{fontSize:11,color:"#778"},children:["and ",(a[e.id].length-200).toLocaleString()," more (search to find them)"]})]},e.id))})}let U={fontSize:12,fontWeight:650,color:"#b8c4c4",margin:"16px 0 6px",textTransform:"uppercase",letterSpacing:.4};function V({c:a,nameOf:d,groups:e,keep:f,token:g,inviteNotes:h,onChange:i,onPickGroup:j}){let k=a.row,[l,n]=(0,c.useState)(a.conversations[0]?.id||null),o=H(a.profileUrl),p=H(a.threadUrl),q=a.connection?`A connection${k?.connected_date?` since ${F(Date.parse(k.connected_date))}`:""}.`:2===a.degree?"2nd degree: not a connection yet.":"Not a connection.";return(0,b.jsxs)("div",{style:{fontSize:13},children:[(0,b.jsxs)("div",{style:{display:"flex",gap:8,alignItems:"center",flexWrap:"wrap"},children:[(0,b.jsx)(P,{tier:k?.tier}),(0,b.jsx)("h3",{style:{margin:0,fontSize:17},children:a.name}),k?.tier&&(0,b.jsxs)("span",{style:K("rgba(255,255,255,0.06)",D[k.tier]),children:[k.tier," tier"]}),(0,b.jsx)(Q,{c:a})]}),(k?.headline||k?.company)&&(0,b.jsx)("div",{style:{color:"#b8c4c4",marginTop:4},children:k.headline||[k.role,k.company].filter(Boolean).join(" at ")}),(0,b.jsxs)("div",{style:{color:"#8b9a9a",marginTop:4,fontSize:12.5},children:[q,a.introducers.length>0&&(0,b.jsxs)(b.Fragment,{children:[" Who can introduce you: ",(0,b.jsx)("b",{style:{color:"#dfe8e8"},children:a.introducers.slice(0,6).join(", ")}),a.introducers.length>6?` and ${a.introducers.length-6} more`:"","."]}),k?.unlocked_from_name&&a.connection&&(0,b.jsxs)(b.Fragment,{children:[" You met through ",(0,b.jsx)("b",{style:{color:"#dfe8e8"},children:k.unlocked_from_name}),"."]})]}),(0,b.jsxs)("div",{style:{display:"flex",gap:12,marginTop:6,flexWrap:"wrap",fontSize:12.5},children:[o&&(0,b.jsx)("a",{href:o,target:"_blank",rel:"noreferrer",style:{color:"#3498DB",textDecoration:"none"},children:"Profile on LinkedIn ↗"}),p&&(0,b.jsx)("a",{href:p,target:"_blank",rel:"noreferrer",style:{color:"#3498DB",textDecoration:"none"},children:"Conversation on LinkedIn ↗"})]}),(0,b.jsx)(W,{c:a,onChange:i}),(0,b.jsx)("div",{style:U,children:"Conversations"}),0===a.conversations.length&&(0,b.jsx)("div",{style:{color:"#8b9a9a",fontSize:12.5},children:"None one to one."}),a.conversations.map(a=>(0,b.jsxs)("div",{style:{border:m.LINE,borderRadius:6,marginBottom:6,overflow:"hidden"},children:[(0,b.jsxs)("div",{role:"button",tabIndex:0,"aria-expanded":l===a.id,onClick:()=>n(l===a.id?null:a.id),onKeyDown:b=>{("Enter"===b.key||" "===b.key)&&(b.preventDefault(),n(l===a.id?null:a.id))},style:{display:"flex",gap:8,alignItems:"center",flexWrap:"wrap",padding:"7px 10px",cursor:"pointer",fontSize:12.5,background:l===a.id?"rgba(255,255,255,0.04)":"none"},children:[(0,b.jsx)("span",{style:{color:"#dfe8e8"},children:F(a.last)||"No date"}),null!=a.lastFromThem&&(0,b.jsx)("span",{style:{color:a.lastFromThem?"#ff9f43":"#8b9a9a"},children:a.lastFromThem?"They wrote last":"You wrote last"}),null!=a.count&&(0,b.jsx)("span",{style:{color:"#8b9a9a"},children:I(a.count,"message")}),null!=a.mine&&null!=a.count&&a.mine===a.count&&(0,b.jsx)("span",{style:K("rgba(255,255,255,0.06)"),children:"Only you wrote"}),a.folder&&"inbox"!==a.folder&&(0,b.jsx)("span",{style:K("rgba(255,255,255,0.06)"),children:a.folder}),"inmail"===a.kind&&(0,b.jsx)("span",{style:K("rgba(155,89,182,0.25)"),children:"InMail"}),"sponsored"===a.kind&&(0,b.jsx)("span",{style:K("rgba(255,255,255,0.08)"),children:"Sponsored"}),a.unread>0&&(0,b.jsxs)("span",{style:K("#3498DB","#fff"),children:[a.unread," unread"]})]}),l===a.id&&(0,b.jsx)(C,{id:a.id,keep:f,group:!1,token:g},`${a.id}:${g}:${f}`)]},a.id)),a.groups.length>0&&(0,b.jsxs)("div",{style:{fontSize:12.5,color:"#8b9a9a",marginTop:4},children:["Also in ",I(a.groups.length,"group"),":"," ",a.groups.slice(0,8).map((a,c)=>{let f=e.find(b=>b.id===a);return(0,b.jsxs)("span",{children:[c>0?", ":"",(0,b.jsx)("button",{onClick:()=>j(a),style:{background:"none",border:"none",color:"#3498DB",cursor:"pointer",padding:0,fontSize:12.5},children:f?S(f,d):"a group"})]},a)})]}),(0,b.jsx)("div",{style:U,children:"Requests"}),a.invitesOut.length+a.invitesIn.length===0&&!a.request&&(0,b.jsx)("div",{style:{color:"#8b9a9a",fontSize:12.5},children:"None on file."}),[...a.invitesOut,...a.invitesIn].sort((a,b)=>(b.t||0)-(a.t||0)).map(c=>(0,b.jsxs)("div",{style:{fontSize:12.5,marginBottom:6},children:[(0,b.jsx)("span",{style:{color:"#dfe8e8"},children:"out"===c.dir?"You asked to connect":"They asked to connect"}),(0,b.jsxs)("span",{style:{color:"#8b9a9a"},children:[" · ",F(c.t)||"no date"," · ",a.connection?"accepted":"out"===c.dir?"pending":"not accepted yet"]}),f&&h[c.id]&&(0,b.jsx)("div",{style:{marginTop:3,padding:"6px 9px",borderRadius:8,background:"rgba(255,255,255,0.06)",whiteSpace:"pre-wrap",overflowWrap:"anywhere"},children:h[c.id]})]},c.id)),a.request&&(0,b.jsxs)("div",{style:{fontSize:12.5},children:[(0,b.jsx)("span",{style:{color:"#dfe8e8"},children:"Request tracked in the app"}),(0,b.jsxs)("span",{style:{color:"#8b9a9a"},children:[" · ",a.request.status]})]})]})}function W({c:a,onChange:d}){let e=a.crm||{},[f,g]=(0,c.useState)(e.notes||""),[h,i]=(0,c.useState)(""),[j,k]=(0,c.useState)(null),l=(0,c.useRef)(null),m=a.theyWrote?"replied":a.conversations.length||a.invitesOut.length||a.request?"contacted":"new";async function n(b){k("Saving…");try{await d(a.key,b),k("Saved")}catch(a){k(a.message)}}(0,c.useEffect)(()=>()=>clearTimeout(l.current),[]);let q=a=>s(new Date(Date.now()+864e5*a)),r=e.tags||[];function t(){let a=h.trim();a&&(i(""),n({tags:[...r,...a.split(",")]}))}return(0,b.jsxs)("div",{style:{marginTop:12,padding:"10px 12px",borderRadius:8,background:"rgba(52,152,219,0.06)",border:"1px solid rgba(52,152,219,0.18)"},children:[(0,b.jsxs)("div",{style:{display:"flex",gap:12,flexWrap:"wrap",alignItems:"flex-end"},children:[(0,b.jsxs)("label",{style:{fontSize:11.5,color:"#8b9a9a",display:"flex",flexDirection:"column",gap:3},children:["Stage",(0,b.jsxs)("select",{value:e.stage||"",onChange:a=>n({stage:a.target.value||null}),style:{...M,padding:"5px 8px"},children:[(0,b.jsxs)("option",{value:"",children:["Not set (looks like ",p(m),")"]}),o.map(a=>(0,b.jsx)("option",{value:a.id,children:a.label},a.id))]})]}),(0,b.jsxs)("label",{style:{fontSize:11.5,color:"#8b9a9a",display:"flex",flexDirection:"column",gap:3},children:["Next follow-up",(0,b.jsx)("input",{type:"date",value:e.followUp||"",onChange:a=>n({followUp:a.target.value||null}),style:{...M,padding:"4px 8px",colorScheme:"dark"}})]}),(0,b.jsxs)("div",{style:{display:"flex",gap:4,flexWrap:"wrap"},children:[(0,b.jsx)("button",{onClick:()=>n({followUp:q(3)}),style:L,children:"In 3 days"}),(0,b.jsx)("button",{onClick:()=>n({followUp:q(7)}),style:L,children:"In a week"}),e.followUp&&(0,b.jsx)("button",{onClick:()=>n({followUp:null}),style:L,children:"Clear"})]})]}),null==e.stage&&"new"!==m&&(0,b.jsxs)("button",{onClick:()=>n({stage:m}),style:{...L,marginTop:8},children:["Set to ",p(m)]}),(0,b.jsxs)("div",{style:{marginTop:10,display:"flex",gap:6,flexWrap:"wrap",alignItems:"center"},children:[r.map(a=>(0,b.jsxs)("span",{style:{...K("rgba(255,255,255,0.08)"),fontSize:11.5,display:"inline-flex",gap:4,alignItems:"center"},children:[a,(0,b.jsx)("button",{"aria-label":`Remove ${a}`,onClick:()=>n({tags:r.filter(b=>b!==a)}),style:{background:"none",border:"none",color:"#8b9a9a",cursor:"pointer",padding:0,fontSize:12},children:"×"})]},a)),(0,b.jsx)("input",{value:h,onChange:a=>i(a.target.value),onKeyDown:a=>{"Enter"===a.key&&(a.preventDefault(),t())},onBlur:t,placeholder:"Add a tag","aria-label":"Add a tag",style:{...M,padding:"3px 8px",fontSize:12,width:120}})]}),(0,b.jsx)("textarea",{value:f,onChange:a=>{var b;g(b=a.target.value),clearTimeout(l.current),l.current=setTimeout(()=>n({notes:b}),800)},onBlur:function(){clearTimeout(l.current),f!==(e.notes||"")&&n({notes:f})},placeholder:"Your notes on them: kept on this computer only","aria-label":"Notes",rows:4,style:{...M,width:"100%",marginTop:10,resize:"vertical",fontFamily:"inherit",lineHeight:1.45,boxSizing:"border-box"}}),(0,b.jsx)("div",{style:{fontSize:11,color:j&&"Saved"!==j&&"Saving…"!==j?"#ff9b9b":"#778",marginTop:4,minHeight:14},children:j||""})]})}function X({g:a,contacts:c,nameOf:d,keep:e,token:f,onPick:g}){let h=H(a.threadUrl);return(0,b.jsxs)("div",{style:{fontSize:13},children:[(0,b.jsxs)("div",{style:{display:"flex",gap:8,alignItems:"center",flexWrap:"wrap"},children:[(0,b.jsx)("h3",{style:{margin:0,fontSize:17},children:S(a,d)}),(0,b.jsx)("span",{style:K("rgba(255,255,255,0.08)"),children:a.unknown?"To someone unnamed":"Group"}),a.unread>0&&(0,b.jsxs)("span",{style:K("#3498DB","#fff"),children:[a.unread," unread"]})]}),(0,b.jsx)("div",{style:{color:"#8b9a9a",marginTop:4,fontSize:12.5},children:[a.last?`Last active ${F(a.last)}`:null,null!=a.count?I(a.count,"message"):null].filter(Boolean).join(" · ")}),h&&(0,b.jsx)("a",{href:h,target:"_blank",rel:"noreferrer",style:{color:"#3498DB",textDecoration:"none",fontSize:12.5,display:"inline-block",marginTop:6},children:"Conversation on LinkedIn ↗"}),a.people.length>0&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("div",{style:U,children:"Who’s in it"}),(0,b.jsx)("div",{style:{display:"flex",flexWrap:"wrap",gap:6},children:a.people.map(a=>{let e=c.get(a);return(0,b.jsxs)("button",{onClick:()=>g(a),style:{...L,display:"inline-flex",gap:6,alignItems:"center"},children:[(0,b.jsx)(P,{tier:e?.row?.tier}),d(a)||a.split("/").pop(),e&&!e.connection&&(0,b.jsx)("span",{style:{color:"#ffc58a",fontSize:10.5},children:"not a connection"})]},a)})})]}),(0,b.jsx)("div",{style:U,children:"Messages"}),(0,b.jsx)("div",{style:{border:m.LINE,borderRadius:6,overflow:"hidden"},children:(0,b.jsx)(C,{id:a.id,keep:e,group:!0,token:f},`${a.id}:${f}:${e}`)})]})}let Y={warm:["Warm","#ff9f43"],cool:["Cool","#3498DB"],dormant:["Dormant","#8899aa"],never:["Never messaged","#556"]},Z={"connections.csv":"first name","messages.csv":"conversation id","invitations.csv":"direction","positions.csv":"company name","shares.csv":"date"},$=a=>a?new Date(a).toLocaleDateString(void 0,{day:"numeric",month:"short",year:"numeric"}):"";async function _(a){let b=[],c={},d=0;for(let e of a)for(let a of e.messages){let f=JSON.stringify(a).length+2;d+f>25e5&&d>0&&(b.push(c),c={},d=0),c[e.id]||(c[e.id]={title:e.title||"",messages:[]},d+=e.id.length+(e.title||"").length+40),c[e.id].messages.push(a),d+=f}b.push(c);for(let a=0;a<b.length;a++){let c=await fetch("/api/social/messages",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({part:a,parts:b.length,threads:b[a]})});if(!c.ok)throw Error((await c.json().catch(()=>({}))).error||"The messages couldn’t be saved.")}}async function aa(a){let b={};for(let c of a)c.note&&(b[c.id]=c.note);let c=await fetch("/api/social/messages",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({invites:b})});if(!c.ok)throw Error((await c.json().catch(()=>({}))).error||"The requests’ notes couldn’t be saved.")}function ab({embedded:a=!1}){let{userId:d}=(0,g.useUser)(),[e,o]=(0,c.useState)(void 0),[p,q]=(0,c.useState)(null),[r,s]=(0,c.useState)(!1),[t,u]=(0,c.useState)(null),[v,w]=(0,c.useState)(!1),[x,y]=(0,c.useState)(()=>(0,l.scannerNow)()),[z,A]=(0,c.useState)(!1),[B,C]=(0,c.useState)(0),[D,E]=(0,c.useState)(0),F=(0,c.useRef)(null),G=(0,c.useRef)(null),H=e?.keepMessages===!0,I=()=>fetch("/api/social").then(a=>a.json()).then(a=>o(a.social||null)).catch(()=>o(null)).finally(()=>C(a=>a+1));async function J(a){w(!0),u(null);try{let b={};for(let c of Array.from(a||[])){let a=c.name.toLowerCase();Z[a]&&!b[a]&&(b[a]=(0,i.readTable)(await c.text(),Z[a]))}if(!Object.keys(b).length)throw Error("That folder doesn’t have LinkedIn’s export files in it (Connections.csv, messages.csv and so on).");let c=b["connections.csv"]||[],d=b["messages.csv"]?(0,i.messageStats)(b["messages.csv"]):{asOf:null,people:new Map},e=b["messages.csv"]?(0,i.buildConversations)(b["messages.csv"],{keepText:H}):null,f=b["invitations.csv"]?(0,i.buildInvitations)(b["invitations.csv"],{keepText:H}):null;F.current=b["messages.csv"]||null,G.current=b["invitations.csv"]||null;let g={};for(let[a,b]of d.people)g[a]={last:b.last,lastFromThem:b.lastFromThem,total:b.total,recent:b.recent};if(r)for(let a of c){let b=a["email address"];if(!b)continue;let c=(0,k.keyFor)({profile_url:a.url});g[c]={...g[c]||{},email:b}}let h=d.asOf||Date.now(),j={asOf:h,people:g,conversations:e?e.conversations.map(i.conversationSummary):[],chapters:(0,i.careerChapters)(b["positions.csv"]||[],c,h),posts:b["shares.csv"]?(0,i.postingEffect)(b["shares.csv"],c):null,invites:b["invitations.csv"]?(0,i.invitationSplit)(b["invitations.csv"]):null,invitations:(f||[]).map(({note:a,...b})=>b),names:e?e.names:{},emails:r},l=await fetch("/api/social",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(j)});if(!l.ok)throw Error((await l.json().catch(()=>({}))).error||"It couldn’t be saved.");e&&H&&await _(e.conversations),f&&H&&await aa(f);let m=e?[e.drafts?`${e.drafts.toLocaleString()} unsent ${1===e.drafts?"draft":"drafts"} left out`:"",e.skipped?`${e.skipped.toLocaleString()} ${1===e.skipped?"row":"rows"} with no conversation or date left out`:""].filter(Boolean):[];u({good:!0,text:`Read ${Object.keys(b).length} of LinkedIn’s files: ${d.people.size.toLocaleString()} people you’ve messaged one to one`+(e?`, ${e.conversations.length.toLocaleString()} conversations${H?", their messages kept on this computer":""}`:"")+(f?`, ${f.length.toLocaleString()} connection requests`:"")+`.${m.length?` (${m.join("; ")}.)`:""}`}),await I()}catch(a){u({good:!1,text:a.message})}finally{w(!1)}}async function K(a=!1){u(null);try{let b=await (0,l.runScrape)(a?"messages-full":"messages");u(b?.exitCode===0?{good:!0,text:a?"Your whole messages history is read.":"Your messages list is read."}:{good:!1,text:"The sync stopped before it finished. The Scan page has the log."}),await I()}catch(a){u({good:!1,text:a.message})}}async function L(a){await fetch("/api/social",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({autoSync:a})}),I()}async function M(a){if(a||window.confirm("Delete the messages kept on this computer? The list of conversations stays; the messages themselves are deleted.")){A(!0),u(null);try{if(a||await fetch("/api/social/messages",{method:"DELETE"}),!(await fetch("/api/social",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({keepMessages:a})})).ok)throw Error("The switch couldn’t be saved.");a&&(F.current||G.current)?(F.current&&await _((0,i.buildConversations)(F.current,{keepText:!0}).conversations),G.current&&await aa((0,i.buildInvitations)(G.current,{keepText:!0})),u({good:!0,text:"Your messages are kept on this computer now."})):a?u({good:!0,text:"On. Choose your export folder again, or sync your messages, to bring the messages in."}):u({good:!0,text:"Off. The kept messages are deleted."})}catch(a){u({good:!1,text:a.message})}finally{A(!1),I()}}}async function O(){await fetch("/api/social",{method:"DELETE"}),F.current=null,G.current=null;let a="Forgotten. Nothing from your export or messages is kept here now, the messages themselves included.";window.confirm("Also delete your CRM: the stages, tags, notes and follow-up dates you added? This can’t be undone. Cancel keeps them.")?(await fetch("/api/social/crm",{method:"DELETE"}),E(a=>a+1),a+=" Your CRM notes are deleted too."):a+=" Your CRM notes are kept.",u({good:!0,text:a}),I()}(0,c.useEffect)(()=>{I()},[]),(0,c.useEffect)(()=>(0,l.watchScanner)(()=>y((0,l.scannerNow)())),[]),(0,c.useEffect)(()=>{if(!d)return;let a=!0;return(0,h.loadNetwork)(d).then(b=>{a&&q(b)}).catch(()=>{}),()=>{a=!1}},[d]);let{merged:P,asOf:Q}=(0,c.useMemo)(()=>(0,j.mergeSocial)(e),[e]),R=(0,c.useMemo)(()=>{let a={warm:0,cool:0,dormant:0,never:0};for(let b of p?.degree1||[])a[(0,i.warmthOf)(P.get((0,k.keyFor)(b)),Q)]+=1;return a},[p,P,Q]);if(n.IS_DEMO)return(0,b.jsx)("div",{style:{minHeight:"100vh",background:"#0a0a1a",color:"#aaa",padding:40,fontFamily:m.FONT},children:"Not part of the demo."});let S=x?.running,T={padding:"12px 14px",borderRadius:8,border:m.LINE,background:"rgba(255,255,255,0.03)",marginTop:10},U={fontSize:16,margin:"24px 0 6px"};return(0,b.jsxs)("div",{style:a?{color:"#fff",fontFamily:m.FONT}:{minHeight:"100vh",background:"#0a0a1a",color:"#fff",fontFamily:m.FONT},children:[!a&&(0,b.jsxs)("header",{style:{padding:"16px 24px",borderBottom:m.LINE,display:"flex",alignItems:"center",gap:16},children:[(0,b.jsx)(f.default,{href:"/",style:{color:"#888",textDecoration:"none",fontSize:13,fontWeight:600,padding:"6px 14px",borderRadius:6,background:"rgba(255,255,255,0.06)",border:m.LINE},children:"← Back to Map"}),(0,b.jsxs)("h1",{style:{fontSize:22,fontWeight:700,margin:0,color:"#FFD700"},children:["Social ",(0,b.jsx)("span",{style:{fontSize:12,color:"#8b9a9a",fontWeight:600},children:"experimental"})]})]}),(0,b.jsxs)("main",{style:{maxWidth:1180,margin:"0 auto",padding:"8px 16px 64px"},children:[(0,b.jsxs)(m.Body,{style:{marginTop:16},children:["Everyone you’ve been in touch with on LinkedIn, connections or not: who’s waiting on you, who hasn’t answered, what you’ve sent and received, and your own notes and follow-ups on each, from your own LinkedIn data. Only dates, who wrote last, counts and names are kept on this computer, and what messages say only if you turn on ",(0,b.jsx)("i",{children:"Keep my messages"})," below."]}),(0,b.jsx)("h2",{style:U,children:"Your LinkedIn export"}),(0,b.jsxs)("div",{style:T,children:[(0,b.jsxs)(m.Body,{style:{margin:0},children:["On LinkedIn: ",(0,b.jsx)("i",{children:"Settings → Data privacy → Get a copy of your data"}),", pick the larger archive, and unzip the file it emails you. Then choose that folder here. It’s read in this window; nothing goes to LinkedIn."]}),(0,b.jsxs)("label",{style:{display:"flex",gap:8,alignItems:"flex-start",fontSize:12.5,color:"#b8c4c4",marginTop:10},children:[(0,b.jsx)("input",{type:"checkbox",checked:r,onChange:a=>s(a.target.checked),style:{marginTop:3}}),(0,b.jsx)("span",{children:"Also keep email addresses from it, on this computer only, for one-click email."})]}),(0,b.jsxs)("div",{style:{marginTop:10,display:"flex",gap:10,alignItems:"center",flexWrap:"wrap"},children:[(0,b.jsxs)("label",{style:{padding:"7px 14px",borderRadius:8,background:"rgba(52,152,219,0.18)",color:"#cfe6f7",cursor:v?"default":"pointer",fontSize:13},children:[v?"Reading…":e?"Choose a newer export":"Choose the export folder",(0,b.jsx)("input",{type:"file",webkitdirectory:"",directory:"",multiple:!0,disabled:v,style:{display:"none"},onChange:a=>J(a.target.files)})]}),e&&(0,b.jsxs)("span",{style:{fontSize:12,color:"#8b9a9a"},children:["From an export up to ",$(e.asOf),e.liveAt?` \xb7 messages synced ${$(Date.parse(e.liveAt))}`:""]}),e&&(0,b.jsx)("button",{onClick:O,style:{background:"none",border:"none",color:"#ff9b9b",cursor:"pointer",fontSize:12},children:"Forget it"})]})]}),(0,b.jsxs)("h2",{style:U,children:["Live messages sync ",(0,b.jsx)("span",{style:{fontSize:11,color:"#FFD700"},children:"experimental"})]}),(0,b.jsxs)("div",{style:T,children:[(0,b.jsxs)(m.Body,{style:{margin:0},children:["Reads your messages list once, in your own Chrome: who each conversation is with, connections or not, when it was last active, whether it’s unread and who wrote last. It uses no search budget and opens no conversation. The newest message’s words are kept only if ",(0,b.jsx)("i",{children:"Keep my messages"})," is on. The daily sync reads the top of the list; ",(0,b.jsx)("i",{children:"Read my whole history"})," keeps scrolling until no more conversations load (at most 60 scrolls, about 1,000 conversations), at the same slow, fixed pace, so it takes a few minutes."]}),(0,b.jsxs)("div",{style:{marginTop:10,display:"flex",gap:12,alignItems:"center",flexWrap:"wrap"},children:[(0,b.jsx)("button",{onClick:()=>K(!1),disabled:S,style:{padding:"7px 14px",borderRadius:8,border:"none",background:S?"#333":"rgba(0,255,136,0.15)",color:S?"#777":"#00ff88",cursor:S?"default":"pointer",fontSize:13},children:S?"The scanner is busy":"Sync messages now"}),(0,b.jsx)("button",{onClick:()=>K(!0),disabled:S,style:{padding:"7px 14px",borderRadius:8,border:m.LINE,background:"none",color:S?"#777":"#cfe6f7",cursor:S?"default":"pointer",fontSize:13},children:"Read my whole history"}),(0,b.jsxs)("label",{style:{display:"flex",gap:6,alignItems:"center",fontSize:12.5,color:"#b8c4c4"},children:[(0,b.jsx)("input",{type:"checkbox",checked:e?.autoSync===!0,onChange:a=>L(a.target.checked)}),"Once a day while the app is open (daytime only)"]})]})]}),t&&(0,b.jsx)("div",{style:{marginTop:10,fontSize:13,color:t.good?"#00ff88":"#ff9b9b"},children:t.text}),(0,b.jsx)("h2",{style:U,children:"People"}),(0,b.jsx)(N,{net:p,asOf:e?Q:null,keep:H,onKeep:M,switching:z||v,token:B,crmToken:D}),e&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("h2",{style:U,children:"Warmth"}),(0,b.jsx)("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(160px, 1fr))",gap:10},children:Object.entries(Y).map(([a,[c,d]])=>(0,b.jsxs)("div",{style:{...T,marginTop:0},children:[(0,b.jsx)("div",{style:{fontSize:22,fontWeight:700,color:d},children:(R[a]||0).toLocaleString()}),(0,b.jsx)("div",{style:{fontSize:12.5,color:"#b8c4c4"},children:c})]},a))}),(0,b.jsx)("div",{style:{fontSize:11.5,color:"#778",marginTop:6},children:"Of your connections. Warm: messaged in the last 30 days, or 3+ messages in 90. Cool: within a year. Dormant: longer ago."}),e.chapters?.length>0&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("h2",{style:U,children:"Career chapters"}),(0,b.jsx)("div",{style:{...T,padding:0},children:e.chapters.map(a=>{let c=(a.people||[]).filter(a=>["warm","cool"].includes((0,i.warmthOf)(P.get((0,k.keyFor)({profile_url:a})),Q))).length;return(0,b.jsxs)("div",{style:{display:"flex",gap:10,padding:"8px 14px",borderBottom:"1px solid rgba(255,255,255,0.04)",fontSize:13,alignItems:"baseline"},children:[(0,b.jsxs)("span",{style:{flex:1},children:[(0,b.jsx)("b",{children:a.company})," ",(0,b.jsxs)("span",{style:{color:"#8b9a9a"},children:[a.title," · ",new Date(a.from).getFullYear(),"–",a.to?new Date(a.to).getFullYear():"now"]})]}),(0,b.jsxs)("span",{style:{color:"#b8c4c4"},children:[a.made.toLocaleString()," connections made"]}),(0,b.jsx)("span",{style:{color:"#ff9f43",minWidth:90,textAlign:"right"},children:a.made?`${Math.round(100*c/a.made)}% still in touch`:""})]},`${a.company}-${a.from}`)})})]}),e.posts?.posts?.length>0&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("h2",{style:U,children:"Does posting work?"}),(0,b.jsxs)("div",{style:T,children:[(0,b.jsxs)("div",{style:{fontSize:13},children:["In the week after a post you made ",(0,b.jsx)("b",{children:e.posts.afterPosts.toFixed(1)})," new connections on average; a usual week, ",(0,b.jsx)("b",{children:e.posts.usualWeek.toFixed(1)}),"."]}),(0,b.jsx)("div",{style:{fontSize:11.5,color:"#778",marginTop:4},children:"What came after a post, not proof it came from it."}),[...e.posts.posts].sort((a,b)=>b.week-a.week).slice(0,3).map(a=>(0,b.jsxs)("div",{style:{fontSize:12.5,color:"#b8c4c4",marginTop:6},children:[$(a.t),": ",a.week," new connections that week ",a.link?(0,b.jsx)("a",{href:a.link,target:"_blank",rel:"noreferrer",style:{color:"#3498DB",textDecoration:"none"},children:"Post ↗"}):null]},a.t))]})]}),e.invites?.total>0&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("h2",{style:U,children:"Who reaches out"}),(0,b.jsx)("div",{style:T,children:(0,b.jsxs)("span",{style:{fontSize:13},children:[e.invites.incoming.toLocaleString()," requests came to you and you sent ",e.invites.outgoing.toLocaleString()," ","(",Math.round(100*e.invites.incoming/e.invites.total),"% came to you), as far as your export shows."]})})]})]})]})]})}var ac=a.i(63033),ad=a.i(91443);let ae={S:25,A:15,B:10,C:5,D:2},af={S:100,A:60,B:35,C:15,D:5};var ag=a.i(76939),ah=a.i(56377);let ai={S:"#FFD700",A:"#9B59B6",B:"#3498DB",C:"#95A5A6",D:"#BDC3C7"},aj="1px solid rgba(255,255,255,0.1)";function ak({person:a,size:c=36,ring:d}){let e=ai[a?.tier]||"#667";return(0,b.jsxs)("div",{style:{position:"relative",width:c,height:c,flexShrink:0},children:[(0,b.jsx)("div",{style:{width:c,height:c,borderRadius:"50%",background:e,color:a?.tier==="S"?"#000":"#fff",display:"flex",alignItems:"center",justifyContent:"center",fontSize:.34*c,fontWeight:800,border:`2px solid ${d||e}`},children:(0,ag.initialsFor)(a?.name||"?")}),(0,ah.localPhoto)(a?.profile_image_url)&&(0,b.jsx)("img",{src:(0,ah.localPhoto)(a.profile_image_url),alt:"",onError:a=>{a.currentTarget.style.display="none"},style:{position:"absolute",inset:0,width:c,height:c,borderRadius:"50%",objectFit:"cover",border:`2px solid ${d||e}`}})]})}function al({progress:a,size:c=86,color:d="#FF6B35",children:e}){let f=c/2-5,g=2*Math.PI*f;return(0,b.jsxs)("div",{style:{position:"relative",width:c,height:c},children:[(0,b.jsxs)("svg",{width:c,height:c,style:{position:"absolute",inset:0,transform:"rotate(-90deg)"},children:[(0,b.jsx)("circle",{cx:c/2,cy:c/2,r:f,fill:"none",stroke:"rgba(255,255,255,0.08)",strokeWidth:5}),(0,b.jsx)("circle",{cx:c/2,cy:c/2,r:f,fill:"none",stroke:d,strokeWidth:5,strokeLinecap:"round",strokeDasharray:`${g*Math.min(1,a)} ${g}`,style:{transition:"stroke-dasharray 0.5s ease"}})]}),(0,b.jsx)("div",{style:{position:"absolute",inset:9,display:"flex",alignItems:"center",justifyContent:"center"},children:e})]})}function am({recs:a,sentIds:d,added:e,mappedIds:g,reach:h,onSend:i,onUndo:j}){let k=(0,c.useMemo)(()=>(function({recs:a=[],sentIds:b=new Set,added:c=[],mappedIds:d=new Set,reach:e=null}){var f;let g,h,i,j=new Map,k=new Set;for(let b of[...a].sort((a,b)=>(b.priority||0)-(a.priority||0))){if(!b.bridge)continue;let a=`${b.bridge.id}|${b.profile_url||b.id}`;if(k.has(a))continue;k.add(a);let c=j.get(b.bridge.id);c||(c={bridge:b.bridge,people:[]},j.set(b.bridge.id,c)),c.people.push(b)}let l=new Map;for(let a of c){let b=a.unlocked_from_bridge_id;b&&l.set(b,[...l.get(b)||[],a])}let m=[],n=0,o=0;for(let{bridge:a,people:c}of j.values()){let d=c.filter(a=>b.has(a.id)),e=l.get(a.id)||[];o+=d.length,n+=d.reduce((a,b)=>a+(ae[b.tier]||2),0),n+=e.reduce((a,b)=>a+(af[b.tier]||5),0);let f=Math.ceil(c.length/5)||1,g=0;for(;g<f-1&&c.slice(5*g,(g+1)*5).every(a=>b.has(a.id));)g++;let h=c.slice(5*g,(g+1)*5),i=h.filter(a=>b.has(a.id)).length,j=i===h.length&&g===f-1;m.push({bridge:a,people:c,stage:g+1,stages:f,targets:h,done:i,progress:h.length?i/h.length:1,complete:j,sent:d.length,added:e,value:h.filter(a=>!b.has(a.id)).reduce((a,b)=>a+(b.priority||0),0),open:{S:h.filter(a=>"S"===a.tier&&!b.has(a.id)).length,A:h.filter(a=>"A"===a.tier&&!b.has(a.id)).length}})}m.sort((a,b)=>a.complete-b.complete||(b.progress>0&&b.progress<1)-(a.progress>0&&a.progress<1)||b.progress-a.progress||b.value-a.value);let p=m.filter(a=>!a.complete).flatMap(a=>a.targets.filter(a=>!b.has(a.id)).map(b=>({person:b,cluster:a,score:(b.priority||0)*(1+.6*a.progress)}))).sort((a,b)=>b.score-a.score),q=new Set,r=[];for(let a of p){let b=a.person.profile_url||a.person.id;if(!q.has(b)&&(q.add(b),r.push(a),3===r.length))break}let s=c.filter(a=>a.unlocked_from_bridge_id).length;return{clusters:m,nextMoves:r,points:n,level:(h=((g=Math.floor(Math.sqrt(Math.max(0,f=n)/40))+1)-1)**2*40,i=g**2*40,{level:g,floor:h,next:i,progress:(f-h)/(i-h)}),sentTotal:o,addedTotal:s,newDoors:c.filter(a=>a.unlocked_from_bridge_id&&"todo"===(0,ad.circleState)(a,e||{scanned:d,hidden:new Set})),clearedStages:m.reduce((a,b)=>a+(b.stage-1)+ +!!b.complete,0)}})({recs:a,sentIds:d,added:e,mappedIds:g,reach:h}),[a,d,e,g,h]),[l,m]=(0,c.useState)(null),[n,o]=(0,c.useState)(null),{level:p}=k;async function q(a,b){await i(a);let c=b.done+1,d=String(b.bridge.name||"").split(/[\s,]+/)[0];o(c>=b.targets.length?`+${ae[a.tier]||2} \xb7 Stage ${b.stage} of ${d}'s circle cleared — the next 5 are up`:`+${ae[a.tier]||2} \xb7 ${d}'s circle ${c}/${b.targets.length}`),setTimeout(()=>o(null),3500)}let r=k.clusters.find(a=>a.bridge.id===l);return(0,b.jsxs)("div",{style:{maxWidth:1100,margin:"0 auto",padding:"16px 20px 60px"},children:[(0,b.jsxs)("div",{style:{display:"flex",gap:16,alignItems:"center",flexWrap:"wrap",padding:16,borderRadius:12,border:aj,background:"linear-gradient(135deg, rgba(255,107,53,0.10), rgba(155,89,182,0.08))"},children:[(0,b.jsxs)("div",{style:{width:64,height:64,borderRadius:16,background:"linear-gradient(135deg, #FFD700, #FF6B35)",color:"#000",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:[(0,b.jsx)("div",{style:{fontSize:10,fontWeight:800},children:"LEVEL"}),(0,b.jsx)("div",{style:{fontSize:26,fontWeight:900,lineHeight:1},children:p.level})]}),(0,b.jsxs)("div",{style:{flex:1,minWidth:220},children:[(0,b.jsxs)("div",{style:{fontSize:13,color:"#dfe6e9"},children:[(0,b.jsx)("b",{children:k.points})," points · ",(0,b.jsx)("b",{children:p.next-k.points})," to level ",p.level+1]}),(0,b.jsx)("div",{style:{height:8,borderRadius:4,background:"rgba(255,255,255,0.08)",marginTop:6,overflow:"hidden"},children:(0,b.jsx)("div",{style:{height:"100%",width:`${Math.round(100*p.progress)}%`,background:"linear-gradient(90deg, #FFD700, #FF6B35)",transition:"width 0.5s"}})}),(0,b.jsx)("div",{style:{fontSize:11.5,color:"#8b9a9a",marginTop:6},children:"Points come from invites you send and people who accept — not from browsing."})]}),[[k.sentTotal,"invites sent"],[k.addedTotal,"people added"],[k.clearedStages,"stages cleared"]].map(([a,c])=>(0,b.jsxs)("div",{style:{textAlign:"center",minWidth:80},children:[(0,b.jsx)("div",{style:{fontSize:24,fontWeight:900},children:a}),(0,b.jsx)("div",{style:{fontSize:11,color:"#8b9a9a"},children:c})]},c))]}),k.newDoors.length>0&&(0,b.jsxs)("div",{style:{marginTop:12,padding:"10px 14px",borderRadius:10,border:"1px solid rgba(0,255,136,0.3)",background:"rgba(0,255,136,0.06)",fontSize:13},children:["🚪 ",(0,b.jsxs)("b",{children:[k.newDoors.length," new ",1===k.newDoors.length?"door":"doors",":"]})," people you added through a circle, whose own circle isn’t mapped yet. That’s the next degree. ",(0,b.jsx)(f.default,{href:"/setup",style:{color:"#00ff88"},children:"Map them on the Scan page →"})]}),k.nextMoves.length>0&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("h3",{style:{margin:"22px 0 10px",fontSize:15},children:"Next best moves"}),(0,b.jsx)("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(300px, 1fr))",gap:12},children:k.nextMoves.map(({person:a,cluster:c},d)=>(0,b.jsxs)("div",{style:{padding:14,borderRadius:12,border:`1px solid ${ai[a.tier]}55`,background:"rgba(255,255,255,0.03)",position:"relative"},children:[(0,b.jsxs)("div",{style:{position:"absolute",top:10,right:12,fontSize:11,fontWeight:800,color:"#FF6B35"},children:["#",d+1]}),(0,b.jsxs)("div",{style:{display:"flex",gap:10,alignItems:"center"},children:[(0,b.jsx)(ak,{person:a,size:44}),(0,b.jsxs)("div",{style:{minWidth:0},children:[(0,b.jsx)("div",{style:{fontWeight:700,fontSize:14},children:a.name}),(0,b.jsx)("div",{style:{fontSize:11.5,color:"#8b9a9a",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",maxWidth:220},children:a.headline})]})]}),(0,b.jsxs)("div",{style:{fontSize:11.5,color:"#aab7b7",margin:"10px 0"},children:["via ",(0,b.jsx)("b",{style:{color:ai[c.bridge.tier]},children:c.bridge.name})," · their circle ",c.done,"/",c.targets.length," this stage"]}),(0,b.jsxs)("div",{style:{display:"flex",gap:8},children:[a.profile_url&&(0,b.jsx)("a",{href:a.profile_url,target:"_blank",rel:"noopener noreferrer",style:ao,children:"Open on LinkedIn"}),(0,b.jsxs)("button",{onClick:()=>q(a,c),style:an,children:["I sent an invite · +",ae[a.tier]||2]})]})]},a.id))})]}),(0,b.jsx)("h3",{style:{margin:"26px 0 4px",fontSize:15},children:"Circles to work through"}),(0,b.jsxs)("div",{style:{fontSize:12,color:"#8b9a9a",marginBottom:12},children:["Each is one of your connections and the best people they know, ",5," at a time. Fill the ring to clear a stage."]}),(0,b.jsx)("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(190px, 1fr))",gap:12},children:k.clusters.map(a=>{let c=l===a.bridge.id;return(0,b.jsxs)("button",{onClick:()=>m(c?null:a.bridge.id),style:{padding:12,borderRadius:12,cursor:"pointer",textAlign:"center",color:"#fff",border:c?"1px solid #FF6B35":aj,background:a.complete?"rgba(0,255,136,0.06)":"rgba(255,255,255,0.03)",display:"flex",flexDirection:"column",alignItems:"center",gap:6},children:[(0,b.jsx)(al,{progress:a.progress,color:a.complete?"#00ff88":"#FF6B35",children:(0,b.jsx)(ak,{person:a.bridge,size:60})}),(0,b.jsx)("div",{style:{fontWeight:700,fontSize:13,maxWidth:170,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:a.bridge.name}),(0,b.jsx)("div",{style:{fontSize:11,color:a.complete?"#00ff88":"#aab7b7"},children:a.complete?"Circle cleared":`Stage ${a.stage} of ${a.stages} \xb7 ${a.done}/${a.targets.length}`}),(0,b.jsx)("div",{style:{display:"flex",gap:4},children:a.targets.map(a=>(0,b.jsx)("span",{title:a.name,style:{width:12,height:12,borderRadius:"50%",border:`2px solid ${ai[a.tier]||"#667"}`,background:d.has(a.id)?ai[a.tier]||"#667":"transparent"}},a.id))}),(0,b.jsxs)("div",{style:{fontSize:10.5,color:"#778"},children:[a.open.S?`${a.open.S} S \xb7 `:"",a.open.A?`${a.open.A} A \xb7 `:"",a.people.length," worth adding",a.added.length?` \xb7 ★ ${a.added.length} added`:""]})]},a.bridge.id)})}),r&&(0,b.jsxs)("div",{style:{marginTop:14,padding:16,borderRadius:12,border:"1px solid rgba(255,107,53,0.4)",background:"rgba(255,107,53,0.05)"},children:[(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10,marginBottom:10},children:[(0,b.jsx)(ak,{person:r.bridge,size:40}),(0,b.jsxs)("div",{children:[(0,b.jsxs)("div",{style:{fontWeight:800},children:[r.bridge.name,"’s circle · stage ",r.stage," of ",r.stages]}),(0,b.jsxs)("div",{style:{fontSize:12,color:"#aab7b7"},children:["Ask ",r.bridge.name?.split(" ")[0]," for an intro, or invite them directly. Mark each one when it’s sent."]})]})]}),r.targets.map(a=>{let c=d.has(a.id);return(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10,padding:"8px 0",borderTop:"1px solid rgba(255,255,255,0.05)"},children:[(0,b.jsx)(ak,{person:a,size:34,ring:c?"#00ff88":void 0}),(0,b.jsxs)("div",{style:{flex:1,minWidth:0},children:[(0,b.jsxs)("div",{style:{fontWeight:600,fontSize:13},children:[a.name," ",(0,b.jsx)("span",{style:{color:ai[a.tier],fontSize:11},children:a.tier})]}),(0,b.jsx)("div",{style:{fontSize:11.5,color:"#8b9a9a",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:a.headline})]}),a.profile_url&&(0,b.jsx)("a",{href:a.profile_url,target:"_blank",rel:"noopener noreferrer",style:ao,children:"LinkedIn"}),c?(0,b.jsx)("button",{onClick:()=>j(a),style:{...ao,color:"#00ff88"},children:"Sent ✓ (undo)"}):(0,b.jsxs)("button",{onClick:()=>q(a,r),style:an,children:["Sent · +",ae[a.tier]||2]})]},a.id)}),r.added.length>0&&(0,b.jsxs)("div",{style:{marginTop:10,fontSize:12,color:"#00ff88"},children:["★ Added from this circle: ",r.added.map(a=>a.name).join(", ")]})]}),n&&(0,b.jsx)("div",{role:"status",style:{position:"fixed",bottom:24,left:"50%",transform:"translateX(-50%)",padding:"10px 18px",borderRadius:24,background:"linear-gradient(135deg, #FFD700, #FF6B35)",color:"#000",fontWeight:800,fontSize:13,boxShadow:"0 8px 30px rgba(0,0,0,0.5)",zIndex:50},children:n})]})}let an={padding:"7px 12px",borderRadius:8,border:"none",cursor:"pointer",fontWeight:800,fontSize:12,background:"linear-gradient(135deg, #FF6B35, #FFD700)",color:"#000"},ao={padding:"7px 12px",borderRadius:8,border:aj,cursor:"pointer",fontWeight:600,fontSize:12,background:"rgba(255,255,255,0.05)",color:"#dfe6e9",textDecoration:"none"};var ap=a.i(36839),aq=a.i(30889),ar=a.i(76892),as=a.i(24475);let at={S:"#FFD700",A:"#9B59B6",B:"#3498DB",C:"#95A5A6",D:"#BDC3C7"},au=["quest","recs","pending","messages"];function av(){let{userId:a,userProfile:i}=(0,g.useUser)(),j=i?.sectors||[],[m,o]=(0,c.useState)([]),[p,q]=(0,c.useState)(!0),[r,s]=(0,c.useState)("all"),[t,u]=(0,c.useState)(new Set),v=(0,ar.default)(),[w,x]=(0,c.useState)([]),[y,z]=(0,c.useState)({}),A=(0,d.useSearchParams)().get("view"),[B,C]=(0,c.useState)(()=>au.includes(A)?A:"quest"),[D,E]=(0,c.useState)([]),[F,G]=(0,c.useState)(()=>new Set),[H,I]=(0,c.useState)(null),[J,K]=(0,c.useState)(null),[L,M]=(0,c.useState)(()=>"bridge");(0,c.useEffect)(()=>{},[]),(0,c.useEffect)(()=>{!n.IS_DEMO&&a&&b();async function b(){let[b,c,d]=await Promise.all([(0,h.loadNetwork)(a),fetch(`/api/outreach?userId=${a}`).then(a=>a.json()).catch(()=>({pending:[]})),(0,l.loadScanNotes)()]),e=b.degree1,f=b.degree2;E(e.filter(a=>a.unlocked_from_bridge_id)),G(new Set(f.map(a=>a.source_connection_id).filter(Boolean))),I((0,ad.reachIndex)(e,f,d));let g=new Set(e.map(a=>a.profile_url)),i={};e.forEach(a=>{i[a.id]=a}),x(c.pending||[]),z(i),o(f.filter(a=>("S"===a.tier||"A"===a.tier||"B"===a.tier)&&!g.has(a.profile_url)).map(a=>{let b,c,d=i[a.source_connection_id],e=(b=parseFloat(a.power_score)||0,c=(a.headline||"").toLowerCase(),(0,aq.rowCompanyScore)(a)>=aq.TOP_COMPANY&&(b+=1),(j||[]).forEach(a=>{c.includes(a.toLowerCase())&&(b+=.5)}),"S"===a.tier?b*=1.5:"A"===a.tier&&(b*=1.2),b),f="S"===a.tier?50:"A"===a.tier?25:10;return{...a,bridge:d,priority:e,xp:f}}).sort((a,b)=>b.priority-a.priority)),q(!1)}},[a]);let N=(0,c.useMemo)(()=>new Set([...w,...m].filter(a=>(0,as.hasRequest)(a,v)).map(a=>a.id)),[w,m,v]),O=(0,c.useMemo)(()=>{let a=new Set,b=[];for(let c of[...w,...m]){let d=(0,k.keyFor)(c);!a.has(d)&&(0,as.hasRequest)(c,v)&&(a.add(d),b.push({...c,bridge:y[c.source_connection_id]||c.bridge||null}))}return b},[w,m,v,y]);if((0,c.useEffect)(()=>((0,ac.setNotchTabs)({items:[{key:"quest",label:"Circles"},{key:"recs",label:`To add (${m.length})`},{key:"pending",label:`Pending (${O.length})`},{key:"messages",label:"Messages & follow-ups"}],current:B,onPick:C}),()=>(0,ac.setNotchTabs)(null)),[B,m.length,O.length]),n.IS_DEMO)return(0,b.jsxs)("div",{style:{minHeight:"100vh",background:"#0a0a1a",color:"rgba(255,255,255,0.7)",fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:10,textAlign:"center",padding:24},children:[(0,b.jsx)("h2",{style:{margin:0,fontSize:18,fontWeight:700,color:"#fff"},children:"Not part of the demo"}),(0,b.jsx)("div",{style:{fontSize:13},children:"The public demo includes the Network Circle and Degrees views only."}),(0,b.jsx)(f.default,{href:"/",style:{fontSize:12,color:"rgba(255,255,255,0.5)",textDecoration:"none"},children:"← Back to the network"})]});let P="all"===r?m:m.filter(a=>a.tier===r);J&&(P=P.filter(a=>a.bridge?.id===J));let Q={S:0,A:0,B:0};m.forEach(a=>{void 0!==Q[a.tier]&&Q[a.tier]++});let R={};P.forEach(a=>{let b;R[b="bridge"===L?a.bridge?.id||"unknown":"company"===L?(a.company||"Unknown").trim()||"Unknown":a.tier]||(R[b]=[]),R[b].push(a)});let S={S:0,A:1,B:2},T=Object.entries(R).sort((a,b)=>{if("tier"===L)return(S[a[0]]||9)-(S[b[0]]||9);if("bridge"===L){let c=a[1][0]?.bridge,d=b[1][0]?.bridge,e=S[c?.tier]??9,f=S[d?.tier]??9;if(e!==f)return e-f}return b[1].length-a[1].length});function U(a){u(b=>{let c=new Set(b);return c.has(a)?c.delete(a):c.add(a),c})}return p?(0,b.jsx)("div",{style:{minHeight:"100vh",display:"flex",alignItems:"center",justifyContent:"center",background:"#0a0a1a",color:"#fff"},children:"Loading..."}):(0,b.jsxs)("div",{style:{height:"100vh",background:"#0a0a1a",color:"#fff",fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',display:"flex",flexDirection:"column",overflow:"hidden"},children:[(0,b.jsx)("header",{style:{padding:"20px 30px",borderBottom:"1px solid rgba(255,255,255,0.1)",flexShrink:0},children:(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:12},children:[(0,b.jsx)(f.default,{href:"/",style:{textDecoration:"none"},children:(0,b.jsx)("h1",{style:{fontSize:28,fontWeight:700,margin:0,background:"linear-gradient(135deg, #FFD700, #9B59B6, #3498DB)",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent"},children:"Six Degrees"})}),(0,b.jsx)(e.default,{active:"outlink"}),(0,b.jsx)(f.default,{href:"/settings",title:"Settings","aria-label":"Settings",style:{width:32,height:32,borderRadius:"50%",flexShrink:0,background:"rgba(255,255,255,0.06)",color:"#888",fontSize:16,textDecoration:"none",display:"flex",alignItems:"center",justifyContent:"center"},children:"⚙"})]})}),("recs"===B||"pending"===B)&&(0,b.jsxs)("div",{style:{padding:"10px 24px",borderBottom:"1px solid rgba(255,255,255,0.08)",flexShrink:0},children:[(0,b.jsx)("div",{style:{display:"flex",alignItems:"center",gap:12,marginBottom:10},children:(0,b.jsx)("div",{style:{marginLeft:"auto",display:"flex",gap:6},children:"recs"===B&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("button",{onClick:()=>M("tier"),style:{padding:"4px 10px",borderRadius:4,border:"none",fontSize:10,fontWeight:600,cursor:"pointer",background:"tier"===L?"rgba(255,255,255,0.15)":"rgba(255,255,255,0.05)",color:"tier"===L?"#fff":"#666"},children:"By Tier"}),(0,b.jsx)("button",{onClick:()=>M("bridge"),style:{padding:"4px 10px",borderRadius:4,border:"none",fontSize:10,fontWeight:600,cursor:"pointer",background:"bridge"===L?"rgba(255,255,255,0.15)":"rgba(255,255,255,0.05)",color:"bridge"===L?"#fff":"#666"},children:"By Bridge"}),(0,b.jsx)("button",{onClick:()=>M("company"),style:{padding:"4px 10px",borderRadius:4,border:"none",fontSize:10,fontWeight:600,cursor:"pointer",background:"company"===L?"rgba(255,255,255,0.15)":"rgba(255,255,255,0.05)",color:"company"===L?"#fff":"#666"},children:"By Company"})]})})}),(0,b.jsx)("div",{style:{display:"flex",gap:6},children:[{k:"all",l:`All (${m.length})`},{k:"S",l:`S (${Q.S})`,c:at.S},{k:"A",l:`A (${Q.A})`,c:at.A},{k:"B",l:`B (${Q.B})`,c:at.B}].map(a=>(0,b.jsx)("button",{onClick:()=>s(a.k),style:{padding:"4px 12px",borderRadius:16,border:"none",fontSize:11,fontWeight:600,cursor:"pointer",background:r===a.k?a.c||"#fff":"rgba(255,255,255,0.06)",color:r===a.k?"#000":a.c||"#888"},children:a.l},a.k))})]}),"messages"===B&&(0,b.jsx)("div",{style:{flex:1,overflow:"auto",padding:"40px 8px 0"},children:(0,b.jsx)(ab,{embedded:!0})}),"recs"===B&&t.size>0&&(0,b.jsxs)("div",{style:{padding:"10px 24px",background:"rgba(255,215,0,0.08)",borderBottom:"1px solid rgba(255,215,0,0.2)",display:"flex",alignItems:"center",gap:12,flexShrink:0},children:[(0,b.jsxs)("span",{style:{fontSize:12,color:"#FFD700",fontWeight:600},children:[t.size," selected"]}),(0,b.jsxs)("button",{onClick:function(){let a=P.filter(a=>t.has(a.id));if(0===a.length)return;if(1===a.length)return void window.open(a[0].profile_url,"_blank");let b=new Blob([`<!DOCTYPE html><html><head><title>Outlink — ${a.length} profiles</title>
2
3
  <style>body{background:#0a0a1a;color:#fff;font-family:-apple-system,sans-serif;padding:24px;margin:0}
3
4
  h2{color:#FFD700;margin-bottom:4px}p{color:#888;font-size:13px;margin-bottom:16px}
4
5
  .btn{display:block;padding:12px 16px;margin-bottom:6px;background:rgba(255,255,255,0.06);
@@ -12,7 +13,7 @@ module.exports=[78386,a=>{"use strict";var b=a.i(87924),c=a.i(72131),d=a.i(23310
12
13
  <button class="open-all" onclick="document.querySelectorAll('.btn').forEach((a,i)=>setTimeout(()=>a.click(),i*300))">
13
14
  Open All (${a.length})</button>
14
15
  ${a.map(a=>{let b="S"===a.tier?"#FFD700":"A"===a.tier?"#9B59B6":"#3498DB";return'<a class="btn" href="'+a.profile_url+'" target="_blank"><span class="name">'+(a.name||"")+'</span><span class="tier" style="color:'+b+'">'+a.tier+" · "+parseFloat(a.power_score||0).toFixed(1)+'</span><br><span style="color:#666;font-size:11px">'+(a.headline||"").substring(0,60)+"</span></a>"}).join("")}
15
- </body></html>`],{type:"text/html"});window.open(URL.createObjectURL(b),"_blank")},style:{padding:"6px 16px",borderRadius:6,border:"none",cursor:"pointer",background:"#0077B5",color:"#fff",fontWeight:700,fontSize:12},children:["Open ",r.size," on LinkedIn"]}),(0,b.jsxs)("span",{style:{fontSize:10,color:"#888"},children:["+",T.filter(a=>r.has(a.id)).reduce((a,b)=>a+b.xp,0)," XP potential"]}),(0,b.jsx)("button",{onClick:()=>s(new Set),style:{marginLeft:"auto",background:"none",border:"none",color:"#888",cursor:"pointer",fontSize:11},children:"Clear"})]}),"quest"===F&&(0,b.jsx)("div",{style:{flex:1,overflow:"auto"},children:(0,b.jsx)(p,{recs:j,sentIds:R,added:H,mappedIds:J,reach:L,onSend:a=>(0,w.markRequested)(a,{bridgeId:a.source_connection_id}).catch(()=>{}),onUndo:a=>(0,w.undoRequest)(a).catch(()=>{})})}),"quest"!==F&&(0,b.jsx)("div",{style:{flex:1,overflow:"auto",padding:"12px 24px"},children:(0,b.jsxs)("div",{style:{maxWidth:700,margin:"0 auto"},children:["pending"===F&&(0,b.jsx)(b.Fragment,{children:0===S.length?(0,b.jsxs)("div",{style:{textAlign:"center",padding:40,color:"#555"},children:[(0,b.jsx)("div",{style:{fontSize:32,marginBottom:8},children:"⏳"}),(0,b.jsx)("div",{style:{fontSize:14,fontWeight:600},children:"No pending requests"}),(0,b.jsx)("div",{style:{fontSize:11,color:"#444",marginTop:4},children:'Click "Add" on someone to track your outreach'})]}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("div",{style:{fontSize:10,color:"#666",marginBottom:12},children:"Waiting for response. When they accept, their cluster unlocks for bridging."}),S.map(a=>(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10,padding:"10px 12px",marginBottom:4,background:"rgba(255,107,53,0.04)",borderRadius:8,border:"1px solid rgba(255,107,53,0.1)"},children:[(0,k.localPhoto)(a.profile_image_url)?(0,b.jsx)("img",{src:(0,k.localPhoto)(a.profile_image_url),alt:"",style:{width:36,height:36,borderRadius:"50%",objectFit:"cover",flexShrink:0,border:`2px solid ${z[a.tier]||"#555"}`},onError:a=>{a.target.style.display="none"}}):(0,b.jsx)("div",{style:{width:36,height:36,borderRadius:"50%",flexShrink:0,fontSize:14,fontWeight:700,background:z[a.tier]||"#555",color:"S"===a.tier?"#000":"#fff",display:"flex",alignItems:"center",justifyContent:"center"},children:a.name?.charAt(0)}),(0,b.jsxs)("div",{style:{flex:1,minWidth:0},children:[(0,b.jsx)("div",{style:{fontSize:13,fontWeight:600},children:a.name}),(0,b.jsx)("div",{style:{fontSize:10,color:"#888",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:a.headline?.substring(0,55)}),a.bridge&&(0,b.jsxs)("div",{style:{fontSize:9,color:"#FF6B35",marginTop:2},children:["via ",a.bridge.name?.split(" ")[0]," · unlocks bridge cluster"]})]}),(0,b.jsxs)("div",{style:{textAlign:"center",flexShrink:0},children:[(0,b.jsx)("div",{style:{fontSize:10,fontWeight:800,color:z[a.tier],padding:"2px 8px",borderRadius:4,background:`${z[a.tier]||"#555"}15`},children:a.tier}),(0,b.jsx)("div",{style:{fontSize:8,color:"#FF6B35",marginTop:2,fontWeight:600},children:"PENDING"})]}),(0,b.jsxs)("div",{style:{display:"flex",gap:4,flexShrink:0},children:[(0,b.jsx)("a",{href:a.profile_url,target:"_blank",rel:"noopener noreferrer",style:{padding:"4px 8px",borderRadius:4,fontSize:9,fontWeight:700,background:"#0077B5",color:"#fff",textDecoration:"none"},children:"View"}),(0,b.jsx)("button",{onClick:()=>{(0,w.undoRequest)(a).catch(()=>{})},style:{padding:"4px 8px",borderRadius:4,fontSize:9,fontWeight:600,background:"rgba(255,255,255,0.06)",color:"#666",border:"none",cursor:"pointer"},children:"Undo"})]})]},a.id))]})}),"recs"===F&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:8},children:[(0,b.jsx)("input",{type:"checkbox",checked:r.size===T.length&&T.length>0,onChange:function(){r.size===T.length?s(new Set):s(new Set(T.map(a=>a.id)))},style:{cursor:"pointer"}}),(0,b.jsxs)("span",{style:{fontSize:10,color:"#666"},children:["Select all (",T.length,")"]})]}),X.map(([a,c])=>(0,b.jsxs)("div",{style:{marginBottom:16},children:["bridge"===P?(()=>{let a=c[0]?.bridge;if(!a)return null;let d=c.filter(a=>"S"===a.tier).length,e=c.filter(a=>"A"===a.tier).length,f=c.filter(a=>"B"===a.tier).length,g=3*d+2*e+f;return(0,b.jsxs)("div",{style:{padding:"10px 12px",marginBottom:6,borderRadius:8,background:`${z[a.tier]||"#555"}08`,border:`1px solid ${z[a.tier]||"#555"}20`},children:[(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10},children:[(0,k.localPhoto)(a.profile_image_url)?(0,b.jsx)("img",{src:(0,k.localPhoto)(a.profile_image_url),alt:"",style:{width:36,height:36,borderRadius:"50%",objectFit:"cover",border:`2px solid ${z[a.tier]}`},onError:a=>{a.target.style.display="none"}}):(0,b.jsx)("div",{style:{width:36,height:36,borderRadius:"50%",fontSize:14,fontWeight:700,background:z[a.tier],color:"S"===a.tier?"#000":"#fff",display:"flex",alignItems:"center",justifyContent:"center"},children:a.name?.charAt(0)}),(0,b.jsxs)("div",{style:{flex:1,minWidth:0},children:[(0,b.jsx)("div",{style:{fontSize:13,fontWeight:700,color:"#fff"},children:a.name}),(0,b.jsx)("div",{style:{fontSize:9,color:"#888",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:a.headline?.substring(0,50)})]}),(0,b.jsxs)("div",{style:{textAlign:"right",flexShrink:0},children:[(0,b.jsx)("div",{style:{fontSize:11,fontWeight:800,color:z[a.tier]},children:a.tier}),(0,b.jsxs)("div",{style:{fontSize:8,color:"#666"},children:[c.length," to add"]})]})]}),(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,marginTop:8},children:[(0,b.jsxs)("div",{style:{display:"flex",gap:4,fontSize:9},children:[d>0&&(0,b.jsxs)("span",{style:{color:"#FFD700",fontWeight:700},children:[d,"S"]}),e>0&&(0,b.jsxs)("span",{style:{color:"#9B59B6",fontWeight:700},children:[e,"A"]}),f>0&&(0,b.jsxs)("span",{style:{color:"#3498DB",fontWeight:700},children:[f,"B"]})]}),(0,b.jsx)("div",{style:{flex:1,height:4,background:"rgba(255,255,255,0.06)",borderRadius:2},children:(0,b.jsx)("div",{style:{height:"100%",borderRadius:2,width:`${Math.min(100,g/30*100)}%`,background:`linear-gradient(90deg, ${z[a.tier]}, #FF6B35)`}})}),(0,b.jsxs)("button",{onClick:()=>{let a=c.map(a=>a.profile_url);if(1===a.length)return void window.open(a[0],"_blank");let b=`<!DOCTYPE html><html><head><title>Top ${Math.min(10,a.length)}</title>
16
+ </body></html>`],{type:"text/html"});window.open(URL.createObjectURL(b),"_blank")},style:{padding:"6px 16px",borderRadius:6,border:"none",cursor:"pointer",background:"#0077B5",color:"#fff",fontWeight:700,fontSize:12},children:["Open ",t.size," on LinkedIn"]}),(0,b.jsxs)("span",{style:{fontSize:10,color:"#888"},children:["+",P.filter(a=>t.has(a.id)).reduce((a,b)=>a+b.xp,0)," XP potential"]}),(0,b.jsx)("button",{onClick:()=>u(new Set),style:{marginLeft:"auto",background:"none",border:"none",color:"#888",cursor:"pointer",fontSize:11},children:"Clear"})]}),"quest"===B&&(0,b.jsx)("div",{style:{flex:1,overflow:"auto"},children:(0,b.jsx)(am,{recs:m,sentIds:N,added:D,mappedIds:F,reach:H,onSend:a=>(0,as.markRequested)(a,{bridgeId:a.source_connection_id}).catch(()=>{}),onUndo:a=>(0,as.undoRequest)(a).catch(()=>{})})}),("recs"===B||"pending"===B)&&(0,b.jsx)("div",{style:{flex:1,overflow:"auto",padding:"12px 24px"},children:(0,b.jsxs)("div",{style:{maxWidth:700,margin:"0 auto"},children:["pending"===B&&(0,b.jsx)(b.Fragment,{children:0===O.length?(0,b.jsxs)("div",{style:{textAlign:"center",padding:40,color:"#555"},children:[(0,b.jsx)("div",{style:{fontSize:32,marginBottom:8},children:"⏳"}),(0,b.jsx)("div",{style:{fontSize:14,fontWeight:600},children:"No pending requests"}),(0,b.jsx)("div",{style:{fontSize:11,color:"#444",marginTop:4},children:'Click "Add" on someone to track your outreach'})]}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("div",{style:{fontSize:10,color:"#666",marginBottom:12},children:"Waiting for response. When they accept, their cluster unlocks for bridging."}),O.map(a=>(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10,padding:"10px 12px",marginBottom:4,background:"rgba(255,107,53,0.04)",borderRadius:8,border:"1px solid rgba(255,107,53,0.1)"},children:[(0,ah.localPhoto)(a.profile_image_url)?(0,b.jsx)("img",{src:(0,ah.localPhoto)(a.profile_image_url),alt:"",style:{width:36,height:36,borderRadius:"50%",objectFit:"cover",flexShrink:0,border:`2px solid ${at[a.tier]||"#555"}`},onError:a=>{a.target.style.display="none"}}):(0,b.jsx)("div",{style:{width:36,height:36,borderRadius:"50%",flexShrink:0,fontSize:14,fontWeight:700,background:at[a.tier]||"#555",color:"S"===a.tier?"#000":"#fff",display:"flex",alignItems:"center",justifyContent:"center"},children:a.name?.charAt(0)}),(0,b.jsxs)("div",{style:{flex:1,minWidth:0},children:[(0,b.jsx)("div",{style:{fontSize:13,fontWeight:600},children:a.name}),(0,b.jsx)("div",{style:{fontSize:10,color:"#888",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:a.headline?.substring(0,55)}),a.bridge&&(0,b.jsxs)("div",{style:{fontSize:9,color:"#FF6B35",marginTop:2},children:["via ",a.bridge.name?.split(" ")[0]," · unlocks bridge cluster"]})]}),(0,b.jsxs)("div",{style:{textAlign:"center",flexShrink:0},children:[(0,b.jsx)("div",{style:{fontSize:10,fontWeight:800,color:at[a.tier],padding:"2px 8px",borderRadius:4,background:`${at[a.tier]||"#555"}15`},children:a.tier}),(0,b.jsx)("div",{style:{fontSize:8,color:"#FF6B35",marginTop:2,fontWeight:600},children:"PENDING"})]}),(0,b.jsxs)("div",{style:{display:"flex",gap:4,flexShrink:0},children:[(0,b.jsx)("a",{href:a.profile_url,target:"_blank",rel:"noopener noreferrer",style:{padding:"4px 8px",borderRadius:4,fontSize:9,fontWeight:700,background:"#0077B5",color:"#fff",textDecoration:"none"},children:"View"}),(0,b.jsx)("button",{onClick:()=>{(0,as.undoRequest)(a).catch(()=>{})},style:{padding:"4px 8px",borderRadius:4,fontSize:9,fontWeight:600,background:"rgba(255,255,255,0.06)",color:"#666",border:"none",cursor:"pointer"},children:"Undo"})]})]},a.id))]})}),"recs"===B&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:8},children:[(0,b.jsx)("input",{type:"checkbox",checked:t.size===P.length&&P.length>0,onChange:function(){t.size===P.length?u(new Set):u(new Set(P.map(a=>a.id)))},style:{cursor:"pointer"}}),(0,b.jsxs)("span",{style:{fontSize:10,color:"#666"},children:["Select all (",P.length,")"]})]}),T.map(([a,c])=>(0,b.jsxs)("div",{style:{marginBottom:16},children:["bridge"===L?(()=>{let a=c[0]?.bridge;if(!a)return null;let d=c.filter(a=>"S"===a.tier).length,e=c.filter(a=>"A"===a.tier).length,f=c.filter(a=>"B"===a.tier).length,g=3*d+2*e+f;return(0,b.jsxs)("div",{style:{padding:"10px 12px",marginBottom:6,borderRadius:8,background:`${at[a.tier]||"#555"}08`,border:`1px solid ${at[a.tier]||"#555"}20`},children:[(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10},children:[(0,ah.localPhoto)(a.profile_image_url)?(0,b.jsx)("img",{src:(0,ah.localPhoto)(a.profile_image_url),alt:"",style:{width:36,height:36,borderRadius:"50%",objectFit:"cover",border:`2px solid ${at[a.tier]}`},onError:a=>{a.target.style.display="none"}}):(0,b.jsx)("div",{style:{width:36,height:36,borderRadius:"50%",fontSize:14,fontWeight:700,background:at[a.tier],color:"S"===a.tier?"#000":"#fff",display:"flex",alignItems:"center",justifyContent:"center"},children:a.name?.charAt(0)}),(0,b.jsxs)("div",{style:{flex:1,minWidth:0},children:[(0,b.jsx)("div",{style:{fontSize:13,fontWeight:700,color:"#fff"},children:a.name}),(0,b.jsx)("div",{style:{fontSize:9,color:"#888",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:a.headline?.substring(0,50)})]}),(0,b.jsxs)("div",{style:{textAlign:"right",flexShrink:0},children:[(0,b.jsx)("div",{style:{fontSize:11,fontWeight:800,color:at[a.tier]},children:a.tier}),(0,b.jsxs)("div",{style:{fontSize:8,color:"#666"},children:[c.length," to add"]})]})]}),(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,marginTop:8},children:[(0,b.jsxs)("div",{style:{display:"flex",gap:4,fontSize:9},children:[d>0&&(0,b.jsxs)("span",{style:{color:"#FFD700",fontWeight:700},children:[d,"S"]}),e>0&&(0,b.jsxs)("span",{style:{color:"#9B59B6",fontWeight:700},children:[e,"A"]}),f>0&&(0,b.jsxs)("span",{style:{color:"#3498DB",fontWeight:700},children:[f,"B"]})]}),(0,b.jsx)("div",{style:{flex:1,height:4,background:"rgba(255,255,255,0.06)",borderRadius:2},children:(0,b.jsx)("div",{style:{height:"100%",borderRadius:2,width:`${Math.min(100,g/30*100)}%`,background:`linear-gradient(90deg, ${at[a.tier]}, #FF6B35)`}})}),(0,b.jsxs)("button",{onClick:()=>{let a=c.map(a=>a.profile_url);if(1===a.length)return void window.open(a[0],"_blank");let b=`<!DOCTYPE html><html><head><title>Top ${Math.min(10,a.length)}</title>
16
17
  <style>body{background:#0a0a1a;color:#fff;font-family:-apple-system,sans-serif;padding:24px}
17
18
  .btn{display:block;padding:10px 14px;margin-bottom:4px;background:rgba(255,255,255,0.06);
18
19
  border:1px solid rgba(255,255,255,0.1);border-radius:6px;color:#fff;text-decoration:none;font-size:12px}
@@ -21,15 +22,15 @@ module.exports=[78386,a=>{"use strict";var b=a.i(87924),c=a.i(72131),d=a.i(23310
21
22
  font-weight:700;font-size:13px;cursor:pointer;border:none;margin-bottom:16px}</style></head>
22
23
  <body><h3 style="color:#FF6B35">Top ${Math.min(10,a.length)} to connect</h3>
23
24
  <button class="oa" onclick="document.querySelectorAll('.btn').forEach((a,i)=>setTimeout(()=>a.click(),i*300))">
24
- Open All</button>${a.slice(0,10).map(a=>'<a class="btn" href="'+a+'" target="_blank">'+a.split("/in/")[1]?.replace("/","")+"</a>").join("")}</body></html>`;window.open(URL.createObjectURL(new Blob([b],{type:"text/html"})),"_blank")},style:{padding:"4px 10px",borderRadius:4,border:"none",cursor:"pointer",background:"#0077B5",color:"#fff",fontSize:9,fontWeight:700,whiteSpace:"nowrap"},children:["Open Top ",Math.min(10,c.length)]})]})]})})():(0,b.jsxs)("div",{style:{padding:"6px 10px",marginBottom:4,background:"tier"===P?`${z[a]||"#555"}15`:"rgba(255,255,255,0.04)",borderLeft:`3px solid ${"tier"===P?z[a]||"#555":"#FF6B35"}`,borderRadius:4,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,b.jsx)("span",{style:{fontSize:11,fontWeight:700,color:"tier"===P?z[a]||"#888":"#FF6B35"},children:"tier"===P?`${a}-Tier`:a}),(0,b.jsx)("span",{style:{fontSize:10,color:"#666"},children:c.length})]}),"bridge"===P?["S","A","B"].map(a=>{let d=c.filter(b=>b.tier===a);return 0===d.length?null:(0,b.jsxs)("div",{style:{marginBottom:6},children:[(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:6,padding:"3px 8px",marginBottom:2,borderLeft:`2px solid ${z[a]}`},children:[(0,b.jsx)("input",{type:"checkbox",checked:d.every(a=>r.has(a.id)),onChange:()=>{let a=d.every(a=>r.has(a.id));s(b=>{let c=new Set(b);return d.forEach(b=>{a?c.delete(b.id):c.add(b.id)}),c})},style:{cursor:"pointer",flexShrink:0}}),(0,b.jsx)("div",{style:{width:6,height:6,borderRadius:"50%",background:z[a]}}),(0,b.jsxs)("span",{style:{fontSize:9,fontWeight:700,color:z[a]},children:[a,"-Tier"]}),(0,b.jsx)("span",{style:{fontSize:8,color:"#555"},children:d.length}),(0,b.jsxs)("button",{onClick:()=>{if(1===d.length)return void window.open(d[0].profile_url,"_blank");let b=`<!DOCTYPE html><html><head><title>${a}-Tier — ${d.length}</title>
25
+ Open All</button>${a.slice(0,10).map(a=>'<a class="btn" href="'+a+'" target="_blank">'+a.split("/in/")[1]?.replace("/","")+"</a>").join("")}</body></html>`;window.open(URL.createObjectURL(new Blob([b],{type:"text/html"})),"_blank")},style:{padding:"4px 10px",borderRadius:4,border:"none",cursor:"pointer",background:"#0077B5",color:"#fff",fontSize:9,fontWeight:700,whiteSpace:"nowrap"},children:["Open Top ",Math.min(10,c.length)]})]})]})})():(0,b.jsxs)("div",{style:{padding:"6px 10px",marginBottom:4,background:"tier"===L?`${at[a]||"#555"}15`:"rgba(255,255,255,0.04)",borderLeft:`3px solid ${"tier"===L?at[a]||"#555":"#FF6B35"}`,borderRadius:4,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,b.jsx)("span",{style:{fontSize:11,fontWeight:700,color:"tier"===L?at[a]||"#888":"#FF6B35"},children:"tier"===L?`${a}-Tier`:a}),(0,b.jsx)("span",{style:{fontSize:10,color:"#666"},children:c.length})]}),"bridge"===L?["S","A","B"].map(a=>{let d=c.filter(b=>b.tier===a);return 0===d.length?null:(0,b.jsxs)("div",{style:{marginBottom:6},children:[(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:6,padding:"3px 8px",marginBottom:2,borderLeft:`2px solid ${at[a]}`},children:[(0,b.jsx)("input",{type:"checkbox",checked:d.every(a=>t.has(a.id)),onChange:()=>{let a=d.every(a=>t.has(a.id));u(b=>{let c=new Set(b);return d.forEach(b=>{a?c.delete(b.id):c.add(b.id)}),c})},style:{cursor:"pointer",flexShrink:0}}),(0,b.jsx)("div",{style:{width:6,height:6,borderRadius:"50%",background:at[a]}}),(0,b.jsxs)("span",{style:{fontSize:9,fontWeight:700,color:at[a]},children:[a,"-Tier"]}),(0,b.jsx)("span",{style:{fontSize:8,color:"#555"},children:d.length}),(0,b.jsxs)("button",{onClick:()=>{if(1===d.length)return void window.open(d[0].profile_url,"_blank");let b=`<!DOCTYPE html><html><head><title>${a}-Tier — ${d.length}</title>
25
26
  <style>body{background:#0a0a1a;color:#fff;font-family:-apple-system,sans-serif;padding:24px}
26
27
  .btn{display:block;padding:10px 14px;margin-bottom:4px;background:rgba(255,255,255,0.06);
27
28
  border:1px solid rgba(255,255,255,0.1);border-radius:6px;color:#fff;text-decoration:none;font-size:12px}
28
29
  .btn:hover{background:rgba(0,119,181,0.2)}
29
30
  .oa{display:inline-block;padding:10px 20px;background:#0077B5;color:#fff;border-radius:6px;
30
31
  font-weight:700;font-size:13px;cursor:pointer;border:none;margin-bottom:16px}</style></head>
31
- <body><h3 style="color:${z[a]}">${a}-Tier (${d.length})</h3>
32
+ <body><h3 style="color:${at[a]}">${a}-Tier (${d.length})</h3>
32
33
  <button class="oa" onclick="document.querySelectorAll('.btn').forEach((a,i)=>setTimeout(()=>a.click(),i*300))">
33
- Open All</button>${d.map(a=>'<a class="btn" href="'+a.profile_url+'" target="_blank">'+a.name+" · "+parseFloat(a.power_score||0).toFixed(1)+"</a>").join("")}</body></html>`;window.open(URL.createObjectURL(new Blob([b],{type:"text/html"})),"_blank")},style:{marginLeft:"auto",padding:"2px 8px",borderRadius:3,border:"none",cursor:"pointer",background:"#0077B5",color:"#fff",fontSize:8,fontWeight:700},children:["Open All ",a]})]}),d.map(a=>(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,padding:"5px 8px 5px 16px",borderBottom:"1px solid rgba(255,255,255,0.02)",background:r.has(a.id)?"rgba(255,215,0,0.05)":"transparent",cursor:"pointer"},onMouseEnter:b=>{r.has(a.id)||(b.currentTarget.style.background="rgba(255,255,255,0.04)")},onMouseLeave:b=>{r.has(a.id)||(b.currentTarget.style.background="transparent")},children:[(0,b.jsx)("input",{type:"checkbox",checked:r.has(a.id),onChange:()=>Y(a.id),onClick:a=>a.stopPropagation(),style:{cursor:"pointer",flexShrink:0}}),(0,k.localPhoto)(a.profile_image_url)?(0,b.jsx)("img",{src:(0,k.localPhoto)(a.profile_image_url),alt:"",style:{width:28,height:28,borderRadius:"50%",objectFit:"cover",flexShrink:0,border:`1.5px solid ${z[a.tier]||"#555"}`},onError:a=>{a.target.style.display="none"}}):(0,b.jsx)("div",{style:{width:28,height:28,borderRadius:"50%",flexShrink:0,fontSize:10,fontWeight:700,background:z[a.tier]||"#555",color:"S"===a.tier?"#000":"#fff",display:"flex",alignItems:"center",justifyContent:"center"},children:a.name?.charAt(0)}),(0,b.jsxs)("div",{style:{flex:1,minWidth:0},onClick:()=>Y(a.id),children:[(0,b.jsx)("div",{style:{fontSize:11,fontWeight:600,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:a.name}),(0,b.jsx)("div",{style:{fontSize:8,color:"#666",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:a.headline?.substring(0,45)})]}),(0,b.jsx)("span",{style:{fontSize:9,fontWeight:700,color:z[a.tier],flexShrink:0},children:parseFloat(a.power_score||0).toFixed(1)}),R.has(a.id)?(0,b.jsx)("span",{style:{padding:"3px 6px",borderRadius:3,fontSize:8,fontWeight:700,background:"rgba(255,107,53,0.15)",color:"#FF6B35",flexShrink:0},children:"Sent"}):(0,b.jsx)("a",{href:a.profile_url,target:"_blank",rel:"noopener noreferrer",onClick:b=>{b.stopPropagation(),(0,w.markRequested)(a,{bridgeId:a.source_connection_id}).catch(()=>{})},style:{padding:"3px 6px",borderRadius:3,fontSize:8,fontWeight:700,background:"#0077B5",color:"#fff",textDecoration:"none",flexShrink:0},children:"Add"})]},a.id))]},a)}):c.map(a=>(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,padding:"6px 8px",borderBottom:"1px solid rgba(255,255,255,0.03)",background:r.has(a.id)?"rgba(255,215,0,0.05)":"transparent",cursor:"pointer"},onMouseEnter:b=>{r.has(a.id)||(b.currentTarget.style.background="rgba(255,255,255,0.04)")},onMouseLeave:b=>{r.has(a.id)||(b.currentTarget.style.background="transparent")},children:[(0,b.jsx)("input",{type:"checkbox",checked:r.has(a.id),onChange:()=>Y(a.id),onClick:a=>a.stopPropagation(),style:{cursor:"pointer",flexShrink:0}}),(0,k.localPhoto)(a.profile_image_url)?(0,b.jsx)("img",{src:(0,k.localPhoto)(a.profile_image_url),alt:"",style:{width:32,height:32,borderRadius:"50%",objectFit:"cover",flexShrink:0,border:`1.5px solid ${z[a.tier]||"#555"}`},onError:a=>{a.target.style.display="none",a.target.nextSibling.style.display="flex"}}):null,(0,b.jsx)("div",{style:{width:32,height:32,borderRadius:"50%",flexShrink:0,fontSize:12,fontWeight:700,background:z[a.tier]||"#555",color:"S"===a.tier?"#000":"#fff",display:(0,k.localPhoto)(a.profile_image_url)?"none":"flex",alignItems:"center",justifyContent:"center"},children:a.name?.charAt(0)}),(0,b.jsxs)("div",{style:{flex:1,minWidth:0},onClick:()=>Y(a.id),children:[(0,b.jsx)("div",{style:{fontSize:12,fontWeight:600,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:a.name}),(0,b.jsx)("div",{style:{fontSize:9,color:"#666",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:a.headline?.substring(0,50)})]}),a.bridge&&(0,b.jsxs)("span",{style:{fontSize:8,color:"#555",flexShrink:0,maxWidth:60,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:["via ",a.bridge.name?.split(" ")[0]]}),(0,b.jsx)("div",{style:{textAlign:"right",flexShrink:0,minWidth:32},children:(0,b.jsx)("div",{style:{fontSize:10,fontWeight:700,color:z[a.tier]},children:parseFloat(a.power_score).toFixed(1)})}),R.has(a.id)?(0,b.jsx)("span",{style:{padding:"4px 8px",borderRadius:4,fontSize:9,fontWeight:700,background:"rgba(255,107,53,0.15)",color:"#FF6B35",flexShrink:0},children:"⏳ Sent"}):(0,b.jsx)("a",{href:a.profile_url,target:"_blank",rel:"noopener noreferrer",onClick:b=>{b.stopPropagation(),(0,w.markRequested)(a,{bridgeId:a.source_connection_id}).catch(()=>{})},style:{padding:"4px 8px",borderRadius:4,fontSize:9,fontWeight:700,background:"#0077B5",color:"#fff",textDecoration:"none",flexShrink:0},children:"Add"})]},a.id))]},a))]})]})})]})}a.s(["default",0,function(){return(0,b.jsx)(s.default,{children:(0,b.jsx)(A,{})})}],78386)}];
34
+ Open All</button>${d.map(a=>'<a class="btn" href="'+a.profile_url+'" target="_blank">'+a.name+" · "+parseFloat(a.power_score||0).toFixed(1)+"</a>").join("")}</body></html>`;window.open(URL.createObjectURL(new Blob([b],{type:"text/html"})),"_blank")},style:{marginLeft:"auto",padding:"2px 8px",borderRadius:3,border:"none",cursor:"pointer",background:"#0077B5",color:"#fff",fontSize:8,fontWeight:700},children:["Open All ",a]})]}),d.map(a=>(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,padding:"5px 8px 5px 16px",borderBottom:"1px solid rgba(255,255,255,0.02)",background:t.has(a.id)?"rgba(255,215,0,0.05)":"transparent",cursor:"pointer"},onMouseEnter:b=>{t.has(a.id)||(b.currentTarget.style.background="rgba(255,255,255,0.04)")},onMouseLeave:b=>{t.has(a.id)||(b.currentTarget.style.background="transparent")},children:[(0,b.jsx)("input",{type:"checkbox",checked:t.has(a.id),onChange:()=>U(a.id),onClick:a=>a.stopPropagation(),style:{cursor:"pointer",flexShrink:0}}),(0,ah.localPhoto)(a.profile_image_url)?(0,b.jsx)("img",{src:(0,ah.localPhoto)(a.profile_image_url),alt:"",style:{width:28,height:28,borderRadius:"50%",objectFit:"cover",flexShrink:0,border:`1.5px solid ${at[a.tier]||"#555"}`},onError:a=>{a.target.style.display="none"}}):(0,b.jsx)("div",{style:{width:28,height:28,borderRadius:"50%",flexShrink:0,fontSize:10,fontWeight:700,background:at[a.tier]||"#555",color:"S"===a.tier?"#000":"#fff",display:"flex",alignItems:"center",justifyContent:"center"},children:a.name?.charAt(0)}),(0,b.jsxs)("div",{style:{flex:1,minWidth:0},onClick:()=>U(a.id),children:[(0,b.jsx)("div",{style:{fontSize:11,fontWeight:600,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:a.name}),(0,b.jsx)("div",{style:{fontSize:8,color:"#666",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:a.headline?.substring(0,45)})]}),(0,b.jsx)("span",{style:{fontSize:9,fontWeight:700,color:at[a.tier],flexShrink:0},children:parseFloat(a.power_score||0).toFixed(1)}),N.has(a.id)?(0,b.jsx)("span",{style:{padding:"3px 6px",borderRadius:3,fontSize:8,fontWeight:700,background:"rgba(255,107,53,0.15)",color:"#FF6B35",flexShrink:0},children:"Sent"}):(0,b.jsx)("a",{href:a.profile_url,target:"_blank",rel:"noopener noreferrer",onClick:b=>{b.stopPropagation(),(0,as.markRequested)(a,{bridgeId:a.source_connection_id}).catch(()=>{})},style:{padding:"3px 6px",borderRadius:3,fontSize:8,fontWeight:700,background:"#0077B5",color:"#fff",textDecoration:"none",flexShrink:0},children:"Add"})]},a.id))]},a)}):c.map(a=>(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,padding:"6px 8px",borderBottom:"1px solid rgba(255,255,255,0.03)",background:t.has(a.id)?"rgba(255,215,0,0.05)":"transparent",cursor:"pointer"},onMouseEnter:b=>{t.has(a.id)||(b.currentTarget.style.background="rgba(255,255,255,0.04)")},onMouseLeave:b=>{t.has(a.id)||(b.currentTarget.style.background="transparent")},children:[(0,b.jsx)("input",{type:"checkbox",checked:t.has(a.id),onChange:()=>U(a.id),onClick:a=>a.stopPropagation(),style:{cursor:"pointer",flexShrink:0}}),(0,ah.localPhoto)(a.profile_image_url)?(0,b.jsx)("img",{src:(0,ah.localPhoto)(a.profile_image_url),alt:"",style:{width:32,height:32,borderRadius:"50%",objectFit:"cover",flexShrink:0,border:`1.5px solid ${at[a.tier]||"#555"}`},onError:a=>{a.target.style.display="none",a.target.nextSibling.style.display="flex"}}):null,(0,b.jsx)("div",{style:{width:32,height:32,borderRadius:"50%",flexShrink:0,fontSize:12,fontWeight:700,background:at[a.tier]||"#555",color:"S"===a.tier?"#000":"#fff",display:(0,ah.localPhoto)(a.profile_image_url)?"none":"flex",alignItems:"center",justifyContent:"center"},children:a.name?.charAt(0)}),(0,b.jsxs)("div",{style:{flex:1,minWidth:0},onClick:()=>U(a.id),children:[(0,b.jsx)("div",{style:{fontSize:12,fontWeight:600,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:a.name}),(0,b.jsx)("div",{style:{fontSize:9,color:"#666",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:a.headline?.substring(0,50)})]}),a.bridge&&(0,b.jsxs)("span",{style:{fontSize:8,color:"#555",flexShrink:0,maxWidth:60,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:["via ",a.bridge.name?.split(" ")[0]]}),(0,b.jsx)("div",{style:{textAlign:"right",flexShrink:0,minWidth:32},children:(0,b.jsx)("div",{style:{fontSize:10,fontWeight:700,color:at[a.tier]},children:parseFloat(a.power_score).toFixed(1)})}),N.has(a.id)?(0,b.jsx)("span",{style:{padding:"4px 8px",borderRadius:4,fontSize:9,fontWeight:700,background:"rgba(255,107,53,0.15)",color:"#FF6B35",flexShrink:0},children:"⏳ Sent"}):(0,b.jsx)("a",{href:a.profile_url,target:"_blank",rel:"noopener noreferrer",onClick:b=>{b.stopPropagation(),(0,as.markRequested)(a,{bridgeId:a.source_connection_id}).catch(()=>{})},style:{padding:"4px 8px",borderRadius:4,fontSize:9,fontWeight:700,background:"#0077B5",color:"#fff",textDecoration:"none",flexShrink:0},children:"Add"})]},a.id))]},a))]})]})})]})}a.s(["default",0,function(){return(0,b.jsx)(c.Suspense,{fallback:null,children:(0,b.jsx)(ap.default,{children:(0,b.jsx)(av,{})})})}],78386)}];
34
35
 
35
36
  //# sourceMappingURL=app_queue_page_0c6znd6.js.map
@@ -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(50944),f=a.i(36839),g=a.i(16874);function h(){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)(l,{local:a}):(0,b.jsx)(j,{local:a}):null}async function i(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 j({local:a}){let[d,e]=(0,c.useState)(null),[f,h]=(0,c.useState)(null),[k,l]=(0,c.useState)(null),[m,n]=(0,c.useState)(null);async function o(a){h(a),l(null);try{let{ok:b,d:c}=await i({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{h(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)(g.Section,{id:"updates",title:"Updates",children:[m?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)(g.Body,{children:["Updated to ",(0,b.jsx)(g.Mono,{children:m.sha})," — “",m.subject,"”."]}),(0,b.jsx)(g.Body,{style:{color:m.needsRestart?"#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)(g.Body,{children:["You are on ",(0,b.jsx)(g.Mono,{children:a.sha})," — “",a.subject,"”."]}),d&&0===d.behind&&(0,b.jsx)(g.Status,{tone:"ok",children:"You’re up to date."}),d&&d.behind>0&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)(g.Body,{style:{color:"#00ff88"},children:[d.behind," update",1===d.behind?"":"s"," available."]}),(0,b.jsx)("pre",{style:r,children:d.commits.join("\n")})]}),d?.dirty?.length>0&&(0,b.jsxs)(g.Body,{children:["Changed files here:"," ",(0,b.jsx)(g.Mono,{children:d.dirty.join(", ")}),". Commit or discard them first — this will not throw away your work."]}),(0,b.jsxs)(q,{children:[(0,b.jsx)(g.Btn,{onClick:()=>o("check"),disabled:!!f,children:"check"===f?"Checking…":"Check for updates"}),d?.behind>0&&(0,b.jsx)(g.Btn,{onClick:()=>o("pull"),disabled:!!f,primary:!0,children:"pull"===f?"Updating…":`Install ${d.behind} update${1===d.behind?"":"s"}`})]})]}),k&&(0,b.jsx)(g.Body,{style:{color:"#ff7676"},children:k}),(0,b.jsxs)(g.Body,{style:{fontSize:12,color:"#667",marginTop:12},children:["Nothing is checked automatically and nothing about you is sent — this runs the same ",(0,b.jsx)(g.Mono,{children:"git fetch"})," and ",(0,b.jsx)(g.Mono,{children:"git pull"})," you would type yourself."]})]})}let k=["checking","downloading","verifying","preparing","restarting"];function l({local:a}){let d="mac-app"===a.kind,[e,f]=(0,c.useState)(!1),[h,j]=(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&&k.includes(y.phase)),N=M&&("restarting"===y.phase||I>0);async function O(){f(!0),j(null),t(null),D(null),F(null),H(void 0),z(a=>a&&k.includes(a.phase)?a:null);try{let{ok:a,d:b}=await i({action:"check-release"});a?(j(b),x(new Date)):t(b.error||"Could not check.")}catch(a){t(a.message)}finally{f(!1)}}async function P(){B(!0),D(null),F(null),H(void 0),J(0),L(!1);try{let{ok:a,d:b}=await i({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 i({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&&k.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 i({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&&h?.install?.possible,U=S&&"stale-check"===y.code||"not-checked"===E,V=void 0!==G?G:h?.fallback,W=h?.newer&&(!d||V)&&(!T||S||C||a.lastUpdate?.tone==="bad"),X=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)(g.Section,{id:"updates",title:"Updates",children:[a.lastUpdate&&!M&&(0,b.jsx)(o,{report:a.lastUpdate}),(0,b.jsxs)(g.Body,{children:["You have version ",(0,b.jsx)(g.Mono,{children:a.version}),"."]}),M?(0,b.jsx)(n,{job:y,restarting:N,slow:K,onCancel:Q}):(0,b.jsxs)(b.Fragment,{children:[S&&(0,b.jsxs)(g.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)(g.Status,{children:"Cancelled. Nothing was changed."}),C&&(0,b.jsx)(g.Status,{tone:"bad",children:C}),h&&!h.latest&&(0,b.jsx)(g.Status,{children:"No release has been published yet."}),h?.latest&&!h.newer&&(0,b.jsxs)(g.Status,{tone:"ok",children:["You’re up to date: ",h.latest.version," is the newest version.",w&&(0,b.jsxs)("span",{style:{color:"#8b9a9a"},children:[" Checked at ",w.toLocaleTimeString([],{hour:"numeric",minute:"2-digit"}),"."]})]}),h?.newer&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)(g.Body,{style:{color:"#00ff88"},children:["Version ",h.latest.version," is available."]}),T&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)(g.Body,{children:["It downloads ",h.install.size?`about ${m(h.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)(q,{children:[U?(0,b.jsx)(g.Btn,{onClick:O,disabled:e,primary:!0,children:e?"Checking…":"Check again"}):(0,b.jsx)(g.Btn,{onClick:P,disabled:A,primary:!0,children:A?"Starting…":S||C?"Try again":"Install and restart"}),(0,b.jsx)(p,{url:h.latest.url})]})]}),d&&!T&&h.install?.reason&&(0,b.jsx)(g.Body,{children:h.install.reason}),W&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(g.Body,{children:X}),a.testReleases?(0,b.jsx)("pre",{style:r,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:r,children:a.command}),(0,b.jsxs)(q,{children:[(0,b.jsx)(g.Btn,{onClick:R,primary:!T,children:u?"Copied":"Copy"}),!T&&(0,b.jsx)(p,{url:h.latest.url})]})]})]}),!T&&!W&&(0,b.jsx)(q,{children:(0,b.jsx)(p,{url:h.latest.url})})]}),!h?.newer&&(0,b.jsx)(q,{children:(0,b.jsx)(g.Btn,{onClick:O,disabled:e,children:e?"Checking…":h?"Check again":"Check for updates"})})]}),s&&(0,b.jsx)(g.Body,{style:{color:"#ff7676"},children:s}),(0,b.jsxs)(g.Body,{style:{fontSize:12,color:"#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)(g.Body,{style:{fontSize:12,color:"#FFD700",marginTop:6},children:["Test mode: releases are read from ",(0,b.jsx)(g.Mono,{children:a.testReleases})," on this computer, not from GitHub."]})]})}let m=a=>Math.max(1,Math.round(a/1e6));function n({job:a,restarting:c,slow:d,onCancel:e}){let f=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!==f?` ${f}% (${m(a.received)} of ${m(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)(g.Body,{style:{color:"#e8e8ee"},children:h}),"downloading"===a.phase&&null!==f&&(0,b.jsx)("div",{role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":f,"aria-label":"Download",style:{height:6,borderRadius:3,background:"rgba(255,255,255,0.08)",marginTop:10,overflow:"hidden",maxWidth:420},children:(0,b.jsx)("div",{style:{width:`${f}%`,height:"100%",background:"linear-gradient(90deg, #9B59B6, #3498DB)",transition:"width 0.4s ease"}})}),d&&(0,b.jsx)(g.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)(q,{children:(0,b.jsx)(g.Btn,{onClick:e,children:"Cancel"})})]})}function o({report:a}){let c=new Date(a.at).toLocaleString([],{dateStyle:"medium",timeStyle:"short"});return(0,b.jsxs)(g.Status,{tone:"ok"===a.tone?"ok":"bad",children:[a.text," ",(0,b.jsxs)("span",{style:{color:"#8b9a9a"},children:["(",c,")"]}),"ok"===a.tone&&a.previous&&(0,b.jsxs)("span",{style:{display:"block",fontSize:12.5,color:"#8b9a9a",marginTop:4},children:["A copy of the version you had is kept in ",(0,b.jsx)(g.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 p({url:a}){return a?(0,b.jsx)("a",{href:a,target:"_blank",rel:"noreferrer",style:{color:"#3498DB",fontSize:13.5},children:"What changed →"}):null}function q({children:a}){return(0,b.jsx)("div",{style:{display:"flex",gap:10,marginTop:12,flexWrap:"wrap",alignItems:"center"},children:a})}let r={background:"rgba(0,0,0,0.45)",border:g.LINE,borderRadius:8,padding:12,margin:"8px 0 0",fontSize:12,lineHeight:1.7,color:"#b9c6c6",fontFamily:"ui-monospace, SFMono-Regular, Menlo, monospace",whiteSpace:"pre-wrap",maxHeight:180,overflow:"auto"};function s(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 t=a=>Number(a||0).toLocaleString("en-US"),u=(a,b,c=`${b}s`)=>`${t(a)} ${1===Number(a)?b:c}`;function v(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"})}let w={auto:"before a new version",import:"before an import",manual:"made by hand"};async function x(a,b){let c=await a.json().catch(()=>({}));if(!a.ok)throw Object.assign(Error(c.error||b),{data:c});return c}let y={display:"flex",gap:10,marginTop:12,flexWrap:"wrap",alignItems:"center"},z={fontSize:12,color:"#667",marginTop:10},A={fontSize:14,fontWeight:650,margin:"26px 0 4px",color:"#e8e8ee"},B={display:"flex",gap:8,alignItems:"flex-start",marginTop:12,fontSize:13,color:"#c8d0d0",lineHeight:1.5,cursor:"pointer"};function C({label:a,children:c}){return(0,b.jsxs)("div",{style:{display:"flex",gap:12,justifyContent:"space-between",padding:"7px 0",borderTop:g.LINE,fontSize:13.5},children:[(0,b.jsx)("span",{style:{color:"#8b9a9a"},children:a}),(0,b.jsx)("span",{style:{color:"#e8e8ee",textAlign:"right"},children:c})]})}function D(){return(0,b.jsx)("a",{href:"https://github.com/blakeb056/six-degrees#undo-an-import",target:"_blank",rel:"noreferrer",style:{color:"inherit",textDecoration:"underline"},children:"Undo an import"})}function E(){let[a,d]=(0,c.useState)(null),[e,f]=(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)(!0),[r,E]=(0,c.useState)(!0),[F,G]=(0,c.useState)(null),[H,I]=(0,c.useState)(!1),[J,K]=(0,c.useState)(!1),L=(0,c.useRef)(null),M=(0,c.useRef)(!1),N=(0,c.useCallback)(()=>fetch("/api/data",{cache:"no-store"}).then(a=>x(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}),f(null)}).catch(a=>f(a.message)),[]);async function O(){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 P(){i("reveal"),k(null);try{await x(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 Q(){i("export"),m(null);try{let a,b=await fetch("/api/data/export",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({photos:p,social:r})});b.ok||await x(b,"The copy 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")),u(a,"person","people"))];g.push(p?u(Number(b.headers.get("x-six-degrees-photos")),"photo"):"no photos"),m({tone:"ok",text:`Made “${d}” (${s(c.size)}: ${g.join(", ")}). Look for it in your Downloads folder, or wherever you chose to save it.`})}catch(a){m({tone:"bad",text:a.message})}finally{i(null)}}async function R(){if(F){i("import"),o(null);try{let b={"Content-Type":"application/octet-stream","X-Six-Degrees-Size":String(F.size)};a.people>0&&(b["X-Six-Degrees-Replace"]=String(a.people)),await x(await fetch("/api/data/import",{method:"POST",headers:b,body:F}),"The file could not be imported."),G(null),I(!1),L.current&&(L.current.value=""),await N()}catch(a){a.data?.needsConfirm&&(I(!1),await N()),o({tone:"bad",text:a.message})}finally{i(null)}}}async function S(){i("cancel"),o(null);try{await x(await fetch("/api/data/import",{method:"DELETE"}),"The import could not be cancelled."),await N(),o({tone:"ok",text:"Cancelled. The network here stays as it is."})}catch(a){o({tone:"bad",text:a.message})}finally{i(null)}}async function T(){i("restart"),o(null);try{await x(await fetch("/api/data/restart",{method:"POST"}),"Six Degrees could not restart."),K(!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)}K(!1),o({tone:"bad",text:"Six Degrees didn’t come back. Quit it and open it again: the import finishes as it starts."})}catch(a){o({tone:"bad",text:a.message})}finally{i(null)}}if((0,c.useEffect)(()=>{N()},[N]),(0,c.useEffect)(()=>{a&&!M.current&&(M.current=!0,"#data"===window.location.hash&&document.getElementById("data")?.scrollIntoView({block:"start"}))},[a]),!a)return(0,b.jsx)(g.Section,{id:"data",title:"Your data",children:e?(0,b.jsx)(g.Status,{tone:"bad",children:e}):(0,b.jsx)(g.Body,{children:"Loading…"})});let U=a.pending,V=a.photosInCopy||a.photos,W=a.backups||[],X=W.reduce((a,b)=>a+(b.bytes||0),0),Y=!!(F&&F.size>a.maxImportBytes),Z=a.people>0,$=a.lastImport;return(0,b.jsxs)(g.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)(g.Body,{children:(0,b.jsx)(g.Mono,{children:a.dataDir})}),(0,b.jsxs)("div",{style:y,children:[(0,b.jsx)(g.Btn,{onClick:O,children:"Copy the path"}),(0,b.jsx)(g.Btn,{onClick:P,disabled:"reveal"===h,children:"reveal"===h?"Opening…":"darwin"===a.platform?"Show in Finder":"Open the folder"})]}),j&&(0,b.jsx)(g.Status,{tone:j.tone,children:j.text}),(0,b.jsxs)("div",{style:{marginTop:16,borderBottom:g.LINE},children:[(0,b.jsxs)(C,{label:"Your network",children:[u(a.people,"person","people")," · ",s(a.databaseBytes)]}),(0,b.jsx)(C,{label:"Profile photos",children:a.photos.count?`${t(a.photos.count)} \xb7 ${s(a.photos.bytes)}`:"none saved yet"}),(0,b.jsx)(C,{label:"Backups",children:W.length?`${u(W.length,"copy","copies")} \xb7 ${s(X)}`:"none yet"}),(0,b.jsx)(C,{label:"LinkedIn sign-in for scanning",children:a.linkedinSignIn?"kept here, never put in a copy":"not signed in on this computer"})]}),W.length>0&&(0,b.jsxs)("details",{style:{marginTop:10,fontSize:13,color:"#8b9a9a"},children:[(0,b.jsx)("summary",{style:{cursor:"pointer"},children:"The backups"}),(0,b.jsx)("div",{style:{display:"grid",gridTemplateColumns:"minmax(0, 1fr) auto auto",gap:"6px 14px",marginTop:8},children:W.map(a=>(0,b.jsxs)("div",{style:{display:"contents"},children:[(0,b.jsxs)("span",{style:{wordBreak:"break-all",color:"#c8d0d0"},children:[a.name,a.folder?"/":"",(0,b.jsxs)("span",{style:{color:"#667"},children:[" · ",a.folder?"its photos and files":w[a.kind]||a.kind]})]}),(0,b.jsx)("span",{children:v(a.modifiedAt)}),(0,b.jsx)("span",{style:{textAlign:"right"},children:s(a.bytes)})]},a.name))})]}),(0,b.jsx)(g.Body,{style:z,children:"Backups are copies of your network from before a new version or an import. The newest five from new versions are kept; copies from before an import stay until you delete them."}),(0,b.jsx)(g.Body,{style:z,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, save a copy below and import it there."}),(0,b.jsx)("h3",{style:A,children:"Move your network to another computer"}),(0,b.jsx)(g.Body,{children:"Save a copy here, then on the new computer install Six Degrees, open Settings → Your data and import the copy. Sign in to LinkedIn again there before you scan: your sign-in never goes into a copy."}),(0,b.jsxs)("label",{style:B,children:[(0,b.jsx)("input",{type:"checkbox",checked:p,onChange:a=>q(a.target.checked),style:{marginTop:3}}),(0,b.jsxs)("span",{children:["Include profile photos",V.count?` (${t(V.count)}, ${s(V.bytes)})`:"",". They can’t be downloaded again without a new scan."]})]}),(0,b.jsxs)("label",{style:B,children:[(0,b.jsx)("input",{type:"checkbox",checked:r,onChange:a=>E(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:y,children:[(0,b.jsx)(g.Btn,{primary:!0,onClick:Q,disabled:!!h||J||0===a.people,children:"export"===h?"Saving…":"Save a copy of my network"}),0===a.people&&(0,b.jsx)("span",{style:{fontSize:13,color:"#8b9a9a"},children:"There’s no network here to save yet."})]}),l&&(0,b.jsx)(g.Status,{tone:l.tone,children:l.text}),(0,b.jsx)(g.Body,{style:z,children:"The copy 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 imported. A network opened from a LinkedIn CSV lives only in its browser tab, so it isn’t in the copy; import the CSV again on the new computer. With the Social tab included, the copy also holds your CRM notes and any messages you keep, so it’s as private as your inbox."}),(0,b.jsx)("h3",{style:A,children:"Bring in a network from another computer"}),U?(0,b.jsxs)(g.Status,{children:[(0,b.jsx)("div",{style:{fontWeight:650},children:"An import is waiting to finish."}),(0,b.jsxs)("div",{children:["The network in the copy",U.exportedAt?` saved ${v(U.exportedAt,!1)}`:""," ","(",u(U.people,"person","people"),U.photos?`, ${u(U.photos,"photo")}`:"",U.fromVersion?`, from Six Degrees ${U.fromVersion}`:"",")",U.replacedPeople>0?` replaces the ${u(U.replacedPeople,"person","people")} here the next time Six Degrees starts. A copy of what’s here now is kept in backups first, so the import can be undone.`:" becomes the network here the next time Six Degrees starts."," ","Your LinkedIn search budget and any pause on scanning are kept."]}),U.error&&(0,b.jsxs)("div",{style:{color:"#ff7676",marginTop:6},children:["The last try stopped: ",U.error.replace(/\.$/,""),". It tries again the next time Six Degrees starts."]}),J?(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:a.restart.how}),a.restart.command&&(0,b.jsx)("div",{style:{marginTop:6},children:(0,b.jsx)(g.Mono,{children:a.restart.command})}),(0,b.jsxs)("div",{style:y,children:[a.restart.canRestart&&(0,b.jsx)(g.Btn,{primary:!0,onClick:T,disabled:!!h,children:"restart"===h?"Restarting…":"Restart now"}),!U.started&&(0,b.jsx)(g.Btn,{onClick:S,disabled:!!h,children:"cancel"===h?"Cancelling…":"Cancel the import"})]})]})]}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(g.Body,{children:"Pick the copy you saved 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:L,type:"file",accept:".sixdegrees",onChange:function(a){o(null),I(!1),G(a.target.files?.[0]||null)},style:{display:"none"}}),(0,b.jsxs)("div",{style:y,children:[(0,b.jsx)(g.Btn,{onClick:()=>L.current?.click(),disabled:!!h,children:"Choose a file…"}),F&&(0,b.jsxs)("span",{style:{fontSize:13,color:"#c8d0d0",wordBreak:"break-all"},children:[F.name," · ",s(F.size)]})]}),Y&&(0,b.jsxs)(g.Status,{tone:"bad",children:["That file is ",s(F.size),". This copy can import files up to ",s(a.maxImportBytes),"."]}),F&&Z&&!Y&&(0,b.jsxs)("label",{style:B,children:[(0,b.jsx)("input",{type:"checkbox",checked:H,onChange:a=>I(a.target.checked),style:{marginTop:3}}),(0,b.jsxs)("span",{children:["Replace the ",u(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."]})]}),(0,b.jsx)("div",{style:y,children:(0,b.jsx)(g.Btn,{primary:!0,onClick:R,disabled:!F||Y||Z&&!H||!!h,children:"import"===h?"Checking the file…":"Import"})})]}),n&&(0,b.jsx)(g.Status,{tone:n.tone,children:n.text}),$&&!U&&(a.importIsRecent?(0,b.jsxs)(g.Status,{tone:"ok",children:["Imported ",v($.appliedAt),": ",u($.people,"person","people"),$.exportedAt?` from the copy saved ${v($.exportedAt,!1)}`:"",".",$.keptDatabase&&(0,b.jsxs)(b.Fragment,{children:[" ","What was here before is kept in ",(0,b.jsx)(g.Mono,{children:$.keptDatabase}),$.keptFiles?", with its photos and files beside it":"",".",$.keptAsIs&&" It couldn’t be read, so it was kept exactly as it was."," ","To go back to it, see ",(0,b.jsx)(D,{}),"."]})]}):(0,b.jsxs)(g.Body,{style:z,children:["Last import: ",v($.appliedAt)," (",u($.people,"person","people"),").",$.keptDatabase&&(0,b.jsxs)(b.Fragment,{children:[" What was here before is kept in ",(0,b.jsx)(g.Mono,{children:$.keptDatabase})," (",(0,b.jsx)(D,{}),")."]})]}))]})}var F=a.i(58834);let G={"mac-app":"the Mac 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 H(){let[a,f]=(0,c.useState)(null),[i,j]=(0,c.useState)(null),k=(0,e.useRouter)();if((0,c.useEffect)(()=>{let a=window.location.hash;("#sector"===a||"#tiers"===a)&&k.replace(`/scores${a}`)},[k]),(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(f).catch(a=>j(a.message))},[]),F.IS_DEMO)return(0,b.jsxs)("div",{style:{minHeight:"100vh",background:"#0a0a1a",color:"rgba(255,255,255,0.7)",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:12,textAlign:"center",padding:24,fontFamily:g.FONT},children:[(0,b.jsx)("h2",{style:{margin:0,fontSize:20,fontWeight:700,color:"#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(255,255,255,0.5)",textDecoration:"none"},children:"← Back to the network"})]});let l=a?.about;return(0,b.jsxs)("div",{style:{minHeight:"100vh",background:"#0a0a1a",color:"#fff",fontFamily:g.FONT},children:[(0,b.jsxs)("header",{style:{padding:"16px 24px",borderBottom:g.LINE,display:"flex",alignItems:"center",gap:16},children:[(0,b.jsx)(d.default,{href:"/",style:{display:"flex",alignItems:"center",gap:6,color:"#888",textDecoration:"none",fontSize:13,fontWeight:600,padding:"6px 14px",borderRadius:6,background:"rgba(255,255,255,0.06)",border:g.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:720,margin:"0 auto",padding:"8px 24px 64px"},children:[i&&(0,b.jsx)(g.Body,{style:{color:"#ff7676",marginTop:16},children:i}),(0,b.jsx)(h,{}),(0,b.jsx)(g.Section,{id:"scoring",title:"Your field and tiers",children:(0,b.jsxs)(g.Body,{children:["They’re on the ",(0,b.jsx)(d.default,{href:"/scores",style:{color:"#3498DB"},children:"Scores"})," tab now, beside every company’s score: ",(0,b.jsx)(d.default,{href:"/scores#sector",style:{color:"#3498DB"},children:"your field"})," and"," ",(0,b.jsx)(d.default,{href:"/scores#tiers",style:{color:"#3498DB"},children:"how tiers are graded"}),"."]})}),(0,b.jsx)(E,{}),(0,b.jsx)(g.Section,{id:"about",title:"About this copy",children:l?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)(g.Body,{children:["Version ",(0,b.jsx)(g.Mono,{children:l.version}),", running as ",G[l.kind]||l.kind,"."]}),(0,b.jsxs)(g.Body,{children:["Your network is kept in ",(0,b.jsx)(g.Mono,{children:l.dataDir}),l.customDataDir?" (a folder you chose).":".","mac-app"===l.kind&&" Help → Show the Data Folder opens it."]}),(0,b.jsx)(g.Body,{style:{fontSize:12,color:"#667",marginTop:10},children:"Settings are saved with your network, on this computer. Nothing here is sent anywhere."})]}):!i&&(0,b.jsx)(g.Body,{children:"Loading…"})})]})]})}a.s(["default",0,function(){return(0,b.jsx)(f.default,{children:(0,b.jsx)(H,{})})}],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?"#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:"#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:"#ff7676"},children:k}),(0,b.jsxs)(f.Body,{style:{fontSize:12,color:"#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=i?.newer&&(!d||V)&&(!T||S||C||a.lastUpdate?.tone==="bad"),X=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:"#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:"#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.jsx)(f.Body,{children:X}),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&&!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:"#ff7676"},children:s}),(0,b.jsxs)(f.Body,{style:{fontSize:12,color:"#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:"#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:"#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(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:"#8b9a9a"},children:["(",c,")"]}),"ok"===a.tone&&a.previous&&(0,b.jsxs)("span",{style:{display:"block",fontSize:12.5,color:"#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:"#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(0,0,0,0.45)",border:f.LINE,borderRadius:8,padding:12,margin:"8px 0 0",fontSize:12,lineHeight:1.7,color:"#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"})}let v={auto:"before a new version",import:"before an import",manual:"made by hand"};async function w(a,b){let c=await a.json().catch(()=>({}));if(!a.ok)throw Object.assign(Error(c.error||b),{data:c});return c}let x={display:"flex",gap:10,marginTop:12,flexWrap:"wrap",alignItems:"center"},y={fontSize:12,color:"#667",marginTop:10},z={fontSize:14,fontWeight:650,margin:"26px 0 4px",color:"#e8e8ee"},A={display:"flex",gap:8,alignItems:"flex-start",marginTop:12,fontSize:13,color:"#c8d0d0",lineHeight:1.5,cursor:"pointer"};function B({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:"#8b9a9a"},children:a}),(0,b.jsx)("span",{style:{color:"#e8e8ee",textAlign:"right"},children:c})]})}function C(){return(0,b.jsx)("a",{href:"https://github.com/blakeb056/six-degrees#undo-an-import",target:"_blank",rel:"noreferrer",style:{color:"inherit",textDecoration:"underline"},children:"Undo an 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)(!0),[D,E]=(0,c.useState)(!0),[F,G]=(0,c.useState)(null),[H,I]=(0,c.useState)(!1),[J,K]=(0,c.useState)(!1),L=(0,c.useRef)(null),M=(0,c.useRef)(!1),N=(0,c.useCallback)(()=>fetch("/api/data",{cache:"no-store"}).then(a=>w(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 O(){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 P(){i("reveal"),k(null);try{await w(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 Q(){i("export"),m(null);try{let a,b=await fetch("/api/data/export",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({photos:p,social:D})});b.ok||await w(b,"The copy 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(p?t(Number(b.headers.get("x-six-degrees-photos")),"photo"):"no photos"),m({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){m({tone:"bad",text:a.message})}finally{i(null)}}async function R(){if(F){i("import"),o(null);try{let b={"Content-Type":"application/octet-stream","X-Six-Degrees-Size":String(F.size)};a.people>0&&(b["X-Six-Degrees-Replace"]=String(a.people)),await w(await fetch("/api/data/import",{method:"POST",headers:b,body:F}),"The file could not be imported."),G(null),I(!1),L.current&&(L.current.value=""),await N()}catch(a){a.data?.needsConfirm&&(I(!1),await N()),o({tone:"bad",text:a.message})}finally{i(null)}}}async function S(){i("cancel"),o(null);try{await w(await fetch("/api/data/import",{method:"DELETE"}),"The import could not be cancelled."),await N(),o({tone:"ok",text:"Cancelled. The network here stays as it is."})}catch(a){o({tone:"bad",text:a.message})}finally{i(null)}}async function T(){i("restart"),o(null);try{await w(await fetch("/api/data/restart",{method:"POST"}),"Six Degrees could not restart."),K(!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)}K(!1),o({tone:"bad",text:"Six Degrees didn’t come back. Quit it and open it again: the import finishes as it starts."})}catch(a){o({tone:"bad",text:a.message})}finally{i(null)}}if((0,c.useEffect)(()=>{N()},[N]),(0,c.useEffect)(()=>{a&&!M.current&&(M.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 U=a.pending,V=a.photosInCopy||a.photos,W=a.backups||[],X=W.reduce((a,b)=>a+(b.bytes||0),0),Y=!!(F&&F.size>a.maxImportBytes),Z=a.people>0,$=a.lastImport;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:x,children:[(0,b.jsx)(f.Btn,{onClick:O,children:"Copy the path"}),(0,b.jsx)(f.Btn,{onClick:P,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)(B,{label:"Your network",children:[t(a.people,"person","people")," · ",r(a.databaseBytes)]}),(0,b.jsx)(B,{label:"Profile photos",children:a.photos.count?`${s(a.photos.count)} \xb7 ${r(a.photos.bytes)}`:"none saved yet"}),(0,b.jsx)(B,{label:"Backups",children:W.length?`${t(W.length,"copy","copies")} \xb7 ${r(X)}`:"none yet"}),(0,b.jsx)(B,{label:"LinkedIn sign-in for scanning",children:a.linkedinSignIn?"kept here, never put in a copy":"not signed in on this computer"})]}),W.length>0&&(0,b.jsxs)("details",{style:{marginTop:10,fontSize:13,color:"#8b9a9a"},children:[(0,b.jsx)("summary",{style:{cursor:"pointer"},children:"The backups"}),(0,b.jsx)("div",{style:{display:"grid",gridTemplateColumns:"minmax(0, 1fr) auto auto",gap:"6px 14px",marginTop:8},children:W.map(a=>(0,b.jsxs)("div",{style:{display:"contents"},children:[(0,b.jsxs)("span",{style:{wordBreak:"break-all",color:"#c8d0d0"},children:[a.name,a.folder?"/":"",(0,b.jsxs)("span",{style:{color:"#667"},children:[" · ",a.folder?"its photos and files":v[a.kind]||a.kind]})]}),(0,b.jsx)("span",{children:u(a.modifiedAt)}),(0,b.jsx)("span",{style:{textAlign:"right"},children:r(a.bytes)})]},a.name))})]}),(0,b.jsx)(f.Body,{style:y,children:"Backups are copies of your network from before a new version or an import. The newest five from new versions are kept; copies from before an import stay until you delete them."}),(0,b.jsx)(f.Body,{style:y,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, save a copy below and import it there."}),(0,b.jsx)("h3",{style:z,children:"Move your network to another computer"}),(0,b.jsx)(f.Body,{children:"Save a copy here, then on the new computer install Six Degrees, open Settings → Your data and import the copy. Sign in to LinkedIn again there before you scan: your sign-in never goes into a copy."}),(0,b.jsxs)("label",{style:A,children:[(0,b.jsx)("input",{type:"checkbox",checked:p,onChange:a=>q(a.target.checked),style:{marginTop:3}}),(0,b.jsxs)("span",{children:["Include profile photos",V.count?` (${s(V.count)}, ${r(V.bytes)})`:"",". They can’t be downloaded again without a new scan."]})]}),(0,b.jsxs)("label",{style:A,children:[(0,b.jsx)("input",{type:"checkbox",checked:D,onChange:a=>E(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:x,children:[(0,b.jsx)(f.Btn,{primary:!0,onClick:Q,disabled:!!h||J||0===a.people,children:"export"===h?"Saving…":"Save a copy of my network"}),0===a.people&&(0,b.jsx)("span",{style:{fontSize:13,color:"#8b9a9a"},children:"There’s no network here to save yet."})]}),l&&(0,b.jsx)(f.Status,{tone:l.tone,children:l.text}),(0,b.jsx)(f.Body,{style:y,children:"The copy 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 imported. A network opened from a LinkedIn CSV lives only in its browser tab, so it isn’t in the copy; import the CSV again on the new computer. With the Social tab included, the copy also holds your CRM notes and any messages you keep, so it’s as private as your inbox."}),(0,b.jsx)("h3",{style:z,children:"Bring in a network from another computer"}),U?(0,b.jsxs)(f.Status,{children:[(0,b.jsx)("div",{style:{fontWeight:650},children:"An import is waiting to finish."}),(0,b.jsxs)("div",{children:["The network in the copy",U.exportedAt?` saved ${u(U.exportedAt,!1)}`:""," ","(",t(U.people,"person","people"),U.photos?`, ${t(U.photos,"photo")}`:"",U.fromVersion?`, from Six Degrees ${U.fromVersion}`:"",")",U.replacedPeople>0?` replaces the ${t(U.replacedPeople,"person","people")} here the next time Six Degrees starts. A copy of what’s here now is kept in backups first, so the import can be undone.`:" becomes the network here the next time Six Degrees starts."," ","Your LinkedIn search budget and any pause on scanning are kept."]}),U.error&&(0,b.jsxs)("div",{style:{color:"#ff7676",marginTop:6},children:["The last try stopped: ",U.error.replace(/\.$/,""),". It tries again the next time Six Degrees starts."]}),J?(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:a.restart.how}),a.restart.command&&(0,b.jsx)("div",{style:{marginTop:6},children:(0,b.jsx)(f.Mono,{children:a.restart.command})}),(0,b.jsxs)("div",{style:x,children:[a.restart.canRestart&&(0,b.jsx)(f.Btn,{primary:!0,onClick:T,disabled:!!h,children:"restart"===h?"Restarting…":"Restart now"}),!U.started&&(0,b.jsx)(f.Btn,{onClick:S,disabled:!!h,children:"cancel"===h?"Cancelling…":"Cancel the import"})]})]})]}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(f.Body,{children:"Pick the copy you saved 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:L,type:"file",accept:".sixdegrees",onChange:function(a){o(null),I(!1),G(a.target.files?.[0]||null)},style:{display:"none"}}),(0,b.jsxs)("div",{style:x,children:[(0,b.jsx)(f.Btn,{onClick:()=>L.current?.click(),disabled:!!h,children:"Choose a file…"}),F&&(0,b.jsxs)("span",{style:{fontSize:13,color:"#c8d0d0",wordBreak:"break-all"},children:[F.name," · ",r(F.size)]})]}),Y&&(0,b.jsxs)(f.Status,{tone:"bad",children:["That file is ",r(F.size),". This copy can import files up to ",r(a.maxImportBytes),"."]}),F&&Z&&!Y&&(0,b.jsxs)("label",{style:A,children:[(0,b.jsx)("input",{type:"checkbox",checked:H,onChange:a=>I(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."]})]}),(0,b.jsx)("div",{style:x,children:(0,b.jsx)(f.Btn,{primary:!0,onClick:R,disabled:!F||Y||Z&&!H||!!h,children:"import"===h?"Checking the file…":"Import"})})]}),n&&(0,b.jsx)(f.Status,{tone:n.tone,children:n.text}),$&&!U&&(a.importIsRecent?(0,b.jsxs)(f.Status,{tone:"ok",children:["Imported ",u($.appliedAt),": ",t($.people,"person","people"),$.exportedAt?` from the copy saved ${u($.exportedAt,!1)}`:"",".",$.keptDatabase&&(0,b.jsxs)(b.Fragment,{children:[" ","What was here before is kept in ",(0,b.jsx)(f.Mono,{children:$.keptDatabase}),$.keptFiles?", with its photos and files beside it":"",".",$.keptAsIs&&" It couldn’t be read, so it was kept exactly as it was."," ","To go back to it, see ",(0,b.jsx)(C,{}),"."]})]}):(0,b.jsxs)(f.Body,{style:y,children:["Last import: ",u($.appliedAt)," (",t($.people,"person","people"),").",$.keptDatabase&&(0,b.jsxs)(b.Fragment,{children:[" What was here before is kept in ",(0,b.jsx)(f.Mono,{children:$.keptDatabase})," (",(0,b.jsx)(C,{}),")."]})]}))]})}var E=a.i(803),F=a.i(79663),G=a.i(59534),H=a.i(54919),I=a.i(30889),J=a.i(76939);a.i(42510);var K=a.i(31483);let L={lean:"Lean",strong:"Strong"},M=["wheel","touchstart","keydown","pointerdown"],N={1:"1st",2:"2nd",3:"3rd"},O=(a,b,c=`${b}s`)=>`${a.toLocaleString()} ${1===a?b:c}`,P=G.DIRECTORY.filter(a=>"function"===a.kind).map(a=>a.label);function Q(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?`${O(a,"person","people")} ${f(a)} up a tier and ${b.toLocaleString()} ${f(b)} down.`:a?`${O(a,"person","people")} ${f(a)} up a tier.`:`${O(b,"person","people")} ${f(b)} down a tier.`}function R({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]=(0,c.useState)(()=>null),t=(0,c.useRef)(null),u=(0,c.useRef)(0),v=(0,c.useRef)(!1);function w(a){h(a),n(null),clearTimeout(t.current);let b=++u.current;if((0,F.sameFocus)(a,d))return void j(null);let c=(0,F.focusFingerprint)(a);j({key:c,loading:!0}),t.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!==u.current)return;j(d.ok?{key:c,...e}:{key:c,error:e.error||"Could not work out what would change."})}catch{b===u.current&&j({key:c,error:"Could not reach the app to work out what would change."})}},250)}async function x(){var b,c;let d;l(!0),n(null),clearTimeout(t.current),u.current++;let f=await (0,K.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(" · ")} (${L[b.strength].toLowerCase()}).`:"Saved: no sector.",c?c.scored?`${d} Rescored your network (${O(c.people??c.scored,"person","people")}). ${Q(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 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(t.current)}},[]),(0,c.useEffect)(()=>{if(v.current||!g&&!o)return;v.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),M))window.removeEventListener(a,d,!0)},e=setTimeout(d,2e3);for(let a of M)window.addEventListener(a,d,{capture:!0,passive:!0});return d},[g,o]);let y=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=>w({...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:"#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:()=>w({...g,strength:a}),style:{padding:"5px 12px",borderRadius:7,fontSize:12.5,fontWeight:600,cursor:"pointer",color:g.strength===a?"#fff":"#8b9a9a",background:g.strength===a?"rgba(52,152,219,0.25)":"transparent",border:f.LINE},children:[L[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)(S,{preview:y?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:x,disabled:!y||k,children:k?"Saving and rescoring…":"Save"}),y&&!k&&(0,b.jsx)(f.Btn,{onClick:()=>w(d),children:"Cancel"}),!y&&g.sectors.length>0&&!k&&(0,b.jsx)(f.Btn,{onClick:()=>w({...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:"#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:"#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: ",P.length>1?`${P.slice(0,-1).join(", ")} and ${P.at(-1)}`:P.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:"#FFD700"},children:["sample"===s?"The sample network":"The CSV import"," open in this window isn’t changed by this, and isn’t counted in the suggestions. Your sector applies to networks you’ve scanned."]})]})]})]})}function S({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(255,255,255,0.03)",color:"#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)=>`${O(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:"#fff"},children:"If you save:"})," ",g?`${g}.`:"No company changes score."," ",Q(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:"#667"},children:[" (",N[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:"#8b9a9a"},children:a.companyExamples.slice(0,3).map(a=>`${a.name} ${a.from} → ${a.to}`).join(" · ")})]})}let T=a=>`${Math.round(100*a)}%`,[U,V,W]=I.CURVE.map(([,a])=>a),X=[{key:"curve",label:"On your network's curve",note:`Your top ${T(U)} are S, the next ${T(V-U)} A and the next ${T(W-V)} 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 Y({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]=(0,c.useState)(()=>null);async function n(b){if(g||b===d)return;h(!0),j(null);let{settings:c,effects:f,error:i}=await (0,K.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 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:X.map(a=>{let c=d===a.key;return(0,b.jsxs)("button",{type:"button",role:"radio","aria-checked":c,disabled:g,onClick:()=>n(a.key),style:{textAlign:"left",padding:"12px 14px",borderRadius:8,cursor:g?"wait":c?"default":"pointer",color:"#fff",background:c?"rgba(155,89,182,0.14)":"rgba(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:"#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 open in this window 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 Z=["csuite","owner","vp","director","manager","senior","ic","unknown","intern","student"],$=Object.freeze({points:Object.freeze({}),roles:Object.freeze([])});function _(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 aa=[{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}],ab=[10,9.5,9,8.5,8,7.5,7,6.5,6,5.5,5,4.5,4,3,2,1,0],ac={padding:"5px 8px",borderRadius:6,fontSize:12.5,cursor:"pointer",border:f.LINE,background:"rgba(0,0,0,0.3)",color:"#fff"};function ad({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=aa.find(a=>a.ranking&&_(a.ranking)===_(g))?.key??null,v=_(g)!==_(d);async function w(){n(!0),p(null);let{settings:b,effects:c,error:d}=await (0,K.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:aa.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(255,255,255,0.03)",color:u===a.key?"#fff":"#bbb"},children:a.label},a.key))}),(0,b.jsx)(f.Body,{style:{marginBottom:14},children:aa.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:Z.map(a=>{let c=g.points?.[a]!=null;return[(0,b.jsx)("div",{style:{fontSize:13,color:c?"#fff":"#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:{...ac,borderColor:c?"rgba(155,89,182,0.7)":void 0},children:ab.map(a=>(0,b.jsx)("option",{value:a,children:a},a))},`${a}-s`),(0,b.jsx)("div",{style:{fontSize:11,color:"#667",minWidth:70},children:c?(0,b.jsxs)("button",{type:"button",onClick:()=>t(a,I.LEVELS[a].points),style:{background:"none",border:"none",color:"#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:"#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(0,0,0,0.3)",color:"#fff"}}),(0,b.jsx)("select",{"aria-label":"Points for this role",value:k,onChange:a=>l(Number(a.target.value)),style:ac,children:ab.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:"#eee"},children:[a.text," ",(0,b.jsx)("b",{style:{color:"#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:"#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:"#999"},children:"Not saved yet. Saving rescores everyone."})]}),o&&(0,b.jsx)(f.Status,{tone:o.tone,children:o.text})]})}var ae=a.i(90017),af=a.i(58834);let ag={"mac-app":"the Mac 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 ah(){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))},[]),af.IS_DEMO)return(0,b.jsxs)("div",{style:{minHeight:"100vh",background:"#0a0a1a",color:"rgba(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:"#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(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:"#0a0a1a",color:"#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:"#888",textDecoration:"none",fontSize:13,fontWeight:600,padding:"6px 14px",borderRadius:6,background:"rgba(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:"#ff7676",marginTop:16},children:h}),(0,b.jsx)(g,{}),(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:"#3498DB",textDecoration:"none",fontWeight:600},children:"your field"}),","," ",(0,b.jsx)("a",{href:"#tiers",style:{color:"#3498DB",textDecoration:"none",fontWeight:600},children:"how tiers are graded"}),","," ",(0,b.jsx)("a",{href:"#titles",style:{color:"#3498DB",textDecoration:"none",fontWeight:600},children:"how titles rank"})," and"," ",(0,b.jsx)("a",{href:"#companies",style:{color:"#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:"#3498DB",textDecoration:"none",fontWeight:600},children:"Profile → Insights"}),"."]}),(0,b.jsx)(R,{onSaved:l}),(0,b.jsx)(Y,{onSaved:l}),(0,b.jsx)(ad,{onSaved:l}),(0,b.jsx)("div",{id:"companies",style:{marginTop:28},children:(0,b.jsx)(ae.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 ",ag[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"===m.kind&&" Help → Show the Data Folder opens it."]}),(0,b.jsx)(f.Body,{style:{fontSize:12,color:"#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)(ah,{})})}],54209)}];
2
2
 
3
3
  //# sourceMappingURL=app_settings_page_1f8mjj_.js.map