jumpy-lion 0.1.6-beta.9 → 1.0.0-beta.4

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 (450) hide show
  1. package/README.md +1 -607
  2. package/browser/fonts/macos-bundle/41-macos-remaining.conf +157 -0
  3. package/browser/fonts/macos-bundle/README.md +24 -0
  4. package/browser/fonts/macos-bundle/build-metric-fonts.py +1010 -0
  5. package/browser/fonts/macos-bundle/generated/AmericanTypewriter-Bold.ttf +0 -0
  6. package/browser/fonts/macos-bundle/generated/AmericanTypewriter-Regular.ttf +0 -0
  7. package/browser/fonts/macos-bundle/generated/AndaleMono-Bold.ttf +0 -0
  8. package/browser/fonts/macos-bundle/generated/AndaleMono-BoldItalic.ttf +0 -0
  9. package/browser/fonts/macos-bundle/generated/AndaleMono-Italic.ttf +0 -0
  10. package/browser/fonts/macos-bundle/generated/AndaleMono-Regular.ttf +0 -0
  11. package/browser/fonts/macos-bundle/generated/AppleChancery-Bold.ttf +0 -0
  12. package/browser/fonts/macos-bundle/generated/AppleChancery-BoldItalic.ttf +0 -0
  13. package/browser/fonts/macos-bundle/generated/AppleChancery-Italic.ttf +0 -0
  14. package/browser/fonts/macos-bundle/generated/AppleChancery-Regular.ttf +0 -0
  15. package/browser/fonts/macos-bundle/generated/Arial-Bold.ttf +0 -0
  16. package/browser/fonts/macos-bundle/generated/Arial-BoldItalic.ttf +0 -0
  17. package/browser/fonts/macos-bundle/generated/Arial-Italic.ttf +0 -0
  18. package/browser/fonts/macos-bundle/generated/Arial-Regular.ttf +0 -0
  19. package/browser/fonts/macos-bundle/generated/ArialBlack-Bold.ttf +0 -0
  20. package/browser/fonts/macos-bundle/generated/ArialBlack-BoldItalic.ttf +0 -0
  21. package/browser/fonts/macos-bundle/generated/ArialBlack-Italic.ttf +0 -0
  22. package/browser/fonts/macos-bundle/generated/ArialBlack-Regular.ttf +0 -0
  23. package/browser/fonts/macos-bundle/generated/ArialNarrow-Bold.ttf +0 -0
  24. package/browser/fonts/macos-bundle/generated/ArialNarrow-BoldItalic.ttf +0 -0
  25. package/browser/fonts/macos-bundle/generated/ArialNarrow-Italic.ttf +0 -0
  26. package/browser/fonts/macos-bundle/generated/ArialNarrow-Regular.ttf +0 -0
  27. package/browser/fonts/macos-bundle/generated/Avenir-Bold.ttf +0 -0
  28. package/browser/fonts/macos-bundle/generated/Avenir-BoldItalic.ttf +0 -0
  29. package/browser/fonts/macos-bundle/generated/Avenir-Italic.ttf +0 -0
  30. package/browser/fonts/macos-bundle/generated/Avenir-Regular.ttf +0 -0
  31. package/browser/fonts/macos-bundle/generated/AvenirNext-Bold.ttf +0 -0
  32. package/browser/fonts/macos-bundle/generated/AvenirNext-BoldItalic.ttf +0 -0
  33. package/browser/fonts/macos-bundle/generated/AvenirNext-Italic.ttf +0 -0
  34. package/browser/fonts/macos-bundle/generated/AvenirNext-Regular.ttf +0 -0
  35. package/browser/fonts/macos-bundle/generated/AvenirNextCondensed-Bold.ttf +0 -0
  36. package/browser/fonts/macos-bundle/generated/AvenirNextCondensed-BoldItalic.ttf +0 -0
  37. package/browser/fonts/macos-bundle/generated/AvenirNextCondensed-Italic.ttf +0 -0
  38. package/browser/fonts/macos-bundle/generated/AvenirNextCondensed-Regular.ttf +0 -0
  39. package/browser/fonts/macos-bundle/generated/Baskerville-Bold.ttf +0 -0
  40. package/browser/fonts/macos-bundle/generated/Baskerville-BoldItalic.ttf +0 -0
  41. package/browser/fonts/macos-bundle/generated/Baskerville-Italic.ttf +0 -0
  42. package/browser/fonts/macos-bundle/generated/Baskerville-Regular.ttf +0 -0
  43. package/browser/fonts/macos-bundle/generated/BigCaslon-Bold.ttf +0 -0
  44. package/browser/fonts/macos-bundle/generated/BigCaslon-BoldItalic.ttf +0 -0
  45. package/browser/fonts/macos-bundle/generated/BigCaslon-Italic.ttf +0 -0
  46. package/browser/fonts/macos-bundle/generated/BigCaslon-Regular.ttf +0 -0
  47. package/browser/fonts/macos-bundle/generated/BlinkMacSystemFont-Bold.ttf +0 -0
  48. package/browser/fonts/macos-bundle/generated/BlinkMacSystemFont-BoldItalic.ttf +0 -0
  49. package/browser/fonts/macos-bundle/generated/BlinkMacSystemFont-Italic.ttf +0 -0
  50. package/browser/fonts/macos-bundle/generated/BlinkMacSystemFont-Regular.ttf +0 -0
  51. package/browser/fonts/macos-bundle/generated/Bodoni72-Bold.ttf +0 -0
  52. package/browser/fonts/macos-bundle/generated/Bodoni72-BoldItalic.ttf +0 -0
  53. package/browser/fonts/macos-bundle/generated/Bodoni72-Italic.ttf +0 -0
  54. package/browser/fonts/macos-bundle/generated/Bodoni72-Regular.ttf +0 -0
  55. package/browser/fonts/macos-bundle/generated/Bodoni72Oldstyle-Bold.ttf +0 -0
  56. package/browser/fonts/macos-bundle/generated/Bodoni72Oldstyle-BoldItalic.ttf +0 -0
  57. package/browser/fonts/macos-bundle/generated/Bodoni72Oldstyle-Italic.ttf +0 -0
  58. package/browser/fonts/macos-bundle/generated/Bodoni72Oldstyle-Regular.ttf +0 -0
  59. package/browser/fonts/macos-bundle/generated/Bodoni72Smallcaps-Bold.ttf +0 -0
  60. package/browser/fonts/macos-bundle/generated/Bodoni72Smallcaps-BoldItalic.ttf +0 -0
  61. package/browser/fonts/macos-bundle/generated/Bodoni72Smallcaps-Italic.ttf +0 -0
  62. package/browser/fonts/macos-bundle/generated/Bodoni72Smallcaps-Regular.ttf +0 -0
  63. package/browser/fonts/macos-bundle/generated/BradleyHand-Regular.ttf +0 -0
  64. package/browser/fonts/macos-bundle/generated/BrushScriptMT-Regular.ttf +0 -0
  65. package/browser/fonts/macos-bundle/generated/Chalkboard-Bold.ttf +0 -0
  66. package/browser/fonts/macos-bundle/generated/Chalkboard-BoldItalic.ttf +0 -0
  67. package/browser/fonts/macos-bundle/generated/Chalkboard-Italic.ttf +0 -0
  68. package/browser/fonts/macos-bundle/generated/Chalkboard-Regular.ttf +0 -0
  69. package/browser/fonts/macos-bundle/generated/ChalkboardSE-Bold.ttf +0 -0
  70. package/browser/fonts/macos-bundle/generated/ChalkboardSE-BoldItalic.ttf +0 -0
  71. package/browser/fonts/macos-bundle/generated/ChalkboardSE-Italic.ttf +0 -0
  72. package/browser/fonts/macos-bundle/generated/ChalkboardSE-Regular.ttf +0 -0
  73. package/browser/fonts/macos-bundle/generated/Chalkduster-Bold.ttf +0 -0
  74. package/browser/fonts/macos-bundle/generated/Chalkduster-BoldItalic.ttf +0 -0
  75. package/browser/fonts/macos-bundle/generated/Chalkduster-Italic.ttf +0 -0
  76. package/browser/fonts/macos-bundle/generated/Chalkduster-Regular.ttf +0 -0
  77. package/browser/fonts/macos-bundle/generated/Charter-Bold.ttf +0 -0
  78. package/browser/fonts/macos-bundle/generated/Charter-BoldItalic.ttf +0 -0
  79. package/browser/fonts/macos-bundle/generated/Charter-Italic.ttf +0 -0
  80. package/browser/fonts/macos-bundle/generated/Charter-Regular.ttf +0 -0
  81. package/browser/fonts/macos-bundle/generated/Cochin-Bold.ttf +0 -0
  82. package/browser/fonts/macos-bundle/generated/Cochin-BoldItalic.ttf +0 -0
  83. package/browser/fonts/macos-bundle/generated/Cochin-Italic.ttf +0 -0
  84. package/browser/fonts/macos-bundle/generated/Cochin-Regular.ttf +0 -0
  85. package/browser/fonts/macos-bundle/generated/ComicSansMS-Bold.ttf +0 -0
  86. package/browser/fonts/macos-bundle/generated/ComicSansMS-BoldItalic.ttf +0 -0
  87. package/browser/fonts/macos-bundle/generated/ComicSansMS-Italic.ttf +0 -0
  88. package/browser/fonts/macos-bundle/generated/ComicSansMS-Regular.ttf +0 -0
  89. package/browser/fonts/macos-bundle/generated/Copperplate-Bold.ttf +0 -0
  90. package/browser/fonts/macos-bundle/generated/Copperplate-Regular.ttf +0 -0
  91. package/browser/fonts/macos-bundle/generated/Courier-Bold.ttf +0 -0
  92. package/browser/fonts/macos-bundle/generated/Courier-BoldItalic.ttf +0 -0
  93. package/browser/fonts/macos-bundle/generated/Courier-Italic.ttf +0 -0
  94. package/browser/fonts/macos-bundle/generated/Courier-Regular.ttf +0 -0
  95. package/browser/fonts/macos-bundle/generated/CourierNew-Regular.ttf +0 -0
  96. package/browser/fonts/macos-bundle/generated/Didot-Bold.ttf +0 -0
  97. package/browser/fonts/macos-bundle/generated/Didot-BoldItalic.ttf +0 -0
  98. package/browser/fonts/macos-bundle/generated/Didot-Italic.ttf +0 -0
  99. package/browser/fonts/macos-bundle/generated/Didot-Regular.ttf +0 -0
  100. package/browser/fonts/macos-bundle/generated/Futura-Bold.ttf +0 -0
  101. package/browser/fonts/macos-bundle/generated/Futura-BoldItalic.ttf +0 -0
  102. package/browser/fonts/macos-bundle/generated/Futura-Italic.ttf +0 -0
  103. package/browser/fonts/macos-bundle/generated/Futura-Regular.ttf +0 -0
  104. package/browser/fonts/macos-bundle/generated/Geneva-Regular.ttf +0 -0
  105. package/browser/fonts/macos-bundle/generated/Georgia-Bold.ttf +0 -0
  106. package/browser/fonts/macos-bundle/generated/Georgia-BoldItalic.ttf +0 -0
  107. package/browser/fonts/macos-bundle/generated/Georgia-Italic.ttf +0 -0
  108. package/browser/fonts/macos-bundle/generated/Georgia-Regular.ttf +0 -0
  109. package/browser/fonts/macos-bundle/generated/GillSans-Bold.ttf +0 -0
  110. package/browser/fonts/macos-bundle/generated/GillSans-BoldItalic.ttf +0 -0
  111. package/browser/fonts/macos-bundle/generated/GillSans-Italic.ttf +0 -0
  112. package/browser/fonts/macos-bundle/generated/GillSans-Regular.ttf +0 -0
  113. package/browser/fonts/macos-bundle/generated/Helvetica-Bold.ttf +0 -0
  114. package/browser/fonts/macos-bundle/generated/Helvetica-BoldItalic.ttf +0 -0
  115. package/browser/fonts/macos-bundle/generated/Helvetica-Italic.ttf +0 -0
  116. package/browser/fonts/macos-bundle/generated/Helvetica-Regular.ttf +0 -0
  117. package/browser/fonts/macos-bundle/generated/HelveticaNeue-Bold.ttf +0 -0
  118. package/browser/fonts/macos-bundle/generated/HelveticaNeue-BoldItalic.ttf +0 -0
  119. package/browser/fonts/macos-bundle/generated/HelveticaNeue-Italic.ttf +0 -0
  120. package/browser/fonts/macos-bundle/generated/HelveticaNeue-Regular.ttf +0 -0
  121. package/browser/fonts/macos-bundle/generated/Herculanum-Bold.ttf +0 -0
  122. package/browser/fonts/macos-bundle/generated/Herculanum-BoldItalic.ttf +0 -0
  123. package/browser/fonts/macos-bundle/generated/Herculanum-Italic.ttf +0 -0
  124. package/browser/fonts/macos-bundle/generated/Herculanum-Regular.ttf +0 -0
  125. package/browser/fonts/macos-bundle/generated/HoeflerText-Bold.ttf +0 -0
  126. package/browser/fonts/macos-bundle/generated/HoeflerText-BoldItalic.ttf +0 -0
  127. package/browser/fonts/macos-bundle/generated/HoeflerText-Italic.ttf +0 -0
  128. package/browser/fonts/macos-bundle/generated/HoeflerText-Regular.ttf +0 -0
  129. package/browser/fonts/macos-bundle/generated/Impact-Bold.ttf +0 -0
  130. package/browser/fonts/macos-bundle/generated/Impact-BoldItalic.ttf +0 -0
  131. package/browser/fonts/macos-bundle/generated/Impact-Italic.ttf +0 -0
  132. package/browser/fonts/macos-bundle/generated/Impact-Regular.ttf +0 -0
  133. package/browser/fonts/macos-bundle/generated/LucidaGrande-Bold.ttf +0 -0
  134. package/browser/fonts/macos-bundle/generated/LucidaGrande-Regular.ttf +0 -0
  135. package/browser/fonts/macos-bundle/generated/MarkerFelt-Bold.ttf +0 -0
  136. package/browser/fonts/macos-bundle/generated/MarkerFelt-BoldItalic.ttf +0 -0
  137. package/browser/fonts/macos-bundle/generated/MarkerFelt-Italic.ttf +0 -0
  138. package/browser/fonts/macos-bundle/generated/MarkerFelt-Regular.ttf +0 -0
  139. package/browser/fonts/macos-bundle/generated/Menlo-Regular.ttf +0 -0
  140. package/browser/fonts/macos-bundle/generated/Monaco-Bold.ttf +0 -0
  141. package/browser/fonts/macos-bundle/generated/Monaco-BoldItalic.ttf +0 -0
  142. package/browser/fonts/macos-bundle/generated/Monaco-Italic.ttf +0 -0
  143. package/browser/fonts/macos-bundle/generated/Monaco-Regular.ttf +0 -0
  144. package/browser/fonts/macos-bundle/generated/Noteworthy-Bold.ttf +0 -0
  145. package/browser/fonts/macos-bundle/generated/Noteworthy-Regular.ttf +0 -0
  146. package/browser/fonts/macos-bundle/generated/Optima-Bold.ttf +0 -0
  147. package/browser/fonts/macos-bundle/generated/Optima-BoldItalic.ttf +0 -0
  148. package/browser/fonts/macos-bundle/generated/Optima-Italic.ttf +0 -0
  149. package/browser/fonts/macos-bundle/generated/Optima-Regular.ttf +0 -0
  150. package/browser/fonts/macos-bundle/generated/Palatino-Bold.ttf +0 -0
  151. package/browser/fonts/macos-bundle/generated/Palatino-BoldItalic.ttf +0 -0
  152. package/browser/fonts/macos-bundle/generated/Palatino-Italic.ttf +0 -0
  153. package/browser/fonts/macos-bundle/generated/Palatino-Regular.ttf +0 -0
  154. package/browser/fonts/macos-bundle/generated/Papyrus-Bold.ttf +0 -0
  155. package/browser/fonts/macos-bundle/generated/Papyrus-BoldItalic.ttf +0 -0
  156. package/browser/fonts/macos-bundle/generated/Papyrus-Italic.ttf +0 -0
  157. package/browser/fonts/macos-bundle/generated/Papyrus-Regular.ttf +0 -0
  158. package/browser/fonts/macos-bundle/generated/PartyLET-Bold.ttf +0 -0
  159. package/browser/fonts/macos-bundle/generated/PartyLET-BoldItalic.ttf +0 -0
  160. package/browser/fonts/macos-bundle/generated/PartyLET-Italic.ttf +0 -0
  161. package/browser/fonts/macos-bundle/generated/PartyLET-Regular.ttf +0 -0
  162. package/browser/fonts/macos-bundle/generated/Phosphate-Regular.ttf +0 -0
  163. package/browser/fonts/macos-bundle/generated/README.md +132 -0
  164. package/browser/fonts/macos-bundle/generated/Rockwell-Bold.ttf +0 -0
  165. package/browser/fonts/macos-bundle/generated/Rockwell-BoldItalic.ttf +0 -0
  166. package/browser/fonts/macos-bundle/generated/Rockwell-Italic.ttf +0 -0
  167. package/browser/fonts/macos-bundle/generated/Rockwell-Regular.ttf +0 -0
  168. package/browser/fonts/macos-bundle/generated/SavoyeLET-Bold.ttf +0 -0
  169. package/browser/fonts/macos-bundle/generated/SavoyeLET-BoldItalic.ttf +0 -0
  170. package/browser/fonts/macos-bundle/generated/SavoyeLET-Italic.ttf +0 -0
  171. package/browser/fonts/macos-bundle/generated/SavoyeLET-Regular.ttf +0 -0
  172. package/browser/fonts/macos-bundle/generated/Seravek-Bold.ttf +0 -0
  173. package/browser/fonts/macos-bundle/generated/Seravek-BoldItalic.ttf +0 -0
  174. package/browser/fonts/macos-bundle/generated/Seravek-Italic.ttf +0 -0
  175. package/browser/fonts/macos-bundle/generated/Seravek-Regular.ttf +0 -0
  176. package/browser/fonts/macos-bundle/generated/SignPainter-Bold.ttf +0 -0
  177. package/browser/fonts/macos-bundle/generated/SignPainter-Regular.ttf +0 -0
  178. package/browser/fonts/macos-bundle/generated/Skia-Bold.ttf +0 -0
  179. package/browser/fonts/macos-bundle/generated/Skia-BoldItalic.ttf +0 -0
  180. package/browser/fonts/macos-bundle/generated/Skia-Italic.ttf +0 -0
  181. package/browser/fonts/macos-bundle/generated/Skia-Regular.ttf +0 -0
  182. package/browser/fonts/macos-bundle/generated/SnellRoundhand-Bold.ttf +0 -0
  183. package/browser/fonts/macos-bundle/generated/SnellRoundhand-Regular.ttf +0 -0
  184. package/browser/fonts/macos-bundle/generated/Tahoma-Bold.ttf +0 -0
  185. package/browser/fonts/macos-bundle/generated/Tahoma-Regular.ttf +0 -0
  186. package/browser/fonts/macos-bundle/generated/Times-Bold.ttf +0 -0
  187. package/browser/fonts/macos-bundle/generated/Times-BoldItalic.ttf +0 -0
  188. package/browser/fonts/macos-bundle/generated/Times-Italic.ttf +0 -0
  189. package/browser/fonts/macos-bundle/generated/Times-Regular.ttf +0 -0
  190. package/browser/fonts/macos-bundle/generated/TimesNewRoman-Bold.ttf +0 -0
  191. package/browser/fonts/macos-bundle/generated/TimesNewRoman-BoldItalic.ttf +0 -0
  192. package/browser/fonts/macos-bundle/generated/TimesNewRoman-Italic.ttf +0 -0
  193. package/browser/fonts/macos-bundle/generated/TimesNewRoman-Regular.ttf +0 -0
  194. package/browser/fonts/macos-bundle/generated/Trattatello-Regular.ttf +0 -0
  195. package/browser/fonts/macos-bundle/generated/TrebuchetMS-Bold.ttf +0 -0
  196. package/browser/fonts/macos-bundle/generated/TrebuchetMS-BoldItalic.ttf +0 -0
  197. package/browser/fonts/macos-bundle/generated/TrebuchetMS-Italic.ttf +0 -0
  198. package/browser/fonts/macos-bundle/generated/TrebuchetMS-Regular.ttf +0 -0
  199. package/browser/fonts/macos-bundle/generated/Verdana-Bold.ttf +0 -0
  200. package/browser/fonts/macos-bundle/generated/Verdana-BoldItalic.ttf +0 -0
  201. package/browser/fonts/macos-bundle/generated/Verdana-Italic.ttf +0 -0
  202. package/browser/fonts/macos-bundle/generated/Verdana-Regular.ttf +0 -0
  203. package/browser/fonts/macos-bundle/generated/Webdings-Bold.ttf +0 -0
  204. package/browser/fonts/macos-bundle/generated/Webdings-BoldItalic.ttf +0 -0
  205. package/browser/fonts/macos-bundle/generated/Webdings-Italic.ttf +0 -0
  206. package/browser/fonts/macos-bundle/generated/Webdings-Regular.ttf +0 -0
  207. package/browser/fonts/macos-bundle/generated/Zapfino-Bold.ttf +0 -0
  208. package/browser/fonts/macos-bundle/generated/Zapfino-BoldItalic.ttf +0 -0
  209. package/browser/fonts/macos-bundle/generated/Zapfino-Italic.ttf +0 -0
  210. package/browser/fonts/macos-bundle/generated/Zapfino-Regular.ttf +0 -0
  211. package/browser/fonts/macos-bundle/generated/manifest.json +2928 -0
  212. package/browser/fonts/macos-bundle/generated/systemui-Bold.ttf +0 -0
  213. package/browser/fonts/macos-bundle/generated/systemui-BoldItalic.ttf +0 -0
  214. package/browser/fonts/macos-bundle/generated/systemui-Italic.ttf +0 -0
  215. package/browser/fonts/macos-bundle/generated/systemui-Regular.ttf +0 -0
  216. package/browser/fonts/macos-bundle/install.sh +136 -0
  217. package/browser/fonts/macos-bundle/vendor/README.md +30 -0
  218. package/browser/fonts/macos-bundle/vendor/anton/Anton-Regular.ttf +0 -0
  219. package/browser/fonts/macos-bundle/vendor/anton/OFL.txt +93 -0
  220. package/browser/fonts/macos-bundle/vendor/gelasio/Gelasio-Italic-VariableFont_wght.ttf +0 -0
  221. package/browser/fonts/macos-bundle/vendor/gelasio/Gelasio-VariableFont_wght.ttf +0 -0
  222. package/browser/fonts/macos-bundle/vendor/gelasio/OFL.txt +93 -0
  223. package/browser/fonts/macos-bundle/verify-metric-fonts.py +171 -0
  224. package/dist/browser-controller.d.ts +47 -4
  225. package/dist/browser-controller.d.ts.map +1 -1
  226. package/dist/browser-controller.js +219 -278
  227. package/dist/browser-controller.js.map +1 -1
  228. package/dist/browser-plugin.d.ts +82 -110
  229. package/dist/browser-plugin.d.ts.map +1 -1
  230. package/dist/browser-plugin.js +405 -379
  231. package/dist/browser-plugin.js.map +1 -1
  232. package/dist/browser-process/align-fingerprint-config.d.ts +36 -0
  233. package/dist/browser-process/align-fingerprint-config.d.ts.map +1 -0
  234. package/dist/browser-process/align-fingerprint-config.js +74 -0
  235. package/dist/browser-process/align-fingerprint-config.js.map +1 -0
  236. package/dist/browser-process/anti-detect-browser.d.ts +2 -2
  237. package/dist/browser-process/anti-detect-browser.js +7 -7
  238. package/dist/browser-process/anti-detect-config.d.ts +146 -2
  239. package/dist/browser-process/anti-detect-config.d.ts.map +1 -1
  240. package/dist/browser-process/anti-detect-config.js +432 -127
  241. package/dist/browser-process/anti-detect-config.js.map +1 -1
  242. package/dist/browser-process/browser.d.ts +25 -92
  243. package/dist/browser-process/browser.d.ts.map +1 -1
  244. package/dist/browser-process/browser.js +467 -79
  245. package/dist/browser-process/browser.js.map +1 -1
  246. package/dist/browser-process/fingerprint-config.d.ts +146 -0
  247. package/dist/browser-process/fingerprint-config.d.ts.map +1 -0
  248. package/dist/browser-process/fingerprint-config.js +351 -0
  249. package/dist/browser-process/fingerprint-config.js.map +1 -0
  250. package/dist/browser-process/get-chrome-executable.d.ts +6 -0
  251. package/dist/browser-process/get-chrome-executable.d.ts.map +1 -1
  252. package/dist/browser-process/get-chrome-executable.js +79 -4
  253. package/dist/browser-process/get-chrome-executable.js.map +1 -1
  254. package/dist/browser-process/gpu-family-profiles.d.ts +58 -0
  255. package/dist/browser-process/gpu-family-profiles.d.ts.map +1 -0
  256. package/dist/browser-process/gpu-family-profiles.js +480 -0
  257. package/dist/browser-process/gpu-family-profiles.js.map +1 -0
  258. package/dist/browser-process/launch-options.d.ts +301 -0
  259. package/dist/browser-process/launch-options.d.ts.map +1 -0
  260. package/dist/browser-process/launch-options.js +2 -0
  261. package/dist/browser-process/launch-options.js.map +1 -0
  262. package/dist/browser-process/port-allocator.d.ts +64 -0
  263. package/dist/browser-process/port-allocator.d.ts.map +1 -0
  264. package/dist/browser-process/port-allocator.js +198 -0
  265. package/dist/browser-process/port-allocator.js.map +1 -0
  266. package/dist/browser-process/process.d.ts +85 -0
  267. package/dist/browser-process/process.d.ts.map +1 -1
  268. package/dist/browser-process/process.js +235 -19
  269. package/dist/browser-process/process.js.map +1 -1
  270. package/dist/browser-process/signal-cleanup.d.ts +40 -0
  271. package/dist/browser-process/signal-cleanup.d.ts.map +1 -0
  272. package/dist/browser-process/signal-cleanup.js +105 -0
  273. package/dist/browser-process/signal-cleanup.js.map +1 -0
  274. package/dist/browser-process/widevine-cdm.d.ts +144 -0
  275. package/dist/browser-process/widevine-cdm.d.ts.map +1 -0
  276. package/dist/browser-process/widevine-cdm.js +298 -0
  277. package/dist/browser-process/widevine-cdm.js.map +1 -0
  278. package/dist/browser-profiles/chrome/populate-profile.d.ts.map +1 -1
  279. package/dist/browser-profiles/chrome/populate-profile.js +21 -22
  280. package/dist/browser-profiles/chrome/populate-profile.js.map +1 -1
  281. package/dist/connection/cdp-reconnection.d.ts +50 -0
  282. package/dist/connection/cdp-reconnection.d.ts.map +1 -0
  283. package/dist/connection/cdp-reconnection.js +75 -0
  284. package/dist/connection/cdp-reconnection.js.map +1 -0
  285. package/dist/connection/page-session.d.ts +114 -0
  286. package/dist/connection/page-session.d.ts.map +1 -0
  287. package/dist/connection/page-session.js +237 -0
  288. package/dist/connection/page-session.js.map +1 -0
  289. package/dist/connection/session-client.d.ts +34 -0
  290. package/dist/connection/session-client.d.ts.map +1 -0
  291. package/dist/connection/session-client.js +129 -0
  292. package/dist/connection/session-client.js.map +1 -0
  293. package/dist/crawler.d.ts +9 -88
  294. package/dist/crawler.d.ts.map +1 -1
  295. package/dist/crawler.js +157 -8
  296. package/dist/crawler.js.map +1 -1
  297. package/dist/fingerprinting/fingerprint-injector.d.ts +24 -114
  298. package/dist/fingerprinting/fingerprint-injector.d.ts.map +1 -1
  299. package/dist/fingerprinting/fingerprint-injector.js +305 -611
  300. package/dist/fingerprinting/fingerprint-injector.js.map +1 -1
  301. package/dist/fingerprinting/fingerprint-overrides/datadome-bypass.d.ts +1 -1
  302. package/dist/fingerprinting/fingerprint-overrides/datadome-bypass.d.ts.map +1 -1
  303. package/dist/fingerprinting/fingerprint-overrides/datadome-bypass.js +16 -14
  304. package/dist/fingerprinting/fingerprint-overrides/datadome-bypass.js.map +1 -1
  305. package/dist/fingerprinting/fingerprint-overrides/index.d.ts +6 -2
  306. package/dist/fingerprinting/fingerprint-overrides/index.d.ts.map +1 -1
  307. package/dist/fingerprinting/fingerprint-overrides/index.js +6 -2
  308. package/dist/fingerprinting/fingerprint-overrides/index.js.map +1 -1
  309. package/dist/fingerprinting/fingerprint-overrides/keyboard-humanization.d.ts +1 -1
  310. package/dist/fingerprinting/fingerprint-overrides/keyboard-humanization.js +4 -4
  311. package/dist/fingerprinting/fingerprint-overrides/keyboard-humanization.js.map +1 -1
  312. package/dist/fingerprinting/fingerprint-overrides/locale-spoofing.js +4 -4
  313. package/dist/fingerprinting/fingerprint-overrides/navigator-override.d.ts +18 -0
  314. package/dist/fingerprinting/fingerprint-overrides/navigator-override.d.ts.map +1 -0
  315. package/dist/fingerprinting/fingerprint-overrides/navigator-override.js +136 -0
  316. package/dist/fingerprinting/fingerprint-overrides/navigator-override.js.map +1 -0
  317. package/dist/fingerprinting/fingerprint-overrides/override.d.ts +151 -0
  318. package/dist/fingerprinting/fingerprint-overrides/override.d.ts.map +1 -0
  319. package/dist/fingerprinting/fingerprint-overrides/override.js +14 -0
  320. package/dist/fingerprinting/fingerprint-overrides/override.js.map +1 -0
  321. package/dist/fingerprinting/fingerprint-overrides/platform-consistency.d.ts.map +1 -1
  322. package/dist/fingerprinting/fingerprint-overrides/platform-consistency.js +46 -15
  323. package/dist/fingerprinting/fingerprint-overrides/platform-consistency.js.map +1 -1
  324. package/dist/fingerprinting/fingerprint-overrides/registry.d.ts +43 -0
  325. package/dist/fingerprinting/fingerprint-overrides/registry.d.ts.map +1 -0
  326. package/dist/fingerprinting/fingerprint-overrides/registry.js +342 -0
  327. package/dist/fingerprinting/fingerprint-overrides/registry.js.map +1 -0
  328. package/dist/fingerprinting/fingerprint-overrides/screen-override.d.ts +16 -0
  329. package/dist/fingerprinting/fingerprint-overrides/screen-override.d.ts.map +1 -0
  330. package/dist/fingerprinting/fingerprint-overrides/screen-override.js +175 -0
  331. package/dist/fingerprinting/fingerprint-overrides/screen-override.js.map +1 -0
  332. package/dist/fingerprinting/fingerprint-overrides/scroll-humanization.d.ts +1 -1
  333. package/dist/fingerprinting/fingerprint-overrides/scroll-humanization.js +4 -4
  334. package/dist/fingerprinting/fingerprint-overrides/scroll-humanization.js.map +1 -1
  335. package/dist/fingerprinting/fingerprint-overrides/stealth-script.d.ts.map +1 -1
  336. package/dist/fingerprinting/fingerprint-overrides/stealth-script.js +75 -9
  337. package/dist/fingerprinting/fingerprint-overrides/stealth-script.js.map +1 -1
  338. package/dist/fingerprinting/fingerprint-overrides/ua-ch.d.ts +1 -1
  339. package/dist/fingerprinting/fingerprint-overrides/ua-ch.d.ts.map +1 -1
  340. package/dist/fingerprinting/fingerprint-overrides/ua-ch.js +34 -20
  341. package/dist/fingerprinting/fingerprint-overrides/ua-ch.js.map +1 -1
  342. package/dist/fingerprinting/fingerprint-overrides/webgl-spoofing.d.ts.map +1 -1
  343. package/dist/fingerprinting/fingerprint-overrides/webgl-spoofing.js +28 -9
  344. package/dist/fingerprinting/fingerprint-overrides/webgl-spoofing.js.map +1 -1
  345. package/dist/fingerprinting/fingerprint-overrides/webrtc-spoofing.js +1 -1
  346. package/dist/fingerprinting/hardware-realism.d.ts +74 -0
  347. package/dist/fingerprinting/hardware-realism.d.ts.map +1 -0
  348. package/dist/fingerprinting/hardware-realism.js +155 -0
  349. package/dist/fingerprinting/hardware-realism.js.map +1 -0
  350. package/dist/fingerprinting/injection-planner.d.ts +133 -0
  351. package/dist/fingerprinting/injection-planner.d.ts.map +1 -0
  352. package/dist/fingerprinting/injection-planner.js +497 -0
  353. package/dist/fingerprinting/injection-planner.js.map +1 -0
  354. package/dist/fingerprinting/locale-resolver.d.ts +8 -1
  355. package/dist/fingerprinting/locale-resolver.d.ts.map +1 -1
  356. package/dist/fingerprinting/locale-resolver.js +26 -3
  357. package/dist/fingerprinting/locale-resolver.js.map +1 -1
  358. package/dist/fingerprinting/non-apify-fingerprint-generator.d.ts +4 -4
  359. package/dist/fingerprinting/non-apify-fingerprint-generator.d.ts.map +1 -1
  360. package/dist/fingerprinting/non-apify-fingerprint-generator.js +35 -69
  361. package/dist/fingerprinting/non-apify-fingerprint-generator.js.map +1 -1
  362. package/dist/fingerprinting/non-apify-profiles.json +10515 -8494
  363. package/dist/fingerprinting/os-consistency.d.ts +28 -0
  364. package/dist/fingerprinting/os-consistency.d.ts.map +1 -0
  365. package/dist/fingerprinting/os-consistency.js +45 -0
  366. package/dist/fingerprinting/os-consistency.js.map +1 -0
  367. package/dist/fingerprinting/profile-quality.d.ts +25 -0
  368. package/dist/fingerprinting/profile-quality.d.ts.map +1 -0
  369. package/dist/fingerprinting/profile-quality.js +310 -0
  370. package/dist/fingerprinting/profile-quality.js.map +1 -0
  371. package/dist/fingerprinting/profile-selector.d.ts +102 -0
  372. package/dist/fingerprinting/profile-selector.d.ts.map +1 -0
  373. package/dist/fingerprinting/profile-selector.js +168 -0
  374. package/dist/fingerprinting/profile-selector.js.map +1 -0
  375. package/dist/fingerprinting/ua-alignment.d.ts +83 -0
  376. package/dist/fingerprinting/ua-alignment.d.ts.map +1 -0
  377. package/dist/fingerprinting/ua-alignment.js +197 -0
  378. package/dist/fingerprinting/ua-alignment.js.map +1 -0
  379. package/dist/fingerprinting/ua-ch-brands.d.ts +88 -0
  380. package/dist/fingerprinting/ua-ch-brands.d.ts.map +1 -0
  381. package/dist/fingerprinting/ua-ch-brands.js +174 -0
  382. package/dist/fingerprinting/ua-ch-brands.js.map +1 -0
  383. package/dist/index.d.ts +5 -0
  384. package/dist/index.d.ts.map +1 -1
  385. package/dist/index.js +6 -0
  386. package/dist/index.js.map +1 -1
  387. package/dist/input/dropdown-selector.d.ts +90 -0
  388. package/dist/input/dropdown-selector.d.ts.map +1 -0
  389. package/dist/input/dropdown-selector.js +394 -0
  390. package/dist/input/dropdown-selector.js.map +1 -0
  391. package/dist/input/element-target.d.ts +152 -0
  392. package/dist/input/element-target.d.ts.map +1 -0
  393. package/dist/input/element-target.js +461 -0
  394. package/dist/input/element-target.js.map +1 -0
  395. package/dist/input/input-emulator.d.ts +85 -0
  396. package/dist/input/input-emulator.d.ts.map +1 -0
  397. package/dist/input/input-emulator.js +325 -0
  398. package/dist/input/input-emulator.js.map +1 -0
  399. package/dist/input/input-transport.d.ts +60 -0
  400. package/dist/input/input-transport.d.ts.map +1 -0
  401. package/dist/input/input-transport.js +28 -0
  402. package/dist/input/input-transport.js.map +1 -0
  403. package/dist/input/recording-transport.d.ts +32 -0
  404. package/dist/input/recording-transport.d.ts.map +1 -0
  405. package/dist/input/recording-transport.js +43 -0
  406. package/dist/input/recording-transport.js.map +1 -0
  407. package/dist/keyboard-layout.d.ts +2 -2
  408. package/dist/keyboard-layout.js +2 -2
  409. package/dist/navigation/page-navigation.d.ts +67 -0
  410. package/dist/navigation/page-navigation.d.ts.map +1 -0
  411. package/dist/navigation/page-navigation.js +122 -0
  412. package/dist/navigation/page-navigation.js.map +1 -0
  413. package/dist/network/network-watch.d.ts +110 -0
  414. package/dist/network/network-watch.d.ts.map +1 -0
  415. package/dist/network/network-watch.js +223 -0
  416. package/dist/network/network-watch.js.map +1 -0
  417. package/dist/page.d.ts +123 -104
  418. package/dist/page.d.ts.map +1 -1
  419. package/dist/page.js +348 -1129
  420. package/dist/page.js.map +1 -1
  421. package/dist/session/inject-hook.d.ts +24 -0
  422. package/dist/session/inject-hook.d.ts.map +1 -0
  423. package/dist/session/inject-hook.js +80 -0
  424. package/dist/session/inject-hook.js.map +1 -0
  425. package/dist/session/save.d.ts +21 -0
  426. package/dist/session/save.d.ts.map +1 -0
  427. package/dist/session/save.js +163 -0
  428. package/dist/session/save.js.map +1 -0
  429. package/dist/session/tar-data-dir.d.ts +18 -0
  430. package/dist/session/tar-data-dir.d.ts.map +1 -0
  431. package/dist/session/tar-data-dir.js +105 -0
  432. package/dist/session/tar-data-dir.js.map +1 -0
  433. package/dist/session/types.d.ts +80 -0
  434. package/dist/session/types.d.ts.map +1 -0
  435. package/dist/session/types.js +29 -0
  436. package/dist/session/types.js.map +1 -0
  437. package/dist/session-profile.d.ts +102 -0
  438. package/dist/session-profile.d.ts.map +1 -0
  439. package/dist/session-profile.js +163 -0
  440. package/dist/session-profile.js.map +1 -0
  441. package/dist/tsconfig.build.tsbuildinfo +1 -1
  442. package/package.json +15 -6
  443. package/dist/fingerprinting/custom-fingerprint-injector.d.ts +0 -87
  444. package/dist/fingerprinting/custom-fingerprint-injector.d.ts.map +0 -1
  445. package/dist/fingerprinting/custom-fingerprint-injector.js +0 -342
  446. package/dist/fingerprinting/custom-fingerprint-injector.js.map +0 -1
  447. package/dist/launcher-wrap.d.ts +0 -10
  448. package/dist/launcher-wrap.d.ts.map +0 -1
  449. package/dist/launcher-wrap.js +0 -11
  450. package/dist/launcher-wrap.js.map +0 -1
