pygpt-net 2.4.47__py3-none-any.whl

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 (2180) hide show
  1. CHANGELOG.md +2137 -0
  2. README.md +4088 -0
  3. icon.png +0 -0
  4. pygpt_net/CHANGELOG.txt +2137 -0
  5. pygpt_net/LICENSE +11 -0
  6. pygpt_net/__init__.py +26 -0
  7. pygpt_net/app.py +394 -0
  8. pygpt_net/config.py +548 -0
  9. pygpt_net/container.py +116 -0
  10. pygpt_net/controller/__init__.py +177 -0
  11. pygpt_net/controller/access/__init__.py +81 -0
  12. pygpt_net/controller/access/control.py +410 -0
  13. pygpt_net/controller/access/voice.py +432 -0
  14. pygpt_net/controller/agent/__init__.py +43 -0
  15. pygpt_net/controller/agent/common.py +126 -0
  16. pygpt_net/controller/agent/experts.py +165 -0
  17. pygpt_net/controller/agent/legacy.py +398 -0
  18. pygpt_net/controller/agent/llama.py +154 -0
  19. pygpt_net/controller/assistant/__init__.py +302 -0
  20. pygpt_net/controller/assistant/batch.py +576 -0
  21. pygpt_net/controller/assistant/editor.py +455 -0
  22. pygpt_net/controller/assistant/files.py +437 -0
  23. pygpt_net/controller/assistant/store.py +480 -0
  24. pygpt_net/controller/assistant/threads.py +622 -0
  25. pygpt_net/controller/attachment.py +665 -0
  26. pygpt_net/controller/audio/__init__.py +349 -0
  27. pygpt_net/controller/calendar/__init__.py +152 -0
  28. pygpt_net/controller/calendar/note.py +382 -0
  29. pygpt_net/controller/camera.py +513 -0
  30. pygpt_net/controller/chat/__init__.py +104 -0
  31. pygpt_net/controller/chat/attachment.py +621 -0
  32. pygpt_net/controller/chat/audio.py +99 -0
  33. pygpt_net/controller/chat/command.py +90 -0
  34. pygpt_net/controller/chat/common.py +415 -0
  35. pygpt_net/controller/chat/files.py +81 -0
  36. pygpt_net/controller/chat/image.py +249 -0
  37. pygpt_net/controller/chat/input.py +277 -0
  38. pygpt_net/controller/chat/output.py +255 -0
  39. pygpt_net/controller/chat/render.py +621 -0
  40. pygpt_net/controller/chat/response.py +278 -0
  41. pygpt_net/controller/chat/stream.py +186 -0
  42. pygpt_net/controller/chat/text.py +267 -0
  43. pygpt_net/controller/chat/vision.py +88 -0
  44. pygpt_net/controller/command.py +162 -0
  45. pygpt_net/controller/config/__init__.py +152 -0
  46. pygpt_net/controller/config/field/__init__.py +0 -0
  47. pygpt_net/controller/config/field/checkbox.py +86 -0
  48. pygpt_net/controller/config/field/cmd.py +144 -0
  49. pygpt_net/controller/config/field/combo.py +110 -0
  50. pygpt_net/controller/config/field/dictionary.py +221 -0
  51. pygpt_net/controller/config/field/input.py +119 -0
  52. pygpt_net/controller/config/field/slider.py +147 -0
  53. pygpt_net/controller/config/field/textarea.py +84 -0
  54. pygpt_net/controller/config/placeholder.py +387 -0
  55. pygpt_net/controller/ctx/__init__.py +1110 -0
  56. pygpt_net/controller/ctx/common.py +189 -0
  57. pygpt_net/controller/ctx/extra.py +234 -0
  58. pygpt_net/controller/ctx/summarizer.py +108 -0
  59. pygpt_net/controller/debug/__init__.py +262 -0
  60. pygpt_net/controller/dialogs/__init__.py +32 -0
  61. pygpt_net/controller/dialogs/confirm.py +401 -0
  62. pygpt_net/controller/dialogs/debug.py +189 -0
  63. pygpt_net/controller/dialogs/info.py +102 -0
  64. pygpt_net/controller/files.py +491 -0
  65. pygpt_net/controller/finder.py +175 -0
  66. pygpt_net/controller/idx/__init__.py +349 -0
  67. pygpt_net/controller/idx/common.py +66 -0
  68. pygpt_net/controller/idx/indexer.py +702 -0
  69. pygpt_net/controller/idx/settings.py +185 -0
  70. pygpt_net/controller/kernel/__init__.py +370 -0
  71. pygpt_net/controller/kernel/reply.py +171 -0
  72. pygpt_net/controller/kernel/stack.py +137 -0
  73. pygpt_net/controller/lang/__init__.py +100 -0
  74. pygpt_net/controller/lang/custom.py +117 -0
  75. pygpt_net/controller/lang/mapping.py +485 -0
  76. pygpt_net/controller/lang/plugins.py +95 -0
  77. pygpt_net/controller/lang/settings.py +64 -0
  78. pygpt_net/controller/launcher.py +57 -0
  79. pygpt_net/controller/layout.py +290 -0
  80. pygpt_net/controller/mode.py +220 -0
  81. pygpt_net/controller/model/__init__.py +174 -0
  82. pygpt_net/controller/model/editor.py +420 -0
  83. pygpt_net/controller/notepad.py +288 -0
  84. pygpt_net/controller/painter/__init__.py +91 -0
  85. pygpt_net/controller/painter/capture.py +197 -0
  86. pygpt_net/controller/painter/common.py +195 -0
  87. pygpt_net/controller/plugins/__init__.py +485 -0
  88. pygpt_net/controller/plugins/presets.py +407 -0
  89. pygpt_net/controller/plugins/settings.py +178 -0
  90. pygpt_net/controller/presets/__init__.py +620 -0
  91. pygpt_net/controller/presets/editor.py +590 -0
  92. pygpt_net/controller/presets/experts.py +156 -0
  93. pygpt_net/controller/settings/__init__.py +240 -0
  94. pygpt_net/controller/settings/editor.py +446 -0
  95. pygpt_net/controller/settings/profile.py +569 -0
  96. pygpt_net/controller/settings/workdir.py +215 -0
  97. pygpt_net/controller/theme/__init__.py +228 -0
  98. pygpt_net/controller/theme/common.py +180 -0
  99. pygpt_net/controller/theme/markdown.py +188 -0
  100. pygpt_net/controller/theme/menu.py +122 -0
  101. pygpt_net/controller/theme/nodes.py +138 -0
  102. pygpt_net/controller/tools/__init__.py +91 -0
  103. pygpt_net/controller/ui/__init__.py +177 -0
  104. pygpt_net/controller/ui/mode.py +256 -0
  105. pygpt_net/controller/ui/tabs.py +687 -0
  106. pygpt_net/controller/ui/vision.py +71 -0
  107. pygpt_net/core/__init__.py +0 -0
  108. pygpt_net/core/access/__init__.py +30 -0
  109. pygpt_net/core/access/actions.py +131 -0
  110. pygpt_net/core/access/helpers.py +234 -0
  111. pygpt_net/core/access/shortcuts.py +104 -0
  112. pygpt_net/core/access/voice.py +277 -0
  113. pygpt_net/core/agents/__init__.py +32 -0
  114. pygpt_net/core/agents/legacy.py +66 -0
  115. pygpt_net/core/agents/memory.py +80 -0
  116. pygpt_net/core/agents/observer/__init__.py +17 -0
  117. pygpt_net/core/agents/observer/evaluation.py +163 -0
  118. pygpt_net/core/agents/provider.py +68 -0
  119. pygpt_net/core/agents/runner.py +702 -0
  120. pygpt_net/core/agents/tools.py +175 -0
  121. pygpt_net/core/assistants/__init__.py +168 -0
  122. pygpt_net/core/assistants/files.py +359 -0
  123. pygpt_net/core/assistants/store.py +300 -0
  124. pygpt_net/core/attachments/__init__.py +478 -0
  125. pygpt_net/core/attachments/context.py +752 -0
  126. pygpt_net/core/attachments/worker.py +40 -0
  127. pygpt_net/core/audio/__init__.py +165 -0
  128. pygpt_net/core/audio/context.py +39 -0
  129. pygpt_net/core/audio/whisper.py +37 -0
  130. pygpt_net/core/bridge/__init__.py +266 -0
  131. pygpt_net/core/bridge/context.py +113 -0
  132. pygpt_net/core/bridge/worker.py +157 -0
  133. pygpt_net/core/calendar/__init__.py +276 -0
  134. pygpt_net/core/camera.py +120 -0
  135. pygpt_net/core/chain/__init__.py +117 -0
  136. pygpt_net/core/chain/chat.py +172 -0
  137. pygpt_net/core/chain/completion.py +178 -0
  138. pygpt_net/core/command.py +591 -0
  139. pygpt_net/core/ctx/__init__.py +1611 -0
  140. pygpt_net/core/ctx/bag.py +53 -0
  141. pygpt_net/core/ctx/container.py +142 -0
  142. pygpt_net/core/ctx/idx.py +271 -0
  143. pygpt_net/core/ctx/output.py +247 -0
  144. pygpt_net/core/ctx/reply.py +63 -0
  145. pygpt_net/core/db/__init__.py +505 -0
  146. pygpt_net/core/db/viewer.py +258 -0
  147. pygpt_net/core/debug/__init__.py +329 -0
  148. pygpt_net/core/debug/agent.py +37 -0
  149. pygpt_net/core/debug/assistants.py +65 -0
  150. pygpt_net/core/debug/attachments.py +45 -0
  151. pygpt_net/core/debug/config.py +54 -0
  152. pygpt_net/core/debug/context.py +106 -0
  153. pygpt_net/core/debug/db.py +28 -0
  154. pygpt_net/core/debug/events.py +58 -0
  155. pygpt_net/core/debug/indexes.py +114 -0
  156. pygpt_net/core/debug/kernel.py +30 -0
  157. pygpt_net/core/debug/models.py +56 -0
  158. pygpt_net/core/debug/plugins.py +38 -0
  159. pygpt_net/core/debug/presets.py +74 -0
  160. pygpt_net/core/debug/tabs.py +49 -0
  161. pygpt_net/core/debug/ui.py +74 -0
  162. pygpt_net/core/dispatcher.py +150 -0
  163. pygpt_net/core/docker/__init__.py +410 -0
  164. pygpt_net/core/docker/builder.py +87 -0
  165. pygpt_net/core/events/__init__.py +17 -0
  166. pygpt_net/core/events/app.py +54 -0
  167. pygpt_net/core/events/base.py +73 -0
  168. pygpt_net/core/events/control.py +88 -0
  169. pygpt_net/core/events/event.py +120 -0
  170. pygpt_net/core/events/kernel.py +67 -0
  171. pygpt_net/core/events/render.py +71 -0
  172. pygpt_net/core/experts/__init__.py +501 -0
  173. pygpt_net/core/filesystem/__init__.py +479 -0
  174. pygpt_net/core/filesystem/actions.py +125 -0
  175. pygpt_net/core/filesystem/editor.py +133 -0
  176. pygpt_net/core/filesystem/packer.py +87 -0
  177. pygpt_net/core/filesystem/types.py +109 -0
  178. pygpt_net/core/filesystem/url.py +85 -0
  179. pygpt_net/core/history.py +96 -0
  180. pygpt_net/core/idx/__init__.py +591 -0
  181. pygpt_net/core/idx/chat.py +708 -0
  182. pygpt_net/core/idx/context.py +103 -0
  183. pygpt_net/core/idx/indexing.py +1209 -0
  184. pygpt_net/core/idx/llm.py +144 -0
  185. pygpt_net/core/idx/metadata.py +136 -0
  186. pygpt_net/core/idx/types/__init__.py +0 -0
  187. pygpt_net/core/idx/types/ctx.py +139 -0
  188. pygpt_net/core/idx/types/external.py +198 -0
  189. pygpt_net/core/idx/types/files.py +164 -0
  190. pygpt_net/core/idx/ui/__init__.py +22 -0
  191. pygpt_net/core/idx/ui/loaders.py +217 -0
  192. pygpt_net/core/idx/worker.py +117 -0
  193. pygpt_net/core/image.py +128 -0
  194. pygpt_net/core/info.py +27 -0
  195. pygpt_net/core/installer.py +70 -0
  196. pygpt_net/core/llm/__init__.py +50 -0
  197. pygpt_net/core/locale.py +180 -0
  198. pygpt_net/core/models.py +402 -0
  199. pygpt_net/core/modes.py +128 -0
  200. pygpt_net/core/notepad.py +164 -0
  201. pygpt_net/core/platforms.py +153 -0
  202. pygpt_net/core/plugins.py +498 -0
  203. pygpt_net/core/presets.py +524 -0
  204. pygpt_net/core/profile.py +280 -0
  205. pygpt_net/core/prompt/__init__.py +156 -0
  206. pygpt_net/core/prompt/custom.py +307 -0
  207. pygpt_net/core/prompt/template.py +107 -0
  208. pygpt_net/core/render/__init__.py +10 -0
  209. pygpt_net/core/render/base.py +416 -0
  210. pygpt_net/core/render/markdown/__init__.py +10 -0
  211. pygpt_net/core/render/markdown/body.py +210 -0
  212. pygpt_net/core/render/markdown/helpers.py +91 -0
  213. pygpt_net/core/render/markdown/parser.py +172 -0
  214. pygpt_net/core/render/markdown/pid.py +23 -0
  215. pygpt_net/core/render/markdown/renderer.py +649 -0
  216. pygpt_net/core/render/plain/__init__.py +10 -0
  217. pygpt_net/core/render/plain/body.py +130 -0
  218. pygpt_net/core/render/plain/helpers.py +60 -0
  219. pygpt_net/core/render/plain/pid.py +22 -0
  220. pygpt_net/core/render/plain/renderer.py +536 -0
  221. pygpt_net/core/render/web/__init__.py +10 -0
  222. pygpt_net/core/render/web/body.py +800 -0
  223. pygpt_net/core/render/web/helpers.py +102 -0
  224. pygpt_net/core/render/web/parser.py +297 -0
  225. pygpt_net/core/render/web/pid.py +36 -0
  226. pygpt_net/core/render/web/renderer.py +1356 -0
  227. pygpt_net/core/render/web/syntax_highlight.py +58 -0
  228. pygpt_net/core/settings.py +210 -0
  229. pygpt_net/core/tabs/__init__.py +822 -0
  230. pygpt_net/core/tabs/tab.py +81 -0
  231. pygpt_net/core/text/__init__.py +0 -0
  232. pygpt_net/core/text/finder.py +214 -0
  233. pygpt_net/core/text/utils.py +78 -0
  234. pygpt_net/core/text/web_finder.py +213 -0
  235. pygpt_net/core/tokens.py +460 -0
  236. pygpt_net/core/types/__init__.py +12 -0
  237. pygpt_net/core/types/mode.py +22 -0
  238. pygpt_net/core/updater/__init__.py +484 -0
  239. pygpt_net/core/vision/__init__.py +22 -0
  240. pygpt_net/core/vision/analyzer.py +158 -0
  241. pygpt_net/core/web/__init__.py +105 -0
  242. pygpt_net/core/web/helpers.py +237 -0
  243. pygpt_net/core/worker.py +29 -0
  244. pygpt_net/css.qrc +5 -0
  245. pygpt_net/css_rc.py +251 -0
  246. pygpt_net/data/audio/click_off.mp3 +0 -0
  247. pygpt_net/data/audio/click_on.mp3 +0 -0
  248. pygpt_net/data/audio/ok.mp3 +0 -0
  249. pygpt_net/data/config/config.json +373 -0
  250. pygpt_net/data/config/models.json +2038 -0
  251. pygpt_net/data/config/modes.json +75 -0
  252. pygpt_net/data/config/presets/agent_openai.json +33 -0
  253. pygpt_net/data/config/presets/agent_openai_assistant.json +33 -0
  254. pygpt_net/data/config/presets/agent_planner.json +33 -0
  255. pygpt_net/data/config/presets/agent_react.json +33 -0
  256. pygpt_net/data/config/presets/batman_and_joker.json +23 -0
  257. pygpt_net/data/config/presets/current.agent.json +23 -0
  258. pygpt_net/data/config/presets/current.agent_llama.json +32 -0
  259. pygpt_net/data/config/presets/current.assistant.json +23 -0
  260. pygpt_net/data/config/presets/current.audio.json +34 -0
  261. pygpt_net/data/config/presets/current.chat.json +23 -0
  262. pygpt_net/data/config/presets/current.completion.json +23 -0
  263. pygpt_net/data/config/presets/current.expert.json +23 -0
  264. pygpt_net/data/config/presets/current.img.json +23 -0
  265. pygpt_net/data/config/presets/current.langchain.json +23 -0
  266. pygpt_net/data/config/presets/current.llama_index.json +23 -0
  267. pygpt_net/data/config/presets/current.vision.json +23 -0
  268. pygpt_net/data/config/presets/dalle_white_cat.json +23 -0
  269. pygpt_net/data/config/presets/joke_agent.json +25 -0
  270. pygpt_net/data/config/presets/joke_expert.json +29 -0
  271. pygpt_net/data/config/settings.json +1824 -0
  272. pygpt_net/data/config/settings_section.json +47 -0
  273. pygpt_net/data/css/fix_windows.css +21 -0
  274. pygpt_net/data/css/markdown.css +66 -0
  275. pygpt_net/data/css/markdown.dark.css +44 -0
  276. pygpt_net/data/css/markdown.light.css +55 -0
  277. pygpt_net/data/css/style.css +28 -0
  278. pygpt_net/data/css/style.dark.css +51 -0
  279. pygpt_net/data/css/style.light.css +102 -0
  280. pygpt_net/data/css/web-blocks.css +339 -0
  281. pygpt_net/data/css/web-blocks.dark.css +74 -0
  282. pygpt_net/data/css/web-blocks.light.css +82 -0
  283. pygpt_net/data/css/web-chatgpt.css +350 -0
  284. pygpt_net/data/css/web-chatgpt.dark.css +64 -0
  285. pygpt_net/data/css/web-chatgpt.light.css +75 -0
  286. pygpt_net/data/css/web-chatgpt_wide.css +350 -0
  287. pygpt_net/data/css/web-chatgpt_wide.dark.css +64 -0
  288. pygpt_net/data/css/web-chatgpt_wide.light.css +75 -0
  289. pygpt_net/data/fonts/Lato/Lato-Black.ttf +0 -0
  290. pygpt_net/data/fonts/Lato/Lato-BlackItalic.ttf +0 -0
  291. pygpt_net/data/fonts/Lato/Lato-Bold.ttf +0 -0
  292. pygpt_net/data/fonts/Lato/Lato-BoldItalic.ttf +0 -0
  293. pygpt_net/data/fonts/Lato/Lato-Italic.ttf +0 -0
  294. pygpt_net/data/fonts/Lato/Lato-Light.ttf +0 -0
  295. pygpt_net/data/fonts/Lato/Lato-LightItalic.ttf +0 -0
  296. pygpt_net/data/fonts/Lato/Lato-Regular.ttf +0 -0
  297. pygpt_net/data/fonts/Lato/Lato-Thin.ttf +0 -0
  298. pygpt_net/data/fonts/Lato/Lato-ThinItalic.ttf +0 -0
  299. pygpt_net/data/fonts/Lato/OFL.txt +93 -0
  300. pygpt_net/data/fonts/MonaspaceArgon/MonaspaceArgon-Bold.otf +0 -0
  301. pygpt_net/data/fonts/MonaspaceArgon/MonaspaceArgon-BoldItalic.otf +0 -0
  302. pygpt_net/data/fonts/MonaspaceArgon/MonaspaceArgon-Italic.otf +0 -0
  303. pygpt_net/data/fonts/MonaspaceArgon/MonaspaceArgon-Regular.otf +0 -0
  304. pygpt_net/data/fonts/MonaspaceKrypton/MonaspaceKrypton-Bold.otf +0 -0
  305. pygpt_net/data/fonts/MonaspaceKrypton/MonaspaceKrypton-BoldItalic.otf +0 -0
  306. pygpt_net/data/fonts/MonaspaceKrypton/MonaspaceKrypton-Italic.otf +0 -0
  307. pygpt_net/data/fonts/MonaspaceKrypton/MonaspaceKrypton-Regular.otf +0 -0
  308. pygpt_net/data/fonts/MonaspaceNeon/MonaspaceNeon-Bold.otf +0 -0
  309. pygpt_net/data/fonts/MonaspaceNeon/MonaspaceNeon-BoldItalic.otf +0 -0
  310. pygpt_net/data/fonts/MonaspaceNeon/MonaspaceNeon-Italic.otf +0 -0
  311. pygpt_net/data/fonts/MonaspaceNeon/MonaspaceNeon-Regular.otf +0 -0
  312. pygpt_net/data/fonts/MonaspaceRadon/MonaspaceRadon-Bold.otf +0 -0
  313. pygpt_net/data/fonts/MonaspaceRadon/MonaspaceRadon-BoldItalic.otf +0 -0
  314. pygpt_net/data/fonts/MonaspaceRadon/MonaspaceRadon-Italic.otf +0 -0
  315. pygpt_net/data/fonts/MonaspaceRadon/MonaspaceRadon-Regular.otf +0 -0
  316. pygpt_net/data/fonts/MonaspaceXenon/MonaspaceXenon-Bold.otf +0 -0
  317. pygpt_net/data/fonts/MonaspaceXenon/MonaspaceXenon-BoldItalic.otf +0 -0
  318. pygpt_net/data/fonts/MonaspaceXenon/MonaspaceXenon-Italic.otf +0 -0
  319. pygpt_net/data/fonts/MonaspaceXenon/MonaspaceXenon-Regular.otf +0 -0
  320. pygpt_net/data/fonts/SpaceMono/OFL.txt +93 -0
  321. pygpt_net/data/fonts/SpaceMono/SpaceMono-Bold.ttf +0 -0
  322. pygpt_net/data/fonts/SpaceMono/SpaceMono-BoldItalic.ttf +0 -0
  323. pygpt_net/data/fonts/SpaceMono/SpaceMono-Italic.ttf +0 -0
  324. pygpt_net/data/fonts/SpaceMono/SpaceMono-Regular.ttf +0 -0
  325. pygpt_net/data/icon.ico +0 -0
  326. pygpt_net/data/icon.png +0 -0
  327. pygpt_net/data/icon_tray_busy.ico +0 -0
  328. pygpt_net/data/icon_tray_error.ico +0 -0
  329. pygpt_net/data/icon_tray_idle.ico +0 -0
  330. pygpt_net/data/icons/abc.svg +1 -0
  331. pygpt_net/data/icons/accessibility.svg +1 -0
  332. pygpt_net/data/icons/add.svg +1 -0
  333. pygpt_net/data/icons/add_circle.svg +1 -0
  334. pygpt_net/data/icons/add_folder.svg +1 -0
  335. pygpt_net/data/icons/add_library.svg +1 -0
  336. pygpt_net/data/icons/alarm.svg +1 -0
  337. pygpt_net/data/icons/apps.svg +1 -0
  338. pygpt_net/data/icons/asterisk.svg +1 -0
  339. pygpt_net/data/icons/attachment.svg +1 -0
  340. pygpt_net/data/icons/attachments.svg +1 -0
  341. pygpt_net/data/icons/back.svg +1 -0
  342. pygpt_net/data/icons/backspace.svg +1 -0
  343. pygpt_net/data/icons/block.svg +1 -0
  344. pygpt_net/data/icons/bookmark.svg +1 -0
  345. pygpt_net/data/icons/brush.svg +1 -0
  346. pygpt_net/data/icons/build.svg +1 -0
  347. pygpt_net/data/icons/calendar.svg +1 -0
  348. pygpt_net/data/icons/camera.svg +1 -0
  349. pygpt_net/data/icons/chat/audio.png +0 -0
  350. pygpt_net/data/icons/chat/copy.png +0 -0
  351. pygpt_net/data/icons/chat/delete.png +0 -0
  352. pygpt_net/data/icons/chat/edit.png +0 -0
  353. pygpt_net/data/icons/chat/join.png +0 -0
  354. pygpt_net/data/icons/chat/reload.png +0 -0
  355. pygpt_net/data/icons/chat.svg +1 -0
  356. pygpt_net/data/icons/check.svg +1 -0
  357. pygpt_net/data/icons/check_circle.svg +1 -0
  358. pygpt_net/data/icons/checklist.svg +1 -0
  359. pygpt_net/data/icons/circle.svg +1 -0
  360. pygpt_net/data/icons/clear.svg +1 -0
  361. pygpt_net/data/icons/clock.svg +1 -0
  362. pygpt_net/data/icons/close.svg +1 -0
  363. pygpt_net/data/icons/close_circle.svg +1 -0
  364. pygpt_net/data/icons/code.svg +1 -0
  365. pygpt_net/data/icons/collapse.svg +3 -0
  366. pygpt_net/data/icons/computer.svg +1 -0
  367. pygpt_net/data/icons/copy.svg +1 -0
  368. pygpt_net/data/icons/crop.svg +1 -0
  369. pygpt_net/data/icons/cursor.png +0 -0
  370. pygpt_net/data/icons/cut.svg +1 -0
  371. pygpt_net/data/icons/db.svg +1 -0
  372. pygpt_net/data/icons/delete.svg +1 -0
  373. pygpt_net/data/icons/done.svg +1 -0
  374. pygpt_net/data/icons/download.svg +1 -0
  375. pygpt_net/data/icons/draft.svg +1 -0
  376. pygpt_net/data/icons/drag.svg +1 -0
  377. pygpt_net/data/icons/edit.svg +1 -0
  378. pygpt_net/data/icons/emergency.svg +1 -0
  379. pygpt_net/data/icons/equalizer.svg +1 -0
  380. pygpt_net/data/icons/error.svg +1 -0
  381. pygpt_net/data/icons/event_available.svg +1 -0
  382. pygpt_net/data/icons/expand.svg +1 -0
  383. pygpt_net/data/icons/fast_forward.svg +1 -0
  384. pygpt_net/data/icons/fast_rewind.svg +1 -0
  385. pygpt_net/data/icons/favorite.svg +1 -0
  386. pygpt_net/data/icons/folder.svg +1 -0
  387. pygpt_net/data/icons/folder_filled.svg +1 -0
  388. pygpt_net/data/icons/forward.svg +1 -0
  389. pygpt_net/data/icons/full.svg +1 -0
  390. pygpt_net/data/icons/fullscreen.svg +1 -0
  391. pygpt_net/data/icons/grid.svg +1 -0
  392. pygpt_net/data/icons/hearing.svg +1 -0
  393. pygpt_net/data/icons/help.svg +1 -0
  394. pygpt_net/data/icons/history.svg +1 -0
  395. pygpt_net/data/icons/home.svg +1 -0
  396. pygpt_net/data/icons/home_filled.svg +1 -0
  397. pygpt_net/data/icons/image.svg +1 -0
  398. pygpt_net/data/icons/info.svg +1 -0
  399. pygpt_net/data/icons/input.svg +1 -0
  400. pygpt_net/data/icons/key.svg +1 -0
  401. pygpt_net/data/icons/keyboard.svg +1 -0
  402. pygpt_net/data/icons/language.svg +1 -0
  403. pygpt_net/data/icons/list.svg +1 -0
  404. pygpt_net/data/icons/lock.svg +1 -0
  405. pygpt_net/data/icons/logout.svg +1 -0
  406. pygpt_net/data/icons/map.svg +1 -0
  407. pygpt_net/data/icons/memory.svg +1 -0
  408. pygpt_net/data/icons/menu.svg +1 -0
  409. pygpt_net/data/icons/mic.svg +1 -0
  410. pygpt_net/data/icons/mic_off.svg +1 -0
  411. pygpt_net/data/icons/more_horizontal.svg +1 -0
  412. pygpt_net/data/icons/mute.svg +1 -0
  413. pygpt_net/data/icons/open_tab.svg +1 -0
  414. pygpt_net/data/icons/palette.svg +1 -0
  415. pygpt_net/data/icons/paste.svg +1 -0
  416. pygpt_net/data/icons/pause.svg +1 -0
  417. pygpt_net/data/icons/pause_circle.svg +1 -0
  418. pygpt_net/data/icons/photos.svg +1 -0
  419. pygpt_net/data/icons/pin.svg +1 -0
  420. pygpt_net/data/icons/play.svg +1 -0
  421. pygpt_net/data/icons/play_pause.svg +1 -0
  422. pygpt_net/data/icons/playlist_add.svg +1 -0
  423. pygpt_net/data/icons/power.svg +1 -0
  424. pygpt_net/data/icons/print.svg +1 -0
  425. pygpt_net/data/icons/public_filled.svg +1 -0
  426. pygpt_net/data/icons/redo.svg +1 -0
  427. pygpt_net/data/icons/reload.svg +1 -0
  428. pygpt_net/data/icons/repeat.svg +1 -0
  429. pygpt_net/data/icons/replay.svg +1 -0
  430. pygpt_net/data/icons/resize.svg +1 -0
  431. pygpt_net/data/icons/robot.svg +1 -0
  432. pygpt_net/data/icons/router.svg +1 -0
  433. pygpt_net/data/icons/save.svg +1 -0
  434. pygpt_net/data/icons/schedule.svg +1 -0
  435. pygpt_net/data/icons/screenshot.svg +1 -0
  436. pygpt_net/data/icons/search.svg +1 -0
  437. pygpt_net/data/icons/security.svg +1 -0
  438. pygpt_net/data/icons/sensors.svg +1 -0
  439. pygpt_net/data/icons/settings.svg +1 -0
  440. pygpt_net/data/icons/settings_filled.svg +1 -0
  441. pygpt_net/data/icons/share.svg +1 -0
  442. pygpt_net/data/icons/shedule.svg +1 -0
  443. pygpt_net/data/icons/sort.svg +1 -0
  444. pygpt_net/data/icons/split_screen.svg +1 -0
  445. pygpt_net/data/icons/stack.svg +1 -0
  446. pygpt_net/data/icons/stacks.svg +1 -0
  447. pygpt_net/data/icons/star.svg +1 -0
  448. pygpt_net/data/icons/stop.svg +1 -0
  449. pygpt_net/data/icons/stop_circle.svg +1 -0
  450. pygpt_net/data/icons/sync.svg +1 -0
  451. pygpt_net/data/icons/tag.svg +1 -0
  452. pygpt_net/data/icons/task.svg +1 -0
  453. pygpt_net/data/icons/terminal.svg +1 -0
  454. pygpt_net/data/icons/text.svg +1 -0
  455. pygpt_net/data/icons/textfile.svg +1 -0
  456. pygpt_net/data/icons/timer.svg +1 -0
  457. pygpt_net/data/icons/today.svg +1 -0
  458. pygpt_net/data/icons/tune.svg +1 -0
  459. pygpt_net/data/icons/undo.svg +1 -0
  460. pygpt_net/data/icons/update.svg +1 -0
  461. pygpt_net/data/icons/updater.svg +1 -0
  462. pygpt_net/data/icons/upload.svg +1 -0
  463. pygpt_net/data/icons/video.svg +1 -0
  464. pygpt_net/data/icons/view.svg +1 -0
  465. pygpt_net/data/icons/voice.svg +1 -0
  466. pygpt_net/data/icons/volume.svg +1 -0
  467. pygpt_net/data/icons/warning.svg +1 -0
  468. pygpt_net/data/icons/webcam.svg +1 -0
  469. pygpt_net/data/icons/webcam_off.svg +1 -0
  470. pygpt_net/data/icons/width.svg +1 -0
  471. pygpt_net/data/icons/window.svg +1 -0
  472. pygpt_net/data/icons/work.svg +1 -0
  473. pygpt_net/data/icons/zoom_in.svg +1 -0
  474. pygpt_net/data/icons/zoom_out.svg +1 -0
  475. pygpt_net/data/js/highlight/DIGESTS.md +793 -0
  476. pygpt_net/data/js/highlight/LICENSE +29 -0
  477. pygpt_net/data/js/highlight/README.md +45 -0
  478. pygpt_net/data/js/highlight/es/core.js +2600 -0
  479. pygpt_net/data/js/highlight/es/core.min.js +307 -0
  480. pygpt_net/data/js/highlight/es/highlight.js +2600 -0
  481. pygpt_net/data/js/highlight/es/highlight.min.js +307 -0
  482. pygpt_net/data/js/highlight/es/languages/1c.js +552 -0
  483. pygpt_net/data/js/highlight/es/languages/1c.min.js +25 -0
  484. pygpt_net/data/js/highlight/es/languages/abnf.js +91 -0
  485. pygpt_net/data/js/highlight/es/languages/abnf.min.js +12 -0
  486. pygpt_net/data/js/highlight/es/languages/accesslog.js +100 -0
  487. pygpt_net/data/js/highlight/es/languages/accesslog.min.js +13 -0
  488. pygpt_net/data/js/highlight/es/languages/actionscript.js +161 -0
  489. pygpt_net/data/js/highlight/es/languages/actionscript.min.js +17 -0
  490. pygpt_net/data/js/highlight/es/languages/ada.js +273 -0
  491. pygpt_net/data/js/highlight/es/languages/ada.min.js +25 -0
  492. pygpt_net/data/js/highlight/es/languages/angelscript.js +186 -0
  493. pygpt_net/data/js/highlight/es/languages/angelscript.min.js +21 -0
  494. pygpt_net/data/js/highlight/es/languages/apache.js +109 -0
  495. pygpt_net/data/js/highlight/es/languages/apache.min.js +14 -0
  496. pygpt_net/data/js/highlight/es/languages/applescript.js +157 -0
  497. pygpt_net/data/js/highlight/es/languages/applescript.min.js +18 -0
  498. pygpt_net/data/js/highlight/es/languages/arcade.js +425 -0
  499. pygpt_net/data/js/highlight/es/languages/arcade.min.js +28 -0
  500. pygpt_net/data/js/highlight/es/languages/arduino.js +1014 -0
  501. pygpt_net/data/js/highlight/es/languages/arduino.min.js +54 -0
  502. pygpt_net/data/js/highlight/es/languages/armasm.js +132 -0
  503. pygpt_net/data/js/highlight/es/languages/armasm.min.js +17 -0
  504. pygpt_net/data/js/highlight/es/languages/asciidoc.js +269 -0
  505. pygpt_net/data/js/highlight/es/languages/asciidoc.min.js +35 -0
  506. pygpt_net/data/js/highlight/es/languages/aspectj.js +239 -0
  507. pygpt_net/data/js/highlight/es/languages/aspectj.min.js +30 -0
  508. pygpt_net/data/js/highlight/es/languages/autohotkey.js +83 -0
  509. pygpt_net/data/js/highlight/es/languages/autohotkey.min.js +13 -0
  510. pygpt_net/data/js/highlight/es/languages/autoit.js +186 -0
  511. pygpt_net/data/js/highlight/es/languages/autoit.min.js +21 -0
  512. pygpt_net/data/js/highlight/es/languages/avrasm.js +86 -0
  513. pygpt_net/data/js/highlight/es/languages/avrasm.min.js +12 -0
  514. pygpt_net/data/js/highlight/es/languages/awk.js +76 -0
  515. pygpt_net/data/js/highlight/es/languages/awk.min.js +11 -0
  516. pygpt_net/data/js/highlight/es/languages/axapta.js +196 -0
  517. pygpt_net/data/js/highlight/es/languages/axapta.min.js +10 -0
  518. pygpt_net/data/js/highlight/es/languages/bash.js +415 -0
  519. pygpt_net/data/js/highlight/es/languages/bash.min.js +21 -0
  520. pygpt_net/data/js/highlight/es/languages/basic.js +238 -0
  521. pygpt_net/data/js/highlight/es/languages/basic.min.js +9 -0
  522. pygpt_net/data/js/highlight/es/languages/bnf.js +47 -0
  523. pygpt_net/data/js/highlight/es/languages/bnf.min.js +6 -0
  524. pygpt_net/data/js/highlight/es/languages/brainfuck.js +62 -0
  525. pygpt_net/data/js/highlight/es/languages/brainfuck.min.js +8 -0
  526. pygpt_net/data/js/highlight/es/languages/c.js +340 -0
  527. pygpt_net/data/js/highlight/es/languages/c.min.js +40 -0
  528. pygpt_net/data/js/highlight/es/languages/cal.js +168 -0
  529. pygpt_net/data/js/highlight/es/languages/cal.min.js +15 -0
  530. pygpt_net/data/js/highlight/es/languages/capnproto.js +107 -0
  531. pygpt_net/data/js/highlight/es/languages/capnproto.min.js +11 -0
  532. pygpt_net/data/js/highlight/es/languages/ceylon.js +148 -0
  533. pygpt_net/data/js/highlight/es/languages/ceylon.min.js +15 -0
  534. pygpt_net/data/js/highlight/es/languages/clean.js +75 -0
  535. pygpt_net/data/js/highlight/es/languages/clean.min.js +8 -0
  536. pygpt_net/data/js/highlight/es/languages/clojure-repl.js +35 -0
  537. pygpt_net/data/js/highlight/es/languages/clojure-repl.min.js +4 -0
  538. pygpt_net/data/js/highlight/es/languages/clojure.js +192 -0
  539. pygpt_net/data/js/highlight/es/languages/clojure.min.js +25 -0
  540. pygpt_net/data/js/highlight/es/languages/cmake.js +72 -0
  541. pygpt_net/data/js/highlight/es/languages/cmake.min.js +7 -0
  542. pygpt_net/data/js/highlight/es/languages/coffeescript.js +374 -0
  543. pygpt_net/data/js/highlight/es/languages/coffeescript.min.js +28 -0
  544. pygpt_net/data/js/highlight/es/languages/coq.js +453 -0
  545. pygpt_net/data/js/highlight/es/languages/coq.min.js +7 -0
  546. pygpt_net/data/js/highlight/es/languages/cos.js +148 -0
  547. pygpt_net/data/js/highlight/es/languages/cos.min.js +15 -0
  548. pygpt_net/data/js/highlight/es/languages/cpp.js +611 -0
  549. pygpt_net/data/js/highlight/es/languages/cpp.min.js +46 -0
  550. pygpt_net/data/js/highlight/es/languages/crmsh.js +108 -0
  551. pygpt_net/data/js/highlight/es/languages/crmsh.min.js +19 -0
  552. pygpt_net/data/js/highlight/es/languages/crystal.js +320 -0
  553. pygpt_net/data/js/highlight/es/languages/crystal.min.js +48 -0
  554. pygpt_net/data/js/highlight/es/languages/csharp.js +414 -0
  555. pygpt_net/data/js/highlight/es/languages/csharp.min.js +49 -0
  556. pygpt_net/data/js/highlight/es/languages/csp.js +66 -0
  557. pygpt_net/data/js/highlight/es/languages/csp.min.js +6 -0
  558. pygpt_net/data/js/highlight/es/languages/css.js +862 -0
  559. pygpt_net/data/js/highlight/es/languages/css.min.js +31 -0
  560. pygpt_net/data/js/highlight/es/languages/d.js +280 -0
  561. pygpt_net/data/js/highlight/es/languages/d.min.js +20 -0
  562. pygpt_net/data/js/highlight/es/languages/dart.js +270 -0
  563. pygpt_net/data/js/highlight/es/languages/dart.min.js +22 -0
  564. pygpt_net/data/js/highlight/es/languages/delphi.js +254 -0
  565. pygpt_net/data/js/highlight/es/languages/delphi.min.js +19 -0
  566. pygpt_net/data/js/highlight/es/languages/diff.js +70 -0
  567. pygpt_net/data/js/highlight/es/languages/diff.min.js +9 -0
  568. pygpt_net/data/js/highlight/es/languages/django.js +83 -0
  569. pygpt_net/data/js/highlight/es/languages/django.min.js +13 -0
  570. pygpt_net/data/js/highlight/es/languages/dns.js +86 -0
  571. pygpt_net/data/js/highlight/es/languages/dns.min.js +11 -0
  572. pygpt_net/data/js/highlight/es/languages/dockerfile.js +52 -0
  573. pygpt_net/data/js/highlight/es/languages/dockerfile.min.js +8 -0
  574. pygpt_net/data/js/highlight/es/languages/dos.js +175 -0
  575. pygpt_net/data/js/highlight/es/languages/dos.min.js +13 -0
  576. pygpt_net/data/js/highlight/es/languages/dsconfig.js +74 -0
  577. pygpt_net/data/js/highlight/es/languages/dsconfig.min.js +9 -0
  578. pygpt_net/data/js/highlight/es/languages/dts.js +165 -0
  579. pygpt_net/data/js/highlight/es/languages/dts.min.js +22 -0
  580. pygpt_net/data/js/highlight/es/languages/dust.js +55 -0
  581. pygpt_net/data/js/highlight/es/languages/dust.min.js +8 -0
  582. pygpt_net/data/js/highlight/es/languages/ebnf.js +62 -0
  583. pygpt_net/data/js/highlight/es/languages/ebnf.min.js +7 -0
  584. pygpt_net/data/js/highlight/es/languages/elixir.js +287 -0
  585. pygpt_net/data/js/highlight/es/languages/elixir.min.js +34 -0
  586. pygpt_net/data/js/highlight/es/languages/elm.js +151 -0
  587. pygpt_net/data/js/highlight/es/languages/elm.min.js +18 -0
  588. pygpt_net/data/js/highlight/es/languages/erb.js +37 -0
  589. pygpt_net/data/js/highlight/es/languages/erb.min.js +5 -0
  590. pygpt_net/data/js/highlight/es/languages/erlang-repl.js +62 -0
  591. pygpt_net/data/js/highlight/es/languages/erlang-repl.min.js +13 -0
  592. pygpt_net/data/js/highlight/es/languages/erlang.js +207 -0
  593. pygpt_net/data/js/highlight/es/languages/erlang.min.js +28 -0
  594. pygpt_net/data/js/highlight/es/languages/excel.js +553 -0
  595. pygpt_net/data/js/highlight/es/languages/excel.min.js +10 -0
  596. pygpt_net/data/js/highlight/es/languages/fix.js +47 -0
  597. pygpt_net/data/js/highlight/es/languages/fix.min.js +7 -0
  598. pygpt_net/data/js/highlight/es/languages/flix.js +87 -0
  599. pygpt_net/data/js/highlight/es/languages/flix.min.js +10 -0
  600. pygpt_net/data/js/highlight/es/languages/fortran.js +582 -0
  601. pygpt_net/data/js/highlight/es/languages/fortran.min.js +17 -0
  602. pygpt_net/data/js/highlight/es/languages/fsharp.js +635 -0
  603. pygpt_net/data/js/highlight/es/languages/fsharp.min.js +47 -0
  604. pygpt_net/data/js/highlight/es/languages/gams.js +189 -0
  605. pygpt_net/data/js/highlight/es/languages/gams.min.js +28 -0
  606. pygpt_net/data/js/highlight/es/languages/gauss.js +314 -0
  607. pygpt_net/data/js/highlight/es/languages/gauss.min.js +36 -0
  608. pygpt_net/data/js/highlight/es/languages/gcode.js +89 -0
  609. pygpt_net/data/js/highlight/es/languages/gcode.min.js +17 -0
  610. pygpt_net/data/js/highlight/es/languages/gherkin.js +57 -0
  611. pygpt_net/data/js/highlight/es/languages/gherkin.min.js +9 -0
  612. pygpt_net/data/js/highlight/es/languages/glsl.js +136 -0
  613. pygpt_net/data/js/highlight/es/languages/glsl.min.js +8 -0
  614. pygpt_net/data/js/highlight/es/languages/gml.js +3138 -0
  615. pygpt_net/data/js/highlight/es/languages/gml.min.js +10 -0
  616. pygpt_net/data/js/highlight/es/languages/go.js +164 -0
  617. pygpt_net/data/js/highlight/es/languages/go.min.js +19 -0
  618. pygpt_net/data/js/highlight/es/languages/golo.js +89 -0
  619. pygpt_net/data/js/highlight/es/languages/golo.min.js +6 -0
  620. pygpt_net/data/js/highlight/es/languages/gradle.js +198 -0
  621. pygpt_net/data/js/highlight/es/languages/gradle.min.js +6 -0
  622. pygpt_net/data/js/highlight/es/languages/graphql.js +86 -0
  623. pygpt_net/data/js/highlight/es/languages/graphql.min.js +12 -0
  624. pygpt_net/data/js/highlight/es/languages/groovy.js +198 -0
  625. pygpt_net/data/js/highlight/es/languages/groovy.min.js +21 -0
  626. pygpt_net/data/js/highlight/es/languages/haml.js +121 -0
  627. pygpt_net/data/js/highlight/es/languages/haml.min.js +18 -0
  628. pygpt_net/data/js/highlight/es/languages/handlebars.js +266 -0
  629. pygpt_net/data/js/highlight/es/languages/handlebars.min.js +29 -0
  630. pygpt_net/data/js/highlight/es/languages/haskell.js +225 -0
  631. pygpt_net/data/js/highlight/es/languages/haskell.min.js +32 -0
  632. pygpt_net/data/js/highlight/es/languages/haxe.js +175 -0
  633. pygpt_net/data/js/highlight/es/languages/haxe.min.js +30 -0
  634. pygpt_net/data/js/highlight/es/languages/hsp.js +67 -0
  635. pygpt_net/data/js/highlight/es/languages/hsp.min.js +14 -0
  636. pygpt_net/data/js/highlight/es/languages/http.js +105 -0
  637. pygpt_net/data/js/highlight/es/languages/http.min.js +14 -0
  638. pygpt_net/data/js/highlight/es/languages/hy.js +145 -0
  639. pygpt_net/data/js/highlight/es/languages/hy.min.js +15 -0
  640. pygpt_net/data/js/highlight/es/languages/inform7.js +78 -0
  641. pygpt_net/data/js/highlight/es/languages/inform7.min.js +10 -0
  642. pygpt_net/data/js/highlight/es/languages/ini.js +129 -0
  643. pygpt_net/data/js/highlight/es/languages/ini.min.js +16 -0
  644. pygpt_net/data/js/highlight/es/languages/irpf90.js +115 -0
  645. pygpt_net/data/js/highlight/es/languages/irpf90.min.js +15 -0
  646. pygpt_net/data/js/highlight/es/languages/isbl.js +3213 -0
  647. pygpt_net/data/js/highlight/es/languages/isbl.min.js +25 -0
  648. pygpt_net/data/js/highlight/es/languages/java.js +298 -0
  649. pygpt_net/data/js/highlight/es/languages/java.min.js +38 -0
  650. pygpt_net/data/js/highlight/es/languages/javascript.js +775 -0
  651. pygpt_net/data/js/highlight/es/languages/javascript.min.js +81 -0
  652. pygpt_net/data/js/highlight/es/languages/jboss-cli.js +71 -0
  653. pygpt_net/data/js/highlight/es/languages/jboss-cli.min.js +10 -0
  654. pygpt_net/data/js/highlight/es/languages/json.js +62 -0
  655. pygpt_net/data/js/highlight/es/languages/json.min.js +8 -0
  656. pygpt_net/data/js/highlight/es/languages/julia-repl.js +59 -0
  657. pygpt_net/data/js/highlight/es/languages/julia-repl.min.js +4 -0
  658. pygpt_net/data/js/highlight/es/languages/julia.js +450 -0
  659. pygpt_net/data/js/highlight/es/languages/julia.min.js +18 -0
  660. pygpt_net/data/js/highlight/es/languages/kotlin.js +294 -0
  661. pygpt_net/data/js/highlight/es/languages/kotlin.min.js +46 -0
  662. pygpt_net/data/js/highlight/es/languages/lasso.js +179 -0
  663. pygpt_net/data/js/highlight/es/languages/lasso.min.js +28 -0
  664. pygpt_net/data/js/highlight/es/languages/latex.js +286 -0
  665. pygpt_net/data/js/highlight/es/languages/latex.min.js +34 -0
  666. pygpt_net/data/js/highlight/es/languages/ldif.js +39 -0
  667. pygpt_net/data/js/highlight/es/languages/ldif.min.js +5 -0
  668. pygpt_net/data/js/highlight/es/languages/leaf.js +105 -0
  669. pygpt_net/data/js/highlight/es/languages/leaf.min.js +12 -0
  670. pygpt_net/data/js/highlight/es/languages/less.js +963 -0
  671. pygpt_net/data/js/highlight/es/languages/less.min.js +45 -0
  672. pygpt_net/data/js/highlight/es/languages/lisp.js +147 -0
  673. pygpt_net/data/js/highlight/es/languages/lisp.min.js +16 -0
  674. pygpt_net/data/js/highlight/es/languages/livecodeserver.js +181 -0
  675. pygpt_net/data/js/highlight/es/languages/livecodeserver.min.js +21 -0
  676. pygpt_net/data/js/highlight/es/languages/livescript.js +386 -0
  677. pygpt_net/data/js/highlight/es/languages/livescript.min.js +35 -0
  678. pygpt_net/data/js/highlight/es/languages/llvm.js +143 -0
  679. pygpt_net/data/js/highlight/es/languages/llvm.min.js +16 -0
  680. pygpt_net/data/js/highlight/es/languages/lsl.js +84 -0
  681. pygpt_net/data/js/highlight/es/languages/lsl.min.js +19 -0
  682. pygpt_net/data/js/highlight/es/languages/lua.js +88 -0
  683. pygpt_net/data/js/highlight/es/languages/lua.min.js +14 -0
  684. pygpt_net/data/js/highlight/es/languages/makefile.js +94 -0
  685. pygpt_net/data/js/highlight/es/languages/makefile.min.js +14 -0
  686. pygpt_net/data/js/highlight/es/languages/markdown.js +256 -0
  687. pygpt_net/data/js/highlight/es/languages/markdown.min.js +32 -0
  688. pygpt_net/data/js/highlight/es/languages/mathematica.js +7367 -0
  689. pygpt_net/data/js/highlight/es/languages/mathematica.min.js +21 -0
  690. pygpt_net/data/js/highlight/es/languages/matlab.js +115 -0
  691. pygpt_net/data/js/highlight/es/languages/matlab.min.js +15 -0
  692. pygpt_net/data/js/highlight/es/languages/maxima.js +422 -0
  693. pygpt_net/data/js/highlight/es/languages/maxima.min.js +12 -0
  694. pygpt_net/data/js/highlight/es/languages/mel.js +243 -0
  695. pygpt_net/data/js/highlight/es/languages/mel.min.js +8 -0
  696. pygpt_net/data/js/highlight/es/languages/mercury.js +116 -0
  697. pygpt_net/data/js/highlight/es/languages/mercury.min.js +16 -0
  698. pygpt_net/data/js/highlight/es/languages/mipsasm.js +112 -0
  699. pygpt_net/data/js/highlight/es/languages/mipsasm.min.js +15 -0
  700. pygpt_net/data/js/highlight/es/languages/mizar.js +35 -0
  701. pygpt_net/data/js/highlight/es/languages/mizar.min.js +4 -0
  702. pygpt_net/data/js/highlight/es/languages/mojolicious.js +44 -0
  703. pygpt_net/data/js/highlight/es/languages/mojolicious.min.js +6 -0
  704. pygpt_net/data/js/highlight/es/languages/monkey.js +192 -0
  705. pygpt_net/data/js/highlight/es/languages/monkey.min.js +17 -0
  706. pygpt_net/data/js/highlight/es/languages/moonscript.js +149 -0
  707. pygpt_net/data/js/highlight/es/languages/moonscript.min.js +23 -0
  708. pygpt_net/data/js/highlight/es/languages/n1ql.js +373 -0
  709. pygpt_net/data/js/highlight/es/languages/n1ql.min.js +13 -0
  710. pygpt_net/data/js/highlight/es/languages/nestedtext.js +91 -0
  711. pygpt_net/data/js/highlight/es/languages/nestedtext.min.js +9 -0
  712. pygpt_net/data/js/highlight/es/languages/nginx.js +161 -0
  713. pygpt_net/data/js/highlight/es/languages/nginx.min.js +21 -0
  714. pygpt_net/data/js/highlight/es/languages/nim.js +193 -0
  715. pygpt_net/data/js/highlight/es/languages/nim.min.js +15 -0
  716. pygpt_net/data/js/highlight/es/languages/nix.js +103 -0
  717. pygpt_net/data/js/highlight/es/languages/nix.min.js +12 -0
  718. pygpt_net/data/js/highlight/es/languages/node-repl.js +41 -0
  719. pygpt_net/data/js/highlight/es/languages/node-repl.min.js +5 -0
  720. pygpt_net/data/js/highlight/es/languages/nsis.js +565 -0
  721. pygpt_net/data/js/highlight/es/languages/nsis.min.js +23 -0
  722. pygpt_net/data/js/highlight/es/languages/objectivec.js +261 -0
  723. pygpt_net/data/js/highlight/es/languages/objectivec.min.js +23 -0
  724. pygpt_net/data/js/highlight/es/languages/ocaml.js +91 -0
  725. pygpt_net/data/js/highlight/es/languages/ocaml.min.js +14 -0
  726. pygpt_net/data/js/highlight/es/languages/openscad.js +85 -0
  727. pygpt_net/data/js/highlight/es/languages/openscad.min.js +15 -0
  728. pygpt_net/data/js/highlight/es/languages/oxygene.js +95 -0
  729. pygpt_net/data/js/highlight/es/languages/oxygene.min.js +13 -0
  730. pygpt_net/data/js/highlight/es/languages/parser3.js +63 -0
  731. pygpt_net/data/js/highlight/es/languages/parser3.min.js +10 -0
  732. pygpt_net/data/js/highlight/es/languages/perl.js +512 -0
  733. pygpt_net/data/js/highlight/es/languages/perl.min.js +40 -0
  734. pygpt_net/data/js/highlight/es/languages/pf.js +68 -0
  735. pygpt_net/data/js/highlight/es/languages/pf.min.js +9 -0
  736. pygpt_net/data/js/highlight/es/languages/pgsql.js +533 -0
  737. pygpt_net/data/js/highlight/es/languages/pgsql.min.js +69 -0
  738. pygpt_net/data/js/highlight/es/languages/php-template.js +62 -0
  739. pygpt_net/data/js/highlight/es/languages/php-template.min.js +8 -0
  740. pygpt_net/data/js/highlight/es/languages/php.js +621 -0
  741. pygpt_net/data/js/highlight/es/languages/php.min.js +58 -0
  742. pygpt_net/data/js/highlight/es/languages/plaintext.js +27 -0
  743. pygpt_net/data/js/highlight/es/languages/plaintext.min.js +3 -0
  744. pygpt_net/data/js/highlight/es/languages/pony.js +98 -0
  745. pygpt_net/data/js/highlight/es/languages/pony.min.js +12 -0
  746. pygpt_net/data/js/highlight/es/languages/powershell.js +325 -0
  747. pygpt_net/data/js/highlight/es/languages/powershell.min.js +40 -0
  748. pygpt_net/data/js/highlight/es/languages/processing.js +442 -0
  749. pygpt_net/data/js/highlight/es/languages/processing.min.js +18 -0
  750. pygpt_net/data/js/highlight/es/languages/profile.js +51 -0
  751. pygpt_net/data/js/highlight/es/languages/profile.min.js +9 -0
  752. pygpt_net/data/js/highlight/es/languages/prolog.js +105 -0
  753. pygpt_net/data/js/highlight/es/languages/prolog.min.js +11 -0
  754. pygpt_net/data/js/highlight/es/languages/properties.js +76 -0
  755. pygpt_net/data/js/highlight/es/languages/properties.min.js +9 -0
  756. pygpt_net/data/js/highlight/es/languages/protobuf.js +87 -0
  757. pygpt_net/data/js/highlight/es/languages/protobuf.min.js +11 -0
  758. pygpt_net/data/js/highlight/es/languages/puppet.js +154 -0
  759. pygpt_net/data/js/highlight/es/languages/puppet.min.js +18 -0
  760. pygpt_net/data/js/highlight/es/languages/purebasic.js +108 -0
  761. pygpt_net/data/js/highlight/es/languages/purebasic.min.js +11 -0
  762. pygpt_net/data/js/highlight/es/languages/python-repl.js +40 -0
  763. pygpt_net/data/js/highlight/es/languages/python-repl.min.js +5 -0
  764. pygpt_net/data/js/highlight/es/languages/python.js +444 -0
  765. pygpt_net/data/js/highlight/es/languages/python.min.js +42 -0
  766. pygpt_net/data/js/highlight/es/languages/q.js +46 -0
  767. pygpt_net/data/js/highlight/es/languages/q.min.js +8 -0
  768. pygpt_net/data/js/highlight/es/languages/qml.js +197 -0
  769. pygpt_net/data/js/highlight/es/languages/qml.min.js +29 -0
  770. pygpt_net/data/js/highlight/es/languages/r.js +265 -0
  771. pygpt_net/data/js/highlight/es/languages/r.min.js +26 -0
  772. pygpt_net/data/js/highlight/es/languages/reasonml.js +150 -0
  773. pygpt_net/data/js/highlight/es/languages/reasonml.min.js +18 -0
  774. pygpt_net/data/js/highlight/es/languages/rib.js +45 -0
  775. pygpt_net/data/js/highlight/es/languages/rib.min.js +6 -0
  776. pygpt_net/data/js/highlight/es/languages/roboconf.js +90 -0
  777. pygpt_net/data/js/highlight/es/languages/roboconf.min.js +13 -0
  778. pygpt_net/data/js/highlight/es/languages/routeros.js +172 -0
  779. pygpt_net/data/js/highlight/es/languages/routeros.min.js +22 -0
  780. pygpt_net/data/js/highlight/es/languages/rsl.js +157 -0
  781. pygpt_net/data/js/highlight/es/languages/rsl.min.js +11 -0
  782. pygpt_net/data/js/highlight/es/languages/ruby.js +456 -0
  783. pygpt_net/data/js/highlight/es/languages/ruby.min.js +54 -0
  784. pygpt_net/data/js/highlight/es/languages/ruleslanguage.js +84 -0
  785. pygpt_net/data/js/highlight/es/languages/ruleslanguage.min.js +9 -0
  786. pygpt_net/data/js/highlight/es/languages/rust.js +324 -0
  787. pygpt_net/data/js/highlight/es/languages/rust.min.js +27 -0
  788. pygpt_net/data/js/highlight/es/languages/sas.js +565 -0
  789. pygpt_net/data/js/highlight/es/languages/sas.min.js +17 -0
  790. pygpt_net/data/js/highlight/es/languages/scala.js +222 -0
  791. pygpt_net/data/js/highlight/es/languages/scala.min.js +28 -0
  792. pygpt_net/data/js/highlight/es/languages/scheme.js +204 -0
  793. pygpt_net/data/js/highlight/es/languages/scheme.min.js +19 -0
  794. pygpt_net/data/js/highlight/es/languages/scilab.js +81 -0
  795. pygpt_net/data/js/highlight/es/languages/scilab.min.js +13 -0
  796. pygpt_net/data/js/highlight/es/languages/scss.js +852 -0
  797. pygpt_net/data/js/highlight/es/languages/scss.min.js +33 -0
  798. pygpt_net/data/js/highlight/es/languages/shell.js +41 -0
  799. pygpt_net/data/js/highlight/es/languages/shell.min.js +5 -0
  800. pygpt_net/data/js/highlight/es/languages/smali.js +134 -0
  801. pygpt_net/data/js/highlight/es/languages/smali.min.js +13 -0
  802. pygpt_net/data/js/highlight/es/languages/smalltalk.js +77 -0
  803. pygpt_net/data/js/highlight/es/languages/smalltalk.min.js +11 -0
  804. pygpt_net/data/js/highlight/es/languages/sml.js +83 -0
  805. pygpt_net/data/js/highlight/es/languages/sml.min.js +14 -0
  806. pygpt_net/data/js/highlight/es/languages/sqf.js +2670 -0
  807. pygpt_net/data/js/highlight/es/languages/sqf.min.js +17 -0
  808. pygpt_net/data/js/highlight/es/languages/sql.js +690 -0
  809. pygpt_net/data/js/highlight/es/languages/sql.min.js +17 -0
  810. pygpt_net/data/js/highlight/es/languages/stan.js +529 -0
  811. pygpt_net/data/js/highlight/es/languages/stan.min.js +28 -0
  812. pygpt_net/data/js/highlight/es/languages/stata.js +61 -0
  813. pygpt_net/data/js/highlight/es/languages/stata.min.js +11 -0
  814. pygpt_net/data/js/highlight/es/languages/step21.js +75 -0
  815. pygpt_net/data/js/highlight/es/languages/step21.min.js +10 -0
  816. pygpt_net/data/js/highlight/es/languages/stylus.js +912 -0
  817. pygpt_net/data/js/highlight/es/languages/stylus.min.js +36 -0
  818. pygpt_net/data/js/highlight/es/languages/subunit.js +52 -0
  819. pygpt_net/data/js/highlight/es/languages/subunit.min.js +10 -0
  820. pygpt_net/data/js/highlight/es/languages/swift.js +951 -0
  821. pygpt_net/data/js/highlight/es/languages/swift.min.js +66 -0
  822. pygpt_net/data/js/highlight/es/languages/taggerscript.js +67 -0
  823. pygpt_net/data/js/highlight/es/languages/taggerscript.min.js +7 -0
  824. pygpt_net/data/js/highlight/es/languages/tap.js +55 -0
  825. pygpt_net/data/js/highlight/es/languages/tap.min.js +7 -0
  826. pygpt_net/data/js/highlight/es/languages/tcl.js +199 -0
  827. pygpt_net/data/js/highlight/es/languages/tcl.min.js +15 -0
  828. pygpt_net/data/js/highlight/es/languages/thrift.js +85 -0
  829. pygpt_net/data/js/highlight/es/languages/thrift.min.js +12 -0
  830. pygpt_net/data/js/highlight/es/languages/tp.js +180 -0
  831. pygpt_net/data/js/highlight/es/languages/tp.min.js +19 -0
  832. pygpt_net/data/js/highlight/es/languages/twig.js +268 -0
  833. pygpt_net/data/js/highlight/es/languages/twig.min.js +18 -0
  834. pygpt_net/data/js/highlight/es/languages/typescript.js +909 -0
  835. pygpt_net/data/js/highlight/es/languages/typescript.min.js +98 -0
  836. pygpt_net/data/js/highlight/es/languages/vala.js +69 -0
  837. pygpt_net/data/js/highlight/es/languages/vala.min.js +9 -0
  838. pygpt_net/data/js/highlight/es/languages/vbnet.js +165 -0
  839. pygpt_net/data/js/highlight/es/languages/vbnet.min.js +25 -0
  840. pygpt_net/data/js/highlight/es/languages/vbscript-html.js +32 -0
  841. pygpt_net/data/js/highlight/es/languages/vbscript-html.min.js +4 -0
  842. pygpt_net/data/js/highlight/es/languages/vbscript.js +228 -0
  843. pygpt_net/data/js/highlight/es/languages/vbscript.min.js +10 -0
  844. pygpt_net/data/js/highlight/es/languages/verilog.js +558 -0
  845. pygpt_net/data/js/highlight/es/languages/verilog.min.js +17 -0
  846. pygpt_net/data/js/highlight/es/languages/vhdl.js +224 -0
  847. pygpt_net/data/js/highlight/es/languages/vhdl.min.js +13 -0
  848. pygpt_net/data/js/highlight/es/languages/vim.js +137 -0
  849. pygpt_net/data/js/highlight/es/languages/vim.min.js +12 -0
  850. pygpt_net/data/js/highlight/es/languages/wasm.js +147 -0
  851. pygpt_net/data/js/highlight/es/languages/wasm.min.js +15 -0
  852. pygpt_net/data/js/highlight/es/languages/wren.js +310 -0
  853. pygpt_net/data/js/highlight/es/languages/wren.min.js +30 -0
  854. pygpt_net/data/js/highlight/es/languages/x86asm.js +161 -0
  855. pygpt_net/data/js/highlight/es/languages/x86asm.min.js +18 -0
  856. pygpt_net/data/js/highlight/es/languages/xl.js +213 -0
  857. pygpt_net/data/js/highlight/es/languages/xl.min.js +15 -0
  858. pygpt_net/data/js/highlight/es/languages/xml.js +249 -0
  859. pygpt_net/data/js/highlight/es/languages/xml.min.js +29 -0
  860. pygpt_net/data/js/highlight/es/languages/xquery.js +368 -0
  861. pygpt_net/data/js/highlight/es/languages/xquery.min.js +33 -0
  862. pygpt_net/data/js/highlight/es/languages/yaml.js +203 -0
  863. pygpt_net/data/js/highlight/es/languages/yaml.min.js +25 -0
  864. pygpt_net/data/js/highlight/es/languages/zephir.js +137 -0
  865. pygpt_net/data/js/highlight/es/languages/zephir.min.js +18 -0
  866. pygpt_net/data/js/highlight/es/package.json +1 -0
  867. pygpt_net/data/js/highlight/highlight.js +60739 -0
  868. pygpt_net/data/js/highlight/highlight.min.js +3861 -0
  869. pygpt_net/data/js/highlight/languages/1c.js +554 -0
  870. pygpt_net/data/js/highlight/languages/1c.min.js +25 -0
  871. pygpt_net/data/js/highlight/languages/abnf.js +93 -0
  872. pygpt_net/data/js/highlight/languages/abnf.min.js +11 -0
  873. pygpt_net/data/js/highlight/languages/accesslog.js +102 -0
  874. pygpt_net/data/js/highlight/languages/accesslog.min.js +13 -0
  875. pygpt_net/data/js/highlight/languages/actionscript.js +163 -0
  876. pygpt_net/data/js/highlight/languages/actionscript.min.js +17 -0
  877. pygpt_net/data/js/highlight/languages/ada.js +275 -0
  878. pygpt_net/data/js/highlight/languages/ada.min.js +25 -0
  879. pygpt_net/data/js/highlight/languages/angelscript.js +188 -0
  880. pygpt_net/data/js/highlight/languages/angelscript.min.js +21 -0
  881. pygpt_net/data/js/highlight/languages/apache.js +111 -0
  882. pygpt_net/data/js/highlight/languages/apache.min.js +14 -0
  883. pygpt_net/data/js/highlight/languages/applescript.js +159 -0
  884. pygpt_net/data/js/highlight/languages/applescript.min.js +19 -0
  885. pygpt_net/data/js/highlight/languages/arcade.js +427 -0
  886. pygpt_net/data/js/highlight/languages/arcade.min.js +27 -0
  887. pygpt_net/data/js/highlight/languages/arduino.js +1016 -0
  888. pygpt_net/data/js/highlight/languages/arduino.min.js +54 -0
  889. pygpt_net/data/js/highlight/languages/armasm.js +134 -0
  890. pygpt_net/data/js/highlight/languages/armasm.min.js +17 -0
  891. pygpt_net/data/js/highlight/languages/asciidoc.js +271 -0
  892. pygpt_net/data/js/highlight/languages/asciidoc.min.js +35 -0
  893. pygpt_net/data/js/highlight/languages/aspectj.js +241 -0
  894. pygpt_net/data/js/highlight/languages/aspectj.min.js +31 -0
  895. pygpt_net/data/js/highlight/languages/autohotkey.js +85 -0
  896. pygpt_net/data/js/highlight/languages/autohotkey.min.js +14 -0
  897. pygpt_net/data/js/highlight/languages/autoit.js +188 -0
  898. pygpt_net/data/js/highlight/languages/autoit.min.js +21 -0
  899. pygpt_net/data/js/highlight/languages/avrasm.js +88 -0
  900. pygpt_net/data/js/highlight/languages/avrasm.min.js +12 -0
  901. pygpt_net/data/js/highlight/languages/awk.js +78 -0
  902. pygpt_net/data/js/highlight/languages/awk.min.js +11 -0
  903. pygpt_net/data/js/highlight/languages/axapta.js +198 -0
  904. pygpt_net/data/js/highlight/languages/axapta.min.js +11 -0
  905. pygpt_net/data/js/highlight/languages/bash.js +417 -0
  906. pygpt_net/data/js/highlight/languages/bash.min.js +21 -0
  907. pygpt_net/data/js/highlight/languages/basic.js +240 -0
  908. pygpt_net/data/js/highlight/languages/basic.min.js +10 -0
  909. pygpt_net/data/js/highlight/languages/bnf.js +49 -0
  910. pygpt_net/data/js/highlight/languages/bnf.min.js +6 -0
  911. pygpt_net/data/js/highlight/languages/brainfuck.js +64 -0
  912. pygpt_net/data/js/highlight/languages/brainfuck.min.js +8 -0
  913. pygpt_net/data/js/highlight/languages/c.js +342 -0
  914. pygpt_net/data/js/highlight/languages/c.min.js +40 -0
  915. pygpt_net/data/js/highlight/languages/cal.js +170 -0
  916. pygpt_net/data/js/highlight/languages/cal.min.js +15 -0
  917. pygpt_net/data/js/highlight/languages/capnproto.js +109 -0
  918. pygpt_net/data/js/highlight/languages/capnproto.min.js +11 -0
  919. pygpt_net/data/js/highlight/languages/ceylon.js +150 -0
  920. pygpt_net/data/js/highlight/languages/ceylon.min.js +15 -0
  921. pygpt_net/data/js/highlight/languages/clean.js +77 -0
  922. pygpt_net/data/js/highlight/languages/clean.min.js +8 -0
  923. pygpt_net/data/js/highlight/languages/clojure-repl.js +37 -0
  924. pygpt_net/data/js/highlight/languages/clojure-repl.min.js +4 -0
  925. pygpt_net/data/js/highlight/languages/clojure.js +194 -0
  926. pygpt_net/data/js/highlight/languages/clojure.min.js +25 -0
  927. pygpt_net/data/js/highlight/languages/cmake.js +74 -0
  928. pygpt_net/data/js/highlight/languages/cmake.min.js +7 -0
  929. pygpt_net/data/js/highlight/languages/coffeescript.js +376 -0
  930. pygpt_net/data/js/highlight/languages/coffeescript.min.js +29 -0
  931. pygpt_net/data/js/highlight/languages/coq.js +455 -0
  932. pygpt_net/data/js/highlight/languages/coq.min.js +7 -0
  933. pygpt_net/data/js/highlight/languages/cos.js +150 -0
  934. pygpt_net/data/js/highlight/languages/cos.min.js +15 -0
  935. pygpt_net/data/js/highlight/languages/cpp.js +613 -0
  936. pygpt_net/data/js/highlight/languages/cpp.min.js +47 -0
  937. pygpt_net/data/js/highlight/languages/crmsh.js +110 -0
  938. pygpt_net/data/js/highlight/languages/crmsh.min.js +19 -0
  939. pygpt_net/data/js/highlight/languages/crystal.js +322 -0
  940. pygpt_net/data/js/highlight/languages/crystal.min.js +48 -0
  941. pygpt_net/data/js/highlight/languages/csharp.js +416 -0
  942. pygpt_net/data/js/highlight/languages/csharp.min.js +49 -0
  943. pygpt_net/data/js/highlight/languages/csp.js +68 -0
  944. pygpt_net/data/js/highlight/languages/csp.min.js +7 -0
  945. pygpt_net/data/js/highlight/languages/css.js +864 -0
  946. pygpt_net/data/js/highlight/languages/css.min.js +31 -0
  947. pygpt_net/data/js/highlight/languages/d.js +282 -0
  948. pygpt_net/data/js/highlight/languages/d.min.js +20 -0
  949. pygpt_net/data/js/highlight/languages/dart.js +272 -0
  950. pygpt_net/data/js/highlight/languages/dart.min.js +22 -0
  951. pygpt_net/data/js/highlight/languages/delphi.js +256 -0
  952. pygpt_net/data/js/highlight/languages/delphi.min.js +19 -0
  953. pygpt_net/data/js/highlight/languages/diff.js +72 -0
  954. pygpt_net/data/js/highlight/languages/diff.min.js +9 -0
  955. pygpt_net/data/js/highlight/languages/django.js +85 -0
  956. pygpt_net/data/js/highlight/languages/django.min.js +13 -0
  957. pygpt_net/data/js/highlight/languages/dns.js +88 -0
  958. pygpt_net/data/js/highlight/languages/dns.min.js +11 -0
  959. pygpt_net/data/js/highlight/languages/dockerfile.js +54 -0
  960. pygpt_net/data/js/highlight/languages/dockerfile.min.js +8 -0
  961. pygpt_net/data/js/highlight/languages/dos.js +177 -0
  962. pygpt_net/data/js/highlight/languages/dos.min.js +12 -0
  963. pygpt_net/data/js/highlight/languages/dsconfig.js +76 -0
  964. pygpt_net/data/js/highlight/languages/dsconfig.min.js +9 -0
  965. pygpt_net/data/js/highlight/languages/dts.js +167 -0
  966. pygpt_net/data/js/highlight/languages/dts.min.js +22 -0
  967. pygpt_net/data/js/highlight/languages/dust.js +57 -0
  968. pygpt_net/data/js/highlight/languages/dust.min.js +8 -0
  969. pygpt_net/data/js/highlight/languages/ebnf.js +64 -0
  970. pygpt_net/data/js/highlight/languages/ebnf.min.js +7 -0
  971. pygpt_net/data/js/highlight/languages/elixir.js +289 -0
  972. pygpt_net/data/js/highlight/languages/elixir.min.js +34 -0
  973. pygpt_net/data/js/highlight/languages/elm.js +153 -0
  974. pygpt_net/data/js/highlight/languages/elm.min.js +18 -0
  975. pygpt_net/data/js/highlight/languages/erb.js +39 -0
  976. pygpt_net/data/js/highlight/languages/erb.min.js +5 -0
  977. pygpt_net/data/js/highlight/languages/erlang-repl.js +64 -0
  978. pygpt_net/data/js/highlight/languages/erlang-repl.min.js +13 -0
  979. pygpt_net/data/js/highlight/languages/erlang.js +209 -0
  980. pygpt_net/data/js/highlight/languages/erlang.min.js +28 -0
  981. pygpt_net/data/js/highlight/languages/excel.js +555 -0
  982. pygpt_net/data/js/highlight/languages/excel.min.js +10 -0
  983. pygpt_net/data/js/highlight/languages/fix.js +49 -0
  984. pygpt_net/data/js/highlight/languages/fix.min.js +7 -0
  985. pygpt_net/data/js/highlight/languages/flix.js +89 -0
  986. pygpt_net/data/js/highlight/languages/flix.min.js +10 -0
  987. pygpt_net/data/js/highlight/languages/fortran.js +584 -0
  988. pygpt_net/data/js/highlight/languages/fortran.min.js +17 -0
  989. pygpt_net/data/js/highlight/languages/fsharp.js +637 -0
  990. pygpt_net/data/js/highlight/languages/fsharp.min.js +47 -0
  991. pygpt_net/data/js/highlight/languages/gams.js +191 -0
  992. pygpt_net/data/js/highlight/languages/gams.min.js +28 -0
  993. pygpt_net/data/js/highlight/languages/gauss.js +316 -0
  994. pygpt_net/data/js/highlight/languages/gauss.min.js +36 -0
  995. pygpt_net/data/js/highlight/languages/gcode.js +91 -0
  996. pygpt_net/data/js/highlight/languages/gcode.min.js +16 -0
  997. pygpt_net/data/js/highlight/languages/gherkin.js +59 -0
  998. pygpt_net/data/js/highlight/languages/gherkin.min.js +8 -0
  999. pygpt_net/data/js/highlight/languages/glsl.js +138 -0
  1000. pygpt_net/data/js/highlight/languages/glsl.min.js +8 -0
  1001. pygpt_net/data/js/highlight/languages/gml.js +3140 -0
  1002. pygpt_net/data/js/highlight/languages/gml.min.js +10 -0
  1003. pygpt_net/data/js/highlight/languages/go.js +166 -0
  1004. pygpt_net/data/js/highlight/languages/go.min.js +20 -0
  1005. pygpt_net/data/js/highlight/languages/golo.js +91 -0
  1006. pygpt_net/data/js/highlight/languages/golo.min.js +6 -0
  1007. pygpt_net/data/js/highlight/languages/gradle.js +200 -0
  1008. pygpt_net/data/js/highlight/languages/gradle.min.js +5 -0
  1009. pygpt_net/data/js/highlight/languages/graphql.js +88 -0
  1010. pygpt_net/data/js/highlight/languages/graphql.min.js +12 -0
  1011. pygpt_net/data/js/highlight/languages/groovy.js +200 -0
  1012. pygpt_net/data/js/highlight/languages/groovy.min.js +21 -0
  1013. pygpt_net/data/js/highlight/languages/haml.js +123 -0
  1014. pygpt_net/data/js/highlight/languages/haml.min.js +18 -0
  1015. pygpt_net/data/js/highlight/languages/handlebars.js +268 -0
  1016. pygpt_net/data/js/highlight/languages/handlebars.min.js +29 -0
  1017. pygpt_net/data/js/highlight/languages/haskell.js +227 -0
  1018. pygpt_net/data/js/highlight/languages/haskell.min.js +32 -0
  1019. pygpt_net/data/js/highlight/languages/haxe.js +177 -0
  1020. pygpt_net/data/js/highlight/languages/haxe.min.js +29 -0
  1021. pygpt_net/data/js/highlight/languages/hsp.js +69 -0
  1022. pygpt_net/data/js/highlight/languages/hsp.min.js +14 -0
  1023. pygpt_net/data/js/highlight/languages/http.js +107 -0
  1024. pygpt_net/data/js/highlight/languages/http.min.js +14 -0
  1025. pygpt_net/data/js/highlight/languages/hy.js +147 -0
  1026. pygpt_net/data/js/highlight/languages/hy.min.js +16 -0
  1027. pygpt_net/data/js/highlight/languages/inform7.js +80 -0
  1028. pygpt_net/data/js/highlight/languages/inform7.min.js +11 -0
  1029. pygpt_net/data/js/highlight/languages/ini.js +131 -0
  1030. pygpt_net/data/js/highlight/languages/ini.min.js +15 -0
  1031. pygpt_net/data/js/highlight/languages/irpf90.js +117 -0
  1032. pygpt_net/data/js/highlight/languages/irpf90.min.js +15 -0
  1033. pygpt_net/data/js/highlight/languages/isbl.js +3215 -0
  1034. pygpt_net/data/js/highlight/languages/isbl.min.js +25 -0
  1035. pygpt_net/data/js/highlight/languages/java.js +300 -0
  1036. pygpt_net/data/js/highlight/languages/java.min.js +38 -0
  1037. pygpt_net/data/js/highlight/languages/javascript.js +777 -0
  1038. pygpt_net/data/js/highlight/languages/javascript.min.js +81 -0
  1039. pygpt_net/data/js/highlight/languages/jboss-cli.js +73 -0
  1040. pygpt_net/data/js/highlight/languages/jboss-cli.min.js +10 -0
  1041. pygpt_net/data/js/highlight/languages/json.js +64 -0
  1042. pygpt_net/data/js/highlight/languages/json.min.js +8 -0
  1043. pygpt_net/data/js/highlight/languages/julia-repl.js +61 -0
  1044. pygpt_net/data/js/highlight/languages/julia-repl.min.js +5 -0
  1045. pygpt_net/data/js/highlight/languages/julia.js +452 -0
  1046. pygpt_net/data/js/highlight/languages/julia.min.js +18 -0
  1047. pygpt_net/data/js/highlight/languages/kotlin.js +296 -0
  1048. pygpt_net/data/js/highlight/languages/kotlin.min.js +46 -0
  1049. pygpt_net/data/js/highlight/languages/lasso.js +181 -0
  1050. pygpt_net/data/js/highlight/languages/lasso.min.js +29 -0
  1051. pygpt_net/data/js/highlight/languages/latex.js +288 -0
  1052. pygpt_net/data/js/highlight/languages/latex.min.js +33 -0
  1053. pygpt_net/data/js/highlight/languages/ldif.js +41 -0
  1054. pygpt_net/data/js/highlight/languages/ldif.min.js +5 -0
  1055. pygpt_net/data/js/highlight/languages/leaf.js +107 -0
  1056. pygpt_net/data/js/highlight/languages/leaf.min.js +12 -0
  1057. pygpt_net/data/js/highlight/languages/less.js +965 -0
  1058. pygpt_net/data/js/highlight/languages/less.min.js +45 -0
  1059. pygpt_net/data/js/highlight/languages/lisp.js +149 -0
  1060. pygpt_net/data/js/highlight/languages/lisp.min.js +17 -0
  1061. pygpt_net/data/js/highlight/languages/livecodeserver.js +183 -0
  1062. pygpt_net/data/js/highlight/languages/livecodeserver.min.js +21 -0
  1063. pygpt_net/data/js/highlight/languages/livescript.js +388 -0
  1064. pygpt_net/data/js/highlight/languages/livescript.min.js +35 -0
  1065. pygpt_net/data/js/highlight/languages/llvm.js +145 -0
  1066. pygpt_net/data/js/highlight/languages/llvm.min.js +16 -0
  1067. pygpt_net/data/js/highlight/languages/lsl.js +86 -0
  1068. pygpt_net/data/js/highlight/languages/lsl.min.js +19 -0
  1069. pygpt_net/data/js/highlight/languages/lua.js +90 -0
  1070. pygpt_net/data/js/highlight/languages/lua.min.js +15 -0
  1071. pygpt_net/data/js/highlight/languages/makefile.js +96 -0
  1072. pygpt_net/data/js/highlight/languages/makefile.min.js +14 -0
  1073. pygpt_net/data/js/highlight/languages/markdown.js +258 -0
  1074. pygpt_net/data/js/highlight/languages/markdown.min.js +32 -0
  1075. pygpt_net/data/js/highlight/languages/mathematica.js +7369 -0
  1076. pygpt_net/data/js/highlight/languages/mathematica.min.js +21 -0
  1077. pygpt_net/data/js/highlight/languages/matlab.js +117 -0
  1078. pygpt_net/data/js/highlight/languages/matlab.min.js +15 -0
  1079. pygpt_net/data/js/highlight/languages/maxima.js +424 -0
  1080. pygpt_net/data/js/highlight/languages/maxima.min.js +12 -0
  1081. pygpt_net/data/js/highlight/languages/mel.js +245 -0
  1082. pygpt_net/data/js/highlight/languages/mel.min.js +8 -0
  1083. pygpt_net/data/js/highlight/languages/mercury.js +118 -0
  1084. pygpt_net/data/js/highlight/languages/mercury.min.js +16 -0
  1085. pygpt_net/data/js/highlight/languages/mipsasm.js +114 -0
  1086. pygpt_net/data/js/highlight/languages/mipsasm.min.js +15 -0
  1087. pygpt_net/data/js/highlight/languages/mizar.js +37 -0
  1088. pygpt_net/data/js/highlight/languages/mizar.min.js +4 -0
  1089. pygpt_net/data/js/highlight/languages/mojolicious.js +46 -0
  1090. pygpt_net/data/js/highlight/languages/mojolicious.min.js +6 -0
  1091. pygpt_net/data/js/highlight/languages/monkey.js +194 -0
  1092. pygpt_net/data/js/highlight/languages/monkey.min.js +17 -0
  1093. pygpt_net/data/js/highlight/languages/moonscript.js +151 -0
  1094. pygpt_net/data/js/highlight/languages/moonscript.min.js +23 -0
  1095. pygpt_net/data/js/highlight/languages/n1ql.js +375 -0
  1096. pygpt_net/data/js/highlight/languages/n1ql.min.js +13 -0
  1097. pygpt_net/data/js/highlight/languages/nestedtext.js +93 -0
  1098. pygpt_net/data/js/highlight/languages/nestedtext.min.js +9 -0
  1099. pygpt_net/data/js/highlight/languages/nginx.js +163 -0
  1100. pygpt_net/data/js/highlight/languages/nginx.min.js +21 -0
  1101. pygpt_net/data/js/highlight/languages/nim.js +195 -0
  1102. pygpt_net/data/js/highlight/languages/nim.min.js +15 -0
  1103. pygpt_net/data/js/highlight/languages/nix.js +105 -0
  1104. pygpt_net/data/js/highlight/languages/nix.min.js +13 -0
  1105. pygpt_net/data/js/highlight/languages/node-repl.js +43 -0
  1106. pygpt_net/data/js/highlight/languages/node-repl.min.js +5 -0
  1107. pygpt_net/data/js/highlight/languages/nsis.js +567 -0
  1108. pygpt_net/data/js/highlight/languages/nsis.min.js +23 -0
  1109. pygpt_net/data/js/highlight/languages/objectivec.js +263 -0
  1110. pygpt_net/data/js/highlight/languages/objectivec.min.js +23 -0
  1111. pygpt_net/data/js/highlight/languages/ocaml.js +93 -0
  1112. pygpt_net/data/js/highlight/languages/ocaml.min.js +14 -0
  1113. pygpt_net/data/js/highlight/languages/openscad.js +87 -0
  1114. pygpt_net/data/js/highlight/languages/openscad.min.js +15 -0
  1115. pygpt_net/data/js/highlight/languages/oxygene.js +97 -0
  1116. pygpt_net/data/js/highlight/languages/oxygene.min.js +13 -0
  1117. pygpt_net/data/js/highlight/languages/parser3.js +65 -0
  1118. pygpt_net/data/js/highlight/languages/parser3.min.js +10 -0
  1119. pygpt_net/data/js/highlight/languages/perl.js +514 -0
  1120. pygpt_net/data/js/highlight/languages/perl.min.js +41 -0
  1121. pygpt_net/data/js/highlight/languages/pf.js +70 -0
  1122. pygpt_net/data/js/highlight/languages/pf.min.js +10 -0
  1123. pygpt_net/data/js/highlight/languages/pgsql.js +535 -0
  1124. pygpt_net/data/js/highlight/languages/pgsql.min.js +69 -0
  1125. pygpt_net/data/js/highlight/languages/php-template.js +64 -0
  1126. pygpt_net/data/js/highlight/languages/php-template.min.js +8 -0
  1127. pygpt_net/data/js/highlight/languages/php.js +623 -0
  1128. pygpt_net/data/js/highlight/languages/php.min.js +58 -0
  1129. pygpt_net/data/js/highlight/languages/plaintext.js +29 -0
  1130. pygpt_net/data/js/highlight/languages/plaintext.min.js +4 -0
  1131. pygpt_net/data/js/highlight/languages/pony.js +100 -0
  1132. pygpt_net/data/js/highlight/languages/pony.min.js +12 -0
  1133. pygpt_net/data/js/highlight/languages/powershell.js +327 -0
  1134. pygpt_net/data/js/highlight/languages/powershell.min.js +39 -0
  1135. pygpt_net/data/js/highlight/languages/processing.js +444 -0
  1136. pygpt_net/data/js/highlight/languages/processing.min.js +18 -0
  1137. pygpt_net/data/js/highlight/languages/profile.js +53 -0
  1138. pygpt_net/data/js/highlight/languages/profile.min.js +9 -0
  1139. pygpt_net/data/js/highlight/languages/prolog.js +107 -0
  1140. pygpt_net/data/js/highlight/languages/prolog.min.js +11 -0
  1141. pygpt_net/data/js/highlight/languages/properties.js +78 -0
  1142. pygpt_net/data/js/highlight/languages/properties.min.js +10 -0
  1143. pygpt_net/data/js/highlight/languages/protobuf.js +89 -0
  1144. pygpt_net/data/js/highlight/languages/protobuf.min.js +11 -0
  1145. pygpt_net/data/js/highlight/languages/puppet.js +156 -0
  1146. pygpt_net/data/js/highlight/languages/puppet.min.js +18 -0
  1147. pygpt_net/data/js/highlight/languages/purebasic.js +110 -0
  1148. pygpt_net/data/js/highlight/languages/purebasic.min.js +11 -0
  1149. pygpt_net/data/js/highlight/languages/python-repl.js +42 -0
  1150. pygpt_net/data/js/highlight/languages/python-repl.min.js +5 -0
  1151. pygpt_net/data/js/highlight/languages/python.js +446 -0
  1152. pygpt_net/data/js/highlight/languages/python.min.js +42 -0
  1153. pygpt_net/data/js/highlight/languages/q.js +48 -0
  1154. pygpt_net/data/js/highlight/languages/q.min.js +8 -0
  1155. pygpt_net/data/js/highlight/languages/qml.js +199 -0
  1156. pygpt_net/data/js/highlight/languages/qml.min.js +29 -0
  1157. pygpt_net/data/js/highlight/languages/r.js +267 -0
  1158. pygpt_net/data/js/highlight/languages/r.min.js +26 -0
  1159. pygpt_net/data/js/highlight/languages/reasonml.js +152 -0
  1160. pygpt_net/data/js/highlight/languages/reasonml.min.js +18 -0
  1161. pygpt_net/data/js/highlight/languages/rib.js +47 -0
  1162. pygpt_net/data/js/highlight/languages/rib.min.js +6 -0
  1163. pygpt_net/data/js/highlight/languages/roboconf.js +92 -0
  1164. pygpt_net/data/js/highlight/languages/roboconf.min.js +12 -0
  1165. pygpt_net/data/js/highlight/languages/routeros.js +174 -0
  1166. pygpt_net/data/js/highlight/languages/routeros.min.js +22 -0
  1167. pygpt_net/data/js/highlight/languages/rsl.js +159 -0
  1168. pygpt_net/data/js/highlight/languages/rsl.min.js +11 -0
  1169. pygpt_net/data/js/highlight/languages/ruby.js +458 -0
  1170. pygpt_net/data/js/highlight/languages/ruby.min.js +54 -0
  1171. pygpt_net/data/js/highlight/languages/ruleslanguage.js +86 -0
  1172. pygpt_net/data/js/highlight/languages/ruleslanguage.min.js +9 -0
  1173. pygpt_net/data/js/highlight/languages/rust.js +326 -0
  1174. pygpt_net/data/js/highlight/languages/rust.min.js +27 -0
  1175. pygpt_net/data/js/highlight/languages/sas.js +567 -0
  1176. pygpt_net/data/js/highlight/languages/sas.min.js +18 -0
  1177. pygpt_net/data/js/highlight/languages/scala.js +224 -0
  1178. pygpt_net/data/js/highlight/languages/scala.min.js +28 -0
  1179. pygpt_net/data/js/highlight/languages/scheme.js +206 -0
  1180. pygpt_net/data/js/highlight/languages/scheme.min.js +20 -0
  1181. pygpt_net/data/js/highlight/languages/scilab.js +83 -0
  1182. pygpt_net/data/js/highlight/languages/scilab.min.js +13 -0
  1183. pygpt_net/data/js/highlight/languages/scss.js +854 -0
  1184. pygpt_net/data/js/highlight/languages/scss.min.js +33 -0
  1185. pygpt_net/data/js/highlight/languages/shell.js +43 -0
  1186. pygpt_net/data/js/highlight/languages/shell.min.js +5 -0
  1187. pygpt_net/data/js/highlight/languages/smali.js +136 -0
  1188. pygpt_net/data/js/highlight/languages/smali.min.js +13 -0
  1189. pygpt_net/data/js/highlight/languages/smalltalk.js +79 -0
  1190. pygpt_net/data/js/highlight/languages/smalltalk.min.js +11 -0
  1191. pygpt_net/data/js/highlight/languages/sml.js +85 -0
  1192. pygpt_net/data/js/highlight/languages/sml.min.js +14 -0
  1193. pygpt_net/data/js/highlight/languages/sqf.js +2672 -0
  1194. pygpt_net/data/js/highlight/languages/sqf.min.js +17 -0
  1195. pygpt_net/data/js/highlight/languages/sql.js +692 -0
  1196. pygpt_net/data/js/highlight/languages/sql.min.js +17 -0
  1197. pygpt_net/data/js/highlight/languages/stan.js +531 -0
  1198. pygpt_net/data/js/highlight/languages/stan.min.js +28 -0
  1199. pygpt_net/data/js/highlight/languages/stata.js +63 -0
  1200. pygpt_net/data/js/highlight/languages/stata.min.js +11 -0
  1201. pygpt_net/data/js/highlight/languages/step21.js +77 -0
  1202. pygpt_net/data/js/highlight/languages/step21.min.js +10 -0
  1203. pygpt_net/data/js/highlight/languages/stylus.js +914 -0
  1204. pygpt_net/data/js/highlight/languages/stylus.min.js +36 -0
  1205. pygpt_net/data/js/highlight/languages/subunit.js +54 -0
  1206. pygpt_net/data/js/highlight/languages/subunit.min.js +9 -0
  1207. pygpt_net/data/js/highlight/languages/swift.js +953 -0
  1208. pygpt_net/data/js/highlight/languages/swift.min.js +66 -0
  1209. pygpt_net/data/js/highlight/languages/taggerscript.js +69 -0
  1210. pygpt_net/data/js/highlight/languages/taggerscript.min.js +8 -0
  1211. pygpt_net/data/js/highlight/languages/tap.js +57 -0
  1212. pygpt_net/data/js/highlight/languages/tap.min.js +7 -0
  1213. pygpt_net/data/js/highlight/languages/tcl.js +201 -0
  1214. pygpt_net/data/js/highlight/languages/tcl.min.js +15 -0
  1215. pygpt_net/data/js/highlight/languages/thrift.js +87 -0
  1216. pygpt_net/data/js/highlight/languages/thrift.min.js +12 -0
  1217. pygpt_net/data/js/highlight/languages/tp.js +182 -0
  1218. pygpt_net/data/js/highlight/languages/tp.min.js +19 -0
  1219. pygpt_net/data/js/highlight/languages/twig.js +270 -0
  1220. pygpt_net/data/js/highlight/languages/twig.min.js +18 -0
  1221. pygpt_net/data/js/highlight/languages/typescript.js +911 -0
  1222. pygpt_net/data/js/highlight/languages/typescript.min.js +98 -0
  1223. pygpt_net/data/js/highlight/languages/vala.js +71 -0
  1224. pygpt_net/data/js/highlight/languages/vala.min.js +9 -0
  1225. pygpt_net/data/js/highlight/languages/vbnet.js +167 -0
  1226. pygpt_net/data/js/highlight/languages/vbnet.min.js +25 -0
  1227. pygpt_net/data/js/highlight/languages/vbscript-html.js +34 -0
  1228. pygpt_net/data/js/highlight/languages/vbscript-html.min.js +4 -0
  1229. pygpt_net/data/js/highlight/languages/vbscript.js +230 -0
  1230. pygpt_net/data/js/highlight/languages/vbscript.min.js +10 -0
  1231. pygpt_net/data/js/highlight/languages/verilog.js +560 -0
  1232. pygpt_net/data/js/highlight/languages/verilog.min.js +17 -0
  1233. pygpt_net/data/js/highlight/languages/vhdl.js +226 -0
  1234. pygpt_net/data/js/highlight/languages/vhdl.min.js +13 -0
  1235. pygpt_net/data/js/highlight/languages/vim.js +139 -0
  1236. pygpt_net/data/js/highlight/languages/vim.min.js +12 -0
  1237. pygpt_net/data/js/highlight/languages/wasm.js +149 -0
  1238. pygpt_net/data/js/highlight/languages/wasm.min.js +14 -0
  1239. pygpt_net/data/js/highlight/languages/wren.js +312 -0
  1240. pygpt_net/data/js/highlight/languages/wren.min.js +30 -0
  1241. pygpt_net/data/js/highlight/languages/x86asm.js +163 -0
  1242. pygpt_net/data/js/highlight/languages/x86asm.min.js +19 -0
  1243. pygpt_net/data/js/highlight/languages/xl.js +215 -0
  1244. pygpt_net/data/js/highlight/languages/xl.min.js +15 -0
  1245. pygpt_net/data/js/highlight/languages/xml.js +251 -0
  1246. pygpt_net/data/js/highlight/languages/xml.min.js +29 -0
  1247. pygpt_net/data/js/highlight/languages/xquery.js +370 -0
  1248. pygpt_net/data/js/highlight/languages/xquery.min.js +33 -0
  1249. pygpt_net/data/js/highlight/languages/yaml.js +205 -0
  1250. pygpt_net/data/js/highlight/languages/yaml.min.js +25 -0
  1251. pygpt_net/data/js/highlight/languages/zephir.js +139 -0
  1252. pygpt_net/data/js/highlight/languages/zephir.min.js +18 -0
  1253. pygpt_net/data/js/highlight/package.json +93 -0
  1254. pygpt_net/data/js/highlight/styles/1c-light.css +107 -0
  1255. pygpt_net/data/js/highlight/styles/1c-light.min.css +9 -0
  1256. pygpt_net/data/js/highlight/styles/a11y-dark.css +94 -0
  1257. pygpt_net/data/js/highlight/styles/a11y-dark.min.css +7 -0
  1258. pygpt_net/data/js/highlight/styles/a11y-light.css +94 -0
  1259. pygpt_net/data/js/highlight/styles/a11y-light.min.css +7 -0
  1260. pygpt_net/data/js/highlight/styles/agate.css +127 -0
  1261. pygpt_net/data/js/highlight/styles/agate.min.css +20 -0
  1262. pygpt_net/data/js/highlight/styles/an-old-hope.css +75 -0
  1263. pygpt_net/data/js/highlight/styles/an-old-hope.min.css +9 -0
  1264. pygpt_net/data/js/highlight/styles/androidstudio.css +60 -0
  1265. pygpt_net/data/js/highlight/styles/androidstudio.min.css +1 -0
  1266. pygpt_net/data/js/highlight/styles/arduino-light.css +78 -0
  1267. pygpt_net/data/js/highlight/styles/arduino-light.min.css +1 -0
  1268. pygpt_net/data/js/highlight/styles/arta.css +66 -0
  1269. pygpt_net/data/js/highlight/styles/arta.min.css +1 -0
  1270. pygpt_net/data/js/highlight/styles/ascetic.css +45 -0
  1271. pygpt_net/data/js/highlight/styles/ascetic.min.css +1 -0
  1272. pygpt_net/data/js/highlight/styles/atom-one-dark-reasonable.css +105 -0
  1273. pygpt_net/data/js/highlight/styles/atom-one-dark-reasonable.min.css +1 -0
  1274. pygpt_net/data/js/highlight/styles/atom-one-dark.css +90 -0
  1275. pygpt_net/data/js/highlight/styles/atom-one-dark.min.css +1 -0
  1276. pygpt_net/data/js/highlight/styles/atom-one-light.css +90 -0
  1277. pygpt_net/data/js/highlight/styles/atom-one-light.min.css +1 -0
  1278. pygpt_net/data/js/highlight/styles/brown-paper.css +63 -0
  1279. pygpt_net/data/js/highlight/styles/brown-paper.min.css +1 -0
  1280. pygpt_net/data/js/highlight/styles/brown-papersq.png +0 -0
  1281. pygpt_net/data/js/highlight/styles/codepen-embed.css +57 -0
  1282. pygpt_net/data/js/highlight/styles/codepen-embed.min.css +1 -0
  1283. pygpt_net/data/js/highlight/styles/codeschool.css +163 -0
  1284. pygpt_net/data/js/highlight/styles/codeschool.min.css +7 -0
  1285. pygpt_net/data/js/highlight/styles/color-brewer.css +66 -0
  1286. pygpt_net/data/js/highlight/styles/color-brewer.min.css +1 -0
  1287. pygpt_net/data/js/highlight/styles/darcula.css +163 -0
  1288. pygpt_net/data/js/highlight/styles/darcula.min.css +7 -0
  1289. pygpt_net/data/js/highlight/styles/dark.css +62 -0
  1290. pygpt_net/data/js/highlight/styles/dark.min.css +1 -0
  1291. pygpt_net/data/js/highlight/styles/default-dark.css +163 -0
  1292. pygpt_net/data/js/highlight/styles/default-dark.min.css +7 -0
  1293. pygpt_net/data/js/highlight/styles/default-light.css +163 -0
  1294. pygpt_net/data/js/highlight/styles/default-light.min.css +7 -0
  1295. pygpt_net/data/js/highlight/styles/default.css +117 -0
  1296. pygpt_net/data/js/highlight/styles/default.min.css +9 -0
  1297. pygpt_net/data/js/highlight/styles/devibeans.css +90 -0
  1298. pygpt_net/data/js/highlight/styles/devibeans.min.css +7 -0
  1299. pygpt_net/data/js/highlight/styles/docco.css +83 -0
  1300. pygpt_net/data/js/highlight/styles/docco.min.css +1 -0
  1301. pygpt_net/data/js/highlight/styles/far.css +67 -0
  1302. pygpt_net/data/js/highlight/styles/far.min.css +1 -0
  1303. pygpt_net/data/js/highlight/styles/felipec.css +94 -0
  1304. pygpt_net/data/js/highlight/styles/felipec.min.css +7 -0
  1305. pygpt_net/data/js/highlight/styles/foundation.css +80 -0
  1306. pygpt_net/data/js/highlight/styles/foundation.min.css +1 -0
  1307. pygpt_net/data/js/highlight/styles/github-dark-dimmed.css +117 -0
  1308. pygpt_net/data/js/highlight/styles/github-dark-dimmed.min.css +9 -0
  1309. pygpt_net/data/js/highlight/styles/github-dark.css +118 -0
  1310. pygpt_net/data/js/highlight/styles/github-dark.min.css +10 -0
  1311. pygpt_net/data/js/highlight/styles/github.css +118 -0
  1312. pygpt_net/data/js/highlight/styles/github.min.css +10 -0
  1313. pygpt_net/data/js/highlight/styles/gml.css +72 -0
  1314. pygpt_net/data/js/highlight/styles/gml.min.css +1 -0
  1315. pygpt_net/data/js/highlight/styles/googlecode.css +79 -0
  1316. pygpt_net/data/js/highlight/styles/googlecode.min.css +1 -0
  1317. pygpt_net/data/js/highlight/styles/gradient-dark.css +90 -0
  1318. pygpt_net/data/js/highlight/styles/gradient-dark.min.css +1 -0
  1319. pygpt_net/data/js/highlight/styles/gradient-light.css +90 -0
  1320. pygpt_net/data/js/highlight/styles/gradient-light.min.css +1 -0
  1321. pygpt_net/data/js/highlight/styles/grayscale.css +89 -0
  1322. pygpt_net/data/js/highlight/styles/grayscale.min.css +1 -0
  1323. pygpt_net/data/js/highlight/styles/hybrid.css +88 -0
  1324. pygpt_net/data/js/highlight/styles/hybrid.min.css +1 -0
  1325. pygpt_net/data/js/highlight/styles/idea.css +86 -0
  1326. pygpt_net/data/js/highlight/styles/idea.min.css +1 -0
  1327. pygpt_net/data/js/highlight/styles/intellij-light.css +107 -0
  1328. pygpt_net/data/js/highlight/styles/intellij-light.min.css +1 -0
  1329. pygpt_net/data/js/highlight/styles/ir-black.css +66 -0
  1330. pygpt_net/data/js/highlight/styles/ir-black.min.css +1 -0
  1331. pygpt_net/data/js/highlight/styles/isbl-editor-dark.css +94 -0
  1332. pygpt_net/data/js/highlight/styles/isbl-editor-dark.min.css +1 -0
  1333. pygpt_net/data/js/highlight/styles/isbl-editor-light.css +93 -0
  1334. pygpt_net/data/js/highlight/styles/isbl-editor-light.min.css +1 -0
  1335. pygpt_net/data/js/highlight/styles/kimbie-dark.css +69 -0
  1336. pygpt_net/data/js/highlight/styles/kimbie-dark.min.css +1 -0
  1337. pygpt_net/data/js/highlight/styles/kimbie-light.css +69 -0
  1338. pygpt_net/data/js/highlight/styles/kimbie-light.min.css +1 -0
  1339. pygpt_net/data/js/highlight/styles/lightfair.css +81 -0
  1340. pygpt_net/data/js/highlight/styles/lightfair.min.css +1 -0
  1341. pygpt_net/data/js/highlight/styles/lioshi.css +76 -0
  1342. pygpt_net/data/js/highlight/styles/lioshi.min.css +1 -0
  1343. pygpt_net/data/js/highlight/styles/magula.css +66 -0
  1344. pygpt_net/data/js/highlight/styles/magula.min.css +1 -0
  1345. pygpt_net/data/js/highlight/styles/material-darker.css +163 -0
  1346. pygpt_net/data/js/highlight/styles/material-darker.min.css +7 -0
  1347. pygpt_net/data/js/highlight/styles/material-lighter.css +163 -0
  1348. pygpt_net/data/js/highlight/styles/material-lighter.min.css +7 -0
  1349. pygpt_net/data/js/highlight/styles/material-palenight.css +163 -0
  1350. pygpt_net/data/js/highlight/styles/material-palenight.min.css +7 -0
  1351. pygpt_net/data/js/highlight/styles/material-vivid.css +163 -0
  1352. pygpt_net/data/js/highlight/styles/material-vivid.min.css +7 -0
  1353. pygpt_net/data/js/highlight/styles/material.css +163 -0
  1354. pygpt_net/data/js/highlight/styles/material.min.css +7 -0
  1355. pygpt_net/data/js/highlight/styles/mono-blue.css +56 -0
  1356. pygpt_net/data/js/highlight/styles/mono-blue.min.css +1 -0
  1357. pygpt_net/data/js/highlight/styles/monokai-sublime.css +76 -0
  1358. pygpt_net/data/js/highlight/styles/monokai-sublime.min.css +1 -0
  1359. pygpt_net/data/js/highlight/styles/monokai.css +70 -0
  1360. pygpt_net/data/js/highlight/styles/monokai.min.css +1 -0
  1361. pygpt_net/data/js/highlight/styles/night-owl.css +174 -0
  1362. pygpt_net/data/js/highlight/styles/night-owl.min.css +1 -0
  1363. pygpt_net/data/js/highlight/styles/nnfx-dark.css +104 -0
  1364. pygpt_net/data/js/highlight/styles/nnfx-dark.min.css +10 -0
  1365. pygpt_net/data/js/highlight/styles/nnfx-light.css +104 -0
  1366. pygpt_net/data/js/highlight/styles/nnfx-light.min.css +10 -0
  1367. pygpt_net/data/js/highlight/styles/nord.css +275 -0
  1368. pygpt_net/data/js/highlight/styles/nord.min.css +1 -0
  1369. pygpt_net/data/js/highlight/styles/obsidian.css +79 -0
  1370. pygpt_net/data/js/highlight/styles/obsidian.min.css +1 -0
  1371. pygpt_net/data/js/highlight/styles/panda-syntax-dark.css +92 -0
  1372. pygpt_net/data/js/highlight/styles/panda-syntax-dark.min.css +1 -0
  1373. pygpt_net/data/js/highlight/styles/panda-syntax-light.css +89 -0
  1374. pygpt_net/data/js/highlight/styles/panda-syntax-light.min.css +1 -0
  1375. pygpt_net/data/js/highlight/styles/paraiso-dark.css +67 -0
  1376. pygpt_net/data/js/highlight/styles/paraiso-dark.min.css +1 -0
  1377. pygpt_net/data/js/highlight/styles/paraiso-light.css +67 -0
  1378. pygpt_net/data/js/highlight/styles/paraiso-light.min.css +1 -0
  1379. pygpt_net/data/js/highlight/styles/pojoaque.css +76 -0
  1380. pygpt_net/data/js/highlight/styles/pojoaque.jpg +0 -0
  1381. pygpt_net/data/js/highlight/styles/pojoaque.min.css +1 -0
  1382. pygpt_net/data/js/highlight/styles/purebasic.css +103 -0
  1383. pygpt_net/data/js/highlight/styles/purebasic.min.css +1 -0
  1384. pygpt_net/data/js/highlight/styles/qtcreator-dark.css +76 -0
  1385. pygpt_net/data/js/highlight/styles/qtcreator-dark.min.css +1 -0
  1386. pygpt_net/data/js/highlight/styles/qtcreator-light.css +74 -0
  1387. pygpt_net/data/js/highlight/styles/qtcreator-light.min.css +1 -0
  1388. pygpt_net/data/js/highlight/styles/rainbow.css +77 -0
  1389. pygpt_net/data/js/highlight/styles/rainbow.min.css +1 -0
  1390. pygpt_net/data/js/highlight/styles/routeros.css +86 -0
  1391. pygpt_net/data/js/highlight/styles/routeros.min.css +1 -0
  1392. pygpt_net/data/js/highlight/styles/school-book.css +62 -0
  1393. pygpt_net/data/js/highlight/styles/school-book.min.css +1 -0
  1394. pygpt_net/data/js/highlight/styles/shades-of-purple.css +84 -0
  1395. pygpt_net/data/js/highlight/styles/shades-of-purple.min.css +1 -0
  1396. pygpt_net/data/js/highlight/styles/srcery.css +89 -0
  1397. pygpt_net/data/js/highlight/styles/srcery.min.css +1 -0
  1398. pygpt_net/data/js/highlight/styles/stackoverflow-dark.css +117 -0
  1399. pygpt_net/data/js/highlight/styles/stackoverflow-dark.min.css +13 -0
  1400. pygpt_net/data/js/highlight/styles/stackoverflow-light.css +117 -0
  1401. pygpt_net/data/js/highlight/styles/stackoverflow-light.min.css +13 -0
  1402. pygpt_net/data/js/highlight/styles/sunburst.css +89 -0
  1403. pygpt_net/data/js/highlight/styles/sunburst.min.css +1 -0
  1404. pygpt_net/data/js/highlight/styles/tokyo-night-dark.css +114 -0
  1405. pygpt_net/data/js/highlight/styles/tokyo-night-dark.min.css +8 -0
  1406. pygpt_net/data/js/highlight/styles/tokyo-night-light.css +114 -0
  1407. pygpt_net/data/js/highlight/styles/tokyo-night-light.min.css +8 -0
  1408. pygpt_net/data/js/highlight/styles/tomorrow-night-blue.css +69 -0
  1409. pygpt_net/data/js/highlight/styles/tomorrow-night-blue.min.css +1 -0
  1410. pygpt_net/data/js/highlight/styles/tomorrow-night-bright.css +68 -0
  1411. pygpt_net/data/js/highlight/styles/tomorrow-night-bright.min.css +1 -0
  1412. pygpt_net/data/js/highlight/styles/vs.css +63 -0
  1413. pygpt_net/data/js/highlight/styles/vs.min.css +1 -0
  1414. pygpt_net/data/js/highlight/styles/vs2015.css +100 -0
  1415. pygpt_net/data/js/highlight/styles/vs2015.min.css +1 -0
  1416. pygpt_net/data/js/highlight/styles/windows-10-light.css +163 -0
  1417. pygpt_net/data/js/highlight/styles/windows-10-light.min.css +7 -0
  1418. pygpt_net/data/js/highlight/styles/windows-10.css +163 -0
  1419. pygpt_net/data/js/highlight/styles/windows-10.min.css +7 -0
  1420. pygpt_net/data/js/highlight/styles/xcode.css +90 -0
  1421. pygpt_net/data/js/highlight/styles/xcode.min.css +1 -0
  1422. pygpt_net/data/js/highlight/styles/xt256.css +79 -0
  1423. pygpt_net/data/js/highlight/styles/xt256.min.css +1 -0
  1424. pygpt_net/data/js/katex/auto-render.min.js +1 -0
  1425. pygpt_net/data/js/katex/fonts/KaTeX_AMS-Regular.ttf +0 -0
  1426. pygpt_net/data/js/katex/fonts/KaTeX_AMS-Regular.woff +0 -0
  1427. pygpt_net/data/js/katex/fonts/KaTeX_AMS-Regular.woff2 +0 -0
  1428. pygpt_net/data/js/katex/fonts/KaTeX_Caligraphic-Bold.ttf +0 -0
  1429. pygpt_net/data/js/katex/fonts/KaTeX_Caligraphic-Bold.woff +0 -0
  1430. pygpt_net/data/js/katex/fonts/KaTeX_Caligraphic-Bold.woff2 +0 -0
  1431. pygpt_net/data/js/katex/fonts/KaTeX_Caligraphic-Regular.ttf +0 -0
  1432. pygpt_net/data/js/katex/fonts/KaTeX_Caligraphic-Regular.woff +0 -0
  1433. pygpt_net/data/js/katex/fonts/KaTeX_Caligraphic-Regular.woff2 +0 -0
  1434. pygpt_net/data/js/katex/fonts/KaTeX_Fraktur-Bold.ttf +0 -0
  1435. pygpt_net/data/js/katex/fonts/KaTeX_Fraktur-Bold.woff +0 -0
  1436. pygpt_net/data/js/katex/fonts/KaTeX_Fraktur-Bold.woff2 +0 -0
  1437. pygpt_net/data/js/katex/fonts/KaTeX_Fraktur-Regular.ttf +0 -0
  1438. pygpt_net/data/js/katex/fonts/KaTeX_Fraktur-Regular.woff +0 -0
  1439. pygpt_net/data/js/katex/fonts/KaTeX_Fraktur-Regular.woff2 +0 -0
  1440. pygpt_net/data/js/katex/fonts/KaTeX_Main-Bold.ttf +0 -0
  1441. pygpt_net/data/js/katex/fonts/KaTeX_Main-Bold.woff +0 -0
  1442. pygpt_net/data/js/katex/fonts/KaTeX_Main-Bold.woff2 +0 -0
  1443. pygpt_net/data/js/katex/fonts/KaTeX_Main-BoldItalic.ttf +0 -0
  1444. pygpt_net/data/js/katex/fonts/KaTeX_Main-BoldItalic.woff +0 -0
  1445. pygpt_net/data/js/katex/fonts/KaTeX_Main-BoldItalic.woff2 +0 -0
  1446. pygpt_net/data/js/katex/fonts/KaTeX_Main-Italic.ttf +0 -0
  1447. pygpt_net/data/js/katex/fonts/KaTeX_Main-Italic.woff +0 -0
  1448. pygpt_net/data/js/katex/fonts/KaTeX_Main-Italic.woff2 +0 -0
  1449. pygpt_net/data/js/katex/fonts/KaTeX_Main-Regular.ttf +0 -0
  1450. pygpt_net/data/js/katex/fonts/KaTeX_Main-Regular.woff +0 -0
  1451. pygpt_net/data/js/katex/fonts/KaTeX_Main-Regular.woff2 +0 -0
  1452. pygpt_net/data/js/katex/fonts/KaTeX_Math-BoldItalic.ttf +0 -0
  1453. pygpt_net/data/js/katex/fonts/KaTeX_Math-BoldItalic.woff +0 -0
  1454. pygpt_net/data/js/katex/fonts/KaTeX_Math-BoldItalic.woff2 +0 -0
  1455. pygpt_net/data/js/katex/fonts/KaTeX_Math-Italic.ttf +0 -0
  1456. pygpt_net/data/js/katex/fonts/KaTeX_Math-Italic.woff +0 -0
  1457. pygpt_net/data/js/katex/fonts/KaTeX_Math-Italic.woff2 +0 -0
  1458. pygpt_net/data/js/katex/fonts/KaTeX_SansSerif-Bold.ttf +0 -0
  1459. pygpt_net/data/js/katex/fonts/KaTeX_SansSerif-Bold.woff +0 -0
  1460. pygpt_net/data/js/katex/fonts/KaTeX_SansSerif-Bold.woff2 +0 -0
  1461. pygpt_net/data/js/katex/fonts/KaTeX_SansSerif-Italic.ttf +0 -0
  1462. pygpt_net/data/js/katex/fonts/KaTeX_SansSerif-Italic.woff +0 -0
  1463. pygpt_net/data/js/katex/fonts/KaTeX_SansSerif-Italic.woff2 +0 -0
  1464. pygpt_net/data/js/katex/fonts/KaTeX_SansSerif-Regular.ttf +0 -0
  1465. pygpt_net/data/js/katex/fonts/KaTeX_SansSerif-Regular.woff +0 -0
  1466. pygpt_net/data/js/katex/fonts/KaTeX_SansSerif-Regular.woff2 +0 -0
  1467. pygpt_net/data/js/katex/fonts/KaTeX_Script-Regular.ttf +0 -0
  1468. pygpt_net/data/js/katex/fonts/KaTeX_Script-Regular.woff +0 -0
  1469. pygpt_net/data/js/katex/fonts/KaTeX_Script-Regular.woff2 +0 -0
  1470. pygpt_net/data/js/katex/fonts/KaTeX_Size1-Regular.ttf +0 -0
  1471. pygpt_net/data/js/katex/fonts/KaTeX_Size1-Regular.woff +0 -0
  1472. pygpt_net/data/js/katex/fonts/KaTeX_Size1-Regular.woff2 +0 -0
  1473. pygpt_net/data/js/katex/fonts/KaTeX_Size2-Regular.ttf +0 -0
  1474. pygpt_net/data/js/katex/fonts/KaTeX_Size2-Regular.woff +0 -0
  1475. pygpt_net/data/js/katex/fonts/KaTeX_Size2-Regular.woff2 +0 -0
  1476. pygpt_net/data/js/katex/fonts/KaTeX_Size3-Regular.ttf +0 -0
  1477. pygpt_net/data/js/katex/fonts/KaTeX_Size3-Regular.woff +0 -0
  1478. pygpt_net/data/js/katex/fonts/KaTeX_Size3-Regular.woff2 +0 -0
  1479. pygpt_net/data/js/katex/fonts/KaTeX_Size4-Regular.ttf +0 -0
  1480. pygpt_net/data/js/katex/fonts/KaTeX_Size4-Regular.woff +0 -0
  1481. pygpt_net/data/js/katex/fonts/KaTeX_Size4-Regular.woff2 +0 -0
  1482. pygpt_net/data/js/katex/fonts/KaTeX_Typewriter-Regular.ttf +0 -0
  1483. pygpt_net/data/js/katex/fonts/KaTeX_Typewriter-Regular.woff +0 -0
  1484. pygpt_net/data/js/katex/fonts/KaTeX_Typewriter-Regular.woff2 +0 -0
  1485. pygpt_net/data/js/katex/katex.min.css +1 -0
  1486. pygpt_net/data/js/katex/katex.min.js +1 -0
  1487. pygpt_net/data/locale/locale.de.ini +1045 -0
  1488. pygpt_net/data/locale/locale.en.ini +1295 -0
  1489. pygpt_net/data/locale/locale.es.ini +1045 -0
  1490. pygpt_net/data/locale/locale.fr.ini +1045 -0
  1491. pygpt_net/data/locale/locale.it.ini +1045 -0
  1492. pygpt_net/data/locale/locale.pl.ini +1046 -0
  1493. pygpt_net/data/locale/locale.uk.ini +1045 -0
  1494. pygpt_net/data/locale/locale.zh.ini +1161 -0
  1495. pygpt_net/data/locale/plugin.agent.de.ini +17 -0
  1496. pygpt_net/data/locale/plugin.agent.en.ini +17 -0
  1497. pygpt_net/data/locale/plugin.agent.es.ini +17 -0
  1498. pygpt_net/data/locale/plugin.agent.fr.ini +17 -0
  1499. pygpt_net/data/locale/plugin.agent.it.ini +17 -0
  1500. pygpt_net/data/locale/plugin.agent.pl.ini +17 -0
  1501. pygpt_net/data/locale/plugin.agent.uk.ini +17 -0
  1502. pygpt_net/data/locale/plugin.agent.zh.ini +17 -0
  1503. pygpt_net/data/locale/plugin.audio_input.de.ini +63 -0
  1504. pygpt_net/data/locale/plugin.audio_input.en.ini +63 -0
  1505. pygpt_net/data/locale/plugin.audio_input.es.ini +63 -0
  1506. pygpt_net/data/locale/plugin.audio_input.fr.ini +63 -0
  1507. pygpt_net/data/locale/plugin.audio_input.it.ini +63 -0
  1508. pygpt_net/data/locale/plugin.audio_input.pl.ini +63 -0
  1509. pygpt_net/data/locale/plugin.audio_input.uk.ini +63 -0
  1510. pygpt_net/data/locale/plugin.audio_input.zh.ini +63 -0
  1511. pygpt_net/data/locale/plugin.audio_output.de.ini +30 -0
  1512. pygpt_net/data/locale/plugin.audio_output.en.ini +30 -0
  1513. pygpt_net/data/locale/plugin.audio_output.es.ini +30 -0
  1514. pygpt_net/data/locale/plugin.audio_output.fr.ini +30 -0
  1515. pygpt_net/data/locale/plugin.audio_output.it.ini +30 -0
  1516. pygpt_net/data/locale/plugin.audio_output.pl.ini +30 -0
  1517. pygpt_net/data/locale/plugin.audio_output.uk.ini +30 -0
  1518. pygpt_net/data/locale/plugin.audio_output.zh.ini +30 -0
  1519. pygpt_net/data/locale/plugin.cmd_api.de.ini +12 -0
  1520. pygpt_net/data/locale/plugin.cmd_api.en.ini +12 -0
  1521. pygpt_net/data/locale/plugin.cmd_api.es.ini +12 -0
  1522. pygpt_net/data/locale/plugin.cmd_api.fr.ini +12 -0
  1523. pygpt_net/data/locale/plugin.cmd_api.it.ini +12 -0
  1524. pygpt_net/data/locale/plugin.cmd_api.pl.ini +12 -0
  1525. pygpt_net/data/locale/plugin.cmd_api.uk.ini +12 -0
  1526. pygpt_net/data/locale/plugin.cmd_api.zh.ini +12 -0
  1527. pygpt_net/data/locale/plugin.cmd_code_interpreter.de.ini +33 -0
  1528. pygpt_net/data/locale/plugin.cmd_code_interpreter.en.ini +65 -0
  1529. pygpt_net/data/locale/plugin.cmd_code_interpreter.es.ini +33 -0
  1530. pygpt_net/data/locale/plugin.cmd_code_interpreter.fr.ini +33 -0
  1531. pygpt_net/data/locale/plugin.cmd_code_interpreter.it.ini +33 -0
  1532. pygpt_net/data/locale/plugin.cmd_code_interpreter.pl.ini +33 -0
  1533. pygpt_net/data/locale/plugin.cmd_code_interpreter.uk.ini +33 -0
  1534. pygpt_net/data/locale/plugin.cmd_code_interpreter.zh.ini +33 -0
  1535. pygpt_net/data/locale/plugin.cmd_custom.de.ini +6 -0
  1536. pygpt_net/data/locale/plugin.cmd_custom.en.ini +6 -0
  1537. pygpt_net/data/locale/plugin.cmd_custom.es.ini +6 -0
  1538. pygpt_net/data/locale/plugin.cmd_custom.fr.ini +6 -0
  1539. pygpt_net/data/locale/plugin.cmd_custom.it.ini +6 -0
  1540. pygpt_net/data/locale/plugin.cmd_custom.pl.ini +6 -0
  1541. pygpt_net/data/locale/plugin.cmd_custom.uk.ini +6 -0
  1542. pygpt_net/data/locale/plugin.cmd_custom.zh.ini +6 -0
  1543. pygpt_net/data/locale/plugin.cmd_files.de.ini +56 -0
  1544. pygpt_net/data/locale/plugin.cmd_files.en.ini +56 -0
  1545. pygpt_net/data/locale/plugin.cmd_files.es.ini +56 -0
  1546. pygpt_net/data/locale/plugin.cmd_files.fr.ini +56 -0
  1547. pygpt_net/data/locale/plugin.cmd_files.it.ini +56 -0
  1548. pygpt_net/data/locale/plugin.cmd_files.pl.ini +56 -0
  1549. pygpt_net/data/locale/plugin.cmd_files.uk.ini +56 -0
  1550. pygpt_net/data/locale/plugin.cmd_files.zh.ini +56 -0
  1551. pygpt_net/data/locale/plugin.cmd_history.de.ini +31 -0
  1552. pygpt_net/data/locale/plugin.cmd_history.en.ini +31 -0
  1553. pygpt_net/data/locale/plugin.cmd_history.es.ini +31 -0
  1554. pygpt_net/data/locale/plugin.cmd_history.fr.ini +31 -0
  1555. pygpt_net/data/locale/plugin.cmd_history.it.ini +31 -0
  1556. pygpt_net/data/locale/plugin.cmd_history.pl.ini +31 -0
  1557. pygpt_net/data/locale/plugin.cmd_history.uk.ini +31 -0
  1558. pygpt_net/data/locale/plugin.cmd_history.zh.ini +31 -0
  1559. pygpt_net/data/locale/plugin.cmd_mouse_control.de.ini +31 -0
  1560. pygpt_net/data/locale/plugin.cmd_mouse_control.en.ini +33 -0
  1561. pygpt_net/data/locale/plugin.cmd_mouse_control.es.ini +31 -0
  1562. pygpt_net/data/locale/plugin.cmd_mouse_control.fr.ini +31 -0
  1563. pygpt_net/data/locale/plugin.cmd_mouse_control.it.ini +31 -0
  1564. pygpt_net/data/locale/plugin.cmd_mouse_control.pl.ini +31 -0
  1565. pygpt_net/data/locale/plugin.cmd_mouse_control.uk.ini +31 -0
  1566. pygpt_net/data/locale/plugin.cmd_mouse_control.zh.ini +31 -0
  1567. pygpt_net/data/locale/plugin.cmd_serial.de.ini +17 -0
  1568. pygpt_net/data/locale/plugin.cmd_serial.en.ini +17 -0
  1569. pygpt_net/data/locale/plugin.cmd_serial.es.ini +17 -0
  1570. pygpt_net/data/locale/plugin.cmd_serial.fr.ini +17 -0
  1571. pygpt_net/data/locale/plugin.cmd_serial.it.ini +17 -0
  1572. pygpt_net/data/locale/plugin.cmd_serial.pl.ini +17 -0
  1573. pygpt_net/data/locale/plugin.cmd_serial.uk.ini +17 -0
  1574. pygpt_net/data/locale/plugin.cmd_serial.zh.ini +17 -0
  1575. pygpt_net/data/locale/plugin.cmd_system.de.ini +17 -0
  1576. pygpt_net/data/locale/plugin.cmd_system.en.ini +23 -0
  1577. pygpt_net/data/locale/plugin.cmd_system.es.ini +17 -0
  1578. pygpt_net/data/locale/plugin.cmd_system.fr.ini +17 -0
  1579. pygpt_net/data/locale/plugin.cmd_system.it.ini +17 -0
  1580. pygpt_net/data/locale/plugin.cmd_system.pl.ini +17 -0
  1581. pygpt_net/data/locale/plugin.cmd_system.uk.ini +17 -0
  1582. pygpt_net/data/locale/plugin.cmd_system.zh.ini +17 -0
  1583. pygpt_net/data/locale/plugin.cmd_web.de.ini +62 -0
  1584. pygpt_net/data/locale/plugin.cmd_web.en.ini +72 -0
  1585. pygpt_net/data/locale/plugin.cmd_web.es.ini +62 -0
  1586. pygpt_net/data/locale/plugin.cmd_web.fr.ini +62 -0
  1587. pygpt_net/data/locale/plugin.cmd_web.it.ini +62 -0
  1588. pygpt_net/data/locale/plugin.cmd_web.pl.ini +62 -0
  1589. pygpt_net/data/locale/plugin.cmd_web.uk.ini +62 -0
  1590. pygpt_net/data/locale/plugin.cmd_web.zh.ini +62 -0
  1591. pygpt_net/data/locale/plugin.crontab.de.ini +9 -0
  1592. pygpt_net/data/locale/plugin.crontab.en.ini +9 -0
  1593. pygpt_net/data/locale/plugin.crontab.es.ini +9 -0
  1594. pygpt_net/data/locale/plugin.crontab.fr.ini +9 -0
  1595. pygpt_net/data/locale/plugin.crontab.it.ini +9 -0
  1596. pygpt_net/data/locale/plugin.crontab.pl.ini +9 -0
  1597. pygpt_net/data/locale/plugin.crontab.uk.ini +9 -0
  1598. pygpt_net/data/locale/plugin.crontab.zh.ini +9 -0
  1599. pygpt_net/data/locale/plugin.experts.de.ini +3 -0
  1600. pygpt_net/data/locale/plugin.experts.en.ini +3 -0
  1601. pygpt_net/data/locale/plugin.experts.es.ini +3 -0
  1602. pygpt_net/data/locale/plugin.experts.fr.ini +3 -0
  1603. pygpt_net/data/locale/plugin.experts.it.ini +3 -0
  1604. pygpt_net/data/locale/plugin.experts.pl.ini +3 -0
  1605. pygpt_net/data/locale/plugin.experts.uk.ini +3 -0
  1606. pygpt_net/data/locale/plugin.experts.zh.ini +3 -0
  1607. pygpt_net/data/locale/plugin.extra_prompt.de.ini +5 -0
  1608. pygpt_net/data/locale/plugin.extra_prompt.en.ini +5 -0
  1609. pygpt_net/data/locale/plugin.extra_prompt.es.ini +5 -0
  1610. pygpt_net/data/locale/plugin.extra_prompt.fr.ini +5 -0
  1611. pygpt_net/data/locale/plugin.extra_prompt.it.ini +5 -0
  1612. pygpt_net/data/locale/plugin.extra_prompt.pl.ini +5 -0
  1613. pygpt_net/data/locale/plugin.extra_prompt.uk.ini +5 -0
  1614. pygpt_net/data/locale/plugin.extra_prompt.zh.ini +5 -0
  1615. pygpt_net/data/locale/plugin.idx_llama_index.de.ini +23 -0
  1616. pygpt_net/data/locale/plugin.idx_llama_index.en.ini +23 -0
  1617. pygpt_net/data/locale/plugin.idx_llama_index.es.ini +23 -0
  1618. pygpt_net/data/locale/plugin.idx_llama_index.fr.ini +23 -0
  1619. pygpt_net/data/locale/plugin.idx_llama_index.it.ini +23 -0
  1620. pygpt_net/data/locale/plugin.idx_llama_index.pl.ini +23 -0
  1621. pygpt_net/data/locale/plugin.idx_llama_index.uk.ini +23 -0
  1622. pygpt_net/data/locale/plugin.idx_llama_index.zh.ini +23 -0
  1623. pygpt_net/data/locale/plugin.mailer.en.ini +21 -0
  1624. pygpt_net/data/locale/plugin.openai_dalle.de.ini +5 -0
  1625. pygpt_net/data/locale/plugin.openai_dalle.en.ini +5 -0
  1626. pygpt_net/data/locale/plugin.openai_dalle.es.ini +5 -0
  1627. pygpt_net/data/locale/plugin.openai_dalle.fr.ini +5 -0
  1628. pygpt_net/data/locale/plugin.openai_dalle.it.ini +5 -0
  1629. pygpt_net/data/locale/plugin.openai_dalle.pl.ini +5 -0
  1630. pygpt_net/data/locale/plugin.openai_dalle.uk.ini +5 -0
  1631. pygpt_net/data/locale/plugin.openai_dalle.zh.ini +5 -0
  1632. pygpt_net/data/locale/plugin.openai_vision.de.ini +15 -0
  1633. pygpt_net/data/locale/plugin.openai_vision.en.ini +15 -0
  1634. pygpt_net/data/locale/plugin.openai_vision.es.ini +15 -0
  1635. pygpt_net/data/locale/plugin.openai_vision.fr.ini +15 -0
  1636. pygpt_net/data/locale/plugin.openai_vision.it.ini +15 -0
  1637. pygpt_net/data/locale/plugin.openai_vision.pl.ini +15 -0
  1638. pygpt_net/data/locale/plugin.openai_vision.uk.ini +15 -0
  1639. pygpt_net/data/locale/plugin.openai_vision.zh.ini +15 -0
  1640. pygpt_net/data/locale/plugin.real_time.de.ini +12 -0
  1641. pygpt_net/data/locale/plugin.real_time.en.ini +12 -0
  1642. pygpt_net/data/locale/plugin.real_time.es.ini +12 -0
  1643. pygpt_net/data/locale/plugin.real_time.fr.ini +12 -0
  1644. pygpt_net/data/locale/plugin.real_time.it.ini +12 -0
  1645. pygpt_net/data/locale/plugin.real_time.pl.ini +12 -0
  1646. pygpt_net/data/locale/plugin.real_time.uk.ini +12 -0
  1647. pygpt_net/data/locale/plugin.real_time.zh.ini +12 -0
  1648. pygpt_net/data/locale/plugin.voice_control.de.ini +5 -0
  1649. pygpt_net/data/locale/plugin.voice_control.en.ini +5 -0
  1650. pygpt_net/data/locale/plugin.voice_control.es.ini +5 -0
  1651. pygpt_net/data/locale/plugin.voice_control.fr.ini +5 -0
  1652. pygpt_net/data/locale/plugin.voice_control.it.ini +5 -0
  1653. pygpt_net/data/locale/plugin.voice_control.pl.ini +5 -0
  1654. pygpt_net/data/locale/plugin.voice_control.uk.ini +5 -0
  1655. pygpt_net/data/locale/plugin.voice_control.zh.ini +5 -0
  1656. pygpt_net/data/logo.png +0 -0
  1657. pygpt_net/data/prompts.csv +169 -0
  1658. pygpt_net/data/win32/README.rtf +0 -0
  1659. pygpt_net/data/win32/USER-LICENSE.rtf +0 -0
  1660. pygpt_net/data/win32/banner.bmp +0 -0
  1661. pygpt_net/data/win32/banner_welcome.bmp +0 -0
  1662. pygpt_net/data/win32/pygpt.aip +622 -0
  1663. pygpt_net/data/win32/qt.conf +2 -0
  1664. pygpt_net/fonts.qrc +64 -0
  1665. pygpt_net/fonts_rc.py +67878 -0
  1666. pygpt_net/icons.qrc +142 -0
  1667. pygpt_net/icons_rc.py +4559 -0
  1668. pygpt_net/item/__init__.py +10 -0
  1669. pygpt_net/item/assistant.py +369 -0
  1670. pygpt_net/item/attachment.py +104 -0
  1671. pygpt_net/item/calendar_note.py +76 -0
  1672. pygpt_net/item/ctx.py +588 -0
  1673. pygpt_net/item/index.py +68 -0
  1674. pygpt_net/item/mode.py +17 -0
  1675. pygpt_net/item/model.py +228 -0
  1676. pygpt_net/item/notepad.py +57 -0
  1677. pygpt_net/item/preset.py +178 -0
  1678. pygpt_net/item/prompt.py +63 -0
  1679. pygpt_net/js.qrc +8 -0
  1680. pygpt_net/js_rc.py +50785 -0
  1681. pygpt_net/launcher.py +270 -0
  1682. pygpt_net/migrations/Version20231227152900.py +87 -0
  1683. pygpt_net/migrations/Version20231230095000.py +25 -0
  1684. pygpt_net/migrations/Version20231231230000.py +25 -0
  1685. pygpt_net/migrations/Version20240106060000.py +38 -0
  1686. pygpt_net/migrations/Version20240107060000.py +25 -0
  1687. pygpt_net/migrations/Version20240222160000.py +56 -0
  1688. pygpt_net/migrations/Version20240223050000.py +34 -0
  1689. pygpt_net/migrations/Version20240303190000.py +25 -0
  1690. pygpt_net/migrations/Version20240408180000.py +34 -0
  1691. pygpt_net/migrations/Version20240426050000.py +55 -0
  1692. pygpt_net/migrations/Version20240501030000.py +31 -0
  1693. pygpt_net/migrations/Version20241122130000.py +34 -0
  1694. pygpt_net/migrations/Version20241126170000.py +28 -0
  1695. pygpt_net/migrations/Version20241215110000.py +25 -0
  1696. pygpt_net/migrations/__init__.py +53 -0
  1697. pygpt_net/migrations/base.py +17 -0
  1698. pygpt_net/plugin/__init__.py +10 -0
  1699. pygpt_net/plugin/agent/__init__.py +211 -0
  1700. pygpt_net/plugin/agent/config.py +146 -0
  1701. pygpt_net/plugin/audio_input/__init__.py +526 -0
  1702. pygpt_net/plugin/audio_input/config.py +247 -0
  1703. pygpt_net/plugin/audio_input/simple.py +163 -0
  1704. pygpt_net/plugin/audio_input/worker.py +297 -0
  1705. pygpt_net/plugin/audio_output/__init__.py +271 -0
  1706. pygpt_net/plugin/audio_output/config.py +34 -0
  1707. pygpt_net/plugin/audio_output/worker.py +105 -0
  1708. pygpt_net/plugin/base/__init__.py +0 -0
  1709. pygpt_net/plugin/base/config.py +26 -0
  1710. pygpt_net/plugin/base/plugin.py +523 -0
  1711. pygpt_net/plugin/base/signals.py +23 -0
  1712. pygpt_net/plugin/base/worker.py +268 -0
  1713. pygpt_net/plugin/cmd_api/__init__.py +305 -0
  1714. pygpt_net/plugin/cmd_api/config.py +91 -0
  1715. pygpt_net/plugin/cmd_api/worker.py +173 -0
  1716. pygpt_net/plugin/cmd_code_interpreter/__init__.py +274 -0
  1717. pygpt_net/plugin/cmd_code_interpreter/builder.py +82 -0
  1718. pygpt_net/plugin/cmd_code_interpreter/config.py +390 -0
  1719. pygpt_net/plugin/cmd_code_interpreter/docker.py +63 -0
  1720. pygpt_net/plugin/cmd_code_interpreter/ipython/__init__.py +13 -0
  1721. pygpt_net/plugin/cmd_code_interpreter/ipython/docker_kernel.py +546 -0
  1722. pygpt_net/plugin/cmd_code_interpreter/ipython/local_kernel.py +220 -0
  1723. pygpt_net/plugin/cmd_code_interpreter/output.py +42 -0
  1724. pygpt_net/plugin/cmd_code_interpreter/runner.py +627 -0
  1725. pygpt_net/plugin/cmd_code_interpreter/worker.py +351 -0
  1726. pygpt_net/plugin/cmd_custom/__init__.py +136 -0
  1727. pygpt_net/plugin/cmd_custom/config.py +54 -0
  1728. pygpt_net/plugin/cmd_custom/worker.py +129 -0
  1729. pygpt_net/plugin/cmd_files/__init__.py +151 -0
  1730. pygpt_net/plugin/cmd_files/config.py +426 -0
  1731. pygpt_net/plugin/cmd_files/output.py +42 -0
  1732. pygpt_net/plugin/cmd_files/worker.py +895 -0
  1733. pygpt_net/plugin/cmd_history/__init__.py +378 -0
  1734. pygpt_net/plugin/cmd_history/config.py +270 -0
  1735. pygpt_net/plugin/cmd_history/worker.py +184 -0
  1736. pygpt_net/plugin/cmd_mouse_control/__init__.py +166 -0
  1737. pygpt_net/plugin/cmd_mouse_control/config.py +277 -0
  1738. pygpt_net/plugin/cmd_mouse_control/worker.py +327 -0
  1739. pygpt_net/plugin/cmd_serial/__init__.py +104 -0
  1740. pygpt_net/plugin/cmd_serial/config.py +105 -0
  1741. pygpt_net/plugin/cmd_serial/worker.py +239 -0
  1742. pygpt_net/plugin/cmd_system/__init__.py +169 -0
  1743. pygpt_net/plugin/cmd_system/config.py +137 -0
  1744. pygpt_net/plugin/cmd_system/docker.py +63 -0
  1745. pygpt_net/plugin/cmd_system/output.py +42 -0
  1746. pygpt_net/plugin/cmd_system/runner.py +258 -0
  1747. pygpt_net/plugin/cmd_system/worker.py +120 -0
  1748. pygpt_net/plugin/cmd_web/__init__.py +435 -0
  1749. pygpt_net/plugin/cmd_web/config.py +367 -0
  1750. pygpt_net/plugin/cmd_web/websearch.py +469 -0
  1751. pygpt_net/plugin/cmd_web/worker.py +464 -0
  1752. pygpt_net/plugin/crontab/__init__.py +188 -0
  1753. pygpt_net/plugin/crontab/config.py +73 -0
  1754. pygpt_net/plugin/experts/__init__.py +81 -0
  1755. pygpt_net/plugin/experts/config.py +26 -0
  1756. pygpt_net/plugin/extra_prompt/__init__.py +65 -0
  1757. pygpt_net/plugin/extra_prompt/config.py +44 -0
  1758. pygpt_net/plugin/idx_llama_index/__init__.py +349 -0
  1759. pygpt_net/plugin/idx_llama_index/config.py +134 -0
  1760. pygpt_net/plugin/idx_llama_index/worker.py +93 -0
  1761. pygpt_net/plugin/mailer/__init__.py +123 -0
  1762. pygpt_net/plugin/mailer/config.py +149 -0
  1763. pygpt_net/plugin/mailer/runner.py +285 -0
  1764. pygpt_net/plugin/mailer/worker.py +123 -0
  1765. pygpt_net/plugin/openai_dalle/__init__.py +165 -0
  1766. pygpt_net/plugin/openai_dalle/config.py +72 -0
  1767. pygpt_net/plugin/openai_vision/__init__.py +333 -0
  1768. pygpt_net/plugin/openai_vision/config.py +118 -0
  1769. pygpt_net/plugin/openai_vision/worker.py +159 -0
  1770. pygpt_net/plugin/real_time/__init__.py +168 -0
  1771. pygpt_net/plugin/real_time/config.py +61 -0
  1772. pygpt_net/plugin/voice_control/__init__.py +158 -0
  1773. pygpt_net/plugin/voice_control/config.py +35 -0
  1774. pygpt_net/provider/__init__.py +10 -0
  1775. pygpt_net/provider/agents/__init__.py +0 -0
  1776. pygpt_net/provider/agents/base.py +36 -0
  1777. pygpt_net/provider/agents/openai.py +43 -0
  1778. pygpt_net/provider/agents/openai_assistant.py +77 -0
  1779. pygpt_net/provider/agents/planner.py +52 -0
  1780. pygpt_net/provider/agents/react.py +68 -0
  1781. pygpt_net/provider/audio_input/__init__.py +10 -0
  1782. pygpt_net/provider/audio_input/base.py +70 -0
  1783. pygpt_net/provider/audio_input/bing_speech_recognition.py +90 -0
  1784. pygpt_net/provider/audio_input/google_cloud_speech_recognition.py +90 -0
  1785. pygpt_net/provider/audio_input/google_speech_recognition.py +90 -0
  1786. pygpt_net/provider/audio_input/openai_whisper.py +69 -0
  1787. pygpt_net/provider/audio_input/openai_whisper_local.py +90 -0
  1788. pygpt_net/provider/audio_output/__init__.py +10 -0
  1789. pygpt_net/provider/audio_output/base.py +71 -0
  1790. pygpt_net/provider/audio_output/eleven_labs.py +130 -0
  1791. pygpt_net/provider/audio_output/google_tts.py +131 -0
  1792. pygpt_net/provider/audio_output/ms_azure_tts.py +138 -0
  1793. pygpt_net/provider/audio_output/openai_tts.py +98 -0
  1794. pygpt_net/provider/core/__init__.py +10 -0
  1795. pygpt_net/provider/core/assistant/__init__.py +10 -0
  1796. pygpt_net/provider/core/assistant/base.py +50 -0
  1797. pygpt_net/provider/core/assistant/json_file.py +213 -0
  1798. pygpt_net/provider/core/assistant_file/__init__.py +10 -0
  1799. pygpt_net/provider/core/assistant_file/base.py +55 -0
  1800. pygpt_net/provider/core/assistant_file/db_sqlite/__init__.py +201 -0
  1801. pygpt_net/provider/core/assistant_file/db_sqlite/patch.py +27 -0
  1802. pygpt_net/provider/core/assistant_file/db_sqlite/storage.py +352 -0
  1803. pygpt_net/provider/core/assistant_file/db_sqlite/utils.py +62 -0
  1804. pygpt_net/provider/core/assistant_store/__init__.py +10 -0
  1805. pygpt_net/provider/core/assistant_store/base.py +56 -0
  1806. pygpt_net/provider/core/assistant_store/db_sqlite/__init__.py +135 -0
  1807. pygpt_net/provider/core/assistant_store/db_sqlite/patch.py +27 -0
  1808. pygpt_net/provider/core/assistant_store/db_sqlite/storage.py +240 -0
  1809. pygpt_net/provider/core/assistant_store/db_sqlite/utils.py +66 -0
  1810. pygpt_net/provider/core/assistant_store/json_file.py +150 -0
  1811. pygpt_net/provider/core/attachment/__init__.py +10 -0
  1812. pygpt_net/provider/core/attachment/base.py +50 -0
  1813. pygpt_net/provider/core/attachment/json_file.py +183 -0
  1814. pygpt_net/provider/core/calendar/__init__.py +10 -0
  1815. pygpt_net/provider/core/calendar/base.py +56 -0
  1816. pygpt_net/provider/core/calendar/db_sqlite/__init__.py +150 -0
  1817. pygpt_net/provider/core/calendar/db_sqlite/patch.py +26 -0
  1818. pygpt_net/provider/core/calendar/db_sqlite/storage.py +328 -0
  1819. pygpt_net/provider/core/config/__init__.py +10 -0
  1820. pygpt_net/provider/core/config/base.py +51 -0
  1821. pygpt_net/provider/core/config/json_file.py +154 -0
  1822. pygpt_net/provider/core/config/patch.py +1819 -0
  1823. pygpt_net/provider/core/ctx/__init__.py +10 -0
  1824. pygpt_net/provider/core/ctx/base.py +121 -0
  1825. pygpt_net/provider/core/ctx/db_sqlite/__init__.py +416 -0
  1826. pygpt_net/provider/core/ctx/db_sqlite/patch.py +95 -0
  1827. pygpt_net/provider/core/ctx/db_sqlite/storage.py +1334 -0
  1828. pygpt_net/provider/core/ctx/db_sqlite/utils.py +264 -0
  1829. pygpt_net/provider/core/ctx/json_file.py +368 -0
  1830. pygpt_net/provider/core/history/__init__.py +10 -0
  1831. pygpt_net/provider/core/history/base.py +31 -0
  1832. pygpt_net/provider/core/history/patch.py +26 -0
  1833. pygpt_net/provider/core/history/txt_file.py +89 -0
  1834. pygpt_net/provider/core/index/__init__.py +10 -0
  1835. pygpt_net/provider/core/index/base.py +208 -0
  1836. pygpt_net/provider/core/index/db_sqlite/__init__.py +380 -0
  1837. pygpt_net/provider/core/index/db_sqlite/patch.py +90 -0
  1838. pygpt_net/provider/core/index/db_sqlite/storage.py +712 -0
  1839. pygpt_net/provider/core/index/db_sqlite/utils.py +31 -0
  1840. pygpt_net/provider/core/index/json_file.py +218 -0
  1841. pygpt_net/provider/core/index/patch.py +26 -0
  1842. pygpt_net/provider/core/mode/__init__.py +10 -0
  1843. pygpt_net/provider/core/mode/base.py +45 -0
  1844. pygpt_net/provider/core/mode/json_file.py +142 -0
  1845. pygpt_net/provider/core/mode/patch.py +26 -0
  1846. pygpt_net/provider/core/model/__init__.py +10 -0
  1847. pygpt_net/provider/core/model/base.py +56 -0
  1848. pygpt_net/provider/core/model/json_file.py +205 -0
  1849. pygpt_net/provider/core/model/patch.py +487 -0
  1850. pygpt_net/provider/core/notepad/__init__.py +10 -0
  1851. pygpt_net/provider/core/notepad/base.py +56 -0
  1852. pygpt_net/provider/core/notepad/db_sqlite/__init__.py +116 -0
  1853. pygpt_net/provider/core/notepad/db_sqlite/patch.py +87 -0
  1854. pygpt_net/provider/core/notepad/db_sqlite/storage.py +228 -0
  1855. pygpt_net/provider/core/notepad/json_file.py +235 -0
  1856. pygpt_net/provider/core/plugin_preset/__init__.py +10 -0
  1857. pygpt_net/provider/core/plugin_preset/base.py +39 -0
  1858. pygpt_net/provider/core/plugin_preset/json_file.py +99 -0
  1859. pygpt_net/provider/core/plugin_preset/patch.py +58 -0
  1860. pygpt_net/provider/core/preset/__init__.py +10 -0
  1861. pygpt_net/provider/core/preset/base.py +59 -0
  1862. pygpt_net/provider/core/preset/json_file.py +280 -0
  1863. pygpt_net/provider/core/preset/patch.py +136 -0
  1864. pygpt_net/provider/core/prompt/__init__.py +0 -0
  1865. pygpt_net/provider/core/prompt/base.py +51 -0
  1866. pygpt_net/provider/core/prompt/json_file.py +170 -0
  1867. pygpt_net/provider/gpt/__init__.py +251 -0
  1868. pygpt_net/provider/gpt/assistants.py +465 -0
  1869. pygpt_net/provider/gpt/audio.py +64 -0
  1870. pygpt_net/provider/gpt/chat.py +280 -0
  1871. pygpt_net/provider/gpt/completion.py +191 -0
  1872. pygpt_net/provider/gpt/image.py +253 -0
  1873. pygpt_net/provider/gpt/store.py +608 -0
  1874. pygpt_net/provider/gpt/summarizer.py +63 -0
  1875. pygpt_net/provider/gpt/utils.py +27 -0
  1876. pygpt_net/provider/gpt/vision.py +307 -0
  1877. pygpt_net/provider/gpt/worker/__init__.py +0 -0
  1878. pygpt_net/provider/gpt/worker/assistants.py +619 -0
  1879. pygpt_net/provider/gpt/worker/importer.py +427 -0
  1880. pygpt_net/provider/llms/__init__.py +0 -0
  1881. pygpt_net/provider/llms/anthropic.py +50 -0
  1882. pygpt_net/provider/llms/azure_openai.py +112 -0
  1883. pygpt_net/provider/llms/base.py +175 -0
  1884. pygpt_net/provider/llms/google.py +50 -0
  1885. pygpt_net/provider/llms/hugging_face.py +58 -0
  1886. pygpt_net/provider/llms/hugging_face_api.py +85 -0
  1887. pygpt_net/provider/llms/local.py +43 -0
  1888. pygpt_net/provider/llms/ollama.py +124 -0
  1889. pygpt_net/provider/llms/openai.py +123 -0
  1890. pygpt_net/provider/loaders/__init__.py +0 -0
  1891. pygpt_net/provider/loaders/base.py +107 -0
  1892. pygpt_net/provider/loaders/file_csv.py +41 -0
  1893. pygpt_net/provider/loaders/file_docx.py +32 -0
  1894. pygpt_net/provider/loaders/file_epub.py +32 -0
  1895. pygpt_net/provider/loaders/file_excel.py +32 -0
  1896. pygpt_net/provider/loaders/file_html.py +41 -0
  1897. pygpt_net/provider/loaders/file_image_vision.py +53 -0
  1898. pygpt_net/provider/loaders/file_ipynb.py +41 -0
  1899. pygpt_net/provider/loaders/file_json.py +32 -0
  1900. pygpt_net/provider/loaders/file_markdown.py +41 -0
  1901. pygpt_net/provider/loaders/file_pdf.py +39 -0
  1902. pygpt_net/provider/loaders/file_video_audio.py +54 -0
  1903. pygpt_net/provider/loaders/file_xml.py +39 -0
  1904. pygpt_net/provider/loaders/hub/__init__.py +0 -0
  1905. pygpt_net/provider/loaders/hub/bitbucket/__init__.py +0 -0
  1906. pygpt_net/provider/loaders/hub/bitbucket/repo.py +189 -0
  1907. pygpt_net/provider/loaders/hub/chatgpt_retrieval/__init__.py +0 -0
  1908. pygpt_net/provider/loaders/hub/chatgpt_retrieval/base.py +75 -0
  1909. pygpt_net/provider/loaders/hub/database/__init__.py +0 -0
  1910. pygpt_net/provider/loaders/hub/database/base.py +122 -0
  1911. pygpt_net/provider/loaders/hub/github/__init__.py +0 -0
  1912. pygpt_net/provider/loaders/hub/github/issues.py +113 -0
  1913. pygpt_net/provider/loaders/hub/github/repo.py +101 -0
  1914. pygpt_net/provider/loaders/hub/google/__init__.py +0 -0
  1915. pygpt_net/provider/loaders/hub/google/calendar.py +72 -0
  1916. pygpt_net/provider/loaders/hub/google/docs.py +152 -0
  1917. pygpt_net/provider/loaders/hub/google/gmail.py +200 -0
  1918. pygpt_net/provider/loaders/hub/google/keep.py +50 -0
  1919. pygpt_net/provider/loaders/hub/google/sheets.py +153 -0
  1920. pygpt_net/provider/loaders/hub/image_vision/__init__.py +0 -0
  1921. pygpt_net/provider/loaders/hub/image_vision/base.py +229 -0
  1922. pygpt_net/provider/loaders/hub/json/__init__.py +0 -0
  1923. pygpt_net/provider/loaders/hub/json/base.py +114 -0
  1924. pygpt_net/provider/loaders/hub/pandas_excel/__init__.py +0 -0
  1925. pygpt_net/provider/loaders/hub/pandas_excel/base.py +112 -0
  1926. pygpt_net/provider/loaders/hub/simple_csv/__init__.py +0 -0
  1927. pygpt_net/provider/loaders/hub/simple_csv/base.py +53 -0
  1928. pygpt_net/provider/loaders/hub/video_audio/__init__.py +0 -0
  1929. pygpt_net/provider/loaders/hub/video_audio/base.py +161 -0
  1930. pygpt_net/provider/loaders/hub/web_page/__init__.py +0 -0
  1931. pygpt_net/provider/loaders/hub/web_page/base.py +23 -0
  1932. pygpt_net/provider/loaders/hub/yt/__init__.py +0 -0
  1933. pygpt_net/provider/loaders/hub/yt/base.py +75 -0
  1934. pygpt_net/provider/loaders/hub/yt/utils.py +18 -0
  1935. pygpt_net/provider/loaders/web_bitbucket.py +106 -0
  1936. pygpt_net/provider/loaders/web_chatgpt_retrieval.py +86 -0
  1937. pygpt_net/provider/loaders/web_database.py +103 -0
  1938. pygpt_net/provider/loaders/web_github_issues.py +127 -0
  1939. pygpt_net/provider/loaders/web_github_repo.py +131 -0
  1940. pygpt_net/provider/loaders/web_google_calendar.py +94 -0
  1941. pygpt_net/provider/loaders/web_google_docs.py +84 -0
  1942. pygpt_net/provider/loaders/web_google_drive.py +114 -0
  1943. pygpt_net/provider/loaders/web_google_gmail.py +89 -0
  1944. pygpt_net/provider/loaders/web_google_keep.py +81 -0
  1945. pygpt_net/provider/loaders/web_google_sheets.py +85 -0
  1946. pygpt_net/provider/loaders/web_microsoft_onedrive.py +127 -0
  1947. pygpt_net/provider/loaders/web_page.py +56 -0
  1948. pygpt_net/provider/loaders/web_rss.py +56 -0
  1949. pygpt_net/provider/loaders/web_sitemap.py +69 -0
  1950. pygpt_net/provider/loaders/web_twitter.py +90 -0
  1951. pygpt_net/provider/loaders/web_yt.py +87 -0
  1952. pygpt_net/provider/vector_stores/__init__.py +309 -0
  1953. pygpt_net/provider/vector_stores/base.py +180 -0
  1954. pygpt_net/provider/vector_stores/chroma.py +112 -0
  1955. pygpt_net/provider/vector_stores/ctx_attachment.py +123 -0
  1956. pygpt_net/provider/vector_stores/elasticsearch.py +107 -0
  1957. pygpt_net/provider/vector_stores/pinecode.py +172 -0
  1958. pygpt_net/provider/vector_stores/redis.py +110 -0
  1959. pygpt_net/provider/vector_stores/simple.py +91 -0
  1960. pygpt_net/provider/vector_stores/temp.py +170 -0
  1961. pygpt_net/provider/web/__init__.py +10 -0
  1962. pygpt_net/provider/web/base.py +81 -0
  1963. pygpt_net/provider/web/google_custom_search.py +156 -0
  1964. pygpt_net/provider/web/microsoft_bing.py +140 -0
  1965. pygpt_net/tools/__init__.py +150 -0
  1966. pygpt_net/tools/audio_transcriber/__init__.py +292 -0
  1967. pygpt_net/tools/audio_transcriber/ui/__init__.py +0 -0
  1968. pygpt_net/tools/audio_transcriber/ui/dialogs.py +150 -0
  1969. pygpt_net/tools/base.py +113 -0
  1970. pygpt_net/tools/code_interpreter/__init__.py +563 -0
  1971. pygpt_net/tools/code_interpreter/ui/__init__.py +0 -0
  1972. pygpt_net/tools/code_interpreter/ui/dialogs.py +127 -0
  1973. pygpt_net/tools/code_interpreter/ui/widgets.py +386 -0
  1974. pygpt_net/tools/html_canvas/__init__.py +320 -0
  1975. pygpt_net/tools/html_canvas/ui/__init__.py +0 -0
  1976. pygpt_net/tools/html_canvas/ui/dialogs.py +142 -0
  1977. pygpt_net/tools/html_canvas/ui/widgets.py +135 -0
  1978. pygpt_net/tools/image_viewer/__init__.py +303 -0
  1979. pygpt_net/tools/image_viewer/ui/__init__.py +0 -0
  1980. pygpt_net/tools/image_viewer/ui/dialogs.py +152 -0
  1981. pygpt_net/tools/indexer/__init__.py +520 -0
  1982. pygpt_net/tools/indexer/ui/__init__.py +0 -0
  1983. pygpt_net/tools/indexer/ui/browse.py +46 -0
  1984. pygpt_net/tools/indexer/ui/ctx.py +96 -0
  1985. pygpt_net/tools/indexer/ui/dialogs.py +199 -0
  1986. pygpt_net/tools/indexer/ui/files.py +101 -0
  1987. pygpt_net/tools/indexer/ui/web.py +199 -0
  1988. pygpt_net/tools/indexer/ui/widgets.py +121 -0
  1989. pygpt_net/tools/media_player/__init__.py +202 -0
  1990. pygpt_net/tools/media_player/ui/__init__.py +0 -0
  1991. pygpt_net/tools/media_player/ui/dialogs.py +113 -0
  1992. pygpt_net/tools/media_player/ui/widgets.py +474 -0
  1993. pygpt_net/tools/text_editor/__init__.py +293 -0
  1994. pygpt_net/tools/text_editor/ui/__init__.py +0 -0
  1995. pygpt_net/tools/text_editor/ui/dialogs.py +80 -0
  1996. pygpt_net/tools/text_editor/ui/widgets.py +77 -0
  1997. pygpt_net/ui/__init__.py +283 -0
  1998. pygpt_net/ui/base/__init__.py +0 -0
  1999. pygpt_net/ui/base/config_dialog.py +265 -0
  2000. pygpt_net/ui/base/context_menu.py +81 -0
  2001. pygpt_net/ui/dialog/__init__.py +10 -0
  2002. pygpt_net/ui/dialog/about.py +180 -0
  2003. pygpt_net/ui/dialog/applog.py +147 -0
  2004. pygpt_net/ui/dialog/assistant.py +168 -0
  2005. pygpt_net/ui/dialog/assistant_store.py +525 -0
  2006. pygpt_net/ui/dialog/changelog.py +53 -0
  2007. pygpt_net/ui/dialog/create.py +29 -0
  2008. pygpt_net/ui/dialog/db.py +510 -0
  2009. pygpt_net/ui/dialog/debug.py +57 -0
  2010. pygpt_net/ui/dialog/dictionary.py +147 -0
  2011. pygpt_net/ui/dialog/editor.py +68 -0
  2012. pygpt_net/ui/dialog/find.py +29 -0
  2013. pygpt_net/ui/dialog/image.py +73 -0
  2014. pygpt_net/ui/dialog/license.py +66 -0
  2015. pygpt_net/ui/dialog/logger.py +48 -0
  2016. pygpt_net/ui/dialog/models.py +338 -0
  2017. pygpt_net/ui/dialog/plugins.py +513 -0
  2018. pygpt_net/ui/dialog/preset.py +231 -0
  2019. pygpt_net/ui/dialog/preset_plugins.py +105 -0
  2020. pygpt_net/ui/dialog/profile.py +118 -0
  2021. pygpt_net/ui/dialog/rename.py +29 -0
  2022. pygpt_net/ui/dialog/settings.py +392 -0
  2023. pygpt_net/ui/dialog/snap.py +27 -0
  2024. pygpt_net/ui/dialog/start.py +63 -0
  2025. pygpt_net/ui/dialog/update.py +26 -0
  2026. pygpt_net/ui/dialog/url.py +29 -0
  2027. pygpt_net/ui/dialog/workdir.py +108 -0
  2028. pygpt_net/ui/dialogs.py +271 -0
  2029. pygpt_net/ui/layout/__init__.py +10 -0
  2030. pygpt_net/ui/layout/chat/__init__.py +47 -0
  2031. pygpt_net/ui/layout/chat/attachments.py +193 -0
  2032. pygpt_net/ui/layout/chat/attachments_ctx.py +162 -0
  2033. pygpt_net/ui/layout/chat/attachments_uploaded.py +133 -0
  2034. pygpt_net/ui/layout/chat/calendar.py +148 -0
  2035. pygpt_net/ui/layout/chat/explorer.py +39 -0
  2036. pygpt_net/ui/layout/chat/input.py +281 -0
  2037. pygpt_net/ui/layout/chat/markdown.py +384 -0
  2038. pygpt_net/ui/layout/chat/output.py +244 -0
  2039. pygpt_net/ui/layout/chat/painter.py +129 -0
  2040. pygpt_net/ui/layout/ctx/__init__.py +59 -0
  2041. pygpt_net/ui/layout/ctx/ctx_list.py +334 -0
  2042. pygpt_net/ui/layout/ctx/search_input.py +46 -0
  2043. pygpt_net/ui/layout/ctx/video.py +33 -0
  2044. pygpt_net/ui/layout/status.py +51 -0
  2045. pygpt_net/ui/layout/toolbox/__init__.py +79 -0
  2046. pygpt_net/ui/layout/toolbox/agent.py +79 -0
  2047. pygpt_net/ui/layout/toolbox/agent_llama.py +74 -0
  2048. pygpt_net/ui/layout/toolbox/assistants.py +126 -0
  2049. pygpt_net/ui/layout/toolbox/footer.py +149 -0
  2050. pygpt_net/ui/layout/toolbox/image.py +73 -0
  2051. pygpt_net/ui/layout/toolbox/indexes.py +236 -0
  2052. pygpt_net/ui/layout/toolbox/mode.py +59 -0
  2053. pygpt_net/ui/layout/toolbox/model.py +60 -0
  2054. pygpt_net/ui/layout/toolbox/presets.py +144 -0
  2055. pygpt_net/ui/layout/toolbox/prompt.py +96 -0
  2056. pygpt_net/ui/layout/toolbox/vision.py +61 -0
  2057. pygpt_net/ui/main.py +340 -0
  2058. pygpt_net/ui/menu/__init__.py +61 -0
  2059. pygpt_net/ui/menu/about.py +94 -0
  2060. pygpt_net/ui/menu/audio.py +89 -0
  2061. pygpt_net/ui/menu/config.py +158 -0
  2062. pygpt_net/ui/menu/debug.py +107 -0
  2063. pygpt_net/ui/menu/file.py +68 -0
  2064. pygpt_net/ui/menu/lang.py +28 -0
  2065. pygpt_net/ui/menu/plugins.py +60 -0
  2066. pygpt_net/ui/menu/theme.py +78 -0
  2067. pygpt_net/ui/menu/tools.py +83 -0
  2068. pygpt_net/ui/menu/video.py +51 -0
  2069. pygpt_net/ui/tray.py +201 -0
  2070. pygpt_net/ui/widget/__init__.py +10 -0
  2071. pygpt_net/ui/widget/anims/loader.py +229 -0
  2072. pygpt_net/ui/widget/anims/toggles.py +167 -0
  2073. pygpt_net/ui/widget/audio/__init__.py +10 -0
  2074. pygpt_net/ui/widget/audio/input.py +50 -0
  2075. pygpt_net/ui/widget/audio/input_button.py +118 -0
  2076. pygpt_net/ui/widget/audio/output.py +54 -0
  2077. pygpt_net/ui/widget/calendar/__init__.py +0 -0
  2078. pygpt_net/ui/widget/calendar/select.py +280 -0
  2079. pygpt_net/ui/widget/dialog/__init__.py +10 -0
  2080. pygpt_net/ui/widget/dialog/alert.py +41 -0
  2081. pygpt_net/ui/widget/dialog/applog.py +54 -0
  2082. pygpt_net/ui/widget/dialog/assistant_store.py +56 -0
  2083. pygpt_net/ui/widget/dialog/audio.py +16 -0
  2084. pygpt_net/ui/widget/dialog/base.py +114 -0
  2085. pygpt_net/ui/widget/dialog/confirm.py +55 -0
  2086. pygpt_net/ui/widget/dialog/create.py +56 -0
  2087. pygpt_net/ui/widget/dialog/db.py +55 -0
  2088. pygpt_net/ui/widget/dialog/debug.py +55 -0
  2089. pygpt_net/ui/widget/dialog/editor.py +58 -0
  2090. pygpt_net/ui/widget/dialog/editor_file.py +185 -0
  2091. pygpt_net/ui/widget/dialog/find.py +88 -0
  2092. pygpt_net/ui/widget/dialog/image.py +25 -0
  2093. pygpt_net/ui/widget/dialog/info.py +54 -0
  2094. pygpt_net/ui/widget/dialog/license.py +59 -0
  2095. pygpt_net/ui/widget/dialog/logger.py +56 -0
  2096. pygpt_net/ui/widget/dialog/model.py +55 -0
  2097. pygpt_net/ui/widget/dialog/preset_plugins.py +55 -0
  2098. pygpt_net/ui/widget/dialog/profile.py +177 -0
  2099. pygpt_net/ui/widget/dialog/rename.py +56 -0
  2100. pygpt_net/ui/widget/dialog/settings.py +55 -0
  2101. pygpt_net/ui/widget/dialog/settings_plugin.py +55 -0
  2102. pygpt_net/ui/widget/dialog/snap.py +74 -0
  2103. pygpt_net/ui/widget/dialog/update.py +191 -0
  2104. pygpt_net/ui/widget/dialog/url.py +207 -0
  2105. pygpt_net/ui/widget/dialog/workdir.py +54 -0
  2106. pygpt_net/ui/widget/draw/__init__.py +10 -0
  2107. pygpt_net/ui/widget/draw/painter.py +355 -0
  2108. pygpt_net/ui/widget/element/__init__.py +10 -0
  2109. pygpt_net/ui/widget/element/button.py +110 -0
  2110. pygpt_net/ui/widget/element/checkbox.py +77 -0
  2111. pygpt_net/ui/widget/element/group.py +120 -0
  2112. pygpt_net/ui/widget/element/labels.py +124 -0
  2113. pygpt_net/ui/widget/filesystem/__init__.py +0 -0
  2114. pygpt_net/ui/widget/filesystem/explorer.py +635 -0
  2115. pygpt_net/ui/widget/image/__init__.py +10 -0
  2116. pygpt_net/ui/widget/image/display.py +125 -0
  2117. pygpt_net/ui/widget/lists/__init__.py +10 -0
  2118. pygpt_net/ui/widget/lists/assistant.py +90 -0
  2119. pygpt_net/ui/widget/lists/assistant_store.py +114 -0
  2120. pygpt_net/ui/widget/lists/attachment.py +217 -0
  2121. pygpt_net/ui/widget/lists/attachment_ctx.py +173 -0
  2122. pygpt_net/ui/widget/lists/base.py +73 -0
  2123. pygpt_net/ui/widget/lists/base_combo.py +130 -0
  2124. pygpt_net/ui/widget/lists/base_list_combo.py +121 -0
  2125. pygpt_net/ui/widget/lists/context.py +532 -0
  2126. pygpt_net/ui/widget/lists/db.py +176 -0
  2127. pygpt_net/ui/widget/lists/debug.py +118 -0
  2128. pygpt_net/ui/widget/lists/experts.py +136 -0
  2129. pygpt_net/ui/widget/lists/index.py +153 -0
  2130. pygpt_net/ui/widget/lists/index_combo.py +130 -0
  2131. pygpt_net/ui/widget/lists/llama_mode_combo.py +35 -0
  2132. pygpt_net/ui/widget/lists/mode.py +29 -0
  2133. pygpt_net/ui/widget/lists/mode_combo.py +34 -0
  2134. pygpt_net/ui/widget/lists/model.py +64 -0
  2135. pygpt_net/ui/widget/lists/model_combo.py +34 -0
  2136. pygpt_net/ui/widget/lists/model_editor.py +64 -0
  2137. pygpt_net/ui/widget/lists/plugin.py +31 -0
  2138. pygpt_net/ui/widget/lists/preset.py +175 -0
  2139. pygpt_net/ui/widget/lists/preset_plugins.py +124 -0
  2140. pygpt_net/ui/widget/lists/profile.py +141 -0
  2141. pygpt_net/ui/widget/lists/settings.py +30 -0
  2142. pygpt_net/ui/widget/lists/uploaded.py +141 -0
  2143. pygpt_net/ui/widget/option/__init__.py +10 -0
  2144. pygpt_net/ui/widget/option/checkbox.py +123 -0
  2145. pygpt_net/ui/widget/option/cmd.py +159 -0
  2146. pygpt_net/ui/widget/option/combo.py +122 -0
  2147. pygpt_net/ui/widget/option/dictionary.py +423 -0
  2148. pygpt_net/ui/widget/option/input.py +289 -0
  2149. pygpt_net/ui/widget/option/prompt.py +86 -0
  2150. pygpt_net/ui/widget/option/slider.py +95 -0
  2151. pygpt_net/ui/widget/option/textarea.py +86 -0
  2152. pygpt_net/ui/widget/option/toggle.py +63 -0
  2153. pygpt_net/ui/widget/option/toggle_label.py +79 -0
  2154. pygpt_net/ui/widget/tabs/Input.py +49 -0
  2155. pygpt_net/ui/widget/tabs/__init__.py +10 -0
  2156. pygpt_net/ui/widget/tabs/body.py +36 -0
  2157. pygpt_net/ui/widget/tabs/layout.py +195 -0
  2158. pygpt_net/ui/widget/tabs/output.py +362 -0
  2159. pygpt_net/ui/widget/textarea/__init__.py +10 -0
  2160. pygpt_net/ui/widget/textarea/calendar_note.py +148 -0
  2161. pygpt_net/ui/widget/textarea/create.py +43 -0
  2162. pygpt_net/ui/widget/textarea/editor.py +184 -0
  2163. pygpt_net/ui/widget/textarea/find.py +52 -0
  2164. pygpt_net/ui/widget/textarea/html.py +329 -0
  2165. pygpt_net/ui/widget/textarea/input.py +175 -0
  2166. pygpt_net/ui/widget/textarea/name.py +35 -0
  2167. pygpt_net/ui/widget/textarea/notepad.py +205 -0
  2168. pygpt_net/ui/widget/textarea/output.py +160 -0
  2169. pygpt_net/ui/widget/textarea/rename.py +43 -0
  2170. pygpt_net/ui/widget/textarea/search_input.py +60 -0
  2171. pygpt_net/ui/widget/textarea/url.py +43 -0
  2172. pygpt_net/ui/widget/textarea/web.py +361 -0
  2173. pygpt_net/ui/widget/vision/__init__.py +10 -0
  2174. pygpt_net/ui/widget/vision/camera.py +89 -0
  2175. pygpt_net/utils.py +233 -0
  2176. pygpt_net-2.4.47.dist-info/LICENSE +23 -0
  2177. pygpt_net-2.4.47.dist-info/METADATA +4178 -0
  2178. pygpt_net-2.4.47.dist-info/RECORD +2180 -0
  2179. pygpt_net-2.4.47.dist-info/WHEEL +4 -0
  2180. pygpt_net-2.4.47.dist-info/entry_points.txt +3 -0
