@langchain/core 1.2.13 → 1.2.16
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.
- package/CHANGELOG.md +19 -0
- package/dist/agents.d.cts +3 -4
- package/dist/agents.d.cts.map +1 -1
- package/dist/agents.d.ts +3 -4
- package/dist/agents.d.ts.map +1 -1
- package/dist/caches/index.d.cts +5 -6
- package/dist/caches/index.d.cts.map +1 -1
- package/dist/caches/index.d.ts +5 -6
- package/dist/caches/index.d.ts.map +1 -1
- package/dist/callbacks/base.d.cts +10 -11
- package/dist/callbacks/base.d.cts.map +1 -1
- package/dist/callbacks/base.d.ts +10 -11
- package/dist/callbacks/base.d.ts.map +1 -1
- package/dist/callbacks/dispatch/index.d.cts +1 -2
- package/dist/callbacks/dispatch/index.d.cts.map +1 -1
- package/dist/callbacks/dispatch/index.d.ts +1 -2
- package/dist/callbacks/dispatch/index.d.ts.map +1 -1
- package/dist/callbacks/dispatch/web.d.cts +1 -2
- package/dist/callbacks/dispatch/web.d.cts.map +1 -1
- package/dist/callbacks/dispatch/web.d.ts +1 -2
- package/dist/callbacks/dispatch/web.d.ts.map +1 -1
- package/dist/callbacks/manager.cjs +1 -1
- package/dist/callbacks/manager.cjs.map +1 -1
- package/dist/callbacks/manager.d.cts +12 -13
- package/dist/callbacks/manager.d.cts.map +1 -1
- package/dist/callbacks/manager.d.ts +12 -13
- package/dist/callbacks/manager.d.ts.map +1 -1
- package/dist/callbacks/manager.js +1 -1
- package/dist/callbacks/manager.js.map +1 -1
- package/dist/chat_history.d.cts +3 -4
- package/dist/chat_history.d.cts.map +1 -1
- package/dist/chat_history.d.ts +3 -4
- package/dist/chat_history.d.ts.map +1 -1
- package/dist/context.d.cts +2 -2
- package/dist/context.d.cts.map +1 -1
- package/dist/context.d.ts +2 -2
- package/dist/context.d.ts.map +1 -1
- package/dist/document_loaders/base.d.cts +2 -3
- package/dist/document_loaders/base.d.cts.map +1 -1
- package/dist/document_loaders/base.d.ts +2 -3
- package/dist/document_loaders/base.d.ts.map +1 -1
- package/dist/document_loaders/langsmith.d.cts +2 -3
- package/dist/document_loaders/langsmith.d.cts.map +1 -1
- package/dist/document_loaders/langsmith.d.ts +2 -3
- package/dist/document_loaders/langsmith.d.ts.map +1 -1
- package/dist/documents/document.d.cts +3 -4
- package/dist/documents/document.d.cts.map +1 -1
- package/dist/documents/document.d.ts +3 -4
- package/dist/documents/document.d.ts.map +1 -1
- package/dist/documents/transformers.d.cts +2 -3
- package/dist/documents/transformers.d.cts.map +1 -1
- package/dist/documents/transformers.d.ts +2 -3
- package/dist/documents/transformers.d.ts.map +1 -1
- package/dist/embeddings.d.cts +3 -4
- package/dist/embeddings.d.cts.map +1 -1
- package/dist/embeddings.d.ts +3 -4
- package/dist/embeddings.d.ts.map +1 -1
- package/dist/errors/index.cjs.map +1 -1
- package/dist/errors/index.d.cts +13 -19
- package/dist/errors/index.d.cts.map +1 -1
- package/dist/errors/index.d.ts +13 -19
- package/dist/errors/index.d.ts.map +1 -1
- package/dist/errors/index.js.map +1 -1
- package/dist/example_selectors/base.d.cts +1 -2
- package/dist/example_selectors/base.d.cts.map +1 -1
- package/dist/example_selectors/base.d.ts +1 -2
- package/dist/example_selectors/base.d.ts.map +1 -1
- package/dist/example_selectors/conditional.d.cts +5 -6
- package/dist/example_selectors/conditional.d.cts.map +1 -1
- package/dist/example_selectors/conditional.d.ts +5 -6
- package/dist/example_selectors/conditional.d.ts.map +1 -1
- package/dist/example_selectors/length_based.d.cts +2 -3
- package/dist/example_selectors/length_based.d.cts.map +1 -1
- package/dist/example_selectors/length_based.d.ts +2 -3
- package/dist/example_selectors/length_based.d.ts.map +1 -1
- package/dist/example_selectors/semantic_similarity.d.cts +2 -3
- package/dist/example_selectors/semantic_similarity.d.cts.map +1 -1
- package/dist/example_selectors/semantic_similarity.d.ts +2 -3
- package/dist/example_selectors/semantic_similarity.d.ts.map +1 -1
- package/dist/indexing/base.d.cts +9 -10
- package/dist/indexing/base.d.cts.map +1 -1
- package/dist/indexing/base.d.ts +9 -10
- package/dist/indexing/base.d.ts.map +1 -1
- package/dist/indexing/record_manager.d.cts +5 -6
- package/dist/indexing/record_manager.d.cts.map +1 -1
- package/dist/indexing/record_manager.d.ts +5 -6
- package/dist/indexing/record_manager.d.ts.map +1 -1
- package/dist/language_models/base.cjs +1 -1
- package/dist/language_models/base.cjs.map +1 -1
- package/dist/language_models/base.d.cts +24 -25
- package/dist/language_models/base.d.cts.map +1 -1
- package/dist/language_models/base.d.ts +24 -25
- package/dist/language_models/base.d.ts.map +1 -1
- package/dist/language_models/base.js +1 -1
- package/dist/language_models/base.js.map +1 -1
- package/dist/language_models/chat_models.d.cts +9 -10
- package/dist/language_models/chat_models.d.cts.map +1 -1
- package/dist/language_models/chat_models.d.ts +9 -10
- package/dist/language_models/chat_models.d.ts.map +1 -1
- package/dist/language_models/compat.d.cts +2 -3
- package/dist/language_models/compat.d.cts.map +1 -1
- package/dist/language_models/compat.d.ts +2 -3
- package/dist/language_models/compat.d.ts.map +1 -1
- package/dist/language_models/event.d.cts +15 -16
- package/dist/language_models/event.d.cts.map +1 -1
- package/dist/language_models/event.d.ts +15 -16
- package/dist/language_models/event.d.ts.map +1 -1
- package/dist/language_models/llms.d.cts +5 -6
- package/dist/language_models/llms.d.cts.map +1 -1
- package/dist/language_models/llms.d.ts +5 -6
- package/dist/language_models/llms.d.ts.map +1 -1
- package/dist/language_models/openai_completions_stream.d.cts +8 -9
- package/dist/language_models/openai_completions_stream.d.cts.map +1 -1
- package/dist/language_models/openai_completions_stream.d.ts +8 -9
- package/dist/language_models/openai_completions_stream.d.ts.map +1 -1
- package/dist/language_models/profile.cjs.map +1 -1
- package/dist/language_models/profile.d.cts +16 -2
- package/dist/language_models/profile.d.cts.map +1 -1
- package/dist/language_models/profile.d.ts +16 -2
- package/dist/language_models/profile.d.ts.map +1 -1
- package/dist/language_models/profile.js.map +1 -1
- package/dist/language_models/stream.d.cts +5 -6
- package/dist/language_models/stream.d.cts.map +1 -1
- package/dist/language_models/stream.d.ts +5 -6
- package/dist/language_models/stream.d.ts.map +1 -1
- package/dist/language_models/structured_output.d.cts +3 -4
- package/dist/language_models/structured_output.d.cts.map +1 -1
- package/dist/language_models/structured_output.d.ts +3 -4
- package/dist/language_models/structured_output.d.ts.map +1 -1
- package/dist/load/import_type.d.cts +2 -3
- package/dist/load/import_type.d.cts.map +1 -1
- package/dist/load/import_type.d.ts +2 -3
- package/dist/load/import_type.d.ts.map +1 -1
- package/dist/load/index.d.cts +2 -3
- package/dist/load/index.d.cts.map +1 -1
- package/dist/load/index.d.ts +2 -3
- package/dist/load/index.d.ts.map +1 -1
- package/dist/load/map_keys.d.cts +1 -2
- package/dist/load/map_keys.d.cts.map +1 -1
- package/dist/load/map_keys.d.ts +1 -2
- package/dist/load/map_keys.d.ts.map +1 -1
- package/dist/load/serializable.d.cts +9 -10
- package/dist/load/serializable.d.cts.map +1 -1
- package/dist/load/serializable.d.ts +9 -10
- package/dist/load/serializable.d.ts.map +1 -1
- package/dist/memory.d.cts +7 -8
- package/dist/memory.d.cts.map +1 -1
- package/dist/memory.d.ts +7 -8
- package/dist/memory.d.ts.map +1 -1
- package/dist/messages/ai.d.cts +6 -7
- package/dist/messages/ai.d.cts.map +1 -1
- package/dist/messages/ai.d.ts +6 -7
- package/dist/messages/ai.d.ts.map +1 -1
- package/dist/messages/base.d.cts +23 -24
- package/dist/messages/base.d.cts.map +1 -1
- package/dist/messages/base.d.ts +23 -24
- package/dist/messages/base.d.ts.map +1 -1
- package/dist/messages/chat.d.cts +5 -6
- package/dist/messages/chat.d.cts.map +1 -1
- package/dist/messages/chat.d.ts +5 -6
- package/dist/messages/chat.d.ts.map +1 -1
- package/dist/messages/content/base.d.cts +1 -2
- package/dist/messages/content/base.d.cts.map +1 -1
- package/dist/messages/content/base.d.ts +1 -2
- package/dist/messages/content/base.d.ts.map +1 -1
- package/dist/messages/content/data.d.cts +18 -19
- package/dist/messages/content/data.d.cts.map +1 -1
- package/dist/messages/content/data.d.ts +18 -19
- package/dist/messages/content/data.d.ts.map +1 -1
- package/dist/messages/content/index.d.cts +4 -5
- package/dist/messages/content/index.d.cts.map +1 -1
- package/dist/messages/content/index.d.ts +4 -5
- package/dist/messages/content/index.d.ts.map +1 -1
- package/dist/messages/content/multimodal.d.cts +2 -3
- package/dist/messages/content/multimodal.d.cts.map +1 -1
- package/dist/messages/content/multimodal.d.ts +2 -3
- package/dist/messages/content/multimodal.d.ts.map +1 -1
- package/dist/messages/content/tools.d.cts +2 -3
- package/dist/messages/content/tools.d.cts.map +1 -1
- package/dist/messages/content/tools.d.ts +2 -3
- package/dist/messages/content/tools.d.ts.map +1 -1
- package/dist/messages/format.d.cts +1 -2
- package/dist/messages/format.d.cts.map +1 -1
- package/dist/messages/format.d.ts +1 -2
- package/dist/messages/format.d.ts.map +1 -1
- package/dist/messages/function.d.cts +5 -6
- package/dist/messages/function.d.cts.map +1 -1
- package/dist/messages/function.d.ts +5 -6
- package/dist/messages/function.d.ts.map +1 -1
- package/dist/messages/human.d.cts +5 -6
- package/dist/messages/human.d.cts.map +1 -1
- package/dist/messages/human.d.ts +5 -6
- package/dist/messages/human.d.ts.map +1 -1
- package/dist/messages/message.d.cts +20 -21
- package/dist/messages/message.d.cts.map +1 -1
- package/dist/messages/message.d.ts +20 -21
- package/dist/messages/message.d.ts.map +1 -1
- package/dist/messages/metadata.d.cts +7 -8
- package/dist/messages/metadata.d.cts.map +1 -1
- package/dist/messages/metadata.d.ts +7 -8
- package/dist/messages/metadata.d.ts.map +1 -1
- package/dist/messages/modifier.d.cts +2 -3
- package/dist/messages/modifier.d.cts.map +1 -1
- package/dist/messages/modifier.d.ts +2 -3
- package/dist/messages/modifier.d.ts.map +1 -1
- package/dist/messages/system.d.cts +5 -6
- package/dist/messages/system.d.cts.map +1 -1
- package/dist/messages/system.d.ts +5 -6
- package/dist/messages/system.d.ts.map +1 -1
- package/dist/messages/tool.d.cts +11 -12
- package/dist/messages/tool.d.cts.map +1 -1
- package/dist/messages/tool.d.ts +11 -12
- package/dist/messages/tool.d.ts.map +1 -1
- package/dist/messages/transformers.d.cts +12 -13
- package/dist/messages/transformers.d.cts.map +1 -1
- package/dist/messages/transformers.d.ts +12 -13
- package/dist/messages/transformers.d.ts.map +1 -1
- package/dist/messages/utils.d.cts +13 -14
- package/dist/messages/utils.d.cts.map +1 -1
- package/dist/messages/utils.d.ts +13 -14
- package/dist/messages/utils.d.ts.map +1 -1
- package/dist/output_parsers/base.d.cts +4 -5
- package/dist/output_parsers/base.d.cts.map +1 -1
- package/dist/output_parsers/base.d.ts +4 -5
- package/dist/output_parsers/base.d.ts.map +1 -1
- package/dist/output_parsers/bytes.d.cts +1 -2
- package/dist/output_parsers/bytes.d.cts.map +1 -1
- package/dist/output_parsers/bytes.d.ts +1 -2
- package/dist/output_parsers/bytes.d.ts.map +1 -1
- package/dist/output_parsers/json.d.cts +2 -2
- package/dist/output_parsers/json.d.cts.map +1 -1
- package/dist/output_parsers/json.d.ts +2 -2
- package/dist/output_parsers/json.d.ts.map +1 -1
- package/dist/output_parsers/list.d.cts +5 -6
- package/dist/output_parsers/list.d.cts.map +1 -1
- package/dist/output_parsers/list.d.ts +5 -6
- package/dist/output_parsers/list.d.ts.map +1 -1
- package/dist/output_parsers/openai_functions/json_output_functions_parsers.d.cts +4 -5
- package/dist/output_parsers/openai_functions/json_output_functions_parsers.d.cts.map +1 -1
- package/dist/output_parsers/openai_functions/json_output_functions_parsers.d.ts +4 -5
- package/dist/output_parsers/openai_functions/json_output_functions_parsers.d.ts.map +1 -1
- package/dist/output_parsers/openai_tools/json_output_tools_parsers.d.cts +12 -13
- package/dist/output_parsers/openai_tools/json_output_tools_parsers.d.cts.map +1 -1
- package/dist/output_parsers/openai_tools/json_output_tools_parsers.d.ts +12 -13
- package/dist/output_parsers/openai_tools/json_output_tools_parsers.d.ts.map +1 -1
- package/dist/output_parsers/standard_schema.d.cts +1 -2
- package/dist/output_parsers/standard_schema.d.cts.map +1 -1
- package/dist/output_parsers/standard_schema.d.ts +1 -2
- package/dist/output_parsers/standard_schema.d.ts.map +1 -1
- package/dist/output_parsers/string.d.cts +1 -2
- package/dist/output_parsers/string.d.cts.map +1 -1
- package/dist/output_parsers/string.d.ts +1 -2
- package/dist/output_parsers/string.d.ts.map +1 -1
- package/dist/output_parsers/structured.d.cts +6 -7
- package/dist/output_parsers/structured.d.cts.map +1 -1
- package/dist/output_parsers/structured.d.ts +6 -7
- package/dist/output_parsers/structured.d.ts.map +1 -1
- package/dist/output_parsers/transform.d.cts +3 -4
- package/dist/output_parsers/transform.d.cts.map +1 -1
- package/dist/output_parsers/transform.d.ts +3 -4
- package/dist/output_parsers/transform.d.ts.map +1 -1
- package/dist/output_parsers/xml.d.cts +6 -7
- package/dist/output_parsers/xml.d.cts.map +1 -1
- package/dist/output_parsers/xml.d.ts +6 -7
- package/dist/output_parsers/xml.d.ts.map +1 -1
- package/dist/outputs.d.cts +9 -10
- package/dist/outputs.d.cts.map +1 -1
- package/dist/outputs.d.ts +9 -10
- package/dist/outputs.d.ts.map +1 -1
- package/dist/prompt_values.d.cts +10 -11
- package/dist/prompt_values.d.cts.map +1 -1
- package/dist/prompt_values.d.ts +10 -11
- package/dist/prompt_values.d.ts.map +1 -1
- package/dist/prompts/base.d.cts +4 -5
- package/dist/prompts/base.d.cts.map +1 -1
- package/dist/prompts/base.d.ts +4 -5
- package/dist/prompts/base.d.ts.map +1 -1
- package/dist/prompts/chat.d.cts +14 -15
- package/dist/prompts/chat.d.cts.map +1 -1
- package/dist/prompts/chat.d.ts +14 -15
- package/dist/prompts/chat.d.ts.map +1 -1
- package/dist/prompts/dict.d.cts +1 -2
- package/dist/prompts/dict.d.cts.map +1 -1
- package/dist/prompts/dict.d.ts +1 -2
- package/dist/prompts/dict.d.ts.map +1 -1
- package/dist/prompts/few_shot.d.cts +4 -5
- package/dist/prompts/few_shot.d.cts.map +1 -1
- package/dist/prompts/few_shot.d.ts +4 -5
- package/dist/prompts/few_shot.d.ts.map +1 -1
- package/dist/prompts/image.d.cts +2 -3
- package/dist/prompts/image.d.cts.map +1 -1
- package/dist/prompts/image.d.ts +2 -3
- package/dist/prompts/image.d.ts.map +1 -1
- package/dist/prompts/pipeline.d.cts +3 -4
- package/dist/prompts/pipeline.d.cts.map +1 -1
- package/dist/prompts/pipeline.d.ts +3 -4
- package/dist/prompts/pipeline.d.ts.map +1 -1
- package/dist/prompts/prompt.d.cts +4 -5
- package/dist/prompts/prompt.d.cts.map +1 -1
- package/dist/prompts/prompt.d.ts +4 -5
- package/dist/prompts/prompt.d.ts.map +1 -1
- package/dist/prompts/serde.d.cts +3 -4
- package/dist/prompts/serde.d.cts.map +1 -1
- package/dist/prompts/serde.d.ts +3 -4
- package/dist/prompts/serde.d.ts.map +1 -1
- package/dist/prompts/string.d.cts +1 -2
- package/dist/prompts/string.d.cts.map +1 -1
- package/dist/prompts/string.d.ts +1 -2
- package/dist/prompts/string.d.ts.map +1 -1
- package/dist/prompts/structured.d.cts +2 -3
- package/dist/prompts/structured.d.cts.map +1 -1
- package/dist/prompts/structured.d.ts +2 -3
- package/dist/prompts/structured.d.ts.map +1 -1
- package/dist/prompts/template.d.cts +12 -13
- package/dist/prompts/template.d.cts.map +1 -1
- package/dist/prompts/template.d.ts +12 -13
- package/dist/prompts/template.d.ts.map +1 -1
- package/dist/retrievers/document_compressors/index.d.cts +1 -2
- package/dist/retrievers/document_compressors/index.d.cts.map +1 -1
- package/dist/retrievers/document_compressors/index.d.ts +1 -2
- package/dist/retrievers/document_compressors/index.d.ts.map +1 -1
- package/dist/retrievers/index.d.cts +3 -4
- package/dist/retrievers/index.d.cts.map +1 -1
- package/dist/retrievers/index.d.ts +3 -4
- package/dist/retrievers/index.d.ts.map +1 -1
- package/dist/runnables/base.d.cts +23 -23
- package/dist/runnables/base.d.cts.map +1 -1
- package/dist/runnables/base.d.ts +23 -23
- package/dist/runnables/base.d.ts.map +1 -1
- package/dist/runnables/branch.d.cts +3 -4
- package/dist/runnables/branch.d.cts.map +1 -1
- package/dist/runnables/branch.d.ts +3 -4
- package/dist/runnables/branch.d.ts.map +1 -1
- package/dist/runnables/config.d.cts +6 -6
- package/dist/runnables/config.d.cts.map +1 -1
- package/dist/runnables/config.d.ts +6 -6
- package/dist/runnables/config.d.ts.map +1 -1
- package/dist/runnables/graph.d.cts +2 -2
- package/dist/runnables/graph.d.cts.map +1 -1
- package/dist/runnables/graph.d.ts +2 -2
- package/dist/runnables/graph.d.ts.map +1 -1
- package/dist/runnables/history.d.cts +2 -3
- package/dist/runnables/history.d.cts.map +1 -1
- package/dist/runnables/history.d.ts +2 -3
- package/dist/runnables/history.d.ts.map +1 -1
- package/dist/runnables/passthrough.d.cts +1 -2
- package/dist/runnables/passthrough.d.cts.map +1 -1
- package/dist/runnables/passthrough.d.ts +1 -2
- package/dist/runnables/passthrough.d.ts.map +1 -1
- package/dist/runnables/router.d.cts +2 -3
- package/dist/runnables/router.d.cts.map +1 -1
- package/dist/runnables/router.d.ts +2 -3
- package/dist/runnables/router.d.ts.map +1 -1
- package/dist/runnables/types.d.cts +6 -7
- package/dist/runnables/types.d.cts.map +1 -1
- package/dist/runnables/types.d.ts +6 -7
- package/dist/runnables/types.d.ts.map +1 -1
- package/dist/singletons/async_local_storage/context.d.cts +4 -5
- package/dist/singletons/async_local_storage/context.d.cts.map +1 -1
- package/dist/singletons/async_local_storage/context.d.ts +4 -5
- package/dist/singletons/async_local_storage/context.d.ts.map +1 -1
- package/dist/singletons/async_local_storage/globals.d.cts +2 -3
- package/dist/singletons/async_local_storage/globals.d.cts.map +1 -1
- package/dist/singletons/async_local_storage/globals.d.ts +2 -3
- package/dist/singletons/async_local_storage/globals.d.ts.map +1 -1
- package/dist/singletons/async_local_storage/index.d.cts +2 -2
- package/dist/singletons/async_local_storage/index.d.cts.map +1 -1
- package/dist/singletons/async_local_storage/index.d.ts +2 -2
- package/dist/singletons/async_local_storage/index.d.ts.map +1 -1
- package/dist/singletons/callbacks.d.cts +2 -3
- package/dist/singletons/callbacks.d.cts.map +1 -1
- package/dist/singletons/callbacks.d.ts +2 -3
- package/dist/singletons/callbacks.d.ts.map +1 -1
- package/dist/stores.d.cts +2 -3
- package/dist/stores.d.cts.map +1 -1
- package/dist/stores.d.ts +2 -3
- package/dist/stores.d.ts.map +1 -1
- package/dist/structured_query/base.d.cts +3 -4
- package/dist/structured_query/base.d.cts.map +1 -1
- package/dist/structured_query/base.d.ts +3 -4
- package/dist/structured_query/base.d.ts.map +1 -1
- package/dist/structured_query/functional.d.cts +2 -3
- package/dist/structured_query/functional.d.cts.map +1 -1
- package/dist/structured_query/functional.d.ts +2 -3
- package/dist/structured_query/functional.d.ts.map +1 -1
- package/dist/structured_query/ir.d.cts +23 -24
- package/dist/structured_query/ir.d.cts.map +1 -1
- package/dist/structured_query/ir.d.ts +23 -24
- package/dist/structured_query/ir.d.ts.map +1 -1
- package/dist/structured_query/utils.d.cts +7 -8
- package/dist/structured_query/utils.d.cts.map +1 -1
- package/dist/structured_query/utils.d.ts +7 -8
- package/dist/structured_query/utils.d.ts.map +1 -1
- package/dist/testing/fake_model_builder.d.cts +2 -3
- package/dist/testing/fake_model_builder.d.cts.map +1 -1
- package/dist/testing/fake_model_builder.d.ts +2 -3
- package/dist/testing/fake_model_builder.d.ts.map +1 -1
- package/dist/testing/index.d.cts +1 -0
- package/dist/testing/index.d.ts +1 -0
- package/dist/testing/matchers.d.cts +12 -13
- package/dist/testing/matchers.d.cts.map +1 -1
- package/dist/testing/matchers.d.ts +12 -13
- package/dist/testing/matchers.d.ts.map +1 -1
- package/dist/testing/vitest-expect.d.cts +8 -0
- package/dist/testing/vitest-expect.d.cts.map +1 -0
- package/dist/testing/vitest-expect.d.ts +8 -0
- package/dist/testing/vitest-expect.d.ts.map +1 -0
- package/dist/tools/index.d.cts +21 -21
- package/dist/tools/index.d.cts.map +1 -1
- package/dist/tools/index.d.ts +21 -21
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/types.d.cts +25 -26
- package/dist/tools/types.d.cts.map +1 -1
- package/dist/tools/types.d.ts +25 -26
- package/dist/tools/types.d.ts.map +1 -1
- package/dist/tools/utils.d.cts +1 -2
- package/dist/tools/utils.d.cts.map +1 -1
- package/dist/tools/utils.d.ts +1 -2
- package/dist/tools/utils.d.ts.map +1 -1
- package/dist/tracers/base.cjs +7 -4
- package/dist/tracers/base.cjs.map +1 -1
- package/dist/tracers/base.d.cts +7 -8
- package/dist/tracers/base.d.cts.map +1 -1
- package/dist/tracers/base.d.ts +7 -8
- package/dist/tracers/base.d.ts.map +1 -1
- package/dist/tracers/base.js +7 -4
- package/dist/tracers/base.js.map +1 -1
- package/dist/tracers/console.d.cts +1 -2
- package/dist/tracers/console.d.cts.map +1 -1
- package/dist/tracers/console.d.ts +1 -2
- package/dist/tracers/console.d.ts.map +1 -1
- package/dist/tracers/event_stream.d.cts +3 -4
- package/dist/tracers/event_stream.d.cts.map +1 -1
- package/dist/tracers/event_stream.d.ts +3 -4
- package/dist/tracers/event_stream.d.ts.map +1 -1
- package/dist/tracers/log_stream.d.cts +9 -9
- package/dist/tracers/log_stream.d.cts.map +1 -1
- package/dist/tracers/log_stream.d.ts +9 -9
- package/dist/tracers/log_stream.d.ts.map +1 -1
- package/dist/tracers/run_collector.d.cts +1 -2
- package/dist/tracers/run_collector.d.cts.map +1 -1
- package/dist/tracers/run_collector.d.ts +1 -2
- package/dist/tracers/run_collector.d.ts.map +1 -1
- package/dist/tracers/tracer_langchain.d.cts +6 -7
- package/dist/tracers/tracer_langchain.d.cts.map +1 -1
- package/dist/tracers/tracer_langchain.d.ts +6 -7
- package/dist/tracers/tracer_langchain.d.ts.map +1 -1
- package/dist/types/_internal.d.cts +1 -2
- package/dist/types/_internal.d.cts.map +1 -1
- package/dist/types/_internal.d.ts +1 -2
- package/dist/types/_internal.d.ts.map +1 -1
- package/dist/types/type-utils.d.cts +2 -3
- package/dist/types/type-utils.d.cts.map +1 -1
- package/dist/types/type-utils.d.ts +2 -3
- package/dist/types/type-utils.d.ts.map +1 -1
- package/dist/utils/async_caller.d.cts +6 -7
- package/dist/utils/async_caller.d.cts.map +1 -1
- package/dist/utils/async_caller.d.ts +6 -7
- package/dist/utils/async_caller.d.ts.map +1 -1
- package/dist/utils/chunk_array.d.cts +1 -2
- package/dist/utils/chunk_array.d.cts.map +1 -1
- package/dist/utils/chunk_array.d.ts +1 -2
- package/dist/utils/chunk_array.d.ts.map +1 -1
- package/dist/utils/context.d.cts +1 -2
- package/dist/utils/context.d.cts.map +1 -1
- package/dist/utils/context.d.ts +1 -2
- package/dist/utils/context.d.ts.map +1 -1
- package/dist/utils/env.d.cts +9 -10
- package/dist/utils/env.d.cts.map +1 -1
- package/dist/utils/env.d.ts +9 -10
- package/dist/utils/env.d.ts.map +1 -1
- package/dist/utils/event_source_parse.d.cts +6 -7
- package/dist/utils/event_source_parse.d.cts.map +1 -1
- package/dist/utils/event_source_parse.d.ts +6 -7
- package/dist/utils/event_source_parse.d.ts.map +1 -1
- package/dist/utils/fast-json-patch/src/core.d.cts +13 -14
- package/dist/utils/fast-json-patch/src/core.d.cts.map +1 -1
- package/dist/utils/fast-json-patch/src/core.d.ts +13 -14
- package/dist/utils/fast-json-patch/src/core.d.ts.map +1 -1
- package/dist/utils/fast-json-patch/src/duplex.d.cts +1 -2
- package/dist/utils/fast-json-patch/src/duplex.d.cts.map +1 -1
- package/dist/utils/fast-json-patch/src/duplex.d.ts +1 -2
- package/dist/utils/fast-json-patch/src/duplex.d.ts.map +1 -1
- package/dist/utils/format.d.cts +2 -3
- package/dist/utils/format.d.cts.map +1 -1
- package/dist/utils/format.d.ts +2 -3
- package/dist/utils/format.d.ts.map +1 -1
- package/dist/utils/function_calling.d.cts +3 -3
- package/dist/utils/function_calling.d.cts.map +1 -1
- package/dist/utils/function_calling.d.ts +3 -3
- package/dist/utils/function_calling.d.ts.map +1 -1
- package/dist/utils/gateway.d.cts +4 -5
- package/dist/utils/gateway.d.cts.map +1 -1
- package/dist/utils/gateway.d.ts +4 -5
- package/dist/utils/gateway.d.ts.map +1 -1
- package/dist/utils/hash.d.cts +2 -2
- package/dist/utils/hash.d.cts.map +1 -1
- package/dist/utils/hash.d.ts +2 -2
- package/dist/utils/hash.d.ts.map +1 -1
- package/dist/utils/js-sha256/hash.cjs +2 -2
- package/dist/utils/js-sha256/hash.cjs.map +1 -1
- package/dist/utils/js-sha256/hash.d.cts +1 -2
- package/dist/utils/js-sha256/hash.d.cts.map +1 -1
- package/dist/utils/js-sha256/hash.d.ts +1 -2
- package/dist/utils/js-sha256/hash.d.ts.map +1 -1
- package/dist/utils/js-sha256/hash.js +2 -2
- package/dist/utils/js-sha256/hash.js.map +1 -1
- package/dist/utils/json.d.cts +2 -3
- package/dist/utils/json.d.cts.map +1 -1
- package/dist/utils/json.d.ts +2 -3
- package/dist/utils/json.d.ts.map +1 -1
- package/dist/utils/json_schema.d.cts +4 -4
- package/dist/utils/json_schema.d.cts.map +1 -1
- package/dist/utils/json_schema.d.ts +4 -4
- package/dist/utils/json_schema.d.ts.map +1 -1
- package/dist/utils/math.d.cts +6 -7
- package/dist/utils/math.d.cts.map +1 -1
- package/dist/utils/math.d.ts +6 -7
- package/dist/utils/math.d.ts.map +1 -1
- package/dist/utils/ml-distance/similarities.d.cts +1 -2
- package/dist/utils/ml-distance/similarities.d.cts.map +1 -1
- package/dist/utils/ml-distance/similarities.d.ts +1 -2
- package/dist/utils/ml-distance/similarities.d.ts.map +1 -1
- package/dist/utils/namespace.cjs.map +1 -1
- package/dist/utils/namespace.d.cts +2 -3
- package/dist/utils/namespace.d.cts.map +1 -1
- package/dist/utils/namespace.d.ts +2 -3
- package/dist/utils/namespace.d.ts.map +1 -1
- package/dist/utils/namespace.js.map +1 -1
- package/dist/utils/signal.d.cts +1 -2
- package/dist/utils/signal.d.cts.map +1 -1
- package/dist/utils/signal.d.ts +1 -2
- package/dist/utils/signal.d.ts.map +1 -1
- package/dist/utils/ssrf.d.cts +6 -7
- package/dist/utils/ssrf.d.cts.map +1 -1
- package/dist/utils/ssrf.d.ts +6 -7
- package/dist/utils/ssrf.d.ts.map +1 -1
- package/dist/utils/standard_schema.d.cts +4 -5
- package/dist/utils/standard_schema.d.cts.map +1 -1
- package/dist/utils/standard_schema.d.ts +4 -5
- package/dist/utils/standard_schema.d.ts.map +1 -1
- package/dist/utils/stream.d.cts +6 -6
- package/dist/utils/stream.d.cts.map +1 -1
- package/dist/utils/stream.d.ts +6 -6
- package/dist/utils/stream.d.ts.map +1 -1
- package/dist/utils/testing/chat_models.d.cts +8 -9
- package/dist/utils/testing/chat_models.d.cts.map +1 -1
- package/dist/utils/testing/chat_models.d.ts +8 -9
- package/dist/utils/testing/chat_models.d.ts.map +1 -1
- package/dist/utils/testing/embeddings.d.cts +2 -3
- package/dist/utils/testing/embeddings.d.cts.map +1 -1
- package/dist/utils/testing/embeddings.d.ts +2 -3
- package/dist/utils/testing/embeddings.d.ts.map +1 -1
- package/dist/utils/testing/llms.d.cts +2 -3
- package/dist/utils/testing/llms.d.cts.map +1 -1
- package/dist/utils/testing/llms.d.ts +2 -3
- package/dist/utils/testing/llms.d.ts.map +1 -1
- package/dist/utils/testing/message_history.d.cts +3 -4
- package/dist/utils/testing/message_history.d.cts.map +1 -1
- package/dist/utils/testing/message_history.d.ts +3 -4
- package/dist/utils/testing/message_history.d.ts.map +1 -1
- package/dist/utils/testing/openai_stream_fixtures.d.cts +6 -7
- package/dist/utils/testing/openai_stream_fixtures.d.cts.map +1 -1
- package/dist/utils/testing/openai_stream_fixtures.d.ts +6 -7
- package/dist/utils/testing/openai_stream_fixtures.d.ts.map +1 -1
- package/dist/utils/testing/output_parsers.d.cts +1 -2
- package/dist/utils/testing/output_parsers.d.cts.map +1 -1
- package/dist/utils/testing/output_parsers.d.ts +1 -2
- package/dist/utils/testing/output_parsers.d.ts.map +1 -1
- package/dist/utils/testing/retrievers.d.cts +1 -2
- package/dist/utils/testing/retrievers.d.cts.map +1 -1
- package/dist/utils/testing/retrievers.d.ts +1 -2
- package/dist/utils/testing/retrievers.d.ts.map +1 -1
- package/dist/utils/testing/runnables.d.cts +1 -2
- package/dist/utils/testing/runnables.d.cts.map +1 -1
- package/dist/utils/testing/runnables.d.ts +1 -2
- package/dist/utils/testing/runnables.d.ts.map +1 -1
- package/dist/utils/testing/stream.d.cts +10 -11
- package/dist/utils/testing/stream.d.cts.map +1 -1
- package/dist/utils/testing/stream.d.ts +10 -11
- package/dist/utils/testing/stream.d.ts.map +1 -1
- package/dist/utils/testing/tools.d.cts +2 -3
- package/dist/utils/testing/tools.d.cts.map +1 -1
- package/dist/utils/testing/tools.d.ts +2 -3
- package/dist/utils/testing/tools.d.ts.map +1 -1
- package/dist/utils/testing/tracers.d.cts +1 -2
- package/dist/utils/testing/tracers.d.cts.map +1 -1
- package/dist/utils/testing/tracers.d.ts +1 -2
- package/dist/utils/testing/tracers.d.ts.map +1 -1
- package/dist/utils/testing/vectorstores.d.cts +2 -3
- package/dist/utils/testing/vectorstores.d.cts.map +1 -1
- package/dist/utils/testing/vectorstores.d.ts +2 -3
- package/dist/utils/testing/vectorstores.d.ts.map +1 -1
- package/dist/utils/tiktoken.d.cts +2 -3
- package/dist/utils/tiktoken.d.cts.map +1 -1
- package/dist/utils/tiktoken.d.ts +2 -3
- package/dist/utils/tiktoken.d.ts.map +1 -1
- package/dist/utils/types/index.d.cts +5 -5
- package/dist/utils/types/index.d.cts.map +1 -1
- package/dist/utils/types/index.d.ts +5 -5
- package/dist/utils/types/index.d.ts.map +1 -1
- package/dist/utils/types/zod.d.cts +62 -63
- package/dist/utils/types/zod.d.cts.map +1 -1
- package/dist/utils/types/zod.d.ts +62 -63
- package/dist/utils/types/zod.d.ts.map +1 -1
- package/dist/utils/uuid/index.d.cts +12 -12
- package/dist/utils/uuid/index.d.cts.map +1 -1
- package/dist/utils/uuid/index.d.ts +12 -12
- package/dist/utils/uuid/index.d.ts.map +1 -1
- package/dist/utils/uuid/types.d.cts +6 -7
- package/dist/utils/uuid/types.d.cts.map +1 -1
- package/dist/utils/uuid/types.d.ts +6 -7
- package/dist/utils/uuid/types.d.ts.map +1 -1
- package/dist/utils/uuid/v35.d.cts +2 -3
- package/dist/utils/uuid/v35.d.cts.map +1 -1
- package/dist/utils/uuid/v35.d.ts +2 -3
- package/dist/utils/uuid/v35.d.ts.map +1 -1
- package/dist/utils/zod-to-json-schema/errorMessages.d.cts +1 -2
- package/dist/utils/zod-to-json-schema/errorMessages.d.cts.map +1 -1
- package/dist/utils/zod-to-json-schema/errorMessages.d.ts +1 -2
- package/dist/utils/zod-to-json-schema/errorMessages.d.ts.map +1 -1
- package/dist/utils/zod-to-json-schema/parseTypes.d.cts +2 -3
- package/dist/utils/zod-to-json-schema/parseTypes.d.cts.map +1 -1
- package/dist/utils/zod-to-json-schema/parseTypes.d.ts +2 -3
- package/dist/utils/zod-to-json-schema/parseTypes.d.ts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/any.d.cts +1 -2
- package/dist/utils/zod-to-json-schema/parsers/any.d.cts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/any.d.ts +1 -2
- package/dist/utils/zod-to-json-schema/parsers/any.d.ts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/array.d.cts +1 -2
- package/dist/utils/zod-to-json-schema/parsers/array.d.cts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/array.d.ts +1 -2
- package/dist/utils/zod-to-json-schema/parsers/array.d.ts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/bigint.d.cts +1 -2
- package/dist/utils/zod-to-json-schema/parsers/bigint.d.cts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/bigint.d.ts +1 -2
- package/dist/utils/zod-to-json-schema/parsers/bigint.d.ts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/boolean.d.cts +1 -2
- package/dist/utils/zod-to-json-schema/parsers/boolean.d.cts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/boolean.d.ts +1 -2
- package/dist/utils/zod-to-json-schema/parsers/boolean.d.ts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/date.d.cts +1 -2
- package/dist/utils/zod-to-json-schema/parsers/date.d.cts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/date.d.ts +1 -2
- package/dist/utils/zod-to-json-schema/parsers/date.d.ts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/enum.d.cts +1 -2
- package/dist/utils/zod-to-json-schema/parsers/enum.d.cts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/enum.d.ts +1 -2
- package/dist/utils/zod-to-json-schema/parsers/enum.d.ts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/intersection.d.cts +1 -2
- package/dist/utils/zod-to-json-schema/parsers/intersection.d.cts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/intersection.d.ts +1 -2
- package/dist/utils/zod-to-json-schema/parsers/intersection.d.ts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/literal.d.cts +1 -2
- package/dist/utils/zod-to-json-schema/parsers/literal.d.cts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/literal.d.ts +1 -2
- package/dist/utils/zod-to-json-schema/parsers/literal.d.ts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/map.d.cts +1 -2
- package/dist/utils/zod-to-json-schema/parsers/map.d.cts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/map.d.ts +1 -2
- package/dist/utils/zod-to-json-schema/parsers/map.d.ts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/nativeEnum.d.cts +1 -2
- package/dist/utils/zod-to-json-schema/parsers/nativeEnum.d.cts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/nativeEnum.d.ts +1 -2
- package/dist/utils/zod-to-json-schema/parsers/nativeEnum.d.ts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/never.d.cts +1 -2
- package/dist/utils/zod-to-json-schema/parsers/never.d.cts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/never.d.ts +1 -2
- package/dist/utils/zod-to-json-schema/parsers/never.d.ts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/null.d.cts +1 -2
- package/dist/utils/zod-to-json-schema/parsers/null.d.cts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/null.d.ts +1 -2
- package/dist/utils/zod-to-json-schema/parsers/null.d.ts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/nullable.d.cts +1 -2
- package/dist/utils/zod-to-json-schema/parsers/nullable.d.cts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/nullable.d.ts +1 -2
- package/dist/utils/zod-to-json-schema/parsers/nullable.d.ts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/number.d.cts +1 -2
- package/dist/utils/zod-to-json-schema/parsers/number.d.cts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/number.d.ts +1 -2
- package/dist/utils/zod-to-json-schema/parsers/number.d.ts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/object.d.cts +1 -2
- package/dist/utils/zod-to-json-schema/parsers/object.d.cts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/object.d.ts +1 -2
- package/dist/utils/zod-to-json-schema/parsers/object.d.ts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/record.d.cts +1 -2
- package/dist/utils/zod-to-json-schema/parsers/record.d.cts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/record.d.ts +1 -2
- package/dist/utils/zod-to-json-schema/parsers/record.d.ts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/set.d.cts +1 -2
- package/dist/utils/zod-to-json-schema/parsers/set.d.cts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/set.d.ts +1 -2
- package/dist/utils/zod-to-json-schema/parsers/set.d.ts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/string.d.cts +1 -2
- package/dist/utils/zod-to-json-schema/parsers/string.d.cts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/string.d.ts +1 -2
- package/dist/utils/zod-to-json-schema/parsers/string.d.ts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/tuple.d.cts +1 -2
- package/dist/utils/zod-to-json-schema/parsers/tuple.d.cts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/tuple.d.ts +1 -2
- package/dist/utils/zod-to-json-schema/parsers/tuple.d.ts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/undefined.d.cts +1 -2
- package/dist/utils/zod-to-json-schema/parsers/undefined.d.cts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/undefined.d.ts +1 -2
- package/dist/utils/zod-to-json-schema/parsers/undefined.d.ts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/union.d.cts +2 -3
- package/dist/utils/zod-to-json-schema/parsers/union.d.cts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/union.d.ts +2 -3
- package/dist/utils/zod-to-json-schema/parsers/union.d.ts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/unknown.d.cts +1 -2
- package/dist/utils/zod-to-json-schema/parsers/unknown.d.cts.map +1 -1
- package/dist/utils/zod-to-json-schema/parsers/unknown.d.ts +1 -2
- package/dist/utils/zod-to-json-schema/parsers/unknown.d.ts.map +1 -1
- package/dist/vectorstores.d.cts +8 -9
- package/dist/vectorstores.d.cts.map +1 -1
- package/dist/vectorstores.d.ts +8 -9
- package/dist/vectorstores.d.ts.map +1 -1
- package/package.json +3 -3
|
@@ -11,7 +11,7 @@ import { StructuredToolInterface, StructuredToolParams, isLangChainTool, isRunna
|
|
|
11
11
|
* @param {StructuredToolInterface | RunnableToolLike} tool The tool to convert to an OpenAI function.
|
|
12
12
|
* @returns {FunctionDefinition} The inputted tool in OpenAI function format.
|
|
13
13
|
*/
|
|
14
|
-
declare function convertToOpenAIFunction(tool: StructuredToolInterface | RunnableToolLike | StructuredToolParams, fields?: {
|
|
14
|
+
export declare function convertToOpenAIFunction(tool: StructuredToolInterface | RunnableToolLike | StructuredToolParams, fields?: {
|
|
15
15
|
/**
|
|
16
16
|
* If `true`, model output is guaranteed to exactly match the JSON Schema
|
|
17
17
|
* provided in the function definition.
|
|
@@ -27,7 +27,7 @@ declare function convertToOpenAIFunction(tool: StructuredToolInterface | Runnabl
|
|
|
27
27
|
* @param {StructuredToolInterface | Record<string, any> | RunnableToolLike} tool The tool to convert to an OpenAI tool.
|
|
28
28
|
* @returns {ToolDefinition} The inputted tool in OpenAI tool format.
|
|
29
29
|
*/
|
|
30
|
-
declare function convertToOpenAITool(tool: StructuredToolInterface | Record<string, any> | RunnableToolLike, fields?: {
|
|
30
|
+
export declare function convertToOpenAITool(tool: StructuredToolInterface | Record<string, any> | RunnableToolLike, fields?: {
|
|
31
31
|
/**
|
|
32
32
|
* If `true`, model output is guaranteed to exactly match the JSON Schema
|
|
33
33
|
* provided in the function definition.
|
|
@@ -35,5 +35,5 @@ declare function convertToOpenAITool(tool: StructuredToolInterface | Record<stri
|
|
|
35
35
|
strict?: boolean;
|
|
36
36
|
} | number): ToolDefinition;
|
|
37
37
|
//#endregion
|
|
38
|
-
export {
|
|
38
|
+
export { isLangChainTool, isRunnableToolLike, isStructuredTool, isStructuredToolParams };
|
|
39
39
|
//# sourceMappingURL=function_calling.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"function_calling.d.ts","names":[],"sources":["../../src/utils/function_calling.ts"],"mappings":";;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"function_calling.d.ts","names":[],"sources":["../../src/utils/function_calling.ts"],"mappings":";;;;;;;;;;;;;wBA2BgB,wBACd,MAAM,0BAA0B,mBAAmB,sBACnD;;;;;EAMM;aAGL;;;;;;;;;;wBAsBa,oBAEd,MAAM,0BAA0B,sBAAsB,kBACtD;;;;;EAMM;aAGL"}
|
package/dist/utils/gateway.d.cts
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
//#region src/utils/gateway.d.ts
|
|
2
|
-
declare const DEFAULT_LANGSMITH_GATEWAY = "https://gateway.smith.langchain.com";
|
|
3
|
-
interface LangSmithGatewayConfigOptions {
|
|
2
|
+
export declare const DEFAULT_LANGSMITH_GATEWAY = "https://gateway.smith.langchain.com";
|
|
3
|
+
export interface LangSmithGatewayConfigOptions {
|
|
4
4
|
baseURL?: string;
|
|
5
5
|
providerPath: string;
|
|
6
6
|
}
|
|
7
|
-
interface LangSmithGatewayConfig {
|
|
7
|
+
export interface LangSmithGatewayConfig {
|
|
8
8
|
baseURL?: string;
|
|
9
9
|
apiKey?: string;
|
|
10
10
|
}
|
|
11
|
-
declare function resolveLangSmithGatewayConfig({ baseURL, providerPath }: LangSmithGatewayConfigOptions): LangSmithGatewayConfig;
|
|
11
|
+
export declare function resolveLangSmithGatewayConfig({ baseURL, providerPath }: LangSmithGatewayConfigOptions): LangSmithGatewayConfig;
|
|
12
12
|
//#endregion
|
|
13
|
-
export { DEFAULT_LANGSMITH_GATEWAY, LangSmithGatewayConfig, LangSmithGatewayConfigOptions, resolveLangSmithGatewayConfig };
|
|
14
13
|
//# sourceMappingURL=gateway.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gateway.d.cts","names":[],"sources":["../../src/utils/gateway.ts"],"mappings":";
|
|
1
|
+
{"version":3,"file":"gateway.d.cts","names":[],"sources":["../../src/utils/gateway.ts"],"mappings":";qBAKa;iBAII;EACf;EACA;;iBAGe;EACf;EACA;;wBAgBc,gCACd,SACA,gBACC,gCAAgC"}
|
package/dist/utils/gateway.d.ts
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
//#region src/utils/gateway.d.ts
|
|
2
|
-
declare const DEFAULT_LANGSMITH_GATEWAY = "https://gateway.smith.langchain.com";
|
|
3
|
-
interface LangSmithGatewayConfigOptions {
|
|
2
|
+
export declare const DEFAULT_LANGSMITH_GATEWAY = "https://gateway.smith.langchain.com";
|
|
3
|
+
export interface LangSmithGatewayConfigOptions {
|
|
4
4
|
baseURL?: string;
|
|
5
5
|
providerPath: string;
|
|
6
6
|
}
|
|
7
|
-
interface LangSmithGatewayConfig {
|
|
7
|
+
export interface LangSmithGatewayConfig {
|
|
8
8
|
baseURL?: string;
|
|
9
9
|
apiKey?: string;
|
|
10
10
|
}
|
|
11
|
-
declare function resolveLangSmithGatewayConfig({ baseURL, providerPath }: LangSmithGatewayConfigOptions): LangSmithGatewayConfig;
|
|
11
|
+
export declare function resolveLangSmithGatewayConfig({ baseURL, providerPath }: LangSmithGatewayConfigOptions): LangSmithGatewayConfig;
|
|
12
12
|
//#endregion
|
|
13
|
-
export { DEFAULT_LANGSMITH_GATEWAY, LangSmithGatewayConfig, LangSmithGatewayConfigOptions, resolveLangSmithGatewayConfig };
|
|
14
13
|
//# sourceMappingURL=gateway.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gateway.d.ts","names":[],"sources":["../../src/utils/gateway.ts"],"mappings":";
|
|
1
|
+
{"version":3,"file":"gateway.d.ts","names":[],"sources":["../../src/utils/gateway.ts"],"mappings":";qBAKa;iBAII;EACf;EACA;;iBAGe;EACf;EACA;;wBAgBc,gCACd,SACA,gBACC,gCAAgC"}
|
package/dist/utils/hash.d.cts
CHANGED
|
@@ -5,7 +5,7 @@ import { sha256 } from "./js-sha256/hash.cjs";
|
|
|
5
5
|
* Accepts any number of string arguments (such as prompt and LLM key)
|
|
6
6
|
* and returns a single string to be used as the hash key.
|
|
7
7
|
*/
|
|
8
|
-
type HashKeyEncoder = (...strings: string[]) => string;
|
|
8
|
+
export type HashKeyEncoder = (...strings: string[]) => string;
|
|
9
9
|
//#endregion
|
|
10
|
-
export {
|
|
10
|
+
export { sha256 };
|
|
11
11
|
//# sourceMappingURL=hash.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hash.d.cts","names":[],"sources":["../../src/utils/hash.ts"],"mappings":";;;;;;;
|
|
1
|
+
{"version":3,"file":"hash.d.cts","names":[],"sources":["../../src/utils/hash.ts"],"mappings":";;;;;;;YAOY,qBAAqB"}
|
package/dist/utils/hash.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ import { sha256 } from "./js-sha256/hash.js";
|
|
|
5
5
|
* Accepts any number of string arguments (such as prompt and LLM key)
|
|
6
6
|
* and returns a single string to be used as the hash key.
|
|
7
7
|
*/
|
|
8
|
-
type HashKeyEncoder = (...strings: string[]) => string;
|
|
8
|
+
export type HashKeyEncoder = (...strings: string[]) => string;
|
|
9
9
|
//#endregion
|
|
10
|
-
export {
|
|
10
|
+
export { sha256 };
|
|
11
11
|
//# sourceMappingURL=hash.d.ts.map
|
package/dist/utils/hash.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hash.d.ts","names":[],"sources":["../../src/utils/hash.ts"],"mappings":";;;;;;;
|
|
1
|
+
{"version":3,"file":"hash.d.ts","names":[],"sources":["../../src/utils/hash.ts"],"mappings":";;;;;;;YAOY,qBAAqB"}
|
|
@@ -206,8 +206,8 @@ Sha256.prototype.finalize = function() {
|
|
|
206
206
|
this.hash();
|
|
207
207
|
};
|
|
208
208
|
Sha256.prototype.hash = function() {
|
|
209
|
-
var a = this.h0, b = this.h1, c = this.h2, d = this.h3, e = this.h4, f = this.h5, g = this.h6, h = this.h7, blocks = this.blocks, j, s0, s1, maj, t1, t2, ch, ab, da, cd, bc;
|
|
210
|
-
for (
|
|
209
|
+
var a = this.h0, b = this.h1, c = this.h2, d = this.h3, e = this.h4, f = this.h5, g = this.h6, h = this.h7, blocks = this.blocks, j = 16, s0, s1, maj, t1, t2, ch, ab, da, cd, bc;
|
|
210
|
+
for (; j < 64; ++j) {
|
|
211
211
|
t1 = blocks[j - 15];
|
|
212
212
|
s0 = (t1 >>> 7 | t1 << 25) ^ (t1 >>> 18 | t1 << 14) ^ t1 >>> 3;
|
|
213
213
|
t1 = blocks[j - 2];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hash.cjs","names":[],"sources":["../../../src/utils/js-sha256/hash.ts"],"sourcesContent":["// @ts-nocheck\n\n// Inlined to deal with portability issues with importing crypto module\n\n/**\n * [js-sha256]{@link https://github.com/emn178/js-sha256}\n *\n * @version 0.11.1\n * @author Chen, Yi-Cyuan [emn178@gmail.com]\n * @copyright Chen, Yi-Cyuan 2014-2025\n * @license MIT\n */\n/*jslint bitwise: true */\n\"use strict\";\n\nvar HEX_CHARS = \"0123456789abcdef\".split(\"\");\nvar EXTRA = [-2147483648, 8388608, 32768, 128];\nvar SHIFT = [24, 16, 8, 0];\nvar K = [\n 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b, 0x59f111f1,\n 0x923f82a4, 0xab1c5ed5, 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3,\n 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174, 0xe49b69c1, 0xefbe4786,\n 0x0fc19dc6, 0x240ca1cc, 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da,\n 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, 0xc6e00bf3, 0xd5a79147,\n 0x06ca6351, 0x14292967, 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13,\n 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85, 0xa2bfe8a1, 0xa81a664b,\n 0xc24b8b70, 0xc76c51a3, 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070,\n 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, 0x391c0cb3, 0x4ed8aa4a,\n 0x5b9cca4f, 0x682e6ff3, 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208,\n 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2,\n];\nvar OUTPUT_TYPES = [\"hex\", \"array\", \"digest\", \"arrayBuffer\"];\n\nvar blocks = [];\n\nfunction Sha256(is224, sharedMemory) {\n if (sharedMemory) {\n blocks[0] =\n blocks[16] =\n blocks[1] =\n blocks[2] =\n blocks[3] =\n blocks[4] =\n blocks[5] =\n blocks[6] =\n blocks[7] =\n blocks[8] =\n blocks[9] =\n blocks[10] =\n blocks[11] =\n blocks[12] =\n blocks[13] =\n blocks[14] =\n blocks[15] =\n 0;\n this.blocks = blocks;\n } else {\n this.blocks = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];\n }\n\n if (is224) {\n this.h0 = 0xc1059ed8;\n this.h1 = 0x367cd507;\n this.h2 = 0x3070dd17;\n this.h3 = 0xf70e5939;\n this.h4 = 0xffc00b31;\n this.h5 = 0x68581511;\n this.h6 = 0x64f98fa7;\n this.h7 = 0xbefa4fa4;\n } else {\n // 256\n this.h0 = 0x6a09e667;\n this.h1 = 0xbb67ae85;\n this.h2 = 0x3c6ef372;\n this.h3 = 0xa54ff53a;\n this.h4 = 0x510e527f;\n this.h5 = 0x9b05688c;\n this.h6 = 0x1f83d9ab;\n this.h7 = 0x5be0cd19;\n }\n\n this.block = this.start = this.bytes = this.hBytes = 0;\n this.finalized = this.hashed = false;\n this.first = true;\n this.is224 = is224;\n}\n\nSha256.prototype.update = function (message) {\n if (this.finalized) {\n return;\n }\n var notString,\n type = typeof message;\n if (type !== \"string\") {\n if (type === \"object\") {\n if (message === null) {\n throw new Error(ERROR);\n } else if (ARRAY_BUFFER && message.constructor === ArrayBuffer) {\n message = new Uint8Array(message);\n } else if (!Array.isArray(message)) {\n if (!ARRAY_BUFFER || !ArrayBuffer.isView(message)) {\n throw new Error(ERROR);\n }\n }\n } else {\n throw new Error(ERROR);\n }\n notString = true;\n }\n var code,\n index = 0,\n i,\n length = message.length,\n blocks = this.blocks;\n while (index < length) {\n if (this.hashed) {\n this.hashed = false;\n blocks[0] = this.block;\n this.block =\n blocks[16] =\n blocks[1] =\n blocks[2] =\n blocks[3] =\n blocks[4] =\n blocks[5] =\n blocks[6] =\n blocks[7] =\n blocks[8] =\n blocks[9] =\n blocks[10] =\n blocks[11] =\n blocks[12] =\n blocks[13] =\n blocks[14] =\n blocks[15] =\n 0;\n }\n\n if (notString) {\n for (i = this.start; index < length && i < 64; ++index) {\n blocks[i >>> 2] |= message[index] << SHIFT[i++ & 3];\n }\n } else {\n for (i = this.start; index < length && i < 64; ++index) {\n code = message.charCodeAt(index);\n if (code < 0x80) {\n blocks[i >>> 2] |= code << SHIFT[i++ & 3];\n } else if (code < 0x800) {\n blocks[i >>> 2] |= (0xc0 | (code >>> 6)) << SHIFT[i++ & 3];\n blocks[i >>> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3];\n } else if (code < 0xd800 || code >= 0xe000) {\n blocks[i >>> 2] |= (0xe0 | (code >>> 12)) << SHIFT[i++ & 3];\n blocks[i >>> 2] |= (0x80 | ((code >>> 6) & 0x3f)) << SHIFT[i++ & 3];\n blocks[i >>> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3];\n } else {\n code =\n 0x10000 +\n (((code & 0x3ff) << 10) | (message.charCodeAt(++index) & 0x3ff));\n blocks[i >>> 2] |= (0xf0 | (code >>> 18)) << SHIFT[i++ & 3];\n blocks[i >>> 2] |= (0x80 | ((code >>> 12) & 0x3f)) << SHIFT[i++ & 3];\n blocks[i >>> 2] |= (0x80 | ((code >>> 6) & 0x3f)) << SHIFT[i++ & 3];\n blocks[i >>> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3];\n }\n }\n }\n\n this.lastByteIndex = i;\n this.bytes += i - this.start;\n if (i >= 64) {\n this.block = blocks[16];\n this.start = i - 64;\n this.hash();\n this.hashed = true;\n } else {\n this.start = i;\n }\n }\n if (this.bytes > 4294967295) {\n this.hBytes += (this.bytes / 4294967296) << 0;\n this.bytes = this.bytes % 4294967296;\n }\n return this;\n};\n\nSha256.prototype.finalize = function () {\n if (this.finalized) {\n return;\n }\n this.finalized = true;\n var blocks = this.blocks,\n i = this.lastByteIndex;\n blocks[16] = this.block;\n blocks[i >>> 2] |= EXTRA[i & 3];\n this.block = blocks[16];\n if (i >= 56) {\n if (!this.hashed) {\n this.hash();\n }\n blocks[0] = this.block;\n blocks[16] =\n blocks[1] =\n blocks[2] =\n blocks[3] =\n blocks[4] =\n blocks[5] =\n blocks[6] =\n blocks[7] =\n blocks[8] =\n blocks[9] =\n blocks[10] =\n blocks[11] =\n blocks[12] =\n blocks[13] =\n blocks[14] =\n blocks[15] =\n 0;\n }\n blocks[14] = (this.hBytes << 3) | (this.bytes >>> 29);\n blocks[15] = this.bytes << 3;\n this.hash();\n};\n\nSha256.prototype.hash = function () {\n var a = this.h0,\n b = this.h1,\n c = this.h2,\n d = this.h3,\n e = this.h4,\n f = this.h5,\n g = this.h6,\n h = this.h7,\n blocks = this.blocks,\n j,\n s0,\n s1,\n maj,\n t1,\n t2,\n ch,\n ab,\n da,\n cd,\n bc;\n\n for (j = 16; j < 64; ++j) {\n // rightrotate\n t1 = blocks[j - 15];\n s0 = ((t1 >>> 7) | (t1 << 25)) ^ ((t1 >>> 18) | (t1 << 14)) ^ (t1 >>> 3);\n t1 = blocks[j - 2];\n s1 = ((t1 >>> 17) | (t1 << 15)) ^ ((t1 >>> 19) | (t1 << 13)) ^ (t1 >>> 10);\n blocks[j] = (blocks[j - 16] + s0 + blocks[j - 7] + s1) << 0;\n }\n\n bc = b & c;\n for (j = 0; j < 64; j += 4) {\n if (this.first) {\n if (this.is224) {\n ab = 300032;\n t1 = blocks[0] - 1413257819;\n h = (t1 - 150054599) << 0;\n d = (t1 + 24177077) << 0;\n } else {\n ab = 704751109;\n t1 = blocks[0] - 210244248;\n h = (t1 - 1521486534) << 0;\n d = (t1 + 143694565) << 0;\n }\n this.first = false;\n } else {\n s0 =\n ((a >>> 2) | (a << 30)) ^\n ((a >>> 13) | (a << 19)) ^\n ((a >>> 22) | (a << 10));\n s1 =\n ((e >>> 6) | (e << 26)) ^\n ((e >>> 11) | (e << 21)) ^\n ((e >>> 25) | (e << 7));\n ab = a & b;\n maj = ab ^ (a & c) ^ bc;\n ch = (e & f) ^ (~e & g);\n t1 = h + s1 + ch + K[j] + blocks[j];\n t2 = s0 + maj;\n h = (d + t1) << 0;\n d = (t1 + t2) << 0;\n }\n s0 =\n ((d >>> 2) | (d << 30)) ^\n ((d >>> 13) | (d << 19)) ^\n ((d >>> 22) | (d << 10));\n s1 =\n ((h >>> 6) | (h << 26)) ^\n ((h >>> 11) | (h << 21)) ^\n ((h >>> 25) | (h << 7));\n da = d & a;\n maj = da ^ (d & b) ^ ab;\n ch = (g & h) ^ (~g & e);\n t1 = f + s1 + ch + K[j + 1] + blocks[j + 1];\n t2 = s0 + maj;\n g = (c + t1) << 0;\n c = (t1 + t2) << 0;\n s0 =\n ((c >>> 2) | (c << 30)) ^\n ((c >>> 13) | (c << 19)) ^\n ((c >>> 22) | (c << 10));\n s1 =\n ((g >>> 6) | (g << 26)) ^\n ((g >>> 11) | (g << 21)) ^\n ((g >>> 25) | (g << 7));\n cd = c & d;\n maj = cd ^ (c & a) ^ da;\n ch = (f & g) ^ (~f & h);\n t1 = e + s1 + ch + K[j + 2] + blocks[j + 2];\n t2 = s0 + maj;\n f = (b + t1) << 0;\n b = (t1 + t2) << 0;\n s0 =\n ((b >>> 2) | (b << 30)) ^\n ((b >>> 13) | (b << 19)) ^\n ((b >>> 22) | (b << 10));\n s1 =\n ((f >>> 6) | (f << 26)) ^\n ((f >>> 11) | (f << 21)) ^\n ((f >>> 25) | (f << 7));\n bc = b & c;\n maj = bc ^ (b & d) ^ cd;\n ch = (f & g) ^ (~f & h);\n t1 = e + s1 + ch + K[j + 3] + blocks[j + 3];\n t2 = s0 + maj;\n e = (a + t1) << 0;\n a = (t1 + t2) << 0;\n this.chromeBugWorkAround = true;\n }\n\n this.h0 = (this.h0 + a) << 0;\n this.h1 = (this.h1 + b) << 0;\n this.h2 = (this.h2 + c) << 0;\n this.h3 = (this.h3 + d) << 0;\n this.h4 = (this.h4 + e) << 0;\n this.h5 = (this.h5 + f) << 0;\n this.h6 = (this.h6 + g) << 0;\n this.h7 = (this.h7 + h) << 0;\n};\n\nSha256.prototype.hex = function () {\n this.finalize();\n\n var h0 = this.h0,\n h1 = this.h1,\n h2 = this.h2,\n h3 = this.h3,\n h4 = this.h4,\n h5 = this.h5,\n h6 = this.h6,\n h7 = this.h7;\n\n var hex =\n HEX_CHARS[(h0 >>> 28) & 0x0f] +\n HEX_CHARS[(h0 >>> 24) & 0x0f] +\n HEX_CHARS[(h0 >>> 20) & 0x0f] +\n HEX_CHARS[(h0 >>> 16) & 0x0f] +\n HEX_CHARS[(h0 >>> 12) & 0x0f] +\n HEX_CHARS[(h0 >>> 8) & 0x0f] +\n HEX_CHARS[(h0 >>> 4) & 0x0f] +\n HEX_CHARS[h0 & 0x0f] +\n HEX_CHARS[(h1 >>> 28) & 0x0f] +\n HEX_CHARS[(h1 >>> 24) & 0x0f] +\n HEX_CHARS[(h1 >>> 20) & 0x0f] +\n HEX_CHARS[(h1 >>> 16) & 0x0f] +\n HEX_CHARS[(h1 >>> 12) & 0x0f] +\n HEX_CHARS[(h1 >>> 8) & 0x0f] +\n HEX_CHARS[(h1 >>> 4) & 0x0f] +\n HEX_CHARS[h1 & 0x0f] +\n HEX_CHARS[(h2 >>> 28) & 0x0f] +\n HEX_CHARS[(h2 >>> 24) & 0x0f] +\n HEX_CHARS[(h2 >>> 20) & 0x0f] +\n HEX_CHARS[(h2 >>> 16) & 0x0f] +\n HEX_CHARS[(h2 >>> 12) & 0x0f] +\n HEX_CHARS[(h2 >>> 8) & 0x0f] +\n HEX_CHARS[(h2 >>> 4) & 0x0f] +\n HEX_CHARS[h2 & 0x0f] +\n HEX_CHARS[(h3 >>> 28) & 0x0f] +\n HEX_CHARS[(h3 >>> 24) & 0x0f] +\n HEX_CHARS[(h3 >>> 20) & 0x0f] +\n HEX_CHARS[(h3 >>> 16) & 0x0f] +\n HEX_CHARS[(h3 >>> 12) & 0x0f] +\n HEX_CHARS[(h3 >>> 8) & 0x0f] +\n HEX_CHARS[(h3 >>> 4) & 0x0f] +\n HEX_CHARS[h3 & 0x0f] +\n HEX_CHARS[(h4 >>> 28) & 0x0f] +\n HEX_CHARS[(h4 >>> 24) & 0x0f] +\n HEX_CHARS[(h4 >>> 20) & 0x0f] +\n HEX_CHARS[(h4 >>> 16) & 0x0f] +\n HEX_CHARS[(h4 >>> 12) & 0x0f] +\n HEX_CHARS[(h4 >>> 8) & 0x0f] +\n HEX_CHARS[(h4 >>> 4) & 0x0f] +\n HEX_CHARS[h4 & 0x0f] +\n HEX_CHARS[(h5 >>> 28) & 0x0f] +\n HEX_CHARS[(h5 >>> 24) & 0x0f] +\n HEX_CHARS[(h5 >>> 20) & 0x0f] +\n HEX_CHARS[(h5 >>> 16) & 0x0f] +\n HEX_CHARS[(h5 >>> 12) & 0x0f] +\n HEX_CHARS[(h5 >>> 8) & 0x0f] +\n HEX_CHARS[(h5 >>> 4) & 0x0f] +\n HEX_CHARS[h5 & 0x0f] +\n HEX_CHARS[(h6 >>> 28) & 0x0f] +\n HEX_CHARS[(h6 >>> 24) & 0x0f] +\n HEX_CHARS[(h6 >>> 20) & 0x0f] +\n HEX_CHARS[(h6 >>> 16) & 0x0f] +\n HEX_CHARS[(h6 >>> 12) & 0x0f] +\n HEX_CHARS[(h6 >>> 8) & 0x0f] +\n HEX_CHARS[(h6 >>> 4) & 0x0f] +\n HEX_CHARS[h6 & 0x0f];\n if (!this.is224) {\n hex +=\n HEX_CHARS[(h7 >>> 28) & 0x0f] +\n HEX_CHARS[(h7 >>> 24) & 0x0f] +\n HEX_CHARS[(h7 >>> 20) & 0x0f] +\n HEX_CHARS[(h7 >>> 16) & 0x0f] +\n HEX_CHARS[(h7 >>> 12) & 0x0f] +\n HEX_CHARS[(h7 >>> 8) & 0x0f] +\n HEX_CHARS[(h7 >>> 4) & 0x0f] +\n HEX_CHARS[h7 & 0x0f];\n }\n return hex;\n};\n\nSha256.prototype.toString = Sha256.prototype.hex;\n\nSha256.prototype.digest = function () {\n this.finalize();\n\n var h0 = this.h0,\n h1 = this.h1,\n h2 = this.h2,\n h3 = this.h3,\n h4 = this.h4,\n h5 = this.h5,\n h6 = this.h6,\n h7 = this.h7;\n\n var arr = [\n (h0 >>> 24) & 0xff,\n (h0 >>> 16) & 0xff,\n (h0 >>> 8) & 0xff,\n h0 & 0xff,\n (h1 >>> 24) & 0xff,\n (h1 >>> 16) & 0xff,\n (h1 >>> 8) & 0xff,\n h1 & 0xff,\n (h2 >>> 24) & 0xff,\n (h2 >>> 16) & 0xff,\n (h2 >>> 8) & 0xff,\n h2 & 0xff,\n (h3 >>> 24) & 0xff,\n (h3 >>> 16) & 0xff,\n (h3 >>> 8) & 0xff,\n h3 & 0xff,\n (h4 >>> 24) & 0xff,\n (h4 >>> 16) & 0xff,\n (h4 >>> 8) & 0xff,\n h4 & 0xff,\n (h5 >>> 24) & 0xff,\n (h5 >>> 16) & 0xff,\n (h5 >>> 8) & 0xff,\n h5 & 0xff,\n (h6 >>> 24) & 0xff,\n (h6 >>> 16) & 0xff,\n (h6 >>> 8) & 0xff,\n h6 & 0xff,\n ];\n if (!this.is224) {\n arr.push(\n (h7 >>> 24) & 0xff,\n (h7 >>> 16) & 0xff,\n (h7 >>> 8) & 0xff,\n h7 & 0xff\n );\n }\n return arr;\n};\n\nSha256.prototype.array = Sha256.prototype.digest;\n\nSha256.prototype.arrayBuffer = function () {\n this.finalize();\n\n var buffer = new ArrayBuffer(this.is224 ? 28 : 32);\n var dataView = new DataView(buffer);\n dataView.setUint32(0, this.h0);\n dataView.setUint32(4, this.h1);\n dataView.setUint32(8, this.h2);\n dataView.setUint32(12, this.h3);\n dataView.setUint32(16, this.h4);\n dataView.setUint32(20, this.h5);\n dataView.setUint32(24, this.h6);\n if (!this.is224) {\n dataView.setUint32(28, this.h7);\n }\n return buffer;\n};\n\nexport const sha256 = (...strings: string[]) => {\n return new Sha256(false, true).update(strings.join(\"\")).hex();\n};\n"],"mappings":";;;;;;;;;;AAeA,IAAI,YAAY,mBAAmB,MAAM,EAAE;AAC3C,IAAI,QAAQ;CAAC;CAAa;CAAS;CAAO;AAAG;A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ts"],"sourcesContent":["// @ts-nocheck\n\n// Inlined to deal with portability issues with importing crypto module\n\n/**\n * [js-sha256]{@link https://github.com/emn178/js-sha256}\n *\n * @version 0.11.1\n * @author Chen, Yi-Cyuan [emn178@gmail.com]\n * @copyright Chen, Yi-Cyuan 2014-2025\n * @license MIT\n */\n/*jslint bitwise: true */\n\"use strict\";\n\nvar HEX_CHARS = \"0123456789abcdef\".split(\"\");\nvar EXTRA = [-2147483648, 8388608, 32768, 128];\nvar SHIFT = [24, 16, 8, 0];\nvar K = [\n 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b, 0x59f111f1,\n 0x923f82a4, 0xab1c5ed5, 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3,\n 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174, 0xe49b69c1, 0xefbe4786,\n 0x0fc19dc6, 0x240ca1cc, 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da,\n 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, 0xc6e00bf3, 0xd5a79147,\n 0x06ca6351, 0x14292967, 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13,\n 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85, 0xa2bfe8a1, 0xa81a664b,\n 0xc24b8b70, 0xc76c51a3, 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070,\n 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, 0x391c0cb3, 0x4ed8aa4a,\n 0x5b9cca4f, 0x682e6ff3, 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208,\n 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2,\n];\nvar OUTPUT_TYPES = [\"hex\", \"array\", \"digest\", \"arrayBuffer\"];\n\nvar blocks = [];\n\nfunction Sha256(is224, sharedMemory) {\n if (sharedMemory) {\n blocks[0] =\n blocks[16] =\n blocks[1] =\n blocks[2] =\n blocks[3] =\n blocks[4] =\n blocks[5] =\n blocks[6] =\n blocks[7] =\n blocks[8] =\n blocks[9] =\n blocks[10] =\n blocks[11] =\n blocks[12] =\n blocks[13] =\n blocks[14] =\n blocks[15] =\n 0;\n this.blocks = blocks;\n } else {\n this.blocks = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];\n }\n\n if (is224) {\n this.h0 = 0xc1059ed8;\n this.h1 = 0x367cd507;\n this.h2 = 0x3070dd17;\n this.h3 = 0xf70e5939;\n this.h4 = 0xffc00b31;\n this.h5 = 0x68581511;\n this.h6 = 0x64f98fa7;\n this.h7 = 0xbefa4fa4;\n } else {\n // 256\n this.h0 = 0x6a09e667;\n this.h1 = 0xbb67ae85;\n this.h2 = 0x3c6ef372;\n this.h3 = 0xa54ff53a;\n this.h4 = 0x510e527f;\n this.h5 = 0x9b05688c;\n this.h6 = 0x1f83d9ab;\n this.h7 = 0x5be0cd19;\n }\n\n this.block = this.start = this.bytes = this.hBytes = 0;\n this.finalized = this.hashed = false;\n this.first = true;\n this.is224 = is224;\n}\n\nSha256.prototype.update = function (message) {\n if (this.finalized) {\n return;\n }\n var notString,\n type = typeof message;\n if (type !== \"string\") {\n if (type === \"object\") {\n if (message === null) {\n throw new Error(ERROR);\n } else if (ARRAY_BUFFER && message.constructor === ArrayBuffer) {\n message = new Uint8Array(message);\n } else if (!Array.isArray(message)) {\n if (!ARRAY_BUFFER || !ArrayBuffer.isView(message)) {\n throw new Error(ERROR);\n }\n }\n } else {\n throw new Error(ERROR);\n }\n notString = true;\n }\n var code,\n index = 0,\n i,\n length = message.length,\n blocks = this.blocks;\n while (index < length) {\n if (this.hashed) {\n this.hashed = false;\n blocks[0] = this.block;\n this.block =\n blocks[16] =\n blocks[1] =\n blocks[2] =\n blocks[3] =\n blocks[4] =\n blocks[5] =\n blocks[6] =\n blocks[7] =\n blocks[8] =\n blocks[9] =\n blocks[10] =\n blocks[11] =\n blocks[12] =\n blocks[13] =\n blocks[14] =\n blocks[15] =\n 0;\n }\n\n if (notString) {\n for (i = this.start; index < length && i < 64; ++index) {\n blocks[i >>> 2] |= message[index] << SHIFT[i++ & 3];\n }\n } else {\n for (i = this.start; index < length && i < 64; ++index) {\n code = message.charCodeAt(index);\n if (code < 0x80) {\n blocks[i >>> 2] |= code << SHIFT[i++ & 3];\n } else if (code < 0x800) {\n blocks[i >>> 2] |= (0xc0 | (code >>> 6)) << SHIFT[i++ & 3];\n blocks[i >>> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3];\n } else if (code < 0xd800 || code >= 0xe000) {\n blocks[i >>> 2] |= (0xe0 | (code >>> 12)) << SHIFT[i++ & 3];\n blocks[i >>> 2] |= (0x80 | ((code >>> 6) & 0x3f)) << SHIFT[i++ & 3];\n blocks[i >>> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3];\n } else {\n code =\n 0x10000 +\n (((code & 0x3ff) << 10) | (message.charCodeAt(++index) & 0x3ff));\n blocks[i >>> 2] |= (0xf0 | (code >>> 18)) << SHIFT[i++ & 3];\n blocks[i >>> 2] |= (0x80 | ((code >>> 12) & 0x3f)) << SHIFT[i++ & 3];\n blocks[i >>> 2] |= (0x80 | ((code >>> 6) & 0x3f)) << SHIFT[i++ & 3];\n blocks[i >>> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3];\n }\n }\n }\n\n this.lastByteIndex = i;\n this.bytes += i - this.start;\n if (i >= 64) {\n this.block = blocks[16];\n this.start = i - 64;\n this.hash();\n this.hashed = true;\n } else {\n this.start = i;\n }\n }\n if (this.bytes > 4294967295) {\n this.hBytes += (this.bytes / 4294967296) << 0;\n this.bytes = this.bytes % 4294967296;\n }\n return this;\n};\n\nSha256.prototype.finalize = function () {\n if (this.finalized) {\n return;\n }\n this.finalized = true;\n var blocks = this.blocks,\n i = this.lastByteIndex;\n blocks[16] = this.block;\n blocks[i >>> 2] |= EXTRA[i & 3];\n this.block = blocks[16];\n if (i >= 56) {\n if (!this.hashed) {\n this.hash();\n }\n blocks[0] = this.block;\n blocks[16] =\n blocks[1] =\n blocks[2] =\n blocks[3] =\n blocks[4] =\n blocks[5] =\n blocks[6] =\n blocks[7] =\n blocks[8] =\n blocks[9] =\n blocks[10] =\n blocks[11] =\n blocks[12] =\n blocks[13] =\n blocks[14] =\n blocks[15] =\n 0;\n }\n blocks[14] = (this.hBytes << 3) | (this.bytes >>> 29);\n blocks[15] = this.bytes << 3;\n this.hash();\n};\n\nSha256.prototype.hash = function () {\n var a = this.h0,\n b = this.h1,\n c = this.h2,\n d = this.h3,\n e = this.h4,\n f = this.h5,\n g = this.h6,\n h = this.h7,\n blocks = this.blocks,\n j,\n s0,\n s1,\n maj,\n t1,\n t2,\n ch,\n ab,\n da,\n cd,\n bc;\n\n for (j = 16; j < 64; ++j) {\n // rightrotate\n t1 = blocks[j - 15];\n s0 = ((t1 >>> 7) | (t1 << 25)) ^ ((t1 >>> 18) | (t1 << 14)) ^ (t1 >>> 3);\n t1 = blocks[j - 2];\n s1 = ((t1 >>> 17) | (t1 << 15)) ^ ((t1 >>> 19) | (t1 << 13)) ^ (t1 >>> 10);\n blocks[j] = (blocks[j - 16] + s0 + blocks[j - 7] + s1) << 0;\n }\n\n bc = b & c;\n for (j = 0; j < 64; j += 4) {\n if (this.first) {\n if (this.is224) {\n ab = 300032;\n t1 = blocks[0] - 1413257819;\n h = (t1 - 150054599) << 0;\n d = (t1 + 24177077) << 0;\n } else {\n ab = 704751109;\n t1 = blocks[0] - 210244248;\n h = (t1 - 1521486534) << 0;\n d = (t1 + 143694565) << 0;\n }\n this.first = false;\n } else {\n s0 =\n ((a >>> 2) | (a << 30)) ^\n ((a >>> 13) | (a << 19)) ^\n ((a >>> 22) | (a << 10));\n s1 =\n ((e >>> 6) | (e << 26)) ^\n ((e >>> 11) | (e << 21)) ^\n ((e >>> 25) | (e << 7));\n ab = a & b;\n maj = ab ^ (a & c) ^ bc;\n ch = (e & f) ^ (~e & g);\n t1 = h + s1 + ch + K[j] + blocks[j];\n t2 = s0 + maj;\n h = (d + t1) << 0;\n d = (t1 + t2) << 0;\n }\n s0 =\n ((d >>> 2) | (d << 30)) ^\n ((d >>> 13) | (d << 19)) ^\n ((d >>> 22) | (d << 10));\n s1 =\n ((h >>> 6) | (h << 26)) ^\n ((h >>> 11) | (h << 21)) ^\n ((h >>> 25) | (h << 7));\n da = d & a;\n maj = da ^ (d & b) ^ ab;\n ch = (g & h) ^ (~g & e);\n t1 = f + s1 + ch + K[j + 1] + blocks[j + 1];\n t2 = s0 + maj;\n g = (c + t1) << 0;\n c = (t1 + t2) << 0;\n s0 =\n ((c >>> 2) | (c << 30)) ^\n ((c >>> 13) | (c << 19)) ^\n ((c >>> 22) | (c << 10));\n s1 =\n ((g >>> 6) | (g << 26)) ^\n ((g >>> 11) | (g << 21)) ^\n ((g >>> 25) | (g << 7));\n cd = c & d;\n maj = cd ^ (c & a) ^ da;\n ch = (f & g) ^ (~f & h);\n t1 = e + s1 + ch + K[j + 2] + blocks[j + 2];\n t2 = s0 + maj;\n f = (b + t1) << 0;\n b = (t1 + t2) << 0;\n s0 =\n ((b >>> 2) | (b << 30)) ^\n ((b >>> 13) | (b << 19)) ^\n ((b >>> 22) | (b << 10));\n s1 =\n ((f >>> 6) | (f << 26)) ^\n ((f >>> 11) | (f << 21)) ^\n ((f >>> 25) | (f << 7));\n bc = b & c;\n maj = bc ^ (b & d) ^ cd;\n ch = (f & g) ^ (~f & h);\n t1 = e + s1 + ch + K[j + 3] + blocks[j + 3];\n t2 = s0 + maj;\n e = (a + t1) << 0;\n a = (t1 + t2) << 0;\n this.chromeBugWorkAround = true;\n }\n\n this.h0 = (this.h0 + a) << 0;\n this.h1 = (this.h1 + b) << 0;\n this.h2 = (this.h2 + c) << 0;\n this.h3 = (this.h3 + d) << 0;\n this.h4 = (this.h4 + e) << 0;\n this.h5 = (this.h5 + f) << 0;\n this.h6 = (this.h6 + g) << 0;\n this.h7 = (this.h7 + h) << 0;\n};\n\nSha256.prototype.hex = function () {\n this.finalize();\n\n var h0 = this.h0,\n h1 = this.h1,\n h2 = this.h2,\n h3 = this.h3,\n h4 = this.h4,\n h5 = this.h5,\n h6 = this.h6,\n h7 = this.h7;\n\n var hex =\n HEX_CHARS[(h0 >>> 28) & 0x0f] +\n HEX_CHARS[(h0 >>> 24) & 0x0f] +\n HEX_CHARS[(h0 >>> 20) & 0x0f] +\n HEX_CHARS[(h0 >>> 16) & 0x0f] +\n HEX_CHARS[(h0 >>> 12) & 0x0f] +\n HEX_CHARS[(h0 >>> 8) & 0x0f] +\n HEX_CHARS[(h0 >>> 4) & 0x0f] +\n HEX_CHARS[h0 & 0x0f] +\n HEX_CHARS[(h1 >>> 28) & 0x0f] +\n HEX_CHARS[(h1 >>> 24) & 0x0f] +\n HEX_CHARS[(h1 >>> 20) & 0x0f] +\n HEX_CHARS[(h1 >>> 16) & 0x0f] +\n HEX_CHARS[(h1 >>> 12) & 0x0f] +\n HEX_CHARS[(h1 >>> 8) & 0x0f] +\n HEX_CHARS[(h1 >>> 4) & 0x0f] +\n HEX_CHARS[h1 & 0x0f] +\n HEX_CHARS[(h2 >>> 28) & 0x0f] +\n HEX_CHARS[(h2 >>> 24) & 0x0f] +\n HEX_CHARS[(h2 >>> 20) & 0x0f] +\n HEX_CHARS[(h2 >>> 16) & 0x0f] +\n HEX_CHARS[(h2 >>> 12) & 0x0f] +\n HEX_CHARS[(h2 >>> 8) & 0x0f] +\n HEX_CHARS[(h2 >>> 4) & 0x0f] +\n HEX_CHARS[h2 & 0x0f] +\n HEX_CHARS[(h3 >>> 28) & 0x0f] +\n HEX_CHARS[(h3 >>> 24) & 0x0f] +\n HEX_CHARS[(h3 >>> 20) & 0x0f] +\n HEX_CHARS[(h3 >>> 16) & 0x0f] +\n HEX_CHARS[(h3 >>> 12) & 0x0f] +\n HEX_CHARS[(h3 >>> 8) & 0x0f] +\n HEX_CHARS[(h3 >>> 4) & 0x0f] +\n HEX_CHARS[h3 & 0x0f] +\n HEX_CHARS[(h4 >>> 28) & 0x0f] +\n HEX_CHARS[(h4 >>> 24) & 0x0f] +\n HEX_CHARS[(h4 >>> 20) & 0x0f] +\n HEX_CHARS[(h4 >>> 16) & 0x0f] +\n HEX_CHARS[(h4 >>> 12) & 0x0f] +\n HEX_CHARS[(h4 >>> 8) & 0x0f] +\n HEX_CHARS[(h4 >>> 4) & 0x0f] +\n HEX_CHARS[h4 & 0x0f] +\n HEX_CHARS[(h5 >>> 28) & 0x0f] +\n HEX_CHARS[(h5 >>> 24) & 0x0f] +\n HEX_CHARS[(h5 >>> 20) & 0x0f] +\n HEX_CHARS[(h5 >>> 16) & 0x0f] +\n HEX_CHARS[(h5 >>> 12) & 0x0f] +\n HEX_CHARS[(h5 >>> 8) & 0x0f] +\n HEX_CHARS[(h5 >>> 4) & 0x0f] +\n HEX_CHARS[h5 & 0x0f] +\n HEX_CHARS[(h6 >>> 28) & 0x0f] +\n HEX_CHARS[(h6 >>> 24) & 0x0f] +\n HEX_CHARS[(h6 >>> 20) & 0x0f] +\n HEX_CHARS[(h6 >>> 16) & 0x0f] +\n HEX_CHARS[(h6 >>> 12) & 0x0f] +\n HEX_CHARS[(h6 >>> 8) & 0x0f] +\n HEX_CHARS[(h6 >>> 4) & 0x0f] +\n HEX_CHARS[h6 & 0x0f];\n if (!this.is224) {\n hex +=\n HEX_CHARS[(h7 >>> 28) & 0x0f] +\n HEX_CHARS[(h7 >>> 24) & 0x0f] +\n HEX_CHARS[(h7 >>> 20) & 0x0f] +\n HEX_CHARS[(h7 >>> 16) & 0x0f] +\n HEX_CHARS[(h7 >>> 12) & 0x0f] +\n HEX_CHARS[(h7 >>> 8) & 0x0f] +\n HEX_CHARS[(h7 >>> 4) & 0x0f] +\n HEX_CHARS[h7 & 0x0f];\n }\n return hex;\n};\n\nSha256.prototype.toString = Sha256.prototype.hex;\n\nSha256.prototype.digest = function () {\n this.finalize();\n\n var h0 = this.h0,\n h1 = this.h1,\n h2 = this.h2,\n h3 = this.h3,\n h4 = this.h4,\n h5 = this.h5,\n h6 = this.h6,\n h7 = this.h7;\n\n var arr = [\n (h0 >>> 24) & 0xff,\n (h0 >>> 16) & 0xff,\n (h0 >>> 8) & 0xff,\n h0 & 0xff,\n (h1 >>> 24) & 0xff,\n (h1 >>> 16) & 0xff,\n (h1 >>> 8) & 0xff,\n h1 & 0xff,\n (h2 >>> 24) & 0xff,\n (h2 >>> 16) & 0xff,\n (h2 >>> 8) & 0xff,\n h2 & 0xff,\n (h3 >>> 24) & 0xff,\n (h3 >>> 16) & 0xff,\n (h3 >>> 8) & 0xff,\n h3 & 0xff,\n (h4 >>> 24) & 0xff,\n (h4 >>> 16) & 0xff,\n (h4 >>> 8) & 0xff,\n h4 & 0xff,\n (h5 >>> 24) & 0xff,\n (h5 >>> 16) & 0xff,\n (h5 >>> 8) & 0xff,\n h5 & 0xff,\n (h6 >>> 24) & 0xff,\n (h6 >>> 16) & 0xff,\n (h6 >>> 8) & 0xff,\n h6 & 0xff,\n ];\n if (!this.is224) {\n arr.push(\n (h7 >>> 24) & 0xff,\n (h7 >>> 16) & 0xff,\n (h7 >>> 8) & 0xff,\n h7 & 0xff\n );\n }\n return arr;\n};\n\nSha256.prototype.array = Sha256.prototype.digest;\n\nSha256.prototype.arrayBuffer = function () {\n this.finalize();\n\n var buffer = new ArrayBuffer(this.is224 ? 28 : 32);\n var dataView = new DataView(buffer);\n dataView.setUint32(0, this.h0);\n dataView.setUint32(4, this.h1);\n dataView.setUint32(8, this.h2);\n dataView.setUint32(12, this.h3);\n dataView.setUint32(16, this.h4);\n dataView.setUint32(20, this.h5);\n dataView.setUint32(24, this.h6);\n if (!this.is224) {\n dataView.setUint32(28, this.h7);\n }\n return buffer;\n};\n\nexport const sha256 = (...strings: string[]) => {\n return new Sha256(false, true).update(strings.join(\"\")).hex();\n};\n"],"mappings":";;;;;;;;;;AAeA,IAAI,YAAY,mBAAmB,MAAM,EAAE;AAC3C,IAAI,QAAQ;CAAC;CA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ash.d.cts","names":[],"sources":["../../../src/utils/js-sha256/hash.ts"],"mappings":";
|
|
1
|
+
{"version":3,"file":"hash.d.cts","names":[],"sources":["../../../src/utils/js-sha256/hash.ts"],"mappings":";qBAqfa,YAAM"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hash.d.ts","names":[],"sources":["../../../src/utils/js-sha256/hash.ts"],"mappings":";
|
|
1
|
+
{"version":3,"file":"hash.d.ts","names":[],"sources":["../../../src/utils/js-sha256/hash.ts"],"mappings":";qBAqfa,YAAM"}
|
|
@@ -205,8 +205,8 @@ Sha256.prototype.finalize = function() {
|
|
|
205
205
|
this.hash();
|
|
206
206
|
};
|
|
207
207
|
Sha256.prototype.hash = function() {
|
|
208
|
-
var a = this.h0, b = this.h1, c = this.h2, d = this.h3, e = this.h4, f = this.h5, g = this.h6, h = this.h7, blocks = this.blocks, j, s0, s1, maj, t1, t2, ch, ab, da, cd, bc;
|
|
209
|
-
for (
|
|
208
|
+
var a = this.h0, b = this.h1, c = this.h2, d = this.h3, e = this.h4, f = this.h5, g = this.h6, h = this.h7, blocks = this.blocks, j = 16, s0, s1, maj, t1, t2, ch, ab, da, cd, bc;
|
|
209
|
+
for (; j < 64; ++j) {
|
|
210
210
|
t1 = blocks[j - 15];
|
|
211
211
|
s0 = (t1 >>> 7 | t1 << 25) ^ (t1 >>> 18 | t1 << 14) ^ t1 >>> 3;
|
|
212
212
|
t1 = blocks[j - 2];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hash.js","names":[],"sources":["../../../src/utils/js-sha256/hash.ts"],"sourcesContent":["// @ts-nocheck\n\n// Inlined to deal with portability issues with importing crypto module\n\n/**\n * [js-sha256]{@link https://github.com/emn178/js-sha256}\n *\n * @version 0.11.1\n * @author Chen, Yi-Cyuan [emn178@gmail.com]\n * @copyright Chen, Yi-Cyuan 2014-2025\n * @license MIT\n */\n/*jslint bitwise: true */\n\"use strict\";\n\nvar HEX_CHARS = \"0123456789abcdef\".split(\"\");\nvar EXTRA = [-2147483648, 8388608, 32768, 128];\nvar SHIFT = [24, 16, 8, 0];\nvar K = [\n 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b, 0x59f111f1,\n 0x923f82a4, 0xab1c5ed5, 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3,\n 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174, 0xe49b69c1, 0xefbe4786,\n 0x0fc19dc6, 0x240ca1cc, 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da,\n 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, 0xc6e00bf3, 0xd5a79147,\n 0x06ca6351, 0x14292967, 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13,\n 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85, 0xa2bfe8a1, 0xa81a664b,\n 0xc24b8b70, 0xc76c51a3, 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070,\n 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, 0x391c0cb3, 0x4ed8aa4a,\n 0x5b9cca4f, 0x682e6ff3, 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208,\n 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2,\n];\nvar OUTPUT_TYPES = [\"hex\", \"array\", \"digest\", \"arrayBuffer\"];\n\nvar blocks = [];\n\nfunction Sha256(is224, sharedMemory) {\n if (sharedMemory) {\n blocks[0] =\n blocks[16] =\n blocks[1] =\n blocks[2] =\n blocks[3] =\n blocks[4] =\n blocks[5] =\n blocks[6] =\n blocks[7] =\n blocks[8] =\n blocks[9] =\n blocks[10] =\n blocks[11] =\n blocks[12] =\n blocks[13] =\n blocks[14] =\n blocks[15] =\n 0;\n this.blocks = blocks;\n } else {\n this.blocks = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];\n }\n\n if (is224) {\n this.h0 = 0xc1059ed8;\n this.h1 = 0x367cd507;\n this.h2 = 0x3070dd17;\n this.h3 = 0xf70e5939;\n this.h4 = 0xffc00b31;\n this.h5 = 0x68581511;\n this.h6 = 0x64f98fa7;\n this.h7 = 0xbefa4fa4;\n } else {\n // 256\n this.h0 = 0x6a09e667;\n this.h1 = 0xbb67ae85;\n this.h2 = 0x3c6ef372;\n this.h3 = 0xa54ff53a;\n this.h4 = 0x510e527f;\n this.h5 = 0x9b05688c;\n this.h6 = 0x1f83d9ab;\n this.h7 = 0x5be0cd19;\n }\n\n this.block = this.start = this.bytes = this.hBytes = 0;\n this.finalized = this.hashed = false;\n this.first = true;\n this.is224 = is224;\n}\n\nSha256.prototype.update = function (message) {\n if (this.finalized) {\n return;\n }\n var notString,\n type = typeof message;\n if (type !== \"string\") {\n if (type === \"object\") {\n if (message === null) {\n throw new Error(ERROR);\n } else if (ARRAY_BUFFER && message.constructor === ArrayBuffer) {\n message = new Uint8Array(message);\n } else if (!Array.isArray(message)) {\n if (!ARRAY_BUFFER || !ArrayBuffer.isView(message)) {\n throw new Error(ERROR);\n }\n }\n } else {\n throw new Error(ERROR);\n }\n notString = true;\n }\n var code,\n index = 0,\n i,\n length = message.length,\n blocks = this.blocks;\n while (index < length) {\n if (this.hashed) {\n this.hashed = false;\n blocks[0] = this.block;\n this.block =\n blocks[16] =\n blocks[1] =\n blocks[2] =\n blocks[3] =\n blocks[4] =\n blocks[5] =\n blocks[6] =\n blocks[7] =\n blocks[8] =\n blocks[9] =\n blocks[10] =\n blocks[11] =\n blocks[12] =\n blocks[13] =\n blocks[14] =\n blocks[15] =\n 0;\n }\n\n if (notString) {\n for (i = this.start; index < length && i < 64; ++index) {\n blocks[i >>> 2] |= message[index] << SHIFT[i++ & 3];\n }\n } else {\n for (i = this.start; index < length && i < 64; ++index) {\n code = message.charCodeAt(index);\n if (code < 0x80) {\n blocks[i >>> 2] |= code << SHIFT[i++ & 3];\n } else if (code < 0x800) {\n blocks[i >>> 2] |= (0xc0 | (code >>> 6)) << SHIFT[i++ & 3];\n blocks[i >>> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3];\n } else if (code < 0xd800 || code >= 0xe000) {\n blocks[i >>> 2] |= (0xe0 | (code >>> 12)) << SHIFT[i++ & 3];\n blocks[i >>> 2] |= (0x80 | ((code >>> 6) & 0x3f)) << SHIFT[i++ & 3];\n blocks[i >>> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3];\n } else {\n code =\n 0x10000 +\n (((code & 0x3ff) << 10) | (message.charCodeAt(++index) & 0x3ff));\n blocks[i >>> 2] |= (0xf0 | (code >>> 18)) << SHIFT[i++ & 3];\n blocks[i >>> 2] |= (0x80 | ((code >>> 12) & 0x3f)) << SHIFT[i++ & 3];\n blocks[i >>> 2] |= (0x80 | ((code >>> 6) & 0x3f)) << SHIFT[i++ & 3];\n blocks[i >>> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3];\n }\n }\n }\n\n this.lastByteIndex = i;\n this.bytes += i - this.start;\n if (i >= 64) {\n this.block = blocks[16];\n this.start = i - 64;\n this.hash();\n this.hashed = true;\n } else {\n this.start = i;\n }\n }\n if (this.bytes > 4294967295) {\n this.hBytes += (this.bytes / 4294967296) << 0;\n this.bytes = this.bytes % 4294967296;\n }\n return this;\n};\n\nSha256.prototype.finalize = function () {\n if (this.finalized) {\n return;\n }\n this.finalized = true;\n var blocks = this.blocks,\n i = this.lastByteIndex;\n blocks[16] = this.block;\n blocks[i >>> 2] |= EXTRA[i & 3];\n this.block = blocks[16];\n if (i >= 56) {\n if (!this.hashed) {\n this.hash();\n }\n blocks[0] = this.block;\n blocks[16] =\n blocks[1] =\n blocks[2] =\n blocks[3] =\n blocks[4] =\n blocks[5] =\n blocks[6] =\n blocks[7] =\n blocks[8] =\n blocks[9] =\n blocks[10] =\n blocks[11] =\n blocks[12] =\n blocks[13] =\n blocks[14] =\n blocks[15] =\n 0;\n }\n blocks[14] = (this.hBytes << 3) | (this.bytes >>> 29);\n blocks[15] = this.bytes << 3;\n this.hash();\n};\n\nSha256.prototype.hash = function () {\n var a = this.h0,\n b = this.h1,\n c = this.h2,\n d = this.h3,\n e = this.h4,\n f = this.h5,\n g = this.h6,\n h = this.h7,\n blocks = this.blocks,\n j,\n s0,\n s1,\n maj,\n t1,\n t2,\n ch,\n ab,\n da,\n cd,\n bc;\n\n for (j = 16; j < 64; ++j) {\n // rightrotate\n t1 = blocks[j - 15];\n s0 = ((t1 >>> 7) | (t1 << 25)) ^ ((t1 >>> 18) | (t1 << 14)) ^ (t1 >>> 3);\n t1 = blocks[j - 2];\n s1 = ((t1 >>> 17) | (t1 << 15)) ^ ((t1 >>> 19) | (t1 << 13)) ^ (t1 >>> 10);\n blocks[j] = (blocks[j - 16] + s0 + blocks[j - 7] + s1) << 0;\n }\n\n bc = b & c;\n for (j = 0; j < 64; j += 4) {\n if (this.first) {\n if (this.is224) {\n ab = 300032;\n t1 = blocks[0] - 1413257819;\n h = (t1 - 150054599) << 0;\n d = (t1 + 24177077) << 0;\n } else {\n ab = 704751109;\n t1 = blocks[0] - 210244248;\n h = (t1 - 1521486534) << 0;\n d = (t1 + 143694565) << 0;\n }\n this.first = false;\n } else {\n s0 =\n ((a >>> 2) | (a << 30)) ^\n ((a >>> 13) | (a << 19)) ^\n ((a >>> 22) | (a << 10));\n s1 =\n ((e >>> 6) | (e << 26)) ^\n ((e >>> 11) | (e << 21)) ^\n ((e >>> 25) | (e << 7));\n ab = a & b;\n maj = ab ^ (a & c) ^ bc;\n ch = (e & f) ^ (~e & g);\n t1 = h + s1 + ch + K[j] + blocks[j];\n t2 = s0 + maj;\n h = (d + t1) << 0;\n d = (t1 + t2) << 0;\n }\n s0 =\n ((d >>> 2) | (d << 30)) ^\n ((d >>> 13) | (d << 19)) ^\n ((d >>> 22) | (d << 10));\n s1 =\n ((h >>> 6) | (h << 26)) ^\n ((h >>> 11) | (h << 21)) ^\n ((h >>> 25) | (h << 7));\n da = d & a;\n maj = da ^ (d & b) ^ ab;\n ch = (g & h) ^ (~g & e);\n t1 = f + s1 + ch + K[j + 1] + blocks[j + 1];\n t2 = s0 + maj;\n g = (c + t1) << 0;\n c = (t1 + t2) << 0;\n s0 =\n ((c >>> 2) | (c << 30)) ^\n ((c >>> 13) | (c << 19)) ^\n ((c >>> 22) | (c << 10));\n s1 =\n ((g >>> 6) | (g << 26)) ^\n ((g >>> 11) | (g << 21)) ^\n ((g >>> 25) | (g << 7));\n cd = c & d;\n maj = cd ^ (c & a) ^ da;\n ch = (f & g) ^ (~f & h);\n t1 = e + s1 + ch + K[j + 2] + blocks[j + 2];\n t2 = s0 + maj;\n f = (b + t1) << 0;\n b = (t1 + t2) << 0;\n s0 =\n ((b >>> 2) | (b << 30)) ^\n ((b >>> 13) | (b << 19)) ^\n ((b >>> 22) | (b << 10));\n s1 =\n ((f >>> 6) | (f << 26)) ^\n ((f >>> 11) | (f << 21)) ^\n ((f >>> 25) | (f << 7));\n bc = b & c;\n maj = bc ^ (b & d) ^ cd;\n ch = (f & g) ^ (~f & h);\n t1 = e + s1 + ch + K[j + 3] + blocks[j + 3];\n t2 = s0 + maj;\n e = (a + t1) << 0;\n a = (t1 + t2) << 0;\n this.chromeBugWorkAround = true;\n }\n\n this.h0 = (this.h0 + a) << 0;\n this.h1 = (this.h1 + b) << 0;\n this.h2 = (this.h2 + c) << 0;\n this.h3 = (this.h3 + d) << 0;\n this.h4 = (this.h4 + e) << 0;\n this.h5 = (this.h5 + f) << 0;\n this.h6 = (this.h6 + g) << 0;\n this.h7 = (this.h7 + h) << 0;\n};\n\nSha256.prototype.hex = function () {\n this.finalize();\n\n var h0 = this.h0,\n h1 = this.h1,\n h2 = this.h2,\n h3 = this.h3,\n h4 = this.h4,\n h5 = this.h5,\n h6 = this.h6,\n h7 = this.h7;\n\n var hex =\n HEX_CHARS[(h0 >>> 28) & 0x0f] +\n HEX_CHARS[(h0 >>> 24) & 0x0f] +\n HEX_CHARS[(h0 >>> 20) & 0x0f] +\n HEX_CHARS[(h0 >>> 16) & 0x0f] +\n HEX_CHARS[(h0 >>> 12) & 0x0f] +\n HEX_CHARS[(h0 >>> 8) & 0x0f] +\n HEX_CHARS[(h0 >>> 4) & 0x0f] +\n HEX_CHARS[h0 & 0x0f] +\n HEX_CHARS[(h1 >>> 28) & 0x0f] +\n HEX_CHARS[(h1 >>> 24) & 0x0f] +\n HEX_CHARS[(h1 >>> 20) & 0x0f] +\n HEX_CHARS[(h1 >>> 16) & 0x0f] +\n HEX_CHARS[(h1 >>> 12) & 0x0f] +\n HEX_CHARS[(h1 >>> 8) & 0x0f] +\n HEX_CHARS[(h1 >>> 4) & 0x0f] +\n HEX_CHARS[h1 & 0x0f] +\n HEX_CHARS[(h2 >>> 28) & 0x0f] +\n HEX_CHARS[(h2 >>> 24) & 0x0f] +\n HEX_CHARS[(h2 >>> 20) & 0x0f] +\n HEX_CHARS[(h2 >>> 16) & 0x0f] +\n HEX_CHARS[(h2 >>> 12) & 0x0f] +\n HEX_CHARS[(h2 >>> 8) & 0x0f] +\n HEX_CHARS[(h2 >>> 4) & 0x0f] +\n HEX_CHARS[h2 & 0x0f] +\n HEX_CHARS[(h3 >>> 28) & 0x0f] +\n HEX_CHARS[(h3 >>> 24) & 0x0f] +\n HEX_CHARS[(h3 >>> 20) & 0x0f] +\n HEX_CHARS[(h3 >>> 16) & 0x0f] +\n HEX_CHARS[(h3 >>> 12) & 0x0f] +\n HEX_CHARS[(h3 >>> 8) & 0x0f] +\n HEX_CHARS[(h3 >>> 4) & 0x0f] +\n HEX_CHARS[h3 & 0x0f] +\n HEX_CHARS[(h4 >>> 28) & 0x0f] +\n HEX_CHARS[(h4 >>> 24) & 0x0f] +\n HEX_CHARS[(h4 >>> 20) & 0x0f] +\n HEX_CHARS[(h4 >>> 16) & 0x0f] +\n HEX_CHARS[(h4 >>> 12) & 0x0f] +\n HEX_CHARS[(h4 >>> 8) & 0x0f] +\n HEX_CHARS[(h4 >>> 4) & 0x0f] +\n HEX_CHARS[h4 & 0x0f] +\n HEX_CHARS[(h5 >>> 28) & 0x0f] +\n HEX_CHARS[(h5 >>> 24) & 0x0f] +\n HEX_CHARS[(h5 >>> 20) & 0x0f] +\n HEX_CHARS[(h5 >>> 16) & 0x0f] +\n HEX_CHARS[(h5 >>> 12) & 0x0f] +\n HEX_CHARS[(h5 >>> 8) & 0x0f] +\n HEX_CHARS[(h5 >>> 4) & 0x0f] +\n HEX_CHARS[h5 & 0x0f] +\n HEX_CHARS[(h6 >>> 28) & 0x0f] +\n HEX_CHARS[(h6 >>> 24) & 0x0f] +\n HEX_CHARS[(h6 >>> 20) & 0x0f] +\n HEX_CHARS[(h6 >>> 16) & 0x0f] +\n HEX_CHARS[(h6 >>> 12) & 0x0f] +\n HEX_CHARS[(h6 >>> 8) & 0x0f] +\n HEX_CHARS[(h6 >>> 4) & 0x0f] +\n HEX_CHARS[h6 & 0x0f];\n if (!this.is224) {\n hex +=\n HEX_CHARS[(h7 >>> 28) & 0x0f] +\n HEX_CHARS[(h7 >>> 24) & 0x0f] +\n HEX_CHARS[(h7 >>> 20) & 0x0f] +\n HEX_CHARS[(h7 >>> 16) & 0x0f] +\n HEX_CHARS[(h7 >>> 12) & 0x0f] +\n HEX_CHARS[(h7 >>> 8) & 0x0f] +\n HEX_CHARS[(h7 >>> 4) & 0x0f] +\n HEX_CHARS[h7 & 0x0f];\n }\n return hex;\n};\n\nSha256.prototype.toString = Sha256.prototype.hex;\n\nSha256.prototype.digest = function () {\n this.finalize();\n\n var h0 = this.h0,\n h1 = this.h1,\n h2 = this.h2,\n h3 = this.h3,\n h4 = this.h4,\n h5 = this.h5,\n h6 = this.h6,\n h7 = this.h7;\n\n var arr = [\n (h0 >>> 24) & 0xff,\n (h0 >>> 16) & 0xff,\n (h0 >>> 8) & 0xff,\n h0 & 0xff,\n (h1 >>> 24) & 0xff,\n (h1 >>> 16) & 0xff,\n (h1 >>> 8) & 0xff,\n h1 & 0xff,\n (h2 >>> 24) & 0xff,\n (h2 >>> 16) & 0xff,\n (h2 >>> 8) & 0xff,\n h2 & 0xff,\n (h3 >>> 24) & 0xff,\n (h3 >>> 16) & 0xff,\n (h3 >>> 8) & 0xff,\n h3 & 0xff,\n (h4 >>> 24) & 0xff,\n (h4 >>> 16) & 0xff,\n (h4 >>> 8) & 0xff,\n h4 & 0xff,\n (h5 >>> 24) & 0xff,\n (h5 >>> 16) & 0xff,\n (h5 >>> 8) & 0xff,\n h5 & 0xff,\n (h6 >>> 24) & 0xff,\n (h6 >>> 16) & 0xff,\n (h6 >>> 8) & 0xff,\n h6 & 0xff,\n ];\n if (!this.is224) {\n arr.push(\n (h7 >>> 24) & 0xff,\n (h7 >>> 16) & 0xff,\n (h7 >>> 8) & 0xff,\n h7 & 0xff\n );\n }\n return arr;\n};\n\nSha256.prototype.array = Sha256.prototype.digest;\n\nSha256.prototype.arrayBuffer = function () {\n this.finalize();\n\n var buffer = new ArrayBuffer(this.is224 ? 28 : 32);\n var dataView = new DataView(buffer);\n dataView.setUint32(0, this.h0);\n dataView.setUint32(4, this.h1);\n dataView.setUint32(8, this.h2);\n dataView.setUint32(12, this.h3);\n dataView.setUint32(16, this.h4);\n dataView.setUint32(20, this.h5);\n dataView.setUint32(24, this.h6);\n if (!this.is224) {\n dataView.setUint32(28, this.h7);\n }\n return buffer;\n};\n\nexport const sha256 = (...strings: string[]) => {\n return new Sha256(false, true).update(strings.join(\"\")).hex();\n};\n"],"mappings":";;;;;;;;;AAeA,IAAI,YAAY,mBAAmB,MAAM,EAAE;AAC3C,IAAI,QAAQ;CAAC;CAAa;CAAS;CAAO;AAAG;AAC7C,IAAI,QAAQ;CAAC;CAAI;CAAI;CAAG;AAAC;AACzB,IAAI,IAAI;CACN;CAAY;CAAY;CAAY;CAAY;CAAY;CAC5D;CAAY;CAAY;CAAY;CAAY;CAAY;CAC5D;CAAY;CAAY;CAAY;CAAY;CAAY;CAC5D;CAAY;CAAY;CAAY;CAAY;CAAY;CAC5D;CAAY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AO,KAAM;EACb,OAAO,IAAK;EACb,KAAK;EACJ,OAAO,KAAM;EACb,OAAO,KAAM;EACb,OAAO,IAAK;EACb,KAAK;EACJ,OAAO,KAAM;EACb,OAAO,KAAM;EACb,OAAO,IAAK;EACb,KAAK;CACP;CACA,IAAI,CAAC,KAAK,OACR,IAAI,KACD,OAAO,KAAM,KACb,OAAO,KAAM,KACb,OAAO,IAAK,KACb,KAAK,GACP;CAEF,OAAO;AACT;AAEA,OAAO,UAAU,QAAQ,OAAO,UAAU;AAE1C,OAAO,UAAU,cAAc,WAAY;CACzC,KAAK,SAAS;CAEd,IAAI,yBAAS,IAAI,YAAY,KAAK,QAAQ,KAAK,EAAE;CACjD,IAAI,WAAW,IAAI,SAAS,MAAM;CAClC,SAAS,UAAU,GAAG,KAAK,EAAE;CAC7B,SAAS,UAAU,GAAG,KAAK,EAAE;CAC7B,SAAS,UAAU,GAAG,KAAK,EAAE;CAC7B,SAAS,UAAU,IAAI,KAAK,EAAE;CAC9B,SAAS,UAAU,IAAI,KAAK,EAAE;CAC9B,SAAS,UAAU,IAAI,KAAK,EAAE;CAC9B,SAAS,UAAU,IAAI,KAAK,EAAE;CAC9B,IAAI,CAAC,KAAK,OACR,SAAS,UAAU,IAAI,KAAK,EAAE;CAEhC,OAAO;AACT;AAEA,MAAa,UAAU,GAAG,YAAsB;CAC9C,OAAO,IAAI,OAAO,OAAO,IAAI,CAAC,CAAC,OAAO,QAAQ,KAAK,EAAE,CAAC,CAAC,CAAC,IAAI;AAC9D"}
|
|
1
|
+
{"version":3,"file":"hash.js","names":[],"sources":["../../../src/utils/js-sha256/hash.ts"],"sourcesContent":["// @ts-nocheck\n\n// Inlined to deal with portability issues with importing crypto module\n\n/**\n * [js-sha256]{@link https://github.com/emn178/js-sha256}\n *\n * @version 0.11.1\n * @author Chen, Yi-Cyuan [emn178@gmail.com]\n * @copyright Chen, Yi-Cyuan 2014-2025\n * @license MIT\n */\n/*jslint bitwise: true */\n\"use strict\";\n\nvar HEX_CHARS = \"0123456789abcdef\".split(\"\");\nvar EXTRA = [-2147483648, 8388608, 32768, 128];\nvar SHIFT = [24, 16, 8, 0];\nvar K = [\n 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b, 0x59f111f1,\n 0x923f82a4, 0xab1c5ed5, 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3,\n 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174, 0xe49b69c1, 0xefbe4786,\n 0x0fc19dc6, 0x240ca1cc, 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da,\n 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, 0xc6e00bf3, 0xd5a79147,\n 0x06ca6351, 0x14292967, 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13,\n 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85, 0xa2bfe8a1, 0xa81a664b,\n 0xc24b8b70, 0xc76c51a3, 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070,\n 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, 0x391c0cb3, 0x4ed8aa4a,\n 0x5b9cca4f, 0x682e6ff3, 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208,\n 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2,\n];\nvar OUTPUT_TYPES = [\"hex\", \"array\", \"digest\", \"arrayBuffer\"];\n\nvar blocks = [];\n\nfunction Sha256(is224, sharedMemory) {\n if (sharedMemory) {\n blocks[0] =\n blocks[16] =\n blocks[1] =\n blocks[2] =\n blocks[3] =\n blocks[4] =\n blocks[5] =\n blocks[6] =\n blocks[7] =\n blocks[8] =\n blocks[9] =\n blocks[10] =\n blocks[11] =\n blocks[12] =\n blocks[13] =\n blocks[14] =\n blocks[15] =\n 0;\n this.blocks = blocks;\n } else {\n this.blocks = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];\n }\n\n if (is224) {\n this.h0 = 0xc1059ed8;\n this.h1 = 0x367cd507;\n this.h2 = 0x3070dd17;\n this.h3 = 0xf70e5939;\n this.h4 = 0xffc00b31;\n this.h5 = 0x68581511;\n this.h6 = 0x64f98fa7;\n this.h7 = 0xbefa4fa4;\n } else {\n // 256\n this.h0 = 0x6a09e667;\n this.h1 = 0xbb67ae85;\n this.h2 = 0x3c6ef372;\n this.h3 = 0xa54ff53a;\n this.h4 = 0x510e527f;\n this.h5 = 0x9b05688c;\n this.h6 = 0x1f83d9ab;\n this.h7 = 0x5be0cd19;\n }\n\n this.block = this.start = this.bytes = this.hBytes = 0;\n this.finalized = this.hashed = false;\n this.first = true;\n this.is224 = is224;\n}\n\nSha256.prototype.update = function (message) {\n if (this.finalized) {\n return;\n }\n var notString,\n type = typeof message;\n if (type !== \"string\") {\n if (type === \"object\") {\n if (message === null) {\n throw new Error(ERROR);\n } else if (ARRAY_BUFFER && message.constructor === ArrayBuffer) {\n message = new Uint8Array(message);\n } else if (!Array.isArray(message)) {\n if (!ARRAY_BUFFER || !ArrayBuffer.isView(message)) {\n throw new Error(ERROR);\n }\n }\n } else {\n throw new Error(ERROR);\n }\n notString = true;\n }\n var code,\n index = 0,\n i,\n length = message.length,\n blocks = this.blocks;\n while (index < length) {\n if (this.hashed) {\n this.hashed = false;\n blocks[0] = this.block;\n this.block =\n blocks[16] =\n blocks[1] =\n blocks[2] =\n blocks[3] =\n blocks[4] =\n blocks[5] =\n blocks[6] =\n blocks[7] =\n blocks[8] =\n blocks[9] =\n blocks[10] =\n blocks[11] =\n blocks[12] =\n blocks[13] =\n blocks[14] =\n blocks[15] =\n 0;\n }\n\n if (notString) {\n for (i = this.start; index < length && i < 64; ++index) {\n blocks[i >>> 2] |= message[index] << SHIFT[i++ & 3];\n }\n } else {\n for (i = this.start; index < length && i < 64; ++index) {\n code = message.charCodeAt(index);\n if (code < 0x80) {\n blocks[i >>> 2] |= code << SHIFT[i++ & 3];\n } else if (code < 0x800) {\n blocks[i >>> 2] |= (0xc0 | (code >>> 6)) << SHIFT[i++ & 3];\n blocks[i >>> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3];\n } else if (code < 0xd800 || code >= 0xe000) {\n blocks[i >>> 2] |= (0xe0 | (code >>> 12)) << SHIFT[i++ & 3];\n blocks[i >>> 2] |= (0x80 | ((code >>> 6) & 0x3f)) << SHIFT[i++ & 3];\n blocks[i >>> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3];\n } else {\n code =\n 0x10000 +\n (((code & 0x3ff) << 10) | (message.charCodeAt(++index) & 0x3ff));\n blocks[i >>> 2] |= (0xf0 | (code >>> 18)) << SHIFT[i++ & 3];\n blocks[i >>> 2] |= (0x80 | ((code >>> 12) & 0x3f)) << SHIFT[i++ & 3];\n blocks[i >>> 2] |= (0x80 | ((code >>> 6) & 0x3f)) << SHIFT[i++ & 3];\n blocks[i >>> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3];\n }\n }\n }\n\n this.lastByteIndex = i;\n this.bytes += i - this.start;\n if (i >= 64) {\n this.block = blocks[16];\n this.start = i - 64;\n this.hash();\n this.hashed = true;\n } else {\n this.start = i;\n }\n }\n if (this.bytes > 4294967295) {\n this.hBytes += (this.bytes / 4294967296) << 0;\n this.bytes = this.bytes % 4294967296;\n }\n return this;\n};\n\nSha256.prototype.finalize = function () {\n if (this.finalized) {\n return;\n }\n this.finalized = true;\n var blocks = this.blocks,\n i = this.lastByteIndex;\n blocks[16] = this.block;\n blocks[i >>> 2] |= EXTRA[i & 3];\n this.block = blocks[16];\n if (i >= 56) {\n if (!this.hashed) {\n this.hash();\n }\n blocks[0] = this.block;\n blocks[16] =\n blocks[1] =\n blocks[2] =\n blocks[3] =\n blocks[4] =\n blocks[5] =\n blocks[6] =\n blocks[7] =\n blocks[8] =\n blocks[9] =\n blocks[10] =\n blocks[11] =\n blocks[12] =\n blocks[13] =\n blocks[14] =\n blocks[15] =\n 0;\n }\n blocks[14] = (this.hBytes << 3) | (this.bytes >>> 29);\n blocks[15] = this.bytes << 3;\n this.hash();\n};\n\nSha256.prototype.hash = function () {\n var a = this.h0,\n b = this.h1,\n c = this.h2,\n d = this.h3,\n e = this.h4,\n f = this.h5,\n g = this.h6,\n h = this.h7,\n blocks = this.blocks,\n j,\n s0,\n s1,\n maj,\n t1,\n t2,\n ch,\n ab,\n da,\n cd,\n bc;\n\n for (j = 16; j < 64; ++j) {\n // rightrotate\n t1 = blocks[j - 15];\n s0 = ((t1 >>> 7) | (t1 << 25)) ^ ((t1 >>> 18) | (t1 << 14)) ^ (t1 >>> 3);\n t1 = blocks[j - 2];\n s1 = ((t1 >>> 17) | (t1 << 15)) ^ ((t1 >>> 19) | (t1 << 13)) ^ (t1 >>> 10);\n blocks[j] = (blocks[j - 16] + s0 + blocks[j - 7] + s1) << 0;\n }\n\n bc = b & c;\n for (j = 0; j < 64; j += 4) {\n if (this.first) {\n if (this.is224) {\n ab = 300032;\n t1 = blocks[0] - 1413257819;\n h = (t1 - 150054599) << 0;\n d = (t1 + 24177077) << 0;\n } else {\n ab = 704751109;\n t1 = blocks[0] - 210244248;\n h = (t1 - 1521486534) << 0;\n d = (t1 + 143694565) << 0;\n }\n this.first = false;\n } else {\n s0 =\n ((a >>> 2) | (a << 30)) ^\n ((a >>> 13) | (a << 19)) ^\n ((a >>> 22) | (a << 10));\n s1 =\n ((e >>> 6) | (e << 26)) ^\n ((e >>> 11) | (e << 21)) ^\n ((e >>> 25) | (e << 7));\n ab = a & b;\n maj = ab ^ (a & c) ^ bc;\n ch = (e & f) ^ (~e & g);\n t1 = h + s1 + ch + K[j] + blocks[j];\n t2 = s0 + maj;\n h = (d + t1) << 0;\n d = (t1 + t2) << 0;\n }\n s0 =\n ((d >>> 2) | (d << 30)) ^\n ((d >>> 13) | (d << 19)) ^\n ((d >>> 22) | (d << 10));\n s1 =\n ((h >>> 6) | (h << 26)) ^\n ((h >>> 11) | (h << 21)) ^\n ((h >>> 25) | (h << 7));\n da = d & a;\n maj = da ^ (d & b) ^ ab;\n ch = (g & h) ^ (~g & e);\n t1 = f + s1 + ch + K[j + 1] + blocks[j + 1];\n t2 = s0 + maj;\n g = (c + t1) << 0;\n c = (t1 + t2) << 0;\n s0 =\n ((c >>> 2) | (c << 30)) ^\n ((c >>> 13) | (c << 19)) ^\n ((c >>> 22) | (c << 10));\n s1 =\n ((g >>> 6) | (g << 26)) ^\n ((g >>> 11) | (g << 21)) ^\n ((g >>> 25) | (g << 7));\n cd = c & d;\n maj = cd ^ (c & a) ^ da;\n ch = (f & g) ^ (~f & h);\n t1 = e + s1 + ch + K[j + 2] + blocks[j + 2];\n t2 = s0 + maj;\n f = (b + t1) << 0;\n b = (t1 + t2) << 0;\n s0 =\n ((b >>> 2) | (b << 30)) ^\n ((b >>> 13) | (b << 19)) ^\n ((b >>> 22) | (b << 10));\n s1 =\n ((f >>> 6) | (f << 26)) ^\n ((f >>> 11) | (f << 21)) ^\n ((f >>> 25) | (f << 7));\n bc = b & c;\n maj = bc ^ (b & d) ^ cd;\n ch = (f & g) ^ (~f & h);\n t1 = e + s1 + ch + K[j + 3] + blocks[j + 3];\n t2 = s0 + maj;\n e = (a + t1) << 0;\n a = (t1 + t2) << 0;\n this.chromeBugWorkAround = true;\n }\n\n this.h0 = (this.h0 + a) << 0;\n this.h1 = (this.h1 + b) << 0;\n this.h2 = (this.h2 + c) << 0;\n this.h3 = (this.h3 + d) << 0;\n this.h4 = (this.h4 + e) << 0;\n this.h5 = (this.h5 + f) << 0;\n this.h6 = (this.h6 + g) << 0;\n this.h7 = (this.h7 + h) << 0;\n};\n\nSha256.prototype.hex = function () {\n this.finalize();\n\n var h0 = this.h0,\n h1 = this.h1,\n h2 = this.h2,\n h3 = this.h3,\n h4 = this.h4,\n h5 = this.h5,\n h6 = this.h6,\n h7 = this.h7;\n\n var hex =\n HEX_CHARS[(h0 >>> 28) & 0x0f] +\n HEX_CHARS[(h0 >>> 24) & 0x0f] +\n HEX_CHARS[(h0 >>> 20) & 0x0f] +\n HEX_CHARS[(h0 >>> 16) & 0x0f] +\n HEX_CHARS[(h0 >>> 12) & 0x0f] +\n HEX_CHARS[(h0 >>> 8) & 0x0f] +\n HEX_CHARS[(h0 >>> 4) & 0x0f] +\n HEX_CHARS[h0 & 0x0f] +\n HEX_CHARS[(h1 >>> 28) & 0x0f] +\n HEX_CHARS[(h1 >>> 24) & 0x0f] +\n HEX_CHARS[(h1 >>> 20) & 0x0f] +\n HEX_CHARS[(h1 >>> 16) & 0x0f] +\n HEX_CHARS[(h1 >>> 12) & 0x0f] +\n HEX_CHARS[(h1 >>> 8) & 0x0f] +\n HEX_CHARS[(h1 >>> 4) & 0x0f] +\n HEX_CHARS[h1 & 0x0f] +\n HEX_CHARS[(h2 >>> 28) & 0x0f] +\n HEX_CHARS[(h2 >>> 24) & 0x0f] +\n HEX_CHARS[(h2 >>> 20) & 0x0f] +\n HEX_CHARS[(h2 >>> 16) & 0x0f] +\n HEX_CHARS[(h2 >>> 12) & 0x0f] +\n HEX_CHARS[(h2 >>> 8) & 0x0f] +\n HEX_CHARS[(h2 >>> 4) & 0x0f] +\n HEX_CHARS[h2 & 0x0f] +\n HEX_CHARS[(h3 >>> 28) & 0x0f] +\n HEX_CHARS[(h3 >>> 24) & 0x0f] +\n HEX_CHARS[(h3 >>> 20) & 0x0f] +\n HEX_CHARS[(h3 >>> 16) & 0x0f] +\n HEX_CHARS[(h3 >>> 12) & 0x0f] +\n HEX_CHARS[(h3 >>> 8) & 0x0f] +\n HEX_CHARS[(h3 >>> 4) & 0x0f] +\n HEX_CHARS[h3 & 0x0f] +\n HEX_CHARS[(h4 >>> 28) & 0x0f] +\n HEX_CHARS[(h4 >>> 24) & 0x0f] +\n HEX_CHARS[(h4 >>> 20) & 0x0f] +\n HEX_CHARS[(h4 >>> 16) & 0x0f] +\n HEX_CHARS[(h4 >>> 12) & 0x0f] +\n HEX_CHARS[(h4 >>> 8) & 0x0f] +\n HEX_CHARS[(h4 >>> 4) & 0x0f] +\n HEX_CHARS[h4 & 0x0f] +\n HEX_CHARS[(h5 >>> 28) & 0x0f] +\n HEX_CHARS[(h5 >>> 24) & 0x0f] +\n HEX_CHARS[(h5 >>> 20) & 0x0f] +\n HEX_CHARS[(h5 >>> 16) & 0x0f] +\n HEX_CHARS[(h5 >>> 12) & 0x0f] +\n HEX_CHARS[(h5 >>> 8) & 0x0f] +\n HEX_CHARS[(h5 >>> 4) & 0x0f] +\n HEX_CHARS[h5 & 0x0f] +\n HEX_CHARS[(h6 >>> 28) & 0x0f] +\n HEX_CHARS[(h6 >>> 24) & 0x0f] +\n HEX_CHARS[(h6 >>> 20) & 0x0f] +\n HEX_CHARS[(h6 >>> 16) & 0x0f] +\n HEX_CHARS[(h6 >>> 12) & 0x0f] +\n HEX_CHARS[(h6 >>> 8) & 0x0f] +\n HEX_CHARS[(h6 >>> 4) & 0x0f] +\n HEX_CHARS[h6 & 0x0f];\n if (!this.is224) {\n hex +=\n HEX_CHARS[(h7 >>> 28) & 0x0f] +\n HEX_CHARS[(h7 >>> 24) & 0x0f] +\n HEX_CHARS[(h7 >>> 20) & 0x0f] +\n HEX_CHARS[(h7 >>> 16) & 0x0f] +\n HEX_CHARS[(h7 >>> 12) & 0x0f] +\n HEX_CHARS[(h7 >>> 8) & 0x0f] +\n HEX_CHARS[(h7 >>> 4) & 0x0f] +\n HEX_CHARS[h7 & 0x0f];\n }\n return hex;\n};\n\nSha256.prototype.toString = Sha256.prototype.hex;\n\nSha256.prototype.digest = function () {\n this.finalize();\n\n var h0 = this.h0,\n h1 = this.h1,\n h2 = this.h2,\n h3 = this.h3,\n h4 = this.h4,\n h5 = this.h5,\n h6 = this.h6,\n h7 = this.h7;\n\n var arr = [\n (h0 >>> 24) & 0xff,\n (h0 >>> 16) & 0xff,\n (h0 >>> 8) & 0xff,\n h0 & 0xff,\n (h1 >>> 24) & 0xff,\n (h1 >>> 16) & 0xff,\n (h1 >>> 8) & 0xff,\n h1 & 0xff,\n (h2 >>> 24) & 0xff,\n (h2 >>> 16) & 0xff,\n (h2 >>> 8) & 0xff,\n h2 & 0xff,\n (h3 >>> 24) & 0xff,\n (h3 >>> 16) & 0xff,\n (h3 >>> 8) & 0xff,\n h3 & 0xff,\n (h4 >>> 24) & 0xff,\n (h4 >>> 16) & 0xff,\n (h4 >>> 8) & 0xff,\n h4 & 0xff,\n (h5 >>> 24) & 0xff,\n (h5 >>> 16) & 0xff,\n (h5 >>> 8) & 0xff,\n h5 & 0xff,\n (h6 >>> 24) & 0xff,\n (h6 >>> 16) & 0xff,\n (h6 >>> 8) & 0xff,\n h6 & 0xff,\n ];\n if (!this.is224) {\n arr.push(\n (h7 >>> 24) & 0xff,\n (h7 >>> 16) & 0xff,\n (h7 >>> 8) & 0xff,\n h7 & 0xff\n );\n }\n return arr;\n};\n\nSha256.prototype.array = Sha256.prototype.digest;\n\nSha256.prototype.arrayBuffer = function () {\n this.finalize();\n\n var buffer = new ArrayBuffer(this.is224 ? 28 : 32);\n var dataView = new DataView(buffer);\n dataView.setUint32(0, this.h0);\n dataView.setUint32(4, this.h1);\n dataView.setUint32(8, this.h2);\n dataView.setUint32(12, this.h3);\n dataView.setUint32(16, this.h4);\n dataView.setUint32(20, this.h5);\n dataView.setUint32(24, this.h6);\n if (!this.is224) {\n dataView.setUint32(28, this.h7);\n }\n return buffer;\n};\n\nexport const sha256 = (...strings: string[]) => {\n return new Sha256(false, true).update(strings.join(\"\")).hex();\n};\n"],"mappings":";;;;;;;;;AAeA,IAAI,YAAY,mBAAmB,MAAM,EAAE;AAC3C,IAAI,QAAQ;CAAC;CAAa;CAAS;CAAO;AAAG;AAC7C,IAAI,QAAQ;CAAC;CAAI;CAAI;CAAG;AAAC;AACzB,IAAI,IAAI;CACN;CAAY;CAAY;CAAY;CAAY;CAAY;CAC5D;CAAY;CAAY;CAAY;CAAY;CAAY;CAC5D;CAAY;CAAY;CAAY;CAAY;CAAY;CAC5D;CAAY;CAAY;CAAY;CAAY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,KAAM;EACb,OAAO,KAAM;EACb,OAAO,IAAK;EACb,KAAK;EACJ,OAAO,KAAM;EACb,OAAO,KAAM;EACb,OAAO,IAAK;EACb,KAAK;EACJ,OAAO,KAAM;EACb,OAAO,KAAM;EACb,OAAO,IAAK;EACb,KAAK;CACP;CACA,IAAI,CAAC,KAAK,OACR,IAAI,KACD,OAAO,KAAM,KACb,OAAO,KAAM,KACb,OAAO,IAAK,KACb,KAAK,GACP;CAEF,OAAO;AACT;AAEA,OAAO,UAAU,QAAQ,OAAO,UAAU;AAE1C,OAAO,UAAU,cAAc,WAAY;CACzC,KAAK,SAAS;CAEd,IAAI,yBAAS,IAAI,YAAY,KAAK,QAAQ,KAAK,EAAE;CACjD,IAAI,WAAW,IAAI,SAAS,MAAM;CAClC,SAAS,UAAU,GAAG,KAAK,EAAE;CAC7B,SAAS,UAAU,GAAG,KAAK,EAAE;CAC7B,SAAS,UAAU,GAAG,KAAK,EAAE;CAC7B,SAAS,UAAU,IAAI,KAAK,EAAE;CAC9B,SAAS,UAAU,IAAI,KAAK,EAAE;CAC9B,SAAS,UAAU,IAAI,KAAK,EAAE;CAC9B,SAAS,UAAU,IAAI,KAAK,EAAE;CAC9B,IAAI,CAAC,KAAK,OACR,SAAS,UAAU,IAAI,KAAK,EAAE;CAEhC,OAAO;AACT;AAEA,MAAa,UAAU,GAAG,YAAsB;CAC9C,OAAO,IAAI,OAAO,OAAO,IAAI,CAAC,CAAC,OAAO,QAAQ,KAAK,EAAE,CAAC,CAAC,CAAC,IAAI;AAC9D"}
|
package/dist/utils/json.d.cts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
//#region src/utils/json.d.ts
|
|
2
|
-
declare function parseJsonMarkdown(s: string, parser?: typeof parsePartialJson): any;
|
|
3
|
-
declare function parsePartialJson(s: string): any | null;
|
|
2
|
+
export declare function parseJsonMarkdown(s: string, parser?: typeof parsePartialJson): any;
|
|
3
|
+
export declare function parsePartialJson(s: string): any | null;
|
|
4
4
|
//#endregion
|
|
5
|
-
export { parseJsonMarkdown, parsePartialJson };
|
|
6
5
|
//# sourceMappingURL=json.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"json.d.cts","names":[],"sources":["../../src/utils/json.ts"],"mappings":";
|
|
1
|
+
{"version":3,"file":"json.d.cts","names":[],"sources":["../../src/utils/json.ts"],"mappings":";wBAAgB,kBAAkB,WAAW,gBAAM;wBA+TnC,iBAAiB"}
|
package/dist/utils/json.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
//#region src/utils/json.d.ts
|
|
2
|
-
declare function parseJsonMarkdown(s: string, parser?: typeof parsePartialJson): any;
|
|
3
|
-
declare function parsePartialJson(s: string): any | null;
|
|
2
|
+
export declare function parseJsonMarkdown(s: string, parser?: typeof parsePartialJson): any;
|
|
3
|
+
export declare function parsePartialJson(s: string): any | null;
|
|
4
4
|
//#endregion
|
|
5
|
-
export { parseJsonMarkdown, parsePartialJson };
|
|
6
5
|
//# sourceMappingURL=json.d.ts.map
|
package/dist/utils/json.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"json.d.ts","names":[],"sources":["../../src/utils/json.ts"],"mappings":";
|
|
1
|
+
{"version":3,"file":"json.d.ts","names":[],"sources":["../../src/utils/json.ts"],"mappings":";wBAAgB,kBAAkB,WAAW,gBAAM;wBA+TnC,iBAAiB"}
|
|
@@ -10,7 +10,7 @@ import { StandardJSONSchemaV1 } from "@standard-schema/spec";
|
|
|
10
10
|
import { toJSONSchema } from "zod/v4/core";
|
|
11
11
|
import { Validator, deepCompareStrict } from "@cfworker/json-schema";
|
|
12
12
|
//#region src/utils/json_schema.d.ts
|
|
13
|
-
type ToJSONSchemaParams = NonNullable<Parameters<typeof toJSONSchema>[1]>;
|
|
13
|
+
export type ToJSONSchemaParams = NonNullable<Parameters<typeof toJSONSchema>[1]>;
|
|
14
14
|
/**
|
|
15
15
|
* Converts a Standard JSON schema, Zod schema or JSON schema to a JSON schema.
|
|
16
16
|
* Results are cached by schema reference when no custom params are passed.
|
|
@@ -18,7 +18,7 @@ type ToJSONSchemaParams = NonNullable<Parameters<typeof toJSONSchema>[1]>;
|
|
|
18
18
|
* @param params - The parameters to pass to the toJSONSchema function.
|
|
19
19
|
* @returns The converted schema.
|
|
20
20
|
*/
|
|
21
|
-
declare function toJsonSchema(schema: StandardJSONSchemaV1 | InteropZodType | JsonSchema7Type, params?: ToJSONSchemaParams): JsonSchema7Type;
|
|
21
|
+
export declare function toJsonSchema(schema: StandardJSONSchemaV1 | InteropZodType | JsonSchema7Type, params?: ToJSONSchemaParams): JsonSchema7Type;
|
|
22
22
|
/**
|
|
23
23
|
* Validates if a JSON schema validates only strings. May return false negatives in some edge cases
|
|
24
24
|
* (like recursive or unresolvable refs).
|
|
@@ -26,7 +26,7 @@ declare function toJsonSchema(schema: StandardJSONSchemaV1 | InteropZodType | Js
|
|
|
26
26
|
* @param schema - The schema to validate.
|
|
27
27
|
* @returns `true` if the schema validates only strings, `false` otherwise.
|
|
28
28
|
*/
|
|
29
|
-
declare function validatesOnlyStrings(schema: unknown): boolean;
|
|
29
|
+
export declare function validatesOnlyStrings(schema: unknown): boolean;
|
|
30
30
|
//#endregion
|
|
31
|
-
export { type JsonSchema7Type as JSONSchema, type JsonSchema7ArrayType, type JsonSchema7NullableType, type JsonSchema7NumberType, type JsonSchema7ObjectType, type JsonSchema7StringType, type JsonSchema7Type,
|
|
31
|
+
export { type JsonSchema7Type as JSONSchema, type JsonSchema7ArrayType, type JsonSchema7NullableType, type JsonSchema7NumberType, type JsonSchema7ObjectType, type JsonSchema7StringType, type JsonSchema7Type, Validator, deepCompareStrict };
|
|
32
32
|
//# sourceMappingURL=json_schema.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"json_schema.d.cts","names":[],"sources":["../../src/utils/json_schema.ts"],"mappings":";;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"json_schema.d.cts","names":["JSONSchema"],"sources":["../../src/utils/json_schema.ts"],"mappings":";;;;;;;;;;;;YAmBY,qBAAqB,YAC/B,kBAAkB;;;;;;;;wBA2BJ,aACd,QAAQ,uBAAuB,iBAAiBA,iBAChD,SAAS,qBACRA;;;;;;;;wBA6Ca,qBAAqB"}
|
|
@@ -10,7 +10,7 @@ import { toJSONSchema } from "zod/v4/core";
|
|
|
10
10
|
import { Validator, deepCompareStrict } from "@cfworker/json-schema";
|
|
11
11
|
import { StandardJSONSchemaV1 } from "@standard-schema/spec";
|
|
12
12
|
//#region src/utils/json_schema.d.ts
|
|
13
|
-
type ToJSONSchemaParams = NonNullable<Parameters<typeof toJSONSchema>[1]>;
|
|
13
|
+
export type ToJSONSchemaParams = NonNullable<Parameters<typeof toJSONSchema>[1]>;
|
|
14
14
|
/**
|
|
15
15
|
* Converts a Standard JSON schema, Zod schema or JSON schema to a JSON schema.
|
|
16
16
|
* Results are cached by schema reference when no custom params are passed.
|
|
@@ -18,7 +18,7 @@ type ToJSONSchemaParams = NonNullable<Parameters<typeof toJSONSchema>[1]>;
|
|
|
18
18
|
* @param params - The parameters to pass to the toJSONSchema function.
|
|
19
19
|
* @returns The converted schema.
|
|
20
20
|
*/
|
|
21
|
-
declare function toJsonSchema(schema: StandardJSONSchemaV1 | InteropZodType | JsonSchema7Type, params?: ToJSONSchemaParams): JsonSchema7Type;
|
|
21
|
+
export declare function toJsonSchema(schema: StandardJSONSchemaV1 | InteropZodType | JsonSchema7Type, params?: ToJSONSchemaParams): JsonSchema7Type;
|
|
22
22
|
/**
|
|
23
23
|
* Validates if a JSON schema validates only strings. May return false negatives in some edge cases
|
|
24
24
|
* (like recursive or unresolvable refs).
|
|
@@ -26,7 +26,7 @@ declare function toJsonSchema(schema: StandardJSONSchemaV1 | InteropZodType | Js
|
|
|
26
26
|
* @param schema - The schema to validate.
|
|
27
27
|
* @returns `true` if the schema validates only strings, `false` otherwise.
|
|
28
28
|
*/
|
|
29
|
-
declare function validatesOnlyStrings(schema: unknown): boolean;
|
|
29
|
+
export declare function validatesOnlyStrings(schema: unknown): boolean;
|
|
30
30
|
//#endregion
|
|
31
|
-
export { type JsonSchema7Type as JSONSchema, type JsonSchema7ArrayType, type JsonSchema7NullableType, type JsonSchema7NumberType, type JsonSchema7ObjectType, type JsonSchema7StringType, type JsonSchema7Type,
|
|
31
|
+
export { type JsonSchema7Type as JSONSchema, type JsonSchema7ArrayType, type JsonSchema7NullableType, type JsonSchema7NumberType, type JsonSchema7ObjectType, type JsonSchema7StringType, type JsonSchema7Type, Validator, deepCompareStrict };
|
|
32
32
|
//# sourceMappingURL=json_schema.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"json_schema.d.ts","names":[],"sources":["../../src/utils/json_schema.ts"],"mappings":";;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"json_schema.d.ts","names":["JSONSchema"],"sources":["../../src/utils/json_schema.ts"],"mappings":";;;;;;;;;;;;YAmBY,qBAAqB,YAC/B,kBAAkB;;;;;;;;wBA2BJ,aACd,QAAQ,uBAAuB,iBAAiBA,iBAChD,SAAS,qBACRA;;;;;;;;wBA6Ca,qBAAqB"}
|
package/dist/utils/math.d.cts
CHANGED
|
@@ -11,8 +11,8 @@ type VectorFunction = (xVector: number[], yVector: number[]) => number;
|
|
|
11
11
|
*
|
|
12
12
|
* @returns {number[][] | [[]]} A matrix where each row represents the result of applying the function between the corresponding rows of X and Y.
|
|
13
13
|
*/
|
|
14
|
-
declare function matrixFunc(X: number[][], Y: number[][], func: VectorFunction): number[][];
|
|
15
|
-
declare function normalize(M: number[][], similarity?: boolean): number[][];
|
|
14
|
+
export declare function matrixFunc(X: number[][], Y: number[][], func: VectorFunction): number[][];
|
|
15
|
+
export declare function normalize(M: number[][], similarity?: boolean): number[][];
|
|
16
16
|
/**
|
|
17
17
|
* This function calculates the row-wise cosine similarity between two matrices with the same number of columns.
|
|
18
18
|
*
|
|
@@ -23,9 +23,9 @@ declare function normalize(M: number[][], similarity?: boolean): number[][];
|
|
|
23
23
|
*
|
|
24
24
|
* @returns {number[][] | [[]]} A matrix where each row represents the cosine similarity values between the corresponding rows of X and Y.
|
|
25
25
|
*/
|
|
26
|
-
declare function cosineSimilarity(X: number[][], Y: number[][]): number[][];
|
|
27
|
-
declare function innerProduct(X: number[][], Y: number[][]): number[][];
|
|
28
|
-
declare function euclideanDistance(X: number[][], Y: number[][]): number[][];
|
|
26
|
+
export declare function cosineSimilarity(X: number[][], Y: number[][]): number[][];
|
|
27
|
+
export declare function innerProduct(X: number[][], Y: number[][]): number[][];
|
|
28
|
+
export declare function euclideanDistance(X: number[][], Y: number[][]): number[][];
|
|
29
29
|
/**
|
|
30
30
|
* This function implements the Maximal Marginal Relevance algorithm
|
|
31
31
|
* to select a set of embeddings that maximizes the diversity and relevance to a query embedding.
|
|
@@ -37,7 +37,6 @@ declare function euclideanDistance(X: number[][], Y: number[][]): number[][];
|
|
|
37
37
|
*
|
|
38
38
|
* @returns {number[]} The indexes of the selected embeddings in the embeddingList.
|
|
39
39
|
*/
|
|
40
|
-
declare function maximalMarginalRelevance(queryEmbedding: number[] | number[][], embeddingList: number[][], lambda?: number, k?: number): number[];
|
|
40
|
+
export declare function maximalMarginalRelevance(queryEmbedding: number[] | number[][], embeddingList: number[][], lambda?: number, k?: number): number[];
|
|
41
41
|
//#endregion
|
|
42
|
-
export { cosineSimilarity, euclideanDistance, innerProduct, matrixFunc, maximalMarginalRelevance, normalize };
|
|
43
42
|
//# sourceMappingURL=math.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"math.d.cts","names":[],"sources":["../../src/utils/math.ts"],"mappings":";KAIK,kBAAkB,mBAAmB;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"math.d.cts","names":[],"sources":["../../src/utils/math.ts"],"mappings":";KAIK,kBAAkB,mBAAmB;;;;;;;;;;;;wBAc1B,WACd,eACA,eACA,MAAM;wBA2BQ,UAAU,eAAe;;;;;;;;;;;wBAiBzB,iBAAiB,eAAe;wBAIhC,aAAa,eAAe;wBAI5B,kBAAkB,eAAe;;;;;;;;;;;;wBAejC,yBACd,uCACA,2BACA,iBACA"}
|
package/dist/utils/math.d.ts
CHANGED
|
@@ -11,8 +11,8 @@ type VectorFunction = (xVector: number[], yVector: number[]) => number;
|
|
|
11
11
|
*
|
|
12
12
|
* @returns {number[][] | [[]]} A matrix where each row represents the result of applying the function between the corresponding rows of X and Y.
|
|
13
13
|
*/
|
|
14
|
-
declare function matrixFunc(X: number[][], Y: number[][], func: VectorFunction): number[][];
|
|
15
|
-
declare function normalize(M: number[][], similarity?: boolean): number[][];
|
|
14
|
+
export declare function matrixFunc(X: number[][], Y: number[][], func: VectorFunction): number[][];
|
|
15
|
+
export declare function normalize(M: number[][], similarity?: boolean): number[][];
|
|
16
16
|
/**
|
|
17
17
|
* This function calculates the row-wise cosine similarity between two matrices with the same number of columns.
|
|
18
18
|
*
|
|
@@ -23,9 +23,9 @@ declare function normalize(M: number[][], similarity?: boolean): number[][];
|
|
|
23
23
|
*
|
|
24
24
|
* @returns {number[][] | [[]]} A matrix where each row represents the cosine similarity values between the corresponding rows of X and Y.
|
|
25
25
|
*/
|
|
26
|
-
declare function cosineSimilarity(X: number[][], Y: number[][]): number[][];
|
|
27
|
-
declare function innerProduct(X: number[][], Y: number[][]): number[][];
|
|
28
|
-
declare function euclideanDistance(X: number[][], Y: number[][]): number[][];
|
|
26
|
+
export declare function cosineSimilarity(X: number[][], Y: number[][]): number[][];
|
|
27
|
+
export declare function innerProduct(X: number[][], Y: number[][]): number[][];
|
|
28
|
+
export declare function euclideanDistance(X: number[][], Y: number[][]): number[][];
|
|
29
29
|
/**
|
|
30
30
|
* This function implements the Maximal Marginal Relevance algorithm
|
|
31
31
|
* to select a set of embeddings that maximizes the diversity and relevance to a query embedding.
|
|
@@ -37,7 +37,6 @@ declare function euclideanDistance(X: number[][], Y: number[][]): number[][];
|
|
|
37
37
|
*
|
|
38
38
|
* @returns {number[]} The indexes of the selected embeddings in the embeddingList.
|
|
39
39
|
*/
|
|
40
|
-
declare function maximalMarginalRelevance(queryEmbedding: number[] | number[][], embeddingList: number[][], lambda?: number, k?: number): number[];
|
|
40
|
+
export declare function maximalMarginalRelevance(queryEmbedding: number[] | number[][], embeddingList: number[][], lambda?: number, k?: number): number[];
|
|
41
41
|
//#endregion
|
|
42
|
-
export { cosineSimilarity, euclideanDistance, innerProduct, matrixFunc, maximalMarginalRelevance, normalize };
|
|
43
42
|
//# sourceMappingURL=math.d.ts.map
|
package/dist/utils/math.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"math.d.ts","names":[],"sources":["../../src/utils/math.ts"],"mappings":";KAIK,kBAAkB,mBAAmB;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"math.d.ts","names":[],"sources":["../../src/utils/math.ts"],"mappings":";KAIK,kBAAkB,mBAAmB;;;;;;;;;;;;wBAc1B,WACd,eACA,eACA,MAAM;wBA2BQ,UAAU,eAAe;;;;;;;;;;;wBAiBzB,iBAAiB,eAAe;wBAIhC,aAAa,eAAe;wBAI5B,kBAAkB,eAAe;;;;;;;;;;;;wBAejC,yBACd,uCACA,2BACA,iBACA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"similarities.d.cts","names":[],"sources":["../../../src/utils/ml-distance/similarities.ts"],"mappings":";;;;;;;
|
|
1
|
+
{"version":3,"file":"similarities.d.cts","names":[],"sources":["../../../src/utils/ml-distance/similarities.ts"],"mappings":";;;;;;;wBAMgB,OAAO,aAAa"}
|