@mtkruto/node 0.1.303 → 0.1.400
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/esm/0_deps.d.ts +6 -5
- package/esm/0_deps.js +7 -6
- package/esm/1_utilities.d.ts +2 -0
- package/esm/1_utilities.js +2 -0
- package/esm/3_types.d.ts +2 -0
- package/esm/3_types.js +2 -0
- package/esm/client/0_message.js +11 -11
- package/esm/client/0_params.d.ts +8 -1
- package/esm/client/0_password.js +14 -6
- package/esm/client/0_types.d.ts +18 -7
- package/esm/client/0_utilities.d.ts +19 -2
- package/esm/client/0_utilities.js +1 -44
- package/esm/client/1_client_plain.js +6 -6
- package/esm/client/1_file_manager.d.ts +3 -21
- package/esm/client/1_file_manager.js +244 -104
- package/esm/client/2_message_manager.d.ts +4 -1
- package/esm/client/2_message_manager.js +166 -23
- package/esm/client/3_story_manager.js +4 -6
- package/esm/client/4_client.d.ts +20 -2
- package/esm/client/4_client.js +97 -49
- package/esm/connection/1_connection_web_socket.js +3 -3
- package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/assert/assert.js +1 -0
- package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/assert/assert_almost_equals.js +1 -0
- package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/assert/assert_array_includes.js +1 -0
- package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/assert/assert_equals.js +1 -0
- package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/assert/assert_exists.js +1 -0
- package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/assert/assert_false.js +1 -0
- package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/assert/assert_greater.js +1 -0
- package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/assert/assert_greater_or_equal.js +1 -0
- package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/assert/assert_instance_of.js +1 -0
- package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/assert/assert_is_error.js +1 -0
- package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/assert/assert_less.js +1 -0
- package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/assert/assert_less_or_equal.js +1 -0
- package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/assert/assert_match.js +1 -0
- package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/assert/assert_not_equals.js +1 -0
- package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/assert/assert_not_instance_of.js +1 -0
- package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/assert/assert_not_match.js +1 -0
- package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/assert/assert_not_strict_equals.js +1 -0
- package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/assert/assert_object_match.js +1 -0
- package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/assert/assert_rejects.js +1 -0
- package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/assert/assert_strict_equals.js +1 -0
- package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/assert/assert_string_includes.js +1 -0
- package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/assert/assert_throws.js +1 -0
- package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/assert/assertion_error.js +1 -0
- package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/assert/equal.js +1 -0
- package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/assert/fail.js +1 -0
- package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/assert/mod.js +1 -0
- package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/assert/unimplemented.js +1 -0
- package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/assert/unreachable.js +1 -0
- package/esm/deps/deno.land/std@0.222.1/bytes/concat.d.ts +13 -0
- package/esm/deps/deno.land/std@0.222.1/bytes/concat.js +27 -0
- package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/encoding/base64.d.ts +8 -2
- package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/encoding/base64.js +19 -2
- package/{script/deps/deno.land/std@0.221.0 → esm/deps/deno.land/std@0.222.1}/media_types/_util.d.ts +1 -0
- package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/media_types/_util.js +1 -1
- package/{script/deps/deno.land/x/tgcrypto@0.4.0 → esm/deps/deno.land/x/tgcrypto@0.4.1}/mod.d.ts +14 -2
- package/esm/deps/deno.land/x/{tgcrypto@0.4.0 → tgcrypto@0.4.1}/mod.js +56 -42
- package/esm/tl/0_tl_raw_writer.js +3 -2
- package/esm/transport/0_obfuscation.js +4 -3
- package/esm/transport/0_transport.d.ts +1 -1
- package/esm/transport/0_transport.js +7 -0
- package/esm/transport/1_transport_abridged.js +4 -2
- package/esm/transport/1_transport_intermediate.js +4 -2
- package/esm/types/0_file_source.d.ts +2 -2
- package/esm/types/0_self_destruct_option.d.ts +25 -0
- package/esm/types/0_self_destruct_option.js +39 -0
- package/esm/types/1_input_media.d.ts +108 -0
- package/esm/types/1_input_media.js +20 -0
- package/esm/utilities/0_buffer.d.ts +0 -1
- package/esm/utilities/0_buffer.js +0 -13
- package/esm/utilities/0_crypto.d.ts +3 -3
- package/esm/utilities/0_crypto.js +23 -20
- package/esm/utilities/0_part_stream.d.ts +29 -0
- package/esm/utilities/0_part_stream.js +65 -0
- package/esm/utilities/0_units.d.ts +25 -0
- package/esm/utilities/0_units.js +25 -0
- package/esm/utilities/1_auth.js +5 -5
- package/esm/utilities/1_misc.d.ts +1 -0
- package/esm/utilities/1_misc.js +17 -2
- package/package.json +1 -1
- package/script/0_deps.d.ts +6 -5
- package/script/0_deps.js +11 -7
- package/script/1_utilities.d.ts +2 -0
- package/script/1_utilities.js +2 -0
- package/script/3_types.d.ts +2 -0
- package/script/3_types.js +2 -0
- package/script/client/0_message.js +9 -9
- package/script/client/0_params.d.ts +8 -1
- package/script/client/0_password.js +13 -5
- package/script/client/0_types.d.ts +18 -7
- package/script/client/0_utilities.d.ts +19 -2
- package/script/client/0_utilities.js +2 -69
- package/script/client/1_client_plain.js +4 -4
- package/script/client/1_file_manager.d.ts +3 -21
- package/script/client/1_file_manager.js +266 -103
- package/script/client/2_message_manager.d.ts +4 -1
- package/script/client/2_message_manager.js +164 -21
- package/script/client/3_story_manager.js +3 -5
- package/script/client/4_client.d.ts +20 -2
- package/script/client/4_client.js +96 -48
- package/script/connection/1_connection_web_socket.js +1 -1
- package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/assert/assert.js +1 -0
- package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/assert/assert_almost_equals.js +1 -0
- package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/assert/assert_array_includes.js +1 -0
- package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/assert/assert_equals.js +1 -0
- package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/assert/assert_exists.js +1 -0
- package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/assert/assert_false.js +1 -0
- package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/assert/assert_greater.js +1 -0
- package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/assert/assert_greater_or_equal.js +1 -0
- package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/assert/assert_instance_of.js +1 -0
- package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/assert/assert_is_error.js +1 -0
- package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/assert/assert_less.js +1 -0
- package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/assert/assert_less_or_equal.js +1 -0
- package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/assert/assert_match.js +1 -0
- package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/assert/assert_not_equals.js +1 -0
- package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/assert/assert_not_instance_of.js +1 -0
- package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/assert/assert_not_match.js +1 -0
- package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/assert/assert_not_strict_equals.js +1 -0
- package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/assert/assert_object_match.js +1 -0
- package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/assert/assert_rejects.js +1 -0
- package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/assert/assert_strict_equals.js +1 -0
- package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/assert/assert_string_includes.js +1 -0
- package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/assert/assert_throws.js +1 -0
- package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/assert/assertion_error.js +1 -0
- package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/assert/equal.js +1 -0
- package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/assert/fail.js +1 -0
- package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/assert/mod.js +1 -0
- package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/assert/unimplemented.js +1 -0
- package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/assert/unreachable.js +1 -0
- package/script/deps/deno.land/std@0.222.1/bytes/concat.d.ts +13 -0
- package/script/deps/deno.land/std@0.222.1/bytes/concat.js +31 -0
- package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/encoding/base64.d.ts +8 -2
- package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/encoding/base64.js +19 -2
- package/{esm/deps/deno.land/std@0.221.0 → script/deps/deno.land/std@0.222.1}/media_types/_util.d.ts +1 -0
- package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/media_types/_util.js +2 -1
- package/{esm/deps/deno.land/x/tgcrypto@0.4.0 → script/deps/deno.land/x/tgcrypto@0.4.1}/mod.d.ts +14 -2
- package/script/deps/deno.land/x/{tgcrypto@0.4.0 → tgcrypto@0.4.1}/mod.js +61 -43
- package/script/tl/0_tl_raw_writer.js +2 -1
- package/script/transport/0_obfuscation.js +3 -2
- package/script/transport/0_transport.d.ts +1 -1
- package/script/transport/0_transport.js +7 -0
- package/script/transport/1_transport_abridged.js +3 -1
- package/script/transport/1_transport_intermediate.js +3 -1
- package/script/types/0_file_source.d.ts +2 -2
- package/script/types/0_self_destruct_option.d.ts +25 -0
- package/script/types/0_self_destruct_option.js +43 -0
- package/script/types/1_input_media.d.ts +108 -0
- package/script/types/1_input_media.js +21 -0
- package/script/utilities/0_buffer.d.ts +0 -1
- package/script/utilities/0_buffer.js +1 -15
- package/script/utilities/0_crypto.d.ts +3 -3
- package/script/utilities/0_crypto.js +22 -19
- package/script/utilities/0_part_stream.d.ts +29 -0
- package/script/utilities/0_part_stream.js +69 -0
- package/script/utilities/0_units.d.ts +25 -0
- package/script/utilities/0_units.js +28 -0
- package/script/utilities/1_auth.js +3 -3
- package/script/utilities/1_misc.d.ts +1 -0
- package/script/utilities/1_misc.js +19 -3
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/assert/_constants.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/assert/_constants.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/assert/_diff.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/assert/_diff.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/assert/_format.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/assert/_format.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/assert/assert.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/assert/assert_almost_equals.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/assert/assert_array_includes.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/assert/assert_equals.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/assert/assert_exists.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/assert/assert_false.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/assert/assert_greater.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/assert/assert_greater_or_equal.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/assert/assert_instance_of.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/assert/assert_is_error.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/assert/assert_less.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/assert/assert_less_or_equal.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/assert/assert_match.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/assert/assert_not_equals.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/assert/assert_not_instance_of.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/assert/assert_not_match.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/assert/assert_not_strict_equals.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/assert/assert_object_match.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/assert/assert_rejects.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/assert/assert_strict_equals.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/assert/assert_string_includes.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/assert/assert_throws.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/assert/assertion_error.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/assert/equal.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/assert/fail.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/assert/mod.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/assert/unimplemented.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/assert/unreachable.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/encoding/_util.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/encoding/_util.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/fmt/colors.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/fmt/colors.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/media_types/_db.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/media_types/_db.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/media_types/content_type.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/media_types/content_type.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/media_types/extension.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/media_types/extension.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/media_types/extensions_by_type.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/media_types/extensions_by_type.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/media_types/format_media_type.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/media_types/format_media_type.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/media_types/get_charset.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/media_types/get_charset.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/media_types/parse_media_type.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/media_types/parse_media_type.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/media_types/type_by_extension.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/media_types/type_by_extension.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/media_types/vendor/mime-db.v1.52.0.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/media_types/vendor/mime-db.v1.52.0.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/_common/assert_path.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/_common/assert_path.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/_common/basename.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/_common/basename.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/_common/common.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/_common/common.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/_common/constants.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/_common/constants.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/_common/dirname.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/_common/dirname.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/_common/format.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/_common/format.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/_common/from_file_url.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/_common/from_file_url.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/_common/glob_to_reg_exp.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/_common/glob_to_reg_exp.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/_common/normalize.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/_common/normalize.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/_common/normalize_string.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/_common/normalize_string.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/_common/relative.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/_common/relative.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/_common/strip_trailing_separators.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/_common/strip_trailing_separators.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/_common/to_file_url.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/_common/to_file_url.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/_interface.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/_interface.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/_os.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/_os.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/basename.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/basename.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/common.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/common.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/constants.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/constants.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/dirname.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/dirname.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/extname.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/extname.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/format.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/format.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/from_file_url.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/from_file_url.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/glob_to_regexp.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/glob_to_regexp.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/is_absolute.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/is_absolute.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/is_glob.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/is_glob.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/join.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/join.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/join_globs.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/join_globs.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/mod.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/mod.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/normalize.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/normalize.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/normalize_glob.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/normalize_glob.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/parse.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/parse.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/posix/_util.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/posix/_util.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/posix/basename.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/posix/basename.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/posix/common.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/posix/common.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/posix/constants.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/posix/constants.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/posix/dirname.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/posix/dirname.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/posix/extname.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/posix/extname.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/posix/format.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/posix/format.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/posix/from_file_url.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/posix/from_file_url.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/posix/glob_to_regexp.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/posix/glob_to_regexp.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/posix/is_absolute.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/posix/is_absolute.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/posix/is_glob.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/posix/is_glob.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/posix/join.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/posix/join.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/posix/join_globs.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/posix/join_globs.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/posix/mod.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/posix/mod.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/posix/normalize.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/posix/normalize.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/posix/normalize_glob.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/posix/normalize_glob.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/posix/parse.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/posix/parse.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/posix/relative.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/posix/relative.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/posix/resolve.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/posix/resolve.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/posix/to_file_url.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/posix/to_file_url.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/posix/to_namespaced_path.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/posix/to_namespaced_path.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/relative.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/relative.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/resolve.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/resolve.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/to_file_url.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/to_file_url.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/to_namespaced_path.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/to_namespaced_path.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/windows/_util.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/windows/_util.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/windows/basename.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/windows/basename.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/windows/common.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/windows/common.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/windows/constants.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/windows/constants.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/windows/dirname.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/windows/dirname.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/windows/extname.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/windows/extname.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/windows/format.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/windows/format.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/windows/from_file_url.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/windows/from_file_url.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/windows/glob_to_regexp.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/windows/glob_to_regexp.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/windows/is_absolute.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/windows/is_absolute.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/windows/is_glob.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/windows/is_glob.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/windows/join.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/windows/join.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/windows/join_globs.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/windows/join_globs.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/windows/mod.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/windows/mod.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/windows/normalize.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/windows/normalize.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/windows/normalize_glob.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/windows/normalize_glob.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/windows/parse.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/windows/parse.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/windows/relative.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/windows/relative.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/windows/resolve.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/windows/resolve.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/windows/to_file_url.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/windows/to_file_url.js +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/windows/to_namespaced_path.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/windows/to_namespaced_path.js +0 -0
- /package/esm/deps/deno.land/x/{tgcrypto@0.4.0 → tgcrypto@0.4.1}/tgcrypto.d.ts +0 -0
- /package/esm/deps/deno.land/x/{tgcrypto@0.4.0 → tgcrypto@0.4.1}/tgcrypto.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/assert/_constants.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/assert/_constants.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/assert/_diff.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/assert/_diff.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/assert/_format.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/assert/_format.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/assert/assert.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/assert/assert_almost_equals.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/assert/assert_array_includes.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/assert/assert_equals.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/assert/assert_exists.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/assert/assert_false.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/assert/assert_greater.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/assert/assert_greater_or_equal.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/assert/assert_instance_of.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/assert/assert_is_error.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/assert/assert_less.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/assert/assert_less_or_equal.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/assert/assert_match.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/assert/assert_not_equals.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/assert/assert_not_instance_of.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/assert/assert_not_match.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/assert/assert_not_strict_equals.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/assert/assert_object_match.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/assert/assert_rejects.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/assert/assert_strict_equals.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/assert/assert_string_includes.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/assert/assert_throws.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/assert/assertion_error.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/assert/equal.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/assert/fail.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/assert/mod.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/assert/unimplemented.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/assert/unreachable.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/encoding/_util.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/encoding/_util.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/fmt/colors.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/fmt/colors.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/media_types/_db.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/media_types/_db.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/media_types/content_type.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/media_types/content_type.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/media_types/extension.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/media_types/extension.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/media_types/extensions_by_type.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/media_types/extensions_by_type.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/media_types/format_media_type.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/media_types/format_media_type.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/media_types/get_charset.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/media_types/get_charset.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/media_types/parse_media_type.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/media_types/parse_media_type.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/media_types/type_by_extension.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/media_types/type_by_extension.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/media_types/vendor/mime-db.v1.52.0.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/media_types/vendor/mime-db.v1.52.0.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/_common/assert_path.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/_common/assert_path.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/_common/basename.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/_common/basename.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/_common/common.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/_common/common.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/_common/constants.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/_common/constants.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/_common/dirname.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/_common/dirname.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/_common/format.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/_common/format.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/_common/from_file_url.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/_common/from_file_url.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/_common/glob_to_reg_exp.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/_common/glob_to_reg_exp.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/_common/normalize.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/_common/normalize.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/_common/normalize_string.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/_common/normalize_string.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/_common/relative.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/_common/relative.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/_common/strip_trailing_separators.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/_common/strip_trailing_separators.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/_common/to_file_url.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/_common/to_file_url.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/_interface.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/_interface.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/_os.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/_os.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/basename.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/basename.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/common.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/common.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/constants.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/constants.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/dirname.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/dirname.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/extname.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/extname.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/format.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/format.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/from_file_url.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/from_file_url.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/glob_to_regexp.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/glob_to_regexp.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/is_absolute.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/is_absolute.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/is_glob.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/is_glob.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/join.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/join.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/join_globs.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/join_globs.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/mod.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/mod.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/normalize.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/normalize.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/normalize_glob.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/normalize_glob.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/parse.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/parse.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/posix/_util.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/posix/_util.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/posix/basename.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/posix/basename.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/posix/common.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/posix/common.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/posix/constants.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/posix/constants.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/posix/dirname.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/posix/dirname.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/posix/extname.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/posix/extname.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/posix/format.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/posix/format.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/posix/from_file_url.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/posix/from_file_url.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/posix/glob_to_regexp.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/posix/glob_to_regexp.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/posix/is_absolute.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/posix/is_absolute.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/posix/is_glob.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/posix/is_glob.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/posix/join.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/posix/join.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/posix/join_globs.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/posix/join_globs.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/posix/mod.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/posix/mod.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/posix/normalize.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/posix/normalize.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/posix/normalize_glob.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/posix/normalize_glob.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/posix/parse.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/posix/parse.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/posix/relative.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/posix/relative.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/posix/resolve.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/posix/resolve.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/posix/to_file_url.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/posix/to_file_url.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/posix/to_namespaced_path.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/posix/to_namespaced_path.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/relative.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/relative.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/resolve.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/resolve.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/to_file_url.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/to_file_url.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/to_namespaced_path.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/to_namespaced_path.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/windows/_util.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/windows/_util.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/windows/basename.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/windows/basename.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/windows/common.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/windows/common.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/windows/constants.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/windows/constants.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/windows/dirname.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/windows/dirname.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/windows/extname.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/windows/extname.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/windows/format.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/windows/format.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/windows/from_file_url.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/windows/from_file_url.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/windows/glob_to_regexp.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/windows/glob_to_regexp.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/windows/is_absolute.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/windows/is_absolute.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/windows/is_glob.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/windows/is_glob.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/windows/join.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/windows/join.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/windows/join_globs.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/windows/join_globs.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/windows/mod.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/windows/mod.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/windows/normalize.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/windows/normalize.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/windows/normalize_glob.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/windows/normalize_glob.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/windows/parse.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/windows/parse.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/windows/relative.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/windows/relative.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/windows/resolve.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/windows/resolve.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/windows/to_file_url.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/windows/to_file_url.js +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/windows/to_namespaced_path.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.221.0 → std@0.222.1}/path/windows/to_namespaced_path.js +0 -0
- /package/script/deps/deno.land/x/{tgcrypto@0.4.0 → tgcrypto@0.4.1}/tgcrypto.d.ts +0 -0
- /package/script/deps/deno.land/x/{tgcrypto@0.4.0 → tgcrypto@0.4.1}/tgcrypto.js +0 -0
|
@@ -28,19 +28,19 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
28
28
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
29
29
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
30
30
|
};
|
|
31
|
-
var _MessageManager_instances, _MessageManager_c, _MessageManager_LresolveFileId, _MessageManager_updatesToMessages, _MessageManager_constructReplyMarkup, _MessageManager_resolveSendAs, _MessageManager_constructReplyTo, _MessageManager_sendDocumentInner, _MessageManager_sendMedia, _MessageManager_sendReaction, _MessageManager_toggleJoinRequests;
|
|
31
|
+
var _MessageManager_instances, _MessageManager_c, _MessageManager_LresolveFileId, _MessageManager_updatesToMessages, _MessageManager_constructReplyMarkup, _MessageManager_resolveSendAs, _MessageManager_constructReplyTo, _MessageManager_sendDocumentInner, _MessageManager_sendMedia, _MessageManager_resolveInputMediaInner, _MessageManager_resolveInputMedia, _MessageManager_sendReaction, _MessageManager_toggleJoinRequests;
|
|
32
32
|
import { contentType, unreachable } from "../0_deps.js";
|
|
33
33
|
import { InputError } from "../0_errors.js";
|
|
34
34
|
import { getLogger, getRandomId, toUnixTimestamp } from "../1_utilities.js";
|
|
35
35
|
import { as, functions, getChannelChatId, peerToChatId, types } from "../2_tl.js";
|
|
36
|
-
import { constructChatMemberUpdated, constructInviteLink, deserializeFileId } from "../3_types.js";
|
|
36
|
+
import { constructChatMemberUpdated, constructInviteLink, deserializeFileId, selfDestructOptionToInt } from "../3_types.js";
|
|
37
37
|
import { assertMessageType, chatMemberRightsToTlObject, constructChatMember, constructMessage as constructMessage_, deserializeInlineMessageId, FileType, messageEntityToTlObject, reactionEqual, reactionToTlObject, replyMarkupToTlObject } from "../3_types.js";
|
|
38
38
|
import { messageSearchFilterToTlObject } from "../types/0_message_search_filter.js";
|
|
39
39
|
import { parseHtml } from "./0_html.js";
|
|
40
40
|
import { parseMarkdown } from "./0_markdown.js";
|
|
41
41
|
import { checkMessageId } from "./0_utilities.js";
|
|
42
42
|
import { checkArray } from "./0_utilities.js";
|
|
43
|
-
import {
|
|
43
|
+
import { isHttpUrl } from "./0_utilities.js";
|
|
44
44
|
const FALLBACK_MIME_TYPE = "application/octet-stream";
|
|
45
45
|
const STICKER_MIME_TYPES = ["image/webp", "video/webm", "application/x-tgsticker"];
|
|
46
46
|
export class MessageManager {
|
|
@@ -438,23 +438,32 @@ export class MessageManager {
|
|
|
438
438
|
async sendPhoto(chatId, photo, params) {
|
|
439
439
|
let media = null;
|
|
440
440
|
const spoiler = params?.hasSpoiler ? true : undefined;
|
|
441
|
+
const ttl_seconds = params && "selfDestruct" in params && params.selfDestruct !== undefined ? selfDestructOptionToInt(params.selfDestruct) : undefined;
|
|
441
442
|
if (typeof photo === "string") {
|
|
442
443
|
const fileId = this.resolveFileId(photo, [FileType.Photo, FileType.ProfilePhoto]);
|
|
443
444
|
if (fileId != null) {
|
|
444
445
|
media = new types.InputMediaPhoto({
|
|
445
446
|
id: new types.InputPhoto(fileId),
|
|
446
447
|
spoiler,
|
|
448
|
+
ttl_seconds,
|
|
447
449
|
});
|
|
448
450
|
}
|
|
449
451
|
}
|
|
450
452
|
if (media == null) {
|
|
451
453
|
if (typeof photo === "string" && isHttpUrl(photo)) {
|
|
452
|
-
media = new types.InputMediaPhotoExternal({
|
|
454
|
+
media = new types.InputMediaPhotoExternal({
|
|
455
|
+
url: photo,
|
|
456
|
+
spoiler,
|
|
457
|
+
ttl_seconds: (params && "selfDestruct" in params && params.selfDestruct !== undefined) ? selfDestructOptionToInt(params.selfDestruct) : undefined,
|
|
458
|
+
});
|
|
453
459
|
}
|
|
454
460
|
else {
|
|
455
|
-
const
|
|
456
|
-
|
|
457
|
-
|
|
461
|
+
const file = await __classPrivateFieldGet(this, _MessageManager_c, "f").fileManager.upload(photo, params, null, false);
|
|
462
|
+
media = new types.InputMediaUploadedPhoto({
|
|
463
|
+
file,
|
|
464
|
+
spoiler,
|
|
465
|
+
ttl_seconds: (params && "selfDestruct" in params && params.selfDestruct !== undefined) ? selfDestructOptionToInt(params.selfDestruct) : undefined,
|
|
466
|
+
});
|
|
458
467
|
}
|
|
459
468
|
}
|
|
460
469
|
const message = await __classPrivateFieldGet(this, _MessageManager_instances, "m", _MessageManager_sendMedia).call(this, chatId, media, params);
|
|
@@ -597,6 +606,32 @@ export class MessageManager {
|
|
|
597
606
|
reply_markup: await __classPrivateFieldGet(this, _MessageManager_instances, "m", _MessageManager_constructReplyMarkup).call(this, params),
|
|
598
607
|
});
|
|
599
608
|
}
|
|
609
|
+
async editMessageMedia(chatId, messageId, media, params) {
|
|
610
|
+
const message = await this.getMessage(chatId, messageId);
|
|
611
|
+
if (!message) {
|
|
612
|
+
throw new InputError("Message not found.");
|
|
613
|
+
}
|
|
614
|
+
if (!("animation" in message) && !("audio" in message) && !("document" in message) && !("photo" in message) && !("video" in message)) {
|
|
615
|
+
throw new InputError("Unexpected message type.");
|
|
616
|
+
}
|
|
617
|
+
const result = await __classPrivateFieldGet(this, _MessageManager_c, "f").api.messages.editMessage({
|
|
618
|
+
peer: await __classPrivateFieldGet(this, _MessageManager_c, "f").getInputPeer(chatId),
|
|
619
|
+
id: messageId,
|
|
620
|
+
media: await __classPrivateFieldGet(this, _MessageManager_instances, "m", _MessageManager_resolveInputMedia).call(this, media),
|
|
621
|
+
reply_markup: await __classPrivateFieldGet(this, _MessageManager_instances, "m", _MessageManager_constructReplyMarkup).call(this, params),
|
|
622
|
+
});
|
|
623
|
+
const message_ = await __classPrivateFieldGet(this, _MessageManager_instances, "m", _MessageManager_updatesToMessages).call(this, chatId, result).then((v) => v[0]);
|
|
624
|
+
return message_;
|
|
625
|
+
}
|
|
626
|
+
async editInlineMessageMedia(inlineMessageId, media, params) {
|
|
627
|
+
await __classPrivateFieldGet(this, _MessageManager_c, "f").storage.assertBot("editInlineMessageMedia");
|
|
628
|
+
const id = deserializeInlineMessageId(inlineMessageId);
|
|
629
|
+
await __classPrivateFieldGet(this, _MessageManager_c, "f").api.messages.editInlineBotMessage({
|
|
630
|
+
id,
|
|
631
|
+
media: await __classPrivateFieldGet(this, _MessageManager_instances, "m", _MessageManager_resolveInputMedia).call(this, media),
|
|
632
|
+
reply_markup: await __classPrivateFieldGet(this, _MessageManager_instances, "m", _MessageManager_constructReplyMarkup).call(this, params),
|
|
633
|
+
});
|
|
634
|
+
}
|
|
600
635
|
async deleteMessages(chatId, messageIds, params) {
|
|
601
636
|
checkArray(messageIds, checkMessageId);
|
|
602
637
|
const peer = await __classPrivateFieldGet(this, _MessageManager_c, "f").getInputPeer(chatId);
|
|
@@ -810,8 +845,7 @@ export class MessageManager {
|
|
|
810
845
|
if (!(peer instanceof types.InputPeerChannel) && !(peer instanceof types.InputPeerChat)) {
|
|
811
846
|
unreachable();
|
|
812
847
|
}
|
|
813
|
-
const
|
|
814
|
-
const file = await __classPrivateFieldGet(this, _MessageManager_c, "f").fileManager.upload(contents, { fileName: params?.fileName ?? fileName, chunkSize: params?.chunkSize, signal: params?.signal });
|
|
848
|
+
const file = await __classPrivateFieldGet(this, _MessageManager_c, "f").fileManager.upload(photo, params);
|
|
815
849
|
const photo_ = new types.InputChatUploadedPhoto({ file });
|
|
816
850
|
if (peer instanceof types.InputPeerChannel) {
|
|
817
851
|
await __classPrivateFieldGet(this, _MessageManager_c, "f").api.channels.editPhoto({ channel: new types.InputChannel(peer), photo: photo_ });
|
|
@@ -1164,6 +1198,7 @@ _MessageManager_c = new WeakMap(), _MessageManager_LresolveFileId = new WeakMap(
|
|
|
1164
1198
|
}, _MessageManager_sendDocumentInner = async function _MessageManager_sendDocumentInner(chatId, document, params, fileType, otherAttribs, urlSupported = false, expectedMimeTypes) {
|
|
1165
1199
|
let media = null;
|
|
1166
1200
|
const spoiler = params?.hasSpoiler ? true : undefined;
|
|
1201
|
+
const ttl_seconds = params && "selfDestruct" in params && typeof params.selfDestruct !== undefined ? selfDestructOptionToInt(params.selfDestruct) : undefined;
|
|
1167
1202
|
if (typeof document === "string") {
|
|
1168
1203
|
const fileId = this.resolveFileId(document, fileType);
|
|
1169
1204
|
if (fileId != null) {
|
|
@@ -1171,6 +1206,7 @@ _MessageManager_c = new WeakMap(), _MessageManager_LresolveFileId = new WeakMap(
|
|
|
1171
1206
|
id: new types.InputDocument(fileId),
|
|
1172
1207
|
spoiler,
|
|
1173
1208
|
query: otherAttribs.find((v) => v instanceof types.DocumentAttributeSticker)?.alt || undefined,
|
|
1209
|
+
ttl_seconds,
|
|
1174
1210
|
});
|
|
1175
1211
|
}
|
|
1176
1212
|
}
|
|
@@ -1179,31 +1215,32 @@ _MessageManager_c = new WeakMap(), _MessageManager_LresolveFileId = new WeakMap(
|
|
|
1179
1215
|
if (!urlSupported) {
|
|
1180
1216
|
throw new InputError("URL not supported.");
|
|
1181
1217
|
}
|
|
1182
|
-
media = new types.InputMediaDocumentExternal({ url: document, spoiler });
|
|
1218
|
+
media = new types.InputMediaDocumentExternal({ url: document, spoiler, ttl_seconds });
|
|
1183
1219
|
}
|
|
1184
1220
|
else {
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1221
|
+
let mimeType;
|
|
1222
|
+
const file = await __classPrivateFieldGet(this, _MessageManager_c, "f").fileManager.upload(document, params, (name) => {
|
|
1223
|
+
mimeType = params?.mimeType ?? contentType(name.split(".").slice(-1)[0]) ?? FALLBACK_MIME_TYPE;
|
|
1224
|
+
if (expectedMimeTypes && !expectedMimeTypes.includes(mimeType)) {
|
|
1225
|
+
unreachable();
|
|
1226
|
+
}
|
|
1227
|
+
if (name.endsWith(".tgs") && fileType == FileType.Document) {
|
|
1228
|
+
name += "-";
|
|
1229
|
+
}
|
|
1230
|
+
return name;
|
|
1231
|
+
});
|
|
1195
1232
|
let thumb = undefined;
|
|
1196
1233
|
if (params?.thumbnail) {
|
|
1197
|
-
|
|
1198
|
-
thumb = await __classPrivateFieldGet(this, _MessageManager_c, "f").fileManager.upload(thumbContents, { fileName: fileName__, chunkSize: params?.chunkSize, signal: params?.signal });
|
|
1234
|
+
thumb = await __classPrivateFieldGet(this, _MessageManager_c, "f").fileManager.upload(params.thumbnail, { chunkSize: params?.chunkSize, signal: params?.signal });
|
|
1199
1235
|
}
|
|
1200
1236
|
media = new types.InputMediaUploadedDocument({
|
|
1201
1237
|
file,
|
|
1202
1238
|
thumb,
|
|
1203
1239
|
spoiler,
|
|
1204
|
-
attributes: [new types.DocumentAttributeFilename({ file_name:
|
|
1240
|
+
attributes: [new types.DocumentAttributeFilename({ file_name: file.name }), ...otherAttribs],
|
|
1205
1241
|
mime_type: mimeType,
|
|
1206
1242
|
force_file: fileType == FileType.Document ? true : undefined,
|
|
1243
|
+
ttl_seconds,
|
|
1207
1244
|
});
|
|
1208
1245
|
}
|
|
1209
1246
|
}
|
|
@@ -1233,6 +1270,112 @@ _MessageManager_c = new WeakMap(), _MessageManager_LresolveFileId = new WeakMap(
|
|
|
1233
1270
|
entities: captionEntities,
|
|
1234
1271
|
}), params?.businessConnectionId);
|
|
1235
1272
|
return await __classPrivateFieldGet(this, _MessageManager_instances, "m", _MessageManager_updatesToMessages).call(this, chatId, result, params?.businessConnectionId).then((v) => v[0]);
|
|
1273
|
+
}, _MessageManager_resolveInputMediaInner = async function _MessageManager_resolveInputMediaInner(document, media, fileType, otherAttribs) {
|
|
1274
|
+
let media_ = null;
|
|
1275
|
+
const spoiler = "hasSpoiler" in media && media.hasSpoiler ? true : undefined;
|
|
1276
|
+
if (typeof document === "string") {
|
|
1277
|
+
const fileId = this.resolveFileId(document, fileType);
|
|
1278
|
+
if (fileId != null) {
|
|
1279
|
+
media_ = new types.InputMediaDocument({
|
|
1280
|
+
id: new types.InputDocument(fileId),
|
|
1281
|
+
spoiler,
|
|
1282
|
+
query: otherAttribs.find((v) => v instanceof types.DocumentAttributeSticker)?.alt || undefined,
|
|
1283
|
+
});
|
|
1284
|
+
}
|
|
1285
|
+
}
|
|
1286
|
+
if (media_ == null) {
|
|
1287
|
+
if (typeof document === "string" && isHttpUrl(document)) {
|
|
1288
|
+
media_ = new types.InputMediaDocumentExternal({ url: document, spoiler });
|
|
1289
|
+
}
|
|
1290
|
+
else {
|
|
1291
|
+
let mimeType;
|
|
1292
|
+
const file = await __classPrivateFieldGet(this, _MessageManager_c, "f").fileManager.upload(document, media, (name) => {
|
|
1293
|
+
mimeType = media?.mimeType ?? contentType(name.split(".").slice(-1)[0]) ?? FALLBACK_MIME_TYPE;
|
|
1294
|
+
if (name.endsWith(".tgs") && fileType == FileType.Document) {
|
|
1295
|
+
name += "-";
|
|
1296
|
+
}
|
|
1297
|
+
return name;
|
|
1298
|
+
});
|
|
1299
|
+
let thumb = undefined;
|
|
1300
|
+
if ("thumbnail" in media && media.thumbnail) {
|
|
1301
|
+
thumb = await __classPrivateFieldGet(this, _MessageManager_c, "f").fileManager.upload(media.thumbnail, { chunkSize: media?.chunkSize, signal: media?.signal });
|
|
1302
|
+
}
|
|
1303
|
+
media_ = new types.InputMediaUploadedDocument({
|
|
1304
|
+
file,
|
|
1305
|
+
thumb,
|
|
1306
|
+
spoiler,
|
|
1307
|
+
attributes: [new types.DocumentAttributeFilename({ file_name: file.name }), ...otherAttribs],
|
|
1308
|
+
mime_type: mimeType,
|
|
1309
|
+
force_file: fileType == FileType.Document ? true : undefined,
|
|
1310
|
+
});
|
|
1311
|
+
}
|
|
1312
|
+
}
|
|
1313
|
+
return media_;
|
|
1314
|
+
}, _MessageManager_resolveInputMedia = async function _MessageManager_resolveInputMedia(media) {
|
|
1315
|
+
if ("animation" in media) {
|
|
1316
|
+
return await __classPrivateFieldGet(this, _MessageManager_instances, "m", _MessageManager_resolveInputMediaInner).call(this, media.animation, media, FileType.Animation, [
|
|
1317
|
+
new types.DocumentAttributeAnimated(),
|
|
1318
|
+
new types.DocumentAttributeVideo({
|
|
1319
|
+
supports_streaming: true,
|
|
1320
|
+
w: media?.width ?? 0,
|
|
1321
|
+
h: media?.height ?? 0,
|
|
1322
|
+
duration: media?.duration ?? 0,
|
|
1323
|
+
}),
|
|
1324
|
+
]);
|
|
1325
|
+
}
|
|
1326
|
+
else if ("audio" in media) {
|
|
1327
|
+
return await __classPrivateFieldGet(this, _MessageManager_instances, "m", _MessageManager_resolveInputMediaInner).call(this, media.audio, media, FileType.Audio, [
|
|
1328
|
+
new types.DocumentAttributeAudio({
|
|
1329
|
+
duration: media?.duration ?? 0,
|
|
1330
|
+
performer: media?.performer,
|
|
1331
|
+
title: media?.title,
|
|
1332
|
+
}),
|
|
1333
|
+
]);
|
|
1334
|
+
}
|
|
1335
|
+
else if ("document" in media) {
|
|
1336
|
+
return await __classPrivateFieldGet(this, _MessageManager_instances, "m", _MessageManager_resolveInputMediaInner).call(this, media.document, media, FileType.Document, []);
|
|
1337
|
+
}
|
|
1338
|
+
else if ("photo" in media) {
|
|
1339
|
+
let media_ = null;
|
|
1340
|
+
const spoiler = media.hasSpoiler ? true : undefined;
|
|
1341
|
+
const ttl_seconds = "selfDestruct" in media && media.selfDestruct !== undefined ? selfDestructOptionToInt(media.selfDestruct) : undefined;
|
|
1342
|
+
if (typeof media.photo === "string") {
|
|
1343
|
+
const fileId = this.resolveFileId(media.photo, [FileType.Photo, FileType.ProfilePhoto]);
|
|
1344
|
+
if (fileId != null) {
|
|
1345
|
+
media_ = new types.InputMediaPhoto({
|
|
1346
|
+
id: new types.InputPhoto(fileId),
|
|
1347
|
+
spoiler,
|
|
1348
|
+
ttl_seconds,
|
|
1349
|
+
});
|
|
1350
|
+
}
|
|
1351
|
+
}
|
|
1352
|
+
if (media_ == null) {
|
|
1353
|
+
if (typeof media.photo === "string" && isHttpUrl(media.photo)) {
|
|
1354
|
+
media_ = new types.InputMediaPhotoExternal({ url: media.photo, spoiler });
|
|
1355
|
+
}
|
|
1356
|
+
else {
|
|
1357
|
+
const file = await __classPrivateFieldGet(this, _MessageManager_c, "f").fileManager.upload(media.photo, media, null, false);
|
|
1358
|
+
media_ = new types.InputMediaUploadedPhoto({ file, spoiler, ttl_seconds });
|
|
1359
|
+
}
|
|
1360
|
+
}
|
|
1361
|
+
return media_;
|
|
1362
|
+
}
|
|
1363
|
+
else if ("video" in media) {
|
|
1364
|
+
const ttl_seconds = "selfDestruct" in media && media.selfDestruct !== undefined ? selfDestructOptionToInt(media.selfDestruct) : undefined;
|
|
1365
|
+
const media_ = await __classPrivateFieldGet(this, _MessageManager_instances, "m", _MessageManager_resolveInputMediaInner).call(this, media.video, media, FileType.Video, [
|
|
1366
|
+
new types.DocumentAttributeVideo({
|
|
1367
|
+
supports_streaming: media?.supportsStreaming ? true : undefined,
|
|
1368
|
+
w: media?.width ?? 0,
|
|
1369
|
+
h: media?.height ?? 0,
|
|
1370
|
+
duration: media?.duration ?? 0,
|
|
1371
|
+
}),
|
|
1372
|
+
]);
|
|
1373
|
+
media_.ttl_seconds = ttl_seconds;
|
|
1374
|
+
return media_;
|
|
1375
|
+
}
|
|
1376
|
+
else {
|
|
1377
|
+
unreachable();
|
|
1378
|
+
}
|
|
1236
1379
|
}, _MessageManager_sendReaction = async function _MessageManager_sendReaction(chatId, messageId, reactions, params) {
|
|
1237
1380
|
await __classPrivateFieldGet(this, _MessageManager_c, "f").api.messages.sendReaction({
|
|
1238
1381
|
peer: await __classPrivateFieldGet(this, _MessageManager_c, "f").getInputPeer(chatId),
|
|
@@ -34,7 +34,7 @@ import { InputError } from "../0_errors.js";
|
|
|
34
34
|
import { getRandomId } from "../1_utilities.js";
|
|
35
35
|
import { as, inputPeerToPeer, peerToChatId, types } from "../2_tl.js";
|
|
36
36
|
import { constructStory, FileType, storyInteractiveAreaToTlObject, storyPrivacyToTlObject } from "../3_types.js";
|
|
37
|
-
import { checkArray, checkStoryId,
|
|
37
|
+
import { checkArray, checkStoryId, isHttpUrl } from "./0_utilities.js";
|
|
38
38
|
export class StoryManager {
|
|
39
39
|
constructor(c) {
|
|
40
40
|
_StoryManager_instances.add(this);
|
|
@@ -58,14 +58,12 @@ export class StoryManager {
|
|
|
58
58
|
throw new InputError("URL not supported.");
|
|
59
59
|
}
|
|
60
60
|
else {
|
|
61
|
-
const
|
|
62
|
-
const
|
|
63
|
-
const mimeType = contentType(fileName.split(".").slice(-1)[0]) ?? "application/octet-stream";
|
|
64
|
-
const file = await __classPrivateFieldGet(this, _StoryManager_c, "f").fileManager.upload(contents, { fileName, chunkSize: params?.chunkSize, signal: params?.signal });
|
|
61
|
+
const file = await __classPrivateFieldGet(this, _StoryManager_c, "f").fileManager.upload(source, params, null, "video" in content);
|
|
62
|
+
const mimeType = contentType(file.name.split(".").slice(-1)[0]) ?? "application/octet-stream";
|
|
65
63
|
if ("video" in content) {
|
|
66
64
|
media = new types.InputMediaUploadedDocument({
|
|
67
65
|
file,
|
|
68
|
-
attributes: [new types.DocumentAttributeFilename({ file_name:
|
|
66
|
+
attributes: [new types.DocumentAttributeFilename({ file_name: file.name }), new types.DocumentAttributeVideo({ w: 720, h: 1280, duration: content.duration })],
|
|
69
67
|
mime_type: mimeType,
|
|
70
68
|
});
|
|
71
69
|
}
|
package/esm/client/4_client.d.ts
CHANGED
|
@@ -21,9 +21,9 @@ import { MaybePromise } from "../1_utilities.js";
|
|
|
21
21
|
import { enums, functions, types } from "../2_tl.js";
|
|
22
22
|
import { Storage } from "../3_storage.js";
|
|
23
23
|
import { DC } from "../3_transport.js";
|
|
24
|
-
import { BotCommand, BusinessConnection, Chat, ChatAction, ChatMember, ChatP, FileSource, ID, InactiveChat, InlineQueryResult, InputStoryContent, InviteLink, Message, MessageAnimation, MessageAudio, MessageContact, MessageDice, MessageDocument, MessageLocation, MessagePhoto, MessagePoll, MessageSticker, MessageText, MessageVenue, MessageVideo, MessageVideoNote, MessageVoice, NetworkStatistics, ParseMode, Poll, Reaction, Sticker, Story, Update, User } from "../3_types.js";
|
|
24
|
+
import { BotCommand, BusinessConnection, Chat, ChatAction, ChatMember, ChatP, FileSource, ID, InactiveChat, InlineQueryResult, InputMedia, InputStoryContent, InviteLink, Message, MessageAnimation, MessageAudio, MessageContact, MessageDice, MessageDocument, MessageLocation, MessagePhoto, MessagePoll, MessageSticker, MessageText, MessageVenue, MessageVideo, MessageVideoNote, MessageVoice, NetworkStatistics, ParseMode, Poll, Reaction, Sticker, Story, Update, User } from "../3_types.js";
|
|
25
25
|
import { Migrate } from "../4_errors.js";
|
|
26
|
-
import { AddReactionParams, AnswerCallbackQueryParams, AnswerInlineQueryParams, AuthorizeUserParams, BanChatMemberParams, CreateInviteLinkParams, CreateStoryParams, DeleteMessageParams, DeleteMessagesParams, DownloadParams, EditMessageLiveLocationParams, EditMessageParams, EditMessageReplyMarkupParams, ForwardMessagesParams, GetChatsParams, GetCreatedInviteLinksParams, GetHistoryParams, GetMyCommandsParams, PinMessageParams, ReplyParams, SearchMessagesParams, SendAnimationParams, SendAudioParams, SendContactParams, SendDiceParams, SendDocumentParams, SendLocationParams, SendMessageParams, SendPhotoParams, SendPollParams, SendStickerParams, SendVenueParams, SendVideoNoteParams, SendVideoParams, SendVoiceParams, SetChatMemberRightsParams, SetChatPhotoParams, SetMyCommandsParams, SetReactionsParams, StopPollParams } from "./0_params.js";
|
|
26
|
+
import { AddReactionParams, AnswerCallbackQueryParams, AnswerInlineQueryParams, AuthorizeUserParams, BanChatMemberParams, CreateInviteLinkParams, CreateStoryParams, DeleteMessageParams, DeleteMessagesParams, DownloadParams, EditMessageLiveLocationParams, EditMessageMediaParams, EditMessageParams, EditMessageReplyMarkupParams, ForwardMessagesParams, GetChatsParams, GetCreatedInviteLinksParams, GetHistoryParams, GetMyCommandsParams, PinMessageParams, ReplyParams, SearchMessagesParams, SendAnimationParams, SendAudioParams, SendContactParams, SendDiceParams, SendDocumentParams, SendLocationParams, SendMessageParams, SendPhotoParams, SendPollParams, SendStickerParams, SendVenueParams, SendVideoNoteParams, SendVideoParams, SendVoiceParams, SetChatMemberRightsParams, SetChatPhotoParams, SetMyCommandsParams, SetReactionsParams, StopPollParams } from "./0_params.js";
|
|
27
27
|
import { Api } from "./0_types.js";
|
|
28
28
|
import { ClientPlainParams } from "./1_client_plain.js";
|
|
29
29
|
import { Composer as Composer_, NextFunction } from "./1_composer.js";
|
|
@@ -498,6 +498,24 @@ export declare class Client<C extends Context = Context> extends Composer<C> {
|
|
|
498
498
|
* @returns The edited text message.
|
|
499
499
|
*/
|
|
500
500
|
editMessageText(chatId: ID, messageId: number, text: string, params?: EditMessageParams): Promise<MessageText>;
|
|
501
|
+
/**
|
|
502
|
+
* Edit a message's media.
|
|
503
|
+
*
|
|
504
|
+
* @method ms
|
|
505
|
+
* @param chatId The identifier of the chat that contains the message.
|
|
506
|
+
* @param messageId The message's identifier.
|
|
507
|
+
* @param media The new media of the message.
|
|
508
|
+
* @returns The edited message.
|
|
509
|
+
*/
|
|
510
|
+
editMessageMedia(chatId: ID, messageId: number, media: InputMedia, params?: EditMessageMediaParams): Promise<Message>;
|
|
511
|
+
/**
|
|
512
|
+
* Edit an inline message's media.
|
|
513
|
+
*
|
|
514
|
+
* @method ms
|
|
515
|
+
* @param inlineMessageId The inline message's identifier.
|
|
516
|
+
* @param media The new media of the message.
|
|
517
|
+
*/
|
|
518
|
+
editInlineMessageMedia(inlineMessageId: string, media: InputMedia, params?: EditMessageMediaParams): Promise<void>;
|
|
501
519
|
/**
|
|
502
520
|
* Edit an inline message's text. Bot-only.
|
|
503
521
|
*
|
package/esm/client/4_client.js
CHANGED
|
@@ -28,10 +28,10 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
28
28
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
29
29
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
30
30
|
};
|
|
31
|
-
var _Client_instances, _Client_client, _Client_guaranteeUpdateDelivery, _Client_updateManager, _Client_networkStatisticsManager, _Client_botInfoManager, _Client_fileManager, _Client_reactionManager, _Client_businessConnectionManager, _Client_messageManager, _Client_storyManager, _Client_callbackQueryManager, _Client_inlineQueryManager, _Client_chatListManager, _Client_accountManager, _Client_parseMode, _Client_publicKeys, _Client_ignoreOutgoing, _Client_storeMessages, _Client_Lauthorize, _Client_LpingLoop, _Client_LhandleMigrationError, _Client_L$initConncetion, _Client_namespaceProxies, _Client_getApiId, _Client_constructContext, _Client_propagateConnectionState, _Client_lastPropagatedConnectionState, _Client_stateChangeHandler, _Client_storageInited, _Client_initStorage, _Client_connectionInited, _Client_lastPropagatedAuthorizationState, _Client_propagateAuthorizationState, _Client_getSelfId, _Client_pingLoopStarted, _Client_pingLoopAbortController, _Client_pingInterval, _Client_lastUpdates, _Client_startPingLoop, _Client_pingLoop, _Client_invoke, _Client_handleInvokeError, _Client_getUserAccessHash, _Client_getChannelAccessHash, _Client_getInputPeerInner, _Client_handleCtxUpdate, _Client_queueHandleCtxUpdate, _Client_handleUpdate, _Client_lastGetMe, _Client_getMe;
|
|
31
|
+
var _Client_instances, _a, _Client_client, _Client_guaranteeUpdateDelivery, _Client_updateManager, _Client_networkStatisticsManager, _Client_botInfoManager, _Client_fileManager, _Client_reactionManager, _Client_businessConnectionManager, _Client_messageManager, _Client_storyManager, _Client_callbackQueryManager, _Client_inlineQueryManager, _Client_chatListManager, _Client_accountManager, _Client_parseMode, _Client_publicKeys, _Client_ignoreOutgoing, _Client_storeMessages, _Client_Lauthorize, _Client_LpingLoop, _Client_LhandleMigrationError, _Client_L$initConncetion, _Client_namespaceProxies, _Client_getApiId, _Client_getCdnConnectionPool, _Client_getCdnConnection, _Client_constructContext, _Client_propagateConnectionState, _Client_lastPropagatedConnectionState, _Client_stateChangeHandler, _Client_storageInited, _Client_initStorage, _Client_connectionInited, _Client_lastPropagatedAuthorizationState, _Client_propagateAuthorizationState, _Client_getSelfId, _Client_pingLoopStarted, _Client_pingLoopAbortController, _Client_pingInterval, _Client_lastUpdates, _Client_startPingLoop, _Client_pingLoop, _Client_invoke, _Client_handleInvokeError, _Client_getUserAccessHash, _Client_getChannelAccessHash, _Client_getInputPeerInner, _Client_handleCtxUpdate, _Client_queueHandleCtxUpdate, _Client_handleUpdate, _Client_lastGetMe, _Client_getMe;
|
|
32
32
|
import { unreachable } from "../0_deps.js";
|
|
33
33
|
import { AccessError, InputError } from "../0_errors.js";
|
|
34
|
-
import { cleanObject, drop, getLogger, getRandomId, mustPrompt, mustPromptOneOf, ZERO_CHANNEL_ID } from "../1_utilities.js";
|
|
34
|
+
import { cleanObject, drop, getLogger, getRandomId, minute, mustPrompt, mustPromptOneOf, second, ZERO_CHANNEL_ID } from "../1_utilities.js";
|
|
35
35
|
import { as, chatIdToPeerId, functions, getChatIdPeerType, name, peerToChatId, types } from "../2_tl.js";
|
|
36
36
|
import { StorageMemory } from "../3_storage.js";
|
|
37
37
|
import { constructUser } from "../3_types.js";
|
|
@@ -575,7 +575,7 @@ export class Client extends Composer {
|
|
|
575
575
|
_Client_lastPropagatedAuthorizationState.set(this, null);
|
|
576
576
|
_Client_pingLoopStarted.set(this, false);
|
|
577
577
|
_Client_pingLoopAbortController.set(this, null);
|
|
578
|
-
_Client_pingInterval.set(this,
|
|
578
|
+
_Client_pingInterval.set(this, 1 * minute);
|
|
579
579
|
_Client_lastUpdates.set(this, new Date());
|
|
580
580
|
_Client_handleInvokeError.set(this, skipInvoke());
|
|
581
581
|
/**
|
|
@@ -685,48 +685,8 @@ export class Client extends Composer {
|
|
|
685
685
|
getEntity: this[getEntity].bind(this),
|
|
686
686
|
handleUpdate: __classPrivateFieldGet(this, _Client_instances, "m", _Client_queueHandleCtxUpdate).bind(this),
|
|
687
687
|
parseMode: __classPrivateFieldGet(this, _Client_parseMode, "f"),
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
transportProvider: __classPrivateFieldGet(this, _Client_client, "f").transportProvider,
|
|
691
|
-
appVersion: this.appVersion,
|
|
692
|
-
deviceModel: this.deviceModel,
|
|
693
|
-
langCode: this.langCode,
|
|
694
|
-
langPack: this.langPack,
|
|
695
|
-
systemLangCode: this.systemLangCode,
|
|
696
|
-
systemVersion: this.systemVersion,
|
|
697
|
-
cdn: true,
|
|
698
|
-
});
|
|
699
|
-
__classPrivateFieldGet(client, _Client_client, "f").serverSalt = __classPrivateFieldGet(this, _Client_client, "f").serverSalt;
|
|
700
|
-
client.invoke.use(async (ctx, next) => {
|
|
701
|
-
if (ctx.error instanceof AuthKeyUnregistered && dcId) {
|
|
702
|
-
try {
|
|
703
|
-
const exportedAuth = await this.api.auth.exportAuthorization({ dc_id: dcId });
|
|
704
|
-
await client.api.auth.importAuthorization(exportedAuth);
|
|
705
|
-
return true;
|
|
706
|
-
}
|
|
707
|
-
catch (err) {
|
|
708
|
-
throw err;
|
|
709
|
-
}
|
|
710
|
-
}
|
|
711
|
-
else {
|
|
712
|
-
return await next();
|
|
713
|
-
}
|
|
714
|
-
});
|
|
715
|
-
return {
|
|
716
|
-
api: client.api,
|
|
717
|
-
connect: async () => {
|
|
718
|
-
await client.connect();
|
|
719
|
-
if (dcId && dcId != __classPrivateFieldGet(this, _Client_client, "f").dcId) {
|
|
720
|
-
let dc = String(dcId);
|
|
721
|
-
if (__classPrivateFieldGet(this, _Client_client, "f").dcId < 0) {
|
|
722
|
-
dc += "-test";
|
|
723
|
-
}
|
|
724
|
-
await client.setDc(dc);
|
|
725
|
-
}
|
|
726
|
-
},
|
|
727
|
-
disconnect: client.disconnect.bind(client),
|
|
728
|
-
};
|
|
729
|
-
},
|
|
688
|
+
getCdnConnection: __classPrivateFieldGet(this, _Client_instances, "m", _Client_getCdnConnection).bind(this),
|
|
689
|
+
getCdnConnectionPool: __classPrivateFieldGet(this, _Client_instances, "m", _Client_getCdnConnectionPool).bind(this),
|
|
730
690
|
cdn: params?.cdn ?? false,
|
|
731
691
|
ignoreOutgoing: __classPrivateFieldGet(this, _Client_ignoreOutgoing, "f"),
|
|
732
692
|
dropPendingUpdates: params?.dropPendingUpdates,
|
|
@@ -770,7 +730,7 @@ export class Client extends Composer {
|
|
|
770
730
|
catch (err) {
|
|
771
731
|
L.debug(`failed to reconnect, retrying in ${delay}:`, err);
|
|
772
732
|
}
|
|
773
|
-
await new Promise((r) => setTimeout(r, delay *
|
|
733
|
+
await new Promise((r) => setTimeout(r, delay * second));
|
|
774
734
|
if (delay < 15) {
|
|
775
735
|
delay += 5;
|
|
776
736
|
}
|
|
@@ -857,6 +817,72 @@ export class Client extends Composer {
|
|
|
857
817
|
throw new Error("apiId not set");
|
|
858
818
|
}
|
|
859
819
|
return apiId;
|
|
820
|
+
}, _Client_getCdnConnectionPool = function _Client_getCdnConnectionPool(connectionCount, dcId) {
|
|
821
|
+
const connections = new Array();
|
|
822
|
+
for (let i = 0; i < connectionCount; ++i) {
|
|
823
|
+
connections.push(__classPrivateFieldGet(this, _Client_instances, "m", _Client_getCdnConnection).call(this, dcId));
|
|
824
|
+
}
|
|
825
|
+
let prev = 0;
|
|
826
|
+
return {
|
|
827
|
+
size: connectionCount,
|
|
828
|
+
api: () => {
|
|
829
|
+
if (prev + 1 > connections.length)
|
|
830
|
+
prev = 0;
|
|
831
|
+
const connection = connections[prev++];
|
|
832
|
+
return connection.api;
|
|
833
|
+
},
|
|
834
|
+
connect: async () => {
|
|
835
|
+
for await (const connection of connections) {
|
|
836
|
+
await connection.connect();
|
|
837
|
+
}
|
|
838
|
+
},
|
|
839
|
+
disconnect: async () => {
|
|
840
|
+
for await (const connection of connections) {
|
|
841
|
+
await connection.disconnect();
|
|
842
|
+
}
|
|
843
|
+
},
|
|
844
|
+
};
|
|
845
|
+
}, _Client_getCdnConnection = function _Client_getCdnConnection(dcId) {
|
|
846
|
+
const client = new _a((!dcId || dcId == __classPrivateFieldGet(this, _Client_client, "f").dcId) ? this.storage : this.storage.branch(`download_client_${dcId}`), this.apiId, this.apiHash, {
|
|
847
|
+
transportProvider: __classPrivateFieldGet(this, _Client_client, "f").transportProvider,
|
|
848
|
+
appVersion: this.appVersion,
|
|
849
|
+
deviceModel: this.deviceModel,
|
|
850
|
+
langCode: this.langCode,
|
|
851
|
+
langPack: this.langPack,
|
|
852
|
+
systemLangCode: this.systemLangCode,
|
|
853
|
+
systemVersion: this.systemVersion,
|
|
854
|
+
cdn: true,
|
|
855
|
+
});
|
|
856
|
+
__classPrivateFieldGet(client, _Client_client, "f").serverSalt = __classPrivateFieldGet(this, _Client_client, "f").serverSalt;
|
|
857
|
+
client.invoke.use(async (ctx, next) => {
|
|
858
|
+
if (ctx.error instanceof AuthKeyUnregistered && dcId) {
|
|
859
|
+
try {
|
|
860
|
+
const exportedAuth = await this.api.auth.exportAuthorization({ dc_id: dcId });
|
|
861
|
+
await client.api.auth.importAuthorization(exportedAuth);
|
|
862
|
+
return true;
|
|
863
|
+
}
|
|
864
|
+
catch (err) {
|
|
865
|
+
throw err;
|
|
866
|
+
}
|
|
867
|
+
}
|
|
868
|
+
else {
|
|
869
|
+
return await next();
|
|
870
|
+
}
|
|
871
|
+
});
|
|
872
|
+
return {
|
|
873
|
+
api: client.api,
|
|
874
|
+
connect: async () => {
|
|
875
|
+
await client.connect();
|
|
876
|
+
if (dcId && dcId != __classPrivateFieldGet(this, _Client_client, "f").dcId) {
|
|
877
|
+
let dc = String(dcId);
|
|
878
|
+
if (__classPrivateFieldGet(this, _Client_client, "f").dcId < 0) {
|
|
879
|
+
dc += "-test";
|
|
880
|
+
}
|
|
881
|
+
await client.setDc(dc);
|
|
882
|
+
}
|
|
883
|
+
},
|
|
884
|
+
disconnect: client.disconnect.bind(client),
|
|
885
|
+
};
|
|
860
886
|
}, _Client_propagateConnectionState = function _Client_propagateConnectionState(connectionState) {
|
|
861
887
|
__classPrivateFieldGet(this, _Client_instances, "m", _Client_queueHandleCtxUpdate).call(this, { connectionState });
|
|
862
888
|
__classPrivateFieldSet(this, _Client_lastPropagatedConnectionState, connectionState, "f");
|
|
@@ -1142,8 +1168,8 @@ export class Client extends Composer {
|
|
|
1142
1168
|
continue;
|
|
1143
1169
|
}
|
|
1144
1170
|
__classPrivateFieldGet(this, _Client_pingLoopAbortController, "f").signal.throwIfAborted();
|
|
1145
|
-
await this.api.ping_delay_disconnect({ ping_id: getRandomId(), disconnect_delay: __classPrivateFieldGet(this, _Client_pingInterval, "f") /
|
|
1146
|
-
if (Date.now() - __classPrivateFieldGet(this, _Client_lastUpdates, "f").getTime() >= 15 *
|
|
1171
|
+
await this.api.ping_delay_disconnect({ ping_id: getRandomId(), disconnect_delay: __classPrivateFieldGet(this, _Client_pingInterval, "f") / second + 15 });
|
|
1172
|
+
if (Date.now() - __classPrivateFieldGet(this, _Client_lastUpdates, "f").getTime() >= 15 * minute) {
|
|
1147
1173
|
drop(__classPrivateFieldGet(this, _Client_updateManager, "f").recoverUpdateGap("lastUpdates"));
|
|
1148
1174
|
}
|
|
1149
1175
|
}
|
|
@@ -1520,6 +1546,28 @@ export class Client extends Composer {
|
|
|
1520
1546
|
async editMessageText(chatId, messageId, text, params) {
|
|
1521
1547
|
return await __classPrivateFieldGet(this, _Client_messageManager, "f").editMessageText(chatId, messageId, text, params);
|
|
1522
1548
|
}
|
|
1549
|
+
/**
|
|
1550
|
+
* Edit a message's media.
|
|
1551
|
+
*
|
|
1552
|
+
* @method ms
|
|
1553
|
+
* @param chatId The identifier of the chat that contains the message.
|
|
1554
|
+
* @param messageId The message's identifier.
|
|
1555
|
+
* @param media The new media of the message.
|
|
1556
|
+
* @returns The edited message.
|
|
1557
|
+
*/
|
|
1558
|
+
async editMessageMedia(chatId, messageId, media, params) {
|
|
1559
|
+
return await __classPrivateFieldGet(this, _Client_messageManager, "f").editMessageMedia(chatId, messageId, media, params);
|
|
1560
|
+
}
|
|
1561
|
+
/**
|
|
1562
|
+
* Edit an inline message's media.
|
|
1563
|
+
*
|
|
1564
|
+
* @method ms
|
|
1565
|
+
* @param inlineMessageId The inline message's identifier.
|
|
1566
|
+
* @param media The new media of the message.
|
|
1567
|
+
*/
|
|
1568
|
+
async editInlineMessageMedia(inlineMessageId, media, params) {
|
|
1569
|
+
await __classPrivateFieldGet(this, _Client_messageManager, "f").editInlineMessageMedia(inlineMessageId, media, params);
|
|
1570
|
+
}
|
|
1523
1571
|
/**
|
|
1524
1572
|
* Edit an inline message's text. Bot-only.
|
|
1525
1573
|
*
|
|
@@ -2220,7 +2268,7 @@ export class Client extends Composer {
|
|
|
2220
2268
|
await __classPrivateFieldGet(this, _Client_messageManager, "f").unblockUser(userId);
|
|
2221
2269
|
}
|
|
2222
2270
|
}
|
|
2223
|
-
_Client_handleCtxUpdate = async function _Client_handleCtxUpdate(update) {
|
|
2271
|
+
_a = Client, _Client_handleCtxUpdate = async function _Client_handleCtxUpdate(update) {
|
|
2224
2272
|
await this.middleware()(await __classPrivateFieldGet(this, _Client_constructContext, "f").call(this, update), resolve);
|
|
2225
2273
|
}, _Client_queueHandleCtxUpdate = function _Client_queueHandleCtxUpdate(update) {
|
|
2226
2274
|
__classPrivateFieldGet(this, _Client_updateManager, "f").getHandleUpdateQueue(UpdateManager.MAIN_BOX_ID).add(async () => {
|
|
@@ -30,8 +30,8 @@ var _ConnectionWebSocket_instances, _ConnectionWebSocket_webSocket, _ConnectionW
|
|
|
30
30
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
31
31
|
*/
|
|
32
32
|
import * as dntShim from "../_dnt.shims.js";
|
|
33
|
-
import { unreachable } from "../0_deps.js";
|
|
34
|
-
import {
|
|
33
|
+
import { concat, unreachable } from "../0_deps.js";
|
|
34
|
+
import { getLogger, Mutex } from "../1_utilities.js";
|
|
35
35
|
import { ConnectionUnframed } from "./0_connection.js";
|
|
36
36
|
const L = getLogger("ConnectionWebSocket");
|
|
37
37
|
const errConnectionNotOpen = new Error("Connection not open");
|
|
@@ -136,7 +136,7 @@ _ConnectionWebSocket_webSocket = new WeakMap(), _ConnectionWebSocket_rMutex = ne
|
|
|
136
136
|
}
|
|
137
137
|
const unlock = await mutex.lock();
|
|
138
138
|
const data = new Uint8Array(await new Blob([e.data].map((v) => v instanceof Blob || v instanceof Uint8Array ? v : v instanceof ArrayBuffer ? v : unreachable())).arrayBuffer());
|
|
139
|
-
__classPrivateFieldSet(this, _ConnectionWebSocket_buffer, concat(__classPrivateFieldGet(this, _ConnectionWebSocket_buffer, "f"), data), "f");
|
|
139
|
+
__classPrivateFieldSet(this, _ConnectionWebSocket_buffer, concat([__classPrivateFieldGet(this, _ConnectionWebSocket_buffer, "f"), data]), "f");
|
|
140
140
|
if (__classPrivateFieldGet(this, _ConnectionWebSocket_nextResolve, "f") != null && __classPrivateFieldGet(this, _ConnectionWebSocket_buffer, "f").length >= __classPrivateFieldGet(this, _ConnectionWebSocket_nextResolve, "f")[0]) {
|
|
141
141
|
__classPrivateFieldGet(this, _ConnectionWebSocket_nextResolve, "f")[1].resolve();
|
|
142
142
|
__classPrivateFieldSet(this, _ConnectionWebSocket_nextResolve, null, "f");
|