@@ -0,0 +1,2600 @@
1
+ /*!
2
+ Highlight.js v11.10.0 (git: 366a8bd012)
3
+ (c) 2006-2024 Josh Goebel <hello@joshgoebel.com> and other contributors
4
+ License: BSD-3-Clause
5
+ */
6
+ /* eslint-disable no-multi-assign */
7
+
8
+ function deepFreeze(obj) {
9
+ if (obj instanceof Map) {
10
+ obj.clear =
11
+ obj.delete =
12
+ obj.set =
13
+ function () {
14
+ throw new Error('map is read-only');
15
+ };
16
+ } else if (obj instanceof Set) {
17
+ obj.add =
18
+ obj.clear =
19
+ obj.delete =
20
+ function () {
21
+ throw new Error('set is read-only');
22
+ };
23
+ }
24
+
25
+ // Freeze self
26
+ Object.freeze(obj);
27
+
28
+ Object.getOwnPropertyNames(obj).forEach((name) => {
29
+ const prop = obj[name];
30
+ const type = typeof prop;
31
+
32
+ // Freeze prop if it is an object or function and also not already frozen
33
+ if ((type === 'object' || type === 'function') && !Object.isFrozen(prop)) {
34
+ deepFreeze(prop);
35
+ }
36
+ });
37
+
38
+ return obj;
39
+ }
40
+
41
+ /** @typedef {import('highlight.js').CallbackResponse} CallbackResponse */
42
+ /** @typedef {import('highlight.js').CompiledMode} CompiledMode */
43
+ /** @implements CallbackResponse */
44
+
45
+ class Response {
46
+ /**
47
+ * @param {CompiledMode} mode
48
+ */
49
+ constructor(mode) {
50
+ // eslint-disable-next-line no-undefined
51
+ if (mode.data === undefined) mode.data = {};
52
+
53
+ this.data = mode.data;
54
+ this.isMatchIgnored = false;
55
+ }
56
+
57
+ ignoreMatch() {
58
+ this.isMatchIgnored = true;
59
+ }
60
+ }
61
+
62
+ /**
63
+ * @param {string} value
64
+ * @returns {string}
65
+ */
66
+ function escapeHTML(value) {
67
+ return value
68
+ .replace(/&/g, '&amp;')
69
+ .replace(/</g, '&lt;')
70
+ .replace(/>/g, '&gt;')
71
+ .replace(/"/g, '&quot;')
72
+ .replace(/'/g, '&#x27;');
73
+ }
74
+
75
+ /**
76
+ * performs a shallow merge of multiple objects into one
77
+ *
78
+ * @template T
79
+ * @param {T} original
80
+ * @param {Record<string,any>[]} objects
81
+ * @returns {T} a single new object
82
+ */
83
+ function inherit$1(original, ...objects) {
84
+ /** @type Record<string,any> */
85
+ const result = Object.create(null);
86
+
87
+ for (const key in original) {
88
+ result[key] = original[key];
89
+ }
90
+ objects.forEach(function(obj) {
91
+ for (const key in obj) {
92
+ result[key] = obj[key];
93
+ }
94
+ });
95
+ return /** @type {T} */ (result);
96
+ }
97
+
98
+ /**
99
+ * @typedef {object} Renderer
100
+ * @property {(text: string) => void} addText
101
+ * @property {(node: Node) => void} openNode
102
+ * @property {(node: Node) => void} closeNode
103
+ * @property {() => string} value
104
+ */
105
+
106
+ /** @typedef {{scope?: string, language?: string, sublanguage?: boolean}} Node */
107
+ /** @typedef {{walk: (r: Renderer) => void}} Tree */
108
+ /** */
109
+
110
+ const SPAN_CLOSE = '</span>';
111
+
112
+ /**
113
+ * Determines if a node needs to be wrapped in <span>
114
+ *
115
+ * @param {Node} node */
116
+ const emitsWrappingTags = (node) => {
117
+ // rarely we can have a sublanguage where language is undefined
118
+ // TODO: track down why
119
+ return !!node.scope;
120
+ };
121
+
122
+ /**
123
+ *
124
+ * @param {string} name
125
+ * @param {{prefix:string}} options
126
+ */
127
+ const scopeToCSSClass = (name, { prefix }) => {
128
+ // sub-language
129
+ if (name.startsWith("language:")) {
130
+ return name.replace("language:", "language-");
131
+ }
132
+ // tiered scope: comment.line
133
+ if (name.includes(".")) {
134
+ const pieces = name.split(".");
135
+ return [
136
+ `${prefix}${pieces.shift()}`,
137
+ ...(pieces.map((x, i) => `${x}${"_".repeat(i + 1)}`))
138
+ ].join(" ");
139
+ }
140
+ // simple scope
141
+ return `${prefix}${name}`;
142
+ };
143
+
144
+ /** @type {Renderer} */
145
+ class HTMLRenderer {
146
+ /**
147
+ * Creates a new HTMLRenderer
148
+ *
149
+ * @param {Tree} parseTree - the parse tree (must support `walk` API)
150
+ * @param {{classPrefix: string}} options
151
+ */
152
+ constructor(parseTree, options) {
153
+ this.buffer = "";
154
+ this.classPrefix = options.classPrefix;
155
+ parseTree.walk(this);
156
+ }
157
+
158
+ /**
159
+ * Adds texts to the output stream
160
+ *
161
+ * @param {string} text */
162
+ addText(text) {
163
+ this.buffer += escapeHTML(text);
164
+ }
165
+
166
+ /**
167
+ * Adds a node open to the output stream (if needed)
168
+ *
169
+ * @param {Node} node */
170
+ openNode(node) {
171
+ if (!emitsWrappingTags(node)) return;
172
+
173
+ const className = scopeToCSSClass(node.scope,
174
+ { prefix: this.classPrefix });
175
+ this.span(className);
176
+ }
177
+
178
+ /**
179
+ * Adds a node close to the output stream (if needed)
180
+ *
181
+ * @param {Node} node */
182
+ closeNode(node) {
183
+ if (!emitsWrappingTags(node)) return;
184
+
185
+ this.buffer += SPAN_CLOSE;
186
+ }
187
+
188
+ /**
189
+ * returns the accumulated buffer
190
+ */
191
+ value() {
192
+ return this.buffer;
193
+ }
194
+
195
+ // helpers
196
+
197
+ /**
198
+ * Builds a span element
199
+ *
200
+ * @param {string} className */
201
+ span(className) {
202
+ this.buffer += `<span class="${className}">`;
203
+ }
204
+ }
205
+
206
+ /** @typedef {{scope?: string, language?: string, children: Node[]} | string} Node */
207
+ /** @typedef {{scope?: string, language?: string, children: Node[]} } DataNode */
208
+ /** @typedef {import('highlight.js').Emitter} Emitter */
209
+ /** */
210
+
211
+ /** @returns {DataNode} */
212
+ const newNode = (opts = {}) => {
213
+ /** @type DataNode */
214
+ const result = { children: [] };
215
+ Object.assign(result, opts);
216
+ return result;
217
+ };
218
+
219
+ class TokenTree {
220
+ constructor() {
221
+ /** @type DataNode */
222
+ this.rootNode = newNode();
223
+ this.stack = [this.rootNode];
224
+ }
225
+
226
+ get top() {
227
+ return this.stack[this.stack.length - 1];
228
+ }
229
+
230
+ get root() { return this.rootNode; }
231
+
232
+ /** @param {Node} node */
233
+ add(node) {
234
+ this.top.children.push(node);
235
+ }
236
+
237
+ /** @param {string} scope */
238
+ openNode(scope) {
239
+ /** @type Node */
240
+ const node = newNode({ scope });
241
+ this.add(node);
242
+ this.stack.push(node);
243
+ }
244
+
245
+ closeNode() {
246
+ if (this.stack.length > 1) {
247
+ return this.stack.pop();
248
+ }
249
+ // eslint-disable-next-line no-undefined
250
+ return undefined;
251
+ }
252
+
253
+ closeAllNodes() {
254
+ while (this.closeNode());
255
+ }
256
+
257
+ toJSON() {
258
+ return JSON.stringify(this.rootNode, null, 4);
259
+ }
260
+
261
+ /**
262
+ * @typedef { import("./html_renderer").Renderer } Renderer
263
+ * @param {Renderer} builder
264
+ */
265
+ walk(builder) {
266
+ // this does not
267
+ return this.constructor._walk(builder, this.rootNode);
268
+ // this works
269
+ // return TokenTree._walk(builder, this.rootNode);
270
+ }
271
+
272
+ /**
273
+ * @param {Renderer} builder
274
+ * @param {Node} node
275
+ */
276
+ static _walk(builder, node) {
277
+ if (typeof node === "string") {
278
+ builder.addText(node);
279
+ } else if (node.children) {
280
+ builder.openNode(node);
281
+ node.children.forEach((child) => this._walk(builder, child));
282
+ builder.closeNode(node);
283
+ }
284
+ return builder;
285
+ }
286
+
287
+ /**
288
+ * @param {Node} node
289
+ */
290
+ static _collapse(node) {
291
+ if (typeof node === "string") return;
292
+ if (!node.children) return;
293
+
294
+ if (node.children.every(el => typeof el === "string")) {
295
+ // node.text = node.children.join("");
296
+ // delete node.children;
297
+ node.children = [node.children.join("")];
298
+ } else {
299
+ node.children.forEach((child) => {
300
+ TokenTree._collapse(child);
301
+ });
302
+ }
303
+ }
304
+ }
305
+
306
+ /**
307
+ Currently this is all private API, but this is the minimal API necessary
308
+ that an Emitter must implement to fully support the parser.
309
+
310
+ Minimal interface:
311
+
312
+ - addText(text)
313
+ - __addSublanguage(emitter, subLanguageName)
314
+ - startScope(scope)
315
+ - endScope()
316
+ - finalize()
317
+ - toHTML()
318
+
319
+ */
320
+
321
+ /**
322
+ * @implements {Emitter}
323
+ */
324
+ class TokenTreeEmitter extends TokenTree {
325
+ /**
326
+ * @param {*} options
327
+ */
328
+ constructor(options) {
329
+ super();
330
+ this.options = options;
331
+ }
332
+
333
+ /**
334
+ * @param {string} text
335
+ */
336
+ addText(text) {
337
+ if (text === "") { return; }
338
+
339
+ this.add(text);
340
+ }
341
+
342
+ /** @param {string} scope */
343
+ startScope(scope) {
344
+ this.openNode(scope);
345
+ }
346
+
347
+ endScope() {
348
+ this.closeNode();
349
+ }
350
+
351
+ /**
352
+ * @param {Emitter & {root: DataNode}} emitter
353
+ * @param {string} name
354
+ */
355
+ __addSublanguage(emitter, name) {
356
+ /** @type DataNode */
357
+ const node = emitter.root;
358
+ if (name) node.scope = `language:${name}`;
359
+
360
+ this.add(node);
361
+ }
362
+
363
+ toHTML() {
364
+ const renderer = new HTMLRenderer(this, this.options);
365
+ return renderer.value();
366
+ }
367
+
368
+ finalize() {
369
+ this.closeAllNodes();
370
+ return true;
371
+ }
372
+ }
373
+
374
+ /**
375
+ * @param {string} value
376
+ * @returns {RegExp}
377
+ * */
378
+
379
+ /**
380
+ * @param {RegExp | string } re
381
+ * @returns {string}
382
+ */
383
+ function source(re) {
384
+ if (!re) return null;
385
+ if (typeof re === "string") return re;
386
+
387
+ return re.source;
388
+ }
389
+
390
+ /**
391
+ * @param {RegExp | string } re
392
+ * @returns {string}
393
+ */
394
+ function lookahead(re) {
395
+ return concat('(?=', re, ')');
396
+ }
397
+
398
+ /**
399
+ * @param {RegExp | string } re
400
+ * @returns {string}
401
+ */
402
+ function anyNumberOfTimes(re) {
403
+ return concat('(?:', re, ')*');
404
+ }
405
+
406
+ /**
407
+ * @param {RegExp | string } re
408
+ * @returns {string}
409
+ */
410
+ function optional(re) {
411
+ return concat('(?:', re, ')?');
412
+ }
413
+
414
+ /**
415
+ * @param {...(RegExp | string) } args
416
+ * @returns {string}
417
+ */
418
+ function concat(...args) {
419
+ const joined = args.map((x) => source(x)).join("");
420
+ return joined;
421
+ }
422
+
423
+ /**
424
+ * @param { Array<string | RegExp | Object> } args
425
+ * @returns {object}
426
+ */
427
+ function stripOptionsFromArgs(args) {
428
+ const opts = args[args.length - 1];
429
+
430
+ if (typeof opts === 'object' && opts.constructor === Object) {
431
+ args.splice(args.length - 1, 1);
432
+ return opts;
433
+ } else {
434
+ return {};
435
+ }
436
+ }
437
+
438
+ /** @typedef { {capture?: boolean} } RegexEitherOptions */
439
+
440
+ /**
441
+ * Any of the passed expresssions may match
442
+ *
443
+ * Creates a huge this | this | that | that match
444
+ * @param {(RegExp | string)[] | [...(RegExp | string)[], RegexEitherOptions]} args
445
+ * @returns {string}
446
+ */
447
+ function either(...args) {
448
+ /** @type { object & {capture?: boolean} } */
449
+ const opts = stripOptionsFromArgs(args);
450
+ const joined = '('
451
+ + (opts.capture ? "" : "?:")
452
+ + args.map((x) => source(x)).join("|") + ")";
453
+ return joined;
454
+ }
455
+
456
+ /**
457
+ * @param {RegExp | string} re
458
+ * @returns {number}
459
+ */
460
+ function countMatchGroups(re) {
461
+ return (new RegExp(re.toString() + '|')).exec('').length - 1;
462
+ }
463
+
464
+ /**
465
+ * Does lexeme start with a regular expression match at the beginning
466
+ * @param {RegExp} re
467
+ * @param {string} lexeme
468
+ */
469
+ function startsWith(re, lexeme) {
470
+ const match = re && re.exec(lexeme);
471
+ return match && match.index === 0;
472
+ }
473
+
474
+ // BACKREF_RE matches an open parenthesis or backreference. To avoid
475
+ // an incorrect parse, it additionally matches the following:
476
+ // - [...] elements, where the meaning of parentheses and escapes change
477
+ // - other escape sequences, so we do not misparse escape sequences as
478
+ // interesting elements
479
+ // - non-matching or lookahead parentheses, which do not capture. These
480
+ // follow the '(' with a '?'.
481
+ const BACKREF_RE = /\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;
482
+
483
+ // **INTERNAL** Not intended for outside usage
484
+ // join logically computes regexps.join(separator), but fixes the
485
+ // backreferences so they continue to match.
486
+ // it also places each individual regular expression into it's own
487
+ // match group, keeping track of the sequencing of those match groups
488
+ // is currently an exercise for the caller. :-)
489
+ /**
490
+ * @param {(string | RegExp)[]} regexps
491
+ * @param {{joinWith: string}} opts
492
+ * @returns {string}
493
+ */
494
+ function _rewriteBackreferences(regexps, { joinWith }) {
495
+ let numCaptures = 0;
496
+
497
+ return regexps.map((regex) => {
498
+ numCaptures += 1;
499
+ const offset = numCaptures;
500
+ let re = source(regex);
501
+ let out = '';
502
+
503
+ while (re.length > 0) {
504
+ const match = BACKREF_RE.exec(re);
505
+ if (!match) {
506
+ out += re;
507
+ break;
508
+ }
509
+ out += re.substring(0, match.index);
510
+ re = re.substring(match.index + match[0].length);
511
+ if (match[0][0] === '\\' && match[1]) {
512
+ // Adjust the backreference.
513
+ out += '\\' + String(Number(match[1]) + offset);
514
+ } else {
515
+ out += match[0];
516
+ if (match[0] === '(') {
517
+ numCaptures++;
518
+ }
519
+ }
520
+ }
521
+ return out;
522
+ }).map(re => `(${re})`).join(joinWith);
523
+ }
524
+
525
+ /** @typedef {import('highlight.js').Mode} Mode */
526
+ /** @typedef {import('highlight.js').ModeCallback} ModeCallback */
527
+
528
+ // Common regexps
529
+ const MATCH_NOTHING_RE = /\b\B/;
530
+ const IDENT_RE = '[a-zA-Z]\\w*';
531
+ const UNDERSCORE_IDENT_RE = '[a-zA-Z_]\\w*';
532
+ const NUMBER_RE = '\\b\\d+(\\.\\d+)?';
533
+ const C_NUMBER_RE = '(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)'; // 0x..., 0..., decimal, float
534
+ const BINARY_NUMBER_RE = '\\b(0b[01]+)'; // 0b...
535
+ const RE_STARTERS_RE = '!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~';
536
+
537
+ /**
538
+ * @param { Partial<Mode> & {binary?: string | RegExp} } opts
539
+ */
540
+ const SHEBANG = (opts = {}) => {
541
+ const beginShebang = /^#![ ]*\//;
542
+ if (opts.binary) {
543
+ opts.begin = concat(
544
+ beginShebang,
545
+ /.*\b/,
546
+ opts.binary,
547
+ /\b.*/);
548
+ }
549
+ return inherit$1({
550
+ scope: 'meta',
551
+ begin: beginShebang,
552
+ end: /$/,
553
+ relevance: 0,
554
+ /** @type {ModeCallback} */
555
+ "on:begin": (m, resp) => {
556
+ if (m.index !== 0) resp.ignoreMatch();
557
+ }
558
+ }, opts);
559
+ };
560
+
561
+ // Common modes
562
+ const BACKSLASH_ESCAPE = {
563
+ begin: '\\\\[\\s\\S]', relevance: 0
564
+ };
565
+ const APOS_STRING_MODE = {
566
+ scope: 'string',
567
+ begin: '\'',
568
+ end: '\'',
569
+ illegal: '\\n',
570
+ contains: [BACKSLASH_ESCAPE]
571
+ };
572
+ const QUOTE_STRING_MODE = {
573
+ scope: 'string',
574
+ begin: '"',
575
+ end: '"',
576
+ illegal: '\\n',
577
+ contains: [BACKSLASH_ESCAPE]
578
+ };
579
+ const PHRASAL_WORDS_MODE = {
580
+ begin: /\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/
581
+ };
582
+ /**
583
+ * Creates a comment mode
584
+ *
585
+ * @param {string | RegExp} begin
586
+ * @param {string | RegExp} end
587
+ * @param {Mode | {}} [modeOptions]
588
+ * @returns {Partial<Mode>}
589
+ */
590
+ const COMMENT = function(begin, end, modeOptions = {}) {
591
+ const mode = inherit$1(
592
+ {
593
+ scope: 'comment',
594
+ begin,
595
+ end,
596
+ contains: []
597
+ },
598
+ modeOptions
599
+ );
600
+ mode.contains.push({
601
+ scope: 'doctag',
602
+ // hack to avoid the space from being included. the space is necessary to
603
+ // match here to prevent the plain text rule below from gobbling up doctags
604
+ begin: '[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)',
605
+ end: /(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,
606
+ excludeBegin: true,
607
+ relevance: 0
608
+ });
609
+ const ENGLISH_WORD = either(
610
+ // list of common 1 and 2 letter words in English
611
+ "I",
612
+ "a",
613
+ "is",
614
+ "so",
615
+ "us",
616
+ "to",
617
+ "at",
618
+ "if",
619
+ "in",
620
+ "it",
621
+ "on",
622
+ // note: this is not an exhaustive list of contractions, just popular ones
623
+ /[A-Za-z]+['](d|ve|re|ll|t|s|n)/, // contractions - can't we'd they're let's, etc
624
+ /[A-Za-z]+[-][a-z]+/, // `no-way`, etc.
625
+ /[A-Za-z][a-z]{2,}/ // allow capitalized words at beginning of sentences
626
+ );
627
+ // looking like plain text, more likely to be a comment
628
+ mode.contains.push(
629
+ {
630
+ // TODO: how to include ", (, ) without breaking grammars that use these for
631
+ // comment delimiters?
632
+ // begin: /[ ]+([()"]?([A-Za-z'-]{3,}|is|a|I|so|us|[tT][oO]|at|if|in|it|on)[.]?[()":]?([.][ ]|[ ]|\))){3}/
633
+ // ---
634
+
635
+ // this tries to find sequences of 3 english words in a row (without any
636
+ // "programming" type syntax) this gives us a strong signal that we've
637
+ // TRULY found a comment - vs perhaps scanning with the wrong language.
638
+ // It's possible to find something that LOOKS like the start of the
639
+ // comment - but then if there is no readable text - good chance it is a
640
+ // false match and not a comment.
641
+ //
642
+ // for a visual example please see:
643
+ // https://github.com/highlightjs/highlight.js/issues/2827
644
+
645
+ begin: concat(
646
+ /[ ]+/, // necessary to prevent us gobbling up doctags like /* @author Bob Mcgill */
647
+ '(',
648
+ ENGLISH_WORD,
649
+ /[.]?[:]?([.][ ]|[ ])/,
650
+ '){3}') // look for 3 words in a row
651
+ }
652
+ );
653
+ return mode;
654
+ };
655
+ const C_LINE_COMMENT_MODE = COMMENT('//', '$');
656
+ const C_BLOCK_COMMENT_MODE = COMMENT('/\\*', '\\*/');
657
+ const HASH_COMMENT_MODE = COMMENT('#', '$');
658
+ const NUMBER_MODE = {
659
+ scope: 'number',
660
+ begin: NUMBER_RE,
661
+ relevance: 0
662
+ };
663
+ const C_NUMBER_MODE = {
664
+ scope: 'number',
665
+ begin: C_NUMBER_RE,
666
+ relevance: 0
667
+ };
668
+ const BINARY_NUMBER_MODE = {
669
+ scope: 'number',
670
+ begin: BINARY_NUMBER_RE,
671
+ relevance: 0
672
+ };
673
+ const REGEXP_MODE = {
674
+ scope: "regexp",
675
+ begin: /\/(?=[^/\n]*\/)/,
676
+ end: /\/[gimuy]*/,
677
+ contains: [
678
+ BACKSLASH_ESCAPE,
679
+ {
680
+ begin: /\[/,
681
+ end: /\]/,
682
+ relevance: 0,
683
+ contains: [BACKSLASH_ESCAPE]
684
+ }
685
+ ]
686
+ };
687
+ const TITLE_MODE = {
688
+ scope: 'title',
689
+ begin: IDENT_RE,
690
+ relevance: 0
691
+ };
692
+ const UNDERSCORE_TITLE_MODE = {
693
+ scope: 'title',
694
+ begin: UNDERSCORE_IDENT_RE,
695
+ relevance: 0
696
+ };
697
+ const METHOD_GUARD = {
698
+ // excludes method names from keyword processing
699
+ begin: '\\.\\s*' + UNDERSCORE_IDENT_RE,
700
+ relevance: 0
701
+ };
702
+
703
+ /**
704
+ * Adds end same as begin mechanics to a mode
705
+ *
706
+ * Your mode must include at least a single () match group as that first match
707
+ * group is what is used for comparison
708
+ * @param {Partial<Mode>} mode
709
+ */
710
+ const END_SAME_AS_BEGIN = function(mode) {
711
+ return Object.assign(mode,
712
+ {
713
+ /** @type {ModeCallback} */
714
+ 'on:begin': (m, resp) => { resp.data._beginMatch = m[1]; },
715
+ /** @type {ModeCallback} */
716
+ 'on:end': (m, resp) => { if (resp.data._beginMatch !== m[1]) resp.ignoreMatch(); }
717
+ });
718
+ };
719
+
720
+ var MODES = /*#__PURE__*/Object.freeze({
721
+ __proto__: null,
722
+ APOS_STRING_MODE: APOS_STRING_MODE,
723
+ BACKSLASH_ESCAPE: BACKSLASH_ESCAPE,
724
+ BINARY_NUMBER_MODE: BINARY_NUMBER_MODE,
725
+ BINARY_NUMBER_RE: BINARY_NUMBER_RE,
726
+ COMMENT: COMMENT,
727
+ C_BLOCK_COMMENT_MODE: C_BLOCK_COMMENT_MODE,
728
+ C_LINE_COMMENT_MODE: C_LINE_COMMENT_MODE,
729
+ C_NUMBER_MODE: C_NUMBER_MODE,
730
+ C_NUMBER_RE: C_NUMBER_RE,
731
+ END_SAME_AS_BEGIN: END_SAME_AS_BEGIN,
732
+ HASH_COMMENT_MODE: HASH_COMMENT_MODE,
733
+ IDENT_RE: IDENT_RE,
734
+ MATCH_NOTHING_RE: MATCH_NOTHING_RE,
735
+ METHOD_GUARD: METHOD_GUARD,
736
+ NUMBER_MODE: NUMBER_MODE,
737
+ NUMBER_RE: NUMBER_RE,
738
+ PHRASAL_WORDS_MODE: PHRASAL_WORDS_MODE,
739
+ QUOTE_STRING_MODE: QUOTE_STRING_MODE,
740
+ REGEXP_MODE: REGEXP_MODE,
741
+ RE_STARTERS_RE: RE_STARTERS_RE,
742
+ SHEBANG: SHEBANG,
743
+ TITLE_MODE: TITLE_MODE,
744
+ UNDERSCORE_IDENT_RE: UNDERSCORE_IDENT_RE,
745
+ UNDERSCORE_TITLE_MODE: UNDERSCORE_TITLE_MODE
746
+ });
747
+
748
+ /**
749
+ @typedef {import('highlight.js').CallbackResponse} CallbackResponse
750
+ @typedef {import('highlight.js').CompilerExt} CompilerExt
751
+ */
752
+
753
+ // Grammar extensions / plugins
754
+ // See: https://github.com/highlightjs/highlight.js/issues/2833
755
+
756
+ // Grammar extensions allow "syntactic sugar" to be added to the grammar modes
757
+ // without requiring any underlying changes to the compiler internals.
758
+
759
+ // `compileMatch` being the perfect small example of now allowing a grammar
760
+ // author to write `match` when they desire to match a single expression rather
761
+ // than being forced to use `begin`. The extension then just moves `match` into
762
+ // `begin` when it runs. Ie, no features have been added, but we've just made
763
+ // the experience of writing (and reading grammars) a little bit nicer.
764
+
765
+ // ------
766
+
767
+ // TODO: We need negative look-behind support to do this properly
768
+ /**
769
+ * Skip a match if it has a preceding dot
770
+ *
771
+ * This is used for `beginKeywords` to prevent matching expressions such as
772
+ * `bob.keyword.do()`. The mode compiler automatically wires this up as a
773
+ * special _internal_ 'on:begin' callback for modes with `beginKeywords`
774
+ * @param {RegExpMatchArray} match
775
+ * @param {CallbackResponse} response
776
+ */
777
+ function skipIfHasPrecedingDot(match, response) {
778
+ const before = match.input[match.index - 1];
779
+ if (before === ".") {
780
+ response.ignoreMatch();
781
+ }
782
+ }
783
+
784
+ /**
785
+ *
786
+ * @type {CompilerExt}
787
+ */
788
+ function scopeClassName(mode, _parent) {
789
+ // eslint-disable-next-line no-undefined
790
+ if (mode.className !== undefined) {
791
+ mode.scope = mode.className;
792
+ delete mode.className;
793
+ }
794
+ }
795
+
796
+ /**
797
+ * `beginKeywords` syntactic sugar
798
+ * @type {CompilerExt}
799
+ */
800
+ function beginKeywords(mode, parent) {
801
+ if (!parent) return;
802
+ if (!mode.beginKeywords) return;
803
+
804
+ // for languages with keywords that include non-word characters checking for
805
+ // a word boundary is not sufficient, so instead we check for a word boundary
806
+ // or whitespace - this does no harm in any case since our keyword engine
807
+ // doesn't allow spaces in keywords anyways and we still check for the boundary
808
+ // first
809
+ mode.begin = '\\b(' + mode.beginKeywords.split(' ').join('|') + ')(?!\\.)(?=\\b|\\s)';
810
+ mode.__beforeBegin = skipIfHasPrecedingDot;
811
+ mode.keywords = mode.keywords || mode.beginKeywords;
812
+ delete mode.beginKeywords;
813
+
814
+ // prevents double relevance, the keywords themselves provide
815
+ // relevance, the mode doesn't need to double it
816
+ // eslint-disable-next-line no-undefined
817
+ if (mode.relevance === undefined) mode.relevance = 0;
818
+ }
819
+
820
+ /**
821
+ * Allow `illegal` to contain an array of illegal values
822
+ * @type {CompilerExt}
823
+ */
824
+ function compileIllegal(mode, _parent) {
825
+ if (!Array.isArray(mode.illegal)) return;
826
+
827
+ mode.illegal = either(...mode.illegal);
828
+ }
829
+
830
+ /**
831
+ * `match` to match a single expression for readability
832
+ * @type {CompilerExt}
833
+ */
834
+ function compileMatch(mode, _parent) {
835
+ if (!mode.match) return;
836
+ if (mode.begin || mode.end) throw new Error("begin & end are not supported with match");
837
+
838
+ mode.begin = mode.match;
839
+ delete mode.match;
840
+ }
841
+
842
+ /**
843
+ * provides the default 1 relevance to all modes
844
+ * @type {CompilerExt}
845
+ */
846
+ function compileRelevance(mode, _parent) {
847
+ // eslint-disable-next-line no-undefined
848
+ if (mode.relevance === undefined) mode.relevance = 1;
849
+ }
850
+
851
+ // allow beforeMatch to act as a "qualifier" for the match
852
+ // the full match begin must be [beforeMatch][begin]
853
+ const beforeMatchExt = (mode, parent) => {
854
+ if (!mode.beforeMatch) return;
855
+ // starts conflicts with endsParent which we need to make sure the child
856
+ // rule is not matched multiple times
857
+ if (mode.starts) throw new Error("beforeMatch cannot be used with starts");
858
+
859
+ const originalMode = Object.assign({}, mode);
860
+ Object.keys(mode).forEach((key) => { delete mode[key]; });
861
+
862
+ mode.keywords = originalMode.keywords;
863
+ mode.begin = concat(originalMode.beforeMatch, lookahead(originalMode.begin));
864
+ mode.starts = {
865
+ relevance: 0,
866
+ contains: [
867
+ Object.assign(originalMode, { endsParent: true })
868
+ ]
869
+ };
870
+ mode.relevance = 0;
871
+
872
+ delete originalMode.beforeMatch;
873
+ };
874
+
875
+ // keywords that should have no default relevance value
876
+ const COMMON_KEYWORDS = [
877
+ 'of',
878
+ 'and',
879
+ 'for',
880
+ 'in',
881
+ 'not',
882
+ 'or',
883
+ 'if',
884
+ 'then',
885
+ 'parent', // common variable name
886
+ 'list', // common variable name
887
+ 'value' // common variable name
888
+ ];
889
+
890
+ const DEFAULT_KEYWORD_SCOPE = "keyword";
891
+
892
+ /**
893
+ * Given raw keywords from a language definition, compile them.
894
+ *
895
+ * @param {string | Record<string,string|string[]> | Array<string>} rawKeywords
896
+ * @param {boolean} caseInsensitive
897
+ */
898
+ function compileKeywords(rawKeywords, caseInsensitive, scopeName = DEFAULT_KEYWORD_SCOPE) {
899
+ /** @type {import("highlight.js/private").KeywordDict} */
900
+ const compiledKeywords = Object.create(null);
901
+
902
+ // input can be a string of keywords, an array of keywords, or a object with
903
+ // named keys representing scopeName (which can then point to a string or array)
904
+ if (typeof rawKeywords === 'string') {
905
+ compileList(scopeName, rawKeywords.split(" "));
906
+ } else if (Array.isArray(rawKeywords)) {
907
+ compileList(scopeName, rawKeywords);
908
+ } else {
909
+ Object.keys(rawKeywords).forEach(function(scopeName) {
910
+ // collapse all our objects back into the parent object
911
+ Object.assign(
912
+ compiledKeywords,
913
+ compileKeywords(rawKeywords[scopeName], caseInsensitive, scopeName)
914
+ );
915
+ });
916
+ }
917
+ return compiledKeywords;
918
+
919
+ // ---
920
+
921
+ /**
922
+ * Compiles an individual list of keywords
923
+ *
924
+ * Ex: "for if when while|5"
925
+ *
926
+ * @param {string} scopeName
927
+ * @param {Array<string>} keywordList
928
+ */
929
+ function compileList(scopeName, keywordList) {
930
+ if (caseInsensitive) {
931
+ keywordList = keywordList.map(x => x.toLowerCase());
932
+ }
933
+ keywordList.forEach(function(keyword) {
934
+ const pair = keyword.split('|');
935
+ compiledKeywords[pair[0]] = [scopeName, scoreForKeyword(pair[0], pair[1])];
936
+ });
937
+ }
938
+ }
939
+
940
+ /**
941
+ * Returns the proper score for a given keyword
942
+ *
943
+ * Also takes into account comment keywords, which will be scored 0 UNLESS
944
+ * another score has been manually assigned.
945
+ * @param {string} keyword
946
+ * @param {string} [providedScore]
947
+ */
948
+ function scoreForKeyword(keyword, providedScore) {
949
+ // manual scores always win over common keywords
950
+ // so you can force a score of 1 if you really insist
951
+ if (providedScore) {
952
+ return Number(providedScore);
953
+ }
954
+
955
+ return commonKeyword(keyword) ? 0 : 1;
956
+ }
957
+
958
+ /**
959
+ * Determines if a given keyword is common or not
960
+ *
961
+ * @param {string} keyword */
962
+ function commonKeyword(keyword) {
963
+ return COMMON_KEYWORDS.includes(keyword.toLowerCase());
964
+ }
965
+
966
+ /*
967
+
968
+ For the reasoning behind this please see:
969
+ https://github.com/highlightjs/highlight.js/issues/2880#issuecomment-747275419
970
+
971
+ */
972
+
973
+ /**
974
+ * @type {Record<string, boolean>}
975
+ */
976
+ const seenDeprecations = {};
977
+
978
+ /**
979
+ * @param {string} message
980
+ */
981
+ const error = (message) => {
982
+ console.error(message);
983
+ };
984
+
985
+ /**
986
+ * @param {string} message
987
+ * @param {any} args
988
+ */
989
+ const warn = (message, ...args) => {
990
+ console.log(`WARN: ${message}`, ...args);
991
+ };
992
+
993
+ /**
994
+ * @param {string} version
995
+ * @param {string} message
996
+ */
997
+ const deprecated = (version, message) => {
998
+ if (seenDeprecations[`${version}/${message}`]) return;
999
+
1000
+ console.log(`Deprecated as of ${version}. ${message}`);
1001
+ seenDeprecations[`${version}/${message}`] = true;
1002
+ };
1003
+
1004
+ /* eslint-disable no-throw-literal */
1005
+
1006
+ /**
1007
+ @typedef {import('highlight.js').CompiledMode} CompiledMode
1008
+ */
1009
+
1010
+ const MultiClassError = new Error();
1011
+
1012
+ /**
1013
+ * Renumbers labeled scope names to account for additional inner match
1014
+ * groups that otherwise would break everything.
1015
+ *
1016
+ * Lets say we 3 match scopes:
1017
+ *
1018
+ * { 1 => ..., 2 => ..., 3 => ... }
1019
+ *
1020
+ * So what we need is a clean match like this:
1021
+ *
1022
+ * (a)(b)(c) => [ "a", "b", "c" ]
1023
+ *
1024
+ * But this falls apart with inner match groups:
1025
+ *
1026
+ * (a)(((b)))(c) => ["a", "b", "b", "b", "c" ]
1027
+ *
1028
+ * Our scopes are now "out of alignment" and we're repeating `b` 3 times.
1029
+ * What needs to happen is the numbers are remapped:
1030
+ *
1031
+ * { 1 => ..., 2 => ..., 5 => ... }
1032
+ *
1033
+ * We also need to know that the ONLY groups that should be output
1034
+ * are 1, 2, and 5. This function handles this behavior.
1035
+ *
1036
+ * @param {CompiledMode} mode
1037
+ * @param {Array<RegExp | string>} regexes
1038
+ * @param {{key: "beginScope"|"endScope"}} opts
1039
+ */
1040
+ function remapScopeNames(mode, regexes, { key }) {
1041
+ let offset = 0;
1042
+ const scopeNames = mode[key];
1043
+ /** @type Record<number,boolean> */
1044
+ const emit = {};
1045
+ /** @type Record<number,string> */
1046
+ const positions = {};
1047
+
1048
+ for (let i = 1; i <= regexes.length; i++) {
1049
+ positions[i + offset] = scopeNames[i];
1050
+ emit[i + offset] = true;
1051
+ offset += countMatchGroups(regexes[i - 1]);
1052
+ }
1053
+ // we use _emit to keep track of which match groups are "top-level" to avoid double
1054
+ // output from inside match groups
1055
+ mode[key] = positions;
1056
+ mode[key]._emit = emit;
1057
+ mode[key]._multi = true;
1058
+ }
1059
+
1060
+ /**
1061
+ * @param {CompiledMode} mode
1062
+ */
1063
+ function beginMultiClass(mode) {
1064
+ if (!Array.isArray(mode.begin)) return;
1065
+
1066
+ if (mode.skip || mode.excludeBegin || mode.returnBegin) {
1067
+ error("skip, excludeBegin, returnBegin not compatible with beginScope: {}");
1068
+ throw MultiClassError;
1069
+ }
1070
+
1071
+ if (typeof mode.beginScope !== "object" || mode.beginScope === null) {
1072
+ error("beginScope must be object");
1073
+ throw MultiClassError;
1074
+ }
1075
+
1076
+ remapScopeNames(mode, mode.begin, { key: "beginScope" });
1077
+ mode.begin = _rewriteBackreferences(mode.begin, { joinWith: "" });
1078
+ }
1079
+
1080
+ /**
1081
+ * @param {CompiledMode} mode
1082
+ */
1083
+ function endMultiClass(mode) {
1084
+ if (!Array.isArray(mode.end)) return;
1085
+
1086
+ if (mode.skip || mode.excludeEnd || mode.returnEnd) {
1087
+ error("skip, excludeEnd, returnEnd not compatible with endScope: {}");
1088
+ throw MultiClassError;
1089
+ }
1090
+
1091
+ if (typeof mode.endScope !== "object" || mode.endScope === null) {
1092
+ error("endScope must be object");
1093
+ throw MultiClassError;
1094
+ }
1095
+
1096
+ remapScopeNames(mode, mode.end, { key: "endScope" });
1097
+ mode.end = _rewriteBackreferences(mode.end, { joinWith: "" });
1098
+ }
1099
+
1100
+ /**
1101
+ * this exists only to allow `scope: {}` to be used beside `match:`
1102
+ * Otherwise `beginScope` would necessary and that would look weird
1103
+
1104
+ {
1105
+ match: [ /def/, /\w+/ ]
1106
+ scope: { 1: "keyword" , 2: "title" }
1107
+ }
1108
+
1109
+ * @param {CompiledMode} mode
1110
+ */
1111
+ function scopeSugar(mode) {
1112
+ if (mode.scope && typeof mode.scope === "object" && mode.scope !== null) {
1113
+ mode.beginScope = mode.scope;
1114
+ delete mode.scope;
1115
+ }
1116
+ }
1117
+
1118
+ /**
1119
+ * @param {CompiledMode} mode
1120
+ */
1121
+ function MultiClass(mode) {
1122
+ scopeSugar(mode);
1123
+
1124
+ if (typeof mode.beginScope === "string") {
1125
+ mode.beginScope = { _wrap: mode.beginScope };
1126
+ }
1127
+ if (typeof mode.endScope === "string") {
1128
+ mode.endScope = { _wrap: mode.endScope };
1129
+ }
1130
+
1131
+ beginMultiClass(mode);
1132
+ endMultiClass(mode);
1133
+ }
1134
+
1135
+ /**
1136
+ @typedef {import('highlight.js').Mode} Mode
1137
+ @typedef {import('highlight.js').CompiledMode} CompiledMode
1138
+ @typedef {import('highlight.js').Language} Language
1139
+ @typedef {import('highlight.js').HLJSPlugin} HLJSPlugin
1140
+ @typedef {import('highlight.js').CompiledLanguage} CompiledLanguage
1141
+ */
1142
+
1143
+ // compilation
1144
+
1145
+ /**
1146
+ * Compiles a language definition result
1147
+ *
1148
+ * Given the raw result of a language definition (Language), compiles this so
1149
+ * that it is ready for highlighting code.
1150
+ * @param {Language} language
1151
+ * @returns {CompiledLanguage}
1152
+ */
1153
+ function compileLanguage(language) {
1154
+ /**
1155
+ * Builds a regex with the case sensitivity of the current language
1156
+ *
1157
+ * @param {RegExp | string} value
1158
+ * @param {boolean} [global]
1159
+ */
1160
+ function langRe(value, global) {
1161
+ return new RegExp(
1162
+ source(value),
1163
+ 'm'
1164
+ + (language.case_insensitive ? 'i' : '')
1165
+ + (language.unicodeRegex ? 'u' : '')
1166
+ + (global ? 'g' : '')
1167
+ );
1168
+ }
1169
+
1170
+ /**
1171
+ Stores multiple regular expressions and allows you to quickly search for
1172
+ them all in a string simultaneously - returning the first match. It does
1173
+ this by creating a huge (a|b|c) regex - each individual item wrapped with ()
1174
+ and joined by `|` - using match groups to track position. When a match is
1175
+ found checking which position in the array has content allows us to figure
1176
+ out which of the original regexes / match groups triggered the match.
1177
+
1178
+ The match object itself (the result of `Regex.exec`) is returned but also
1179
+ enhanced by merging in any meta-data that was registered with the regex.
1180
+ This is how we keep track of which mode matched, and what type of rule
1181
+ (`illegal`, `begin`, end, etc).
1182
+ */
1183
+ class MultiRegex {
1184
+ constructor() {
1185
+ this.matchIndexes = {};
1186
+ // @ts-ignore
1187
+ this.regexes = [];
1188
+ this.matchAt = 1;
1189
+ this.position = 0;
1190
+ }
1191
+
1192
+ // @ts-ignore
1193
+ addRule(re, opts) {
1194
+ opts.position = this.position++;
1195
+ // @ts-ignore
1196
+ this.matchIndexes[this.matchAt] = opts;
1197
+ this.regexes.push([opts, re]);
1198
+ this.matchAt += countMatchGroups(re) + 1;
1199
+ }
1200
+
1201
+ compile() {
1202
+ if (this.regexes.length === 0) {
1203
+ // avoids the need to check length every time exec is called
1204
+ // @ts-ignore
1205
+ this.exec = () => null;
1206
+ }
1207
+ const terminators = this.regexes.map(el => el[1]);
1208
+ this.matcherRe = langRe(_rewriteBackreferences(terminators, { joinWith: '|' }), true);
1209
+ this.lastIndex = 0;
1210
+ }
1211
+
1212
+ /** @param {string} s */
1213
+ exec(s) {
1214
+ this.matcherRe.lastIndex = this.lastIndex;
1215
+ const match = this.matcherRe.exec(s);
1216
+ if (!match) { return null; }
1217
+
1218
+ // eslint-disable-next-line no-undefined
1219
+ const i = match.findIndex((el, i) => i > 0 && el !== undefined);
1220
+ // @ts-ignore
1221
+ const matchData = this.matchIndexes[i];
1222
+ // trim off any earlier non-relevant match groups (ie, the other regex
1223
+ // match groups that make up the multi-matcher)
1224
+ match.splice(0, i);
1225
+
1226
+ return Object.assign(match, matchData);
1227
+ }
1228
+ }
1229
+
1230
+ /*
1231
+ Created to solve the key deficiently with MultiRegex - there is no way to
1232
+ test for multiple matches at a single location. Why would we need to do
1233
+ that? In the future a more dynamic engine will allow certain matches to be
1234
+ ignored. An example: if we matched say the 3rd regex in a large group but
1235
+ decided to ignore it - we'd need to started testing again at the 4th
1236
+ regex... but MultiRegex itself gives us no real way to do that.
1237
+
1238
+ So what this class creates MultiRegexs on the fly for whatever search
1239
+ position they are needed.
1240
+
1241
+ NOTE: These additional MultiRegex objects are created dynamically. For most
1242
+ grammars most of the time we will never actually need anything more than the
1243
+ first MultiRegex - so this shouldn't have too much overhead.
1244
+
1245
+ Say this is our search group, and we match regex3, but wish to ignore it.
1246
+
1247
+ regex1 | regex2 | regex3 | regex4 | regex5 ' ie, startAt = 0
1248
+
1249
+ What we need is a new MultiRegex that only includes the remaining
1250
+ possibilities:
1251
+
1252
+ regex4 | regex5 ' ie, startAt = 3
1253
+
1254
+ This class wraps all that complexity up in a simple API... `startAt` decides
1255
+ where in the array of expressions to start doing the matching. It
1256
+ auto-increments, so if a match is found at position 2, then startAt will be
1257
+ set to 3. If the end is reached startAt will return to 0.
1258
+
1259
+ MOST of the time the parser will be setting startAt manually to 0.
1260
+ */
1261
+ class ResumableMultiRegex {
1262
+ constructor() {
1263
+ // @ts-ignore
1264
+ this.rules = [];
1265
+ // @ts-ignore
1266
+ this.multiRegexes = [];
1267
+ this.count = 0;
1268
+
1269
+ this.lastIndex = 0;
1270
+ this.regexIndex = 0;
1271
+ }
1272
+
1273
+ // @ts-ignore
1274
+ getMatcher(index) {
1275
+ if (this.multiRegexes[index]) return this.multiRegexes[index];
1276
+
1277
+ const matcher = new MultiRegex();
1278
+ this.rules.slice(index).forEach(([re, opts]) => matcher.addRule(re, opts));
1279
+ matcher.compile();
1280
+ this.multiRegexes[index] = matcher;
1281
+ return matcher;
1282
+ }
1283
+
1284
+ resumingScanAtSamePosition() {
1285
+ return this.regexIndex !== 0;
1286
+ }
1287
+
1288
+ considerAll() {
1289
+ this.regexIndex = 0;
1290
+ }
1291
+
1292
+ // @ts-ignore
1293
+ addRule(re, opts) {
1294
+ this.rules.push([re, opts]);
1295
+ if (opts.type === "begin") this.count++;
1296
+ }
1297
+
1298
+ /** @param {string} s */
1299
+ exec(s) {
1300
+ const m = this.getMatcher(this.regexIndex);
1301
+ m.lastIndex = this.lastIndex;
1302
+ let result = m.exec(s);
1303
+
1304
+ // The following is because we have no easy way to say "resume scanning at the
1305
+ // existing position but also skip the current rule ONLY". What happens is
1306
+ // all prior rules are also skipped which can result in matching the wrong
1307
+ // thing. Example of matching "booger":
1308
+
1309
+ // our matcher is [string, "booger", number]
1310
+ //
1311
+ // ....booger....
1312
+
1313
+ // if "booger" is ignored then we'd really need a regex to scan from the
1314
+ // SAME position for only: [string, number] but ignoring "booger" (if it
1315
+ // was the first match), a simple resume would scan ahead who knows how
1316
+ // far looking only for "number", ignoring potential string matches (or
1317
+ // future "booger" matches that might be valid.)
1318
+
1319
+ // So what we do: We execute two matchers, one resuming at the same
1320
+ // position, but the second full matcher starting at the position after:
1321
+
1322
+ // /--- resume first regex match here (for [number])
1323
+ // |/---- full match here for [string, "booger", number]
1324
+ // vv
1325
+ // ....booger....
1326
+
1327
+ // Which ever results in a match first is then used. So this 3-4 step
1328
+ // process essentially allows us to say "match at this position, excluding
1329
+ // a prior rule that was ignored".
1330
+ //
1331
+ // 1. Match "booger" first, ignore. Also proves that [string] does non match.
1332
+ // 2. Resume matching for [number]
1333
+ // 3. Match at index + 1 for [string, "booger", number]
1334
+ // 4. If #2 and #3 result in matches, which came first?
1335
+ if (this.resumingScanAtSamePosition()) {
1336
+ if (result && result.index === this.lastIndex) ; else { // use the second matcher result
1337
+ const m2 = this.getMatcher(0);
1338
+ m2.lastIndex = this.lastIndex + 1;
1339
+ result = m2.exec(s);
1340
+ }
1341
+ }
1342
+
1343
+ if (result) {
1344
+ this.regexIndex += result.position + 1;
1345
+ if (this.regexIndex === this.count) {
1346
+ // wrap-around to considering all matches again
1347
+ this.considerAll();
1348
+ }
1349
+ }
1350
+
1351
+ return result;
1352
+ }
1353
+ }
1354
+
1355
+ /**
1356
+ * Given a mode, builds a huge ResumableMultiRegex that can be used to walk
1357
+ * the content and find matches.
1358
+ *
1359
+ * @param {CompiledMode} mode
1360
+ * @returns {ResumableMultiRegex}
1361
+ */
1362
+ function buildModeRegex(mode) {
1363
+ const mm = new ResumableMultiRegex();
1364
+
1365
+ mode.contains.forEach(term => mm.addRule(term.begin, { rule: term, type: "begin" }));
1366
+
1367
+ if (mode.terminatorEnd) {
1368
+ mm.addRule(mode.terminatorEnd, { type: "end" });
1369
+ }
1370
+ if (mode.illegal) {
1371
+ mm.addRule(mode.illegal, { type: "illegal" });
1372
+ }
1373
+
1374
+ return mm;
1375
+ }
1376
+
1377
+ /** skip vs abort vs ignore
1378
+ *
1379
+ * @skip - The mode is still entered and exited normally (and contains rules apply),
1380
+ * but all content is held and added to the parent buffer rather than being
1381
+ * output when the mode ends. Mostly used with `sublanguage` to build up
1382
+ * a single large buffer than can be parsed by sublanguage.
1383
+ *
1384
+ * - The mode begin ands ends normally.
1385
+ * - Content matched is added to the parent mode buffer.
1386
+ * - The parser cursor is moved forward normally.
1387
+ *
1388
+ * @abort - A hack placeholder until we have ignore. Aborts the mode (as if it
1389
+ * never matched) but DOES NOT continue to match subsequent `contains`
1390
+ * modes. Abort is bad/suboptimal because it can result in modes
1391
+ * farther down not getting applied because an earlier rule eats the
1392
+ * content but then aborts.
1393
+ *
1394
+ * - The mode does not begin.
1395
+ * - Content matched by `begin` is added to the mode buffer.
1396
+ * - The parser cursor is moved forward accordingly.
1397
+ *
1398
+ * @ignore - Ignores the mode (as if it never matched) and continues to match any
1399
+ * subsequent `contains` modes. Ignore isn't technically possible with
1400
+ * the current parser implementation.
1401
+ *
1402
+ * - The mode does not begin.
1403
+ * - Content matched by `begin` is ignored.
1404
+ * - The parser cursor is not moved forward.
1405
+ */
1406
+
1407
+ /**
1408
+ * Compiles an individual mode
1409
+ *
1410
+ * This can raise an error if the mode contains certain detectable known logic
1411
+ * issues.
1412
+ * @param {Mode} mode
1413
+ * @param {CompiledMode | null} [parent]
1414
+ * @returns {CompiledMode | never}
1415
+ */
1416
+ function compileMode(mode, parent) {
1417
+ const cmode = /** @type CompiledMode */ (mode);
1418
+ if (mode.isCompiled) return cmode;
1419
+
1420
+ [
1421
+ scopeClassName,
1422
+ // do this early so compiler extensions generally don't have to worry about
1423
+ // the distinction between match/begin
1424
+ compileMatch,
1425
+ MultiClass,
1426
+ beforeMatchExt
1427
+ ].forEach(ext => ext(mode, parent));
1428
+
1429
+ language.compilerExtensions.forEach(ext => ext(mode, parent));
1430
+
1431
+ // __beforeBegin is considered private API, internal use only
1432
+ mode.__beforeBegin = null;
1433
+
1434
+ [
1435
+ beginKeywords,
1436
+ // do this later so compiler extensions that come earlier have access to the
1437
+ // raw array if they wanted to perhaps manipulate it, etc.
1438
+ compileIllegal,
1439
+ // default to 1 relevance if not specified
1440
+ compileRelevance
1441
+ ].forEach(ext => ext(mode, parent));
1442
+
1443
+ mode.isCompiled = true;
1444
+
1445
+ let keywordPattern = null;
1446
+ if (typeof mode.keywords === "object" && mode.keywords.$pattern) {
1447
+ // we need a copy because keywords might be compiled multiple times
1448
+ // so we can't go deleting $pattern from the original on the first
1449
+ // pass
1450
+ mode.keywords = Object.assign({}, mode.keywords);
1451
+ keywordPattern = mode.keywords.$pattern;
1452
+ delete mode.keywords.$pattern;
1453
+ }
1454
+ keywordPattern = keywordPattern || /\w+/;
1455
+
1456
+ if (mode.keywords) {
1457
+ mode.keywords = compileKeywords(mode.keywords, language.case_insensitive);
1458
+ }
1459
+
1460
+ cmode.keywordPatternRe = langRe(keywordPattern, true);
1461
+
1462
+ if (parent) {
1463
+ if (!mode.begin) mode.begin = /\B|\b/;
1464
+ cmode.beginRe = langRe(cmode.begin);
1465
+ if (!mode.end && !mode.endsWithParent) mode.end = /\B|\b/;
1466
+ if (mode.end) cmode.endRe = langRe(cmode.end);
1467
+ cmode.terminatorEnd = source(cmode.end) || '';
1468
+ if (mode.endsWithParent && parent.terminatorEnd) {
1469
+ cmode.terminatorEnd += (mode.end ? '|' : '') + parent.terminatorEnd;
1470
+ }
1471
+ }
1472
+ if (mode.illegal) cmode.illegalRe = langRe(/** @type {RegExp | string} */ (mode.illegal));
1473
+ if (!mode.contains) mode.contains = [];
1474
+
1475
+ mode.contains = [].concat(...mode.contains.map(function(c) {
1476
+ return expandOrCloneMode(c === 'self' ? mode : c);
1477
+ }));
1478
+ mode.contains.forEach(function(c) { compileMode(/** @type Mode */ (c), cmode); });
1479
+
1480
+ if (mode.starts) {
1481
+ compileMode(mode.starts, parent);
1482
+ }
1483
+
1484
+ cmode.matcher = buildModeRegex(cmode);
1485
+ return cmode;
1486
+ }
1487
+
1488
+ if (!language.compilerExtensions) language.compilerExtensions = [];
1489
+
1490
+ // self is not valid at the top-level
1491
+ if (language.contains && language.contains.includes('self')) {
1492
+ throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");
1493
+ }
1494
+
1495
+ // we need a null object, which inherit will guarantee
1496
+ language.classNameAliases = inherit$1(language.classNameAliases || {});
1497
+
1498
+ return compileMode(/** @type Mode */ (language));
1499
+ }
1500
+
1501
+ /**
1502
+ * Determines if a mode has a dependency on it's parent or not
1503
+ *
1504
+ * If a mode does have a parent dependency then often we need to clone it if
1505
+ * it's used in multiple places so that each copy points to the correct parent,
1506
+ * where-as modes without a parent can often safely be re-used at the bottom of
1507
+ * a mode chain.
1508
+ *
1509
+ * @param {Mode | null} mode
1510
+ * @returns {boolean} - is there a dependency on the parent?
1511
+ * */
1512
+ function dependencyOnParent(mode) {
1513
+ if (!mode) return false;
1514
+
1515
+ return mode.endsWithParent || dependencyOnParent(mode.starts);
1516
+ }
1517
+
1518
+ /**
1519
+ * Expands a mode or clones it if necessary
1520
+ *
1521
+ * This is necessary for modes with parental dependenceis (see notes on
1522
+ * `dependencyOnParent`) and for nodes that have `variants` - which must then be
1523
+ * exploded into their own individual modes at compile time.
1524
+ *
1525
+ * @param {Mode} mode
1526
+ * @returns {Mode | Mode[]}
1527
+ * */
1528
+ function expandOrCloneMode(mode) {
1529
+ if (mode.variants && !mode.cachedVariants) {
1530
+ mode.cachedVariants = mode.variants.map(function(variant) {
1531
+ return inherit$1(mode, { variants: null }, variant);
1532
+ });
1533
+ }
1534
+
1535
+ // EXPAND
1536
+ // if we have variants then essentially "replace" the mode with the variants
1537
+ // this happens in compileMode, where this function is called from
1538
+ if (mode.cachedVariants) {
1539
+ return mode.cachedVariants;
1540
+ }
1541
+
1542
+ // CLONE
1543
+ // if we have dependencies on parents then we need a unique
1544
+ // instance of ourselves, so we can be reused with many
1545
+ // different parents without issue
1546
+ if (dependencyOnParent(mode)) {
1547
+ return inherit$1(mode, { starts: mode.starts ? inherit$1(mode.starts) : null });
1548
+ }
1549
+
1550
+ if (Object.isFrozen(mode)) {
1551
+ return inherit$1(mode);
1552
+ }
1553
+
1554
+ // no special dependency issues, just return ourselves
1555
+ return mode;
1556
+ }
1557
+
1558
+ var version = "11.10.0";
1559
+
1560
+ class HTMLInjectionError extends Error {
1561
+ constructor(reason, html) {
1562
+ super(reason);
1563
+ this.name = "HTMLInjectionError";
1564
+ this.html = html;
1565
+ }
1566
+ }
1567
+
1568
+ /*
1569
+ Syntax highlighting with language autodetection.
1570
+ https://highlightjs.org/
1571
+ */
1572
+
1573
+
1574
+
1575
+ /**
1576
+ @typedef {import('highlight.js').Mode} Mode
1577
+ @typedef {import('highlight.js').CompiledMode} CompiledMode
1578
+ @typedef {import('highlight.js').CompiledScope} CompiledScope
1579
+ @typedef {import('highlight.js').Language} Language
1580
+ @typedef {import('highlight.js').HLJSApi} HLJSApi
1581
+ @typedef {import('highlight.js').HLJSPlugin} HLJSPlugin
1582
+ @typedef {import('highlight.js').PluginEvent} PluginEvent
1583
+ @typedef {import('highlight.js').HLJSOptions} HLJSOptions
1584
+ @typedef {import('highlight.js').LanguageFn} LanguageFn
1585
+ @typedef {import('highlight.js').HighlightedHTMLElement} HighlightedHTMLElement
1586
+ @typedef {import('highlight.js').BeforeHighlightContext} BeforeHighlightContext
1587
+ @typedef {import('highlight.js/private').MatchType} MatchType
1588
+ @typedef {import('highlight.js/private').KeywordData} KeywordData
1589
+ @typedef {import('highlight.js/private').EnhancedMatch} EnhancedMatch
1590
+ @typedef {import('highlight.js/private').AnnotatedError} AnnotatedError
1591
+ @typedef {import('highlight.js').AutoHighlightResult} AutoHighlightResult
1592
+ @typedef {import('highlight.js').HighlightOptions} HighlightOptions
1593
+ @typedef {import('highlight.js').HighlightResult} HighlightResult
1594
+ */
1595
+
1596
+
1597
+ const escape = escapeHTML;
1598
+ const inherit = inherit$1;
1599
+ const NO_MATCH = Symbol("nomatch");
1600
+ const MAX_KEYWORD_HITS = 7;
1601
+
1602
+ /**
1603
+ * @param {any} hljs - object that is extended (legacy)
1604
+ * @returns {HLJSApi}
1605
+ */
1606
+ const HLJS = function(hljs) {
1607
+ // Global internal variables used within the highlight.js library.
1608
+ /** @type {Record<string, Language>} */
1609
+ const languages = Object.create(null);
1610
+ /** @type {Record<string, string>} */
1611
+ const aliases = Object.create(null);
1612
+ /** @type {HLJSPlugin[]} */
1613
+ const plugins = [];
1614
+
1615
+ // safe/production mode - swallows more errors, tries to keep running
1616
+ // even if a single syntax or parse hits a fatal error
1617
+ let SAFE_MODE = true;
1618
+ const LANGUAGE_NOT_FOUND = "Could not find the language '{}', did you forget to load/include a language module?";
1619
+ /** @type {Language} */
1620
+ const PLAINTEXT_LANGUAGE = { disableAutodetect: true, name: 'Plain text', contains: [] };
1621
+
1622
+ // Global options used when within external APIs. This is modified when
1623
+ // calling the `hljs.configure` function.
1624
+ /** @type HLJSOptions */
1625
+ let options = {
1626
+ ignoreUnescapedHTML: false,
1627
+ throwUnescapedHTML: false,
1628
+ noHighlightRe: /^(no-?highlight)$/i,
1629
+ languageDetectRe: /\blang(?:uage)?-([\w-]+)\b/i,
1630
+ classPrefix: 'hljs-',
1631
+ cssSelector: 'pre code',
1632
+ languages: null,
1633
+ // beta configuration options, subject to change, welcome to discuss
1634
+ // https://github.com/highlightjs/highlight.js/issues/1086
1635
+ __emitter: TokenTreeEmitter
1636
+ };
1637
+
1638
+ /* Utility functions */
1639
+
1640
+ /**
1641
+ * Tests a language name to see if highlighting should be skipped
1642
+ * @param {string} languageName
1643
+ */
1644
+ function shouldNotHighlight(languageName) {
1645
+ return options.noHighlightRe.test(languageName);
1646
+ }
1647
+
1648
+ /**
1649
+ * @param {HighlightedHTMLElement} block - the HTML element to determine language for
1650
+ */
1651
+ function blockLanguage(block) {
1652
+ let classes = block.className + ' ';
1653
+
1654
+ classes += block.parentNode ? block.parentNode.className : '';
1655
+
1656
+ // language-* takes precedence over non-prefixed class names.
1657
+ const match = options.languageDetectRe.exec(classes);
1658
+ if (match) {
1659
+ const language = getLanguage(match[1]);
1660
+ if (!language) {
1661
+ warn(LANGUAGE_NOT_FOUND.replace("{}", match[1]));
1662
+ warn("Falling back to no-highlight mode for this block.", block);
1663
+ }
1664
+ return language ? match[1] : 'no-highlight';
1665
+ }
1666
+
1667
+ return classes
1668
+ .split(/\s+/)
1669
+ .find((_class) => shouldNotHighlight(_class) || getLanguage(_class));
1670
+ }
1671
+
1672
+ /**
1673
+ * Core highlighting function.
1674
+ *
1675
+ * OLD API
1676
+ * highlight(lang, code, ignoreIllegals, continuation)
1677
+ *
1678
+ * NEW API
1679
+ * highlight(code, {lang, ignoreIllegals})
1680
+ *
1681
+ * @param {string} codeOrLanguageName - the language to use for highlighting
1682
+ * @param {string | HighlightOptions} optionsOrCode - the code to highlight
1683
+ * @param {boolean} [ignoreIllegals] - whether to ignore illegal matches, default is to bail
1684
+ *
1685
+ * @returns {HighlightResult} Result - an object that represents the result
1686
+ * @property {string} language - the language name
1687
+ * @property {number} relevance - the relevance score
1688
+ * @property {string} value - the highlighted HTML code
1689
+ * @property {string} code - the original raw code
1690
+ * @property {CompiledMode} top - top of the current mode stack
1691
+ * @property {boolean} illegal - indicates whether any illegal matches were found
1692
+ */
1693
+ function highlight(codeOrLanguageName, optionsOrCode, ignoreIllegals) {
1694
+ let code = "";
1695
+ let languageName = "";
1696
+ if (typeof optionsOrCode === "object") {
1697
+ code = codeOrLanguageName;
1698
+ ignoreIllegals = optionsOrCode.ignoreIllegals;
1699
+ languageName = optionsOrCode.language;
1700
+ } else {
1701
+ // old API
1702
+ deprecated("10.7.0", "highlight(lang, code, ...args) has been deprecated.");
1703
+ deprecated("10.7.0", "Please use highlight(code, options) instead.\nhttps://github.com/highlightjs/highlight.js/issues/2277");
1704
+ languageName = codeOrLanguageName;
1705
+ code = optionsOrCode;
1706
+ }
1707
+
1708
+ // https://github.com/highlightjs/highlight.js/issues/3149
1709
+ // eslint-disable-next-line no-undefined
1710
+ if (ignoreIllegals === undefined) { ignoreIllegals = true; }
1711
+
1712
+ /** @type {BeforeHighlightContext} */
1713
+ const context = {
1714
+ code,
1715
+ language: languageName
1716
+ };
1717
+ // the plugin can change the desired language or the code to be highlighted
1718
+ // just be changing the object it was passed
1719
+ fire("before:highlight", context);
1720
+
1721
+ // a before plugin can usurp the result completely by providing it's own
1722
+ // in which case we don't even need to call highlight
1723
+ const result = context.result
1724
+ ? context.result
1725
+ : _highlight(context.language, context.code, ignoreIllegals);
1726
+
1727
+ result.code = context.code;
1728
+ // the plugin can change anything in result to suite it
1729
+ fire("after:highlight", result);
1730
+
1731
+ return result;
1732
+ }
1733
+
1734
+ /**
1735
+ * private highlight that's used internally and does not fire callbacks
1736
+ *
1737
+ * @param {string} languageName - the language to use for highlighting
1738
+ * @param {string} codeToHighlight - the code to highlight
1739
+ * @param {boolean?} [ignoreIllegals] - whether to ignore illegal matches, default is to bail
1740
+ * @param {CompiledMode?} [continuation] - current continuation mode, if any
1741
+ * @returns {HighlightResult} - result of the highlight operation
1742
+ */
1743
+ function _highlight(languageName, codeToHighlight, ignoreIllegals, continuation) {
1744
+ const keywordHits = Object.create(null);
1745
+
1746
+ /**
1747
+ * Return keyword data if a match is a keyword
1748
+ * @param {CompiledMode} mode - current mode
1749
+ * @param {string} matchText - the textual match
1750
+ * @returns {KeywordData | false}
1751
+ */
1752
+ function keywordData(mode, matchText) {
1753
+ return mode.keywords[matchText];
1754
+ }
1755
+
1756
+ function processKeywords() {
1757
+ if (!top.keywords) {
1758
+ emitter.addText(modeBuffer);
1759
+ return;
1760
+ }
1761
+
1762
+ let lastIndex = 0;
1763
+ top.keywordPatternRe.lastIndex = 0;
1764
+ let match = top.keywordPatternRe.exec(modeBuffer);
1765
+ let buf = "";
1766
+
1767
+ while (match) {
1768
+ buf += modeBuffer.substring(lastIndex, match.index);
1769
+ const word = language.case_insensitive ? match[0].toLowerCase() : match[0];
1770
+ const data = keywordData(top, word);
1771
+ if (data) {
1772
+ const [kind, keywordRelevance] = data;
1773
+ emitter.addText(buf);
1774
+ buf = "";
1775
+
1776
+ keywordHits[word] = (keywordHits[word] || 0) + 1;
1777
+ if (keywordHits[word] <= MAX_KEYWORD_HITS) relevance += keywordRelevance;
1778
+ if (kind.startsWith("_")) {
1779
+ // _ implied for relevance only, do not highlight
1780
+ // by applying a class name
1781
+ buf += match[0];
1782
+ } else {
1783
+ const cssClass = language.classNameAliases[kind] || kind;
1784
+ emitKeyword(match[0], cssClass);
1785
+ }
1786
+ } else {
1787
+ buf += match[0];
1788
+ }
1789
+ lastIndex = top.keywordPatternRe.lastIndex;
1790
+ match = top.keywordPatternRe.exec(modeBuffer);
1791
+ }
1792
+ buf += modeBuffer.substring(lastIndex);
1793
+ emitter.addText(buf);
1794
+ }
1795
+
1796
+ function processSubLanguage() {
1797
+ if (modeBuffer === "") return;
1798
+ /** @type HighlightResult */
1799
+ let result = null;
1800
+
1801
+ if (typeof top.subLanguage === 'string') {
1802
+ if (!languages[top.subLanguage]) {
1803
+ emitter.addText(modeBuffer);
1804
+ return;
1805
+ }
1806
+ result = _highlight(top.subLanguage, modeBuffer, true, continuations[top.subLanguage]);
1807
+ continuations[top.subLanguage] = /** @type {CompiledMode} */ (result._top);
1808
+ } else {
1809
+ result = highlightAuto(modeBuffer, top.subLanguage.length ? top.subLanguage : null);
1810
+ }
1811
+
1812
+ // Counting embedded language score towards the host language may be disabled
1813
+ // with zeroing the containing mode relevance. Use case in point is Markdown that
1814
+ // allows XML everywhere and makes every XML snippet to have a much larger Markdown
1815
+ // score.
1816
+ if (top.relevance > 0) {
1817
+ relevance += result.relevance;
1818
+ }
1819
+ emitter.__addSublanguage(result._emitter, result.language);
1820
+ }
1821
+
1822
+ function processBuffer() {
1823
+ if (top.subLanguage != null) {
1824
+ processSubLanguage();
1825
+ } else {
1826
+ processKeywords();
1827
+ }
1828
+ modeBuffer = '';
1829
+ }
1830
+
1831
+ /**
1832
+ * @param {string} text
1833
+ * @param {string} scope
1834
+ */
1835
+ function emitKeyword(keyword, scope) {
1836
+ if (keyword === "") return;
1837
+
1838
+ emitter.startScope(scope);
1839
+ emitter.addText(keyword);
1840
+ emitter.endScope();
1841
+ }
1842
+
1843
+ /**
1844
+ * @param {CompiledScope} scope
1845
+ * @param {RegExpMatchArray} match
1846
+ */
1847
+ function emitMultiClass(scope, match) {
1848
+ let i = 1;
1849
+ const max = match.length - 1;
1850
+ while (i <= max) {
1851
+ if (!scope._emit[i]) { i++; continue; }
1852
+ const klass = language.classNameAliases[scope[i]] || scope[i];
1853
+ const text = match[i];
1854
+ if (klass) {
1855
+ emitKeyword(text, klass);
1856
+ } else {
1857
+ modeBuffer = text;
1858
+ processKeywords();
1859
+ modeBuffer = "";
1860
+ }
1861
+ i++;
1862
+ }
1863
+ }
1864
+
1865
+ /**
1866
+ * @param {CompiledMode} mode - new mode to start
1867
+ * @param {RegExpMatchArray} match
1868
+ */
1869
+ function startNewMode(mode, match) {
1870
+ if (mode.scope && typeof mode.scope === "string") {
1871
+ emitter.openNode(language.classNameAliases[mode.scope] || mode.scope);
1872
+ }
1873
+ if (mode.beginScope) {
1874
+ // beginScope just wraps the begin match itself in a scope
1875
+ if (mode.beginScope._wrap) {
1876
+ emitKeyword(modeBuffer, language.classNameAliases[mode.beginScope._wrap] || mode.beginScope._wrap);
1877
+ modeBuffer = "";
1878
+ } else if (mode.beginScope._multi) {
1879
+ // at this point modeBuffer should just be the match
1880
+ emitMultiClass(mode.beginScope, match);
1881
+ modeBuffer = "";
1882
+ }
1883
+ }
1884
+
1885
+ top = Object.create(mode, { parent: { value: top } });
1886
+ return top;
1887
+ }
1888
+
1889
+ /**
1890
+ * @param {CompiledMode } mode - the mode to potentially end
1891
+ * @param {RegExpMatchArray} match - the latest match
1892
+ * @param {string} matchPlusRemainder - match plus remainder of content
1893
+ * @returns {CompiledMode | void} - the next mode, or if void continue on in current mode
1894
+ */
1895
+ function endOfMode(mode, match, matchPlusRemainder) {
1896
+ let matched = startsWith(mode.endRe, matchPlusRemainder);
1897
+
1898
+ if (matched) {
1899
+ if (mode["on:end"]) {
1900
+ const resp = new Response(mode);
1901
+ mode["on:end"](match, resp);
1902
+ if (resp.isMatchIgnored) matched = false;
1903
+ }
1904
+
1905
+ if (matched) {
1906
+ while (mode.endsParent && mode.parent) {
1907
+ mode = mode.parent;
1908
+ }
1909
+ return mode;
1910
+ }
1911
+ }
1912
+ // even if on:end fires an `ignore` it's still possible
1913
+ // that we might trigger the end node because of a parent mode
1914
+ if (mode.endsWithParent) {
1915
+ return endOfMode(mode.parent, match, matchPlusRemainder);
1916
+ }
1917
+ }
1918
+
1919
+ /**
1920
+ * Handle matching but then ignoring a sequence of text
1921
+ *
1922
+ * @param {string} lexeme - string containing full match text
1923
+ */
1924
+ function doIgnore(lexeme) {
1925
+ if (top.matcher.regexIndex === 0) {
1926
+ // no more regexes to potentially match here, so we move the cursor forward one
1927
+ // space
1928
+ modeBuffer += lexeme[0];
1929
+ return 1;
1930
+ } else {
1931
+ // no need to move the cursor, we still have additional regexes to try and
1932
+ // match at this very spot
1933
+ resumeScanAtSamePosition = true;
1934
+ return 0;
1935
+ }
1936
+ }
1937
+
1938
+ /**
1939
+ * Handle the start of a new potential mode match
1940
+ *
1941
+ * @param {EnhancedMatch} match - the current match
1942
+ * @returns {number} how far to advance the parse cursor
1943
+ */
1944
+ function doBeginMatch(match) {
1945
+ const lexeme = match[0];
1946
+ const newMode = match.rule;
1947
+
1948
+ const resp = new Response(newMode);
1949
+ // first internal before callbacks, then the public ones
1950
+ const beforeCallbacks = [newMode.__beforeBegin, newMode["on:begin"]];
1951
+ for (const cb of beforeCallbacks) {
1952
+ if (!cb) continue;
1953
+ cb(match, resp);
1954
+ if (resp.isMatchIgnored) return doIgnore(lexeme);
1955
+ }
1956
+
1957
+ if (newMode.skip) {
1958
+ modeBuffer += lexeme;
1959
+ } else {
1960
+ if (newMode.excludeBegin) {
1961
+ modeBuffer += lexeme;
1962
+ }
1963
+ processBuffer();
1964
+ if (!newMode.returnBegin && !newMode.excludeBegin) {
1965
+ modeBuffer = lexeme;
1966
+ }
1967
+ }
1968
+ startNewMode(newMode, match);
1969
+ return newMode.returnBegin ? 0 : lexeme.length;
1970
+ }
1971
+
1972
+ /**
1973
+ * Handle the potential end of mode
1974
+ *
1975
+ * @param {RegExpMatchArray} match - the current match
1976
+ */
1977
+ function doEndMatch(match) {
1978
+ const lexeme = match[0];
1979
+ const matchPlusRemainder = codeToHighlight.substring(match.index);
1980
+
1981
+ const endMode = endOfMode(top, match, matchPlusRemainder);
1982
+ if (!endMode) { return NO_MATCH; }
1983
+
1984
+ const origin = top;
1985
+ if (top.endScope && top.endScope._wrap) {
1986
+ processBuffer();
1987
+ emitKeyword(lexeme, top.endScope._wrap);
1988
+ } else if (top.endScope && top.endScope._multi) {
1989
+ processBuffer();
1990
+ emitMultiClass(top.endScope, match);
1991
+ } else if (origin.skip) {
1992
+ modeBuffer += lexeme;
1993
+ } else {
1994
+ if (!(origin.returnEnd || origin.excludeEnd)) {
1995
+ modeBuffer += lexeme;
1996
+ }
1997
+ processBuffer();
1998
+ if (origin.excludeEnd) {
1999
+ modeBuffer = lexeme;
2000
+ }
2001
+ }
2002
+ do {
2003
+ if (top.scope) {
2004
+ emitter.closeNode();
2005
+ }
2006
+ if (!top.skip && !top.subLanguage) {
2007
+ relevance += top.relevance;
2008
+ }
2009
+ top = top.parent;
2010
+ } while (top !== endMode.parent);
2011
+ if (endMode.starts) {
2012
+ startNewMode(endMode.starts, match);
2013
+ }
2014
+ return origin.returnEnd ? 0 : lexeme.length;
2015
+ }
2016
+
2017
+ function processContinuations() {
2018
+ const list = [];
2019
+ for (let current = top; current !== language; current = current.parent) {
2020
+ if (current.scope) {
2021
+ list.unshift(current.scope);
2022
+ }
2023
+ }
2024
+ list.forEach(item => emitter.openNode(item));
2025
+ }
2026
+
2027
+ /** @type {{type?: MatchType, index?: number, rule?: Mode}}} */
2028
+ let lastMatch = {};
2029
+
2030
+ /**
2031
+ * Process an individual match
2032
+ *
2033
+ * @param {string} textBeforeMatch - text preceding the match (since the last match)
2034
+ * @param {EnhancedMatch} [match] - the match itself
2035
+ */
2036
+ function processLexeme(textBeforeMatch, match) {
2037
+ const lexeme = match && match[0];
2038
+
2039
+ // add non-matched text to the current mode buffer
2040
+ modeBuffer += textBeforeMatch;
2041
+
2042
+ if (lexeme == null) {
2043
+ processBuffer();
2044
+ return 0;
2045
+ }
2046
+
2047
+ // we've found a 0 width match and we're stuck, so we need to advance
2048
+ // this happens when we have badly behaved rules that have optional matchers to the degree that
2049
+ // sometimes they can end up matching nothing at all
2050
+ // Ref: https://github.com/highlightjs/highlight.js/issues/2140
2051
+ if (lastMatch.type === "begin" && match.type === "end" && lastMatch.index === match.index && lexeme === "") {
2052
+ // spit the "skipped" character that our regex choked on back into the output sequence
2053
+ modeBuffer += codeToHighlight.slice(match.index, match.index + 1);
2054
+ if (!SAFE_MODE) {
2055
+ /** @type {AnnotatedError} */
2056
+ const err = new Error(`0 width match regex (${languageName})`);
2057
+ err.languageName = languageName;
2058
+ err.badRule = lastMatch.rule;
2059
+ throw err;
2060
+ }
2061
+ return 1;
2062
+ }
2063
+ lastMatch = match;
2064
+
2065
+ if (match.type === "begin") {
2066
+ return doBeginMatch(match);
2067
+ } else if (match.type === "illegal" && !ignoreIllegals) {
2068
+ // illegal match, we do not continue processing
2069
+ /** @type {AnnotatedError} */
2070
+ const err = new Error('Illegal lexeme "' + lexeme + '" for mode "' + (top.scope || '<unnamed>') + '"');
2071
+ err.mode = top;
2072
+ throw err;
2073
+ } else if (match.type === "end") {
2074
+ const processed = doEndMatch(match);
2075
+ if (processed !== NO_MATCH) {
2076
+ return processed;
2077
+ }
2078
+ }
2079
+
2080
+ // edge case for when illegal matches $ (end of line) which is technically
2081
+ // a 0 width match but not a begin/end match so it's not caught by the
2082
+ // first handler (when ignoreIllegals is true)
2083
+ if (match.type === "illegal" && lexeme === "") {
2084
+ // advance so we aren't stuck in an infinite loop
2085
+ return 1;
2086
+ }
2087
+
2088
+ // infinite loops are BAD, this is a last ditch catch all. if we have a
2089
+ // decent number of iterations yet our index (cursor position in our
2090
+ // parsing) still 3x behind our index then something is very wrong
2091
+ // so we bail
2092
+ if (iterations > 100000 && iterations > match.index * 3) {
2093
+ const err = new Error('potential infinite loop, way more iterations than matches');
2094
+ throw err;
2095
+ }
2096
+
2097
+ /*
2098
+ Why might be find ourselves here? An potential end match that was
2099
+ triggered but could not be completed. IE, `doEndMatch` returned NO_MATCH.
2100
+ (this could be because a callback requests the match be ignored, etc)
2101
+
2102
+ This causes no real harm other than stopping a few times too many.
2103
+ */
2104
+
2105
+ modeBuffer += lexeme;
2106
+ return lexeme.length;
2107
+ }
2108
+
2109
+ const language = getLanguage(languageName);
2110
+ if (!language) {
2111
+ error(LANGUAGE_NOT_FOUND.replace("{}", languageName));
2112
+ throw new Error('Unknown language: "' + languageName + '"');
2113
+ }
2114
+
2115
+ const md = compileLanguage(language);
2116
+ let result = '';
2117
+ /** @type {CompiledMode} */
2118
+ let top = continuation || md;
2119
+ /** @type Record<string,CompiledMode> */
2120
+ const continuations = {}; // keep continuations for sub-languages
2121
+ const emitter = new options.__emitter(options);
2122
+ processContinuations();
2123
+ let modeBuffer = '';
2124
+ let relevance = 0;
2125
+ let index = 0;
2126
+ let iterations = 0;
2127
+ let resumeScanAtSamePosition = false;
2128
+
2129
+ try {
2130
+ if (!language.__emitTokens) {
2131
+ top.matcher.considerAll();
2132
+
2133
+ for (;;) {
2134
+ iterations++;
2135
+ if (resumeScanAtSamePosition) {
2136
+ // only regexes not matched previously will now be
2137
+ // considered for a potential match
2138
+ resumeScanAtSamePosition = false;
2139
+ } else {
2140
+ top.matcher.considerAll();
2141
+ }
2142
+ top.matcher.lastIndex = index;
2143
+
2144
+ const match = top.matcher.exec(codeToHighlight);
2145
+ // console.log("match", match[0], match.rule && match.rule.begin)
2146
+
2147
+ if (!match) break;
2148
+
2149
+ const beforeMatch = codeToHighlight.substring(index, match.index);
2150
+ const processedCount = processLexeme(beforeMatch, match);
2151
+ index = match.index + processedCount;
2152
+ }
2153
+ processLexeme(codeToHighlight.substring(index));
2154
+ } else {
2155
+ language.__emitTokens(codeToHighlight, emitter);
2156
+ }
2157
+
2158
+ emitter.finalize();
2159
+ result = emitter.toHTML();
2160
+
2161
+ return {
2162
+ language: languageName,
2163
+ value: result,
2164
+ relevance,
2165
+ illegal: false,
2166
+ _emitter: emitter,
2167
+ _top: top
2168
+ };
2169
+ } catch (err) {
2170
+ if (err.message && err.message.includes('Illegal')) {
2171
+ return {
2172
+ language: languageName,
2173
+ value: escape(codeToHighlight),
2174
+ illegal: true,
2175
+ relevance: 0,
2176
+ _illegalBy: {
2177
+ message: err.message,
2178
+ index,
2179
+ context: codeToHighlight.slice(index - 100, index + 100),
2180
+ mode: err.mode,
2181
+ resultSoFar: result
2182
+ },
2183
+ _emitter: emitter
2184
+ };
2185
+ } else if (SAFE_MODE) {
2186
+ return {
2187
+ language: languageName,
2188
+ value: escape(codeToHighlight),
2189
+ illegal: false,
2190
+ relevance: 0,
2191
+ errorRaised: err,
2192
+ _emitter: emitter,
2193
+ _top: top
2194
+ };
2195
+ } else {
2196
+ throw err;
2197
+ }
2198
+ }
2199
+ }
2200
+
2201
+ /**
2202
+ * returns a valid highlight result, without actually doing any actual work,
2203
+ * auto highlight starts with this and it's possible for small snippets that
2204
+ * auto-detection may not find a better match
2205
+ * @param {string} code
2206
+ * @returns {HighlightResult}
2207
+ */
2208
+ function justTextHighlightResult(code) {
2209
+ const result = {
2210
+ value: escape(code),
2211
+ illegal: false,
2212
+ relevance: 0,
2213
+ _top: PLAINTEXT_LANGUAGE,
2214
+ _emitter: new options.__emitter(options)
2215
+ };
2216
+ result._emitter.addText(code);
2217
+ return result;
2218
+ }
2219
+
2220
+ /**
2221
+ Highlighting with language detection. Accepts a string with the code to
2222
+ highlight. Returns an object with the following properties:
2223
+
2224
+ - language (detected language)
2225
+ - relevance (int)
2226
+ - value (an HTML string with highlighting markup)
2227
+ - secondBest (object with the same structure for second-best heuristically
2228
+ detected language, may be absent)
2229
+
2230
+ @param {string} code
2231
+ @param {Array<string>} [languageSubset]
2232
+ @returns {AutoHighlightResult}
2233
+ */
2234
+ function highlightAuto(code, languageSubset) {
2235
+ languageSubset = languageSubset || options.languages || Object.keys(languages);
2236
+ const plaintext = justTextHighlightResult(code);
2237
+
2238
+ const results = languageSubset.filter(getLanguage).filter(autoDetection).map(name =>
2239
+ _highlight(name, code, false)
2240
+ );
2241
+ results.unshift(plaintext); // plaintext is always an option
2242
+
2243
+ const sorted = results.sort((a, b) => {
2244
+ // sort base on relevance
2245
+ if (a.relevance !== b.relevance) return b.relevance - a.relevance;
2246
+
2247
+ // always award the tie to the base language
2248
+ // ie if C++ and Arduino are tied, it's more likely to be C++
2249
+ if (a.language && b.language) {
2250
+ if (getLanguage(a.language).supersetOf === b.language) {
2251
+ return 1;
2252
+ } else if (getLanguage(b.language).supersetOf === a.language) {
2253
+ return -1;
2254
+ }
2255
+ }
2256
+
2257
+ // otherwise say they are equal, which has the effect of sorting on
2258
+ // relevance while preserving the original ordering - which is how ties
2259
+ // have historically been settled, ie the language that comes first always
2260
+ // wins in the case of a tie
2261
+ return 0;
2262
+ });
2263
+
2264
+ const [best, secondBest] = sorted;
2265
+
2266
+ /** @type {AutoHighlightResult} */
2267
+ const result = best;
2268
+ result.secondBest = secondBest;
2269
+
2270
+ return result;
2271
+ }
2272
+
2273
+ /**
2274
+ * Builds new class name for block given the language name
2275
+ *
2276
+ * @param {HTMLElement} element
2277
+ * @param {string} [currentLang]
2278
+ * @param {string} [resultLang]
2279
+ */
2280
+ function updateClassName(element, currentLang, resultLang) {
2281
+ const language = (currentLang && aliases[currentLang]) || resultLang;
2282
+
2283
+ element.classList.add("hljs");
2284
+ element.classList.add(`language-${language}`);
2285
+ }
2286
+
2287
+ /**
2288
+ * Applies highlighting to a DOM node containing code.
2289
+ *
2290
+ * @param {HighlightedHTMLElement} element - the HTML element to highlight
2291
+ */
2292
+ function highlightElement(element) {
2293
+ /** @type HTMLElement */
2294
+ let node = null;
2295
+ const language = blockLanguage(element);
2296
+
2297
+ if (shouldNotHighlight(language)) return;
2298
+
2299
+ fire("before:highlightElement",
2300
+ { el: element, language });
2301
+
2302
+ if (element.dataset.highlighted) {
2303
+ console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.", element);
2304
+ return;
2305
+ }
2306
+
2307
+ // we should be all text, no child nodes (unescaped HTML) - this is possibly
2308
+ // an HTML injection attack - it's likely too late if this is already in
2309
+ // production (the code has likely already done its damage by the time
2310
+ // we're seeing it)... but we yell loudly about this so that hopefully it's
2311
+ // more likely to be caught in development before making it to production
2312
+ if (element.children.length > 0) {
2313
+ if (!options.ignoreUnescapedHTML) {
2314
+ console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk.");
2315
+ console.warn("https://github.com/highlightjs/highlight.js/wiki/security");
2316
+ console.warn("The element with unescaped HTML:");
2317
+ console.warn(element);
2318
+ }
2319
+ if (options.throwUnescapedHTML) {
2320
+ const err = new HTMLInjectionError(
2321
+ "One of your code blocks includes unescaped HTML.",
2322
+ element.innerHTML
2323
+ );
2324
+ throw err;
2325
+ }
2326
+ }
2327
+
2328
+ node = element;
2329
+ const text = node.textContent;
2330
+ const result = language ? highlight(text, { language, ignoreIllegals: true }) : highlightAuto(text);
2331
+
2332
+ element.innerHTML = result.value;
2333
+ element.dataset.highlighted = "yes";
2334
+ updateClassName(element, language, result.language);
2335
+ element.result = {
2336
+ language: result.language,
2337
+ // TODO: remove with version 11.0
2338
+ re: result.relevance,
2339
+ relevance: result.relevance
2340
+ };
2341
+ if (result.secondBest) {
2342
+ element.secondBest = {
2343
+ language: result.secondBest.language,
2344
+ relevance: result.secondBest.relevance
2345
+ };
2346
+ }
2347
+
2348
+ fire("after:highlightElement", { el: element, result, text });
2349
+ }
2350
+
2351
+ /**
2352
+ * Updates highlight.js global options with the passed options
2353
+ *
2354
+ * @param {Partial<HLJSOptions>} userOptions
2355
+ */
2356
+ function configure(userOptions) {
2357
+ options = inherit(options, userOptions);
2358
+ }
2359
+
2360
+ // TODO: remove v12, deprecated
2361
+ const initHighlighting = () => {
2362
+ highlightAll();
2363
+ deprecated("10.6.0", "initHighlighting() deprecated. Use highlightAll() now.");
2364
+ };
2365
+
2366
+ // TODO: remove v12, deprecated
2367
+ function initHighlightingOnLoad() {
2368
+ highlightAll();
2369
+ deprecated("10.6.0", "initHighlightingOnLoad() deprecated. Use highlightAll() now.");
2370
+ }
2371
+
2372
+ let wantsHighlight = false;
2373
+
2374
+ /**
2375
+ * auto-highlights all pre>code elements on the page
2376
+ */
2377
+ function highlightAll() {
2378
+ // if we are called too early in the loading process
2379
+ if (document.readyState === "loading") {
2380
+ wantsHighlight = true;
2381
+ return;
2382
+ }
2383
+
2384
+ const blocks = document.querySelectorAll(options.cssSelector);
2385
+ blocks.forEach(highlightElement);
2386
+ }
2387
+
2388
+ function boot() {
2389
+ // if a highlight was requested before DOM was loaded, do now
2390
+ if (wantsHighlight) highlightAll();
2391
+ }
2392
+
2393
+ // make sure we are in the browser environment
2394
+ if (typeof window !== 'undefined' && window.addEventListener) {
2395
+ window.addEventListener('DOMContentLoaded', boot, false);
2396
+ }
2397
+
2398
+ /**
2399
+ * Register a language grammar module
2400
+ *
2401
+ * @param {string} languageName
2402
+ * @param {LanguageFn} languageDefinition
2403
+ */
2404
+ function registerLanguage(languageName, languageDefinition) {
2405
+ let lang = null;
2406
+ try {
2407
+ lang = languageDefinition(hljs);
2408
+ } catch (error$1) {
2409
+ error("Language definition for '{}' could not be registered.".replace("{}", languageName));
2410
+ // hard or soft error
2411
+ if (!SAFE_MODE) { throw error$1; } else { error(error$1); }
2412
+ // languages that have serious errors are replaced with essentially a
2413
+ // "plaintext" stand-in so that the code blocks will still get normal
2414
+ // css classes applied to them - and one bad language won't break the
2415
+ // entire highlighter
2416
+ lang = PLAINTEXT_LANGUAGE;
2417
+ }
2418
+ // give it a temporary name if it doesn't have one in the meta-data
2419
+ if (!lang.name) lang.name = languageName;
2420
+ languages[languageName] = lang;
2421
+ lang.rawDefinition = languageDefinition.bind(null, hljs);
2422
+
2423
+ if (lang.aliases) {
2424
+ registerAliases(lang.aliases, { languageName });
2425
+ }
2426
+ }
2427
+
2428
+ /**
2429
+ * Remove a language grammar module
2430
+ *
2431
+ * @param {string} languageName
2432
+ */
2433
+ function unregisterLanguage(languageName) {
2434
+ delete languages[languageName];
2435
+ for (const alias of Object.keys(aliases)) {
2436
+ if (aliases[alias] === languageName) {
2437
+ delete aliases[alias];
2438
+ }
2439
+ }
2440
+ }
2441
+
2442
+ /**
2443
+ * @returns {string[]} List of language internal names
2444
+ */
2445
+ function listLanguages() {
2446
+ return Object.keys(languages);
2447
+ }
2448
+
2449
+ /**
2450
+ * @param {string} name - name of the language to retrieve
2451
+ * @returns {Language | undefined}
2452
+ */
2453
+ function getLanguage(name) {
2454
+ name = (name || '').toLowerCase();
2455
+ return languages[name] || languages[aliases[name]];
2456
+ }
2457
+
2458
+ /**
2459
+ *
2460
+ * @param {string|string[]} aliasList - single alias or list of aliases
2461
+ * @param {{languageName: string}} opts
2462
+ */
2463
+ function registerAliases(aliasList, { languageName }) {
2464
+ if (typeof aliasList === 'string') {
2465
+ aliasList = [aliasList];
2466
+ }
2467
+ aliasList.forEach(alias => { aliases[alias.toLowerCase()] = languageName; });
2468
+ }
2469
+
2470
+ /**
2471
+ * Determines if a given language has auto-detection enabled
2472
+ * @param {string} name - name of the language
2473
+ */
2474
+ function autoDetection(name) {
2475
+ const lang = getLanguage(name);
2476
+ return lang && !lang.disableAutodetect;
2477
+ }
2478
+
2479
+ /**
2480
+ * Upgrades the old highlightBlock plugins to the new
2481
+ * highlightElement API
2482
+ * @param {HLJSPlugin} plugin
2483
+ */
2484
+ function upgradePluginAPI(plugin) {
2485
+ // TODO: remove with v12
2486
+ if (plugin["before:highlightBlock"] && !plugin["before:highlightElement"]) {
2487
+ plugin["before:highlightElement"] = (data) => {
2488
+ plugin["before:highlightBlock"](
2489
+ Object.assign({ block: data.el }, data)
2490
+ );
2491
+ };
2492
+ }
2493
+ if (plugin["after:highlightBlock"] && !plugin["after:highlightElement"]) {
2494
+ plugin["after:highlightElement"] = (data) => {
2495
+ plugin["after:highlightBlock"](
2496
+ Object.assign({ block: data.el }, data)
2497
+ );
2498
+ };
2499
+ }
2500
+ }
2501
+
2502
+ /**
2503
+ * @param {HLJSPlugin} plugin
2504
+ */
2505
+ function addPlugin(plugin) {
2506
+ upgradePluginAPI(plugin);
2507
+ plugins.push(plugin);
2508
+ }
2509
+
2510
+ /**
2511
+ * @param {HLJSPlugin} plugin
2512
+ */
2513
+ function removePlugin(plugin) {
2514
+ const index = plugins.indexOf(plugin);
2515
+ if (index !== -1) {
2516
+ plugins.splice(index, 1);
2517
+ }
2518
+ }
2519
+
2520
+ /**
2521
+ *
2522
+ * @param {PluginEvent} event
2523
+ * @param {any} args
2524
+ */
2525
+ function fire(event, args) {
2526
+ const cb = event;
2527
+ plugins.forEach(function(plugin) {
2528
+ if (plugin[cb]) {
2529
+ plugin[cb](args);
2530
+ }
2531
+ });
2532
+ }
2533
+
2534
+ /**
2535
+ * DEPRECATED
2536
+ * @param {HighlightedHTMLElement} el
2537
+ */
2538
+ function deprecateHighlightBlock(el) {
2539
+ deprecated("10.7.0", "highlightBlock will be removed entirely in v12.0");
2540
+ deprecated("10.7.0", "Please use highlightElement now.");
2541
+
2542
+ return highlightElement(el);
2543
+ }
2544
+
2545
+ /* Interface definition */
2546
+ Object.assign(hljs, {
2547
+ highlight,
2548
+ highlightAuto,
2549
+ highlightAll,
2550
+ highlightElement,
2551
+ // TODO: Remove with v12 API
2552
+ highlightBlock: deprecateHighlightBlock,
2553
+ configure,
2554
+ initHighlighting,
2555
+ initHighlightingOnLoad,
2556
+ registerLanguage,
2557
+ unregisterLanguage,
2558
+ listLanguages,
2559
+ getLanguage,
2560
+ registerAliases,
2561
+ autoDetection,
2562
+ inherit,
2563
+ addPlugin,
2564
+ removePlugin
2565
+ });
2566
+
2567
+ hljs.debugMode = function() { SAFE_MODE = false; };
2568
+ hljs.safeMode = function() { SAFE_MODE = true; };
2569
+ hljs.versionString = version;
2570
+
2571
+ hljs.regex = {
2572
+ concat: concat,
2573
+ lookahead: lookahead,
2574
+ either: either,
2575
+ optional: optional,
2576
+ anyNumberOfTimes: anyNumberOfTimes
2577
+ };
2578
+
2579
+ for (const key in MODES) {
2580
+ // @ts-ignore
2581
+ if (typeof MODES[key] === "object") {
2582
+ // @ts-ignore
2583
+ deepFreeze(MODES[key]);
2584
+ }
2585
+ }
2586
+
2587
+ // merge all the modes/regexes into our main object
2588
+ Object.assign(hljs, MODES);
2589
+
2590
+ return hljs;
2591
+ };
2592
+
2593
+ // Other names for the variable may break build script
2594
+ const highlight = HLJS({});
2595
+
2596
+ // returns a new instance of the highlighter to be used for extensions
2597
+ // check https://github.com/wooorm/lowlight/issues/47
2598
+ highlight.newInstance = () => HLJS({});
2599
+
2600
+ export { highlight as default };