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
@@ -1,3 +1,3 @@
1
- module.exports=[54209,a=>{"use strict";var b=a.i(87924),c=a.i(72131),d=a.i(38246),e=a.i(36839),f=a.i(16874);function g(){let[a,d]=(0,c.useState)(null);return((0,c.useEffect)(()=>{fetch("/api/update").then(a=>a.json()).then(d).catch(()=>{})},[]),a)?a.installed?(0,b.jsx)(k,{local:a}):(0,b.jsx)(i,{local:a}):null}async function h(a){let b=await fetch("/api/update",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)}),c=await b.json().catch(()=>({}));return{ok:b.ok,d:c}}function i({local:a}){let[d,e]=(0,c.useState)(null),[g,j]=(0,c.useState)(null),[k,l]=(0,c.useState)(null),[m,n]=(0,c.useState)(null);async function o(a){j(a),l(null);try{let{ok:b,d:c}=await h({action:a});if(!b){l(c.error||"Something went wrong."),c.dirty&&e({dirty:c.dirty});return}"check"===a?e(c):(n(c),e(null))}catch(a){l(a.message)}finally{j(null)}}return(0,c.useEffect)(()=>{"updates"===new URLSearchParams(window.location.search).get("check")&&(document.getElementById("updates")?.scrollIntoView({block:"center"}),o("check"),window.history.replaceState(null,"",window.location.pathname))},[]),(0,b.jsxs)(f.Section,{id:"updates",title:"Updates",children:[m?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)(f.Body,{children:["Updated to ",(0,b.jsx)(f.Mono,{children:m.sha})," — “",m.subject,"”."]}),(0,b.jsx)(f.Body,{style:{color:m.needsRestart?"#FFD700":void 0},children:m.needsRestart?"Stop the app in your terminal and start it again — this update changed how it starts.":"The page will pick up most changes on its own. Restart the app if anything looks odd."})]}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)(f.Body,{children:["You are on ",(0,b.jsx)(f.Mono,{children:a.sha})," — “",a.subject,"”."]}),d&&0===d.behind&&(0,b.jsx)(f.Status,{tone:"ok",children:"You’re up to date."}),d&&d.behind>0&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)(f.Body,{style:{color:"#00ff88"},children:[d.behind," update",1===d.behind?"":"s"," available."]}),(0,b.jsx)("pre",{style:q,children:d.commits.join("\n")})]}),d?.dirty?.length>0&&(0,b.jsxs)(f.Body,{children:["Changed files here:"," ",(0,b.jsx)(f.Mono,{children:d.dirty.join(", ")}),". Commit or discard them first — this will not throw away your work."]}),(0,b.jsxs)(p,{children:[(0,b.jsx)(f.Btn,{onClick:()=>o("check"),disabled:!!g,children:"check"===g?"Checking…":"Check for updates"}),d?.behind>0&&(0,b.jsx)(f.Btn,{onClick:()=>o("pull"),disabled:!!g,primary:!0,children:"pull"===g?"Updating…":`Install ${d.behind} update${1===d.behind?"":"s"}`})]})]}),k&&(0,b.jsx)(f.Body,{style:{color:"#ff7676"},children:k}),(0,b.jsxs)(f.Body,{style:{fontSize:12,color:"#667",marginTop:12},children:["Nothing is checked automatically and nothing about you is sent — this runs the same ",(0,b.jsx)(f.Mono,{children:"git fetch"})," and ",(0,b.jsx)(f.Mono,{children:"git pull"})," you would type yourself."]})]})}let j=["checking","downloading","verifying","preparing","restarting"];function k({local:a}){let d="mac-app"===a.kind,[e,g]=(0,c.useState)(!1),[i,r]=(0,c.useState)(null),[s,t]=(0,c.useState)(null),[u,v]=(0,c.useState)(!1),[w,x]=(0,c.useState)(null),[y,z]=(0,c.useState)(a.job||null),[A,B]=(0,c.useState)(!1),[C,D]=(0,c.useState)(null),[E,F]=(0,c.useState)(null),[G,H]=(0,c.useState)(void 0),[I,J]=(0,c.useState)(0),[K,L]=(0,c.useState)(!1),M=!!(y&&j.includes(y.phase)),N=M&&("restarting"===y.phase||I>0);async function O(){g(!0),r(null),t(null),D(null),F(null),H(void 0),z(a=>a&&j.includes(a.phase)?a:null);try{let{ok:a,d:b}=await h({action:"check-release"});a?(r(b),x(new Date)):t(b.error||"Could not check.")}catch(a){t(a.message)}finally{g(!1)}}async function P(){B(!0),D(null),F(null),H(void 0),J(0),L(!1);try{let{ok:a,d:b}=await h({action:"install-release"});b.job&&z(b.job),!a&&(D(b.error||"The update could not start."),F(b.refusal||null),"fallback"in b&&H(b.fallback))}catch(a){D(a.message)}finally{B(!1)}}async function Q(){try{let{d:a}=await h({action:"cancel-install"});a.job&&z(a.job)}catch{}}async function R(){try{await navigator.clipboard.writeText(a.command),v(!0),setTimeout(()=>v(!1),1600)}catch{t("Could not copy — select the line and copy it by hand.")}}(0,c.useEffect)(()=>{"#updates"===window.location.hash&&document.getElementById("updates")?.scrollIntoView({block:"start"}),"updates"!==new URLSearchParams(window.location.search).get("check")||(window.history.replaceState(null,"",window.location.pathname),a.job&&j.includes(a.job.phase)||(document.getElementById("updates")?.scrollIntoView({block:"center"}),O().then(()=>document.getElementById("updates")?.scrollIntoView({block:"end",behavior:"smooth"}))))},[a.job]),(0,c.useEffect)(()=>{if(!M)return;let a=!0,b=setTimeout(async()=>{try{if(N){let b=await fetch("/api/update",{cache:"no-store"}),c=await b.json();if(!a)return;if(!c.job||c.job.id!==y.id)return void window.location.reload();J(0),z(c.job)}else{let{ok:b,d:c}=await h({action:"update-status"});a&&b&&c.job&&z(c.job)}}catch{a&&J(a=>a+1)}},N?1500:600);return()=>{a=!1,clearTimeout(b)}},[y,I,M,N]),(0,c.useEffect)(()=>{if(!N)return;let a=setTimeout(()=>L(!0),6e4);return()=>clearTimeout(a)},[N]);let S=y?.phase==="failed",T=d&&i?.install?.possible,U=S&&"stale-check"===y.code||"not-checked"===E,V=void 0!==G?G:i?.fallback,W=i?.newer&&(!d||V)&&(!T||S||C||a.lastUpdate?.tone==="bad"),X=function({mac:a,kind:b,canInstall:c,fallback:d}){if(!a)return"source"===b?"A copy built from the source code updates by fetching the code and building it again, which it can't do while it runs. Stop it (Ctrl-C), then run this in the six-degrees folder. Your network stays where it is.":"This copy runs inside the terminal that started it, so it can't replace itself while it runs. Stop it first (Ctrl-C), then run this to start the newest version. Your network stays where it is.";if(!d)return null;let e=d.dataDir?` It opens the new version on the usual data folder, not on ${d.dataDir}: to use that one, quit it and open it again with --data-dir, as you opened this one.`:"";return"replace"===d.mode?`${c?"Or paste this into Terminal.":"Paste this into Terminal instead."} It closes this app, puts the new version in its place and opens it. Your network stays where it is.${e}`:`${c?"Or copy":"Copy"} this line, quit Six Degrees, then paste it into Terminal. It installs the new version at ${d.installsTo}, not where this copy is, and opens it: use that one from then on. Your network stays where it is.${e}`}({mac:d,kind:a.kind,canInstall:T,fallback:V});return(0,b.jsxs)(f.Section,{id:"updates",title:"Updates",children:[a.lastUpdate&&!M&&(0,b.jsx)(n,{report:a.lastUpdate}),(0,b.jsxs)(f.Body,{children:["You have version ",(0,b.jsx)(f.Mono,{children:a.version}),"."]}),M?(0,b.jsx)(m,{job:y,restarting:N,slow:K,onCancel:Q}):(0,b.jsxs)(b.Fragment,{children:[S&&(0,b.jsxs)(f.Status,{tone:"bad",children:[(0,b.jsx)("strong",{children:"The update didn’t finish."})," ",y.error," Nothing was changed."]}),y?.phase==="cancelled"&&(0,b.jsx)(f.Status,{children:"Cancelled. Nothing was changed."}),C&&(0,b.jsx)(f.Status,{tone:"bad",children:C}),i&&!i.latest&&(0,b.jsx)(f.Status,{children:"No release has been published yet."}),i?.latest&&!i.newer&&(0,b.jsxs)(f.Status,{tone:"ok",children:["You’re up to date: ",i.latest.version," is the newest version.",w&&(0,b.jsxs)("span",{style:{color:"#8b9a9a"},children:[" Checked at ",w.toLocaleTimeString([],{hour:"numeric",minute:"2-digit"}),"."]})]}),i?.newer&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)(f.Body,{style:{color:"#00ff88"},children:["Version ",i.latest.version," is available."]}),T&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)(f.Body,{children:["It downloads ",i.install.size?`about ${l(i.install.size)} MB`:"the new version"," from GitHub, checks it, then closes, replaces itself and reopens. Your network isn’t touched, and a backup of it is made first."]}),(0,b.jsxs)(p,{children:[U?(0,b.jsx)(f.Btn,{onClick:O,disabled:e,primary:!0,children:e?"Checking…":"Check again"}):(0,b.jsx)(f.Btn,{onClick:P,disabled:A,primary:!0,children:A?"Starting…":S||C?"Try again":"Install and restart"}),(0,b.jsx)(o,{url:i.latest.url})]})]}),d&&!T&&i.install?.reason&&(0,b.jsx)(f.Body,{children:i.install.reason}),W&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(f.Body,{children:X}),a.testReleases?(0,b.jsx)("pre",{style:q,children:"Not shown in test mode: it would install the real release from GitHub into Applications."}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("pre",{style:q,children:a.command}),(0,b.jsxs)(p,{children:[(0,b.jsx)(f.Btn,{onClick:R,primary:!T,children:u?"Copied":"Copy"}),!T&&(0,b.jsx)(o,{url:i.latest.url})]})]})]}),!T&&!W&&(0,b.jsx)(p,{children:(0,b.jsx)(o,{url:i.latest.url})})]}),!i?.newer&&(0,b.jsx)(p,{children:(0,b.jsx)(f.Btn,{onClick:O,disabled:e,children:e?"Checking…":i?"Check again":"Check for updates"})})]}),s&&(0,b.jsx)(f.Body,{style:{color:"#ff7676"},children:s}),(0,b.jsxs)(f.Body,{style:{fontSize:12,color:"#667",marginTop:12},children:["Nothing is checked automatically. The button asks GitHub for the newest version number, and nothing about you is sent.",d&&" Only a second click, Install and restart, downloads the new version."]}),a.testReleases&&(0,b.jsxs)(f.Body,{style:{fontSize:12,color:"#FFD700",marginTop:6},children:["Test mode: releases are read from ",(0,b.jsx)(f.Mono,{children:a.testReleases})," on this computer, not from GitHub."]})]})}let l=a=>Math.max(1,Math.round(a/1e6));function m({job:a,restarting:c,slow:d,onCancel:e}){let g=a.total?Math.min(100,Math.round(a.received/a.total*100)):null,h=c?"Restarting… Six Degrees closes and opens again in a moment.":"checking"===a.phase?"Asking GitHub for the newest version…":"downloading"===a.phase?`Downloading ${a.version}…${null!==g?` ${g}% (${l(a.received)} of ${l(a.total)} MB)`:""}`:"verifying"===a.phase?"Checking the download…":"Preparing the new version…";return(0,b.jsxs)("div",{role:"status","aria-live":"polite",style:{marginTop:12},children:[(0,b.jsx)(f.Body,{style:{color:"#e8e8ee"},children:h}),"downloading"===a.phase&&null!==g&&(0,b.jsx)("div",{role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":g,"aria-label":"Download",style:{height:6,borderRadius:3,background:"rgba(255,255,255,0.08)",marginTop:10,overflow:"hidden",maxWidth:420},children:(0,b.jsx)("div",{style:{width:`${g}%`,height:"100%",background:"linear-gradient(90deg, #9B59B6, #3498DB)",transition:"width 0.4s ease"}})}),d&&(0,b.jsx)(f.Body,{children:"This is taking longer than it should. If Six Degrees doesn’t open again by itself, open it from your Applications folder."}),!c&&(0,b.jsx)(p,{children:(0,b.jsx)(f.Btn,{onClick:e,children:"Cancel"})})]})}function n({report:a}){let c=new Date(a.at).toLocaleString([],{dateStyle:"medium",timeStyle:"short"});return(0,b.jsxs)(f.Status,{tone:"ok"===a.tone?"ok":"bad",children:[a.text," ",(0,b.jsxs)("span",{style:{color:"#8b9a9a"},children:["(",c,")"]}),"ok"===a.tone&&a.previous&&(0,b.jsxs)("span",{style:{display:"block",fontSize:12.5,color:"#8b9a9a",marginTop:4},children:["A copy of the version you had is kept in ",(0,b.jsx)(f.Mono,{children:a.previous})," until the next update. To go back to it, open that file and drag the app it gives you into your Applications folder."]})]})}function o({url:a}){return a?(0,b.jsx)("a",{href:a,target:"_blank",rel:"noreferrer",style:{color:"#3498DB",fontSize:13.5},children:"What changed →"}):null}function p({children:a}){return(0,b.jsx)("div",{style:{display:"flex",gap:10,marginTop:12,flexWrap:"wrap",alignItems:"center"},children:a})}let q={background:"rgba(0,0,0,0.45)",border:f.LINE,borderRadius:8,padding:12,margin:"8px 0 0",fontSize:12,lineHeight:1.7,color:"#b9c6c6",fontFamily:"ui-monospace, SFMono-Regular, Menlo, monospace",whiteSpace:"pre-wrap",maxHeight:180,overflow:"auto"};function r(a){if(!a)return"0 KB";if(a<1048576)return`${Math.max(1,Math.round(a/1024))} KB`;let b=a/1048576;return`${b<10?b.toFixed(1):Math.round(b)} MB`}let s=a=>Number(a||0).toLocaleString("en-US"),t=(a,b,c=`${b}s`)=>`${s(a)} ${1===Number(a)?b:c}`;function u(a,b=!0){if(!a)return null;let c=new Date(a);return Number.isNaN(c.getTime())?null:c.toLocaleString(void 0,b?{dateStyle:"medium",timeStyle:"short"}:{dateStyle:"medium"})}let v={auto:"before a new version",import:"before an import",manual:"made by hand"};async function w(a,b){let c=await a.json().catch(()=>({}));if(!a.ok)throw Object.assign(Error(c.error||b),{data:c});return c}let x={display:"flex",gap:10,marginTop:12,flexWrap:"wrap",alignItems:"center"},y={fontSize:12,color:"#667",marginTop:10},z={fontSize:14,fontWeight:650,margin:"26px 0 4px",color:"#e8e8ee"},A={display:"flex",gap:8,alignItems:"flex-start",marginTop:12,fontSize:13,color:"#c8d0d0",lineHeight:1.5,cursor:"pointer"};function B({label:a,children:c}){return(0,b.jsxs)("div",{style:{display:"flex",gap:12,justifyContent:"space-between",padding:"7px 0",borderTop:f.LINE,fontSize:13.5},children:[(0,b.jsx)("span",{style:{color:"#8b9a9a"},children:a}),(0,b.jsx)("span",{style:{color:"#e8e8ee",textAlign:"right"},children:c})]})}function C(){return(0,b.jsx)("a",{href:"https://github.com/blakeb056/six-degrees#undo-an-import",target:"_blank",rel:"noreferrer",style:{color:"inherit",textDecoration:"underline"},children:"Undo an import"})}function D(){let[a,d]=(0,c.useState)(null),[e,g]=(0,c.useState)(null),[h,i]=(0,c.useState)(null),[j,k]=(0,c.useState)(null),[l,m]=(0,c.useState)(null),[n,o]=(0,c.useState)(null),[p,q]=(0,c.useState)(!0),[D,E]=(0,c.useState)(!0),[F,G]=(0,c.useState)(null),[H,I]=(0,c.useState)(!1),[J,K]=(0,c.useState)(!1),L=(0,c.useRef)(null),M=(0,c.useRef)(!1),N=(0,c.useCallback)(()=>fetch("/api/data",{cache:"no-store"}).then(a=>w(a,"The data folder could not be read.")).then(a=>{let b=Date.parse(a.lastImport?.appliedAt||"");d({...a,importIsRecent:Number.isFinite(b)&&Date.now()-b<864e5}),g(null)}).catch(a=>g(a.message)),[]);async function O(){k(null);try{await navigator.clipboard.writeText(a.dataDir),k({tone:"ok",text:"Copied the folder’s path."})}catch{k({tone:"bad",text:"This window can’t copy. Select the path above and copy it instead."})}}async function P(){i("reveal"),k(null);try{await w(await fetch("/api/data/reveal",{method:"POST"}),"The folder could not be opened."),k({tone:"ok",text:"darwin"===a.platform?"Opened in Finder.":"Opened in your file browser."})}catch(a){k({tone:"bad",text:a.message})}finally{i(null)}}async function Q(){i("export"),m(null);try{let a,b=await fetch("/api/data/export",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({photos:p,social:D})});b.ok||await w(b,"The copy could not be made.");let c=await b.blob(),d=/filename="([^"]+)"/.exec(b.headers.get("content-disposition")||"")?.[1]||"Six Degrees backup.sixdegrees",e=URL.createObjectURL(c),f=document.createElement("a");f.href=e,f.download=d,f.style.position="fixed",f.style.left="-9999px",document.body.appendChild(f),f.click(),f.remove(),setTimeout(()=>URL.revokeObjectURL(e),6e4);let g=[(a=Number(b.headers.get("x-six-degrees-people")),t(a,"person","people"))];g.push(p?t(Number(b.headers.get("x-six-degrees-photos")),"photo"):"no photos"),m({tone:"ok",text:`Made “${d}” (${r(c.size)}: ${g.join(", ")}). Look for it in your Downloads folder, or wherever you chose to save it.`})}catch(a){m({tone:"bad",text:a.message})}finally{i(null)}}async function R(){if(F){i("import"),o(null);try{let b={"Content-Type":"application/octet-stream","X-Six-Degrees-Size":String(F.size)};a.people>0&&(b["X-Six-Degrees-Replace"]=String(a.people)),await w(await fetch("/api/data/import",{method:"POST",headers:b,body:F}),"The file could not be imported."),G(null),I(!1),L.current&&(L.current.value=""),await N()}catch(a){a.data?.needsConfirm&&(I(!1),await N()),o({tone:"bad",text:a.message})}finally{i(null)}}}async function S(){i("cancel"),o(null);try{await w(await fetch("/api/data/import",{method:"DELETE"}),"The import could not be cancelled."),await N(),o({tone:"ok",text:"Cancelled. The network here stays as it is."})}catch(a){o({tone:"bad",text:a.message})}finally{i(null)}}async function T(){i("restart"),o(null);try{await w(await fetch("/api/data/restart",{method:"POST"}),"Six Degrees could not restart."),K(!0);let a=a=>new Promise(b=>setTimeout(b,a)),b=Date.now()+9e4;for(await a(2500);Date.now()<b;){try{if((await fetch("/api/data",{cache:"no-store"})).ok)return void window.location.reload()}catch{}await a(1e3)}K(!1),o({tone:"bad",text:"Six Degrees didn’t come back. Quit it and open it again: the import finishes as it starts."})}catch(a){o({tone:"bad",text:a.message})}finally{i(null)}}if((0,c.useEffect)(()=>{N()},[N]),(0,c.useEffect)(()=>{a&&!M.current&&(M.current=!0,"#data"===window.location.hash&&document.getElementById("data")?.scrollIntoView({block:"start"}))},[a]),!a)return(0,b.jsx)(f.Section,{id:"data",title:"Your data",children:e?(0,b.jsx)(f.Status,{tone:"bad",children:e}):(0,b.jsx)(f.Body,{children:"Loading…"})});let U=a.pending,V=a.photosInCopy||a.photos,W=a.backups||[],X=W.reduce((a,b)=>a+(b.bytes||0),0),Y=!!(F&&F.size>a.maxImportBytes),Z=a.people>0,$=a.lastImport;return(0,b.jsxs)(f.Section,{id:"data",title:"Your data",intro:"Everything Six Degrees knows about your network is in one folder on this computer.",children:[(0,b.jsx)(f.Body,{children:(0,b.jsx)(f.Mono,{children:a.dataDir})}),(0,b.jsxs)("div",{style:x,children:[(0,b.jsx)(f.Btn,{onClick:O,children:"Copy the path"}),(0,b.jsx)(f.Btn,{onClick:P,disabled:"reveal"===h,children:"reveal"===h?"Opening…":"darwin"===a.platform?"Show in Finder":"Open the folder"})]}),j&&(0,b.jsx)(f.Status,{tone:j.tone,children:j.text}),(0,b.jsxs)("div",{style:{marginTop:16,borderBottom:f.LINE},children:[(0,b.jsxs)(B,{label:"Your network",children:[t(a.people,"person","people")," · ",r(a.databaseBytes)]}),(0,b.jsx)(B,{label:"Profile photos",children:a.photos.count?`${s(a.photos.count)} \xb7 ${r(a.photos.bytes)}`:"none saved yet"}),(0,b.jsx)(B,{label:"Backups",children:W.length?`${t(W.length,"copy","copies")} \xb7 ${r(X)}`:"none yet"}),(0,b.jsx)(B,{label:"LinkedIn sign-in for scanning",children:a.linkedinSignIn?"kept here, never put in a copy":"not signed in on this computer"})]}),W.length>0&&(0,b.jsxs)("details",{style:{marginTop:10,fontSize:13,color:"#8b9a9a"},children:[(0,b.jsx)("summary",{style:{cursor:"pointer"},children:"The backups"}),(0,b.jsx)("div",{style:{display:"grid",gridTemplateColumns:"minmax(0, 1fr) auto auto",gap:"6px 14px",marginTop:8},children:W.map(a=>(0,b.jsxs)("div",{style:{display:"contents"},children:[(0,b.jsxs)("span",{style:{wordBreak:"break-all",color:"#c8d0d0"},children:[a.name,a.folder?"/":"",(0,b.jsxs)("span",{style:{color:"#667"},children:[" · ",a.folder?"its photos and files":v[a.kind]||a.kind]})]}),(0,b.jsx)("span",{children:u(a.modifiedAt)}),(0,b.jsx)("span",{style:{textAlign:"right"},children:r(a.bytes)})]},a.name))})]}),(0,b.jsx)(f.Body,{style:y,children:"Backups are copies of your network from before a new version or an import. The newest five from new versions are kept; copies from before an import stay until you delete them."}),(0,b.jsx)(f.Body,{style:y,children:"The folder can’t be moved from here. A database that a sync service (iCloud Drive, Dropbox) copies while it’s open can be damaged, and this folder also holds your LinkedIn sign-in, which should never be synced. To use your network on another computer, save a copy below and import it there."}),(0,b.jsx)("h3",{style:z,children:"Move your network to another computer"}),(0,b.jsx)(f.Body,{children:"Save a copy here, then on the new computer install Six Degrees, open Settings → Your data and import the copy. Sign in to LinkedIn again there before you scan: your sign-in never goes into a copy."}),(0,b.jsxs)("label",{style:A,children:[(0,b.jsx)("input",{type:"checkbox",checked:p,onChange:a=>q(a.target.checked),style:{marginTop:3}}),(0,b.jsxs)("span",{children:["Include profile photos",V.count?` (${s(V.count)}, ${r(V.bytes)})`:"",". They can’t be downloaded again without a new scan."]})]}),(0,b.jsxs)("label",{style:A,children:[(0,b.jsx)("input",{type:"checkbox",checked:D,onChange:a=>E(a.target.checked),style:{marginTop:3}}),(0,b.jsx)("span",{children:"Include the Social tab: its findings, your CRM notes, stages and follow-ups, and any messages you keep there."})]}),(0,b.jsxs)("div",{style:x,children:[(0,b.jsx)(f.Btn,{primary:!0,onClick:Q,disabled:!!h||J||0===a.people,children:"export"===h?"Saving…":"Save a copy of my network"}),0===a.people&&(0,b.jsx)("span",{style:{fontSize:13,color:"#8b9a9a"},children:"There’s no network here to save yet."})]}),l&&(0,b.jsx)(f.Status,{tone:l.tone,children:l.text}),(0,b.jsx)(f.Body,{style:y,children:"The copy holds the names, headlines and photos of the people in your network. Keep it private: don’t post it or share it, and delete it once it has been imported. A network opened from a LinkedIn CSV lives only in its browser tab, so it isn’t in the copy; import the CSV again on the new computer. With the Social tab included, the copy also holds your CRM notes and any messages you keep, so it’s as private as your inbox."}),(0,b.jsx)("h3",{style:z,children:"Bring in a network from another computer"}),U?(0,b.jsxs)(f.Status,{children:[(0,b.jsx)("div",{style:{fontWeight:650},children:"An import is waiting to finish."}),(0,b.jsxs)("div",{children:["The network in the copy",U.exportedAt?` saved ${u(U.exportedAt,!1)}`:""," ","(",t(U.people,"person","people"),U.photos?`, ${t(U.photos,"photo")}`:"",U.fromVersion?`, from Six Degrees ${U.fromVersion}`:"",")",U.replacedPeople>0?` replaces the ${t(U.replacedPeople,"person","people")} here the next time Six Degrees starts. A copy of what’s here now is kept in backups first, so the import can be undone.`:" becomes the network here the next time Six Degrees starts."," ","Your LinkedIn search budget and any pause on scanning are kept."]}),U.error&&(0,b.jsxs)("div",{style:{color:"#ff7676",marginTop:6},children:["The last try stopped: ",U.error.replace(/\.$/,""),". It tries again the next time Six Degrees starts."]}),J?(0,b.jsx)("div",{style:{marginTop:8},children:"Restarting… this page comes back in a few seconds."}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("div",{style:{marginTop:8},children:a.restart.how}),a.restart.command&&(0,b.jsx)("div",{style:{marginTop:6},children:(0,b.jsx)(f.Mono,{children:a.restart.command})}),(0,b.jsxs)("div",{style:x,children:[a.restart.canRestart&&(0,b.jsx)(f.Btn,{primary:!0,onClick:T,disabled:!!h,children:"restart"===h?"Restarting…":"Restart now"}),!U.started&&(0,b.jsx)(f.Btn,{onClick:S,disabled:!!h,children:"cancel"===h?"Cancelling…":"Cancel the import"})]})]})]}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(f.Body,{children:"Pick the copy you saved on the other computer (a .sixdegrees file). It replaces the network here; the two networks are never merged. Your LinkedIn search budget and any pause on scanning are kept, with the other computer’s searches added."}),(0,b.jsx)("input",{ref:L,type:"file",accept:".sixdegrees",onChange:function(a){o(null),I(!1),G(a.target.files?.[0]||null)},style:{display:"none"}}),(0,b.jsxs)("div",{style:x,children:[(0,b.jsx)(f.Btn,{onClick:()=>L.current?.click(),disabled:!!h,children:"Choose a file…"}),F&&(0,b.jsxs)("span",{style:{fontSize:13,color:"#c8d0d0",wordBreak:"break-all"},children:[F.name," · ",r(F.size)]})]}),Y&&(0,b.jsxs)(f.Status,{tone:"bad",children:["That file is ",r(F.size),". This copy can import files up to ",r(a.maxImportBytes),"."]}),F&&Z&&!Y&&(0,b.jsxs)("label",{style:A,children:[(0,b.jsx)("input",{type:"checkbox",checked:H,onChange:a=>I(a.target.checked),style:{marginTop:3}}),(0,b.jsxs)("span",{children:["Replace the ",t(a.people,"person","people")," in this copy’s network with the network in this file. A copy of what’s here is kept in backups first. Your search budget and any pause on scanning are kept too."]})]}),(0,b.jsx)("div",{style:x,children:(0,b.jsx)(f.Btn,{primary:!0,onClick:R,disabled:!F||Y||Z&&!H||!!h,children:"import"===h?"Checking the file…":"Import"})})]}),n&&(0,b.jsx)(f.Status,{tone:n.tone,children:n.text}),$&&!U&&(a.importIsRecent?(0,b.jsxs)(f.Status,{tone:"ok",children:["Imported ",u($.appliedAt),": ",t($.people,"person","people"),$.exportedAt?` from the copy saved ${u($.exportedAt,!1)}`:"",".",$.keptDatabase&&(0,b.jsxs)(b.Fragment,{children:[" ","What was here before is kept in ",(0,b.jsx)(f.Mono,{children:$.keptDatabase}),$.keptFiles?", with its photos and files beside it":"",".",$.keptAsIs&&" It couldn’t be read, so it was kept exactly as it was."," ","To go back to it, see ",(0,b.jsx)(C,{}),"."]})]}):(0,b.jsxs)(f.Body,{style:y,children:["Last import: ",u($.appliedAt)," (",t($.people,"person","people"),").",$.keptDatabase&&(0,b.jsxs)(b.Fragment,{children:[" What was here before is kept in ",(0,b.jsx)(f.Mono,{children:$.keptDatabase})," (",(0,b.jsx)(C,{}),")."]})]}))]})}var E=a.i(803),F=a.i(79663),G=a.i(59534),H=a.i(54919),I=a.i(30889),J=a.i(76939);a.i(42510);var K=a.i(31483);let L={lean:"Lean",strong:"Strong"},M=["wheel","touchstart","keydown","pointerdown"],N={1:"1st",2:"2nd",3:"3rd"},O=(a,b,c=`${b}s`)=>`${a.toLocaleString()} ${1===a?b:c}`,P=G.DIRECTORY.filter(a=>"function"===a.kind).map(a=>a.label);function Q(a,b,c){let[d,e]=c?["moved","moved"]:["moves","move"];if(!a&&!b)return c?"No one changed tier.":"No one changes tier.";let f=a=>1===a?d:e;return a&&b?`${O(a,"person","people")} ${f(a)} up a tier and ${b.toLocaleString()} ${f(b)} down.`:a?`${O(a,"person","people")} ${f(a)} up a tier.`:`${O(b,"person","people")} ${f(b)} down a tier.`}function R({onSaved:a}={}){let[d,e]=(0,c.useState)(null),[g,h]=(0,c.useState)(null),[i,j]=(0,c.useState)(null),[k,l]=(0,c.useState)(!1),[m,n]=(0,c.useState)(null),[o,p]=(0,c.useState)(null),[q,r]=(0,c.useState)({loading:!0}),[s]=(0,c.useState)(()=>null),t=(0,c.useRef)(null),u=(0,c.useRef)(0),v=(0,c.useRef)(!1);function w(a){h(a),n(null),clearTimeout(t.current);let b=++u.current;if((0,F.sameFocus)(a,d))return void j(null);let c=(0,F.focusFingerprint)(a);j({key:c,loading:!0}),t.current=setTimeout(async()=>{try{let d=await fetch("/api/settings/sector-preview",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({sectorFocus:a})}),e=await d.json();if(b!==u.current)return;j(d.ok?{key:c,...e}:{key:c,error:e.error||"Could not work out what would change."})}catch{b===u.current&&j({key:c,error:"Could not reach the app to work out what would change."})}},250)}async function x(){var b,c;let d;l(!0),n(null),clearTimeout(t.current),u.current++;let f=await (0,K.saveSettings)({sectorFocus:g});(l(!1),f.settings&&(e(f.settings.sectorFocus),h(f.settings.sectorFocus),j(null)),f.error)?n({tone:"bad",text:f.error}):(n({tone:"ok",text:(b=f.settings.sectorFocus,c=f.effects?.sectorFocus,d=b.sectors.length?`Saved: ${b.sectors.map(a=>(0,H.sectorByKey)(a).label).join(" · ")} (${L[b.strength].toLowerCase()}).`:"Saved: no sector.",c?c.scored?`${d} Rescored your network (${O(c.people??c.scored,"person","people")}). ${Q(c.up,c.down,!0)}`:`${d} There's no scanned network yet; it will apply when you scan.`:d)}),a?.())}(0,c.useEffect)(()=>{let a=!1;return fetch("/api/settings").then(a=>a.json().then(b=>a.ok?b:Promise.reject(Error(b.error||"Could not load your sector.")))).then(b=>{if(a)return;let c=b.settings?.sectorFocus||{sectors:[],strength:"lean"};e(c),h(c)}).catch(b=>{a||p(b.message)}),fetch("/api/settings/sector-suggestions").then(a=>a.json().then(b=>a.ok?b:Promise.reject(Error(b.error||"Could not load suggestions.")))).then(b=>{a||r({scored:b.scored,list:b.suggestions||[]})}).catch(b=>{a||r({error:b.message})}),()=>{a=!0,clearTimeout(t.current)}},[]),(0,c.useEffect)(()=>{if(v.current||!g&&!o)return;v.current=!0;let a=document.getElementById("sector");if("#sector"!==window.location.hash||!a)return;let b=()=>a.scrollIntoView({block:"start"});b();let c=new ResizeObserver(b);c.observe(document.body);let d=()=>{for(let a of(c.disconnect(),clearTimeout(e),M))window.removeEventListener(a,d,!0)},e=setTimeout(d,2e3);for(let a of M)window.addEventListener(a,d,{capture:!0,passive:!0});return d},[g,o]);let y=g&&d&&!(0,F.sameFocus)(g,d);return(0,b.jsxs)(f.Section,{id:"sector",title:"Your sector",intro:"Pick up to three sectors you work in. Companies in them count for more when your network is scored, so the people there rank higher.",children:[o&&(0,b.jsx)(f.Status,{tone:"bad",children:o}),!g&&!o&&(0,b.jsx)(f.Body,{children:"Loading…"}),g&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(E.default,{sectors:g.sectors,onChange:a=>w({...g,sectors:a}),disabled:k,suggest:q}),(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:8,marginTop:14},children:[(0,b.jsx)("span",{style:{fontSize:13,color:"#8b9a9a"},children:"How much:"}),Object.keys(I.SECTOR_BONUS).map(a=>(0,b.jsxs)("button",{type:"button","aria-pressed":g.strength===a,disabled:k,onClick:()=>w({...g,strength:a}),style:{padding:"5px 12px",borderRadius:7,fontSize:12.5,fontWeight:600,cursor:"pointer",color:g.strength===a?"#fff":"#8b9a9a",background:g.strength===a?"rgba(52,152,219,0.25)":"transparent",border:f.LINE},children:[L[a]," · +",I.SECTOR_BONUS[a]]},a))]}),(0,b.jsx)(f.Body,{style:{fontSize:12.5},children:"Each company in your sectors gets +1 (lean) or +2 (strong) on its score out of 10, never above 10. A company in more than one of your picks still gets it once."}),(0,b.jsx)(S,{preview:y?i:null,draft:g}),(0,b.jsxs)("div",{style:{display:"flex",gap:8,flexWrap:"wrap",marginTop:14},children:[(0,b.jsx)(f.Btn,{primary:!0,onClick:x,disabled:!y||k,children:k?"Saving and rescoring…":"Save"}),y&&!k&&(0,b.jsx)(f.Btn,{onClick:()=>w(d),children:"Cancel"}),!y&&g.sectors.length>0&&!k&&(0,b.jsx)(f.Btn,{onClick:()=>w({...g,sectors:[]}),children:"Turn off"})]}),m&&(0,b.jsx)(f.Status,{tone:m.tone,children:m.text}),(0,b.jsxs)("ul",{style:{margin:"16px 0 0",paddingLeft:18,fontSize:12.5,color:"#778",lineHeight:1.7},children:[(0,b.jsx)("li",{children:"Tiers rank how reachable someone is through your network, not the people themselves."}),(0,b.jsxs)("li",{children:["A company score you set on ",(0,b.jsx)("a",{href:"#companies",style:{color:"#3498DB"},children:"Company scores"}),", below, always wins. Your sector never changes it."]}),(0,b.jsx)("li",{children:"If you scan highest tier first, people in your sectors come up sooner. Scanning newest first, the default, doesn’t go by tier."}),(0,b.jsx)("li",{children:"An industry includes its sectors. It counts a company in any of its sectors (Healthcare & Biotech counts a practice that is only in Dental), and a company whose industry the app’s list of well-known companies or the company’s own name gives (Meridian Health). Not one known only from its people’s job titles: a recruiter at Acme Widgets doesn’t make Acme a consulting firm."}),(0,b.jsx)("li",{children:"A narrower sector counts a company when its name says so (Smith Family Dental), it’s a well-known company in that sector, or at least half of the people you know there say so in their headlines (dentist, DDS, orthodontist). The words are a fixed list that comes with the app, the same on every computer. Nothing is sent anywhere."}),(0,b.jsxs)("li",{children:["Some sectors are work every kind of company has: ",P.length>1?`${P.slice(0,-1).join(", ")} and ${P.at(-1)}`:P.join(""),". For those a job title doesn’t count, since a recruiter at Acme Widgets doesn’t make it a recruiting firm. The company’s name does (Acme Staffing, Smith CPA), and so does a kind of firm in a headline (staffing agency, law firm, SaaS)."]}),s&&(0,b.jsxs)("li",{style:{color:"#FFD700"},children:["sample"===s?"The sample network":"The CSV import"," open in this window isn’t changed by this, and isn’t counted in the suggestions. Your sector applies to networks you’ve scanned."]})]})]})]})}function S({preview:a,draft:c}){if(!a||a.key!==(0,F.focusFingerprint)(c))return null;let d={marginTop:12,padding:"10px 14px",borderRadius:8,fontSize:13,lineHeight:1.6,border:f.LINE,background:"rgba(255,255,255,0.03)",color:"#cfd8d8"};if(a.loading)return(0,b.jsx)("div",{style:d,"aria-live":"polite",children:"Working out what would change…"});if(a.error)return(0,b.jsx)(f.Status,{tone:"bad",children:a.error});if(!a.scored)return(0,b.jsx)("div",{style:d,"aria-live":"polite",children:"There’s no scanned network yet, so nothing changes now. Your choice applies once you scan."});let e=(a,b)=>`${O(a,"company","companies")} ${1===a?"scores":"score"} ${b}`,g=[a.companiesUp&&e(a.companiesUp,"higher"),a.companiesDown&&e(a.companiesDown,"lower")].filter(Boolean).join(" and ");return(0,b.jsxs)("div",{style:d,"aria-live":"polite",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("b",{style:{color:"#fff"},children:"If you save:"})," ",g?`${g}.`:"No company changes score."," ",Q(a.up,a.down,!1)]}),a.examples?.length>0&&(0,b.jsx)("div",{style:{marginTop:6,display:"flex",flexWrap:"wrap",gap:"4px 12px",fontSize:12.5},children:a.examples.map((a,c)=>(0,b.jsxs)("span",{title:a.company||void 0,children:[a.name,a.degree?(0,b.jsxs)("span",{style:{color:"#667"},children:[" (",N[a.degree]||`${a.degree}th`,")"]}):null," ",(0,b.jsx)("b",{style:{color:J.TIER_COLORS_CLASSIC[a.from]||"#889"},children:a.from||"–"})," → ",(0,b.jsx)("b",{style:{color:J.TIER_COLORS_CLASSIC[a.to]||"#889"},children:a.to})]},c))}),a.companyExamples?.length>0&&(0,b.jsx)("div",{style:{marginTop:4,fontSize:12,color:"#8b9a9a"},children:a.companyExamples.slice(0,3).map(a=>`${a.name} ${a.from} → ${a.to}`).join(" · ")})]})}let T=a=>`${Math.round(100*a)}%`,[U,V,W]=I.CURVE.map(([,a])=>a),X=[{key:"curve",label:"On your network's curve",note:`Your top ${T(U)} are S, the next ${T(V-U)} A and the next ${T(W-V)} B, so any network has a top, even one full of companies the app doesn't know. It only lifts: nobody drops a tier because their network is strong, and nobody under ${I.CURVE_FLOOR} is lifted into S or A.`},{key:"fixed",label:"On the fixed scale",note:"The same lines for everyone: S from 7.5, A from 5.5, B from 4, C from 2.5. Easy to compare from one network to another, but a network outside well-known companies has almost nobody in S or A."}];function Y({onSaved:a}={}){let[d,e]=(0,c.useState)(null),[g,h]=(0,c.useState)(!1),[i,j]=(0,c.useState)(null),[k,l]=(0,c.useState)(null),[m]=(0,c.useState)(()=>null);async function n(b){if(g||b===d)return;h(!0),j(null);let{settings:c,effects:f,error:i}=await (0,K.saveSettings)({tierScale:b});if(c&&e(c.tierScale),i)j({tone:"bad",text:i});else{let b,c=f?.tierScale;j({tone:"ok",text:c?`Saved. ${b=c.moved,`${b.toLocaleString()} ${1===b?"person":"people"}`} changed tier.`:"Saved."}),a?.()}h(!1)}return(0,c.useEffect)(()=>{let a=!1;return fetch("/api/settings").then(a=>a.json().then(b=>a.ok?b:Promise.reject(Error(b.error||"Could not load how tiers are graded.")))).then(b=>{a||e(b.settings?.tierScale||"curve")}).catch(b=>{a||l(b.message)}),()=>{a=!0}},[]),(0,b.jsxs)(f.Section,{id:"tiers",title:"Tiers",intro:"How the S to D rings are drawn. A tier says where someone sits in your network, not what they're worth.",children:[k&&(0,b.jsx)(f.Status,{tone:"bad",children:k}),d&&(0,b.jsx)("div",{role:"radiogroup","aria-label":"How tiers are graded",style:{display:"grid",gap:8},children:X.map(a=>{let c=d===a.key;return(0,b.jsxs)("button",{type:"button",role:"radio","aria-checked":c,disabled:g,onClick:()=>n(a.key),style:{textAlign:"left",padding:"12px 14px",borderRadius:8,cursor:g?"wait":c?"default":"pointer",color:"#fff",background:c?"rgba(155,89,182,0.14)":"rgba(255,255,255,0.03)",border:c?"1px solid rgba(155,89,182,0.6)":f.LINE},children:[(0,b.jsxs)("div",{style:{fontSize:14,fontWeight:650},children:[c?"● ":"○ ",a.label,"curve"===a.key?" (recommended)":""]}),(0,b.jsx)(f.Body,{style:{marginTop:4},children:a.note})]},a.key)})}),m&&(0,b.jsxs)(f.Body,{style:{color:"#FFD700",marginTop:10},children:["sample"===m?"The sample network open in this window keeps its own tiers (they’re the same either way).":"The CSV import open in this window is always graded on its own curve."," ","This applies to networks you’ve scanned."]}),i&&(0,b.jsx)(f.Status,{tone:i.tone,children:i.text})]})}let Z=["csuite","owner","vp","director","manager","senior","ic","unknown","intern","student"],$=Object.freeze({points:Object.freeze({}),roles:Object.freeze([])});function _(a=$){let b=Object.keys(a.points||{}).sort().map(b=>`${b}=${a.points[b]}`).join(","),c=(a.roles||[]).map(a=>`${a.text}=${a.points}`).sort().join(",");return b||c?`${b}|${c}`:"none"}let aa=[{key:"default",label:"As the app ranks them",ranking:$,note:"C-suite and founders first, then VPs, directors, managers."},{key:"founders",label:"Founders first",note:"Owners and entrepreneurs count like CEOs, and anyone who says founder counts as much: for meeting founders, or selling to them.",ranking:{points:{owner:10},roles:[{text:"founder",points:10},{text:"co-founder",points:10}]}},{key:"investors",label:"Investors",note:"Anyone who invests for a living rises to the top: for raising money.",ranking:{points:{},roles:["investor","venture","angel","general partner","managing partner","principal at","vc"].map(a=>({text:a,points:10}))}},{key:"role",label:"A role I’m looking for",note:"For outbound or hiring: add the role below, and everyone in it rises, whatever their level.",ranking:null}],ab=[10,9.5,9,8.5,8,7.5,7,6.5,6,5.5,5,4.5,4,3,2,1,0],ac={padding:"5px 8px",borderRadius:6,fontSize:12.5,cursor:"pointer",border:f.LINE,background:"rgba(0,0,0,0.3)",color:"#fff"};function ad({onSaved:a}={}){let[d,e]=(0,c.useState)(null),[g,h]=(0,c.useState)(null),[i,j]=(0,c.useState)(""),[k,l]=(0,c.useState)(10),[m,n]=(0,c.useState)(!1),[o,p]=(0,c.useState)(null),[q,r]=(0,c.useState)(null),s=(0,c.useRef)(null);if((0,c.useEffect)(()=>{let a=!1;return fetch("/api/settings").then(a=>a.json().then(b=>a.ok?b:Promise.reject(Error(b.error||"Could not load your title ranking.")))).then(b=>{if(!a){let a=b.settings?.titleRanking||$;e(a),h(a)}}).catch(b=>{a||r(b.message)}),()=>{a=!0}},[]),!g)return q?(0,b.jsx)(f.Status,{tone:"bad",children:q}):null;let t=(a,b)=>{let c={...g.points};b===I.LEVELS[a].points?delete c[a]:c[a]=b,h({...g,points:c}),p(null)},u=aa.find(a=>a.ranking&&_(a.ranking)===_(g))?.key??null,v=_(g)!==_(d);async function w(){n(!0),p(null);let{settings:b,effects:c,error:d}=await (0,K.saveSettings)({titleRanking:g});if(b&&(e(b.titleRanking),h(b.titleRanking)),d)p({tone:"bad",text:d});else{let b,d=c?.titleRanking;p({tone:"ok",text:d?`Saved. ${b=d.moved,`${b.toLocaleString()} ${1===b?"person":"people"}`} changed tier.`:"Saved."}),a?.()}n(!1)}return(0,b.jsxs)(f.Section,{id:"titles",title:"Titles",intro:"How much each kind of title counts towards someone's power, out of 10. Change it if you value some people more than the app does: founders, investors, or a role you're looking for.",children:[(0,b.jsx)("div",{style:{display:"flex",gap:6,flexWrap:"wrap",marginBottom:6},children:aa.map(a=>(0,b.jsx)("button",{type:"button",onClick:()=>{p(null),a.ranking?h({points:{...a.ranking.points},roles:[...a.ranking.roles]}):s.current?.focus()},"aria-pressed":u===a.key,title:a.note,style:{padding:"6px 12px",borderRadius:16,fontSize:12.5,fontWeight:650,cursor:"pointer",border:u===a.key?"1px solid rgba(155,89,182,0.7)":f.LINE,background:u===a.key?"rgba(155,89,182,0.16)":"rgba(255,255,255,0.03)",color:u===a.key?"#fff":"#bbb"},children:a.label},a.key))}),(0,b.jsx)(f.Body,{style:{marginBottom:14},children:aa.find(a=>a.key===u)?.note||"Your own ranking. Higher points rank higher; the company someone works at still weighs it."}),(0,b.jsx)("div",{style:{display:"grid",gridTemplateColumns:"1fr auto auto",gap:"6px 12px",alignItems:"center",maxWidth:520},children:Z.map(a=>{let c=g.points?.[a]!=null;return[(0,b.jsx)("div",{style:{fontSize:13,color:c?"#fff":"#ccc",fontWeight:c?700:500},children:I.LEVELS[a].label},`${a}-l`),(0,b.jsx)("select",{"aria-label":`Points for ${I.LEVELS[a].label}`,value:g.points?.[a]??I.LEVELS[a].points,onChange:b=>t(a,Number(b.target.value)),style:{...ac,borderColor:c?"rgba(155,89,182,0.7)":void 0},children:ab.map(a=>(0,b.jsx)("option",{value:a,children:a},a))},`${a}-s`),(0,b.jsx)("div",{style:{fontSize:11,color:"#667",minWidth:70},children:c?(0,b.jsxs)("button",{type:"button",onClick:()=>t(a,I.LEVELS[a].points),style:{background:"none",border:"none",color:"#9b9bd0",cursor:"pointer",fontSize:11,padding:0},children:["back to ",I.LEVELS[a].points]}):"as it comes"},`${a}-d`)]})}),(0,b.jsx)("div",{style:{marginTop:18,fontSize:13.5,fontWeight:700,color:"#eee"},children:"Roles you’re looking for"}),(0,b.jsx)(f.Body,{style:{margin:"4px 0 10px"},children:"Anyone whose title has these words counts what you give them, whatever their level: for outbound to one role, or hiring for it. “Account executive” at 10 puts every account executive you can reach near the top."}),(0,b.jsxs)("form",{onSubmit:a=>{a.preventDefault(),(()=>{let a=i.trim().toLowerCase().replace(/\s+/g," ");if(a.length<2)return;let b=[...g.roles.filter(b=>b.text!==a),{text:a,points:k}];h({...g,roles:b.slice(-20)}),j(""),p(null)})()},style:{display:"flex",gap:8,flexWrap:"wrap",alignItems:"center"},children:[(0,b.jsx)("input",{ref:s,value:i,onChange:a=>j(a.target.value),placeholder:"e.g. head of growth, recruiter, founder",maxLength:60,style:{flex:"1 1 220px",padding:"7px 10px",borderRadius:6,fontSize:13,border:f.LINE,background:"rgba(0,0,0,0.3)",color:"#fff"}}),(0,b.jsx)("select",{"aria-label":"Points for this role",value:k,onChange:a=>l(Number(a.target.value)),style:ac,children:ab.map(a=>(0,b.jsx)("option",{value:a,children:a},a))}),(0,b.jsx)(f.Btn,{type:"submit",disabled:i.trim().length<2||g.roles.length>=20,children:"Add"})]}),g.roles.length>0&&(0,b.jsx)("div",{style:{display:"flex",gap:6,flexWrap:"wrap",marginTop:10},children:g.roles.map(a=>(0,b.jsxs)("span",{style:{display:"inline-flex",alignItems:"center",gap:6,padding:"4px 6px 4px 11px",borderRadius:14,fontSize:12.5,border:"1px solid rgba(155,89,182,0.5)",background:"rgba(155,89,182,0.12)",color:"#eee"},children:[a.text," ",(0,b.jsx)("b",{style:{color:"#d2b4ff"},children:a.points}),(0,b.jsx)("button",{type:"button",onClick:()=>{var b;return b=a.text,void(h({...g,roles:g.roles.filter(a=>a.text!==b)}),p(null))},"aria-label":`Remove ${a.text}`,style:{background:"none",border:"none",color:"#aaa",cursor:"pointer",fontSize:13},children:"✕"})]},a.text))}),(0,b.jsxs)("div",{style:{display:"flex",gap:10,alignItems:"center",marginTop:16},children:[(0,b.jsx)(f.Btn,{primary:!0,onClick:w,disabled:!v||m,children:m?"Rescoring…":"Save and rescore"}),v&&(0,b.jsx)("span",{style:{fontSize:12,color:"#999"},children:"Not saved yet. Saving rescores everyone."})]}),o&&(0,b.jsx)(f.Status,{tone:o.tone,children:o.text})]})}var ae=a.i(90017),af=a.i(58834);let ag={"mac-app":"the Mac app",npm:"the npm package (npx six-degrees)",source:"a copy built from the source code",git:"a git checkout of the source code"};function ah(){let[a,e]=(0,c.useState)(null),[h,i]=(0,c.useState)(null),[j,k]=(0,c.useState)(0),l=()=>k(a=>a+1);if((0,c.useEffect)(()=>{fetch("/api/settings").then(a=>a.json().then(b=>a.ok?b:Promise.reject(Error(b.error||"Could not load settings.")))).then(e).catch(a=>i(a.message))},[]),af.IS_DEMO)return(0,b.jsxs)("div",{style:{minHeight:"100vh",background:"#0a0a1a",color:"rgba(255,255,255,0.7)",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:12,textAlign:"center",padding:24,fontFamily:f.FONT},children:[(0,b.jsx)("h2",{style:{margin:0,fontSize:20,fontWeight:700,color:"#fff"},children:"Not part of the demo"}),(0,b.jsx)("p",{style:{margin:0,fontSize:13},children:"The public demo includes the Network Circle and Degrees views only."}),(0,b.jsx)(d.default,{href:"/",style:{fontSize:12,color:"rgba(255,255,255,0.5)",textDecoration:"none"},children:"← Back to the network"})]});let m=a?.about;return(0,b.jsxs)("div",{style:{minHeight:"100vh",background:"#0a0a1a",color:"#fff",fontFamily:f.FONT},children:[(0,b.jsxs)("header",{style:{padding:"16px 24px",borderBottom:f.LINE,display:"flex",alignItems:"center",gap:16},children:[(0,b.jsx)(d.default,{href:"/",style:{display:"flex",alignItems:"center",gap:6,color:"#888",textDecoration:"none",fontSize:13,fontWeight:600,padding:"6px 14px",borderRadius:6,background:"rgba(255,255,255,0.06)",border:f.LINE},children:"← Back to Map"}),(0,b.jsx)("h1",{style:{fontSize:22,fontWeight:700,margin:0,background:"linear-gradient(135deg, #FFD700, #9B59B6, #3498DB)",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent"},children:"Settings"})]}),(0,b.jsxs)("main",{style:{maxWidth:980,margin:"0 auto",padding:"8px 24px 64px"},children:[h&&(0,b.jsx)(f.Body,{style:{color:"#ff7676",marginTop:16},children:h}),(0,b.jsx)(g,{}),(0,b.jsxs)(f.Section,{id:"scoring",title:"Scores",children:[(0,b.jsxs)(f.Body,{children:["How someone’s power score is worked out, and the four things you can change about it:"," ",(0,b.jsx)("a",{href:"#sector",style:{color:"#3498DB",textDecoration:"none",fontWeight:600},children:"your field"}),","," ",(0,b.jsx)("a",{href:"#tiers",style:{color:"#3498DB",textDecoration:"none",fontWeight:600},children:"how tiers are graded"}),","," ",(0,b.jsx)("a",{href:"#titles",style:{color:"#3498DB",textDecoration:"none",fontWeight:600},children:"how titles rank"})," and"," ",(0,b.jsx)("a",{href:"#companies",style:{color:"#3498DB",textDecoration:"none",fontWeight:600},children:"any company’s score"}),". A change here rescores everyone. How your network holds together is in"," ",(0,b.jsx)(d.default,{href:"/profile?view=insights",style:{color:"#3498DB",textDecoration:"none",fontWeight:600},children:"Profile → Insights"}),"."]}),(0,b.jsx)(R,{onSaved:l}),(0,b.jsx)(Y,{onSaved:l}),(0,b.jsx)(ad,{onSaved:l}),(0,b.jsx)("div",{id:"companies",style:{marginTop:28},children:(0,b.jsx)(ae.default,{version:j})})]}),(0,b.jsx)(D,{}),(0,b.jsx)(f.Section,{id:"about",title:"About this copy",children:m?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)(f.Body,{children:["Version ",(0,b.jsx)(f.Mono,{children:m.version}),", running as ",ag[m.kind]||m.kind,"."]}),(0,b.jsxs)(f.Body,{children:["Your network is kept in ",(0,b.jsx)(f.Mono,{children:m.dataDir}),m.customDataDir?" (a folder you chose).":".","mac-app"===m.kind&&" Help → Show the Data Folder opens it."]}),(0,b.jsx)(f.Body,{style:{fontSize:12,color:"#667",marginTop:10},children:"Settings are saved with your network, on this computer. Nothing here is sent anywhere."})]}):!h&&(0,b.jsx)(f.Body,{children:"Loading…"})})]})]})}a.s(["default",0,function(){return(0,b.jsx)(e.default,{children:(0,b.jsx)(ah,{})})}],54209)}];
1
+ module.exports=[54209,a=>{"use strict";var b=a.i(87924),c=a.i(72131),d=a.i(38246),e=a.i(36839),f=a.i(16874);function g(){let[a,d]=(0,c.useState)(null);return((0,c.useEffect)(()=>{fetch("/api/update").then(a=>a.json()).then(d).catch(()=>{})},[]),a)?a.installed?(0,b.jsx)(k,{local:a}):(0,b.jsx)(i,{local:a}):null}async function h(a){let b=await fetch("/api/update",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)}),c=await b.json().catch(()=>({}));return{ok:b.ok,d:c}}function i({local:a}){let[d,e]=(0,c.useState)(null),[g,j]=(0,c.useState)(null),[k,l]=(0,c.useState)(null),[m,n]=(0,c.useState)(null);async function o(a){j(a),l(null);try{let{ok:b,d:c}=await h({action:a});if(!b){l(c.error||"Something went wrong."),c.dirty&&e({dirty:c.dirty});return}"check"===a?e(c):(n(c),e(null))}catch(a){l(a.message)}finally{j(null)}}return(0,c.useEffect)(()=>{"updates"===new URLSearchParams(window.location.search).get("check")&&(document.getElementById("updates")?.scrollIntoView({block:"center"}),o("check"),window.history.replaceState(null,"",window.location.pathname))},[]),(0,b.jsxs)(f.Section,{id:"updates",title:"Updates",children:[m?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)(f.Body,{children:["Updated to ",(0,b.jsx)(f.Mono,{children:m.sha})," — “",m.subject,"”."]}),(0,b.jsx)(f.Body,{style:{color:m.needsRestart?"#FFD700":void 0},children:m.needsRestart?"Stop the app in your terminal and start it again — this update changed how it starts.":"The page will pick up most changes on its own. Restart the app if anything looks odd."})]}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)(f.Body,{children:["You are on ",(0,b.jsx)(f.Mono,{children:a.sha})," — “",a.subject,"”."]}),d&&0===d.behind&&(0,b.jsx)(f.Status,{tone:"ok",children:"You’re up to date."}),d&&d.behind>0&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)(f.Body,{style:{color:"#00ff88"},children:[d.behind," update",1===d.behind?"":"s"," available."]}),(0,b.jsx)("pre",{style:q,children:d.commits.join("\n")})]}),d?.dirty?.length>0&&(0,b.jsxs)(f.Body,{children:["Changed files here:"," ",(0,b.jsx)(f.Mono,{children:d.dirty.join(", ")}),". Commit or discard them first — this will not throw away your work."]}),(0,b.jsxs)(p,{children:[(0,b.jsx)(f.Btn,{onClick:()=>o("check"),disabled:!!g,children:"check"===g?"Checking…":"Check for updates"}),d?.behind>0&&(0,b.jsx)(f.Btn,{onClick:()=>o("pull"),disabled:!!g,primary:!0,children:"pull"===g?"Updating…":`Install ${d.behind} update${1===d.behind?"":"s"}`})]})]}),k&&(0,b.jsx)(f.Body,{style:{color:"#ff7676"},children:k}),(0,b.jsxs)(f.Body,{style:{fontSize:12,color:"#667",marginTop:12},children:["Nothing is checked automatically and nothing about you is sent — this runs the same ",(0,b.jsx)(f.Mono,{children:"git fetch"})," and ",(0,b.jsx)(f.Mono,{children:"git pull"})," you would type yourself."]})]})}let j=["checking","downloading","verifying","preparing","restarting"];function k({local:a}){let d="mac-app"===a.kind,[e,g]=(0,c.useState)(!1),[i,r]=(0,c.useState)(null),[s,t]=(0,c.useState)(null),[u,v]=(0,c.useState)(!1),[w,x]=(0,c.useState)(null),[y,z]=(0,c.useState)(a.job||null),[A,B]=(0,c.useState)(!1),[C,D]=(0,c.useState)(null),[E,F]=(0,c.useState)(null),[G,H]=(0,c.useState)(void 0),[I,J]=(0,c.useState)(0),[K,L]=(0,c.useState)(!1),M=!!(y&&j.includes(y.phase)),N=M&&("restarting"===y.phase||I>0);async function O(){g(!0),r(null),t(null),D(null),F(null),H(void 0),z(a=>a&&j.includes(a.phase)?a:null);try{let{ok:a,d:b}=await h({action:"check-release"});a?(r(b),x(new Date)):t(b.error||"Could not check.")}catch(a){t(a.message)}finally{g(!1)}}async function P(){B(!0),D(null),F(null),H(void 0),J(0),L(!1);try{let{ok:a,d:b}=await h({action:"install-release"});b.job&&z(b.job),!a&&(D(b.error||"The update could not start."),F(b.refusal||null),"fallback"in b&&H(b.fallback))}catch(a){D(a.message)}finally{B(!1)}}async function Q(){try{let{d:a}=await h({action:"cancel-install"});a.job&&z(a.job)}catch{}}async function R(){try{await navigator.clipboard.writeText(a.command),v(!0),setTimeout(()=>v(!1),1600)}catch{t("Could not copy — select the line and copy it by hand.")}}(0,c.useEffect)(()=>{"#updates"===window.location.hash&&document.getElementById("updates")?.scrollIntoView({block:"start"}),"updates"!==new URLSearchParams(window.location.search).get("check")||(window.history.replaceState(null,"",window.location.pathname),a.job&&j.includes(a.job.phase)||(document.getElementById("updates")?.scrollIntoView({block:"center"}),O().then(()=>document.getElementById("updates")?.scrollIntoView({block:"end",behavior:"smooth"}))))},[a.job]),(0,c.useEffect)(()=>{if(!M)return;let a=!0,b=setTimeout(async()=>{try{if(N){let b=await fetch("/api/update",{cache:"no-store"}),c=await b.json();if(!a)return;if(!c.job||c.job.id!==y.id)return void window.location.reload();J(0),z(c.job)}else{let{ok:b,d:c}=await h({action:"update-status"});a&&b&&c.job&&z(c.job)}}catch{a&&J(a=>a+1)}},N?1500:600);return()=>{a=!1,clearTimeout(b)}},[y,I,M,N]),(0,c.useEffect)(()=>{if(!N)return;let a=setTimeout(()=>L(!0),6e4);return()=>clearTimeout(a)},[N]);let S=y?.phase==="failed",T=d&&i?.install?.possible,U=S&&"stale-check"===y.code||"not-checked"===E,V=void 0!==G?G:i?.fallback,W="windows-app"===a.kind||"linux-app"===a.kind,X=!W&&i?.newer&&(!d||V)&&(!T||S||C||a.lastUpdate?.tone==="bad"),Y=function({mac:a,kind:b,canInstall:c,fallback:d}){if(!a)return"source"===b?"A copy built from the source code updates by fetching the code and building it again, which it can't do while it runs. Stop it (Ctrl-C), then run this in the six-degrees folder. Your network stays where it is.":"This copy runs inside the terminal that started it, so it can't replace itself while it runs. Stop it first (Ctrl-C), then run this to start the newest version. Your network stays where it is.";if(!d)return null;let e=d.dataDir?` It opens the new version on the usual data folder, not on ${d.dataDir}: to use that one, quit it and open it again with --data-dir, as you opened this one.`:"";return"replace"===d.mode?`${c?"Or paste this into Terminal.":"Paste this into Terminal instead."} It closes this app, puts the new version in its place and opens it. Your network stays where it is.${e}`:`${c?"Or copy":"Copy"} this line, quit Six Degrees, then paste it into Terminal. It installs the new version at ${d.installsTo}, not where this copy is, and opens it: use that one from then on. Your network stays where it is.${e}`}({mac:d,kind:a.kind,canInstall:T,fallback:V});return(0,b.jsxs)(f.Section,{id:"updates",title:"Updates",children:[a.lastUpdate&&!M&&(0,b.jsx)(n,{report:a.lastUpdate}),(0,b.jsxs)(f.Body,{children:["You have version ",(0,b.jsx)(f.Mono,{children:a.version}),"."]}),M?(0,b.jsx)(m,{job:y,restarting:N,slow:K,onCancel:Q}):(0,b.jsxs)(b.Fragment,{children:[S&&(0,b.jsxs)(f.Status,{tone:"bad",children:[(0,b.jsx)("strong",{children:"The update didn’t finish."})," ",y.error," Nothing was changed."]}),y?.phase==="cancelled"&&(0,b.jsx)(f.Status,{children:"Cancelled. Nothing was changed."}),C&&(0,b.jsx)(f.Status,{tone:"bad",children:C}),i&&!i.latest&&(0,b.jsx)(f.Status,{children:"No release has been published yet."}),i?.latest&&!i.newer&&(0,b.jsxs)(f.Status,{tone:"ok",children:["You’re up to date: ",i.latest.version," is the newest version.",w&&(0,b.jsxs)("span",{style:{color:"#8b9a9a"},children:[" Checked at ",w.toLocaleTimeString([],{hour:"numeric",minute:"2-digit"}),"."]})]}),i?.newer&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)(f.Body,{style:{color:"#00ff88"},children:["Version ",i.latest.version," is available."]}),T&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)(f.Body,{children:["It downloads ",i.install.size?`about ${l(i.install.size)} MB`:"the new version"," from GitHub, checks it, then closes, replaces itself and reopens. Your network isn’t touched, and a backup of it is made first."]}),(0,b.jsxs)(p,{children:[U?(0,b.jsx)(f.Btn,{onClick:O,disabled:e,primary:!0,children:e?"Checking…":"Check again"}):(0,b.jsx)(f.Btn,{onClick:P,disabled:A,primary:!0,children:A?"Starting…":S||C?"Try again":"Install and restart"}),(0,b.jsx)(o,{url:i.latest.url})]})]}),d&&!T&&i.install?.reason&&(0,b.jsx)(f.Body,{children:i.install.reason}),W&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)(f.Body,{children:["windows-app"===a.kind?"Download its Setup.exe from the release page and run it: it closes this copy, puts the new version in its place and opens it.":"Download its .deb (or .tar.gz) from the release page and install it over this one, after quitting Six Degrees."," ","Your network stays where it is."]}),(0,b.jsx)(p,{children:(0,b.jsx)("a",{href:(i.download||i.latest).url,target:"_blank",rel:"noreferrer",style:{display:"inline-block",padding:"8px 16px",borderRadius:8,fontSize:13,fontWeight:700,textDecoration:"none",background:"linear-gradient(135deg, #9B59B6, #3498DB)",color:"#fff"},children:"Open the release page"})})]}),X&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(f.Body,{children:Y}),a.testReleases?(0,b.jsx)("pre",{style:q,children:"Not shown in test mode: it would install the real release from GitHub into Applications."}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("pre",{style:q,children:a.command}),(0,b.jsxs)(p,{children:[(0,b.jsx)(f.Btn,{onClick:R,primary:!T,children:u?"Copied":"Copy"}),!T&&(0,b.jsx)(o,{url:i.latest.url})]})]})]}),!T&&!X&&!W&&(0,b.jsx)(p,{children:(0,b.jsx)(o,{url:i.latest.url})})]}),!i?.newer&&(0,b.jsx)(p,{children:(0,b.jsx)(f.Btn,{onClick:O,disabled:e,children:e?"Checking…":i?"Check again":"Check for updates"})})]}),s&&(0,b.jsx)(f.Body,{style:{color:"#ff7676"},children:s}),(0,b.jsxs)(f.Body,{style:{fontSize:12,color:"#667",marginTop:12},children:["Nothing is checked automatically. The button asks GitHub for the newest version number, and nothing about you is sent.",d&&" Only a second click, Install and restart, downloads the new version."]}),a.testReleases&&(0,b.jsxs)(f.Body,{style:{fontSize:12,color:"#FFD700",marginTop:6},children:["Test mode: releases are read from ",(0,b.jsx)(f.Mono,{children:a.testReleases})," on this computer, not from GitHub."]})]})}let l=a=>Math.max(1,Math.round(a/1e6));function m({job:a,restarting:c,slow:d,onCancel:e}){let g=a.total?Math.min(100,Math.round(a.received/a.total*100)):null,h=c?"Restarting… Six Degrees closes and opens again in a moment.":"checking"===a.phase?"Asking GitHub for the newest version…":"downloading"===a.phase?`Downloading ${a.version}…${null!==g?` ${g}% (${l(a.received)} of ${l(a.total)} MB)`:""}`:"verifying"===a.phase?"Checking the download…":"Preparing the new version…";return(0,b.jsxs)("div",{role:"status","aria-live":"polite",style:{marginTop:12},children:[(0,b.jsx)(f.Body,{style:{color:"#e8e8ee"},children:h}),"downloading"===a.phase&&null!==g&&(0,b.jsx)("div",{role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":g,"aria-label":"Download",style:{height:6,borderRadius:3,background:"rgba(255,255,255,0.08)",marginTop:10,overflow:"hidden",maxWidth:420},children:(0,b.jsx)("div",{style:{width:`${g}%`,height:"100%",background:"linear-gradient(90deg, #9B59B6, #3498DB)",transition:"width 0.4s ease"}})}),d&&(0,b.jsx)(f.Body,{children:"This is taking longer than it should. If Six Degrees doesn’t open again by itself, open it from your Applications folder."}),!c&&(0,b.jsx)(p,{children:(0,b.jsx)(f.Btn,{onClick:e,children:"Cancel"})})]})}function n({report:a}){let c=new Date(a.at).toLocaleString([],{dateStyle:"medium",timeStyle:"short"});return(0,b.jsxs)(f.Status,{tone:"ok"===a.tone?"ok":"bad",children:[a.text," ",(0,b.jsxs)("span",{style:{color:"#8b9a9a"},children:["(",c,")"]}),"ok"===a.tone&&a.previous&&(0,b.jsxs)("span",{style:{display:"block",fontSize:12.5,color:"#8b9a9a",marginTop:4},children:["A copy of the version you had is kept in ",(0,b.jsx)(f.Mono,{children:a.previous})," until the next update. To go back to it, open that file and drag the app it gives you into your Applications folder."]})]})}function o({url:a}){return a?(0,b.jsx)("a",{href:a,target:"_blank",rel:"noreferrer",style:{color:"#3498DB",fontSize:13.5},children:"What changed →"}):null}function p({children:a}){return(0,b.jsx)("div",{style:{display:"flex",gap:10,marginTop:12,flexWrap:"wrap",alignItems:"center"},children:a})}let q={background:"rgba(0,0,0,0.45)",border:f.LINE,borderRadius:8,padding:12,margin:"8px 0 0",fontSize:12,lineHeight:1.7,color:"#b9c6c6",fontFamily:"ui-monospace, SFMono-Regular, Menlo, monospace",whiteSpace:"pre-wrap",maxHeight:180,overflow:"auto"};function r(a){if(!a)return"0 KB";if(a<1048576)return`${Math.max(1,Math.round(a/1024))} KB`;let b=a/1048576;return`${b<10?b.toFixed(1):Math.round(b)} MB`}let s=a=>Number(a||0).toLocaleString("en-US"),t=(a,b,c=`${b}s`)=>`${s(a)} ${1===Number(a)?b:c}`;function u(a,b=!0){if(!a)return null;let c=new Date(a);return Number.isNaN(c.getTime())?null:c.toLocaleString(void 0,b?{dateStyle:"medium",timeStyle:"short"}:{dateStyle:"medium"})}let v={auto:"before a new version",import:"before an import",manual:"made by hand"};async function w(a,b){let c=await a.json().catch(()=>({}));if(!a.ok)throw Object.assign(Error(c.error||b),{data:c});return c}let x={display:"flex",gap:10,marginTop:12,flexWrap:"wrap",alignItems:"center"},y={fontSize:12,color:"#667",marginTop:10},z={fontSize:14,fontWeight:650,margin:"26px 0 4px",color:"#e8e8ee"},A={display:"flex",gap:8,alignItems:"flex-start",marginTop:12,fontSize:13,color:"#c8d0d0",lineHeight:1.5,cursor:"pointer"};function B({label:a,children:c}){return(0,b.jsxs)("div",{style:{display:"flex",gap:12,justifyContent:"space-between",padding:"7px 0",borderTop:f.LINE,fontSize:13.5},children:[(0,b.jsx)("span",{style:{color:"#8b9a9a"},children:a}),(0,b.jsx)("span",{style:{color:"#e8e8ee",textAlign:"right"},children:c})]})}function C(){return(0,b.jsx)("a",{href:"https://github.com/blakeb056/six-degrees#undo-an-import",target:"_blank",rel:"noreferrer",style:{color:"inherit",textDecoration:"underline"},children:"Undo an import"})}function D(){let[a,d]=(0,c.useState)(null),[e,g]=(0,c.useState)(null),[h,i]=(0,c.useState)(null),[j,k]=(0,c.useState)(null),[l,m]=(0,c.useState)(null),[n,o]=(0,c.useState)(null),[p,q]=(0,c.useState)(!0),[D,E]=(0,c.useState)(!0),[F,G]=(0,c.useState)(null),[H,I]=(0,c.useState)(!1),[J,K]=(0,c.useState)(!1),L=(0,c.useRef)(null),M=(0,c.useRef)(!1),N=(0,c.useCallback)(()=>fetch("/api/data",{cache:"no-store"}).then(a=>w(a,"The data folder could not be read.")).then(a=>{let b=Date.parse(a.lastImport?.appliedAt||"");d({...a,importIsRecent:Number.isFinite(b)&&Date.now()-b<864e5}),g(null)}).catch(a=>g(a.message)),[]);async function O(){k(null);try{await navigator.clipboard.writeText(a.dataDir),k({tone:"ok",text:"Copied the folder’s path."})}catch{k({tone:"bad",text:"This window can’t copy. Select the path above and copy it instead."})}}async function P(){i("reveal"),k(null);try{await w(await fetch("/api/data/reveal",{method:"POST"}),"The folder could not be opened."),k({tone:"ok",text:"darwin"===a.platform?"Opened in Finder.":"Opened in your file browser."})}catch(a){k({tone:"bad",text:a.message})}finally{i(null)}}async function Q(){i("export"),m(null);try{let a,b=await fetch("/api/data/export",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({photos:p,social:D})});b.ok||await w(b,"The copy could not be made.");let c=await b.blob(),d=/filename="([^"]+)"/.exec(b.headers.get("content-disposition")||"")?.[1]||"Six Degrees backup.sixdegrees",e=URL.createObjectURL(c),f=document.createElement("a");f.href=e,f.download=d,f.style.position="fixed",f.style.left="-9999px",document.body.appendChild(f),f.click(),f.remove(),setTimeout(()=>URL.revokeObjectURL(e),6e4);let g=[(a=Number(b.headers.get("x-six-degrees-people")),t(a,"person","people"))];g.push(p?t(Number(b.headers.get("x-six-degrees-photos")),"photo"):"no photos"),m({tone:"ok",text:`Made “${d}” (${r(c.size)}: ${g.join(", ")}). Look for it in your Downloads folder, or wherever you chose to save it.`})}catch(a){m({tone:"bad",text:a.message})}finally{i(null)}}async function R(){if(F){i("import"),o(null);try{let b={"Content-Type":"application/octet-stream","X-Six-Degrees-Size":String(F.size)};a.people>0&&(b["X-Six-Degrees-Replace"]=String(a.people)),await w(await fetch("/api/data/import",{method:"POST",headers:b,body:F}),"The file could not be imported."),G(null),I(!1),L.current&&(L.current.value=""),await N()}catch(a){a.data?.needsConfirm&&(I(!1),await N()),o({tone:"bad",text:a.message})}finally{i(null)}}}async function S(){i("cancel"),o(null);try{await w(await fetch("/api/data/import",{method:"DELETE"}),"The import could not be cancelled."),await N(),o({tone:"ok",text:"Cancelled. The network here stays as it is."})}catch(a){o({tone:"bad",text:a.message})}finally{i(null)}}async function T(){i("restart"),o(null);try{await w(await fetch("/api/data/restart",{method:"POST"}),"Six Degrees could not restart."),K(!0);let a=a=>new Promise(b=>setTimeout(b,a)),b=Date.now()+9e4;for(await a(2500);Date.now()<b;){try{if((await fetch("/api/data",{cache:"no-store"})).ok)return void window.location.reload()}catch{}await a(1e3)}K(!1),o({tone:"bad",text:"Six Degrees didn’t come back. Quit it and open it again: the import finishes as it starts."})}catch(a){o({tone:"bad",text:a.message})}finally{i(null)}}if((0,c.useEffect)(()=>{N()},[N]),(0,c.useEffect)(()=>{a&&!M.current&&(M.current=!0,"#data"===window.location.hash&&document.getElementById("data")?.scrollIntoView({block:"start"}))},[a]),!a)return(0,b.jsx)(f.Section,{id:"data",title:"Your data",children:e?(0,b.jsx)(f.Status,{tone:"bad",children:e}):(0,b.jsx)(f.Body,{children:"Loading…"})});let U=a.pending,V=a.photosInCopy||a.photos,W=a.backups||[],X=W.reduce((a,b)=>a+(b.bytes||0),0),Y=!!(F&&F.size>a.maxImportBytes),Z=a.people>0,$=a.lastImport;return(0,b.jsxs)(f.Section,{id:"data",title:"Your data",intro:"Everything Six Degrees knows about your network is in one folder on this computer.",children:[(0,b.jsx)(f.Body,{children:(0,b.jsx)(f.Mono,{children:a.dataDir})}),(0,b.jsxs)("div",{style:x,children:[(0,b.jsx)(f.Btn,{onClick:O,children:"Copy the path"}),(0,b.jsx)(f.Btn,{onClick:P,disabled:"reveal"===h,children:"reveal"===h?"Opening…":"darwin"===a.platform?"Show in Finder":"Open the folder"})]}),j&&(0,b.jsx)(f.Status,{tone:j.tone,children:j.text}),(0,b.jsxs)("div",{style:{marginTop:16,borderBottom:f.LINE},children:[(0,b.jsxs)(B,{label:"Your network",children:[t(a.people,"person","people")," · ",r(a.databaseBytes)]}),(0,b.jsx)(B,{label:"Profile photos",children:a.photos.count?`${s(a.photos.count)} \xb7 ${r(a.photos.bytes)}`:"none saved yet"}),(0,b.jsx)(B,{label:"Backups",children:W.length?`${t(W.length,"copy","copies")} \xb7 ${r(X)}`:"none yet"}),(0,b.jsx)(B,{label:"LinkedIn sign-in for scanning",children:a.linkedinSignIn?"kept here, never put in a copy":"not signed in on this computer"})]}),W.length>0&&(0,b.jsxs)("details",{style:{marginTop:10,fontSize:13,color:"#8b9a9a"},children:[(0,b.jsx)("summary",{style:{cursor:"pointer"},children:"The backups"}),(0,b.jsx)("div",{style:{display:"grid",gridTemplateColumns:"minmax(0, 1fr) auto auto",gap:"6px 14px",marginTop:8},children:W.map(a=>(0,b.jsxs)("div",{style:{display:"contents"},children:[(0,b.jsxs)("span",{style:{wordBreak:"break-all",color:"#c8d0d0"},children:[a.name,a.folder?"/":"",(0,b.jsxs)("span",{style:{color:"#667"},children:[" · ",a.folder?"its photos and files":v[a.kind]||a.kind]})]}),(0,b.jsx)("span",{children:u(a.modifiedAt)}),(0,b.jsx)("span",{style:{textAlign:"right"},children:r(a.bytes)})]},a.name))})]}),(0,b.jsx)(f.Body,{style:y,children:"Backups are copies of your network from before a new version or an import. The newest five from new versions are kept; copies from before an import stay until you delete them."}),(0,b.jsx)(f.Body,{style:y,children:"The folder can’t be moved from here. A database that a sync service (iCloud Drive, Dropbox) copies while it’s open can be damaged, and this folder also holds your LinkedIn sign-in, which should never be synced. To use your network on another computer, save a copy below and import it there."}),(0,b.jsx)("h3",{style:z,children:"Move your network to another computer"}),(0,b.jsx)(f.Body,{children:"Save a copy here, then on the new computer install Six Degrees, open Settings → Your data and import the copy. Sign in to LinkedIn again there before you scan: your sign-in never goes into a copy."}),(0,b.jsxs)("label",{style:A,children:[(0,b.jsx)("input",{type:"checkbox",checked:p,onChange:a=>q(a.target.checked),style:{marginTop:3}}),(0,b.jsxs)("span",{children:["Include profile photos",V.count?` (${s(V.count)}, ${r(V.bytes)})`:"",". They can’t be downloaded again without a new scan."]})]}),(0,b.jsxs)("label",{style:A,children:[(0,b.jsx)("input",{type:"checkbox",checked:D,onChange:a=>E(a.target.checked),style:{marginTop:3}}),(0,b.jsx)("span",{children:"Include the Social tab: its findings, your CRM notes, stages and follow-ups, and any messages you keep there."})]}),(0,b.jsxs)("div",{style:x,children:[(0,b.jsx)(f.Btn,{primary:!0,onClick:Q,disabled:!!h||J||0===a.people,children:"export"===h?"Saving…":"Save a copy of my network"}),0===a.people&&(0,b.jsx)("span",{style:{fontSize:13,color:"#8b9a9a"},children:"There’s no network here to save yet."})]}),l&&(0,b.jsx)(f.Status,{tone:l.tone,children:l.text}),(0,b.jsx)(f.Body,{style:y,children:"The copy holds the names, headlines and photos of the people in your network. Keep it private: don’t post it or share it, and delete it once it has been imported. A network opened from a LinkedIn CSV lives only in its browser tab, so it isn’t in the copy; import the CSV again on the new computer. With the Social tab included, the copy also holds your CRM notes and any messages you keep, so it’s as private as your inbox."}),(0,b.jsx)("h3",{style:z,children:"Bring in a network from another computer"}),U?(0,b.jsxs)(f.Status,{children:[(0,b.jsx)("div",{style:{fontWeight:650},children:"An import is waiting to finish."}),(0,b.jsxs)("div",{children:["The network in the copy",U.exportedAt?` saved ${u(U.exportedAt,!1)}`:""," ","(",t(U.people,"person","people"),U.photos?`, ${t(U.photos,"photo")}`:"",U.fromVersion?`, from Six Degrees ${U.fromVersion}`:"",")",U.replacedPeople>0?` replaces the ${t(U.replacedPeople,"person","people")} here the next time Six Degrees starts. A copy of what’s here now is kept in backups first, so the import can be undone.`:" becomes the network here the next time Six Degrees starts."," ","Your LinkedIn search budget and any pause on scanning are kept."]}),U.error&&(0,b.jsxs)("div",{style:{color:"#ff7676",marginTop:6},children:["The last try stopped: ",U.error.replace(/\.$/,""),". It tries again the next time Six Degrees starts."]}),J?(0,b.jsx)("div",{style:{marginTop:8},children:"Restarting… this page comes back in a few seconds."}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("div",{style:{marginTop:8},children:a.restart.how}),a.restart.command&&(0,b.jsx)("div",{style:{marginTop:6},children:(0,b.jsx)(f.Mono,{children:a.restart.command})}),(0,b.jsxs)("div",{style:x,children:[a.restart.canRestart&&(0,b.jsx)(f.Btn,{primary:!0,onClick:T,disabled:!!h,children:"restart"===h?"Restarting…":"Restart now"}),!U.started&&(0,b.jsx)(f.Btn,{onClick:S,disabled:!!h,children:"cancel"===h?"Cancelling…":"Cancel the import"})]})]})]}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(f.Body,{children:"Pick the copy you saved on the other computer (a .sixdegrees file). It replaces the network here; the two networks are never merged. Your LinkedIn search budget and any pause on scanning are kept, with the other computer’s searches added."}),(0,b.jsx)("input",{ref:L,type:"file",accept:".sixdegrees",onChange:function(a){o(null),I(!1),G(a.target.files?.[0]||null)},style:{display:"none"}}),(0,b.jsxs)("div",{style:x,children:[(0,b.jsx)(f.Btn,{onClick:()=>L.current?.click(),disabled:!!h,children:"Choose a file…"}),F&&(0,b.jsxs)("span",{style:{fontSize:13,color:"#c8d0d0",wordBreak:"break-all"},children:[F.name," · ",r(F.size)]})]}),Y&&(0,b.jsxs)(f.Status,{tone:"bad",children:["That file is ",r(F.size),". This copy can import files up to ",r(a.maxImportBytes),"."]}),F&&Z&&!Y&&(0,b.jsxs)("label",{style:A,children:[(0,b.jsx)("input",{type:"checkbox",checked:H,onChange:a=>I(a.target.checked),style:{marginTop:3}}),(0,b.jsxs)("span",{children:["Replace the ",t(a.people,"person","people")," in this copy’s network with the network in this file. A copy of what’s here is kept in backups first. Your search budget and any pause on scanning are kept too."]})]}),(0,b.jsx)("div",{style:x,children:(0,b.jsx)(f.Btn,{primary:!0,onClick:R,disabled:!F||Y||Z&&!H||!!h,children:"import"===h?"Checking the file…":"Import"})})]}),n&&(0,b.jsx)(f.Status,{tone:n.tone,children:n.text}),$&&!U&&(a.importIsRecent?(0,b.jsxs)(f.Status,{tone:"ok",children:["Imported ",u($.appliedAt),": ",t($.people,"person","people"),$.exportedAt?` from the copy saved ${u($.exportedAt,!1)}`:"",".",$.keptDatabase&&(0,b.jsxs)(b.Fragment,{children:[" ","What was here before is kept in ",(0,b.jsx)(f.Mono,{children:$.keptDatabase}),$.keptFiles?", with its photos and files beside it":"",".",$.keptAsIs&&" It couldn’t be read, so it was kept exactly as it was."," ","To go back to it, see ",(0,b.jsx)(C,{}),"."]})]}):(0,b.jsxs)(f.Body,{style:y,children:["Last import: ",u($.appliedAt)," (",t($.people,"person","people"),").",$.keptDatabase&&(0,b.jsxs)(b.Fragment,{children:[" What was here before is kept in ",(0,b.jsx)(f.Mono,{children:$.keptDatabase})," (",(0,b.jsx)(C,{}),")."]})]}))]})}var E=a.i(803),F=a.i(79663),G=a.i(59534),H=a.i(54919),I=a.i(30889);a.i(59943);var J=a.i(29470);a.i(42510);var K=a.i(31483);let L={lean:"Lean",strong:"Strong"},M=["wheel","touchstart","keydown","pointerdown"],N={1:"1st",2:"2nd",3:"3rd"},O=(a,b,c=`${b}s`)=>`${a.toLocaleString()} ${1===a?b:c}`,P=G.DIRECTORY.filter(a=>"function"===a.kind).map(a=>a.label);function Q(a,b,c){let[d,e]=c?["moved","moved"]:["moves","move"];if(!a&&!b)return c?"No one changed tier.":"No one changes tier.";let f=a=>1===a?d:e;return a&&b?`${O(a,"person","people")} ${f(a)} up a tier and ${b.toLocaleString()} ${f(b)} down.`:a?`${O(a,"person","people")} ${f(a)} up a tier.`:`${O(b,"person","people")} ${f(b)} down a tier.`}function R({onSaved:a}={}){let[d,e]=(0,c.useState)(null),[g,h]=(0,c.useState)(null),[i,j]=(0,c.useState)(null),[k,l]=(0,c.useState)(!1),[m,n]=(0,c.useState)(null),[o,p]=(0,c.useState)(null),[q,r]=(0,c.useState)({loading:!0}),[s]=(0,c.useState)(()=>null),t=(0,c.useRef)(null),u=(0,c.useRef)(0),v=(0,c.useRef)(!1);function w(a){h(a),n(null),clearTimeout(t.current);let b=++u.current;if((0,F.sameFocus)(a,d))return void j(null);let c=(0,F.focusFingerprint)(a);j({key:c,loading:!0}),t.current=setTimeout(async()=>{try{let d=await fetch("/api/settings/sector-preview",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({sectorFocus:a})}),e=await d.json();if(b!==u.current)return;j(d.ok?{key:c,...e}:{key:c,error:e.error||"Could not work out what would change."})}catch{b===u.current&&j({key:c,error:"Could not reach the app to work out what would change."})}},250)}async function x(){var b,c;let d;l(!0),n(null),clearTimeout(t.current),u.current++;let f=await (0,K.saveSettings)({sectorFocus:g});(l(!1),f.settings&&(e(f.settings.sectorFocus),h(f.settings.sectorFocus),j(null)),f.error)?n({tone:"bad",text:f.error}):(n({tone:"ok",text:(b=f.settings.sectorFocus,c=f.effects?.sectorFocus,d=b.sectors.length?`Saved: ${b.sectors.map(a=>(0,H.sectorByKey)(a).label).join(" · ")} (${L[b.strength].toLowerCase()}).`:"Saved: no sector.",c?c.scored?`${d} Rescored your network (${O(c.people??c.scored,"person","people")}). ${Q(c.up,c.down,!0)}`:`${d} There's no scanned network yet; it will apply when you scan.`:d)}),a?.())}(0,c.useEffect)(()=>{let a=!1;return fetch("/api/settings").then(a=>a.json().then(b=>a.ok?b:Promise.reject(Error(b.error||"Could not load your sector.")))).then(b=>{if(a)return;let c=b.settings?.sectorFocus||{sectors:[],strength:"lean"};e(c),h(c)}).catch(b=>{a||p(b.message)}),fetch("/api/settings/sector-suggestions").then(a=>a.json().then(b=>a.ok?b:Promise.reject(Error(b.error||"Could not load suggestions.")))).then(b=>{a||r({scored:b.scored,list:b.suggestions||[]})}).catch(b=>{a||r({error:b.message})}),()=>{a=!0,clearTimeout(t.current)}},[]),(0,c.useEffect)(()=>{if(v.current||!g&&!o)return;v.current=!0;let a=document.getElementById("sector");if("#sector"!==window.location.hash||!a)return;let b=()=>a.scrollIntoView({block:"start"});b();let c=new ResizeObserver(b);c.observe(document.body);let d=()=>{for(let a of(c.disconnect(),clearTimeout(e),M))window.removeEventListener(a,d,!0)},e=setTimeout(d,2e3);for(let a of M)window.addEventListener(a,d,{capture:!0,passive:!0});return d},[g,o]);let y=g&&d&&!(0,F.sameFocus)(g,d);return(0,b.jsxs)(f.Section,{id:"sector",title:"Your sector",intro:"Pick up to three sectors you work in. Companies in them count for more when your network is scored, so the people there rank higher.",children:[o&&(0,b.jsx)(f.Status,{tone:"bad",children:o}),!g&&!o&&(0,b.jsx)(f.Body,{children:"Loading…"}),g&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(E.default,{sectors:g.sectors,onChange:a=>w({...g,sectors:a}),disabled:k,suggest:q}),(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:8,marginTop:14},children:[(0,b.jsx)("span",{style:{fontSize:13,color:"#8b9a9a"},children:"How much:"}),Object.keys(I.SECTOR_BONUS).map(a=>(0,b.jsxs)("button",{type:"button","aria-pressed":g.strength===a,disabled:k,onClick:()=>w({...g,strength:a}),style:{padding:"5px 12px",borderRadius:7,fontSize:12.5,fontWeight:600,cursor:"pointer",color:g.strength===a?"#fff":"#8b9a9a",background:g.strength===a?"rgba(52,152,219,0.25)":"transparent",border:f.LINE},children:[L[a]," · +",I.SECTOR_BONUS[a]]},a))]}),(0,b.jsx)(f.Body,{style:{fontSize:12.5},children:"Each company in your sectors gets +1 (lean) or +2 (strong) on its score out of 10, never above 10. A company in more than one of your picks still gets it once."}),(0,b.jsx)(S,{preview:y?i:null,draft:g}),(0,b.jsxs)("div",{style:{display:"flex",gap:8,flexWrap:"wrap",marginTop:14},children:[(0,b.jsx)(f.Btn,{primary:!0,onClick:x,disabled:!y||k,children:k?"Saving and rescoring…":"Save"}),y&&!k&&(0,b.jsx)(f.Btn,{onClick:()=>w(d),children:"Cancel"}),!y&&g.sectors.length>0&&!k&&(0,b.jsx)(f.Btn,{onClick:()=>w({...g,sectors:[]}),children:"Turn off"})]}),m&&(0,b.jsx)(f.Status,{tone:m.tone,children:m.text}),(0,b.jsxs)("ul",{style:{margin:"16px 0 0",paddingLeft:18,fontSize:12.5,color:"#778",lineHeight:1.7},children:[(0,b.jsx)("li",{children:"Tiers rank how reachable someone is through your network, not the people themselves."}),(0,b.jsxs)("li",{children:["A company score you set on ",(0,b.jsx)("a",{href:"#companies",style:{color:"#3498DB"},children:"Company scores"}),", below, always wins. Your sector never changes it."]}),(0,b.jsx)("li",{children:"If you scan highest tier first, people in your sectors come up sooner. Scanning newest first, the default, doesn’t go by tier."}),(0,b.jsx)("li",{children:"An industry includes its sectors. It counts a company in any of its sectors (Healthcare & Biotech counts a practice that is only in Dental), and a company whose industry the app’s list of well-known companies or the company’s own name gives (Meridian Health). Not one known only from its people’s job titles: a recruiter at Acme Widgets doesn’t make Acme a consulting firm."}),(0,b.jsx)("li",{children:"A narrower sector counts a company when its name says so (Smith Family Dental), it’s a well-known company in that sector, or at least half of the people you know there say so in their headlines (dentist, DDS, orthodontist). The words are a fixed list that comes with the app, the same on every computer. Nothing is sent anywhere."}),(0,b.jsxs)("li",{children:["Some sectors are work every kind of company has: ",P.length>1?`${P.slice(0,-1).join(", ")} and ${P.at(-1)}`:P.join(""),". For those a job title doesn’t count, since a recruiter at Acme Widgets doesn’t make it a recruiting firm. The company’s name does (Acme Staffing, Smith CPA), and so does a kind of firm in a headline (staffing agency, law firm, SaaS)."]}),s&&(0,b.jsxs)("li",{style:{color:"#FFD700"},children:["sample"===s?"The sample network":"The CSV import"," open in this window isn’t changed by this, and isn’t counted in the suggestions. Your sector applies to networks you’ve scanned."]})]})]})]})}function S({preview:a,draft:c}){if(!a||a.key!==(0,F.focusFingerprint)(c))return null;let d={marginTop:12,padding:"10px 14px",borderRadius:8,fontSize:13,lineHeight:1.6,border:f.LINE,background:"rgba(255,255,255,0.03)",color:"#cfd8d8"};if(a.loading)return(0,b.jsx)("div",{style:d,"aria-live":"polite",children:"Working out what would change…"});if(a.error)return(0,b.jsx)(f.Status,{tone:"bad",children:a.error});if(!a.scored)return(0,b.jsx)("div",{style:d,"aria-live":"polite",children:"There’s no scanned network yet, so nothing changes now. Your choice applies once you scan."});let e=(a,b)=>`${O(a,"company","companies")} ${1===a?"scores":"score"} ${b}`,g=[a.companiesUp&&e(a.companiesUp,"higher"),a.companiesDown&&e(a.companiesDown,"lower")].filter(Boolean).join(" and ");return(0,b.jsxs)("div",{style:d,"aria-live":"polite",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("b",{style:{color:"#fff"},children:"If you save:"})," ",g?`${g}.`:"No company changes score."," ",Q(a.up,a.down,!1)]}),a.examples?.length>0&&(0,b.jsx)("div",{style:{marginTop:6,display:"flex",flexWrap:"wrap",gap:"4px 12px",fontSize:12.5},children:a.examples.map((a,c)=>(0,b.jsxs)("span",{title:a.company||void 0,children:[a.name,a.degree?(0,b.jsxs)("span",{style:{color:"#667"},children:[" (",N[a.degree]||`${a.degree}th`,")"]}):null," ",(0,b.jsx)("b",{style:{color:J.TIER_COLORS_CLASSIC[a.from]||"#889"},children:a.from||"–"})," → ",(0,b.jsx)("b",{style:{color:J.TIER_COLORS_CLASSIC[a.to]||"#889"},children:a.to})]},c))}),a.companyExamples?.length>0&&(0,b.jsx)("div",{style:{marginTop:4,fontSize:12,color:"#8b9a9a"},children:a.companyExamples.slice(0,3).map(a=>`${a.name} ${a.from} → ${a.to}`).join(" · ")})]})}let T=a=>`${Math.round(100*a)}%`,[U,V,W]=I.CURVE.map(([,a])=>a),X=[{key:"curve",label:"On your network's curve",note:`Your top ${T(U)} are S, the next ${T(V-U)} A and the next ${T(W-V)} B, so any network has a top, even one full of companies the app doesn't know. It only lifts: nobody drops a tier because their network is strong, and nobody under ${I.CURVE_FLOOR} is lifted into S or A.`},{key:"fixed",label:"On the fixed scale",note:"The same lines for everyone: S from 7.5, A from 5.5, B from 4, C from 2.5. Easy to compare from one network to another, but a network outside well-known companies has almost nobody in S or A."}];function Y({onSaved:a}={}){let[d,e]=(0,c.useState)(null),[g,h]=(0,c.useState)(!1),[i,j]=(0,c.useState)(null),[k,l]=(0,c.useState)(null),[m]=(0,c.useState)(()=>null);async function n(b){if(g||b===d)return;h(!0),j(null);let{settings:c,effects:f,error:i}=await (0,K.saveSettings)({tierScale:b});if(c&&e(c.tierScale),i)j({tone:"bad",text:i});else{let b,c=f?.tierScale;j({tone:"ok",text:c?`Saved. ${b=c.moved,`${b.toLocaleString()} ${1===b?"person":"people"}`} changed tier.`:"Saved."}),a?.()}h(!1)}return(0,c.useEffect)(()=>{let a=!1;return fetch("/api/settings").then(a=>a.json().then(b=>a.ok?b:Promise.reject(Error(b.error||"Could not load how tiers are graded.")))).then(b=>{a||e(b.settings?.tierScale||"curve")}).catch(b=>{a||l(b.message)}),()=>{a=!0}},[]),(0,b.jsxs)(f.Section,{id:"tiers",title:"Tiers",intro:"How the S to D rings are drawn. A tier says where someone sits in your network, not what they're worth.",children:[k&&(0,b.jsx)(f.Status,{tone:"bad",children:k}),d&&(0,b.jsx)("div",{role:"radiogroup","aria-label":"How tiers are graded",style:{display:"grid",gap:8},children:X.map(a=>{let c=d===a.key;return(0,b.jsxs)("button",{type:"button",role:"radio","aria-checked":c,disabled:g,onClick:()=>n(a.key),style:{textAlign:"left",padding:"12px 14px",borderRadius:8,cursor:g?"wait":c?"default":"pointer",color:"#fff",background:c?"rgba(155,89,182,0.14)":"rgba(255,255,255,0.03)",border:c?"1px solid rgba(155,89,182,0.6)":f.LINE},children:[(0,b.jsxs)("div",{style:{fontSize:14,fontWeight:650},children:[c?"● ":"○ ",a.label,"curve"===a.key?" (recommended)":""]}),(0,b.jsx)(f.Body,{style:{marginTop:4},children:a.note})]},a.key)})}),m&&(0,b.jsxs)(f.Body,{style:{color:"#FFD700",marginTop:10},children:["sample"===m?"The sample network open in this window keeps its own tiers (they’re the same either way).":"The CSV import open in this window is always graded on its own curve."," ","This applies to networks you’ve scanned."]}),i&&(0,b.jsx)(f.Status,{tone:i.tone,children:i.text})]})}let Z=["csuite","owner","vp","director","manager","senior","ic","unknown","intern","student"],$=Object.freeze({points:Object.freeze({}),roles:Object.freeze([])});function _(a=$){let b=Object.keys(a.points||{}).sort().map(b=>`${b}=${a.points[b]}`).join(","),c=(a.roles||[]).map(a=>`${a.text}=${a.points}`).sort().join(",");return b||c?`${b}|${c}`:"none"}let aa=[{key:"default",label:"As the app ranks them",ranking:$,note:"C-suite and founders first, then VPs, directors, managers."},{key:"founders",label:"Founders first",note:"Owners and entrepreneurs count like CEOs, and anyone who says founder counts as much: for meeting founders, or selling to them.",ranking:{points:{owner:10},roles:[{text:"founder",points:10},{text:"co-founder",points:10}]}},{key:"investors",label:"Investors",note:"Anyone who invests for a living rises to the top: for raising money.",ranking:{points:{},roles:["investor","venture","angel","general partner","managing partner","principal at","vc"].map(a=>({text:a,points:10}))}},{key:"role",label:"A role I’m looking for",note:"For outbound or hiring: add the role below, and everyone in it rises, whatever their level.",ranking:null}],ab=[10,9.5,9,8.5,8,7.5,7,6.5,6,5.5,5,4.5,4,3,2,1,0],ac={padding:"5px 8px",borderRadius:6,fontSize:12.5,cursor:"pointer",border:f.LINE,background:"rgba(0,0,0,0.3)",color:"#fff"};function ad({onSaved:a}={}){let[d,e]=(0,c.useState)(null),[g,h]=(0,c.useState)(null),[i,j]=(0,c.useState)(""),[k,l]=(0,c.useState)(10),[m,n]=(0,c.useState)(!1),[o,p]=(0,c.useState)(null),[q,r]=(0,c.useState)(null),s=(0,c.useRef)(null);if((0,c.useEffect)(()=>{let a=!1;return fetch("/api/settings").then(a=>a.json().then(b=>a.ok?b:Promise.reject(Error(b.error||"Could not load your title ranking.")))).then(b=>{if(!a){let a=b.settings?.titleRanking||$;e(a),h(a)}}).catch(b=>{a||r(b.message)}),()=>{a=!0}},[]),!g)return q?(0,b.jsx)(f.Status,{tone:"bad",children:q}):null;let t=(a,b)=>{let c={...g.points};b===I.LEVELS[a].points?delete c[a]:c[a]=b,h({...g,points:c}),p(null)},u=aa.find(a=>a.ranking&&_(a.ranking)===_(g))?.key??null,v=_(g)!==_(d);async function w(){n(!0),p(null);let{settings:b,effects:c,error:d}=await (0,K.saveSettings)({titleRanking:g});if(b&&(e(b.titleRanking),h(b.titleRanking)),d)p({tone:"bad",text:d});else{let b,d=c?.titleRanking;p({tone:"ok",text:d?`Saved. ${b=d.moved,`${b.toLocaleString()} ${1===b?"person":"people"}`} changed tier.`:"Saved."}),a?.()}n(!1)}return(0,b.jsxs)(f.Section,{id:"titles",title:"Titles",intro:"How much each kind of title counts towards someone's power, out of 10. Change it if you value some people more than the app does: founders, investors, or a role you're looking for.",children:[(0,b.jsx)("div",{style:{display:"flex",gap:6,flexWrap:"wrap",marginBottom:6},children:aa.map(a=>(0,b.jsx)("button",{type:"button",onClick:()=>{p(null),a.ranking?h({points:{...a.ranking.points},roles:[...a.ranking.roles]}):s.current?.focus()},"aria-pressed":u===a.key,title:a.note,style:{padding:"6px 12px",borderRadius:16,fontSize:12.5,fontWeight:650,cursor:"pointer",border:u===a.key?"1px solid rgba(155,89,182,0.7)":f.LINE,background:u===a.key?"rgba(155,89,182,0.16)":"rgba(255,255,255,0.03)",color:u===a.key?"#fff":"#bbb"},children:a.label},a.key))}),(0,b.jsx)(f.Body,{style:{marginBottom:14},children:aa.find(a=>a.key===u)?.note||"Your own ranking. Higher points rank higher; the company someone works at still weighs it."}),(0,b.jsx)("div",{style:{display:"grid",gridTemplateColumns:"1fr auto auto",gap:"6px 12px",alignItems:"center",maxWidth:520},children:Z.map(a=>{let c=g.points?.[a]!=null;return[(0,b.jsx)("div",{style:{fontSize:13,color:c?"#fff":"#ccc",fontWeight:c?700:500},children:I.LEVELS[a].label},`${a}-l`),(0,b.jsx)("select",{"aria-label":`Points for ${I.LEVELS[a].label}`,value:g.points?.[a]??I.LEVELS[a].points,onChange:b=>t(a,Number(b.target.value)),style:{...ac,borderColor:c?"rgba(155,89,182,0.7)":void 0},children:ab.map(a=>(0,b.jsx)("option",{value:a,children:a},a))},`${a}-s`),(0,b.jsx)("div",{style:{fontSize:11,color:"#667",minWidth:70},children:c?(0,b.jsxs)("button",{type:"button",onClick:()=>t(a,I.LEVELS[a].points),style:{background:"none",border:"none",color:"#9b9bd0",cursor:"pointer",fontSize:11,padding:0},children:["back to ",I.LEVELS[a].points]}):"as it comes"},`${a}-d`)]})}),(0,b.jsx)("div",{style:{marginTop:18,fontSize:13.5,fontWeight:700,color:"#eee"},children:"Roles you’re looking for"}),(0,b.jsx)(f.Body,{style:{margin:"4px 0 10px"},children:"Anyone whose title has these words counts what you give them, whatever their level: for outbound to one role, or hiring for it. “Account executive” at 10 puts every account executive you can reach near the top."}),(0,b.jsxs)("form",{onSubmit:a=>{a.preventDefault(),(()=>{let a=i.trim().toLowerCase().replace(/\s+/g," ");if(a.length<2)return;let b=[...g.roles.filter(b=>b.text!==a),{text:a,points:k}];h({...g,roles:b.slice(-20)}),j(""),p(null)})()},style:{display:"flex",gap:8,flexWrap:"wrap",alignItems:"center"},children:[(0,b.jsx)("input",{ref:s,value:i,onChange:a=>j(a.target.value),placeholder:"e.g. head of growth, recruiter, founder",maxLength:60,style:{flex:"1 1 220px",padding:"7px 10px",borderRadius:6,fontSize:13,border:f.LINE,background:"rgba(0,0,0,0.3)",color:"#fff"}}),(0,b.jsx)("select",{"aria-label":"Points for this role",value:k,onChange:a=>l(Number(a.target.value)),style:ac,children:ab.map(a=>(0,b.jsx)("option",{value:a,children:a},a))}),(0,b.jsx)(f.Btn,{type:"submit",disabled:i.trim().length<2||g.roles.length>=20,children:"Add"})]}),g.roles.length>0&&(0,b.jsx)("div",{style:{display:"flex",gap:6,flexWrap:"wrap",marginTop:10},children:g.roles.map(a=>(0,b.jsxs)("span",{style:{display:"inline-flex",alignItems:"center",gap:6,padding:"4px 6px 4px 11px",borderRadius:14,fontSize:12.5,border:"1px solid rgba(155,89,182,0.5)",background:"rgba(155,89,182,0.12)",color:"#eee"},children:[a.text," ",(0,b.jsx)("b",{style:{color:"#d2b4ff"},children:a.points}),(0,b.jsx)("button",{type:"button",onClick:()=>{var b;return b=a.text,void(h({...g,roles:g.roles.filter(a=>a.text!==b)}),p(null))},"aria-label":`Remove ${a.text}`,style:{background:"none",border:"none",color:"#aaa",cursor:"pointer",fontSize:13},children:"✕"})]},a.text))}),(0,b.jsxs)("div",{style:{display:"flex",gap:10,alignItems:"center",marginTop:16},children:[(0,b.jsx)(f.Btn,{primary:!0,onClick:w,disabled:!v||m,children:m?"Rescoring…":"Save and rescore"}),v&&(0,b.jsx)("span",{style:{fontSize:12,color:"#999"},children:"Not saved yet. Saving rescores everyone."})]}),o&&(0,b.jsx)(f.Status,{tone:o.tone,children:o.text})]})}var ae=a.i(91621),af=a.i(26338);let ag={none:"Plain",stars:"Stars",grid:"Grid",glow:"Glow",horizon:"Horizon"},ah={system:"System",rounded:"Rounded",mono:"Mono",serif:"Serif"},ai={S:"S tier",A:"A tier",B:"B tier",C:"C tier",D:"D tier"},aj={fontSize:11,fontWeight:700,color:"#778",letterSpacing:.6,textTransform:"uppercase",margin:"16px 0 8px"};function ak({theme:a,width:c=168,height:d=96}){let e=.58*c,f=d/2,g=`p-${a.id}-${a.customised?"c":"p"}`,h=Math.min(1,Math.max(0,a.glass)),i=ae.TIER_KEYS.map((a,b)=>{let c=-Math.PI/2+2*b*Math.PI/ae.TIER_KEYS.length,d=22+3*b;return{k:a,x:e+Math.cos(c)*d,y:f+Math.sin(c)*d,a:c}}),j=b=>"one"===a.lines?a.line:a.tiers[b];return(0,b.jsxs)("svg",{width:c,height:d,viewBox:`0 0 ${c} ${d}`,"aria-hidden":"true",style:{display:"block",borderRadius:8},children:[(0,b.jsxs)("defs",{children:[(0,b.jsxs)("radialGradient",{id:`${g}-glow`,children:[(0,b.jsx)("stop",{offset:"0",stopColor:a.bg2,stopOpacity:"0.8"}),(0,b.jsx)("stop",{offset:"1",stopColor:a.bg2,stopOpacity:"0"})]}),(0,b.jsxs)("radialGradient",{id:`${g}-glow2`,children:[(0,b.jsx)("stop",{offset:"0",stopColor:a.accent,stopOpacity:"0.55"}),(0,b.jsx)("stop",{offset:"1",stopColor:a.accent,stopOpacity:"0"})]}),(0,b.jsxs)("linearGradient",{id:`${g}-sun`,x1:"0",y1:"0",x2:"0",y2:"1",children:[(0,b.jsx)("stop",{offset:"0.45",stopColor:a.bg2,stopOpacity:"0"}),(0,b.jsx)("stop",{offset:"1",stopColor:a.bg2,stopOpacity:"0.45"})]})]}),(0,b.jsx)("rect",{width:c,height:d,fill:a.bg}),"stars"===a.backdrop&&(0,b.jsxs)("g",{fill:"#fff",children:[(0,b.jsx)("circle",{cx:.8*c,cy:.2*d,r:28,fill:`url(#${g}-glow)`}),[[12,10],[40,70],[150,14],[128,80],[24,44],[96,8],[70,88],[158,52]].map(([a,c])=>(0,b.jsx)("circle",{cx:a,cy:c,r:.8,opacity:.85},`${a}-${c}`))]}),"grid"===a.backdrop&&(0,b.jsxs)("g",{stroke:a.bg2,strokeWidth:1,opacity:.9,children:[Array.from({length:9},(a,c)=>(0,b.jsx)("line",{x1:20*c,y1:0,x2:20*c,y2:d},`v${c}`)),Array.from({length:5},(a,d)=>(0,b.jsx)("line",{x1:0,y1:20*d,x2:c,y2:20*d},`h${d}`))]}),"glow"===a.backdrop&&(0,b.jsxs)("g",{children:[(0,b.jsx)("circle",{cx:.2*c,cy:.25*d,r:40,fill:`url(#${g}-glow)`}),(0,b.jsx)("circle",{cx:.85*c,cy:.4*d,r:36,fill:`url(#${g}-glow2)`})]}),"horizon"===a.backdrop&&(0,b.jsxs)("g",{children:[(0,b.jsx)("rect",{width:c,height:d,fill:`url(#${g}-sun)`}),Array.from({length:9},(e,f)=>(0,b.jsx)("line",{x1:21*f,y1:.62*d,x2:(f-4)*40+c/2,y2:d,stroke:a.bg2,strokeOpacity:.35},f)),(0,b.jsx)("line",{x1:0,y1:.62*d,x2:c,y2:.62*d,stroke:a.bg2,strokeOpacity:.5})]}),(0,b.jsx)("rect",{x:0,y:0,width:.24*c,height:d,fill:a.panel,fillOpacity:.92-.82*h}),(0,b.jsx)("rect",{x:.24*c,y:0,width:.75,height:d,fill:"#fff",fillOpacity:.12}),[0,1,2,3,4].map(d=>(0,b.jsx)("rect",{x:6,y:12+14*d,width:.24*c-12,height:6,rx:3,fill:a.tiers[ae.TIER_KEYS[d]],fillOpacity:.55},d)),i.map(a=>(0,b.jsx)("line",{x1:e,y1:f,x2:a.x,y2:a.y,stroke:j(a.k),strokeOpacity:.55,strokeWidth:.8},`l${a.k}`)),i.map(c=>[0,1,2].map(d=>{let e=c.a+(d-1)*.5,f=c.x+9*Math.cos(e),g=c.y+9*Math.sin(e);return(0,b.jsxs)("g",{children:[(0,b.jsx)("line",{x1:c.x,y1:c.y,x2:f,y2:g,stroke:j(c.k),strokeOpacity:.4,strokeWidth:.6}),(0,b.jsx)("circle",{cx:f,cy:g,r:1.6,fill:a.tiers[ae.TIER_KEYS[(ae.TIER_KEYS.indexOf(c.k)+d+1)%5]],fillOpacity:.8})]},`k${c.k}${d}`)})),i.map(c=>(0,b.jsx)("circle",{cx:c.x,cy:c.y,r:"S"===c.k?4.5:3.6,fill:a.tiers[c.k]},`d${c.k}`)),(0,b.jsx)("circle",{cx:e,cy:f,r:5.5,fill:a.you,stroke:a.accent,strokeWidth:1.2})]})}function al({name:a,value:c,onChange:d,title:e}){return(0,b.jsxs)("label",{title:e||a,style:{display:"flex",alignItems:"center",gap:8,padding:"6px 10px 6px 6px",borderRadius:8,background:"rgba(255,255,255,0.04)",border:"1px solid rgba(255,255,255,0.08)",cursor:"pointer"},children:[(0,b.jsx)("input",{type:"color",value:c,onChange:a=>d(a.target.value),style:{width:28,height:28,padding:0,border:"none",borderRadius:6,background:"none",cursor:"pointer"}}),(0,b.jsx)("span",{style:{fontSize:12.5,color:"#cdd"},children:a})]})}function am({options:a,value:c,onPick:d}){return(0,b.jsx)("div",{style:{display:"flex",flexWrap:"wrap",gap:6},children:a.map(([a,e])=>(0,b.jsx)("button",{type:"button","aria-pressed":c===a,onClick:()=>d(a),style:{padding:"6px 12px",borderRadius:8,fontSize:12.5,fontWeight:600,cursor:"pointer",border:c===a?"1px solid var(--sd-accent)":"1px solid rgba(255,255,255,0.1)",background:c===a?"color-mix(in srgb, var(--sd-accent) 18%, transparent)":"rgba(255,255,255,0.03)",color:c===a?"#fff":"#99a"},children:e},a))})}function an(){let a=(0,c.useSyncExternalStore)(af.watchTheme,af.themeNow,af.serverTheme),d=(0,ae.resolveTheme)(a),[e,g]=(0,c.useState)(""),[h,i]=(0,c.useState)(null),j=b=>(0,af.setTheme)({base:a.base,custom:{...a.custom,...b}}),k=async()=>{let b=(0,ae.encodeTheme)(a);try{await navigator.clipboard.writeText(b),i("Copied. Paste it into anyone’s Settings → Appearance.")}catch{g(b),i("Select the code below and copy it.")}},l=()=>{let a=(0,ae.decodeTheme)(e);a?((0,af.setTheme)(a),g(""),i(`Using it: ${(0,ae.presetOf)(a.base).name}${Object.keys(a.custom).length?", made someone’s own":""}.`)):i("That isn’t a theme code: it starts with sd-theme:")};return(0,b.jsxs)(f.Section,{id:"appearance",title:"Appearance",intro:"How the whole app looks: pick one of ours, then make it yours. It changes as you go, and stays in this browser.",children:[(0,b.jsx)("div",{style:aj,children:"Looks"}),(0,b.jsx)("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(190px, 1fr))",gap:10},children:ae.THEMES.map(c=>{let e=a.base===c.id,f=e?d:(0,ae.resolveTheme)({base:c.id});return(0,b.jsxs)("button",{type:"button","aria-pressed":e,onClick:()=>(0,af.setTheme)({base:c.id,custom:{}}),title:e&&d.customised?`${c.name}, with your changes. Click to go back to plain ${c.name}.`:c.blurb,style:{textAlign:"left",padding:8,borderRadius:12,cursor:"pointer",color:"#fff",border:e?"2px solid var(--sd-accent)":"1px solid rgba(255,255,255,0.1)",background:e?"color-mix(in srgb, var(--sd-accent) 10%, transparent)":"rgba(255,255,255,0.03)"},children:[(0,b.jsx)(ak,{theme:f,width:172,height:96}),(0,b.jsxs)("div",{style:{display:"flex",alignItems:"baseline",gap:6,margin:"8px 2px 2px"},children:[(0,b.jsx)("span",{style:{fontSize:13.5,fontWeight:700},children:c.name}),e&&d.customised&&(0,b.jsx)("span",{style:{fontSize:10.5,fontWeight:700,color:"var(--sd-accent)"},children:"yours"})]}),(0,b.jsx)("div",{style:{fontSize:11.5,color:"#889",lineHeight:1.4,margin:"0 2px"},children:c.blurb})]},c.id)})}),(0,b.jsxs)("div",{style:{marginTop:22,padding:"4px 16px 16px",borderRadius:12,border:"1px solid rgba(255,255,255,0.08)",background:"rgba(255,255,255,0.02)"},children:[(0,b.jsxs)("div",{style:{display:"flex",alignItems:"baseline",gap:10,flexWrap:"wrap"},children:[(0,b.jsxs)("div",{style:{...aj,flex:1},children:["Make it yours",d.customised?"":`: starting from ${(0,ae.presetOf)(a.base).name}`]}),d.customised&&(0,b.jsxs)("button",{type:"button",onClick:()=>(0,af.setTheme)({base:a.base,custom:{}}),style:{padding:"4px 10px",borderRadius:8,fontSize:11.5,cursor:"pointer",border:"1px solid rgba(255,255,255,0.12)",background:"none",color:"#aab"},children:["Back to plain ",(0,ae.presetOf)(a.base).name]})]}),(0,b.jsx)("div",{style:aj,children:"Background"}),(0,b.jsxs)("div",{style:{display:"flex",flexWrap:"wrap",gap:8,marginBottom:10},children:[(0,b.jsx)(al,{name:"Colour",value:d.bg,onChange:a=>j({bg:a}),title:"Behind everything"}),(0,b.jsx)(al,{name:"Second colour",value:d.bg2,onChange:a=>j({bg2:a}),title:"The backdrop's: the nebula, the grid, the glow or the sunset"}),(0,b.jsx)(al,{name:"Accent",value:d.accent,onChange:a=>j({accent:a}),title:"What's picked, and the backdrop's glow"})]}),(0,b.jsx)(am,{value:d.backdrop,options:ae.BACKDROPS.map(a=>[a,ag[a]]),onPick:a=>j({backdrop:a})}),(0,b.jsx)("div",{style:aj,children:"Dots"}),(0,b.jsxs)("div",{style:{display:"flex",flexWrap:"wrap",gap:8},children:[ae.TIER_KEYS.map(c=>(0,b.jsx)(al,{name:ai[c],value:d.tiers[c],onChange:b=>j({tiers:{...a.custom.tiers||{},[c]:b}})},c)),(0,b.jsx)(al,{name:"You",value:d.you,onChange:a=>j({you:a}),title:"Your own dot, in the middle of the map"})]}),(0,b.jsx)("div",{style:aj,children:"Lines"}),(0,b.jsxs)("div",{style:{display:"flex",flexWrap:"wrap",alignItems:"center",gap:8},children:[(0,b.jsx)(am,{value:d.lines,options:[["tier","As the person they lead to"],["one","One colour"]],onPick:a=>j({lines:a})}),"one"===d.lines&&(0,b.jsx)(al,{name:"Line colour",value:d.line,onChange:a=>j({line:a})})]}),(0,b.jsx)("div",{style:aj,children:"Panels"}),(0,b.jsxs)("div",{style:{display:"flex",flexWrap:"wrap",alignItems:"center",gap:14},children:[(0,b.jsx)(al,{name:"Tint",value:d.panel,onChange:a=>j({panel:a}),title:"The side panels' colour"}),(0,b.jsxs)("label",{style:{display:"flex",alignItems:"center",gap:10,fontSize:12.5,color:"#cdd"},children:["Glass",(0,b.jsx)("input",{type:"range",min:0,max:100,value:Math.round(100*d.glass),onChange:a=>j({glass:Number(a.target.value)/100}),style:{width:160,accentColor:"var(--sd-accent)"}}),(0,b.jsxs)("span",{style:{color:"#889",fontVariantNumeric:"tabular-nums",width:34},children:[Math.round(100*d.glass),"%"]})]})]}),(0,b.jsx)("div",{style:aj,children:"Font"}),(0,b.jsx)(am,{value:d.font,options:Object.keys(ae.FONTS).map(a=>[a,ah[a]]),onPick:a=>j({font:a})}),(0,b.jsx)("div",{style:aj,children:"Share it"}),(0,b.jsxs)("div",{style:{display:"flex",flexWrap:"wrap",gap:8,alignItems:"center"},children:[(0,b.jsx)("button",{type:"button",onClick:k,style:{padding:"7px 14px",borderRadius:8,fontSize:12.5,fontWeight:700,cursor:"pointer",border:"1px solid var(--sd-accent)",background:"color-mix(in srgb, var(--sd-accent) 16%, transparent)",color:"#fff"},children:"Copy theme code"}),(0,b.jsx)("input",{value:e,onChange:a=>g(a.target.value),placeholder:"Paste a theme code (sd-theme:…)",spellCheck:!1,onKeyDown:a=>{"Enter"===a.key&&l()},style:{flex:"1 1 220px",minWidth:0,padding:"7px 10px",borderRadius:8,fontSize:12,fontFamily:"ui-monospace, Menlo, monospace",border:"1px solid rgba(255,255,255,0.12)",background:"rgba(0,0,0,0.25)",color:"#dde"}}),(0,b.jsx)("button",{type:"button",onClick:l,disabled:!e.trim(),style:{padding:"7px 14px",borderRadius:8,fontSize:12.5,fontWeight:600,cursor:e.trim()?"pointer":"default",border:"1px solid rgba(255,255,255,0.12)",background:"rgba(255,255,255,0.04)",color:e.trim()?"#dde":"#667"},children:"Use it"})]}),h&&(0,b.jsx)(f.Body,{style:{fontSize:12,marginTop:8},children:h}),(0,b.jsx)(f.Body,{style:{fontSize:11.5,color:"#667",marginTop:8},children:"A code holds colours and choices only, nothing about your network."})]})]})}var ao=a.i(90017),ap=a.i(58834);let aq={"mac-app":"the Mac app","windows-app":"the Windows app","linux-app":"the Linux app",npm:"the npm package (npx six-degrees)",source:"a copy built from the source code",git:"a git checkout of the source code"};function ar(){let[a,e]=(0,c.useState)(null),[h,i]=(0,c.useState)(null),[j,k]=(0,c.useState)(0),l=()=>k(a=>a+1);if((0,c.useEffect)(()=>{fetch("/api/settings").then(a=>a.json().then(b=>a.ok?b:Promise.reject(Error(b.error||"Could not load settings.")))).then(e).catch(a=>i(a.message))},[]),ap.IS_DEMO)return(0,b.jsxs)("div",{style:{minHeight:"100vh",background:"var(--sd-page)",color:"rgba(255,255,255,0.7)",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:12,textAlign:"center",padding:24,fontFamily:f.FONT},children:[(0,b.jsx)("h2",{style:{margin:0,fontSize:20,fontWeight:700,color:"#fff"},children:"Not part of the demo"}),(0,b.jsx)("p",{style:{margin:0,fontSize:13},children:"The public demo includes the Network Circle and Degrees views only."}),(0,b.jsx)(d.default,{href:"/",style:{fontSize:12,color:"rgba(255,255,255,0.5)",textDecoration:"none"},children:"← Back to the network"})]});let m=a?.about;return(0,b.jsxs)("div",{style:{minHeight:"100vh",background:"var(--sd-page)",color:"#fff",fontFamily:f.FONT},children:[(0,b.jsxs)("header",{style:{padding:"16px 24px",borderBottom:f.LINE,display:"flex",alignItems:"center",gap:16},children:[(0,b.jsx)(d.default,{href:"/",style:{display:"flex",alignItems:"center",gap:6,color:"#888",textDecoration:"none",fontSize:13,fontWeight:600,padding:"6px 14px",borderRadius:6,background:"rgba(255,255,255,0.06)",border:f.LINE},children:"← Back to Map"}),(0,b.jsx)("h1",{style:{fontSize:22,fontWeight:700,margin:0,background:"linear-gradient(135deg, #FFD700, #9B59B6, #3498DB)",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent"},children:"Settings"})]}),(0,b.jsxs)("main",{style:{maxWidth:980,margin:"0 auto",padding:"8px 24px 64px"},children:[h&&(0,b.jsx)(f.Body,{style:{color:"#ff7676",marginTop:16},children:h}),(0,b.jsx)(g,{}),(0,b.jsx)(an,{}),(0,b.jsxs)(f.Section,{id:"scoring",title:"Scores",children:[(0,b.jsxs)(f.Body,{children:["How someone’s power score is worked out, and the four things you can change about it:"," ",(0,b.jsx)("a",{href:"#sector",style:{color:"#3498DB",textDecoration:"none",fontWeight:600},children:"your field"}),","," ",(0,b.jsx)("a",{href:"#tiers",style:{color:"#3498DB",textDecoration:"none",fontWeight:600},children:"how tiers are graded"}),","," ",(0,b.jsx)("a",{href:"#titles",style:{color:"#3498DB",textDecoration:"none",fontWeight:600},children:"how titles rank"})," and"," ",(0,b.jsx)("a",{href:"#companies",style:{color:"#3498DB",textDecoration:"none",fontWeight:600},children:"any company’s score"}),". A change here rescores everyone. How your network holds together is in"," ",(0,b.jsx)(d.default,{href:"/profile?view=insights",style:{color:"#3498DB",textDecoration:"none",fontWeight:600},children:"Profile → Insights"}),"."]}),(0,b.jsx)(R,{onSaved:l}),(0,b.jsx)(Y,{onSaved:l}),(0,b.jsx)(ad,{onSaved:l}),(0,b.jsx)("div",{id:"companies",style:{marginTop:28},children:(0,b.jsx)(ao.default,{version:j})})]}),(0,b.jsx)(D,{}),(0,b.jsx)(f.Section,{id:"about",title:"About this copy",children:m?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)(f.Body,{children:["Version ",(0,b.jsx)(f.Mono,{children:m.version}),", running as ",aq[m.kind]||m.kind,"."]}),(0,b.jsxs)(f.Body,{children:["Your network is kept in ",(0,b.jsx)(f.Mono,{children:m.dataDir}),m.customDataDir?" (a folder you chose).":".",["mac-app","windows-app","linux-app"].includes(m.kind)&&" Help → Show the Data Folder opens it."]}),(0,b.jsx)(f.Body,{style:{fontSize:12,color:"#667",marginTop:10},children:"Settings are saved with your network, on this computer. Nothing here is sent anywhere."})]}):!h&&(0,b.jsx)(f.Body,{children:"Loading…"})})]})]})}a.s(["default",0,function(){return(0,b.jsx)(e.default,{children:(0,b.jsx)(ar,{})})}],54209)}];
2
2
 
3
3
  //# sourceMappingURL=app_settings_page_1f8mjj_.js.map