@qqbrowser/qbot-dsh 0.0.1 → 0.0.2

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 (485) hide show
  1. package/node_modules/@deepseek-ai/cordis-plugin-hmr/package.json +1 -1
  2. package/node_modules/@deepseek-ai/dsh-agent/package.json +1 -1
  3. package/node_modules/@deepseek-ai/dsh-agent-default-model/package.json +1 -1
  4. package/node_modules/@deepseek-ai/dsh-agent-instructions/package.json +1 -1
  5. package/node_modules/@deepseek-ai/dsh-agent-loop/package.json +1 -1
  6. package/node_modules/@deepseek-ai/dsh-agent-presets/package.json +1 -1
  7. package/node_modules/@deepseek-ai/dsh-agent-tool-presentation/package.json +1 -1
  8. package/node_modules/@deepseek-ai/dsh-anonymous-user-id/package.json +1 -1
  9. package/node_modules/@deepseek-ai/dsh-api-gateway/package.json +1 -1
  10. package/node_modules/@deepseek-ai/dsh-api-remotes/package.json +1 -1
  11. package/node_modules/@deepseek-ai/dsh-app-boot/package.json +1 -1
  12. package/node_modules/@deepseek-ai/dsh-atomic-write/package.json +1 -1
  13. package/node_modules/@deepseek-ai/dsh-attachment/package.json +1 -1
  14. package/node_modules/@deepseek-ai/dsh-attachment-local/lib/index.js +1 -1
  15. package/node_modules/@deepseek-ai/dsh-attachment-local/package.json +1 -1
  16. package/node_modules/@deepseek-ai/dsh-base/package.json +1 -1
  17. package/node_modules/@deepseek-ai/dsh-bash-local/package.json +1 -1
  18. package/node_modules/@deepseek-ai/dsh-bash-sandbox/package.json +1 -1
  19. package/node_modules/@deepseek-ai/dsh-brand/package.json +1 -1
  20. package/node_modules/@deepseek-ai/dsh-client-connection/lib/client.js +1 -1
  21. package/node_modules/@deepseek-ai/dsh-client-connection/package.json +1 -1
  22. package/node_modules/@deepseek-ai/dsh-client-hmr/package.json +1 -1
  23. package/node_modules/@deepseek-ai/dsh-client-locale/package.json +1 -1
  24. package/node_modules/@deepseek-ai/dsh-client-modules/package.json +1 -1
  25. package/node_modules/@deepseek-ai/dsh-client-runtime/package.json +1 -1
  26. package/node_modules/@deepseek-ai/dsh-client-schema-form/package.json +1 -1
  27. package/node_modules/@deepseek-ai/dsh-client-ui-agent-preset/package.json +1 -1
  28. package/node_modules/@deepseek-ai/dsh-client-ui-attachment/package.json +1 -1
  29. package/node_modules/@deepseek-ai/dsh-client-ui-commands/package.json +1 -1
  30. package/node_modules/@deepseek-ai/dsh-client-ui-conversation/package.json +1 -1
  31. package/node_modules/@deepseek-ai/dsh-client-ui-cordis/package.json +1 -1
  32. package/node_modules/@deepseek-ai/dsh-client-ui-deliverables/package.json +1 -1
  33. package/node_modules/@deepseek-ai/dsh-client-ui-directory-picker-browse/package.json +1 -1
  34. package/node_modules/@deepseek-ai/dsh-client-ui-directory-picker-native/package.json +1 -1
  35. package/node_modules/@deepseek-ai/dsh-client-ui-goal/package.json +1 -1
  36. package/node_modules/@deepseek-ai/dsh-client-ui-input-trigger/package.json +1 -1
  37. package/node_modules/@deepseek-ai/dsh-client-ui-jobs/package.json +1 -1
  38. package/node_modules/@deepseek-ai/dsh-client-ui-layout/package.json +1 -1
  39. package/node_modules/@deepseek-ai/dsh-client-ui-message-feedback/package.json +1 -1
  40. package/node_modules/@deepseek-ai/dsh-client-ui-model-selection/package.json +1 -1
  41. package/node_modules/@deepseek-ai/dsh-client-ui-permission-presets/package.json +1 -1
  42. package/node_modules/@deepseek-ai/dsh-client-ui-plan/package.json +1 -1
  43. package/node_modules/@deepseek-ai/dsh-client-ui-primitives/package.json +1 -1
  44. package/node_modules/@deepseek-ai/dsh-client-ui-settings/package.json +1 -1
  45. package/node_modules/@deepseek-ai/dsh-client-ui-settings-general/package.json +1 -1
  46. package/node_modules/@deepseek-ai/dsh-client-ui-settings-models/package.json +1 -1
  47. package/node_modules/@deepseek-ai/dsh-client-ui-settings-plugin-inventory/package.json +1 -1
  48. package/node_modules/@deepseek-ai/dsh-client-ui-settings-plugins/package.json +1 -1
  49. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar/package.json +1 -1
  50. package/node_modules/@deepseek-ai/dsh-client-ui-skill/package.json +1 -1
  51. package/node_modules/@deepseek-ai/dsh-client-ui-slots/package.json +1 -1
  52. package/node_modules/@deepseek-ai/dsh-client-ui-subagent/package.json +1 -1
  53. package/node_modules/@deepseek-ai/dsh-client-ui-theme/package.json +1 -1
  54. package/node_modules/@deepseek-ai/dsh-client-ui-tool/package.json +1 -1
  55. package/node_modules/@deepseek-ai/dsh-client-ui-trajectory/package.json +1 -1
  56. package/node_modules/@deepseek-ai/dsh-client-ui-user-questions/package.json +1 -1
  57. package/node_modules/@deepseek-ai/dsh-client-ui-workflow-run/package.json +1 -1
  58. package/node_modules/@deepseek-ai/dsh-client-ui-workspace/package.json +1 -1
  59. package/node_modules/@deepseek-ai/dsh-client-web/package.json +1 -1
  60. package/node_modules/@deepseek-ai/dsh-client-web-react/package.json +1 -1
  61. package/node_modules/@deepseek-ai/dsh-cmdline/package.json +1 -1
  62. package/node_modules/@deepseek-ai/dsh-code-runtime/package.json +1 -1
  63. package/node_modules/@deepseek-ai/dsh-code-runtime-worker-thread/package.json +1 -1
  64. package/node_modules/@deepseek-ai/dsh-command-compact/package.json +1 -1
  65. package/node_modules/@deepseek-ai/dsh-command-feedback/package.json +1 -1
  66. package/node_modules/@deepseek-ai/dsh-command-goal/package.json +1 -1
  67. package/node_modules/@deepseek-ai/dsh-commands/package.json +1 -1
  68. package/node_modules/@deepseek-ai/dsh-compaction/package.json +1 -1
  69. package/node_modules/@deepseek-ai/dsh-compaction-basic/package.json +1 -1
  70. package/node_modules/@deepseek-ai/dsh-compaction-tool-result-pruner/package.json +1 -1
  71. package/node_modules/@deepseek-ai/dsh-cordis-client-runner/package.json +1 -1
  72. package/node_modules/@deepseek-ai/dsh-cordis-host-runner/package.json +1 -1
  73. package/node_modules/@deepseek-ai/dsh-credentials/package.json +1 -1
  74. package/node_modules/@deepseek-ai/dsh-credentials-local/package.json +1 -1
  75. package/node_modules/@deepseek-ai/dsh-fs/package.json +1 -1
  76. package/node_modules/@deepseek-ai/dsh-fs-local/package.json +1 -1
  77. package/node_modules/@deepseek-ai/dsh-fs-observation-policy/package.json +1 -1
  78. package/node_modules/@deepseek-ai/dsh-fs-sandbox/package.json +1 -1
  79. package/node_modules/@deepseek-ai/dsh-goal/package.json +1 -1
  80. package/node_modules/@deepseek-ai/dsh-goal-round-driver/package.json +1 -1
  81. package/node_modules/@deepseek-ai/dsh-headless/package.json +1 -1
  82. package/node_modules/@deepseek-ai/dsh-home-paths/package.json +1 -1
  83. package/node_modules/@deepseek-ai/dsh-host-apiproxy/package.json +1 -1
  84. package/node_modules/@deepseek-ai/dsh-host-directory-picker/package.json +1 -1
  85. package/node_modules/@deepseek-ai/dsh-host-directory-picker-auto/package.json +1 -1
  86. package/node_modules/@deepseek-ai/dsh-host-directory-picker-browse/package.json +1 -1
  87. package/node_modules/@deepseek-ai/dsh-host-directory-picker-native/package.json +1 -1
  88. package/node_modules/@deepseek-ai/dsh-host-frontend-static/package.json +1 -1
  89. package/node_modules/@deepseek-ai/dsh-host-plugin-inventory/package.json +1 -1
  90. package/node_modules/@deepseek-ai/dsh-host-webserver/package.json +1 -1
  91. package/node_modules/@deepseek-ai/dsh-invariants/package.json +1 -1
  92. package/node_modules/@deepseek-ai/dsh-jobs/package.json +1 -1
  93. package/node_modules/@deepseek-ai/dsh-jobs-local/package.json +1 -1
  94. package/node_modules/@deepseek-ai/dsh-launch-environment/package.json +1 -1
  95. package/node_modules/@deepseek-ai/dsh-llm/package.json +1 -1
  96. package/node_modules/@deepseek-ai/dsh-llm-deepseek/package.json +1 -1
  97. package/node_modules/@deepseek-ai/dsh-llm-pi-ai/lib/index.js +1 -1
  98. package/node_modules/@deepseek-ai/dsh-llm-pi-ai/package.json +1 -1
  99. package/node_modules/@deepseek-ai/dsh-llm-retry/package.json +1 -1
  100. package/node_modules/@deepseek-ai/dsh-mcp-client/package.json +1 -1
  101. package/node_modules/@deepseek-ai/dsh-message-feedback/package.json +1 -1
  102. package/node_modules/@deepseek-ai/dsh-native-command/package.json +1 -1
  103. package/node_modules/@deepseek-ai/dsh-output-retention/package.json +1 -1
  104. package/node_modules/@deepseek-ai/dsh-permission-presets/package.json +1 -1
  105. package/node_modules/@deepseek-ai/dsh-persona/package.json +1 -1
  106. package/node_modules/@deepseek-ai/dsh-plan-mode/package.json +1 -1
  107. package/node_modules/@deepseek-ai/dsh-pwsh-local/package.json +1 -1
  108. package/node_modules/@deepseek-ai/dsh-pwsh-sandbox/package.json +1 -1
  109. package/node_modules/@deepseek-ai/dsh-repeat-tool-reminder/package.json +1 -1
  110. package/node_modules/@deepseek-ai/dsh-sandbox/package.json +1 -1
  111. package/node_modules/@deepseek-ai/dsh-sandbox-local/package.json +1 -1
  112. package/node_modules/@deepseek-ai/dsh-sandbox-policy/package.json +1 -1
  113. package/node_modules/@deepseek-ai/dsh-sandbox-windows-acl/package.json +1 -1
  114. package/node_modules/@deepseek-ai/dsh-schedule/package.json +1 -1
  115. package/node_modules/@deepseek-ai/dsh-scope/package.json +1 -1
  116. package/node_modules/@deepseek-ai/dsh-session/package.json +1 -1
  117. package/node_modules/@deepseek-ai/dsh-session-checkpoint-policy/package.json +1 -1
  118. package/node_modules/@deepseek-ai/dsh-session-log-export/package.json +1 -1
  119. package/node_modules/@deepseek-ai/dsh-session-persistence/package.json +1 -1
  120. package/node_modules/@deepseek-ai/dsh-session-persistence-jsonl/package.json +1 -1
  121. package/node_modules/@deepseek-ai/dsh-session-projection/package.json +1 -1
  122. package/node_modules/@deepseek-ai/dsh-session-projection-cache/package.json +1 -1
  123. package/node_modules/@deepseek-ai/dsh-session-query/package.json +1 -1
  124. package/node_modules/@deepseek-ai/dsh-session-query-sqlite/package.json +1 -1
  125. package/node_modules/@deepseek-ai/dsh-session-reference/package.json +1 -1
  126. package/node_modules/@deepseek-ai/dsh-session-stats/package.json +1 -1
  127. package/node_modules/@deepseek-ai/dsh-session-telemetry/package.json +1 -1
  128. package/node_modules/@deepseek-ai/dsh-session-telemetry-otel/package.json +1 -1
  129. package/node_modules/@deepseek-ai/dsh-session-title/package.json +1 -1
  130. package/node_modules/@deepseek-ai/dsh-session-title-first-prompt-llm/package.json +1 -1
  131. package/node_modules/@deepseek-ai/dsh-session-title-llm/package.json +1 -1
  132. package/node_modules/@deepseek-ai/dsh-settings/package.json +1 -1
  133. package/node_modules/@deepseek-ai/dsh-settings-file/package.json +1 -1
  134. package/node_modules/@deepseek-ai/dsh-shell/package.json +1 -1
  135. package/node_modules/@deepseek-ai/dsh-shell-env/package.json +1 -1
  136. package/node_modules/@deepseek-ai/dsh-skill/package.json +1 -1
  137. package/node_modules/@deepseek-ai/dsh-skill-badge/package.json +1 -1
  138. package/node_modules/@deepseek-ai/dsh-skill-filesystem/package.json +1 -1
  139. package/node_modules/@deepseek-ai/dsh-spill/package.json +1 -1
  140. package/node_modules/@deepseek-ai/dsh-spill-local/package.json +1 -1
  141. package/node_modules/@deepseek-ai/dsh-spill-policy/package.json +1 -1
  142. package/node_modules/@deepseek-ai/dsh-storage/package.json +1 -1
  143. package/node_modules/@deepseek-ai/dsh-storage-domain/package.json +1 -1
  144. package/node_modules/@deepseek-ai/dsh-storage-json/package.json +1 -1
  145. package/node_modules/@deepseek-ai/dsh-subagent/package.json +1 -1
  146. package/node_modules/@deepseek-ai/dsh-subagent-fork-in-process/package.json +1 -1
  147. package/node_modules/@deepseek-ai/dsh-subagent-in-process-driver/package.json +1 -1
  148. package/node_modules/@deepseek-ai/dsh-subagent-spawn-in-process/package.json +1 -1
  149. package/node_modules/@deepseek-ai/dsh-subprocess/package.json +1 -1
  150. package/node_modules/@deepseek-ai/dsh-subprocess-local/package.json +1 -1
  151. package/node_modules/@deepseek-ai/dsh-system-prompt/package.json +1 -1
  152. package/node_modules/@deepseek-ai/dsh-terminal/package.json +1 -1
  153. package/node_modules/@deepseek-ai/dsh-terminal-bash/package.json +1 -1
  154. package/node_modules/@deepseek-ai/dsh-time-context/package.json +1 -1
  155. package/node_modules/@deepseek-ai/dsh-timeout/package.json +1 -1
  156. package/node_modules/@deepseek-ai/dsh-tmux-context/package.json +1 -1
  157. package/node_modules/@deepseek-ai/dsh-token-meter/package.json +1 -1
  158. package/node_modules/@deepseek-ai/dsh-tool-ask-user/package.json +1 -1
  159. package/node_modules/@deepseek-ai/dsh-tool-bash/package.json +1 -1
  160. package/node_modules/@deepseek-ai/dsh-tool-bash-persistent/package.json +1 -1
  161. package/node_modules/@deepseek-ai/dsh-tool-call-timeout-policy/package.json +1 -1
  162. package/node_modules/@deepseek-ai/dsh-tool-cordis/package.json +1 -1
  163. package/node_modules/@deepseek-ai/dsh-tool-fs/package.json +1 -1
  164. package/node_modules/@deepseek-ai/dsh-tool-fs-search/package.json +1 -1
  165. package/node_modules/@deepseek-ai/dsh-tool-goal/package.json +1 -1
  166. package/node_modules/@deepseek-ai/dsh-tool-jobs/package.json +1 -1
  167. package/node_modules/@deepseek-ai/dsh-tool-pwsh/package.json +1 -1
  168. package/node_modules/@deepseek-ai/dsh-tool-ralph/package.json +1 -1
  169. package/node_modules/@deepseek-ai/dsh-tool-skill/package.json +1 -1
  170. package/node_modules/@deepseek-ai/dsh-tool-str-replace-editor/package.json +1 -1
  171. package/node_modules/@deepseek-ai/dsh-tool-subagent/package.json +1 -1
  172. package/node_modules/@deepseek-ai/dsh-tool-subagent-control/package.json +1 -1
  173. package/node_modules/@deepseek-ai/dsh-tool-subagent-report/package.json +1 -1
  174. package/node_modules/@deepseek-ai/dsh-tool-todo/package.json +1 -1
  175. package/node_modules/@deepseek-ai/dsh-tool-web/package.json +1 -1
  176. package/node_modules/@deepseek-ai/dsh-tool-workflow/package.json +1 -1
  177. package/node_modules/@deepseek-ai/dsh-tools/lib/index.js +1 -1
  178. package/node_modules/@deepseek-ai/dsh-tools/lib/types/py-types.js +1 -1
  179. package/node_modules/@deepseek-ai/dsh-tools/package.json +1 -1
  180. package/node_modules/@deepseek-ai/dsh-typert-loader/package.json +1 -1
  181. package/node_modules/@deepseek-ai/dsh-typert-protocol/package.json +1 -1
  182. package/node_modules/@deepseek-ai/dsh-typert-registry/package.json +1 -1
  183. package/node_modules/@deepseek-ai/dsh-user-approval/package.json +1 -1
  184. package/node_modules/@deepseek-ai/dsh-user-questions/package.json +1 -1
  185. package/node_modules/@deepseek-ai/dsh-web/package.json +1 -1
  186. package/node_modules/@deepseek-ai/dsh-web-app/package.json +1 -1
  187. package/node_modules/@deepseek-ai/dsh-web-frontend/package.json +1 -1
  188. package/node_modules/@deepseek-ai/dsh-web-search-deepseek/package.json +1 -1
  189. package/node_modules/@deepseek-ai/dsh-workflow/package.json +1 -1
  190. package/node_modules/@deepseek-ai/dsh-workflow-worker-thread/package.json +1 -1
  191. package/node_modules/@deepseek-ai/dsh-workspace/package.json +1 -1
  192. package/node_modules/@earendil-works/pi-ai/dist/api/anthropic-messages.js +5 -5
  193. package/node_modules/@earendil-works/pi-ai/dist/api/azure-openai-responses.js +1 -1
  194. package/node_modules/@earendil-works/pi-ai/dist/api/bedrock-converse-stream.js +1 -1
  195. package/node_modules/@earendil-works/pi-ai/dist/api/google-generative-ai.js +1 -1
  196. package/node_modules/@earendil-works/pi-ai/dist/api/google-vertex.js +1 -1
  197. package/node_modules/@earendil-works/pi-ai/dist/api/mistral-conversations.js +3 -3
  198. package/node_modules/@earendil-works/pi-ai/dist/api/openai-codex-responses.js +4 -4
  199. package/node_modules/@earendil-works/pi-ai/dist/api/openai-completions.js +5 -5
  200. package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses-shared.js +6 -6
  201. package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses.js +1 -1
  202. package/node_modules/@earendil-works/pi-ai/dist/api/openrouter-images.js +1 -1
  203. package/node_modules/@earendil-works/pi-ai/dist/api/pi-messages.js +2 -2
  204. package/node_modules/@earendil-works/pi-ai/dist/api/simple-options.js +1 -1
  205. package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/openrouter.js +1 -1
  206. package/node_modules/@earendil-works/pi-ai/dist/auth/resolve.js +1 -1
  207. package/node_modules/@earendil-works/pi-ai/dist/providers/all.js +1 -1
  208. package/node_modules/@earendil-works/pi-ai/dist/providers/amazon-bedrock.models.js +1 -1
  209. package/node_modules/@earendil-works/pi-ai/dist/providers/ant-ling.models.js +1 -1
  210. package/node_modules/@earendil-works/pi-ai/dist/providers/anthropic.models.js +1 -1
  211. package/node_modules/@earendil-works/pi-ai/dist/providers/azure-openai-responses.models.js +1 -1
  212. package/node_modules/@earendil-works/pi-ai/dist/providers/cerebras.models.js +1 -1
  213. package/node_modules/@earendil-works/pi-ai/dist/providers/cloudflare-ai-gateway.models.js +1 -1
  214. package/node_modules/@earendil-works/pi-ai/dist/providers/cloudflare-workers-ai.models.js +1 -1
  215. package/node_modules/@earendil-works/pi-ai/dist/providers/data/.manifest.json +1 -1
  216. package/node_modules/@earendil-works/pi-ai/dist/providers/data/cloudflare-ai-gateway.json +1 -1
  217. package/node_modules/@earendil-works/pi-ai/dist/providers/data/fireworks.json +1 -1
  218. package/node_modules/@earendil-works/pi-ai/dist/providers/data/github-copilot.json +1 -1
  219. package/node_modules/@earendil-works/pi-ai/dist/providers/data/huggingface.json +1 -1
  220. package/node_modules/@earendil-works/pi-ai/dist/providers/data/nvidia.json +1 -1
  221. package/node_modules/@earendil-works/pi-ai/dist/providers/data/opencode.json +1 -1
  222. package/node_modules/@earendil-works/pi-ai/dist/providers/data/openrouter.json +1 -1
  223. package/node_modules/@earendil-works/pi-ai/dist/providers/data/qwen-token-plan-cn.json +1 -1
  224. package/node_modules/@earendil-works/pi-ai/dist/providers/data/qwen-token-plan.json +1 -1
  225. package/node_modules/@earendil-works/pi-ai/dist/providers/data/together.json +1 -1
  226. package/node_modules/@earendil-works/pi-ai/dist/providers/data/vercel-ai-gateway.json +1 -1
  227. package/node_modules/@earendil-works/pi-ai/dist/providers/data/zai-coding-cn.json +1 -1
  228. package/node_modules/@earendil-works/pi-ai/dist/providers/data/zai.json +1 -1
  229. package/node_modules/@earendil-works/pi-ai/dist/providers/deepseek.models.js +1 -1
  230. package/node_modules/@earendil-works/pi-ai/dist/providers/faux.js +5 -5
  231. package/node_modules/@earendil-works/pi-ai/dist/providers/fireworks.models.js +1 -1
  232. package/node_modules/@earendil-works/pi-ai/dist/providers/github-copilot.models.js +1 -1
  233. package/node_modules/@earendil-works/pi-ai/dist/providers/google-vertex.models.js +1 -1
  234. package/node_modules/@earendil-works/pi-ai/dist/providers/google.models.js +1 -1
  235. package/node_modules/@earendil-works/pi-ai/dist/providers/groq.models.js +1 -1
  236. package/node_modules/@earendil-works/pi-ai/dist/providers/huggingface.models.js +1 -1
  237. package/node_modules/@earendil-works/pi-ai/dist/providers/kimi-coding.models.js +1 -1
  238. package/node_modules/@earendil-works/pi-ai/dist/providers/minimax-cn.models.js +1 -1
  239. package/node_modules/@earendil-works/pi-ai/dist/providers/minimax.models.js +1 -1
  240. package/node_modules/@earendil-works/pi-ai/dist/providers/mistral.models.js +1 -1
  241. package/node_modules/@earendil-works/pi-ai/dist/providers/moonshotai-cn.models.js +1 -1
  242. package/node_modules/@earendil-works/pi-ai/dist/providers/moonshotai.models.js +1 -1
  243. package/node_modules/@earendil-works/pi-ai/dist/providers/nvidia.models.js +1 -1
  244. package/node_modules/@earendil-works/pi-ai/dist/providers/openai-codex.models.js +1 -1
  245. package/node_modules/@earendil-works/pi-ai/dist/providers/openai.models.js +1 -1
  246. package/node_modules/@earendil-works/pi-ai/dist/providers/opencode-go.models.js +1 -1
  247. package/node_modules/@earendil-works/pi-ai/dist/providers/opencode.models.js +1 -1
  248. package/node_modules/@earendil-works/pi-ai/dist/providers/openrouter.models.js +1 -1
  249. package/node_modules/@earendil-works/pi-ai/dist/providers/qwen-token-plan-cn.models.js +1 -1
  250. package/node_modules/@earendil-works/pi-ai/dist/providers/qwen-token-plan.models.js +1 -1
  251. package/node_modules/@earendil-works/pi-ai/dist/providers/together.models.js +1 -1
  252. package/node_modules/@earendil-works/pi-ai/dist/providers/vercel-ai-gateway.models.js +1 -1
  253. package/node_modules/@earendil-works/pi-ai/dist/providers/xai.models.js +1 -1
  254. package/node_modules/@earendil-works/pi-ai/dist/providers/xiaomi-token-plan-ams.models.js +1 -1
  255. package/node_modules/@earendil-works/pi-ai/dist/providers/xiaomi-token-plan-cn.models.js +1 -1
  256. package/node_modules/@earendil-works/pi-ai/dist/providers/xiaomi-token-plan-sgp.models.js +1 -1
  257. package/node_modules/@earendil-works/pi-ai/dist/providers/xiaomi.models.js +1 -1
  258. package/node_modules/@earendil-works/pi-ai/dist/providers/zai-coding-cn.models.js +1 -1
  259. package/node_modules/@earendil-works/pi-ai/dist/providers/zai.models.js +1 -1
  260. package/node_modules/@earendil-works/pi-ai/package.json +1 -1
  261. package/node_modules/mdast-util-gfm-autolink-literal/lib/index.js +1 -1
  262. package/node_modules/micromark-util-character/dev/index.js +1 -1
  263. package/node_modules/micromark-util-character/index.js +1 -1
  264. package/node_modules/oniguruma-parser/dist/oniguruma-parser.min.js +1 -1
  265. package/node_modules/oniguruma-parser/dist/tokenizer/tokenize.js +1 -1
  266. package/node_modules/oniguruma-to-es/dist/cjs/index.js +2 -2
  267. package/node_modules/oniguruma-to-es/dist/esm/index.js +1 -1
  268. package/node_modules/oniguruma-to-es/dist/index.min.js +2 -2
  269. package/node_modules/sharp/dist/libvips.mjs +1 -1
  270. package/node_modules/sharp/dist/sharp.mjs +1 -1
  271. package/node_modules/sharp/dist/utility.mjs +1 -1
  272. package/node_modules/typebox/build/compile/validator.mjs +1 -1
  273. package/node_modules/typebox/build/format/_idna.mjs +1 -1
  274. package/node_modules/typebox/build/format/_puny.mjs +1 -1
  275. package/node_modules/typebox/build/format/uuid.mjs +1 -1
  276. package/node_modules/typebox/build/guard/emit.mjs +1 -1
  277. package/node_modules/typebox/build/guard/guard.mjs +1 -1
  278. package/node_modules/typebox/build/guard/string.mjs +1 -1
  279. package/node_modules/typebox/build/schema/engine/_functions.mjs +1 -1
  280. package/node_modules/typebox/build/schema/engine/boolean.mjs +1 -1
  281. package/node_modules/typebox/build/schema/engine/index.mjs +1 -1
  282. package/node_modules/typebox/build/schema/engine/schema.mjs +1 -1
  283. package/node_modules/typebox/build/schema/engine/type.mjs +1 -1
  284. package/node_modules/typebox/build/schema/types/index.mjs +1 -1
  285. package/node_modules/typebox/build/schema/types/schema.mjs +1 -1
  286. package/node_modules/typebox/build/system/locale/ar_001.mjs +1 -1
  287. package/node_modules/typebox/build/system/locale/bn_BD.mjs +1 -1
  288. package/node_modules/typebox/build/system/locale/cs_CZ.mjs +1 -1
  289. package/node_modules/typebox/build/system/locale/de_DE.mjs +1 -1
  290. package/node_modules/typebox/build/system/locale/el_GR.mjs +1 -1
  291. package/node_modules/typebox/build/system/locale/en_US.mjs +1 -1
  292. package/node_modules/typebox/build/system/locale/es_419.mjs +1 -1
  293. package/node_modules/typebox/build/system/locale/es_AR.mjs +1 -1
  294. package/node_modules/typebox/build/system/locale/es_ES.mjs +1 -1
  295. package/node_modules/typebox/build/system/locale/es_MX.mjs +1 -1
  296. package/node_modules/typebox/build/system/locale/fa_IR.mjs +1 -1
  297. package/node_modules/typebox/build/system/locale/fil_PH.mjs +1 -1
  298. package/node_modules/typebox/build/system/locale/fr_CA.mjs +1 -1
  299. package/node_modules/typebox/build/system/locale/fr_FR.mjs +1 -1
  300. package/node_modules/typebox/build/system/locale/ha_NG.mjs +1 -1
  301. package/node_modules/typebox/build/system/locale/hi_IN.mjs +1 -1
  302. package/node_modules/typebox/build/system/locale/hu_HU.mjs +1 -1
  303. package/node_modules/typebox/build/system/locale/id_ID.mjs +1 -1
  304. package/node_modules/typebox/build/system/locale/it_IT.mjs +1 -1
  305. package/node_modules/typebox/build/system/locale/ja_JP.mjs +1 -1
  306. package/node_modules/typebox/build/system/locale/ko_KR.mjs +1 -1
  307. package/node_modules/typebox/build/system/locale/ms_MY.mjs +1 -1
  308. package/node_modules/typebox/build/system/locale/nl_NL.mjs +1 -1
  309. package/node_modules/typebox/build/system/locale/pl_PL.mjs +1 -1
  310. package/node_modules/typebox/build/system/locale/pt_BR.mjs +1 -1
  311. package/node_modules/typebox/build/system/locale/pt_PT.mjs +1 -1
  312. package/node_modules/typebox/build/system/locale/ro_RO.mjs +1 -1
  313. package/node_modules/typebox/build/system/locale/ru_RU.mjs +1 -1
  314. package/node_modules/typebox/build/system/locale/sv_SE.mjs +1 -1
  315. package/node_modules/typebox/build/system/locale/sw_TZ.mjs +1 -1
  316. package/node_modules/typebox/build/system/locale/th_TH.mjs +1 -1
  317. package/node_modules/typebox/build/system/locale/tr_TR.mjs +1 -1
  318. package/node_modules/typebox/build/system/locale/uk_UA.mjs +1 -1
  319. package/node_modules/typebox/build/system/locale/ur_PK.mjs +1 -1
  320. package/node_modules/typebox/build/system/locale/vi_VN.mjs +1 -1
  321. package/node_modules/typebox/build/system/locale/yo_NG.mjs +1 -1
  322. package/node_modules/typebox/build/system/locale/zh_Hans.mjs +1 -1
  323. package/node_modules/typebox/build/system/locale/zh_Hant.mjs +1 -1
  324. package/node_modules/typebox/build/system/memory/clone.mjs +1 -1
  325. package/node_modules/typebox/build/system/settings/settings.mjs +1 -1
  326. package/node_modules/typebox/build/type/action/_add_immutable.mjs +1 -0
  327. package/node_modules/typebox/build/type/action/_add_optional.mjs +1 -0
  328. package/node_modules/typebox/build/type/action/_add_readonly.mjs +1 -0
  329. package/node_modules/typebox/build/type/action/_remove_immutable.mjs +1 -0
  330. package/node_modules/typebox/build/type/action/_remove_optional.mjs +1 -0
  331. package/node_modules/typebox/build/type/action/_remove_readonly.mjs +1 -0
  332. package/node_modules/typebox/build/type/action/conditional.mjs +1 -1
  333. package/node_modules/typebox/build/type/action/index.mjs +1 -1
  334. package/node_modules/typebox/build/type/action/mapped.mjs +1 -1
  335. package/node_modules/typebox/build/type/action/module.mjs +1 -1
  336. package/node_modules/typebox/build/type/action/with.mjs +1 -0
  337. package/node_modules/typebox/build/type/engine/call/distribute_arguments.mjs +1 -1
  338. package/node_modules/typebox/build/type/engine/call/instantiate.mjs +1 -1
  339. package/node_modules/typebox/build/type/engine/call/resolve_arguments.mjs +1 -1
  340. package/node_modules/typebox/build/type/engine/constructor_parameters/instantiate.mjs +1 -1
  341. package/node_modules/typebox/build/type/engine/cyclic/candidates.mjs +1 -1
  342. package/node_modules/typebox/build/type/engine/cyclic/check.mjs +1 -1
  343. package/node_modules/typebox/build/type/engine/cyclic/dependencies.mjs +1 -1
  344. package/node_modules/typebox/build/type/engine/cyclic/extends.mjs +1 -1
  345. package/node_modules/typebox/build/type/engine/cyclic/instantiate.mjs +1 -1
  346. package/node_modules/typebox/build/type/engine/enum/index.mjs +1 -1
  347. package/node_modules/typebox/build/type/engine/evaluate/broaden.mjs +1 -1
  348. package/node_modules/typebox/build/type/engine/evaluate/composite.mjs +1 -1
  349. package/node_modules/typebox/build/type/engine/evaluate/distribute.mjs +1 -1
  350. package/node_modules/typebox/build/type/engine/evaluate/evaluate.mjs +1 -1
  351. package/node_modules/typebox/build/type/engine/exclude/operation.mjs +1 -1
  352. package/node_modules/typebox/build/type/engine/extract/operation.mjs +1 -1
  353. package/node_modules/typebox/build/type/engine/immutable/instantiate_add.mjs +1 -0
  354. package/node_modules/typebox/build/type/engine/immutable/instantiate_remove.mjs +1 -0
  355. package/node_modules/typebox/build/type/engine/index.mjs +1 -1
  356. package/node_modules/typebox/build/type/engine/indexable/from_dependent.mjs +1 -0
  357. package/node_modules/typebox/build/type/engine/indexable/from_enum.mjs +1 -1
  358. package/node_modules/typebox/build/type/engine/indexable/from_template_literal.mjs +1 -1
  359. package/node_modules/typebox/build/type/engine/indexable/from_type.mjs +1 -1
  360. package/node_modules/typebox/build/type/engine/indexed/instantiate.mjs +1 -1
  361. package/node_modules/typebox/build/type/engine/instantiate.mjs +1 -1
  362. package/node_modules/typebox/build/type/engine/intrinsics/from_template_literal.mjs +1 -1
  363. package/node_modules/typebox/build/type/engine/keyof/instantiate.mjs +1 -1
  364. package/node_modules/typebox/build/type/engine/mapped/mapped_operation.mjs +1 -1
  365. package/node_modules/typebox/build/type/engine/mapped/mapped_variants.mjs +1 -1
  366. package/node_modules/typebox/build/type/engine/module/instantiate.mjs +1 -1
  367. package/node_modules/typebox/build/type/engine/object/from_dependent.mjs +1 -0
  368. package/node_modules/typebox/build/type/engine/object/from_type.mjs +1 -1
  369. package/node_modules/typebox/build/type/engine/object/from_union.mjs +1 -1
  370. package/node_modules/typebox/build/type/engine/optional/instantiate_add.mjs +1 -0
  371. package/node_modules/typebox/build/type/engine/optional/instantiate_remove.mjs +1 -0
  372. package/node_modules/typebox/build/type/engine/parameters/instantiate.mjs +1 -1
  373. package/node_modules/typebox/build/type/engine/partial/from_dependent.mjs +1 -0
  374. package/node_modules/typebox/build/type/engine/partial/from_intersect.mjs +1 -1
  375. package/node_modules/typebox/build/type/engine/partial/from_object.mjs +1 -1
  376. package/node_modules/typebox/build/type/engine/partial/from_type.mjs +1 -1
  377. package/node_modules/typebox/build/type/engine/priority/index.mjs +1 -0
  378. package/node_modules/typebox/build/type/engine/priority/priority.mjs +1 -0
  379. package/node_modules/typebox/build/type/engine/readonly/instantiate_add.mjs +1 -0
  380. package/node_modules/typebox/build/type/engine/readonly/instantiate_remove.mjs +1 -0
  381. package/node_modules/typebox/build/type/engine/readonly_object/from_array.mjs +1 -1
  382. package/node_modules/typebox/build/type/engine/readonly_object/from_dependent.mjs +1 -0
  383. package/node_modules/typebox/build/type/engine/readonly_object/from_intersect.mjs +1 -1
  384. package/node_modules/typebox/build/type/engine/readonly_object/from_object.mjs +1 -1
  385. package/node_modules/typebox/build/type/engine/readonly_object/from_tuple.mjs +1 -1
  386. package/node_modules/typebox/build/type/engine/readonly_object/from_type.mjs +1 -1
  387. package/node_modules/typebox/build/type/engine/record/from_key_enum.mjs +1 -1
  388. package/node_modules/typebox/build/type/engine/record/from_key_template_literal.mjs +1 -1
  389. package/node_modules/typebox/build/type/engine/ref/instantiate.mjs +1 -1
  390. package/node_modules/typebox/build/type/engine/required/from_dependent.mjs +1 -0
  391. package/node_modules/typebox/build/type/engine/required/from_intersect.mjs +1 -1
  392. package/node_modules/typebox/build/type/engine/required/from_object.mjs +1 -1
  393. package/node_modules/typebox/build/type/engine/required/from_type.mjs +1 -1
  394. package/node_modules/typebox/build/type/engine/template_literal/decode.mjs +1 -1
  395. package/node_modules/typebox/build/type/engine/template_literal/encode.mjs +1 -1
  396. package/node_modules/typebox/build/type/engine/template_literal/is_finite.mjs +1 -1
  397. package/node_modules/typebox/build/type/engine/this/expand_this.mjs +1 -1
  398. package/node_modules/typebox/build/type/engine/with/instantiate.mjs +1 -0
  399. package/node_modules/typebox/build/type/extends/dependent.mjs +1 -0
  400. package/node_modules/typebox/build/type/extends/enum.mjs +1 -1
  401. package/node_modules/typebox/build/type/extends/extends_left.mjs +1 -1
  402. package/node_modules/typebox/build/type/extends/extends_right.mjs +1 -1
  403. package/node_modules/typebox/build/type/extends/inference.mjs +1 -1
  404. package/node_modules/typebox/build/type/extends/object.mjs +1 -1
  405. package/node_modules/typebox/build/type/extends/parameters.mjs +1 -1
  406. package/node_modules/typebox/build/type/extends/record.mjs +1 -0
  407. package/node_modules/typebox/build/type/extends/template_literal.mjs +1 -1
  408. package/node_modules/typebox/build/type/extends/tuple.mjs +1 -1
  409. package/node_modules/typebox/build/type/extends/union.mjs +1 -1
  410. package/node_modules/typebox/build/type/script/mapping.mjs +1 -1
  411. package/node_modules/typebox/build/type/script/parser.mjs +6 -6
  412. package/node_modules/typebox/build/type/script/script.mjs +1 -1
  413. package/node_modules/typebox/build/type/script/token/internal/guard.mjs +1 -1
  414. package/node_modules/typebox/build/type/script/token/until.mjs +1 -1
  415. package/node_modules/typebox/build/type/types/_immutable.mjs +1 -1
  416. package/node_modules/typebox/build/type/types/_optional.mjs +1 -1
  417. package/node_modules/typebox/build/type/types/_readonly.mjs +1 -1
  418. package/node_modules/typebox/build/type/types/_refine.mjs +1 -1
  419. package/node_modules/typebox/build/type/types/call.mjs +1 -1
  420. package/node_modules/typebox/build/type/types/deferred.mjs +1 -1
  421. package/node_modules/typebox/build/type/types/dependent.mjs +1 -0
  422. package/node_modules/typebox/build/type/types/enum.mjs +1 -1
  423. package/node_modules/typebox/build/type/types/index.mjs +1 -1
  424. package/node_modules/typebox/build/type/types/number.mjs +1 -1
  425. package/node_modules/typebox/build/type/types/record.mjs +1 -1
  426. package/node_modules/typebox/build/typebox.mjs +1 -1
  427. package/node_modules/typebox/build/value/clean/clean.mjs +1 -1
  428. package/node_modules/typebox/build/value/clean/from_intersect.mjs +1 -1
  429. package/node_modules/typebox/build/value/clean/from_type.mjs +1 -1
  430. package/node_modules/typebox/build/value/clean/from_union.mjs +1 -1
  431. package/node_modules/typebox/build/value/clone/clone.mjs +1 -1
  432. package/node_modules/typebox/build/value/codec/decode.mjs +1 -1
  433. package/node_modules/typebox/build/value/codec/encode.mjs +1 -1
  434. package/node_modules/typebox/build/value/codec/from_array.mjs +1 -1
  435. package/node_modules/typebox/build/value/codec/from_object.mjs +1 -1
  436. package/node_modules/typebox/build/value/codec/from_record.mjs +1 -1
  437. package/node_modules/typebox/build/value/codec/from_tuple.mjs +1 -1
  438. package/node_modules/typebox/build/value/codec/from_union.mjs +1 -1
  439. package/node_modules/typebox/build/value/convert/from_enum.mjs +1 -1
  440. package/node_modules/typebox/build/value/convert/from_template_literal.mjs +1 -1
  441. package/node_modules/typebox/build/value/convert/from_type.mjs +1 -1
  442. package/node_modules/typebox/build/value/create/from_enum.mjs +1 -1
  443. package/node_modules/typebox/build/value/create/from_type.mjs +1 -1
  444. package/node_modules/typebox/build/value/default/from_object.mjs +1 -1
  445. package/node_modules/typebox/build/value/default/from_type.mjs +1 -1
  446. package/node_modules/typebox/build/value/index.mjs +1 -1
  447. package/node_modules/typebox/build/value/repair/from_enum.mjs +1 -1
  448. package/node_modules/typebox/build/value/repair/from_type.mjs +1 -1
  449. package/node_modules/typebox/build/value/shared/union_priority_sort.mjs +1 -1
  450. package/node_modules/typebox/build/value/value.mjs +1 -1
  451. package/node_modules/typebox/package.json +1 -1
  452. package/package.json +1 -1
  453. package/node_modules/typebox/build/schema/engine/_guard.mjs +0 -1
  454. package/node_modules/typebox/build/schema/types/_guard.mjs +0 -1
  455. package/node_modules/typebox/build/type/action/_optional.mjs +0 -1
  456. package/node_modules/typebox/build/type/action/_readonly.mjs +0 -1
  457. package/node_modules/typebox/build/type/action/awaited.mjs +0 -1
  458. package/node_modules/typebox/build/type/action/options.mjs +0 -1
  459. package/node_modules/typebox/build/type/engine/awaited/instantiate.mjs +0 -1
  460. package/node_modules/typebox/build/type/engine/enum/enum_to_union.mjs +0 -1
  461. package/node_modules/typebox/build/type/engine/options/index.mjs +0 -1
  462. package/node_modules/typebox/build/type/engine/options/instantiate.mjs +0 -1
  463. package/node_modules/typebox/build/type/extends/async_iterator.mjs +0 -1
  464. package/node_modules/typebox/build/type/extends/iterator.mjs +0 -1
  465. package/node_modules/typebox/build/type/extends/promise.mjs +0 -1
  466. package/node_modules/typebox/build/type/types/async_iterator.mjs +0 -1
  467. package/node_modules/typebox/build/type/types/base.mjs +0 -1
  468. package/node_modules/typebox/build/type/types/iterator.mjs +0 -1
  469. package/node_modules/typebox/build/type/types/promise.mjs +0 -1
  470. package/node_modules/typebox/build/value/clean/from_base.mjs +0 -1
  471. package/node_modules/typebox/build/value/convert/from_base.mjs +0 -1
  472. package/node_modules/typebox/build/value/create/from_async_iterator.mjs +0 -1
  473. package/node_modules/typebox/build/value/create/from_base.mjs +0 -1
  474. package/node_modules/typebox/build/value/create/from_iterator.mjs +0 -1
  475. package/node_modules/typebox/build/value/create/from_promise.mjs +0 -1
  476. package/node_modules/typebox/build/value/default/from_base.mjs +0 -1
  477. package/node_modules/typebox/build/value/mutate/error.mjs +0 -1
  478. package/node_modules/typebox/build/value/mutate/from_array.mjs +0 -1
  479. package/node_modules/typebox/build/value/mutate/from_object.mjs +0 -1
  480. package/node_modules/typebox/build/value/mutate/from_unknown.mjs +0 -1
  481. package/node_modules/typebox/build/value/mutate/from_value.mjs +0 -1
  482. package/node_modules/typebox/build/value/mutate/index.mjs +0 -1
  483. package/node_modules/typebox/build/value/mutate/mutate.mjs +0 -1
  484. package/node_modules/typebox/build/value/repair/from_base.mjs +0 -1
  485. /package/node_modules/typebox/build/type/engine/{awaited → with}/index.mjs +0 -0
