@mtkruto/node 0.3.1 → 0.5.0
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 +1 -1
- package/esm/0_deps.js +1 -1
- package/esm/4_constants.d.ts +1 -1
- package/esm/4_constants.js +4 -4
- package/esm/client/0_params.d.ts +10 -3
- package/esm/client/0_params.d.ts.map +1 -1
- package/esm/client/0_password.js +2 -2
- package/esm/client/0_utilities.d.ts +4 -4
- package/esm/client/0_utilities.d.ts.map +1 -1
- package/esm/client/1_client_encrypted.d.ts.map +1 -1
- package/esm/client/2_update_manager.js +1 -1
- package/esm/client/3_message_manager.d.ts.map +1 -1
- package/esm/client/3_message_manager.js +16 -0
- package/esm/client/5_client.d.ts.map +1 -1
- package/esm/client/5_client.js +3 -3
- package/esm/deps/jsr.io/@std/assert/1.0.6/array_includes.js +1 -1
- package/esm/deps/jsr.io/@std/assert/1.0.6/equals.js +4 -4
- package/esm/deps/jsr.io/@std/assert/1.0.6/greater.js +1 -1
- package/esm/deps/jsr.io/@std/assert/1.0.6/greater_or_equal.js +1 -1
- package/esm/deps/jsr.io/@std/assert/1.0.6/is_error.js +1 -1
- package/esm/deps/jsr.io/@std/assert/1.0.6/less.js +1 -1
- package/esm/deps/jsr.io/@std/assert/1.0.6/less_or_equal.js +1 -1
- package/esm/deps/jsr.io/@std/assert/1.0.6/not_strict_equals.js +1 -1
- package/esm/deps/jsr.io/@std/assert/1.0.6/strict_equals.js +5 -5
- package/{script/deps/jsr.io/@std/internal/1.0.4 → esm/deps/jsr.io/@std/internal/1.0.5}/build_message.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/diff.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/diff_str.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/format.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/styles.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/types.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/io/{0.224.9 → 0.225.0}/_constants.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/io/{0.224.9 → 0.225.0}/_constants.js +1 -1
- package/esm/deps/jsr.io/@std/io/{0.224.9 → 0.225.0}/iterate_reader.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/io/{0.224.9 → 0.225.0}/types.d.ts.map +1 -1
- package/esm/tl/0_api.d.ts +199 -41
- package/esm/tl/0_api.d.ts.map +1 -1
- package/esm/tl/0_api.js +314 -75
- package/esm/transport/1_transport_abridged.d.ts.map +1 -1
- package/esm/transport/1_transport_intermediate.d.ts.map +1 -1
- package/esm/transport/2_transport_provider.js +4 -4
- package/esm/types/2_inline_keyboard_button.d.ts +9 -1
- package/esm/types/2_inline_keyboard_button.d.ts.map +1 -1
- package/esm/types/2_inline_keyboard_button.js +6 -0
- package/esm/types/2_invite_link.d.ts +5 -1
- package/esm/types/2_invite_link.d.ts.map +1 -1
- package/esm/types/2_invite_link.js +2 -0
- package/esm/utilities/0_cache_map.d.ts.map +1 -1
- package/esm/utilities/0_units.js +3 -3
- package/esm/utilities/2_queue.d.ts.map +1 -1
- package/package.json +1 -1
- package/script/0_deps.d.ts +1 -1
- package/script/0_deps.js +3 -3
- package/script/4_constants.d.ts +1 -1
- package/script/4_constants.js +4 -4
- package/script/4_errors.js +2 -2
- package/script/client/0_filters.js +1 -2
- package/script/client/0_html.js +1 -2
- package/script/client/0_markdown.js +2 -2
- package/script/client/0_message.js +5 -6
- package/script/client/0_params.d.ts +10 -3
- package/script/client/0_params.d.ts.map +1 -1
- package/script/client/0_password.js +8 -8
- package/script/client/0_utilities.d.ts +4 -4
- package/script/client/0_utilities.d.ts.map +1 -1
- package/script/client/0_utilities.js +16 -16
- package/script/client/1_client_encrypted.d.ts.map +1 -1
- package/script/client/1_composer.js +4 -4
- package/script/client/2_update_manager.js +1 -1
- package/script/client/3_message_manager.d.ts.map +1 -1
- package/script/client/3_message_manager.js +16 -0
- package/script/client/5_client.d.ts.map +1 -1
- package/script/client/5_client.js +2 -2
- package/script/deps/deno.land/std@0.224.0/io/write_all.js +2 -3
- package/script/deps/deno.land/x/html_parser@v0.1.3/src/DomSerializer.js +1 -1
- package/script/deps/deno.land/x/html_parser@v0.1.3/src/ElementType.js +2 -2
- package/script/deps/deno.land/x/html_parser@v0.1.3/src/FeedHandler.js +2 -2
- package/script/deps/deno.land/x/html_parser@v0.1.3/src/Node.js +9 -9
- package/script/deps/deno.land/x/html_parser@v0.1.3/src/mod.js +4 -4
- package/script/deps/deno.land/x/html_parser@v0.1.3/src/utils/entities/decode_codepoint.js +1 -1
- package/script/deps/deno.land/x/html_parser@v0.1.3/src/utils/entities/encode.js +3 -3
- package/script/deps/deno.land/x/html_parser@v0.1.3/src/utils/entities/mod.js +4 -4
- package/script/deps/deno.land/x/html_parser@v0.1.3/src/utils/helpers.js +4 -4
- package/script/deps/deno.land/x/html_parser@v0.1.3/src/utils/legacy.js +5 -6
- package/script/deps/deno.land/x/html_parser@v0.1.3/src/utils/manipulation.js +6 -7
- package/script/deps/deno.land/x/html_parser@v0.1.3/src/utils/querying.js +6 -7
- package/script/deps/deno.land/x/html_parser@v0.1.3/src/utils/stringify.js +5 -6
- package/script/deps/deno.land/x/html_parser@v0.1.3/src/utils/traversal.js +8 -9
- package/script/deps/deno.land/x/tgcrypto@0.4.1/mod.js +10 -11
- package/script/deps/jsr.io/@std/assert/1.0.6/almost_equals.js +1 -2
- package/script/deps/jsr.io/@std/assert/1.0.6/array_includes.js +2 -3
- package/script/deps/jsr.io/@std/assert/1.0.6/assert.js +1 -2
- package/script/deps/jsr.io/@std/assert/1.0.6/equal.js +1 -2
- package/script/deps/jsr.io/@std/assert/1.0.6/equals.js +5 -6
- package/script/deps/jsr.io/@std/assert/1.0.6/exists.js +1 -2
- package/script/deps/jsr.io/@std/assert/1.0.6/fail.js +1 -2
- package/script/deps/jsr.io/@std/assert/1.0.6/false.js +1 -2
- package/script/deps/jsr.io/@std/assert/1.0.6/greater.js +2 -3
- package/script/deps/jsr.io/@std/assert/1.0.6/greater_or_equal.js +2 -3
- package/script/deps/jsr.io/@std/assert/1.0.6/instance_of.js +1 -2
- package/script/deps/jsr.io/@std/assert/1.0.6/is_error.js +2 -3
- package/script/deps/jsr.io/@std/assert/1.0.6/less.js +2 -3
- package/script/deps/jsr.io/@std/assert/1.0.6/less_or_equal.js +2 -3
- package/script/deps/jsr.io/@std/assert/1.0.6/match.js +1 -2
- package/script/deps/jsr.io/@std/assert/1.0.6/not_equals.js +1 -2
- package/script/deps/jsr.io/@std/assert/1.0.6/not_instance_of.js +1 -2
- package/script/deps/jsr.io/@std/assert/1.0.6/not_match.js +1 -2
- package/script/deps/jsr.io/@std/assert/1.0.6/not_strict_equals.js +2 -3
- package/script/deps/jsr.io/@std/assert/1.0.6/object_match.js +1 -2
- package/script/deps/jsr.io/@std/assert/1.0.6/rejects.js +1 -2
- package/script/deps/jsr.io/@std/assert/1.0.6/strict_equals.js +6 -7
- package/script/deps/jsr.io/@std/assert/1.0.6/string_includes.js +1 -2
- package/script/deps/jsr.io/@std/assert/1.0.6/throws.js +1 -2
- package/script/deps/jsr.io/@std/assert/1.0.6/unimplemented.js +1 -2
- package/script/deps/jsr.io/@std/assert/1.0.6/unreachable.js +1 -2
- package/script/deps/jsr.io/@std/bytes/1.0.2/concat.js +1 -2
- package/script/deps/jsr.io/@std/encoding/1.0.5/_validate_binary_like.js +1 -2
- package/script/deps/jsr.io/@std/encoding/1.0.5/base64.js +2 -3
- package/{esm/deps/jsr.io/@std/internal/1.0.4 → script/deps/jsr.io/@std/internal/1.0.5}/build_message.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/build_message.js +3 -4
- package/script/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/diff.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/diff.js +5 -6
- package/script/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/diff_str.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/diff_str.js +4 -5
- package/script/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/format.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/format.js +1 -2
- package/script/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/styles.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/styles.js +10 -11
- package/script/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/types.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/io/{0.224.9 → 0.225.0}/_constants.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/io/{0.224.9 → 0.225.0}/_constants.js +1 -1
- package/script/deps/jsr.io/@std/io/{0.224.9 → 0.225.0}/iterate_reader.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/io/{0.224.9 → 0.225.0}/iterate_reader.js +2 -3
- package/script/deps/jsr.io/@std/io/{0.224.9 → 0.225.0}/types.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/media-types/1.0.3/_util.js +8 -9
- package/script/deps/jsr.io/@std/media-types/1.0.3/all_extensions.js +1 -2
- package/script/deps/jsr.io/@std/media-types/1.0.3/content_type.js +1 -2
- package/script/deps/jsr.io/@std/media-types/1.0.3/extension.js +1 -2
- package/script/deps/jsr.io/@std/media-types/1.0.3/format_media_type.js +1 -2
- package/script/deps/jsr.io/@std/media-types/1.0.3/get_charset.js +1 -2
- package/script/deps/jsr.io/@std/media-types/1.0.3/parse_media_type.js +1 -2
- package/script/deps/jsr.io/@std/media-types/1.0.3/type_by_extension.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/_common/assert_path.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/_common/basename.js +3 -4
- package/script/deps/jsr.io/@std/path/1.0.6/_common/common.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/_common/dirname.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/_common/format.js +2 -3
- package/script/deps/jsr.io/@std/path/1.0.6/_common/from_file_url.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/_common/glob_to_reg_exp.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/_common/normalize.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/_common/normalize_string.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/_common/relative.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/_common/strip_trailing_separators.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/_common/to_file_url.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/basename.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/common.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/dirname.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/extname.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/format.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/from_file_url.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/glob_to_regexp.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/is_absolute.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/is_glob.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/join.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/join_globs.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/normalize.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/normalize_glob.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/parse.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/posix/_util.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/posix/basename.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/posix/dirname.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/posix/extname.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/posix/format.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/posix/from_file_url.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/posix/glob_to_regexp.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/posix/is_absolute.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/posix/join.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/posix/join_globs.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/posix/normalize.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/posix/normalize_glob.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/posix/parse.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/posix/relative.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/posix/resolve.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/posix/to_file_url.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/posix/to_namespaced_path.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/relative.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/resolve.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/to_file_url.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/to_namespaced_path.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/windows/_util.js +3 -4
- package/script/deps/jsr.io/@std/path/1.0.6/windows/basename.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/windows/dirname.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/windows/extname.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/windows/format.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/windows/from_file_url.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/windows/glob_to_regexp.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/windows/is_absolute.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/windows/join.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/windows/join_globs.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/windows/normalize.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/windows/normalize_glob.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/windows/parse.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/windows/relative.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/windows/resolve.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/windows/to_file_url.js +1 -2
- package/script/deps/jsr.io/@std/path/1.0.6/windows/to_namespaced_path.js +1 -2
- package/script/deps/raw.githubusercontent.com/MTKruto/compress/main/utils/uint8.js +1 -2
- package/script/deps/raw.githubusercontent.com/MTKruto/compress/main/zlib/deflate.js +2 -2
- package/script/deps/raw.githubusercontent.com/MTKruto/compress/main/zlib/zlib/adler32.js +1 -1
- package/script/deps/raw.githubusercontent.com/MTKruto/compress/main/zlib/zlib/crc32.js +2 -3
- package/script/deps/raw.githubusercontent.com/MTKruto/compress/main/zlib/zlib/deflate.js +6 -6
- package/script/deps/raw.githubusercontent.com/MTKruto/compress/main/zlib/zlib/inffast.js +1 -1
- package/script/deps/raw.githubusercontent.com/MTKruto/compress/main/zlib/zlib/inflate.js +10 -10
- package/script/deps/raw.githubusercontent.com/MTKruto/compress/main/zlib/zlib/inftrees.js +1 -1
- package/script/deps/raw.githubusercontent.com/MTKruto/compress/main/zlib/zlib/trees.js +5 -6
- package/script/deps/raw.githubusercontent.com/MTKruto/socks5/main/utils.js +1 -2
- package/script/storage/1_utilities.js +7 -7
- package/script/tl/0_api.d.ts +199 -41
- package/script/tl/0_api.d.ts.map +1 -1
- package/script/tl/0_api.js +314 -75
- package/script/tl/1_utilities.js +9 -10
- package/script/tl/2_deserialize.js +1 -2
- package/script/tl/2_serialize.js +1 -2
- package/script/tl/3_utilities.js +6 -7
- package/script/tl/4_rpc_result.js +2 -2
- package/script/tl/5_message.js +6 -6
- package/script/transport/0_obfuscation.js +1 -2
- package/script/transport/1_transport_abridged.d.ts.map +1 -1
- package/script/transport/1_transport_intermediate.d.ts.map +1 -1
- package/script/transport/2_transport_provider.js +7 -8
- package/script/transport/3_transport_provider_tcp.js +1 -2
- package/script/types/0_birthday.js +1 -2
- package/script/types/0_callback_query_answer.js +1 -2
- package/script/types/0_callback_query_question.js +1 -2
- package/script/types/0_chat_administrator_rights.js +2 -3
- package/script/types/0_chat_member_rights.js +2 -3
- package/script/types/0_chat_photo.js +1 -2
- package/script/types/0_contact.js +1 -2
- package/script/types/0_dice.js +1 -2
- package/script/types/0_failed_invitation.js +1 -2
- package/script/types/0_giveaway_parameters.js +1 -2
- package/script/types/0_invoice.js +1 -2
- package/script/types/0_link_preview.js +1 -2
- package/script/types/0_live_stream_channel.js +1 -2
- package/script/types/0_location.js +1 -2
- package/script/types/0_mask_position.js +1 -2
- package/script/types/0_message_entity.js +3 -4
- package/script/types/0_message_search_filter.js +1 -2
- package/script/types/0_mini_app_info.js +1 -2
- package/script/types/0_opening_hours.js +1 -2
- package/script/types/0_reaction.js +3 -4
- package/script/types/0_refunded_payment.js +1 -2
- package/script/types/0_restriction_reason.js +1 -2
- package/script/types/0_self_destruct_option.js +1 -2
- package/script/types/0_shipping_address.js +1 -2
- package/script/types/0_thumbnail.js +1 -2
- package/script/types/0_video_chat.js +1 -2
- package/script/types/0_voice.js +1 -2
- package/script/types/1_animation.js +1 -2
- package/script/types/1_audio.js +1 -2
- package/script/types/1_bot_command_scope.js +1 -2
- package/script/types/1_chat_p.js +1 -2
- package/script/types/1_document.js +1 -2
- package/script/types/1_giveaway.js +1 -2
- package/script/types/1_keyboard_button.js +2 -3
- package/script/types/1_message_reaction.js +1 -2
- package/script/types/1_order_info.js +1 -2
- package/script/types/1_photo.js +2 -3
- package/script/types/1_poll_option.js +1 -2
- package/script/types/1_reaction_count.js +1 -2
- package/script/types/1_reply_quote.js +1 -2
- package/script/types/1_sticker.js +1 -2
- package/script/types/1_story_privacy.js +2 -3
- package/script/types/1_story_reaction.js +1 -2
- package/script/types/1_user.js +1 -2
- package/script/types/1_venue.js +1 -2
- package/script/types/1_video.js +1 -2
- package/script/types/1_video_note.js +1 -2
- package/script/types/2_business_connection.js +1 -2
- package/script/types/2_chat.js +1 -2
- package/script/types/2_chat_member.js +1 -2
- package/script/types/2_chosen_inline_result.js +1 -2
- package/script/types/2_forward_header.js +1 -2
- package/script/types/2_game.js +1 -2
- package/script/types/2_inactive_chat.js +1 -2
- package/script/types/2_inline_keyboard_button.d.ts +9 -1
- package/script/types/2_inline_keyboard_button.d.ts.map +1 -1
- package/script/types/2_inline_keyboard_button.js +8 -3
- package/script/types/2_inline_query.js +1 -2
- package/script/types/2_invite_link.d.ts +5 -1
- package/script/types/2_invite_link.d.ts.map +1 -1
- package/script/types/2_invite_link.js +3 -2
- package/script/types/2_message_reaction_count.js +1 -2
- package/script/types/2_message_reactions.js +1 -2
- package/script/types/2_poll.js +1 -2
- package/script/types/2_pre_checkout_query.js +1 -2
- package/script/types/2_story_content.js +1 -2
- package/script/types/2_story_interactions.js +1 -2
- package/script/types/2_story_interactive_area.js +2 -3
- package/script/types/2_successful_payment.js +1 -2
- package/script/types/3_chat_member_updated.js +1 -2
- package/script/types/3_join_request.js +1 -2
- package/script/types/3_reply_markup.js +2 -3
- package/script/types/3_story.js +1 -2
- package/script/types/4_inline_query_result.js +2 -3
- package/script/types/4_message.js +2 -3
- package/script/types/5_callback_query.js +2 -3
- package/script/types/5_chat_list_item.js +5 -6
- package/script/types/5_inline_query_answer.js +1 -2
- package/script/types/_file_id.js +5 -5
- package/script/utilities/0_bigint.js +6 -7
- package/script/utilities/0_buffer.js +1 -2
- package/script/utilities/0_cache_map.d.ts.map +1 -1
- package/script/utilities/0_color.js +2 -3
- package/script/utilities/0_env.js +2 -3
- package/script/utilities/0_hash.js +2 -3
- package/script/utilities/0_object.js +1 -2
- package/script/utilities/0_rle.js +2 -3
- package/script/utilities/0_units.js +3 -3
- package/script/utilities/1_auth.js +1 -2
- package/script/utilities/1_base64.js +2 -3
- package/script/utilities/1_logger.js +5 -5
- package/script/utilities/1_math.js +1 -2
- package/script/utilities/1_misc.js +8 -8
- package/script/utilities/2_queue.d.ts.map +1 -1
- /package/esm/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/build_message.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/build_message.js +0 -0
- /package/esm/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/diff.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/diff.js +0 -0
- /package/esm/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/diff_str.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/diff_str.js +0 -0
- /package/esm/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/format.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/format.js +0 -0
- /package/esm/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/styles.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/styles.js +0 -0
- /package/esm/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/types.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/types.js +0 -0
- /package/esm/deps/jsr.io/@std/io/{0.224.9 → 0.225.0}/_constants.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/io/{0.224.9 → 0.225.0}/iterate_reader.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/io/{0.224.9 → 0.225.0}/iterate_reader.js +0 -0
- /package/esm/deps/jsr.io/@std/io/{0.224.9 → 0.225.0}/types.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/io/{0.224.9 → 0.225.0}/types.js +0 -0
- /package/script/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/build_message.d.ts +0 -0
- /package/script/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/diff.d.ts +0 -0
- /package/script/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/diff_str.d.ts +0 -0
- /package/script/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/format.d.ts +0 -0
- /package/script/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/styles.d.ts +0 -0
- /package/script/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/types.d.ts +0 -0
- /package/script/deps/jsr.io/@std/internal/{1.0.4 → 1.0.5}/types.js +0 -0
- /package/script/deps/jsr.io/@std/io/{0.224.9 → 0.225.0}/_constants.d.ts +0 -0
- /package/script/deps/jsr.io/@std/io/{0.224.9 → 0.225.0}/iterate_reader.d.ts +0 -0
- /package/script/deps/jsr.io/@std/io/{0.224.9 → 0.225.0}/types.d.ts +0 -0
- /package/script/deps/jsr.io/@std/io/{0.224.9 → 0.225.0}/types.js +0 -0
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
20
20
|
*/
|
|
21
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
exports.constructMessageReactionCount =
|
|
22
|
+
exports.constructMessageReactionCount = constructMessageReactionCount;
|
|
23
23
|
const _1_utilities_js_1 = require("../1_utilities.js");
|
|
24
24
|
const _1_chat_p_js_1 = require("./1_chat_p.js");
|
|
25
25
|
const _1_reaction_count_js_1 = require("./1_reaction_count.js");
|
|
@@ -37,4 +37,3 @@ async function constructMessageReactionCount(update, getEntity) {
|
|
|
37
37
|
return null;
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
|
-
exports.constructMessageReactionCount = constructMessageReactionCount;
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
20
20
|
*/
|
|
21
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
exports.constructMessageReactions =
|
|
22
|
+
exports.constructMessageReactions = constructMessageReactions;
|
|
23
23
|
const _1_utilities_js_1 = require("../1_utilities.js");
|
|
24
24
|
const _2_tl_js_1 = require("../2_tl.js");
|
|
25
25
|
const _0_reaction_js_1 = require("./0_reaction.js");
|
|
@@ -57,4 +57,3 @@ async function constructMessageReactions(update, getEntity) {
|
|
|
57
57
|
newReactions,
|
|
58
58
|
});
|
|
59
59
|
}
|
|
60
|
-
exports.constructMessageReactions = constructMessageReactions;
|
package/script/types/2_poll.js
CHANGED
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
20
20
|
*/
|
|
21
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
exports.constructPoll =
|
|
22
|
+
exports.constructPoll = constructPoll;
|
|
23
23
|
const _1_utilities_js_1 = require("../1_utilities.js");
|
|
24
24
|
const _0_message_entity_js_1 = require("./0_message_entity.js");
|
|
25
25
|
const _1_poll_option_js_1 = require("./1_poll_option.js");
|
|
@@ -44,4 +44,3 @@ function constructPoll(media_) {
|
|
|
44
44
|
closeDate: poll.close_date ? new Date(poll.close_date * 1000) : undefined,
|
|
45
45
|
});
|
|
46
46
|
}
|
|
47
|
-
exports.constructPoll = constructPoll;
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
20
20
|
*/
|
|
21
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
exports.constructPreCheckoutQuery =
|
|
22
|
+
exports.constructPreCheckoutQuery = constructPreCheckoutQuery;
|
|
23
23
|
const _0_deps_js_1 = require("../0_deps.js");
|
|
24
24
|
const _1_utilities_js_1 = require("../1_utilities.js");
|
|
25
25
|
const _1_order_info_js_1 = require("./1_order_info.js");
|
|
@@ -40,4 +40,3 @@ async function constructPreCheckoutQuery(query, getEntity) {
|
|
|
40
40
|
orderInfo: query.info ? (0, _1_order_info_js_1.constructOrderInfo)(query.info) : undefined,
|
|
41
41
|
});
|
|
42
42
|
}
|
|
43
|
-
exports.constructPreCheckoutQuery = constructPreCheckoutQuery;
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
20
20
|
*/
|
|
21
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
exports.constructStoryContent =
|
|
22
|
+
exports.constructStoryContent = constructStoryContent;
|
|
23
23
|
const _0_deps_js_1 = require("../0_deps.js");
|
|
24
24
|
const _2_tl_js_1 = require("../2_tl.js");
|
|
25
25
|
const _file_id_js_1 = require("./_file_id.js");
|
|
@@ -52,4 +52,3 @@ function constructStoryContent(media) {
|
|
|
52
52
|
(0, _0_deps_js_1.unreachable)();
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
|
-
exports.constructStoryContent = constructStoryContent;
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
20
20
|
*/
|
|
21
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
exports.constructStoryInteractions =
|
|
22
|
+
exports.constructStoryInteractions = constructStoryInteractions;
|
|
23
23
|
const _1_story_reaction_js_1 = require("./1_story_reaction.js");
|
|
24
24
|
function constructStoryInteractions(views_) {
|
|
25
25
|
const views = views_.views_count;
|
|
@@ -28,4 +28,3 @@ function constructStoryInteractions(views_) {
|
|
|
28
28
|
const reactions = views_.reactions ? views_.reactions.map(_1_story_reaction_js_1.constructStoryReaction) : undefined;
|
|
29
29
|
return { reactions, reactionCount, views, forwards };
|
|
30
30
|
}
|
|
31
|
-
exports.constructStoryInteractions = constructStoryInteractions;
|
|
@@ -19,7 +19,8 @@
|
|
|
19
19
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
20
20
|
*/
|
|
21
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
exports.
|
|
22
|
+
exports.constructStoryInteractiveArea = constructStoryInteractiveArea;
|
|
23
|
+
exports.storyInteractiveAreaToTlObject = storyInteractiveAreaToTlObject;
|
|
23
24
|
const _0_deps_js_1 = require("../0_deps.js");
|
|
24
25
|
const _2_tl_js_1 = require("../2_tl.js");
|
|
25
26
|
const _0_location_js_1 = require("./0_location.js");
|
|
@@ -70,7 +71,6 @@ function constructStoryInteractiveArea(area) {
|
|
|
70
71
|
(0, _0_deps_js_1.unreachable)();
|
|
71
72
|
}
|
|
72
73
|
}
|
|
73
|
-
exports.constructStoryInteractiveArea = constructStoryInteractiveArea;
|
|
74
74
|
function storyInteractiveAreaPositionToTlObject(position) {
|
|
75
75
|
return { _: "mediaAreaCoordinates", x: position.xPercentage, y: position.yPercentage, w: position.widthPercentage, h: position.heightPercentage, rotation: position.rotationAngle };
|
|
76
76
|
}
|
|
@@ -109,4 +109,3 @@ async function storyInteractiveAreaToTlObject(area, getEntity) {
|
|
|
109
109
|
(0, _0_deps_js_1.unreachable)();
|
|
110
110
|
}
|
|
111
111
|
}
|
|
112
|
-
exports.storyInteractiveAreaToTlObject = storyInteractiveAreaToTlObject;
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
20
20
|
*/
|
|
21
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
exports.constructSuccessfulPayment =
|
|
22
|
+
exports.constructSuccessfulPayment = constructSuccessfulPayment;
|
|
23
23
|
const _1_utilities_js_1 = require("../1_utilities.js");
|
|
24
24
|
const _1_order_info_js_1 = require("./1_order_info.js");
|
|
25
25
|
function constructSuccessfulPayment(action) {
|
|
@@ -33,4 +33,3 @@ function constructSuccessfulPayment(action) {
|
|
|
33
33
|
orderInfo: action.info ? (0, _1_order_info_js_1.constructOrderInfo)(action.info) : undefined,
|
|
34
34
|
});
|
|
35
35
|
}
|
|
36
|
-
exports.constructSuccessfulPayment = constructSuccessfulPayment;
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
20
20
|
*/
|
|
21
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
exports.constructChatMemberUpdated =
|
|
22
|
+
exports.constructChatMemberUpdated = constructChatMemberUpdated;
|
|
23
23
|
const _0_deps_js_1 = require("../0_deps.js");
|
|
24
24
|
const _1_utilities_js_1 = require("../1_utilities.js");
|
|
25
25
|
const _2_tl_js_1 = require("../2_tl.js");
|
|
@@ -54,4 +54,3 @@ async function constructChatMemberUpdated(update, getEntity) {
|
|
|
54
54
|
inviteLink,
|
|
55
55
|
});
|
|
56
56
|
}
|
|
57
|
-
exports.constructChatMemberUpdated = constructChatMemberUpdated;
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
20
20
|
*/
|
|
21
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
exports.constructJoinRequest =
|
|
22
|
+
exports.constructJoinRequest = constructJoinRequest;
|
|
23
23
|
const _0_deps_js_1 = require("../0_deps.js");
|
|
24
24
|
const _1_utilities_js_1 = require("../1_utilities.js");
|
|
25
25
|
const _2_tl_js_1 = require("../2_tl.js");
|
|
@@ -46,4 +46,3 @@ async function constructJoinRequest(update, getEntity) {
|
|
|
46
46
|
inviteLink,
|
|
47
47
|
});
|
|
48
48
|
}
|
|
49
|
-
exports.constructJoinRequest = constructJoinRequest;
|
|
@@ -19,7 +19,8 @@
|
|
|
19
19
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
20
20
|
*/
|
|
21
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
exports.
|
|
22
|
+
exports.constructReplyMarkup = constructReplyMarkup;
|
|
23
|
+
exports.replyMarkupToTlObject = replyMarkupToTlObject;
|
|
23
24
|
const _0_deps_js_1 = require("../0_deps.js");
|
|
24
25
|
const _1_utilities_js_1 = require("../1_utilities.js");
|
|
25
26
|
const _2_tl_js_1 = require("../2_tl.js");
|
|
@@ -111,7 +112,6 @@ function constructReplyMarkup(replyMarkup) {
|
|
|
111
112
|
(0, _0_deps_js_1.unreachable)();
|
|
112
113
|
}
|
|
113
114
|
}
|
|
114
|
-
exports.constructReplyMarkup = constructReplyMarkup;
|
|
115
115
|
async function replyMarkupToTlObject(replyMarkup, usernameResolver) {
|
|
116
116
|
if ("inlineKeyboard" in replyMarkup) {
|
|
117
117
|
return await inlineKeyboardMarkupToTlObject(replyMarkup, usernameResolver);
|
|
@@ -129,4 +129,3 @@ async function replyMarkupToTlObject(replyMarkup, usernameResolver) {
|
|
|
129
129
|
(0, _0_deps_js_1.unreachable)();
|
|
130
130
|
}
|
|
131
131
|
}
|
|
132
|
-
exports.replyMarkupToTlObject = replyMarkupToTlObject;
|
package/script/types/3_story.js
CHANGED
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
20
20
|
*/
|
|
21
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
exports.constructStory =
|
|
22
|
+
exports.constructStory = constructStory;
|
|
23
23
|
const _0_deps_js_1 = require("../0_deps.js");
|
|
24
24
|
const _1_utilities_js_1 = require("../1_utilities.js");
|
|
25
25
|
const _0_message_entity_js_1 = require("./0_message_entity.js");
|
|
@@ -58,4 +58,3 @@ async function constructStory(story, peer, getEntity) {
|
|
|
58
58
|
captionEntities,
|
|
59
59
|
});
|
|
60
60
|
}
|
|
61
|
-
exports.constructStory = constructStory;
|
|
@@ -19,7 +19,8 @@
|
|
|
19
19
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
20
20
|
*/
|
|
21
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
exports.
|
|
22
|
+
exports.constructInlineQueryResult = constructInlineQueryResult;
|
|
23
|
+
exports.inlineQueryResultToTlObject = inlineQueryResultToTlObject;
|
|
23
24
|
const _0_deps_js_1 = require("../0_deps.js");
|
|
24
25
|
const _1_utilities_js_1 = require("../1_utilities.js");
|
|
25
26
|
const _2_tl_js_1 = require("../2_tl.js");
|
|
@@ -207,7 +208,6 @@ function constructInlineQueryResult(result) {
|
|
|
207
208
|
}
|
|
208
209
|
(0, _0_deps_js_1.unreachable)();
|
|
209
210
|
}
|
|
210
|
-
exports.constructInlineQueryResult = constructInlineQueryResult;
|
|
211
211
|
// deno-lint-ignore no-explicit-any
|
|
212
212
|
async function inlineQueryResultToTlObject(result_, parseText, usernameResolver) {
|
|
213
213
|
let document = null;
|
|
@@ -382,4 +382,3 @@ async function inlineQueryResultToTlObject(result_, parseText, usernameResolver)
|
|
|
382
382
|
(0, _0_deps_js_1.unreachable)();
|
|
383
383
|
}
|
|
384
384
|
}
|
|
385
|
-
exports.inlineQueryResultToTlObject = inlineQueryResultToTlObject;
|
|
@@ -19,7 +19,8 @@
|
|
|
19
19
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
20
20
|
*/
|
|
21
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
exports.
|
|
22
|
+
exports.assertMessageType = assertMessageType;
|
|
23
|
+
exports.constructMessage = constructMessage;
|
|
23
24
|
const _0_deps_js_1 = require("../0_deps.js");
|
|
24
25
|
const _1_utilities_js_1 = require("../1_utilities.js");
|
|
25
26
|
const _2_tl_js_1 = require("../2_tl.js");
|
|
@@ -104,7 +105,6 @@ function assertMessageType(message, type) {
|
|
|
104
105
|
}
|
|
105
106
|
return message;
|
|
106
107
|
}
|
|
107
|
-
exports.assertMessageType = assertMessageType;
|
|
108
108
|
async function getSender(message_, getEntity) {
|
|
109
109
|
if ((0, _2_tl_js_1.is)("peerUser", message_.from_id)) {
|
|
110
110
|
const entity = await getEntity(message_.from_id);
|
|
@@ -535,4 +535,3 @@ async function constructMessage(message_, getEntity, getMessage, getStickerSetNa
|
|
|
535
535
|
}
|
|
536
536
|
return (0, _1_utilities_js_1.cleanObject)(m);
|
|
537
537
|
}
|
|
538
|
-
exports.constructMessage = constructMessage;
|
|
@@ -19,7 +19,8 @@
|
|
|
19
19
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
20
20
|
*/
|
|
21
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
exports.
|
|
22
|
+
exports.deserializeInlineMessageId = deserializeInlineMessageId;
|
|
23
|
+
exports.constructCallbackQuery = constructCallbackQuery;
|
|
23
24
|
const _0_deps_js_1 = require("../0_deps.js");
|
|
24
25
|
const _0_errors_js_1 = require("../0_errors.js");
|
|
25
26
|
const _1_utilities_js_1 = require("../1_utilities.js");
|
|
@@ -40,7 +41,6 @@ function deserializeInlineMessageId(inlineMessageId) {
|
|
|
40
41
|
}
|
|
41
42
|
throw ERR_INVALID_INLINE_MESSAGE_ID;
|
|
42
43
|
}
|
|
43
|
-
exports.deserializeInlineMessageId = deserializeInlineMessageId;
|
|
44
44
|
async function constructCallbackQuery(callbackQuery, getEntity, getMessage) {
|
|
45
45
|
const user_ = await getEntity({ _: "peerUser", user_id: callbackQuery.user_id });
|
|
46
46
|
if (!user_) {
|
|
@@ -62,4 +62,3 @@ async function constructCallbackQuery(callbackQuery, getEntity, getMessage) {
|
|
|
62
62
|
return (0, _1_utilities_js_1.cleanObject)({ id, from: user, inlineMessageId: (0, _1_utilities_js_1.base64EncodeUrlSafe)((0, _2_tl_js_1.serialize)(callbackQuery.msg_id)), chatInstance, data, gameShortName });
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
|
-
exports.constructCallbackQuery = constructCallbackQuery;
|
|
@@ -19,7 +19,11 @@
|
|
|
19
19
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
20
20
|
*/
|
|
21
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
exports.
|
|
22
|
+
exports.getChatListItemOrder = getChatListItemOrder;
|
|
23
|
+
exports.constructChatListItem = constructChatListItem;
|
|
24
|
+
exports.constructChatListItem2 = constructChatListItem2;
|
|
25
|
+
exports.constructChatListItem3 = constructChatListItem3;
|
|
26
|
+
exports.constructChatListItem4 = constructChatListItem4;
|
|
23
27
|
const _0_deps_js_1 = require("../0_deps.js");
|
|
24
28
|
const _2_tl_js_1 = require("../2_tl.js");
|
|
25
29
|
const _1_chat_p_js_1 = require("./1_chat_p.js");
|
|
@@ -31,7 +35,6 @@ function getChatListItemOrder(lastMessage, pinned) {
|
|
|
31
35
|
}
|
|
32
36
|
return p + String((BigInt(Math.floor(lastMessage.date.getTime())) << 32n) + BigInt(lastMessage.id));
|
|
33
37
|
}
|
|
34
|
-
exports.getChatListItemOrder = getChatListItemOrder;
|
|
35
38
|
async function constructChatListItem(chatId, pinned, lastMessageId, getEntity, getMessage) {
|
|
36
39
|
const entity = await getEntity((0, _2_tl_js_1.chatIdToPeer)(chatId));
|
|
37
40
|
if (entity == null) {
|
|
@@ -46,7 +49,6 @@ async function constructChatListItem(chatId, pinned, lastMessageId, getEntity, g
|
|
|
46
49
|
lastMessage,
|
|
47
50
|
};
|
|
48
51
|
}
|
|
49
|
-
exports.constructChatListItem = constructChatListItem;
|
|
50
52
|
function constructChatListItem2(entity, pinned, lastMessage) {
|
|
51
53
|
return {
|
|
52
54
|
chat: (0, _1_chat_p_js_1.constructChatP)(entity),
|
|
@@ -55,7 +57,6 @@ function constructChatListItem2(entity, pinned, lastMessage) {
|
|
|
55
57
|
lastMessage,
|
|
56
58
|
};
|
|
57
59
|
}
|
|
58
|
-
exports.constructChatListItem2 = constructChatListItem2;
|
|
59
60
|
async function constructChatListItem3(chatId, pinned, lastMessage, getEntity) {
|
|
60
61
|
const entity = await getEntity((0, _2_tl_js_1.chatIdToPeer)(chatId));
|
|
61
62
|
if (entity == null) {
|
|
@@ -68,7 +69,6 @@ async function constructChatListItem3(chatId, pinned, lastMessage, getEntity) {
|
|
|
68
69
|
lastMessage,
|
|
69
70
|
};
|
|
70
71
|
}
|
|
71
|
-
exports.constructChatListItem3 = constructChatListItem3;
|
|
72
72
|
async function constructChatListItem4(dialog, dialogs, pinnedChats, getEntity, getMessage, getStickerSetName) {
|
|
73
73
|
const topMessage_ = dialogs.messages.find((v) => "id" in v && v.id == dialog.top_message);
|
|
74
74
|
if (!topMessage_) {
|
|
@@ -91,4 +91,3 @@ async function constructChatListItem4(dialog, dialogs, pinnedChats, getEntity, g
|
|
|
91
91
|
pinned,
|
|
92
92
|
};
|
|
93
93
|
}
|
|
94
|
-
exports.constructChatListItem4 = constructChatListItem4;
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
20
20
|
*/
|
|
21
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
exports.constructInlineQueryAnswer =
|
|
22
|
+
exports.constructInlineQueryAnswer = constructInlineQueryAnswer;
|
|
23
23
|
const _1_utilities_js_1 = require("../1_utilities.js");
|
|
24
24
|
const _4_inline_query_result_js_1 = require("./4_inline_query_result.js");
|
|
25
25
|
function constructInlineQueryAnswer(results) {
|
|
@@ -29,4 +29,3 @@ function constructInlineQueryAnswer(results) {
|
|
|
29
29
|
nextOffset: results.next_offset,
|
|
30
30
|
});
|
|
31
31
|
}
|
|
32
|
-
exports.constructInlineQueryAnswer = constructInlineQueryAnswer;
|
package/script/types/_file_id.js
CHANGED
|
@@ -19,7 +19,11 @@
|
|
|
19
19
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
20
20
|
*/
|
|
21
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
exports.
|
|
22
|
+
exports.PhotoSourceType = exports.FileType = void 0;
|
|
23
|
+
exports.deserializeFileId = deserializeFileId;
|
|
24
|
+
exports.serializeFileId = serializeFileId;
|
|
25
|
+
exports.toUniqueFileId = toUniqueFileId;
|
|
26
|
+
exports.getPhotoFileId = getPhotoFileId;
|
|
23
27
|
const _0_deps_js_1 = require("../0_deps.js");
|
|
24
28
|
const _0_errors_js_1 = require("../0_errors.js");
|
|
25
29
|
const _1_utilities_js_1 = require("../1_utilities.js");
|
|
@@ -260,7 +264,6 @@ function deserializeFileId(fileId) {
|
|
|
260
264
|
return { type, dcId, fileReference, location: { type: "common", id, accessHash } };
|
|
261
265
|
}
|
|
262
266
|
}
|
|
263
|
-
exports.deserializeFileId = deserializeFileId;
|
|
264
267
|
function serializeFileId(fileId) {
|
|
265
268
|
const writer = new _2_tl_js_1.TLWriter();
|
|
266
269
|
let type = fileId.type;
|
|
@@ -289,7 +292,6 @@ function serializeFileId(fileId) {
|
|
|
289
292
|
writer.write(new Uint8Array([NEXT_VERSION - 1, PERSISTENT_ID_VERSION]));
|
|
290
293
|
return (0, _1_utilities_js_1.base64EncodeUrlSafe)((0, _1_utilities_js_1.rleEncode)(writer.buffer));
|
|
291
294
|
}
|
|
292
|
-
exports.serializeFileId = serializeFileId;
|
|
293
295
|
function toUniqueFileId(fileId) {
|
|
294
296
|
const writer = new _2_tl_js_1.TLWriter();
|
|
295
297
|
const type = fileId.location.type == "web" ? 0 : (getFileTypeClass(fileId.type) + 1);
|
|
@@ -326,7 +328,6 @@ function toUniqueFileId(fileId) {
|
|
|
326
328
|
}
|
|
327
329
|
return (0, _1_utilities_js_1.base64EncodeUrlSafe)((0, _1_utilities_js_1.rleEncode)(writer.buffer));
|
|
328
330
|
}
|
|
329
|
-
exports.toUniqueFileId = toUniqueFileId;
|
|
330
331
|
function getPhotoFileId(photo) {
|
|
331
332
|
const sizes = photo.sizes
|
|
332
333
|
.map((v) => {
|
|
@@ -358,4 +359,3 @@ function getPhotoFileId(photo) {
|
|
|
358
359
|
};
|
|
359
360
|
return { fileId: serializeFileId(fileId), fileUniqueId: toUniqueFileId(fileId) };
|
|
360
361
|
}
|
|
361
|
-
exports.getPhotoFileId = getPhotoFileId;
|
|
@@ -23,7 +23,12 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.
|
|
26
|
+
exports.modExp = modExp;
|
|
27
|
+
exports.mod = mod;
|
|
28
|
+
exports.bigIntFromBuffer = bigIntFromBuffer;
|
|
29
|
+
exports.getRandomBigInt = getRandomBigInt;
|
|
30
|
+
exports.getRandomId = getRandomId;
|
|
31
|
+
exports.gcd = gcd;
|
|
27
32
|
/**
|
|
28
33
|
* MTKruto - Cross-runtime JavaScript library for building Telegram clients
|
|
29
34
|
* Copyright (C) 2023-2024 Roj <https://roj.im/>
|
|
@@ -60,13 +65,11 @@ function modExp(a, b, n) {
|
|
|
60
65
|
}
|
|
61
66
|
return result;
|
|
62
67
|
}
|
|
63
|
-
exports.modExp = modExp;
|
|
64
68
|
function mod(n, m) {
|
|
65
69
|
// deno-lint-ignore ban-ts-comment
|
|
66
70
|
// @ts-ignore
|
|
67
71
|
return ((n % m) + m) % m;
|
|
68
72
|
}
|
|
69
|
-
exports.mod = mod;
|
|
70
73
|
function bigIntFromBuffer(buffer, little = true, signed = false) {
|
|
71
74
|
let randomBuffer = buffer;
|
|
72
75
|
const bytesLength = randomBuffer.length;
|
|
@@ -79,13 +82,11 @@ function bigIntFromBuffer(buffer, little = true, signed = false) {
|
|
|
79
82
|
}
|
|
80
83
|
return bigIntVar;
|
|
81
84
|
}
|
|
82
|
-
exports.bigIntFromBuffer = bigIntFromBuffer;
|
|
83
85
|
function getRandomBigInt(byteLength, little, signed) {
|
|
84
86
|
const randomBytes = new Uint8Array(byteLength);
|
|
85
87
|
dntShim.crypto.getRandomValues(randomBytes);
|
|
86
88
|
return bigIntFromBuffer(randomBytes, little, signed);
|
|
87
89
|
}
|
|
88
|
-
exports.getRandomBigInt = getRandomBigInt;
|
|
89
90
|
function getRandomId(number) {
|
|
90
91
|
if (number) {
|
|
91
92
|
return Number(getRandomBigInt(4, true, true));
|
|
@@ -94,7 +95,6 @@ function getRandomId(number) {
|
|
|
94
95
|
return getRandomBigInt(8, true, true);
|
|
95
96
|
}
|
|
96
97
|
}
|
|
97
|
-
exports.getRandomId = getRandomId;
|
|
98
98
|
function gcd(a, b) {
|
|
99
99
|
if (a == 0n) {
|
|
100
100
|
return b;
|
|
@@ -120,4 +120,3 @@ function gcd(a, b) {
|
|
|
120
120
|
}
|
|
121
121
|
}
|
|
122
122
|
}
|
|
123
|
-
exports.gcd = gcd;
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
20
20
|
*/
|
|
21
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
exports.bufferFromBigInt =
|
|
22
|
+
exports.bufferFromBigInt = bufferFromBigInt;
|
|
23
23
|
const bufferFromHexString = (hexString) => Uint8Array.from(hexString.match(/.{1,2}/g).map((byte) => parseInt(byte, 16)));
|
|
24
24
|
function bufferFromBigInt(int, byteCount, littleEndian = true, signed = false) {
|
|
25
25
|
const actualByteCount = Math.ceil(int.toString(2).length / 8);
|
|
@@ -52,4 +52,3 @@ function bufferFromBigInt(int, byteCount, littleEndian = true, signed = false) {
|
|
|
52
52
|
}
|
|
53
53
|
return buffer;
|
|
54
54
|
}
|
|
55
|
-
exports.bufferFromBigInt = bufferFromBigInt;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"0_cache_map.d.ts","sourceRoot":"","sources":["../../src/utilities/0_cache_map.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,qBAAa,QAAQ,CAAC,CAAC,EAAE,CAAC,CAAE,SAAQ,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;;gBAG/B,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,GAAG,IAAI;gBAC5D,KAAK,EAAE,MAAM;
|
|
1
|
+
{"version":3,"file":"0_cache_map.d.ts","sourceRoot":"","sources":["../../src/utilities/0_cache_map.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,qBAAa,QAAQ,CAAC,CAAC,EAAE,CAAC,CAAE,SAAQ,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;;gBAG/B,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,GAAG,IAAI;gBAC5D,KAAK,EAAE,MAAM;IAShB,GAAG,CAAC,GAAG,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,OAAO,IAAI;CAU5C"}
|
|
@@ -19,7 +19,8 @@
|
|
|
19
19
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
20
20
|
*/
|
|
21
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
exports.
|
|
22
|
+
exports.getColorFromPeerId = getColorFromPeerId;
|
|
23
|
+
exports.getColorName = getColorName;
|
|
23
24
|
function getColorFromPeerId(id) {
|
|
24
25
|
id = Number(String(id).replaceAll("-100", "-"));
|
|
25
26
|
if (id < 0) {
|
|
@@ -27,7 +28,6 @@ function getColorFromPeerId(id) {
|
|
|
27
28
|
}
|
|
28
29
|
return Math.floor(id % 7);
|
|
29
30
|
}
|
|
30
|
-
exports.getColorFromPeerId = getColorFromPeerId;
|
|
31
31
|
function getColorName(id) {
|
|
32
32
|
switch (id) {
|
|
33
33
|
case 0:
|
|
@@ -76,4 +76,3 @@ function getColorName(id) {
|
|
|
76
76
|
return "blue";
|
|
77
77
|
}
|
|
78
78
|
}
|
|
79
|
-
exports.getColorName = getColorName;
|
|
@@ -23,7 +23,8 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.
|
|
26
|
+
exports.getString = getString;
|
|
27
|
+
exports.getNumber = getNumber;
|
|
27
28
|
const dntShim = __importStar(require("../_dnt.shims.js"));
|
|
28
29
|
const prefix = "MTKRUTO__";
|
|
29
30
|
// deno-lint-ignore no-explicit-any
|
|
@@ -50,7 +51,6 @@ function getString(name) {
|
|
|
50
51
|
return null;
|
|
51
52
|
}
|
|
52
53
|
}
|
|
53
|
-
exports.getString = getString;
|
|
54
54
|
function getNumber(name) {
|
|
55
55
|
const value = getString(name);
|
|
56
56
|
if (value == null) {
|
|
@@ -64,4 +64,3 @@ function getNumber(name) {
|
|
|
64
64
|
return number;
|
|
65
65
|
}
|
|
66
66
|
}
|
|
67
|
-
exports.getNumber = getNumber;
|
|
@@ -23,7 +23,8 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.
|
|
26
|
+
exports.sha256 = sha256;
|
|
27
|
+
exports.sha1 = sha1;
|
|
27
28
|
/**
|
|
28
29
|
* MTKruto - Cross-runtime JavaScript library for building Telegram clients
|
|
29
30
|
* Copyright (C) 2023-2024 Roj <https://roj.im/>
|
|
@@ -47,8 +48,6 @@ const dntShim = __importStar(require("../_dnt.shims.js"));
|
|
|
47
48
|
async function sha256(payload) {
|
|
48
49
|
return new Uint8Array(await dntShim.crypto.subtle.digest("SHA-256", payload));
|
|
49
50
|
}
|
|
50
|
-
exports.sha256 = sha256;
|
|
51
51
|
async function sha1(payload) {
|
|
52
52
|
return new Uint8Array(await dntShim.crypto.subtle.digest("SHA-1", payload));
|
|
53
53
|
}
|
|
54
|
-
exports.sha1 = sha1;
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
20
20
|
*/
|
|
21
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
exports.cleanObject =
|
|
22
|
+
exports.cleanObject = cleanObject;
|
|
23
23
|
// deno-lint-ignore no-explicit-any
|
|
24
24
|
function cleanObject(object) {
|
|
25
25
|
for (const [k, v] of Object.entries(object)) {
|
|
@@ -31,4 +31,3 @@ function cleanObject(object) {
|
|
|
31
31
|
}
|
|
32
32
|
return object;
|
|
33
33
|
}
|
|
34
|
-
exports.cleanObject = cleanObject;
|
|
@@ -19,7 +19,8 @@
|
|
|
19
19
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
20
20
|
*/
|
|
21
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
exports.
|
|
22
|
+
exports.rleEncode = rleEncode;
|
|
23
|
+
exports.rleDecode = rleDecode;
|
|
23
24
|
function rleEncode(s) {
|
|
24
25
|
const r = new Array();
|
|
25
26
|
let n = 0;
|
|
@@ -49,7 +50,6 @@ function rleEncode(s) {
|
|
|
49
50
|
}
|
|
50
51
|
return new Uint8Array(r);
|
|
51
52
|
}
|
|
52
|
-
exports.rleEncode = rleEncode;
|
|
53
53
|
function rleDecode(s) {
|
|
54
54
|
const r = new Array();
|
|
55
55
|
let z = false;
|
|
@@ -70,4 +70,3 @@ function rleDecode(s) {
|
|
|
70
70
|
}
|
|
71
71
|
return new Uint8Array(r);
|
|
72
72
|
}
|
|
73
|
-
exports.rleDecode = rleDecode;
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
22
|
exports.megabyte = exports.kilobyte = exports.byte = exports.minute = exports.second = exports.millisecond = void 0;
|
|
23
23
|
exports.millisecond = 1;
|
|
24
|
-
exports.second =
|
|
24
|
+
exports.second = 1_000 * exports.millisecond;
|
|
25
25
|
exports.minute = 60 * exports.second;
|
|
26
26
|
exports.byte = 1;
|
|
27
|
-
exports.kilobyte =
|
|
28
|
-
exports.megabyte =
|
|
27
|
+
exports.kilobyte = 1_024 * exports.byte;
|
|
28
|
+
exports.megabyte = 1_024 * exports.kilobyte;
|
|
@@ -23,7 +23,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.rsaPad =
|
|
26
|
+
exports.rsaPad = rsaPad;
|
|
27
27
|
/**
|
|
28
28
|
* MTKruto - Cross-runtime JavaScript library for building Telegram clients
|
|
29
29
|
* Copyright (C) 2023-2024 Roj <https://roj.im/>
|
|
@@ -72,4 +72,3 @@ async function rsaPad(data, [serverKey, exponent]) {
|
|
|
72
72
|
(0, _0_deps_js_1.assertEquals)(encryptedData.length, 256);
|
|
73
73
|
return encryptedData;
|
|
74
74
|
}
|
|
75
|
-
exports.rsaPad = rsaPad;
|
|
@@ -19,13 +19,13 @@
|
|
|
19
19
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
20
20
|
*/
|
|
21
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
exports.
|
|
22
|
+
exports.base64EncodeUrlSafe = base64EncodeUrlSafe;
|
|
23
|
+
exports.base64DecodeUrlSafe = base64DecodeUrlSafe;
|
|
23
24
|
const _0_deps_js_1 = require("../0_deps.js");
|
|
24
25
|
const _0_bigint_js_1 = require("./0_bigint.js");
|
|
25
26
|
function base64EncodeUrlSafe(data) {
|
|
26
27
|
return (0, _0_deps_js_1.encodeBase64)(data).replace(/=*$/, "").replaceAll("+", "-").replaceAll("/", "_");
|
|
27
28
|
}
|
|
28
|
-
exports.base64EncodeUrlSafe = base64EncodeUrlSafe;
|
|
29
29
|
function base64DecodeUrlSafe(data) {
|
|
30
30
|
data = data.replaceAll("_", "/").replaceAll("-", "+");
|
|
31
31
|
if (data.length != 4) {
|
|
@@ -33,4 +33,3 @@ function base64DecodeUrlSafe(data) {
|
|
|
33
33
|
}
|
|
34
34
|
return (0, _0_deps_js_1.decodeBase64)(data);
|
|
35
35
|
}
|
|
36
|
-
exports.base64DecodeUrlSafe = base64DecodeUrlSafe;
|
|
@@ -20,24 +20,25 @@
|
|
|
20
20
|
*/
|
|
21
21
|
// deno-lint-ignore-file no-explicit-any
|
|
22
22
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
23
|
-
exports.
|
|
23
|
+
exports.OUT_BIN = exports.IN_BIN = exports.OUT = exports.IN = exports.TRACE = exports.DEBUG = exports.INFO = exports.WARNING = exports.ERROR = void 0;
|
|
24
|
+
exports.setLogVerbosity = setLogVerbosity;
|
|
25
|
+
exports.setLogFilter = setLogFilter;
|
|
26
|
+
exports.setLoggingProvider = setLoggingProvider;
|
|
27
|
+
exports.getLogger = getLogger;
|
|
24
28
|
const _0_env_js_1 = require("./0_env.js");
|
|
25
29
|
let verbosity = (0, _0_env_js_1.getNumber)("LOG_VERBOSITY") || 0;
|
|
26
30
|
function setLogVerbosity(verbosity_) {
|
|
27
31
|
verbosity = verbosity_;
|
|
28
32
|
}
|
|
29
|
-
exports.setLogVerbosity = setLogVerbosity;
|
|
30
33
|
const LOG_FILTER = (0, _0_env_js_1.getString)("LOG_FILTER");
|
|
31
34
|
let filter = LOG_FILTER == null ? null : new RegExp(LOG_FILTER);
|
|
32
35
|
function setLogFilter(filter_) {
|
|
33
36
|
filter = filter_;
|
|
34
37
|
}
|
|
35
|
-
exports.setLogFilter = setLogFilter;
|
|
36
38
|
let provider = console;
|
|
37
39
|
function setLoggingProvider(provider_) {
|
|
38
40
|
provider = provider_;
|
|
39
41
|
}
|
|
40
|
-
exports.setLoggingProvider = setLoggingProvider;
|
|
41
42
|
exports.ERROR = 1;
|
|
42
43
|
exports.WARNING = 2;
|
|
43
44
|
exports.INFO = 3;
|
|
@@ -125,4 +126,3 @@ function getLogger(scope) {
|
|
|
125
126
|
},
|
|
126
127
|
};
|
|
127
128
|
}
|
|
128
|
-
exports.getLogger = getLogger;
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
20
20
|
*/
|
|
21
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
exports.factorize =
|
|
22
|
+
exports.factorize = factorize;
|
|
23
23
|
const _0_deps_js_1 = require("../0_deps.js");
|
|
24
24
|
const _0_bigint_js_1 = require("./0_bigint.js");
|
|
25
25
|
function getRandomNumberInRange(min, max) {
|
|
@@ -71,4 +71,3 @@ function factorize(pq) {
|
|
|
71
71
|
}
|
|
72
72
|
(0, _0_deps_js_1.unreachable)();
|
|
73
73
|
}
|
|
74
|
-
exports.factorize = factorize;
|