six-degrees 0.5.0 → 0.6.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 (366) 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 +14 -14
  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 +1 -1
  10. package/.next/standalone/.next/server/app/_not-found/page.js.nft.json +1 -1
  11. package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  12. package/.next/standalone/.next/server/app/_not-found.html +1 -1
  13. package/.next/standalone/.next/server/app/_not-found.rsc +20 -19
  14. package/.next/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +20 -19
  15. package/.next/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +16 -15
  16. package/.next/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  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.nft.json +1 -1
  19. package/.next/standalone/.next/server/app/api/bridges/route.js.nft.json +1 -1
  20. package/.next/standalone/.next/server/app/api/bulk-import/route.js.nft.json +1 -1
  21. package/.next/standalone/.next/server/app/api/company-scores/legacy/route.js.nft.json +1 -1
  22. package/.next/standalone/.next/server/app/api/company-scores/route.js.nft.json +1 -1
  23. package/.next/standalone/.next/server/app/api/connections/route.js.nft.json +1 -1
  24. package/.next/standalone/.next/server/app/api/data/export/route.js.nft.json +1 -1
  25. package/.next/standalone/.next/server/app/api/data/import/route.js.nft.json +1 -1
  26. package/.next/standalone/.next/server/app/api/data/restart/route.js.nft.json +1 -1
  27. package/.next/standalone/.next/server/app/api/data/reveal/route.js.nft.json +1 -1
  28. package/.next/standalone/.next/server/app/api/data/route.js.nft.json +1 -1
  29. package/.next/standalone/.next/server/app/api/delete-cluster/route.js.nft.json +1 -1
  30. package/.next/standalone/.next/server/app/api/ingest/route.js.nft.json +1 -1
  31. package/.next/standalone/.next/server/app/api/network/route.js.nft.json +1 -1
  32. package/.next/standalone/.next/server/app/api/notifications/route.js.nft.json +1 -1
  33. package/.next/standalone/.next/server/app/api/outreach/route.js.nft.json +1 -1
  34. package/.next/standalone/.next/server/app/api/queue/route.js.nft.json +1 -1
  35. package/.next/standalone/.next/server/app/api/scraper/route.js.nft.json +1 -1
  36. package/.next/standalone/.next/server/app/api/settings/route.js.nft.json +1 -1
  37. package/.next/standalone/.next/server/app/api/settings/sector-preview/route.js.nft.json +1 -1
  38. package/.next/standalone/.next/server/app/api/settings/sector-suggestions/route.js.nft.json +1 -1
  39. package/.next/standalone/.next/server/app/api/setup-profile/route.js.nft.json +1 -1
  40. package/.next/standalone/.next/server/app/api/social/crm/route.js.nft.json +1 -1
  41. package/.next/standalone/.next/server/app/api/social/messages/route.js.nft.json +1 -1
  42. package/.next/standalone/.next/server/app/api/social/route.js.nft.json +1 -1
  43. package/.next/standalone/.next/server/app/api/unlock/route.js.nft.json +1 -1
  44. package/.next/standalone/.next/server/app/api/update/route.js +1 -1
  45. package/.next/standalone/.next/server/app/api/update/route.js.nft.json +1 -1
  46. package/.next/standalone/.next/server/app/api/update-images/route.js.nft.json +1 -1
  47. package/.next/standalone/.next/server/app/api/users/route.js.nft.json +1 -1
  48. package/.next/standalone/.next/server/app/avatars/[file]/route.js.nft.json +1 -1
  49. package/.next/standalone/.next/server/app/import/page.js +1 -1
  50. package/.next/standalone/.next/server/app/import/page.js.nft.json +1 -1
  51. package/.next/standalone/.next/server/app/import/page_client-reference-manifest.js +1 -1
  52. package/.next/standalone/.next/server/app/import.html +1 -1
  53. package/.next/standalone/.next/server/app/import.rsc +24 -23
  54. package/.next/standalone/.next/server/app/import.segments/_full.segment.rsc +24 -23
  55. package/.next/standalone/.next/server/app/import.segments/_tree.segment.rsc +2 -2
  56. package/.next/standalone/.next/server/app/import.segments/import/__PAGE__.segment.rsc +18 -17
  57. package/.next/standalone/.next/server/app/index.html +1 -1
  58. package/.next/standalone/.next/server/app/index.rsc +22 -21
  59. package/.next/standalone/.next/server/app/index.segments/__PAGE__.segment.rsc +18 -17
  60. package/.next/standalone/.next/server/app/index.segments/_full.segment.rsc +22 -21
  61. package/.next/standalone/.next/server/app/index.segments/_tree.segment.rsc +2 -2
  62. package/.next/standalone/.next/server/app/launch/page.js +1 -1
  63. package/.next/standalone/.next/server/app/launch/page.js.nft.json +1 -1
  64. package/.next/standalone/.next/server/app/launch/page_client-reference-manifest.js +1 -1
  65. package/.next/standalone/.next/server/app/launch.html +2 -2
  66. package/.next/standalone/.next/server/app/launch.rsc +24 -23
  67. package/.next/standalone/.next/server/app/launch.segments/_full.segment.rsc +24 -23
  68. package/.next/standalone/.next/server/app/launch.segments/_tree.segment.rsc +2 -2
  69. package/.next/standalone/.next/server/app/launch.segments/launch/__PAGE__.segment.rsc +18 -17
  70. package/.next/standalone/.next/server/app/page.js +1 -1
  71. package/.next/standalone/.next/server/app/page.js.nft.json +1 -1
  72. package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
  73. package/.next/standalone/.next/server/app/paths/page.js +1 -1
  74. package/.next/standalone/.next/server/app/paths/page.js.nft.json +1 -1
  75. package/.next/standalone/.next/server/app/paths/page_client-reference-manifest.js +1 -1
  76. package/.next/standalone/.next/server/app/paths.html +1 -1
  77. package/.next/standalone/.next/server/app/paths.rsc +24 -23
  78. package/.next/standalone/.next/server/app/paths.segments/_full.segment.rsc +24 -23
  79. package/.next/standalone/.next/server/app/paths.segments/_tree.segment.rsc +2 -2
  80. package/.next/standalone/.next/server/app/paths.segments/paths/__PAGE__.segment.rsc +18 -17
  81. package/.next/standalone/.next/server/app/profile/page.js +1 -1
  82. package/.next/standalone/.next/server/app/profile/page.js.nft.json +1 -1
  83. package/.next/standalone/.next/server/app/profile/page_client-reference-manifest.js +1 -1
  84. package/.next/standalone/.next/server/app/profile.html +1 -1
  85. package/.next/standalone/.next/server/app/profile.rsc +24 -23
  86. package/.next/standalone/.next/server/app/profile.segments/_full.segment.rsc +24 -23
  87. package/.next/standalone/.next/server/app/profile.segments/_tree.segment.rsc +2 -2
  88. package/.next/standalone/.next/server/app/profile.segments/profile/__PAGE__.segment.rsc +18 -17
  89. package/.next/standalone/.next/server/app/queue/page.js +1 -1
  90. package/.next/standalone/.next/server/app/queue/page.js.nft.json +1 -1
  91. package/.next/standalone/.next/server/app/queue/page_client-reference-manifest.js +1 -1
  92. package/.next/standalone/.next/server/app/queue.html +1 -1
  93. package/.next/standalone/.next/server/app/queue.rsc +24 -23
  94. package/.next/standalone/.next/server/app/queue.segments/_full.segment.rsc +24 -23
  95. package/.next/standalone/.next/server/app/queue.segments/_tree.segment.rsc +2 -2
  96. package/.next/standalone/.next/server/app/queue.segments/queue/__PAGE__.segment.rsc +18 -17
  97. package/.next/standalone/.next/server/app/scores/page.js +1 -1
  98. package/.next/standalone/.next/server/app/scores/page.js.nft.json +1 -1
  99. package/.next/standalone/.next/server/app/scores/page_client-reference-manifest.js +1 -1
  100. package/.next/standalone/.next/server/app/scores.html +1 -1
  101. package/.next/standalone/.next/server/app/scores.rsc +24 -23
  102. package/.next/standalone/.next/server/app/scores.segments/_full.segment.rsc +24 -23
  103. package/.next/standalone/.next/server/app/scores.segments/_tree.segment.rsc +2 -2
  104. package/.next/standalone/.next/server/app/scores.segments/scores/__PAGE__.segment.rsc +18 -17
  105. package/.next/standalone/.next/server/app/settings/page.js +1 -1
  106. package/.next/standalone/.next/server/app/settings/page.js.nft.json +1 -1
  107. package/.next/standalone/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  108. package/.next/standalone/.next/server/app/settings.html +1 -1
  109. package/.next/standalone/.next/server/app/settings.rsc +24 -23
  110. package/.next/standalone/.next/server/app/settings.segments/_full.segment.rsc +24 -23
  111. package/.next/standalone/.next/server/app/settings.segments/_tree.segment.rsc +2 -2
  112. package/.next/standalone/.next/server/app/settings.segments/settings/__PAGE__.segment.rsc +18 -17
  113. package/.next/standalone/.next/server/app/setup/page.js +1 -1
  114. package/.next/standalone/.next/server/app/setup/page.js.nft.json +1 -1
  115. package/.next/standalone/.next/server/app/setup/page_client-reference-manifest.js +1 -1
  116. package/.next/standalone/.next/server/app/setup.html +1 -1
  117. package/.next/standalone/.next/server/app/setup.rsc +24 -23
  118. package/.next/standalone/.next/server/app/setup.segments/_full.segment.rsc +24 -23
  119. package/.next/standalone/.next/server/app/setup.segments/_tree.segment.rsc +2 -2
  120. package/.next/standalone/.next/server/app/setup.segments/setup/__PAGE__.segment.rsc +18 -17
  121. package/.next/standalone/.next/server/app/social/page.js +1 -1
  122. package/.next/standalone/.next/server/app/social/page.js.nft.json +1 -1
  123. package/.next/standalone/.next/server/app/social/page_client-reference-manifest.js +1 -1
  124. package/.next/standalone/.next/server/app/social.html +1 -1
  125. package/.next/standalone/.next/server/app/social.rsc +24 -23
  126. package/.next/standalone/.next/server/app/social.segments/_full.segment.rsc +24 -23
  127. package/.next/standalone/.next/server/app/social.segments/_tree.segment.rsc +2 -2
  128. package/.next/standalone/.next/server/app/social.segments/social/__PAGE__.segment.rsc +18 -17
  129. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0-rnla2._.js +1 -1
  130. package/.next/standalone/.next/server/chunks/[root-of-the-server]__00la_y0._.js +1 -1
  131. package/.next/standalone/.next/server/chunks/[root-of-the-server]__05_3-22._.js +1 -1
  132. package/.next/standalone/.next/server/chunks/[root-of-the-server]__07t47cm._.js +1 -1
  133. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0cj5jqc._.js +1 -1
  134. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0e0fei3._.js +1 -1
  135. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0ljnyho._.js +1 -1
  136. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0o5-tcg._.js +1 -1
  137. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0qrnous._.js +1 -1
  138. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0t3v1a1._.js +1 -1
  139. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0um1uey._.js +1 -1
  140. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0wmexuc._.js +1 -1
  141. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0xu34sz._.js +1 -1
  142. package/.next/standalone/.next/server/chunks/[root-of-the-server]__133knx1._.js +1 -1
  143. package/.next/standalone/.next/server/chunks/[root-of-the-server]__13dx4sd._.js +1 -1
  144. package/.next/standalone/.next/server/chunks/[root-of-the-server]__14ou7j5._.js +1 -1
  145. package/.next/standalone/.next/server/chunks/[root-of-the-server]__15-17hl._.js +1 -1
  146. package/.next/standalone/.next/server/chunks/[root-of-the-server]__15wc9e-._.js +1 -1
  147. package/.next/standalone/.next/server/chunks/[root-of-the-server]__16iu0hv._.js +1 -1
  148. package/.next/standalone/.next/server/chunks/[root-of-the-server]__18bcnu4._.js +3 -0
  149. package/.next/standalone/.next/server/chunks/[root-of-the-server]__19b7mig._.js +1 -1
  150. package/.next/standalone/.next/server/chunks/[root-of-the-server]__1bbcwub._.js +2 -2
  151. package/.next/standalone/.next/server/chunks/[root-of-the-server]__1eris29._.js +1 -1
  152. package/.next/standalone/.next/server/chunks/[root-of-the-server]__1gjo_cq._.js +1 -1
  153. package/.next/standalone/.next/server/chunks/[root-of-the-server]__1kbl21f._.js +1 -1
  154. package/.next/standalone/.next/server/chunks/[root-of-the-server]__1qcm08_._.js +1 -1
  155. package/.next/standalone/.next/server/chunks/[root-of-the-server]__1rphsdk._.js +1 -1
  156. package/.next/standalone/.next/server/chunks/[root-of-the-server]__1tir0vc._.js +2 -2
  157. package/.next/standalone/.next/server/chunks/[root-of-the-server]__1w25q0m._.js +1 -1
  158. package/.next/standalone/.next/server/chunks/[root-of-the-server]__20rwfdw._.js +2 -2
  159. package/.next/standalone/.next/server/chunks/_1_fynia._.js +7 -7
  160. package/.next/standalone/.next/server/chunks/_1itd1o_._.js +2 -2
  161. package/.next/standalone/.next/server/chunks/lib_0851sk0._.js +5 -5
  162. package/.next/standalone/.next/server/chunks/lib_1q7p2ro._.js +5 -5
  163. package/.next/standalone/.next/server/chunks/lib_1r6l86l._.js +5 -5
  164. package/.next/standalone/.next/server/chunks/lib_db-client_15le7cw.js +9 -9
  165. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__08oxiqh._.js +3 -0
  166. package/.next/standalone/.next/server/chunks/ssr/_03l7vge._.js +1 -1
  167. package/.next/standalone/.next/server/chunks/ssr/_08g31gm._.js +3 -0
  168. package/.next/standalone/.next/server/chunks/ssr/_0gk_ofx._.js +3 -0
  169. package/.next/standalone/.next/server/chunks/ssr/_0nwsf93._.js +3 -0
  170. package/.next/standalone/.next/server/chunks/ssr/_0vho1lb._.js +3 -0
  171. package/.next/standalone/.next/server/chunks/ssr/{_0jdkqgi._.js → _1-658fq._.js} +2 -2
  172. package/.next/standalone/.next/server/chunks/ssr/_1bc46kz._.js +3 -0
  173. package/.next/standalone/.next/server/chunks/ssr/_1f_n00p._.js +3 -0
  174. package/.next/standalone/.next/server/chunks/ssr/_1fm1ih_._.js +9 -0
  175. package/.next/standalone/.next/server/chunks/ssr/_1k2nmbw._.js +9 -0
  176. package/.next/standalone/.next/server/chunks/ssr/_2105jz8._.js +3 -0
  177. package/.next/standalone/.next/server/chunks/ssr/app_141w189._.js +1 -1
  178. package/.next/standalone/.next/server/chunks/ssr/app_components_0t908t-._.js +3 -0
  179. package/.next/standalone/.next/server/chunks/ssr/app_components_0uuff77._.js +13 -0
  180. package/.next/standalone/.next/server/chunks/ssr/app_components_1j3q-h5._.js +13 -0
  181. package/.next/standalone/.next/server/chunks/ssr/{_0gtv9jb._.js → app_components_CompanyScores_1g0mytz.js} +2 -2
  182. package/.next/standalone/.next/server/chunks/ssr/app_components_settings_SectorPicker_1c-29qw.js +1 -1
  183. package/.next/standalone/.next/server/chunks/ssr/app_import_page_1fmu6_l.js +1 -1
  184. package/.next/standalone/.next/server/chunks/ssr/app_page_1fazqbf.js +14 -12
  185. package/.next/standalone/.next/server/chunks/ssr/app_paths_page_1ol90m7.js +2 -2
  186. package/.next/standalone/.next/server/chunks/ssr/app_profile_page_0u3-l5y.js +1 -1
  187. package/.next/standalone/.next/server/chunks/ssr/app_queue_page_0c6znd6.js +6 -6
  188. package/.next/standalone/.next/server/chunks/ssr/app_settings_page_1f8mjj_.js +1 -1
  189. package/.next/standalone/.next/server/chunks/ssr/app_setup_page_1-282zx.js +4 -4
  190. package/.next/standalone/.next/server/chunks/ssr/app_social_page_0h7zxda.js +1 -1
  191. package/.next/standalone/.next/server/chunks/ssr/{lib_0i8v-s3._.js → lib_1c4ieuw._.js} +2 -2
  192. package/.next/standalone/.next/server/chunks/ssr/lib_galaxy-lab_108_lu-.js +1 -1
  193. package/.next/standalone/.next/server/middleware-build-manifest.js +3 -3
  194. package/.next/standalone/.next/server/middleware-manifest.json +5 -5
  195. package/.next/standalone/.next/server/pages/404.html +1 -1
  196. package/.next/standalone/.next/server/pages/500.html +1 -1
  197. package/.next/standalone/.next/server/server-reference-manifest.js +1 -1
  198. package/.next/standalone/.next/server/server-reference-manifest.json +1 -1
  199. package/.next/standalone/.next/static/chunks/02pq76u7y4v9-.js +22 -0
  200. package/.next/standalone/.next/static/chunks/0cmq0exd4d0h9.js +1 -0
  201. package/.next/{static/chunks/2wgz9ietkqqe6.js → standalone/.next/static/chunks/0i02yxppzds1o.js} +1 -1
  202. package/.next/standalone/.next/static/chunks/0m_p4k-q2qh--.js +1 -0
  203. package/.next/standalone/.next/static/chunks/0oyslj62jkubd.js +1 -0
  204. package/.next/standalone/.next/static/chunks/{1x_ysly42-teq.css → 0vo-l8hxneba6.css} +1 -1
  205. package/.next/{static/chunks/3sowbvbaj1s6n.js → standalone/.next/static/chunks/0ws7zy0w57ufi.js} +1 -1
  206. package/.next/standalone/.next/static/chunks/0yh8z2tbrc5i_.js +1 -0
  207. package/.next/standalone/.next/static/chunks/172e10mi-tpo_.js +34 -0
  208. package/.next/standalone/.next/static/chunks/1ei5vbe2uw6fl.js +1 -0
  209. package/.next/standalone/.next/static/chunks/1f7_pl_wq7lh3.js +11 -0
  210. package/.next/standalone/.next/static/chunks/1jzbe7zdx9vbj.js +2 -0
  211. package/.next/standalone/.next/static/chunks/1m3017gp790pw.js +45 -0
  212. package/.next/standalone/.next/static/chunks/1t20e8u0st7ep.js +1 -0
  213. package/.next/standalone/.next/static/chunks/2-ch9rm27eril.js +11 -0
  214. package/.next/standalone/.next/static/chunks/2ldv-v3s9yaif.js +1 -0
  215. package/.next/standalone/.next/static/chunks/3bp284gjf7dyq.js +1 -0
  216. package/.next/standalone/.next/static/chunks/3k1f6clbn3gj3.js +7 -0
  217. package/.next/standalone/.next/static/chunks/3l4t8je6iguzc.js +1 -0
  218. package/.next/standalone/.next/static/chunks/{0muwt9bykzr-1.js → 3tplzuc9jk-tl.js} +1 -1
  219. package/.next/standalone/.next/static/chunks/42m0bqr8pbovz.js +11 -0
  220. package/.next/standalone/CHANGELOG.md +61 -0
  221. package/.next/standalone/README.md +22 -8
  222. package/.next/standalone/app/api/scraper/route.js +40 -3
  223. package/.next/standalone/app/api/update/route.js +12 -6
  224. package/.next/standalone/app/components/AppHeader.js +257 -0
  225. package/.next/standalone/app/components/Avatar.js +2 -1
  226. package/.next/standalone/app/components/ChainView.js +12 -12
  227. package/.next/standalone/app/components/FilterPanel.js +20 -12
  228. package/.next/standalone/app/components/ForceGraph.js +163 -25
  229. package/.next/standalone/app/components/GalaxyLab.js +43 -12
  230. package/.next/standalone/app/components/GridView.js +4 -4
  231. package/.next/standalone/app/components/LinkedInLimits.js +2 -1
  232. package/.next/standalone/app/components/ListView.js +3 -3
  233. package/.next/standalone/app/components/NoteDetail.js +2 -1
  234. package/.next/standalone/app/components/OnboardingGate.js +2 -2
  235. package/.next/standalone/app/components/OutlinkQuest.js +2 -1
  236. package/.next/standalone/app/components/PathsAnalyzer.js +3 -2
  237. package/.next/standalone/app/components/PeopleMap.js +2 -1
  238. package/.next/standalone/app/components/RingsView.js +3 -3
  239. package/.next/standalone/app/components/ScanTrail.js +85 -0
  240. package/.next/standalone/app/components/SeparationView.js +100 -77
  241. package/.next/standalone/app/components/Sidebar.js +4 -4
  242. package/.next/standalone/app/components/TheirCircle.js +2 -1
  243. package/.next/standalone/app/components/ThemeLoader.js +9 -0
  244. package/.next/standalone/app/components/UpdatePanel.js +20 -2
  245. package/.next/standalone/app/components/settings/AppearanceSection.js +226 -0
  246. package/.next/standalone/app/components/settings/NetworkHealthSection.js +2 -1
  247. package/.next/standalone/app/components/ui.js +2 -1
  248. package/.next/standalone/app/globals.css +70 -2
  249. package/.next/standalone/app/import/page.js +3 -3
  250. package/.next/standalone/app/layout.js +11 -2
  251. package/.next/standalone/app/page.js +69 -215
  252. package/.next/standalone/app/paths/page.js +8 -21
  253. package/.next/standalone/app/profile/page.js +11 -10
  254. package/.next/standalone/app/queue/page.js +8 -21
  255. package/.next/standalone/app/scores/page.js +1 -1
  256. package/.next/standalone/app/settings/page.js +7 -3
  257. package/.next/standalone/app/setup/page.js +83 -88
  258. package/.next/standalone/app/social/Crm.js +2 -1
  259. package/.next/standalone/app/social/SocialHub.js +2 -2
  260. package/.next/standalone/app/social/page.js +1 -1
  261. package/.next/standalone/lib/data-import.js +1 -0
  262. package/.next/standalone/lib/galaxy-export.js +2 -1
  263. package/.next/standalone/lib/galaxy-lab.js +24 -8
  264. package/.next/standalone/lib/level.js +51 -0
  265. package/.next/standalone/lib/release.js +13 -7
  266. package/.next/standalone/lib/scanner-python.js +38 -8
  267. package/.next/standalone/lib/scraper-client.js +2 -1
  268. package/.next/standalone/lib/separation.js +4 -2
  269. package/.next/standalone/lib/theme-store.js +61 -0
  270. package/.next/standalone/lib/themes.js +186 -0
  271. package/.next/standalone/lib/tiers.js +2 -8
  272. package/.next/standalone/package-lock.json +2 -2
  273. package/.next/standalone/package.json +4 -4
  274. package/.next/standalone/scripts/build-desktop.mjs +325 -0
  275. package/.next/standalone/scripts/build-site.mjs +85 -15
  276. package/.next/standalone/scripts/gen-test-network.mjs +93 -0
  277. package/.next/standalone/scripts/next.mjs +20 -0
  278. package/.next/standalone/scripts/readme_buttons.py +3 -0
  279. package/.next/standalone/scripts/requirements.txt +18 -1
  280. package/.next/standalone/scripts/site-news.mjs +54 -9
  281. package/.next/standalone/scripts/smoke-desktop.mjs +177 -0
  282. package/.next/standalone/scripts/windows/six-degrees.iss +100 -0
  283. package/.next/static/chunks/02pq76u7y4v9-.js +22 -0
  284. package/.next/static/chunks/0cmq0exd4d0h9.js +1 -0
  285. package/.next/{standalone/.next/static/chunks/2wgz9ietkqqe6.js → static/chunks/0i02yxppzds1o.js} +1 -1
  286. package/.next/static/chunks/0m_p4k-q2qh--.js +1 -0
  287. package/.next/static/chunks/0oyslj62jkubd.js +1 -0
  288. package/.next/static/chunks/{1x_ysly42-teq.css → 0vo-l8hxneba6.css} +1 -1
  289. package/.next/{standalone/.next/static/chunks/3sowbvbaj1s6n.js → static/chunks/0ws7zy0w57ufi.js} +1 -1
  290. package/.next/static/chunks/0yh8z2tbrc5i_.js +1 -0
  291. package/.next/static/chunks/172e10mi-tpo_.js +34 -0
  292. package/.next/static/chunks/1ei5vbe2uw6fl.js +1 -0
  293. package/.next/static/chunks/1f7_pl_wq7lh3.js +11 -0
  294. package/.next/static/chunks/1jzbe7zdx9vbj.js +2 -0
  295. package/.next/static/chunks/1m3017gp790pw.js +45 -0
  296. package/.next/static/chunks/1t20e8u0st7ep.js +1 -0
  297. package/.next/static/chunks/2-ch9rm27eril.js +11 -0
  298. package/.next/static/chunks/2ldv-v3s9yaif.js +1 -0
  299. package/.next/static/chunks/3bp284gjf7dyq.js +1 -0
  300. package/.next/static/chunks/3k1f6clbn3gj3.js +7 -0
  301. package/.next/static/chunks/3l4t8je6iguzc.js +1 -0
  302. package/.next/static/chunks/{0muwt9bykzr-1.js → 3tplzuc9jk-tl.js} +1 -1
  303. package/.next/static/chunks/42m0bqr8pbovz.js +11 -0
  304. package/CHANGELOG.md +61 -0
  305. package/README.md +22 -8
  306. package/lib/data-import.js +1 -0
  307. package/lib/galaxy-export.js +2 -1
  308. package/lib/galaxy-lab.js +24 -8
  309. package/lib/level.js +51 -0
  310. package/lib/release.js +13 -7
  311. package/lib/scanner-python.js +38 -8
  312. package/lib/scraper-client.js +2 -1
  313. package/lib/separation.js +4 -2
  314. package/lib/theme-store.js +61 -0
  315. package/lib/themes.js +186 -0
  316. package/lib/tiers.js +2 -8
  317. package/package.json +4 -4
  318. package/scripts/requirements.txt +18 -1
  319. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0ljcioj._.js +0 -3
  320. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__16hs8kw._.js +0 -3
  321. package/.next/standalone/.next/server/chunks/ssr/_01kacen._.js +0 -3
  322. package/.next/standalone/.next/server/chunks/ssr/_0xi-fbs._.js +0 -3
  323. package/.next/standalone/.next/server/chunks/ssr/_0xmwmfv._.js +0 -3
  324. package/.next/standalone/.next/server/chunks/ssr/_1-b9hj7._.js +0 -9
  325. package/.next/standalone/.next/server/chunks/ssr/_112ewem._.js +0 -3
  326. package/.next/standalone/.next/server/chunks/ssr/_16ab63q._.js +0 -3
  327. package/.next/standalone/.next/server/chunks/ssr/_1fxm0-s._.js +0 -3
  328. package/.next/standalone/.next/server/chunks/ssr/_1ra1d3r._.js +0 -9
  329. package/.next/standalone/.next/server/chunks/ssr/app_components_ui_0pdmz2z.js +0 -3
  330. package/.next/standalone/.next/server/chunks/ssr/lib_13rapwj._.js +0 -3
  331. package/.next/standalone/.next/static/chunks/03bziijw5srol.js +0 -1
  332. package/.next/standalone/.next/static/chunks/0bgq8wmopl_ig.js +0 -7
  333. package/.next/standalone/.next/static/chunks/0ezus6p2eb-vg.js +0 -1
  334. package/.next/standalone/.next/static/chunks/0g_fy2034bp0x.js +0 -34
  335. package/.next/standalone/.next/static/chunks/0q5dru4q6gxl5.js +0 -22
  336. package/.next/standalone/.next/static/chunks/0w-byiwb2zax8.js +0 -2
  337. package/.next/standalone/.next/static/chunks/1g7jcovdejc9-.js +0 -1
  338. package/.next/standalone/.next/static/chunks/1i51yylxdzht1.js +0 -1
  339. package/.next/standalone/.next/static/chunks/1zf8swaasjf1e.js +0 -43
  340. package/.next/standalone/.next/static/chunks/2dwtoszeq91us.js +0 -1
  341. package/.next/standalone/.next/static/chunks/2rqtpccruavf2.js +0 -1
  342. package/.next/standalone/.next/static/chunks/30x3oq_st7a5r.js +0 -1
  343. package/.next/standalone/.next/static/chunks/355ryio1b7sm1.js +0 -1
  344. package/.next/standalone/.next/static/chunks/3ap5hgma7n0o7.js +0 -1
  345. package/.next/standalone/.next/static/chunks/3fci6qi39-1n5.js +0 -1
  346. package/.next/static/chunks/03bziijw5srol.js +0 -1
  347. package/.next/static/chunks/0bgq8wmopl_ig.js +0 -7
  348. package/.next/static/chunks/0ezus6p2eb-vg.js +0 -1
  349. package/.next/static/chunks/0g_fy2034bp0x.js +0 -34
  350. package/.next/static/chunks/0q5dru4q6gxl5.js +0 -22
  351. package/.next/static/chunks/0w-byiwb2zax8.js +0 -2
  352. package/.next/static/chunks/1g7jcovdejc9-.js +0 -1
  353. package/.next/static/chunks/1i51yylxdzht1.js +0 -1
  354. package/.next/static/chunks/1zf8swaasjf1e.js +0 -43
  355. package/.next/static/chunks/2dwtoszeq91us.js +0 -1
  356. package/.next/static/chunks/2rqtpccruavf2.js +0 -1
  357. package/.next/static/chunks/30x3oq_st7a5r.js +0 -1
  358. package/.next/static/chunks/355ryio1b7sm1.js +0 -1
  359. package/.next/static/chunks/3ap5hgma7n0o7.js +0 -1
  360. package/.next/static/chunks/3fci6qi39-1n5.js +0 -1
  361. /package/.next/standalone/.next/static/{I-cj79yE2IZ8taX2dZGp3 → dQUvvVSXqbkEFC3-CNcwT}/_buildManifest.js +0 -0
  362. /package/.next/standalone/.next/static/{I-cj79yE2IZ8taX2dZGp3 → dQUvvVSXqbkEFC3-CNcwT}/_clientMiddlewareManifest.js +0 -0
  363. /package/.next/standalone/.next/static/{I-cj79yE2IZ8taX2dZGp3 → dQUvvVSXqbkEFC3-CNcwT}/_ssgManifest.js +0 -0
  364. /package/.next/static/{I-cj79yE2IZ8taX2dZGp3 → dQUvvVSXqbkEFC3-CNcwT}/_buildManifest.js +0 -0
  365. /package/.next/static/{I-cj79yE2IZ8taX2dZGp3 → dQUvvVSXqbkEFC3-CNcwT}/_clientMiddlewareManifest.js +0 -0
  366. /package/.next/static/{I-cj79yE2IZ8taX2dZGp3 → dQUvvVSXqbkEFC3-CNcwT}/_ssgManifest.js +0 -0
@@ -0,0 +1,45 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,81694,e=>{"use strict";var t=e.i(43476),n=e.i(71645),r=e.i(18566),i=e.i(40996),o=e.i(30215),l=e.i(28867),s=e.i(86106),a=e.i(19821);e.i(47716);var d=e.i(23685),c=e.i(57161),h=e.i(48708),p=e.i(21972),p=p,g=e.i(7394),g=g,u=g,f=e.i(60208),x=e.i(36755),x=x,y=e.i(43079),m=e.i(77899),b=e.i(17983),j=e.i(52048),S=e.i(47560),w=e.i(36534),v=e.i(23731),k=e.i(91889),$=e.i(561),C=e.i(90273),z=e.i(36377);let _=e=>()=>e;function M(e,{sourceEvent:t,subject:n,target:r,identifier:i,active:o,x:l,y:s,dx:a,dy:d,dispatch:c}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},identifier:{value:i,enumerable:!0,configurable:!0},active:{value:o,enumerable:!0,configurable:!0},x:{value:l,enumerable:!0,configurable:!0},y:{value:s,enumerable:!0,configurable:!0},dx:{value:a,enumerable:!0,configurable:!0},dy:{value:d,enumerable:!0,configurable:!0},_:{value:c}})}function R(e){return!e.ctrlKey&&!e.button}function W(){return this.parentNode}function T(e,t){return null==t?{x:e.x,y:e.y}:t}function F(){return navigator.maxTouchPoints||"ontouchstart"in this}M.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};var I=e.i(36774);function E({x:e,y:t,k:n},r,i){return{x:e+(i.width-r.width)/2,y:t+(i.height-r.height)/2,k:n}}var O=e.i(48235);let B="rgba(255,255,255,0.16)";var L=e.i(39160),A=e.i(61121),D=e.i(54322),P=e.i(7214);function N(e){return String(e??"").replace(/[&<>"']/g,e=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"})[e])}let H="__center__";function q(){return window.matchMedia?.("(prefers-reduced-motion: reduce)").matches??!1}let Y=`
2
+ @keyframes galaxy-ring-pulse {
3
+ 0%, 100% { opacity: 0.5; transform: scale(1); }
4
+ 50% { opacity: 1; transform: scale(1.12); }
5
+ }
6
+ .galaxy-ring-pulse { animation: galaxy-ring-pulse 1.8s ease-in-out infinite; }
7
+ .lab-focus .gn:not(.lit), .lab-focus .gl:not(.lit) { opacity: 0.06; }
8
+ .lab-focus .gl.lit { stroke-opacity: 0.7; }
9
+ .lab-focus .dot-rings, .lab-focus .catalyst-ring { opacity: 0.15; }
10
+ .lab-find .gn:not(.found), .lab-find .gl:not(.found) { opacity: 0.07; }
11
+ .lab-find .gn.found { stroke: #fff; stroke-width: 2px; }
12
+ .far text:not(.hub) { opacity: 0; }
13
+ @media (prefers-reduced-motion: no-preference) { .far text, g:not(.far) > text { transition: opacity 0.25s; } }
14
+ @keyframes lab-pop { from { opacity: 0; } }
15
+ @media (prefers-reduced-motion: no-preference) { .lab-pop .gn, .lab-pop .gl { animation: lab-pop 0.5s ease-out; } }
16
+ @media (prefers-reduced-motion: reduce) {
17
+ .galaxy-ring-pulse { animation: none; opacity: 0.8; }
18
+ }`;function U(e,t){let n=d.select(e);q()?n.interrupt("hover").attr("r",t):n.transition("hover").duration(150).ease(p.cubicOut).attr("r",t)}var X=e.i(22016);let V=e=>e?.unlock_status==="pending";function G(e=[],t=[]){let n=new Map;for(let e of t||[]){let t=e?.source_connection_id;if(null==t)continue;let r=n.get(t);r||n.set(t,r=[]),r.push(e)}let r=new Map;for(let t of e||[]){let e=t?.unlocked_from_bridge_id;if(null==e||1!==t.degree)continue;let n=r.get(e);n||r.set(e,n=[]),n.push(t)}return{circles:n,introduced:r}}let K={connected:0,requested:1},Z=(e,t)=>(K[e.state]??2)-(K[t.state]??2)||(0,P.score1)(t.row)-(0,P.score1)(e.row)||String(e.row.name||"").localeCompare(String(t.row.name||"")),J=(e,t,n)=>Math.min(n,Math.max(t,e)),Q=2*Math.PI;function ee(e,t,n){if(e<=0)return 1;let r=n*e;return Math.max(1,n>=Q-1e-9?Math.floor(r/t):Math.floor(r/t)+1)}function et(e,t,n,r,i=n){let o=[],l=0;for(let s=t;l<e;s+=Math.max(n,i))o.push(s),l+=ee(s,n,r);return o}let en=(e,t,n,r,i)=>{let o=et(e,t,n,r,i);return o[o.length-1]};function er(e,{inner:t,outer:n,spacing:r,minSpacing:i=r/3,innerMin:o=t,start:l=-Math.PI/2,sweep:s=Q,ringGap:a=0}={}){let d=Math.max(0,Math.floor(e)||0);if(!d)return{spacing:r,inner:t,rings:[],points:[]};let c=r,h=t;if(en(d,h,c,s,a)>n)if(en(d,o,c,s,a)<=n){let e=o,r=t;for(let t=0;t<24;t++){let t=(e+r)/2;en(d,t,c,s,a)<=n?e=t:r=t}h=e}else{let e=i,t=r;if(en(d,h=o,e,s,a)<=n)for(let r=0;r<24;r++){let r=(e+t)/2;en(d,h,r,s,a)<=n?e=r:t=r}c=e}let p=et(d,h,c,s,a),g=p.map(e=>ee(e,c,s)),u=g.reduce((e,t)=>e+t,0),f=g.map(e=>Math.min(e,Math.floor(d*e/u))),x=d-f.reduce((e,t)=>e+t,0);for(;x>0;){let e=-1;for(let t=0;t<g.length;t++)f[t]<g[t]&&(e<0||g[t]-f[t]>g[e]-f[e])&&(e=t);f[e]++,x--}let y=s>=Q-1e-9,m=[],b=[];return p.forEach((e,t)=>{let n=f[t];if(!n)return;b.push({radius:e,count:n});let r=y?Q/n:n>1?s/(n-1):0,i=y?l+(t%2?r/2:0):n>1?l:l+s/2,o=y?null:function(e){let t=Math.floor((e-1)/2),n=t+1,r=[t--];for(;r.length<e;)n<e&&r.push(n++),r.length<e&&t>=0&&r.push(t--);return r}(n);for(let t=0;t<n;t++){let n=i+(o?o[t]:t)*r;m.push({x:e*Math.cos(n),y:e*Math.sin(n),angle:n,ring:b.length-1})}}),{spacing:c,inner:h,rings:b,points:m}}function ei(e,t){return Math.max(1.4,Math.min(7,.42*e*("S"===t?1:"A"===t?.86:"B"===t?.72:.6)))}let eo=["S","A","B","C","D"];var el=e.i(64666);let es={1:"#FFD700",2:"#FF6B35",3:"#3498DB",4:"#9B59B6",5:"#00ff88",6:"#ff5050"},ea={S:0,A:1,B:2,C:3,D:4},ed="#00ff88",ec="#5a5a66",eh=(e,t)=>(ea[e.tier]??9)-(ea[t.tier]??9)||(0,P.score)(t)-(0,P.score)(e)||String(e.name||"").localeCompare(String(t.name||"")),ep=e=>String(e?.name||"").trim().split(/\s+/)[0]||"them",eg=e=>`/setup?scan=${encodeURIComponent(e.id)}`,eu=e=>`${e}${e%10==1&&11!==e?"st":e%10==2&&12!==e?"nd":e%10==3&&13!==e?"rd":"th"}`,ef=()=>{let e=(0,i.scannerNow)();return e.running&&(0,i.isCircleScan)(e)?e.target?.id??null:null},ex=()=>null,ey=()=>()=>{},em="(prefers-reduced-motion: reduce)";function eb(e){let t=window.matchMedia?window.matchMedia(em):null;return t?.addEventListener?.("change",e),()=>t?.removeEventListener?.("change",e)}let ej=()=>!!window.matchMedia?.(em).matches,eS=()=>!0;function ew(e,t){let n=new Set([(0,P.keyFor)(e)]),r=e=>{let t=[];for(let r of e||[]){let e=(0,P.keyFor)(r);n.has(e)||(n.add(e),t.push(r))}return t.sort(eh)};return[...r(t.introduced.get(e.id)),...r(t.circles.get(e.id))]}function ev(e,t){if(!e)return[];let n=t.find(t=>t.id===e);if(!n)return[];let r=n.unlocked_from_bridge_id;return null!=r&&t.some(e=>e.id===r)?[r,e]:[e]}function ek({bridge:e,members:n,reach:r,cx:i,cy:o,maxR:l,still:s,band:a}){let d=n.filter(e=>1===e.degree||"S"===e.tier||"A"===e.tier||"B"===e.tier),{inner:c,outer:h}=a,p=Math.min(.9*Math.PI,Math.max(.2*Math.PI,11*d.length/c)),g=er(d.length,{inner:c,outer:h,spacing:11,minSpacing:3.5,start:e.angle-p/2,sweep:p});return(0,t.jsxs)("g",{children:[(0,t.jsx)("circle",{cx:i,cy:o,r:c,fill:"none",stroke:`${es[2]}06`,strokeWidth:1}),d.map((n,l)=>{let a=g.points[l],c=i+a.x,h=o+a.y,p=(0,O.reachState)(n,r),u=Math.min(ei(g.spacing,n.tier),5)*(p?1.3:1),f="hidden"===p?ec:D.TIER_COLORS[n.tier]||"#555";return(0,t.jsxs)("g",{children:[(p||d.length<=40)&&(0,t.jsx)("line",{x1:e.x,y1:e.y,x2:c,y2:h,stroke:p?ed:f,strokeWidth:.5,strokeOpacity:p?.35:.15}),"ready"===p&&(0,t.jsx)(e$,{x:c,y:h,r:2.3*u,still:s}),(0,t.jsx)("circle",{cx:c,cy:h,r:u,fill:f,fillOpacity:p?.95:.45,stroke:p&&"hidden"!==p?ed:f,strokeWidth:p?1:.5,strokeOpacity:p?1:.25}),("S"===n.tier||p)&&d.length<=60&&(0,t.jsx)("text",{x:c,y:h+u+9,textAnchor:"middle",fill:p&&"hidden"!==p?ed:"#aaa",fontSize:7,children:ep(n)})]},"pv-"+n.id)})]})}function e$({x:e,y:n,r,still:i}){return(0,t.jsxs)("circle",{cx:e,cy:n,r:r,fill:ed,fillOpacity:.16,stroke:ed,strokeWidth:.8,strokeOpacity:.45,pointerEvents:"none",children:[!i&&(0,t.jsx)("animate",{attributeName:"fill-opacity",values:"0.06;0.24;0.06",dur:"2.8s",repeatCount:"indefinite"}),!i&&(0,t.jsx)("animate",{attributeName:"stroke-opacity",values:"0.25;0.7;0.25",dur:"2.8s",repeatCount:"indefinite"})]})}function eC({x:e,y:n,s:r}){return(0,t.jsxs)("g",{transform:`translate(${e} ${n}) scale(${r})`,pointerEvents:"none",children:[(0,t.jsx)("path",{d:"M-1.9 -0.6 V-1.8 A1.9 1.9 0 0 1 1.9 -1.8 V-0.6",fill:"none",stroke:"#d6d6de",strokeWidth:.9}),(0,t.jsx)("rect",{x:-2.6,y:-.7,width:5.2,height:3.9,rx:.8,fill:"#d6d6de"})]})}function ez({onIn:e,onReset:n,onOut:r}){let i=e=>({width:32,height:32,borderRadius:"50%",border:"none",cursor:"pointer",background:e?"rgba(255,255,255,0.06)":"rgba(255,255,255,0.1)",color:e?"#666":"#fff",fontSize:e?10:18,fontWeight:700,display:"flex",alignItems:"center",justifyContent:"center",backdropFilter:"blur(8px)"});return(0,t.jsxs)("div",{style:{position:"absolute",bottom:64,right:20,zIndex:20,display:"flex",flexDirection:"column",gap:4},children:[(0,t.jsx)("button",{type:"button",onClick:e,"aria-label":"Zoom in",style:i(!1),children:"+"}),(0,t.jsx)("button",{type:"button",onClick:n,"aria-label":"Fit to the window",style:i(!0),children:"⊙"}),(0,t.jsx)("button",{type:"button",onClick:r,"aria-label":"Zoom out",style:i(!1),children:"−"})]})}function e_({trail:e,index:i,reach:o,dims:l,requests:a,scanningId:d,still:c,canScan:h,onOpen:p,onBack:g,onSelect:u}){var f,x,y,m,b;let j,S,w,v=e[e.length-1],k=e.length,$=(0,n.useMemo)(()=>ew(v,i),[v,i]),C=e.map(e=>e.id).join(">"),z=(0,n.useMemo)(()=>(function(e,t,n=[],r=6){let i=[],o=new Set([e.id,...n]),l=e=>(t.circles.get(e.id)?.length||0)+(t.introduced.get(e.id)?.length||0),s=(e,n,a)=>{if(a>r)return;let d=(t.introduced.get(e.id)||[]).filter(e=>l(e)>0&&!o.has(e.id)).sort((e,t)=>l(t)-l(e)||String(e.name||"").localeCompare(String(t.name||"")));for(let e of(d.forEach(e=>o.add(e.id)),d))i.push({row:e,parent:n,step:a}),s(e,i.length-1,a+1)};return s(e,-1,1),i})(v,i,C.split(">"),Math.max(0,5-k)),[v,i,C,k]),[_,M]=(0,n.useState)(null),[R,W]=(0,n.useState)(null),T=(0,n.useRef)(null),F=(0,n.useRef)(null),E=(0,r.useRouter)(),B=l.w/2,L=l.h/2,A=Math.min(B,L)-30,N=l.w>=l.h?0:Math.PI/2,H=z.length>0,q=(0,n.useMemo)(()=>(function(e,{inner:t,outer:n,spacing:r,minSpacing:i=r/3,gap:o=r,start:l=-Math.PI/2}){let s=eo.map(e=>({tier:e,idx:[]}));e.forEach((e,t)=>{let n=eo.indexOf(e?.tier);s[n<0?4:n].idx.push(t)});let a=s.filter(e=>e.idx.length),d=n=>{let i=Array(e.length),s=[],d=t;for(let e of a){let t=er(e.idx.length,{inner:d,outer:1/0,spacing:n,minSpacing:n,start:l});e.idx.forEach((e,n)=>{let r=t.points[n];i[e]={x:r.x,y:r.y,angle:r.angle,slot:Q/t.rings[r.ring].count}});let a=Math.max(d,...t.rings.map(e=>e.radius));s.push({tier:e.tier,inner:d,outer:a}),d=a+n/r*o}return{spacing:n,points:i,bands:s,edge:s.length?s[s.length-1].outer:t}},c=d(r);if(c.edge<=n)return c;let h=i,p=r;if((c=d(h)).edge>n)return c;for(let e=0;e<20;e++){let e=(h+p)/2,t=d(e);t.edge<=n?(h=e,c=t):p=e}return c})($,{inner:Math.max(62,.3*A),outer:A*(H?.72:.94),spacing:Math.max(14,Math.min(24,.085*A)),minSpacing:4,gap:Math.max(10,.04*A),start:H?N:-Math.PI/2}),[$,A,H,N]),Y=(0,n.useMemo)(()=>z.map(({row:e})=>{let t=ew(e,i),n=er(Math.min(t.length,eM),eF);return{people:t,radius:(n.rings[n.rings.length-1]?.radius||eW)+6}}),[z,i]),U=(0,n.useMemo)(()=>{if(!z.length)return null;let e=Math.max(...Y.map(e=>e.radius)),t=new Map($.map((e,t)=>[e.id,t]));return function(e=[],{from:t=0,hop:n=60,spacing:r=46,toward:i=0,angles:o=[]}={}){let l=e.length,s=e.map((e,t)=>Number.isInteger(e)&&e>=0&&e<l&&e!==t?e:-1),a=Array(l).fill(0);for(let e=0;e<l;e++){let t=[],n=e;for(;n>=0&&!a[n]&&!t.includes(n);)t.push(n),n=s[n];n>=0&&!a[n]&&(s[t[t.length-1]]=-1,n=-1);let r=n>=0?a[n]+1:1;for(let e=t.length-1;e>=0;e--)a[t[e]]=r++}let d=Array(l),c=[];for(let e=1;e<=Math.max(0,...a);e++){let h=[];for(let t=0;t<l;t++)a[t]===e&&h.push(t);let p=t+(e-1)*n,g=function(e,t){let n=e.length;if(n<2)return e.slice();let r=e=>(e%Q+Q)%Q,i=e.map((e,t)=>t).sort((t,n)=>r(e[t])-r(e[n])||t-n),o=0,l=-1;i.forEach((t,s)=>{let a=r(r(e[i[(s+1)%n]])-r(e[t]))||(n>1&&s===n-1?Q:0);a>l&&(l=a,o=(s+1)%n)});let s=i.slice(o).concat(i.slice(0,o)),a=r(e[s[0]]),d=s.map(t=>a+r(r(e[t])-a)),c=[];d.forEach((e,n)=>{for(c.push({sum:e-n*t,count:1});c.length>1&&c[c.length-2].sum/c[c.length-2].count>c[c.length-1].sum/c[c.length-1].count;){let e=c.pop();c[c.length-1].sum+=e.sum,c[c.length-1].count+=e.count}});let h=c.flatMap(e=>Array(e.count).fill(e.sum/e.count)).map((e,n)=>e+n*t);if(h[n-1]-h[0]>Q-t){let e=(h[0]+h[n-1])/2;h=h.map((t,r)=>e+Q/n*(r-(n-1)/2))}let p=Array(n);return s.forEach((e,t)=>{p[e]=h[t]}),p}(h.map(e=>s[e]<0?Number.isFinite(o[e])?o[e]:i:d[s[e]].angle),Math.min(r/Math.max(1,p),Q/h.length));h.forEach((t,n)=>{let r=g[n];d[t]={x:p*Math.cos(r),y:p*Math.sin(r),angle:r,radius:p,depth:e,parent:s[t]}}),c.push({radius:p,count:h.length,depth:e})}return{rings:c,points:d}}(z.map(e=>e.parent),{from:q.edge+q.spacing+e+22,hop:2*e+46,spacing:2*e+26,toward:N,angles:z.map(e=>e.parent<0?q.points[t.get(e.row.id)]?.angle:void 0)})},[z,Y,$,q,N]),X=(0,n.useMemo)(()=>Y.map((e,t)=>({...e,points:er(Math.min(e.people.length,eM),{...eF,start:U.points[t].angle}).points})),[Y,U]),V=(0,n.useMemo)(()=>{let e=new Map($.map((e,t)=>[e.id,t]));return z.map(t=>{if(t.parent<0){let n=q.points[e.get(t.row.id)];return n?{x:n.x,y:n.y,r:1.4*ei(q.spacing,t.row.tier),back:{x:0,y:0,r:30}}:{x:0,y:0,r:30,back:null}}let n=U.points[t.parent],r=X[t.parent].people.findIndex(e=>e.id===t.row.id),i=X[t.parent].points[r]||{x:0,y:0};return{x:n.x+i.x,y:n.y+i.y,r:eT,inCluster:!0,back:{x:n.x,y:n.y,r:eR}}})},[z,$,q,U,X]),G=(0,n.useMemo)(()=>{if(!U)return{k:1,x:0,y:0};let e={l:-q.edge,r:q.edge,t:-q.edge,b:q.edge};U.points.forEach((t,n)=>{let r=X[n].radius;e.l=Math.min(e.l,t.x-r-30),e.r=Math.max(e.r,t.x+r+30),e.t=Math.min(e.t,t.y-r-8),e.b=Math.max(e.b,t.y+r+30)});let t=Math.max(.35,Math.min(1,(l.w-140)/(e.r-e.l),(l.h-96-30)/(e.b-e.t)));return{k:t,x:-(e.l+e.r)/2*t,y:-(e.t+e.b)/2*t+33}},[U,X,q,l.w,l.h]),K=R??G,Z=e=>W(t=>"function"==typeof e?e(t??G):e),J=(0,n.useMemo)(()=>$.map(e=>{let t=(0,O.reachState)(e,o);return{reached:t,requested:!t&&2===e.degree&&(0,s.hasRequest)(e,a),own:1===e.degree?(i.circles.get(e.id)?.length||0)+(i.introduced.get(e.id)?.length||0):0}}),[$,o,a,i]),ee=e=>h&&"ready"===J[e].reached&&$[e].id!==d,et=K.k,en=(0,n.useMemo)(()=>{let e=$.length<=60,n=q.spacing*et>=26,r=0;return $.map((i,o)=>{let l=q.points[o],s=J[o],a=ei(q.spacing,i.tier)*(s.reached?1.4:1),h="hidden"===s.reached?ec:D.TIER_COLORS[i.tier]||"#555",p=!!s.reached&&r++%2==1;return(0,t.jsxs)("g",{children:[(e||s.reached)&&(0,t.jsx)("line",{x1:0,y1:0,x2:l.x,y2:l.y,stroke:s.reached?ed:h,strokeWidth:.6/et,strokeOpacity:s.reached?.3:.12}),"ready"===s.reached&&(0,t.jsx)(e$,{x:l.x,y:l.y,r:2.3*a,still:c}),s.requested?(0,t.jsx)("circle",{cx:l.x,cy:l.y,r:1.2*a,fill:"none",stroke:h,strokeWidth:Math.max(.6,.45*a),strokeDasharray:`${Math.max(.8,.55*a)} ${Math.max(.6,.45*a)}`}):(0,t.jsx)("circle",{cx:l.x,cy:l.y,r:a,fill:h,fillOpacity:s.reached?1:.85,stroke:s.reached&&"hidden"!==s.reached?ed:"none",strokeWidth:s.reached?Math.max(.8,.3*a):0}),"hidden"===s.reached&&(0,t.jsx)(eC,{x:l.x,y:l.y-.1*a,s:a/4.2}),i.id===d&&(0,t.jsx)("circle",{cx:l.x,cy:l.y,r:2*a,fill:"none",stroke:es[3],strokeWidth:1/et,strokeDasharray:`${3/et} ${2/et}`}),(s.reached||n&&"S"===i.tier)&&(0,t.jsx)("text",{x:l.x,y:p?l.y-a-4/et:l.y+a+10/et,textAnchor:"middle",fontSize:8.5/et,fontWeight:s.reached?700:400,fill:"hidden"===s.reached?"#999":s.reached?ed:"#aaa",pointerEvents:"none",stroke:"var(--sd-bg)",strokeWidth:2.4/et,paintOrder:"stroke",children:ep(i)})]},i.id)})},[$,q,J,et,c,d]),el=(e,t)=>{let n=F.current;if(!n)return null;let r=n.getBoundingClientRect(),i=(e-r.left-B-K.x)/et,o=(t-r.top-L-K.y)/et;if(30>=Math.hypot(i,o))return"center";if(U){let e=U.points.findIndex((e,t)=>Math.hypot(e.x-i,e.y-o)<=Math.max(16,X[t].radius));if(e>=0)return"L"+e}let l=Math.max(.6*q.spacing,10/et),s=null,a=l;return q.points.forEach((e,t)=>{let n=Math.hypot(e.x-i,e.y-o);n<a&&(a=n,s=t)}),s},ea=(e,t={x:0,y:0})=>Z(n=>{let r=Math.max(.5,Math.min(6,n.k*e));return{k:r,x:t.x-(t.x-n.x)*r/n.k,y:t.y-(t.y-n.y)*r/n.k}}),eh=e=>{let t=[];for(let n=e;n>=0;n=z[n].parent)t.unshift(z[n].row.id);return t},ef="string"==typeof _&&"L"===_[0]?Number(_.slice(1)):-1,ex=ef>=0?new Set(eh(ef)):null,ey=J.filter(e=>"ready"===e.reached).length,em=J.filter(e=>"hidden"===e.reached).length,eb=J.filter(e=>e.reached).length,ej=J.filter(e=>e.requested).length,eS=["S","A","B","C","D"].map(e=>[e,$.filter(t=>t.tier===e).length]).filter(([,e])=>e),ev=null!=d&&d===v.id,ek="number"==typeof _?$[_]:null,eA="number"==typeof _?q.points[_]:null;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("svg",{ref:F,width:l.w,height:l.h,style:{display:"block",touchAction:"none",cursor:null!=_?"pointer":"grab"},onPointerDown:e=>{T.current={x:e.clientX,y:e.clientY,vx:K.x,vy:K.y,moved:!1},e.currentTarget.setPointerCapture?.(e.pointerId)},onPointerMove:e=>{let t=T.current;if(t){let n=e.clientX-t.x,r=e.clientY-t.y;if(!t.moved&&Math.hypot(n,r)>5&&(t.moved=!0),t.moved)return void Z(e=>({...e,x:t.vx+n,y:t.vy+r}))}let n=el(e.clientX,e.clientY);M(e=>e===n?e:n)},onPointerUp:e=>{let t=T.current;if(T.current=null,!t||t.moved)return;let n=el(e.clientX,e.clientY);"center"===n?u?.(v):"string"==typeof n?p(eh(Number(n.slice(1)))):null!=n&&ee(n)?E.push(eg($[n])):null!=n&&p($[n].id)},onPointerLeave:()=>{T.current||M(null)},onWheel:e=>{let t=F.current?.getBoundingClientRect();t&&ea(Math.exp(-(.0015*e.deltaY)),{x:e.clientX-t.left-B,y:e.clientY-t.top-L})},role:"img","aria-label":`${v.name}’s circle: ${$.length} ${1===$.length?"person":"people"}`,children:[(0,t.jsx)("defs",{children:(0,t.jsxs)("filter",{id:"focusGlow",children:[(0,t.jsx)("feGaussianBlur",{stdDeviation:"4",result:"blur"}),(0,t.jsxs)("feMerge",{children:[(0,t.jsx)("feMergeNode",{in:"blur"}),(0,t.jsx)("feMergeNode",{in:"SourceGraphic"})]})]})}),(0,t.jsxs)("g",{transform:`translate(${B+K.x} ${L+K.y}) scale(${et})`,children:[q.bands.map(e=>(0,t.jsx)("circle",{r:(e.inner+e.outer)/2,fill:"none",stroke:D.TIER_COLORS[e.tier]||"#555",strokeOpacity:.07,strokeWidth:Math.max(1/et,e.outer-e.inner+q.spacing),pointerEvents:"none"},e.tier)),en,U&&z.map((e,n)=>{let r=U.points[n],i=X[n],o=e.row,l=ex?.has(o.id),s=es[k+e.step]||es[6];return(0,t.jsxs)("g",{transform:`translate(${r.x} ${r.y})`,pointerEvents:"none",opacity:ex&&!l?.45:1,children:[(0,t.jsx)("circle",{r:i.radius,fill:"var(--sd-bg)",fillOpacity:.9,stroke:s,strokeOpacity:l?.7:.25,strokeWidth:1/et}),eI(i).map(([e,{spokes:n}])=>(0,t.jsx)("path",{d:n,fill:"none",stroke:D.TIER_COLORS[e]||"#555",strokeWidth:.7,strokeOpacity:l?.6:.38},"s"+e)),eI(i).map(([e,{dots:n}])=>(0,t.jsx)("path",{d:n,fill:D.TIER_COLORS[e]||"#555",fillOpacity:l?1:.9},e)),(0,t.jsx)("circle",{r:eR,fill:s,stroke:ef===n?"#fff":"var(--sd-bg)",strokeWidth:1.5}),o.id===d&&(0,t.jsx)("circle",{r:i.radius+4,fill:"none",stroke:es[3],strokeWidth:1/et,strokeDasharray:`${3/et} ${2/et}`}),(0,t.jsxs)("text",{y:i.radius+12/et,textAnchor:"middle",fill:"#fff",fontSize:10/et,fontWeight:700,stroke:"var(--sd-bg)",strokeWidth:2.4/et,paintOrder:"stroke",children:[ep(o),"’s circle"]}),(0,t.jsxs)("text",{y:i.radius+23/et,textAnchor:"middle",fill:s,fontSize:8/et,stroke:"var(--sd-bg)",strokeWidth:2.4/et,paintOrder:"stroke",children:[i.people.length.toLocaleString("en-US")," · ",eu(k+e.step+1)," degree"]})]},"lk-"+o.id)}),U&&z.map((e,n)=>{let r=V[n],i=U.points[n],o=ex?.has(e.row.id),l=es[k+e.step]||es[6],s=(e,n,r,i,s)=>{let a=Math.hypot(r.x-e.x,r.y-e.y);if(a<=n+i)return null;let d=(r.x-e.x)/a,c=(r.y-e.y)/a;return(0,t.jsx)("line",{x1:e.x+d*n,y1:e.y+c*n,x2:r.x-d*i,y2:r.y-c*i,stroke:l,strokeLinecap:"round",strokeWidth:(o?2.6:1.8)/et,strokeOpacity:ex&&!o?.3:o?1:.85},s)};return(0,t.jsxs)("g",{pointerEvents:"none",children:[r.back&&s(r.back,r.back.r,r,r.r+1,"a"),s(r,r.r+1,i,eR+1,"b"),r.inCluster&&(0,t.jsx)("circle",{cx:r.x,cy:r.y,r:r.r,fill:D.TIER_COLORS[e.row.tier]||"#555",stroke:ed,strokeWidth:1.4})]},"ln-"+e.row.id)}),eA&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("line",{x1:0,y1:0,x2:eA.x,y2:eA.y,stroke:D.TIER_COLORS[ek.tier]||"#888",strokeWidth:1.6/et,strokeOpacity:.8}),(0,t.jsx)("circle",{cx:eA.x,cy:eA.y,r:ei(q.spacing,ek.tier)*(J[_].reached?1.4:1)+2/et,fill:"none",stroke:"#fff",strokeWidth:1.6/et})]}),"ready"===(0,O.reachState)(v,o)&&(0,t.jsx)(e$,{x:0,y:0,r:40,still:c}),(0,t.jsx)("circle",{r:28,fill:"var(--sd-bg)",stroke:D.TIER_COLORS[v.tier]||"#888",strokeWidth:"center"===_?4:3,filter:"url(#focusGlow)"}),(0,I.localPhoto)(v.profile_image_url)?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("clipPath",{id:"focus-clip",children:(0,t.jsx)("circle",{r:24})}),(0,t.jsx)("image",{href:(0,I.localPhoto)(v.profile_image_url),x:-24,y:-24,width:48,height:48,clipPath:"url(#focus-clip)"})]}):(0,t.jsx)("text",{y:5,textAnchor:"middle",fill:D.TIER_COLORS[v.tier]||"#888",fontSize:16,fontWeight:800,children:v.name?.charAt(0)}),(0,t.jsx)("text",{y:40,textAnchor:"middle",fill:"#fff",fontSize:11,fontWeight:700,pointerEvents:"none",children:v.name})]}),ek&&(0,t.jsx)(eE,{x:B+K.x+eA.x*et,y:L+K.y+eA.y*et,w:l.w,lines:(f=ek,x=J[_],y=d,m=k,b=ee(_),j=ep(f),S=f.id===y?"Their circle is being scanned now":"ready"===x.reached?"You added them · their circle is ready to scan":"hidden"===x.reached?"You added them · their list is hidden":"scanned"===x.reached?`You added them \xb7 ${x.own.toLocaleString("en-US")} in their circle`:x.requested?"Request sent":"Not connected yet",w=b?`Click to scan ${j}’s circle on the Scan page`:x.own>0?`Click to open ${j}’s circle (${eu(m+2)} degree)`:`Click to open ${j}’s circle`,[f.name,`${f.tier}-tier \xb7 ${(0,P.score)(f).toFixed(1)}`,S,w]),accent:J[_].reached?ed:D.TIER_COLORS[ek.tier]}),ef>=0&&(0,t.jsx)(eE,{x:B+K.x+U.points[ef].x*et,y:L+K.y+(U.points[ef].y-X[ef].radius)*et,w:l.w,lines:[`${z[ef].row.name}’s circle`,`${X[ef].people.length.toLocaleString("en-US")} people \xb7 ${eu(k+z[ef].step+1)} degree`,`You met ${ep(z[ef].row)} through ${ep(z[ef].parent>=0?z[z[ef].parent].row:v)}’s circle, then scanned`,"Click to open it"],accent:es[k+z[ef].step]||es[6]}),"center"===_&&(0,t.jsx)(eE,{x:B+K.x,y:L+K.y-28*et,w:l.w,lines:[v.name,"Open their card"],accent:D.TIER_COLORS[v.tier]})]}),(0,t.jsxs)("div",{style:{position:"absolute",top:54,left:64,right:64,pointerEvents:"none",display:"flex",flexDirection:"column",gap:8,alignItems:"flex-start"},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10,flexWrap:"wrap",pointerEvents:"auto"},children:[(0,t.jsxs)("button",{type:"button",onClick:()=>g(k-1),style:{padding:"8px 16px",borderRadius:8,border:"none",cursor:"pointer",background:"rgba(255,255,255,0.1)",color:"#ddd",fontSize:12,fontWeight:700},children:["← ",1===k?"All bridges":`${ep(e[k-2])}’s circle`]}),(0,t.jsxs)("nav",{"aria-label":"Trail",style:{fontSize:11,color:"#777",display:"flex",gap:6,flexWrap:"wrap",alignItems:"center"},children:[(0,t.jsx)("button",{type:"button",onClick:()=>g(0),style:eB,children:"All bridges"}),e.map((e,n)=>(0,t.jsxs)("span",{style:{display:"inline-flex",gap:6,alignItems:"center"},children:[(0,t.jsx)("span",{"aria-hidden":"true",children:"›"}),n===k-1?(0,t.jsx)("span",{style:{color:"#fff",fontWeight:700},children:e.name}):(0,t.jsx)("button",{type:"button",onClick:()=>g(n+1),style:eB,children:e.name})]},e.id))]})]}),(0,t.jsxs)("div",{style:{fontSize:11,color:"#999"},children:[ep(v),"’s circle · ",$.length.toLocaleString("en-US")," ",1===$.length?"person":"people"," · ",eu(k+1)," degree",k>1?", counted along this chain":""]}),ev&&$.length>0&&(0,t.jsxs)("div",{role:"status",style:{...eL,borderColor:"rgba(52,152,219,0.4)",color:"#cfe6f7"},children:["Scanning ",ep(v),"’s circle now. More people appear here as it saves, every 10 pages."]})]}),0===$.length&&(0,t.jsx)(eO,{person:v,depth:k,reach:o,requests:a,scanning:ev,canScan:h,onSelect:u,top:L+64}),$.length>0&&(0,t.jsxs)("div",{style:{position:"absolute",bottom:20,left:20,maxWidth:"calc(100% - 110px)",background:"rgba(0,0,0,0.75)",borderRadius:10,padding:"10px 14px",backdropFilter:"blur(8px)",fontSize:10,color:"#888",lineHeight:1.6},children:[(0,t.jsx)("div",{style:{fontSize:9,fontWeight:700,color:"#666",letterSpacing:1,marginBottom:6},children:"IN THIS CIRCLE"}),eS.map(([e,n])=>(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:6},children:[(0,t.jsx)("div",{style:{width:6,height:6,borderRadius:"50%",background:D.TIER_COLORS[e]}}),(0,t.jsxs)("span",{style:{color:D.TIER_COLORS[e],fontWeight:600,width:40},children:[e,"-Tier"]}),(0,t.jsx)("span",{children:n.toLocaleString("en-US")})]},e)),(eb>0||ej>0)&&(0,t.jsxs)("div",{style:{marginTop:6},children:[eb>0&&(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{style:{color:ed},children:"● "}),"you added ",eb,ey?`, ${ey} ready to scan`:"",em?`, ${em} hidden`:""]}),ej>0&&(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{style:{color:"#FFD700"},children:"◌ "}),ej," ",1===ej?"request":"requests"," out"]})]}),(0,t.jsxs)("div",{style:{marginTop:6,color:"#555"},children:["Click anyone for their circle",ey>0&&h?", or someone ready to scan theirs":""," · drag to move · scroll to zoom"]})]}),(0,t.jsx)(ez,{onIn:()=>ea(1.35),onReset:()=>W(null),onOut:()=>ea(1/1.35)})]})}let eM=290,eR=5,eW=15,eT=4.6,eF={inner:15,outer:1/0,spacing:7.5,minSpacing:7.5};function eI(e){let t={};return e.points.forEach((n,r)=>{let i=e.people[r]?.tier||"D",o="S"===i?3.1:"A"===i?2.8:2.5,l=Math.hypot(n.x,n.y)||1,s=t[i]||={dots:"",spokes:""};s.dots+=`M${(n.x-o).toFixed(1)},${n.y.toFixed(1)}a${o},${o} 0 1,0 ${2*o},0a${o},${o} 0 1,0 ${-2*o},0`,s.spokes+=`M${(n.x/l*eR).toFixed(1)},${(n.y/l*eR).toFixed(1)}L${n.x.toFixed(1)},${n.y.toFixed(1)}`}),Object.entries(t)}function eE({x:e,y:n,w:r,lines:i,accent:o}){let l=Math.max(150,Math.min(240,5.6*Math.max(...i.map(e=>String(e).length))+20)),s=12+12*i.length,a=Math.max(6,Math.min(r-l-6,e-l/2)),d=Math.max(6,n-s-12);return(0,t.jsxs)("g",{pointerEvents:"none",children:[(0,t.jsx)("rect",{x:a,y:d,width:l,height:s,rx:6,fill:"rgba(0,0,0,0.92)",stroke:o||"#555",strokeWidth:.6}),i.map((e,n)=>(0,t.jsx)("text",{x:a+l/2,y:d+16+12*n,textAnchor:"middle",fill:0===n?"#fff":2===n?o||"#aaa":"#999",fontSize:0===n?10.5:9,fontWeight:0===n?700:400,children:e},n))]})}function eO({person:e,depth:n,reach:r,requests:i,scanning:o,canScan:l,onSelect:a,top:d}){let c,h,p=ep(e),g=eu(n+1),u=1===e.degree,f=u?(0,O.circleState)(e,r):null,x=(0,O.circleScanCost)(),y=null;return o?(c=`Scanning ${p}’s circle now`,h="Their people appear here as the scan saves them, every 10 pages."):"hidden"===f?(c=`${p} keeps their connections hidden`,h="LinkedIn doesn’t show their list, so there is no circle to scan."):"scanned"===f?(c=`${p}’s list has been read`,h="Everyone on it was already one of your connections, so nobody new is here."):u?(c=`${p}’s circle isn’t scanned yet`,h=`${p} is your connection, so their circle can be scanned. That brings in the people they know: ${g} degree${n>1?", counted along this chain":""}.`,l&&(y=(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(X.default,{href:eg(e),style:eA,children:["Scan ",p,"’s circle →"]}),(0,t.jsxs)("div",{style:{fontSize:10.5,color:"#888",marginTop:8},children:[x.profileViews," profile view, then one LinkedIn search per page of their list (up to ",x.searches,", about ",x.minutes," min). It starts only once you confirm it on the Scan page."]})]}))):(0,s.hasRequest)(e,i)?(c=`Request sent to ${p}`,h=`Once ${p} accepts, ↻ Check for new brings them into your connections. Then their circle can be scanned, and the people they know fill in here: ${g} degree.`):(c=`Nobody from ${p}’s circle yet`,h=`LinkedIn only shows the connections of people you’re connected to. Connect with ${p}; once they accept and their circle is scanned, the people they know fill in here: ${g} degree.`,y=(0,t.jsxs)("button",{type:"button",onClick:()=>a?.(e),style:eD,children:["Open ",p,"’s card"]})),(0,t.jsxs)("div",{role:"status",style:{position:"absolute",left:"50%",top:d,transform:"translateX(-50%)",width:"min(360px, calc(100% - 32px))",background:"color-mix(in srgb, var(--sd-bg) 94%, transparent)",border:`1px solid ${"hidden"===f?"rgba(255,255,255,0.12)":"rgba(0,255,136,0.25)"}`,borderRadius:12,padding:"14px 16px",textAlign:"center"},children:[(0,t.jsxs)("div",{style:{fontSize:13,fontWeight:800,color:"hidden"===f?"#aaa":"#fff",marginBottom:6},children:["hidden"===f&&(0,t.jsx)("span",{"aria-hidden":"true",children:"🔒 "}),c]}),(0,t.jsx)("div",{style:{fontSize:11.5,color:"#9aa",lineHeight:1.55,marginBottom:12*!!y},children:h}),y]})}let eB={background:"none",border:"none",color:"#8fb8d6",fontSize:11,fontWeight:600,cursor:"pointer",padding:0},eL={fontSize:11,padding:"6px 10px",borderRadius:8,border:"1px solid",background:"rgba(0,0,0,0.6)",pointerEvents:"auto"},eA={display:"inline-block",padding:"9px 16px",borderRadius:8,textDecoration:"none",fontSize:12.5,fontWeight:800,color:"#0a0a1a",background:"linear-gradient(135deg, #00ff88, #3498DB)"},eD={padding:"8px 14px",borderRadius:8,cursor:"pointer",fontSize:12,fontWeight:700,border:"1px solid rgba(255,255,255,0.18)",background:"rgba(255,255,255,0.06)",color:"#ddd"},eP=["S","A","B","C","D"],eN=["S","A","B","C","D"];var eH=e.i(89154);let eq=[{key:"only",label:"Only way in",range:"1",max:1,color:"#00E5FF"},{key:"rare",label:"Rare",range:"2–3",max:3,color:"#4FC3F7"},{key:"uncommon",label:"Uncommon",range:"4–10",max:10,color:"#B0BEC5"},{key:"common",label:"Common",range:"11–30",max:30,color:"#FFB74D"},{key:"warm",label:"Warm",range:"31+",max:1/0,color:"#FF7043"}],eY=new Map(eq.map(e=>[e.key,e]));function eU(e){return eY.get(e)??null}function eX(e,t=1){let n,r=function(e,t=1){let n=Number(e?.mutual_count),r=Math.max(1,Math.floor(Number(t)||1));return Number.isFinite(n)&&n>=r?{count:Math.floor(n),from:"linkedin"}:{count:r,from:"scans"}}(e,t);return{key:(n=Math.max(1,Math.floor(Number(r.count)||1)),eq.find(e=>n<=e.max).key),...r}}function eV({tier:e,rarity:t},{tiers:n=new Set,rarities:r=new Set}={}){return(!n.size||!!n.has(e))&&(!r.size||!!(t&&r.has(t)))}function eG(e,t){let n=new Set(e);return n.has(t)?n.delete(t):n.add(t),n}function eK(e){return Math.min(1,Math.log(Math.max(1,Math.floor(Number(e)||1)))/Math.log(31))}var eZ=e.i(46949),eJ=e.i(99883);let eQ=D.TIER_COLORS;function e0({person:e,size:n=32,tierColors:r=eQ}){let i=r[e?.tier]||"#666",o=(0,I.localPhoto)(e?.profile_image_url);return(0,t.jsxs)("span",{style:{position:"relative",display:"inline-block",width:n,height:n,flexShrink:0,borderRadius:"50%",boxShadow:`0 0 0 ${n>=24?2:1}px ${i}`},children:[(0,t.jsx)("span",{style:{position:"absolute",inset:0,borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center",background:`${i}2e`,color:i,fontWeight:800,fontSize:Math.max(7,Math.round(.36*n)),lineHeight:1},children:(0,eZ.initialsFor)(e?.name)}),o&&(0,t.jsx)("img",{src:o,alt:"",loading:"lazy",decoding:"async",onError:e=>{e.currentTarget.style.display="none"},style:{position:"absolute",inset:0,width:n,height:n,borderRadius:"50%",objectFit:"cover"}})]})}let e1="#FF6B35",e5=D.TIER_COLORS,e2="a connection we can’t name",e8="64px 36px minmax(0,1.3fr) minmax(0,1fr) 190px 132px",e6=e=>Number(e||0).toLocaleString("en-US"),e3=(e,t,n)=>`${e6(e)} ${1===e?t:n}`;function e4(e){return e.routes.map(e=>e.bridge?`${e.bridge.name} (${e.bridge.tier})`:e2).join("\n")}function e7(e){return e.role&&e.company?`${e.role} @ ${e.company}`:e.headline||e.role||e.company||""}let e9=".38s cubic-bezier(.2,.8,.2,1)",te=`
19
+ .sepmap .sp { cursor: pointer; transition: opacity .12s; }
20
+ .sepmap .ppl:hover .sp { opacity: .28; }
21
+ .sepmap .ppl:hover .sp:hover, .sepmap .ppl:hover .sp.sel { opacity: 1; }
22
+ .sepmap .sp:hover .rt, .sepmap .sp.sel .rt { stroke-opacity: 1; stroke-width: 2px; }
23
+ .sepmap .br { cursor: pointer; }
24
+ .sepmap .br:hover text { text-decoration: underline; }
25
+ .sepmap .rt { pointer-events: none; }
26
+ /* Everything glides to its new place as the slider moves: dots and names by
27
+ their group's transform, lines by their path. Newcomers fade in. */
28
+ .sepmap .mv { transition: transform ${e9}; }
29
+ .sepmap .rt, .sepmap .spk { transition: d ${e9}, stroke-opacity .12s; }
30
+ .sepmap .in { animation: sepIn .3s ease-out both; }
31
+ @keyframes sepIn { from { opacity: 0; } to { opacity: 1; } }
32
+ @media (prefers-reduced-motion: reduce) {
33
+ .sepmap .mv, .sepmap .rt, .sepmap .spk { transition: none; }
34
+ .sepmap .in { animation: none; }
35
+ }
36
+ `,tt={paintOrder:"stroke",stroke:"var(--sd-bg)",strokeWidth:3,strokeLinejoin:"round"},tn=(e,t)=>({transform:`translate(${e}px, ${t}px)`}),tr=(0,n.memo)(function({layout:e,selectedKey:r,tierColors:i,youLabel:o,isMobile:l,onPick:s,onPickBridge:a,mutualsBy:d,doors:c=!1,cards:h=!1}){let{width:p,height:g,you:u,people:f,bridges:x,links:y,spokes:m,ghosts:b=[],unscanned:j=0,ghostLabel:S=null,drawn:w=1}=e,v=(0,n.useMemo)(()=>{let e=new Map;for(let t of y)e.has(t.key)||e.set(t.key,[]),e.get(t.key).push(t);return e},[y]),k=l?36:26,$=l?12:11;return(0,t.jsxs)("svg",{className:"sepmap",width:p,height:g,"aria-hidden":"true",style:{display:"block",overflow:"visible"},children:[(0,t.jsx)("style",{children:te}),(0,t.jsx)("defs",{children:(0,t.jsxs)("linearGradient",{id:"sepYouGrad",x1:"0",y1:"0",x2:"1",y2:"1",children:[(0,t.jsx)("stop",{offset:"0",stopColor:"#FFD700"}),(0,t.jsx)("stop",{offset:"1",stopColor:"#FF6B35"})]})}),(0,t.jsx)("defs",{children:(0,t.jsxs)("radialGradient",{id:"sepAimHalo",children:[(0,t.jsx)("stop",{offset:"0",stopColor:"#FFD700",stopOpacity:"0.2"}),(0,t.jsx)("stop",{offset:"1",stopColor:"#FFD700",stopOpacity:"0"})]})}),m.map(e=>(0,t.jsx)("path",{className:"spk in",d:`M${e.x1},${e.y1} L${h?e.x2-ti:e.x2},${e.y2}`,fill:"none",stroke:"#fff",strokeOpacity:.12,strokeWidth:1},`s-${e.id??"unresolved"}`)),h&&1===f.length&&f[0].big&&(0,t.jsx)("circle",{className:"mv",style:{...tn(f[0].x+Math.min(200,(p-f[0].x)/2),f[0].y),opacity:.3+.7*w},r:170,fill:"url(#sepAimHalo)"}),1===f.length&&f[0].big&&b.length>0&&(0,t.jsxs)("g",{className:"in",pointerEvents:"none",children:[b.map((e,n)=>{let r=f[0],i=h?r.x:r.x-r.r-2,o=(e.x+i)/2;return(0,t.jsx)("path",{d:`M${e.x},${e.y} C${o},${e.y} ${o},${r.y} ${i},${r.y}`,fill:"none",stroke:"#8a8fa8",strokeOpacity:.09,strokeWidth:.8},`gl-${n}`)}),b.map((e,n)=>(0,t.jsx)("circle",{cx:e.x,cy:e.y,r:3.3,fill:"#4a4f68",stroke:"#6b7090",strokeWidth:.6,strokeOpacity:.6},`gd-${n}`)),S&&(0,t.jsxs)("text",{x:S.x,y:S.y,fontSize:10.5,fontWeight:700,fill:"#8a8fa8",style:tt,children:[`+${e6(j)} more mutual${1===j?"":"s"}, in circles not scanned yet`,j>b.length?` (${e6(b.length)} shown)`:""]})]}),(0,t.jsx)("g",{className:"ppl",children:f.map(e=>{var n;let{p:o}=e,l=i[o.tier]||"#888",a=e.key===r,g=o.routes.map(e=>e.bridge?e.bridge.name:e2).join(", "),u=(n=d?.get(o.key),n?.from==="linkedin"&&n.count>o.waysIn?{text:`${e6(n.count)} mutuals \xb7 ${e6(o.waysIn)} mapped`,rare:!1,more:n.count}:1===o.waysIn?{text:"only way in",rare:!0,more:0}:{text:`${e6(o.waysIn)} ways in`,rare:!1,more:0}),f=e.r+14,x=Math.max(8,Math.floor((p-e.x-f)/6)),y=e=>String(e||"").length>x?`${String(e).slice(0,x-1)}…`:String(e||"");return(0,t.jsxs)("g",{className:a?"sp sel":"sp",onClick:()=>s(o),children:[(0,t.jsx)("title",{children:`${o.person.name} \xb7 #${o.rank}${o.tied?"=":""} \xb7 ${o.tier} \xb7 ${o.score.toFixed(1)} \xb7 ${u.text} \xb7 via ${g}`}),(v.get(e.key)||[]).map(n=>{let r=(n.x1+n.x2)/2,o=n.unresolved?"#777":n.primary?e1:e.big?"#FFD700":i[n.tier]||"#888";return(0,t.jsx)("path",{className:"rt in",d:h?`M${n.x1},${n.y1} C${r},${n.y1} ${r},${n.y2} ${n.x2},${n.y2}`:`M${n.x1+5},${n.y1} C${r},${n.y1} ${r},${n.y2} ${n.x2-e.r-2*!!e.big},${n.y2}`,fill:"none",stroke:o,strokeWidth:e.big?n.primary?2.2:1.4:n.primary?1.5:1,strokeOpacity:e.big?n.primary?.95:.6:n.primary?.8:.35,strokeDasharray:n.primary?void 0:e.big?"5 4":"3 3"},`${n.key}-${n.bridgeId??"u"}`)}),h&&(v.get(e.key)||[]).map(n=>{let r=n.unresolved?"#777":n.primary?e1:e.big?"#FFD700":i[n.tier]||"#888";return(0,t.jsxs)("g",{className:"in",pointerEvents:"none",children:[(0,t.jsx)("circle",{className:"mv",style:tn(n.x1,n.y1),r:2.6,fill:r}),(0,t.jsx)("circle",{className:"mv",style:tn(n.x2,n.y2),r:2.6,fill:r})]},`e-${n.bridgeId??"u"}`)}),(0,t.jsxs)("g",{className:"mv in",style:tn(e.x,e.y),children:[(e.rings||[]).map((e,n)=>(0,t.jsx)("circle",{r:e,fill:"none",stroke:l,strokeOpacity:.28-.08*n,strokeWidth:1,strokeDasharray:n?"2 5":void 0},e)),!h&&(0,t.jsx)("rect",{x:-12,y:-k/2,width:Math.max(0,p-e.x+12),height:k,fill:"transparent"}),h&&e.big?(0,t.jsx)(td,{p:o,c:l,tag:u,width:Math.max(260,Math.min(400,p-e.x-4)),fs:$}):h?(0,t.jsx)(ta,{p:o,c:l,tag:u,width:Math.max(240,Math.min(340,p-e.x-4)),sel:a}):e.big?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("circle",{r:e.r,fill:"var(--sd-bg)",stroke:l,strokeWidth:3,strokeOpacity:.35+.65*w}),(0,t.jsx)("text",{dy:"0.35em",textAnchor:"middle",fontSize:11,fontWeight:800,fill:l,children:(0,eZ.initialsFor)(o.person.name)}),(0,t.jsx)("text",{x:f,y:-20,fontSize:$+3,fontWeight:800,fill:"#fff",style:tt,children:y(o.person.name)}),(0,t.jsx)("text",{x:f,y:-4,fontSize:$,fill:"#aaa",style:tt,children:y(e7(o.person))}),(0,t.jsxs)("text",{x:f,y:13,fontSize:$,fontWeight:700,fill:l,style:tt,children:["#",o.rank,o.tied?"=":""," · ",o.tier,"-tier · ",o.score.toFixed(1)]}),(0,t.jsx)("text",{x:f,y:29,fontSize:$,fill:"#ccc",style:tt,children:y(u.more?`${e6(u.more)} mutual connections \xb7 ${e6(o.waysIn)} drawn here`:1===o.waysIn?"1 mutual connection: the only way in":`${e6(o.waysIn)} mutual connections, all drawn`)}),u.more>0&&(0,t.jsx)("text",{x:f,y:44,fontSize:$-1,fill:"#778",style:tt,children:y("The count is LinkedIn’s; the rest are in circles not scanned yet")})]}):(0,t.jsxs)(t.Fragment,{children:[a&&(0,t.jsx)("circle",{r:e.r+3.5,fill:"none",stroke:"#fff",strokeWidth:1.5}),(0,t.jsx)("circle",{r:e.r,fill:l}),(0,t.jsxs)("text",{x:14,dy:"0.35em",fontSize:$,fill:"#ddd",style:tt,children:[e.label,(0,t.jsx)("tspan",{dx:6,fill:l,fontWeight:700,children:o.score.toFixed(1)}),c&&(0,t.jsx)("tspan",{dx:8,fontSize:$-2,fontWeight:700,fill:u.rare?ty:"#778",children:u.text})]})]})]})]},e.key)})}),x.map(e=>{let n=e.unresolved?"#777":i[e.bridge.tier]||"#888";return(0,t.jsxs)("g",{className:e.unresolved?void 0:"br",onClick:e.unresolved?void 0:()=>a(e.bridge),children:[(0,t.jsx)("title",{children:e.unresolved?"Routes whose connection record doesn’t match anyone in your 1st-degree list, so who introduces you can’t be named":`${e.bridge.name} \xb7 ${e.bridge.tier}-tier${e.count>1?` \xb7 a way in to ${e.count} of these`:""} \xb7 click to open`}),(0,t.jsx)("g",{className:"mv in",style:tn(e.x,e.y),children:h?(0,t.jsx)(ts,{b:e,c:n,big:1===f.length&&f[0].big}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("circle",{r:e.r,fill:e.unresolved?"none":n,stroke:e.unresolved?"#777":"var(--sd-bg)",strokeWidth:e.unresolved?1:1.5,strokeDasharray:e.unresolved?"2 2":void 0}),(0,t.jsx)("text",{x:-9,dy:"0.35em",textAnchor:"end",fontSize:$-1,fill:n,fontStyle:e.unresolved?"italic":void 0,fontWeight:e.unresolved?400:e.primary?800:600,style:tt,children:e.label})]})})]},`b-${e.id??"unresolved"}`)}),(0,t.jsxs)("g",{className:"mv",style:tn(u.x,u.y),children:[(0,t.jsx)("circle",{r:u.r,fill:"url(#sepYouGrad)"}),(0,t.jsx)("text",{dy:"0.35em",textAnchor:"middle",fontSize:o.length>2?9:10,fontWeight:800,fill:"#000",children:o})]})]})}),ti=236,to=(e,t)=>String(e||"").length>t?`${String(e).slice(0,Math.max(1,t-1))}…`:String(e||""),tl=(e,t=9.5)=>Math.round(String(e).length*t*.6+14);function ts({b:e,c:n,big:r}){if(e.unresolved)return(0,t.jsxs)("g",{children:[(0,t.jsx)("rect",{x:-ti,y:-14,width:ti,height:28,rx:14,fill:"#11132a",stroke:"#555",strokeDasharray:"3 3"}),(0,t.jsx)("text",{x:-ti+14,dy:"0.35em",fontSize:11.5,fontStyle:"italic",fill:"#888",children:to(e.label,30)})]});let i=e.bridge.tier,o=r?e.primary?`${i} \xb7 best way in`:i:e.onlyFor?`${i} \xb7 only door${e.onlyFor>1?` \xd7${e.onlyFor}`:""}`:e.bestFor?`${i} \xb7 door for ${e.bestFor}`:i,l=r?e.primary:e.bestFor>0,s=tl(o);return(0,t.jsxs)("g",{children:[(0,t.jsx)("rect",{x:-ti,y:-14,width:ti,height:28,rx:14,fill:"#14172e",stroke:l?"rgba(255,215,0,0.55)":"rgba(255,255,255,0.09)",strokeWidth:l?1.3:1}),(0,t.jsx)("circle",{cx:-ti+15,r:10,fill:n}),(0,t.jsx)("text",{x:-ti+15,dy:"0.35em",textAnchor:"middle",fontSize:8,fontWeight:800,fill:"#000",children:(0,eZ.initialsFor)(e.bridge.name)}),(0,t.jsx)("text",{x:-ti+31,dy:"0.35em",fontSize:12,fontWeight:600,fill:"#e8e8f0",children:to(e.bridge.name,Math.max(6,Math.floor((ti-31-s-10)/6.4)))}),(0,t.jsx)("rect",{x:-s-7,y:-9,width:s,height:18,rx:9,fill:`${n}22`}),(0,t.jsx)("text",{x:-7-s/2,dy:"0.35em",textAnchor:"middle",fontSize:9.5,fontWeight:800,fill:n,children:o})]})}function ta({p:e,c:n,tag:r,width:i,sel:o}){let l=tl(r.text);return(0,t.jsxs)("g",{children:[(0,t.jsx)("rect",{x:0,y:-20,width:i,height:40,rx:10,fill:"#151830",stroke:o?"#fff":"rgba(255,255,255,0.09)",strokeWidth:o?1.5:1}),(0,t.jsxs)("text",{x:12,dy:"0.35em",fontSize:11,fontWeight:800,fill:"#FFD700",children:["#",e.rank,e.tied?"=":""]}),(0,t.jsx)("text",{x:60,y:-3,fontSize:13,fontWeight:700,fill:"#fff",children:to(e.person.name,Math.floor((i-60-70)/7))}),(0,t.jsx)("text",{x:60,y:12,fontSize:10.5,fill:"#8a8fa8",children:to(e7(e.person),Math.floor((i-60-l-20)/5.6))}),(0,t.jsx)("text",{x:i-12,y:-2,textAnchor:"end",fontSize:14,fontWeight:800,fill:n,children:e.score.toFixed(1)}),(0,t.jsx)("rect",{x:i-12-l,y:4,width:l,height:14,rx:7,fill:r.rare?"rgba(0,229,255,0.1)":"rgba(255,255,255,0.06)",stroke:r.rare?"rgba(0,229,255,0.35)":"rgba(255,255,255,0.14)"}),(0,t.jsx)("text",{x:i-12-l/2,y:11,dy:"0.35em",textAnchor:"middle",fontSize:9.5,fontWeight:800,fill:r.rare?ty:"#cfd3e6",children:r.text})]})}function td({p:e,c:n,tag:r,width:i,fs:o}){let l=e.routes.filter(e=>e.bridge).length,s=r.more?`${e6(r.more)} mutual connections`:1===e.waysIn?"1 mutual connection":`${e6(e.waysIn)} mutual connections`,a=r.more?`${e6(e.waysIn)} drawn here`:1===e.waysIn?"the only way in":"all drawn here",d=tl(s,10.5),c=tl(a,10.5),h=Math.floor((i-96-14)/6.6);return(0,t.jsxs)("g",{children:[(0,t.jsx)("rect",{x:0,y:-76,width:i,height:152,rx:16,fill:"#151830",stroke:"rgba(255,215,0,0.45)"}),(0,t.jsx)("circle",{cx:48,r:32,fill:"var(--sd-bg)",stroke:n,strokeWidth:3}),(0,t.jsx)("text",{x:48,dy:"0.35em",textAnchor:"middle",fontSize:18,fontWeight:800,fill:n,children:(0,eZ.initialsFor)(e.person.name)}),(0,t.jsxs)("text",{x:96,y:-40,fontSize:11,fontWeight:800,fill:"#FFD700",children:["#",e.rank,e.tied?"=":""," · ",e.tier,"-tier · ",e.score.toFixed(1)]}),(0,t.jsx)("text",{x:96,y:-17,fontSize:o+8,fontWeight:800,fill:"#fff",children:to(e.person.name,Math.floor(.72*h))}),(0,t.jsx)("text",{x:96,y:1,fontSize:12,fill:"#8a8fa8",children:to(e7(e.person),h)}),(0,t.jsx)("rect",{x:96,y:12,width:d,height:20,rx:10,fill:"rgba(255,112,67,0.12)",stroke:"rgba(255,112,67,0.4)"}),(0,t.jsx)("text",{x:96+d/2,y:22,dy:"0.35em",textAnchor:"middle",fontSize:10.5,fontWeight:800,fill:tm,children:s}),(0,t.jsx)("rect",{x:96+d+6,y:12,width:c,height:20,rx:10,fill:"rgba(255,255,255,0.06)",stroke:"rgba(255,255,255,0.14)"}),(0,t.jsx)("text",{x:96+d+6+c/2,y:22,dy:"0.35em",textAnchor:"middle",fontSize:10.5,fontWeight:800,fill:"#cfd3e6",children:a}),(0,t.jsx)("text",{x:96,y:50,fontSize:10.5,fill:"#6b7090",children:r.more?`The ${e6(r.more)} is LinkedIn’s count. The other ${e6(r.more-e.waysIn)}`:1===l?"Only one of your connections knows them.":`${e6(l)} of your connections know them.`}),r.more>0&&(0,t.jsx)("text",{x:96,y:64,fontSize:10.5,fill:"#6b7090",children:to("are in circles not scanned yet: the grey dots.",Math.floor((i-96-14)/5.4))})]})}let tc={overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"};function th({p:e,route:n,tierColors:r,compact:i}){if(!i)return(0,t.jsx)(tp,{p:e,route:n,tierColors:r});if(!n?.bridge)return(0,t.jsxs)("span",{style:{...tc,color:"#777",fontStyle:"italic",fontSize:i?11:12},children:["via ",e2]});let o=n.bridge,l=e.waysIn-1;return(0,t.jsxs)("span",{style:{display:"flex",alignItems:"center",gap:5,minWidth:0,fontSize:i?11:12},children:[(0,t.jsx)("span",{style:{color:"#666",flexShrink:0},children:"via"}),!i&&(0,t.jsx)(e0,{person:o,size:16,tierColors:r}),(0,t.jsx)("span",{style:{...tc,color:r[o.tier]||"#aaa",fontWeight:600,minWidth:0},children:i?(0,P.shortName)(o.name):o.name}),l>0&&(0,t.jsxs)("span",{title:`Every way in:
37
+ ${e4(e)}`,style:{flexShrink:0,padding:"1px 6px",borderRadius:8,fontSize:10,fontWeight:800,color:e1,background:"rgba(255,107,53,0.15)"},children:["+",l]})]})}function tp({p:e,route:n,tierColors:r}){let i=n?.bridge,o=e.waysIn-1;return(0,t.jsxs)("span",{style:{display:"flex",alignItems:"center",gap:8,minWidth:0},title:`Every way in:
38
+ ${e4(e)}`,children:[i?(0,t.jsx)(e0,{person:i,size:26,tierColors:r}):(0,t.jsx)("span",{style:{width:26,height:26,borderRadius:"50%",border:"1px dashed #666",flexShrink:0}}),(0,t.jsxs)("span",{style:{minWidth:0,display:"flex",flexDirection:"column"},children:[(0,t.jsx)("span",{style:{...tc,fontSize:13,fontWeight:700,color:i?r[i.tier]||"#ddd":"#777",fontStyle:i?"normal":"italic"},children:i?i.name:e2}),(0,t.jsx)("span",{style:{...tc,fontSize:10.5,marginTop:1,color:o>0?"#99a":ty,fontWeight:o>0?500:700},children:o>0?`+${o} more way${o>1?"s":""} in`:"only way in"})]})]})}function tg({p:e,rarity:n}){let r=n?eU(n.key):null;if(!r)return(0,t.jsx)("span",{});let i=Math.max(.06,1-eK(n.count)),o="linkedin"===n.from&&n.count>e.waysIn?`, ${e6(e.waysIn)} mapped`:"";return(0,t.jsxs)("span",{style:{display:"flex",flexDirection:"column",gap:5,minWidth:0},title:`${n.count} mutual connection${1===n.count?"":"s"}${"scans"===n.from?" (from your scans, so it can only go up)":" (LinkedIn’s count)"}. ${tj}`,children:[(0,t.jsx)("span",{style:{height:6,borderRadius:3,background:"rgba(255,255,255,0.07)",overflow:"hidden"},children:(0,t.jsx)("span",{style:{display:"block",height:"100%",width:`${100*i}%`,borderRadius:3,background:r.color}})}),(0,t.jsxs)("span",{style:{...tc,fontSize:10.5,fontWeight:700,color:r.color},children:[r.label," · ",e6(n.count)," mutual",1===n.count?"":"s",o]})]})}function tu({status:e,rarity:n}){let r=n?eU(n.key):null;return(0,t.jsxs)(t.Fragment,{children:["asked"===e&&(0,t.jsx)("span",{title:"You sent a request. It shows everywhere in the app.",style:{flexShrink:0,fontSize:9,fontWeight:800,color:"#FFD700",border:"1px dashed rgba(255,215,0,0.6)",borderRadius:4,padding:"0 4px"},children:"Request sent"}),"connected"===e&&(0,t.jsx)("span",{title:"Already one of your connections",style:{flexShrink:0,fontSize:9,fontWeight:800,color:"#00ff88",border:"1px solid rgba(0,255,136,0.5)",borderRadius:4,padding:"0 4px"},children:"Connected"}),r&&"connected"!==e&&(0,t.jsx)("span",{title:`${n.count} mutual connection${1===n.count?"":"s"}${"scans"===n.from?" (from your scans, so it can only go up)":""}. ${tj}`,style:{flexShrink:0,fontSize:9,fontWeight:700,color:r.color,border:`1px solid ${r.color}55`,borderRadius:4,padding:"0 4px"},children:r.label})]})}function tf({facets:e,text:n,onText:r,onPick:i,onClose:o,isMobile:l}){let s=n.trim().toLowerCase(),a=(e?.sectors||[]).filter(e=>!s||e.label.toLowerCase().includes(s)),d=(e?.companies||[]).filter(e=>!s||e.name.toLowerCase().includes(s)).slice(0,s?60:24),c={fontSize:9,fontWeight:700,color:"#667",letterSpacing:1,textTransform:"uppercase",margin:"10px 0 6px"};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{onClick:o,style:{position:"fixed",inset:0,zIndex:40}}),(0,t.jsxs)("div",{role:"dialog","aria-label":"Pick a sector or a company",style:{position:"absolute",zIndex:41,top:l?52:44,left:l?6:14,width:l?"calc(100% - 12px)":"min(560px, calc(100% - 28px))",maxHeight:340,overflowY:"auto",boxSizing:"border-box",padding:12,borderRadius:12,background:"#0c101e",border:`1px solid ${tx}55`,boxShadow:"0 12px 40px rgba(0,0,0,0.6)"},children:[(0,t.jsx)("input",{autoFocus:!0,type:"search",value:n,onChange:e=>r(e.target.value),onKeyDown:e=>{"Escape"===e.key?(e.stopPropagation(),o()):"Enter"===e.key&&(1!==a.length||d.length?1!==d.length||a.length||i({kind:"company",key:d[0].name,label:d[0].name}):i({kind:"sector",key:a[0].key,label:a[0].label,color:a[0].color}))},placeholder:"Type a sector or a company","aria-label":"Type a sector or a company",style:{width:"100%",height:l?44:34,boxSizing:"border-box",padding:"0 12px",borderRadius:8,outline:"none",color:"#fff",fontSize:l?16:13,border:"1px solid rgba(255,255,255,0.14)",background:"rgba(255,255,255,0.06)"}}),a.length>0&&(0,t.jsx)("div",{style:c,children:"Sectors · inferred from company names and headlines"}),(0,t.jsx)("div",{style:{display:"flex",flexWrap:"wrap",gap:6},children:a.map(e=>(0,t.jsxs)("button",{type:"button",onClick:()=>i({kind:"sector",key:e.key,label:e.label,color:e.color}),style:{height:28,padding:"0 10px",borderRadius:14,cursor:"pointer",fontSize:11.5,fontWeight:700,whiteSpace:"nowrap",border:`1px solid ${e.color}66`,background:`${e.color}14`,color:"#ddd",display:"inline-flex",alignItems:"center",gap:6},children:[(0,t.jsx)("span",{style:{width:7,height:7,borderRadius:"50%",background:e.color}}),e.label,(0,t.jsx)("span",{style:{fontWeight:500,color:"#889"},children:e6(e.count)})]},e.key))}),d.length>0&&(0,t.jsxs)("div",{style:c,children:["Companies",s?"":" · the biggest; type to find any"]}),(0,t.jsx)("div",{style:{display:"flex",flexWrap:"wrap",gap:6},children:d.map(e=>(0,t.jsxs)("button",{type:"button",onClick:()=>i({kind:"company",key:e.name,label:e.name}),style:{height:28,padding:"0 10px",borderRadius:14,cursor:"pointer",fontSize:11.5,fontWeight:600,whiteSpace:"nowrap",border:"1px solid rgba(255,255,255,0.12)",background:"rgba(255,255,255,0.04)",color:"#ccc"},children:[e.name,(0,t.jsx)("span",{style:{marginLeft:6,fontWeight:500,color:"#889"},children:e6(e.count)})]},e.name))}),!a.length&&!d.length&&(0,t.jsx)("div",{style:{fontSize:12,color:"#888",padding:"12px 2px 4px"},children:e?`Nothing matches ‘${n.trim()}’.`:"Reading where everyone works…"})]})]})}let tx="#00ff88",ty="#00E5FF",tm="#FF7043",tb=`
39
+ .sepslide { -webkit-appearance: none; appearance: none; display: block; width: 100%; height: 24px; margin: 4px 0 0; background: transparent; cursor: pointer; }
40
+ .sepslide::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: linear-gradient(90deg, ${ty} 0%, #FFD700 50%, ${tm} 100%); }
41
+ .sepslide::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; margin-top: -7px; border-radius: 50%; background: var(--sd-bg); border: 3px solid #fff; box-shadow: 0 0 10px rgba(255,255,255,0.45); }
42
+ .sepslide::-moz-range-track { height: 6px; border-radius: 3px; background: linear-gradient(90deg, ${ty} 0%, #FFD700 50%, ${tm} 100%); }
43
+ .sepslide::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--sd-bg); border: 3px solid #fff; box-shadow: 0 0 10px rgba(255,255,255,0.45); }
44
+ .sepslide:focus-visible { outline: 2px solid rgba(255,255,255,0.7); outline-offset: 3px; border-radius: 6px; }
45
+ `,tj="Rarity is how many mutual connections lead to them: few is a rare way in, many is warm (likely to accept). It never changes a score or a tier.",tS=(0,n.memo)(function({p:e,top:n,height:r,isMobile:i,selected:o,tierColors:l,onPick:s,q:a,status:d,rarity:c}){let{person:h}=e,p=l[e.tier]||"#888",g=function(e,t){if(t){let n=e.routes.find(e=>e.bridge&&String(e.bridge.name||"").toLowerCase().includes(t));if(n)return n}return e.routes[0]||null}(e,a),u=e.rank<=3,f=o?"rgba(255,107,53,0.08)":u?`${p}08`:"transparent",x="LinkedIn Member"===h.name,y=`#${e.rank}${e.tied?"=":""}`,m=e.waysIn-1,b=g?.bridge?`via ${g.bridge.name}${m>0?` and ${m} other${m>1?"s":""}`:""}`:`via ${e2}${m>0?` and ${m} other${m>1?"s":""}`:""}`;return(0,t.jsxs)("div",{role:"button",tabIndex:0,"aria-label":`Rank ${e.rank}${e.tied?", tied":""}, ${h.name}, ${e.tier} tier, ${e.score.toFixed(1)}, ${e.waysIn} way${1===e.waysIn?"":"s"} in, ${b}`,"aria-pressed":o,onClick:()=>s(e),onKeyDown:t=>{("Enter"===t.key||" "===t.key)&&(t.preventDefault(),s(e))},onMouseEnter:e=>{o||(e.currentTarget.style.background="rgba(255,255,255,0.04)")},onMouseLeave:e=>{e.currentTarget.style.background=f},style:{position:"absolute",top:n,left:0,right:0,height:r,boxSizing:"border-box",display:"grid",alignItems:"center",gap:10,padding:"0 12px",gridTemplateColumns:i?"44px 36px 1fr 44px":e8,borderLeft:`3px solid ${o?e1:"transparent"}`,borderBottom:"1px solid rgba(255,255,255,0.04)",background:f,cursor:"pointer"},children:[(0,t.jsx)("span",{style:{fontSize:i?11:12,fontWeight:800,color:u?p:"#555",whiteSpace:"nowrap"},children:y}),(0,t.jsx)(e0,{person:h,size:32,tierColors:l}),i?(0,t.jsxs)("div",{style:{minWidth:0,display:"flex",flexDirection:"column",gap:2},children:[(0,t.jsxs)("span",{style:{display:"flex",alignItems:"center",gap:4,minWidth:0},children:[(0,t.jsxs)("span",{style:{...tc,fontSize:13,fontWeight:600,color:x?"#888":"#fff",minWidth:0},children:[h.name,x&&(0,t.jsx)("span",{style:{fontSize:10,color:"#666",fontWeight:400},children:" · out of network"})]}),(0,t.jsx)(tu,{status:d,rarity:c})]}),(0,t.jsx)(th,{p:e,route:g,tierColors:l,compact:!0}),(0,t.jsx)("span",{style:{...tc,fontSize:10,color:"#666"},children:e7(h)})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{style:{minWidth:0},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:6,minWidth:0},children:[(0,t.jsx)("span",{style:{...tc,fontSize:13,fontWeight:600,color:x?"#888":"#fff"},children:h.name}),(0,t.jsx)("span",{style:{flexShrink:0,fontSize:9,fontWeight:800,color:p,border:`1px solid ${p}55`,borderRadius:4,padding:"0 4px"},children:e.tier}),(0,t.jsx)(tu,{status:d,rarity:null}),x&&(0,t.jsx)("span",{style:{flexShrink:0,fontSize:10,color:"#666"},children:"out of network"})]}),(0,t.jsx)("div",{style:{...tc,fontSize:10,color:"#777",marginTop:2},children:e7(h)})]}),(0,t.jsx)(th,{p:e,route:g,tierColors:l}),(0,t.jsx)(tg,{p:e,rarity:c}),(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10},children:[(0,t.jsx)("div",{style:{flex:1,height:6,background:"rgba(255,255,255,0.06)",borderRadius:3},children:(0,t.jsx)("div",{style:{height:"100%",borderRadius:3,background:p,width:`${100*Math.max(0,Math.min(1,e.score/10))}%`}})}),(0,t.jsx)("span",{style:{fontSize:15,fontWeight:800,color:p,width:30,textAlign:"right"},children:e.score.toFixed(1)})]})]}),i&&(0,t.jsxs)("div",{style:{textAlign:"right"},children:[(0,t.jsx)("div",{style:{fontSize:13,fontWeight:800,color:p},children:e.score.toFixed(1)}),(0,t.jsx)("div",{style:{fontSize:9,color:"#666",fontWeight:700},children:e.tier})]})]})}),tw={galaxy:{component:function({connections:e,onSelect:r,tierColors:i,focusNodeRef:o,userName:l,selectedId:s=null,scanNotes:a,fullDegree1:p,fullDegree2:X}){let V=(0,n.useMemo)(()=>{let t=(0,O.reachIndex)(p||e,X||[],a||{}),n=(0,O.readyByCircle)(t),r=new Map;for(let i of e){if(1!==(i.degree||1))continue;let e=(0,O.scanBars)(i,t),o=n.get(i.id)||0;(null!=e||o)&&r.set(i.id,{bars:e,ready:o})}return r},[e,p,X,a]),G=(0,n.useMemo)(()=>(0,P.routeIndex)(X||[]),[X]),K=(0,n.useRef)(null),Z=(0,n.useRef)(null),J=(0,n.useRef)(null),Q=(0,n.useRef)({transform:null,size:null}),ee=(0,n.useRef)(null),[et,en]=(0,n.useState)(null),er=(0,n.useRef)(null),ei=(0,n.useSyncExternalStore)(L.watchLab,L.labNow,()=>L.LAB_DEFAULTS),eo=(0,n.useRef)(ei);(0,n.useEffect)(()=>{eo.current=ei,J.current?.setLab((0,L.effectiveLab)(ei));let e=(0,L.clockNow)();J.current?.setFind(e.find,e.fly),ei.on&&(0,L.loadSocial)()},[ei]),(0,n.useEffect)(()=>(0,L.watchClock)(()=>{let e=(0,L.clockNow)();J.current?.setTime(e.at),J.current?.setFind(e.find,e.fly),J.current?.setFit(e.fit)}),[]),(0,n.useEffect)(()=>()=>(0,L.stopReplay)(),[]);let el=(0,n.useSyncExternalStore)(L.watchClock,()=>(0,L.clockNow)().social,()=>void 0),es=(0,L.effectiveLab)(ei).colourBy,ea=(0,n.useMemo)(()=>(0,L.colourScheme)(es,e,i,el),[es,e,i,el]),ed=(0,n.useRef)(ea);(0,n.useEffect)(()=>{ed.current=ea,J.current?.setColours(ea)},[ea]);let ec=(0,n.useRef)(r);(0,n.useEffect)(()=>{ec.current=r});let eh=(0,n.useRef)(s);(0,n.useEffect)(()=>{let e=K.current?.parentElement;if(!e)return;let t=()=>{let t=Math.round(e.clientWidth),n=Math.round(e.clientHeight);ee.current={width:t,height:n},en(e=>e&&e.width===t&&e.height===n?e:{width:t,height:n})};t();let n=new ResizeObserver(t);return n.observe(e),()=>n.disconnect()},[]),(0,n.useEffect)(()=>{eh.current=s,J.current?.select(s)},[s]),(0,n.useEffect)(()=>{et&&J.current?.resize(et)},[et]);let ep=null!==et;return(0,n.useEffect)(()=>{if(!ep||!K.current||!e.length)return;let t=d.select(K.current);t.selectAll("*").remove();let n=ee.current,{transform:r,size:s}=Q.current,a=r?E(r,s,n):null,p=function(e,t,n,r,i,o,l,s,a,c,h=new Map,p=L.LAB_DEFAULTS,O=null,A=null,Y=new Map){var X,V,G;let K=A?.of??(e=>o[e.tier]||"#666"),Z=[{id:H,name:c||"You",tier:"center",degree:0,power_score:10,fx:0,fy:0},...r.map(e=>({id:e.id,name:e.name,tier:e.tier,degree:e.degree||1,source_connection_id:e.source_connection_id,unlocked_from_bridge_id:e.unlocked_from_bridge_id,power_score:parseFloat(e.power_score)||1,company:e.company,role:e.role,headline:e.headline,profile_url:e.profile_url,profile_image_url:(0,I.localPhoto)(e.profile_image_url),connected_date:e.connected_date,seniority_score:e.seniority_score,company_prestige_score:e.company_prestige_score,influence_signals:e.influence_signals,is_catalyst:e.is_catalyst,catalyst_score:e.catalyst_score,circle_power:e.circle_power,circle_s_count:e.circle_s_count,circle_a_count:e.circle_a_count}))],J=new Map(Z.map(e=>[e.id,e])),Q=new Set(r.filter(e=>1===(e.degree||1)).map(e=>e.id)),ee=r.some(e=>(e.degree||1)>1),et=new Map;for(let e of Z){if(e.id===H)continue;let t=e.unlocked_from_bridge_id;1===e.degree&&ee&&null!=t&&t!==e.id&&Q.has(t)?et.set(e.id,t):2===e.degree&&Q.has(e.source_connection_id)&&et.set(e.id,e.source_connection_id)}let en=new Map,er=(e,t=new Set)=>{if(e.id===H)return 0;if(en.has(e.id))return en.get(e.id);let n=et.get(e.id),r=e.degree>=3?3:e.degree;return null==n||t.has(e.id)||(t.add(e.id),r=er(J.get(n),t)+1),r=Math.min(r,6),en.set(e.id,r),r},ei=r.map(e=>{let t=et.get(e.id)??H;return{source:t,target:e.id,near:t!==H}}),eo=new Map;for(let e of Z){if(2!==e.degree||!et.has(e.id))continue;let t=Y.get((0,P.keyFor)(e));if(!t||t.size<2)continue;let n=[...t].filter(t=>null!=t&&t!==et.get(e.id)&&Q.has(t));n.length&&eo.set(e.id,n)}for(let[e,t]of eo)for(let n of t)ei.push({source:n,target:e,near:!0,also:!0});let el=new Map;for(let e of ei)el.set(e.source,(el.get(e.source)||0)+1),el.set(e.target,(el.get(e.target)||0)+1);let es=new Set(et.values()),ea=new Map;for(let e of et.values())ea.set(e,(ea.get(e)||0)+1);let ed=e=>{switch(e){case"S":return 150;case"A":return 250;case"B":return 350;case"C":return 450;default:return 520}},ec=["S","A","B","C","D"],eh=[[115,135,155,175,192],[265,300,335,370,398],[465,500,535,565,590],[660,690,720,745,765]],ep=[...new Set(Z.filter(e=>e.id!==H).map(e=>er(e)))].sort((e,t)=>e-t),eg=ee&&ep.length>1,eu=e=>{if(!eg)return ed(e.tier);let t=Math.min(ep.indexOf(er(e)),eh.length-1),n=ec.indexOf(e.tier);return eh[t][n<0?4:n]},ef=window.innerWidth<768,ex=ef?{...L.LAB_DEFAULTS,labels:p.labels}:p,ey=(0,L.reachCounts)(Z,et),em=e=>{if(e.id===H)return"links"===ex.sizeBy?24:18;if("links"===ex.sizeBy)return Math.min(44,3.5+2.1*Math.sqrt(el.get(e.id)||1))*ex.dotSize;if("reach"===ex.sizeBy)return Math.min(28,2.5+1.6*Math.sqrt(ey.get(e.id)||0))*ex.dotSize;let t=Math.max(3,Math.min(12,1.3*(e.power_score||1)));return(e.degree>1?Math.max(2.5,.75*t):t)*ex.dotSize},eb=e.append("g"),ej=new Map,eS=null;if(!ef&&eg){let e=eS=eb.append("g").attr("class","degree-guides").style("pointer-events","none"),t=["","1st","2nd","3rd","4th","5th","6th"];ep.slice(0,eh.length).forEach((n,r)=>{let i=eh[r][2];e.append("circle").attr("r",i).attr("fill","none").attr("stroke","#8899aa").attr("stroke-opacity",.12).attr("stroke-width",1).attr("stroke-dasharray","2 4"),e.append("text").attr("x",0).attr("y",-eh[r][4]-8).attr("text-anchor","middle").attr("font-size",10).attr("font-weight",700).attr("fill","#8899aa").attr("fill-opacity",.55).text(t[n]||`${n}th`)})}else if(!ef){let e=eS=eb.append("g").attr("class","tier-guides").style("pointer-events","none");for(let t of["S","A","B","C","D"]){let n=ed(t),r=e.append("circle").attr("r",n).attr("fill","none").attr("stroke",o[t]||"#666").attr("stroke-opacity",.16).attr("stroke-width",1).attr("stroke-dasharray","2 4"),i=e.append("text").attr("x",0).attr("y",-n-4).attr("text-anchor","middle").attr("font-size",10).attr("font-weight",700).attr("fill",o[t]||"#666").attr("fill-opacity",.5).text(t);ej.set(t,{ring:r,label:i})}}let ew=null,ev=null,ek=x.default().scaleExtent([.1,4]).on("zoom",e=>{eb.attr("transform",e.transform),a.current={transform:ew??e.transform,size:n},ev?.classed("far",e.transform.k<.85),e_()});e.call(ek);let e$=(t,r)=>{if(q()){ew=null,e.interrupt().call(ek.transform,t);return}ew=t,a.current={transform:t,size:n},e.transition().duration(r).call(ek.transform,t).on("end interrupt cancel",()=>{ew===t&&(ew=null)})},eC=t.firstChild,ez=null,e_=()=>{if(!ez)return;let n=g.default(e.node());t.style.transform=`translate(${n.applyX(ez.x)}px, ${n.applyY(ez.y)}px) scale(${n.k})`},eM=e=>{if(ez=null!=e&&e!==H?J.get(e)??null:null,t.style.display=ez?"block":"none",!ez)return;let n=em(ez)+8;eC.style.width=eC.style.height=`${2*n+2.5}px`,eC.style.margin=`${-(n+1.25)}px`,eC.style.borderColor=K(ez)||"#FFD700",e_()};if(s)e.call(ek.transform,u.identity.translate(s.x,s.y).scale(s.k));else{let t=ef&&n.width>0&&n.height>0?Math.min(n.width/1248,n.height/1248):1;e.call(ek.transform,u.identity.translate(n.width/2,n.height/2).scale(t))}if(l&&(l.current=e=>{let t=J.get(e);t&&(e$(u.identity.translate(n.width/2-2.5*t.x,n.height/2-2.5*t.y).scale(2.5),750),eM(e))}),ef){let e={};Z.forEach(t=>{let n=t.tier||"D";e[n]||(e[n]=[]),e[n].push(t)}),Object.entries(e).forEach(([e,t])=>{t.forEach((n,r)=>{if(n.id===H){n.x=0,n.y=0,n.fx=n.x,n.fy=n.y;return}let i=ed(e),o=r/t.length*Math.PI*2-Math.PI/2;n.x=i*Math.cos(o),n.y=i*Math.sin(o),n.fx=n.x,n.fy=n.y})})}let eR=ef?0:eg?.06:.1,eW=eg?.45:.3,eT=e=>{let t=(e.near?Math.max(40,eu(e.target)-eu(e.source)):eu(e.target))*ex.distance;if("links"!==ex.sizeBy)return t;let n=e.source.id===H?7*Math.sqrt(ea.get(e.target.id)||0):0;return t+em(e.source)+em(e.target)+n},eF=e=>(e.id===H?-20:-1)*ex.push,eI=e=>.15*ex.gravity*(es.has(e.id)?.5:e.degree>=2?.2:1),eE=()=>Math.min(.45,.1+.05*ex.lines),eO=y.forceSimulation(Z).force("link",m.forceLink(ei).id(e=>e.id).distance(eT).strength(Math.min(1,eR*ex.pull))).force("charge",b.forceManyBody().strength(ef?0:eF)).force("center",ef?null:function(e,t){var n,r=1;function i(){var i,o,l=n.length,s=0,a=0;for(i=0;i<l;++i)s+=(o=n[i]).x,a+=o.y;for(s=(s/l-e)*r,a=(a/l-t)*r,i=0;i<l;++i)o=n[i],o.x-=s,o.y-=a}return null==e&&(e=0),null==t&&(t=0),i.initialize=function(e){n=e},i.x=function(t){return arguments.length?(e=+t,i):e},i.y=function(e){return arguments.length?(t=+e,i):t},i.strength=function(e){return arguments.length?(r=+e,i):r},i}(0,0)).force("gravityX",ef?null:j.forceX(0).strength(eI)).force("gravityY",ef?null:S.forceY(0).strength(eI)).force("collision",ef?null:w.forceCollide().radius(e=>em(e)+2)).force("radial",ef?null:(function(e,t,n){var r,i,o,l=(0,v.default)(.1);function s(e){for(var l=0,s=r.length;l<s;++l){var a=r[l],d=a.x-t||1e-6,c=a.y-n||1e-6,h=Math.sqrt(d*d+c*c),p=(o[l]-h)*i[l]*e/h;a.vx+=d*p,a.vy+=c*p}}function a(){if(r){var t,n=r.length;for(i=Array(n),o=Array(n),t=0;t<n;++t)o[t]=+e(r[t],t,r),i[t]=isNaN(o[t])?0:+l(r[t],t,r)}}return"function"!=typeof e&&(e=(0,v.default)(+e)),null==t&&(t=0),null==n&&(n=0),s.initialize=function(e){r=e,a()},s.strength=function(e){return arguments.length?(l="function"==typeof e?e:(0,v.default)(+e),a(),s):l},s.radius=function(t){return arguments.length?(e="function"==typeof t?t:(0,v.default)(+t),a(),s):e},s.x=function(e){return arguments.length?(t=+e,s):t},s.y=function(e){return arguments.length?(n=+e,s):n},s})(e=>e.id===H?0:eu(e),0,0).strength(eW*ex.rings));eS?.attr("opacity",Math.min(1,ex.rings)),eO.on("end.guides",()=>{for(let[e,{ring:t,label:n}]of ej){let r=Z.filter(t=>t.tier===e&&t.id!==H).map(e=>Math.hypot(e.x||0,e.y||0)).sort((e,t)=>e-t);if(!r.length){t.attr("opacity",0),n.attr("opacity",0);continue}let i=r[Math.floor(r.length/2)];t.attr("r",i).attr("opacity",1),n.attr("y",-i-4).attr("opacity",1)}});let eB=A?.heat||null,eL=e.select("defs").size()?e.select("defs"):e.append("defs");for(let e=0;e<=5;e++){if(eL.select(`#heat-glow-${e}`).size())continue;let t=eL.append("radialGradient").attr("id",`heat-glow-${e}`);t.append("stop").attr("offset","0").attr("stop-color",(0,L.heatColour)(e/5)).attr("stop-opacity",.14+.06*e),t.append("stop").attr("offset","1").attr("stop-color",(0,L.heatColour)(e/5)).attr("stop-opacity",0)}let eA=eb.append("g").attr("class","heat-glow").style("pointer-events","none").style("mix-blend-mode","screen"),eD=eA.selectAll("circle"),eP=()=>{let e=eB?Z.filter(e=>e.id!==H&&eB(e)>=.5).sort((e,t)=>eB(t)-eB(e)).slice(0,700):[];eD=eA.selectAll("circle").data(e,e=>e.id).join("circle").attr("r",e=>2.5*em(e)+12+30*eB(e)).attr("fill",e=>`url(#heat-glow-${Math.round(5*eB(e))})`).attr("cx",e=>e.x||0).attr("cy",e=>e.y||0).style("display",e=>null==ty||ta.get(e.id)<=ty?null:"none")},eN=e=>"one"===D.MAP_LOOK.lines?D.MAP_LOOK.line:K(e.target)||"#333",eH=eb.append("g").selectAll("line").data(ei).join("line").attr("class","gl").attr("stroke",eN).attr("stroke-opacity",eE()).attr("stroke-width",.5*ex.lines),eq=Z.filter(e=>e.is_catalyst&&h.get(e.id)?.bars==null);if(eq.length){let t=e.select("defs").size()?e.select("defs"):e.append("defs");if(!t.select("#catalyst-glow-nm").size()){let e=t.append("filter").attr("id","catalyst-glow-nm").attr("x","-60%").attr("y","-60%").attr("width","220%").attr("height","220%");e.append("feGaussianBlur").attr("stdDeviation","5").attr("result","blur"),e.append("feMerge").html('<feMergeNode in="blur"/><feMergeNode in="SourceGraphic"/>')}eb.append("g").selectAll("circle").data(eq).join("circle").attr("r",e=>em(e)+6).attr("fill","none").attr("stroke","#00ff88").attr("stroke-width",2).attr("stroke-dasharray","3,3").attr("filter","url(#catalyst-glow-nm)").attr("cx",e=>e.x||0).attr("cy",e=>e.y||0).attr("class","catalyst-ring")}let eY=Z.filter(e=>h.has(e.id)),eU=eb.append("g").attr("class","dot-rings").style("pointer-events","none").selectAll("g").data(eY).join("g").attr("transform",e=>`translate(${e.x||0},${e.y||0})`);function eX(e){let{bars:t,ready:n}=h.get(e.id),r=em(e)+3.5,i=d.select(this);if(i.selectAll("*").remove(),null!=t){let e;for(let n of(e=(2*Math.PI-1.6)/5,Array.from({length:5},(t,n)=>{let i=-Math.PI/2+.16+n*(e+.32),o=e=>`${(r*Math.cos(e)).toFixed(2)} ${(r*Math.sin(e)).toFixed(2)}`;return{i:n,d:`M${o(i)} A${r} ${r} 0 0 1 ${o(i+e)}`}})))i.append("path").attr("d",n.d).attr("fill","none").attr("stroke-linecap","round").attr("stroke-width",1.6).attr("stroke",n.i<t?"#1abc9c":B)}if(n>0){let e=.72*r;i.append("circle").attr("cx",e).attr("cy",e).attr("r",5.5).attr("fill","#7F77DD"),i.append("text").attr("x",e).attr("y",e+2.5).attr("text-anchor","middle").attr("font-size",7).attr("font-weight",700).attr("fill","#fff").text(n>9?"9+":n)}}eU.each(eX);let eV=eb.append("g").selectAll("circle").data(Z).join("circle").attr("class","gn").attr("r",em).attr("fill",e=>e.id===H?D.MAP_LOOK.you:K(e)).attr("fill-opacity",e=>e.degree>=3?.55:2===e.degree?.75:1).attr("stroke",e=>e.id===H?"#FFD700":e.is_catalyst?"#00ff88":"none").attr("stroke-width",e=>e.id===H?3:2.5*!!e.is_catalyst).style("cursor","pointer").on("click",(e,t)=>{t.id!==H&&(eM(t.id),i(t))}),eG=d.select("body").append("div").attr("class","graph-tooltip").style("position","fixed").style("top","0px").style("left","0px").style("background","rgba(0,0,0,0.92)").style("color","#fff").style("padding","8px 12px").style("border-radius","6px").style("font-size","12px").style("pointer-events","none").style("opacity",0).style("z-index",1e3).style("border","1px solid rgba(255,255,255,0.2)").style("max-width","280px"),eK=d.select("body").append("div").attr("class","graph-tooltip").style("position","fixed").style("top","0px").style("left","0px").style("pointer-events","none").style("opacity",0).style("z-index",1001).style("transition","opacity 0.15s"),eZ=new Map;for(let[e,t]of et)eZ.has(t)||eZ.set(t,[]),eZ.get(t).push(e);let eJ=null;eV.on("mouseover",function(e,t){if(U(this,1.5*em(t)),clearTimeout(eJ),ex.on&&ex.branch&&t.id!==H&&(e=>{let t=new Set([H,e.id]),n=[e.id];for(;n.length;)for(let e of eZ.get(n.pop())||[])t.has(e)||(t.add(e),n.push(e));for(let n=et.get(e.id),r=0;null!=n&&r<7;n=et.get(n),r++)t.add(n);eV.classed("lit",e=>t.has(e.id)),eH.classed("lit",e=>t.has(e.source.id)&&t.has(e.target.id)),eb.classed("lab-focus",!0)})(t),t.profile_image_url&&t.id!==H){var n;let r,i=Math.max(48,5*em(t));eK.style("opacity",1),n=o[t.tier]||"#555",eK.selectAll("*").remove(),(r=(0,I.localPhoto)(t.profile_image_url))?eK.append("img").attr("src",r).style("width",i+"px").style("height",i+"px").style("border-radius","50%").style("object-fit","cover").style("border",`2px solid ${n}`).style("display","block").on("error",function(){this.parentElement.style.display="none"}):eK.style("opacity",0),eK.style("left",e.clientX-i/2+"px").style("top",e.clientY-i-8+"px"),eG.style("opacity",1).html(`<strong>${N(t.name)}</strong>`).style("left",e.clientX-40+"px").style("top",e.clientY+12+"px").style("text-align","center").style("min-width","80px")}else eG.style("opacity",1).html(`<strong>${N(t.name)}</strong>${t.company?"<br/>"+N(t.company):""}${t.tier?"<br/>Tier: "+N(t.tier):""}`).style("left",e.clientX+12+"px").style("top",e.clientY-10+"px")}).on("mousemove",function(e,t){if(t.profile_image_url&&t.id!==H){let n=Math.max(48,5*em(t));eK.style("left",e.clientX-n/2+"px").style("top",e.clientY-n-8+"px"),eG.style("left",e.clientX-40+"px").style("top",e.clientY+12+"px")}else eG.style("left",e.clientX+12+"px").style("top",e.clientY-10+"px")}).on("mouseout",function(e,t){U(this,em(t)),clearTimeout(eJ),eJ=setTimeout(()=>eb.classed("lab-focus",!1),120),eG.style("opacity",0),eK.style("opacity",0)}),X=eV,V=eO,G=H,X.call((function(){var e,t,n,r,i=R,o=W,l=T,s=F,a={},c=(0,k.dispatch)("start","drag","end"),h=0,p=0;function g(e){e.on("mousedown.drag",u).filter(s).on("touchstart.drag",y).on("touchmove.drag",m,z.nonpassive).on("touchend.drag touchcancel.drag",b).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function u(l,s){if(!r&&i.call(this,l,s)){var a=j(this,o.call(this,l,s),l,s,"mouse");a&&((0,d.select)(l.view).on("mousemove.drag",f,z.nonpassivecapture).on("mouseup.drag",x,z.nonpassivecapture),(0,C.default)(l.view),(0,z.nopropagation)(l),n=!1,e=l.clientX,t=l.clientY,a("start",l))}}function f(r){if((0,z.default)(r),!n){var i=r.clientX-e,o=r.clientY-t;n=i*i+o*o>p}a.mouse("drag",r)}function x(e){(0,d.select)(e.view).on("mousemove.drag mouseup.drag",null),(0,C.yesdrag)(e.view,n),(0,z.default)(e),a.mouse("end",e)}function y(e,t){if(i.call(this,e,t)){var n,r,l=e.changedTouches,s=o.call(this,e,t),a=l.length;for(n=0;n<a;++n)(r=j(this,s,e,t,l[n].identifier,l[n]))&&((0,z.nopropagation)(e),r("start",e,l[n]))}}function m(e){var t,n,r=e.changedTouches,i=r.length;for(t=0;t<i;++t)(n=a[r[t].identifier])&&((0,z.default)(e),n("drag",e,r[t]))}function b(e){var t,n,i=e.changedTouches,o=i.length;for(r&&clearTimeout(r),r=setTimeout(function(){r=null},500),t=0;t<o;++t)(n=a[i[t].identifier])&&((0,z.nopropagation)(e),n("end",e,i[t]))}function j(e,t,n,r,i,o){var s,d,p,u=c.copy(),f=(0,$.pointer)(o||n,t);if(null!=(p=l.call(e,new M("beforestart",{sourceEvent:n,target:g,identifier:i,active:h,x:f[0],y:f[1],dx:0,dy:0,dispatch:u}),r)))return s=p.x-f[0]||0,d=p.y-f[1]||0,function n(o,l,c){var x,y=f;switch(o){case"start":a[i]=n,x=h++;break;case"end":delete a[i],--h;case"drag":f=(0,$.pointer)(c||l,t),x=h}u.call(o,e,new M(o,{sourceEvent:l,subject:p,target:g,identifier:i,active:x,x:f[0]+s,y:f[1]+d,dx:f[0]-y[0],dy:f[1]-y[1],dispatch:u}),r)}}return g.filter=function(e){return arguments.length?(i="function"==typeof e?e:_(!!e),g):i},g.container=function(e){return arguments.length?(o="function"==typeof e?e:_(e),g):o},g.subject=function(e){return arguments.length?(l="function"==typeof e?e:_(e),g):l},g.touchable=function(e){return arguments.length?(s="function"==typeof e?e:_(!!e),g):s},g.on=function(){var e=c.on.apply(c,arguments);return e===c?g:e},g.clickDistance=function(e){return arguments.length?(p=(e*=1)*e,g):Math.sqrt(p)},g})().on("start",(e,t)=>{e.active||V.alphaTarget(.3).restart(),t.fx=t.x,t.fy=t.y}).on("drag",(e,t)=>{t.fx=e.x,t.fy=e.y}).on("end",(e,t)=>{e.active||V.alphaTarget(0),t.id!==G&&(t.fx=null,t.fy=null)}));let eQ=null,e0=e=>!!(eQ&&eQ.size<=40&&eQ.has(e.id))||!!ex.labels&&(e.id===H||1===e.degree&&("all"===ex.names||"S"===e.tier||e.is_catalyst||es.has(e.id))),e1=(ev=eb.append("g").classed("far",g.default(e.node()).k<.85)).selectAll("text"),e5=()=>{e1=ev.selectAll("text").data(Z.filter(e0),e=>e.id).join("text").text(e=>e.is_catalyst&&"S"!==e.tier?e.name+" ⚡":e.name).attr("class",e=>e.id===H||es.has(e.id)?"hub":null).attr("font-size",e=>e.id===H?14:es.has(e.id)?Math.max(12,Math.min(22,.5*em(e))):10).attr("font-weight",e=>e.id===H||es.has(e.id)?700:500).attr("fill",e=>e.id===H?"#fff":e.is_catalyst?"#00ff88":K(e)).attr("text-anchor","middle").attr("dy",e=>em(e)+14).attr("x",e=>e.x||0).attr("y",e=>e.y||0).style("pointer-events","none")};e5();let e2=eb.selectAll(".catalyst-ring"),e8=()=>{eH.attr("x1",e=>e.source.x).attr("y1",e=>e.source.y).attr("x2",e=>e.target.x).attr("y2",e=>e.target.y),eV.attr("cx",e=>e.x).attr("cy",e=>e.y),e2.attr("cx",e=>e.x).attr("cy",e=>e.y),eU.attr("transform",e=>`translate(${e.x},${e.y})`),e1.attr("x",e=>e.x).attr("y",e=>e.y),eB&&eD.attr("cx",e=>e.x).attr("cy",e=>e.y),e_()},e6=0;eO.on("tick",()=>{e6=performance.now(),e8(),e4&&eO.alpha()<e3&&(e4=!1,e9())});let e3=.06,e4=!1,e7=(0,L.clockNow)().fit,e9=()=>{let e=1/0,t=1/0,r=-1/0,i=-1/0;if(Z.forEach((n,o)=>{if(!tp[o])return;let l=em(n);e=Math.min(e,n.x-l),t=Math.min(t,n.y-l),r=Math.max(r,n.x+l),i=Math.max(i,n.y+l)}),!Number.isFinite(e)||!n.width||!n.height)return;let o=Math.max(.1,Math.min(2,Math.min(n.width/(r-e+80),n.height/(i-t+80))));e$(u.identity.translate(n.width/2-(e+r)/2*o,n.height/2-(t+i)/2*o).scale(o),750)},te=null,tt=Z.length>12e3?3:Z.length>3e3?2:1,tn=null,tr=0,ti=0,to=e=>{if(++ti%tt)return;let t=Math.min(.1,(e-tr)/1e3);if(tr=e,t<=0)return;let n=.1*ex.orbit*t,r=Math.cos(n),i=Math.sin(n);for(let e of Z){if(null!=e.fx)continue;let{x:t,y:n}=e;if(e.x=t*r-n*i,e.y=t*i+n*r,e.vx){let t=e.vx;e.vx=t*r-e.vy*i,e.vy=t*i+e.vy*r}}performance.now()-e6>50&&e8()},tl=()=>{let e=!ef&&ex.orbit>0&&!q();e&&!tn&&(tr=0,ti=0,tn=f.timer(to)),!e&&tn&&(tn.stop(),tn=null)};eb.classed("lab-pop",ex.on&&Z.length<5e3);let ts=(0,L.bornTimes)(Z,et),ta=new Map(Z.map((e,t)=>[e.id,ts[t]])),td=eV.nodes(),tc=eH.nodes(),th=new Map;eU.each(function(e){th.set(e.id,[this])}),e2.each(function(e){th.set(e.id,[...th.get(e.id)||[],this])});let tp=new Uint8Array(Z.length).fill(1),tg=new Map(Z.map((e,t)=>[e.id,t])),tu=Z.filter(e=>1===e.degree),tf=tu.map(e=>ta.get(e.id)).filter(Number.isFinite),tx={min:tf.length?tf.reduce((e,t)=>Math.min(e,t)):null,max:tf.length?tf.reduce((e,t)=>Math.max(e,t)):null,of:tu.length},ty=null,tm=()=>{let e=e=>null==ty||ta.get(e.id)<=ty?null:"none";e1.style("display",e),eB&&eD.style("display",e)};eP();let tb="",tj=(0,L.clockNow)().fly;return tl(),{simulation:eO,resize:t=>{let r=E(ew??g.default(e.node()),n,t);n=t,e$(u.identity.translate(r.x,r.y).scale(r.k),250)},select:eM,setLab:e=>{if(ef){e.labels!==ex.labels&&(ex={...ex,labels:e.labels},e5(),tm());return}let t=ex;ex=e;let n=t.dotSize!==ex.dotSize||t.sizeBy!==ex.sizeBy;n&&(eV.attr("r",em),e2.attr("r",e=>em(e)+6),eU.each(eX),eO.force("collision").radius(e=>em(e)+2),ez&&eM(ez.id)),t.lines!==ex.lines&&eH.attr("stroke-width",.5*ex.lines).attr("stroke-opacity",eE()),(n||t.names!==ex.names||t.labels!==ex.labels)&&(e5(),tm()),ex.on&&ex.branch||eb.classed("lab-focus",!1),eb.classed("lab-pop",ex.on&&Z.length<5e3),t.orbit!==ex.orbit&&tl(),(L.FORCE_KEYS.some(e=>t[e]!==ex[e])||n)&&(eO.force("link").distance(eT).strength(Math.min(1,eR*ex.pull)),eO.force("charge").strength(eF),eO.force("gravityX").strength(eI),eO.force("gravityY").strength(eI),eO.force("radial").strength(eW*ex.rings),eS?.attr("opacity",Math.min(1,ex.rings)),eO.alpha(Math.max(eO.alpha(),.5)).restart())},setTime:e=>{ex.on||(e=null),ty=e;let t=0;for(let n=1;n<Z.length;n++){let r=+(null==e||ts[n]<=e);if(r&&1===Z[n].degree&&t++,r===tp[n])continue;tp[n]=r;let i=r?"":"none";for(let e of(td[n].style.display=i,tc[n-1]&&(tc[n-1].style.display=i),th.get(Z[n].id)||[]))e.style.display=i}for(let e=r.length;e<ei.length;e++){let t=tp[tg.get(ei[e].source.id)]&&tp[tg.get(ei[e].target.id)];tc[e].style.display=t?"":"none"}if(tm(),O&&(O.style.display=null==e?"none":"block",null!=e)){let n=new Date(e).toLocaleDateString(void 0,{month:"short",year:"numeric"}),r=(0,L.chapterAt)((0,L.clockNow)().social,e);O.textContent=`${n} \xb7 ${t.toLocaleString()} of ${tx.of.toLocaleString()} connections${r?` \xb7 at ${r.company}`:""}`}},setColours:e=>{K=e.of,eB=e.heat||null,eP(),eV.attr("fill",e=>e.id===H?D.MAP_LOOK.you:K(e)),eH.attr("stroke",eN),e5(),tm(),ez&&eM(ez.id)},setFind:(e,t)=>{let r=ex.on?String(e||""):"";if(r!==tb&&(tb=r,eQ=(0,L.findMatches)(Z.filter(e=>e.id!==H),r),eV.classed("found",e=>!!eQ?.has(e.id)),eH.classed("found",e=>!!eQ?.has(e.target.id)),eb.classed("lab-find",!!eQ),e5(),tm(),(0,L.setClock)({found:eQ?eQ.size:0})),t!==tj){tj=t;let e=eQ&&Z.filter(e=>eQ.has(e.id)).sort((e,t)=>(t.power_score||0)-(e.power_score||0))[0];e&&(e$(u.identity.translate(n.width/2-2.5*e.x,n.height/2-2.5*e.y).scale(2.5),750),eM(e.id),i(e))}},setFit:e=>{e!==e7&&(e7=e,e4=!0,clearTimeout(te),te=setTimeout(()=>{e4&&eO.alpha()<e3&&performance.now()-e6>100&&(e4=!1,e9())},150))},dispose:()=>{tn?.stop(),tn=null,clearTimeout(te)},range:tx}}(t,Z.current,n,e,e=>ec.current?.(e),i,o,a,Q,l,V,(0,L.effectiveLab)(eo.current),er.current,ed.current,G);J.current=p,p.select(eh.current),(0,L.setClock)({min:p.range.min,max:p.range.max,of:p.range.of}),p.setTime((0,L.clockNow)().at),p.setFind((0,L.clockNow)().find,(0,L.clockNow)().fly);let O=(0,A.registerGalaxy)({svg:K.current,stamp:()=>er.current?.style.display==="block"?er.current.textContent:null,legend:()=>ed.current.legend});return()=>{var e;p.simulation.stop(),p.dispose(),O(),t.interrupt(),J.current=null,("string"==typeof(e=".graph-tooltip")?new h.Selection([document.querySelectorAll(e)],[document.documentElement]):new h.Selection([(0,c.default)(e)],h.root)).remove()}},[e,i,ep,V,G]),(0,t.jsxs)("div",{style:{flex:1,position:"relative",overflow:"hidden"},children:[(0,t.jsx)("style",{children:Y}),(0,t.jsx)("svg",{ref:K,width:et?.width??800,height:et?.height??600,style:{background:"transparent"}}),(0,t.jsx)("div",{ref:Z,className:"galaxy-ring",style:{position:"absolute",left:0,top:0,display:"none",pointerEvents:"none",transformOrigin:"0 0"},children:(0,t.jsx)("div",{className:"galaxy-ring-pulse",style:{boxSizing:"border-box",border:"2.5px solid",borderRadius:"50%"}})}),(0,t.jsx)("div",{ref:er,style:{position:"absolute",bottom:56,left:"50%",transform:"translateX(-50%)",display:"none",padding:"6px 14px",borderRadius:16,background:"rgba(10,15,30,0.8)",border:"1px solid rgba(255,255,255,0.12)",color:"#e6edf5",fontSize:13,fontWeight:600,pointerEvents:"none",fontVariantNumeric:"tabular-nums"}}),(0,t.jsx)("div",{style:{position:"absolute",bottom:20,left:20,right:20,display:"flex",flexWrap:"wrap",gap:"4px 12px",fontSize:11,color:"#888",pointerEvents:"none"},children:ea.legend.map(([e,n])=>(0,t.jsxs)("span",{style:{display:"flex",alignItems:"center",gap:4,whiteSpace:"nowrap"},children:[(0,t.jsx)("span",{style:{width:8,height:8,borderRadius:"50%",background:n,display:"inline-block"}}),e]},e))})]})},modes:["network"],label:"Galaxy",icon:"🌌",desc:"Force-directed layout"},separation:{component:function({connections:e=[],degree2:r=[],fullDegree1:i=e,fullDegree2:o=r,onSelect:a,userName:d,selectedId:c,tierColors:h=e5,preset:p=null}){let g=function(){let[e,t]=(0,n.useState)(!1);return(0,n.useEffect)(()=>{let e=()=>t(window.innerWidth<768);return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]),e}(),u=(0,n.useSyncExternalStore)(eJ.watchNotchShown,eJ.notchShownNow,eJ.noNotch),f=g?68:56,x=g?5:10,y=g?8:16,[m,b]=(0,n.useState)(""),j=(0,n.useDeferredValue)(m.trim().toLowerCase()),[S,w]=(0,n.useState)(50),v=(0,n.useDeferredValue)(S),[k,$]=(0,n.useState)("all"),[C,z]=(0,n.useState)(()=>new Set),[_,M]=(0,n.useState)(null),[R,W]=(0,n.useState)(!1),[T,F]=(0,n.useState)(""),[I,E]=(0,n.useState)(!1),[O,B]=(0,n.useState)(null);p&&p.id!==O&&(B(p.id),b(p.query||""),$(p.tier||"all"),z(new Set(p.rarity?[p.rarity]:[])));let L=(0,l.default)(),[A,D]=(0,n.useState)(0),[N,H]=(0,n.useState)({w:0,h:800}),[q,Y]=(0,n.useState)(null),U=(0,n.useRef)(null),X=(0,n.useCallback)(e=>{U.current=e,Y(e)},[]),V=(0,n.useRef)(null),G=(0,n.useMemo)(()=>(0,P.separationPeople)(r,e),[r,e]),K=(0,n.useMemo)(()=>(0,P.routeIndex)(o),[o]),Z=(0,n.useMemo)(()=>{let e=new Map;for(let t of G.people)e.set(t.key,eX(t.person,K.get(t.key)?.size||t.waysIn));return e},[G,K]),J=(0,n.useMemo)(()=>{if(50===v)return G.people;let e=new Map;for(let t of G.people)e.set(t.key,function(e,t,n=50){let r=(Math.max(0,Math.min(100,Number(n)||0))-50)/50;if(!r)return e;let i=eK(t),o=Math.abs(r);return e*(1-o+o*(r<0?1-i:i))}(t.score,Z.get(t.key)?.count||t.waysIn,v));return[...G.people].sort((t,n)=>e.get(n.key)-e.get(t.key)||(0,P.comparePower)(t,n))},[G,Z,v]),Q=(0,n.useMemo)(()=>{let e=Object.fromEntries(eq.map(e=>[e.key,0]));for(let t of Z.values())e[t.key]++;return e},[Z]),ee=(0,n.useMemo)(()=>{if(!I)return null;let e=new Map,t=new Map,n=new Map;for(let r of G.people){let i=(0,eH.companyOf)(r.person)||null,o=(0,eH.industryOf)(i,r.person.headline).key;e.set(r.key,{company:i,sector:o}),t.set(o,(t.get(o)||0)+1),i&&n.set(i,(n.get(i)||0)+1)}return{by:e,sectors:eH.INDUSTRIES.map(e=>({...e,count:t.get(e.key)||0})).filter(e=>e.count>0).sort((e,t)=>t.count-e.count),companies:[...n].map(([e,t])=>({name:e,count:t})).sort((e,t)=>t.count-e.count||e.name.localeCompare(t.name))}},[G,I]),et=(0,n.useCallback)(e=>{if(!_||!ee)return!0;let t=ee.by.get(e.key);return"sector"===_.kind?t?.sector===_.key:t?.company===_.key},[_,ee]),en=(0,n.useCallback)((e,t)=>("all"===k||e.tier===k)&&(!C.size||C.has(Z.get(e.key)?.key))&&et(e)&&(!t||e.haystack.includes(t)),[k,C,Z,et]),er=(0,n.useMemo)(()=>j||"all"!==k||C.size||_?J.filter(e=>en(e,j)):J,[J,j,k,C,_,en]),ei=(0,n.useMemo)(()=>new Set(i.map(P.keyFor)),[i]),eo=(0,n.useCallback)(e=>ei.has(e.key)?"connected":(0,s.hasRequest)(e.person,L)?"asked":null,[ei,L]),el=(0,P.mapCount)(v,x),es=(0,n.useMemo)(()=>er.filter(e=>!eo(e)).slice(0,x+1),[er,x,eo]),ea=(0,n.useMemo)(()=>es.slice(0,el),[es,el]),ed=(0,n.useMemo)(()=>er.reduce((e,t)=>e+ +!!eo(t),0),[er,eo]),ec=null!=c?G.rowToKey.get(c)??null:null,eh=1===el,ep=(0,n.useMemo)(()=>eh?(0,P.mostMutuals)(er.filter(e=>!eo(e)),e=>Z.get(e.key)?.count||0,(g?3:6)+1):[],[eh,er,eo,Z,g]),eg=(0,n.useMemo)(()=>eh&&(ec&&er.find(e=>e.key===ec)||ep[0])||null,[eh,ec,er,ep]),eu=(0,n.useMemo)(()=>eh&&eg?ep.filter(e=>e.key!==eg.key).slice(0,g?3:6):[],[eh,eg,ep,g]),ef=(0,n.useRef)(a);(0,n.useEffect)(()=>{ef.current=a});let ex=(0,n.useCallback)(e=>ef.current?.(e.person),[]),ey=(0,n.useCallback)(e=>{e&&ef.current?.(e)},[]);(0,n.useEffect)(()=>{if(!q)return;let e=new ResizeObserver(()=>{let e=Math.round(q.clientWidth),t=Math.round(q.clientHeight);H(n=>n.w===e&&n.h===t?n:{w:e,h:t})});return e.observe(q),()=>e.disconnect()},[q]);let em=Math.max(0,Math.min(980,N.w-2*y)),eb=!g&&em>=760,ej=(0,n.useMemo)(()=>eh?(0,P.convergeLayout)(eg,em||800,g,{cards:eb,mutuals:eg&&Z.get(eg.key)?.count||0}):(0,P.summitLayout)(ea,em||800,g,{cards:eb}),[eh,eg,ea,em,g,eb,Z]),eS=g?58:28,ew=38*!!eu.length,ev=eh?eg?ej.height+ew:0:ej.height,ek=ev?eS+ev+12:0,e$=ek+44*!g+28,eC=e$+er.length*f+72,ez=Math.max(0,Math.floor((A-e$)/f)-8),e_=Math.min(er.length,ez+Math.ceil(N.h/f)+16),eM=(0,n.useCallback)(e=>{let t=16*Math.floor(e.currentTarget.scrollTop/16);D(e=>e===t?e:t)},[]),eR=(0,n.useCallback)(()=>{U.current&&(U.current.scrollTop=0),D(0)},[]);(0,n.useEffect)(()=>{let e=e=>{if("/"!==e.key||e.metaKey||e.ctrlKey||e.altKey)return;let t=e.target;t&&("INPUT"===t.tagName||"TEXTAREA"===t.tagName||"SELECT"===t.tagName||t.isContentEditable)||(e.preventDefault(),V.current?.focus())};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[]);let eW=e=>{b(e),eR()},eT=e=>{M(e),W(!1),eR()},eF=e=>{w(Math.max(0,Math.min(100,Math.round(Number(e)||0)))),eR()},{summary:eI}=G,eE=!!j||"all"!==k||C.size>0||!!_,eO=function(e=50){let t=Math.max(0,Math.min(100,Math.round(Number(e)||0)));return t<=10?{name:"Rarest first",detail:"Strong people with one way in: the connection who knows them is the only door you have."}:t<45?{name:"Leaning rare",detail:"Strong people with few mutual connections move up; the ones everybody knows move down."}:t<=55?{name:"By power",detail:"Each person’s own score alone. How many of your connections know them doesn’t change the order."}:t<90?{name:"Leaning easy",detail:"Strong people you share more mutual connections with move up: more people who could introduce you."}:{name:"Easiest first",detail:"Strong people you share the most mutual connections with: the warmest introductions. All the way right, the map aims at whoever you share the most with, with the ones in circles you haven’t scanned yet as grey dots."}}(S),eB=S<45?ty:S>55?tm:"#FFD700",eL=!d||/^you$/i.test(String(d).trim())?"You":(0,eZ.initialsFor)(d),eA=er.slice(ez,e_),eD=(0,t.jsxs)("span",{"aria-live":"polite",title:`${eO.name}. ${eO.detail} It only reorders: scores, tiers and ranks stay as they are.`,style:{...g?{marginLeft:"auto"}:{},textTransform:"none",letterSpacing:0,flexShrink:0,height:g?40:26,padding:"0 12px",borderRadius:15,boxSizing:"border-box",display:"inline-flex",alignItems:"center",gap:7,fontSize:12,fontWeight:700,whiteSpace:"nowrap",border:`1px solid ${eB}66`,background:`${eB}14`,color:eB},children:[(0,t.jsx)("span",{style:{width:7,height:7,borderRadius:"50%",background:eB}}),(0,t.jsx)("span",{style:{fontVariantNumeric:"tabular-nums"},children:S}),eO.name]}),eP=(0,t.jsx)("input",{ref:V,type:"search",value:m,onChange:e=>eW(e.target.value),onKeyDown:e=>{if("Enter"===e.key){let e=m.trim().toLowerCase(),t=J.find(t=>en(t,e));t&&ex(t)}else"Escape"===e.key&&(m?eW(""):e.currentTarget.blur())},placeholder:g?"Search people, companies, or who knows them":"Search people, companies, who knows them","aria-label":"Search people, companies, or who knows them",style:{width:g?"100%":300,flexShrink:0,minWidth:0,height:g?44:32,boxSizing:"border-box",padding:"0 12px",borderRadius:8,outline:"none",color:"#fff",fontSize:g?16:13,border:"1px solid rgba(255,255,255,0.12)",background:"rgba(255,255,255,0.05)"}}),eN=(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{title:tj,style:{fontSize:10,color:"#666",whiteSpace:"nowrap",flexShrink:0,textTransform:"uppercase",letterSpacing:.5,cursor:"help"},children:"Only show"}),eq.map(e=>{let n=C.has(e.key);return(0,t.jsxs)("button",{type:"button","aria-pressed":n,onClick:()=>{var t;return t=e.key,void(z(e=>eG(e,t)),eR())},title:`${e.label}: ${e.range} mutual connection${"1"===e.range?"":"s"}. ${tj}`,style:{height:g?40:28,padding:g?"0 10px":"0 8px",borderRadius:14,cursor:"pointer",flexShrink:0,fontSize:11.5,fontWeight:700,whiteSpace:"nowrap",border:`1px solid ${n?e.color:"rgba(255,255,255,0.1)"}`,background:n?`${e.color}22`:"rgba(255,255,255,0.03)",color:n?e.color:"#999"},children:[e.label,(0,t.jsx)("span",{style:{marginLeft:5,fontWeight:500,color:n?e.color:"#666",opacity:.85},children:e6(Q[e.key])})]},e.key)})]});return(0,t.jsxs)("div",{style:{flex:1,minWidth:0,display:"flex",flexDirection:"column",background:"var(--sd-page)",color:"#fff",overflow:"hidden"},children:[(0,t.jsxs)("div",{style:{padding:`${u?48:14}px 56px 8px`,flexShrink:0},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:g?"baseline":"center",gap:10,flexWrap:g?"wrap":"nowrap"},children:[(0,t.jsx)("h2",{title:"Ranked by each person’s own score (title, company, headline). It ranks reachability, not people. From the lists scanned so far.",style:{margin:0,fontSize:18,fontWeight:800,background:"linear-gradient(135deg, #FFD700, #FF6B35)",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent"},children:"Separation"}),(0,t.jsx)("span",{style:{fontSize:12,color:"#aaa",...g?{}:{flex:1,minWidth:0,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}},children:g?`${e3(eI.people,"person","people")} \xb7 ${e6(eI.byTier.S)} S \xb7 ${e6(eI.multi)} with 2+ ways`:`${e3(eI.people,"person","people")} two steps away \xb7 ${e6(eI.byTier.S)} S-tier \xb7 ${e6(eI.multi)} reachable 2+ ways \xb7 through ${e6(eI.bridges)} of your connections`}),!g&&eP]}),(0,t.jsx)("div",{"aria-hidden":"true",style:{display:"flex",gap:1,height:6,borderRadius:3,overflow:"hidden",margin:"8px 0 6px",background:"rgba(255,255,255,0.04)"},children:P.TIERS.filter(e=>eI.byTier[e]>0).map(e=>(0,t.jsx)("div",{style:{flex:eI.byTier[e],background:h[e]||"#555"}},e))}),g&&(0,t.jsx)("div",{style:{fontSize:11,color:"#777",lineHeight:1.4},children:"Ranks reachability, not people · lists scanned so far"}),eI.peopleOnlyUnresolved>0&&(0,t.jsxs)("div",{style:{marginTop:8,padding:"8px 10px",borderRadius:8,fontSize:11.5,lineHeight:1.5,color:"#e8d9a0",background:"rgba(255,215,0,0.06)",border:"1px solid rgba(255,215,0,0.25)"},children:[e3(eI.peopleOnlyUnresolved,"of these people","of these people")," ","came only through ",e3(eI.onlyUnresolvedVia,"connection record","connection records")," ","that ",1===eI.onlyUnresolvedVia?"doesn’t":"don’t"," match anyone in your 1st-degree list, so who introduces you can’t be named. They’re still ranked."]})]}),(0,t.jsxs)("div",{style:{padding:"0 56px 10px",flexShrink:0,borderBottom:"1px solid rgba(255,255,255,0.06)"},children:[(0,t.jsx)("style",{children:tb}),g&&eP,(0,t.jsxs)("div",{style:{marginTop:g?8:2,padding:g?"8px 10px":"8px 14px",borderRadius:12,position:"relative",border:"1px solid rgba(255,255,255,0.08)",background:"rgba(255,255,255,0.025)"},children:[R&&(0,t.jsx)(tf,{facets:ee,text:T,onText:F,isMobile:g,onPick:eT,onClose:()=>W(!1)}),(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:g?8:6,flexWrap:g?"nowrap":"wrap",minWidth:0,overflowX:g?"auto":"visible",scrollbarWidth:"thin"},children:[(0,t.jsx)("span",{style:{fontSize:10,color:"#666",whiteSpace:"nowrap",flexShrink:0,textTransform:"uppercase",letterSpacing:.5},children:"Their tier"}),["all",...P.TIERS].map(e=>{let n=k===e,r="all"===e?"#fff":h[e]||"#888",i="all"===e?eI.people:eI.byTier[e];return(0,t.jsxs)("button",{type:"button","aria-pressed":n,onClick:()=>{$(e),eR()},style:{height:g?40:28,padding:g?"0 10px":"0 8px",borderRadius:14,cursor:"pointer",flexShrink:0,fontSize:12,fontWeight:700,whiteSpace:"nowrap",border:`1px solid ${n?r:"rgba(255,255,255,0.1)"}`,background:n?`${"#fff"===r?"#ffffff":r}22`:"rgba(255,255,255,0.03)",color:n?r:"#999"},children:["all"===e?"All":e,(0,t.jsx)("span",{style:{marginLeft:5,fontWeight:500,color:n?r:"#666",opacity:.85},children:e6(i)})]},e)}),(0,t.jsxs)("span",{style:{display:"inline-flex",flexShrink:0,height:g?40:30,borderRadius:15,overflow:"hidden",border:`1px solid ${_?tx:"rgba(0,255,136,0.35)"}`,background:_?"rgba(0,255,136,0.12)":"rgba(0,255,136,0.04)"},children:[(0,t.jsx)("button",{type:"button","aria-haspopup":"dialog","aria-expanded":R,onClick:()=>R?W(!1):void(E(!0),F(""),W(!0)),title:"Narrow everyone to one sector or one company",style:{padding:_?"0 6px 0 12px":"0 12px",border:"none",background:"none",cursor:"pointer",fontSize:12,fontWeight:700,whiteSpace:"nowrap",color:tx,maxWidth:g?200:300,overflow:"hidden",textOverflow:"ellipsis"},children:_?(0,t.jsxs)(t.Fragment,{children:["Path",(0,t.jsxs)("span",{style:{fontWeight:500,color:"#cfe"},children:[" · ",_.label]})]}):"Path ▾"}),_&&(0,t.jsx)("button",{type:"button","aria-label":`Clear the path: ${_.label}`,onClick:()=>eT(null),style:{padding:"0 10px 0 4px",border:"none",background:"none",cursor:"pointer",fontSize:14,color:tx},children:"×"})]}),!g&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{"aria-hidden":"true",style:{width:1,height:18,background:"rgba(255,255,255,0.12)",margin:"0 2px"}}),eN]}),g&&eD]}),(0,t.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:g?"baseline":"center",marginTop:8,fontSize:10.5,fontWeight:800,letterSpacing:.5,textTransform:"uppercase"},children:[(0,t.jsxs)("span",{style:{color:ty,flex:g?void 0:1},children:["Rare",g?"":" · one way in"]}),g?(0,t.jsx)("span",{style:{color:"#FFD700"},children:"Power"}):eD,(0,t.jsxs)("span",{style:{color:tm,flex:g?void 0:1,textAlign:"right"},children:["Easy",g?"":" · many mutual connections"]})]}),(0,t.jsx)("input",{className:"sepslide",type:"range",min:0,max:100,step:1,value:S,onChange:e=>eF(e.target.value),onDoubleClick:()=>eF(50),"aria-label":"Order: the rarest ways in, to the easiest","aria-valuetext":`${S}: ${eO.name}`,title:"Drag to reorder everyone. Double-click to go back to the middle."}),(0,t.jsx)("div",{style:{display:"flex",justifyContent:"space-between",marginTop:-2},children:[[0,"Rarest"],[25,""],[50,"By power"],[75,""],[100,"Easiest"]].map(([e,n])=>(0,t.jsxs)("button",{type:"button",onClick:()=>eF(e),"aria-label":`Set the slider to ${e}${n?`: ${n}`:""}`,style:{padding:"2px 4px",border:"none",background:"none",cursor:"pointer",fontSize:10,color:S===e?"#fff":"#667",fontWeight:S===e?700:500,fontVariantNumeric:"tabular-nums"},children:[e,n&&!g?` \xb7 ${n}`:""]},e))}),g&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{style:{marginTop:4,fontSize:11.5,lineHeight:1.45,color:"#bbb"},children:[(0,t.jsxs)("span",{style:{color:eB,fontWeight:700},children:[eO.name,"."]})," ",eO.detail]}),(0,t.jsx)("div",{style:{display:"flex",alignItems:"center",gap:8,marginTop:8,minWidth:0,flexWrap:"nowrap",overflowX:"auto",scrollbarWidth:"thin"},children:eN})]})]})]}),(0,t.jsx)("div",{ref:X,onScroll:eM,style:{flex:1,minHeight:0,overflowY:"auto",overflowX:"hidden",position:"relative",padding:`0 ${y}px`},children:(0,t.jsxs)("div",{style:{position:"relative",maxWidth:980,margin:"0 auto",height:eC},children:[ek>0&&(0,t.jsxs)("div",{style:{height:ek,boxSizing:"border-box",paddingTop:10},children:[(0,t.jsxs)("div",{style:{height:eS-10,overflow:"hidden"},children:[(0,t.jsx)("div",{title:g?void 0:`${!eh&&ed>0?`${e6(ed)} asked or connected, so it moved on. `:""}Solid orange: the top-scored bridge. Dashed: other routes.${eh?" Pick anyone in the list to aim at them instead.":eb?" A lit pill is someone’s best way in.":" Dot size: ways in."}`,style:{fontSize:12,fontWeight:700,color:"#ddd",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:eh?(0,t.jsxs)(t.Fragment,{children:["Aiming at ",eg.person.name," · ",ej.unscanned?`${e6(eg.waysIn+ej.unscanned)} mutual connections: ${e6(eg.waysIn)} drawn, ${e6(ej.unscanned)} in circles not scanned yet`:1===eg.waysIn?"the one connection of yours who leads to them":`all ${e6(eg.waysIn)} connections of yours who lead to them`]}):(0,t.jsxs)(t.Fragment,{children:["Top ",e6(ea.length)," you haven’t asked, of ",e6(er.length),eE?" shown":"",50!==S?` \xb7 ${eO.name.toLowerCase()}`:""," · every way in drawn"]})}),g&&(0,t.jsxs)("div",{style:{fontSize:10,color:"#777",marginTop:2,whiteSpace:"normal",overflow:"hidden",textOverflow:"ellipsis",lineHeight:1.35},children:[!eh&&ed>0&&(0,t.jsxs)("span",{style:{color:"#FFD700"},children:[e6(ed)," asked or connected, so it moved on · "]}),(0,t.jsx)("span",{style:{color:e1},children:"solid orange"})," = top-scored bridge · dashed = other routes",eh?" · pick anyone in the list to aim at them instead":eb?" · a lit pill is someone’s best way in":" · dot size = ways in"]})]}),em>0&&(0,t.jsx)(tr,{layout:ej,selectedKey:ec,tierColors:h,youLabel:eL,isMobile:g,onPick:ex,onPickBridge:ey,mutualsBy:Z,doors:!g&&em>=640,cards:eb}),em>0&&eh&&(0,t.jsx)(t.Fragment,{children:eu.length>0&&(0,t.jsxs)("div",{style:{height:ew,display:"flex",alignItems:"center",gap:6,overflow:"hidden"},children:[(0,t.jsx)("span",{style:{fontSize:10,color:"#666",textTransform:"uppercase",letterSpacing:.5,flexShrink:0},children:"Next"}),eu.map(e=>{let n;return(0,t.jsxs)("button",{type:"button",onClick:()=>ex(e),title:`Aim at ${e.person.name}`,style:{height:26,padding:"0 10px",borderRadius:13,cursor:"pointer",flexShrink:1,minWidth:0,fontSize:11,fontWeight:600,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",border:`1px solid ${h[e.tier]||"#888"}55`,background:"rgba(255,255,255,0.03)",color:"#ccc"},children:[(0,P.shortName)(e.person.name),(0,t.jsx)("span",{style:{marginLeft:5,color:h[e.tier]||"#888",fontWeight:700},children:e.score.toFixed(1)}),(0,t.jsx)("span",{style:{marginLeft:5,color:"#667",fontWeight:500},children:1===(n=Math.max(Z.get(e.key)?.count||0,e.waysIn))?"1 mutual":`${e6(n)} mutuals`})]},e.key)})]})})]}),er.length>0&&!g&&(0,t.jsxs)("div",{style:{height:44,display:"flex",alignItems:"center",gap:10,padding:"0 12px 0 15px",boxSizing:"border-box",borderTop:"1px solid rgba(255,255,255,0.06)"},children:[(0,t.jsx)("span",{style:{fontSize:15,fontWeight:800},children:"Ranked by reach"}),(0,t.jsxs)("span",{style:{fontSize:11,fontWeight:800,color:"#000",background:"#FFD700",borderRadius:10,padding:"2px 8px"},children:[e6(er.length),eE?` of ${e6(eI.people)}`:""]}),(0,t.jsxs)("span",{style:{marginLeft:"auto",fontSize:11,color:"#777"},children:["order follows the slider · ",(0,t.jsx)("span",{style:{color:eB},children:eO.name.toLowerCase()})]})]}),er.length>0&&(0,t.jsxs)("div",{style:{height:28,display:"grid",alignItems:"center",gap:10,padding:"0 12px 0 15px",gridTemplateColumns:g?"44px 36px 1fr 44px":e8,fontSize:9,fontWeight:700,color:"#555",textTransform:"uppercase",letterSpacing:.5,borderBottom:"1px solid rgba(255,255,255,0.08)",boxSizing:"border-box"},children:[(0,t.jsx)("span",{title:"Rank by score, then ways in. = means tied",children:"#"}),(0,t.jsx)("span",{}),g?(0,t.jsx)("span",{children:"Person · way in"}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{children:"Person"}),(0,t.jsx)("span",{children:"Way in"}),(0,t.jsx)("span",{title:tj,children:"How rare the way in"}),(0,t.jsx)("span",{style:{textAlign:"right"},children:"Power"})]}),g&&(0,t.jsx)("span",{style:{textAlign:"right"},children:"Score"})]}),eA.map((e,n)=>(0,t.jsx)(tS,{p:e,top:e$+(ez+n)*f,height:f,isMobile:g,selected:e.key===ec,tierColors:h,onPick:ex,q:j,status:eo(e),rarity:Z.get(e.key)},e.key)),0===er.length&&(0,t.jsxs)("div",{style:{position:"absolute",top:40,left:0,right:0,textAlign:"center",color:"#888",fontSize:13,padding:"0 16px"},children:[j?(0,t.jsxs)(t.Fragment,{children:["No one matches ‘",m.trim(),"’. Search covers names, headlines, companies and who knows them."]}):(0,t.jsx)(t.Fragment,{children:"No one here with those filters."}),(0,t.jsx)("div",{style:{marginTop:12},children:(0,t.jsx)("button",{type:"button",onClick:()=>{b(""),$("all"),z(new Set),M(null),eR()},style:{padding:"8px 16px",borderRadius:8,cursor:"pointer",fontSize:12,fontWeight:700,border:"1px solid rgba(255,255,255,0.15)",background:"rgba(255,255,255,0.06)",color:"#fff"},children:"Clear"})})]})]})})]})},modes:["separation"],label:"Separation",icon:"🏆",desc:"Every 2nd degree, ranked · every way in"},chain:{component:function({connections:e,degree2:r=[],onSelect:o,userName:s,fullDegree1:a,fullDegree2:d,scanNotes:c,canScan:h=!0,chainOpen:p=null,onChainOpened:g,onCircle:u}){let f=(0,n.useRef)(null),[x,y]=(0,n.useState)(null),[m,b]=(0,n.useState)(null),[j,S]=(0,n.useState)({w:800,h:600}),w=a||e,v=d||r,[k,$]=(0,n.useState)(()=>ev(p,w)),[C,z]=(0,n.useState)(p);if(p&&p!==C){z(p);let e=ev(p,w);e.length&&$(e)}(0,n.useEffect)(()=>{p&&g?.()},[p,g]);let _=(0,n.useSyncExternalStore)(h?i.watchScanner:ey,ef,ex),M=(0,n.useSyncExternalStore)(eb,ej,eS),R=(0,l.default)();(0,n.useEffect)(()=>{let e=f.current;if(!e)return;let t=()=>{let t=Math.round(e.clientWidth),n=Math.round(e.clientHeight);S(e=>e.w===t&&e.h===n?e:{w:t,h:n})},n=new ResizeObserver(t);return n.observe(e),t(),()=>n.disconnect()},[]);let W=(0,n.useMemo)(()=>G(w,v),[w,v]),T=(0,n.useMemo)(()=>(0,O.reachIndex)(w,v,c),[w,v,c]),F=(0,n.useMemo)(()=>(0,O.readyByCircle)(T),[T]),E=(0,n.useMemo)(()=>(0,el.redundancy)(d||r,a||e),[d,r,a,e]),L=(0,n.useMemo)(()=>{let e=new Map;for(let t of v)e.set(t.id,t);for(let t of w)e.set(t.id,t);return e},[w,v]),A=[];for(let e of k){let t=L.get(e);if(!t)break;A.push(t)}let P=A.length>0,N=A.length?A[A.length-1]:null;(0,n.useEffect)(()=>{u?.(N)},[N,u]),(0,n.useEffect)(()=>()=>u?.(null),[u]),(0,n.useEffect)(()=>{if(!P)return;let e=e=>{"Escape"!==e.key||/^(INPUT|TEXTAREA|SELECT)$/.test(e.target?.tagName||"")||document.querySelector('[role="dialog"][aria-modal="true"]')||$(e=>e.slice(0,-1))};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[P]);let H={};r.forEach(e=>{e.source_connection_id&&(H[e.source_connection_id]||(H[e.source_connection_id]=[]),H[e.source_connection_id].push(e))});let q=e.filter(e=>H[e.id]&&H[e.id].length>0).sort((e,t)=>(H[t.id]?.length||0)-(H[e.id]?.length||0)),Y=j.w/2,U=j.h/2,X=Math.min(Y,U)-30,V=new Set(q.map(e=>e.id)),K=new Map;for(let e of q)V.has(e.unlocked_from_bridge_id)&&K.set(e.unlocked_from_bridge_id,(K.get(e.unlocked_from_bridge_id)||0)+1);let Z=new Map(q.map(e=>[e.id,e])),J=q.filter(e=>!(e=>{let t=new Set([e.id]);for(let n=e.unlocked_from_bridge_id;V.has(n);n=Z.get(n).unlocked_from_bridge_id){if(t.has(n))return!1;t.add(n)}return V.has(e.unlocked_from_bridge_id)})(e)),Q=er(J.length,{inner:.55*X,innerMin:.4*X,outer:.62*X,spacing:46,minSpacing:20,ringGap:62}),ee=J.map((e,t)=>{let n=Q.points[t];return{...e,x:Y+n.x,y:U+n.y,angle:n.angle,clusterSize:(H[e.id]||[]).length,chains:K.get(e.id)||0}}),et=Q.rings.length>1,en=function(e,t=[],n=34){let r=Math.max(0,...t.map(e=>e.radius)),i=Math.max(.66*e,r?r+n:0);return{inner:i,outer:Math.max(.8*e,i+.14*e)}}(X,Q.rings),ei=Math.max(.6,Math.min(1.3,Math.min(Y,U)/(en.outer+8))),eo=m??ei,ea=(0,n.useRef)([]);(0,n.useEffect)(()=>{ea.current=ee.map(e=>({id:e.id,angle:e.angle}))});let ec=(0,n.useRef)(0);if((0,n.useEffect)(()=>{let e=f.current;if(!e||P)return;let t=(t,n)=>{let r=e.getBoundingClientRect(),i=t-r.left,o=Math.atan2(n-r.top-j.h/2,i-j.w/2),l=null,s=1/0;return ea.current.forEach(e=>{let t=Math.abs(o-e.angle)%(2*Math.PI);t>Math.PI&&(t=2*Math.PI-t),t<s&&(s=t,l=e.id)}),l},n=e=>{if(e.touches[0]){let n=t(e.touches[0].clientX,e.touches[0].clientY);n&&y(n)}},r=e=>{e.preventDefault();let n=Date.now();if(!(n-ec.current<16)&&(ec.current=n,e.touches[0])){let n=t(e.touches[0].clientX,e.touches[0].clientY);n&&y(n)}};return e.addEventListener("touchstart",n,{passive:!1}),e.addEventListener("touchmove",r,{passive:!1}),()=>{e.removeEventListener("touchstart",n),e.removeEventListener("touchmove",r)}},[j,eo,P]),P)return(0,t.jsx)("div",{ref:f,style:{flex:1,background:"var(--sd-page)",position:"relative",overflow:"hidden"},children:(0,t.jsx)(e_,{trail:A,index:W,reach:T,dims:j,requests:R,scanningId:_,still:M,canScan:h,onOpen:e=>$(A.map(e=>e.id).concat(e)),onBack:e=>$(A.slice(0,e).map(e=>e.id)),onSelect:o},A.map(e=>e.id).join(">"))});let eh=r.length,eg=r.filter(e=>"S"===e.tier).length,eu=r.filter(e=>"A"===e.tier).length,em=x?ee.find(e=>e.id===x):null;return(0,t.jsxs)("div",{ref:f,style:{flex:1,background:"var(--sd-page)",position:"relative",overflow:"hidden"},children:[(0,t.jsx)("svg",{width:j.w,height:j.h,children:(0,t.jsxs)("g",{transform:`translate(${Y*(1-eo)}, ${U*(1-eo)}) scale(${eo})`,children:[Q.rings.map(e=>(0,t.jsx)("circle",{cx:Y,cy:U,r:e.radius,fill:"none",stroke:`${es[1]}10`,strokeWidth:1},"ring-"+e.radius)),em&&(0,t.jsx)(ek,{bridge:em,members:ew(em,W),reach:T,cx:Y,cy:U,maxR:X,still:M,band:en}),ee.map(e=>{var n,r,i;let o,l=x===e.id,s=(H[e.id]||[]).filter(e=>"S"===e.tier).length,a=(H[e.id]||[]).filter(e=>"A"===e.tier).length,d=F.get(e.id)||0;return(0,t.jsxs)("g",{onClick:()=>{y(null),$([e.id])},onMouseEnter:()=>y(e.id),onMouseLeave:()=>y(null),style:{cursor:"pointer"},children:[(0,t.jsx)("title",{children:(n=e,r=d,i=(0,O.scanBars)(e,T),o=[],r&&o.push(`${r} in ${ep(n)}’s circle ${1===r?"is":"are"} ready for a scan`),n.chains&&o.push(`${n.chains} scanned since, with ${1===n.chains?"a cluster":"clusters"} of their own`),null!=i&&o.push(5===i?"their whole list is scanned":`about ${20*i}% of their list is scanned`),o.length?o.join(" · "):`${ep(n)}’s circle`)}),(0,t.jsx)("circle",{cx:e.x,cy:e.y,r:l?21:18,fill:`${D.TIER_COLORS[e.tier]}${l?"14":"08"}`}),(0,t.jsxs)("g",{transform:`translate(${e.x} ${e.y})`,pointerEvents:"none",children:[e.chains+d===0&&(0,t.jsx)("circle",{r:(l?13:11)+3.6,fill:"none",stroke:B,strokeWidth:1}),(function(e,{formed:t=0,ready:n=0}={},r=12){let i=Math.max(0,t)+Math.max(0,n);if(!i)return[];let o=Math.min(i,r),l=t>0?Math.max(1,Math.round(o*t/i)):0;n>0&&l>=o&&(l=o-1);let s=1===o?.5:Math.min(.32,2*Math.PI/o*.35),a=2*Math.PI/o-s,d=t=>`${(e*Math.cos(t)).toFixed(2)} ${(e*Math.sin(t)).toFixed(2)}`;return Array.from({length:o},(t,n)=>{let r=-Math.PI/2+s/2+n*(a+s);return{kind:n<l?"formed":"ready",d:`M${d(r)} A${e} ${e} 0 ${+(a>Math.PI)} 1 ${d(r+a)}`}})})((l?13:11)+3.6,{formed:e.chains,ready:d}).map((e,n)=>(0,t.jsx)("path",{d:e.d,fill:"none",strokeLinecap:"round",strokeWidth:2,stroke:"ready"===e.kind?ed:es[2]},n))]}),(0,t.jsx)("circle",{cx:e.x,cy:e.y,r:l?13:11,fill:(0,I.localPhoto)(e.profile_image_url)?"#1a1a2e":D.TIER_COLORS[e.tier],stroke:l?"#fff":D.TIER_COLORS[e.tier],strokeWidth:l?2.5:2}),(0,I.localPhoto)(e.profile_image_url)&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("clipPath",{id:"bc-"+e.id,children:(0,t.jsx)("circle",{cx:e.x,cy:e.y,r:l?11:9})}),(0,t.jsx)("image",{href:(0,I.localPhoto)(e.profile_image_url),x:e.x-(l?11:9),y:e.y-(l?11:9),width:l?22:18,height:l?22:18,clipPath:`url(#bc-${e.id})`})]}),!(0,I.localPhoto)(e.profile_image_url)&&(0,t.jsx)("text",{x:e.x,y:e.y+4,textAnchor:"middle",fill:"S"===e.tier?"#000":"#fff",fontSize:11,fontWeight:700,children:e.name?.charAt(0)}),d>0&&(0,t.jsxs)("g",{pointerEvents:"none",children:[(0,t.jsx)("circle",{cx:e.x+14,cy:e.y-14,r:6,fill:"var(--sd-bg)",stroke:ed,strokeWidth:1.2}),(0,t.jsx)("text",{x:e.x+14,y:e.y-11.4,textAnchor:"middle",fill:ed,fontSize:d>9?6:7,fontWeight:800,children:d>99?"99+":d})]}),(0,t.jsx)("text",{x:e.x,y:e.y+(l?24:22),textAnchor:"middle",fill:"#fff",fontSize:9,fontWeight:600,children:e.name?.split(" ")[0]}),(!et||l)&&(0,t.jsxs)("text",{x:e.x,y:e.y+(l?34:32),textAnchor:"middle",fill:l?"#bbb":"#888",fontSize:7,children:[e.clusterSize," · ",s>0?s+"S ":"",a>0?a+"A":""]})]},"b-"+e.id)}),(0,t.jsx)("circle",{cx:Y,cy:U,r:22,fill:"var(--sd-bg)",stroke:"#FFD700",strokeWidth:3}),(0,t.jsx)("text",{x:Y,y:U+4,textAnchor:"middle",fill:"#FFD700",fontSize:11,fontWeight:800,children:s?.split(" ")[0]||"YOU"})]})}),(0,t.jsx)(ez,{onIn:()=>b(e=>Math.min(3,(e??ei)+.3)),onReset:()=>b(null),onOut:()=>b(e=>Math.max(.4,(e??ei)-.3))}),(0,t.jsxs)("div",{style:{position:"absolute",bottom:16,left:12,background:"rgba(0,0,0,0.75)",borderRadius:10,padding:"10px 14px",backdropFilter:"blur(12px)",border:"1px solid rgba(255,255,255,0.06)",maxWidth:"calc(100vw - 80px)"},children:[(0,t.jsx)("div",{style:{fontSize:9,fontWeight:700,color:"#666",letterSpacing:1.5,marginBottom:8},children:"DEGREES OF SEPARATION"}),(0,t.jsx)("div",{style:{display:"flex",gap:8},children:[1,2,3,4,5,6].map(n=>(0,t.jsxs)("div",{style:{textAlign:"center"},children:[(0,t.jsxs)("div",{style:{width:28,height:28,borderRadius:"50%",fontSize:11,fontWeight:800,display:"flex",alignItems:"center",justifyContent:"center",background:n<=2?es[n]:"rgba(255,255,255,0.04)",color:n<=2?"#000":"#333",border:n<=2?"none":"1px solid rgba(255,255,255,0.08)",boxShadow:n<=2?`0 0 6px ${es[n]}30`:"none"},children:["D",n]}),(0,t.jsx)("div",{style:{fontSize:7,color:n<=2?"#aaa":"#333",marginTop:3},children:1===n?e.length:2===n?eh:"—"})]},n))}),(0,t.jsxs)("div",{style:{fontSize:9,color:"#555",marginTop:8},children:[J.length," bridges",q.length>J.length?` + ${q.length-J.length} along their chains`:""," · ",eg," S + ",eu," A at 2nd degree"]}),E>0&&(0,t.jsxs)("div",{style:{fontSize:9,color:"#555",marginTop:4},title:"The share of everyone you reach through a circle that more than one of your connections reaches",children:[Math.round(100*E),"% of your 2nd degree you reach two or more ways"]}),(0,t.jsx)("div",{style:{fontSize:8,color:"#444",marginTop:4},children:"Click a bridge to open their circle, then anyone in it to open theirs"})]})]})},modes:["degrees"],label:"Bridge Chains",icon:"🔗",desc:"Your bridges, and the chains that lead on from them"},rings:{component:function({connections:e,degree2:r=[],onSelect:i,mode:o}){let[l,s]=(0,n.useState)(null);if("degrees"===o&&r.length>0){let n={};r.forEach(e=>{e.source_connection_id&&(n[e.source_connection_id]||(n[e.source_connection_id]=[]),n[e.source_connection_id].push(e))});let o=Object.entries(n).map(([t,n])=>{let r=e.find(e=>e.id===t);if(!r)return null;let i=n.filter(e=>"S"===e.tier).length,o=n.filter(e=>"A"===e.tier).length;return{bridge:r,members:n,sCount:i,aCount:o,total:n.length,value:3*i+2*o+n.length}}).filter(Boolean).sort((e,t)=>t.value-e.value),a={S:36,A:28,B:22,C:16,D:12};return(0,t.jsx)("div",{style:{flex:1,overflow:"auto",background:"var(--sd-page)",padding:"20px 10px"},children:(0,t.jsx)("div",{style:{maxWidth:1200,margin:"0 auto"},children:o.map((e,n)=>{let r={};return eN.forEach(e=>{r[e]=[]}),e.members.forEach(e=>{(r[e.tier]||r.D).push(e)}),eN.forEach(e=>{r[e].sort((e,t)=>(parseFloat(t.power_score)||0)-(parseFloat(e.power_score)||0))}),(0,t.jsxs)("div",{style:{marginBottom:30},children:[(0,t.jsx)("div",{style:{textAlign:"center",marginBottom:12},children:(0,t.jsxs)("div",{onClick:()=>i&&i(e.bridge),onMouseEnter:()=>s(e.bridge.id),onMouseLeave:()=>s(null),style:{display:"inline-block",cursor:"pointer",position:"relative"},children:[(0,t.jsx)("div",{style:{width:56,height:56,borderRadius:"50%",margin:"0 auto",border:`3px solid ${D.TIER_COLORS[e.bridge.tier]}`,overflow:"hidden",background:"#1a1a2e",boxShadow:l===e.bridge.id?`0 0 20px ${D.TIER_COLORS[e.bridge.tier]}60`:`0 0 10px ${D.TIER_COLORS[e.bridge.tier]}20`,transition:"box-shadow 0.2s"},children:(0,I.localPhoto)(e.bridge.profile_image_url)?(0,t.jsx)("img",{src:(0,I.localPhoto)(e.bridge.profile_image_url),alt:"",style:{width:"100%",height:"100%",objectFit:"cover"}}):(0,t.jsx)("div",{style:{width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center",background:D.TIER_COLORS[e.bridge.tier],color:"S"===e.bridge.tier?"#000":"#fff",fontSize:20,fontWeight:800},children:e.bridge.name?.charAt(0)})}),(0,t.jsx)("div",{style:{fontSize:12,fontWeight:700,color:"#fff",marginTop:4},children:e.bridge.name}),(0,t.jsxs)("div",{style:{fontSize:9,color:D.TIER_COLORS[e.bridge.tier],fontWeight:600},children:[e.bridge.tier,"-Tier · ",e.total," connections · ",e.sCount>0?e.sCount+"S ":"",e.aCount>0?e.aCount+"A":""]})]})}),eN.map(e=>{let n=r[e];if(0===n.length)return null;let o=a[e],d="S"===e?10:"A"===e?6:4;return(0,t.jsxs)("div",{style:{marginBottom:6},children:[(0,t.jsx)("div",{style:{display:"flex",flexWrap:"wrap",justifyContent:"center",gap:d},children:n.map(n=>{let r=l===n.id;return(0,t.jsxs)("div",{onClick:()=>i&&i(n),onMouseEnter:()=>s(n.id),onMouseLeave:()=>s(null),style:{position:"relative",cursor:"pointer"},children:[(0,t.jsx)("div",{style:{width:o,height:o,borderRadius:"50%",border:`2px solid ${D.TIER_COLORS[e]}`,overflow:"hidden",background:(0,I.localPhoto)(n.profile_image_url)?"#111":D.TIER_COLORS[e],transition:"transform 0.15s, box-shadow 0.15s",transform:r?"scale(1.3)":"scale(1)",boxShadow:r?`0 0 12px ${D.TIER_COLORS[e]}60`:"none"},children:(0,I.localPhoto)(n.profile_image_url)?(0,t.jsx)("img",{src:(0,I.localPhoto)(n.profile_image_url),alt:"",style:{width:"100%",height:"100%",objectFit:"cover"},onError:t=>{t.target.style.display="none",t.target.parentElement.style.background=D.TIER_COLORS[e]}}):(0,t.jsx)("span",{style:{display:"flex",width:"100%",height:"100%",alignItems:"center",justifyContent:"center",fontSize:.4*o,fontWeight:700,color:"S"===e?"#000":"#fff"},children:n.name?.charAt(0)})}),("S"===e||r)&&(0,t.jsx)("div",{style:{position:"absolute",top:o+2,left:"50%",transform:"translateX(-50%)",whiteSpace:"nowrap",textAlign:"center",zIndex:20,pointerEvents:"none"},children:(0,t.jsxs)("div",{style:{fontSize:r?10:8,fontWeight:600,color:r?"#fff":"#aaa",background:r?"rgba(0,0,0,0.85)":"transparent",padding:r?"3px 8px":0,borderRadius:4},children:[n.name?.split(" ")[0],r&&(0,t.jsx)("span",{style:{color:D.TIER_COLORS[e],marginLeft:4},children:parseFloat(n.power_score||0).toFixed(1)})]})})]},n.id)})}),(0,t.jsx)("div",{style:{height:1,margin:"6px auto 0",width:`${40+10*eN.indexOf(e)}%`,background:`linear-gradient(90deg, transparent, ${D.TIER_COLORS[e]}20, transparent)`}})]},e)})]},e.bridge.id)})})})}let a={};eN.forEach(e=>{a[e]=[]}),e.forEach(e=>{let t=e.tier||"D";a[t]&&a[t].push(e)}),eN.forEach(e=>{a[e].sort((e,t)=>(parseFloat(t.power_score)||0)-(parseFloat(e.power_score)||0))});let d={S:44,A:34,B:26,C:20,D:16};return(0,t.jsx)("div",{style:{flex:1,overflow:"auto",background:"var(--sd-page)",padding:"20px 10px"},children:(0,t.jsx)("div",{style:{maxWidth:1200,margin:"0 auto"},children:eN.map((e,n)=>{let r=a[e];if(0===r.length)return null;let o=d[e],c="S"===e?12:"A"===e?8:"B"===e?6:4;return(0,t.jsxs)("div",{style:{marginBottom:"S"===e?20:"A"===e?16:10},children:[(0,t.jsxs)("div",{style:{textAlign:"center",marginBottom:8,fontSize:"S"===e?14:11,fontWeight:700,color:D.TIER_COLORS[e],opacity:"S"===e?1:.7},children:["S"===e&&"👑 ",e,"-Tier (",r.length,")"]}),(0,t.jsx)("div",{style:{display:"flex",flexWrap:"wrap",justifyContent:"center",gap:c,padding:"0 20px"},children:r.map(n=>{let r=l===n.id;return(0,t.jsxs)("div",{onClick:()=>i&&i(n),onMouseEnter:()=>s(n.id),onMouseLeave:()=>s(null),style:{position:"relative",cursor:"pointer"},children:[(0,t.jsx)("div",{style:{width:o,height:o,borderRadius:"50%",border:`2px solid ${D.TIER_COLORS[e]}`,overflow:"hidden",background:(0,I.localPhoto)(n.profile_image_url)?"#111":D.TIER_COLORS[e],display:"flex",alignItems:"center",justifyContent:"center",transition:"transform 0.15s, box-shadow 0.15s",transform:r?"scale(1.3)":"scale(1)",boxShadow:r?`0 0 16px ${D.TIER_COLORS[e]}60`:"none",zIndex:r?10:1,position:"relative"},children:(0,I.localPhoto)(n.profile_image_url)?(0,t.jsx)("img",{src:(0,I.localPhoto)(n.profile_image_url),alt:"",style:{width:"100%",height:"100%",objectFit:"cover"},onError:t=>{t.target.style.display="none",t.target.parentElement.style.background=D.TIER_COLORS[e]}}):(0,t.jsx)("span",{style:{fontSize:.4*o,fontWeight:700,color:"S"===e?"#000":"#fff"},children:n.name?.charAt(0)})}),("S"===e||r)&&(0,t.jsxs)("div",{style:{position:"absolute",top:o+4,left:"50%",transform:"translateX(-50%)",whiteSpace:"nowrap",textAlign:"center",zIndex:20,pointerEvents:"none"},children:[(0,t.jsxs)("div",{style:{fontSize:"S"===e?9:10,fontWeight:600,color:r?"#fff":"#aaa",background:r?"rgba(0,0,0,0.85)":"transparent",padding:r?"3px 8px":0,borderRadius:4},children:[n.name?.split(" ")[0],r&&(0,t.jsx)("span",{style:{color:D.TIER_COLORS[e],marginLeft:4,fontWeight:800},children:parseFloat(n.power_score||0).toFixed(1)})]}),r&&n.headline&&(0,t.jsx)("div",{style:{fontSize:8,color:"#888",marginTop:2,background:"rgba(0,0,0,0.85)",padding:"2px 6px",borderRadius:3,maxWidth:160,overflow:"hidden",textOverflow:"ellipsis"},children:n.headline.substring(0,40)})]})]},n.id)})}),n<eN.length-1&&(0,t.jsx)("div",{style:{height:1,margin:"12px auto 0",width:`${50+12*n}%`,background:`linear-gradient(90deg, transparent, ${D.TIER_COLORS[e]}30, transparent)`}})]},e)})})})},modes:["degrees"],label:"Pyramid",icon:"🔺",desc:"Tier hierarchy"},list:{component:function({connections:e,degree2:n=[],onSelect:r,mode:i}){if("degrees"===i){let i={};n.forEach(e=>{e.source_connection_id&&(i[e.source_connection_id]||(i[e.source_connection_id]=[]),i[e.source_connection_id].push(e))});let o=Object.entries(i).map(([t,n])=>{let r=e.find(e=>e.id===t);if(!r)return null;let i=n.filter(e=>"S"===e.tier).length,o=n.filter(e=>"A"===e.tier).length,l=3*i+2*o+n.length;return{bridge:r,members:n,sCount:i,aCount:o,total:n.length,value:l}}).filter(Boolean).sort((e,t)=>t.value-e.value);return(0,t.jsx)("div",{style:{flex:1,overflow:"auto",padding:"16px 24px",background:"var(--sd-page)"},children:(0,t.jsxs)("div",{style:{maxWidth:800,margin:"0 auto"},children:[(0,t.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"40px 1fr 50px 50px 50px 80px",gap:8,padding:"8px 12px",fontSize:9,fontWeight:700,color:"#555",borderBottom:"1px solid rgba(255,255,255,0.1)",textTransform:"uppercase",letterSpacing:.5},children:[(0,t.jsx)("span",{children:"#"}),(0,t.jsx)("span",{children:"Bridge"}),(0,t.jsx)("span",{children:"S"}),(0,t.jsx)("span",{children:"A"}),(0,t.jsx)("span",{children:"Total"}),(0,t.jsx)("span",{children:"Value"})]}),o.map((e,n)=>(0,t.jsxs)("div",{onClick:()=>r&&r(e.bridge),style:{display:"grid",gridTemplateColumns:"40px 1fr 50px 50px 50px 80px",gap:8,padding:"10px 12px",alignItems:"center",cursor:"pointer",borderBottom:"1px solid rgba(255,255,255,0.04)",transition:"background 0.1s"},onMouseEnter:e=>e.currentTarget.style.background="rgba(255,255,255,0.04)",onMouseLeave:e=>e.currentTarget.style.background="transparent",children:[(0,t.jsx)("span",{style:{fontSize:12,fontWeight:700,color:"#444"},children:n+1}),(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,minWidth:0},children:[(0,I.localPhoto)(e.bridge.profile_image_url)?(0,t.jsx)("img",{src:(0,I.localPhoto)(e.bridge.profile_image_url),alt:"",style:{width:28,height:28,borderRadius:"50%",objectFit:"cover",flexShrink:0,border:`2px solid ${D.TIER_COLORS[e.bridge.tier]}`},onError:e=>{e.target.style.display="none"}}):(0,t.jsx)("div",{style:{width:28,height:28,borderRadius:"50%",flexShrink:0,fontSize:10,fontWeight:700,background:D.TIER_COLORS[e.bridge.tier],color:"#000",display:"flex",alignItems:"center",justifyContent:"center"},children:e.bridge.name?.charAt(0)}),(0,t.jsxs)("div",{style:{minWidth:0},children:[(0,t.jsx)("div",{style:{fontSize:12,fontWeight:600,color:"#fff",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.bridge.name}),(0,t.jsxs)("div",{style:{fontSize:9,color:D.TIER_COLORS[e.bridge.tier],fontWeight:600},children:[e.bridge.tier,"-Tier"]})]})]}),(0,t.jsx)("span",{style:{fontSize:13,fontWeight:800,color:"#FFD700"},children:e.sCount}),(0,t.jsx)("span",{style:{fontSize:13,fontWeight:700,color:"#9B59B6"},children:e.aCount}),(0,t.jsx)("span",{style:{fontSize:12,color:"#888"},children:e.total}),(0,t.jsx)("div",{children:(0,t.jsx)("div",{style:{height:6,background:"rgba(255,255,255,0.06)",borderRadius:3},children:(0,t.jsx)("div",{style:{height:"100%",borderRadius:3,background:`linear-gradient(90deg, ${D.TIER_COLORS[e.bridge.tier]}, #FF6B35)`,width:`${Math.min(100,e.value/Math.max(o[0]?.value||1,1)*100)}%`}})})})]},e.bridge.id))]})})}let o=[...e].sort((e,t)=>(parseFloat(t.power_score)||0)-(parseFloat(e.power_score)||0)),l=parseFloat(o[0]?.power_score)||10;return(0,t.jsx)("div",{style:{flex:1,overflow:"auto",padding:"16px 24px",background:"var(--sd-page)"},children:(0,t.jsxs)("div",{style:{maxWidth:800,margin:"0 auto"},children:[(0,t.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"40px 36px 1fr 60px 120px",gap:8,padding:"8px 12px",fontSize:9,fontWeight:700,color:"#555",borderBottom:"1px solid rgba(255,255,255,0.1)",textTransform:"uppercase",letterSpacing:.5},children:[(0,t.jsx)("span",{children:"#"}),(0,t.jsx)("span",{}),(0,t.jsx)("span",{children:"Name"}),(0,t.jsx)("span",{children:"Score"}),(0,t.jsx)("span",{children:"Power"})]}),o.map((e,n)=>(0,t.jsxs)("div",{onClick:()=>r&&r(e),style:{display:"grid",gridTemplateColumns:"40px 36px 1fr 60px 120px",gap:8,padding:"8px 12px",alignItems:"center",cursor:"pointer",borderBottom:"1px solid rgba(255,255,255,0.04)",background:n<3?`${D.TIER_COLORS[e.tier]}08`:"transparent",transition:"background 0.1s"},onMouseEnter:e=>e.currentTarget.style.background="rgba(255,255,255,0.04)",onMouseLeave:t=>t.currentTarget.style.background=n<3?`${D.TIER_COLORS[e.tier]}08`:"transparent",children:[(0,t.jsx)("span",{style:{fontSize:12,fontWeight:700,color:n<3?D.TIER_COLORS[e.tier]:"#444"},children:n+1}),(0,I.localPhoto)(e.profile_image_url)?(0,t.jsx)("img",{src:(0,I.localPhoto)(e.profile_image_url),alt:"",style:{width:28,height:28,borderRadius:"50%",objectFit:"cover",border:`2px solid ${D.TIER_COLORS[e.tier]}`},onError:e=>{e.target.style.display="none"}}):(0,t.jsx)("div",{style:{width:28,height:28,borderRadius:"50%",fontSize:10,fontWeight:700,background:D.TIER_COLORS[e.tier],color:"S"===e.tier?"#000":"#fff",display:"flex",alignItems:"center",justifyContent:"center"},children:e.name?.charAt(0)}),(0,t.jsxs)("div",{style:{minWidth:0},children:[(0,t.jsx)("div",{style:{fontSize:12,fontWeight:600,color:"#fff",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.name}),(0,t.jsx)("div",{style:{fontSize:9,color:"#666",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.headline?.substring(0,45)})]}),(0,t.jsxs)("div",{style:{textAlign:"center"},children:[(0,t.jsx)("span",{style:{fontSize:13,fontWeight:800,color:D.TIER_COLORS[e.tier]},children:parseFloat(e.power_score||0).toFixed(1)}),(0,t.jsx)("div",{style:{fontSize:8,color:"#555"},children:e.tier})]}),(0,t.jsx)("div",{style:{height:6,background:"rgba(255,255,255,0.06)",borderRadius:3},children:(0,t.jsx)("div",{style:{height:"100%",borderRadius:3,background:D.TIER_COLORS[e.tier],width:`${parseFloat(e.power_score||0)/l*100}%`}})})]},e.id))]})})},modes:["degrees"],label:"List",icon:"☰",desc:"Ranked power list"},grid:{component:function({connections:e,degree2:n=[],onSelect:r,mode:i}){if("degrees"===i){let i={};n.forEach(e=>{e.source_connection_id&&(i[e.source_connection_id]||(i[e.source_connection_id]=[]),i[e.source_connection_id].push(e))});let o=Object.entries(i).map(([t,n])=>{let r=e.find(e=>e.id===t);if(!r)return null;let i=n.filter(e=>"S"===e.tier).length,o=n.filter(e=>"A"===e.tier).length;return{bridge:r,members:n,sCount:i,aCount:o,total:n.length}}).filter(Boolean).sort((e,t)=>3*t.sCount+2*t.aCount+t.total-(3*e.sCount+2*e.aCount+e.total));return(0,t.jsx)("div",{style:{flex:1,overflow:"auto",padding:20,background:"var(--sd-page)"},children:(0,t.jsx)("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(240px, 1fr))",gap:12,maxWidth:1200,margin:"0 auto"},children:o.map(e=>(0,t.jsxs)("div",{onClick:()=>r&&r(e.bridge),style:{padding:16,borderRadius:12,cursor:"pointer",background:"rgba(255,255,255,0.03)",border:`1px solid ${D.TIER_COLORS[e.bridge.tier]||"#333"}30`,borderLeft:`4px solid ${D.TIER_COLORS[e.bridge.tier]||"#555"}`,transition:"all 0.15s"},onMouseEnter:e=>e.currentTarget.style.background="rgba(255,255,255,0.06)",onMouseLeave:e=>e.currentTarget.style.background="rgba(255,255,255,0.03)",children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10,marginBottom:10},children:[(0,I.localPhoto)(e.bridge.profile_image_url)?(0,t.jsx)("img",{src:(0,I.localPhoto)(e.bridge.profile_image_url),alt:"",style:{width:40,height:40,borderRadius:"50%",objectFit:"cover",border:`2px solid ${D.TIER_COLORS[e.bridge.tier]}`},onError:e=>{e.target.style.display="none"}}):(0,t.jsx)("div",{style:{width:40,height:40,borderRadius:"50%",fontSize:16,fontWeight:700,background:D.TIER_COLORS[e.bridge.tier],color:"#000",display:"flex",alignItems:"center",justifyContent:"center"},children:e.bridge.name?.charAt(0)}),(0,t.jsxs)("div",{style:{flex:1,minWidth:0},children:[(0,t.jsx)("div",{style:{fontSize:13,fontWeight:700,color:"#fff"},children:e.bridge.name}),(0,t.jsx)("div",{style:{fontSize:9,color:"#666",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.bridge.headline?.substring(0,40)})]}),(0,t.jsx)("span",{style:{fontSize:12,fontWeight:800,color:D.TIER_COLORS[e.bridge.tier]},children:e.bridge.tier})]}),(0,t.jsxs)("div",{style:{display:"flex",gap:6,fontSize:10},children:[e.sCount>0&&(0,t.jsxs)("span",{style:{color:"#FFD700",fontWeight:600},children:[e.sCount,"S"]}),e.aCount>0&&(0,t.jsxs)("span",{style:{color:"#9B59B6",fontWeight:600},children:[e.aCount,"A"]}),(0,t.jsxs)("span",{style:{color:"#666"},children:[e.total," total"]})]}),(0,t.jsxs)("div",{style:{display:"flex",marginTop:8},children:[e.members.slice(0,8).map((e,n)=>(0,t.jsx)("div",{style:{width:22,height:22,borderRadius:"50%",fontSize:8,fontWeight:700,background:(0,I.localPhoto)(e.profile_image_url)?"transparent":D.TIER_COLORS[e.tier]||"#333",color:"#fff",display:"flex",alignItems:"center",justifyContent:"center",border:"2px solid var(--sd-bg)",marginLeft:n>0?-6:0,position:"relative",zIndex:8-n,overflow:"hidden"},children:(0,I.localPhoto)(e.profile_image_url)?(0,t.jsx)("img",{src:(0,I.localPhoto)(e.profile_image_url),alt:"",style:{width:"100%",height:"100%",objectFit:"cover"}}):e.name?.charAt(0)},e.id)),e.total>8&&(0,t.jsxs)("span",{style:{fontSize:9,color:"#555",marginLeft:4,alignSelf:"center"},children:["+",e.total-8]})]})]},e.bridge.id))})})}let o={};return eP.forEach(e=>{o[e]=[]}),e.forEach(e=>{let t=e.tier||"D";o[t]&&o[t].push(e)}),eP.forEach(e=>{o[e].sort((e,t)=>(parseFloat(t.power_score)||0)-(parseFloat(e.power_score)||0))}),(0,t.jsx)("div",{style:{flex:1,overflow:"auto",padding:20,background:"var(--sd-page)"},children:(0,t.jsx)("div",{style:{maxWidth:1200,margin:"0 auto"},children:eP.map(e=>{let n=o[e];return 0===n.length?null:(0,t.jsxs)("div",{style:{marginBottom:24},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,padding:"8px 0 10px",borderBottom:`2px solid ${D.TIER_COLORS[e]}30`,marginBottom:10},children:[(0,t.jsx)("div",{style:{width:10,height:10,borderRadius:"50%",background:D.TIER_COLORS[e]}}),(0,t.jsxs)("span",{style:{fontSize:15,fontWeight:800,color:D.TIER_COLORS[e]},children:[e,"-Tier"]}),(0,t.jsx)("span",{style:{fontSize:12,color:"#555"},children:n.length})]}),(0,t.jsx)("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(180px, 1fr))",gap:8},children:n.map(n=>(0,t.jsxs)("div",{onClick:()=>r&&r(n),style:{padding:10,borderRadius:8,cursor:"pointer",background:"rgba(255,255,255,0.03)",border:`1px solid ${D.TIER_COLORS[e]}20`,transition:"all 0.15s"},onMouseEnter:e=>e.currentTarget.style.background="rgba(255,255,255,0.06)",onMouseLeave:e=>e.currentTarget.style.background="rgba(255,255,255,0.03)",children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8},children:[(0,I.localPhoto)(n.profile_image_url)?(0,t.jsx)("img",{src:(0,I.localPhoto)(n.profile_image_url),alt:"",style:{width:32,height:32,borderRadius:"50%",objectFit:"cover",border:`2px solid ${D.TIER_COLORS[e]}`},onError:e=>{e.target.style.display="none"}}):(0,t.jsx)("div",{style:{width:32,height:32,borderRadius:"50%",fontSize:12,fontWeight:700,background:D.TIER_COLORS[e],color:"S"===e?"#000":"#fff",display:"flex",alignItems:"center",justifyContent:"center"},children:n.name?.charAt(0)}),(0,t.jsxs)("div",{style:{flex:1,minWidth:0},children:[(0,t.jsx)("div",{style:{fontSize:11,fontWeight:600,color:"#fff",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:n.name}),(0,t.jsx)("div",{style:{fontSize:8,color:"#666",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:n.headline?.substring(0,30)})]})]}),(0,t.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",marginTop:6,alignItems:"center"},children:[(0,t.jsx)("span",{style:{fontSize:10,fontWeight:700,color:D.TIER_COLORS[e]},children:parseFloat(n.power_score||0).toFixed(1)}),(0,t.jsx)("div",{style:{flex:1,marginLeft:8,height:3,background:"rgba(255,255,255,0.08)",borderRadius:2},children:(0,t.jsx)("div",{style:{height:"100%",borderRadius:2,background:D.TIER_COLORS[e],width:`${Math.min(100,10*(parseFloat(n.power_score)||0))}%`}})})]})]},n.id))})]},e)})})})},modes:["network","degrees"],label:"Grid",icon:"▦",desc:"Cards"}},tv=["galaxy","chain","separation","rings","list"];function tk(e){return tv.filter(t=>tw[t]?.modes.includes(e)).map(e=>({key:e,...tw[e]}))}var t$=e.i(44902),tC=e.i(74080),tz=e.i(90179);let t_=/\/10, (your|sample) score\)/,tM=/^(?:Former )?(?:Student · )?(.+?) \([\d.]+\) · (no company found|.+?) \(\d+(?:\.\d+)?\/10(?:[:,][^)]*)?\)/,tR=D.TIER_COLORS,tW=["S","A","B","C","D"],tT="#00ff88";function tF({person:e,connections:r=[],degree2:i=[],tierColors:o=tR,onSelect:l,isRequested:s=V,canScan:a=!0}){let d=(0,n.useMemo)(()=>G(r,i),[r,i]),c=(0,n.useMemo)(()=>(0,P.routeIndex)(i),[i]),{rings:h,totals:p}=(0,n.useMemo)(()=>(function(e,t,{maxDegree:n=6,isRequested:r=V}={}){let i=[],o={people:0,connected:0,requested:0};if(!e||!t)return{rings:i,totals:o};let l=new Set([(0,P.keyFor)(e)]),s=[e];for(let e=2;e<=n&&s.length;e++){let n=[],a=[];for(let e of s){let i=[];for(let n of t.introduced.get(e.id)||[]){let t=(0,P.keyFor)(n);l.has(t)||(l.add(t),i.push({row:n,key:t,parentId:e.id,state:"connected"}),a.push(n))}for(let n of t.circles.get(e.id)||[]){let t=(0,P.keyFor)(n);l.has(t)||(l.add(t),i.push({row:n,key:t,parentId:e.id,state:r(n)?"requested":null}))}i.sort(Z),n.push(...i)}if(!n.length)break;for(let e of n)o.people++,"connected"===e.state?o.connected++:"requested"===e.state&&o.requested++;i.push({degree:e,people:n}),s=a}return{rings:i,totals:o}})(e,d,{isRequested:s}),[e,d,s]),[g,u]=(0,n.useState)(()=>new Set),[f,x]=(0,n.useState)(()=>new Set),[y,m]=(0,n.useState)(!1),b=(0,n.useMemo)(()=>h.flatMap(e=>e.people.map(e=>{let t="connected"===e.state||1===e.row.degree?null:eX(e.row,c.get((0,P.keyFor)(e.row))?.size||1);return{key:e.key,tier:e.row.tier,rarity:t?.key??null,mutuals:t}})),[h,c]),j=(0,n.useMemo)(()=>new Map(b.map(e=>[e.key,e])),[b]),S=(0,n.useMemo)(()=>({tiers:g,rarities:f}),[g,f]),w=(0,n.useMemo)(()=>b.filter(e=>eV(e,S)).length,[b,S]),v=(0,n.useMemo)(()=>r.filter(e=>d.circles.has(e.id)).length,[r,d]),k=b.some(e=>e.mutuals?.from==="linkedin"),$=(0,n.useMemo)(()=>(function(e){let t,n,r,i;if(!e)return null;if(null==e.power_score||""===e.power_score||!e.tier)return{title:!1,company:!1,never:!0,companyName:null,reason:"They haven’t been scored yet."};let o=String(e.score_why||"").match(tM);if(o)t=o[1],r=!(n="no company found"===o[2]?null:o[2])||!t_.test(e.score_why)&&!["known","data"].includes((0,tz.companyScore)(n).source);else{let i=(0,tz.scorePerson)(e);t=i.title.label,n=i.company||null,r=["none","default","network"].includes(i.companySource)}let l=t.startsWith("Audience of"),s="Title unclear"===t||t.includes("Works there");return(l&&(r=!1),s||r)?(i=s&&r?n?`Their headline doesn’t say their title, and the app doesn’t know ${n}.`:"Their headline names no title or company the app can read.":s?"Their headline doesn’t say their title.":n?`The app doesn’t know ${n}, so it counts as the middle of the scale.`:"The app couldn’t find where they work.",{title:s,company:r,never:!1,companyName:n,reason:i}):null})(e),[e]);if(!e)return null;if(!h.length){let n=e.name?.split(" ")[0]||"them";return(0,t.jsxs)("div",{style:$?{...tP,borderColor:"rgba(255,215,0,0.28)"}:tP,children:[(0,t.jsx)(tD,{children:"Their circle"}),$?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{style:{fontSize:11.5,color:"#d8ccb0",lineHeight:1.5,marginBottom:9*!!a},children:[(0,t.jsx)("b",{style:{color:"#FFD700"},children:"Their score is a guess."})," ",$.reason,a&&(0,t.jsxs)(t.Fragment,{children:[" Scanning ",n,"'s circle shows who you can reach through them, and a strong circle adds up to +2 to their score."]})]}),a&&(0,t.jsx)("button",{type:"button",onClick:tA,style:{width:"100%",padding:"8px 10px",borderRadius:8,cursor:"pointer",fontSize:12,fontWeight:700,border:"1px solid rgba(255,215,0,0.4)",background:"rgba(255,215,0,0.08)",color:"#FFD700"},children:"Scan their circle ↓"})]}):a?(0,t.jsxs)("div",{style:{fontSize:11,color:"#999",lineHeight:1.5},children:["Not scanned yet. Scan ",n,"'s circle below to see who they know, and everyone you reach through them after that."]}):(0,t.jsx)("div",{style:{fontSize:11,color:"#999",lineHeight:1.5},children:"Not scanned."})]})}let C=Object.fromEntries(tW.map(e=>[e,b.filter(t=>t.tier===e).length])),z=function(e=[]){let t=Object.fromEntries(eq.map(e=>[e.key,0]));for(let n of e)n?.rarity&&void 0!==t[n.rarity]&&t[n.rarity]++;return t}(b),_=g.size>0||f.size>0,M=(0,t.jsx)(tO,{tierColors:o,byTier:C,byRarity:z,tiers:g,rarities:f,onTier:e=>u(t=>eG(t,e)),onRarity:e=>x(t=>eG(t,e)),onClear:()=>{u(new Set),x(new Set)}}),R=(0,t.jsxs)("div",{style:{fontSize:9.5,color:"#777",lineHeight:1.45,marginTop:6},children:["Rarity is how many mutual connections lead to someone. It never changes a score."," ",k?"LinkedIn’s own count where a scan saved it; otherwise the ways in from your scans.":`Counted from the ${v} ${1===v?"circle":"circles"} you’ve scanned, so it can only go up as you scan more.`]});return(0,t.jsxs)("div",{style:tP,children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:8},children:[(0,t.jsx)(tD,{children:"Their circle"}),(0,t.jsx)("button",{type:"button",onClick:()=>m(!0),style:tH,"aria-label":"Open the large map",children:"Enlarge ⤢"})]}),(0,t.jsx)("button",{type:"button",onClick:()=>m(!0),"aria-label":`${e.name}'s circle: open the large map`,style:{display:"block",width:"100%",padding:0,border:"none",background:"none",cursor:"zoom-in"},children:(0,t.jsx)(tI,{person:e,rings:h,facts:j,filter:S,tierColors:o,size:240})}),(0,t.jsx)(tE,{rings:h,totals:p,shown:_?w:null}),M,R,y&&(0,t.jsxs)(tL,{onClose:()=>m(!1),title:`${e.name}’s circle`,children:[(0,t.jsx)(tI,{person:e,rings:h,facts:j,filter:S,tierColors:o,size:640,labels:!0,onPick:e=>{m(!1),l?.(e)}}),(0,t.jsx)(tE,{rings:h,totals:p,shown:_?w:null}),M,(0,t.jsx)(tB,{}),R]})]})}function tI({person:e,rings:r,facts:i,filter:o,tierColors:l,size:s,labels:a=!1,onPick:d}){let c=(0,n.useMemo)(()=>(function(e=[],t=240){let n=t/2,r=e.length,i=e=>n*(1===r?.78:.4+e/(r-1)*.52),o=e.map(e=>{let t=new Map;for(let n of e.people)t.has(n.parentId)||t.set(n.parentId,[]),t.get(n.parentId).push(n);return t}),l=(e,t)=>o[e+1]?.get(t)||[],s=new Map;for(let t=r-1;t>=0;t--)for(let n of e[t].people){let e="connected"===n.state?l(t,n.row.id).reduce((e,t)=>e+s.get(t),0):0;s.set(n,Math.max(1,e))}let a=[],d=[],c=new Map,h=-Math.PI/2;for(let p=0;p<r;p++){let g=i(p);e[p].people;let u=Math.max(2.4,t/100),f=p===r-1&&r>1,x=(f?g-i(p-1):(p+1<r?i(p+1):.97*n)-g)*.45,y=Math.max(1,Math.floor(x/u)+1),m=y>1?(f?-1:1)*Math.min(1.2*u,x/(y-1)):0,b=(e,t)=>J(Math.ceil(e*u/Math.max(1e-9,g*t)),1,y),j=1,S=1/0,w=[];for(let[e,t]of o[p]){let[r,i]=0===p?[h,h+2*Math.PI]:c.get(e)||[h,h+2*Math.PI],o=t.reduce((e,t)=>e+s.get(t),0),l=b(t.length,i-r);j=Math.max(j,l),S=Math.min(S,g*(i-r)*l/Math.max(1,t.length));let a=0,d=r;for(let e of t){let t=(i-r)*s.get(e)/o,h=d+t/2,p=g+a++%l*m,u=n+p*Math.cos(h),f=n+p*Math.sin(h);w.push({...e,angle:h,x:u,y:f}),"connected"===e.state&&c.set(e.row.id,[d,d+t]),d+=t}}if(p+1<r){let e=i(p+1);for(let t of w){if("connected"!==t.state||!l(p,t.row.id).length)continue;let[r,i]=c.get(t.row.id),o=(r+i)/2;d.push({x1:t.x,y1:t.y,x2:n+e*Math.cos(o),y2:n+e*Math.sin(o)})}}let v=J(Math.min(.32*S,j>1?.42*Math.abs(m):1/0),.8,t/60);a.push({degree:e[p].degree,radius:g,dotR:v,rows:j,items:w})}return{size:t,center:{x:n,y:n},rings:a,spokes:d}})(r,s),[r,s]),h=c.center,p=s/240;return(0,t.jsxs)("svg",{viewBox:`0 0 ${s} ${s}`,width:"100%",style:{display:"block",maxWidth:s,margin:"0 auto"},role:"img","aria-label":`${e.name}'s circle, ${r.length} ${1===r.length?"ring":"rings"}`,children:[c.rings.map(e=>(0,t.jsxs)("g",{children:[(0,t.jsx)("circle",{cx:h.x,cy:h.y,r:e.radius,fill:"none",stroke:"rgba(255,255,255,0.07)",strokeWidth:.6*p}),(0,t.jsxs)("text",{x:h.x,y:h.y-e.radius-e.dotR-3*p,textAnchor:"middle",fontSize:6.5*p,fill:"#666",fontWeight:700,children:["D",e.degree]})]},e.degree)),c.spokes.map((e,n)=>(0,t.jsx)("line",{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2,stroke:"rgba(0,255,136,0.35)",strokeWidth:.7*p},n)),c.rings.map(e=>e.items.map(n=>{let r=i.get(n.key),s=eV(r,o),c=l[n.row.tier]||"#888",h="connected"===n.state?1.7*e.dotR:e.dotR,p=[`${n.row.name} \xb7 ${n.row.tier}-tier${null!=n.row.power_score?` \xb7 ${Number(n.row.power_score).toFixed(1)}`:""}`,"connected"===n.state?"You added them":"requested"===n.state?"Request sent":null,r?.mutuals?`${eU(r.rarity)?.label}: ${r.mutuals.count} mutual${1===r.mutuals.count?"":"s"}${"scans"===r.mutuals.from?" (from your scans)":""}`:null].filter(Boolean).join("\n");return(0,t.jsxs)("g",{opacity:s?1:.12,style:d?{cursor:"pointer"}:void 0,onClick:d?e=>{e.stopPropagation(),d(n.row)}:void 0,children:[(0,t.jsx)("title",{children:p}),"requested"===n.state?(0,t.jsx)("circle",{cx:n.x,cy:n.y,r:1.25*h,fill:"none",stroke:c,strokeWidth:Math.max(.5,.45*h),strokeDasharray:`${Math.max(.6,.55*h)} ${Math.max(.5,.45*h)}`}):(0,t.jsx)("circle",{cx:n.x,cy:n.y,r:h,fill:c,stroke:"connected"===n.state?tT:"none",strokeWidth:Math.max(.6,.3*h)}),a&&"connected"===n.state&&(0,t.jsx)("text",{x:n.x,y:n.y-h-3,textAnchor:"middle",fontSize:9,fill:tT,fontWeight:700,children:String(n.row.name||"").split(" ")[0]})]},n.key)})),(0,t.jsx)("circle",{cx:h.x,cy:h.y,r:7*p,fill:l[e.tier]||"#888",stroke:"#fff",strokeWidth:.8*p}),(0,t.jsx)("text",{x:h.x,y:h.y+2.4*p,textAnchor:"middle",fontSize:6.5*p,fontWeight:800,fill:"S"===e.tier?"#000":"#fff",children:String(e.name||"?").charAt(0)})]})}function tE({rings:e,totals:n,shown:r}){return(0,t.jsxs)("div",{style:{fontSize:10.5,color:"#aaa",marginTop:6,lineHeight:1.5},children:[e.map(e=>`D${e.degree} ${e.people.length.toLocaleString("en-US")}`).join(" · "),n.connected>0&&(0,t.jsxs)("span",{style:{color:tT},children:[" · you added ",n.connected]}),n.requested>0&&(0,t.jsxs)("span",{style:{color:"#FFD700"},children:[" · ",n.requested," ",1===n.requested?"request":"requests"," out"]}),null!=r&&(0,t.jsxs)("span",{style:{color:"#fff"},children:[" · ",r.toLocaleString("en-US")," shown"]})]})}function tO({tierColors:e,byTier:n,byRarity:r,tiers:i,rarities:o,onTier:l,onRarity:s,onClear:a}){let d=(e,t)=>({height:22,padding:"0 7px",borderRadius:11,cursor:"pointer",fontSize:10,fontWeight:700,whiteSpace:"nowrap",border:`1px solid ${e?t:"rgba(255,255,255,0.1)"}`,background:e?`${t}22`:"rgba(255,255,255,0.03)",color:e?t:"#999"});return(0,t.jsxs)("div",{style:{marginTop:8,display:"flex",flexDirection:"column",gap:5},children:[(0,t.jsxs)("div",{style:{display:"flex",flexWrap:"wrap",gap:4,alignItems:"center"},children:[(0,t.jsx)("span",{style:tN,children:"Tier"}),tW.map(r=>(0,t.jsxs)("button",{type:"button","aria-pressed":i.has(r),onClick:()=>l(r),style:d(i.has(r),e[r]||"#888"),children:[r," ",(0,t.jsx)("span",{style:{fontWeight:500,opacity:.8},children:n[r]})]},r))]}),(0,t.jsxs)("div",{style:{display:"flex",flexWrap:"wrap",gap:4,alignItems:"center"},children:[(0,t.jsx)("span",{style:tN,children:"Rarity"}),eq.map(e=>(0,t.jsxs)("button",{type:"button","aria-pressed":o.has(e.key),onClick:()=>s(e.key),title:`${e.label}: ${e.range} mutual connection${"1"===e.range?"":"s"}`,style:d(o.has(e.key),e.color),children:[e.label," ",(0,t.jsx)("span",{style:{fontWeight:500,opacity:.8},children:r[e.key]})]},e.key)),(i.size>0||o.size>0)&&(0,t.jsx)("button",{type:"button",onClick:a,style:tH,children:"Clear"})]})]})}function tB(){let e=(e,n)=>(0,t.jsxs)("span",{style:{display:"inline-flex",alignItems:"center",gap:5,marginRight:12,whiteSpace:"nowrap"},children:[e,n]});return(0,t.jsxs)("div",{style:{fontSize:10.5,color:"#999",marginTop:8,lineHeight:1.8},children:[e((0,t.jsx)("svg",{width:"10",height:"10",children:(0,t.jsx)("circle",{cx:"5",cy:"5",r:"4",fill:"#FFD700"})}),"colour = tier"),e((0,t.jsx)("svg",{width:"12",height:"12",children:(0,t.jsx)("circle",{cx:"6",cy:"6",r:"4",fill:"#9B59B6",stroke:tT,strokeWidth:"1.5"})}),"you added them"),e((0,t.jsx)("svg",{width:"12",height:"12",children:(0,t.jsx)("circle",{cx:"6",cy:"6",r:"4.2",fill:"none",stroke:"#3498DB",strokeWidth:"1.4",strokeDasharray:"2 1.6"})}),"request sent")]})}function tL({title:e,onClose:r,children:i}){return(0,n.useEffect)(()=>{let e=e=>{"Escape"===e.key&&r()};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[r]),(0,tC.createPortal)((0,t.jsx)("div",{role:"dialog","aria-modal":"true","aria-label":e,onClick:r,style:{position:"fixed",inset:0,zIndex:300,background:"rgba(0,0,0,0.78)",display:"flex",alignItems:"center",justifyContent:"center",padding:16},children:(0,t.jsxs)("div",{onClick:e=>e.stopPropagation(),style:{width:"min(720px, 100%)",maxHeight:"100%",overflowY:"auto",boxSizing:"border-box",background:"#0f0c05",border:"1px solid rgba(255,215,0,0.18)",borderRadius:14,padding:16},children:[(0,t.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:8},children:[(0,t.jsx)("div",{style:{fontSize:14,fontWeight:800,color:"#fff"},children:e}),(0,t.jsx)("button",{type:"button",onClick:r,style:{...tH,fontSize:12},children:"Close ✕"})]}),(0,t.jsx)("div",{style:{fontSize:10.5,color:"#888",marginBottom:8},children:"Click a dot to open that person."}),i]})}),document.body)}function tA(){let e=document.getElementById("scan-box");e&&(e.scrollIntoView({behavior:"smooth",block:"center"}),e.animate?.([{boxShadow:"0 0 0 3px rgba(255,215,0,0.75)"},{boxShadow:"0 0 0 0 rgba(255,215,0,0)"}],{duration:1600}),e.querySelector("button:not([disabled])")?.focus({preventScroll:!0}))}function tD({children:e}){return(0,t.jsx)("div",{style:{fontSize:10,fontWeight:700,color:"#FF6B35",letterSpacing:1,textTransform:"uppercase",marginBottom:6},children:e})}let tP={background:"rgba(255,255,255,0.03)",border:"1px solid rgba(255,255,255,0.07)",borderRadius:10,padding:10,marginBottom:16},tN={fontSize:9,color:"#666",textTransform:"uppercase",letterSpacing:.5,width:38,flexShrink:0},tH={background:"none",border:"none",color:"#888",fontSize:10.5,fontWeight:600,cursor:"pointer",padding:0};var tq=e.i(15812);let tY=["S","A","B","C","D"],tU=[[/^(.+?) accepted!/,1],[/^High-value connection: (.+)$/,1],[/^Catalyst discovered: (.+)$/,1],[/^(.+?) added you back/,1]],tX=D.TIER_COLORS,tV={S:"S-tier: one of the most valuable people in your network to know.",A:"A-tier: a strong person to know."},tG={padding:"8px 12px",borderRadius:8,fontSize:12,fontWeight:700,cursor:"pointer",textAlign:"left",border:"1px solid rgba(255,255,255,0.12)",background:"rgba(255,255,255,0.05)",color:"#ddd"};function tK({note:e,connections:n=[],degree2:r=[],onBack:i,onSelect:o,onOpenCircle:l,onShowInSeparation:s}){let{person:a,via:d,people:c}=function(e,t=[],n=[]){let r=[...t||[],...n||[]],i=new Map(r.map(e=>[e.id,e])),o="string"==typeof e?.data?function(e){try{return JSON.parse(e)}catch{return{}}}(e.data):e?.data||{},l=null!=o.personId?i.get(o.personId):null;if(!l&&o.profileUrl&&(l=r.find(e=>e.profile_url===o.profileUrl)||null),!l)for(let[r,i]of tU){let o=String(e?.title||"").match(r);if(!o)continue;let s=o[i].trim().toLowerCase();if(l=(t||[]).find(e=>String(e.name||"").toLowerCase()===s)||(n||[]).find(e=>String(e.name||"").toLowerCase()===s)||null)break}let s=o.viaId??l?.unlocked_from_bridge_id??(l?.degree===2?l.source_connection_id:null);return{person:l||null,via:null!=s&&i.get(s)||null,people:(o.personIds||[]).map(e=>i.get(e)).filter(Boolean),data:o}}(e,n,r),h=a?.tier,p=Number.parseFloat(a?.power_score),g=Number(a?.company_prestige_score),u=["added_back","request_accepted","connection_accepted"].includes(e?.type),f=a&&r.some(e=>e.source_connection_id===a.id);return(0,t.jsxs)("div",{children:[(0,t.jsx)("button",{type:"button",onClick:i,style:{background:"none",border:"none",color:"#aaa",cursor:"pointer",fontSize:12,padding:0,marginBottom:12},children:"← Back"}),(0,t.jsxs)("div",{style:{display:"flex",gap:10,alignItems:"flex-start"},children:[(0,t.jsx)("span",{style:{fontSize:22},children:e?.icon||"📌"}),(0,t.jsxs)("div",{style:{minWidth:0},children:[(0,t.jsx)("div",{style:{fontSize:15,fontWeight:800,color:"#fff",lineHeight:1.35},children:e?.title}),(0,t.jsx)("div",{style:{fontSize:11,color:"#777",marginTop:3},children:(e=>{let t=new Date(String(e||"").replace(" ","T")+(String(e||"").includes("Z")?"":"Z")).getTime();if(!Number.isFinite(t))return"";let n=Math.round((Date.now()-t)/6e4);if(n<1)return"just now";if(n<60)return`${n} min ago`;let r=Math.round(n/60);return r<24?`${r} h ago`:new Date(t).toLocaleDateString()})(e?.created_at)})]})]}),a&&(0,t.jsxs)("div",{style:{marginTop:16,padding:14,borderRadius:12,border:`1px solid ${tX[h]||"#555"}55`,background:`${tX[h]||"#555"}10`},children:[(0,t.jsxs)("div",{style:{display:"flex",gap:12,alignItems:"center"},children:[(0,t.jsx)(e0,{person:a,size:44}),(0,t.jsxs)("div",{style:{minWidth:0},children:[(0,t.jsx)("div",{style:{fontSize:15,fontWeight:800},children:a.name}),(0,t.jsx)("div",{style:{fontSize:11.5,color:"#aab",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:a.headline||a.company||""}),(0,t.jsxs)("div",{style:{fontSize:11.5,fontWeight:800,color:tX[h]||"#aaa",marginTop:2},children:[h?`${h}-tier`:"Not scored yet",Number.isFinite(p)?` \xb7 ${p.toFixed(1)}`:""]})]})]}),u&&(0,t.jsxs)("div",{style:{marginTop:12,fontSize:12.5,color:"#ddd",lineHeight:1.5},children:[(0,t.jsx)("b",{children:a.name.split(" ")[0]})," added you back",d?(0,t.jsxs)(t.Fragment,{children:[". You met through ",(0,t.jsx)("b",{style:{color:tX[d.tier]||"#fff"},children:d.name}),"."]}):"."]}),!u&&d&&(0,t.jsxs)("div",{style:{marginTop:12,fontSize:12.5,color:"#ddd"},children:[2===a.degree?"In the circle of ":"You met through ",(0,t.jsx)("b",{children:d.name}),"."]}),tV[h]&&(0,t.jsx)("div",{style:{marginTop:8,fontSize:12.5,fontWeight:700,color:tX[h]},children:tV[h]}),g>=8&&(0,t.jsxs)("div",{style:{marginTop:6,fontSize:12,color:"#cfd3e6"},children:["Works at a top company",a.company?`, ${a.company}`:""," (its score: ",g,")."]}),(0,t.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:6,marginTop:14},children:[(0,t.jsxs)("button",{type:"button",style:tG,onClick:()=>o?.(a),children:["Open ",a.name.split(" ")[0],"’s card →"]}),(f||1===a.degree)&&l&&(0,t.jsx)("button",{type:"button",style:tG,onClick:()=>l(a.id),children:f?`Open ${a.name.split(" ")[0]}’s circle in Bridge Chains →`:`${a.name.split(" ")[0]}’s circle: not scanned yet`}),2===a.degree&&s&&(0,t.jsx)("button",{type:"button",style:tG,onClick:()=>s({query:a.name}),children:"Show in Separation →"})]})]}),c.length>1&&(0,t.jsxs)("div",{style:{marginTop:16},children:[(0,t.jsx)("div",{style:{fontSize:10,fontWeight:800,letterSpacing:1,color:"#6b7090",textTransform:"uppercase",marginBottom:8},children:"Who"}),c.slice(0,12).map(e=>(0,t.jsxs)("button",{type:"button",onClick:()=>o?.(e),style:{...tG,display:"flex",gap:10,alignItems:"center",width:"100%",marginBottom:6,fontWeight:600},children:[(0,t.jsx)(e0,{person:e,size:26}),(0,t.jsxs)("span",{style:{minWidth:0,flex:1},children:[(0,t.jsx)("span",{style:{display:"block",color:"#fff"},children:e.name}),(0,t.jsx)("span",{style:{display:"block",fontSize:10.5,color:"#8a8fa8",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.company||e.headline||""})]}),(0,t.jsx)("span",{style:{fontSize:11,fontWeight:800,color:tX[e.tier]||"#aaa"},children:e.tier})]},e.id))]}),e?.message&&(0,t.jsx)("div",{style:{marginTop:14,fontSize:12,color:"#999",lineHeight:1.55},children:e.message}),!a&&!c.length&&(0,t.jsx)("div",{style:{marginTop:10,fontSize:11.5,color:"#667"},children:"Nothing more on file about this one."})]})}let tZ=(e,t)=>eZ.TIER_ORDER.indexOf(e.tier)-eZ.TIER_ORDER.indexOf(t.tier)||(0,P.score1)(t)-(0,P.score1)(e)||String(e.name||"").localeCompare(String(t.name||"")),tJ=e=>String(e||"").trim().split(/\s+/)[0]||"Their",tQ={display:"flex",alignItems:"center",gap:9,width:"100%",padding:"7px 8px",borderRadius:8,boxSizing:"border-box",background:"rgba(255,255,255,0.03)",border:"1px solid rgba(255,255,255,0.06)",color:"#fff",cursor:"pointer",textAlign:"left",font:"inherit",textDecoration:"none"};function t0({person:e,tierColors:n,note:r,noteColor:i,onSelect:o,href:l,label:s}){let a=(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(e0,{person:e,size:26,tierColors:n}),(0,t.jsxs)("span",{style:{flex:1,minWidth:0},children:[(0,t.jsxs)("span",{style:{display:"block",fontSize:12,fontWeight:700,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:[e.name,(0,t.jsx)("span",{style:{fontSize:10,color:n[e.tier]||"#888",fontWeight:800,marginLeft:6},children:e.tier})]}),(0,t.jsx)("span",{style:{display:"block",fontSize:10.5,color:"#888",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:[e.title,e.company].filter(Boolean).join(" · ")||" "})]}),r&&(0,t.jsx)("span",{style:{fontSize:10,fontWeight:700,color:i||"#888",whiteSpace:"nowrap"},children:r})]});return l?(0,t.jsx)(X.default,{href:l,"aria-label":s,style:{...tQ,borderColor:"rgba(0,255,136,0.2)"},children:a}):(0,t.jsx)("button",{type:"button",onClick:()=>o?.(e),style:tQ,children:a})}function t1({person:e,connections:r=[],degree2:i=[],scanNotes:o,tierColors:l,onSelect:s,onToggle:a,canScan:d=!0}){let[c,h]=(0,n.useState)(null),[p,g]=(0,n.useState)(""),[u,f]=(0,n.useState)(60),x=(0,n.useMemo)(()=>G(r,i),[r,i]),y=(0,n.useMemo)(()=>(0,O.reachIndex)(r,i,o),[r,i,o]),m=(0,n.useMemo)(()=>[...x.circles.get(e.id)||[]].sort(tZ),[x,e.id]),b=(0,n.useMemo)(()=>[...x.introduced.get(e.id)||[]].sort(tZ),[x,e.id]),j=(0,n.useMemo)(()=>{let e=Object.fromEntries(eZ.TIER_ORDER.map(e=>[e,0]));for(let t of m)null!=e[t.tier]&&(e[t.tier]+=1);return e},[m]),S=p.trim().toLowerCase(),w=m.filter(e=>(!c||e.tier===c)&&(S.length<2||[e.name,e.title,e.company].some(e=>String(e||"").toLowerCase().includes(S)))),v=l[e.tier]||"#888";return(0,t.jsxs)("div",{children:[(0,t.jsxs)("button",{onClick:a,style:{display:"flex",alignItems:"center",gap:6,background:"none",border:"none",color:"#888",fontSize:12,cursor:"pointer",padding:"0 0 10px",fontWeight:600},children:[(0,t.jsx)("span",{style:{fontSize:16},children:"←"})," Close"]}),(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10,marginBottom:4},children:[(0,t.jsx)(e0,{person:e,size:38,tierColors:l}),(0,t.jsxs)("div",{style:{minWidth:0},children:[(0,t.jsx)("div",{style:{fontSize:10,fontWeight:700,letterSpacing:1,color:"#888",textTransform:"uppercase"},children:"You’re in"}),(0,t.jsxs)("h3",{style:{fontSize:16,fontWeight:800,margin:0,color:v},children:[tJ(e.name),"’s circle"]})]})]}),(0,t.jsxs)("div",{style:{fontSize:11.5,color:"#999",marginBottom:12},children:[[e.title,e.company].filter(Boolean).join(" · "),(0,t.jsxs)("button",{type:"button",onClick:()=>s?.(e),style:{display:"block",marginTop:6,padding:0,background:"none",border:"none",color:"#74B9FF",fontSize:11,fontWeight:700,cursor:"pointer"},children:["Open ",tJ(e.name),"’s card →"]})]}),(0,t.jsx)("div",{style:{fontSize:22,fontWeight:800,lineHeight:1},children:(m.length+b.length).toLocaleString("en-US")}),(0,t.jsxs)("div",{style:{fontSize:11,color:"#888",marginBottom:10},children:[m.length+b.length===1?"person":"people"," in their circle",b.length?` \xb7 you added ${b.length} of them`:""]}),(0,t.jsx)("div",{style:{display:"flex",gap:5,flexWrap:"wrap",marginBottom:10},children:eZ.TIER_ORDER.map(e=>(0,t.jsxs)("button",{type:"button","aria-pressed":c===e,disabled:!j[e],onClick:()=>{h(c===e?null:e),f(60)},style:{padding:"4px 9px",borderRadius:12,fontSize:11,fontWeight:700,cursor:j[e]?"pointer":"default",border:`1px solid ${c===e?l[e]:"rgba(255,255,255,0.1)"}`,background:c===e?`${l[e]}26`:"rgba(255,255,255,0.03)",color:j[e]?l[e]:"#444"},children:[e," ",(0,t.jsx)("span",{style:{color:"#aaa",fontWeight:600},children:j[e]})]},e))}),(0,t.jsx)("input",{type:"search",value:p,placeholder:`Search ${tJ(e.name)}’s circle`,onChange:e=>{g(e.target.value),f(60)},style:{width:"100%",padding:"8px 12px",borderRadius:8,fontSize:12,marginBottom:14,boxSizing:"border-box",border:"1px solid rgba(255,255,255,0.1)",background:"rgba(255,255,255,0.05)",color:"#fff",outline:"none"}}),b.length>0&&!c&&S.length<2&&(0,t.jsxs)("div",{style:{marginBottom:14},children:[(0,t.jsxs)("div",{style:{fontSize:10,fontWeight:700,color:"#00ff88",letterSpacing:1,marginBottom:6,textTransform:"uppercase"},children:["You added from here (",b.length,")"]}),(0,t.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:5},children:b.map(e=>{let n,[r,i]="ready"===(n=(0,O.reachState)(e,y))?["ready to scan","#00ff88"]:"scanned"===n?["circle scanned","#74B9FF"]:"hidden"===n?["list hidden","#888"]:[null];return"ready to scan"===r&&d?(0,t.jsx)(t0,{person:e,tierColors:l,note:"Scan… →",noteColor:"#00ff88",href:`/setup?scan=${encodeURIComponent(e.id)}`,label:`Scan ${e.name}’s circle: opens the Scan page to confirm`},e.id):(0,t.jsx)(t0,{person:e,tierColors:l,note:r,noteColor:i,onSelect:s},e.id)})})]}),(0,t.jsxs)("div",{style:{fontSize:10,fontWeight:700,color:"#888",letterSpacing:1,marginBottom:6,textTransform:"uppercase"},children:[c?`${c} tier in their circle`:b.length?"Everyone else in their circle":"Everyone in their circle"," (",w.length.toLocaleString("en-US"),")"]}),0===w.length?(0,t.jsx)("div",{style:{fontSize:11.5,color:"#888",lineHeight:1.5},children:0===m.length?"Their circle isn’t scanned yet.":"No one here matches."}):(0,t.jsxs)("div",{role:"list",style:{display:"flex",flexDirection:"column",gap:5},children:[w.slice(0,u).map(e=>(0,t.jsx)(t0,{person:e,tierColors:l,onSelect:s},e.id)),w.length>u&&(0,t.jsxs)("button",{type:"button",onClick:()=>f(e=>e+180),style:{background:"none",border:"none",color:"#888",fontSize:11,fontWeight:600,cursor:"pointer",padding:"6px 0",textAlign:"left"},children:["Show more (",(w.length-u).toLocaleString("en-US")," left)"]})]})]})}function t5({selected:e,stats:r,tierColors:i,connections:o,degree2:a=[],mode:d,collapsed:c,filter:h,pending:p=[],onToggle:g,onSelect:u,onSwitchMode:f,onFocusNode:x,onMarkSent:y,onUndoPending:m,scanNotes:b,csvSource:j=null,onOpenCircle:S,onShowInSeparation:w,note:v=null,onCloseNote:k,circle:$=null}){let C,z,_="degrees"===d,M=!j,{userId:R,userProfile:W}=(0,tq.useUser)(),[T,F]=(0,n.useState)(""),E=(0,n.useMemo)(()=>{let e={};return a.forEach(t=>{t.source_connection_id&&(e[t.source_connection_id]||(e[t.source_connection_id]=[]),e[t.source_connection_id].push(t))}),e},[a]),B=(0,n.useMemo)(()=>(0,P.routeIndex)(a),[a]),L=(0,n.useMemo)(()=>(0,el.exclusiveReach)(a,o),[a,o]),A=(0,n.useMemo)(()=>(0,el.bridgeOverlap)(a,o),[a,o]),D=(0,n.useMemo)(()=>(0,O.reachIndex)(o,a,b),[o,a,b]),[N,H]=(0,n.useState)(!1),q=(0,n.useMemo)(()=>new Map(o.map(e=>[e.id,e])),[o]),Y=(0,l.default)(),U=(0,n.useCallback)(e=>(0,s.hasRequest)(e,Y),[Y]);if(v)return(0,t.jsx)(t2,{collapsed:c,onToggle:g,children:(0,t.jsx)(tK,{note:v,connections:o,degree2:a,onBack:k,onSelect:e=>{k?.(),u?.(e)},onOpenCircle:S?e=>{k?.(),S(e)}:void 0,onShowInSeparation:w?e=>{k?.(),w(e)}:void 0})});if(e){let n,r,l,d,h=1===e.degree&&E[e.id],p=E[e.id]||[],x=2===e.degree?(0,P.routesFor)(e,B,q):[];return(0,t.jsxs)(t2,{collapsed:c,onToggle:g,children:[(0,t.jsxs)("button",{onClick:()=>u&&u(null),style:{display:"flex",alignItems:"center",gap:6,background:"none",border:"none",color:"#888",fontSize:12,cursor:"pointer",padding:"0 0 10px",fontWeight:600},children:[(0,t.jsx)("span",{style:{fontSize:16},children:"←"})," Back to list"]}),(0,t.jsx)("div",{style:{fontSize:10,color:"#888",marginBottom:8,letterSpacing:1,textTransform:"uppercase"},children:2===e.degree?"Degree 2 Connection":"Degree 1 Connection"}),(0,t.jsxs)("div",{style:{display:"flex",gap:6,marginBottom:8,flexWrap:"wrap"},children:[(0,t.jsx)("div",{style:{background:2===e.degree?"#FF6B35":i[e.tier],color:"#000",display:"inline-block",padding:"2px 10px",borderRadius:12,fontSize:11,fontWeight:700},children:2===e.degree?`DEGREE 2 \xb7 TIER ${e.tier}`:`TIER ${e.tier}`}),e.unlocked_from_name&&(0,t.jsxs)("div",{style:{background:"rgba(52,152,219,0.08)",border:"1px solid rgba(52,152,219,0.28)",borderRadius:8,padding:"9px 11px",marginBottom:10,fontSize:11.5,color:"#8fb8d6",lineHeight:1.5},children:[1===e.degree?"You met them through ":"Reachable through ",(0,t.jsx)("b",{style:{color:"#cfe6f7"},children:e.unlocked_from_name})]}),e.is_catalyst&&(0,t.jsx)("div",{style:{background:"#00ff88",color:"#000",display:"inline-block",padding:"2px 10px",borderRadius:12,fontSize:11,fontWeight:800,letterSpacing:.5},children:"CATALYST"})]}),(0,t.jsxs)("div",{style:{display:"flex",gap:12,alignItems:"center",marginBottom:16},children:[(0,I.localPhoto)(e.profile_image_url)?(0,t.jsx)("img",{src:(0,I.localPhoto)(e.profile_image_url),alt:e.name,style:{width:52,height:52,borderRadius:"50%",objectFit:"cover",border:`2px solid ${i[e.tier]||"#555"}`,flexShrink:0},onError:e=>{e.target.style.display="none",e.target.nextSibling.style.display="flex"}}):null,(0,t.jsx)("div",{style:{width:52,height:52,borderRadius:"50%",flexShrink:0,background:i[e.tier]||"#555",display:(0,I.localPhoto)(e.profile_image_url)?"none":"flex",alignItems:"center",justifyContent:"center",fontSize:20,fontWeight:700,color:"S"===e.tier?"#000":"#fff"},children:e.name?.charAt(0)}),(0,t.jsxs)("div",{style:{minWidth:0},children:[(0,t.jsx)("h2",{style:{fontSize:18,fontWeight:700,margin:0},children:e.name}),(0,t.jsx)("p",{style:{color:"#aaa",fontSize:11,margin:"3px 0 0",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.headline?.substring(0,60)}),e.profile_url&&(0,t.jsx)("a",{href:e.profile_url,target:"_blank",rel:"noopener noreferrer",style:{fontSize:10,color:"#0077B5",textDecoration:"none",fontWeight:600},children:"View on LinkedIn"})]})]}),1===e.degree&&(0,t.jsx)(tF,{person:e,connections:o,degree2:a,tierColors:i,onSelect:u,isRequested:U,canScan:M}),2!==e.degree&&(()=>{let n,r,l=function(e,{degree2:t=[],exclusive:n,overlap:r,reach:i}={}){if(!e||2===e.degree)return null;let o=new Set,l={S:0,A:0,B:0,C:0,D:0},s=new Map;for(let n of t){if(n?.source_connection_id!==e.id)continue;let t=(0,P.keyFor)(n);if(o.has(t))continue;o.add(t),l[tY.includes(n.tier)?n.tier:"D"]+=1;let r=String(n.company||"").trim();r&&s.set(r,(s.get(r)||0)+1)}let a=[...s.entries()].filter(([,e])=>e>=2).sort((e,t)=>t[1]-e[1]||e[0].localeCompare(t[0])).slice(0,2).map(([e,t])=>({name:e,count:t})),d=o.size,c=n?.get(e.id)||{reach:0,only:0,total:0},h=r?.get(e.id),p=h&&h.share>=.15&&h.shared>=3?{id:h.with,share:h.share,shared:h.shared}:null,g=[...n?.entries()||[]].sort((e,t)=>t[1].reach-e[1].reach||String(e[0]).localeCompare(String(t[0]))),u=g.findIndex(([t])=>t===e.id);return{circle:d,only:c.only,onlyShare:d?c.only/d:0,twin:p,mix:l,bars:i?(0,O.scanBars)(e,i):null,rank:u>=0?u+1:null,of:g.length,companies:a}}(e,{degree2:a,exclusive:L,overlap:A,reach:D});if(!l)return null;let d=e.name?.split(" ")[0]||"them",c=l.twin&&o.find(e=>e.id===l.twin.id),h={display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:10,padding:"7px 0",borderTop:"1px solid rgba(255,255,255,0.05)"},p={fontSize:10.5,color:"#8b9a9a",minWidth:92},g={background:"none",border:"none",padding:0,color:"#3498DB",cursor:"pointer",fontSize:11.5,whiteSpace:"nowrap"},f=null==l.bars?"Not scanned yet":5===l.bars?"Their whole list":`About ${20*l.bars}% of their list`;return(0,t.jsxs)("div",{style:{border:"1px solid rgba(52,152,219,0.25)",borderRadius:8,marginBottom:16,background:"rgba(52,152,219,0.04)"},children:[(0,t.jsxs)("button",{onClick:()=>H(e=>!e),"aria-expanded":N,style:{width:"100%",display:"flex",justifyContent:"space-between",alignItems:"center",padding:"9px 12px",background:"none",border:"none",cursor:"pointer",color:"#cfe6f7"},children:[(0,t.jsx)("span",{style:{fontSize:11,fontWeight:700,letterSpacing:1},children:"INSIGHTS"}),(0,t.jsxs)("span",{style:{fontSize:11,color:"#8b9a9a"},children:[!N&&l.circle>0&&`${l.circle.toLocaleString()} in their circle${l.only?` \xb7 ${l.only.toLocaleString()} only through ${d}`:""} `,N?"▲":"▼"]})]}),N&&(0,t.jsxs)("div",{style:{padding:"0 12px 8px",fontSize:12,color:"#ccc"},children:[(0,t.jsxs)("div",{style:h,children:[(0,t.jsx)("span",{style:p,children:"Their circle"}),(0,t.jsx)("span",{style:{flex:1},children:l.circle?`${l.circle.toLocaleString()} people`:"None scanned yet"}),l.circle>0&&S&&(0,t.jsx)("button",{style:g,onClick:()=>S(e.id),children:"Explore →"})]}),(0,t.jsxs)("div",{style:h,children:[(0,t.jsxs)("span",{style:p,children:["Only through ",d]}),(0,t.jsx)("span",{style:{flex:1},children:l.circle?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("b",{style:{color:"#00ff88"},children:l.only.toLocaleString()})," (",Math.round(100*l.onlyShare),"%): none of your other connections reach them"]}):"—"}),l.only>0&&w&&(0,t.jsx)("button",{style:g,onClick:()=>w({query:e.name,rarity:"only"}),children:"Show them →"})]}),(0,t.jsxs)("div",{style:h,children:[(0,t.jsx)("span",{style:p,children:"Closest overlap"}),(0,t.jsx)("span",{style:{flex:1},children:c?(0,t.jsxs)(t.Fragment,{children:["Opens the same doors as ",(0,t.jsx)("b",{style:{color:"#fff"},children:c.name})," (",Math.round(100*l.twin.share),"%, ",l.twin.shared.toLocaleString()," people)"]}):"No one opens the same doors"}),c&&(0,t.jsx)("button",{style:g,onClick:()=>u?.(c),children:"Open →"})]}),(0,t.jsxs)("div",{style:h,children:[(0,t.jsx)("span",{style:p,children:"Tier mix"}),(0,t.jsx)("span",{style:{flex:1,display:"flex",height:8,borderRadius:4,overflow:"hidden",background:"rgba(255,255,255,0.05)",alignSelf:"center"},children:l.circle>0&&["S","A","B","C","D"].map(e=>l.mix[e]>0&&(0,t.jsx)("span",{title:`${e}: ${l.mix[e]}`,style:{width:`${100*l.mix[e]/l.circle}%`,background:i[e]}},e))}),(0,t.jsx)("span",{style:{fontSize:10.5,color:"#8b9a9a"},children:l.circle?`${l.mix.S} S \xb7 ${l.mix.A} A`:""}),l.mix.S>0&&w&&(0,t.jsx)("button",{style:g,onClick:()=>w({query:e.name,tier:"S"}),children:"S only →"})]}),l.companies.length>0&&(0,t.jsxs)("div",{style:h,children:[(0,t.jsx)("span",{style:p,children:"Where they work"}),(0,t.jsx)("span",{style:{flex:1},children:l.companies.map(e=>`${e.count} at ${e.name}`).join(" · ")})]}),(0,t.jsxs)("div",{style:h,children:[(0,t.jsx)("span",{style:p,children:"Scanned"}),(0,t.jsx)("span",{style:{flex:1},children:f}),5!==l.bars&&M&&(0,t.jsx)("a",{href:`/setup?scan=${encodeURIComponent(e.id)}`,style:g,children:null==l.bars?"Scan →":"Finish →"})]}),(n=e.connected_date?new Date(e.connected_date):null,r=(E[e.id]||[]).filter(e=>(0,s.hasRequest)(e,Y)).length,n&&!Number.isNaN(n.getTime())||r?(0,t.jsxs)("div",{style:h,children:[(0,t.jsxs)("span",{style:p,children:["You and ",d]}),(0,t.jsxs)("span",{style:{flex:1},children:[n&&!Number.isNaN(n.getTime())?`Connected ${n.toLocaleDateString(void 0,{month:"short",year:"numeric"})}`:"",r?`${n?" · ":""}${r} request${1===r?"":"s"} out through them`:""]})]}):null),(0,t.jsxs)("div",{style:h,children:[(0,t.jsx)("span",{style:p,children:"Rank"}),(0,t.jsx)("span",{style:{flex:1},children:l.rank?`#${l.rank} of ${l.of} by who only they reach`:"Ranked once their circle is scanned"})]})]})]})})(),e.is_catalyst&&(0,t.jsxs)("div",{style:{background:"rgba(0,255,136,0.08)",border:"1px solid rgba(0,255,136,0.3)",borderRadius:8,padding:12,marginBottom:16},children:[(0,t.jsx)("div",{style:{fontSize:10,color:"#00ff88",fontWeight:700,marginBottom:4,letterSpacing:1},children:"CATALYST NODE"}),(0,t.jsxs)("div",{style:{fontSize:12,color:"#ccc"},children:["This person's network power exceeds their own tier. They connect to"," ",(0,t.jsxs)("strong",{style:{color:"#00ff88"},children:[e.catalyst_score," S+A tier"]})," ","people — making them a high-value stepping stone to reach elite connections."]})]}),2===e.degree&&x.length>0&&(0,t.jsx)(t3,{routes:x,selected:e,tierColors:i,onSelect:u},e.id),(0,t.jsxs)("div",{style:{background:"rgba(255,255,255,0.04)",borderRadius:8,padding:12,marginBottom:16},children:[(0,t.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"baseline",marginBottom:8},children:[(0,t.jsx)("span",{style:{fontSize:11,color:"#888",fontWeight:600,letterSpacing:1,textTransform:"uppercase"},children:"Score"}),(0,t.jsx)("span",{style:{fontSize:28,fontWeight:800,color:i[e.tier]||"#fff"},children:parseFloat(e.power_score).toFixed(1)})]}),e.score_why&&(0,t.jsx)("div",{style:{fontSize:11,color:"#aab7b7",lineHeight:1.5,marginBottom:10},children:e.score_why}),(0,t.jsxs)("div",{style:{marginBottom:6},children:[(0,t.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",fontSize:10,color:"#888",marginBottom:2},children:[(0,t.jsx)("span",{children:"Title"}),(0,t.jsxs)("span",{children:[e.seniority_score||0,"/10"]})]}),(0,t.jsx)("div",{style:{height:4,background:"rgba(255,255,255,0.08)",borderRadius:2},children:(0,t.jsx)("div",{style:{height:"100%",width:`${10*(e.seniority_score||0)}%`,background:i[e.tier]||"#FFD700",borderRadius:2}})})]}),(0,t.jsxs)("div",{style:{marginBottom:6*(e.circle_power>0)},children:[(0,t.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",fontSize:10,color:"#888",marginBottom:2},children:[(0,t.jsx)("span",{children:"Company"}),(0,t.jsxs)("span",{children:[e.company_prestige_score||0,"/10"]})]}),(0,t.jsx)("div",{style:{height:4,background:"rgba(255,255,255,0.08)",borderRadius:2},children:(0,t.jsx)("div",{style:{height:"100%",width:`${10*(e.company_prestige_score||0)}%`,background:"#3498DB",borderRadius:2}})})]}),e.circle_power>0&&(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",fontSize:10,color:"#888",marginBottom:2},children:[(0,t.jsx)("span",{children:"Circle Power"}),(0,t.jsxs)("span",{style:{color:"#FF6B35"},children:[e.circle_s_count||0,"S · ",e.circle_a_count||0,"A"]})]}),(0,t.jsx)("div",{style:{height:4,background:"rgba(255,255,255,0.08)",borderRadius:2},children:(0,t.jsx)("div",{style:{height:"100%",width:`${Math.min(parseFloat(e.circle_power)/70*100,100)}%`,background:"#FF6B35",borderRadius:2}})})]})]}),(0,t.jsxs)("div",{style:{marginBottom:16},children:[(0,t.jsx)("div",{style:{fontSize:10,fontWeight:700,color:"#FFD700",letterSpacing:1,marginBottom:6,textTransform:"uppercase"},children:"Why This Matters"}),(0,t.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:4,fontSize:11,color:"#ccc"},children:(function(e,t,n,r=[]){let i=[],o=(e.headline||"").toLowerCase(),l=(e.role||"").toLowerCase(),s=(e.company||"").toLowerCase(),a=t.sectors.map(e=>e.toLowerCase());l.match(/ceo|chief|founder|president|chairman/i)?i.push({icon:"👑",text:`${e.role} — C-suite executive, highest leverage contact`,color:"#FFD700"}):l.match(/vp|vice president|svp|evp|managing director/i)?i.push({icon:"⚡",text:`${e.role} — VP-level, strong decision-making authority`,color:"#FFD700"}):l.match(/director|head of|senior director/i)?i.push({icon:"🎯",text:`${e.role} — Senior leadership, controls team/budget`,color:"#FF6B35"}):l.match(/manager|lead|principal/i)&&i.push({icon:"📊",text:`${e.role} — Mid-senior, operational influence`,color:"#3498DB"});let{now:d,before:c}=(0,tz.topCompanies)(e);d&&i.push({icon:"🏢",text:`At ${d.name} (${d.score}/10) — top-tier company network access`,color:"#9B59B6"}),c&&i.push({icon:"📜",text:`Former ${c.name} (${c.score}/10) — carries network from previous role`,color:"#95A5A6"});let h=a.filter(e=>o.includes(e)||s.includes(e));h.length>0&&i.push({icon:"🔗",text:`Shared sector: ${h.join(", ")} — direct industry relevance to you`,color:"#2ECC71"});let p=n.filter(t=>t.source_connection_id===e.id).length;if(p>0){let t=n.filter(t=>t.source_connection_id===e.id&&"S"===t.tier).length;i.push({icon:"🌐",text:`Gateway to ${p} degree-2 connections${t>0?` (${t} S-tier)`:""}`,color:"#FF6B35"})}if(e.is_catalyst&&i.push({icon:"⚡",text:"Catalyst — network power exceeds personal tier, high stepping-stone value",color:"#00ff88"}),2===e.degree&&r.length>0){let e=r.filter(e=>e.bridge);if(1===r.length)i.push(e.length?{icon:"🤝",text:`Reachable via ${e[0].bridge.name} (${e[0].bridge.tier}-tier)`,color:"#3498DB"}:{icon:"🤝",text:"Reachable through a connection we can’t name",color:"#888"});else{let t=e.slice(0,2).map(e=>`${String(e.bridge.name||"").trim().split(/\s+/)[0]} (${e.bridge.tier})`),n=r.length-t.length,o=0===t.length?"connections we can’t name":n>0?`${t.join(", ")} and ${n} more`:t.join(" and ");i.push({icon:"🤝",text:`Reachable ${r.length} ways — via ${o}`,color:"#3498DB"})}}return 0===i.length&&i.push({icon:"📌",text:`${e.tier}-tier connection with ${parseFloat(e.power_score).toFixed(1)} power score`,color:"#888"}),i.slice(0,5)})(e,W||{name:"User",sectors:[],goals:[]},a,x).map((e,n)=>(0,t.jsxs)("div",{style:{display:"flex",gap:6,alignItems:"flex-start"},children:[(0,t.jsx)("span",{style:{color:e.color||"#888",fontSize:13,lineHeight:1},children:e.icon}),(0,t.jsx)("span",{children:e.text})]},n))})]}),e.company&&(0,t.jsxs)("div",{style:{marginBottom:8},children:[(0,t.jsx)("div",{style:{color:"#666",fontSize:10},children:"Company"}),(0,t.jsx)("div",{style:{fontWeight:600,fontSize:12},children:e.company})]}),e.role&&(0,t.jsxs)("div",{style:{marginBottom:12},children:[(0,t.jsx)("div",{style:{color:"#666",fontSize:10},children:"Role"}),(0,t.jsx)("div",{style:{fontSize:12},children:e.role})]}),h&&p.length>0&&(n=p.filter(e=>"S"===e.tier),r=p.filter(e=>"A"===e.tier),l=[...p].sort((e,t)=>(parseFloat(t.power_score)||0)-(parseFloat(e.power_score)||0)).slice(0,8),(0,t.jsxs)("div",{style:{marginBottom:16},children:[(0,t.jsxs)("div",{style:{fontSize:10,fontWeight:700,color:"#FF6B35",letterSpacing:1,marginBottom:8,textTransform:"uppercase"},children:["Cluster Overview — ",p.length," connections"]}),(0,t.jsxs)("div",{style:{display:"flex",gap:6,marginBottom:8,fontSize:10},children:[n.length>0&&(0,t.jsxs)("span",{style:{color:"#FFD700",fontWeight:600},children:[n.length," S-tier"]}),r.length>0&&(0,t.jsxs)("span",{style:{color:"#9B59B6",fontWeight:600},children:[r.length," A-tier"]})]}),(0,t.jsxs)("a",{href:`/queue?bridge=${e.id}&groupBy=bridge`,style:{display:"block",textAlign:"center",padding:"8px 12px",marginBottom:10,background:"linear-gradient(135deg, #FF6B35, #FFD700)",color:"#000",borderRadius:6,textDecoration:"none",fontWeight:700,fontSize:11},children:["Outlink Bridge → Add ",p.filter(e=>"S"===e.tier||"A"===e.tier||"B"===e.tier).length," People"]}),(0,t.jsx)("div",{style:{fontSize:10,color:"#888",marginBottom:8},children:"Most valuable in this cluster:"}),(0,t.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:3},children:l.map(e=>(0,t.jsxs)("div",{onClick:()=>u&&u(e),style:{display:"flex",alignItems:"center",gap:6,padding:"4px 6px",borderRadius:4,cursor:"pointer",borderLeft:`2px solid ${i[e.tier]||"#555"}`,background:"rgba(255,255,255,0.03)"},onMouseEnter:e=>e.currentTarget.style.background="rgba(255,255,255,0.08)",onMouseLeave:e=>e.currentTarget.style.background="rgba(255,255,255,0.03)",children:[(0,I.localPhoto)(e.profile_image_url)?(0,t.jsx)("img",{src:(0,I.localPhoto)(e.profile_image_url),alt:"",style:{width:22,height:22,borderRadius:"50%",objectFit:"cover",flexShrink:0,border:`1px solid ${i[e.tier]||"#555"}`},onError:e=>{e.target.style.display="none",e.target.nextSibling.style.display="flex"}}):null,(0,t.jsx)("div",{style:{width:22,height:22,borderRadius:"50%",flexShrink:0,fontSize:9,fontWeight:700,background:i[e.tier]||"#555",color:"S"===e.tier?"#000":"#fff",display:(0,I.localPhoto)(e.profile_image_url)?"none":"flex",alignItems:"center",justifyContent:"center"},children:e.name?.charAt(0)}),(0,t.jsxs)("div",{style:{flex:1,minWidth:0},children:[(0,t.jsx)("div",{style:{fontSize:10,fontWeight:600,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.name}),(0,t.jsx)("div",{style:{fontSize:8,color:"#666",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.headline?.substring(0,40)})]}),(0,t.jsx)("span",{style:{fontSize:9,color:i[e.tier],fontWeight:600,flexShrink:0},children:parseFloat(e.power_score).toFixed(1)})]},e.id))})]})),h&&p.length>0&&(0,t.jsxs)("div",{style:{marginTop:16},children:[(0,t.jsxs)("div",{style:{fontSize:12,fontWeight:600,color:"#FF6B35",marginBottom:8},children:["Gateway to ",p.length," degree-2 connections:"]}),p.sort((e,t)=>(parseFloat(t.power_score)||0)-(parseFloat(e.power_score)||0)).slice(0,10).map(e=>(0,t.jsxs)("div",{style:{padding:"6px 8px",background:"rgba(255,107,53,0.08)",borderRadius:6,borderLeft:"3px solid #FF6B35",marginBottom:4,fontSize:12},children:[(0,t.jsx)("div",{style:{fontWeight:600},children:e.name}),(0,t.jsxs)("div",{style:{color:"#888",fontSize:11},children:[e.role,e.company?` @ ${e.company}`:""]}),(0,t.jsxs)("div",{style:{color:"#FF6B35",fontSize:10},children:["Score: ",parseFloat(e.power_score).toFixed(1)]})]},e.id))]}),!_&&h&&p.length>0&&f&&(0,t.jsxs)("button",{onClick:()=>{f("degrees")},style:{width:"100%",padding:"12px",borderRadius:8,border:"none",cursor:"pointer",background:"linear-gradient(135deg, #FF6B35, #FFD700)",color:"#000",fontWeight:700,fontSize:13,marginTop:12},children:["View Bridge → ",p.length," connections"]}),(2===e.degree||e.source_connection_id)&&1!==e.degree&&"unlocked"!==e.unlock_status&&(d=U(e),(0,t.jsxs)("div",{style:{background:"rgba(255,215,0,0.06)",border:`1px ${d?"dashed":"solid"} rgba(255,215,0,${d?.45:.25})`,borderRadius:10,padding:16,marginTop:16,textAlign:"center"},children:[(0,t.jsx)("div",{style:{fontSize:10,color:"#FFD700",fontWeight:700,letterSpacing:1,marginBottom:6},children:d?"REQUEST SENT":"LOCKED PATH"}),(0,t.jsx)("div",{style:{fontSize:13,color:"#ccc",marginBottom:12},children:d?`Waiting for ${e.name} to accept. The next scan of your own connections notices when they do.`:`Connect with ${e.name} to unlock their network and extend your six degrees.`}),(0,t.jsx)("div",{style:{width:"100%",height:60,background:"rgba(255,255,255,0.03)",borderRadius:8,border:"1px dashed rgba(255,255,255,0.1)",display:"flex",alignItems:"center",justifyContent:"center",fontSize:11,color:"#444",marginBottom:12},children:d?"[ Cluster Pending... ]":"[ Hidden Network ]"}),d?(0,t.jsx)("button",{onClick:()=>{(0,s.undoRequest)(e).catch(()=>{})},style:{background:"none",border:"none",color:"#888",fontSize:11,fontWeight:600,cursor:"pointer"},children:"Didn't send it? Undo"}):(0,t.jsx)("a",{href:e.profile_url,target:"_blank",rel:"noopener noreferrer",style:{display:"block",padding:"10px 16px",background:"linear-gradient(135deg, #FFD700, #FF6B35)",color:"#000",borderRadius:8,textDecoration:"none",fontWeight:700,fontSize:13},onClick:()=>{(0,s.markRequested)(e,{bridgeId:e.source_connection_id}).catch(()=>{})},children:"Connect to Unlock Path"})]})),(1===e.degree||"accepted"===e.outreach_status)&&(M?(0,t.jsx)(t4,{selected:e,degree2:a},e.id):(0,t.jsx)(t7,{csvSource:j,style:{marginTop:16}})),e.profile_url&&(0,t.jsx)("a",{href:e.profile_url,target:"_blank",rel:"noopener noreferrer",style:{display:"block",textAlign:"center",padding:10,marginTop:16,background:"#0077B5",color:"#fff",borderRadius:8,textDecoration:"none",fontWeight:600,fontSize:13},children:"View LinkedIn Profile"})]})}if(_&&$)return(0,t.jsx)(t2,{collapsed:c,onToggle:g,children:(0,t.jsx)(t1,{person:$,connections:o,degree2:a,scanNotes:b,tierColors:i,onSelect:u,onToggle:g,canScan:M},$.id)});if(_){let e,n,l,s;return(0,t.jsxs)(t2,{collapsed:c,onToggle:g,children:[(0,t.jsxs)("button",{onClick:g,style:{display:"flex",alignItems:"center",gap:6,background:"none",border:"none",color:"#888",fontSize:12,cursor:"pointer",padding:"0 0 10px",fontWeight:600},children:[(0,t.jsx)("span",{style:{fontSize:16},children:"←"})," Close"]}),(0,t.jsx)("h3",{style:{fontSize:16,fontWeight:700,marginTop:0,color:"#FF6B35"},children:"Degrees"}),(0,t.jsx)("p",{style:{fontSize:12,color:"#888",marginBottom:12},children:"Your bridge connections and who they unlock."}),M?(0,t.jsx)(nn,{connections:o,degree2:a,scanNotes:b,tierColors:i}):(0,t.jsx)(t7,{csvSource:j,style:{marginBottom:16}}),(0,t.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:8,marginBottom:12},children:[(0,t.jsx)(t8,{label:"Degree-2 Found",value:a.length}),(0,t.jsx)(t8,{label:"D2 S-Tier",value:r?.d2Tiers?.S||0}),(0,t.jsx)(t8,{label:"D2 A-Tier",value:r?.d2Tiers?.A||0}),(0,t.jsx)(t8,{label:"Bridges Used",value:Object.keys(E).length})]}),(0,t.jsxs)("div",{style:{position:"relative",marginBottom:16},children:[(0,t.jsx)("input",{type:"text",placeholder:"Search bridges or d2...",value:T,onChange:e=>F(e.target.value),style:{width:"100%",padding:"8px 12px",borderRadius:8,fontSize:12,border:"1px solid rgba(255,255,255,0.1)",background:"rgba(255,255,255,0.05)",color:"#fff",outline:"none",boxSizing:"border-box"}}),T.length>=2&&(e=T.toLowerCase(),n=o.filter(t=>a.some(e=>e.source_connection_id===t.id)&&t.name.toLowerCase().includes(e)).slice(0,5),l=a.filter(t=>t.name?.toLowerCase().includes(e)).slice(0,5),0===(s=[...n.map(e=>({...e,_matchType:"bridge"})),...l.map(e=>({...e,_matchType:"d2"}))]).length?null:(0,t.jsx)("div",{style:{position:"absolute",top:"100%",left:0,right:0,zIndex:50,background:"color-mix(in srgb, var(--sd-bg) 97%, transparent)",border:"1px solid rgba(255,255,255,0.1)",borderRadius:8,overflow:"hidden",maxHeight:200,overflowY:"auto",boxShadow:"0 8px 24px rgba(0,0,0,0.5)"},children:s.map(e=>(0,t.jsxs)("div",{onClick:()=>{u(e),F(""),x&&"bridge"===e._matchType&&x(e.id)},style:{padding:"8px 12px",cursor:"pointer",display:"flex",alignItems:"center",gap:8,borderBottom:"1px solid rgba(255,255,255,0.05)"},onMouseEnter:e=>e.currentTarget.style.background="rgba(255,255,255,0.06)",onMouseLeave:e=>e.currentTarget.style.background="transparent",children:[(0,I.localPhoto)(e.profile_image_url)?(0,t.jsx)("img",{src:(0,I.localPhoto)(e.profile_image_url),alt:"",style:{width:24,height:24,borderRadius:"50%",objectFit:"cover"}}):(0,t.jsx)("div",{style:{width:24,height:24,borderRadius:"50%",background:i[e.tier]||"#555",fontSize:9,fontWeight:700,display:"flex",alignItems:"center",justifyContent:"center",color:"#fff"},children:e.name?.charAt(0)}),(0,t.jsxs)("div",{style:{flex:1,minWidth:0},children:[(0,t.jsx)("div",{style:{fontSize:11,fontWeight:600,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.name}),(0,t.jsx)("div",{style:{fontSize:8,color:"#666"},children:"bridge"===e._matchType?"Bridge":"Degree-2"})]}),(0,t.jsx)("span",{style:{fontSize:9,fontWeight:700,color:i[e.tier]},children:e.tier})]},e.id))}))]}),"pending"===h&&p.length>0&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("h4",{style:{fontSize:13,fontWeight:600,color:"#FF6B35",marginBottom:8},children:["⏳ Pending Requests (",p.length,")"]}),(0,t.jsx)("p",{style:{fontSize:10,color:"#666",marginBottom:10,lineHeight:1.4},children:"Friend requests you've sent. When accepted, their cluster unlocks for bridging."}),(0,t.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:2},children:p.map(e=>{let n=2===e.degree?o.find(t=>t.id===e.source_connection_id):null;return(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,padding:"8px 10px",background:"rgba(255,107,53,0.06)",borderRadius:8,border:"1px solid rgba(255,107,53,0.12)"},children:[(0,I.localPhoto)(e.profile_image_url)?(0,t.jsx)("img",{src:(0,I.localPhoto)(e.profile_image_url),alt:"",style:{width:32,height:32,borderRadius:"50%",objectFit:"cover",flexShrink:0,border:`2px solid ${i[e.tier]||"#555"}`},onError:e=>{e.target.style.display="none"}}):(0,t.jsx)("div",{style:{width:32,height:32,borderRadius:"50%",flexShrink:0,fontSize:12,fontWeight:700,background:i[e.tier]||"#555",color:"S"===e.tier?"#000":"#fff",display:"flex",alignItems:"center",justifyContent:"center"},children:e.name?.charAt(0)}),(0,t.jsxs)("div",{style:{flex:1,minWidth:0},children:[(0,t.jsx)("div",{style:{fontSize:11,fontWeight:600,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.name}),(0,t.jsx)("div",{style:{fontSize:8,color:"#888",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.headline?.substring(0,40)}),n&&(0,t.jsxs)("div",{style:{fontSize:8,color:"#FF6B35",marginTop:1},children:["via ",n.name?.split(" ")[0]]})]}),(0,t.jsxs)("div",{style:{textAlign:"center",flexShrink:0},children:[(0,t.jsx)("div",{style:{fontSize:9,fontWeight:800,color:i[e.tier]||"#888"},children:e.tier}),(0,t.jsx)("div",{style:{fontSize:8,color:"#666"},children:parseFloat(e.power_score||0).toFixed(1)})]}),(0,t.jsx)("button",{onClick:()=>m&&m(e),title:"Remove from pending",style:{background:"none",border:"none",color:"#555",cursor:"pointer",fontSize:12,padding:2,flexShrink:0},children:"✕"})]},e.id)})})]}),"pending"!==h&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("h4",{style:{fontSize:13,fontWeight:600,color:"#FF6B35",marginBottom:8},children:"Most Valuable Clusters"}),(0,t.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:6},children:Object.entries(E).map(([e,t])=>{let n=o.find(t=>t.id===e);if(!n)return null;let r=t.length;if(0===r)return null;let i=t.filter(e=>"S"===e.tier),l=t.filter(e=>"A"===e.tier),s=t.filter(e=>"B"===e.tier),a=i.length,d=l.length,c=s.length,h=a>0?i.reduce((e,t)=>e+(parseFloat(t.power_score)||0),0)/a:0,p=d>0?l.reduce((e,t)=>e+(parseFloat(t.power_score)||0),0)/d:0,g=s.filter(e=>(parseFloat(e.power_score)||0)>=5).length,u=(a+d)/r,f=h/7*a*15+p/5.5*d*6+3*g+25*u+2*Math.log2(r+1)+10*!!n.is_catalyst,x=t.reduce((e,t)=>e+(parseFloat(t.power_score)||0),0)/r;return{bridge:n,members:r,sCount:a,aCount:d,bCount:c,risingCount:g,sAvgPower:h,avgPower:x,elitePct:u,clusterValue:f,sTier:i,aTier:l,topMembers:[...t].sort((e,t)=>(parseFloat(t.power_score)||0)-(parseFloat(e.power_score)||0))}}).filter(Boolean).sort((e,t)=>t.clusterValue-e.clusterValue).map((e,n)=>(0,t.jsx)(nt,{cs:e,rank:n+1,tierColors:i,onSelect:u},e.bridge.id))})]})]})}let X=[...o||[]].sort((e,t)=>(parseFloat(t.power_score)||0)-(parseFloat(e.power_score)||0)),V=T.length>=2?X.filter(e=>e.name.toLowerCase().includes(T.toLowerCase())).slice(0,8):[];return(0,t.jsxs)(t2,{collapsed:c,onToggle:g,children:[(0,t.jsxs)("button",{onClick:g,style:{display:"flex",alignItems:"center",gap:6,background:"rgba(255,255,255,0.06)",border:"1px solid rgba(255,255,255,0.1)",borderRadius:6,color:"#aaa",fontSize:12,cursor:"pointer",padding:"6px 12px",marginBottom:12,fontWeight:600},children:[(0,t.jsx)("span",{style:{fontSize:16},children:"←"})," Close"]}),(0,t.jsx)("h3",{style:{fontSize:16,fontWeight:700,marginTop:0},children:"Network Circle"}),r&&(0,t.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:8,marginBottom:16},children:[(0,t.jsx)(t8,{label:"Total Connections",value:r.total}),(0,t.jsx)(t8,{label:"S-Tier",value:r.tiers?.S||0}),(0,t.jsx)(t8,{label:"A-Tier",value:r.tiers?.A||0}),(0,t.jsx)(t8,{label:"B-Tier",value:r.tiers?.B||0})]}),(0,t.jsxs)("div",{style:{position:"relative",marginBottom:12},children:[(0,t.jsx)("input",{type:"text",placeholder:"Search connections...",value:T,onChange:e=>F(e.target.value),style:{width:"100%",padding:"8px 12px",borderRadius:8,boxSizing:"border-box",border:"1px solid rgba(255,255,255,0.1)",background:"rgba(0,0,0,0.3)",color:"#fff",fontSize:12,outline:"none"}}),V.length>0&&(0,t.jsx)("div",{style:{position:"absolute",top:"100%",left:0,right:0,zIndex:10,background:"color-mix(in srgb, var(--sd-bg) 97%, transparent)",border:"1px solid rgba(255,255,255,0.1)",borderRadius:8,marginTop:4,overflow:"hidden",boxShadow:"0 8px 24px rgba(0,0,0,0.5)"},children:V.map(e=>(0,t.jsxs)("div",{onClick:()=>{u&&u(e),x&&x(e.id),F("")},style:{display:"flex",alignItems:"center",gap:8,padding:"8px 10px",cursor:"pointer",borderBottom:"1px solid rgba(255,255,255,0.04)"},onMouseEnter:e=>e.currentTarget.style.background="rgba(255,255,255,0.08)",onMouseLeave:e=>e.currentTarget.style.background="transparent",children:[(0,I.localPhoto)(e.profile_image_url)?(0,t.jsx)("img",{src:(0,I.localPhoto)(e.profile_image_url),alt:"",style:{width:24,height:24,borderRadius:"50%",objectFit:"cover",flexShrink:0,border:`1.5px solid ${i[e.tier]||"#555"}`},onError:e=>{e.target.style.display="none"}}):(0,t.jsx)("div",{style:{width:24,height:24,borderRadius:"50%",flexShrink:0,fontSize:10,fontWeight:700,background:i[e.tier]||"#555",color:"S"===e.tier?"#000":"#fff",display:"flex",alignItems:"center",justifyContent:"center"},children:e.name?.charAt(0)}),(0,t.jsxs)("div",{style:{flex:1,minWidth:0},children:[(0,t.jsx)("div",{style:{fontSize:12,fontWeight:600,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.name}),(0,t.jsx)("div",{style:{fontSize:9,color:"#666"},children:e.headline?.substring(0,35)})]}),(0,t.jsx)("span",{style:{fontSize:10,color:i[e.tier],fontWeight:700},children:e.tier})]},e.id))})]}),(0,t.jsxs)("h4",{style:{fontSize:13,fontWeight:600,color:"#FFD700",marginBottom:8},children:["Power Rankings (",X.length,")"]}),(0,t.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:3},children:(C={},z={},X.forEach(e=>{z[e.tier]=(z[e.tier]||0)+1}),X.map((e,n)=>{let r=n>0?X[n-1].tier:null,o=e.tier!==r;o&&(C[e.tier]=0),C[e.tier]=(C[e.tier]||0)+1;let l=C[e.tier];return(0,t.jsxs)("div",{children:[o&&(0,t.jsxs)("div",{style:{padding:"8px 10px",marginTop:8*(n>0),marginBottom:4,background:`${i[e.tier]||"#555"}15`,borderLeft:`3px solid ${i[e.tier]||"#555"}`,borderRadius:4,fontSize:11,fontWeight:700,color:i[e.tier]||"#888",display:"flex",justifyContent:"space-between"},children:[(0,t.jsx)("span",{children:{S:"S-Tier — Elite",A:"A-Tier — High Value",B:"B-Tier — Notable",C:"C-Tier — Standard",D:"D-Tier — Entry"}[e.tier]||e.tier}),(0,t.jsx)("span",{style:{fontWeight:400,opacity:.7},children:z[e.tier]||0})]}),(0,t.jsxs)("div",{onClick:()=>{u&&u(e),x&&x(e.id)},style:{padding:"6px 8px",background:"rgba(255,255,255,0.03)",borderRadius:6,borderLeft:`3px solid ${i[e.tier]||"#555"}`,cursor:"pointer",display:"flex",alignItems:"center",gap:8,transition:"background 0.15s"},onMouseEnter:e=>e.currentTarget.style.background="rgba(255,255,255,0.1)",onMouseLeave:e=>e.currentTarget.style.background="rgba(255,255,255,0.03)",children:[(0,t.jsxs)("span",{style:{color:"#555",fontSize:10,fontWeight:600,minWidth:22,textAlign:"right"},children:["#",l]}),(0,I.localPhoto)(e.profile_image_url)?(0,t.jsx)("img",{src:(0,I.localPhoto)(e.profile_image_url),alt:"",style:{width:28,height:28,borderRadius:"50%",objectFit:"cover",flexShrink:0,border:`1.5px solid ${i[e.tier]||"#555"}`},onError:e=>{e.target.style.display="none",e.target.nextSibling.style.display="flex"}}):null,(0,t.jsx)("div",{style:{width:28,height:28,borderRadius:"50%",flexShrink:0,background:i[e.tier]||"#555",display:(0,I.localPhoto)(e.profile_image_url)?"none":"flex",alignItems:"center",justifyContent:"center",fontSize:12,fontWeight:700,color:"S"===e.tier?"#000":"#fff"},children:e.name?.charAt(0)}),(0,t.jsxs)("div",{style:{minWidth:0,flex:1},children:[(0,t.jsx)("div",{style:{fontWeight:600,fontSize:11,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.name}),(0,t.jsx)("div",{style:{fontSize:9,color:"#666",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.headline?.substring(0,45)})]}),(0,t.jsxs)("div",{style:{textAlign:"right",flexShrink:0},children:[(0,t.jsx)("div",{style:{fontSize:10,fontWeight:700,color:i[e.tier]||"#555"},children:parseFloat(e.power_score).toFixed(1)}),(0,t.jsx)("div",{style:{fontSize:8,color:"#555"},children:e.tier})]})]})]},e.id)}))})]})}function t2({children:e,collapsed:r,onToggle:i}){let[o,l]=(0,n.useState)(!1);return((0,n.useEffect)(()=>{let e=()=>l(window.innerWidth<768);return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]),r)?(0,t.jsxs)("div",{onClick:i,style:{position:"fixed",right:16,top:140,zIndex:30,cursor:"pointer",display:"flex",alignItems:"center",flexDirection:"row-reverse",gap:0,height:36,borderRadius:18,background:"rgba(255,215,0,0.15)",border:"2px solid rgba(255,215,0,0.5)",color:"#FFD700",fontWeight:700,boxShadow:"0 0 12px rgba(255,215,0,0.3)",backdropFilter:"blur(8px)",WebkitBackdropFilter:"blur(8px)",overflow:"hidden",transition:"width 0.25s ease",width:36,padding:"0 10px"},onMouseEnter:e=>{e.currentTarget.style.width="120px"},onMouseLeave:e=>{e.currentTarget.style.width="36px"},children:[(0,t.jsx)("span",{style:{fontSize:18,flexShrink:0,width:16,textAlign:"center"},children:"‹"}),(0,t.jsx)("span",{style:{fontSize:11,fontWeight:600,whiteSpace:"nowrap",marginRight:6,opacity:.9},children:"Details"})]}):(0,t.jsxs)("div",{style:o?{position:"fixed",top:0,right:0,bottom:0,zIndex:100,width:"100vw",pointerEvents:"auto"}:{flexShrink:0,height:"100%"},children:[o&&(0,t.jsx)("div",{onClick:i,style:{position:"absolute",inset:0,background:"rgba(0,0,0,0.5)"}}),(0,t.jsx)("div",{style:{width:o?"80vw":320,minWidth:320*!o,maxWidth:o?300:320,height:"100%",borderLeft:"1px solid rgba(255,215,0,0.12)",padding:o?"12px 10px":"16px 16px",overflowY:"auto",overflowX:"hidden",background:o?"rgba(15,12,5,0.98)":"var(--sd-panel)",fontSize:13,backdropFilter:"var(--sd-panel-blur)",WebkitBackdropFilter:"var(--sd-panel-blur)",boxShadow:"inset 0 0 60px rgba(255,215,0,0.03), -4px 0 24px rgba(0,0,0,0.3)",marginLeft:o?"auto":0},children:e})]})}function t8({label:e,value:n}){return(0,t.jsxs)("div",{style:{background:"rgba(255,255,255,0.05)",padding:"10px 12px",borderRadius:8},children:[(0,t.jsx)("div",{style:{fontSize:10,color:"#888",marginBottom:2},children:e}),(0,t.jsx)("div",{style:{fontSize:18,fontWeight:700},children:n})]})}function t6(){return(0,t.jsx)("span",{style:{color:"#555",fontSize:16},children:"→"})}function t3({routes:e,selected:r,tierColors:i,onSelect:o}){let[l,s]=(0,n.useState)(!1),a=e.length,d=l?e:e.slice(0,4),c={display:"flex",alignItems:"center",gap:6,fontSize:13,flexWrap:"wrap"};return(0,t.jsxs)("div",{style:{background:"rgba(255,107,53,0.1)",border:"1px solid rgba(255,107,53,0.3)",borderRadius:8,padding:12,marginBottom:16},children:[(0,t.jsxs)("div",{style:{fontSize:10,color:"#FF6B35",fontWeight:600,marginBottom:8},children:["PATH TO THIS PERSON",a>1?` \xb7 ${a} WAYS IN`:""]}),(0,t.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:10},children:d.map((e,n)=>{if(!e.bridge)return(0,t.jsxs)("div",{title:"This route came from a scanned list whose connection record doesn’t match anyone in your 1st-degree list, so who introduces you can’t be named. The person is real, and still reachable.",style:{...c,color:"#888",fontStyle:"italic"},children:[(0,t.jsx)("span",{style:{fontWeight:700,fontStyle:"normal",color:"#fff"},children:"You"}),(0,t.jsx)(t6,{}),(0,t.jsx)("span",{children:"a connection we can’t name"}),(0,t.jsx)(t6,{}),(0,t.jsx)("span",{children:"them"})]},`unnamed-${e.id}`);let l=e.bridge,s=i[l.tier]||"#ccc",d=[[l.role,l.company].filter(Boolean).join(" @ "),l.tier?`${l.tier}-tier`:""].filter(Boolean).join(" · ");return(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{style:c,children:[(0,t.jsx)("span",{style:{fontWeight:700},children:"You"}),(0,t.jsx)(t6,{}),(0,t.jsxs)("button",{onClick:()=>o&&o(l),title:`Open ${l.name}`,style:{display:"inline-flex",alignItems:"center",gap:6,padding:0,border:"none",background:"none",cursor:"pointer",color:s,fontWeight:600,fontSize:13,textAlign:"left"},children:[(0,t.jsx)(e0,{person:l,size:18,tierColors:i}),l.name]}),(0,t.jsx)(t6,{}),(0,t.jsx)("span",{style:{color:"#FF6B35",fontWeight:600},children:r.name}),0===n&&a>1&&(0,t.jsx)("span",{style:{fontSize:9,fontWeight:700,color:"#FF6B35",padding:"1px 6px",borderRadius:8,background:"rgba(255,107,53,0.15)",whiteSpace:"nowrap"},children:"top-scored bridge"})]}),d&&(0,t.jsx)("div",{style:{fontSize:11,color:"#888",marginTop:3},children:d})]},e.id)})}),a>4&&(0,t.jsx)("button",{onClick:()=>s(e=>!e),style:{marginTop:10,padding:"4px 10px",borderRadius:6,cursor:"pointer",fontSize:11,fontWeight:600,border:"1px solid rgba(255,107,53,0.35)",background:"transparent",color:"#FF6B35"},children:l?"Show fewer":`Show all ${a}`})]})}function t4({selected:e,degree2:r}){let l=(0,o.default)(),[s,a]=(0,n.useState)(!1),[d,c]=(0,n.useState)(null),[h,p]=(0,n.useState)(void 0),g=r?.filter(t=>t.source_connection_id===e.id).length||0,u=g>0,f=l.running&&(0,i.scansCircleOf)(l,e),x=l.running&&!f?(0,i.busyReason)(l):null,y=l.finished.find(t=>(0,i.scansCircleOf)(t,e)),m=l.finished[0]?.startedAt??null;async function b(t){c(null),a(!0);let n=(0,i.notReadyMessage)(await (0,i.scraperStatus)().catch(()=>null));if(a(!1),n)return void c({text:n,offline:!0});try{await (0,i.beginScrape)(t,"resume"===t?{id:e.id}:{name:e.name,id:e.id})}catch(e){c({text:e.message||"Could not start the scan."})}}(0,n.useEffect)(()=>{let t=!0;return(0,i.resumePoint)(e.id).then(e=>{t&&p(e)},()=>{t&&p(null)}),()=>{t=!1}},[e.id,m]);let j=u||!!h,S=u?"#00ff88":"#9B59B6",w=!!x||s,v=e=>({flex:1,padding:"11px 8px",borderRadius:8,fontWeight:700,fontSize:e?13:12,cursor:w?"not-allowed":"pointer",opacity:w?.45:1,...e?{border:"none",background:"linear-gradient(135deg, #9B59B6, #3498DB)",color:"#fff"}:{border:`1px solid ${S}55`,background:`${S}14`,color:S}});return(0,t.jsxs)("div",{id:"scan-box",style:{background:u?"rgba(0,255,136,0.06)":"rgba(155,89,182,0.08)",border:`1px solid ${u?"rgba(0,255,136,0.2)":"rgba(155,89,182,0.3)"}`,borderRadius:10,padding:16,marginTop:16},children:[(0,t.jsx)("div",{style:{fontSize:10,color:S,fontWeight:700,letterSpacing:1,marginBottom:4,textAlign:"center"},children:u?"CLUSTER ACTIVE":"CREATE CLUSTER"}),(0,t.jsx)("div",{style:{fontSize:12,color:"#aaa",marginBottom:12,textAlign:"center"},children:u?`${g} connections mapped in Six Degrees`:(0,t.jsxs)(t.Fragment,{children:["Scan ",e.name,"'s connections to map their network"]})}),f?(0,t.jsx)(t9,{title:l.pending?"Starting…":`Scanning ${e.name}’s circle…`,log:l.log}):d?.offline?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{style:{padding:"10px",borderRadius:8,background:"rgba(255,80,80,0.1)",border:"1px solid rgba(255,80,80,0.3)",color:"#ff5050",fontSize:12,marginBottom:8,textAlign:"center"},children:"Scanner offline"}),(0,t.jsxs)("div",{style:{fontSize:10,color:"#888",textAlign:"center",marginBottom:8},children:[d.text," Open the ",(0,t.jsx)("strong",{children:"Scan"})," page to finish setting the scanner up."]}),(0,t.jsx)("button",{onClick:()=>c(null),style:{width:"100%",padding:"10px",borderRadius:8,border:"none",cursor:"pointer",background:"rgba(255,255,255,0.1)",color:"#aaa",fontWeight:600,fontSize:12},children:"Retry"})]}):(0,t.jsxs)(t.Fragment,{children:[y&&(0,t.jsx)(ne,{job:y}),(0,t.jsxs)("div",{style:{display:"flex",gap:8},children:[h&&(0,t.jsxs)("button",{onClick:()=>b("resume"),disabled:w,style:v(!0),children:["Resume from page ",h.nextPage]}),(0,t.jsx)("button",{onClick:()=>b("bridge"),disabled:w,style:v(!h&&!u),children:j?"Rescan from the start":(0,t.jsxs)(t.Fragment,{children:["Scan ",e.name,"'s Network"]})})]}),h&&(0,t.jsxs)("div",{style:{fontSize:10,color:"#888",marginTop:8,lineHeight:1.45,textAlign:"center"},children:["Read to page ",h.pagesRead," so far. Resume carries on from page ",h.nextPage,". LinkedIn lists their connections in its own order, not by date, so Rescan reads them all again from page 1."]}),u&&null===h&&(0,t.jsx)("div",{style:{fontSize:10,color:"#888",marginTop:8,lineHeight:1.45,textAlign:"center"},children:"Their whole list has been read. LinkedIn doesn't date other people's connections, so a rescan reads it all again to find anyone new."}),x&&(0,t.jsxs)("div",{style:{fontSize:10,color:"#bbb",marginTop:8,textAlign:"center"},children:[x,". One scan at a time: this one can start when it finishes."]}),d&&(0,t.jsx)("div",{style:{fontSize:11,color:"#ff8080",marginTop:8,textAlign:"center"},children:d.text})]})]})}function t7({csvSource:e,style:n}){return(0,t.jsx)("div",{style:{padding:"10px 12px",borderRadius:8,fontSize:11,color:"#999",lineHeight:1.5,textAlign:"center",background:"rgba(255,255,255,0.03)",border:"1px solid rgba(255,255,255,0.08)",...n},children:"sample"===e?"Scanning needs your own network: everyone in the sample is invented.":"Scanning needs your own network: a CSV import lives only in this window. Close it (× at the top) and open Scan."})}function t9({title:e,log:n,small:r=!1}){return(0,t.jsxs)("div",{style:{padding:"10px",borderRadius:8,background:"rgba(155,89,182,0.1)",border:"1px solid rgba(155,89,182,0.3)"},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:6,marginBottom:4},children:[(0,t.jsx)("style",{children:"@keyframes scanlogPulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.7); } } @media (prefers-reduced-motion: reduce) { .scanlog-dot { animation: none !important; } }"}),(0,t.jsx)("div",{className:"scanlog-dot",style:{width:r?6:8,height:r?6:8,borderRadius:"50%",background:"#9B59B6",animation:"scanlogPulse 1s ease-in-out infinite"}}),(0,t.jsx)("span",{style:{fontSize:11,fontWeight:600,color:"#9B59B6"},children:e})]}),(0,t.jsx)("div",{style:{fontFamily:"monospace",fontSize:r?9:10,color:"#888",maxHeight:r?80:100,overflow:"auto"},children:n.slice(-40).map((e,n)=>(0,t.jsx)("div",{children:e},n))})]})}function ne({job:e,who:n=null}){let r=0===e.exitCode,i=!r&&Array.isArray(e.failure)&&e.failure.length?e.failure[e.failure.length-1]:null;return(0,t.jsx)("div",{style:{padding:"8px 10px",borderRadius:8,marginBottom:10,fontSize:11,textAlign:"center",lineHeight:1.4,background:r?"rgba(0,255,136,0.08)":"rgba(255,80,80,0.08)",border:`1px solid ${r?"rgba(0,255,136,0.25)":"rgba(255,80,80,0.25)"}`,color:r?"#00ff88":"#ff8080"},children:r?`${n?`${n}’s circle`:"The scan"} finished. What it found is on the map.`:`${n?`${n}’s scan`:"The scan"} stopped before the end${i?`: ${i}`:"."}`})}function nt({cs:e,rank:r,tierColors:i,onSelect:o}){let[l,s]=(0,n.useState)(!1);return(0,t.jsxs)("div",{style:{background:"rgba(255,255,255,0.05)",borderRadius:6,borderLeft:`3px solid ${i[e.bridge.tier]||"#FF6B35"}`,overflow:"hidden"},children:[(0,t.jsxs)("div",{style:{padding:"10px 10px"},children:[(0,t.jsxs)("div",{onClick:()=>o&&o(e.bridge),style:{cursor:"pointer",display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:4},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8},children:[(0,I.localPhoto)(e.bridge.profile_image_url)?(0,t.jsx)("img",{src:(0,I.localPhoto)(e.bridge.profile_image_url),alt:"",style:{width:28,height:28,borderRadius:"50%",objectFit:"cover",flexShrink:0,border:`1.5px solid ${i[e.bridge.tier]||"#555"}`},onError:e=>{e.target.style.display="none"}}):(0,t.jsx)("div",{style:{width:28,height:28,borderRadius:"50%",flexShrink:0,fontSize:11,fontWeight:700,background:i[e.bridge.tier]||"#555",color:"S"===e.bridge.tier?"#000":"#fff",display:"flex",alignItems:"center",justifyContent:"center"},children:e.bridge.name?.charAt(0)}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{style:{fontWeight:600,fontSize:12},children:[(0,t.jsxs)("span",{style:{color:"#555",marginRight:4},children:["#",r]}),e.bridge.name]}),(0,t.jsx)("div",{style:{fontSize:9,color:"#666"},children:e.bridge.headline?.substring(0,40)})]})]}),(0,t.jsx)("span",{style:{fontSize:10,fontWeight:700,padding:"2px 6px",borderRadius:4,background:i[e.bridge.tier],color:"S"===e.bridge.tier?"#000":"#fff"},children:e.bridge.tier})]}),(0,t.jsxs)("div",{style:{display:"flex",gap:6,marginTop:6,fontSize:10},children:[e.sCount>0&&(0,t.jsxs)("span",{style:{color:"#FFD700",fontWeight:600},children:[e.sCount,"S",e.sAvgPower>0?` (${e.sAvgPower.toFixed(1)})`:""]}),e.aCount>0&&(0,t.jsxs)("span",{style:{color:"#9B59B6",fontWeight:600},children:[e.aCount,"A"]}),e.bCount>0&&(0,t.jsxs)("span",{style:{color:"#3498DB"},children:[e.bCount,"B"]}),e.risingCount>0&&(0,t.jsxs)("span",{style:{color:"#2ECC71"},children:[e.risingCount," rising"]}),(0,t.jsxs)("span",{style:{color:"#555"},children:[e.members," total"]})]}),(0,t.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginTop:4,fontSize:10},children:[(0,t.jsxs)("span",{style:{color:"#666"},children:["Elite: ",(100*e.elitePct).toFixed(0),"% · Avg: ",e.avgPower.toFixed(1)]}),(0,t.jsx)("span",{style:{color:"#FF6B35",fontWeight:700},children:e.clusterValue.toFixed(1)})]}),(e.sTier.length>0||e.aTier.length>0)&&(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:4,marginTop:8},children:[[...e.sTier,...e.aTier].slice(0,4).map(e=>(0,I.localPhoto)(e.profile_image_url)?(0,t.jsx)("img",{src:(0,I.localPhoto)(e.profile_image_url),alt:e.name,style:{width:22,height:22,borderRadius:"50%",objectFit:"cover",border:`1.5px solid ${i[e.tier]||"#555"}`},onError:e=>{e.target.style.display="none"},title:e.name},e.id):(0,t.jsx)("div",{style:{width:22,height:22,borderRadius:"50%",fontSize:9,fontWeight:700,background:i[e.tier]||"#555",color:"S"===e.tier?"#000":"#fff",display:"flex",alignItems:"center",justifyContent:"center"},title:e.name,children:e.name?.charAt(0)},e.id)),e.sCount+e.aCount>4&&(0,t.jsxs)("span",{style:{fontSize:9,color:"#666"},children:["+",e.sCount+e.aCount-4," more"]})]}),(0,t.jsxs)("button",{onClick:()=>s(!l),style:{marginTop:6,background:"none",border:"none",color:"#888",fontSize:10,cursor:"pointer",padding:0,display:"flex",alignItems:"center",gap:4},children:[(0,t.jsx)("span",{style:{fontSize:12},children:l?"▾":"▸"}),l?"Hide members":`View all ${e.members} members`]})]}),l&&(0,t.jsx)("div",{style:{borderTop:"1px solid rgba(255,255,255,0.06)",padding:"6px 10px 10px",maxHeight:250,overflowY:"auto"},children:e.topMembers.map(e=>(0,t.jsxs)("div",{onClick:()=>o&&o(e),style:{display:"flex",alignItems:"center",gap:6,padding:"4px 2px",cursor:"pointer",borderRadius:4},onMouseEnter:e=>e.currentTarget.style.background="rgba(255,255,255,0.06)",onMouseLeave:e=>e.currentTarget.style.background="transparent",children:[(0,I.localPhoto)(e.profile_image_url)?(0,t.jsx)("img",{src:(0,I.localPhoto)(e.profile_image_url),alt:"",style:{width:20,height:20,borderRadius:"50%",objectFit:"cover",flexShrink:0,border:`1px solid ${i[e.tier]||"#555"}`},onError:e=>{e.target.style.display="none",e.target.nextSibling.style.display="flex"}}):null,(0,t.jsx)("div",{style:{width:20,height:20,borderRadius:"50%",flexShrink:0,fontSize:8,fontWeight:700,background:i[e.tier]||"#555",color:"S"===e.tier?"#000":"#fff",display:(0,I.localPhoto)(e.profile_image_url)?"none":"flex",alignItems:"center",justifyContent:"center"},children:e.name?.charAt(0)}),(0,t.jsx)("div",{style:{minWidth:0,flex:1},children:(0,t.jsx)("div",{style:{fontSize:10,fontWeight:600,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.name})}),(0,t.jsxs)("span",{style:{fontSize:9,color:i[e.tier]||"#555",fontWeight:600,flexShrink:0},children:[e.tier," ",parseFloat(e.power_score).toFixed(1)]})]},e.id))})]})}function nn({connections:e,degree2:r,scanNotes:l,tierColors:s}){let a=(0,o.default)(),[d,c]=(0,n.useState)(!1),h=(0,n.useMemo)(()=>(0,O.reachIndex)(e,r,l),[e,r,l]),p=(0,n.useMemo)(()=>(0,O.readyToScan)(e,h),[e,h]),g=(0,n.useMemo)(()=>e.filter(e=>"hidden"===(0,O.reachState)(e,h)),[e,h]),u=(0,n.useMemo)(()=>e.filter(e=>null===(0,O.reachState)(e,h)&&"todo"===(0,O.circleState)(e,h)).length,[e,h]),f=(0,n.useMemo)(()=>new Map(e.map(e=>[e.id,e])),[e]),x=(0,O.circleScanCost)(),y=a.running&&(0,i.isCircleScan)(a),m=a.running&&!y?(0,i.busyReason)(a):null,b=a.finished.find(i.isCircleScan),j=d?p:p.slice(0,5);return(0,t.jsxs)("div",{style:{background:"rgba(0,255,136,0.05)",border:"1px solid rgba(0,255,136,0.2)",borderRadius:10,padding:14,marginBottom:16},children:[(0,t.jsxs)("div",{style:{fontSize:12,fontWeight:800,color:"#00ff88",marginBottom:4},children:["Ready to scan (",p.length,")"]}),(0,t.jsx)("div",{style:{fontSize:10.5,color:"#999",lineHeight:1.5,marginBottom:10},children:"People you added through a circle whose own circle isn't scanned yet. Scanning one brings in who they know: 3rd degree, through the circle you found them in."}),y?(0,t.jsx)("div",{style:{marginBottom:10},children:(0,t.jsx)(t9,{small:!0,title:a.pending?"Starting…":`Scanning ${a.target?.name||"a circle"}…`,log:a.log})}):b&&(0,t.jsx)(ne,{job:b,who:b.target?.name}),0===p.length?(0,t.jsxs)("div",{style:{fontSize:11,color:"#aaa",lineHeight:1.5},children:["Nobody yet. When someone you asked from a circle accepts, ↻ ",(0,t.jsx)("b",{children:"Check for new"})," brings them into your connections, and they show here."]}):(0,t.jsxs)("div",{role:"list",style:{display:"flex",flexDirection:"column",gap:6},children:[j.map(e=>{let n=y&&(0,i.scansCircleOf)(a,e),r=f.get(e.unlocked_from_bridge_id)?.name||e.unlocked_from_name;return(0,t.jsxs)(X.default,{role:"listitem",href:`/setup?scan=${encodeURIComponent(e.id)}`,"aria-label":`Scan ${e.name}’s circle: opens the Scan page to confirm`,style:{display:"flex",alignItems:"center",gap:8,padding:"8px 10px",borderRadius:8,textDecoration:"none",color:"#fff",background:"rgba(255,255,255,0.04)",border:"1px solid rgba(0,255,136,0.18)"},children:[(0,t.jsx)("span",{style:{width:8,height:8,borderRadius:"50%",flexShrink:0,background:s[e.tier]||"#888",boxShadow:"0 0 0 2px rgba(0,255,136,0.45)"}}),(0,t.jsxs)("span",{style:{flex:1,minWidth:0},children:[(0,t.jsx)("span",{style:{fontSize:12,fontWeight:700},children:e.name}),(0,t.jsx)("span",{style:{fontSize:10,color:s[e.tier]||"#888",fontWeight:700,marginLeft:6},children:e.tier}),r&&(0,t.jsxs)("span",{style:{display:"block",fontSize:10,color:"#888",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:["was in ",String(r||"").trim().split(/\s+/)[0],"'s circle"]})]}),(0,t.jsx)("span",{style:{fontSize:10.5,fontWeight:700,color:"#00ff88",whiteSpace:"nowrap"},children:n?"Scanning…":"Scan… →"})]},e.id)}),p.length>5&&(0,t.jsx)("button",{type:"button",onClick:()=>c(e=>!e),style:{background:"none",border:"none",color:"#888",fontSize:10.5,fontWeight:600,cursor:"pointer",padding:"2px 0",textAlign:"left"},children:d?"Show fewer":`Show all ${p.length}`})]}),p.length>0&&(0,t.jsxs)("div",{style:{fontSize:10,color:"#888",lineHeight:1.5,marginTop:8},children:["Each scan: ",x.profileViews," profile view, then one LinkedIn search for every page of their list, up to ",x.searches," pages (about ",x.minutes," min for a whole list). Nothing starts until you confirm it on the Scan page."]}),g.length>0&&(0,t.jsxs)("div",{style:{marginTop:10,fontSize:10.5,color:"#777",lineHeight:1.6},children:[g.slice(0,3).map(e=>(0,t.jsxs)("div",{style:{opacity:.7},children:[(0,t.jsx)("span",{"aria-hidden":"true",children:"🔒"})," ",e.name," ",(0,t.jsx)("span",{style:{color:"#666"},children:"· their list is hidden"})]},e.id)),g.length>3&&(0,t.jsxs)("div",{style:{opacity:.7},children:["🔒 and ",g.length-3," more with hidden lists"]})]}),u>0&&(0,t.jsxs)("div",{style:{fontSize:10.5,color:"#888",lineHeight:1.5,marginTop:10},children:[u.toLocaleString("en-US")," of your other connections aren't scanned yet."," ",(0,t.jsx)(X.default,{href:"/setup",style:{color:"#3498DB",textDecoration:"none"},children:"Map them in batches on the Scan page →"})]}),m&&(0,t.jsxs)("div",{style:{fontSize:10,color:"#bbb",marginTop:8},children:[m,". One scan at a time."]})]})}var nr=e.i(82044),ni=e.i(2776),no=e.i(64745);function nl(){let[e,r]=(0,n.useState)(!1),[i,o]=(0,n.useState)("");async function l(){r(!0),o("");try{await (0,no.loadSampleIntoSession)(),window.location.reload()}catch(e){o(e.message||"Could not load the sample network."),r(!1)}}return(0,t.jsx)("div",{style:{position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center",padding:24,overflowY:"auto"},children:(0,t.jsxs)("div",{style:{maxWidth:520,width:"100%",textAlign:"center"},children:[(0,t.jsx)("div",{style:{width:68,height:68,borderRadius:"50%",margin:"0 auto 22px",border:"2px solid rgba(255,215,0,0.35)",display:"flex",alignItems:"center",justifyContent:"center",fontSize:26},children:"✦"}),(0,t.jsx)("h2",{style:{fontSize:28,fontWeight:800,margin:"0 0 10px",background:"linear-gradient(135deg, #FFD700, #9B59B6, #3498DB)",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent"},children:"Welcome to Six Degrees"}),(0,t.jsx)("p",{style:{color:"rgba(255,255,255,0.5)",fontSize:14.5,lineHeight:1.7,margin:"0 0 28px"},children:"Your network, drawn as a galaxy. Everything stays on this computer. Pick how to bring it in — you can switch later."}),(0,t.jsx)(ns,{href:"/setup",primary:!0,badge:"Recommended",title:"Scan my LinkedIn",body:"A few guided steps: set up the scanner, sign into LinkedIn yourself, and watch your galaxy fill in. The only way to see who your connections know."}),(0,t.jsx)(ns,{href:"/import",title:"Import my LinkedIn CSV",body:"LinkedIn’s official export, read in your browser. Takes about ten minutes to arrive by email. Shows the people you know, not who they know."}),(0,t.jsx)(ns,{onClick:l,disabled:e,title:e?"Loading…":"Explore a sample network",body:"150 invented connections and the 598 people they know. Every view except Outlink and Scan, which need your own scan. Nothing about you is used."}),i&&(0,t.jsx)("div",{style:{color:"#ff6b6b",fontSize:13,marginTop:18},children:i}),(0,t.jsxs)("p",{style:{color:"rgba(255,255,255,0.45)",fontSize:13,lineHeight:1.6,margin:"18px 0 0"},children:["Moving from another computer?"," ",(0,t.jsx)("a",{href:"/settings#data",style:{color:"rgba(255,255,255,0.75)"},children:"Import your saved copy in Settings → Your data."})]})]})})}function ns({href:e,onClick:n,disabled:r,primary:i,badge:o,title:l,body:s}){let a={display:"block",width:"100%",boxSizing:"border-box",textAlign:"left",padding:"16px 18px",borderRadius:12,marginBottom:12,textDecoration:"none",cursor:r?"default":"pointer",font:"inherit",border:i?"1px solid rgba(255,215,0,0.45)":"1px solid rgba(255,255,255,0.12)",background:i?"linear-gradient(135deg, rgba(255,215,0,0.12), rgba(155,89,182,0.14))":"rgba(255,255,255,0.03)",color:"#fff"},d=(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10,marginBottom:5},children:[(0,t.jsx)("span",{style:{fontSize:15.5,fontWeight:750},children:l}),o&&(0,t.jsx)("span",{style:{fontSize:10.5,fontWeight:800,letterSpacing:.5,textTransform:"uppercase",padding:"3px 8px",borderRadius:20,background:"#FFD700",color:"#0a0a1a"},children:o}),(0,t.jsx)("span",{style:{marginLeft:"auto",color:"rgba(255,255,255,0.4)"},children:"→"})]}),(0,t.jsx)("div",{style:{fontSize:13,color:"rgba(255,255,255,0.5)",lineHeight:1.6},children:s})]});return e?(0,t.jsx)("a",{href:e,style:a,children:d}):(0,t.jsx)("button",{onClick:n,disabled:r,style:a,children:d})}var na=e.i(7837),nd=e.i(33821),nc=e.i(98658);let nh=[],np=e=>!!e&&!["install","setup","login"].includes(e.action);function ng(e,t){let n={};e.forEach(e=>{n[e.tier]=(n[e.tier]||0)+1});let r={};return t.forEach(e=>{r[e.tier]=(r[e.tier]||0)+1}),{total:e.length,tiers:n,d2Total:t.length,d2Tiers:r}}function nu(){let e,{userId:o,userName:d}=(0,tq.useUser)(),c=function(){let[e,t]=(0,n.useState)(!1);return(0,n.useEffect)(()=>{let e=()=>t(window.innerWidth<768);return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]),e}(),[h,p]=(0,n.useState)([]),[g,u]=(0,n.useState)([]),[f,x]=(0,n.useState)([]),[y,m]=(0,n.useState)({network:t$.NETWORK_GRID,degrees:t$.DEGREES_GRID}),[b,j]=(0,n.useState)(null),S=(0,n.useRef)(null),w=(0,r.useSearchParams)(),v=w.get("chain"),k=["network","degrees","separation"].includes(w.get("mode"))?w.get("mode"):null,[$,C]=(0,n.useState)(v),[z,_]=(0,n.useState)(null),[M,R]=(0,n.useState)(()=>$?"degrees":k||"network"),[W,T]=(0,n.useState)(!0),[F,I]=(0,n.useState)(null),[E,O]=(0,n.useState)(!0),[B,L]=(0,n.useState)(!0),[A,N]=(0,n.useState)(()=>$||"degrees"===k?"chain":"separation"===k?"separation":"galaxy"),[H,q]=(0,n.useState)(null),Y=w.get("note"),U=(0,n.useCallback)(e=>{q(e),O(!1)},[]),[V,G]=(0,n.useState)(!1),[K,Z]=(0,n.useState)("csv"),[J,Q]=(0,n.useState)(i.NO_SCAN_NOTES),ee=(0,n.useRef)(""),et=(0,s.requestCount)((0,l.default)());(0,n.useEffect)(()=>{o&&(e(),no.IS_DEMO||(0,na.hasCsvNetwork)()||(0,i.loadScanNotes)().then(Q));async function e(){let e=(0,na.hasCsvNetwork)()?(0,na.loadCsvNetwork)():null;e&&(G(!0),Z(e.source||"csv"));let{degree1:t,degree2:n,degree3:r=[]}=no.IS_DEMO?await (0,no.loadDemoNetwork)():e||await (async()=>await (0,a.loadNetwork)(o))();p(t),u(n),x(r||[]),ee.current=nf(t,n),I(ng(t,n)),T(!1)}},[o]);let en=(0,n.useCallback)(async()=>{if(!(no.IS_DEMO||(0,na.hasCsvNetwork)())&&o)try{let[{degree1:e,degree2:t,degree3:n=[]},r]=await Promise.all([(0,a.loadNetwork)(o),(0,i.loadScanNotes)()]);Q(e=>JSON.stringify(e)===JSON.stringify(r)?e:r),x(e=>e.length===(n||[]).length?e:n||[]);let l=nf(e,t);if(l===ee.current)return;ee.current=l,p(e),u(t),I(ng(e,t))}catch{}},[o]),[er,ei]=(0,n.useState)(null),eo=(0,n.useCallback)(e=>{ei({...e,id:`${e.query}|${e.tier||""}|${e.rarity||""}|${Math.random()}`}),R("separation"),N("separation")},[]),el=(0,n.useCallback)(e=>{C(e),R("degrees"),N("chain")},[]),es=(0,n.useCallback)(()=>{C(null);try{window.history.replaceState(null,"",window.location.pathname)}catch{}},[]),ea="degrees"===M||"separation"===M,ed=(0,n.useMemo)(()=>(function(e=[],t=[],n=[]){let r=new Set,i=(e,t)=>{let n=[];for(let i of e||[]){let e=(0,P.keyFor)(i);r.has(e)||(r.add(e),n.push(i.degree===t?i:{...i,degree:t}))}return n};return{1:i(e,1),2:i(t,2),3:i(n,3)}})(h,g,f),[h,g,f]),ec=ea?y.degrees:y.network,eh="separation"===M,ep=(0,n.useMemo)(()=>eh?h:ea?h.filter(e=>(0,t$.shows)(ec,e.tier,1)):[1,2,3].flatMap(e=>(ed[e]||[]).filter(t=>(0,t$.shows)(ec,t.tier,e))),[eh,ea,h,ed,ec]),eg=(0,n.useMemo)(()=>new Map(h.map(e=>[e.id,e])),[h]),eu=(0,n.useMemo)(()=>(0,nc.networkLevel)(h,g),[h,g]),ef=(0,n.useMemo)(()=>new Set(g.map(e=>e.source_connection_id).filter(Boolean)),[g]),ex=(0,n.useMemo)(()=>ea?eh?g.filter(e=>(0,t$.shows)(ec,e.tier,2)):g.filter(e=>(0,t$.shows)(ec,e.tier,2)&&(0,t$.shows)(ec,eg.get(e.source_connection_id)?.tier,1)):nh,[ea,eh,ec,eg,g]),ey=(0,n.useMemo)(()=>(0,t$.gridCounts)(eh?{2:ed[2]}:ea?{1:h.filter(e=>ef.has(e.id)),2:ed[2]}:ed),[eh,ea,h,ef,ed]),em=(0,n.useCallback)(e=>{j(e),e&&(O(!1),q(null))},[]),eb=(e=tw[A])&&e.modes.includes(M)?{key:A,...e}:tk(M)[0]??{key:"list",...tw.list},ej=h.length>0;if((0,n.useEffect)(()=>{if(ej)return(0,eJ.setNotchTabs)({items:tk(M).map(e=>({key:e.key,label:e.label,icon:e.icon,title:e.desc})),current:eb.key,onPick:N}),()=>(0,eJ.setNotchTabs)(null)},[M,eb.key,ej]),W)return(0,t.jsxs)("div",{style:{minHeight:"100vh",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",background:"var(--sd-page)",color:"#fff"},children:[(0,t.jsx)("div",{style:{fontSize:24,fontWeight:700},children:"Loading Six Degrees…"}),(0,t.jsx)("div",{style:{fontSize:14,color:"#888",marginTop:8},children:"Mapping your LinkedIn network"})]});let eS=!no.IS_DEMO&&!V;return(0,t.jsxs)("div",{"data-map":!0,style:{height:"100vh",overflow:"hidden",background:"var(--sd-page)",color:"#fff",fontFamily:"var(--sd-font)"},children:[(0,t.jsx)(nd.default,{active:M,isMobile:c,csvMode:V,onMode:e=>{R(e),j(null),N("network"===e?"galaxy":"degrees"===e?"chain":"separation")},level:eu,onOpenNote:U,openNoteId:Y,chips:V&&(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:6,marginLeft:c?4:10,padding:c?"4px 8px":"5px 10px",borderRadius:999,background:"rgba(255,255,255,0.05)",border:"1px solid rgba(255,255,255,0.12)"},children:[(0,t.jsx)("span",{style:{width:6,height:6,borderRadius:"50%",background:"sample"===K?"#9B59B6":"#2ecc71"}}),(0,t.jsx)("span",{style:{fontSize:c?10:12,color:"rgba(255,255,255,0.65)",whiteSpace:"nowrap"},children:"sample"===K?"Sample network":"Your CSV"}),(0,t.jsx)("button",{onClick:()=>{(0,na.clearCsvNetwork)(),window.location.href="/"},title:"sample"===K?"Leave the sample network":"Clear this import",style:{border:"none",background:"transparent",cursor:"pointer",color:"#888",fontSize:c?13:15,lineHeight:1,padding:"0 0 0 2px"},children:"×"})]}),children:ea&&!V&&et>0&&(0,t.jsxs)(X.default,{href:"/queue",style:{padding:"5px 12px",borderRadius:16,fontSize:12,fontWeight:600,textDecoration:"none",background:"rgba(255,107,53,0.12)",color:"#FF6B35",border:"1px solid rgba(255,107,53,0.25)",display:"inline-flex",alignItems:"center",gap:5},children:[(0,t.jsx)("span",{style:{fontSize:10},children:"⏳"}),et," Pending"]})}),(0,t.jsxs)("div",{style:{display:"flex",height:c?"calc(100vh - 70px)":"calc(100vh - 130px)",position:"relative"},children:[(0,t.jsx)(nr.default,{collapsed:B,onToggle:()=>L(!B),mode:eh?"separation":ea?"degrees":"network",visualMode:eb.key,grid:ec,gridCounts:ey,onGridChange:e=>m(t=>({...t,[ea?"degrees":"network"]:e}))}),(()=>{if(0===h.length)return(0,t.jsx)(nl,{});if(ea&&0===g.length)return(0,t.jsx)("div",{style:{position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center",padding:24,textAlign:"center"},children:(0,t.jsxs)("div",{style:{maxWidth:440},children:[(0,t.jsx)("div",{style:{fontSize:40,marginBottom:16,opacity:.5},children:"🔗"}),(0,t.jsx)("h2",{style:{fontSize:22,fontWeight:800,margin:"0 0 12px",color:"#fff"},children:"Degrees need 2nd-degree data"}),(0,t.jsxs)("p",{style:{color:"rgba(255,255,255,0.45)",fontSize:14,lineHeight:1.7,margin:"0 0 20px"},children:["This view maps who ",(0,t.jsx)("em",{children:"your connections"})," ","know — the people you haven’t met yet. LinkedIn’s CSV export only covers your own 1st-degree list, so there are no circles to open here."]}),(0,t.jsxs)("p",{style:{color:"#666",fontSize:13,lineHeight:1.7,margin:0},children:["The local scanner maps those circles (and captures real photos)."," ",(0,t.jsx)(X.default,{href:"/setup",style:{color:"#3498DB",textDecoration:"none"},children:"Set up scanning →"})]})]})});let e=eb.component,n={connections:ep,degree2:eb.allDegree2?g:ex,onSelect:em,mode:M,userName:d,userImage:null,selectedId:b?.id??null,tierColors:D.TIER_COLORS,focusNodeRef:S,fullDegree1:h,fullDegree2:g,scanNotes:J,canScan:eS,chainOpen:$,onChainOpened:es,onCircle:_,preset:er};return(0,t.jsx)(e,{...n})})(),(0,t.jsx)(t5,{selected:b,stats:F,tierColors:D.TIER_COLORS,connections:h,degree2:g,mode:ea?"degrees":"network",collapsed:E,onToggle:()=>O(!E),onSelect:e=>{j(e||null)},onSwitchMode:e=>{R(e)},note:H,onCloseNote:()=>q(null),circle:"chain"===eb.key?z:null,onOpenCircle:el,onShowInSeparation:eo,onFocusNode:e=>{S.current&&S.current(e)},csvSource:no.IS_DEMO?"sample":V?K:null,scanNotes:J,canScan:eS}),eS&&(0,t.jsx)(nx,{onChange:en,live:"chain"===eb.key})]})]})}function nf(e,t){let n=0x811c9dc5,r=e=>{for(let t=0;t<e.length;t++)n=Math.imul(n^e.charCodeAt(t),0x1000193)};for(let n of[...e,...t])r(`${n.id}|${n.degree}|${n.source_connection_id??""}|${n.unlocked_from_bridge_id??""}|${n.tier}|${n.power_score}|${n.unlock_status??""}|${n.profile_image_url??""};`);return`${e.length}:${t.length}:${n>>>0}`}function nx({onChange:e,live:t}){let r=(0,o.default)(),l=r.finished.find(np)?.startedAt??null,s=t&&r.running&&(0,i.isCircleScan)(r);return(0,n.useEffect)(()=>{null!=l&&e()},[l,e]),(0,n.useEffect)(()=>{if(!s)return;let t=setInterval(e,2e4);return()=>clearInterval(t)},[s,e]),null}e.s(["default",0,function(){return(0,t.jsx)(ni.default,{children:(0,t.jsx)(n.Suspense,{children:(0,t.jsx)(nu,{})})})}],81694)}]);