@@ -1,6 +1,6 @@
1
- var $=Object.defineProperty;var s=(t,e)=>$(t,"name",{value:e,configurable:!0});import{createProvider as W}from"../models.js";import{createAssistantMessageEventStream as N}from"../utils/event-stream.js";const A="faux",I="faux",C="faux-1",z="Faux Model",j="http://localhost:0",O=3,S=5,w={input:0,output:0,cacheRead:0,cacheWrite:0,totalTokens:0,cost:{input:0,output:0,cacheRead:0,cacheWrite:0,total:0}};export function fauxText(t){return{type:"text",text:t}}s(fauxText,"fauxText");export function fauxThinking(t){return{type:"thinking",thinking:t}}s(fauxThinking,"fauxThinking");export function fauxToolCall(t,e,o={}){return{type:"toolCall",id:o.id??b("tool"),name:t,arguments:e}}s(fauxToolCall,"fauxToolCall");function J(t){return typeof t=="string"?[fauxText(t)]:Array.isArray(t)?t:[t]}s(J,"normalizeFauxAssistantContent");export function fauxAssistantMessage(t,e={}){return{role:"assistant",content:J(t),api:A,provider:I,model:C,usage:w,stopReason:e.stopReason??"stop",errorMessage:e.errorMessage,responseId:e.responseId,timestamp:e.timestamp??Date.now()}}s(fauxAssistantMessage,"fauxAssistantMessage");function y(t){return Math.ceil(t.length/4)}s(y,"estimateTokens");function b(t){return`${t}:${Date.now()}:${Math.random().toString(36).slice(2)}`}s(b,"randomId");function v(t){return typeof t=="string"?t:t.map(e=>e.type==="text"?e.text:`[image:${e.mimeType}:${e.data.length}]`).join(`
2
- `)}s(v,"contentToText");function F(t){return t.map(e=>e.type==="text"?e.text:e.type==="thinking"?e.thinking:`${e.name}:${JSON.stringify(e.arguments)}`).join(`
3
- `)}s(F,"assistantContentToText");function K(t){return[t.toolName,...t.content.map(e=>v([e]))].join(`
4
- `)}s(K,"toolResultToText");function B(t){return t.role==="user"?v(t.content):t.role==="assistant"?F(t.content):K(t)}s(B,"messageToText");function Z(t){const e=[];t.systemPrompt&&e.push(`system:${t.systemPrompt}`);for(const o of t.messages)e.push(`${o.role}:${B(o)}`);return t.tools?.length&&e.push(`tools:${JSON.stringify(t.tools)}`),e.join(`
1
+ var $=Object.defineProperty;var s=(t,e)=>$(t,"name",{value:e,configurable:!0});import{createProvider as W}from"../models.js";import{createAssistantMessageEventStream as N}from"../utils/event-stream.js";const A="faux",I="faux",C="faux-1",z="Faux Model",j="http://localhost:0",O=3,S=5,_={input:0,output:0,cacheRead:0,cacheWrite:0,totalTokens:0,cost:{input:0,output:0,cacheRead:0,cacheWrite:0,total:0}};export function fauxText(t){return{type:"text",text:t}}s(fauxText,"fauxText");export function fauxThinking(t){return{type:"thinking",thinking:t}}s(fauxThinking,"fauxThinking");export function fauxToolCall(t,e,o={}){return{type:"toolCall",id:o.id??F("tool"),name:t,arguments:e}}s(fauxToolCall,"fauxToolCall");function J(t){return typeof t=="string"?[fauxText(t)]:Array.isArray(t)?t:[t]}s(J,"normalizeFauxAssistantContent");export function fauxAssistantMessage(t,e={}){return{role:"assistant",content:J(t),api:A,provider:I,model:C,usage:_,stopReason:e.stopReason??"stop",errorMessage:e.errorMessage,responseId:e.responseId,timestamp:e.timestamp??Date.now()}}s(fauxAssistantMessage,"fauxAssistantMessage");function y(t){return Math.ceil(t.length/4)}s(y,"estimateTokens");function F(t){return`${t}:${Date.now()}:${Math.random().toString(36).slice(2)}`}s(F,"randomId");function b(t){return typeof t=="string"?t:t.map(e=>e.type==="text"?e.text:`[image:${e.mimeType}:${e.data.length}]`).join(`
2
+ `)}s(b,"contentToText");function v(t){return t.map(e=>e.type==="text"?e.text:e.type==="thinking"?e.thinking:`${e.name}:${JSON.stringify(e.arguments)}`).join(`
3
+ `)}s(v,"assistantContentToText");function K(t){return[t.toolName,...t.content.map(e=>b([e]))].join(`
4
+ `)}s(K,"toolResultToText");function B(t){return t.role==="user"?b(t.content):t.role==="assistant"?v(t.content):K(t)}s(B,"messageToText");function Z(t){const e=[];t.systemPrompt&&e.push(`system:${t.systemPrompt}`);for(const o of t.messages)e.push(`${o.role}:${B(o)}`);return t.tools?.length&&e.push(`tools:${JSON.stringify(t.tools)}`),e.join(`
5
5
 
6
- `)}s(Z,"serializeContext");function G(t,e){const o=Math.min(t.length,e.length);let r=0;for(;r<o&&t[r]===e[r];)r++;return r}s(G,"commonPrefixLength");function L(t,e,o,r){const u=Z(e),l=y(u),n=y(F(t.content));let a=l,c=0,p=0;const d=o?.sessionId;if(d&&o?.cacheRetention!=="none"){const g=r.get(d);if(g){const T=G(g,u);c=y(g.slice(0,T)),p=y(u.slice(T)),a=Math.max(0,l-c)}else p=l;r.set(d,u)}return{...t,usage:{input:a,output:n,cacheRead:c,cacheWrite:p,totalTokens:a+n+c+p,cost:{input:0,output:0,cacheRead:0,cacheWrite:0,total:0}}}}s(L,"withUsageEstimate");function k(t,e,o){const r=[];let u=0;for(;u<t.length;){const l=e+Math.floor(Math.random()*(o-e+1)),n=Math.max(1,l*4);r.push(t.slice(u,u+n)),u+=n}return r.length>0?r:[""]}s(k,"splitStringByTokenSize");function V(t,e,o,r){const u=structuredClone(t);return{...u,api:e,provider:o,model:r,timestamp:u.timestamp??Date.now(),usage:u.usage??w}}s(V,"cloneMessage");function U(t,e,o,r){return{role:"assistant",content:[],api:e,provider:o,model:r,usage:w,stopReason:"error",errorMessage:t instanceof Error?t.message:String(t),timestamp:Date.now()}}s(U,"createErrorMessage");function R(t){return{...t,stopReason:"aborted",errorMessage:"Request was aborted",timestamp:Date.now()}}s(R,"createAbortedMessage");function D(t,e){if(!e||e<=0)return new Promise(r=>queueMicrotask(r));const o=y(t)/e*1e3;return new Promise(r=>setTimeout(r,o))}s(D,"scheduleChunk");async function X(t,e,o,r,u,l){const n={...e,content:[]};if(l?.aborted){const a=R(n);t.push({type:"error",reason:"aborted",error:a}),t.end(a);return}t.push({type:"start",partial:{...n}});for(let a=0;a<e.content.length;a++){if(l?.aborted){const p=R(n);t.push({type:"error",reason:"aborted",error:p}),t.end(p);return}const c=e.content[a];if(c.type==="thinking"){n.content=[...n.content,{type:"thinking",thinking:""}],t.push({type:"thinking_start",contentIndex:a,partial:{...n}});for(const p of k(c.thinking,o,r)){if(await D(p,u),l?.aborted){const d=R(n);t.push({type:"error",reason:"aborted",error:d}),t.end(d);return}n.content[a].thinking+=p,t.push({type:"thinking_delta",contentIndex:a,delta:p,partial:{...n}})}t.push({type:"thinking_end",contentIndex:a,content:c.thinking,partial:{...n}});continue}if(c.type==="text"){n.content=[...n.content,{type:"text",text:""}],t.push({type:"text_start",contentIndex:a,partial:{...n}});for(const p of k(c.text,o,r)){if(await D(p,u),l?.aborted){const d=R(n);t.push({type:"error",reason:"aborted",error:d}),t.end(d);return}n.content[a].text+=p,t.push({type:"text_delta",contentIndex:a,delta:p,partial:{...n}})}t.push({type:"text_end",contentIndex:a,content:c.text,partial:{...n}});continue}n.content=[...n.content,{type:"toolCall",id:c.id,name:c.name,arguments:{}}],t.push({type:"toolcall_start",contentIndex:a,partial:{...n}});for(const p of k(JSON.stringify(c.arguments),o,r)){if(await D(p,u),l?.aborted){const d=R(n);t.push({type:"error",reason:"aborted",error:d}),t.end(d);return}t.push({type:"toolcall_delta",contentIndex:a,delta:p,partial:{...n}})}n.content[a].arguments=c.arguments,t.push({type:"toolcall_end",contentIndex:a,toolCall:c,partial:{...n}})}if(e.stopReason==="error"||e.stopReason==="aborted"){t.push({type:"error",reason:e.stopReason,error:e}),t.end(e);return}t.push({type:"done",reason:e.stopReason,message:e}),t.end(e)}s(X,"streamWithDeltas");export function createFauxCore(t){const e=t.api??b(A),o=t.provider??I,r=Math.max(1,Math.min(t.tokenSize?.min??O,t.tokenSize?.max??S)),u=Math.max(r,t.tokenSize?.max??S);let l=[];const n=t.tokensPerSecond,a={callCount:0},c=new Map,d=(t.models?.length?t.models:[{id:C,name:z,reasoning:!1,input:["text","image"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:128e3,maxTokens:16384}]).map(i=>({id:i.id,name:i.name??i.id,api:e,provider:o,baseUrl:j,reasoning:i.reasoning??!1,input:i.input??["text","image"],cost:i.cost??{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:i.contextWindow??128e3,maxTokens:i.maxTokens??16384})),g=s((i,h,f)=>{const x=N(),M=l.shift();return a.callCount++,queueMicrotask(async()=>{try{if(await f?.onResponse?.({status:200,headers:{}},i),!M){let _=U(new Error("No more faux responses queued"),e,o,i.id);_=L(_,h,f,c),x.push({type:"error",reason:"error",error:_}),x.end(_);return}const E=typeof M=="function"?await M(h,f,a,i):M;let m=V(E,e,o,i.id);m=L(m,h,f,c),await X(x,m,r,u,n,f?.signal)}catch(E){const m=U(E,e,o,i.id);x.push({type:"error",reason:"error",error:m}),x.end(m)}}),x},"stream"),T=s((i,h,f)=>g(i,h,f),"streamSimple");function P(i){return i?d.find(h=>h.id===i):d[0]}return s(P,"getModel"),{api:e,provider:o,models:d,stream:g,streamSimple:T,getModel:P,state:a,setResponses(i){l=[...i]},appendResponses(i){l.push(...i)},getPendingResponseCount(){return l.length}}}s(createFauxCore,"createFauxCore");export function fauxProvider(t={}){const e=createFauxCore(t);return{provider:W({id:e.provider,auth:{apiKey:{name:"Faux",resolve:s(async()=>({auth:{}}),"resolve")}},models:e.models,api:{stream:e.stream,streamSimple:e.streamSimple}}),api:e.api,models:e.models,getModel:e.getModel,state:e.state,setResponses:e.setResponses,appendResponses:e.appendResponses,getPendingResponseCount:e.getPendingResponseCount}}s(fauxProvider,"fauxProvider");
6
+ `)}s(Z,"serializeContext");function G(t,e){const o=Math.min(t.length,e.length);let r=0;for(;r<o&&t[r]===e[r];)r++;return r}s(G,"commonPrefixLength");function L(t,e,o,r){const u=Z(e),d=y(u),n=y(v(t.content));let a=d,c=0,p=0;const l=o?.sessionId;if(l&&o?.cacheRetention!=="none"){const g=r.get(l);if(g){const T=G(g,u);c=y(g.slice(0,T)),p=y(u.slice(T)),a=Math.max(0,d-c)}else p=d;r.set(l,u)}return{...t,usage:{input:a,output:n,cacheRead:c,cacheWrite:p,totalTokens:a+n+c+p,cost:{input:0,output:0,cacheRead:0,cacheWrite:0,total:0}}}}s(L,"withUsageEstimate");function k(t,e,o){const r=[];let u=0;for(;u<t.length;){const d=e+Math.floor(Math.random()*(o-e+1)),n=Math.max(1,d*4);r.push(t.slice(u,u+n)),u+=n}return r.length>0?r:[""]}s(k,"splitStringByTokenSize");function V(t,e,o,r){const u=structuredClone(t);return{...u,api:e,provider:o,model:r,timestamp:u.timestamp??Date.now(),usage:u.usage??_}}s(V,"cloneMessage");function U(t,e,o,r){return{role:"assistant",content:[],api:e,provider:o,model:r,usage:_,stopReason:"error",errorMessage:t instanceof Error?t.message:String(t),timestamp:Date.now()}}s(U,"createErrorMessage");function R(t){return{...t,stopReason:"aborted",errorMessage:"Request was aborted",timestamp:Date.now()}}s(R,"createAbortedMessage");function D(t,e){if(!e||e<=0)return new Promise(r=>queueMicrotask(r));const o=y(t)/e*1e3;return new Promise(r=>setTimeout(r,o))}s(D,"scheduleChunk");async function X(t,e,o,r,u,d){const n={...e,content:[],stopReason:"pending"};if(d?.aborted){const a=R(n);t.push({type:"error",reason:"aborted",error:a}),t.end(a);return}t.push({type:"start",partial:{...n}});for(let a=0;a<e.content.length;a++){if(d?.aborted){const p=R(n);t.push({type:"error",reason:"aborted",error:p}),t.end(p);return}const c=e.content[a];if(c.type==="thinking"){n.content=[...n.content,{type:"thinking",thinking:""}],t.push({type:"thinking_start",contentIndex:a,partial:{...n}});for(const p of k(c.thinking,o,r)){if(await D(p,u),d?.aborted){const l=R(n);t.push({type:"error",reason:"aborted",error:l}),t.end(l);return}n.content[a].thinking+=p,t.push({type:"thinking_delta",contentIndex:a,delta:p,partial:{...n}})}t.push({type:"thinking_end",contentIndex:a,content:c.thinking,partial:{...n}});continue}if(c.type==="text"){n.content=[...n.content,{type:"text",text:""}],t.push({type:"text_start",contentIndex:a,partial:{...n}});for(const p of k(c.text,o,r)){if(await D(p,u),d?.aborted){const l=R(n);t.push({type:"error",reason:"aborted",error:l}),t.end(l);return}n.content[a].text+=p,t.push({type:"text_delta",contentIndex:a,delta:p,partial:{...n}})}t.push({type:"text_end",contentIndex:a,content:c.text,partial:{...n}});continue}n.content=[...n.content,{type:"toolCall",id:c.id,name:c.name,arguments:{}}],t.push({type:"toolcall_start",contentIndex:a,partial:{...n}});for(const p of k(JSON.stringify(c.arguments),o,r)){if(await D(p,u),d?.aborted){const l=R(n);t.push({type:"error",reason:"aborted",error:l}),t.end(l);return}t.push({type:"toolcall_delta",contentIndex:a,delta:p,partial:{...n}})}n.content[a].arguments=c.arguments,t.push({type:"toolcall_end",contentIndex:a,toolCall:c,partial:{...n}})}if(e.stopReason==="pending")throw new Error("Faux response ended without a stop reason");if(e.stopReason==="error"||e.stopReason==="aborted"){t.push({type:"error",reason:e.stopReason,error:e}),t.end(e);return}t.push({type:"done",reason:e.stopReason,message:e}),t.end(e)}s(X,"streamWithDeltas");export function createFauxCore(t){const e=t.api??F(A),o=t.provider??I,r=Math.max(1,Math.min(t.tokenSize?.min??O,t.tokenSize?.max??S)),u=Math.max(r,t.tokenSize?.max??S);let d=[];const n=t.tokensPerSecond,a={callCount:0},c=new Map,l=(t.models?.length?t.models:[{id:C,name:z,reasoning:!1,input:["text","image"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:128e3,maxTokens:16384}]).map(i=>({id:i.id,name:i.name??i.id,api:e,provider:o,baseUrl:j,reasoning:i.reasoning??!1,input:i.input??["text","image"],cost:i.cost??{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:i.contextWindow??128e3,maxTokens:i.maxTokens??16384})),g=s((i,h,f)=>{const x=N(),M=d.shift();return a.callCount++,queueMicrotask(async()=>{try{if(await f?.onResponse?.({status:200,headers:{}},i),!M){let w=U(new Error("No more faux responses queued"),e,o,i.id);w=L(w,h,f,c),x.push({type:"error",reason:"error",error:w}),x.end(w);return}const E=typeof M=="function"?await M(h,f,a,i):M;let m=V(E,e,o,i.id);m=L(m,h,f,c),await X(x,m,r,u,n,f?.signal)}catch(E){const m=U(E,e,o,i.id);x.push({type:"error",reason:"error",error:m}),x.end(m)}}),x},"stream"),T=s((i,h,f)=>g(i,h,f),"streamSimple");function P(i){return i?l.find(h=>h.id===i):l[0]}return s(P,"getModel"),{api:e,provider:o,models:l,stream:g,streamSimple:T,getModel:P,state:a,setResponses(i){d=[...i]},appendResponses(i){d.push(...i)},getPendingResponseCount(){return d.length}}}s(createFauxCore,"createFauxCore");export function fauxProvider(t={}){const e=createFauxCore(t);return{provider:W({id:e.provider,auth:{apiKey:{name:"Faux",resolve:s(async()=>({auth:{}}),"resolve")}},models:e.models,api:{stream:e.stream,streamSimple:e.streamSimple}}),api:e.api,models:e.models,getModel:e.getModel,state:e.state,setResponses:e.setResponses,appendResponses:e.appendResponses,getPendingResponseCount:e.getPendingResponseCount}}s(fauxProvider,"fauxProvider");
@@ -1 +1 @@
1
- import o from"./data/fireworks.json";import{flattenModelCatalog as t}from"../model-catalog.js";export const FIREWORKS_MODELS=t("fireworks",o);
1
+ import o from"./data/fireworks.json"with{type:"json"};import{flattenModelCatalog as t}from"../model-catalog.js";export const FIREWORKS_MODELS=t("fireworks",o);
@@ -1 +1 @@
1
- import o from"./data/github-copilot.json";import{flattenModelCatalog as t}from"../model-catalog.js";export const GITHUB_COPILOT_MODELS=t("github-copilot",o);
1
+ import o from"./data/github-copilot.json"with{type:"json"};import{flattenModelCatalog as t}from"../model-catalog.js";export const GITHUB_COPILOT_MODELS=t("github-copilot",o);
@@ -1 +1 @@
1
- import o from"./data/google-vertex.json";import{flattenModelCatalog as t}from"../model-catalog.js";export const GOOGLE_VERTEX_MODELS=t("google-vertex",o);
1
+ import o from"./data/google-vertex.json"with{type:"json"};import{flattenModelCatalog as t}from"../model-catalog.js";export const GOOGLE_VERTEX_MODELS=t("google-vertex",o);
@@ -1 +1 @@
1
- import o from"./data/google.json";import{flattenModelCatalog as t}from"../model-catalog.js";export const GOOGLE_MODELS=t("google",o);
1
+ import o from"./data/google.json"with{type:"json"};import{flattenModelCatalog as t}from"../model-catalog.js";export const GOOGLE_MODELS=t("google",o);
@@ -1 +1 @@
1
- import o from"./data/groq.json";import{flattenModelCatalog as t}from"../model-catalog.js";export const GROQ_MODELS=t("groq",o);
1
+ import o from"./data/groq.json"with{type:"json"};import{flattenModelCatalog as t}from"../model-catalog.js";export const GROQ_MODELS=t("groq",o);
@@ -1 +1 @@
1
- import o from"./data/huggingface.json";import{flattenModelCatalog as t}from"../model-catalog.js";export const HUGGINGFACE_MODELS=t("huggingface",o);
1
+ import o from"./data/huggingface.json"with{type:"json"};import{flattenModelCatalog as t}from"../model-catalog.js";export const HUGGINGFACE_MODELS=t("huggingface",o);
@@ -1 +1 @@
1
- import o from"./data/kimi-coding.json";import{flattenModelCatalog as t}from"../model-catalog.js";export const KIMI_CODING_MODELS=t("kimi-coding",o);
1
+ import o from"./data/kimi-coding.json"with{type:"json"};import{flattenModelCatalog as t}from"../model-catalog.js";export const KIMI_CODING_MODELS=t("kimi-coding",o);
@@ -1 +1 @@
1
- import o from"./data/minimax-cn.json";import{flattenModelCatalog as t}from"../model-catalog.js";export const MINIMAX_CN_MODELS=t("minimax-cn",o);
1
+ import o from"./data/minimax-cn.json"with{type:"json"};import{flattenModelCatalog as t}from"../model-catalog.js";export const MINIMAX_CN_MODELS=t("minimax-cn",o);
@@ -1 +1 @@
1
- import o from"./data/minimax.json";import{flattenModelCatalog as t}from"../model-catalog.js";export const MINIMAX_MODELS=t("minimax",o);
1
+ import o from"./data/minimax.json"with{type:"json"};import{flattenModelCatalog as t}from"../model-catalog.js";export const MINIMAX_MODELS=t("minimax",o);
@@ -1 +1 @@
1
- import t from"./data/mistral.json";import{flattenModelCatalog as o}from"../model-catalog.js";export const MISTRAL_MODELS=o("mistral",t);
1
+ import t from"./data/mistral.json"with{type:"json"};import{flattenModelCatalog as o}from"../model-catalog.js";export const MISTRAL_MODELS=o("mistral",t);
@@ -1 +1 @@
1
- import o from"./data/moonshotai-cn.json";import{flattenModelCatalog as t}from"../model-catalog.js";export const MOONSHOTAI_CN_MODELS=t("moonshotai-cn",o);
1
+ import o from"./data/moonshotai-cn.json"with{type:"json"};import{flattenModelCatalog as t}from"../model-catalog.js";export const MOONSHOTAI_CN_MODELS=t("moonshotai-cn",o);
@@ -1 +1 @@
1
- import o from"./data/moonshotai.json";import{flattenModelCatalog as t}from"../model-catalog.js";export const MOONSHOTAI_MODELS=t("moonshotai",o);
1
+ import o from"./data/moonshotai.json"with{type:"json"};import{flattenModelCatalog as t}from"../model-catalog.js";export const MOONSHOTAI_MODELS=t("moonshotai",o);
@@ -1 +1 @@
1
- import o from"./data/nvidia.json";import{flattenModelCatalog as t}from"../model-catalog.js";export const NVIDIA_MODELS=t("nvidia",o);
1
+ import o from"./data/nvidia.json"with{type:"json"};import{flattenModelCatalog as t}from"../model-catalog.js";export const NVIDIA_MODELS=t("nvidia",o);
@@ -1 +1 @@
1
- import o from"./data/openai-codex.json";import{flattenModelCatalog as t}from"../model-catalog.js";export const OPENAI_CODEX_MODELS=t("openai-codex",o);
1
+ import o from"./data/openai-codex.json"with{type:"json"};import{flattenModelCatalog as t}from"../model-catalog.js";export const OPENAI_CODEX_MODELS=t("openai-codex",o);
@@ -1 +1 @@
1
- import o from"./data/openai.json";import{flattenModelCatalog as t}from"../model-catalog.js";export const OPENAI_MODELS=t("openai",o);
1
+ import o from"./data/openai.json"with{type:"json"};import{flattenModelCatalog as t}from"../model-catalog.js";export const OPENAI_MODELS=t("openai",o);
@@ -1 +1 @@
1
- import o from"./data/opencode-go.json";import{flattenModelCatalog as t}from"../model-catalog.js";export const OPENCODE_GO_MODELS=t("opencode-go",o);
1
+ import o from"./data/opencode-go.json"with{type:"json"};import{flattenModelCatalog as t}from"../model-catalog.js";export const OPENCODE_GO_MODELS=t("opencode-go",o);
@@ -1 +1 @@
1
- import o from"./data/opencode.json";import{flattenModelCatalog as t}from"../model-catalog.js";export const OPENCODE_MODELS=t("opencode",o);
1
+ import o from"./data/opencode.json"with{type:"json"};import{flattenModelCatalog as t}from"../model-catalog.js";export const OPENCODE_MODELS=t("opencode",o);
@@ -1 +1 @@
1
- import o from"./data/openrouter.json";import{flattenModelCatalog as t}from"../model-catalog.js";export const OPENROUTER_MODELS=t("openrouter",o);
1
+ import o from"./data/openrouter.json"with{type:"json"};import{flattenModelCatalog as t}from"../model-catalog.js";export const OPENROUTER_MODELS=t("openrouter",o);
@@ -1 +1 @@
1
- import o from"./data/qwen-token-plan-cn.json";import{flattenModelCatalog as t}from"../model-catalog.js";export const QWEN_TOKEN_PLAN_CN_MODELS=t("qwen-token-plan-cn",o);
1
+ import o from"./data/qwen-token-plan-cn.json"with{type:"json"};import{flattenModelCatalog as t}from"../model-catalog.js";export const QWEN_TOKEN_PLAN_CN_MODELS=t("qwen-token-plan-cn",o);
@@ -1 +1 @@
1
- import o from"./data/qwen-token-plan.json";import{flattenModelCatalog as t}from"../model-catalog.js";export const QWEN_TOKEN_PLAN_MODELS=t("qwen-token-plan",o);
1
+ import o from"./data/qwen-token-plan.json"with{type:"json"};import{flattenModelCatalog as t}from"../model-catalog.js";export const QWEN_TOKEN_PLAN_MODELS=t("qwen-token-plan",o);
@@ -1 +1 @@
1
- import t from"./data/together.json";import{flattenModelCatalog as o}from"../model-catalog.js";export const TOGETHER_MODELS=o("together",t);
1
+ import t from"./data/together.json"with{type:"json"};import{flattenModelCatalog as o}from"../model-catalog.js";export const TOGETHER_MODELS=o("together",t);
@@ -1 +1 @@
1
- import t from"./data/vercel-ai-gateway.json";import{flattenModelCatalog as o}from"../model-catalog.js";export const VERCEL_AI_GATEWAY_MODELS=o("vercel-ai-gateway",t);
1
+ import t from"./data/vercel-ai-gateway.json"with{type:"json"};import{flattenModelCatalog as o}from"../model-catalog.js";export const VERCEL_AI_GATEWAY_MODELS=o("vercel-ai-gateway",t);
@@ -1 +1 @@
1
- import o from"./data/xai.json";import{flattenModelCatalog as t}from"../model-catalog.js";export const XAI_MODELS=t("xai",o);
1
+ import o from"./data/xai.json"with{type:"json"};import{flattenModelCatalog as t}from"../model-catalog.js";export const XAI_MODELS=t("xai",o);
@@ -1 +1 @@
1
- import o from"./data/xiaomi-token-plan-ams.json";import{flattenModelCatalog as t}from"../model-catalog.js";export const XIAOMI_TOKEN_PLAN_AMS_MODELS=t("xiaomi-token-plan-ams",o);
1
+ import o from"./data/xiaomi-token-plan-ams.json"with{type:"json"};import{flattenModelCatalog as t}from"../model-catalog.js";export const XIAOMI_TOKEN_PLAN_AMS_MODELS=t("xiaomi-token-plan-ams",o);
@@ -1 +1 @@
1
- import o from"./data/xiaomi-token-plan-cn.json";import{flattenModelCatalog as t}from"../model-catalog.js";export const XIAOMI_TOKEN_PLAN_CN_MODELS=t("xiaomi-token-plan-cn",o);
1
+ import o from"./data/xiaomi-token-plan-cn.json"with{type:"json"};import{flattenModelCatalog as t}from"../model-catalog.js";export const XIAOMI_TOKEN_PLAN_CN_MODELS=t("xiaomi-token-plan-cn",o);
@@ -1 +1 @@
1
- import o from"./data/xiaomi-token-plan-sgp.json";import{flattenModelCatalog as t}from"../model-catalog.js";export const XIAOMI_TOKEN_PLAN_SGP_MODELS=t("xiaomi-token-plan-sgp",o);
1
+ import o from"./data/xiaomi-token-plan-sgp.json"with{type:"json"};import{flattenModelCatalog as t}from"../model-catalog.js";export const XIAOMI_TOKEN_PLAN_SGP_MODELS=t("xiaomi-token-plan-sgp",o);
@@ -1 +1 @@
1
- import o from"./data/xiaomi.json";import{flattenModelCatalog as t}from"../model-catalog.js";export const XIAOMI_MODELS=t("xiaomi",o);
1
+ import o from"./data/xiaomi.json"with{type:"json"};import{flattenModelCatalog as t}from"../model-catalog.js";export const XIAOMI_MODELS=t("xiaomi",o);
@@ -1 +1 @@
1
- import o from"./data/zai-coding-cn.json";import{flattenModelCatalog as t}from"../model-catalog.js";export const ZAI_CODING_CN_MODELS=t("zai-coding-cn",o);
1
+ import o from"./data/zai-coding-cn.json"with{type:"json"};import{flattenModelCatalog as t}from"../model-catalog.js";export const ZAI_CODING_CN_MODELS=t("zai-coding-cn",o);
@@ -1 +1 @@
1
- import o from"./data/zai.json";import{flattenModelCatalog as t}from"../model-catalog.js";export const ZAI_MODELS=t("zai",o);
1
+ import o from"./data/zai.json"with{type:"json"};import{flattenModelCatalog as t}from"../model-catalog.js";export const ZAI_MODELS=t("zai",o);
@@ -1 +1 @@
1
- {"name":"@earendil-works/pi-ai","version":"0.82.1","type":"module","main":"./dist/index.js","sideEffects":["./dist/compat.js","./dist/images.js","./dist/providers/images/register-builtins.js"],"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./compat":{"types":"./dist/compat.d.ts","import":"./dist/compat.js"},"./providers/*":{"types":"./dist/providers/*.d.ts","import":"./dist/providers/*.js"},"./api/*":{"types":"./dist/api/*.d.ts","import":"./dist/api/*.js"},"./oauth":{"types":"./dist/oauth.d.ts","import":"./dist/oauth.js"},"./bedrock-provider":{"types":"./dist/bedrock-provider.d.ts","import":"./dist/bedrock-provider.js"},"./bun-oauth":{"types":"./dist/bun-oauth.d.ts","import":"./dist/bun-oauth.js"}},"bin":{"pi-ai":"dist/cli.js"},"dependencies":{"@anthropic-ai/sdk":"0.91.1","@aws-sdk/client-bedrock-runtime":"3.1048.0","@google/genai":"1.52.0","@mistralai/mistralai":"2.2.6","@opentelemetry/api":"1.9.0","@smithy/node-http-handler":"4.7.3","http-proxy-agent":"7.0.2","https-proxy-agent":"7.0.6","openai":"6.26.0","partial-json":"0.1.7","typebox":"1.1.38"},"license":"MIT","engines":{"node":">=22.19.0"}}
1
+ {"name":"@earendil-works/pi-ai","version":"0.83.0","type":"module","main":"./dist/index.js","sideEffects":["./dist/compat.js","./dist/images.js","./dist/providers/images/register-builtins.js"],"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./compat":{"types":"./dist/compat.d.ts","import":"./dist/compat.js"},"./providers/*":{"types":"./dist/providers/*.d.ts","import":"./dist/providers/*.js"},"./api/*":{"types":"./dist/api/*.d.ts","import":"./dist/api/*.js"},"./oauth":{"types":"./dist/oauth.d.ts","import":"./dist/oauth.js"},"./bedrock-provider":{"types":"./dist/bedrock-provider.d.ts","import":"./dist/bedrock-provider.js"},"./bun-oauth":{"types":"./dist/bun-oauth.d.ts","import":"./dist/bun-oauth.js"}},"bin":{"pi-ai":"dist/cli.js"},"dependencies":{"@anthropic-ai/sdk":"0.91.1","@aws-sdk/client-bedrock-runtime":"3.1048.0","@google/genai":"1.52.0","@mistralai/mistralai":"2.2.6","@opentelemetry/api":"1.9.0","@smithy/node-http-handler":"4.7.3","http-proxy-agent":"7.0.2","https-proxy-agent":"7.0.6","openai":"6.26.0","partial-json":"0.1.7","typebox":"1.3.7"},"license":"MIT","engines":{"node":">=22.19.0"}}
@@ -1 +1 @@
1
- var p=Object.defineProperty;var n=(t,e)=>p(t,"name",{value:e,configurable:!0});import{ccount as h}from"ccount";import{ok as d}from"devlop";import{unicodePunctuation as g,unicodeWhitespace as x}from"micromark-util-character";import{findAndReplace as w}from"mdast-util-find-and-replace";const u="phrasing",s=["autolink","link","image","label"];export function gfmAutolinkLiteralFromMarkdown(){return{transforms:[E],enter:{literalAutolink:A,literalAutolinkEmail:c,literalAutolinkHttp:c,literalAutolinkWww:c},exit:{literalAutolink:P,literalAutolinkEmail:y,literalAutolinkHttp:m,literalAutolinkWww:L}}}n(gfmAutolinkLiteralFromMarkdown,"gfmAutolinkLiteralFromMarkdown");export function gfmAutolinkLiteralToMarkdown(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:u,notInConstruct:s},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:u,notInConstruct:s},{character:":",before:"[ps]",after:"\\/",inConstruct:u,notInConstruct:s}]}}n(gfmAutolinkLiteralToMarkdown,"gfmAutolinkLiteralToMarkdown");function A(t){this.enter({type:"link",title:null,url:"",children:[]},t)}n(A,"enterLiteralAutolink");function c(t){this.config.enter.autolinkProtocol.call(this,t)}n(c,"enterLiteralAutolinkValue");function m(t){this.config.exit.autolinkProtocol.call(this,t)}n(m,"exitLiteralAutolinkHttp");function L(t){this.config.exit.data.call(this,t);const e=this.stack[this.stack.length-1];d(e.type==="link"),e.url="http://"+this.sliceSerialize(t)}n(L,"exitLiteralAutolinkWww");function y(t){this.config.exit.autolinkEmail.call(this,t)}n(y,"exitLiteralAutolinkEmail");function P(t){this.exit(t)}n(P,"exitLiteralAutolink");function E(t){w(t,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,W],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,_]],{ignore:["link","linkReference"]})}n(E,"transformGfmAutolinkLiterals");function W(t,e,i,l,a){let r="";if(!k(a)||(/^w/i.test(e)&&(i=e+i,e="",r="http://"),!v(i)))return!1;const o=C(i+l);if(!o[0])return!1;const f={type:"link",title:null,url:r+e+o[0],children:[{type:"text",value:e+o[0]}]};return o[1]?[f,{type:"text",value:o[1]}]:f}n(W,"findUrl");function _(t,e,i,l){return!k(l,!0)||/[-\d_]$/.test(i)?!1:{type:"link",title:null,url:"mailto:"+e+"@"+i,children:[{type:"text",value:e+"@"+i}]}}n(_,"findEmail");function v(t){const e=t.split(".");return!(e.length<2||e[e.length-1]&&(/_/.test(e[e.length-1])||!/[a-zA-Z\d]/.test(e[e.length-1]))||e[e.length-2]&&(/_/.test(e[e.length-2])||!/[a-zA-Z\d]/.test(e[e.length-2])))}n(v,"isCorrectDomain");function C(t){const e=/[!"&'),.:;<>?\]}]+$/.exec(t);if(!e)return[t,void 0];t=t.slice(0,e.index);let i=e[0],l=i.indexOf(")");const a=h(t,"(");let r=h(t,")");for(;l!==-1&&a>r;)t+=i.slice(0,l+1),i=i.slice(l+1),l=i.indexOf(")"),r++;return[t,i]}n(C,"splitUrl");function k(t,e){const i=t.input.charCodeAt(t.index-1);return(t.index===0||x(i)||g(i))&&(!e||i!==47)}n(k,"previous");
1
+ var p=Object.defineProperty;var n=(t,e)=>p(t,"name",{value:e,configurable:!0});import{ccount as h}from"ccount";import{ok as d}from"devlop";import{unicodePunctuation as g,unicodeWhitespace as x}from"micromark-util-character";import{findAndReplace as w}from"mdast-util-find-and-replace";const u="phrasing",s=["autolink","link","image","label"];export function gfmAutolinkLiteralFromMarkdown(){return{transforms:[E],enter:{literalAutolink:A,literalAutolinkEmail:c,literalAutolinkHttp:c,literalAutolinkWww:c},exit:{literalAutolink:P,literalAutolinkEmail:y,literalAutolinkHttp:m,literalAutolinkWww:L}}}n(gfmAutolinkLiteralFromMarkdown,"gfmAutolinkLiteralFromMarkdown");export function gfmAutolinkLiteralToMarkdown(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:u,notInConstruct:s},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:u,notInConstruct:s},{character:":",before:"[ps]",after:"\\/",inConstruct:u,notInConstruct:s}]}}n(gfmAutolinkLiteralToMarkdown,"gfmAutolinkLiteralToMarkdown");function A(t){this.enter({type:"link",title:null,url:"",children:[]},t)}n(A,"enterLiteralAutolink");function c(t){this.config.enter.autolinkProtocol.call(this,t)}n(c,"enterLiteralAutolinkValue");function m(t){this.config.exit.autolinkProtocol.call(this,t)}n(m,"exitLiteralAutolinkHttp");function L(t){this.config.exit.data.call(this,t);const e=this.stack[this.stack.length-1];d(e.type==="link"),e.url="http://"+this.sliceSerialize(t)}n(L,"exitLiteralAutolinkWww");function y(t){this.config.exit.autolinkEmail.call(this,t)}n(y,"exitLiteralAutolinkEmail");function P(t){this.exit(t)}n(P,"exitLiteralAutolink");function E(t){w(t,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,W],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),_]],{ignore:["link","linkReference"]})}n(E,"transformGfmAutolinkLiterals");function W(t,e,i,l,a){let r="";if(!k(a)||(/^w/i.test(e)&&(i=e+i,e="",r="http://"),!v(i)))return!1;const o=C(i+l);if(!o[0])return!1;const f={type:"link",title:null,url:r+e+o[0],children:[{type:"text",value:e+o[0]}]};return o[1]?[f,{type:"text",value:o[1]}]:f}n(W,"findUrl");function _(t,e,i,l){return!k(l,!0)||/[-\d_]$/.test(i)?!1:{type:"link",title:null,url:"mailto:"+e+"@"+i,children:[{type:"text",value:e+"@"+i}]}}n(_,"findEmail");function v(t){const e=t.split(".");return!(e.length<2||e[e.length-1]&&(/_/.test(e[e.length-1])||!/[a-zA-Z\d]/.test(e[e.length-1]))||e[e.length-2]&&(/_/.test(e[e.length-2])||!/[a-zA-Z\d]/.test(e[e.length-2])))}n(v,"isCorrectDomain");function C(t){const e=/[!"&'),.:;<>?\]}]+$/.exec(t);if(!e)return[t,void 0];t=t.slice(0,e.index);let i=e[0],l=i.indexOf(")");const a=h(t,"(");let r=h(t,")");for(;l!==-1&&a>r;)t+=i.slice(0,l+1),i=i.slice(l+1),l=i.indexOf(")"),r++;return[t,i]}n(C,"splitUrl");function k(t,e){const i=t.input.charCodeAt(t.index-1);return(t.index===0||x(i)||g(i))&&(!e||i!==47)}n(k,"previous");
@@ -1 +1 @@
1
- var a=Object.defineProperty;var r=(n,o)=>a(n,"name",{value:o,configurable:!0});import{codes as t}from"micromark-util-symbol";export const asciiAlpha=i(/[A-Za-z]/),asciiAlphanumeric=i(/[\dA-Za-z]/),asciiAtext=i(/[#-'*+\--9=?A-Z^-~]/);export function asciiControl(n){return n!==null&&(n<t.space||n===t.del)}r(asciiControl,"asciiControl");export const asciiDigit=i(/\d/),asciiHexDigit=i(/[\dA-Fa-f]/),asciiPunctuation=i(/[!-/:-@[-`{-~]/);export function markdownLineEnding(n){return n!==null&&n<t.horizontalTab}r(markdownLineEnding,"markdownLineEnding");export function markdownLineEndingOrSpace(n){return n!==null&&(n<t.nul||n===t.space)}r(markdownLineEndingOrSpace,"markdownLineEndingOrSpace");export function markdownSpace(n){return n===t.horizontalTab||n===t.virtualSpace||n===t.space}r(markdownSpace,"markdownSpace");export const unicodePunctuation=i(/\p{P}|\p{S}/u),unicodeWhitespace=i(/\s/);function i(n){return o;function o(e){return e!==null&&e>-1&&n.test(String.fromCharCode(e))}}r(i,"regexCheck");
1
+ var a=Object.defineProperty;var r=(n,o)=>a(n,"name",{value:o,configurable:!0});import{codes as t}from"micromark-util-symbol";export const asciiAlpha=i(/[A-Za-z]/),asciiAlphanumeric=i(/[\dA-Za-z]/),asciiAtext=i(/[#-'*+\--9=?A-Z^-~]/);export function asciiControl(n){return n!==null&&(n<t.space||n===t.del)}r(asciiControl,"asciiControl");export const asciiDigit=i(/\d/),asciiHexDigit=i(/[\dA-Fa-f]/),asciiPunctuation=i(/[!-/:-@[-`{-~]/);export function markdownLineEnding(n){return n!==null&&n<t.horizontalTab}r(markdownLineEnding,"markdownLineEnding");export function markdownLineEndingOrSpace(n){return n!==null&&(n<t.nul||n===t.space)}r(markdownLineEndingOrSpace,"markdownLineEndingOrSpace");export function markdownSpace(n){return n===t.horizontalTab||n===t.virtualSpace||n===t.space}r(markdownSpace,"markdownSpace");export const unicodePunctuation=i(new RegExp("\\p{P}|\\p{S}","u")),unicodeWhitespace=i(/\s/);function i(n){return o;function o(e){return e!==null&&e>-1&&n.test(String.fromCharCode(e))}}r(i,"regexCheck");
@@ -1 +1 @@
1
- var e=Object.defineProperty;var i=(n,r)=>e(n,"name",{value:r,configurable:!0});export const asciiAlpha=t(/[A-Za-z]/),asciiAlphanumeric=t(/[\dA-Za-z]/),asciiAtext=t(/[#-'*+\--9=?A-Z^-~]/);export function asciiControl(n){return n!==null&&(n<32||n===127)}i(asciiControl,"asciiControl");export const asciiDigit=t(/\d/),asciiHexDigit=t(/[\dA-Fa-f]/),asciiPunctuation=t(/[!-/:-@[-`{-~]/);export function markdownLineEnding(n){return n!==null&&n<-2}i(markdownLineEnding,"markdownLineEnding");export function markdownLineEndingOrSpace(n){return n!==null&&(n<0||n===32)}i(markdownLineEndingOrSpace,"markdownLineEndingOrSpace");export function markdownSpace(n){return n===-2||n===-1||n===32}i(markdownSpace,"markdownSpace");export const unicodePunctuation=t(/\p{P}|\p{S}/u),unicodeWhitespace=t(/\s/);function t(n){return r;function r(o){return o!==null&&o>-1&&n.test(String.fromCharCode(o))}}i(t,"regexCheck");
1
+ var e=Object.defineProperty;var i=(n,r)=>e(n,"name",{value:r,configurable:!0});export const asciiAlpha=t(/[A-Za-z]/),asciiAlphanumeric=t(/[\dA-Za-z]/),asciiAtext=t(/[#-'*+\--9=?A-Z^-~]/);export function asciiControl(n){return n!==null&&(n<32||n===127)}i(asciiControl,"asciiControl");export const asciiDigit=t(/\d/),asciiHexDigit=t(/[\dA-Fa-f]/),asciiPunctuation=t(/[!-/:-@[-`{-~]/);export function markdownLineEnding(n){return n!==null&&n<-2}i(markdownLineEnding,"markdownLineEnding");export function markdownLineEndingOrSpace(n){return n!==null&&(n<0||n===32)}i(markdownLineEndingOrSpace,"markdownLineEndingOrSpace");export function markdownSpace(n){return n===-2||n===-1||n===32}i(markdownSpace,"markdownSpace");export const unicodePunctuation=t(new RegExp("\\p{P}|\\p{S}","u")),unicodeWhitespace=t(/\s/);function t(n){return r;function r(o){return o!==null&&o>-1&&n.test(String.fromCharCode(o))}}i(t,"regexCheck");
@@ -30,7 +30,7 @@
30
30
  | &&
31
31
  | .
32
32
  `.replace(/\s+/g,""),"gsu");function Qe(e,n={}){let t={flags:"",...n,rules:{captureGroup:!1,singleline:!1,...n.rules}};if(typeof e!="string")throw new Error("String expected as pattern");let a=mn(t.flags),o=[a.extended],i={captureGroup:t.rules.captureGroup,getCurrentModX(){return o.at(-1)},numOpenGroups:0,popModX(){o.pop()},pushModX(c){o.push(c)},replaceCurrentModX(c){o[o.length-1]=c},singleline:t.rules.singleline},r=[],l;for(B.lastIndex=0;l=B.exec(e);){let c=qe(i,e,l[0],B.lastIndex);c.tokens?r.push(...c.tokens):c.token&&r.push(c.token),c.lastIndex!==void 0&&(B.lastIndex=c.lastIndex)}let u=[],_=0;r.filter(c=>c.type==="GroupOpen").forEach(c=>{c.kind==="capturing"?c.number=++_:c.raw==="("&&u.push(c)}),_||u.forEach((c,p)=>{c.kind="capturing",c.number=p+1});let h=_||u.length;return{tokens:r.map(c=>c.type==="EscapedNumber"?In(c,h):c).flat(),flags:a}}s(Qe,"be");function qe(e,n,t,a){let[o,i]=t;if(t==="["||t==="[^"){let r=Ye(n,t,a);return{tokens:r.tokens,lastIndex:r.lastIndex}}if(o==="\\"){if("AbBGyYzZ".includes(i))return{token:he(t,t)};if(/^\\g[<']/.test(t)){if(!/^\\g(?:<[^>]+>|'[^']+')$/.test(t))throw new Error(`Invalid group name "${t}"`);return{token:_n(t)}}if(/^\\k[<']/.test(t)){if(!/^\\k(?:<[^>]+>|'[^']+')$/.test(t))throw new Error(`Invalid group name "${t}"`);return{token:ge(t)}}if(i==="K")return{token:me("keep",t)};if(i==="N"||i==="R")return{token:S("newline",t,{negate:i==="N"})};if(i==="O")return{token:S("any",t)};if(i==="X")return{token:S("text_segment",t)};let r=ce(t,{inCharClass:!1});return Array.isArray(r)?{tokens:r}:{token:r}}if(o==="("){if(i==="*")return{token:hn(t)};if(t==="(?{")throw new Error(`Unsupported callout "${t}"`);if(t.startsWith("(?#")){if(n[a]!==")")throw new Error('Unclosed comment group "(?#"');return{lastIndex:a+1}}if(/^\(\?[-imx]+[:)]$/.test(t))return{token:cn(t,e)};if(e.pushModX(e.getCurrentModX()),e.numOpenGroups++,t==="("&&!e.captureGroup||t==="(?:")return{token:v("group",t)};if(t==="(?>")return{token:v("atomic",t)};if(t==="(?="||t==="(?!"||t==="(?<="||t==="(?<!")return{token:v(t[2]==="<"?"lookbehind":"lookahead",t,{negate:t.endsWith("!")})};if(t==="("&&e.captureGroup||t.startsWith("(?<")&&t.endsWith(">")||t.startsWith("(?'")&&t.endsWith("'"))return{token:v("capturing",t,{...t!=="("&&{name:t.slice(3,-1)}})};if(t.startsWith("(?~")){if(t==="(?~|")throw new Error(`Unsupported absence function kind "${t}"`);return{token:v("absence_repeater",t)}}throw t==="(?("?new Error(`Unsupported conditional "${t}"`):new Error(`Invalid or unsupported group option "${t}"`)}if(t===")"){if(e.popModX(),e.numOpenGroups--,e.numOpenGroups<0)throw new Error('Unmatched ")"');return{token:ln(t)}}if(e.getCurrentModX()){if(t==="#"){let r=n.indexOf(`
33
- `,a);return{lastIndex:r===-1?n.length:r}}if(/^\s$/.test(t)){let r=/\s+/y;return r.lastIndex=a,{lastIndex:r.exec(n)?r.lastIndex:a}}}if(t===".")return{token:S("dot",t)};if(t==="^"||t==="$"){let r=e.singleline?{"^":d`\A`,$:d`\Z`}[t]:t;return{token:he(r,t)}}return t==="|"?{token:nn(t)}:X.test(t)?{tokens:bn(t)}:{token:w(I(t),t)}}s(qe,"mt");function Ye(e,n,t){let a=[fe(n[1]==="^",n)],o=1,i;for(Z.lastIndex=t;i=Z.exec(e);){let r=i[0];if(r[0]==="["&&r[1]!==":")o++,a.push(fe(r[1]==="^",r));else if(r==="]"){if(a.at(-1).type==="CharacterClassOpen")a.push(w(93,r));else if(o--,a.push(tn(r)),!o)break}else{let l=en(r);Array.isArray(l)?a.push(...l):a.push(l)}}return{tokens:a,lastIndex:Z.lastIndex||e.length}}s(Ye,"yt");function en(e){if(e[0]==="\\")return ce(e,{inCharClass:!0});if(e[0]==="["){let n=/\[:(?<negate>\^?)(?<name>[a-z]+):\]/.exec(e);if(!n||!J.has(n.groups.name))throw new Error(`Invalid POSIX class "${e}"`);return S("posix",e,{value:n.groups.name,negate:!!n.groups.negate})}return e==="-"?rn(e):e==="&&"?an(e):w(I(e),e)}s(en,"gt");function ce(e,{inCharClass:n}){let t=e[1];if(t==="c"||t==="C")return pn(e);if("dDhHsSwW".includes(t))return gn(e);if(e.startsWith(d`\o{`))throw new Error(`Incomplete, invalid, or unsupported octal code point "${e}"`);if(/^\\[pP]\{/.test(e)){if(e.length===3)throw new Error(`Incomplete or invalid Unicode property "${e}"`);return fn(e)}if(/^\\x[89A-Fa-f]\p{AHex}/u.test(e))try{let a=e.split(/\\x/).slice(1).map(r=>parseInt(r,16)),o=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}).decode(new Uint8Array(a)),i=new TextEncoder;return[...o].map(r=>{let l=[...i.encode(r)].map(u=>`\\x${u.toString(16)}`).join("");return w(I(r),l)})}catch{throw new Error(`Multibyte code "${e}" incomplete or invalid in Oniguruma`)}if(t==="u"||t==="x")return w(yn(e),e);if(ye.has(t))return w(ye.get(t),e);if(/\d/.test(t))return on(n,e);if(e==="\\")throw new Error(d`Incomplete escape "\"`);if(t==="M")throw new Error(`Unsupported meta "${e}"`);if([...e].length===2)return w(e.codePointAt(1),e);throw new Error(`Unexpected escape "${e}"`)}s(ce,"Ne");function nn(e){return{type:"Alternator",raw:e}}s(nn,"Ct");function he(e,n){return{type:"Assertion",kind:e,raw:n}}s(he,"fe");function ge(e){return{type:"Backreference",raw:e}}s(ge,"Ie");function w(e,n){return{type:"Character",value:e,raw:n}}s(w,"A");function tn(e){return{type:"CharacterClassClose",raw:e}}s(tn,"bt");function rn(e){return{type:"CharacterClassHyphen",raw:e}}s(rn,"Nt");function an(e){return{type:"CharacterClassIntersector",raw:e}}s(an,"It");function fe(e,n){return{type:"CharacterClassOpen",negate:e,raw:n}}s(fe,"he");function S(e,n,t={}){return{type:"CharacterSet",kind:e,...t,raw:n}}s(S,"T");function me(e,n,t={}){return e==="keep"?{type:"Directive",kind:e,raw:n}:{type:"Directive",kind:e,flags:C(t.flags),raw:n}}s(me,"ke");function on(e,n){return{type:"EscapedNumber",inCharClass:e,raw:n}}s(on,"kt");function ln(e){return{type:"GroupClose",raw:e}}s(ln,"At");function v(e,n,t={}){return{type:"GroupOpen",kind:e,...t,raw:n}}s(v,"P");function sn(e,n,t,a){return{type:"NamedCallout",kind:e,tag:n,arguments:t,raw:a}}s(sn,"St");function un(e,n,t,a){return{type:"Quantifier",kind:e,min:n,max:t,raw:a}}s(un,"xt");function _n(e){return{type:"Subroutine",raw:e}}s(_n,"vt");var dn=new Set(["COUNT","CMP","ERROR","FAIL","MAX","MISMATCH","SKIP","TOTAL_COUNT"]),ye=new Map([["a",7],["b",8],["e",27],["f",12],["n",10],["r",13],["t",9],["v",11]]);function pn(e){let n=e[1]==="c"?e[2]:e[3];if(!n||!/[A-Za-z]/.test(n))throw new Error(`Unsupported control character "${e}"`);return w(I(n.toUpperCase())-64,e)}s(pn,"Tt");function cn(e,n){let{on:t,off:a}=/^\(\?(?<on>[imx]*)(?:-(?<off>[-imx]*))?/.exec(e).groups;a??="";let o=(n.getCurrentModX()||t.includes("x"))&&!a.includes("x"),i=be(t),r=be(a),l={};if(i&&(l.enable=i),r&&(l.disable=r),e.endsWith(")"))return n.replaceCurrentModX(o),me("flags",e,{flags:l});if(e.endsWith(":"))return n.pushModX(o),n.numOpenGroups++,v("group",e,{...(i||r)&&{flags:l}});throw new Error(`Unexpected flag modifier "${e}"`)}s(cn,"Et");function hn(e){let n=/\(\*(?<name>[A-Za-z_]\w*)?(?:\[(?<tag>(?:[A-Za-z_]\w*)?)\])?(?:\{(?<args>[^}]*)\})?\)/.exec(e);if(!n)throw new Error(`Incomplete or invalid named callout "${e}"`);let{name:t,tag:a,args:o}=n.groups;if(!t)throw new Error(`Invalid named callout "${e}"`);if(a==="")throw new Error(`Named callout tag with empty value not allowed "${e}"`);let i=o?o.split(",").filter(h=>h!=="").map(h=>/^[+-]?\d+$/.test(h)?+h:h):[],[r,l,u]=i,_=dn.has(t)?t.toLowerCase():"custom";switch(_){case"fail":case"mismatch":case"skip":if(i.length>0)throw new Error(`Named callout arguments not allowed "${i}"`);break;case"error":if(i.length>1)throw new Error(`Named callout allows only one argument "${i}"`);if(typeof r=="string")throw new Error(`Named callout argument must be a number "${r}"`);break;case"max":if(!i.length||i.length>2)throw new Error(`Named callout must have one or two arguments "${i}"`);if(typeof r=="string"&&!/^[A-Za-z_]\w*$/.test(r))throw new Error(`Named callout argument one must be a tag or number "${r}"`);if(i.length===2&&(typeof l=="number"||!/^[<>X]$/.test(l)))throw new Error(`Named callout optional argument two must be '<', '>', or 'X' "${l}"`);break;case"count":case"total_count":if(i.length>1)throw new Error(`Named callout allows only one argument "${i}"`);if(i.length===1&&(typeof r=="number"||!/^[<>X]$/.test(r)))throw new Error(`Named callout optional argument must be '<', '>', or 'X' "${r}"`);break;case"cmp":if(i.length!==3)throw new Error(`Named callout must have three arguments "${i}"`);if(typeof r=="string"&&!/^[A-Za-z_]\w*$/.test(r))throw new Error(`Named callout argument one must be a tag or number "${r}"`);if(typeof l=="number"||!/^(?:[<>!=]=|[<>])$/.test(l))throw new Error(`Named callout argument two must be '==', '!=', '>', '<', '>=', or '<=' "${l}"`);if(typeof u=="string"&&!/^[A-Za-z_]\w*$/.test(u))throw new Error(`Named callout argument three must be a tag or number "${u}"`);break;case"custom":throw new Error(`Undefined callout name "${t}"`);default:throw new Error(`Unexpected named callout kind "${_}"`)}return sn(_,a??null,o?.split(",")??null,e)}s(hn,"Pt");function Ie(e){let n=null,t,a;if(e[0]==="{"){let{minStr:o,maxStr:i}=/^\{(?<minStr>\d*)(?:,(?<maxStr>\d*))?/.exec(e).groups,r=1e5;if(+o>r||i&&+i>r)throw new Error("Quantifier value unsupported in Oniguruma");if(t=+o,a=i===void 0?+o:i===""?1/0:+i,t>a&&(n="possessive",[t,a]=[a,t]),e.endsWith("?")){if(n==="possessive")throw new Error('Unsupported possessive interval quantifier chain with "?"');n="lazy"}else n||(n="greedy")}else t=e[0]==="+"?1:0,a=e[0]==="?"?1:1/0,n=e[1]==="+"?"possessive":e[1]==="?"?"lazy":"greedy";return un(n,t,a,e)}s(Ie,"me");function gn(e){let n=e[1].toLowerCase();return S({d:"digit",h:"hex",s:"space",w:"word"}[n],e,{negate:e[1]!==n})}s(gn,"Ot");function fn(e){let{p:n,neg:t,value:a}=/^\\(?<p>[pP])\{(?<neg>\^?)(?<value>[^}]+)/.exec(e).groups;return S("property",e,{value:a,negate:n==="P"&&!t||n==="p"&&!!t})}s(fn,"Mt");function be(e){let n={};return e.includes("i")&&(n.ignoreCase=!0),e.includes("m")&&(n.dotAll=!0),e.includes("x")&&(n.extended=!0),Object.keys(n).length?n:null}s(be,"ye");function mn(e){let n={ignoreCase:!1,dotAll:!1,extended:!1,digitIsAscii:!1,posixIsAscii:!1,spaceIsAscii:!1,wordIsAscii:!1,textSegmentMode:null};for(let t=0;t<e.length;t++){let a=e[t];if(!"imxDPSWy".includes(a))throw new Error(`Invalid flag "${a}"`);if(a==="y"){if(!/^y{[gw]}/.test(e.slice(t)))throw new Error('Invalid or unspecified flag "y" mode');n.textSegmentMode=e[t+2]==="g"?"grapheme":"word",t+=3;continue}n[{i:"ignoreCase",m:"dotAll",x:"extended",D:"digitIsAscii",P:"posixIsAscii",S:"spaceIsAscii",W:"wordIsAscii"}[a]]=!0}return n}s(mn,"Gt");function yn(e){if(/^(?:\\u(?!\p{AHex}{4})|\\x(?!\p{AHex}{1,2}|\{\p{AHex}{1,8}\}))/u.test(e))throw new Error(`Incomplete or invalid escape "${e}"`);let n=e[2]==="{"?/^\\x\{\s*(?<hex>\p{AHex}+)/u.exec(e).groups.hex:e.slice(2);return parseInt(n,16)}s(yn,"Lt");function In(e,n){let{raw:t,inCharClass:a}=e,o=t.slice(1);if(!a&&(o!=="0"&&o.length===1||o[0]!=="0"&&+o<=n))return[ge(t)];let i=[],r=o.match(/^[0-7]+|\d/g);for(let l=0;l<r.length;l++){let u=r[l],_;if(l===0&&u!=="8"&&u!=="9"){if(_=parseInt(u,8),_>127)throw new Error(d`Octal encoded byte above 177 unsupported "${t}"`)}else _=I(u);i.push(w(_,(l===0?"\\":"")+u))}return i}s(In,"Ft");function bn(e){let n=[],t=new RegExp(X,"gy"),a;for(;a=t.exec(e);){let o=a[0];if(o[0]==="{"){let i=/^\{(?<min>\d+),(?<max>\d+)\}\??$/.exec(o);if(i){let{min:r,max:l}=i.groups;if(+r>+l&&o.endsWith("?")){t.lastIndex--,n.push(Ie(o.slice(0,-1)));continue}}}n.push(Ie(o))}return n}s(bn,"Ut");function Q(e,n){if(!Array.isArray(e.body))throw new Error("Expected node with body array");if(e.body.length!==1)return!1;let t=e.body[0];return!n||Object.keys(n).every(a=>n[a]===t[a])}s(Q,"O");function E(e){return!(!Cn.has(e.type)||e.type==="AbsenceFunction"&&e.kind!=="repeater")}s(E,"b");var Cn=new Set(["AbsenceFunction","CapturingGroup","Group","LookaroundAssertion","Regex"]);function H(e){return wn.has(e.type)}s(H,"E");var wn=new Set(["AbsenceFunction","Backreference","CapturingGroup","Character","CharacterClass","CharacterSet","Group","Quantifier","Subroutine"]);function q(e,n={}){let t={flags:"",normalizeUnknownPropertyNames:!1,skipBackrefValidation:!1,skipLookbehindValidation:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...n,rules:{captureGroup:!1,singleline:!1,...n.rules}},a=Qe(e,{flags:t.flags,rules:{captureGroup:t.rules.captureGroup,singleline:t.rules.singleline}}),o=s((p,f)=>{let g=a.tokens[i.nextIndex];switch(i.parent=p,i.nextIndex++,g.type){case"Alternator":return k();case"Assertion":return kn(g);case"Backreference":return xn(g,i);case"Character":return W(g.value,{useLastValid:!!f.isCheckingRangeEnd});case"CharacterClassHyphen":return Sn(g,i,f);case"CharacterClassOpen":return An(g,i,f);case"CharacterSet":return vn(g,i);case"Directive":return Nn(g.kind,{flags:g.flags});case"GroupOpen":return En(g,i,f);case"NamedCallout":return Dn(g.kind,g.tag,g.arguments);case"Quantifier":return Mn(g,i);case"Subroutine":return Pn(g,i);default:throw new Error(`Unexpected token type "${g.type}"`)}},"o"),i={capturingGroups:[],hasNumberedRef:!1,namedGroupsByName:new Map,nextIndex:0,normalizeUnknownPropertyNames:t.normalizeUnknownPropertyNames,parent:null,skipBackrefValidation:t.skipBackrefValidation,skipLookbehindValidation:t.skipLookbehindValidation,skipPropertyNameValidation:t.skipPropertyNameValidation,subroutines:[],tokens:a.tokens,unicodePropertyMap:t.unicodePropertyMap,walk:o},r=Un(Gn(a.flags)),l=r.body[0];for(;i.nextIndex<a.tokens.length;){let p=o(l,{});p.type==="Alternative"?(r.body.push(p),l=p):l.body.push(p)}let{capturingGroups:u,hasNumberedRef:_,namedGroupsByName:h,subroutines:c}=i;if(_&&h.size&&!t.rules.captureGroup)throw new Error("Numbered backref/subroutine not allowed when using named capture");for(let{ref:p}of c)if(typeof p=="number"){if(p>u.length)throw new Error("Subroutine uses a group number that's not defined");p&&(u[p-1].isSubroutined=!0)}else if(h.has(p)){if(h.get(p).length>1)throw new Error(d`Subroutine uses a duplicate group name "\g<${p}>"`);h.get(p)[0].isSubroutined=!0}else throw new Error(d`Subroutine uses a group name that's not defined "\g<${p}>"`);return r}s(q,"M");function kn({kind:e}){return On(C({"^":"line_start",$:"line_end","\\A":"string_start","\\b":"word_boundary","\\B":"word_boundary","\\G":"search_start","\\y":"text_segment_boundary","\\Y":"text_segment_boundary","\\z":"string_end","\\Z":"string_end_newline"}[e],`Unexpected assertion kind "${e}"`),{negate:e===d`\B`||e===d`\Y`})}s(kn,"Kt");function xn({raw:e},n){let t=/^\\k[<']/.test(e),a=t?e.slice(3,-1):e.slice(1),o=s((i,r=!1)=>{let l=n.capturingGroups.length,u=!1;if(i>l)if(n.skipBackrefValidation)u=!0;else throw new Error(`Not enough capturing groups defined to the left "${e}"`);return n.hasNumberedRef=!0,Ce(r?l+1-i:i,{orphan:u})},"o");if(t){let i=/^(?<sign>-?)0*(?<num>[1-9]\d*)$/.exec(a);if(i)return o(+i.groups.num,!!i.groups.sign);if(/[-+]/.test(a))throw new Error(`Invalid backref name "${e}"`);if(!n.namedGroupsByName.has(a))throw new Error(`Group name not defined to the left "${e}"`);return Ce(a)}return o(+a)}s(xn,"Rt");function Sn(e,n,t){let{tokens:a,walk:o}=n,i=n.parent,r=i.body.at(-1),l=a[n.nextIndex];if(!t.isCheckingRangeEnd&&r&&r.type!=="CharacterClass"&&r.type!=="CharacterClassRange"&&l&&l.type!=="CharacterClassOpen"&&l.type!=="CharacterClassClose"&&l.type!=="CharacterClassIntersector"){let u=o(i,{...t,isCheckingRangeEnd:!0});if(r.type==="Character"&&u.type==="Character")return i.body.pop(),Y(r,u);throw new Error("Invalid character class range")}return W(I("-"))}s(Sn,"Bt");function An({negate:e},n,t){let{tokens:a,walk:o}=n,i=[K()],r=a[n.nextIndex],l=Ae(r);for(;l.type!=="CharacterClassClose";){if(l.type==="CharacterClassIntersector")i.push(K()),n.nextIndex++;else{let _=i.at(-1);_.body.push(o(_,t))}l=Ae(a[n.nextIndex],r)}let u=K({negate:e});return i.length===1?u.body=i[0].body:(u.kind="intersection",u.body=i.map(_=>_.body.length===1?_.body[0]:_)),n.nextIndex++,u}s(An,"Vt");function vn({kind:e,negate:n,value:t},a){let{normalizeUnknownPropertyNames:o,skipPropertyNameValidation:i,unicodePropertyMap:r}=a;if(e==="property"){let l=te(t);if(J.has(l)&&!r?.has(l))e="posix",t=l;else return ne(t,{negate:n,normalizeUnknownPropertyNames:o,skipPropertyNameValidation:i,unicodePropertyMap:r})}return e==="posix"?Tn(t,{negate:n}):x(e,{negate:n})}s(vn,"jt");function En(e,n,t){let{tokens:a,capturingGroups:o,namedGroupsByName:i,skipLookbehindValidation:r,walk:l}=n,u=Hn(e),_=u.type==="AbsenceFunction",h=Se(u),c=h&&u.negate;if(u.type==="CapturingGroup"&&(o.push(u),u.name&&Re(i,u.name,[]).push(u)),_&&t.isInAbsenceFunction)throw new Error("Nested absence function not supported by Oniguruma");let p=ve(a[n.nextIndex]);for(;p.type!=="GroupClose";){if(p.type==="Alternator")u.body.push(k()),n.nextIndex++;else{let f=u.body.at(-1),g=l(f,{...t,isInAbsenceFunction:t.isInAbsenceFunction||_,isInLookbehind:t.isInLookbehind||h,isInNegLookbehind:t.isInNegLookbehind||c});if(f.body.push(g),(h||t.isInLookbehind)&&!r){let y="Lookbehind includes a pattern not allowed by Oniguruma";if(c||t.isInNegLookbehind){if(xe(g)||g.type==="CapturingGroup")throw new Error(y)}else if(xe(g)||Se(g)&&g.negate)throw new Error(y)}}p=ve(a[n.nextIndex])}return n.nextIndex++,u}s(En,"zt");function Mn({kind:e,min:n,max:t},a){let o=a.parent,i=o.body.at(-1);if(!i||!H(i))throw new Error("Quantifier requires a repeatable token");let r=ee(e,n,t,i);return o.body.pop(),r}s(Mn,"Ht");function Pn({raw:e},n){let{capturingGroups:t,subroutines:a}=n,o=e.slice(3,-1),i=/^(?<sign>[-+]?)0*(?<num>[1-9]\d*)$/.exec(o);if(i){let l=+i.groups.num,u=t.length;if(n.hasNumberedRef=!0,o={"":l,"+":u+l,"-":u+1-l}[i.groups.sign],o<1)throw new Error("Invalid subroutine number")}else o==="0"&&(o=0);let r=Bn(o);return a.push(r),r}s(Pn,"Qt");function $n(e,n){if(e!=="repeater")throw new Error(`Unexpected absence function kind "${e}"`);return{type:"AbsenceFunction",kind:e,body:N(n?.body)}}s($n,"Wt");function k(e){return{type:"Alternative",body:ke(e?.body)}}s(k,"N");function On(e,n){let t={type:"Assertion",kind:e};return(e==="word_boundary"||e==="text_segment_boundary")&&(t.negate=!!n?.negate),t}s(On,"Xt");function Ce(e,n){let t=!!n?.orphan;return{type:"Backreference",ref:e,...t&&{orphan:t}}}s(Ce,"Ae");function Ln(e,n){let t={name:void 0,isSubroutined:!1,...n};if(t.name!==void 0&&!Wn(t.name))throw new Error(`Group name "${t.name}" invalid in Oniguruma`);return{type:"CapturingGroup",number:e,...t.name&&{name:t.name},...t.isSubroutined&&{isSubroutined:t.isSubroutined},body:N(n?.body)}}s(Ln,"Jt");function W(e,n){let t={useLastValid:!1,...n};if(e>1114111){let a=e.toString(16);if(t.useLastValid)e=1114111;else throw e>1310719?new Error(`Invalid code point out of range "\\x{${a}}"`):new Error(`Invalid code point out of range in JS "\\x{${a}}"`)}return{type:"Character",value:e}}s(W,"K");function K(e){let n={kind:"union",negate:!1,...e};return{type:"CharacterClass",kind:n.kind,negate:n.negate,body:ke(e?.body)}}s(K,"D");function Y(e,n){if(n.value<e.value)throw new Error("Character class range out of order");return{type:"CharacterClassRange",min:e,max:n}}s(Y,"W");function x(e,n){let t=!!n?.negate,a={type:"CharacterSet",kind:e};return(e==="digit"||e==="hex"||e==="newline"||e==="space"||e==="word")&&(a.negate=t),(e==="text_segment"||e==="newline"&&!t)&&(a.variableLength=!0),a}s(x,"k");function Nn(e,n={}){if(e==="keep")return{type:"Directive",kind:e};if(e==="flags")return{type:"Directive",kind:e,flags:C(n.flags)};throw new Error(`Unexpected directive kind "${e}"`)}s(Nn,"Zt");function Gn(e){return{type:"Flags",...e}}s(Gn,"qt");function M(e){let n=e?.atomic,t=e?.flags;if(n&&t)throw new Error("Atomic group cannot have flags");return{type:"Group",...n&&{atomic:n},...t&&{flags:t},body:N(e?.body)}}s(M,"S");function we(e){let n={behind:!1,negate:!1,...e};return{type:"LookaroundAssertion",kind:n.behind?"lookbehind":"lookahead",negate:n.negate,body:N(e?.body)}}s(we,"ie");function Dn(e,n,t){return{type:"NamedCallout",kind:e,tag:n,arguments:t}}s(Dn,"Yt");function Tn(e,n){let t=!!n?.negate;if(!J.has(e))throw new Error(`Invalid POSIX class "${e}"`);return{type:"CharacterSet",kind:"posix",value:e,negate:t}}s(Tn,"er");function ee(e,n,t,a){if(n>t)throw new Error("Invalid reversed quantifier range");return{type:"Quantifier",kind:e,min:n,max:t,body:a}}s(ee,"X");function Un(e,n){return{type:"Regex",body:N(n?.body),flags:e}}s(Un,"tr");function Bn(e){return{type:"Subroutine",ref:e}}s(Bn,"rr");function ne(e,n){let t={negate:!1,normalizeUnknownPropertyNames:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...n},a=t.unicodePropertyMap?.get(te(e));if(!a){if(t.normalizeUnknownPropertyNames)a=Kn(e);else if(t.unicodePropertyMap&&!t.skipPropertyNameValidation)throw new Error(d`Invalid Unicode property "\p{${e}}"`)}return{type:"CharacterSet",kind:"property",value:a??e,negate:t.negate}}s(ne,"J");function Hn({flags:e,kind:n,name:t,negate:a,number:o}){switch(n){case"absence_repeater":return $n("repeater");case"atomic":return M({atomic:!0});case"capturing":return Ln(o,{name:t});case"group":return M({flags:e});case"lookahead":case"lookbehind":return we({behind:n==="lookbehind",negate:a});default:throw new Error(`Unexpected group kind "${n}"`)}}s(Hn,"nr");function N(e){if(e===void 0)e=[k()];else if(!Array.isArray(e)||!e.length||!e.every(n=>n.type==="Alternative"))throw new Error("Invalid body; expected array of one or more Alternative nodes");return e}s(N,"R");function ke(e){if(e===void 0)e=[];else if(!Array.isArray(e)||!e.every(n=>!!n.type))throw new Error("Invalid body; expected array of nodes");return e}s(ke,"Te");function xe(e){return e.type==="LookaroundAssertion"&&e.kind==="lookahead"}s(xe,"Se");function Se(e){return e.type==="LookaroundAssertion"&&e.kind==="lookbehind"}s(Se,"xe");function Wn(e){return/^[\p{Alpha}\p{Pc}][^)]*$/u.test(e)}s(Wn,"ar");function Kn(e){return e.trim().replace(/[- _]+/g,"_").replace(/[A-Z][a-z]+(?=[A-Z])/g,"$&_").replace(/[A-Za-z]+/g,n=>n[0].toUpperCase()+n.slice(1).toLowerCase())}s(Kn,"or");function te(e){return e.replace(/[- _]+/g,"").toLowerCase()}s(te,"Z");function Ae(e,n){let t=n;return C(e,`Unclosed character class${t?.type==="Character"&&t.value===93&&t.raw==="]"?' (started with "]")':""}`)}s(Ae,"ve");function ve(e){return C(e,"Unclosed group")}s(ve,"we");var re=new Map(`ASCII_Hex_Digit
33
+ `,a);return{lastIndex:r===-1?n.length:r}}if(/^\s$/.test(t)){let r=/\s+/y;return r.lastIndex=a,{lastIndex:r.exec(n)?r.lastIndex:a}}}if(t===".")return{token:S("dot",t)};if(t==="^"||t==="$"){let r=e.singleline?{"^":d`\A`,$:d`\Z`}[t]:t;return{token:he(r,t)}}return t==="|"?{token:nn(t)}:X.test(t)?{tokens:bn(t)}:{token:w(I(t),t)}}s(qe,"mt");function Ye(e,n,t){let a=[fe(n[1]==="^",n)],o=1,i;for(Z.lastIndex=t;i=Z.exec(e);){let r=i[0];if(r[0]==="["&&r[1]!==":")o++,a.push(fe(r[1]==="^",r));else if(r==="]"){if(a.at(-1).type==="CharacterClassOpen")a.push(w(93,r));else if(o--,a.push(tn(r)),!o)break}else{let l=en(r);Array.isArray(l)?a.push(...l):a.push(l)}}return{tokens:a,lastIndex:Z.lastIndex||e.length}}s(Ye,"yt");function en(e){if(e[0]==="\\")return ce(e,{inCharClass:!0});if(e[0]==="["){let n=/\[:(?<negate>\^?)(?<name>[a-z]+):\]/.exec(e);if(!n||!J.has(n.groups.name))throw new Error(`Invalid POSIX class "${e}"`);return S("posix",e,{value:n.groups.name,negate:!!n.groups.negate})}return e==="-"?rn(e):e==="&&"?an(e):w(I(e),e)}s(en,"gt");function ce(e,{inCharClass:n}){let t=e[1];if(t==="c"||t==="C")return pn(e);if("dDhHsSwW".includes(t))return gn(e);if(e.startsWith(d`\o{`))throw new Error(`Incomplete, invalid, or unsupported octal code point "${e}"`);if(/^\\[pP]\{/.test(e)){if(e.length===3)throw new Error(`Incomplete or invalid Unicode property "${e}"`);return fn(e)}if(new RegExp("^\\\\x[89A-Fa-f]\\p{AHex}","u").test(e))try{let a=e.split(/\\x/).slice(1).map(r=>parseInt(r,16)),o=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}).decode(new Uint8Array(a)),i=new TextEncoder;return[...o].map(r=>{let l=[...i.encode(r)].map(u=>`\\x${u.toString(16)}`).join("");return w(I(r),l)})}catch{throw new Error(`Multibyte code "${e}" incomplete or invalid in Oniguruma`)}if(t==="u"||t==="x")return w(yn(e),e);if(ye.has(t))return w(ye.get(t),e);if(/\d/.test(t))return on(n,e);if(e==="\\")throw new Error(d`Incomplete escape "\"`);if(t==="M")throw new Error(`Unsupported meta "${e}"`);if([...e].length===2)return w(e.codePointAt(1),e);throw new Error(`Unexpected escape "${e}"`)}s(ce,"Ne");function nn(e){return{type:"Alternator",raw:e}}s(nn,"Ct");function he(e,n){return{type:"Assertion",kind:e,raw:n}}s(he,"fe");function ge(e){return{type:"Backreference",raw:e}}s(ge,"Ie");function w(e,n){return{type:"Character",value:e,raw:n}}s(w,"A");function tn(e){return{type:"CharacterClassClose",raw:e}}s(tn,"bt");function rn(e){return{type:"CharacterClassHyphen",raw:e}}s(rn,"Nt");function an(e){return{type:"CharacterClassIntersector",raw:e}}s(an,"It");function fe(e,n){return{type:"CharacterClassOpen",negate:e,raw:n}}s(fe,"he");function S(e,n,t={}){return{type:"CharacterSet",kind:e,...t,raw:n}}s(S,"T");function me(e,n,t={}){return e==="keep"?{type:"Directive",kind:e,raw:n}:{type:"Directive",kind:e,flags:C(t.flags),raw:n}}s(me,"ke");function on(e,n){return{type:"EscapedNumber",inCharClass:e,raw:n}}s(on,"kt");function ln(e){return{type:"GroupClose",raw:e}}s(ln,"At");function v(e,n,t={}){return{type:"GroupOpen",kind:e,...t,raw:n}}s(v,"P");function sn(e,n,t,a){return{type:"NamedCallout",kind:e,tag:n,arguments:t,raw:a}}s(sn,"St");function un(e,n,t,a){return{type:"Quantifier",kind:e,min:n,max:t,raw:a}}s(un,"xt");function _n(e){return{type:"Subroutine",raw:e}}s(_n,"vt");var dn=new Set(["COUNT","CMP","ERROR","FAIL","MAX","MISMATCH","SKIP","TOTAL_COUNT"]),ye=new Map([["a",7],["b",8],["e",27],["f",12],["n",10],["r",13],["t",9],["v",11]]);function pn(e){let n=e[1]==="c"?e[2]:e[3];if(!n||!/[A-Za-z]/.test(n))throw new Error(`Unsupported control character "${e}"`);return w(I(n.toUpperCase())-64,e)}s(pn,"Tt");function cn(e,n){let{on:t,off:a}=/^\(\?(?<on>[imx]*)(?:-(?<off>[-imx]*))?/.exec(e).groups;a??="";let o=(n.getCurrentModX()||t.includes("x"))&&!a.includes("x"),i=be(t),r=be(a),l={};if(i&&(l.enable=i),r&&(l.disable=r),e.endsWith(")"))return n.replaceCurrentModX(o),me("flags",e,{flags:l});if(e.endsWith(":"))return n.pushModX(o),n.numOpenGroups++,v("group",e,{...(i||r)&&{flags:l}});throw new Error(`Unexpected flag modifier "${e}"`)}s(cn,"Et");function hn(e){let n=/\(\*(?<name>[A-Za-z_]\w*)?(?:\[(?<tag>(?:[A-Za-z_]\w*)?)\])?(?:\{(?<args>[^}]*)\})?\)/.exec(e);if(!n)throw new Error(`Incomplete or invalid named callout "${e}"`);let{name:t,tag:a,args:o}=n.groups;if(!t)throw new Error(`Invalid named callout "${e}"`);if(a==="")throw new Error(`Named callout tag with empty value not allowed "${e}"`);let i=o?o.split(",").filter(h=>h!=="").map(h=>/^[+-]?\d+$/.test(h)?+h:h):[],[r,l,u]=i,_=dn.has(t)?t.toLowerCase():"custom";switch(_){case"fail":case"mismatch":case"skip":if(i.length>0)throw new Error(`Named callout arguments not allowed "${i}"`);break;case"error":if(i.length>1)throw new Error(`Named callout allows only one argument "${i}"`);if(typeof r=="string")throw new Error(`Named callout argument must be a number "${r}"`);break;case"max":if(!i.length||i.length>2)throw new Error(`Named callout must have one or two arguments "${i}"`);if(typeof r=="string"&&!/^[A-Za-z_]\w*$/.test(r))throw new Error(`Named callout argument one must be a tag or number "${r}"`);if(i.length===2&&(typeof l=="number"||!/^[<>X]$/.test(l)))throw new Error(`Named callout optional argument two must be '<', '>', or 'X' "${l}"`);break;case"count":case"total_count":if(i.length>1)throw new Error(`Named callout allows only one argument "${i}"`);if(i.length===1&&(typeof r=="number"||!/^[<>X]$/.test(r)))throw new Error(`Named callout optional argument must be '<', '>', or 'X' "${r}"`);break;case"cmp":if(i.length!==3)throw new Error(`Named callout must have three arguments "${i}"`);if(typeof r=="string"&&!/^[A-Za-z_]\w*$/.test(r))throw new Error(`Named callout argument one must be a tag or number "${r}"`);if(typeof l=="number"||!/^(?:[<>!=]=|[<>])$/.test(l))throw new Error(`Named callout argument two must be '==', '!=', '>', '<', '>=', or '<=' "${l}"`);if(typeof u=="string"&&!/^[A-Za-z_]\w*$/.test(u))throw new Error(`Named callout argument three must be a tag or number "${u}"`);break;case"custom":throw new Error(`Undefined callout name "${t}"`);default:throw new Error(`Unexpected named callout kind "${_}"`)}return sn(_,a??null,o?.split(",")??null,e)}s(hn,"Pt");function Ie(e){let n=null,t,a;if(e[0]==="{"){let{minStr:o,maxStr:i}=/^\{(?<minStr>\d*)(?:,(?<maxStr>\d*))?/.exec(e).groups,r=1e5;if(+o>r||i&&+i>r)throw new Error("Quantifier value unsupported in Oniguruma");if(t=+o,a=i===void 0?+o:i===""?1/0:+i,t>a&&(n="possessive",[t,a]=[a,t]),e.endsWith("?")){if(n==="possessive")throw new Error('Unsupported possessive interval quantifier chain with "?"');n="lazy"}else n||(n="greedy")}else t=e[0]==="+"?1:0,a=e[0]==="?"?1:1/0,n=e[1]==="+"?"possessive":e[1]==="?"?"lazy":"greedy";return un(n,t,a,e)}s(Ie,"me");function gn(e){let n=e[1].toLowerCase();return S({d:"digit",h:"hex",s:"space",w:"word"}[n],e,{negate:e[1]!==n})}s(gn,"Ot");function fn(e){let{p:n,neg:t,value:a}=/^\\(?<p>[pP])\{(?<neg>\^?)(?<value>[^}]+)/.exec(e).groups;return S("property",e,{value:a,negate:n==="P"&&!t||n==="p"&&!!t})}s(fn,"Mt");function be(e){let n={};return e.includes("i")&&(n.ignoreCase=!0),e.includes("m")&&(n.dotAll=!0),e.includes("x")&&(n.extended=!0),Object.keys(n).length?n:null}s(be,"ye");function mn(e){let n={ignoreCase:!1,dotAll:!1,extended:!1,digitIsAscii:!1,posixIsAscii:!1,spaceIsAscii:!1,wordIsAscii:!1,textSegmentMode:null};for(let t=0;t<e.length;t++){let a=e[t];if(!"imxDPSWy".includes(a))throw new Error(`Invalid flag "${a}"`);if(a==="y"){if(!/^y{[gw]}/.test(e.slice(t)))throw new Error('Invalid or unspecified flag "y" mode');n.textSegmentMode=e[t+2]==="g"?"grapheme":"word",t+=3;continue}n[{i:"ignoreCase",m:"dotAll",x:"extended",D:"digitIsAscii",P:"posixIsAscii",S:"spaceIsAscii",W:"wordIsAscii"}[a]]=!0}return n}s(mn,"Gt");function yn(e){if(new RegExp("^(?:\\\\u(?!\\p{AHex}{4})|\\\\x(?!\\p{AHex}{1,2}|\\{\\p{AHex}{1,8}\\}))","u").test(e))throw new Error(`Incomplete or invalid escape "${e}"`);let n=e[2]==="{"?new RegExp("^\\\\x\\{\\s*(?<hex>\\p{AHex}+)","u").exec(e).groups.hex:e.slice(2);return parseInt(n,16)}s(yn,"Lt");function In(e,n){let{raw:t,inCharClass:a}=e,o=t.slice(1);if(!a&&(o!=="0"&&o.length===1||o[0]!=="0"&&+o<=n))return[ge(t)];let i=[],r=o.match(/^[0-7]+|\d/g);for(let l=0;l<r.length;l++){let u=r[l],_;if(l===0&&u!=="8"&&u!=="9"){if(_=parseInt(u,8),_>127)throw new Error(d`Octal encoded byte above 177 unsupported "${t}"`)}else _=I(u);i.push(w(_,(l===0?"\\":"")+u))}return i}s(In,"Ft");function bn(e){let n=[],t=new RegExp(X,"gy"),a;for(;a=t.exec(e);){let o=a[0];if(o[0]==="{"){let i=/^\{(?<min>\d+),(?<max>\d+)\}\??$/.exec(o);if(i){let{min:r,max:l}=i.groups;if(+r>+l&&o.endsWith("?")){t.lastIndex--,n.push(Ie(o.slice(0,-1)));continue}}}n.push(Ie(o))}return n}s(bn,"Ut");function Q(e,n){if(!Array.isArray(e.body))throw new Error("Expected node with body array");if(e.body.length!==1)return!1;let t=e.body[0];return!n||Object.keys(n).every(a=>n[a]===t[a])}s(Q,"O");function E(e){return!(!Cn.has(e.type)||e.type==="AbsenceFunction"&&e.kind!=="repeater")}s(E,"b");var Cn=new Set(["AbsenceFunction","CapturingGroup","Group","LookaroundAssertion","Regex"]);function H(e){return wn.has(e.type)}s(H,"E");var wn=new Set(["AbsenceFunction","Backreference","CapturingGroup","Character","CharacterClass","CharacterSet","Group","Quantifier","Subroutine"]);function q(e,n={}){let t={flags:"",normalizeUnknownPropertyNames:!1,skipBackrefValidation:!1,skipLookbehindValidation:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...n,rules:{captureGroup:!1,singleline:!1,...n.rules}},a=Qe(e,{flags:t.flags,rules:{captureGroup:t.rules.captureGroup,singleline:t.rules.singleline}}),o=s((p,f)=>{let g=a.tokens[i.nextIndex];switch(i.parent=p,i.nextIndex++,g.type){case"Alternator":return k();case"Assertion":return kn(g);case"Backreference":return xn(g,i);case"Character":return W(g.value,{useLastValid:!!f.isCheckingRangeEnd});case"CharacterClassHyphen":return Sn(g,i,f);case"CharacterClassOpen":return An(g,i,f);case"CharacterSet":return vn(g,i);case"Directive":return Nn(g.kind,{flags:g.flags});case"GroupOpen":return En(g,i,f);case"NamedCallout":return Dn(g.kind,g.tag,g.arguments);case"Quantifier":return Mn(g,i);case"Subroutine":return Pn(g,i);default:throw new Error(`Unexpected token type "${g.type}"`)}},"o"),i={capturingGroups:[],hasNumberedRef:!1,namedGroupsByName:new Map,nextIndex:0,normalizeUnknownPropertyNames:t.normalizeUnknownPropertyNames,parent:null,skipBackrefValidation:t.skipBackrefValidation,skipLookbehindValidation:t.skipLookbehindValidation,skipPropertyNameValidation:t.skipPropertyNameValidation,subroutines:[],tokens:a.tokens,unicodePropertyMap:t.unicodePropertyMap,walk:o},r=Un(Gn(a.flags)),l=r.body[0];for(;i.nextIndex<a.tokens.length;){let p=o(l,{});p.type==="Alternative"?(r.body.push(p),l=p):l.body.push(p)}let{capturingGroups:u,hasNumberedRef:_,namedGroupsByName:h,subroutines:c}=i;if(_&&h.size&&!t.rules.captureGroup)throw new Error("Numbered backref/subroutine not allowed when using named capture");for(let{ref:p}of c)if(typeof p=="number"){if(p>u.length)throw new Error("Subroutine uses a group number that's not defined");p&&(u[p-1].isSubroutined=!0)}else if(h.has(p)){if(h.get(p).length>1)throw new Error(d`Subroutine uses a duplicate group name "\g<${p}>"`);h.get(p)[0].isSubroutined=!0}else throw new Error(d`Subroutine uses a group name that's not defined "\g<${p}>"`);return r}s(q,"M");function kn({kind:e}){return On(C({"^":"line_start",$:"line_end","\\A":"string_start","\\b":"word_boundary","\\B":"word_boundary","\\G":"search_start","\\y":"text_segment_boundary","\\Y":"text_segment_boundary","\\z":"string_end","\\Z":"string_end_newline"}[e],`Unexpected assertion kind "${e}"`),{negate:e===d`\B`||e===d`\Y`})}s(kn,"Kt");function xn({raw:e},n){let t=/^\\k[<']/.test(e),a=t?e.slice(3,-1):e.slice(1),o=s((i,r=!1)=>{let l=n.capturingGroups.length,u=!1;if(i>l)if(n.skipBackrefValidation)u=!0;else throw new Error(`Not enough capturing groups defined to the left "${e}"`);return n.hasNumberedRef=!0,Ce(r?l+1-i:i,{orphan:u})},"o");if(t){let i=/^(?<sign>-?)0*(?<num>[1-9]\d*)$/.exec(a);if(i)return o(+i.groups.num,!!i.groups.sign);if(/[-+]/.test(a))throw new Error(`Invalid backref name "${e}"`);if(!n.namedGroupsByName.has(a))throw new Error(`Group name not defined to the left "${e}"`);return Ce(a)}return o(+a)}s(xn,"Rt");function Sn(e,n,t){let{tokens:a,walk:o}=n,i=n.parent,r=i.body.at(-1),l=a[n.nextIndex];if(!t.isCheckingRangeEnd&&r&&r.type!=="CharacterClass"&&r.type!=="CharacterClassRange"&&l&&l.type!=="CharacterClassOpen"&&l.type!=="CharacterClassClose"&&l.type!=="CharacterClassIntersector"){let u=o(i,{...t,isCheckingRangeEnd:!0});if(r.type==="Character"&&u.type==="Character")return i.body.pop(),Y(r,u);throw new Error("Invalid character class range")}return W(I("-"))}s(Sn,"Bt");function An({negate:e},n,t){let{tokens:a,walk:o}=n,i=[K()],r=a[n.nextIndex],l=Ae(r);for(;l.type!=="CharacterClassClose";){if(l.type==="CharacterClassIntersector")i.push(K()),n.nextIndex++;else{let _=i.at(-1);_.body.push(o(_,t))}l=Ae(a[n.nextIndex],r)}let u=K({negate:e});return i.length===1?u.body=i[0].body:(u.kind="intersection",u.body=i.map(_=>_.body.length===1?_.body[0]:_)),n.nextIndex++,u}s(An,"Vt");function vn({kind:e,negate:n,value:t},a){let{normalizeUnknownPropertyNames:o,skipPropertyNameValidation:i,unicodePropertyMap:r}=a;if(e==="property"){let l=te(t);if(J.has(l)&&!r?.has(l))e="posix",t=l;else return ne(t,{negate:n,normalizeUnknownPropertyNames:o,skipPropertyNameValidation:i,unicodePropertyMap:r})}return e==="posix"?Tn(t,{negate:n}):x(e,{negate:n})}s(vn,"jt");function En(e,n,t){let{tokens:a,capturingGroups:o,namedGroupsByName:i,skipLookbehindValidation:r,walk:l}=n,u=Hn(e),_=u.type==="AbsenceFunction",h=Se(u),c=h&&u.negate;if(u.type==="CapturingGroup"&&(o.push(u),u.name&&Re(i,u.name,[]).push(u)),_&&t.isInAbsenceFunction)throw new Error("Nested absence function not supported by Oniguruma");let p=ve(a[n.nextIndex]);for(;p.type!=="GroupClose";){if(p.type==="Alternator")u.body.push(k()),n.nextIndex++;else{let f=u.body.at(-1),g=l(f,{...t,isInAbsenceFunction:t.isInAbsenceFunction||_,isInLookbehind:t.isInLookbehind||h,isInNegLookbehind:t.isInNegLookbehind||c});if(f.body.push(g),(h||t.isInLookbehind)&&!r){let y="Lookbehind includes a pattern not allowed by Oniguruma";if(c||t.isInNegLookbehind){if(xe(g)||g.type==="CapturingGroup")throw new Error(y)}else if(xe(g)||Se(g)&&g.negate)throw new Error(y)}}p=ve(a[n.nextIndex])}return n.nextIndex++,u}s(En,"zt");function Mn({kind:e,min:n,max:t},a){let o=a.parent,i=o.body.at(-1);if(!i||!H(i))throw new Error("Quantifier requires a repeatable token");let r=ee(e,n,t,i);return o.body.pop(),r}s(Mn,"Ht");function Pn({raw:e},n){let{capturingGroups:t,subroutines:a}=n,o=e.slice(3,-1),i=/^(?<sign>[-+]?)0*(?<num>[1-9]\d*)$/.exec(o);if(i){let l=+i.groups.num,u=t.length;if(n.hasNumberedRef=!0,o={"":l,"+":u+l,"-":u+1-l}[i.groups.sign],o<1)throw new Error("Invalid subroutine number")}else o==="0"&&(o=0);let r=Bn(o);return a.push(r),r}s(Pn,"Qt");function $n(e,n){if(e!=="repeater")throw new Error(`Unexpected absence function kind "${e}"`);return{type:"AbsenceFunction",kind:e,body:N(n?.body)}}s($n,"Wt");function k(e){return{type:"Alternative",body:ke(e?.body)}}s(k,"N");function On(e,n){let t={type:"Assertion",kind:e};return(e==="word_boundary"||e==="text_segment_boundary")&&(t.negate=!!n?.negate),t}s(On,"Xt");function Ce(e,n){let t=!!n?.orphan;return{type:"Backreference",ref:e,...t&&{orphan:t}}}s(Ce,"Ae");function Ln(e,n){let t={name:void 0,isSubroutined:!1,...n};if(t.name!==void 0&&!Wn(t.name))throw new Error(`Group name "${t.name}" invalid in Oniguruma`);return{type:"CapturingGroup",number:e,...t.name&&{name:t.name},...t.isSubroutined&&{isSubroutined:t.isSubroutined},body:N(n?.body)}}s(Ln,"Jt");function W(e,n){let t={useLastValid:!1,...n};if(e>1114111){let a=e.toString(16);if(t.useLastValid)e=1114111;else throw e>1310719?new Error(`Invalid code point out of range "\\x{${a}}"`):new Error(`Invalid code point out of range in JS "\\x{${a}}"`)}return{type:"Character",value:e}}s(W,"K");function K(e){let n={kind:"union",negate:!1,...e};return{type:"CharacterClass",kind:n.kind,negate:n.negate,body:ke(e?.body)}}s(K,"D");function Y(e,n){if(n.value<e.value)throw new Error("Character class range out of order");return{type:"CharacterClassRange",min:e,max:n}}s(Y,"W");function x(e,n){let t=!!n?.negate,a={type:"CharacterSet",kind:e};return(e==="digit"||e==="hex"||e==="newline"||e==="space"||e==="word")&&(a.negate=t),(e==="text_segment"||e==="newline"&&!t)&&(a.variableLength=!0),a}s(x,"k");function Nn(e,n={}){if(e==="keep")return{type:"Directive",kind:e};if(e==="flags")return{type:"Directive",kind:e,flags:C(n.flags)};throw new Error(`Unexpected directive kind "${e}"`)}s(Nn,"Zt");function Gn(e){return{type:"Flags",...e}}s(Gn,"qt");function M(e){let n=e?.atomic,t=e?.flags;if(n&&t)throw new Error("Atomic group cannot have flags");return{type:"Group",...n&&{atomic:n},...t&&{flags:t},body:N(e?.body)}}s(M,"S");function we(e){let n={behind:!1,negate:!1,...e};return{type:"LookaroundAssertion",kind:n.behind?"lookbehind":"lookahead",negate:n.negate,body:N(e?.body)}}s(we,"ie");function Dn(e,n,t){return{type:"NamedCallout",kind:e,tag:n,arguments:t}}s(Dn,"Yt");function Tn(e,n){let t=!!n?.negate;if(!J.has(e))throw new Error(`Invalid POSIX class "${e}"`);return{type:"CharacterSet",kind:"posix",value:e,negate:t}}s(Tn,"er");function ee(e,n,t,a){if(n>t)throw new Error("Invalid reversed quantifier range");return{type:"Quantifier",kind:e,min:n,max:t,body:a}}s(ee,"X");function Un(e,n){return{type:"Regex",body:N(n?.body),flags:e}}s(Un,"tr");function Bn(e){return{type:"Subroutine",ref:e}}s(Bn,"rr");function ne(e,n){let t={negate:!1,normalizeUnknownPropertyNames:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...n},a=t.unicodePropertyMap?.get(te(e));if(!a){if(t.normalizeUnknownPropertyNames)a=Kn(e);else if(t.unicodePropertyMap&&!t.skipPropertyNameValidation)throw new Error(d`Invalid Unicode property "\p{${e}}"`)}return{type:"CharacterSet",kind:"property",value:a??e,negate:t.negate}}s(ne,"J");function Hn({flags:e,kind:n,name:t,negate:a,number:o}){switch(n){case"absence_repeater":return $n("repeater");case"atomic":return M({atomic:!0});case"capturing":return Ln(o,{name:t});case"group":return M({flags:e});case"lookahead":case"lookbehind":return we({behind:n==="lookbehind",negate:a});default:throw new Error(`Unexpected group kind "${n}"`)}}s(Hn,"nr");function N(e){if(e===void 0)e=[k()];else if(!Array.isArray(e)||!e.length||!e.every(n=>n.type==="Alternative"))throw new Error("Invalid body; expected array of one or more Alternative nodes");return e}s(N,"R");function ke(e){if(e===void 0)e=[];else if(!Array.isArray(e)||!e.every(n=>!!n.type))throw new Error("Invalid body; expected array of nodes");return e}s(ke,"Te");function xe(e){return e.type==="LookaroundAssertion"&&e.kind==="lookahead"}s(xe,"Se");function Se(e){return e.type==="LookaroundAssertion"&&e.kind==="lookbehind"}s(Se,"xe");function Wn(e){return/^[\p{Alpha}\p{Pc}][^)]*$/u.test(e)}s(Wn,"ar");function Kn(e){return e.trim().replace(/[- _]+/g,"_").replace(/[A-Z][a-z]+(?=[A-Z])/g,"$&_").replace(/[A-Za-z]+/g,n=>n[0].toUpperCase()+n.slice(1).toLowerCase())}s(Kn,"or");function te(e){return e.replace(/[- _]+/g,"").toLowerCase()}s(te,"Z");function Ae(e,n){let t=n;return C(e,`Unclosed character class${t?.type==="Character"&&t.value===93&&t.raw==="]"?' (started with "]")':""}`)}s(Ae,"ve");function ve(e){return C(e,"Unclosed group")}s(ve,"we");var re=new Map(`ASCII_Hex_Digit
34
34
  Adlam
35
35
  Ahom
36
36
  Alphabetic
@@ -30,4 +30,4 @@
30
30
  | &&
31
31
  | .
32
32
  `.replace(/\s+/g,""),"gsu");function G(e,n={}){const r={flags:"",...n,rules:{captureGroup:!1,singleline:!1,...n.rules}};if(typeof e!="string")throw new Error("String expected as pattern");const o=ee(r.flags),a=[o.extended],s={captureGroup:r.rules.captureGroup,getCurrentModX(){return a.at(-1)},numOpenGroups:0,popModX(){a.pop()},pushModX(l){a.push(l)},replaceCurrentModX(l){a[a.length-1]=l},singleline:r.rules.singleline};let t=[],u;for(x.lastIndex=0;u=x.exec(e);){const l=z(s,e,u[0],x.lastIndex);l.tokens?t.push(...l.tokens):l.token&&t.push(l.token),l.lastIndex!==void 0&&(x.lastIndex=l.lastIndex)}const c=[];let f=0;t.filter(l=>l.type==="GroupOpen").forEach(l=>{l.kind==="capturing"?l.number=++f:l.raw==="("&&c.push(l)}),f||c.forEach((l,X)=>{l.kind="capturing",l.number=X+1});const w=f||c.length;return{tokens:t.map(l=>l.type==="EscapedNumber"?ne(l,w):l).flat(),flags:o}}i(G,"M");function z(e,n,r,o){const[a,s]=r;if(r==="["||r==="[^"){const t=H(n,r,o);return{tokens:t.tokens,lastIndex:t.lastIndex}}if(a==="\\"){if("AbBGyYzZ".includes(s))return{token:I(r,r)};if(/^\\g[<']/.test(r)){if(!/^\\g(?:<[^>]+>|'[^']+')$/.test(r))throw new Error(`Invalid group name "${r}"`);return{token:j(r)}}if(/^\\k[<']/.test(r)){if(!/^\\k(?:<[^>]+>|'[^']+')$/.test(r))throw new Error(`Invalid group name "${r}"`);return{token:C(r)}}if(s==="K")return{token:v("keep",r)};if(s==="N"||s==="R")return{token:h("newline",r,{negate:s==="N"})};if(s==="O")return{token:h("any",r)};if(s==="X")return{token:h("text_segment",r)};const t=A(r,{inCharClass:!1});return Array.isArray(t)?{tokens:t}:{token:t}}if(a==="("){if(s==="*")return{token:Y(r)};if(r==="(?{")throw new Error(`Unsupported callout "${r}"`);if(r.startsWith("(?#")){if(n[o]!==")")throw new Error('Unclosed comment group "(?#"');return{lastIndex:o+1}}if(/^\(\?[-imx]+[:)]$/.test(r))return{token:q(r,e)};if(e.pushModX(e.getCurrentModX()),e.numOpenGroups++,r==="("&&!e.captureGroup||r==="(?:")return{token:g("group",r)};if(r==="(?>")return{token:g("atomic",r)};if(r==="(?="||r==="(?!"||r==="(?<="||r==="(?<!")return{token:g(r[2]==="<"?"lookbehind":"lookahead",r,{negate:r.endsWith("!")})};if(r==="("&&e.captureGroup||r.startsWith("(?<")&&r.endsWith(">")||r.startsWith("(?'")&&r.endsWith("'"))return{token:g("capturing",r,{...r!=="("&&{name:r.slice(3,-1)}})};if(r.startsWith("(?~")){if(r==="(?~|")throw new Error(`Unsupported absence function kind "${r}"`);return{token:g("absence_repeater",r)}}throw r==="(?("?new Error(`Unsupported conditional "${r}"`):new Error(`Invalid or unsupported group option "${r}"`)}if(r===")"){if(e.popModX(),e.numOpenGroups--,e.numOpenGroups<0)throw new Error('Unmatched ")"');return{token:F(r)}}if(e.getCurrentModX()){if(r==="#"){const t=n.indexOf(`
33
- `,o);return{lastIndex:t===-1?n.length:t}}if(/^\s$/.test(r)){const t=/\s+/y;return t.lastIndex=o,{lastIndex:t.exec(n)?t.lastIndex:o}}}if(r===".")return{token:h("dot",r)};if(r==="^"||r==="$"){const t=e.singleline?{"^":p`\A`,$:p`\Z`}[r]:r;return{token:I(t,r)}}return r==="|"?{token:_(r)}:k.test(r)?{tokens:te(r)}:{token:d(m(r),r)}}i(z,"F");function H(e,n,r){const o=[b(n[1]==="^",n)];let a=1,s;for($.lastIndex=r;s=$.exec(e);){const t=s[0];if(t[0]==="["&&t[1]!==":")a++,o.push(b(t[1]==="^",t));else if(t==="]"){if(o.at(-1).type==="CharacterClassOpen")o.push(d(93,t));else if(a--,o.push(Z(t)),!a)break}else{const u=P(t);Array.isArray(u)?o.push(...u):o.push(u)}}return{tokens:o,lastIndex:$.lastIndex||e.length}}i(H,"K");function P(e){if(e[0]==="\\")return A(e,{inCharClass:!0});if(e[0]==="["){const n=/\[:(?<negate>\^?)(?<name>[a-z]+):\]/.exec(e);if(!n||!S.has(n.groups.name))throw new Error(`Invalid POSIX class "${e}"`);return h("posix",e,{value:n.groups.name,negate:!!n.groups.negate})}return e==="-"?R(e):e==="&&"?T(e):d(m(e),e)}i(P,"X");function A(e,{inCharClass:n}){const r=e[1];if(r==="c"||r==="C")return Q(e);if("dDhHsSwW".includes(r))return J(e);if(e.startsWith(p`\o{`))throw new Error(`Incomplete, invalid, or unsupported octal code point "${e}"`);if(/^\\[pP]\{/.test(e)){if(e.length===3)throw new Error(`Incomplete or invalid Unicode property "${e}"`);return V(e)}if(/^\\x[89A-Fa-f]\p{AHex}/u.test(e))try{const o=e.split(/\\x/).slice(1).map(t=>parseInt(t,16)),a=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}).decode(new Uint8Array(o)),s=new TextEncoder;return[...a].map(t=>{const u=[...s.encode(t)].map(c=>`\\x${c.toString(16)}`).join("");return d(m(t),u)})}catch{throw new Error(`Multibyte code "${e}" incomplete or invalid in Oniguruma`)}if(r==="u"||r==="x")return d(re(e),e);if(N.has(r))return d(N.get(r),e);if(/\d/.test(r))return D(n,e);if(e==="\\")throw new Error(p`Incomplete escape "\"`);if(r==="M")throw new Error(`Unsupported meta "${e}"`);if([...e].length===2)return d(e.codePointAt(1),e);throw new Error(`Unexpected escape "${e}"`)}i(A,"x");function _(e){return{type:"Alternator",raw:e}}i(_,"P");function I(e,n){return{type:"Assertion",kind:e,raw:n}}i(I,"w");function C(e){return{type:"Backreference",raw:e}}i(C,"A");function d(e,n){return{type:"Character",value:e,raw:n}}i(d,"d");function Z(e){return{type:"CharacterClassClose",raw:e}}i(Z,"z");function R(e){return{type:"CharacterClassHyphen",raw:e}}i(R,"U");function T(e){return{type:"CharacterClassIntersector",raw:e}}i(T,"H");function b(e,n){return{type:"CharacterClassOpen",negate:e,raw:n}}i(b,"E");function h(e,n,r={}){return{type:"CharacterSet",kind:e,...r,raw:n}}i(h,"k");function v(e,n,r={}){return e==="keep"?{type:"Directive",kind:e,raw:n}:{type:"Directive",kind:e,flags:W(r.flags),raw:n}}i(v,"I");function D(e,n){return{type:"EscapedNumber",inCharClass:e,raw:n}}i(D,"W");function F(e){return{type:"GroupClose",raw:e}}i(F,"Q");function g(e,n,r={}){return{type:"GroupOpen",kind:e,...r,raw:n}}i(g,"f");function L(e,n,r,o){return{type:"NamedCallout",kind:e,tag:n,arguments:r,raw:o}}i(L,"D");function B(e,n,r,o){return{type:"Quantifier",kind:e,min:n,max:r,raw:o}}i(B,"_");function j(e){return{type:"Subroutine",raw:e}}i(j,"R");const K=new Set(["COUNT","CMP","ERROR","FAIL","MAX","MISMATCH","SKIP","TOTAL_COUNT"]),N=new Map([["a",7],["b",8],["e",27],["f",12],["n",10],["r",13],["t",9],["v",11]]);function Q(e){const n=e[1]==="c"?e[2]:e[3];if(!n||!/[A-Za-z]/.test(n))throw new Error(`Unsupported control character "${e}"`);return d(m(n.toUpperCase())-64,e)}i(Q,"Z");function q(e,n){let{on:r,off:o}=/^\(\?(?<on>[imx]*)(?:-(?<off>[-imx]*))?/.exec(e).groups;o??="";const a=(n.getCurrentModX()||r.includes("x"))&&!o.includes("x"),s=M(r),t=M(o),u={};if(s&&(u.enable=s),t&&(u.disable=t),e.endsWith(")"))return n.replaceCurrentModX(a),v("flags",e,{flags:u});if(e.endsWith(":"))return n.pushModX(a),n.numOpenGroups++,g("group",e,{...(s||t)&&{flags:u}});throw new Error(`Unexpected flag modifier "${e}"`)}i(q,"L");function Y(e){const n=/\(\*(?<name>[A-Za-z_]\w*)?(?:\[(?<tag>(?:[A-Za-z_]\w*)?)\])?(?:\{(?<args>[^}]*)\})?\)/.exec(e);if(!n)throw new Error(`Incomplete or invalid named callout "${e}"`);const{name:r,tag:o,args:a}=n.groups;if(!r)throw new Error(`Invalid named callout "${e}"`);if(o==="")throw new Error(`Named callout tag with empty value not allowed "${e}"`);const s=a?a.split(",").filter(w=>w!=="").map(w=>/^[+-]?\d+$/.test(w)?+w:w):[],[t,u,c]=s,f=K.has(r)?r.toLowerCase():"custom";switch(f){case"fail":case"mismatch":case"skip":if(s.length>0)throw new Error(`Named callout arguments not allowed "${s}"`);break;case"error":if(s.length>1)throw new Error(`Named callout allows only one argument "${s}"`);if(typeof t=="string")throw new Error(`Named callout argument must be a number "${t}"`);break;case"max":if(!s.length||s.length>2)throw new Error(`Named callout must have one or two arguments "${s}"`);if(typeof t=="string"&&!/^[A-Za-z_]\w*$/.test(t))throw new Error(`Named callout argument one must be a tag or number "${t}"`);if(s.length===2&&(typeof u=="number"||!/^[<>X]$/.test(u)))throw new Error(`Named callout optional argument two must be '<', '>', or 'X' "${u}"`);break;case"count":case"total_count":if(s.length>1)throw new Error(`Named callout allows only one argument "${s}"`);if(s.length===1&&(typeof t=="number"||!/^[<>X]$/.test(t)))throw new Error(`Named callout optional argument must be '<', '>', or 'X' "${t}"`);break;case"cmp":if(s.length!==3)throw new Error(`Named callout must have three arguments "${s}"`);if(typeof t=="string"&&!/^[A-Za-z_]\w*$/.test(t))throw new Error(`Named callout argument one must be a tag or number "${t}"`);if(typeof u=="number"||!/^(?:[<>!=]=|[<>])$/.test(u))throw new Error(`Named callout argument two must be '==', '!=', '>', '<', '>=', or '<=' "${u}"`);if(typeof c=="string"&&!/^[A-Za-z_]\w*$/.test(c))throw new Error(`Named callout argument three must be a tag or number "${c}"`);break;case"custom":throw new Error(`Undefined callout name "${r}"`);default:throw new Error(`Unexpected named callout kind "${f}"`)}return L(f,o??null,a?.split(",")??null,e)}i(Y,"j");function O(e){let n=null,r,o;if(e[0]==="{"){const{minStr:a,maxStr:s}=/^\{(?<minStr>\d*)(?:,(?<maxStr>\d*))?/.exec(e).groups,t=1e5;if(+a>t||s&&+s>t)throw new Error("Quantifier value unsupported in Oniguruma");if(r=+a,o=s===void 0?+a:s===""?1/0:+s,r>o&&(n="possessive",[r,o]=[o,r]),e.endsWith("?")){if(n==="possessive")throw new Error('Unsupported possessive interval quantifier chain with "?"');n="lazy"}else n||(n="greedy")}else r=e[0]==="+"?1:0,o=e[0]==="?"?1:1/0,n=e[1]==="+"?"possessive":e[1]==="?"?"lazy":"greedy";return B(n,r,o,e)}i(O,"O");function J(e){const n=e[1].toLowerCase();return h({d:"digit",h:"hex",s:"space",w:"word"}[n],e,{negate:e[1]!==n})}i(J,"q");function V(e){const{p:n,neg:r,value:o}=/^\\(?<p>[pP])\{(?<neg>\^?)(?<value>[^}]+)/.exec(e).groups;return h("property",e,{value:o,negate:n==="P"&&!r||n==="p"&&!!r})}i(V,"V");function M(e){const n={};return e.includes("i")&&(n.ignoreCase=!0),e.includes("m")&&(n.dotAll=!0),e.includes("x")&&(n.extended=!0),Object.keys(n).length?n:null}i(M,"v");function ee(e){const n={ignoreCase:!1,dotAll:!1,extended:!1,digitIsAscii:!1,posixIsAscii:!1,spaceIsAscii:!1,wordIsAscii:!1,textSegmentMode:null};for(let r=0;r<e.length;r++){const o=e[r];if(!"imxDPSWy".includes(o))throw new Error(`Invalid flag "${o}"`);if(o==="y"){if(!/^y{[gw]}/.test(e.slice(r)))throw new Error('Invalid or unspecified flag "y" mode');n.textSegmentMode=e[r+2]==="g"?"grapheme":"word",r+=3;continue}n[{i:"ignoreCase",m:"dotAll",x:"extended",D:"digitIsAscii",P:"posixIsAscii",S:"spaceIsAscii",W:"wordIsAscii"}[o]]=!0}return n}i(ee,"Y");function re(e){if(/^(?:\\u(?!\p{AHex}{4})|\\x(?!\p{AHex}{1,2}|\{\p{AHex}{1,8}\}))/u.test(e))throw new Error(`Incomplete or invalid escape "${e}"`);const n=e[2]==="{"?/^\\x\{\s*(?<hex>\p{AHex}+)/u.exec(e).groups.hex:e.slice(2);return parseInt(n,16)}i(re,"J");function ne(e,n){const{raw:r,inCharClass:o}=e,a=r.slice(1);if(!o&&(a!=="0"&&a.length===1||a[0]!=="0"&&+a<=n))return[C(r)];const s=[],t=a.match(/^[0-7]+|\d/g);for(let u=0;u<t.length;u++){const c=t[u];let f;if(u===0&&c!=="8"&&c!=="9"){if(f=parseInt(c,8),f>127)throw new Error(p`Octal encoded byte above 177 unsupported "${r}"`)}else f=m(c);s.push(d(f,(u===0?"\\":"")+c))}return s}i(ne,"ee");function te(e){const n=[],r=new RegExp(k,"gy");let o;for(;o=r.exec(e);){const a=o[0];if(a[0]==="{"){const s=/^\{(?<min>\d+),(?<max>\d+)\}\??$/.exec(a);if(s){const{min:t,max:u}=s.groups;if(+t>+u&&a.endsWith("?")){r.lastIndex--,n.push(O(a.slice(0,-1)));continue}}}n.push(O(a))}return n}i(te,"te");export{G as tokenize};
33
+ `,o);return{lastIndex:t===-1?n.length:t}}if(/^\s$/.test(r)){const t=/\s+/y;return t.lastIndex=o,{lastIndex:t.exec(n)?t.lastIndex:o}}}if(r===".")return{token:h("dot",r)};if(r==="^"||r==="$"){const t=e.singleline?{"^":p`\A`,$:p`\Z`}[r]:r;return{token:I(t,r)}}return r==="|"?{token:_(r)}:k.test(r)?{tokens:te(r)}:{token:d(m(r),r)}}i(z,"F");function H(e,n,r){const o=[b(n[1]==="^",n)];let a=1,s;for($.lastIndex=r;s=$.exec(e);){const t=s[0];if(t[0]==="["&&t[1]!==":")a++,o.push(b(t[1]==="^",t));else if(t==="]"){if(o.at(-1).type==="CharacterClassOpen")o.push(d(93,t));else if(a--,o.push(Z(t)),!a)break}else{const u=P(t);Array.isArray(u)?o.push(...u):o.push(u)}}return{tokens:o,lastIndex:$.lastIndex||e.length}}i(H,"K");function P(e){if(e[0]==="\\")return A(e,{inCharClass:!0});if(e[0]==="["){const n=/\[:(?<negate>\^?)(?<name>[a-z]+):\]/.exec(e);if(!n||!S.has(n.groups.name))throw new Error(`Invalid POSIX class "${e}"`);return h("posix",e,{value:n.groups.name,negate:!!n.groups.negate})}return e==="-"?R(e):e==="&&"?T(e):d(m(e),e)}i(P,"X");function A(e,{inCharClass:n}){const r=e[1];if(r==="c"||r==="C")return Q(e);if("dDhHsSwW".includes(r))return J(e);if(e.startsWith(p`\o{`))throw new Error(`Incomplete, invalid, or unsupported octal code point "${e}"`);if(/^\\[pP]\{/.test(e)){if(e.length===3)throw new Error(`Incomplete or invalid Unicode property "${e}"`);return V(e)}if(new RegExp("^\\\\x[89A-Fa-f]\\p{AHex}","u").test(e))try{const o=e.split(/\\x/).slice(1).map(t=>parseInt(t,16)),a=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}).decode(new Uint8Array(o)),s=new TextEncoder;return[...a].map(t=>{const u=[...s.encode(t)].map(c=>`\\x${c.toString(16)}`).join("");return d(m(t),u)})}catch{throw new Error(`Multibyte code "${e}" incomplete or invalid in Oniguruma`)}if(r==="u"||r==="x")return d(re(e),e);if(N.has(r))return d(N.get(r),e);if(/\d/.test(r))return D(n,e);if(e==="\\")throw new Error(p`Incomplete escape "\"`);if(r==="M")throw new Error(`Unsupported meta "${e}"`);if([...e].length===2)return d(e.codePointAt(1),e);throw new Error(`Unexpected escape "${e}"`)}i(A,"x");function _(e){return{type:"Alternator",raw:e}}i(_,"P");function I(e,n){return{type:"Assertion",kind:e,raw:n}}i(I,"w");function C(e){return{type:"Backreference",raw:e}}i(C,"A");function d(e,n){return{type:"Character",value:e,raw:n}}i(d,"d");function Z(e){return{type:"CharacterClassClose",raw:e}}i(Z,"z");function R(e){return{type:"CharacterClassHyphen",raw:e}}i(R,"U");function T(e){return{type:"CharacterClassIntersector",raw:e}}i(T,"H");function b(e,n){return{type:"CharacterClassOpen",negate:e,raw:n}}i(b,"E");function h(e,n,r={}){return{type:"CharacterSet",kind:e,...r,raw:n}}i(h,"k");function v(e,n,r={}){return e==="keep"?{type:"Directive",kind:e,raw:n}:{type:"Directive",kind:e,flags:W(r.flags),raw:n}}i(v,"I");function D(e,n){return{type:"EscapedNumber",inCharClass:e,raw:n}}i(D,"W");function F(e){return{type:"GroupClose",raw:e}}i(F,"Q");function g(e,n,r={}){return{type:"GroupOpen",kind:e,...r,raw:n}}i(g,"f");function L(e,n,r,o){return{type:"NamedCallout",kind:e,tag:n,arguments:r,raw:o}}i(L,"D");function B(e,n,r,o){return{type:"Quantifier",kind:e,min:n,max:r,raw:o}}i(B,"_");function j(e){return{type:"Subroutine",raw:e}}i(j,"R");const K=new Set(["COUNT","CMP","ERROR","FAIL","MAX","MISMATCH","SKIP","TOTAL_COUNT"]),N=new Map([["a",7],["b",8],["e",27],["f",12],["n",10],["r",13],["t",9],["v",11]]);function Q(e){const n=e[1]==="c"?e[2]:e[3];if(!n||!/[A-Za-z]/.test(n))throw new Error(`Unsupported control character "${e}"`);return d(m(n.toUpperCase())-64,e)}i(Q,"Z");function q(e,n){let{on:r,off:o}=/^\(\?(?<on>[imx]*)(?:-(?<off>[-imx]*))?/.exec(e).groups;o??="";const a=(n.getCurrentModX()||r.includes("x"))&&!o.includes("x"),s=M(r),t=M(o),u={};if(s&&(u.enable=s),t&&(u.disable=t),e.endsWith(")"))return n.replaceCurrentModX(a),v("flags",e,{flags:u});if(e.endsWith(":"))return n.pushModX(a),n.numOpenGroups++,g("group",e,{...(s||t)&&{flags:u}});throw new Error(`Unexpected flag modifier "${e}"`)}i(q,"L");function Y(e){const n=/\(\*(?<name>[A-Za-z_]\w*)?(?:\[(?<tag>(?:[A-Za-z_]\w*)?)\])?(?:\{(?<args>[^}]*)\})?\)/.exec(e);if(!n)throw new Error(`Incomplete or invalid named callout "${e}"`);const{name:r,tag:o,args:a}=n.groups;if(!r)throw new Error(`Invalid named callout "${e}"`);if(o==="")throw new Error(`Named callout tag with empty value not allowed "${e}"`);const s=a?a.split(",").filter(w=>w!=="").map(w=>/^[+-]?\d+$/.test(w)?+w:w):[],[t,u,c]=s,f=K.has(r)?r.toLowerCase():"custom";switch(f){case"fail":case"mismatch":case"skip":if(s.length>0)throw new Error(`Named callout arguments not allowed "${s}"`);break;case"error":if(s.length>1)throw new Error(`Named callout allows only one argument "${s}"`);if(typeof t=="string")throw new Error(`Named callout argument must be a number "${t}"`);break;case"max":if(!s.length||s.length>2)throw new Error(`Named callout must have one or two arguments "${s}"`);if(typeof t=="string"&&!/^[A-Za-z_]\w*$/.test(t))throw new Error(`Named callout argument one must be a tag or number "${t}"`);if(s.length===2&&(typeof u=="number"||!/^[<>X]$/.test(u)))throw new Error(`Named callout optional argument two must be '<', '>', or 'X' "${u}"`);break;case"count":case"total_count":if(s.length>1)throw new Error(`Named callout allows only one argument "${s}"`);if(s.length===1&&(typeof t=="number"||!/^[<>X]$/.test(t)))throw new Error(`Named callout optional argument must be '<', '>', or 'X' "${t}"`);break;case"cmp":if(s.length!==3)throw new Error(`Named callout must have three arguments "${s}"`);if(typeof t=="string"&&!/^[A-Za-z_]\w*$/.test(t))throw new Error(`Named callout argument one must be a tag or number "${t}"`);if(typeof u=="number"||!/^(?:[<>!=]=|[<>])$/.test(u))throw new Error(`Named callout argument two must be '==', '!=', '>', '<', '>=', or '<=' "${u}"`);if(typeof c=="string"&&!/^[A-Za-z_]\w*$/.test(c))throw new Error(`Named callout argument three must be a tag or number "${c}"`);break;case"custom":throw new Error(`Undefined callout name "${r}"`);default:throw new Error(`Unexpected named callout kind "${f}"`)}return L(f,o??null,a?.split(",")??null,e)}i(Y,"j");function O(e){let n=null,r,o;if(e[0]==="{"){const{minStr:a,maxStr:s}=/^\{(?<minStr>\d*)(?:,(?<maxStr>\d*))?/.exec(e).groups,t=1e5;if(+a>t||s&&+s>t)throw new Error("Quantifier value unsupported in Oniguruma");if(r=+a,o=s===void 0?+a:s===""?1/0:+s,r>o&&(n="possessive",[r,o]=[o,r]),e.endsWith("?")){if(n==="possessive")throw new Error('Unsupported possessive interval quantifier chain with "?"');n="lazy"}else n||(n="greedy")}else r=e[0]==="+"?1:0,o=e[0]==="?"?1:1/0,n=e[1]==="+"?"possessive":e[1]==="?"?"lazy":"greedy";return B(n,r,o,e)}i(O,"O");function J(e){const n=e[1].toLowerCase();return h({d:"digit",h:"hex",s:"space",w:"word"}[n],e,{negate:e[1]!==n})}i(J,"q");function V(e){const{p:n,neg:r,value:o}=/^\\(?<p>[pP])\{(?<neg>\^?)(?<value>[^}]+)/.exec(e).groups;return h("property",e,{value:o,negate:n==="P"&&!r||n==="p"&&!!r})}i(V,"V");function M(e){const n={};return e.includes("i")&&(n.ignoreCase=!0),e.includes("m")&&(n.dotAll=!0),e.includes("x")&&(n.extended=!0),Object.keys(n).length?n:null}i(M,"v");function ee(e){const n={ignoreCase:!1,dotAll:!1,extended:!1,digitIsAscii:!1,posixIsAscii:!1,spaceIsAscii:!1,wordIsAscii:!1,textSegmentMode:null};for(let r=0;r<e.length;r++){const o=e[r];if(!"imxDPSWy".includes(o))throw new Error(`Invalid flag "${o}"`);if(o==="y"){if(!/^y{[gw]}/.test(e.slice(r)))throw new Error('Invalid or unspecified flag "y" mode');n.textSegmentMode=e[r+2]==="g"?"grapheme":"word",r+=3;continue}n[{i:"ignoreCase",m:"dotAll",x:"extended",D:"digitIsAscii",P:"posixIsAscii",S:"spaceIsAscii",W:"wordIsAscii"}[o]]=!0}return n}i(ee,"Y");function re(e){if(new RegExp("^(?:\\\\u(?!\\p{AHex}{4})|\\\\x(?!\\p{AHex}{1,2}|\\{\\p{AHex}{1,8}\\}))","u").test(e))throw new Error(`Incomplete or invalid escape "${e}"`);const n=e[2]==="{"?new RegExp("^\\\\x\\{\\s*(?<hex>\\p{AHex}+)","u").exec(e).groups.hex:e.slice(2);return parseInt(n,16)}i(re,"J");function ne(e,n){const{raw:r,inCharClass:o}=e,a=r.slice(1);if(!o&&(a!=="0"&&a.length===1||a[0]!=="0"&&+a<=n))return[C(r)];const s=[],t=a.match(/^[0-7]+|\d/g);for(let u=0;u<t.length;u++){const c=t[u];let f;if(u===0&&c!=="8"&&c!=="9"){if(f=parseInt(c,8),f>127)throw new Error(p`Octal encoded byte above 177 unsupported "${r}"`)}else f=m(c);s.push(d(f,(u===0?"\\":"")+c))}return s}i(ne,"ee");function te(e){const n=[],r=new RegExp(k,"gy");let o;for(;o=r.exec(e);){const a=o[0];if(a[0]==="{"){const s=/^\{(?<min>\d+),(?<max>\d+)\}\??$/.exec(a);if(s){const{min:t,max:u}=s.groups;if(+t>+u&&a.endsWith("?")){r.lastIndex--,n.push(O(a.slice(0,-1)));continue}}}n.push(O(a))}return n}i(te,"te");export{G as tokenize};