@@ -0,0 +1,133 @@
1
+ /**
2
+ * InjectionPlanner - the pure half of fingerprint injection.
3
+ *
4
+ * `buildInjectionPlan` turns (fingerprint, options, binary version) into an
5
+ * InjectionPlan: a plain value describing everything the injector intends to
6
+ * do to the page. No CDP types, no I/O - the plan is the test surface.
7
+ * `CdpFingerprintInjector.attachToPage` is the thin executor that probes the
8
+ * binary version over CDP, builds the plan, and applies it.
9
+ */
10
+ import type { BrowserFingerprintWithHeaders } from 'fingerprint-generator';
11
+ import { type OverrideContext, type WebGLConfig, type PlatformConfig, type UAClientHintsData } from './fingerprint-overrides/index.js';
12
+ import type { ResolvedLocale } from './locale-resolver.js';
13
+ import type { FingerprintOptions } from '../browser-process/launch-options.js';
14
+ export interface Viewport {
15
+ width: number;
16
+ height: number;
17
+ deviceScaleFactor: number;
18
+ mobile: boolean;
19
+ }
20
+ export type { HumanizationOptions } from '../browser-process/launch-options.js';
21
+ /**
22
+ * The injector's resolved input DTO. The spoof-toggle fields are inherited from
23
+ * the canonical `FingerprintOptions` (issue #80) - `locale`/`languages`/`seedKey`/
24
+ * `forceEmulateWebgl` are resolved upstream (into `resolvedLocale` / launch args /
25
+ * the C++ config) and never reach the injector, so they are omitted. The extra
26
+ * fields below are injector-boundary concerns not present on the public bag.
27
+ *
28
+ * Note on `useNativeStealth`: when true the ENTIRE JS override pipeline is skipped
29
+ * (see `buildInjectionPlan`'s native fast-path) - the C++ source-tree edits own
30
+ * every fingerprint surface. Humanization is unaffected: it runs through the CDP
31
+ * Input layer (InputEmulator) per-interaction, not through an injected script.
32
+ */
33
+ export interface AttachOptions extends Omit<FingerprintOptions, 'locale' | 'languages' | 'seedKey' | 'forceEmulateWebgl'> {
34
+ proxyUrl?: string;
35
+ viewport?: Viewport;
36
+ /** @deprecated Use humanization.mouse instead */
37
+ humanizeInteractions?: boolean;
38
+ /**
39
+ * Alias for enableDataDomeBypass - enables all DataDome-specific protections
40
+ * When true, injects enhanced bypass early in the script chain
41
+ */
42
+ bypassDatadome?: boolean;
43
+ /**
44
+ * Pre-resolved locale triple. When provided, drives CDP Emulation.setLocaleOverride,
45
+ * Emulation.setTimezoneOverride, Accept-Language header, and the locale-spoofing
46
+ * script's baked-in values. Supersedes any legacy `timezone`/`detectTimezone` logic:
47
+ * if resolvedLocale.timezone is set, we skip the ipinfo.io round-trip.
48
+ */
49
+ resolvedLocale?: ResolvedLocale;
50
+ }
51
+ /**
52
+ * Everything `attachToPage` intends to do, as a plain value.
53
+ *
54
+ * `native` plans carry no script bundle: the C++ anti-detect binary owns every
55
+ * fingerprint surface, and the only page-level action allowed is the
56
+ * Accept-Language header (Chrome's profile default leaks `en-US,en;q=0.9`
57
+ * even under `--lang`; a single HTTP header is not a fingerprintable CDP
58
+ * artifact, unlike Runtime.enable or inspector traces).
59
+ */
60
+ export type InjectionPlan = {
61
+ kind: 'native';
62
+ /** Accept-Language header value, when a resolved locale demands one. */
63
+ acceptLanguage?: string;
64
+ } | {
65
+ kind: 'full';
66
+ /** Emulation.setTimezoneOverride target, when any timezone source resolved. */
67
+ timezone?: string;
68
+ /** Emulation.setLocaleOverride target. */
69
+ locale?: string;
70
+ /** Injectable subset of fingerprint headers, locale + UA aligned. */
71
+ headers: Record<string, string>;
72
+ /** UA string aligned to the running binary's major version ('' = none). */
73
+ userAgent: string;
74
+ /** UA-CH metadata aligned to the running binary, when fingerprint data is in use. */
75
+ uaClientHints?: UAClientHintsData;
76
+ /**
77
+ * The running binary's real build version from `Browser.getVersion`
78
+ * (e.g. "147.0.7727.56"), or null when the probe failed. UA-CH surfaces
79
+ * must take the full version from HERE, never from the UA string, which
80
+ * UA Reduction has frozen to MAJOR.0.0.0 (issue #131).
81
+ */
82
+ binaryFullVersion: string | null;
83
+ platform: 'Win32' | 'MacIntel' | 'Linux x86_64';
84
+ viewport?: Viewport;
85
+ /** The single bundled script for Page.addScriptToEvaluateOnNewDocument. */
86
+ bundledScript: string;
87
+ debug: boolean;
88
+ };
89
+ export interface InjectionPlanInput {
90
+ browserFingerprintWithHeaders: BrowserFingerprintWithHeaders;
91
+ options?: AttachOptions;
92
+ /** From the executor's CDP Browser.getVersion probe; null when unavailable. */
93
+ actualChromeVersion: string | null;
94
+ /** From the executor's ipinfo.io lookup, only when `needsIpTimezoneLookup`. */
95
+ ipTimezone?: string;
96
+ }
97
+ /** The native-stealth fast-path gate. The executor must not probe CDP when this holds. */
98
+ export declare function isNativeStealth(options?: AttachOptions): boolean;
99
+ /**
100
+ * Legacy timezone path: no resolved triple, but `timezone`/`detectTimezone` was
101
+ * set → the executor owes the planner an ipinfo.io lookup result.
102
+ * (Historical quirk preserved: an explicit legacy `timezone` value also
103
+ * triggers the IP lookup; the literal value is never used directly.)
104
+ */
105
+ export declare function needsIpTimezoneLookup(options?: AttachOptions): boolean;
106
+ /**
107
+ * Strip CDP-injection tells from one override script.
108
+ * Anti-bot services hook console.log and detect debug prefixes like
109
+ * [CDP-FP-DEBUG], [DD-BYPASS], [RUNTIME-ENABLE-BYPASS] - so console output is
110
+ * stripped in production. sourceURL comments would name our repo layout.
111
+ */
112
+ export declare function cleanInjectedScript(script: string, debug: boolean): string;
113
+ /** Test-only: drop the process-level clean/validation memo so runs start fresh. */
114
+ export declare function resetInjectionPlanCachesForTesting(): void;
115
+ /**
116
+ * Normalize options into the narrow OverrideContext - the only shape the
117
+ * override registry sees. All option defaults are resolved here, once.
118
+ */
119
+ export declare function buildOverrideContext(options: AttachOptions | undefined, data: {
120
+ fingerprint: OverrideContext['fingerprint'];
121
+ webglConfig?: WebGLConfig;
122
+ platformConfig?: PlatformConfig;
123
+ uaClientHints?: UAClientHintsData;
124
+ binaryFullVersion?: string | null;
125
+ }): OverrideContext;
126
+ /**
127
+ * Build the InjectionPlan. Pure: same inputs → same plan.
128
+ *
129
+ * Throws when the assembled script bundle fails syntax validation - a plan
130
+ * that would crash the page is a planning error, not an execution error.
131
+ */
132
+ export declare function buildInjectionPlan(input: InjectionPlanInput): InjectionPlan;
133
+ //# sourceMappingURL=injection-planner.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"injection-planner.d.ts","sourceRoot":"","sources":["../../src/fingerprinting/injection-planner.ts"],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;AAiLD;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,kBAAkB,GAAG,aAAa,CAmN3E"}
@@ -0,0 +1,497 @@
1
+ /**
2
+ * InjectionPlanner - the pure half of fingerprint injection.
3
+ *
4
+ * `buildInjectionPlan` turns (fingerprint, options, binary version) into an
5
+ * InjectionPlan: a plain value describing everything the injector intends to
6
+ * do to the page. No CDP types, no I/O - the plan is the test surface.
7
+ * `CdpFingerprintInjector.attachToPage` is the thin executor that probes the
8
+ * binary version over CDP, builds the plan, and applies it.
9
+ */
10
+ import { log } from 'crawlee';
11
+ import { assembleOverrideScripts } from './fingerprint-overrides/registry.js';
12
+ import { deriveRealisticDeviceMemory, normalizePlatformVersion, stableSeedFromString, } from './hardware-realism.js';
13
+ import { alignPlatformConfigWithBinary, alignUAClientHintsVersion, alignUserAgentWithBrowserVersion, buildInjectableHeaders, } from './ua-alignment.js';
14
+ import { resolveInjectionSeedKey } from '../session-profile.js';
15
+ /** The native-stealth fast-path gate. The executor must not probe CDP when this holds. */
16
+ export function isNativeStealth(options) {
17
+ return options?.useNativeStealth === true;
18
+ }
19
+ /**
20
+ * Legacy timezone path: no resolved triple, but `timezone`/`detectTimezone` was
21
+ * set → the executor owes the planner an ipinfo.io lookup result.
22
+ * (Historical quirk preserved: an explicit legacy `timezone` value also
23
+ * triggers the IP lookup; the literal value is never used directly.)
24
+ */
25
+ export function needsIpTimezoneLookup(options) {
26
+ return !options?.resolvedLocale?.timezone
27
+ && Boolean(options?.timezone || options?.detectTimezone);
28
+ }
29
+ /**
30
+ * Strip CDP-injection tells from one override script.
31
+ * Anti-bot services hook console.log and detect debug prefixes like
32
+ * [CDP-FP-DEBUG], [DD-BYPASS], [RUNTIME-ENABLE-BYPASS] - so console output is
33
+ * stripped in production. sourceURL comments would name our repo layout.
34
+ */
35
+ export function cleanInjectedScript(script, debug) {
36
+ let cleaned = script
37
+ // Remove sourceURL patterns that reveal CDP injection
38
+ .replace(/\/\/# sourceURL=[^\n]*/g, '')
39
+ .replace(/\/\/@ sourceURL=[^\n]*/g, '')
40
+ // Remove sourceMappingURL patterns
41
+ .replace(/\/\/# sourceMappingURL=[^\n]*/g, '')
42
+ // Remove puppeteer/playwright markers
43
+ .replace(/__puppeteer_evaluation_script__/g, 'anonymous')
44
+ .replace(/__playwright_evaluation_script__/g, 'anonymous')
45
+ // Remove CDP-specific comments
46
+ .replace(/\/\*\s*__CDP_[A-Z_]+__\s*\*\//g, '');
47
+ if (!debug) {
48
+ cleaned = cleaned
49
+ .replace(/^\s*console\.(log|warn|info|debug)\s*\([^;]*\);?\s*$/gm, '')
50
+ .replace(/^\s*const\s+(DEBUG_PREFIX|ERROR_PREFIX)\s*=\s*[^;]*;\s*$/gm, '');
51
+ }
52
+ return cleaned;
53
+ }
54
+ /**
55
+ * Cleaned form of each static override script, keyed by debug state + raw script
56
+ * bytes. Static scripts are a small fixed set, so this map stays bounded and its
57
+ * 6-8 regex passes run once per process per debug state. Per-session (dynamic)
58
+ * scripts are never keyed in here - they clean fresh on every build so proxy
59
+ * sessions never bleed cleaned bytes into one another.
60
+ */
61
+ const cleanedStaticScriptCache = new Map();
62
+ /**
63
+ * `new Function` bundle syntax validation runs once per process. The static bulk
64
+ * of the bundle is constant, so once the first assembled bundle parses cleanly
65
+ * we skip the (expensive) re-parse on every subsequent page. The per-script
66
+ * fallback diagnosis below still runs whenever validation actually fails.
67
+ */
68
+ let bundleSyntaxValidated = false;
69
+ /**
70
+ * Injection seed key per proxyUrl, resolved once per session for process
71
+ * lifetime. `resolveInjectionSeedKey` runs a regex parse (and the caller then
72
+ * pays a JSON.stringify for the preamble) - both are stable per proxy session,
73
+ * so the parse cost is paid once per session, not per page. Keyed per proxyUrl
74
+ * (no-proxy → the empty-string key) so distinct sessions never share a key.
75
+ */
76
+ const injectionSeedKeyByProxy = new Map();
77
+ function cachedInjectionSeedKey(proxyUrl) {
78
+ const key = proxyUrl ?? '';
79
+ const cached = injectionSeedKeyByProxy.get(key);
80
+ if (cached !== undefined)
81
+ return cached;
82
+ const resolved = resolveInjectionSeedKey(proxyUrl);
83
+ injectionSeedKeyByProxy.set(key, resolved);
84
+ return resolved;
85
+ }
86
+ /**
87
+ * Clean one override script, memoizing the result for static scripts only.
88
+ */
89
+ function cleanScript(script, debug, isStatic) {
90
+ if (!isStatic) {
91
+ return cleanInjectedScript(script, debug);
92
+ }
93
+ const key = `${debug ? 'd' : 'p'}:${script}`;
94
+ let cleaned = cleanedStaticScriptCache.get(key);
95
+ if (cleaned === undefined) {
96
+ cleaned = cleanInjectedScript(script, debug);
97
+ cleanedStaticScriptCache.set(key, cleaned);
98
+ }
99
+ return cleaned;
100
+ }
101
+ /** Test-only: drop the process-level clean/validation memo so runs start fresh. */
102
+ export function resetInjectionPlanCachesForTesting() {
103
+ cleanedStaticScriptCache.clear();
104
+ bundleSyntaxValidated = false;
105
+ injectionSeedKeyByProxy.clear();
106
+ }
107
+ /**
108
+ * Normalize options into the narrow OverrideContext - the only shape the
109
+ * override registry sees. All option defaults are resolved here, once.
110
+ */
111
+ export function buildOverrideContext(options, data) {
112
+ return {
113
+ advancedStealth: options?.enableAdvancedStealth !== false,
114
+ maskAutomation: options?.maskAutomationFlags !== false,
115
+ dataDomeBypass: Boolean(options?.enableDataDomeBypass || options?.bypassDatadome),
116
+ webRtcPolicy: options?.webRtcPolicy === 'disable' ? 'disable' : 'spoof',
117
+ humanization: {
118
+ mouse: Boolean(options?.humanization?.mouse || options?.humanizeInteractions),
119
+ keyboard: Boolean(options?.humanization?.keyboard),
120
+ scroll: Boolean(options?.humanization?.scroll),
121
+ },
122
+ spoof: {
123
+ webgl: options?.spoofWebGL !== false,
124
+ audio: options?.spoofAudioContext !== false,
125
+ clientRects: options?.spoofClientRects !== false,
126
+ fonts: options?.spoofFonts !== false,
127
+ performance: options?.spoofPerformance !== false,
128
+ locale: options?.spoofLocale !== false,
129
+ storage: options?.spoofStorage !== false,
130
+ timing: options?.spoofTiming !== false,
131
+ cdpDetection: options?.bypassCDPDetection !== false,
132
+ },
133
+ platform: options?.platform,
134
+ debug: options?.debug === true,
135
+ fingerprint: data.fingerprint,
136
+ webglConfig: data.webglConfig,
137
+ platformConfig: data.platformConfig,
138
+ uaClientHints: data.uaClientHints,
139
+ binaryFullVersion: data.binaryFullVersion ?? undefined,
140
+ useExperimentalFingerprints: Boolean(options?.useExperimentalFingerprints),
141
+ locale: {
142
+ locale: options?.resolvedLocale?.locale ?? 'en-US',
143
+ languages: options?.resolvedLocale?.languages ?? 'en-US,en;q=0.9',
144
+ },
145
+ };
146
+ }
147
+ /**
148
+ * Extract relevant data from fingerprint for overrides
149
+ */
150
+ function extractFingerprintData(fingerprint) {
151
+ const webglConfig = {};
152
+ const platformConfig = {};
153
+ let uaClientHints;
154
+ // Extract WebGL data from videoCard if available
155
+ if (fingerprint.videoCard) {
156
+ webglConfig.vendor = fingerprint.videoCard.vendor;
157
+ webglConfig.renderer = fingerprint.videoCard.renderer;
158
+ webglConfig.vendorUnmasked = fingerprint.videoCard.vendor;
159
+ webglConfig.rendererUnmasked = fingerprint.videoCard.renderer;
160
+ }
161
+ // Extract platform data if available
162
+ if (fingerprint.navigator) {
163
+ platformConfig.platform = fingerprint.navigator.platform;
164
+ platformConfig.vendor = fingerprint.navigator.vendor;
165
+ platformConfig.vendorSub = fingerprint.navigator.vendorSub;
166
+ platformConfig.productSub = fingerprint.navigator.productSub;
167
+ platformConfig.hardwareConcurrency = fingerprint.navigator.hardwareConcurrency;
168
+ platformConfig.maxTouchPoints = fingerprint.navigator.maxTouchPoints;
169
+ platformConfig.language = fingerprint.navigator.language;
170
+ platformConfig.languages = fingerprint.navigator.languages;
171
+ platformConfig.oscpu = fingerprint.navigator.oscpu;
172
+ platformConfig.userAgent = fingerprint.navigator.userAgent;
173
+ platformConfig.appVersion = fingerprint.navigator.appVersion;
174
+ platformConfig.appName = fingerprint.navigator.appName;
175
+ platformConfig.appCodeName = fingerprint.navigator.appCodeName;
176
+ platformConfig.product = fingerprint.navigator.product;
177
+ // Extract UA-CH data from generated fingerprint
178
+ // This ensures navigator.userAgentData brands/versions match the UA string
179
+ if (fingerprint.navigator.userAgentData) {
180
+ const uad = fingerprint.navigator.userAgentData;
181
+ uaClientHints = {
182
+ brands: uad.brands,
183
+ fullVersionList: uad.fullVersionList,
184
+ mobile: uad.mobile,
185
+ platform: uad.platform,
186
+ architecture: uad.architecture,
187
+ bitness: uad.bitness,
188
+ model: uad.model,
189
+ platformVersion: uad.platformVersion,
190
+ uaFullVersion: uad.uaFullVersion,
191
+ // wow64 is not part of the generator's UserAgentData shape but the
192
+ // real navigator.userAgentData carries it; forward when present.
193
+ wow64: uad.wow64,
194
+ };
195
+ }
196
+ }
197
+ if (fingerprint.screen) {
198
+ platformConfig.devicePixelRatio = fingerprint.screen.devicePixelRatio;
199
+ platformConfig.screenDepth = fingerprint.screen.pixelDepth;
200
+ platformConfig.colorDepth = fingerprint.screen.colorDepth;
201
+ }
202
+ return { webglConfig, platformConfig, uaClientHints };
203
+ }
204
+ /**
205
+ * Create a debug script that logs fingerprint override status to the console
206
+ */
207
+ function createDebugScript(options) {
208
+ return `
209
+ (() => {
210
+ // CDP Fingerprint Override Debug Logs
211
+ const DEBUG_PREFIX = '[CDP-FP-DEBUG]';
212
+
213
+ console.log(DEBUG_PREFIX, '=== Fingerprint Override Status ===');
214
+ console.log(DEBUG_PREFIX, 'Timestamp:', new Date().toISOString());
215
+
216
+ // Check navigator properties
217
+ console.log(DEBUG_PREFIX, 'Navigator Checks:');
218
+ console.log(DEBUG_PREFIX, ' - platform:', navigator.platform);
219
+ console.log(DEBUG_PREFIX, ' - userAgent:', navigator.userAgent.substring(0, 80) + '...');
220
+ console.log(DEBUG_PREFIX, ' - webdriver:', navigator.webdriver);
221
+ console.log(DEBUG_PREFIX, ' - hardwareConcurrency:', navigator.hardwareConcurrency);
222
+ console.log(DEBUG_PREFIX, ' - deviceMemory:', navigator.deviceMemory);
223
+ console.log(DEBUG_PREFIX, ' - language:', navigator.language);
224
+ console.log(DEBUG_PREFIX, ' - languages:', navigator.languages);
225
+ console.log(DEBUG_PREFIX, ' - maxTouchPoints:', navigator.maxTouchPoints);
226
+ console.log(DEBUG_PREFIX, ' - pdfViewerEnabled:', navigator.pdfViewerEnabled);
227
+ console.log(DEBUG_PREFIX, ' - plugins.length:', navigator.plugins?.length);
228
+
229
+ // Check screen properties
230
+ console.log(DEBUG_PREFIX, 'Screen Checks:');
231
+ console.log(DEBUG_PREFIX, ' - colorDepth:', screen.colorDepth);
232
+ console.log(DEBUG_PREFIX, ' - pixelDepth:', screen.pixelDepth);
233
+ console.log(DEBUG_PREFIX, ' - availWidth:', screen.availWidth);
234
+ console.log(DEBUG_PREFIX, ' - availHeight:', screen.availHeight);
235
+ console.log(DEBUG_PREFIX, ' - devicePixelRatio:', window.devicePixelRatio);
236
+
237
+ // Check window properties
238
+ console.log(DEBUG_PREFIX, 'Window Checks:');
239
+ console.log(DEBUG_PREFIX, ' - outerWidth:', window.outerWidth);
240
+ console.log(DEBUG_PREFIX, ' - outerHeight:', window.outerHeight);
241
+ console.log(DEBUG_PREFIX, ' - screenX:', window.screenX);
242
+ console.log(DEBUG_PREFIX, ' - screenY:', window.screenY);
243
+
244
+ // Check chrome object
245
+ console.log(DEBUG_PREFIX, 'Chrome Object:');
246
+ console.log(DEBUG_PREFIX, ' - chrome exists:', typeof window.chrome !== 'undefined');
247
+ console.log(DEBUG_PREFIX, ' - chrome.runtime exists:', typeof window.chrome?.runtime !== 'undefined');
248
+
249
+ // Check WebGL
250
+ try {
251
+ const canvas = document.createElement('canvas');
252
+ const gl = canvas.getContext('webgl') || canvas.getContext('experimental-webgl');
253
+ if (gl) {
254
+ const debugInfo = gl.getExtension('WEBGL_debug_renderer_info');
255
+ if (debugInfo) {
256
+ console.log(DEBUG_PREFIX, 'WebGL Checks:');
257
+ console.log(DEBUG_PREFIX, ' - vendor:', gl.getParameter(debugInfo.UNMASKED_VENDOR_WEBGL));
258
+ console.log(DEBUG_PREFIX, ' - renderer:', gl.getParameter(debugInfo.UNMASKED_RENDERER_WEBGL));
259
+ } else {
260
+ console.log(DEBUG_PREFIX, 'WebGL debug extension not available');
261
+ }
262
+ } else {
263
+ console.log(DEBUG_PREFIX, 'WebGL context not available');
264
+ }
265
+ } catch (e) {
266
+ console.log(DEBUG_PREFIX, 'WebGL check failed:', e.message);
267
+ }
268
+
269
+ // Check automation markers
270
+ console.log(DEBUG_PREFIX, 'Automation Marker Checks:');
271
+ console.log(DEBUG_PREFIX, ' - $cdc_ properties:', Object.keys(window).filter(k => k.startsWith('$cdc_') || k.startsWith('cdc_')).length === 0 ? 'CLEAN' : 'DETECTED');
272
+ console.log(DEBUG_PREFIX, ' - webdriver properties:', Object.keys(window).filter(k => k.toLowerCase().includes('webdriver')).length === 0 ? 'CLEAN' : 'DETECTED');
273
+
274
+ // Check permissions API
275
+ if (navigator.permissions) {
276
+ navigator.permissions.query({ name: 'notifications' }).then(result => {
277
+ console.log(DEBUG_PREFIX, 'Permissions:');
278
+ console.log(DEBUG_PREFIX, ' - notifications:', result.state);
279
+ }).catch(e => {
280
+ console.log(DEBUG_PREFIX, 'Permissions check failed:', e.message);
281
+ });
282
+ }
283
+
284
+ // Check storage estimate
285
+ if (navigator.storage && navigator.storage.estimate) {
286
+ navigator.storage.estimate().then(estimate => {
287
+ console.log(DEBUG_PREFIX, 'Storage:');
288
+ console.log(DEBUG_PREFIX, ' - quota:', Math.round(estimate.quota / 1024 / 1024 / 1024) + ' GB');
289
+ console.log(DEBUG_PREFIX, ' - usage:', Math.round(estimate.usage / 1024) + ' KB');
290
+ }).catch(e => {
291
+ console.log(DEBUG_PREFIX, 'Storage check failed:', e.message);
292
+ });
293
+ }
294
+
295
+ // Log applied options
296
+ console.log(DEBUG_PREFIX, 'Applied Options:');
297
+ console.log(DEBUG_PREFIX, ' - platform:', '${options.platform || "auto"}');
298
+ console.log(DEBUG_PREFIX, ' - enableAdvancedStealth:', ${options.enableAdvancedStealth !== false});
299
+ console.log(DEBUG_PREFIX, ' - bypassCDPDetection:', ${options.bypassCDPDetection !== false});
300
+ console.log(DEBUG_PREFIX, ' - spoofStorage:', ${options.spoofStorage !== false});
301
+ console.log(DEBUG_PREFIX, ' - spoofTiming:', ${options.spoofTiming !== false});
302
+ console.log(DEBUG_PREFIX, ' - enableDataDomeBypass:', ${options.enableDataDomeBypass || false});
303
+ console.log(DEBUG_PREFIX, ' - humanization.mouse:', ${options.humanization?.mouse || false});
304
+ console.log(DEBUG_PREFIX, ' - humanization.keyboard:', ${options.humanization?.keyboard || false});
305
+ console.log(DEBUG_PREFIX, ' - humanization.scroll:', ${options.humanization?.scroll || false});
306
+
307
+ console.log(DEBUG_PREFIX, '=== End Fingerprint Override Status ===');
308
+ })();
309
+ `;
310
+ }
311
+ /**
312
+ * Build the InjectionPlan. Pure: same inputs → same plan.
313
+ *
314
+ * Throws when the assembled script bundle fails syntax validation - a plan
315
+ * that would crash the page is a planning error, not an execution error.
316
+ */
317
+ export function buildInjectionPlan(input) {
318
+ const { options, actualChromeVersion, ipTimezone } = input;
319
+ const { fingerprint, headers } = input.browserFingerprintWithHeaders;
320
+ // ── Native-stealth fast-path ─────────────────────────────────────────
321
+ // Every fingerprint surface is handled by the C++ source-tree edits.
322
+ // CDP-side overrides are strictly incompatible with native stealth: they
323
+ // either duplicate what the C++ patches already do (double-override →
324
+ // inconsistency) or introduce CDP artifacts the C++ patches are designed
325
+ // to hide. The only allowed action is the Accept-Language header.
326
+ if (isNativeStealth(options)) {
327
+ return {
328
+ kind: 'native',
329
+ acceptLanguage: options?.resolvedLocale?.languages,
330
+ };
331
+ }
332
+ // Locale/timezone resolution priority:
333
+ // 1. Resolved triple from browser-plugin (user locale → proxy country → fingerprint)
334
+ // 2. Legacy options.timezone / options.detectTimezone → executor's ipinfo.io lookup
335
+ // Resolved values always win so fingerprintOptions.locale: 'ko-KR' coherently
336
+ // propagates to every locale surface.
337
+ const timezone = options?.resolvedLocale?.timezone ?? ipTimezone;
338
+ // Version-alignment + header filtering are pure - see ua-alignment.ts.
339
+ const originalUserAgent = fingerprint?.navigator?.userAgent
340
+ || headers['user-agent']
341
+ || headers['User-Agent']
342
+ || '';
343
+ const userAgent = alignUserAgentWithBrowserVersion(originalUserAgent, actualChromeVersion);
344
+ // Session seed for the hardware-realism helpers. The proxy session key is the
345
+ // same input the injected bundle seeds itself from, so a session's reported
346
+ // memory/quota/platformVersion stay stable across its pages and match what the
347
+ // native config generator would derive.
348
+ const injectionSeed = stableSeedFromString(cachedInjectionSeedKey(options?.proxyUrl) ?? originalUserAgent);
349
+ const filteredHeaders = buildInjectableHeaders(headers, options?.resolvedLocale?.languages, userAgent, actualChromeVersion);
350
+ // Extract fingerprint data if we should use it
351
+ // When useFingerprintDefaults is true (or undefined), use hardcoded defaults
352
+ // When useFingerprintDefaults is false, use the generated fingerprint data
353
+ const shouldUseFingerprintData = options?.useFingerprintDefaults === false;
354
+ const { webglConfig, platformConfig, uaClientHints: rawUaClientHints } = shouldUseFingerprintData
355
+ ? extractFingerprintData(fingerprint)
356
+ : { webglConfig: undefined, platformConfig: undefined, uaClientHints: undefined };
357
+ // Align UA-CH brand/full-version fields with the actual running binary so the
358
+ // fingerprint profile version (132-135) doesn't contradict the real binary (147+).
359
+ const alignedUaClientHints = rawUaClientHints && actualChromeVersion
360
+ ? alignUAClientHintsVersion(rawUaClientHints, actualChromeVersion)
361
+ : rawUaClientHints;
362
+ // One platformVersion for the whole path: the UA-CH override script, the
363
+ // getHighEntropyValues answer and the sec-ch-ua-platform-version header all
364
+ // read this. Pool Linux rows either omit it (90%) or carry a pre-reduction
365
+ // kernel version, and the old fallback was a macOS number (issue #137).
366
+ const uaClientHints = alignedUaClientHints
367
+ ? {
368
+ ...alignedUaClientHints,
369
+ platformVersion: normalizePlatformVersion(options?.platform ?? fingerprint?.navigator?.platform, alignedUaClientHints.platformVersion, injectionSeed),
370
+ }
371
+ : alignedUaClientHints;
372
+ const platformConfigForScript = alignPlatformConfigWithBinary(shouldUseFingerprintData ? platformConfig : undefined, options?.platform, actualChromeVersion);
373
+ const isDebug = options?.debug === true;
374
+ // The navigator-override module bakes `fingerprint.navigator.userAgent`
375
+ // VERBATIM into the injected bundle. Feed the registry an aligned copy so
376
+ // the bundle can never contradict `plan.userAgent` / the sec-ch-ua headers.
377
+ //
378
+ // `CdpFingerprintInjector.attachToPage` also aligns the shared fingerprint
379
+ // in place before calling us - but that mutation exists for a different
380
+ // consumer (Crawlee's own postPageCreate hook, issue #104), and relying on
381
+ // it here made this "pure" function's output silently depend on the caller
382
+ // having run that step first. Any other call site, or a reordering, would
383
+ // reintroduce a stale navigator.userAgent. Copy rather than mutate, so
384
+ // buildInjectionPlan stays free of side effects on its input.
385
+ //
386
+ // `deviceMemory` is sanitized in the same copy. The pool ships mac rows
387
+ // claiming 0/1/2/4 GB - values no Mac has shipped - and the navigator
388
+ // override treated the profile value as authoritative. A 0 was worse than
389
+ // wrong: it is falsy, so the override was skipped and the page reported the
390
+ // HOST's real RAM (issue #137). The native path already resampled; now both
391
+ // paths call the same helper with the same seed.
392
+ const rawDeviceMemory = fingerprint?.navigator?.deviceMemory;
393
+ const coherentDeviceMemory = deriveRealisticDeviceMemory(injectionSeed, rawDeviceMemory);
394
+ const needsUserAgentFix = Boolean(userAgent && fingerprint?.navigator?.userAgent
395
+ && fingerprint.navigator.userAgent !== userAgent);
396
+ const needsDeviceMemoryFix = Boolean(fingerprint?.navigator) && rawDeviceMemory !== coherentDeviceMemory;
397
+ const fingerprintForOverrides = (needsUserAgentFix || needsDeviceMemoryFix)
398
+ ? {
399
+ ...fingerprint,
400
+ navigator: {
401
+ ...fingerprint.navigator,
402
+ ...(needsUserAgentFix
403
+ ? {
404
+ userAgent,
405
+ ...(fingerprint?.navigator?.appVersion
406
+ ? { appVersion: alignUserAgentWithBrowserVersion(fingerprint.navigator.appVersion, actualChromeVersion) }
407
+ : {}),
408
+ }
409
+ : {}),
410
+ ...(needsDeviceMemoryFix ? { deviceMemory: coherentDeviceMemory } : {}),
411
+ },
412
+ }
413
+ : fingerprint;
414
+ const overrideContext = buildOverrideContext(options, {
415
+ fingerprint: fingerprintForOverrides,
416
+ webglConfig,
417
+ platformConfig: platformConfigForScript,
418
+ uaClientHints,
419
+ binaryFullVersion: actualChromeVersion,
420
+ });
421
+ // One seam: filter by native coverage, filter by option gates, sort by
422
+ // declared order, build each override. Native runs never reach this point
423
+ // (early return above), but the registry filter IS the documented map of
424
+ // which surfaces the C++ binary owns. Each script carries an `isStatic` tag
425
+ // so the cleaning pass can be memoized for context-independent scripts only.
426
+ const assembled = assembleOverrideScripts(overrideContext, { nativeStealth: false });
427
+ // Add debug scripts into the bundle only when explicitly enabled. The debug
428
+ // script interpolates option values, so it is never treated as static.
429
+ if (isDebug) {
430
+ assembled.push({ script: createDebugScript(options || {}), isStatic: false });
431
+ }
432
+ // BUNDLE ALL SCRIPTS INTO ONE to minimize CDP interactions.
433
+ // debug, not info: this fires once per page, so on a real crawl it would
434
+ // emit thousands of identical lines.
435
+ log.debug(`Bundling ${assembled.length} fingerprint scripts into single injection`);
436
+ // Extract proxy seed key for deterministic fingerprint seeding.
437
+ // Priority: session ID from Apify proxy URL > full proxy URL > null.
438
+ const proxySeedKey = cachedInjectionSeedKey(options?.proxyUrl);
439
+ // Preamble: create shared stealth store accessible by all module IIFEs via closure.
440
+ // seedKey: proxy session ID or proxy URL - used by _stableHash for deterministic fingerprints.
441
+ const preamble = `var __stealth = { debug: ${isDebug}, seedKey: ${proxySeedKey ? JSON.stringify(proxySeedKey) : 'null'} };`;
442
+ // Neutralize the CDP-injection stack-frame tell. V8 renders scripts
443
+ // registered via Page.addScriptToEvaluateOnNewDocument that carry no
444
+ // sourceURL as "<anonymous>" in Error.stack - a well-known detection
445
+ // vector (DataDome, CreepJS, fpscanner all check for it). Appending
446
+ // `//# sourceURL=about:blank` makes V8 render stack frames as if the
447
+ // script loaded from about:blank, which is indistinguishable from
448
+ // a normal bootstrap script on a fresh page.
449
+ //
450
+ // Note: the cleanInjectedScript pass strips *existing* sourceURL comments
451
+ // in the per-module scripts (to avoid the comment naming a file path
452
+ // that reveals our repo layout). We then stamp exactly one sourceURL
453
+ // on the outer bundle so the final script V8 sees has a clean name.
454
+ const bundledScript = `${preamble}\n\n${assembled
455
+ .map(({ script, isStatic }) => cleanScript(script, isDebug, isStatic))
456
+ .join('\n\n')}\n//# sourceURL=about:blank\n`;
457
+ // Validate the bundled script for syntax errors, but only once per process:
458
+ // the static bulk of the bundle is constant, so re-parsing every page is pure
459
+ // overhead. The per-script fallback diagnosis still runs on an actual failure.
460
+ if (!bundleSyntaxValidated) {
461
+ try {
462
+ // eslint-disable-next-line no-new-func, no-new
463
+ new Function(bundledScript);
464
+ bundleSyntaxValidated = true;
465
+ log.debug('✓ Bundled script passed syntax validation');
466
+ }
467
+ catch (error) {
468
+ log.error('✗ Bundled script has syntax error:', { error });
469
+ // Fall back to individual script validation to find the culprit
470
+ assembled.forEach(({ script }, index) => {
471
+ try {
472
+ // eslint-disable-next-line no-new-func, no-new
473
+ new Function(script);
474
+ }
475
+ catch (e) {
476
+ const scriptPreview = script.substring(0, 300);
477
+ log.error(`✗ Error in script ${index + 1}:`, { error: e, scriptPreview });
478
+ }
479
+ });
480
+ throw new Error(`Bundled script has syntax error: ${error}`);
481
+ }
482
+ }
483
+ return {
484
+ kind: 'full',
485
+ timezone,
486
+ locale: options?.resolvedLocale?.locale,
487
+ headers: filteredHeaders,
488
+ userAgent,
489
+ uaClientHints,
490
+ binaryFullVersion: actualChromeVersion,
491
+ platform: options?.platform || 'Win32',
492
+ viewport: options?.viewport,
493
+ bundledScript,
494
+ debug: isDebug,
495
+ };
496
+ }
497
+ //# sourceMappingURL=injection-planner.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"injection-planner.js","sourceRoot":"","sources":["../../src/fingerprinting/injection-planner.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,SAAS,CAAC;AAS9B,OAAO,EAAE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